{"version":3,"file":"application-DuhyPzzk.js","sources":["../../../app/javascript/types/array.ts","../../../node_modules/vuetify/lib/components/VBadge/VBadge.mjs","../../../app/javascript/components/layout-container/MenuItem.vue","../../../node_modules/vuetify/lib/components/VApp/VApp.mjs","../../../node_modules/vuetify/lib/composables/scroll.mjs","../../../node_modules/vuetify/lib/components/VAppBar/VAppBar.mjs","../../../node_modules/vuetify/lib/components/VAppBar/VAppBarNavIcon.mjs","../../../node_modules/vuetify/lib/components/VBreadcrumbs/VBreadcrumbsDivider.mjs","../../../node_modules/vuetify/lib/components/VBreadcrumbs/VBreadcrumbsItem.mjs","../../../node_modules/vuetify/lib/components/VBreadcrumbs/VBreadcrumbs.mjs","../../../node_modules/vuetify/lib/components/VColorPicker/VColorPickerCanvas.mjs","../../../node_modules/vuetify/lib/components/VColorPicker/util/index.mjs","../../../node_modules/vuetify/lib/components/VColorPicker/VColorPickerEdit.mjs","../../../node_modules/vuetify/lib/components/VSlider/slider.mjs","../../../node_modules/vuetify/lib/components/VSlider/VSliderThumb.mjs","../../../node_modules/vuetify/lib/components/VSlider/VSliderTrack.mjs","../../../node_modules/vuetify/lib/components/VSlider/VSlider.mjs","../../../node_modules/vuetify/lib/components/VColorPicker/VColorPickerPreview.mjs","../../../node_modules/vuetify/lib/components/VColorPicker/VColorPickerSwatches.mjs","../../../node_modules/vuetify/lib/components/VColorPicker/VColorPicker.mjs","../../../node_modules/vuetify/lib/composables/refs.mjs","../../../node_modules/vuetify/lib/components/VPagination/VPagination.mjs","../../../node_modules/vuetify/lib/components/VDatePicker/VDatePickerControls.mjs","../../../node_modules/vuetify/lib/components/VDatePicker/VDatePickerHeader.mjs","../../../node_modules/vuetify/lib/composables/calendar.mjs","../../../node_modules/vuetify/lib/components/VDatePicker/VDatePickerMonth.mjs","../../../node_modules/vuetify/lib/components/VDatePicker/VDatePickerMonths.mjs","../../../node_modules/vuetify/lib/components/VDatePicker/VDatePickerYears.mjs","../../../node_modules/vuetify/lib/labs/VPicker/VPickerTitle.mjs","../../../node_modules/vuetify/lib/labs/VPicker/VPicker.mjs","../../../node_modules/vuetify/lib/components/VDatePicker/VDatePicker.mjs","../../../node_modules/vuetify/lib/components/VMain/VMain.mjs","../../../node_modules/vuetify/lib/components/VNavigationDrawer/sticky.mjs","../../../node_modules/vuetify/lib/composables/touch.mjs","../../../node_modules/vuetify/lib/components/VNavigationDrawer/touch.mjs","../../../node_modules/vuetify/lib/components/VNavigationDrawer/VNavigationDrawer.mjs","../../../app/javascript/components/TargetsListDisplay.vue","../../../app/javascript/components/library/mosaic-card/MosaicDraggableCard.vue","../../../app/javascript/components/ActiveTargetsList.vue","../../../app/javascript/components/layout-container/AppToolbar.vue","../../../app/javascript/utils/feature-switches.js","../../../app/javascript/components/MosaicBreadcrumbs.vue","../../../app/javascript/utils/sidebar/student-sidebar.ts","../../../app/javascript/utils/sidebar/common.ts","../../../app/javascript/utils/sidebar/cohort-sidebar.ts","../../../app/javascript/utils/sidebar/institution-sidebar.ts","../../../app/javascript/utils/sidebar/school-sidebar.ts","../../../app/javascript/utils/sidebar/sidebar.ts","../../../app/javascript/components/layout-container/LayoutContainer.vue","../../../app/javascript/components/nasbtt-modules/NasbttModulesAccountLinkDialog.vue","../../../app/javascript/App.vue","../../../app/javascript/components/library/mosaic-card/MosaicCard.vue","../../../app/javascript/components/library/mosaic-card/MosaicSaveCard.vue","../../../app/javascript/components/library/pages/MosaicCreateEditCardPage.vue","../../../app/javascript/components/library/mosaic-card/MosaicStepperCard.vue","../../../app/javascript/components/library/mosaic-card/MosaicCardHeading.vue","../../../app/javascript/components/library/pagination/MosaicPagination.vue","../../../app/javascript/components/library/loading/MosaicLoadErrorCard.vue","../../../app/javascript/components/library/loading/MosaicLoadError.vue","../../../app/javascript/components/library/inputs/MosaicAutocomplete.vue","../../../app/javascript/components/library/inputs/MosaicCheckbox.vue","../../../app/javascript/components/library/inputs/MosaicDatePicker.vue","../../../app/javascript/components/library/inputs/MosaicColorPicker.vue","../../../app/javascript/components/library/passwords/MosaicPasswordTextField.vue","../../../app/javascript/components/library/passwords/MosaicPasswordSecurityLink.vue","../../../app/javascript/components/library/passwords/MosaicPasswordHelp.vue","../../../app/javascript/components/library/inputs/MosaicTextArea.vue","../../../app/javascript/components/library/inputs/MosaicTextField.vue","../../../app/javascript/components/library/inputs/MosaicQuillField.vue","../../../app/javascript/components/library/inputs/MosaicFileUploadField.vue","../../../app/javascript/components/library/inputs/MosaicJudgementSelect.vue","../../../app/javascript/components/library/inputs/MosaicJudgementSetSelect.vue","../../../app/javascript/components/library/display/MosaicTooltipChip.vue","../../../app/javascript/components/library/mosaic-list/MosaicExpandableUserList.vue","../../../app/javascript/components/library/mosaic-list/MosaicList.vue","../../../app/javascript/components/library/mosaic-list/MosaicListItem.vue","../../../app/javascript/components/library/mosaic-list/MosaicTabItemList.vue","../../../app/javascript/components/library/mosaic-list/MosaicExtraFiltersSyncQuery.vue","../../../app/javascript/components/library/mosaic-list/MosaicListFiltersCard.vue","../../../app/javascript/components/library/buttons/MosaicPreviousAndNextArrowButtons.vue","../../../app/javascript/components/library/buttons/MosaicButton.vue","../../../app/javascript/components/library/buttons/MosaicIconButtonNumber.vue","../../../app/javascript/components/library/buttons/MosaicDeleteIconButton.vue","../../../app/javascript/components/library/feedback/MosaicErrorAlert.vue","../../../app/javascript/components/library/feedback/MosaicSnackbar.vue","../../../app/javascript/components/library/feedback/MosaicErrorSnackbar.vue","../../../app/javascript/components/library/feedback/MosaicSuccessSnackbar.vue","../../../app/javascript/components/library/dialogs/MosaicDialog.vue","../../../app/javascript/components/library/dialogs/MosaicSaveDialog.vue","../../../app/javascript/components/library/dialogs/MosaicDeleteDialog.vue","../../../app/javascript/components/library/dialogs/MosaicConfirmCohortActionUpdateDialog.vue","../../../app/javascript/components/library/inputs/MosaicRadioButtons.vue","../../../app/javascript/components/library/display/icons/MosaicIcon.vue","../../../app/javascript/components/library/display/icons/MosaicInfoIcon.vue","../../../app/javascript/components/library/display/icons/MosaicWarningIcon.vue","../../../app/javascript/components/library/inputs/MosaicDataCreationList.vue","../../../app/javascript/components/library/display/icons/MosaicErrorIcon.vue","../../../app/javascript/components/library/forms/MosaicForm.vue","../../../app/javascript/components/library/loading/MosaicLoadingAndErrorCards.vue","../../../app/javascript/components/library/configure-preview/MosaicConfigurePreviewPage.vue","../../../app/javascript/components/library/filters/MosaicNameEmailFilter.vue","../../../app/javascript/components/library/filters/MosaicDateRangeFilter.vue","../../../app/javascript/components/library/inputs/MosaicSwitch.vue","../../../app/javascript/components/library/display/MosaicPublishedDraftChip.vue","../../../app/javascript/components/library/display/MosaicPublishedDraftArchivedChip.vue","../../../app/javascript/components/library/pages/LegacyMosaicInlineCreationListPage.vue","../../../app/javascript/components/library/pages/MosaicInlineCreationListPage.vue","../../../app/javascript/components/library/display/MosaicTraineeCountChip.vue","../../../app/javascript/components/library/mosaic-list/MosaicInlineCreationList.vue","../../../app/javascript/components/library/mosaic-list/LegacyMosaicInlineCreationList.vue","../../../app/javascript/components/library/display/icons/MosaicNotificationIcon.vue","../../../app/javascript/components/library/display/MosaicIconBadge.vue","../../../app/javascript/components/library/display/icons/MosaicBudIcon.vue","../../../app/javascript/components/library/display/icons/MosaicGoReactIcon.vue","../../../app/javascript/components/library/display/icons/MosaicNasbttIcon.vue","../../../app/javascript/components/library/mosaic-card/MosaicCardSubtitle.vue","../../../app/javascript/components/library/display/MosaicCompletedChip.vue","../../../app/javascript/components/library/display/MosaicRoleCompletedChip.vue","../../../app/javascript/components/library/mosaic-list/MosaicOrderedList.vue","../../../app/javascript/components/library/mosaic-list/LegacyMosaicOrderedList.vue","../../../app/javascript/components/library/pages/MosaicDialogCreationListPage.vue","../../../app/javascript/components/library/display/MosaicCollapsableText.vue","../../../app/javascript/components/library/inputs/MosaicTimePicker.vue","../../../app/javascript/components/library/buttons/MosaicCloseIconButton.vue","../../../app/javascript/components/library/buttons/MosaicEvidenceIconButton.vue","../../../app/javascript/components/library/mosaic-card/MosaicSaveButtons.vue","../../../app/javascript/components/library/configure-preview/MosaicConfigurePreview.vue","../../../app/javascript/components/library/navigation/MosaicRefreshPageLink.vue","../../../app/javascript/components/library/buttons/MosaicCardActionIconButton.vue","../../../app/javascript/components/library/display/MosaicAvatar.vue","../../../app/javascript/components/library/inputs/MosaicEmailField.vue","../../../app/javascript/components/library/inputs/MosaicCheckboxMultiple.vue","../../../app/javascript/components/library/global-registration.ts","../../../app/javascript/types/luxon.ts","../../../node_modules/core-js/internals/global.js","../../../node_modules/core-js/internals/fails.js","../../../node_modules/core-js/internals/descriptors.js","../../../node_modules/core-js/internals/function-bind-native.js","../../../node_modules/core-js/internals/function-call.js","../../../node_modules/core-js/internals/object-property-is-enumerable.js","../../../node_modules/core-js/internals/create-property-descriptor.js","../../../node_modules/core-js/internals/function-uncurry-this.js","../../../node_modules/core-js/internals/classof-raw.js","../../../node_modules/core-js/internals/indexed-object.js","../../../node_modules/core-js/internals/is-null-or-undefined.js","../../../node_modules/core-js/internals/require-object-coercible.js","../../../node_modules/core-js/internals/to-indexed-object.js","../../../node_modules/core-js/internals/is-callable.js","../../../node_modules/core-js/internals/is-object.js","../../../node_modules/core-js/internals/get-built-in.js","../../../node_modules/core-js/internals/object-is-prototype-of.js","../../../node_modules/core-js/internals/engine-user-agent.js","../../../node_modules/core-js/internals/engine-v8-version.js","../../../node_modules/core-js/internals/symbol-constructor-detection.js","../../../node_modules/core-js/internals/use-symbol-as-uid.js","../../../node_modules/core-js/internals/is-symbol.js","../../../node_modules/core-js/internals/try-to-string.js","../../../node_modules/core-js/internals/a-callable.js","../../../node_modules/core-js/internals/get-method.js","../../../node_modules/core-js/internals/ordinary-to-primitive.js","../../../node_modules/core-js/internals/is-pure.js","../../../node_modules/core-js/internals/define-global-property.js","../../../node_modules/core-js/internals/shared-store.js","../../../node_modules/core-js/internals/shared.js","../../../node_modules/core-js/internals/to-object.js","../../../node_modules/core-js/internals/has-own-property.js","../../../node_modules/core-js/internals/uid.js","../../../node_modules/core-js/internals/well-known-symbol.js","../../../node_modules/core-js/internals/to-primitive.js","../../../node_modules/core-js/internals/to-property-key.js","../../../node_modules/core-js/internals/document-create-element.js","../../../node_modules/core-js/internals/ie8-dom-define.js","../../../node_modules/core-js/internals/object-get-own-property-descriptor.js","../../../node_modules/core-js/internals/v8-prototype-define-bug.js","../../../node_modules/core-js/internals/an-object.js","../../../node_modules/core-js/internals/object-define-property.js","../../../node_modules/core-js/internals/create-non-enumerable-property.js","../../../node_modules/core-js/internals/function-name.js","../../../node_modules/core-js/internals/inspect-source.js","../../../node_modules/core-js/internals/weak-map-basic-detection.js","../../../node_modules/core-js/internals/shared-key.js","../../../node_modules/core-js/internals/hidden-keys.js","../../../node_modules/core-js/internals/internal-state.js","../../../node_modules/core-js/internals/make-built-in.js","../../../node_modules/core-js/internals/define-built-in.js","../../../node_modules/core-js/internals/math-trunc.js","../../../node_modules/core-js/internals/to-integer-or-infinity.js","../../../node_modules/core-js/internals/to-absolute-index.js","../../../node_modules/core-js/internals/to-length.js","../../../node_modules/core-js/internals/length-of-array-like.js","../../../node_modules/core-js/internals/array-includes.js","../../../node_modules/core-js/internals/object-keys-internal.js","../../../node_modules/core-js/internals/enum-bug-keys.js","../../../node_modules/core-js/internals/object-get-own-property-names.js","../../../node_modules/core-js/internals/object-get-own-property-symbols.js","../../../node_modules/core-js/internals/own-keys.js","../../../node_modules/core-js/internals/copy-constructor-properties.js","../../../node_modules/core-js/internals/is-forced.js","../../../node_modules/core-js/internals/export.js","../../../node_modules/core-js/internals/to-string-tag-support.js","../../../node_modules/core-js/internals/classof.js","../../../node_modules/core-js/internals/to-string.js","../../../node_modules/core-js/internals/object-keys.js","../../../node_modules/core-js/internals/object-define-properties.js","../../../node_modules/core-js/internals/html.js","../../../node_modules/core-js/internals/object-create.js","../../../node_modules/core-js/internals/array-slice.js","../../../node_modules/core-js/internals/object-get-own-property-names-external.js","../../../node_modules/core-js/internals/define-built-in-accessor.js","../../../node_modules/core-js/internals/well-known-symbol-wrapped.js","../../../node_modules/core-js/internals/path.js","../../../node_modules/core-js/internals/well-known-symbol-define.js","../../../node_modules/core-js/internals/symbol-define-to-primitive.js","../../../node_modules/core-js/internals/set-to-string-tag.js","../../../node_modules/core-js/internals/function-uncurry-this-clause.js","../../../node_modules/core-js/internals/function-bind-context.js","../../../node_modules/core-js/internals/is-array.js","../../../node_modules/core-js/internals/is-constructor.js","../../../node_modules/core-js/internals/array-species-constructor.js","../../../node_modules/core-js/internals/array-species-create.js","../../../node_modules/core-js/internals/array-iteration.js","../../../node_modules/core-js/modules/es.symbol.constructor.js","../../../node_modules/core-js/internals/symbol-registry-detection.js","../../../node_modules/core-js/modules/es.symbol.for.js","../../../node_modules/core-js/modules/es.symbol.key-for.js","../../../node_modules/core-js/internals/function-apply.js","../../../node_modules/core-js/internals/get-json-replacer-function.js","../../../node_modules/core-js/modules/es.json.stringify.js","../../../node_modules/core-js/modules/es.object.get-own-property-symbols.js","../../../node_modules/core-js/modules/es.symbol.js","../../../node_modules/core-js/modules/es.symbol.description.js","../../../node_modules/core-js/modules/es.symbol.async-iterator.js","../../../node_modules/core-js/modules/es.symbol.has-instance.js","../../../node_modules/core-js/modules/es.symbol.is-concat-spreadable.js","../../../node_modules/core-js/modules/es.symbol.iterator.js","../../../node_modules/core-js/modules/es.symbol.match.js","../../../node_modules/core-js/modules/es.symbol.match-all.js","../../../node_modules/core-js/modules/es.symbol.replace.js","../../../node_modules/core-js/modules/es.symbol.search.js","../../../node_modules/core-js/modules/es.symbol.species.js","../../../node_modules/core-js/modules/es.symbol.split.js","../../../node_modules/core-js/modules/es.symbol.to-primitive.js","../../../node_modules/core-js/modules/es.symbol.to-string-tag.js","../../../node_modules/core-js/modules/es.symbol.unscopables.js","../../../node_modules/core-js/internals/function-uncurry-this-accessor.js","../../../node_modules/core-js/internals/is-possible-prototype.js","../../../node_modules/core-js/internals/a-possible-prototype.js","../../../node_modules/core-js/internals/object-set-prototype-of.js","../../../node_modules/core-js/internals/proxy-accessor.js","../../../node_modules/core-js/internals/inherit-if-required.js","../../../node_modules/core-js/internals/normalize-string-argument.js","../../../node_modules/core-js/internals/install-error-cause.js","../../../node_modules/core-js/internals/error-stack-clear.js","../../../node_modules/core-js/internals/error-stack-installable.js","../../../node_modules/core-js/internals/error-stack-install.js","../../../node_modules/core-js/internals/wrap-error-constructor-with-cause.js","../../../node_modules/core-js/modules/es.error.cause.js","../../../node_modules/core-js/internals/error-to-string.js","../../../node_modules/core-js/modules/es.error.to-string.js","../../../node_modules/core-js/internals/correct-prototype-getter.js","../../../node_modules/core-js/internals/object-get-prototype-of.js","../../../node_modules/core-js/internals/iterators.js","../../../node_modules/core-js/internals/is-array-iterator-method.js","../../../node_modules/core-js/internals/get-iterator-method.js","../../../node_modules/core-js/internals/get-iterator.js","../../../node_modules/core-js/internals/iterator-close.js","../../../node_modules/core-js/internals/iterate.js","../../../node_modules/core-js/modules/es.aggregate-error.constructor.js","../../../node_modules/core-js/modules/es.aggregate-error.js","../../../node_modules/core-js/modules/es.aggregate-error.cause.js","../../../node_modules/core-js/internals/add-to-unscopables.js","../../../node_modules/core-js/modules/es.array.at.js","../../../node_modules/core-js/internals/does-not-exceed-safe-integer.js","../../../node_modules/core-js/internals/create-property.js","../../../node_modules/core-js/internals/array-method-has-species-support.js","../../../node_modules/core-js/modules/es.array.concat.js","../../../node_modules/core-js/internals/delete-property-or-throw.js","../../../node_modules/core-js/internals/array-copy-within.js","../../../node_modules/core-js/modules/es.array.copy-within.js","../../../node_modules/core-js/internals/array-method-is-strict.js","../../../node_modules/core-js/modules/es.array.every.js","../../../node_modules/core-js/internals/array-fill.js","../../../node_modules/core-js/modules/es.array.fill.js","../../../node_modules/core-js/modules/es.array.filter.js","../../../node_modules/core-js/modules/es.array.find.js","../../../node_modules/core-js/modules/es.array.find-index.js","../../../node_modules/core-js/internals/array-iteration-from-last.js","../../../node_modules/core-js/modules/es.array.find-last.js","../../../node_modules/core-js/modules/es.array.find-last-index.js","../../../node_modules/core-js/internals/flatten-into-array.js","../../../node_modules/core-js/modules/es.array.flat.js","../../../node_modules/core-js/modules/es.array.flat-map.js","../../../node_modules/core-js/internals/array-for-each.js","../../../node_modules/core-js/modules/es.array.for-each.js","../../../node_modules/core-js/internals/call-with-safe-iteration-closing.js","../../../node_modules/core-js/internals/array-from.js","../../../node_modules/core-js/internals/check-correctness-of-iteration.js","../../../node_modules/core-js/modules/es.array.from.js","../../../node_modules/core-js/modules/es.array.includes.js","../../../node_modules/core-js/modules/es.array.index-of.js","../../../node_modules/core-js/modules/es.array.is-array.js","../../../node_modules/core-js/internals/iterators-core.js","../../../node_modules/core-js/internals/iterator-create-constructor.js","../../../node_modules/core-js/internals/iterator-define.js","../../../node_modules/core-js/internals/create-iter-result-object.js","../../../node_modules/core-js/modules/es.array.iterator.js","../../../node_modules/core-js/modules/es.array.join.js","../../../node_modules/core-js/internals/array-last-index-of.js","../../../node_modules/core-js/modules/es.array.last-index-of.js","../../../node_modules/core-js/modules/es.array.map.js","../../../node_modules/core-js/modules/es.array.of.js","../../../node_modules/core-js/internals/array-set-length.js","../../../node_modules/core-js/modules/es.array.push.js","../../../node_modules/core-js/internals/array-reduce.js","../../../node_modules/core-js/internals/engine-is-node.js","../../../node_modules/core-js/modules/es.array.reduce.js","../../../node_modules/core-js/modules/es.array.reduce-right.js","../../../node_modules/core-js/modules/es.array.reverse.js","../../../node_modules/core-js/modules/es.array.slice.js","../../../node_modules/core-js/modules/es.array.some.js","../../../node_modules/core-js/internals/array-sort.js","../../../node_modules/core-js/internals/engine-ff-version.js","../../../node_modules/core-js/internals/engine-is-ie-or-edge.js","../../../node_modules/core-js/internals/engine-webkit-version.js","../../../node_modules/core-js/modules/es.array.sort.js","../../../node_modules/core-js/internals/set-species.js","../../../node_modules/core-js/modules/es.array.species.js","../../../node_modules/core-js/modules/es.array.splice.js","../../../node_modules/core-js/internals/array-to-reversed.js","../../../node_modules/core-js/modules/es.array.to-reversed.js","../../../node_modules/core-js/internals/array-from-constructor-and-list.js","../../../node_modules/core-js/internals/get-built-in-prototype-method.js","../../../node_modules/core-js/modules/es.array.to-sorted.js","../../../node_modules/core-js/modules/es.array.to-spliced.js","../../../node_modules/core-js/modules/es.array.unscopables.flat.js","../../../node_modules/core-js/modules/es.array.unscopables.flat-map.js","../../../node_modules/core-js/modules/es.array.unshift.js","../../../node_modules/core-js/internals/array-with.js","../../../node_modules/core-js/modules/es.array.with.js","../../../node_modules/core-js/internals/array-buffer-basic-detection.js","../../../node_modules/core-js/internals/define-built-ins.js","../../../node_modules/core-js/internals/an-instance.js","../../../node_modules/core-js/internals/to-index.js","../../../node_modules/core-js/internals/math-sign.js","../../../node_modules/core-js/internals/math-float-round.js","../../../node_modules/core-js/internals/math-fround.js","../../../node_modules/core-js/internals/ieee754.js","../../../node_modules/core-js/internals/array-buffer.js","../../../node_modules/core-js/modules/es.array-buffer.constructor.js","../../../node_modules/core-js/internals/array-buffer-view-core.js","../../../node_modules/core-js/modules/es.array-buffer.is-view.js","../../../node_modules/core-js/internals/a-constructor.js","../../../node_modules/core-js/internals/species-constructor.js","../../../node_modules/core-js/modules/es.array-buffer.slice.js","../../../node_modules/core-js/modules/es.data-view.constructor.js","../../../node_modules/core-js/modules/es.data-view.js","../../../node_modules/core-js/internals/array-buffer-byte-length.js","../../../node_modules/core-js/internals/array-buffer-is-detached.js","../../../node_modules/core-js/modules/es.array-buffer.detached.js","../../../node_modules/core-js/internals/try-node-require.js","../../../node_modules/core-js/internals/engine-is-deno.js","../../../node_modules/core-js/internals/engine-is-browser.js","../../../node_modules/core-js/internals/structured-clone-proper-transfer.js","../../../node_modules/core-js/internals/detach-transferable.js","../../../node_modules/core-js/internals/array-buffer-transfer.js","../../../node_modules/core-js/modules/es.array-buffer.transfer.js","../../../node_modules/core-js/modules/es.array-buffer.transfer-to-fixed-length.js","../../../node_modules/core-js/modules/es.date.get-year.js","../../../node_modules/core-js/modules/es.date.now.js","../../../node_modules/core-js/modules/es.date.set-year.js","../../../node_modules/core-js/modules/es.date.to-gmt-string.js","../../../node_modules/core-js/internals/string-repeat.js","../../../node_modules/core-js/internals/string-pad.js","../../../node_modules/core-js/internals/date-to-iso-string.js","../../../node_modules/core-js/modules/es.date.to-iso-string.js","../../../node_modules/core-js/modules/es.date.to-json.js","../../../node_modules/core-js/internals/date-to-primitive.js","../../../node_modules/core-js/modules/es.date.to-primitive.js","../../../node_modules/core-js/modules/es.date.to-string.js","../../../node_modules/core-js/modules/es.escape.js","../../../node_modules/core-js/internals/function-bind.js","../../../node_modules/core-js/modules/es.function.bind.js","../../../node_modules/core-js/modules/es.function.has-instance.js","../../../node_modules/core-js/modules/es.function.name.js","../../../node_modules/core-js/modules/es.global-this.js","../../../node_modules/core-js/modules/es.json.to-string-tag.js","../../../node_modules/core-js/internals/array-buffer-non-extensible.js","../../../node_modules/core-js/internals/object-is-extensible.js","../../../node_modules/core-js/internals/freezing.js","../../../node_modules/core-js/internals/internal-metadata.js","../../../node_modules/core-js/internals/collection.js","../../../node_modules/core-js/internals/collection-strong.js","../../../node_modules/core-js/modules/es.map.constructor.js","../../../node_modules/core-js/modules/es.map.js","../../../node_modules/core-js/internals/map-helpers.js","../../../node_modules/core-js/modules/es.map.group-by.js","../../../node_modules/core-js/internals/math-log1p.js","../../../node_modules/core-js/modules/es.math.acosh.js","../../../node_modules/core-js/modules/es.math.asinh.js","../../../node_modules/core-js/modules/es.math.atanh.js","../../../node_modules/core-js/modules/es.math.cbrt.js","../../../node_modules/core-js/modules/es.math.clz32.js","../../../node_modules/core-js/internals/math-expm1.js","../../../node_modules/core-js/modules/es.math.cosh.js","../../../node_modules/core-js/modules/es.math.expm1.js","../../../node_modules/core-js/modules/es.math.fround.js","../../../node_modules/core-js/modules/es.math.hypot.js","../../../node_modules/core-js/modules/es.math.imul.js","../../../node_modules/core-js/internals/math-log10.js","../../../node_modules/core-js/modules/es.math.log10.js","../../../node_modules/core-js/modules/es.math.log1p.js","../../../node_modules/core-js/modules/es.math.log2.js","../../../node_modules/core-js/modules/es.math.sign.js","../../../node_modules/core-js/modules/es.math.sinh.js","../../../node_modules/core-js/modules/es.math.tanh.js","../../../node_modules/core-js/modules/es.math.to-string-tag.js","../../../node_modules/core-js/modules/es.math.trunc.js","../../../node_modules/core-js/internals/this-number-value.js","../../../node_modules/core-js/internals/whitespaces.js","../../../node_modules/core-js/internals/string-trim.js","../../../node_modules/core-js/modules/es.number.constructor.js","../../../node_modules/core-js/modules/es.number.epsilon.js","../../../node_modules/core-js/internals/number-is-finite.js","../../../node_modules/core-js/modules/es.number.is-finite.js","../../../node_modules/core-js/internals/is-integral-number.js","../../../node_modules/core-js/modules/es.number.is-integer.js","../../../node_modules/core-js/modules/es.number.is-nan.js","../../../node_modules/core-js/modules/es.number.is-safe-integer.js","../../../node_modules/core-js/modules/es.number.max-safe-integer.js","../../../node_modules/core-js/modules/es.number.min-safe-integer.js","../../../node_modules/core-js/internals/number-parse-float.js","../../../node_modules/core-js/modules/es.number.parse-float.js","../../../node_modules/core-js/internals/number-parse-int.js","../../../node_modules/core-js/modules/es.number.parse-int.js","../../../node_modules/core-js/modules/es.number.to-exponential.js","../../../node_modules/core-js/modules/es.number.to-fixed.js","../../../node_modules/core-js/modules/es.number.to-precision.js","../../../node_modules/core-js/internals/object-assign.js","../../../node_modules/core-js/modules/es.object.assign.js","../../../node_modules/core-js/modules/es.object.create.js","../../../node_modules/core-js/internals/object-prototype-accessors-forced.js","../../../node_modules/core-js/modules/es.object.define-getter.js","../../../node_modules/core-js/modules/es.object.define-properties.js","../../../node_modules/core-js/modules/es.object.define-property.js","../../../node_modules/core-js/modules/es.object.define-setter.js","../../../node_modules/core-js/internals/object-to-array.js","../../../node_modules/core-js/modules/es.object.entries.js","../../../node_modules/core-js/modules/es.object.freeze.js","../../../node_modules/core-js/modules/es.object.from-entries.js","../../../node_modules/core-js/modules/es.object.get-own-property-descriptor.js","../../../node_modules/core-js/modules/es.object.get-own-property-descriptors.js","../../../node_modules/core-js/modules/es.object.get-own-property-names.js","../../../node_modules/core-js/modules/es.object.get-prototype-of.js","../../../node_modules/core-js/modules/es.object.group-by.js","../../../node_modules/core-js/modules/es.object.has-own.js","../../../node_modules/core-js/internals/same-value.js","../../../node_modules/core-js/modules/es.object.is.js","../../../node_modules/core-js/modules/es.object.is-extensible.js","../../../node_modules/core-js/modules/es.object.is-frozen.js","../../../node_modules/core-js/modules/es.object.is-sealed.js","../../../node_modules/core-js/modules/es.object.keys.js","../../../node_modules/core-js/modules/es.object.lookup-getter.js","../../../node_modules/core-js/modules/es.object.lookup-setter.js","../../../node_modules/core-js/modules/es.object.prevent-extensions.js","../../../node_modules/core-js/modules/es.object.proto.js","../../../node_modules/core-js/modules/es.object.seal.js","../../../node_modules/core-js/modules/es.object.set-prototype-of.js","../../../node_modules/core-js/internals/object-to-string.js","../../../node_modules/core-js/modules/es.object.to-string.js","../../../node_modules/core-js/modules/es.object.values.js","../../../node_modules/core-js/modules/es.parse-float.js","../../../node_modules/core-js/modules/es.parse-int.js","../../../node_modules/core-js/internals/validate-arguments-length.js","../../../node_modules/core-js/internals/engine-is-ios.js","../../../node_modules/core-js/internals/task.js","../../../node_modules/core-js/internals/safe-get-built-in.js","../../../node_modules/core-js/internals/queue.js","../../../node_modules/core-js/internals/engine-is-ios-pebble.js","../../../node_modules/core-js/internals/engine-is-webos-webkit.js","../../../node_modules/core-js/internals/microtask.js","../../../node_modules/core-js/internals/host-report-errors.js","../../../node_modules/core-js/internals/perform.js","../../../node_modules/core-js/internals/promise-native-constructor.js","../../../node_modules/core-js/internals/promise-constructor-detection.js","../../../node_modules/core-js/internals/new-promise-capability.js","../../../node_modules/core-js/modules/es.promise.constructor.js","../../../node_modules/core-js/internals/promise-statics-incorrect-iteration.js","../../../node_modules/core-js/modules/es.promise.all.js","../../../node_modules/core-js/modules/es.promise.catch.js","../../../node_modules/core-js/modules/es.promise.race.js","../../../node_modules/core-js/modules/es.promise.reject.js","../../../node_modules/core-js/internals/promise-resolve.js","../../../node_modules/core-js/modules/es.promise.resolve.js","../../../node_modules/core-js/modules/es.promise.js","../../../node_modules/core-js/modules/es.promise.all-settled.js","../../../node_modules/core-js/modules/es.promise.any.js","../../../node_modules/core-js/modules/es.promise.finally.js","../../../node_modules/core-js/modules/es.promise.with-resolvers.js","../../../node_modules/core-js/modules/es.reflect.apply.js","../../../node_modules/core-js/modules/es.reflect.construct.js","../../../node_modules/core-js/modules/es.reflect.define-property.js","../../../node_modules/core-js/modules/es.reflect.delete-property.js","../../../node_modules/core-js/internals/is-data-descriptor.js","../../../node_modules/core-js/modules/es.reflect.get.js","../../../node_modules/core-js/modules/es.reflect.get-own-property-descriptor.js","../../../node_modules/core-js/modules/es.reflect.get-prototype-of.js","../../../node_modules/core-js/modules/es.reflect.has.js","../../../node_modules/core-js/modules/es.reflect.is-extensible.js","../../../node_modules/core-js/modules/es.reflect.own-keys.js","../../../node_modules/core-js/modules/es.reflect.prevent-extensions.js","../../../node_modules/core-js/modules/es.reflect.set.js","../../../node_modules/core-js/modules/es.reflect.set-prototype-of.js","../../../node_modules/core-js/modules/es.reflect.to-string-tag.js","../../../node_modules/core-js/internals/is-regexp.js","../../../node_modules/core-js/internals/regexp-flags.js","../../../node_modules/core-js/internals/regexp-get-flags.js","../../../node_modules/core-js/internals/regexp-sticky-helpers.js","../../../node_modules/core-js/internals/regexp-unsupported-dot-all.js","../../../node_modules/core-js/internals/regexp-unsupported-ncg.js","../../../node_modules/core-js/modules/es.regexp.constructor.js","../../../node_modules/core-js/modules/es.regexp.dot-all.js","../../../node_modules/core-js/internals/regexp-exec.js","../../../node_modules/core-js/modules/es.regexp.exec.js","../../../node_modules/core-js/modules/es.regexp.flags.js","../../../node_modules/core-js/modules/es.regexp.sticky.js","../../../node_modules/core-js/modules/es.regexp.test.js","../../../node_modules/core-js/modules/es.regexp.to-string.js","../../../node_modules/core-js/modules/es.set.constructor.js","../../../node_modules/core-js/modules/es.set.js","../../../node_modules/core-js/internals/set-helpers.js","../../../node_modules/core-js/internals/a-set.js","../../../node_modules/core-js/internals/iterate-simple.js","../../../node_modules/core-js/internals/set-iterate.js","../../../node_modules/core-js/internals/set-clone.js","../../../node_modules/core-js/internals/set-size.js","../../../node_modules/core-js/internals/get-iterator-direct.js","../../../node_modules/core-js/internals/get-set-record.js","../../../node_modules/core-js/internals/set-difference.js","../../../node_modules/core-js/internals/set-method-accept-set-like.js","../../../node_modules/core-js/modules/es.set.difference.v2.js","../../../node_modules/core-js/internals/set-intersection.js","../../../node_modules/core-js/modules/es.set.intersection.v2.js","../../../node_modules/core-js/internals/set-is-disjoint-from.js","../../../node_modules/core-js/modules/es.set.is-disjoint-from.v2.js","../../../node_modules/core-js/internals/set-is-subset-of.js","../../../node_modules/core-js/modules/es.set.is-subset-of.v2.js","../../../node_modules/core-js/internals/set-is-superset-of.js","../../../node_modules/core-js/modules/es.set.is-superset-of.v2.js","../../../node_modules/core-js/internals/set-symmetric-difference.js","../../../node_modules/core-js/modules/es.set.symmetric-difference.v2.js","../../../node_modules/core-js/internals/set-union.js","../../../node_modules/core-js/modules/es.set.union.v2.js","../../../node_modules/core-js/modules/es.string.at-alternative.js","../../../node_modules/core-js/internals/string-multibyte.js","../../../node_modules/core-js/modules/es.string.code-point-at.js","../../../node_modules/core-js/internals/not-a-regexp.js","../../../node_modules/core-js/internals/correct-is-regexp-logic.js","../../../node_modules/core-js/modules/es.string.ends-with.js","../../../node_modules/core-js/modules/es.string.from-code-point.js","../../../node_modules/core-js/modules/es.string.includes.js","../../../node_modules/core-js/modules/es.string.is-well-formed.js","../../../node_modules/core-js/modules/es.string.iterator.js","../../../node_modules/core-js/internals/fix-regexp-well-known-symbol-logic.js","../../../node_modules/core-js/internals/advance-string-index.js","../../../node_modules/core-js/internals/regexp-exec-abstract.js","../../../node_modules/core-js/modules/es.string.match.js","../../../node_modules/core-js/modules/es.string.match-all.js","../../../node_modules/core-js/internals/string-pad-webkit-bug.js","../../../node_modules/core-js/modules/es.string.pad-end.js","../../../node_modules/core-js/modules/es.string.pad-start.js","../../../node_modules/core-js/modules/es.string.raw.js","../../../node_modules/core-js/modules/es.string.repeat.js","../../../node_modules/core-js/internals/get-substitution.js","../../../node_modules/core-js/modules/es.string.replace.js","../../../node_modules/core-js/modules/es.string.replace-all.js","../../../node_modules/core-js/modules/es.string.search.js","../../../node_modules/core-js/modules/es.string.split.js","../../../node_modules/core-js/modules/es.string.starts-with.js","../../../node_modules/core-js/modules/es.string.substr.js","../../../node_modules/core-js/modules/es.string.to-well-formed.js","../../../node_modules/core-js/internals/string-trim-forced.js","../../../node_modules/core-js/modules/es.string.trim.js","../../../node_modules/core-js/internals/string-trim-end.js","../../../node_modules/core-js/modules/es.string.trim-right.js","../../../node_modules/core-js/modules/es.string.trim-end.js","../../../node_modules/core-js/internals/string-trim-start.js","../../../node_modules/core-js/modules/es.string.trim-left.js","../../../node_modules/core-js/modules/es.string.trim-start.js","../../../node_modules/core-js/internals/create-html.js","../../../node_modules/core-js/internals/string-html-forced.js","../../../node_modules/core-js/modules/es.string.anchor.js","../../../node_modules/core-js/modules/es.string.big.js","../../../node_modules/core-js/modules/es.string.blink.js","../../../node_modules/core-js/modules/es.string.bold.js","../../../node_modules/core-js/modules/es.string.fixed.js","../../../node_modules/core-js/modules/es.string.fontcolor.js","../../../node_modules/core-js/modules/es.string.fontsize.js","../../../node_modules/core-js/modules/es.string.italics.js","../../../node_modules/core-js/modules/es.string.link.js","../../../node_modules/core-js/modules/es.string.small.js","../../../node_modules/core-js/modules/es.string.strike.js","../../../node_modules/core-js/modules/es.string.sub.js","../../../node_modules/core-js/modules/es.string.sup.js","../../../node_modules/core-js/internals/typed-array-constructors-require-wrappers.js","../../../node_modules/core-js/internals/to-positive-integer.js","../../../node_modules/core-js/internals/to-offset.js","../../../node_modules/core-js/internals/to-uint8-clamped.js","../../../node_modules/core-js/internals/is-big-int-array.js","../../../node_modules/core-js/internals/to-big-int.js","../../../node_modules/core-js/internals/typed-array-from.js","../../../node_modules/core-js/internals/typed-array-constructor.js","../../../node_modules/core-js/modules/es.typed-array.float32-array.js","../../../node_modules/core-js/modules/es.typed-array.float64-array.js","../../../node_modules/core-js/modules/es.typed-array.int8-array.js","../../../node_modules/core-js/modules/es.typed-array.int16-array.js","../../../node_modules/core-js/modules/es.typed-array.int32-array.js","../../../node_modules/core-js/modules/es.typed-array.uint8-array.js","../../../node_modules/core-js/modules/es.typed-array.uint8-clamped-array.js","../../../node_modules/core-js/modules/es.typed-array.uint16-array.js","../../../node_modules/core-js/modules/es.typed-array.uint32-array.js","../../../node_modules/core-js/modules/es.typed-array.at.js","../../../node_modules/core-js/modules/es.typed-array.copy-within.js","../../../node_modules/core-js/modules/es.typed-array.every.js","../../../node_modules/core-js/modules/es.typed-array.fill.js","../../../node_modules/core-js/internals/typed-array-species-constructor.js","../../../node_modules/core-js/internals/typed-array-from-species-and-list.js","../../../node_modules/core-js/modules/es.typed-array.filter.js","../../../node_modules/core-js/modules/es.typed-array.find.js","../../../node_modules/core-js/modules/es.typed-array.find-index.js","../../../node_modules/core-js/modules/es.typed-array.find-last.js","../../../node_modules/core-js/modules/es.typed-array.find-last-index.js","../../../node_modules/core-js/modules/es.typed-array.for-each.js","../../../node_modules/core-js/modules/es.typed-array.from.js","../../../node_modules/core-js/modules/es.typed-array.includes.js","../../../node_modules/core-js/modules/es.typed-array.index-of.js","../../../node_modules/core-js/modules/es.typed-array.iterator.js","../../../node_modules/core-js/modules/es.typed-array.join.js","../../../node_modules/core-js/modules/es.typed-array.last-index-of.js","../../../node_modules/core-js/modules/es.typed-array.map.js","../../../node_modules/core-js/modules/es.typed-array.of.js","../../../node_modules/core-js/modules/es.typed-array.reduce.js","../../../node_modules/core-js/modules/es.typed-array.reduce-right.js","../../../node_modules/core-js/modules/es.typed-array.reverse.js","../../../node_modules/core-js/modules/es.typed-array.set.js","../../../node_modules/core-js/modules/es.typed-array.slice.js","../../../node_modules/core-js/modules/es.typed-array.some.js","../../../node_modules/core-js/modules/es.typed-array.sort.js","../../../node_modules/core-js/modules/es.typed-array.subarray.js","../../../node_modules/core-js/modules/es.typed-array.to-locale-string.js","../../../node_modules/core-js/modules/es.typed-array.to-reversed.js","../../../node_modules/core-js/modules/es.typed-array.to-sorted.js","../../../node_modules/core-js/modules/es.typed-array.to-string.js","../../../node_modules/core-js/modules/es.typed-array.with.js","../../../node_modules/core-js/modules/es.unescape.js","../../../node_modules/core-js/internals/collection-weak.js","../../../node_modules/core-js/modules/es.weak-map.constructor.js","../../../node_modules/core-js/modules/es.weak-map.js","../../../node_modules/core-js/modules/es.weak-set.constructor.js","../../../node_modules/core-js/modules/es.weak-set.js","../../../node_modules/core-js/internals/base64-map.js","../../../node_modules/core-js/modules/web.atob.js","../../../node_modules/core-js/modules/web.btoa.js","../../../node_modules/core-js/internals/dom-iterables.js","../../../node_modules/core-js/internals/dom-token-list-prototype.js","../../../node_modules/core-js/modules/web.dom-collections.for-each.js","../../../node_modules/core-js/modules/web.dom-collections.iterator.js","../../../node_modules/core-js/internals/dom-exception-constants.js","../../../node_modules/core-js/modules/web.dom-exception.constructor.js","../../../node_modules/core-js/modules/web.dom-exception.stack.js","../../../node_modules/core-js/modules/web.dom-exception.to-string-tag.js","../../../node_modules/core-js/modules/web.clear-immediate.js","../../../node_modules/core-js/internals/engine-is-bun.js","../../../node_modules/core-js/internals/schedulers-fix.js","../../../node_modules/core-js/modules/web.set-immediate.js","../../../node_modules/core-js/modules/web.immediate.js","../../../node_modules/core-js/modules/web.queue-microtask.js","../../../node_modules/core-js/modules/web.self.js","../../../node_modules/core-js/modules/web.structured-clone.js","../../../node_modules/core-js/modules/web.set-interval.js","../../../node_modules/core-js/modules/web.set-timeout.js","../../../node_modules/core-js/modules/web.timers.js","../../../node_modules/core-js/internals/url-constructor-detection.js","../../../node_modules/core-js/internals/string-punycode-to-ascii.js","../../../node_modules/core-js/modules/web.url-search-params.constructor.js","../../../node_modules/core-js/modules/web.url.constructor.js","../../../node_modules/core-js/modules/web.url.js","../../../node_modules/core-js/modules/web.url.can-parse.js","../../../node_modules/core-js/modules/web.url.parse.js","../../../node_modules/core-js/modules/web.url.to-json.js","../../../node_modules/core-js/modules/web.url-search-params.js","../../../node_modules/core-js/modules/web.url-search-params.delete.js","../../../node_modules/core-js/modules/web.url-search-params.has.js","../../../node_modules/core-js/modules/web.url-search-params.size.js","../../../node_modules/core-js/stable/index.js","../../../app/javascript/entrypoints/application.ts"],"sourcesContent":["import type { ListIteratee, Many, ValueIteratee } from 'lodash';\nimport _ from 'lodash';\n\ndeclare global {\n interface Array {\n sortBy(sort: Many>, orders?: Many): T[];\n unique(): T[];\n uniqueBy(selector: ValueIteratee): T[];\n sum(): number;\n filter(pred: (a: T) => a is U): U[];\n }\n}\n\nArray.prototype.unique = function () {\n function onlyUnique(value: T, index: number, self: T[]) {\n return self.indexOf(value) === index;\n }\n return this.filter(onlyUnique);\n};\n\nArray.prototype.uniqueBy = function (selector) {\n return _.uniqBy(this, selector);\n};\n\nArray.prototype.sortBy = function (selectors: Many>, orders?: Many) {\n return _.orderBy(this, selectors, orders);\n};\n\nArray.prototype.sum = function () {\n return _.sum(this);\n};\n","import { withDirectives as _withDirectives, mergeProps as _mergeProps, vShow as _vShow, createVNode as _createVNode } from \"vue\";\n// Styles\nimport \"./VBadge.css\";\n\n// Components\nimport { VIcon } from \"../VIcon/index.mjs\"; // Composables\nimport { useBackgroundColor, useTextColor } from \"../../composables/color.mjs\";\nimport { makeComponentProps } from \"../../composables/component.mjs\";\nimport { IconValue } from \"../../composables/icons.mjs\";\nimport { useLocale } from \"../../composables/locale.mjs\";\nimport { makeLocationProps, useLocation } from \"../../composables/location.mjs\";\nimport { makeRoundedProps, useRounded } from \"../../composables/rounded.mjs\";\nimport { makeTagProps } from \"../../composables/tag.mjs\";\nimport { makeThemeProps, useTheme } from \"../../composables/theme.mjs\";\nimport { makeTransitionProps, MaybeTransition } from \"../../composables/transition.mjs\"; // Utilities\nimport { toRef } from 'vue';\nimport { genericComponent, pickWithRest, propsFactory, useRender } from \"../../util/index.mjs\";\nexport const makeVBadgeProps = propsFactory({\n bordered: Boolean,\n color: String,\n content: [Number, String],\n dot: Boolean,\n floating: Boolean,\n icon: IconValue,\n inline: Boolean,\n label: {\n type: String,\n default: '$vuetify.badge'\n },\n max: [Number, String],\n modelValue: {\n type: Boolean,\n default: true\n },\n offsetX: [Number, String],\n offsetY: [Number, String],\n textColor: String,\n ...makeComponentProps(),\n ...makeLocationProps({\n location: 'top end'\n }),\n ...makeRoundedProps(),\n ...makeTagProps(),\n ...makeThemeProps(),\n ...makeTransitionProps({\n transition: 'scale-rotate-transition'\n })\n}, 'VBadge');\nexport const VBadge = genericComponent()({\n name: 'VBadge',\n inheritAttrs: false,\n props: makeVBadgeProps(),\n setup(props, ctx) {\n const {\n backgroundColorClasses,\n backgroundColorStyles\n } = useBackgroundColor(toRef(props, 'color'));\n const {\n roundedClasses\n } = useRounded(props);\n const {\n t\n } = useLocale();\n const {\n textColorClasses,\n textColorStyles\n } = useTextColor(toRef(props, 'textColor'));\n const {\n themeClasses\n } = useTheme();\n const {\n locationStyles\n } = useLocation(props, true, side => {\n const base = props.floating ? props.dot ? 2 : 4 : props.dot ? 8 : 12;\n return base + (['top', 'bottom'].includes(side) ? +(props.offsetY ?? 0) : ['left', 'right'].includes(side) ? +(props.offsetX ?? 0) : 0);\n });\n useRender(() => {\n const value = Number(props.content);\n const content = !props.max || isNaN(value) ? props.content : value <= +props.max ? value : `${props.max}+`;\n const [badgeAttrs, attrs] = pickWithRest(ctx.attrs, ['aria-atomic', 'aria-label', 'aria-live', 'role', 'title']);\n return _createVNode(props.tag, _mergeProps({\n \"class\": ['v-badge', {\n 'v-badge--bordered': props.bordered,\n 'v-badge--dot': props.dot,\n 'v-badge--floating': props.floating,\n 'v-badge--inline': props.inline\n }, props.class]\n }, attrs, {\n \"style\": props.style\n }), {\n default: () => [_createVNode(\"div\", {\n \"class\": \"v-badge__wrapper\"\n }, [ctx.slots.default?.(), _createVNode(MaybeTransition, {\n \"transition\": props.transition\n }, {\n default: () => [_withDirectives(_createVNode(\"span\", _mergeProps({\n \"class\": ['v-badge__badge', themeClasses.value, backgroundColorClasses.value, roundedClasses.value, textColorClasses.value],\n \"style\": [backgroundColorStyles.value, textColorStyles.value, props.inline ? {} : locationStyles.value],\n \"aria-atomic\": \"true\",\n \"aria-label\": t(props.label, value),\n \"aria-live\": \"polite\",\n \"role\": \"status\"\n }, badgeAttrs), [props.dot ? undefined : ctx.slots.badge ? ctx.slots.badge?.() : props.icon ? _createVNode(VIcon, {\n \"icon\": props.icon\n }, null) : content]), [[_vShow, props.modelValue]])]\n })])]\n });\n });\n return {};\n }\n});\n//# sourceMappingURL=VBadge.mjs.map","\n\n\n","import { createVNode as _createVNode } from \"vue\";\n// Styles\nimport \"./VApp.css\";\n\n// Composables\nimport { makeComponentProps } from \"../../composables/component.mjs\";\nimport { createLayout, makeLayoutProps } from \"../../composables/layout.mjs\";\nimport { useRtl } from \"../../composables/locale.mjs\";\nimport { makeThemeProps, provideTheme } from \"../../composables/theme.mjs\"; // Utilities\nimport { genericComponent, propsFactory, useRender } from \"../../util/index.mjs\";\nexport const makeVAppProps = propsFactory({\n ...makeComponentProps(),\n ...makeLayoutProps({\n fullHeight: true\n }),\n ...makeThemeProps()\n}, 'VApp');\nexport const VApp = genericComponent()({\n name: 'VApp',\n props: makeVAppProps(),\n setup(props, _ref) {\n let {\n slots\n } = _ref;\n const theme = provideTheme(props);\n const {\n layoutClasses,\n getLayoutItem,\n items,\n layoutRef\n } = createLayout(props);\n const {\n rtlClasses\n } = useRtl();\n useRender(() => _createVNode(\"div\", {\n \"ref\": layoutRef,\n \"class\": ['v-application', theme.themeClasses.value, layoutClasses.value, rtlClasses.value, props.class],\n \"style\": [props.style]\n }, [_createVNode(\"div\", {\n \"class\": \"v-application__wrap\"\n }, [slots.default?.()])]));\n return {\n getLayoutItem,\n items,\n theme\n };\n }\n});\n//# sourceMappingURL=VApp.mjs.map","// Utilities\nimport { computed, onBeforeUnmount, onMounted, ref, shallowRef, watch } from 'vue';\nimport { clamp, consoleWarn, propsFactory } from \"../util/index.mjs\"; // Types\n// Composables\nexport const makeScrollProps = propsFactory({\n scrollTarget: {\n type: String\n },\n scrollThreshold: {\n type: [String, Number],\n default: 300\n }\n}, 'scroll');\nexport function useScroll(props) {\n let args = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n const {\n canScroll\n } = args;\n let previousScroll = 0;\n let previousScrollHeight = 0;\n const target = ref(null);\n const currentScroll = shallowRef(0);\n const savedScroll = shallowRef(0);\n const currentThreshold = shallowRef(0);\n const isScrollActive = shallowRef(false);\n const isScrollingUp = shallowRef(false);\n const scrollThreshold = computed(() => {\n return Number(props.scrollThreshold);\n });\n\n /**\n * 1: at top\n * 0: at threshold\n */\n const scrollRatio = computed(() => {\n return clamp((scrollThreshold.value - currentScroll.value) / scrollThreshold.value || 0);\n });\n const onScroll = () => {\n const targetEl = target.value;\n if (!targetEl || canScroll && !canScroll.value) return;\n previousScroll = currentScroll.value;\n currentScroll.value = 'window' in targetEl ? targetEl.pageYOffset : targetEl.scrollTop;\n const currentScrollHeight = targetEl instanceof Window ? document.documentElement.scrollHeight : targetEl.scrollHeight;\n if (previousScrollHeight !== currentScrollHeight) {\n previousScrollHeight = currentScrollHeight;\n return;\n }\n isScrollingUp.value = currentScroll.value < previousScroll;\n currentThreshold.value = Math.abs(currentScroll.value - scrollThreshold.value);\n };\n watch(isScrollingUp, () => {\n savedScroll.value = savedScroll.value || currentScroll.value;\n });\n watch(isScrollActive, () => {\n savedScroll.value = 0;\n });\n onMounted(() => {\n watch(() => props.scrollTarget, scrollTarget => {\n const newTarget = scrollTarget ? document.querySelector(scrollTarget) : window;\n if (!newTarget) {\n consoleWarn(`Unable to locate element with identifier ${scrollTarget}`);\n return;\n }\n if (newTarget === target.value) return;\n target.value?.removeEventListener('scroll', onScroll);\n target.value = newTarget;\n target.value.addEventListener('scroll', onScroll, {\n passive: true\n });\n }, {\n immediate: true\n });\n });\n onBeforeUnmount(() => {\n target.value?.removeEventListener('scroll', onScroll);\n });\n\n // Do we need this? If yes - seems that\n // there's no need to expose onScroll\n canScroll && watch(canScroll, onScroll, {\n immediate: true\n });\n return {\n scrollThreshold,\n currentScroll,\n currentThreshold,\n isScrollActive,\n scrollRatio,\n // required only for testing\n // probably can be removed\n // later (2 chars chlng)\n isScrollingUp,\n savedScroll\n };\n}\n//# sourceMappingURL=scroll.mjs.map","import { createVNode as _createVNode, mergeProps as _mergeProps, resolveDirective as _resolveDirective } from \"vue\";\n// Styles\nimport \"./VAppBar.css\";\n\n// Components\nimport { makeVToolbarProps, VToolbar } from \"../VToolbar/VToolbar.mjs\"; // Composables\nimport { makeLayoutItemProps, useLayoutItem } from \"../../composables/layout.mjs\";\nimport { useProxiedModel } from \"../../composables/proxiedModel.mjs\";\nimport { makeScrollProps, useScroll } from \"../../composables/scroll.mjs\";\nimport { useSsrBoot } from \"../../composables/ssrBoot.mjs\";\nimport { useToggleScope } from \"../../composables/toggleScope.mjs\"; // Utilities\nimport { computed, ref, shallowRef, toRef, watchEffect } from 'vue';\nimport { genericComponent, propsFactory, useRender } from \"../../util/index.mjs\"; // Types\nexport const makeVAppBarProps = propsFactory({\n scrollBehavior: String,\n modelValue: {\n type: Boolean,\n default: true\n },\n location: {\n type: String,\n default: 'top',\n validator: value => ['top', 'bottom'].includes(value)\n },\n ...makeVToolbarProps(),\n ...makeLayoutItemProps(),\n ...makeScrollProps(),\n height: {\n type: [Number, String],\n default: 64\n }\n}, 'VAppBar');\nexport const VAppBar = genericComponent()({\n name: 'VAppBar',\n props: makeVAppBarProps(),\n emits: {\n 'update:modelValue': value => true\n },\n setup(props, _ref) {\n let {\n slots\n } = _ref;\n const vToolbarRef = ref();\n const isActive = useProxiedModel(props, 'modelValue');\n const scrollBehavior = computed(() => {\n const behavior = new Set(props.scrollBehavior?.split(' ') ?? []);\n return {\n hide: behavior.has('hide'),\n fullyHide: behavior.has('fully-hide'),\n inverted: behavior.has('inverted'),\n collapse: behavior.has('collapse'),\n elevate: behavior.has('elevate'),\n fadeImage: behavior.has('fade-image')\n // shrink: behavior.has('shrink'),\n };\n });\n const canScroll = computed(() => {\n const behavior = scrollBehavior.value;\n return behavior.hide || behavior.fullyHide || behavior.inverted || behavior.collapse || behavior.elevate || behavior.fadeImage ||\n // behavior.shrink ||\n !isActive.value;\n });\n const {\n currentScroll,\n scrollThreshold,\n isScrollingUp,\n scrollRatio\n } = useScroll(props, {\n canScroll\n });\n const canHide = computed(() => scrollBehavior.value.hide || scrollBehavior.value.fullyHide);\n const isCollapsed = computed(() => props.collapse || scrollBehavior.value.collapse && (scrollBehavior.value.inverted ? scrollRatio.value > 0 : scrollRatio.value === 0));\n const isFlat = computed(() => props.flat || scrollBehavior.value.fullyHide && !isActive.value || scrollBehavior.value.elevate && (scrollBehavior.value.inverted ? currentScroll.value > 0 : currentScroll.value === 0));\n const opacity = computed(() => scrollBehavior.value.fadeImage ? scrollBehavior.value.inverted ? 1 - scrollRatio.value : scrollRatio.value : undefined);\n const height = computed(() => {\n if (scrollBehavior.value.hide && scrollBehavior.value.inverted) return 0;\n const height = vToolbarRef.value?.contentHeight ?? 0;\n const extensionHeight = vToolbarRef.value?.extensionHeight ?? 0;\n if (!canHide.value) return height + extensionHeight;\n return currentScroll.value < scrollThreshold.value || scrollBehavior.value.fullyHide ? height + extensionHeight : height;\n });\n useToggleScope(computed(() => !!props.scrollBehavior), () => {\n watchEffect(() => {\n if (canHide.value) {\n if (scrollBehavior.value.inverted) {\n isActive.value = currentScroll.value > scrollThreshold.value;\n } else {\n isActive.value = isScrollingUp.value || currentScroll.value < scrollThreshold.value;\n }\n } else {\n isActive.value = true;\n }\n });\n });\n const {\n ssrBootStyles\n } = useSsrBoot();\n const {\n layoutItemStyles\n } = useLayoutItem({\n id: props.name,\n order: computed(() => parseInt(props.order, 10)),\n position: toRef(props, 'location'),\n layoutSize: height,\n elementSize: shallowRef(undefined),\n active: isActive,\n absolute: toRef(props, 'absolute')\n });\n useRender(() => {\n const toolbarProps = VToolbar.filterProps(props);\n return _createVNode(VToolbar, _mergeProps({\n \"ref\": vToolbarRef,\n \"class\": ['v-app-bar', {\n 'v-app-bar--bottom': props.location === 'bottom'\n }, props.class],\n \"style\": [{\n ...layoutItemStyles.value,\n '--v-toolbar-image-opacity': opacity.value,\n height: undefined,\n ...ssrBootStyles.value\n }, props.style]\n }, toolbarProps, {\n \"collapse\": isCollapsed.value,\n \"flat\": isFlat.value\n }), slots);\n });\n return {};\n }\n});\n//# sourceMappingURL=VAppBar.mjs.map","import { createVNode as _createVNode, mergeProps as _mergeProps, resolveDirective as _resolveDirective } from \"vue\";\n// Components\nimport { makeVBtnProps, VBtn } from \"../VBtn/VBtn.mjs\"; // Utilities\nimport { genericComponent, propsFactory, useRender } from \"../../util/index.mjs\"; // Types\nexport const makeVAppBarNavIconProps = propsFactory({\n ...makeVBtnProps({\n icon: '$menu',\n variant: 'text'\n })\n}, 'VAppBarNavIcon');\nexport const VAppBarNavIcon = genericComponent()({\n name: 'VAppBarNavIcon',\n props: makeVAppBarNavIconProps(),\n setup(props, _ref) {\n let {\n slots\n } = _ref;\n useRender(() => _createVNode(VBtn, _mergeProps(props, {\n \"class\": ['v-app-bar-nav-icon']\n }), slots));\n return {};\n }\n});\n//# sourceMappingURL=VAppBarNavIcon.mjs.map","import { createVNode as _createVNode } from \"vue\";\n// Composables\nimport { makeComponentProps } from \"../../composables/component.mjs\"; // Utilities\nimport { genericComponent, propsFactory, useRender } from \"../../util/index.mjs\";\nexport const makeVBreadcrumbsDividerProps = propsFactory({\n divider: [Number, String],\n ...makeComponentProps()\n}, 'VBreadcrumbsDivider');\nexport const VBreadcrumbsDivider = genericComponent()({\n name: 'VBreadcrumbsDivider',\n props: makeVBreadcrumbsDividerProps(),\n setup(props, _ref) {\n let {\n slots\n } = _ref;\n useRender(() => _createVNode(\"li\", {\n \"class\": ['v-breadcrumbs-divider', props.class],\n \"style\": props.style\n }, [slots?.default?.() ?? props.divider]));\n return {};\n }\n});\n//# sourceMappingURL=VBreadcrumbsDivider.mjs.map","import { createVNode as _createVNode, mergeProps as _mergeProps } from \"vue\";\n// Composables\nimport { useTextColor } from \"../../composables/color.mjs\";\nimport { makeComponentProps } from \"../../composables/component.mjs\";\nimport { makeRouterProps, useLink } from \"../../composables/router.mjs\";\nimport { makeTagProps } from \"../../composables/tag.mjs\"; // Utilities\nimport { computed } from 'vue';\nimport { genericComponent, propsFactory, useRender } from \"../../util/index.mjs\";\nexport const makeVBreadcrumbsItemProps = propsFactory({\n active: Boolean,\n activeClass: String,\n activeColor: String,\n color: String,\n disabled: Boolean,\n title: String,\n ...makeComponentProps(),\n ...makeRouterProps(),\n ...makeTagProps({\n tag: 'li'\n })\n}, 'VBreadcrumbsItem');\nexport const VBreadcrumbsItem = genericComponent()({\n name: 'VBreadcrumbsItem',\n props: makeVBreadcrumbsItemProps(),\n setup(props, _ref) {\n let {\n slots,\n attrs\n } = _ref;\n const link = useLink(props, attrs);\n const isActive = computed(() => props.active || link.isActive?.value);\n const color = computed(() => isActive.value ? props.activeColor : props.color);\n const {\n textColorClasses,\n textColorStyles\n } = useTextColor(color);\n useRender(() => {\n return _createVNode(props.tag, {\n \"class\": ['v-breadcrumbs-item', {\n 'v-breadcrumbs-item--active': isActive.value,\n 'v-breadcrumbs-item--disabled': props.disabled,\n [`${props.activeClass}`]: isActive.value && props.activeClass\n }, textColorClasses.value, props.class],\n \"style\": [textColorStyles.value, props.style],\n \"aria-current\": isActive.value ? 'page' : undefined\n }, {\n default: () => [!link.isLink.value ? slots.default?.() ?? props.title : _createVNode(\"a\", _mergeProps({\n \"class\": \"v-breadcrumbs-item--link\",\n \"onClick\": link.navigate\n }, link.linkProps), [slots.default?.() ?? props.title])]\n });\n });\n return {};\n }\n});\n//# sourceMappingURL=VBreadcrumbsItem.mjs.map","import { mergeProps as _mergeProps, Fragment as _Fragment, resolveDirective as _resolveDirective, createVNode as _createVNode } from \"vue\";\n// Styles\nimport \"./VBreadcrumbs.css\";\n\n// Components\nimport { VBreadcrumbsDivider } from \"./VBreadcrumbsDivider.mjs\";\nimport { VBreadcrumbsItem } from \"./VBreadcrumbsItem.mjs\";\nimport { VDefaultsProvider } from \"../VDefaultsProvider/index.mjs\";\nimport { VIcon } from \"../VIcon/index.mjs\"; // Composables\nimport { useBackgroundColor } from \"../../composables/color.mjs\";\nimport { makeComponentProps } from \"../../composables/component.mjs\";\nimport { provideDefaults } from \"../../composables/defaults.mjs\";\nimport { makeDensityProps, useDensity } from \"../../composables/density.mjs\";\nimport { IconValue } from \"../../composables/icons.mjs\";\nimport { makeRoundedProps, useRounded } from \"../../composables/rounded.mjs\";\nimport { makeTagProps } from \"../../composables/tag.mjs\"; // Utilities\nimport { computed, toRef } from 'vue';\nimport { genericComponent, propsFactory, useRender } from \"../../util/index.mjs\"; // Types\nexport const makeVBreadcrumbsProps = propsFactory({\n activeClass: String,\n activeColor: String,\n bgColor: String,\n color: String,\n disabled: Boolean,\n divider: {\n type: String,\n default: '/'\n },\n icon: IconValue,\n items: {\n type: Array,\n default: () => []\n },\n ...makeComponentProps(),\n ...makeDensityProps(),\n ...makeRoundedProps(),\n ...makeTagProps({\n tag: 'ul'\n })\n}, 'VBreadcrumbs');\nexport const VBreadcrumbs = genericComponent()({\n name: 'VBreadcrumbs',\n props: makeVBreadcrumbsProps(),\n setup(props, _ref) {\n let {\n slots\n } = _ref;\n const {\n backgroundColorClasses,\n backgroundColorStyles\n } = useBackgroundColor(toRef(props, 'bgColor'));\n const {\n densityClasses\n } = useDensity(props);\n const {\n roundedClasses\n } = useRounded(props);\n provideDefaults({\n VBreadcrumbsDivider: {\n divider: toRef(props, 'divider')\n },\n VBreadcrumbsItem: {\n activeClass: toRef(props, 'activeClass'),\n activeColor: toRef(props, 'activeColor'),\n color: toRef(props, 'color'),\n disabled: toRef(props, 'disabled')\n }\n });\n const items = computed(() => props.items.map(item => {\n return typeof item === 'string' ? {\n item: {\n title: item\n },\n raw: item\n } : {\n item,\n raw: item\n };\n }));\n useRender(() => {\n const hasPrepend = !!(slots.prepend || props.icon);\n return _createVNode(props.tag, {\n \"class\": ['v-breadcrumbs', backgroundColorClasses.value, densityClasses.value, roundedClasses.value, props.class],\n \"style\": [backgroundColorStyles.value, props.style]\n }, {\n default: () => [hasPrepend && _createVNode(\"li\", {\n \"key\": \"prepend\",\n \"class\": \"v-breadcrumbs__prepend\"\n }, [!slots.prepend ? _createVNode(VIcon, {\n \"key\": \"prepend-icon\",\n \"start\": true,\n \"icon\": props.icon\n }, null) : _createVNode(VDefaultsProvider, {\n \"key\": \"prepend-defaults\",\n \"disabled\": !props.icon,\n \"defaults\": {\n VIcon: {\n icon: props.icon,\n start: true\n }\n }\n }, slots.prepend)]), items.value.map((_ref2, index, array) => {\n let {\n item,\n raw\n } = _ref2;\n return _createVNode(_Fragment, null, [slots.item?.({\n item,\n index\n }) ?? _createVNode(VBreadcrumbsItem, _mergeProps({\n \"key\": index,\n \"disabled\": index >= array.length - 1\n }, typeof item === 'string' ? {\n title: item\n } : item), {\n default: slots.title ? () => slots.title?.({\n item,\n index\n }) : undefined\n }), index < array.length - 1 && _createVNode(VBreadcrumbsDivider, null, {\n default: slots.divider ? () => slots.divider?.({\n item: raw,\n index\n }) : undefined\n })]);\n }), slots.default?.()]\n });\n });\n return {};\n }\n});\n//# sourceMappingURL=VBreadcrumbs.mjs.map","import { createVNode as _createVNode } from \"vue\";\n// Styles\nimport \"./VColorPickerCanvas.css\";\n\n// Composables\nimport { makeComponentProps } from \"../../composables/component.mjs\";\nimport { useResizeObserver } from \"../../composables/resizeObserver.mjs\"; // Utilities\nimport { computed, onMounted, ref, shallowRef, watch } from 'vue';\nimport { clamp, convertToUnit, defineComponent, getEventCoordinates, propsFactory, useRender } from \"../../util/index.mjs\"; // Types\nexport const makeVColorPickerCanvasProps = propsFactory({\n color: {\n type: Object\n },\n disabled: Boolean,\n dotSize: {\n type: [Number, String],\n default: 10\n },\n height: {\n type: [Number, String],\n default: 150\n },\n width: {\n type: [Number, String],\n default: 300\n },\n ...makeComponentProps()\n}, 'VColorPickerCanvas');\nexport const VColorPickerCanvas = defineComponent({\n name: 'VColorPickerCanvas',\n props: makeVColorPickerCanvasProps(),\n emits: {\n 'update:color': color => true,\n 'update:position': hue => true\n },\n setup(props, _ref) {\n let {\n emit\n } = _ref;\n const isInteracting = shallowRef(false);\n const canvasRef = ref();\n const canvasWidth = shallowRef(parseFloat(props.width));\n const canvasHeight = shallowRef(parseFloat(props.height));\n const _dotPosition = ref({\n x: 0,\n y: 0\n });\n const dotPosition = computed({\n get: () => _dotPosition.value,\n set(val) {\n if (!canvasRef.value) return;\n const {\n x,\n y\n } = val;\n _dotPosition.value = val;\n emit('update:color', {\n h: props.color?.h ?? 0,\n s: clamp(x, 0, canvasWidth.value) / canvasWidth.value,\n v: 1 - clamp(y, 0, canvasHeight.value) / canvasHeight.value,\n a: props.color?.a ?? 1\n });\n }\n });\n const dotStyles = computed(() => {\n const {\n x,\n y\n } = dotPosition.value;\n const radius = parseInt(props.dotSize, 10) / 2;\n return {\n width: convertToUnit(props.dotSize),\n height: convertToUnit(props.dotSize),\n transform: `translate(${convertToUnit(x - radius)}, ${convertToUnit(y - radius)})`\n };\n });\n const {\n resizeRef\n } = useResizeObserver(entries => {\n if (!resizeRef.el?.offsetParent) return;\n const {\n width,\n height\n } = entries[0].contentRect;\n canvasWidth.value = width;\n canvasHeight.value = height;\n });\n function updateDotPosition(x, y, rect) {\n const {\n left,\n top,\n width,\n height\n } = rect;\n dotPosition.value = {\n x: clamp(x - left, 0, width),\n y: clamp(y - top, 0, height)\n };\n }\n function handleMouseDown(e) {\n if (e.type === 'mousedown') {\n // Prevent text selection while dragging\n e.preventDefault();\n }\n if (props.disabled) return;\n handleMouseMove(e);\n window.addEventListener('mousemove', handleMouseMove);\n window.addEventListener('mouseup', handleMouseUp);\n window.addEventListener('touchmove', handleMouseMove);\n window.addEventListener('touchend', handleMouseUp);\n }\n function handleMouseMove(e) {\n if (props.disabled || !canvasRef.value) return;\n isInteracting.value = true;\n const coords = getEventCoordinates(e);\n updateDotPosition(coords.clientX, coords.clientY, canvasRef.value.getBoundingClientRect());\n }\n function handleMouseUp() {\n window.removeEventListener('mousemove', handleMouseMove);\n window.removeEventListener('mouseup', handleMouseUp);\n window.removeEventListener('touchmove', handleMouseMove);\n window.removeEventListener('touchend', handleMouseUp);\n }\n function updateCanvas() {\n if (!canvasRef.value) return;\n const canvas = canvasRef.value;\n const ctx = canvas.getContext('2d');\n if (!ctx) return;\n const saturationGradient = ctx.createLinearGradient(0, 0, canvas.width, 0);\n saturationGradient.addColorStop(0, 'hsla(0, 0%, 100%, 1)'); // white\n saturationGradient.addColorStop(1, `hsla(${props.color?.h ?? 0}, 100%, 50%, 1)`);\n ctx.fillStyle = saturationGradient;\n ctx.fillRect(0, 0, canvas.width, canvas.height);\n const valueGradient = ctx.createLinearGradient(0, 0, 0, canvas.height);\n valueGradient.addColorStop(0, 'hsla(0, 0%, 0%, 0)'); // transparent\n valueGradient.addColorStop(1, 'hsla(0, 0%, 0%, 1)'); // black\n ctx.fillStyle = valueGradient;\n ctx.fillRect(0, 0, canvas.width, canvas.height);\n }\n watch(() => props.color?.h, updateCanvas, {\n immediate: true\n });\n watch(() => [canvasWidth.value, canvasHeight.value], (newVal, oldVal) => {\n updateCanvas();\n _dotPosition.value = {\n x: dotPosition.value.x * newVal[0] / oldVal[0],\n y: dotPosition.value.y * newVal[1] / oldVal[1]\n };\n }, {\n flush: 'post'\n });\n watch(() => props.color, () => {\n if (isInteracting.value) {\n isInteracting.value = false;\n return;\n }\n _dotPosition.value = props.color ? {\n x: props.color.s * canvasWidth.value,\n y: (1 - props.color.v) * canvasHeight.value\n } : {\n x: 0,\n y: 0\n };\n }, {\n deep: true,\n immediate: true\n });\n onMounted(() => updateCanvas());\n useRender(() => _createVNode(\"div\", {\n \"ref\": resizeRef,\n \"class\": ['v-color-picker-canvas', props.class],\n \"style\": props.style,\n \"onMousedown\": handleMouseDown,\n \"onTouchstartPassive\": handleMouseDown\n }, [_createVNode(\"canvas\", {\n \"ref\": canvasRef,\n \"width\": canvasWidth.value,\n \"height\": canvasHeight.value\n }, null), props.color && _createVNode(\"div\", {\n \"class\": ['v-color-picker-canvas__dot', {\n 'v-color-picker-canvas__dot--disabled': props.disabled\n }],\n \"style\": dotStyles.value\n }, null)]));\n return {};\n }\n});\n//# sourceMappingURL=VColorPickerCanvas.mjs.map","// Utilities\nimport { HexToHSV, HSLtoHSV, HSVtoHex, HSVtoHSL, HSVtoRGB, RGBtoHSV } from \"../../../util/colorUtils.mjs\";\nimport { has } from \"../../../util/helpers.mjs\"; // Types\nfunction stripAlpha(color, stripAlpha) {\n if (stripAlpha) {\n const {\n a,\n ...rest\n } = color;\n return rest;\n }\n return color;\n}\nexport function extractColor(color, input) {\n if (input == null || typeof input === 'string') {\n const hex = HSVtoHex(color);\n if (color.a === 1) return hex.slice(0, 7);else return hex;\n }\n if (typeof input === 'object') {\n let converted;\n if (has(input, ['r', 'g', 'b'])) converted = HSVtoRGB(color);else if (has(input, ['h', 's', 'l'])) converted = HSVtoHSL(color);else if (has(input, ['h', 's', 'v'])) converted = color;\n return stripAlpha(converted, !has(input, ['a']) && color.a === 1);\n }\n return color;\n}\nexport function hasAlpha(color) {\n if (!color) return false;\n if (typeof color === 'string') {\n return color.length > 7;\n }\n if (typeof color === 'object') {\n return has(color, ['a']) || has(color, ['alpha']);\n }\n return false;\n}\nexport const nullColor = {\n h: 0,\n s: 0,\n v: 0,\n a: 1\n};\nconst rgba = {\n inputProps: {\n type: 'number',\n min: 0\n },\n inputs: [{\n label: 'R',\n max: 255,\n step: 1,\n getValue: c => Math.round(c.r),\n getColor: (c, v) => ({\n ...c,\n r: Number(v)\n })\n }, {\n label: 'G',\n max: 255,\n step: 1,\n getValue: c => Math.round(c.g),\n getColor: (c, v) => ({\n ...c,\n g: Number(v)\n })\n }, {\n label: 'B',\n max: 255,\n step: 1,\n getValue: c => Math.round(c.b),\n getColor: (c, v) => ({\n ...c,\n b: Number(v)\n })\n }, {\n label: 'A',\n max: 1,\n step: 0.01,\n getValue: _ref => {\n let {\n a\n } = _ref;\n return a != null ? Math.round(a * 100) / 100 : 1;\n },\n getColor: (c, v) => ({\n ...c,\n a: Number(v)\n })\n }],\n to: HSVtoRGB,\n from: RGBtoHSV\n};\nconst rgb = {\n ...rgba,\n inputs: rgba.inputs?.slice(0, 3)\n};\nconst hsla = {\n inputProps: {\n type: 'number',\n min: 0\n },\n inputs: [{\n label: 'H',\n max: 360,\n step: 1,\n getValue: c => Math.round(c.h),\n getColor: (c, v) => ({\n ...c,\n h: Number(v)\n })\n }, {\n label: 'S',\n max: 1,\n step: 0.01,\n getValue: c => Math.round(c.s * 100) / 100,\n getColor: (c, v) => ({\n ...c,\n s: Number(v)\n })\n }, {\n label: 'L',\n max: 1,\n step: 0.01,\n getValue: c => Math.round(c.l * 100) / 100,\n getColor: (c, v) => ({\n ...c,\n l: Number(v)\n })\n }, {\n label: 'A',\n max: 1,\n step: 0.01,\n getValue: _ref2 => {\n let {\n a\n } = _ref2;\n return a != null ? Math.round(a * 100) / 100 : 1;\n },\n getColor: (c, v) => ({\n ...c,\n a: Number(v)\n })\n }],\n to: HSVtoHSL,\n from: HSLtoHSV\n};\nconst hsl = {\n ...hsla,\n inputs: hsla.inputs.slice(0, 3)\n};\nconst hexa = {\n inputProps: {\n type: 'text'\n },\n inputs: [{\n label: 'HEXA',\n getValue: c => c,\n getColor: (c, v) => v\n }],\n to: HSVtoHex,\n from: HexToHSV\n};\nconst hex = {\n ...hexa,\n inputs: [{\n label: 'HEX',\n getValue: c => c.slice(0, 7),\n getColor: (c, v) => v\n }]\n};\nexport const modes = {\n rgb,\n rgba,\n hsl,\n hsla,\n hex,\n hexa\n};\n//# sourceMappingURL=index.mjs.map","import { createVNode as _createVNode } from \"vue\";\n// Styles\nimport \"./VColorPickerEdit.css\";\n\n// Components\nimport { VBtn } from \"../VBtn/index.mjs\"; // Composables\nimport { makeComponentProps } from \"../../composables/component.mjs\"; // Utilities\nimport { computed } from 'vue';\nimport { modes, nullColor } from \"./util/index.mjs\";\nimport { defineComponent, propsFactory, useRender } from \"../../util/index.mjs\"; // Types\nconst VColorPickerInput = _ref => {\n let {\n label,\n ...rest\n } = _ref;\n return _createVNode(\"div\", {\n \"class\": \"v-color-picker-edit__input\"\n }, [_createVNode(\"input\", rest, null), _createVNode(\"span\", null, [label])]);\n};\nexport const makeVColorPickerEditProps = propsFactory({\n color: Object,\n disabled: Boolean,\n mode: {\n type: String,\n default: 'rgba',\n validator: v => Object.keys(modes).includes(v)\n },\n modes: {\n type: Array,\n default: () => Object.keys(modes),\n validator: v => Array.isArray(v) && v.every(m => Object.keys(modes).includes(m))\n },\n ...makeComponentProps()\n}, 'VColorPickerEdit');\nexport const VColorPickerEdit = defineComponent({\n name: 'VColorPickerEdit',\n props: makeVColorPickerEditProps(),\n emits: {\n 'update:color': color => true,\n 'update:mode': mode => true\n },\n setup(props, _ref2) {\n let {\n emit\n } = _ref2;\n const enabledModes = computed(() => {\n return props.modes.map(key => ({\n ...modes[key],\n name: key\n }));\n });\n const inputs = computed(() => {\n const mode = enabledModes.value.find(m => m.name === props.mode);\n if (!mode) return [];\n const color = props.color ? mode.to(props.color) : null;\n return mode.inputs?.map(_ref3 => {\n let {\n getValue,\n getColor,\n ...inputProps\n } = _ref3;\n return {\n ...mode.inputProps,\n ...inputProps,\n disabled: props.disabled,\n value: color && getValue(color),\n onChange: e => {\n const target = e.target;\n if (!target) return;\n emit('update:color', mode.from(getColor(color ?? mode.to(nullColor), target.value)));\n }\n };\n });\n });\n useRender(() => _createVNode(\"div\", {\n \"class\": ['v-color-picker-edit', props.class],\n \"style\": props.style\n }, [inputs.value?.map(props => _createVNode(VColorPickerInput, props, null)), enabledModes.value.length > 1 && _createVNode(VBtn, {\n \"icon\": \"$unfold\",\n \"size\": \"x-small\",\n \"variant\": \"plain\",\n \"onClick\": () => {\n const mi = enabledModes.value.findIndex(m => m.name === props.mode);\n emit('update:mode', enabledModes.value[(mi + 1) % enabledModes.value.length].name);\n }\n }, null)]));\n return {};\n }\n});\n//# sourceMappingURL=VColorPickerEdit.mjs.map","/* eslint-disable max-statements */\n// Composables\nimport { makeElevationProps } from \"../../composables/elevation.mjs\";\nimport { useRtl } from \"../../composables/locale.mjs\";\nimport { makeRoundedProps } from \"../../composables/rounded.mjs\"; // Utilities\nimport { computed, provide, ref, shallowRef, toRef } from 'vue';\nimport { clamp, createRange, getDecimals, propsFactory } from \"../../util/index.mjs\"; // Types\nexport const VSliderSymbol = Symbol.for('vuetify:v-slider');\nexport function getOffset(e, el, direction) {\n const vertical = direction === 'vertical';\n const rect = el.getBoundingClientRect();\n const touch = 'touches' in e ? e.touches[0] : e;\n return vertical ? touch.clientY - (rect.top + rect.height / 2) : touch.clientX - (rect.left + rect.width / 2);\n}\nfunction getPosition(e, position) {\n if ('touches' in e && e.touches.length) return e.touches[0][position];else if ('changedTouches' in e && e.changedTouches.length) return e.changedTouches[0][position];else return e[position];\n}\nexport const makeSliderProps = propsFactory({\n disabled: {\n type: Boolean,\n default: null\n },\n error: Boolean,\n readonly: {\n type: Boolean,\n default: null\n },\n max: {\n type: [Number, String],\n default: 100\n },\n min: {\n type: [Number, String],\n default: 0\n },\n step: {\n type: [Number, String],\n default: 0\n },\n thumbColor: String,\n thumbLabel: {\n type: [Boolean, String],\n default: undefined,\n validator: v => typeof v === 'boolean' || v === 'always'\n },\n thumbSize: {\n type: [Number, String],\n default: 20\n },\n showTicks: {\n type: [Boolean, String],\n default: false,\n validator: v => typeof v === 'boolean' || v === 'always'\n },\n ticks: {\n type: [Array, Object]\n },\n tickSize: {\n type: [Number, String],\n default: 2\n },\n color: String,\n trackColor: String,\n trackFillColor: String,\n trackSize: {\n type: [Number, String],\n default: 4\n },\n direction: {\n type: String,\n default: 'horizontal',\n validator: v => ['vertical', 'horizontal'].includes(v)\n },\n reverse: Boolean,\n ...makeRoundedProps(),\n ...makeElevationProps({\n elevation: 2\n }),\n ripple: {\n type: Boolean,\n default: true\n }\n}, 'Slider');\nexport const useSteps = props => {\n const min = computed(() => parseFloat(props.min));\n const max = computed(() => parseFloat(props.max));\n const step = computed(() => +props.step > 0 ? parseFloat(props.step) : 0);\n const decimals = computed(() => Math.max(getDecimals(step.value), getDecimals(min.value)));\n function roundValue(value) {\n value = parseFloat(value);\n if (step.value <= 0) return value;\n const clamped = clamp(value, min.value, max.value);\n const offset = min.value % step.value;\n const newValue = Math.round((clamped - offset) / step.value) * step.value + offset;\n return parseFloat(Math.min(newValue, max.value).toFixed(decimals.value));\n }\n return {\n min,\n max,\n step,\n decimals,\n roundValue\n };\n};\nexport const useSlider = _ref => {\n let {\n props,\n steps,\n onSliderStart,\n onSliderMove,\n onSliderEnd,\n getActiveThumb\n } = _ref;\n const {\n isRtl\n } = useRtl();\n const isReversed = toRef(props, 'reverse');\n const vertical = computed(() => props.direction === 'vertical');\n const indexFromEnd = computed(() => vertical.value !== isReversed.value);\n const {\n min,\n max,\n step,\n decimals,\n roundValue\n } = steps;\n const thumbSize = computed(() => parseInt(props.thumbSize, 10));\n const tickSize = computed(() => parseInt(props.tickSize, 10));\n const trackSize = computed(() => parseInt(props.trackSize, 10));\n const numTicks = computed(() => (max.value - min.value) / step.value);\n const disabled = toRef(props, 'disabled');\n const thumbColor = computed(() => props.error || props.disabled ? undefined : props.thumbColor ?? props.color);\n const trackColor = computed(() => props.error || props.disabled ? undefined : props.trackColor ?? props.color);\n const trackFillColor = computed(() => props.error || props.disabled ? undefined : props.trackFillColor ?? props.color);\n const mousePressed = shallowRef(false);\n const startOffset = shallowRef(0);\n const trackContainerRef = ref();\n const activeThumbRef = ref();\n function parseMouseMove(e) {\n const vertical = props.direction === 'vertical';\n const start = vertical ? 'top' : 'left';\n const length = vertical ? 'height' : 'width';\n const position = vertical ? 'clientY' : 'clientX';\n const {\n [start]: trackStart,\n [length]: trackLength\n } = trackContainerRef.value?.$el.getBoundingClientRect();\n const clickOffset = getPosition(e, position);\n\n // It is possible for left to be NaN, force to number\n let clickPos = Math.min(Math.max((clickOffset - trackStart - startOffset.value) / trackLength, 0), 1) || 0;\n if (vertical ? indexFromEnd.value : indexFromEnd.value !== isRtl.value) clickPos = 1 - clickPos;\n return roundValue(min.value + clickPos * (max.value - min.value));\n }\n const handleStop = e => {\n onSliderEnd({\n value: parseMouseMove(e)\n });\n mousePressed.value = false;\n startOffset.value = 0;\n };\n const handleStart = e => {\n activeThumbRef.value = getActiveThumb(e);\n if (!activeThumbRef.value) return;\n activeThumbRef.value.focus();\n mousePressed.value = true;\n if (activeThumbRef.value.contains(e.target)) {\n startOffset.value = getOffset(e, activeThumbRef.value, props.direction);\n } else {\n startOffset.value = 0;\n onSliderMove({\n value: parseMouseMove(e)\n });\n }\n onSliderStart({\n value: parseMouseMove(e)\n });\n };\n const moveListenerOptions = {\n passive: true,\n capture: true\n };\n function onMouseMove(e) {\n onSliderMove({\n value: parseMouseMove(e)\n });\n }\n function onSliderMouseUp(e) {\n e.stopPropagation();\n e.preventDefault();\n handleStop(e);\n window.removeEventListener('mousemove', onMouseMove, moveListenerOptions);\n window.removeEventListener('mouseup', onSliderMouseUp);\n }\n function onSliderTouchend(e) {\n handleStop(e);\n window.removeEventListener('touchmove', onMouseMove, moveListenerOptions);\n e.target?.removeEventListener('touchend', onSliderTouchend);\n }\n function onSliderTouchstart(e) {\n handleStart(e);\n window.addEventListener('touchmove', onMouseMove, moveListenerOptions);\n e.target?.addEventListener('touchend', onSliderTouchend, {\n passive: false\n });\n }\n function onSliderMousedown(e) {\n e.preventDefault();\n handleStart(e);\n window.addEventListener('mousemove', onMouseMove, moveListenerOptions);\n window.addEventListener('mouseup', onSliderMouseUp, {\n passive: false\n });\n }\n const position = val => {\n const percentage = (val - min.value) / (max.value - min.value) * 100;\n return clamp(isNaN(percentage) ? 0 : percentage, 0, 100);\n };\n const showTicks = toRef(props, 'showTicks');\n const parsedTicks = computed(() => {\n if (!showTicks.value) return [];\n if (!props.ticks) {\n return numTicks.value !== Infinity ? createRange(numTicks.value + 1).map(t => {\n const value = min.value + t * step.value;\n return {\n value,\n position: position(value)\n };\n }) : [];\n }\n if (Array.isArray(props.ticks)) return props.ticks.map(t => ({\n value: t,\n position: position(t),\n label: t.toString()\n }));\n return Object.keys(props.ticks).map(key => ({\n value: parseFloat(key),\n position: position(parseFloat(key)),\n label: props.ticks[key]\n }));\n });\n const hasLabels = computed(() => parsedTicks.value.some(_ref2 => {\n let {\n label\n } = _ref2;\n return !!label;\n }));\n const data = {\n activeThumbRef,\n color: toRef(props, 'color'),\n decimals,\n disabled,\n direction: toRef(props, 'direction'),\n elevation: toRef(props, 'elevation'),\n hasLabels,\n isReversed,\n indexFromEnd,\n min,\n max,\n mousePressed,\n numTicks,\n onSliderMousedown,\n onSliderTouchstart,\n parsedTicks,\n parseMouseMove,\n position,\n readonly: toRef(props, 'readonly'),\n rounded: toRef(props, 'rounded'),\n roundValue,\n showTicks,\n startOffset,\n step,\n thumbSize,\n thumbColor,\n thumbLabel: toRef(props, 'thumbLabel'),\n ticks: toRef(props, 'ticks'),\n tickSize,\n trackColor,\n trackContainerRef,\n trackFillColor,\n trackSize,\n vertical\n };\n provide(VSliderSymbol, data);\n return data;\n};\n//# sourceMappingURL=slider.mjs.map","import { vShow as _vShow, withDirectives as _withDirectives, resolveDirective as _resolveDirective, createVNode as _createVNode } from \"vue\";\n// Styles\nimport \"./VSliderThumb.css\";\n\n// Components\nimport { VSliderSymbol } from \"./slider.mjs\";\nimport { VScaleTransition } from \"../transitions/index.mjs\"; // Composables\nimport { useTextColor } from \"../../composables/color.mjs\";\nimport { makeComponentProps } from \"../../composables/component.mjs\";\nimport { useElevation } from \"../../composables/elevation.mjs\";\nimport { useRtl } from \"../../composables/locale.mjs\"; // Directives\nimport Ripple from \"../../directives/ripple/index.mjs\"; // Utilities\nimport { computed, inject } from 'vue';\nimport { convertToUnit, genericComponent, keyValues, propsFactory, useRender } from \"../../util/index.mjs\"; // Types\nexport const makeVSliderThumbProps = propsFactory({\n focused: Boolean,\n max: {\n type: Number,\n required: true\n },\n min: {\n type: Number,\n required: true\n },\n modelValue: {\n type: Number,\n required: true\n },\n position: {\n type: Number,\n required: true\n },\n ripple: {\n type: [Boolean, Object],\n default: true\n },\n name: String,\n ...makeComponentProps()\n}, 'VSliderThumb');\nexport const VSliderThumb = genericComponent()({\n name: 'VSliderThumb',\n directives: {\n Ripple\n },\n props: makeVSliderThumbProps(),\n emits: {\n 'update:modelValue': v => true\n },\n setup(props, _ref) {\n let {\n slots,\n emit\n } = _ref;\n const slider = inject(VSliderSymbol);\n const {\n isRtl,\n rtlClasses\n } = useRtl();\n if (!slider) throw new Error('[Vuetify] v-slider-thumb must be used inside v-slider or v-range-slider');\n const {\n thumbColor,\n step,\n disabled,\n thumbSize,\n thumbLabel,\n direction,\n isReversed,\n vertical,\n readonly,\n elevation,\n mousePressed,\n decimals,\n indexFromEnd\n } = slider;\n const elevationProps = computed(() => !disabled.value ? elevation.value : undefined);\n const {\n elevationClasses\n } = useElevation(elevationProps);\n const {\n textColorClasses,\n textColorStyles\n } = useTextColor(thumbColor);\n const {\n pageup,\n pagedown,\n end,\n home,\n left,\n right,\n down,\n up\n } = keyValues;\n const relevantKeys = [pageup, pagedown, end, home, left, right, down, up];\n const multipliers = computed(() => {\n if (step.value) return [1, 2, 3];else return [1, 5, 10];\n });\n function parseKeydown(e, value) {\n if (!relevantKeys.includes(e.key)) return;\n e.preventDefault();\n const _step = step.value || 0.1;\n const steps = (props.max - props.min) / _step;\n if ([left, right, down, up].includes(e.key)) {\n const increase = vertical.value ? [isRtl.value ? left : right, isReversed.value ? down : up] : indexFromEnd.value !== isRtl.value ? [left, up] : [right, up];\n const direction = increase.includes(e.key) ? 1 : -1;\n const multiplier = e.shiftKey ? 2 : e.ctrlKey ? 1 : 0;\n value = value + direction * _step * multipliers.value[multiplier];\n } else if (e.key === home) {\n value = props.min;\n } else if (e.key === end) {\n value = props.max;\n } else {\n const direction = e.key === pagedown ? 1 : -1;\n value = value - direction * _step * (steps > 100 ? steps / 10 : 10);\n }\n return Math.max(props.min, Math.min(props.max, value));\n }\n function onKeydown(e) {\n const newValue = parseKeydown(e, props.modelValue);\n newValue != null && emit('update:modelValue', newValue);\n }\n useRender(() => {\n const positionPercentage = convertToUnit(indexFromEnd.value ? 100 - props.position : props.position, '%');\n return _createVNode(\"div\", {\n \"class\": ['v-slider-thumb', {\n 'v-slider-thumb--focused': props.focused,\n 'v-slider-thumb--pressed': props.focused && mousePressed.value\n }, props.class, rtlClasses.value],\n \"style\": [{\n '--v-slider-thumb-position': positionPercentage,\n '--v-slider-thumb-size': convertToUnit(thumbSize.value)\n }, props.style],\n \"role\": \"slider\",\n \"tabindex\": disabled.value ? -1 : 0,\n \"aria-label\": props.name,\n \"aria-valuemin\": props.min,\n \"aria-valuemax\": props.max,\n \"aria-valuenow\": props.modelValue,\n \"aria-readonly\": !!readonly.value,\n \"aria-orientation\": direction.value,\n \"onKeydown\": !readonly.value ? onKeydown : undefined\n }, [_createVNode(\"div\", {\n \"class\": ['v-slider-thumb__surface', textColorClasses.value, elevationClasses.value],\n \"style\": {\n ...textColorStyles.value\n }\n }, null), _withDirectives(_createVNode(\"div\", {\n \"class\": ['v-slider-thumb__ripple', textColorClasses.value],\n \"style\": textColorStyles.value\n }, null), [[_resolveDirective(\"ripple\"), props.ripple, null, {\n circle: true,\n center: true\n }]]), _createVNode(VScaleTransition, {\n \"origin\": \"bottom center\"\n }, {\n default: () => [_withDirectives(_createVNode(\"div\", {\n \"class\": \"v-slider-thumb__label-container\"\n }, [_createVNode(\"div\", {\n \"class\": ['v-slider-thumb__label']\n }, [_createVNode(\"div\", null, [slots['thumb-label']?.({\n modelValue: props.modelValue\n }) ?? props.modelValue.toFixed(step.value ? decimals.value : 1)])])]), [[_vShow, thumbLabel.value && props.focused || thumbLabel.value === 'always']])]\n })]);\n });\n return {};\n }\n});\n//# sourceMappingURL=VSliderThumb.mjs.map","import { createVNode as _createVNode } from \"vue\";\n// Styles\nimport \"./VSliderTrack.css\";\n\n// Components\nimport { VSliderSymbol } from \"./slider.mjs\"; // Composables\nimport { useBackgroundColor } from \"../../composables/color.mjs\";\nimport { makeComponentProps } from \"../../composables/component.mjs\";\nimport { useRounded } from \"../../composables/rounded.mjs\"; // Utilities\nimport { computed, inject } from 'vue';\nimport { convertToUnit, genericComponent, propsFactory, useRender } from \"../../util/index.mjs\"; // Types\nexport const makeVSliderTrackProps = propsFactory({\n start: {\n type: Number,\n required: true\n },\n stop: {\n type: Number,\n required: true\n },\n ...makeComponentProps()\n}, 'VSliderTrack');\nexport const VSliderTrack = genericComponent()({\n name: 'VSliderTrack',\n props: makeVSliderTrackProps(),\n emits: {},\n setup(props, _ref) {\n let {\n slots\n } = _ref;\n const slider = inject(VSliderSymbol);\n if (!slider) throw new Error('[Vuetify] v-slider-track must be inside v-slider or v-range-slider');\n const {\n color,\n parsedTicks,\n rounded,\n showTicks,\n tickSize,\n trackColor,\n trackFillColor,\n trackSize,\n vertical,\n min,\n max,\n indexFromEnd\n } = slider;\n const {\n roundedClasses\n } = useRounded(rounded);\n const {\n backgroundColorClasses: trackFillColorClasses,\n backgroundColorStyles: trackFillColorStyles\n } = useBackgroundColor(trackFillColor);\n const {\n backgroundColorClasses: trackColorClasses,\n backgroundColorStyles: trackColorStyles\n } = useBackgroundColor(trackColor);\n const startDir = computed(() => `inset-${vertical.value ? 'block' : 'inline'}-${indexFromEnd.value ? 'end' : 'start'}`);\n const endDir = computed(() => vertical.value ? 'height' : 'width');\n const backgroundStyles = computed(() => {\n return {\n [startDir.value]: '0%',\n [endDir.value]: '100%'\n };\n });\n const trackFillWidth = computed(() => props.stop - props.start);\n const trackFillStyles = computed(() => {\n return {\n [startDir.value]: convertToUnit(props.start, '%'),\n [endDir.value]: convertToUnit(trackFillWidth.value, '%')\n };\n });\n const computedTicks = computed(() => {\n if (!showTicks.value) return [];\n const ticks = vertical.value ? parsedTicks.value.slice().reverse() : parsedTicks.value;\n return ticks.map((tick, index) => {\n const directionValue = tick.value !== min.value && tick.value !== max.value ? convertToUnit(tick.position, '%') : undefined;\n return _createVNode(\"div\", {\n \"key\": tick.value,\n \"class\": ['v-slider-track__tick', {\n 'v-slider-track__tick--filled': tick.position >= props.start && tick.position <= props.stop,\n 'v-slider-track__tick--first': tick.value === min.value,\n 'v-slider-track__tick--last': tick.value === max.value\n }],\n \"style\": {\n [startDir.value]: directionValue\n }\n }, [(tick.label || slots['tick-label']) && _createVNode(\"div\", {\n \"class\": \"v-slider-track__tick-label\"\n }, [slots['tick-label']?.({\n tick,\n index\n }) ?? tick.label])]);\n });\n });\n useRender(() => {\n return _createVNode(\"div\", {\n \"class\": ['v-slider-track', roundedClasses.value, props.class],\n \"style\": [{\n '--v-slider-track-size': convertToUnit(trackSize.value),\n '--v-slider-tick-size': convertToUnit(tickSize.value)\n }, props.style]\n }, [_createVNode(\"div\", {\n \"class\": ['v-slider-track__background', trackColorClasses.value, {\n 'v-slider-track__background--opacity': !!color.value || !trackFillColor.value\n }],\n \"style\": {\n ...backgroundStyles.value,\n ...trackColorStyles.value\n }\n }, null), _createVNode(\"div\", {\n \"class\": ['v-slider-track__fill', trackFillColorClasses.value],\n \"style\": {\n ...trackFillStyles.value,\n ...trackFillColorStyles.value\n }\n }, null), showTicks.value && _createVNode(\"div\", {\n \"class\": ['v-slider-track__ticks', {\n 'v-slider-track__ticks--always-show': showTicks.value === 'always'\n }]\n }, [computedTicks.value])]);\n });\n return {};\n }\n});\n//# sourceMappingURL=VSliderTrack.mjs.map","import { mergeProps as _mergeProps, createVNode as _createVNode, Fragment as _Fragment } from \"vue\";\n// Styles\nimport \"./VSlider.css\";\n\n// Components\nimport { VSliderThumb } from \"./VSliderThumb.mjs\";\nimport { VSliderTrack } from \"./VSliderTrack.mjs\";\nimport { makeVInputProps, VInput } from \"../VInput/VInput.mjs\";\nimport { VLabel } from \"../VLabel/index.mjs\"; // Composables\nimport { makeSliderProps, useSlider, useSteps } from \"./slider.mjs\";\nimport { makeFocusProps, useFocus } from \"../../composables/focus.mjs\";\nimport { useRtl } from \"../../composables/locale.mjs\";\nimport { useProxiedModel } from \"../../composables/proxiedModel.mjs\"; // Utilities\nimport { computed, ref } from 'vue';\nimport { genericComponent, propsFactory, useRender } from \"../../util/index.mjs\"; // Types\nexport const makeVSliderProps = propsFactory({\n ...makeFocusProps(),\n ...makeSliderProps(),\n ...makeVInputProps(),\n modelValue: {\n type: [Number, String],\n default: 0\n }\n}, 'VSlider');\nexport const VSlider = genericComponent()({\n name: 'VSlider',\n props: makeVSliderProps(),\n emits: {\n 'update:focused': value => true,\n 'update:modelValue': v => true,\n start: value => true,\n end: value => true\n },\n setup(props, _ref) {\n let {\n slots,\n emit\n } = _ref;\n const thumbContainerRef = ref();\n const {\n rtlClasses\n } = useRtl();\n const steps = useSteps(props);\n const model = useProxiedModel(props, 'modelValue', undefined, value => {\n return steps.roundValue(value == null ? steps.min.value : value);\n });\n const {\n min,\n max,\n mousePressed,\n roundValue,\n onSliderMousedown,\n onSliderTouchstart,\n trackContainerRef,\n position,\n hasLabels,\n readonly\n } = useSlider({\n props,\n steps,\n onSliderStart: () => {\n emit('start', model.value);\n },\n onSliderEnd: _ref2 => {\n let {\n value\n } = _ref2;\n const roundedValue = roundValue(value);\n model.value = roundedValue;\n emit('end', roundedValue);\n },\n onSliderMove: _ref3 => {\n let {\n value\n } = _ref3;\n return model.value = roundValue(value);\n },\n getActiveThumb: () => thumbContainerRef.value?.$el\n });\n const {\n isFocused,\n focus,\n blur\n } = useFocus(props);\n const trackStop = computed(() => position(model.value));\n useRender(() => {\n const inputProps = VInput.filterProps(props);\n const hasPrepend = !!(props.label || slots.label || slots.prepend);\n return _createVNode(VInput, _mergeProps({\n \"class\": ['v-slider', {\n 'v-slider--has-labels': !!slots['tick-label'] || hasLabels.value,\n 'v-slider--focused': isFocused.value,\n 'v-slider--pressed': mousePressed.value,\n 'v-slider--disabled': props.disabled\n }, rtlClasses.value, props.class],\n \"style\": props.style\n }, inputProps, {\n \"focused\": isFocused.value\n }), {\n ...slots,\n prepend: hasPrepend ? slotProps => _createVNode(_Fragment, null, [slots.label?.(slotProps) ?? (props.label ? _createVNode(VLabel, {\n \"id\": slotProps.id.value,\n \"class\": \"v-slider__label\",\n \"text\": props.label\n }, null) : undefined), slots.prepend?.(slotProps)]) : undefined,\n default: _ref4 => {\n let {\n id,\n messagesId\n } = _ref4;\n return _createVNode(\"div\", {\n \"class\": \"v-slider__container\",\n \"onMousedown\": !readonly.value ? onSliderMousedown : undefined,\n \"onTouchstartPassive\": !readonly.value ? onSliderTouchstart : undefined\n }, [_createVNode(\"input\", {\n \"id\": id.value,\n \"name\": props.name || id.value,\n \"disabled\": !!props.disabled,\n \"readonly\": !!props.readonly,\n \"tabindex\": \"-1\",\n \"value\": model.value\n }, null), _createVNode(VSliderTrack, {\n \"ref\": trackContainerRef,\n \"start\": 0,\n \"stop\": trackStop.value\n }, {\n 'tick-label': slots['tick-label']\n }), _createVNode(VSliderThumb, {\n \"ref\": thumbContainerRef,\n \"aria-describedby\": messagesId.value,\n \"focused\": isFocused.value,\n \"min\": min.value,\n \"max\": max.value,\n \"modelValue\": model.value,\n \"onUpdate:modelValue\": v => model.value = v,\n \"position\": trackStop.value,\n \"elevation\": props.elevation,\n \"onFocus\": focus,\n \"onBlur\": blur,\n \"ripple\": props.ripple,\n \"name\": props.name\n }, {\n 'thumb-label': slots['thumb-label']\n })]);\n }\n });\n });\n return {};\n }\n});\n//# sourceMappingURL=VSlider.mjs.map","import { createVNode as _createVNode } from \"vue\";\n// Styles\nimport \"./VColorPickerPreview.css\";\n\n// Components\nimport { VBtn } from \"../VBtn/index.mjs\";\nimport { VSlider } from \"../VSlider/index.mjs\"; // Composables\nimport { makeComponentProps } from \"../../composables/component.mjs\"; // Utilities\nimport { onUnmounted } from 'vue';\nimport { nullColor } from \"./util/index.mjs\";\nimport { defineComponent, HexToHSV, HSVtoCSS, propsFactory, SUPPORTS_EYE_DROPPER, useRender } from \"../../util/index.mjs\"; // Types\nexport const makeVColorPickerPreviewProps = propsFactory({\n color: {\n type: Object\n },\n disabled: Boolean,\n hideAlpha: Boolean,\n ...makeComponentProps()\n}, 'VColorPickerPreview');\nexport const VColorPickerPreview = defineComponent({\n name: 'VColorPickerPreview',\n props: makeVColorPickerPreviewProps(),\n emits: {\n 'update:color': color => true\n },\n setup(props, _ref) {\n let {\n emit\n } = _ref;\n const abortController = new AbortController();\n onUnmounted(() => abortController.abort());\n async function openEyeDropper() {\n if (!SUPPORTS_EYE_DROPPER) return;\n const eyeDropper = new window.EyeDropper();\n try {\n const result = await eyeDropper.open({\n signal: abortController.signal\n });\n const colorHexValue = HexToHSV(result.sRGBHex);\n emit('update:color', {\n ...(props.color ?? nullColor),\n ...colorHexValue\n });\n } catch (e) {}\n }\n useRender(() => _createVNode(\"div\", {\n \"class\": ['v-color-picker-preview', {\n 'v-color-picker-preview--hide-alpha': props.hideAlpha\n }, props.class],\n \"style\": props.style\n }, [SUPPORTS_EYE_DROPPER && _createVNode(\"div\", {\n \"class\": \"v-color-picker-preview__eye-dropper\",\n \"key\": \"eyeDropper\"\n }, [_createVNode(VBtn, {\n \"onClick\": openEyeDropper,\n \"icon\": \"$eyeDropper\",\n \"variant\": \"plain\",\n \"density\": \"comfortable\"\n }, null)]), _createVNode(\"div\", {\n \"class\": \"v-color-picker-preview__dot\"\n }, [_createVNode(\"div\", {\n \"style\": {\n background: HSVtoCSS(props.color ?? nullColor)\n }\n }, null)]), _createVNode(\"div\", {\n \"class\": \"v-color-picker-preview__sliders\"\n }, [_createVNode(VSlider, {\n \"class\": \"v-color-picker-preview__track v-color-picker-preview__hue\",\n \"modelValue\": props.color?.h,\n \"onUpdate:modelValue\": h => emit('update:color', {\n ...(props.color ?? nullColor),\n h\n }),\n \"step\": 0,\n \"min\": 0,\n \"max\": 360,\n \"disabled\": props.disabled,\n \"thumbSize\": 14,\n \"trackSize\": 8,\n \"trackFillColor\": \"white\",\n \"hideDetails\": true\n }, null), !props.hideAlpha && _createVNode(VSlider, {\n \"class\": \"v-color-picker-preview__track v-color-picker-preview__alpha\",\n \"modelValue\": props.color?.a ?? 1,\n \"onUpdate:modelValue\": a => emit('update:color', {\n ...(props.color ?? nullColor),\n a\n }),\n \"step\": 1 / 256,\n \"min\": 0,\n \"max\": 1,\n \"disabled\": props.disabled,\n \"thumbSize\": 14,\n \"trackSize\": 8,\n \"trackFillColor\": \"white\",\n \"hideDetails\": true\n }, null)])]));\n return {};\n }\n});\n//# sourceMappingURL=VColorPickerPreview.mjs.map","import { createVNode as _createVNode } from \"vue\";\n// Styles\nimport \"./VColorPickerSwatches.css\";\n\n// Components\nimport { VIcon } from \"../VIcon/index.mjs\"; // Composables\nimport { makeComponentProps } from \"../../composables/component.mjs\"; // Utilities\nimport { convertToUnit, deepEqual, defineComponent, getContrast, parseColor, propsFactory, RGBtoCSS, RGBtoHSV, useRender } from \"../../util/index.mjs\";\nimport colors from \"../../util/colors.mjs\"; // Types\nexport const makeVColorPickerSwatchesProps = propsFactory({\n swatches: {\n type: Array,\n default: () => parseDefaultColors(colors)\n },\n disabled: Boolean,\n color: Object,\n maxHeight: [Number, String],\n ...makeComponentProps()\n}, 'VColorPickerSwatches');\nfunction parseDefaultColors(colors) {\n return Object.keys(colors).map(key => {\n const color = colors[key];\n return color.base ? [color.base, color.darken4, color.darken3, color.darken2, color.darken1, color.lighten1, color.lighten2, color.lighten3, color.lighten4, color.lighten5] : [color.black, color.white, color.transparent];\n });\n}\nexport const VColorPickerSwatches = defineComponent({\n name: 'VColorPickerSwatches',\n props: makeVColorPickerSwatchesProps(),\n emits: {\n 'update:color': color => true\n },\n setup(props, _ref) {\n let {\n emit\n } = _ref;\n useRender(() => _createVNode(\"div\", {\n \"class\": ['v-color-picker-swatches', props.class],\n \"style\": [{\n maxHeight: convertToUnit(props.maxHeight)\n }, props.style]\n }, [_createVNode(\"div\", null, [props.swatches.map(swatch => _createVNode(\"div\", {\n \"class\": \"v-color-picker-swatches__swatch\"\n }, [swatch.map(color => {\n const rgba = parseColor(color);\n const hsva = RGBtoHSV(rgba);\n const background = RGBtoCSS(rgba);\n return _createVNode(\"div\", {\n \"class\": \"v-color-picker-swatches__color\",\n \"onClick\": () => hsva && emit('update:color', hsva)\n }, [_createVNode(\"div\", {\n \"style\": {\n background\n }\n }, [props.color && deepEqual(props.color, hsva) ? _createVNode(VIcon, {\n \"size\": \"x-small\",\n \"icon\": \"$success\",\n \"color\": getContrast(color, '#FFFFFF') > 2 ? 'white' : 'black'\n }, null) : undefined])]);\n })]))])]));\n return {};\n }\n});\n//# sourceMappingURL=VColorPickerSwatches.mjs.map","import { mergeProps as _mergeProps, createVNode as _createVNode } from \"vue\";\n// Styles\nimport \"./VColorPicker.css\";\n\n// Components\nimport { VColorPickerCanvas } from \"./VColorPickerCanvas.mjs\";\nimport { VColorPickerEdit } from \"./VColorPickerEdit.mjs\";\nimport { VColorPickerPreview } from \"./VColorPickerPreview.mjs\";\nimport { VColorPickerSwatches } from \"./VColorPickerSwatches.mjs\";\nimport { makeVSheetProps, VSheet } from \"../VSheet/VSheet.mjs\"; // Composables\nimport { provideDefaults } from \"../../composables/defaults.mjs\";\nimport { useRtl } from \"../../composables/locale.mjs\";\nimport { useProxiedModel } from \"../../composables/proxiedModel.mjs\"; // Utilities\nimport { computed, onBeforeMount, ref, watch } from 'vue';\nimport { extractColor, modes, nullColor } from \"./util/index.mjs\";\nimport { consoleWarn, defineComponent, HSVtoCSS, omit, parseColor, propsFactory, RGBtoHSV, useRender } from \"../../util/index.mjs\"; // Types\nexport const makeVColorPickerProps = propsFactory({\n canvasHeight: {\n type: [String, Number],\n default: 150\n },\n disabled: Boolean,\n dotSize: {\n type: [Number, String],\n default: 10\n },\n hideCanvas: Boolean,\n hideSliders: Boolean,\n hideInputs: Boolean,\n mode: {\n type: String,\n default: 'rgba',\n validator: v => Object.keys(modes).includes(v)\n },\n modes: {\n type: Array,\n default: () => Object.keys(modes),\n validator: v => Array.isArray(v) && v.every(m => Object.keys(modes).includes(m))\n },\n showSwatches: Boolean,\n swatches: Array,\n swatchesMaxHeight: {\n type: [Number, String],\n default: 150\n },\n modelValue: {\n type: [Object, String]\n },\n ...omit(makeVSheetProps({\n width: 300\n }), ['height', 'location', 'minHeight', 'maxHeight', 'minWidth', 'maxWidth'])\n}, 'VColorPicker');\nexport const VColorPicker = defineComponent({\n name: 'VColorPicker',\n props: makeVColorPickerProps(),\n emits: {\n 'update:modelValue': color => true,\n 'update:mode': mode => true\n },\n setup(props) {\n const mode = useProxiedModel(props, 'mode');\n const hue = ref(null);\n const model = useProxiedModel(props, 'modelValue', undefined, v => {\n if (v == null || v === '') return null;\n let c;\n try {\n c = RGBtoHSV(parseColor(v));\n } catch (err) {\n consoleWarn(err);\n return null;\n }\n return c;\n }, v => {\n if (!v) return null;\n return extractColor(v, props.modelValue);\n });\n const currentColor = computed(() => {\n return model.value ? {\n ...model.value,\n h: hue.value ?? model.value.h\n } : null;\n });\n const {\n rtlClasses\n } = useRtl();\n let externalChange = true;\n watch(model, v => {\n if (!externalChange) {\n // prevent hue shift from rgb conversion inaccuracy\n externalChange = true;\n return;\n }\n if (!v) return;\n hue.value = v.h;\n }, {\n immediate: true\n });\n const updateColor = hsva => {\n externalChange = false;\n hue.value = hsva.h;\n model.value = hsva;\n };\n onBeforeMount(() => {\n if (!props.modes.includes(mode.value)) mode.value = props.modes[0];\n });\n provideDefaults({\n VSlider: {\n color: undefined,\n trackColor: undefined,\n trackFillColor: undefined\n }\n });\n useRender(() => {\n const sheetProps = VSheet.filterProps(props);\n return _createVNode(VSheet, _mergeProps({\n \"rounded\": props.rounded,\n \"elevation\": props.elevation,\n \"theme\": props.theme,\n \"class\": ['v-color-picker', rtlClasses.value, props.class],\n \"style\": [{\n '--v-color-picker-color-hsv': HSVtoCSS({\n ...(currentColor.value ?? nullColor),\n a: 1\n })\n }, props.style]\n }, sheetProps, {\n \"maxWidth\": props.width\n }), {\n default: () => [!props.hideCanvas && _createVNode(VColorPickerCanvas, {\n \"key\": \"canvas\",\n \"color\": currentColor.value,\n \"onUpdate:color\": updateColor,\n \"disabled\": props.disabled,\n \"dotSize\": props.dotSize,\n \"width\": props.width,\n \"height\": props.canvasHeight\n }, null), (!props.hideSliders || !props.hideInputs) && _createVNode(\"div\", {\n \"key\": \"controls\",\n \"class\": \"v-color-picker__controls\"\n }, [!props.hideSliders && _createVNode(VColorPickerPreview, {\n \"key\": \"preview\",\n \"color\": currentColor.value,\n \"onUpdate:color\": updateColor,\n \"hideAlpha\": !mode.value.endsWith('a'),\n \"disabled\": props.disabled\n }, null), !props.hideInputs && _createVNode(VColorPickerEdit, {\n \"key\": \"edit\",\n \"modes\": props.modes,\n \"mode\": mode.value,\n \"onUpdate:mode\": m => mode.value = m,\n \"color\": currentColor.value,\n \"onUpdate:color\": updateColor,\n \"disabled\": props.disabled\n }, null)]), props.showSwatches && _createVNode(VColorPickerSwatches, {\n \"key\": \"swatches\",\n \"color\": currentColor.value,\n \"onUpdate:color\": updateColor,\n \"maxHeight\": props.swatchesMaxHeight,\n \"swatches\": props.swatches,\n \"disabled\": props.disabled\n }, null)]\n });\n });\n return {};\n }\n});\n//# sourceMappingURL=VColorPicker.mjs.map","// Utilities\nimport { onBeforeUpdate, ref } from 'vue';\n\n// Types\n\nexport function useRefs() {\n const refs = ref([]);\n onBeforeUpdate(() => refs.value = []);\n function updateRef(e, i) {\n refs.value[i] = e;\n }\n return {\n refs,\n updateRef\n };\n}\n//# sourceMappingURL=refs.mjs.map","import { createVNode as _createVNode, mergeProps as _mergeProps } from \"vue\";\n// Styles\nimport \"./VPagination.css\";\n\n// Components\nimport { VBtn } from \"../VBtn/index.mjs\"; // Composables\nimport { useDisplay } from \"../../composables/index.mjs\";\nimport { makeBorderProps } from \"../../composables/border.mjs\";\nimport { makeComponentProps } from \"../../composables/component.mjs\";\nimport { provideDefaults } from \"../../composables/defaults.mjs\";\nimport { makeDensityProps } from \"../../composables/density.mjs\";\nimport { makeElevationProps } from \"../../composables/elevation.mjs\";\nimport { IconValue } from \"../../composables/icons.mjs\";\nimport { useLocale, useRtl } from \"../../composables/locale.mjs\";\nimport { useProxiedModel } from \"../../composables/proxiedModel.mjs\";\nimport { useRefs } from \"../../composables/refs.mjs\";\nimport { useResizeObserver } from \"../../composables/resizeObserver.mjs\";\nimport { makeRoundedProps } from \"../../composables/rounded.mjs\";\nimport { makeSizeProps } from \"../../composables/size.mjs\";\nimport { makeTagProps } from \"../../composables/tag.mjs\";\nimport { makeThemeProps, provideTheme } from \"../../composables/theme.mjs\";\nimport { makeVariantProps } from \"../../composables/variant.mjs\"; // Utilities\nimport { computed, nextTick, shallowRef, toRef } from 'vue';\nimport { createRange, genericComponent, keyValues, propsFactory, useRender } from \"../../util/index.mjs\"; // Types\nexport const makeVPaginationProps = propsFactory({\n activeColor: String,\n start: {\n type: [Number, String],\n default: 1\n },\n modelValue: {\n type: Number,\n default: props => props.start\n },\n disabled: Boolean,\n length: {\n type: [Number, String],\n default: 1,\n validator: val => val % 1 === 0\n },\n totalVisible: [Number, String],\n firstIcon: {\n type: IconValue,\n default: '$first'\n },\n prevIcon: {\n type: IconValue,\n default: '$prev'\n },\n nextIcon: {\n type: IconValue,\n default: '$next'\n },\n lastIcon: {\n type: IconValue,\n default: '$last'\n },\n ariaLabel: {\n type: String,\n default: '$vuetify.pagination.ariaLabel.root'\n },\n pageAriaLabel: {\n type: String,\n default: '$vuetify.pagination.ariaLabel.page'\n },\n currentPageAriaLabel: {\n type: String,\n default: '$vuetify.pagination.ariaLabel.currentPage'\n },\n firstAriaLabel: {\n type: String,\n default: '$vuetify.pagination.ariaLabel.first'\n },\n previousAriaLabel: {\n type: String,\n default: '$vuetify.pagination.ariaLabel.previous'\n },\n nextAriaLabel: {\n type: String,\n default: '$vuetify.pagination.ariaLabel.next'\n },\n lastAriaLabel: {\n type: String,\n default: '$vuetify.pagination.ariaLabel.last'\n },\n ellipsis: {\n type: String,\n default: '...'\n },\n showFirstLastPage: Boolean,\n ...makeBorderProps(),\n ...makeComponentProps(),\n ...makeDensityProps(),\n ...makeElevationProps(),\n ...makeRoundedProps(),\n ...makeSizeProps(),\n ...makeTagProps({\n tag: 'nav'\n }),\n ...makeThemeProps(),\n ...makeVariantProps({\n variant: 'text'\n })\n}, 'VPagination');\nexport const VPagination = genericComponent()({\n name: 'VPagination',\n props: makeVPaginationProps(),\n emits: {\n 'update:modelValue': value => true,\n first: value => true,\n prev: value => true,\n next: value => true,\n last: value => true\n },\n setup(props, _ref) {\n let {\n slots,\n emit\n } = _ref;\n const page = useProxiedModel(props, 'modelValue');\n const {\n t,\n n\n } = useLocale();\n const {\n isRtl\n } = useRtl();\n const {\n themeClasses\n } = provideTheme(props);\n const {\n width\n } = useDisplay();\n const maxButtons = shallowRef(-1);\n provideDefaults(undefined, {\n scoped: true\n });\n const {\n resizeRef\n } = useResizeObserver(entries => {\n if (!entries.length) return;\n const {\n target,\n contentRect\n } = entries[0];\n const firstItem = target.querySelector('.v-pagination__list > *');\n if (!firstItem) return;\n const totalWidth = contentRect.width;\n const itemWidth = firstItem.offsetWidth + parseFloat(getComputedStyle(firstItem).marginRight) * 2;\n maxButtons.value = getMax(totalWidth, itemWidth);\n });\n const length = computed(() => parseInt(props.length, 10));\n const start = computed(() => parseInt(props.start, 10));\n const totalVisible = computed(() => {\n if (props.totalVisible != null) return parseInt(props.totalVisible, 10);else if (maxButtons.value >= 0) return maxButtons.value;\n return getMax(width.value, 58);\n });\n function getMax(totalWidth, itemWidth) {\n const minButtons = props.showFirstLastPage ? 5 : 3;\n return Math.max(0, Math.floor(\n // Round to two decimal places to avoid floating point errors\n +((totalWidth - itemWidth * minButtons) / itemWidth).toFixed(2)));\n }\n const range = computed(() => {\n if (length.value <= 0 || isNaN(length.value) || length.value > Number.MAX_SAFE_INTEGER) return [];\n if (totalVisible.value <= 0) return [];else if (totalVisible.value === 1) return [page.value];\n if (length.value <= totalVisible.value) {\n return createRange(length.value, start.value);\n }\n const even = totalVisible.value % 2 === 0;\n const middle = even ? totalVisible.value / 2 : Math.floor(totalVisible.value / 2);\n const left = even ? middle : middle + 1;\n const right = length.value - middle;\n if (left - page.value >= 0) {\n return [...createRange(Math.max(1, totalVisible.value - 1), start.value), props.ellipsis, length.value];\n } else if (page.value - right >= (even ? 1 : 0)) {\n const rangeLength = totalVisible.value - 1;\n const rangeStart = length.value - rangeLength + start.value;\n return [start.value, props.ellipsis, ...createRange(rangeLength, rangeStart)];\n } else {\n const rangeLength = Math.max(1, totalVisible.value - 3);\n const rangeStart = rangeLength === 1 ? page.value : page.value - Math.ceil(rangeLength / 2) + start.value;\n return [start.value, props.ellipsis, ...createRange(rangeLength, rangeStart), props.ellipsis, length.value];\n }\n });\n\n // TODO: 'first' | 'prev' | 'next' | 'last' does not work here?\n function setValue(e, value, event) {\n e.preventDefault();\n page.value = value;\n event && emit(event, value);\n }\n const {\n refs,\n updateRef\n } = useRefs();\n provideDefaults({\n VPaginationBtn: {\n color: toRef(props, 'color'),\n border: toRef(props, 'border'),\n density: toRef(props, 'density'),\n size: toRef(props, 'size'),\n variant: toRef(props, 'variant'),\n rounded: toRef(props, 'rounded'),\n elevation: toRef(props, 'elevation')\n }\n });\n const items = computed(() => {\n return range.value.map((item, index) => {\n const ref = e => updateRef(e, index);\n if (typeof item === 'string') {\n return {\n isActive: false,\n key: `ellipsis-${index}`,\n page: item,\n props: {\n ref,\n ellipsis: true,\n icon: true,\n disabled: true\n }\n };\n } else {\n const isActive = item === page.value;\n return {\n isActive,\n key: item,\n page: n(item),\n props: {\n ref,\n ellipsis: false,\n icon: true,\n disabled: !!props.disabled || +props.length < 2,\n color: isActive ? props.activeColor : props.color,\n 'aria-current': isActive,\n 'aria-label': t(isActive ? props.currentPageAriaLabel : props.pageAriaLabel, item),\n onClick: e => setValue(e, item)\n }\n };\n }\n });\n });\n const controls = computed(() => {\n const prevDisabled = !!props.disabled || page.value <= start.value;\n const nextDisabled = !!props.disabled || page.value >= start.value + length.value - 1;\n return {\n first: props.showFirstLastPage ? {\n icon: isRtl.value ? props.lastIcon : props.firstIcon,\n onClick: e => setValue(e, start.value, 'first'),\n disabled: prevDisabled,\n 'aria-label': t(props.firstAriaLabel),\n 'aria-disabled': prevDisabled\n } : undefined,\n prev: {\n icon: isRtl.value ? props.nextIcon : props.prevIcon,\n onClick: e => setValue(e, page.value - 1, 'prev'),\n disabled: prevDisabled,\n 'aria-label': t(props.previousAriaLabel),\n 'aria-disabled': prevDisabled\n },\n next: {\n icon: isRtl.value ? props.prevIcon : props.nextIcon,\n onClick: e => setValue(e, page.value + 1, 'next'),\n disabled: nextDisabled,\n 'aria-label': t(props.nextAriaLabel),\n 'aria-disabled': nextDisabled\n },\n last: props.showFirstLastPage ? {\n icon: isRtl.value ? props.firstIcon : props.lastIcon,\n onClick: e => setValue(e, start.value + length.value - 1, 'last'),\n disabled: nextDisabled,\n 'aria-label': t(props.lastAriaLabel),\n 'aria-disabled': nextDisabled\n } : undefined\n };\n });\n function updateFocus() {\n const currentIndex = page.value - start.value;\n refs.value[currentIndex]?.$el.focus();\n }\n function onKeydown(e) {\n if (e.key === keyValues.left && !props.disabled && page.value > +props.start) {\n page.value = page.value - 1;\n nextTick(updateFocus);\n } else if (e.key === keyValues.right && !props.disabled && page.value < start.value + length.value - 1) {\n page.value = page.value + 1;\n nextTick(updateFocus);\n }\n }\n useRender(() => _createVNode(props.tag, {\n \"ref\": resizeRef,\n \"class\": ['v-pagination', themeClasses.value, props.class],\n \"style\": props.style,\n \"role\": \"navigation\",\n \"aria-label\": t(props.ariaLabel),\n \"onKeydown\": onKeydown,\n \"data-test\": \"v-pagination-root\"\n }, {\n default: () => [_createVNode(\"ul\", {\n \"class\": \"v-pagination__list\"\n }, [props.showFirstLastPage && _createVNode(\"li\", {\n \"key\": \"first\",\n \"class\": \"v-pagination__first\",\n \"data-test\": \"v-pagination-first\"\n }, [slots.first ? slots.first(controls.value.first) : _createVNode(VBtn, _mergeProps({\n \"_as\": \"VPaginationBtn\"\n }, controls.value.first), null)]), _createVNode(\"li\", {\n \"key\": \"prev\",\n \"class\": \"v-pagination__prev\",\n \"data-test\": \"v-pagination-prev\"\n }, [slots.prev ? slots.prev(controls.value.prev) : _createVNode(VBtn, _mergeProps({\n \"_as\": \"VPaginationBtn\"\n }, controls.value.prev), null)]), items.value.map((item, index) => _createVNode(\"li\", {\n \"key\": item.key,\n \"class\": ['v-pagination__item', {\n 'v-pagination__item--is-active': item.isActive\n }],\n \"data-test\": \"v-pagination-item\"\n }, [slots.item ? slots.item(item) : _createVNode(VBtn, _mergeProps({\n \"_as\": \"VPaginationBtn\"\n }, item.props), {\n default: () => [item.page]\n })])), _createVNode(\"li\", {\n \"key\": \"next\",\n \"class\": \"v-pagination__next\",\n \"data-test\": \"v-pagination-next\"\n }, [slots.next ? slots.next(controls.value.next) : _createVNode(VBtn, _mergeProps({\n \"_as\": \"VPaginationBtn\"\n }, controls.value.next), null)]), props.showFirstLastPage && _createVNode(\"li\", {\n \"key\": \"last\",\n \"class\": \"v-pagination__last\",\n \"data-test\": \"v-pagination-last\"\n }, [slots.last ? slots.last(controls.value.last) : _createVNode(VBtn, _mergeProps({\n \"_as\": \"VPaginationBtn\"\n }, controls.value.last), null)])])]\n }));\n return {};\n }\n});\n//# sourceMappingURL=VPagination.mjs.map","import { createVNode as _createVNode } from \"vue\";\n// Styles\nimport \"./VDatePickerControls.css\";\n\n// Components\nimport { VBtn } from \"../VBtn/index.mjs\";\nimport { VSpacer } from \"../VGrid/index.mjs\"; // Composables\nimport { IconValue } from \"../../composables/icons.mjs\"; // Utilities\nimport { computed } from 'vue';\nimport { genericComponent, propsFactory, useRender } from \"../../util/index.mjs\"; // Types\nexport const makeVDatePickerControlsProps = propsFactory({\n active: {\n type: [String, Array],\n default: undefined\n },\n disabled: {\n type: [Boolean, String, Array],\n default: false\n },\n nextIcon: {\n type: IconValue,\n default: '$next'\n },\n prevIcon: {\n type: IconValue,\n default: '$prev'\n },\n modeIcon: {\n type: IconValue,\n default: '$subgroup'\n },\n text: String,\n viewMode: {\n type: String,\n default: 'month'\n }\n}, 'VDatePickerControls');\nexport const VDatePickerControls = genericComponent()({\n name: 'VDatePickerControls',\n props: makeVDatePickerControlsProps(),\n emits: {\n 'click:year': () => true,\n 'click:month': () => true,\n 'click:prev': () => true,\n 'click:next': () => true,\n 'click:text': () => true\n },\n setup(props, _ref) {\n let {\n emit\n } = _ref;\n const disableMonth = computed(() => {\n return Array.isArray(props.disabled) ? props.disabled.includes('text') : !!props.disabled;\n });\n const disableYear = computed(() => {\n return Array.isArray(props.disabled) ? props.disabled.includes('mode') : !!props.disabled;\n });\n const disablePrev = computed(() => {\n return Array.isArray(props.disabled) ? props.disabled.includes('prev') : !!props.disabled;\n });\n const disableNext = computed(() => {\n return Array.isArray(props.disabled) ? props.disabled.includes('next') : !!props.disabled;\n });\n function onClickPrev() {\n emit('click:prev');\n }\n function onClickNext() {\n emit('click:next');\n }\n function onClickYear() {\n emit('click:year');\n }\n function onClickMonth() {\n emit('click:month');\n }\n useRender(() => {\n // TODO: add slot support and scope defaults\n return _createVNode(\"div\", {\n \"class\": ['v-date-picker-controls']\n }, [_createVNode(VBtn, {\n \"class\": \"v-date-picker-controls__month-btn\",\n \"disabled\": disableMonth.value,\n \"text\": props.text,\n \"variant\": \"text\",\n \"rounded\": true,\n \"onClick\": onClickMonth\n }, null), _createVNode(VBtn, {\n \"key\": \"mode-btn\",\n \"class\": \"v-date-picker-controls__mode-btn\",\n \"disabled\": disableYear.value,\n \"density\": \"comfortable\",\n \"icon\": props.modeIcon,\n \"variant\": \"text\",\n \"onClick\": onClickYear\n }, null), _createVNode(VSpacer, {\n \"key\": \"mode-spacer\"\n }, null), _createVNode(\"div\", {\n \"key\": \"month-buttons\",\n \"class\": \"v-date-picker-controls__month\"\n }, [_createVNode(VBtn, {\n \"disabled\": disablePrev.value,\n \"icon\": props.prevIcon,\n \"variant\": \"text\",\n \"onClick\": onClickPrev\n }, null), _createVNode(VBtn, {\n \"disabled\": disableNext.value,\n \"icon\": props.nextIcon,\n \"variant\": \"text\",\n \"onClick\": onClickNext\n }, null)])]);\n });\n return {};\n }\n});\n//# sourceMappingURL=VDatePickerControls.mjs.map","import { createVNode as _createVNode } from \"vue\";\n// Styles\nimport \"./VDatePickerHeader.css\";\n\n// Components\nimport { VBtn } from \"../VBtn/index.mjs\";\nimport { VDefaultsProvider } from \"../VDefaultsProvider/index.mjs\"; // Composables\nimport { useBackgroundColor } from \"../../composables/color.mjs\";\nimport { IconValue } from \"../../composables/icons.mjs\";\nimport { MaybeTransition } from \"../../composables/transition.mjs\"; // Utilities\nimport { EventProp, genericComponent, propsFactory, useRender } from \"../../util/index.mjs\"; // Types\nexport const makeVDatePickerHeaderProps = propsFactory({\n appendIcon: IconValue,\n color: String,\n header: String,\n transition: String,\n onClick: EventProp()\n}, 'VDatePickerHeader');\nexport const VDatePickerHeader = genericComponent()({\n name: 'VDatePickerHeader',\n props: makeVDatePickerHeaderProps(),\n emits: {\n click: () => true,\n 'click:append': () => true\n },\n setup(props, _ref) {\n let {\n emit,\n slots\n } = _ref;\n const {\n backgroundColorClasses,\n backgroundColorStyles\n } = useBackgroundColor(props, 'color');\n function onClick() {\n emit('click');\n }\n function onClickAppend() {\n emit('click:append');\n }\n useRender(() => {\n const hasContent = !!(slots.default || props.header);\n const hasAppend = !!(slots.append || props.appendIcon);\n return _createVNode(\"div\", {\n \"class\": ['v-date-picker-header', {\n 'v-date-picker-header--clickable': !!props.onClick\n }, backgroundColorClasses.value],\n \"style\": backgroundColorStyles.value,\n \"onClick\": onClick\n }, [slots.prepend && _createVNode(\"div\", {\n \"key\": \"prepend\",\n \"class\": \"v-date-picker-header__prepend\"\n }, [slots.prepend()]), hasContent && _createVNode(MaybeTransition, {\n \"key\": \"content\",\n \"name\": props.transition\n }, {\n default: () => [_createVNode(\"div\", {\n \"key\": props.header,\n \"class\": \"v-date-picker-header__content\"\n }, [slots.default?.() ?? props.header])]\n }), hasAppend && _createVNode(\"div\", {\n \"class\": \"v-date-picker-header__append\"\n }, [!slots.append ? _createVNode(VBtn, {\n \"key\": \"append-btn\",\n \"icon\": props.appendIcon,\n \"variant\": \"text\",\n \"onClick\": onClickAppend\n }, null) : _createVNode(VDefaultsProvider, {\n \"key\": \"append-defaults\",\n \"disabled\": !props.appendIcon,\n \"defaults\": {\n VBtn: {\n icon: props.appendIcon,\n variant: 'text'\n }\n }\n }, {\n default: () => [slots.append?.()]\n })])]);\n });\n return {};\n }\n});\n//# sourceMappingURL=VDatePickerHeader.mjs.map","// Composables\nimport { getWeek, useDate } from \"./date/date.mjs\";\nimport { useProxiedModel } from \"./proxiedModel.mjs\"; // Utilities\nimport { computed } from 'vue';\nimport { propsFactory, wrapInArray } from \"../util/index.mjs\"; // Types\n// Types\n// Composables\nexport const makeCalendarProps = propsFactory({\n allowedDates: [Array, Function],\n disabled: Boolean,\n displayValue: null,\n modelValue: Array,\n month: [Number, String],\n max: null,\n min: null,\n showAdjacentMonths: Boolean,\n year: [Number, String],\n weekdays: {\n type: Array,\n default: () => [0, 1, 2, 3, 4, 5, 6]\n },\n weeksInMonth: {\n type: String,\n default: 'dynamic'\n },\n firstDayOfWeek: [Number, String]\n}, 'calendar');\nexport function useCalendar(props) {\n const adapter = useDate();\n const model = useProxiedModel(props, 'modelValue', [], v => wrapInArray(v));\n const displayValue = computed(() => {\n if (props.displayValue) return adapter.date(props.displayValue);\n if (model.value.length > 0) return adapter.date(model.value[0]);\n if (props.min) return adapter.date(props.min);\n if (Array.isArray(props.allowedDates)) return adapter.date(props.allowedDates[0]);\n return adapter.date();\n });\n const year = useProxiedModel(props, 'year', undefined, v => {\n const value = v != null ? Number(v) : adapter.getYear(displayValue.value);\n return adapter.startOfYear(adapter.setYear(adapter.date(), value));\n }, v => adapter.getYear(v));\n const month = useProxiedModel(props, 'month', undefined, v => {\n const value = v != null ? Number(v) : adapter.getMonth(displayValue.value);\n const date = adapter.setYear(adapter.startOfMonth(adapter.date()), adapter.getYear(year.value));\n return adapter.setMonth(date, value);\n }, v => adapter.getMonth(v));\n const weekDays = computed(() => {\n const firstDayOfWeek = Number(props.firstDayOfWeek ?? 0);\n return props.weekdays.map(day => (day + firstDayOfWeek) % 7);\n });\n const weeksInMonth = computed(() => {\n const weeks = adapter.getWeekArray(month.value, props.firstDayOfWeek);\n const days = weeks.flat();\n\n // Make sure there's always 6 weeks in month (6 * 7 days)\n // if weeksInMonth is 'static'\n const daysInMonth = 6 * 7;\n if (props.weeksInMonth === 'static' && days.length < daysInMonth) {\n const lastDay = days[days.length - 1];\n let week = [];\n for (let day = 1; day <= daysInMonth - days.length; day++) {\n week.push(adapter.addDays(lastDay, day));\n if (day % 7 === 0) {\n weeks.push(week);\n week = [];\n }\n }\n }\n return weeks;\n });\n function genDays(days, today) {\n return days.filter(date => {\n return weekDays.value.includes(adapter.toJsDate(date).getDay());\n }).map((date, index) => {\n const isoDate = adapter.toISO(date);\n const isAdjacent = !adapter.isSameMonth(date, month.value);\n const isStart = adapter.isSameDay(date, adapter.startOfMonth(month.value));\n const isEnd = adapter.isSameDay(date, adapter.endOfMonth(month.value));\n const isSame = adapter.isSameDay(date, month.value);\n return {\n date,\n isoDate,\n formatted: adapter.format(date, 'keyboardDate'),\n year: adapter.getYear(date),\n month: adapter.getMonth(date),\n isDisabled: isDisabled(date),\n isWeekStart: index % 7 === 0,\n isWeekEnd: index % 7 === 6,\n isToday: adapter.isSameDay(date, today),\n isAdjacent,\n isHidden: isAdjacent && !props.showAdjacentMonths,\n isStart,\n isSelected: model.value.some(value => adapter.isSameDay(date, value)),\n isEnd,\n isSame,\n localized: adapter.format(date, 'dayOfMonth')\n };\n });\n }\n const daysInWeek = computed(() => {\n const lastDay = adapter.startOfWeek(displayValue.value, props.firstDayOfWeek);\n const week = [];\n for (let day = 0; day <= 6; day++) {\n week.push(adapter.addDays(lastDay, day));\n }\n const today = adapter.date();\n return genDays(week, today);\n });\n const daysInMonth = computed(() => {\n const days = weeksInMonth.value.flat();\n const today = adapter.date();\n return genDays(days, today);\n });\n const weekNumbers = computed(() => {\n return weeksInMonth.value.map(week => {\n return week.length ? getWeek(adapter, week[0]) : null;\n });\n });\n function isDisabled(value) {\n if (props.disabled) return true;\n const date = adapter.date(value);\n if (props.min && adapter.isAfter(adapter.date(props.min), date)) return true;\n if (props.max && adapter.isAfter(date, adapter.date(props.max))) return true;\n if (Array.isArray(props.allowedDates) && props.allowedDates.length > 0) {\n return !props.allowedDates.some(d => adapter.isSameDay(adapter.date(d), date));\n }\n if (typeof props.allowedDates === 'function') {\n return !props.allowedDates(date);\n }\n return false;\n }\n return {\n displayValue,\n daysInMonth,\n daysInWeek,\n genDays,\n model,\n weeksInMonth,\n weekDays,\n weekNumbers\n };\n}\n//# sourceMappingURL=calendar.mjs.map","import { createVNode as _createVNode, createTextVNode as _createTextVNode } from \"vue\";\n// Styles\nimport \"./VDatePickerMonth.css\";\n\n// Components\nimport { VBtn } from \"../VBtn/index.mjs\";\nimport { VDefaultsProvider } from \"../VDefaultsProvider/index.mjs\"; // Composables\nimport { makeCalendarProps, useCalendar } from \"../../composables/calendar.mjs\";\nimport { useDate } from \"../../composables/date/date.mjs\";\nimport { MaybeTransition } from \"../../composables/transition.mjs\"; // Utilities\nimport { computed, ref, shallowRef, watch } from 'vue';\nimport { genericComponent, propsFactory } from \"../../util/index.mjs\"; // Types\nexport const makeVDatePickerMonthProps = propsFactory({\n color: String,\n hideWeekdays: Boolean,\n multiple: [Boolean, Number, String],\n showWeek: Boolean,\n transition: {\n type: String,\n default: 'picker-transition'\n },\n reverseTransition: {\n type: String,\n default: 'picker-reverse-transition'\n },\n ...makeCalendarProps()\n}, 'VDatePickerMonth');\nexport const VDatePickerMonth = genericComponent()({\n name: 'VDatePickerMonth',\n props: makeVDatePickerMonthProps(),\n emits: {\n 'update:modelValue': date => true,\n 'update:month': date => true,\n 'update:year': date => true\n },\n setup(props, _ref) {\n let {\n emit,\n slots\n } = _ref;\n const daysRef = ref();\n const {\n daysInMonth,\n model,\n weekNumbers\n } = useCalendar(props);\n const adapter = useDate();\n const rangeStart = shallowRef();\n const rangeStop = shallowRef();\n const isReverse = shallowRef(false);\n const transition = computed(() => {\n return !isReverse.value ? props.transition : props.reverseTransition;\n });\n if (props.multiple === 'range' && model.value.length > 0) {\n rangeStart.value = model.value[0];\n if (model.value.length > 1) {\n rangeStop.value = model.value[model.value.length - 1];\n }\n }\n const atMax = computed(() => {\n const max = ['number', 'string'].includes(typeof props.multiple) ? Number(props.multiple) : Infinity;\n return model.value.length >= max;\n });\n watch(daysInMonth, (val, oldVal) => {\n if (!oldVal) return;\n isReverse.value = adapter.isBefore(val[0].date, oldVal[0].date);\n });\n function onRangeClick(value) {\n const _value = adapter.startOfDay(value);\n if (model.value.length === 0) {\n rangeStart.value = undefined;\n } else if (model.value.length === 1) {\n rangeStart.value = model.value[0];\n rangeStop.value = undefined;\n }\n if (!rangeStart.value) {\n rangeStart.value = _value;\n model.value = [rangeStart.value];\n } else if (!rangeStop.value) {\n if (adapter.isSameDay(_value, rangeStart.value)) {\n rangeStart.value = undefined;\n model.value = [];\n return;\n } else if (adapter.isBefore(_value, rangeStart.value)) {\n rangeStop.value = adapter.endOfDay(rangeStart.value);\n rangeStart.value = _value;\n } else {\n rangeStop.value = adapter.endOfDay(_value);\n }\n const diff = adapter.getDiff(rangeStop.value, rangeStart.value, 'days');\n const datesInRange = [rangeStart.value];\n for (let i = 1; i < diff; i++) {\n const nextDate = adapter.addDays(rangeStart.value, i);\n datesInRange.push(nextDate);\n }\n datesInRange.push(rangeStop.value);\n model.value = datesInRange;\n } else {\n rangeStart.value = value;\n rangeStop.value = undefined;\n model.value = [rangeStart.value];\n }\n }\n function onMultipleClick(value) {\n const index = model.value.findIndex(selection => adapter.isSameDay(selection, value));\n if (index === -1) {\n model.value = [...model.value, value];\n } else {\n const value = [...model.value];\n value.splice(index, 1);\n model.value = value;\n }\n }\n function onClick(value) {\n if (props.multiple === 'range') {\n onRangeClick(value);\n } else if (props.multiple) {\n onMultipleClick(value);\n } else {\n model.value = [value];\n }\n }\n return () => _createVNode(\"div\", {\n \"class\": \"v-date-picker-month\"\n }, [props.showWeek && _createVNode(\"div\", {\n \"key\": \"weeks\",\n \"class\": \"v-date-picker-month__weeks\"\n }, [!props.hideWeekdays && _createVNode(\"div\", {\n \"key\": \"hide-week-days\",\n \"class\": \"v-date-picker-month__day\"\n }, [_createTextVNode(\"\\xA0\")]), weekNumbers.value.map(week => _createVNode(\"div\", {\n \"class\": ['v-date-picker-month__day', 'v-date-picker-month__day--adjacent']\n }, [week]))]), _createVNode(MaybeTransition, {\n \"name\": transition.value\n }, {\n default: () => [_createVNode(\"div\", {\n \"ref\": daysRef,\n \"key\": daysInMonth.value[0].date?.toString(),\n \"class\": \"v-date-picker-month__days\"\n }, [!props.hideWeekdays && adapter.getWeekdays(props.firstDayOfWeek).map(weekDay => _createVNode(\"div\", {\n \"class\": ['v-date-picker-month__day', 'v-date-picker-month__weekday']\n }, [weekDay])), daysInMonth.value.map((item, i) => {\n const slotProps = {\n props: {\n onClick: () => onClick(item.date)\n },\n item,\n i\n };\n if (atMax.value && !item.isSelected) {\n item.isDisabled = true;\n }\n return _createVNode(\"div\", {\n \"class\": ['v-date-picker-month__day', {\n 'v-date-picker-month__day--adjacent': item.isAdjacent,\n 'v-date-picker-month__day--hide-adjacent': item.isHidden,\n 'v-date-picker-month__day--selected': item.isSelected,\n 'v-date-picker-month__day--week-end': item.isWeekEnd,\n 'v-date-picker-month__day--week-start': item.isWeekStart\n }],\n \"data-v-date\": !item.isDisabled ? item.isoDate : undefined\n }, [(props.showAdjacentMonths || !item.isAdjacent) && _createVNode(VDefaultsProvider, {\n \"defaults\": {\n VBtn: {\n class: 'v-date-picker-month__day-btn',\n color: (item.isSelected || item.isToday) && !item.isDisabled ? props.color : undefined,\n disabled: item.isDisabled,\n icon: true,\n ripple: false,\n text: item.localized,\n variant: item.isDisabled ? item.isToday ? 'outlined' : 'text' : item.isToday && !item.isSelected ? 'outlined' : 'flat',\n onClick: () => onClick(item.date)\n }\n }\n }, {\n default: () => [slots.day?.(slotProps) ?? _createVNode(VBtn, slotProps.props, null)]\n })]);\n })])]\n })]);\n }\n});\n//# sourceMappingURL=VDatePickerMonth.mjs.map","import { createVNode as _createVNode, mergeProps as _mergeProps } from \"vue\";\n// Styles\nimport \"./VDatePickerMonths.css\";\n\n// Components\nimport { VBtn } from \"../VBtn/index.mjs\"; // Composables\nimport { useDate } from \"../../composables/date/index.mjs\";\nimport { useProxiedModel } from \"../../composables/proxiedModel.mjs\"; // Utilities\nimport { computed, watchEffect } from 'vue';\nimport { convertToUnit, createRange, genericComponent, propsFactory, useRender } from \"../../util/index.mjs\"; // Types\nexport const makeVDatePickerMonthsProps = propsFactory({\n color: String,\n height: [String, Number],\n min: null,\n max: null,\n modelValue: Number,\n year: Number\n}, 'VDatePickerMonths');\nexport const VDatePickerMonths = genericComponent()({\n name: 'VDatePickerMonths',\n props: makeVDatePickerMonthsProps(),\n emits: {\n 'update:modelValue': date => true\n },\n setup(props, _ref) {\n let {\n emit,\n slots\n } = _ref;\n const adapter = useDate();\n const model = useProxiedModel(props, 'modelValue');\n const months = computed(() => {\n let date = adapter.startOfYear(adapter.date());\n if (props.year) {\n date = adapter.setYear(date, props.year);\n }\n return createRange(12).map(i => {\n const text = adapter.format(date, 'monthShort');\n const isDisabled = !!(props.min && adapter.isAfter(adapter.startOfMonth(adapter.date(props.min)), date) || props.max && adapter.isAfter(date, adapter.startOfMonth(adapter.date(props.max))));\n date = adapter.getNextMonth(date);\n return {\n isDisabled,\n text,\n value: i\n };\n });\n });\n watchEffect(() => {\n model.value = model.value ?? adapter.getMonth(adapter.date());\n });\n useRender(() => _createVNode(\"div\", {\n \"class\": \"v-date-picker-months\",\n \"style\": {\n height: convertToUnit(props.height)\n }\n }, [_createVNode(\"div\", {\n \"class\": \"v-date-picker-months__content\"\n }, [months.value.map((month, i) => {\n const btnProps = {\n active: model.value === i,\n color: model.value === i ? props.color : undefined,\n disabled: month.isDisabled,\n rounded: true,\n text: month.text,\n variant: model.value === month.value ? 'flat' : 'text',\n onClick: () => onClick(i)\n };\n function onClick(i) {\n if (model.value === i) {\n emit('update:modelValue', model.value);\n return;\n }\n model.value = i;\n }\n return slots.month?.({\n month,\n i,\n props: btnProps\n }) ?? _createVNode(VBtn, _mergeProps({\n \"key\": \"month\"\n }, btnProps), null);\n })])]));\n return {};\n }\n});\n//# sourceMappingURL=VDatePickerMonths.mjs.map","import { createVNode as _createVNode, mergeProps as _mergeProps } from \"vue\";\n// Styles\nimport \"./VDatePickerYears.css\";\n\n// Components\nimport { VBtn } from \"../VBtn/index.mjs\"; // Composables\nimport { useDate } from \"../../composables/date/index.mjs\";\nimport { useProxiedModel } from \"../../composables/proxiedModel.mjs\"; // Utilities\nimport { computed, nextTick, onMounted, watchEffect } from 'vue';\nimport { convertToUnit, createRange, genericComponent, propsFactory, templateRef, useRender } from \"../../util/index.mjs\"; // Types\n// Types\nexport const makeVDatePickerYearsProps = propsFactory({\n color: String,\n height: [String, Number],\n min: null,\n max: null,\n modelValue: Number\n}, 'VDatePickerYears');\nexport const VDatePickerYears = genericComponent()({\n name: 'VDatePickerYears',\n props: makeVDatePickerYearsProps(),\n emits: {\n 'update:modelValue': year => true\n },\n setup(props, _ref) {\n let {\n emit,\n slots\n } = _ref;\n const adapter = useDate();\n const model = useProxiedModel(props, 'modelValue');\n const years = computed(() => {\n const year = adapter.getYear(adapter.date());\n let min = year - 100;\n let max = year + 52;\n if (props.min) {\n min = adapter.getYear(adapter.date(props.min));\n }\n if (props.max) {\n max = adapter.getYear(adapter.date(props.max));\n }\n let date = adapter.startOfYear(adapter.date());\n date = adapter.setYear(date, min);\n return createRange(max - min + 1, min).map(i => {\n const text = adapter.format(date, 'year');\n date = adapter.setYear(date, adapter.getYear(date) + 1);\n return {\n text,\n value: i\n };\n });\n });\n watchEffect(() => {\n model.value = model.value ?? adapter.getYear(adapter.date());\n });\n const yearRef = templateRef();\n onMounted(async () => {\n await nextTick();\n yearRef.el?.scrollIntoView({\n block: 'center'\n });\n });\n useRender(() => _createVNode(\"div\", {\n \"class\": \"v-date-picker-years\",\n \"style\": {\n height: convertToUnit(props.height)\n }\n }, [_createVNode(\"div\", {\n \"class\": \"v-date-picker-years__content\"\n }, [years.value.map((year, i) => {\n const btnProps = {\n ref: model.value === year.value ? yearRef : undefined,\n active: model.value === year.value,\n color: model.value === year.value ? props.color : undefined,\n rounded: true,\n text: year.text,\n variant: model.value === year.value ? 'flat' : 'text',\n onClick: () => {\n if (model.value === year.value) {\n emit('update:modelValue', model.value);\n return;\n }\n model.value = year.value;\n }\n };\n return slots.year?.({\n year,\n i,\n props: btnProps\n }) ?? _createVNode(VBtn, _mergeProps({\n \"key\": \"month\"\n }, btnProps), null);\n })])]));\n return {};\n }\n});\n//# sourceMappingURL=VDatePickerYears.mjs.map","// Utilities\nimport { createSimpleFunctional } from \"../../util/index.mjs\";\nexport const VPickerTitle = createSimpleFunctional('v-picker-title');\n//# sourceMappingURL=VPickerTitle.mjs.map","import { mergeProps as _mergeProps, createVNode as _createVNode } from \"vue\";\n// Styles\nimport \"./VPicker.css\";\n\n// Components\nimport { VPickerTitle } from \"./VPickerTitle.mjs\";\nimport { VDefaultsProvider } from \"../../components/VDefaultsProvider/VDefaultsProvider.mjs\";\nimport { makeVSheetProps, VSheet } from \"../../components/VSheet/VSheet.mjs\"; // Composables\nimport { useBackgroundColor } from \"../../composables/color.mjs\"; // Utilities\nimport { toRef } from 'vue';\nimport { genericComponent, propsFactory, useRender } from \"../../util/index.mjs\"; // Types\nexport const makeVPickerProps = propsFactory({\n bgColor: String,\n landscape: Boolean,\n title: String,\n hideHeader: Boolean,\n ...makeVSheetProps()\n}, 'VPicker');\nexport const VPicker = genericComponent()({\n name: 'VPicker',\n props: makeVPickerProps(),\n setup(props, _ref) {\n let {\n slots\n } = _ref;\n const {\n backgroundColorClasses,\n backgroundColorStyles\n } = useBackgroundColor(toRef(props, 'color'));\n useRender(() => {\n const sheetProps = VSheet.filterProps(props);\n const hasTitle = !!(props.title || slots.title);\n return _createVNode(VSheet, _mergeProps(sheetProps, {\n \"color\": props.bgColor,\n \"class\": ['v-picker', {\n 'v-picker--landscape': props.landscape,\n 'v-picker--with-actions': !!slots.actions\n }, props.class],\n \"style\": props.style\n }), {\n default: () => [!props.hideHeader && _createVNode(\"div\", {\n \"key\": \"header\",\n \"class\": [backgroundColorClasses.value],\n \"style\": [backgroundColorStyles.value]\n }, [hasTitle && _createVNode(VPickerTitle, {\n \"key\": \"picker-title\"\n }, {\n default: () => [slots.title?.() ?? props.title]\n }), slots.header && _createVNode(\"div\", {\n \"class\": \"v-picker__header\"\n }, [slots.header()])]), _createVNode(\"div\", {\n \"class\": \"v-picker__body\"\n }, [slots.default?.()]), slots.actions && _createVNode(VDefaultsProvider, {\n \"defaults\": {\n VBtn: {\n slim: true,\n variant: 'text'\n }\n }\n }, {\n default: () => [_createVNode(\"div\", {\n \"class\": \"v-picker__actions\"\n }, [slots.actions()])]\n })]\n });\n });\n return {};\n }\n});\n//# sourceMappingURL=VPicker.mjs.map","import { Fragment as _Fragment, mergeProps as _mergeProps, resolveDirective as _resolveDirective, createVNode as _createVNode } from \"vue\";\n// Styles\nimport \"./VDatePicker.css\";\n\n// Components\nimport { makeVDatePickerControlsProps, VDatePickerControls } from \"./VDatePickerControls.mjs\";\nimport { VDatePickerHeader } from \"./VDatePickerHeader.mjs\";\nimport { makeVDatePickerMonthProps, VDatePickerMonth } from \"./VDatePickerMonth.mjs\";\nimport { makeVDatePickerMonthsProps, VDatePickerMonths } from \"./VDatePickerMonths.mjs\";\nimport { makeVDatePickerYearsProps, VDatePickerYears } from \"./VDatePickerYears.mjs\";\nimport { VFadeTransition } from \"../transitions/index.mjs\";\nimport { VDefaultsProvider } from \"../VDefaultsProvider/index.mjs\";\nimport { makeVPickerProps, VPicker } from \"../../labs/VPicker/VPicker.mjs\"; // Composables\nimport { useDate } from \"../../composables/date/index.mjs\";\nimport { useLocale } from \"../../composables/locale.mjs\";\nimport { useProxiedModel } from \"../../composables/proxiedModel.mjs\"; // Utilities\nimport { computed, ref, shallowRef, watch } from 'vue';\nimport { genericComponent, omit, propsFactory, useRender, wrapInArray } from \"../../util/index.mjs\"; // Types\n// Types\nexport const makeVDatePickerProps = propsFactory({\n // TODO: implement in v3.5\n // calendarIcon: {\n // type: String,\n // default: '$calendar',\n // },\n // keyboardIcon: {\n // type: String,\n // default: '$edit',\n // },\n // inputMode: {\n // type: String as PropType<'calendar' | 'keyboard'>,\n // default: 'calendar',\n // },\n // inputText: {\n // type: String,\n // default: '$vuetify.datePicker.input.placeholder',\n // },\n // inputPlaceholder: {\n // type: String,\n // default: 'dd/mm/yyyy',\n // },\n header: {\n type: String,\n default: '$vuetify.datePicker.header'\n },\n ...makeVDatePickerControlsProps(),\n ...makeVDatePickerMonthProps({\n weeksInMonth: 'static'\n }),\n ...omit(makeVDatePickerMonthsProps(), ['modelValue']),\n ...omit(makeVDatePickerYearsProps(), ['modelValue']),\n ...makeVPickerProps({\n title: '$vuetify.datePicker.title'\n }),\n modelValue: null\n}, 'VDatePicker');\nexport const VDatePicker = genericComponent()({\n name: 'VDatePicker',\n props: makeVDatePickerProps(),\n emits: {\n 'update:modelValue': date => true,\n 'update:month': date => true,\n 'update:year': date => true,\n // 'update:inputMode': (date: any) => true,\n 'update:viewMode': date => true\n },\n setup(props, _ref) {\n let {\n emit,\n slots\n } = _ref;\n const adapter = useDate();\n const {\n t\n } = useLocale();\n const model = useProxiedModel(props, 'modelValue', undefined, v => wrapInArray(v), v => props.multiple ? v : v[0]);\n const viewMode = useProxiedModel(props, 'viewMode');\n // const inputMode = useProxiedModel(props, 'inputMode')\n const internal = computed(() => {\n const value = adapter.date(model.value?.[0]);\n return value && adapter.isValid(value) ? value : adapter.date();\n });\n const month = ref(Number(props.month ?? adapter.getMonth(adapter.startOfMonth(internal.value))));\n const year = ref(Number(props.year ?? adapter.getYear(adapter.startOfYear(adapter.setMonth(internal.value, month.value)))));\n const isReversing = shallowRef(false);\n const header = computed(() => {\n if (props.multiple && model.value.length > 1) {\n return t('$vuetify.datePicker.itemsSelected', model.value.length);\n }\n return model.value[0] && adapter.isValid(model.value[0]) ? adapter.format(adapter.date(model.value[0]), 'normalDateWithWeekday') : t(props.header);\n });\n const text = computed(() => {\n let date = adapter.date();\n date = adapter.setDate(date, 1);\n date = adapter.setMonth(date, month.value);\n date = adapter.setYear(date, year.value);\n return adapter.format(date, 'monthAndYear');\n });\n // const headerIcon = computed(() => props.inputMode === 'calendar' ? props.keyboardIcon : props.calendarIcon)\n const headerTransition = computed(() => `date-picker-header${isReversing.value ? '-reverse' : ''}-transition`);\n const minDate = computed(() => {\n const date = adapter.date(props.min);\n return props.min && adapter.isValid(date) ? date : null;\n });\n const maxDate = computed(() => {\n const date = adapter.date(props.max);\n return props.max && adapter.isValid(date) ? date : null;\n });\n const disabled = computed(() => {\n if (props.disabled) return true;\n const targets = [];\n if (viewMode.value !== 'month') {\n targets.push(...['prev', 'next']);\n } else {\n let _date = adapter.date();\n _date = adapter.setYear(_date, year.value);\n _date = adapter.setMonth(_date, month.value);\n if (minDate.value) {\n const date = adapter.addDays(adapter.startOfMonth(_date), -1);\n adapter.isAfter(minDate.value, date) && targets.push('prev');\n }\n if (maxDate.value) {\n const date = adapter.addDays(adapter.endOfMonth(_date), 1);\n adapter.isAfter(date, maxDate.value) && targets.push('next');\n }\n }\n return targets;\n });\n\n // function onClickAppend () {\n // inputMode.value = inputMode.value === 'calendar' ? 'keyboard' : 'calendar'\n // }\n\n function onClickNext() {\n if (month.value < 11) {\n month.value++;\n } else {\n year.value++;\n month.value = 0;\n onUpdateYear(year.value);\n }\n onUpdateMonth(month.value);\n }\n function onClickPrev() {\n if (month.value > 0) {\n month.value--;\n } else {\n year.value--;\n month.value = 11;\n onUpdateYear(year.value);\n }\n onUpdateMonth(month.value);\n }\n function onClickDate() {\n viewMode.value = 'month';\n }\n function onClickMonth() {\n viewMode.value = viewMode.value === 'months' ? 'month' : 'months';\n }\n function onClickYear() {\n viewMode.value = viewMode.value === 'year' ? 'month' : 'year';\n }\n function onUpdateMonth(value) {\n if (viewMode.value === 'months') onClickMonth();\n emit('update:month', value);\n }\n function onUpdateYear(value) {\n if (viewMode.value === 'year') onClickYear();\n emit('update:year', value);\n }\n watch(model, (val, oldVal) => {\n const arrBefore = wrapInArray(oldVal);\n const arrAfter = wrapInArray(val);\n if (!arrAfter.length) return;\n const before = adapter.date(arrBefore[arrBefore.length - 1]);\n const after = adapter.date(arrAfter[arrAfter.length - 1]);\n const newMonth = adapter.getMonth(after);\n const newYear = adapter.getYear(after);\n if (newMonth !== month.value) {\n month.value = newMonth;\n onUpdateMonth(month.value);\n }\n if (newYear !== year.value) {\n year.value = newYear;\n onUpdateYear(year.value);\n }\n isReversing.value = adapter.isBefore(before, after);\n });\n useRender(() => {\n const pickerProps = VPicker.filterProps(props);\n const datePickerControlsProps = VDatePickerControls.filterProps(props);\n const datePickerHeaderProps = VDatePickerHeader.filterProps(props);\n const datePickerMonthProps = VDatePickerMonth.filterProps(props);\n const datePickerMonthsProps = omit(VDatePickerMonths.filterProps(props), ['modelValue']);\n const datePickerYearsProps = omit(VDatePickerYears.filterProps(props), ['modelValue']);\n const headerProps = {\n header: header.value,\n transition: headerTransition.value\n };\n return _createVNode(VPicker, _mergeProps(pickerProps, {\n \"class\": ['v-date-picker', `v-date-picker--${viewMode.value}`, {\n 'v-date-picker--show-week': props.showWeek\n }, props.class],\n \"style\": props.style\n }), {\n title: () => slots.title?.() ?? _createVNode(\"div\", {\n \"class\": \"v-date-picker__title\"\n }, [t(props.title)]),\n header: () => slots.header ? _createVNode(VDefaultsProvider, {\n \"defaults\": {\n VDatePickerHeader: {\n ...headerProps\n }\n }\n }, {\n default: () => [slots.header?.(headerProps)]\n }) : _createVNode(VDatePickerHeader, _mergeProps({\n \"key\": \"header\"\n }, datePickerHeaderProps, headerProps, {\n \"onClick\": viewMode.value !== 'month' ? onClickDate : undefined\n }), {\n ...slots,\n default: undefined\n }),\n default: () => _createVNode(_Fragment, null, [_createVNode(VDatePickerControls, _mergeProps(datePickerControlsProps, {\n \"disabled\": disabled.value,\n \"text\": text.value,\n \"onClick:next\": onClickNext,\n \"onClick:prev\": onClickPrev,\n \"onClick:month\": onClickMonth,\n \"onClick:year\": onClickYear\n }), null), _createVNode(VFadeTransition, {\n \"hideOnLeave\": true\n }, {\n default: () => [viewMode.value === 'months' ? _createVNode(VDatePickerMonths, _mergeProps({\n \"key\": \"date-picker-months\"\n }, datePickerMonthsProps, {\n \"modelValue\": month.value,\n \"onUpdate:modelValue\": [$event => month.value = $event, onUpdateMonth],\n \"min\": minDate.value,\n \"max\": maxDate.value,\n \"year\": year.value\n }), null) : viewMode.value === 'year' ? _createVNode(VDatePickerYears, _mergeProps({\n \"key\": \"date-picker-years\"\n }, datePickerYearsProps, {\n \"modelValue\": year.value,\n \"onUpdate:modelValue\": [$event => year.value = $event, onUpdateYear],\n \"min\": minDate.value,\n \"max\": maxDate.value\n }), null) : _createVNode(VDatePickerMonth, _mergeProps({\n \"key\": \"date-picker-month\"\n }, datePickerMonthProps, {\n \"modelValue\": model.value,\n \"onUpdate:modelValue\": $event => model.value = $event,\n \"month\": month.value,\n \"onUpdate:month\": [$event => month.value = $event, onUpdateMonth],\n \"year\": year.value,\n \"onUpdate:year\": [$event => year.value = $event, onUpdateYear],\n \"min\": minDate.value,\n \"max\": maxDate.value\n }), null)]\n })]),\n actions: slots.actions\n });\n });\n return {};\n }\n});\n//# sourceMappingURL=VDatePicker.mjs.map","import { createVNode as _createVNode } from \"vue\";\n// Styles\nimport \"./VMain.css\";\n\n// Composables\nimport { makeComponentProps } from \"../../composables/component.mjs\";\nimport { makeDimensionProps, useDimension } from \"../../composables/dimensions.mjs\";\nimport { useLayout } from \"../../composables/layout.mjs\";\nimport { useSsrBoot } from \"../../composables/ssrBoot.mjs\";\nimport { makeTagProps } from \"../../composables/tag.mjs\"; // Utilities\nimport { genericComponent, propsFactory, useRender } from \"../../util/index.mjs\";\nexport const makeVMainProps = propsFactory({\n scrollable: Boolean,\n ...makeComponentProps(),\n ...makeDimensionProps(),\n ...makeTagProps({\n tag: 'main'\n })\n}, 'VMain');\nexport const VMain = genericComponent()({\n name: 'VMain',\n props: makeVMainProps(),\n setup(props, _ref) {\n let {\n slots\n } = _ref;\n const {\n dimensionStyles\n } = useDimension(props);\n const {\n mainStyles\n } = useLayout();\n const {\n ssrBootStyles\n } = useSsrBoot();\n useRender(() => _createVNode(props.tag, {\n \"class\": ['v-main', {\n 'v-main--scrollable': props.scrollable\n }, props.class],\n \"style\": [mainStyles.value, ssrBootStyles.value, dimensionStyles.value, props.style]\n }, {\n default: () => [props.scrollable ? _createVNode(\"div\", {\n \"class\": \"v-main__scroller\"\n }, [slots.default?.()]) : slots.default?.()]\n }));\n return {};\n }\n});\n//# sourceMappingURL=VMain.mjs.map","// Utilities\nimport { computed, onBeforeUnmount, onMounted, shallowRef, watch } from 'vue';\nimport { convertToUnit } from \"../../util/index.mjs\"; // Types\nexport function useSticky(_ref) {\n let {\n rootEl,\n isSticky,\n layoutItemStyles\n } = _ref;\n const isStuck = shallowRef(false);\n const stuckPosition = shallowRef(0);\n const stickyStyles = computed(() => {\n const side = typeof isStuck.value === 'boolean' ? 'top' : isStuck.value;\n return [isSticky.value ? {\n top: 'auto',\n bottom: 'auto',\n height: undefined\n } : undefined, isStuck.value ? {\n [side]: convertToUnit(stuckPosition.value)\n } : {\n top: layoutItemStyles.value.top\n }];\n });\n onMounted(() => {\n watch(isSticky, val => {\n if (val) {\n window.addEventListener('scroll', onScroll, {\n passive: true\n });\n } else {\n window.removeEventListener('scroll', onScroll);\n }\n }, {\n immediate: true\n });\n });\n onBeforeUnmount(() => {\n window.removeEventListener('scroll', onScroll);\n });\n let lastScrollTop = 0;\n function onScroll() {\n const direction = lastScrollTop > window.scrollY ? 'up' : 'down';\n const rect = rootEl.value.getBoundingClientRect();\n const layoutTop = parseFloat(layoutItemStyles.value.top ?? 0);\n const top = window.scrollY - Math.max(0, stuckPosition.value - layoutTop);\n const bottom = rect.height + Math.max(stuckPosition.value, layoutTop) - window.scrollY - window.innerHeight;\n const bodyScroll = parseFloat(getComputedStyle(rootEl.value).getPropertyValue('--v-body-scroll-y')) || 0;\n if (rect.height < window.innerHeight - layoutTop) {\n isStuck.value = 'top';\n stuckPosition.value = layoutTop;\n } else if (direction === 'up' && isStuck.value === 'bottom' || direction === 'down' && isStuck.value === 'top') {\n stuckPosition.value = window.scrollY + rect.top - bodyScroll;\n isStuck.value = true;\n } else if (direction === 'down' && bottom <= 0) {\n stuckPosition.value = 0;\n isStuck.value = 'bottom';\n } else if (direction === 'up' && top <= 0) {\n if (!bodyScroll) {\n stuckPosition.value = rect.top + top;\n isStuck.value = 'top';\n } else if (isStuck.value !== 'top') {\n stuckPosition.value = -top + bodyScroll + layoutTop;\n isStuck.value = 'top';\n }\n }\n lastScrollTop = window.scrollY;\n }\n return {\n isStuck,\n stickyStyles\n };\n}\n//# sourceMappingURL=sticky.mjs.map","// Utilities\nimport { CircularBuffer } from \"../util/index.mjs\";\nconst HORIZON = 100; // ms\nconst HISTORY = 20; // number of samples to keep\n\n/** @see https://android.googlesource.com/platform/frameworks/native/+/master/libs/input/VelocityTracker.cpp */\nfunction kineticEnergyToVelocity(work) {\n const sqrt2 = 1.41421356237;\n return (work < 0 ? -1.0 : 1.0) * Math.sqrt(Math.abs(work)) * sqrt2;\n}\n\n/**\n * Returns pointer velocity in px/s\n */\nexport function calculateImpulseVelocity(samples) {\n // The input should be in reversed time order (most recent sample at index i=0)\n if (samples.length < 2) {\n // if 0 or 1 points, velocity is zero\n return 0;\n }\n // if (samples[1].t > samples[0].t) {\n // // Algorithm will still work, but not perfectly\n // consoleWarn('Samples provided to calculateImpulseVelocity in the wrong order')\n // }\n if (samples.length === 2) {\n // if 2 points, basic linear calculation\n if (samples[1].t === samples[0].t) {\n // consoleWarn(`Events have identical time stamps t=${samples[0].t}, setting velocity = 0`)\n return 0;\n }\n return (samples[1].d - samples[0].d) / (samples[1].t - samples[0].t);\n }\n // Guaranteed to have at least 3 points here\n // start with the oldest sample and go forward in time\n let work = 0;\n for (let i = samples.length - 1; i > 0; i--) {\n if (samples[i].t === samples[i - 1].t) {\n // consoleWarn(`Events have identical time stamps t=${samples[i].t}, skipping sample`)\n continue;\n }\n const vprev = kineticEnergyToVelocity(work); // v[i-1]\n const vcurr = (samples[i].d - samples[i - 1].d) / (samples[i].t - samples[i - 1].t); // v[i]\n work += (vcurr - vprev) * Math.abs(vcurr);\n if (i === samples.length - 1) {\n work *= 0.5;\n }\n }\n return kineticEnergyToVelocity(work) * 1000;\n}\nexport function useVelocity() {\n const touches = {};\n function addMovement(e) {\n Array.from(e.changedTouches).forEach(touch => {\n const samples = touches[touch.identifier] ?? (touches[touch.identifier] = new CircularBuffer(HISTORY));\n samples.push([e.timeStamp, touch]);\n });\n }\n function endTouch(e) {\n Array.from(e.changedTouches).forEach(touch => {\n delete touches[touch.identifier];\n });\n }\n function getVelocity(id) {\n const samples = touches[id]?.values().reverse();\n if (!samples) {\n throw new Error(`No samples for touch id ${id}`);\n }\n const newest = samples[0];\n const x = [];\n const y = [];\n for (const val of samples) {\n if (newest[0] - val[0] > HORIZON) break;\n x.push({\n t: val[0],\n d: val[1].clientX\n });\n y.push({\n t: val[0],\n d: val[1].clientY\n });\n }\n return {\n x: calculateImpulseVelocity(x),\n y: calculateImpulseVelocity(y),\n get direction() {\n const {\n x,\n y\n } = this;\n const [absX, absY] = [Math.abs(x), Math.abs(y)];\n return absX > absY && x >= 0 ? 'right' : absX > absY && x <= 0 ? 'left' : absY > absX && y >= 0 ? 'down' : absY > absX && y <= 0 ? 'up' : oops();\n }\n };\n }\n return {\n addMovement,\n endTouch,\n getVelocity\n };\n}\nfunction oops() {\n throw new Error();\n}\n//# sourceMappingURL=touch.mjs.map","// Composables\nimport { useToggleScope } from \"../../composables/toggleScope.mjs\";\nimport { useVelocity } from \"../../composables/touch.mjs\"; // Utilities\nimport { computed, onBeforeUnmount, onMounted, onScopeDispose, shallowRef, watchEffect } from 'vue';\n\n// Types\n\nexport function useTouch(_ref) {\n let {\n el,\n isActive,\n isTemporary,\n width,\n touchless,\n position\n } = _ref;\n onMounted(() => {\n window.addEventListener('touchstart', onTouchstart, {\n passive: true\n });\n window.addEventListener('touchmove', onTouchmove, {\n passive: false\n });\n window.addEventListener('touchend', onTouchend, {\n passive: true\n });\n });\n onBeforeUnmount(() => {\n window.removeEventListener('touchstart', onTouchstart);\n window.removeEventListener('touchmove', onTouchmove);\n window.removeEventListener('touchend', onTouchend);\n });\n const isHorizontal = computed(() => ['left', 'right'].includes(position.value));\n const {\n addMovement,\n endTouch,\n getVelocity\n } = useVelocity();\n let maybeDragging = false;\n const isDragging = shallowRef(false);\n const dragProgress = shallowRef(0);\n const offset = shallowRef(0);\n let start;\n function getOffset(pos, active) {\n return (position.value === 'left' ? pos : position.value === 'right' ? document.documentElement.clientWidth - pos : position.value === 'top' ? pos : position.value === 'bottom' ? document.documentElement.clientHeight - pos : oops()) - (active ? width.value : 0);\n }\n function getProgress(pos) {\n let limit = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n const progress = position.value === 'left' ? (pos - offset.value) / width.value : position.value === 'right' ? (document.documentElement.clientWidth - pos - offset.value) / width.value : position.value === 'top' ? (pos - offset.value) / width.value : position.value === 'bottom' ? (document.documentElement.clientHeight - pos - offset.value) / width.value : oops();\n return limit ? Math.max(0, Math.min(1, progress)) : progress;\n }\n function onTouchstart(e) {\n if (touchless.value) return;\n const touchX = e.changedTouches[0].clientX;\n const touchY = e.changedTouches[0].clientY;\n const touchZone = 25;\n const inTouchZone = position.value === 'left' ? touchX < touchZone : position.value === 'right' ? touchX > document.documentElement.clientWidth - touchZone : position.value === 'top' ? touchY < touchZone : position.value === 'bottom' ? touchY > document.documentElement.clientHeight - touchZone : oops();\n const inElement = isActive.value && (position.value === 'left' ? touchX < width.value : position.value === 'right' ? touchX > document.documentElement.clientWidth - width.value : position.value === 'top' ? touchY < width.value : position.value === 'bottom' ? touchY > document.documentElement.clientHeight - width.value : oops());\n if (inTouchZone || inElement || isActive.value && isTemporary.value) {\n start = [touchX, touchY];\n offset.value = getOffset(isHorizontal.value ? touchX : touchY, isActive.value);\n dragProgress.value = getProgress(isHorizontal.value ? touchX : touchY);\n maybeDragging = offset.value > -20 && offset.value < 80;\n endTouch(e);\n addMovement(e);\n }\n }\n function onTouchmove(e) {\n const touchX = e.changedTouches[0].clientX;\n const touchY = e.changedTouches[0].clientY;\n if (maybeDragging) {\n if (!e.cancelable) {\n maybeDragging = false;\n return;\n }\n const dx = Math.abs(touchX - start[0]);\n const dy = Math.abs(touchY - start[1]);\n const thresholdMet = isHorizontal.value ? dx > dy && dx > 3 : dy > dx && dy > 3;\n if (thresholdMet) {\n isDragging.value = true;\n maybeDragging = false;\n } else if ((isHorizontal.value ? dy : dx) > 3) {\n maybeDragging = false;\n }\n }\n if (!isDragging.value) return;\n e.preventDefault();\n addMovement(e);\n const progress = getProgress(isHorizontal.value ? touchX : touchY, false);\n dragProgress.value = Math.max(0, Math.min(1, progress));\n if (progress > 1) {\n offset.value = getOffset(isHorizontal.value ? touchX : touchY, true);\n } else if (progress < 0) {\n offset.value = getOffset(isHorizontal.value ? touchX : touchY, false);\n }\n }\n function onTouchend(e) {\n maybeDragging = false;\n if (!isDragging.value) return;\n addMovement(e);\n isDragging.value = false;\n const velocity = getVelocity(e.changedTouches[0].identifier);\n const vx = Math.abs(velocity.x);\n const vy = Math.abs(velocity.y);\n const thresholdMet = isHorizontal.value ? vx > vy && vx > 400 : vy > vx && vy > 3;\n if (thresholdMet) {\n isActive.value = velocity.direction === ({\n left: 'right',\n right: 'left',\n top: 'down',\n bottom: 'up'\n }[position.value] || oops());\n } else {\n isActive.value = dragProgress.value > 0.5;\n }\n }\n const dragStyles = computed(() => {\n return isDragging.value ? {\n transform: position.value === 'left' ? `translateX(calc(-100% + ${dragProgress.value * width.value}px))` : position.value === 'right' ? `translateX(calc(100% - ${dragProgress.value * width.value}px))` : position.value === 'top' ? `translateY(calc(-100% + ${dragProgress.value * width.value}px))` : position.value === 'bottom' ? `translateY(calc(100% - ${dragProgress.value * width.value}px))` : oops(),\n transition: 'none'\n } : undefined;\n });\n useToggleScope(isDragging, () => {\n const transform = el.value?.style.transform ?? null;\n const transition = el.value?.style.transition ?? null;\n watchEffect(() => {\n el.value?.style.setProperty('transform', dragStyles.value?.transform || 'none');\n el.value?.style.setProperty('transition', dragStyles.value?.transition || null);\n });\n onScopeDispose(() => {\n el.value?.style.setProperty('transform', transform);\n el.value?.style.setProperty('transition', transition);\n });\n });\n return {\n isDragging,\n dragProgress,\n dragStyles\n };\n}\nfunction oops() {\n throw new Error();\n}\n//# sourceMappingURL=touch.mjs.map","import { mergeProps as _mergeProps, resolveDirective as _resolveDirective, createVNode as _createVNode, Fragment as _Fragment } from \"vue\";\n// Styles\nimport \"./VNavigationDrawer.css\";\n\n// Components\nimport { VDefaultsProvider } from \"../VDefaultsProvider/index.mjs\";\nimport { VImg } from \"../VImg/index.mjs\"; // Composables\nimport { useSticky } from \"./sticky.mjs\";\nimport { useTouch } from \"./touch.mjs\";\nimport { useRtl } from \"../../composables/index.mjs\";\nimport { makeBorderProps, useBorder } from \"../../composables/border.mjs\";\nimport { useBackgroundColor } from \"../../composables/color.mjs\";\nimport { makeComponentProps } from \"../../composables/component.mjs\";\nimport { provideDefaults } from \"../../composables/defaults.mjs\";\nimport { makeDelayProps, useDelay } from \"../../composables/delay.mjs\";\nimport { makeDisplayProps, useDisplay } from \"../../composables/display.mjs\";\nimport { makeElevationProps, useElevation } from \"../../composables/elevation.mjs\";\nimport { makeLayoutItemProps, useLayoutItem } from \"../../composables/layout.mjs\";\nimport { useProxiedModel } from \"../../composables/proxiedModel.mjs\";\nimport { makeRoundedProps, useRounded } from \"../../composables/rounded.mjs\";\nimport { useRouter } from \"../../composables/router.mjs\";\nimport { useScopeId } from \"../../composables/scopeId.mjs\";\nimport { useSsrBoot } from \"../../composables/ssrBoot.mjs\";\nimport { makeTagProps } from \"../../composables/tag.mjs\";\nimport { makeThemeProps, provideTheme } from \"../../composables/theme.mjs\";\nimport { useToggleScope } from \"../../composables/toggleScope.mjs\"; // Utilities\nimport { computed, nextTick, ref, shallowRef, toRef, Transition, watch } from 'vue';\nimport { genericComponent, propsFactory, toPhysical, useRender } from \"../../util/index.mjs\"; // Types\nconst locations = ['start', 'end', 'left', 'right', 'top', 'bottom'];\nexport const makeVNavigationDrawerProps = propsFactory({\n color: String,\n disableResizeWatcher: Boolean,\n disableRouteWatcher: Boolean,\n expandOnHover: Boolean,\n floating: Boolean,\n modelValue: {\n type: Boolean,\n default: null\n },\n permanent: Boolean,\n rail: {\n type: Boolean,\n default: null\n },\n railWidth: {\n type: [Number, String],\n default: 56\n },\n scrim: {\n type: [Boolean, String],\n default: true\n },\n image: String,\n temporary: Boolean,\n persistent: Boolean,\n touchless: Boolean,\n width: {\n type: [Number, String],\n default: 256\n },\n location: {\n type: String,\n default: 'start',\n validator: value => locations.includes(value)\n },\n sticky: Boolean,\n ...makeBorderProps(),\n ...makeComponentProps(),\n ...makeDelayProps(),\n ...makeDisplayProps({\n mobile: null\n }),\n ...makeElevationProps(),\n ...makeLayoutItemProps(),\n ...makeRoundedProps(),\n ...makeTagProps({\n tag: 'nav'\n }),\n ...makeThemeProps()\n}, 'VNavigationDrawer');\nexport const VNavigationDrawer = genericComponent()({\n name: 'VNavigationDrawer',\n props: makeVNavigationDrawerProps(),\n emits: {\n 'update:modelValue': val => true,\n 'update:rail': val => true\n },\n setup(props, _ref) {\n let {\n attrs,\n emit,\n slots\n } = _ref;\n const {\n isRtl\n } = useRtl();\n const {\n themeClasses\n } = provideTheme(props);\n const {\n borderClasses\n } = useBorder(props);\n const {\n backgroundColorClasses,\n backgroundColorStyles\n } = useBackgroundColor(toRef(props, 'color'));\n const {\n elevationClasses\n } = useElevation(props);\n const {\n displayClasses,\n mobile\n } = useDisplay(props);\n const {\n roundedClasses\n } = useRounded(props);\n const router = useRouter();\n const isActive = useProxiedModel(props, 'modelValue', null, v => !!v);\n const {\n ssrBootStyles\n } = useSsrBoot();\n const {\n scopeId\n } = useScopeId();\n const rootEl = ref();\n const isHovering = shallowRef(false);\n const {\n runOpenDelay,\n runCloseDelay\n } = useDelay(props, value => {\n isHovering.value = value;\n });\n const width = computed(() => {\n return props.rail && props.expandOnHover && isHovering.value ? Number(props.width) : Number(props.rail ? props.railWidth : props.width);\n });\n const location = computed(() => {\n return toPhysical(props.location, isRtl.value);\n });\n const isPersistent = computed(() => props.persistent);\n const isTemporary = computed(() => !props.permanent && (mobile.value || props.temporary));\n const isSticky = computed(() => props.sticky && !isTemporary.value && location.value !== 'bottom');\n useToggleScope(() => props.expandOnHover && props.rail != null, () => {\n watch(isHovering, val => emit('update:rail', !val));\n });\n useToggleScope(() => !props.disableResizeWatcher, () => {\n watch(isTemporary, val => !props.permanent && nextTick(() => isActive.value = !val));\n });\n useToggleScope(() => !props.disableRouteWatcher && !!router, () => {\n watch(router.currentRoute, () => isTemporary.value && (isActive.value = false));\n });\n watch(() => props.permanent, val => {\n if (val) isActive.value = true;\n });\n if (props.modelValue == null && !isTemporary.value) {\n isActive.value = props.permanent || !mobile.value;\n }\n const {\n isDragging,\n dragProgress\n } = useTouch({\n el: rootEl,\n isActive,\n isTemporary,\n width,\n touchless: toRef(props, 'touchless'),\n position: location\n });\n const layoutSize = computed(() => {\n const size = isTemporary.value ? 0 : props.rail && props.expandOnHover ? Number(props.railWidth) : width.value;\n return isDragging.value ? size * dragProgress.value : size;\n });\n const elementSize = computed(() => ['top', 'bottom'].includes(props.location) ? 0 : width.value);\n const {\n layoutItemStyles,\n layoutItemScrimStyles\n } = useLayoutItem({\n id: props.name,\n order: computed(() => parseInt(props.order, 10)),\n position: location,\n layoutSize,\n elementSize,\n active: computed(() => isActive.value || isDragging.value),\n disableTransitions: computed(() => isDragging.value),\n absolute: computed(() =>\n // eslint-disable-next-line @typescript-eslint/no-use-before-define\n props.absolute || isSticky.value && typeof isStuck.value !== 'string')\n });\n const {\n isStuck,\n stickyStyles\n } = useSticky({\n rootEl,\n isSticky,\n layoutItemStyles\n });\n const scrimColor = useBackgroundColor(computed(() => {\n return typeof props.scrim === 'string' ? props.scrim : null;\n }));\n const scrimStyles = computed(() => ({\n ...(isDragging.value ? {\n opacity: dragProgress.value * 0.2,\n transition: 'none'\n } : undefined),\n ...layoutItemScrimStyles.value\n }));\n provideDefaults({\n VList: {\n bgColor: 'transparent'\n }\n });\n useRender(() => {\n const hasImage = slots.image || props.image;\n return _createVNode(_Fragment, null, [_createVNode(props.tag, _mergeProps({\n \"ref\": rootEl,\n \"onMouseenter\": runOpenDelay,\n \"onMouseleave\": runCloseDelay,\n \"class\": ['v-navigation-drawer', `v-navigation-drawer--${location.value}`, {\n 'v-navigation-drawer--expand-on-hover': props.expandOnHover,\n 'v-navigation-drawer--floating': props.floating,\n 'v-navigation-drawer--is-hovering': isHovering.value,\n 'v-navigation-drawer--rail': props.rail,\n 'v-navigation-drawer--temporary': isTemporary.value,\n 'v-navigation-drawer--persistent': isPersistent.value,\n 'v-navigation-drawer--active': isActive.value,\n 'v-navigation-drawer--sticky': isSticky.value\n }, themeClasses.value, backgroundColorClasses.value, borderClasses.value, displayClasses.value, elevationClasses.value, roundedClasses.value, props.class],\n \"style\": [backgroundColorStyles.value, layoutItemStyles.value, ssrBootStyles.value, stickyStyles.value, props.style, ['top', 'bottom'].includes(location.value) ? {\n height: 'auto'\n } : {}]\n }, scopeId, attrs), {\n default: () => [hasImage && _createVNode(\"div\", {\n \"key\": \"image\",\n \"class\": \"v-navigation-drawer__img\"\n }, [!slots.image ? _createVNode(VImg, {\n \"key\": \"image-img\",\n \"alt\": \"\",\n \"cover\": true,\n \"height\": \"inherit\",\n \"src\": props.image\n }, null) : _createVNode(VDefaultsProvider, {\n \"key\": \"image-defaults\",\n \"disabled\": !props.image,\n \"defaults\": {\n VImg: {\n alt: '',\n cover: true,\n height: 'inherit',\n src: props.image\n }\n }\n }, slots.image)]), slots.prepend && _createVNode(\"div\", {\n \"class\": \"v-navigation-drawer__prepend\"\n }, [slots.prepend?.()]), _createVNode(\"div\", {\n \"class\": \"v-navigation-drawer__content\"\n }, [slots.default?.()]), slots.append && _createVNode(\"div\", {\n \"class\": \"v-navigation-drawer__append\"\n }, [slots.append?.()])]\n }), _createVNode(Transition, {\n \"name\": \"fade-transition\"\n }, {\n default: () => [isTemporary.value && (isDragging.value || isActive.value) && !!props.scrim && _createVNode(\"div\", _mergeProps({\n \"class\": ['v-navigation-drawer__scrim', scrimColor.backgroundColorClasses.value],\n \"style\": [scrimStyles.value, scrimColor.backgroundColorStyles.value],\n \"onClick\": () => {\n if (isPersistent.value) return;\n isActive.value = false;\n }\n }, scopeId), null)]\n })]);\n });\n return {\n isStuck\n };\n }\n});\n//# sourceMappingURL=VNavigationDrawer.mjs.map","\n\n\n","\n\n\n\n\n","\n\n\n","\n\n\n\n\n\n\n","import store from '../store/index';\n\nfunction isAshton() {\n return store.state.selectedInstitution.name == 'Ashton on Mersey SCITT';\n}\n\nfunction proficiencies() {\n return isAshton();\n}\n\nfunction rolesBasedPermissions() {\n return !isProduction();\n}\n\nexport default {\n proficiencies,\n rolesBasedPermissions,\n};\n\nfunction isProduction() {\n return window.ndt_config && window.ndt_config.environment == 'production';\n}\n","\n\n\n\n\n\n\n","import type { Cohort, Institution, Permission, StudentCohort, StudentUser } from '@/store/map-store';\nimport type { SidebarItemConfig } from './common';\nimport { icons } from '@/utils/icons';\n\nexport function studentSidebarConfig(\n reviewNounCapitalisedAndPluralised: string,\n traineeNounCapitalised: string,\n userStaffHasPermissionForSelectedStudent: (permission: Permission) => boolean\n): SidebarItemConfig[] {\n const hasAnyPermissions = (permissions: Permission[]) => {\n return permissions.some(p => userStaffHasPermissionForSelectedStudent(p));\n };\n const targetsPage: (earlyCareers: boolean) => StudentSidebarConfig = earlyCareers => ({\n icon: icons.target,\n title: 'Targets',\n pageNameSuffix: 'TargetsListPage',\n show: (_, institution) => institution.config.early_careers === earlyCareers,\n hideForStaff: institution =>\n institution.config.early_careers && !userStaffHasPermissionForSelectedStudent('ect.assessment.view'),\n childPageNameSuffixes: ['TargetCreatePage', 'TargetPage'],\n });\n const reviewsPage: (earlyCareers: boolean) => StudentSidebarConfig = earlyCareers => ({\n icon: icons.reviewPoint,\n title: reviewNounCapitalisedAndPluralised,\n pageNameSuffix: 'ReviewsListPage',\n // To be removed when UCBMS conversion is done, as otherwise it causes double unsaved changes errors\n studentPageNameOverride: 'StudentReviewsListPage',\n childPageNameSuffixes: ['ReviewPage', 'ReviewStandardPage', 'ReviewOverallPage', 'ReviewPart2Page'],\n hideForStaff: institution =>\n (institution.config.early_careers && !userStaffHasPermissionForSelectedStudent('ect.assessment.view')) ||\n (!institution.config.early_careers && !userStaffHasPermissionForSelectedStudent('student.reviews.view')),\n legacyChildPageNameSuffixes: [\n 'LegacyReviewPage',\n 'LegacyReviewStandardPage',\n 'LegacyReviewOverallReviewPage',\n 'LegacyReviewRequirementsPage',\n ],\n studentBadge: user => (user.student.unsubmitted_review_count > 0 ? user.student.unsubmitted_review_count : null),\n show: (_, institution) => institution.config.show_reviews && institution.config.early_careers === earlyCareers,\n });\n\n return [\n {\n icon: 'home',\n title: 'Home',\n // pageNameSuffix not actually used here\n pageNameSuffix: 'HomePage',\n studentPageNameOverride: 'StudentHomePage',\n hideForStaff: () => true,\n childPageNameSuffixes: ['AnnouncementsListPage', 'AnnouncementPage'],\n },\n {\n icon: icons.home,\n title: 'Details',\n pageNameSuffix: 'StudentDetailsPage',\n hideForStaff: () => !hasAnyPermissions(['Admin', 'student.details.view']),\n hideForStudents: () => true,\n },\n {\n icon: icons.manageInduction,\n title: 'Manage Induction',\n pageNameSuffix: 'EctProgressPage',\n show: (_, institution) => institution.config.early_careers,\n hideForStaff: () => !hasAnyPermissions(['Admin', 'ect.manageInduction.view']),\n hideForStudents: () => true,\n },\n {\n icon: icons.files,\n title: 'Files',\n children: [\n {\n icon: icons.filesStudent,\n title: 'My Files',\n tutorTitle: `${traineeNounCapitalised} Files`,\n pageNameSuffix: 'FilesListPage',\n tutorPageNameOverride: 'TutorStudentFilesListPage',\n show: (cohort, institution) => !institution.config.early_careers && cohort.show_student_files,\n },\n {\n icon: icons.courseFiles,\n title: 'Course Files',\n pageNameSuffix: 'CourseFilesListPage',\n show: (cohort, institution) =>\n institution.has_any_course_files && !institution.config.early_careers && cohort.show_student_files,\n },\n ],\n },\n {\n icon: icons.course,\n title: 'Course',\n children: [\n {\n icon: icons.curriculum,\n title: 'Curriculum',\n pageNameSuffix: 'CurriculumPage',\n // To be removed when UCBMS conversion is done, as otherwise it causes double unsaved changes errors\n studentPageNameOverride: 'StudentCurriculumPage',\n childPageNameSuffixes: ['CurriculumStatementPage', 'CurriculumTeachingStrategyPage'],\n show: (_, __, curriculumVisible) => curriculumVisible,\n },\n {\n icon: icons.trainingPlan,\n title: 'Training Plan',\n pageNameSuffix: 'CohortCoursePage',\n // To be removed when UCBMS conversion is done, as otherwise it causes double unsaved changes errors\n studentPageNameOverride: 'StudentCohortCoursePage',\n childPageNameSuffixes: ['CohortCourseWeekPage'],\n show: (cohort, _) => cohort.has_course,\n },\n {\n icon: icons.mentorMeeting,\n title: 'Mentor Meetings',\n pageNameSuffix: 'MentorMeetingsListPage',\n childPageNameSuffixes: [\n 'MentorMeetingPage',\n 'MentorMeetingCreatePage',\n 'MentorMeetingTargetCreatePage',\n 'MentorMeetingTargetPage',\n ],\n show: (_, institution) => institution.config.show_mentor_meetings && !institution.config.early_careers,\n },\n {\n icon: icons.courseActivity,\n title: 'Activities',\n pageNameSuffix: 'AssignmentsListPage',\n // To be removed when UCBMS conversion is done, as otherwise it causes double unsaved changes errors\n studentPageNameOverride: 'StudentAssignmentsListPage',\n childPageNameSuffixes: ['AssignmentPage', 'AssignmentLatestVersionPage'],\n show: (cohort, _) => cohort.show_assignments,\n },\n {\n icon: icons.calendar,\n title: 'Calendar',\n pageNameSuffix: 'CalendarPage',\n show: (_, institution) => institution.config.show_calendar_for_students,\n hideForStaff: () => !userStaffHasPermissionForSelectedStudent('student.calendar'),\n },\n ],\n },\n {\n icon: icons.development,\n title: 'Development',\n children: [\n targetsPage(false),\n {\n icon: icons.reflection,\n title: 'Reflections',\n pageNameSuffix: 'ReflectionsListPage',\n childPageNameSuffixes: ['ReflectionCreatePage', 'ReflectionPage'],\n show: (_, institution) => !institution.config.early_careers,\n hideForStaff: () => !userStaffHasPermissionForSelectedStudent('student.reflections.view'),\n },\n {\n icon: icons.lessonObservation,\n title: 'Lesson Observations',\n pageNameSuffix: 'LessonObservationsListPage',\n childPageNameSuffixes: ['LessonObservationPage', 'LessonObservationCreatePage'],\n show: (_, institution) => institution.config.show_lesson_observations && !institution.config.early_careers,\n },\n ],\n },\n targetsPage(true),\n {\n icon: icons.review,\n title: 'Review',\n children: [\n reviewsPage(false),\n {\n icon: icons.evidence,\n title: 'Evidence',\n pageNameSuffix: 'EvidenceListPage',\n show: (_, institution) => institution.config.show_evidence && !institution.config.early_careers,\n },\n {\n icon: icons.portfolio,\n title: 'Portfolio',\n pageNameSuffix: 'PortfolioOverviewPage',\n // To be removed when UCBMS conversion is done, as otherwise it causes double unsaved changes errors\n studentPageNameOverride: 'StudentPortfolioOverviewPage',\n childPageNameSuffixes: ['PortfolioStandardPage'],\n show: (_, institution) =>\n institution.config.show_evidence && institution.config.show_portfolio && !institution.config.early_careers,\n },\n {\n icon: icons.proficiencies,\n title: 'Proficiencies',\n pageNameSuffix: 'ProficienciesPage',\n // To be removed when UCBMS conversion is done, as otherwise it causes double unsaved changes errors\n studentPageNameOverride: 'StudentProficienciesPage',\n show: (_, institution) => institution.config.has_proficiencies && !institution.config.early_careers,\n hideForStudents: institution => !institution.config.students_see_proficiencies,\n hideForStaff: () => !userStaffHasPermissionForSelectedStudent('student.proficiencies.edit'),\n },\n ],\n },\n reviewsPage(true),\n ];\n}\n\nexport interface StudentSidebarConfig {\n icon: string;\n title: string;\n tutorTitle?: string;\n pageNameSuffix: string;\n studentPageNameOverride?: string;\n tutorPageNameOverride?: string;\n childPageNameSuffixes?: string[];\n legacyChildPageNameSuffixes?: string[];\n studentBadge?: (user: StudentUser) => number | null;\n show?: (cohort: Cohort | StudentCohort, institution: Institution, curriculumVisible: boolean) => boolean;\n // Staff and student specific overrides of `show`\n hideForStaff?: (institution: Institution) => boolean;\n hideForStudents?: (institution: Institution) => boolean;\n}\n","export type SidebarItemConfig = T | SidebarItemWithSubItemsConfig;\n\nexport interface SidebarItemWithSubItemsConfig {\n icon: string;\n title: string;\n children: T[];\n pageNameSuffix?: never;\n pageName?: never;\n}\n\nexport function hasSubItems(x: SidebarItemConfig): x is SidebarItemWithSubItemsConfig {\n return !('pageNameSuffix' in x) && !('pageName' in x);\n}\n","import type { Institution, Permission } from '@/store/map-store';\nimport type { SidebarItemConfig } from './common';\nimport { icons } from '@/utils/icons';\nimport type { CohortResponse } from '@/types/responses';\n\nexport function cohortSidebarConfig(\n traineeNounCapitalised: string,\n traineeNounCapitalisedAndPluralised: string,\n reviewNounCapitalisedAndPluralised: string\n): SidebarItemConfig[] {\n const instructorAccountsChildren = [\n 'CohortTutorStaffPage',\n 'CohortTutorStaffTrainingModulePage',\n 'CohortTutorStaffTrainingCompetencyThemePage',\n 'CohortStaffTrainingRecordCreatePage',\n 'CohortStaffTrainingRecordEditPage',\n 'CohortStaffTrainingCertificateEditPage',\n 'CohortStaffTrainingEventPage',\n ];\n\n return [\n {\n icon: icons.students,\n title: traineeNounCapitalisedAndPluralised,\n pageName: 'TutorStudentListPage',\n anyPermissions: ['Admin'],\n children: ['CohortBulkUploadPage'],\n show: (_, institution) => !institution.config.mentor_training_only,\n },\n {\n icon: icons.instructor,\n title: 'Instructors',\n children: [\n {\n icon: icons.instructorAccounts,\n singleItemTitle: 'Instructors',\n title: 'Accounts',\n pageName: 'CohortStaffListPage',\n anyPermissions: ['staff.edit', 'staff.view'],\n show: (_, institution) => !institution.config.early_careers,\n children: instructorAccountsChildren,\n },\n {\n icon: icons.instructorTraining,\n title: 'Monitoring',\n pageName: 'TutorCohortStaffTrainingPage',\n haveAnyPermissionInEachSet: [\n ['staff.training.edit', 'staff.training.view'],\n ['staff.edit', 'staff.view'],\n ],\n show: cohort => cohort.has_staff_training,\n children: ['TutorCohortStaffTrainingPage', 'TutorCohortStaffTrainingModulePage'],\n },\n {\n icon: icons.forum,\n title: 'Forums',\n singleItemTitle: 'Instructor Forums',\n pageName: 'CohortForumsListPage',\n haveAnyPermissionInEachSet: [['staff.forums.edit'], ['staff.edit', 'staff.view']],\n show: (_, institution) => !institution.config.mentor_training_only && !institution.config.early_careers,\n children: ['CohortForumCreatePage', 'CohortForumEditPage'],\n },\n ],\n },\n {\n icon: icons.forum,\n title: 'Forums',\n pageName: 'CohortForumsListPage',\n haveAnyPermissionInEachSet: [['staff.forums.edit']],\n show: (_, institution) => institution.config.mentor_training_only && !institution.config.early_careers,\n children: ['CohortForumCreatePage', 'CohortForumEditPage'],\n },\n {\n icon: icons.course,\n title: 'Course',\n children: [\n {\n icon: icons.curriculum,\n title: 'Curriculum',\n pageName: 'AdminCohortCurriculumPage',\n anyPermissions: ['Admin'],\n show: (cohort, institution) =>\n (cohort.has_curriculum || institution.config.has_curriculum) &&\n !institution.config.early_careers &&\n !institution.config.mentor_training_only,\n children: [\n 'AdminCohortCurriculumThemePage',\n 'CohortAdminCurriculumStatementPage',\n 'CohortAdminCurriculumTeachingStrategyPage',\n ],\n },\n {\n icon: icons.trainingPlan,\n title: 'Training Plan',\n pageName: 'TutorAdminCohortCoursePage',\n anyPermissions: ['cohortCourses.edit'],\n show: (_, institution) => !institution.config.mentor_training_only && !institution.config.early_careers,\n children: [\n 'TutorAdminCohortCourseTermPage',\n 'TutorAdminCohortCourseWeekPage',\n 'TutorAdminCohortCourseWeekTemplatePage',\n 'TutorAdminCohortCourseWeekSectionPage',\n 'TutorAdminCohortCourseWeekTemplateSectionPage',\n ],\n },\n {\n icon: icons.mentorMeeting,\n title: 'Mentor Meetings',\n pageName: 'CohortMentorMeetingsPage',\n anyPermissions: ['mentorMeetingTemplates.edit', 'Admin'],\n show: (_, institution) =>\n !institution.config.mentor_training_only &&\n institution.config.show_mentor_meetings &&\n !institution.config.early_careers,\n },\n {\n icon: icons.courseActivity,\n title: 'Activities',\n pageName: 'CohortAssignmentsListPage',\n anyPermissions: ['assignments.edit'],\n show: (_, institution) => !institution.config.mentor_training_only && !institution.config.early_careers,\n children: ['CohortAssignmentCreatePage', 'CohortAssignmentEditPage', 'CohortAssignmentViewPage'],\n },\n {\n icon: icons.target,\n title: 'Targets',\n pageName: 'CohortCourseTargetsPage',\n anyPermissions: ['Admin'],\n show: (_, institution) => !institution.config.mentor_training_only && !institution.config.early_careers,\n children: ['CohortCourseTargetCreatePage', 'CohortCourseTargetEditPage'],\n },\n {\n icon: icons.reflection,\n title: 'Reflections',\n pageName: 'CohortCourseReflectionsPage',\n anyPermissions: ['Admin'],\n show: (_, institution) => !institution.config.mentor_training_only && !institution.config.early_careers,\n children: ['CohortCourseReflectionCreatePage', 'CohortCourseReflectionEditPage'],\n },\n ],\n },\n {\n icon: icons.development,\n title: 'Development',\n children: [\n {\n icon: icons.target,\n title: 'Targets',\n pageName: 'CohortDevelopmentTargetsPage',\n anyPermissions: ['Admin'],\n show: (_, institution) => !institution.config.mentor_training_only && !institution.config.early_careers,\n },\n {\n icon: icons.reflection,\n title: 'Reflections',\n pageName: 'CohortDevelopmentReflectionsPage',\n anyPermissions: ['Admin'],\n show: (_, institution) => !institution.config.mentor_training_only && !institution.config.early_careers,\n },\n {\n icon: icons.lessonObservation,\n title: 'Lesson Observations',\n pageName: 'CohortDevelopmentLessonObservationsPage',\n anyPermissions: ['Admin'],\n show: (_, institution) =>\n !institution.config.mentor_training_only &&\n institution.config.show_lesson_observations &&\n !institution.config.early_careers,\n },\n ],\n },\n {\n icon: icons.announcement,\n title: 'Announcements',\n children: [\n {\n icon: icons.student,\n title: traineeNounCapitalisedAndPluralised,\n singleItemTitle: `${traineeNounCapitalised} Announcements`,\n pageName: 'CohortAdminAnnouncementsPage',\n anyPermissions: ['announcements.edit'],\n show: (_, institution) => !institution.config.mentor_training_only && !institution.config.early_careers,\n children: ['CohortAdminAnnouncementCreatePage', 'CohortAdminAnnouncementEditPage'],\n },\n {\n icon: icons.instructor,\n title: 'Instructors',\n singleItemTitle: `Instructor Announcements`,\n pageName: 'CohortAdminStaffAnnouncementsPage',\n anyPermissions: ['staff.announcements.edit'],\n show: (_, institution) => !institution.config.mentor_training_only && !institution.config.early_careers,\n children: ['CohortAdminStaffAnnouncementCreatePage', 'CohortAdminStaffAnnouncementEditPage'],\n },\n ],\n },\n //This is repeated so that the logic in the sidebar files remains the same,\n //and this menu item is named 'Announcements' rather than 'Instructors'.\n {\n icon: icons.announcement,\n title: 'Announcements',\n pageName: 'CohortAdminStaffAnnouncementsPage',\n anyPermissions: ['staff.announcements.edit'],\n show: (_, institution) => institution.config.mentor_training_only,\n children: ['CohortAdminStaffAnnouncementCreatePage', 'CohortAdminStaffAnnouncementEditPage'],\n },\n {\n icon: icons.reviewPoint,\n title: reviewNounCapitalisedAndPluralised,\n pageName: 'CohortReviewsPage',\n anyPermissions: ['Admin'],\n show: (_, institution) => !institution.config.mentor_training_only && institution.config.show_reviews,\n children: [\n 'TutorAdminReviewCreatePage',\n 'TutorAdminReviewEditPage',\n 'LegacyTutorAdminReviewPage',\n 'TutorAdminReviewViewPage',\n ],\n },\n {\n icon: icons.group,\n title: 'Groups',\n pageName: 'TutorGroupsListPage',\n anyPermissions: ['groups.edit'],\n show: (_, institution) => !institution.config.mentor_training_only && !institution.config.early_careers,\n children: ['TutorGroupPage'],\n },\n {\n icon: icons.settings,\n title: 'Settings',\n pageName: 'TutorAdminCohortEditPage',\n anyPermissions: ['Admin'],\n show: (_, institution) => !institution.config.early_careers,\n },\n ];\n}\n\nexport interface CohortSidebarConfig {\n icon: string;\n title: string;\n singleItemTitle?: string;\n pageName: string;\n anyPermissions?: Permission[];\n haveAnyPermissionInEachSet?: Permission[][];\n show?: (cohort: CohortResponse, institution: Institution) => boolean;\n children?: string[];\n}\n","import type { Institution, Permission } from '@/store/map-store';\nimport type { SidebarItemConfig } from './common';\nimport { icons } from '@/utils/icons';\n\nexport function institutionSidebarConfig(\n traineeNounCapitalised: string,\n traineeNounCapitalisedAndPluralised: string,\n reviewNounCapitalisedAndPluralised: string\n): SidebarItemConfig[] {\n const instructorAccountsChildren = [\n 'InstitutionTutorStaffPage',\n 'InstitutionTutorStaffTrainingModulePage',\n 'InstitutionTutorStaffTrainingCompetencyThemePage',\n 'InstitutionStaffTrainingRecordCreatePage',\n 'InstitutionStaffTrainingRecordEditPage',\n 'InstitutionStaffTrainingCertificateCreatePage',\n 'InstitutionStaffTrainingCertificateEditPage',\n 'InstitutionStaffTrainingEventPage',\n ];\n const instructorTrainingChildren = [\n 'InstitutionStaffTrainingModulePage',\n 'InstitutionStaffTrainingModuleSectionPage',\n 'InstitutionStaffTrainingFrameworkPage',\n 'InstitutionStaffTrainingCompetencyThemePage',\n 'InstitutionStaffTrainingCompetencyPage',\n 'InstitutionStaffTrainingAcceptedCertificateCreatePage',\n 'InstitutionStaffTrainingAcceptedCertificateEditPage',\n 'InstitutionStaffTrainingEventCreatePage',\n 'InstitutionStaffTrainingEventEditPage',\n ];\n const instructorForumsChildren = ['InstitutionForumCreatePage', 'InstitutionForumEditPage'];\n return [\n {\n icon: icons.students,\n title: 'ECTs',\n children: [\n {\n icon: icons.ectsOverview,\n title: 'Overview',\n pageName: 'TutorEctsOverviewPage',\n allPermissions: ['Admin'],\n show: institution => institution.config.early_careers,\n },\n {\n icon: icons.ectsPending,\n title: 'Pending',\n pageName: 'TutorPendingEctsPage',\n allPermissions: ['Admin'],\n show: institution => institution.config.early_careers,\n children: ['TutorEctApproveRegistrationPage'],\n },\n {\n icon: icons.ectsCompleted,\n title: 'Completed',\n pageName: 'TutorCompletedEctsPage',\n allPermissions: ['Admin'],\n show: institution => institution.config.early_careers,\n },\n {\n icon: icons.search,\n title: `Search`,\n pageName: 'TutorAdminGlobalSearchPage',\n allPermissions: ['Admin'],\n show: institution => institution.config.early_careers,\n },\n ],\n },\n {\n icon: icons.cohort,\n title: 'Cohorts',\n pageName: 'TutorCohortListPage',\n allPermissions: ['Admin'],\n children: ['TutorAdminCohortCreatePage'],\n },\n {\n icon: icons.studentSearch,\n title: `Search ${traineeNounCapitalisedAndPluralised}`,\n pageName: 'TutorAdminGlobalSearchPage',\n allPermissions: ['Admin'],\n show: institution => !institution.config.mentor_training_only && !institution.config.early_careers,\n },\n {\n icon: icons.school,\n title: 'Schools',\n pageName: 'TutorSchoolsListPage',\n allPermissions: ['schools.edit'],\n show: institution => institution.config.early_careers,\n },\n {\n icon: icons.instructor,\n title: 'Instructors',\n children: [\n {\n icon: icons.instructorAccounts,\n title: 'Accounts',\n pageName: 'InstitutionStaffListPage',\n allPermissions: ['staff.edit'],\n show: institution => !institution.config.early_careers && !institution.config.mentor_training_only,\n children: instructorAccountsChildren,\n },\n {\n icon: icons.instructorTraining,\n title: 'Training',\n pageName: 'InstitutionStaffTrainingPage',\n allPermissions: ['staff.training.edit'],\n show: institution => !institution.config.early_careers && !institution.config.mentor_training_only,\n children: instructorTrainingChildren,\n },\n {\n icon: icons.forum,\n title: 'Forums',\n singleItemTitle: 'Instructor Forums',\n pageName: 'InstitutionForumsListPage',\n haveAnyPermissionInEachSet: [['staff.forums.edit'], ['staff.edit', 'staff.view']],\n show: institution => !institution.config.early_careers && !institution.config.mentor_training_only,\n children: instructorForumsChildren,\n },\n ],\n },\n {\n icon: icons.instructor,\n title: 'Instructors',\n pageName: 'InstitutionStaffListPage',\n allPermissions: ['staff.edit'],\n show: institution => institution.config.early_careers || institution.config.mentor_training_only,\n children: instructorAccountsChildren,\n },\n {\n icon: icons.instructorTraining,\n title: 'Training',\n pageName: 'InstitutionStaffTrainingPage',\n allPermissions: ['staff.training.edit'],\n show: institution => !institution.config.early_careers && institution.config.mentor_training_only,\n children: instructorTrainingChildren,\n },\n {\n icon: icons.forum,\n title: 'Forums',\n pageName: 'InstitutionForumsListPage',\n allPermissions: ['staff.forums.edit'],\n show: institution => !institution.config.early_careers && institution.config.mentor_training_only,\n children: instructorForumsChildren,\n },\n {\n icon: icons.files,\n title: 'Files Config',\n children: [\n {\n icon: icons.folderTemplates,\n title: 'Folder Structure',\n pageName: 'TutorAdminFolderTemplatesListPage',\n allPermissions: ['folderTemplates.edit'],\n show: institution => !institution.config.mentor_training_only && !institution.config.early_careers,\n children: ['TutorAdminFolderTemplatePage'],\n },\n {\n icon: icons.courseFilesTrainee,\n title: `${traineeNounCapitalised} Files`,\n pageName: 'TutorAdminStudentCourseFilesPage',\n allPermissions: ['courseFiles.edit'],\n show: institution => !institution.config.mentor_training_only && !institution.config.early_careers,\n },\n {\n icon: icons.courseFilesInstructor,\n title: `Instructor Files`,\n pageName: 'TutorAdminStaffFilesPage',\n allPermissions: ['courseFiles.edit', 'staff.edit'],\n show: institution => !institution.config.mentor_training_only && !institution.config.early_careers,\n },\n ],\n },\n //This is repeated so that the logic in the sidebar files remains the same,\n //and this menu item is named 'Files' rather than 'Instructor Files'.\n {\n icon: icons.files,\n title: `Files`,\n pageName: 'TutorAdminStaffFilesPage',\n allPermissions: ['courseFiles.edit', 'staff.edit'],\n show: institution => institution.config.mentor_training_only && !institution.config.early_careers,\n },\n {\n icon: icons.course,\n title: 'Course Config',\n children: [\n {\n icon: icons.curriculum,\n title: 'Curriculum',\n pageName: 'AdminCurriculumPage',\n allPermissions: ['curriculum.edit'],\n show: institution =>\n !institution.config.mentor_training_only &&\n !institution.config.early_careers &&\n institution.config.has_curriculum,\n children: [\n 'AdminCurriculumThemePage',\n 'InstAdminCurriculumStatementPage',\n 'InstAdminCurriculumTeachingStrategyPage',\n ],\n },\n {\n icon: icons.courseActivity,\n title: 'Course Activities',\n pageName: 'TutorAdminAssignmentTemplatesListPage',\n allPermissions: ['assignments.edit'],\n show: institution => !institution.config.mentor_training_only && !institution.config.early_careers,\n children: [\n 'TutorAdminAssignmentTemplateEditPage',\n 'TutorAdminAssignmentTemplateSectionPage',\n 'TutorAdminAssignmentTemplateCreatePage',\n ],\n },\n {\n icon: icons.goReact,\n title: 'GoReact Templates',\n pageName: 'InstitutionGoReactTemplatesListPage',\n allPermissions: ['goReactTemplates.edit'],\n show: institution => institution.config.use_go_react,\n children: ['InstitutionGoReactTemplateEditPage', 'InstitutionGoReactTemplateCreatePage'],\n },\n {\n icon: icons.scormPackage,\n title: 'SCORM Packages',\n pageName: 'InstitutionScormPackagesListPage',\n allPermissions: ['scormPackages.edit'],\n },\n {\n icon: icons.calendar,\n title: 'Calendar',\n pageName: 'TutorAdminCalendarPage',\n allPermissions: ['calendar.edit'],\n show: institution => !institution.config.mentor_training_only && !institution.config.early_careers,\n },\n {\n icon: icons.target,\n title: 'Targets',\n pageName: 'TutorAdminTargetTemplatePage',\n show: institution => !institution.config.mentor_training_only && !institution.config.early_careers,\n allPermissions: ['Admin'],\n },\n {\n icon: icons.reflection,\n title: 'Reflections',\n pageName: 'InstitutionReflectionTemplatesListPage',\n allPermissions: ['Admin'],\n show: institution => !institution.config.mentor_training_only && !institution.config.early_careers,\n children: ['InstitutionReflectionTemplateCreatePage', 'InstitutionReflectionTemplateEditPage'],\n },\n {\n icon: icons.reflection,\n title: 'Course Reflections',\n pageName: 'TutorAdminCourseReflectionTemplatePage',\n allPermissions: ['Admin'],\n show: institution => !institution.config.mentor_training_only && !institution.config.early_careers,\n },\n ],\n },\n {\n icon: icons.reviewPoint,\n title: reviewNounCapitalisedAndPluralised,\n pageName: 'TutorAdminReviewTemplatesListPage',\n allPermissions: ['reviews.edit'],\n children: [\n 'TutorAdminReviewTemplatePage',\n 'TutorAdminReviewTemplateCreatePage',\n 'TutorAdminReviewTemplateCopyPage',\n 'TutorAdminReviewTemplateOverallPage',\n 'TutorAdminReviewTemplatePerStandardPage',\n 'TutorAdminReviewTemplateStandardPage',\n 'TutorAdminReviewTemplatePart2Page',\n ],\n show: institution => !institution.config.mentor_training_only,\n },\n {\n icon: icons.settings,\n title: 'Settings',\n children: [\n {\n icon: icons.home,\n title: 'Home Pages',\n pageName: 'InstitutionHomePagesSettingsPage',\n allPermissions: ['Admin'],\n show: institution => !institution.config.mentor_training_only,\n },\n {\n icon: icons.home,\n title: 'Home Page',\n pageName: 'InstitutionHomePagesSettingsPage',\n allPermissions: ['Admin'],\n show: institution => institution.config.mentor_training_only,\n },\n {\n icon: icons.judgementSets,\n title: 'Judgement Sets',\n pageName: 'TutorAdminJudgementSetsPage',\n allPermissions: ['judgementSets.edit'],\n show: institution => !institution.config.mentor_training_only,\n },\n {\n icon: icons.featureConfig,\n title: 'Features',\n pageName: 'TutorAdminFeatureConfigPage',\n allPermissions: ['Admin'],\n show: institution => !institution.config.mentor_training_only && !institution.config.early_careers,\n },\n {\n icon: icons.permission,\n title: 'Role Permissions',\n pageName: 'TutorAdminPermissionsPage',\n allPermissions: ['Admin'],\n show: institution => !institution.config.mentor_training_only && !institution.config.early_careers,\n },\n {\n icon: icons.professionalResources,\n title: 'Professional Resources',\n pageName: 'InstitutionProfessionalResourcesConfigurationPage',\n allPermissions: ['Admin'],\n },\n ],\n },\n ];\n}\n\nexport interface InstitutionSidebarConfig {\n icon: string;\n title: string;\n singleItemTitle?: string;\n pageName: string;\n allPermissions?: Permission[];\n haveAnyPermissionInEachSet?: Permission[][];\n show?: (institution: Institution) => boolean;\n children?: string[];\n}\n","import type { SidebarItemConfig } from './common';\nimport { icons } from '@/utils/icons';\n\nexport function schoolSidebarConfig(\n traineeNounCapitalisedAndPluralised: string\n): SidebarItemConfig[] {\n return [\n {\n icon: icons.school,\n title: 'Details',\n pageName: 'TutorSchoolEditPage',\n },\n {\n icon: icons.student,\n title: traineeNounCapitalisedAndPluralised,\n pageName: 'TutorSchoolStudentsPage',\n children: ['TutorEctRegistrationPage', 'TutorEctReviewRegistrationPage'],\n },\n {\n icon: icons.schoolStaff,\n title: 'Instructors',\n pageName: 'TutorSchoolStaffPage',\n },\n ];\n}\n\nexport interface SchoolSidebarConfig {\n icon: string;\n title: string;\n pageName: string;\n children?: string[];\n}\n","import type { Cohort, Institution, Permission, StudentCohort, StudentUser } from '@/store/map-store';\nimport type { StudentSidebarConfig } from './student-sidebar';\nimport { studentSidebarConfig } from './student-sidebar';\nimport type { SidebarItemConfig } from './common';\nimport { hasSubItems } from './common';\nimport type { CohortSidebarConfig } from './cohort-sidebar';\nimport { cohortSidebarConfig } from './cohort-sidebar';\nimport type { InstitutionSidebarConfig } from './institution-sidebar';\nimport { institutionSidebarConfig } from './institution-sidebar';\nimport type { SchoolSidebarConfig } from './school-sidebar';\nimport { schoolSidebarConfig } from './school-sidebar';\nimport type { CohortResponse } from '@/types/responses';\n\nexport function createStudentSidebar(\n traineeNounCapitalised: string,\n reviewNounCapitalisedAndPluralised: string,\n user: StudentUser,\n institution: Institution,\n curriculumVisible: boolean,\n userStaffHasPermissionForSelectedStudent: (permission: Permission) => boolean\n): SidebarItem[] {\n return createStudentLevelSidebar(\n traineeNounCapitalised,\n reviewNounCapitalisedAndPluralised,\n c => Boolean(c.hideForStudents?.(institution)),\n c => createStudentSidebarItem(c, user),\n user.student.cohort,\n institution,\n curriculumVisible,\n userStaffHasPermissionForSelectedStudent\n );\n}\n\nexport function createStaffStudentSidebar(\n traineeNounCapitalised: string,\n reviewNounCapitalisedAndPluralised: string,\n cohort: Cohort,\n institution: Institution,\n curriculumVisible: boolean,\n userStaffHasPermissionForSelectedStudent: (permission: Permission) => boolean\n): SidebarItem[] {\n return createStudentLevelSidebar(\n traineeNounCapitalised,\n reviewNounCapitalisedAndPluralised,\n c => {\n return Boolean(c.hideForStaff?.(institution));\n },\n c => createStaffStudentSidebarItem(c),\n cohort,\n institution,\n curriculumVisible,\n userStaffHasPermissionForSelectedStudent\n );\n}\n\nfunction createStudentSidebarItem(x: StudentSidebarConfig, user: StudentUser) {\n return {\n icon: x.icon,\n title: x.title,\n pageName: x.studentPageNameOverride || x.pageNameSuffix,\n badge: x.studentBadge ? x.studentBadge(user) : null,\n children: (\n x.childPageNameSuffixes\n ?.map(s => 'Student' + s)\n .concat(x.legacyChildPageNameSuffixes?.map(s => 'LegacyStudent' + s) || []) || []\n ).concat([x.pageNameSuffix, ...(x.childPageNameSuffixes || [])]), // This is a hack until all the Student and Tutor pages have been merged\n subItems: [],\n };\n}\n\nfunction createStaffStudentSidebarItem(x: StudentSidebarConfig) {\n return {\n icon: x.icon,\n title: x.tutorTitle || x.title,\n pageName: x.tutorPageNameOverride || 'Tutor' + x.pageNameSuffix,\n badge: null,\n children: (\n x.childPageNameSuffixes\n ?.map(s => 'Tutor' + s)\n .concat(x.legacyChildPageNameSuffixes?.map(s => 'LegacyTutor' + s) || []) || []\n ).concat([x.pageNameSuffix, ...(x.childPageNameSuffixes || [])]), // This is a hack until all the Student and Tutor pages have been merged,\n subItems: [],\n };\n}\n\nexport function createCohortSidebar(\n traineeNounCapitalised: string,\n traineeNounCapitalisedAndPluralised: string,\n reviewNounCapitalisedAndPluralised: string,\n cohort: CohortResponse,\n institution: Institution,\n userStaffHasPermissionForSelectedCohort: (permission: Permission) => boolean\n): SidebarItem[] {\n const config = cohortSidebarConfig(\n traineeNounCapitalised,\n traineeNounCapitalisedAndPluralised,\n reviewNounCapitalisedAndPluralised\n );\n const show = (config: CohortSidebarConfig) => {\n return (\n (!config.show || config.show(cohort, institution)) &&\n (!config.anyPermissions ||\n (config.anyPermissions && config.anyPermissions.some(p => userStaffHasPermissionForSelectedCohort(p)))) &&\n (!config.haveAnyPermissionInEachSet ||\n config.haveAnyPermissionInEachSet.every(s => s.some(p => userStaffHasPermissionForSelectedCohort(p))))\n );\n };\n return createSidebar(config, show, createCohortSidebarItem);\n}\n\nfunction createCohortSidebarItem(x: CohortSidebarConfig) {\n return {\n icon: x.icon,\n title: x.title,\n singleItemTitle: x.singleItemTitle,\n pageName: x.pageName,\n badge: null,\n children: x.children || [],\n subItems: [],\n };\n}\n\nexport function createInsitutionSidebar(\n traineeNounCapitalised: string,\n traineeNounCapitalisedAndPluralised: string,\n reviewNounCapitalisedAndPluralised: string,\n institution: Institution,\n userStaffHasPermission: (permission: Permission) => boolean\n): SidebarItem[] {\n const config = institutionSidebarConfig(\n traineeNounCapitalised,\n traineeNounCapitalisedAndPluralised,\n reviewNounCapitalisedAndPluralised\n );\n const show = (config: InstitutionSidebarConfig) => {\n return (\n (!config.show || config.show(institution)) &&\n (!config.allPermissions || config.allPermissions.every(p => userStaffHasPermission(p))) &&\n (!config.haveAnyPermissionInEachSet ||\n config.haveAnyPermissionInEachSet.every(s => s.some(p => userStaffHasPermission(p))))\n );\n };\n return createSidebar(config, show, createInstitutionSidebarItem);\n}\n\nfunction createInstitutionSidebarItem(x: InstitutionSidebarConfig) {\n return {\n icon: x.icon,\n title: x.title,\n pageName: x.pageName,\n badge: null,\n children: x.children || [],\n subItems: [],\n };\n}\n\nexport function createSchoolSidebar(traineeNounCapitalisedAndPluralised: string): SidebarItem[] {\n const config = schoolSidebarConfig(traineeNounCapitalisedAndPluralised);\n const show = () => true;\n return createSidebar(config, show, createSchoolSidebarItem);\n}\n\nfunction createSchoolSidebarItem(x: SchoolSidebarConfig) {\n return {\n icon: x.icon,\n title: x.title,\n pageName: x.pageName,\n badge: null,\n children: x.children || [],\n subItems: [],\n };\n}\n\nfunction createStudentLevelSidebar(\n traineeNounCapitalised: string,\n reviewPointsTitle: string,\n hide: (configItem: StudentSidebarConfig) => boolean,\n createSidebarItem: (configItem: StudentSidebarConfig) => SidebarItem,\n cohort: Cohort | StudentCohort,\n institution: Institution,\n curriculumVisible: boolean,\n userStaffHasPermissionForSelectedStudent: (permission: Permission) => boolean\n): SidebarItem[] {\n const config = studentSidebarConfig(\n reviewPointsTitle,\n traineeNounCapitalised,\n userStaffHasPermissionForSelectedStudent\n );\n const show = (config: StudentSidebarConfig) => {\n return (!config.show || config.show(cohort, institution, curriculumVisible)) && !hide(config);\n };\n return createSidebar(config, show, createSidebarItem);\n}\n\nfunction createSidebar(\n config: SidebarItemConfig[],\n show: (config: T) => boolean,\n createSidebarItem: (config: T) => SidebarItem\n): SidebarItem[] {\n const topLevelItems = config.filter(x => (hasSubItems(x) ? true : show(x)));\n\n const visibleTopLevelItems: SidebarItem[] = [];\n for (const item of topLevelItems) {\n if (hasSubItems(item)) {\n const subItems = item.children.filter(show).map(c => createSidebarItem(c));\n if (subItems.length === 0) continue;\n\n visibleTopLevelItems.push({\n icon: item.icon,\n title: item.title,\n pageName: subItems[0].pageName,\n badge: null,\n children: subItems.flatMap(s => [s.pageName].concat(s.children)),\n subItems,\n });\n } else {\n visibleTopLevelItems.push(createSidebarItem(item));\n }\n }\n return visibleTopLevelItems;\n}\n\nexport interface SidebarItem {\n icon: string;\n title: string;\n singleItemTitle?: string;\n pageName: string;\n badge: number | null;\n children: string[];\n subItems: SidebarItem[];\n}\n","