{"version":3,"file":"index.js","sources":["../../node_modules/@vue/shared/dist/shared.esm-bundler.js","../../node_modules/@vue/reactivity/dist/reactivity.esm-bundler.js","../../node_modules/@vue/runtime-core/dist/runtime-core.esm-bundler.js","../../node_modules/@vue/runtime-dom/dist/runtime-dom.esm-bundler.js","../../src/models/enum/routerPath.ts","../../src/models/enum/trustGroupType.ts","../../src/models/enum/userProfileType.ts","../../node_modules/axios/lib/helpers/bind.js","../../node_modules/axios/lib/utils.js","../../node_modules/axios/lib/core/AxiosError.js","../../node_modules/axios/lib/helpers/null.js","../../node_modules/axios/lib/helpers/toFormData.js","../../node_modules/axios/lib/helpers/AxiosURLSearchParams.js","../../node_modules/axios/lib/helpers/buildURL.js","../../node_modules/axios/lib/core/InterceptorManager.js","../../node_modules/axios/lib/defaults/transitional.js","../../node_modules/axios/lib/platform/browser/classes/URLSearchParams.js","../../node_modules/axios/lib/platform/browser/classes/FormData.js","../../node_modules/axios/lib/platform/browser/classes/Blob.js","../../node_modules/axios/lib/platform/browser/index.js","../../node_modules/axios/lib/helpers/toURLEncodedForm.js","../../node_modules/axios/lib/helpers/formDataToJSON.js","../../node_modules/axios/lib/defaults/index.js","../../node_modules/axios/lib/helpers/parseHeaders.js","../../node_modules/axios/lib/core/AxiosHeaders.js","../../node_modules/axios/lib/core/transformData.js","../../node_modules/axios/lib/cancel/isCancel.js","../../node_modules/axios/lib/cancel/CanceledError.js","../../node_modules/axios/lib/core/settle.js","../../node_modules/axios/lib/helpers/cookies.js","../../node_modules/axios/lib/helpers/isAbsoluteURL.js","../../node_modules/axios/lib/helpers/combineURLs.js","../../node_modules/axios/lib/core/buildFullPath.js","../../node_modules/axios/lib/helpers/isURLSameOrigin.js","../../node_modules/axios/lib/helpers/parseProtocol.js","../../node_modules/axios/lib/helpers/speedometer.js","../../node_modules/axios/lib/adapters/xhr.js","../../node_modules/axios/lib/adapters/adapters.js","../../node_modules/axios/lib/core/dispatchRequest.js","../../node_modules/axios/lib/core/mergeConfig.js","../../node_modules/axios/lib/env/data.js","../../node_modules/axios/lib/helpers/validator.js","../../node_modules/axios/lib/core/Axios.js","../../node_modules/axios/lib/cancel/CancelToken.js","../../node_modules/axios/lib/helpers/spread.js","../../node_modules/axios/lib/helpers/isAxiosError.js","../../node_modules/axios/lib/helpers/HttpStatusCode.js","../../node_modules/axios/lib/axios.js","../../src/services/authService.ts","../../node_modules/pinia/node_modules/vue-demi/lib/index.mjs","../../node_modules/pinia/dist/pinia.mjs","../../src/stores/authentication.ts","../../src/components/Footer.vue","../../src/models/userProfile.ts","../../src/services/userProfileService.ts","../../src/models/company.ts","../../src/models/trustGroup.ts","../../src/services/trustGroupService.ts","../../src/stores/userProfileStore.ts","../../src/components/custom/AvatarContainer.vue","../../src/components/CompanySelector.vue","../../node_modules/vuetify/lib/composables/toggleScope.mjs","../../node_modules/vuetify/lib/components/VOverlay/util/point.mjs","../../node_modules/vuetify/lib/util/helpers.mjs","../../node_modules/vuetify/lib/util/anchor.mjs","../../node_modules/vuetify/lib/util/box.mjs","../../node_modules/vuetify/lib/util/animation.mjs","../../node_modules/vuetify/lib/util/bindProps.mjs","../../node_modules/vuetify/lib/util/console.mjs","../../node_modules/vuetify/lib/util/color/transformCIELAB.mjs","../../node_modules/vuetify/lib/util/color/transformSRGB.mjs","../../node_modules/vuetify/lib/util/colorUtils.mjs","../../node_modules/vuetify/lib/util/propsFactory.mjs","../../node_modules/vuetify/lib/composables/component.mjs","../../node_modules/vuetify/lib/composables/defaults.mjs","../../node_modules/vuetify/lib/util/defineComponent.mjs","../../node_modules/vuetify/lib/util/createSimpleFunctional.mjs","../../node_modules/vuetify/lib/util/dom.mjs","../../node_modules/vuetify/lib/util/easing.mjs","../../node_modules/vuetify/lib/util/getCurrentInstance.mjs","../../node_modules/vuetify/lib/util/getScrollParent.mjs","../../node_modules/vuetify/lib/util/globals.mjs","../../node_modules/vuetify/lib/util/injectSelf.mjs","../../node_modules/vuetify/lib/util/isFixedPosition.mjs","../../node_modules/vuetify/lib/util/useRender.mjs","../../node_modules/vuetify/lib/components/VOverlay/locationStrategies.mjs","../../node_modules/vuetify/lib/components/VOverlay/requestNewFrame.mjs","../../node_modules/vuetify/lib/components/VOverlay/scrollStrategies.mjs","../../node_modules/vuetify/lib/components/VMenu/shared.mjs","../../node_modules/vuetify/lib/composables/delay.mjs","../../node_modules/vuetify/lib/components/VOverlay/useActivator.mjs","../../node_modules/vuetify/lib/composables/color.mjs","../../node_modules/vuetify/lib/composables/dimensions.mjs","../../node_modules/vuetify/lib/composables/display.mjs","../../node_modules/vuetify/lib/composables/hydration.mjs","../../node_modules/vuetify/lib/composables/lazy.mjs","../../node_modules/vuetify/lib/locale/en.mjs","../../node_modules/vuetify/lib/locale/index.mjs","../../node_modules/vuetify/lib/composables/proxiedModel.mjs","../../node_modules/vuetify/lib/locale/adapters/vuetify.mjs","../../node_modules/vuetify/lib/composables/locale.mjs","../../node_modules/vuetify/lib/composables/router.mjs","../../node_modules/vuetify/lib/composables/scopeId.mjs","../../node_modules/vuetify/lib/composables/stack.mjs","../../node_modules/vuetify/lib/composables/teleport.mjs","../../node_modules/vuetify/lib/util/color/APCA.mjs","../../node_modules/vuetify/lib/composables/theme.mjs","../../node_modules/vuetify/lib/composables/transition.mjs","../../node_modules/vuetify/lib/directives/click-outside/index.mjs","../../node_modules/vuetify/lib/components/VOverlay/VOverlay.mjs","../../node_modules/vuetify/lib/composables/forwardRefs.mjs","../../node_modules/vuetify/lib/components/VTooltip/VTooltip.mjs","../../node_modules/vue-router/dist/vue-router.mjs","../../node_modules/vuetify/lib/components/transitions/createTransition.mjs","../../node_modules/vuetify/lib/components/transitions/expand-transition.mjs","../../node_modules/vuetify/lib/components/transitions/dialog-transition.mjs","../../node_modules/vuetify/lib/components/transitions/index.mjs","../../node_modules/vuetify/lib/components/VDefaultsProvider/VDefaultsProvider.mjs","../../node_modules/vuetify/lib/components/VList/list.mjs","../../node_modules/vuetify/lib/iconsets/mdi.mjs","../../node_modules/vuetify/lib/composables/icons.mjs","../../node_modules/vuetify/lib/composables/nested/openStrategies.mjs","../../node_modules/vuetify/lib/composables/nested/selectStrategies.mjs","../../node_modules/vuetify/lib/composables/nested/nested.mjs","../../node_modules/vuetify/lib/composables/ssrBoot.mjs","../../node_modules/vuetify/lib/composables/tag.mjs","../../node_modules/vuetify/lib/components/VList/VListGroup.mjs","../../node_modules/vuetify/lib/components/VList/VListItemSubtitle.mjs","../../node_modules/vuetify/lib/components/VList/VListItemTitle.mjs","../../node_modules/vuetify/lib/composables/size.mjs","../../node_modules/vuetify/lib/components/VIcon/VIcon.mjs","../../node_modules/vuetify/lib/components/VResponsive/VResponsive.mjs","../../node_modules/vuetify/lib/directives/intersect/index.mjs","../../node_modules/vuetify/lib/components/VImg/VImg.mjs","../../node_modules/vuetify/lib/composables/density.mjs","../../node_modules/vuetify/lib/composables/rounded.mjs","../../node_modules/vuetify/lib/composables/variant.mjs","../../node_modules/vuetify/lib/components/VAvatar/VAvatar.mjs","../../node_modules/vuetify/lib/composables/border.mjs","../../node_modules/vuetify/lib/composables/elevation.mjs","../../node_modules/vuetify/lib/directives/ripple/index.mjs","../../node_modules/vuetify/lib/components/VList/VListItem.mjs","../../node_modules/vuetify/lib/components/VList/VListSubheader.mjs","../../node_modules/vuetify/lib/components/VDivider/VDivider.mjs","../../node_modules/vuetify/lib/components/VList/VListChildren.mjs","../../node_modules/vuetify/lib/composables/list-items.mjs","../../node_modules/vuetify/lib/components/VList/VList.mjs","../../src/components/menu/MenuList.vue","../../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/composables/resizeObserver.mjs","../../node_modules/vuetify/lib/composables/layout.mjs","../../node_modules/vuetify/lib/components/VNavigationDrawer/VNavigationDrawer.mjs","../../src/components/menu/GlobalSideMenu.vue","../../src/stores/trustGroup.ts","../../src/modules/industries.ts","../../src/modules/organisationForms.ts","../../src/services/countriesService.ts","../../src/models/country.ts","../../src/modules/countries.ts","../../src/modules/nationalities.ts","../../src/stores/itemsStore.ts","../../src/modules/utilities.ts","../../src/stores/snackBarStore.ts","../../node_modules/vuetify/lib/components/VBtnGroup/VBtnGroup.mjs","../../node_modules/vuetify/lib/composables/group.mjs","../../node_modules/vuetify/lib/components/VBtnToggle/VBtnToggle.mjs","../../node_modules/vuetify/lib/composables/intersectionObserver.mjs","../../node_modules/vuetify/lib/components/VProgressCircular/VProgressCircular.mjs","../../node_modules/vuetify/lib/composables/location.mjs","../../node_modules/vuetify/lib/components/VProgressLinear/VProgressLinear.mjs","../../node_modules/vuetify/lib/composables/loader.mjs","../../node_modules/vuetify/lib/composables/position.mjs","../../node_modules/vuetify/lib/composables/selectLink.mjs","../../node_modules/vuetify/lib/components/VBtn/VBtn.mjs","../../node_modules/vuetify/lib/components/VSnackbar/VSnackbar.mjs","../../src/components/feedback/GlobalSnackbar.vue","../../node_modules/vuetify/lib/labs/date/adapters/vuetify.mjs","../../node_modules/vuetify/lib/labs/date/date.mjs","../../node_modules/vuetify/lib/framework.mjs","../../node_modules/vuetify/lib/components/VGrid/VContainer.mjs","../../node_modules/vuetify/lib/components/VGrid/VCol.mjs","../../node_modules/vuetify/lib/components/VGrid/VRow.mjs","../../node_modules/vuetify/lib/components/VGrid/VSpacer.mjs","../../src/components/containers/StandardEmptyPageContainer.vue","../../src/plugins/pwc-theme.ts","../../src/components/custom/buttons/PSpinner.vue","../../src/components/custom/buttons/PActionButton.vue","../../src/models/enum/answerStatus.ts","../../src/models/enum/forwardingStatus.ts","../../node_modules/vuetify/lib/components/VCard/VCardActions.mjs","../../node_modules/vuetify/lib/components/VCard/VCardSubtitle.mjs","../../node_modules/vuetify/lib/components/VCard/VCardTitle.mjs","../../node_modules/vuetify/lib/components/VCard/VCardItem.mjs","../../node_modules/vuetify/lib/components/VCard/VCardText.mjs","../../node_modules/vuetify/lib/components/VCard/VCard.mjs","../../src/components/containers/StandardCardContainer.vue","../../src/views/supplier-dashboard-view/PendingRequestsWidget.vue","../../src/models/questionnaire.ts","../../src/services/questionnairesService.ts","../../src/models/receivedQuestionnaires.ts","../../src/stores/questionnaires.ts","../../src/components/custom/LoadingCircle.vue","../../src/components/custom/PIllustrationWithText.vue","../../src/views/supplier-dashboard-view/SupplierDashboard.vue","../../src/services/supplierService.ts","../../src/services/suppliersService.ts","../../src/stores/suppliersStore.ts","../../src/views/HomeView.vue","../../src/views/login-view/LoginFormContainer.vue","../../src/views/login-view/SsoLogin.vue","../../node_modules/vuetify/lib/composables/form.mjs","../../node_modules/vuetify/lib/components/VForm/VForm.mjs","../../node_modules/vuetify/lib/components/VCounter/VCounter.mjs","../../node_modules/vuetify/lib/components/VLabel/VLabel.mjs","../../node_modules/vuetify/lib/components/VField/VFieldLabel.mjs","../../node_modules/vuetify/lib/components/VInput/InputIcon.mjs","../../node_modules/vuetify/lib/composables/focus.mjs","../../node_modules/vuetify/lib/components/VField/VField.mjs","../../node_modules/vuetify/lib/components/VMessages/VMessages.mjs","../../node_modules/vuetify/lib/composables/validation.mjs","../../node_modules/vuetify/lib/components/VInput/VInput.mjs","../../node_modules/vuetify/lib/components/VTextField/VTextField.mjs","../../src/views/login-view/RequestTokenForm.vue","../../src/views/login-view/LoginView.vue","../../src/views/login-link-sent-view/LoginLinkSentView.vue","../../src/models/enum/questionType.ts","../../src/models/questions/address.ts","../../src/components/containers/ReportItemContainer.vue","../../node_modules/vuetify/lib/components/VSelectionControlGroup/VSelectionControlGroup.mjs","../../node_modules/vuetify/lib/components/VSelectionControl/VSelectionControl.mjs","../../node_modules/vuetify/lib/components/VCheckbox/VCheckboxBtn.mjs","../../node_modules/vuetify/lib/components/VChipGroup/VChipGroup.mjs","../../node_modules/vuetify/lib/components/VChip/VChip.mjs","../../node_modules/vuetify/lib/components/VMenu/VMenu.mjs","../../node_modules/vuetify/lib/components/VSelect/VSelect.mjs","../../node_modules/vuetify/lib/composables/filter.mjs","../../node_modules/vuetify/lib/components/VAutocomplete/VAutocomplete.mjs","../../src/components/custom/PAutocomplete.vue","../../src/components/questionnaire/questions/AddressQuestion.vue","../../node_modules/vuetify/lib/components/VDialog/VDialog.mjs","../../src/components/custom/InfoPopup.vue","../../src/components/custom/PCheckBox.vue","../../src/components/custom/PBooleanInput.vue","../../src/models/enum/questionnaireLanguage.ts","../../src/models/enum/questionnaireTemplateCommonItemsId.ts","../../src/models/questions/booleanOption.ts","../../src/models/receivedQuestionnaire.ts","../../src/models/enum/questionnaireTemplateType.ts","../../src/models/dto/questionnaireTemplateInfoDto.ts","../../src/services/questionnaireService.ts","../../src/services/templateService.ts","../../src/stores/selectedQuestionnare.ts","../../src/components/questionnaire/questions/BooleanQuestion.vue","../../src/models/enum/stringBoolean.ts","../../src/models/questions/booleanWithDetails.ts","../../src/components/custom/PInputField.vue","../../src/components/questionnaire/questions/BooleanWithDetailsQuestion.vue","../../node_modules/moment/dist/moment.js","../../src/components/custom/DateInput.vue","../../src/models/questions/certificateModel.ts","../../src/components/questionnaire/questions/CertificatesQuestion.vue","../../src/components/questionnaire/questions/CheckboxQuestion.vue","../../src/models/persons/consentPerson.ts","../../src/components/questionnaire/questions/ConsentQuestion.vue","../../src/components/questionnaire/questions/DateQuestion.vue","../../src/components/questionnaire/questions/InputQuestion.vue","../../src/models/persons/contactPerson.ts","../../src/components/questionnaire/questions/ListOfContactPersonsQuestion.vue","../../src/components/questionnaire/questions/SelectQuestion.vue","../../node_modules/vuetify/lib/components/VTextarea/VTextarea.mjs","../../src/components/questionnaire/questions/TextAreaInputQuestion.vue","../../src/models/questions/checkbox.ts","../../src/components/questionnaire/questions/ListOfCheckboxQuestion.vue","../../src/models/questions/booleanWithMultiSelect.ts","../../src/components/custom/PAutocompleteMulti.vue","../../src/components/questionnaire/TextWithLinks.vue","../../src/components/questionnaire/questions/BooleanWithMultiSelectQuestion.vue","../../src/models/persons/person.ts","../../src/models/persons/keyPersonnel.ts","../../src/components/questionnaire/questionnaireUtils.ts","../../src/components/questionnaire/questions/KeyPersonnelQuestion.vue","../../src/models/persons/beneficialOwner.ts","../../node_modules/vuetify/lib/components/VCombobox/VCombobox.mjs","../../src/components/custom/PCombobox.vue","../../src/components/questionnaire/questions/OwnershipQuestion.vue","../../src/components/custom/PPhoneInput.vue","../../src/components/questionnaire/questions/PhoneQuestion.vue","../../src/models/enum/selectType.ts","../../src/components/questionnaire/questions/MultiselectQuestion.vue","../../src/models/persons/pepRca.ts","../../src/models/persons/individualOwner.ts","../../src/components/questionnaire/questions/OwnershipIndividualQuestion.vue","../../src/models/questions/companyOwner.ts","../../src/components/questionnaire/questions/OwnershipCompanyQuestion.vue","../../src/models/persons/personWithPepAndSanctions.ts","../../src/components/questionnaire/questions/PersonWithPepAndSanctionsQuestion.vue","../../src/components/questionnaire/questions/PersonsWithPepAndSanctionsQuestion.vue","../../src/models/persons/personWithNameAndPosition.ts","../../src/components/questionnaire/questions/PersonsNameAndPositionQuestion.vue","../../src/components/questionnaire/questions/BooleanWithDetailsOnNoQuestion.vue","../../src/models/questions/certificateModelV2.ts","../../src/components/questionnaire/questions/CertificatesQuestionV2.vue","../../src/components/questionnaire/QuestionSelector.vue","../../src/models/dto/questionConditions.ts","../../src/components/questionnaire/QSection.vue","../../node_modules/vuetify/lib/components/VTimeline/VTimeline.mjs","../../node_modules/vuetify/lib/components/VTimeline/VTimelineDivider.mjs","../../node_modules/vuetify/lib/components/VTimeline/VTimelineItem.mjs","../../src/components/custom/QuestionnaireSideMenu.vue","../../src/models/dto/answerSetDto.ts","../../src/services/answersService.ts","../../src/models/questionnaireSideMenuItem.ts","../../src/components/custom/buttons/PDialogCloseButton.vue","../../src/components/custom/PModalBox.vue","../../src/components/questionnaire/QuestionnaireMessageCard.vue","../../src/components/questionnaire/Questionnaire.vue","../../src/views/questionnaire/QuestionnaireView.vue","../../src/views/questionnaires/my-questionnaires/MyQuestionnairesTable.vue","../../src/stores/sender.ts","../../src/views/questionnaires/my-questionnaires/MyQuestionnairesView.vue","../../src/models/questionnaireStatus.ts","../../src/components/custom/QuestionnaireStatusBadge.vue","../../src/views/questionnaires/ReceivedQuestionnairesTable.vue","../../src/views/questionnaires/ReceivedQuestionnairesView.vue","../../node_modules/vuetify/lib/components/VTabs/shared.mjs","../../node_modules/vuetify/lib/components/VTabs/VTab.mjs","../../node_modules/vuetify/lib/components/VSlideGroup/helpers.mjs","../../node_modules/vuetify/lib/components/VSlideGroup/VSlideGroup.mjs","../../node_modules/vuetify/lib/components/VTabs/VTabs.mjs","../../node_modules/vuetify/lib/directives/touch/index.mjs","../../node_modules/vuetify/lib/components/VWindow/VWindow.mjs","../../node_modules/vuetify/lib/components/VWindow/VWindowItem.mjs","../../src/views/questionnaires/QuestionnairesView.vue","../../src/components/widgets/SvgMap.vue","../../src/components/widgets/PMap.vue","../../src/components/custom/buttons/PIconButton.vue","../../src/components/custom/buttons/PTertiaryButton.vue","../../node_modules/vuetify/lib/components/VToolbar/VToolbarTitle.mjs","../../node_modules/vuetify/lib/components/VToolbar/VToolbar.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/VLayout/VLayout.mjs","../../node_modules/vuetify/lib/components/VMain/VMain.mjs","../../src/views/Design/StandardLayoutHelperView.vue","../../src/views/Design/DesignView.vue","../../src/models/supplier.ts","../../node_modules/@vuelidate/core/dist/index.mjs","../../node_modules/@vuelidate/validators/dist/index.mjs","../../src/views/supplier-registry/InputSingleSupplier.vue","../../src/views/supplier-registry/SupplierDialog.vue","../../src/views/supplier-registry/SuppliersTable.vue","../../src/views/supplier-registry/ExportSupplierDialog.vue","../../src/views/supplier-registry/ExportSuppliers.vue","../../src/views/upload-suppliers/DownloadSupplierTemplate.vue","../../src/components/custom/DropZone.vue","../../src/views/upload-suppliers/UploadSupplierTemplate.vue","../../node_modules/vuetify/lib/components/VAlert/VAlertTitle.mjs","../../node_modules/vuetify/lib/components/VAlert/VAlert.mjs","../../src/views/supplier-registry/UploadSuppliersDialog.vue","../../src/views/supplier-registry/SupplierOverview.vue","../../src/views/supplier-registry/SupplierRegistryView.vue","../../src/stores/routerHelper.ts","../../src/stores/reportViewStore.ts","../../src/views/reports/QuestionnaireAnswersView.vue","../../node_modules/vuetify/lib/components/VExpansionPanel/VExpansionPanels.mjs","../../node_modules/vuetify/lib/components/VExpansionPanel/VExpansionPanelText.mjs","../../node_modules/vuetify/lib/components/VExpansionPanel/VExpansionPanelTitle.mjs","../../node_modules/vuetify/lib/components/VExpansionPanel/VExpansionPanel.mjs","../../src/views/template/DisplayQuestionnaire.vue","../../src/views/template/QuestionnaireTemplateView.vue","../../src/views/terms-view/CustomerTermsAndConditions.vue","../../src/services/userProfileAdminService.ts","../../src/views/admin-view/EditUser.vue","../../src/services/trustGroupAdminService.ts","../../src/views/admin-view/TrustGroupSearch.vue","../../src/models/dto/addTrustGroupUserDto.ts","../../src/views/admin-view/LinkTrustGroup.vue","../../src/views/admin-view/UserDisplay.vue","../../src/views/admin-view/CreateUserView.vue","../../src/views/admin-view/ViewUserView.vue","../../src/views/admin-view/EditTrustGroup.vue","../../src/views/admin-view/TrustGroupDisplay.vue","../../src/views/admin-view/ViewTrustGroupView.vue","../../src/services/userProfilesService.ts","../../node_modules/vuetify/lib/components/VTable/VTable.mjs","../../src/views/admin-view/ListLockedUsersView.vue","../../src/views/admin-view/ListAdminUsersView.vue","../../src/models/dto/companyDto.ts","../../src/models/dto/trustGroupDto.ts","../../src/views/admin-view/CreateCustomerView.vue","../../src/services/statsService.ts","../../src/views/admin-view/CustomersOverview.vue","../../src/router/adminRoutes.ts","../../src/services/superUserService.ts","../../src/views/super-user/SuperUserWelcomeView.vue","../../src/router/superUserRoutes.ts","../../src/models/dto/trustGroupUserDto.ts","../../src/components/custom/PPopUpMenu.vue","../../src/views/users/TeamView.vue","../../src/views/dashboard-view/Widget.vue","../../src/models/answerStats.ts","../../src/models/dto/statsDto.ts","../../src/models/dto/flagsDto.ts","../../src/models/enum/riskCategory.ts","../../src/stores/statsStore.ts","../../src/views/dashboard-view/SuppliersWidget.vue","../../src/views/dashboard-view/BusinessPartnersWidget.vue","../../src/views/dashboard-view/SuppliersInChainWidget.vue","../../src/views/dashboard-view/QuestionnaireStatusWidget.vue","../../src/models/enum/indicatorType.ts","../../src/models/indicatorTypesForRiskCategory.ts","../../src/views/dashboard-view/RiskWidget.vue","../../src/views/dashboard-view/RiskWidgets.vue","../../src/views/dashboard-view/RedFlagsWidget.vue","../../src/views/dashboard-view/MapWidget.vue","../../src/views/dashboard-view/SelectQuestionnairesWidget.vue","../../src/components/widgets/HeaderWidget.vue","../../src/views/dashboard-view/DashboardView.vue","../../src/services/emailService.ts","../../src/views/questionnaires/CreateQuestionnaireView.vue","../../src/views/questionnaires/EditQuestionnaireView.vue","../../src/components/containers/ViewContainer.vue","../../src/views/ManagerUserProfileView.vue","../../src/services/distributionService.ts","../../node_modules/@microsoft/signalr/dist/esm/Errors.js","../../node_modules/@microsoft/signalr/dist/esm/HttpClient.js","../../node_modules/@microsoft/signalr/dist/esm/ILogger.js","../../node_modules/@microsoft/signalr/dist/esm/Loggers.js","../../node_modules/@microsoft/signalr/dist/esm/Utils.js","../../node_modules/@microsoft/signalr/dist/esm/FetchHttpClient.js","../../node_modules/@microsoft/signalr/dist/esm/XhrHttpClient.js","../../node_modules/@microsoft/signalr/dist/esm/DefaultHttpClient.js","../../node_modules/@microsoft/signalr/dist/esm/TextMessageFormat.js","../../node_modules/@microsoft/signalr/dist/esm/HandshakeProtocol.js","../../node_modules/@microsoft/signalr/dist/esm/IHubProtocol.js","../../node_modules/@microsoft/signalr/dist/esm/Subject.js","../../node_modules/@microsoft/signalr/dist/esm/HubConnection.js","../../node_modules/@microsoft/signalr/dist/esm/DefaultReconnectPolicy.js","../../node_modules/@microsoft/signalr/dist/esm/HeaderNames.js","../../node_modules/@microsoft/signalr/dist/esm/AccessTokenHttpClient.js","../../node_modules/@microsoft/signalr/dist/esm/ITransport.js","../../node_modules/@microsoft/signalr/dist/esm/AbortController.js","../../node_modules/@microsoft/signalr/dist/esm/LongPollingTransport.js","../../node_modules/@microsoft/signalr/dist/esm/ServerSentEventsTransport.js","../../node_modules/@microsoft/signalr/dist/esm/WebSocketTransport.js","../../node_modules/@microsoft/signalr/dist/esm/HttpConnection.js","../../node_modules/@microsoft/signalr/dist/esm/JsonHubProtocol.js","../../node_modules/@microsoft/signalr/dist/esm/HubConnectionBuilder.js","../../src/components/custom/PDatePicker.vue","../../src/models/enum/distributionStatus.ts","../../src/views/supplier-registry/AddSupplier.vue","../../node_modules/vuetify/lib/components/VFileInput/VFileInput.mjs","../../src/views/supplier-registry/UploadSuppliers.vue","../../src/views/supplier-registry/TemplateDownload.vue","../../src/views/supplier-registry/ImportSupplierDialog.vue","../../src/views/supplier-registry/ImportSuppliers.vue","../../src/views/questionnaires/SelectReceiverCandidates.vue","../../src/views/questionnaires/EmailTextDisplay.vue","../../src/views/questionnaires/ReviewEmailAndReceivers.vue","../../src/views/questionnaires/SendQuestionnaire.vue","../../src/views/questionnaires/SendQuestionnaireView.vue","../../src/components/questionnaire/QuestionnaireHeader.vue","../../src/models/const/languages.ts","../../src/views/questionnaire/StartQuestionnaireView.vue","../../src/models/companyInfo.ts","../../src/models/address.ts","../../src/models/contactInfo.ts","../../src/models/unitProfile.ts","../../src/stores/unitProfileStore.ts","../../src/views/dashboard-view/RiskTypeTabs.vue","../../src/views/dashboard-view/DetailedReasonTable.vue","../../src/views/dashboard-view/DetailedReasonOverview.vue","../../src/views/dashboard-view/DetailedRiskPageView.vue","../../src/views/unit-profile/UnitProfileFlagWidgets.vue","../../src/views/unit-profile/QuestionnaireResponsesWidget.vue","../../src/views/unit-profile/UnitProfileView.vue","../../src/components/questionnaire/AnswerStatusText.vue","../../src/views/questionnaires/ReceivedQuestionnaireStatusView.vue","../../src/components/custom/CharacterInCircle.vue","../../src/views/questionnaires/my-questionnaires/RecipientsCard.vue","../../src/views/questionnaires/my-questionnaires/MyQuestionnaireStatusView.vue","../../src/services/companyService.ts","../../src/views/register-supplier/RegisterCompanyView.vue","../../src/views/register-supplier/AddColleaguesView.vue","../../src/views/help-view/HelpTexts.vue","../../src/views/register-supplier/WelcomeView.vue","../../src/router/registerSupplierRoutes.ts","../../src/views/help-view/HelpView.vue","../../src/router/helpRoutes.ts","../../src/views/upload-suppliers/AddSuppliersManually.vue","../../src/views/upload-suppliers/UploadSuppliers.vue","../../src/views/questionnaire/UploadSuppliersQuestionnaireView.vue","../../src/views/questionnaire/ForwardQuestionnaireView.vue","../../node_modules/vuetify/lib/components/VRadio/VRadio.mjs","../../node_modules/vuetify/lib/components/VRadioGroup/VRadioGroup.mjs","../../src/views/questionnaire/ReuseAnswersView.vue","../../src/views/login-view/LoggedOutView.vue","../../src/views/login-view/LoginTokenExpiredView.vue","../../src/views/login-view/VerifyLinkView.vue","../../src/router/index.ts","../../src/components/header/UserMenu.vue","../../src/components/header/Header.vue","../../node_modules/vuetify/lib/components/VApp/VApp.mjs","../../src/components/containers/PageContainer.vue","../../src/components/containers/PublicPageContainer.vue","../../src/components/containers/LoginPageContainer.vue","../../src/App.vue","../../src/plugins/vuetify.ts","../../node_modules/@oruga-ui/oruga-next/dist/esm/helpers.mjs","../../node_modules/@oruga-ui/oruga-next/dist/esm/config.mjs","../../node_modules/@oruga-ui/oruga-next/dist/esm/plugins-ba5e2464.mjs","../../node_modules/@oruga-ui/oruga-next/dist/esm/Icon-a7b85e86.mjs","../../node_modules/@oruga-ui/oruga-next/dist/esm/FormElementMixin-29581863.mjs","../../node_modules/@oruga-ui/oruga-next/dist/esm/Input-19e906a1.mjs","../../node_modules/@oruga-ui/oruga-next/dist/esm/Autocomplete-a23ad844.mjs","../../node_modules/@oruga-ui/oruga-next/dist/esm/autocomplete.mjs","../../node_modules/@oruga-ui/oruga-next/dist/esm/Button-c75f7992.mjs","../../node_modules/@oruga-ui/oruga-next/dist/esm/button.mjs","../../node_modules/@oruga-ui/oruga-next/dist/esm/InjectedChildMixin-5282461d.mjs","../../node_modules/@oruga-ui/oruga-next/dist/esm/carousel.mjs","../../node_modules/@oruga-ui/oruga-next/dist/esm/CheckRadioMixin-f5b57344.mjs","../../node_modules/@oruga-ui/oruga-next/dist/esm/Checkbox-8670724c.mjs","../../node_modules/@oruga-ui/oruga-next/dist/esm/checkbox.mjs","../../node_modules/@oruga-ui/oruga-next/dist/esm/collapse.mjs","../../node_modules/@oruga-ui/oruga-next/dist/esm/MatchMediaMixin-09b141ca.mjs","../../node_modules/@oruga-ui/oruga-next/dist/esm/trapFocus-dc03669f.mjs","../../node_modules/@oruga-ui/oruga-next/dist/esm/DropdownItem-c744c4e9.mjs","../../node_modules/@oruga-ui/oruga-next/dist/esm/Field-937b4591.mjs","../../node_modules/@oruga-ui/oruga-next/dist/esm/Select-2cca695f.mjs","../../node_modules/@oruga-ui/oruga-next/dist/esm/Datepicker-42aca091.mjs","../../node_modules/@oruga-ui/oruga-next/dist/esm/datepicker.mjs","../../node_modules/@oruga-ui/oruga-next/dist/esm/Timepicker-c2f10909.mjs","../../node_modules/@oruga-ui/oruga-next/dist/esm/datetimepicker.mjs","../../node_modules/@oruga-ui/oruga-next/dist/esm/dropdown.mjs","../../node_modules/@oruga-ui/oruga-next/dist/esm/field.mjs","../../node_modules/@oruga-ui/oruga-next/dist/esm/icon.mjs","../../node_modules/@oruga-ui/oruga-next/dist/esm/input.mjs","../../node_modules/@oruga-ui/oruga-next/dist/esm/inputitems.mjs","../../node_modules/@oruga-ui/oruga-next/dist/esm/ssr-85c76d50.mjs","../../node_modules/@oruga-ui/oruga-next/dist/esm/Loading-20d29914.mjs","../../node_modules/@oruga-ui/oruga-next/dist/esm/InstanceRegistry-2fdb6ee8.mjs","../../node_modules/@oruga-ui/oruga-next/dist/esm/loading.mjs","../../node_modules/@oruga-ui/oruga-next/dist/esm/menu.mjs","../../node_modules/@oruga-ui/oruga-next/dist/esm/modal.mjs","../../node_modules/@oruga-ui/oruga-next/dist/esm/notification.mjs","../../node_modules/@oruga-ui/oruga-next/dist/esm/Pagination-02a660a8.mjs","../../node_modules/@oruga-ui/oruga-next/dist/esm/pagination.mjs","../../node_modules/@oruga-ui/oruga-next/dist/esm/radio.mjs","../../node_modules/@oruga-ui/oruga-next/dist/esm/select.mjs","../../node_modules/@oruga-ui/oruga-next/dist/esm/skeleton.mjs","../../node_modules/@oruga-ui/oruga-next/dist/esm/sidebar.mjs","../../node_modules/@oruga-ui/oruga-next/dist/esm/Tooltip-7e114fbb.mjs","../../node_modules/@oruga-ui/oruga-next/dist/esm/slider.mjs","../../node_modules/@oruga-ui/oruga-next/dist/esm/SlotComponent-11a269f3.mjs","../../node_modules/@oruga-ui/oruga-next/dist/esm/TabbedChildMixin-8b374962.mjs","../../node_modules/@oruga-ui/oruga-next/dist/esm/steps.mjs","../../node_modules/@oruga-ui/oruga-next/dist/esm/switch.mjs","../../node_modules/@oruga-ui/oruga-next/dist/esm/table.mjs","../../node_modules/@oruga-ui/oruga-next/dist/esm/tabs.mjs","../../node_modules/@oruga-ui/oruga-next/dist/esm/timepicker.mjs","../../node_modules/@oruga-ui/oruga-next/dist/esm/tooltip.mjs","../../node_modules/@oruga-ui/oruga-next/dist/esm/upload.mjs","../../node_modules/@oruga-ui/oruga-next/dist/esm/index.mjs","../../node_modules/dompurify/dist/purify.es.js","../../node_modules/vue-dompurify-html/dist/vue-dompurify-html.mjs","../../src/main.ts"],"sourcesContent":["function makeMap(str, expectsLowerCase) {\n const map = /* @__PURE__ */ Object.create(null);\n const list = str.split(\",\");\n for (let i = 0; i < list.length; i++) {\n map[list[i]] = true;\n }\n return expectsLowerCase ? (val) => !!map[val.toLowerCase()] : (val) => !!map[val];\n}\n\nconst EMPTY_OBJ = !!(process.env.NODE_ENV !== \"production\") ? Object.freeze({}) : {};\nconst EMPTY_ARR = !!(process.env.NODE_ENV !== \"production\") ? Object.freeze([]) : [];\nconst NOOP = () => {\n};\nconst NO = () => false;\nconst onRE = /^on[^a-z]/;\nconst isOn = (key) => onRE.test(key);\nconst isModelListener = (key) => key.startsWith(\"onUpdate:\");\nconst extend = Object.assign;\nconst remove = (arr, el) => {\n const i = arr.indexOf(el);\n if (i > -1) {\n arr.splice(i, 1);\n }\n};\nconst hasOwnProperty = Object.prototype.hasOwnProperty;\nconst hasOwn = (val, key) => hasOwnProperty.call(val, key);\nconst isArray = Array.isArray;\nconst isMap = (val) => toTypeString(val) === \"[object Map]\";\nconst isSet = (val) => toTypeString(val) === \"[object Set]\";\nconst isDate = (val) => toTypeString(val) === \"[object Date]\";\nconst isRegExp = (val) => toTypeString(val) === \"[object RegExp]\";\nconst isFunction = (val) => typeof val === \"function\";\nconst isString = (val) => typeof val === \"string\";\nconst isSymbol = (val) => typeof val === \"symbol\";\nconst isObject = (val) => val !== null && typeof val === \"object\";\nconst isPromise = (val) => {\n return isObject(val) && isFunction(val.then) && isFunction(val.catch);\n};\nconst objectToString = Object.prototype.toString;\nconst toTypeString = (value) => objectToString.call(value);\nconst toRawType = (value) => {\n return toTypeString(value).slice(8, -1);\n};\nconst isPlainObject = (val) => toTypeString(val) === \"[object Object]\";\nconst isIntegerKey = (key) => isString(key) && key !== \"NaN\" && key[0] !== \"-\" && \"\" + parseInt(key, 10) === key;\nconst isReservedProp = /* @__PURE__ */ makeMap(\n // the leading comma is intentional so empty string \"\" is also included\n \",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted\"\n);\nconst isBuiltInDirective = /* @__PURE__ */ makeMap(\n \"bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo\"\n);\nconst cacheStringFunction = (fn) => {\n const cache = /* @__PURE__ */ Object.create(null);\n return (str) => {\n const hit = cache[str];\n return hit || (cache[str] = fn(str));\n };\n};\nconst camelizeRE = /-(\\w)/g;\nconst camelize = cacheStringFunction((str) => {\n return str.replace(camelizeRE, (_, c) => c ? c.toUpperCase() : \"\");\n});\nconst hyphenateRE = /\\B([A-Z])/g;\nconst hyphenate = cacheStringFunction(\n (str) => str.replace(hyphenateRE, \"-$1\").toLowerCase()\n);\nconst capitalize = cacheStringFunction(\n (str) => str.charAt(0).toUpperCase() + str.slice(1)\n);\nconst toHandlerKey = cacheStringFunction(\n (str) => str ? `on${capitalize(str)}` : ``\n);\nconst hasChanged = (value, oldValue) => !Object.is(value, oldValue);\nconst invokeArrayFns = (fns, arg) => {\n for (let i = 0; i < fns.length; i++) {\n fns[i](arg);\n }\n};\nconst def = (obj, key, value) => {\n Object.defineProperty(obj, key, {\n configurable: true,\n enumerable: false,\n value\n });\n};\nconst looseToNumber = (val) => {\n const n = parseFloat(val);\n return isNaN(n) ? val : n;\n};\nconst toNumber = (val) => {\n const n = isString(val) ? Number(val) : NaN;\n return isNaN(n) ? val : n;\n};\nlet _globalThis;\nconst getGlobalThis = () => {\n return _globalThis || (_globalThis = typeof globalThis !== \"undefined\" ? globalThis : typeof self !== \"undefined\" ? self : typeof window !== \"undefined\" ? window : typeof global !== \"undefined\" ? global : {});\n};\nconst identRE = /^[_$a-zA-Z\\xA0-\\uFFFF][_$a-zA-Z0-9\\xA0-\\uFFFF]*$/;\nfunction genPropsAccessExp(name) {\n return identRE.test(name) ? `__props.${name}` : `__props[${JSON.stringify(name)}]`;\n}\n\nconst PatchFlagNames = {\n [1]: `TEXT`,\n [2]: `CLASS`,\n [4]: `STYLE`,\n [8]: `PROPS`,\n [16]: `FULL_PROPS`,\n [32]: `HYDRATE_EVENTS`,\n [64]: `STABLE_FRAGMENT`,\n [128]: `KEYED_FRAGMENT`,\n [256]: `UNKEYED_FRAGMENT`,\n [512]: `NEED_PATCH`,\n [1024]: `DYNAMIC_SLOTS`,\n [2048]: `DEV_ROOT_FRAGMENT`,\n [-1]: `HOISTED`,\n [-2]: `BAIL`\n};\n\nconst slotFlagsText = {\n [1]: \"STABLE\",\n [2]: \"DYNAMIC\",\n [3]: \"FORWARDED\"\n};\n\nconst GLOBALS_WHITE_LISTED = \"Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console\";\nconst isGloballyWhitelisted = /* @__PURE__ */ makeMap(GLOBALS_WHITE_LISTED);\n\nconst range = 2;\nfunction generateCodeFrame(source, start = 0, end = source.length) {\n let lines = source.split(/(\\r?\\n)/);\n const newlineSequences = lines.filter((_, idx) => idx % 2 === 1);\n lines = lines.filter((_, idx) => idx % 2 === 0);\n let count = 0;\n const res = [];\n for (let i = 0; i < lines.length; i++) {\n count += lines[i].length + (newlineSequences[i] && newlineSequences[i].length || 0);\n if (count >= start) {\n for (let j = i - range; j <= i + range || end > count; j++) {\n if (j < 0 || j >= lines.length)\n continue;\n const line = j + 1;\n res.push(\n `${line}${\" \".repeat(Math.max(3 - String(line).length, 0))}| ${lines[j]}`\n );\n const lineLength = lines[j].length;\n const newLineSeqLength = newlineSequences[j] && newlineSequences[j].length || 0;\n if (j === i) {\n const pad = start - (count - (lineLength + newLineSeqLength));\n const length = Math.max(\n 1,\n end > count ? lineLength - pad : end - start\n );\n res.push(` | ` + \" \".repeat(pad) + \"^\".repeat(length));\n } else if (j > i) {\n if (end > count) {\n const length = Math.max(Math.min(end - count, lineLength), 1);\n res.push(` | ` + \"^\".repeat(length));\n }\n count += lineLength + newLineSeqLength;\n }\n }\n break;\n }\n }\n return res.join(\"\\n\");\n}\n\nfunction normalizeStyle(value) {\n if (isArray(value)) {\n const res = {};\n for (let i = 0; i < value.length; i++) {\n const item = value[i];\n const normalized = isString(item) ? parseStringStyle(item) : normalizeStyle(item);\n if (normalized) {\n for (const key in normalized) {\n res[key] = normalized[key];\n }\n }\n }\n return res;\n } else if (isString(value)) {\n return value;\n } else if (isObject(value)) {\n return value;\n }\n}\nconst listDelimiterRE = /;(?![^(]*\\))/g;\nconst propertyDelimiterRE = /:([^]+)/;\nconst styleCommentRE = /\\/\\*[^]*?\\*\\//g;\nfunction parseStringStyle(cssText) {\n const ret = {};\n cssText.replace(styleCommentRE, \"\").split(listDelimiterRE).forEach((item) => {\n if (item) {\n const tmp = item.split(propertyDelimiterRE);\n tmp.length > 1 && (ret[tmp[0].trim()] = tmp[1].trim());\n }\n });\n return ret;\n}\nfunction stringifyStyle(styles) {\n let ret = \"\";\n if (!styles || isString(styles)) {\n return ret;\n }\n for (const key in styles) {\n const value = styles[key];\n const normalizedKey = key.startsWith(`--`) ? key : hyphenate(key);\n if (isString(value) || typeof value === \"number\") {\n ret += `${normalizedKey}:${value};`;\n }\n }\n return ret;\n}\nfunction normalizeClass(value) {\n let res = \"\";\n if (isString(value)) {\n res = value;\n } else if (isArray(value)) {\n for (let i = 0; i < value.length; i++) {\n const normalized = normalizeClass(value[i]);\n if (normalized) {\n res += normalized + \" \";\n }\n }\n } else if (isObject(value)) {\n for (const name in value) {\n if (value[name]) {\n res += name + \" \";\n }\n }\n }\n return res.trim();\n}\nfunction normalizeProps(props) {\n if (!props)\n return null;\n let { class: klass, style } = props;\n if (klass && !isString(klass)) {\n props.class = normalizeClass(klass);\n }\n if (style) {\n props.style = normalizeStyle(style);\n }\n return props;\n}\n\nconst HTML_TAGS = \"html,body,base,head,link,meta,style,title,address,article,aside,footer,header,hgroup,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,summary,template,blockquote,iframe,tfoot\";\nconst SVG_TAGS = \"svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,defs,desc,discard,ellipse,feBlend,feColorMatrix,feComponentTransfer,feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,feDistantLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,filter,foreignObject,g,hatch,hatchpath,image,line,linearGradient,marker,mask,mesh,meshgradient,meshpatch,meshrow,metadata,mpath,path,pattern,polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,text,textPath,title,tspan,unknown,use,view\";\nconst VOID_TAGS = \"area,base,br,col,embed,hr,img,input,link,meta,param,source,track,wbr\";\nconst isHTMLTag = /* @__PURE__ */ makeMap(HTML_TAGS);\nconst isSVGTag = /* @__PURE__ */ makeMap(SVG_TAGS);\nconst isVoidTag = /* @__PURE__ */ makeMap(VOID_TAGS);\n\nconst specialBooleanAttrs = `itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly`;\nconst isSpecialBooleanAttr = /* @__PURE__ */ makeMap(specialBooleanAttrs);\nconst isBooleanAttr = /* @__PURE__ */ makeMap(\n specialBooleanAttrs + `,async,autofocus,autoplay,controls,default,defer,disabled,hidden,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected`\n);\nfunction includeBooleanAttr(value) {\n return !!value || value === \"\";\n}\nconst unsafeAttrCharRE = /[>/=\"'\\u0009\\u000a\\u000c\\u0020]/;\nconst attrValidationCache = {};\nfunction isSSRSafeAttrName(name) {\n if (attrValidationCache.hasOwnProperty(name)) {\n return attrValidationCache[name];\n }\n const isUnsafe = unsafeAttrCharRE.test(name);\n if (isUnsafe) {\n console.error(`unsafe attribute name: ${name}`);\n }\n return attrValidationCache[name] = !isUnsafe;\n}\nconst propsToAttrMap = {\n acceptCharset: \"accept-charset\",\n className: \"class\",\n htmlFor: \"for\",\n httpEquiv: \"http-equiv\"\n};\nconst isKnownHtmlAttr = /* @__PURE__ */ makeMap(\n `accept,accept-charset,accesskey,action,align,allow,alt,async,autocapitalize,autocomplete,autofocus,autoplay,background,bgcolor,border,buffered,capture,challenge,charset,checked,cite,class,code,codebase,color,cols,colspan,content,contenteditable,contextmenu,controls,coords,crossorigin,csp,data,datetime,decoding,default,defer,dir,dirname,disabled,download,draggable,dropzone,enctype,enterkeyhint,for,form,formaction,formenctype,formmethod,formnovalidate,formtarget,headers,height,hidden,high,href,hreflang,http-equiv,icon,id,importance,inert,integrity,ismap,itemprop,keytype,kind,label,lang,language,loading,list,loop,low,manifest,max,maxlength,minlength,media,min,multiple,muted,name,novalidate,open,optimum,pattern,ping,placeholder,poster,preload,radiogroup,readonly,referrerpolicy,rel,required,reversed,rows,rowspan,sandbox,scope,scoped,selected,shape,size,sizes,slot,span,spellcheck,src,srcdoc,srclang,srcset,start,step,style,summary,tabindex,target,title,translate,type,usemap,value,width,wrap`\n);\nconst isKnownSvgAttr = /* @__PURE__ */ makeMap(\n `xmlns,accent-height,accumulate,additive,alignment-baseline,alphabetic,amplitude,arabic-form,ascent,attributeName,attributeType,azimuth,baseFrequency,baseline-shift,baseProfile,bbox,begin,bias,by,calcMode,cap-height,class,clip,clipPathUnits,clip-path,clip-rule,color,color-interpolation,color-interpolation-filters,color-profile,color-rendering,contentScriptType,contentStyleType,crossorigin,cursor,cx,cy,d,decelerate,descent,diffuseConstant,direction,display,divisor,dominant-baseline,dur,dx,dy,edgeMode,elevation,enable-background,end,exponent,fill,fill-opacity,fill-rule,filter,filterRes,filterUnits,flood-color,flood-opacity,font-family,font-size,font-size-adjust,font-stretch,font-style,font-variant,font-weight,format,from,fr,fx,fy,g1,g2,glyph-name,glyph-orientation-horizontal,glyph-orientation-vertical,glyphRef,gradientTransform,gradientUnits,hanging,height,href,hreflang,horiz-adv-x,horiz-origin-x,id,ideographic,image-rendering,in,in2,intercept,k,k1,k2,k3,k4,kernelMatrix,kernelUnitLength,kerning,keyPoints,keySplines,keyTimes,lang,lengthAdjust,letter-spacing,lighting-color,limitingConeAngle,local,marker-end,marker-mid,marker-start,markerHeight,markerUnits,markerWidth,mask,maskContentUnits,maskUnits,mathematical,max,media,method,min,mode,name,numOctaves,offset,opacity,operator,order,orient,orientation,origin,overflow,overline-position,overline-thickness,panose-1,paint-order,path,pathLength,patternContentUnits,patternTransform,patternUnits,ping,pointer-events,points,pointsAtX,pointsAtY,pointsAtZ,preserveAlpha,preserveAspectRatio,primitiveUnits,r,radius,referrerPolicy,refX,refY,rel,rendering-intent,repeatCount,repeatDur,requiredExtensions,requiredFeatures,restart,result,rotate,rx,ry,scale,seed,shape-rendering,slope,spacing,specularConstant,specularExponent,speed,spreadMethod,startOffset,stdDeviation,stemh,stemv,stitchTiles,stop-color,stop-opacity,strikethrough-position,strikethrough-thickness,string,stroke,stroke-dasharray,stroke-dashoffset,stroke-linecap,stroke-linejoin,stroke-miterlimit,stroke-opacity,stroke-width,style,surfaceScale,systemLanguage,tabindex,tableValues,target,targetX,targetY,text-anchor,text-decoration,text-rendering,textLength,to,transform,transform-origin,type,u1,u2,underline-position,underline-thickness,unicode,unicode-bidi,unicode-range,units-per-em,v-alphabetic,v-hanging,v-ideographic,v-mathematical,values,vector-effect,version,vert-adv-y,vert-origin-x,vert-origin-y,viewBox,viewTarget,visibility,width,widths,word-spacing,writing-mode,x,x-height,x1,x2,xChannelSelector,xlink:actuate,xlink:arcrole,xlink:href,xlink:role,xlink:show,xlink:title,xlink:type,xml:base,xml:lang,xml:space,y,y1,y2,yChannelSelector,z,zoomAndPan`\n);\n\nconst escapeRE = /[\"'&<>]/;\nfunction escapeHtml(string) {\n const str = \"\" + string;\n const match = escapeRE.exec(str);\n if (!match) {\n return str;\n }\n let html = \"\";\n let escaped;\n let index;\n let lastIndex = 0;\n for (index = match.index; index < str.length; index++) {\n switch (str.charCodeAt(index)) {\n case 34:\n escaped = \""\";\n break;\n case 38:\n escaped = \"&\";\n break;\n case 39:\n escaped = \"'\";\n break;\n case 60:\n escaped = \"<\";\n break;\n case 62:\n escaped = \">\";\n break;\n default:\n continue;\n }\n if (lastIndex !== index) {\n html += str.slice(lastIndex, index);\n }\n lastIndex = index + 1;\n html += escaped;\n }\n return lastIndex !== index ? html + str.slice(lastIndex, index) : html;\n}\nconst commentStripRE = /^-?>||--!>| looseEqual(item, val));\n}\n\nconst toDisplayString = (val) => {\n return isString(val) ? val : val == null ? \"\" : isArray(val) || isObject(val) && (val.toString === objectToString || !isFunction(val.toString)) ? JSON.stringify(val, replacer, 2) : String(val);\n};\nconst replacer = (_key, val) => {\n if (val && val.__v_isRef) {\n return replacer(_key, val.value);\n } else if (isMap(val)) {\n return {\n [`Map(${val.size})`]: [...val.entries()].reduce((entries, [key, val2]) => {\n entries[`${key} =>`] = val2;\n return entries;\n }, {})\n };\n } else if (isSet(val)) {\n return {\n [`Set(${val.size})`]: [...val.values()]\n };\n } else if (isObject(val) && !isArray(val) && !isPlainObject(val)) {\n return String(val);\n }\n return val;\n};\n\nexport { EMPTY_ARR, EMPTY_OBJ, NO, NOOP, PatchFlagNames, camelize, capitalize, def, escapeHtml, escapeHtmlComment, extend, genPropsAccessExp, generateCodeFrame, getGlobalThis, hasChanged, hasOwn, hyphenate, includeBooleanAttr, invokeArrayFns, isArray, isBooleanAttr, isBuiltInDirective, isDate, isFunction, isGloballyWhitelisted, isHTMLTag, isIntegerKey, isKnownHtmlAttr, isKnownSvgAttr, isMap, isModelListener, isObject, isOn, isPlainObject, isPromise, isRegExp, isReservedProp, isSSRSafeAttrName, isSVGTag, isSet, isSpecialBooleanAttr, isString, isSymbol, isVoidTag, looseEqual, looseIndexOf, looseToNumber, makeMap, normalizeClass, normalizeProps, normalizeStyle, objectToString, parseStringStyle, propsToAttrMap, remove, slotFlagsText, stringifyStyle, toDisplayString, toHandlerKey, toNumber, toRawType, toTypeString };\n","import { extend, isArray, isMap, isIntegerKey, hasOwn, isSymbol, isObject, hasChanged, makeMap, capitalize, toRawType, def, isFunction, NOOP } from '@vue/shared';\n\nfunction warn(msg, ...args) {\n console.warn(`[Vue warn] ${msg}`, ...args);\n}\n\nlet activeEffectScope;\nclass EffectScope {\n constructor(detached = false) {\n this.detached = detached;\n /**\n * @internal\n */\n this._active = true;\n /**\n * @internal\n */\n this.effects = [];\n /**\n * @internal\n */\n this.cleanups = [];\n this.parent = activeEffectScope;\n if (!detached && activeEffectScope) {\n this.index = (activeEffectScope.scopes || (activeEffectScope.scopes = [])).push(\n this\n ) - 1;\n }\n }\n get active() {\n return this._active;\n }\n run(fn) {\n if (this._active) {\n const currentEffectScope = activeEffectScope;\n try {\n activeEffectScope = this;\n return fn();\n } finally {\n activeEffectScope = currentEffectScope;\n }\n } else if (!!(process.env.NODE_ENV !== \"production\")) {\n warn(`cannot run an inactive effect scope.`);\n }\n }\n /**\n * This should only be called on non-detached scopes\n * @internal\n */\n on() {\n activeEffectScope = this;\n }\n /**\n * This should only be called on non-detached scopes\n * @internal\n */\n off() {\n activeEffectScope = this.parent;\n }\n stop(fromParent) {\n if (this._active) {\n let i, l;\n for (i = 0, l = this.effects.length; i < l; i++) {\n this.effects[i].stop();\n }\n for (i = 0, l = this.cleanups.length; i < l; i++) {\n this.cleanups[i]();\n }\n if (this.scopes) {\n for (i = 0, l = this.scopes.length; i < l; i++) {\n this.scopes[i].stop(true);\n }\n }\n if (!this.detached && this.parent && !fromParent) {\n const last = this.parent.scopes.pop();\n if (last && last !== this) {\n this.parent.scopes[this.index] = last;\n last.index = this.index;\n }\n }\n this.parent = void 0;\n this._active = false;\n }\n }\n}\nfunction effectScope(detached) {\n return new EffectScope(detached);\n}\nfunction recordEffectScope(effect, scope = activeEffectScope) {\n if (scope && scope.active) {\n scope.effects.push(effect);\n }\n}\nfunction getCurrentScope() {\n return activeEffectScope;\n}\nfunction onScopeDispose(fn) {\n if (activeEffectScope) {\n activeEffectScope.cleanups.push(fn);\n } else if (!!(process.env.NODE_ENV !== \"production\")) {\n warn(\n `onScopeDispose() is called when there is no active effect scope to be associated with.`\n );\n }\n}\n\nconst createDep = (effects) => {\n const dep = new Set(effects);\n dep.w = 0;\n dep.n = 0;\n return dep;\n};\nconst wasTracked = (dep) => (dep.w & trackOpBit) > 0;\nconst newTracked = (dep) => (dep.n & trackOpBit) > 0;\nconst initDepMarkers = ({ deps }) => {\n if (deps.length) {\n for (let i = 0; i < deps.length; i++) {\n deps[i].w |= trackOpBit;\n }\n }\n};\nconst finalizeDepMarkers = (effect) => {\n const { deps } = effect;\n if (deps.length) {\n let ptr = 0;\n for (let i = 0; i < deps.length; i++) {\n const dep = deps[i];\n if (wasTracked(dep) && !newTracked(dep)) {\n dep.delete(effect);\n } else {\n deps[ptr++] = dep;\n }\n dep.w &= ~trackOpBit;\n dep.n &= ~trackOpBit;\n }\n deps.length = ptr;\n }\n};\n\nconst targetMap = /* @__PURE__ */ new WeakMap();\nlet effectTrackDepth = 0;\nlet trackOpBit = 1;\nconst maxMarkerBits = 30;\nlet activeEffect;\nconst ITERATE_KEY = Symbol(!!(process.env.NODE_ENV !== \"production\") ? \"iterate\" : \"\");\nconst MAP_KEY_ITERATE_KEY = Symbol(!!(process.env.NODE_ENV !== \"production\") ? \"Map key iterate\" : \"\");\nclass ReactiveEffect {\n constructor(fn, scheduler = null, scope) {\n this.fn = fn;\n this.scheduler = scheduler;\n this.active = true;\n this.deps = [];\n this.parent = void 0;\n recordEffectScope(this, scope);\n }\n run() {\n if (!this.active) {\n return this.fn();\n }\n let parent = activeEffect;\n let lastShouldTrack = shouldTrack;\n while (parent) {\n if (parent === this) {\n return;\n }\n parent = parent.parent;\n }\n try {\n this.parent = activeEffect;\n activeEffect = this;\n shouldTrack = true;\n trackOpBit = 1 << ++effectTrackDepth;\n if (effectTrackDepth <= maxMarkerBits) {\n initDepMarkers(this);\n } else {\n cleanupEffect(this);\n }\n return this.fn();\n } finally {\n if (effectTrackDepth <= maxMarkerBits) {\n finalizeDepMarkers(this);\n }\n trackOpBit = 1 << --effectTrackDepth;\n activeEffect = this.parent;\n shouldTrack = lastShouldTrack;\n this.parent = void 0;\n if (this.deferStop) {\n this.stop();\n }\n }\n }\n stop() {\n if (activeEffect === this) {\n this.deferStop = true;\n } else if (this.active) {\n cleanupEffect(this);\n if (this.onStop) {\n this.onStop();\n }\n this.active = false;\n }\n }\n}\nfunction cleanupEffect(effect2) {\n const { deps } = effect2;\n if (deps.length) {\n for (let i = 0; i < deps.length; i++) {\n deps[i].delete(effect2);\n }\n deps.length = 0;\n }\n}\nfunction effect(fn, options) {\n if (fn.effect) {\n fn = fn.effect.fn;\n }\n const _effect = new ReactiveEffect(fn);\n if (options) {\n extend(_effect, options);\n if (options.scope)\n recordEffectScope(_effect, options.scope);\n }\n if (!options || !options.lazy) {\n _effect.run();\n }\n const runner = _effect.run.bind(_effect);\n runner.effect = _effect;\n return runner;\n}\nfunction stop(runner) {\n runner.effect.stop();\n}\nlet shouldTrack = true;\nconst trackStack = [];\nfunction pauseTracking() {\n trackStack.push(shouldTrack);\n shouldTrack = false;\n}\nfunction enableTracking() {\n trackStack.push(shouldTrack);\n shouldTrack = true;\n}\nfunction resetTracking() {\n const last = trackStack.pop();\n shouldTrack = last === void 0 ? true : last;\n}\nfunction track(target, type, key) {\n if (shouldTrack && activeEffect) {\n let depsMap = targetMap.get(target);\n if (!depsMap) {\n targetMap.set(target, depsMap = /* @__PURE__ */ new Map());\n }\n let dep = depsMap.get(key);\n if (!dep) {\n depsMap.set(key, dep = createDep());\n }\n const eventInfo = !!(process.env.NODE_ENV !== \"production\") ? { effect: activeEffect, target, type, key } : void 0;\n trackEffects(dep, eventInfo);\n }\n}\nfunction trackEffects(dep, debuggerEventExtraInfo) {\n let shouldTrack2 = false;\n if (effectTrackDepth <= maxMarkerBits) {\n if (!newTracked(dep)) {\n dep.n |= trackOpBit;\n shouldTrack2 = !wasTracked(dep);\n }\n } else {\n shouldTrack2 = !dep.has(activeEffect);\n }\n if (shouldTrack2) {\n dep.add(activeEffect);\n activeEffect.deps.push(dep);\n if (!!(process.env.NODE_ENV !== \"production\") && activeEffect.onTrack) {\n activeEffect.onTrack(\n extend(\n {\n effect: activeEffect\n },\n debuggerEventExtraInfo\n )\n );\n }\n }\n}\nfunction trigger(target, type, key, newValue, oldValue, oldTarget) {\n const depsMap = targetMap.get(target);\n if (!depsMap) {\n return;\n }\n let deps = [];\n if (type === \"clear\") {\n deps = [...depsMap.values()];\n } else if (key === \"length\" && isArray(target)) {\n const newLength = Number(newValue);\n depsMap.forEach((dep, key2) => {\n if (key2 === \"length\" || key2 >= newLength) {\n deps.push(dep);\n }\n });\n } else {\n if (key !== void 0) {\n deps.push(depsMap.get(key));\n }\n switch (type) {\n case \"add\":\n if (!isArray(target)) {\n deps.push(depsMap.get(ITERATE_KEY));\n if (isMap(target)) {\n deps.push(depsMap.get(MAP_KEY_ITERATE_KEY));\n }\n } else if (isIntegerKey(key)) {\n deps.push(depsMap.get(\"length\"));\n }\n break;\n case \"delete\":\n if (!isArray(target)) {\n deps.push(depsMap.get(ITERATE_KEY));\n if (isMap(target)) {\n deps.push(depsMap.get(MAP_KEY_ITERATE_KEY));\n }\n }\n break;\n case \"set\":\n if (isMap(target)) {\n deps.push(depsMap.get(ITERATE_KEY));\n }\n break;\n }\n }\n const eventInfo = !!(process.env.NODE_ENV !== \"production\") ? { target, type, key, newValue, oldValue, oldTarget } : void 0;\n if (deps.length === 1) {\n if (deps[0]) {\n if (!!(process.env.NODE_ENV !== \"production\")) {\n triggerEffects(deps[0], eventInfo);\n } else {\n triggerEffects(deps[0]);\n }\n }\n } else {\n const effects = [];\n for (const dep of deps) {\n if (dep) {\n effects.push(...dep);\n }\n }\n if (!!(process.env.NODE_ENV !== \"production\")) {\n triggerEffects(createDep(effects), eventInfo);\n } else {\n triggerEffects(createDep(effects));\n }\n }\n}\nfunction triggerEffects(dep, debuggerEventExtraInfo) {\n const effects = isArray(dep) ? dep : [...dep];\n for (const effect2 of effects) {\n if (effect2.computed) {\n triggerEffect(effect2, debuggerEventExtraInfo);\n }\n }\n for (const effect2 of effects) {\n if (!effect2.computed) {\n triggerEffect(effect2, debuggerEventExtraInfo);\n }\n }\n}\nfunction triggerEffect(effect2, debuggerEventExtraInfo) {\n if (effect2 !== activeEffect || effect2.allowRecurse) {\n if (!!(process.env.NODE_ENV !== \"production\") && effect2.onTrigger) {\n effect2.onTrigger(extend({ effect: effect2 }, debuggerEventExtraInfo));\n }\n if (effect2.scheduler) {\n effect2.scheduler();\n } else {\n effect2.run();\n }\n }\n}\nfunction getDepFromReactive(object, key) {\n var _a;\n return (_a = targetMap.get(object)) == null ? void 0 : _a.get(key);\n}\n\nconst isNonTrackableKeys = /* @__PURE__ */ makeMap(`__proto__,__v_isRef,__isVue`);\nconst builtInSymbols = new Set(\n /* @__PURE__ */ Object.getOwnPropertyNames(Symbol).filter((key) => key !== \"arguments\" && key !== \"caller\").map((key) => Symbol[key]).filter(isSymbol)\n);\nconst get$1 = /* @__PURE__ */ createGetter();\nconst shallowGet = /* @__PURE__ */ createGetter(false, true);\nconst readonlyGet = /* @__PURE__ */ createGetter(true);\nconst shallowReadonlyGet = /* @__PURE__ */ createGetter(true, true);\nconst arrayInstrumentations = /* @__PURE__ */ createArrayInstrumentations();\nfunction createArrayInstrumentations() {\n const instrumentations = {};\n [\"includes\", \"indexOf\", \"lastIndexOf\"].forEach((key) => {\n instrumentations[key] = function(...args) {\n const arr = toRaw(this);\n for (let i = 0, l = this.length; i < l; i++) {\n track(arr, \"get\", i + \"\");\n }\n const res = arr[key](...args);\n if (res === -1 || res === false) {\n return arr[key](...args.map(toRaw));\n } else {\n return res;\n }\n };\n });\n [\"push\", \"pop\", \"shift\", \"unshift\", \"splice\"].forEach((key) => {\n instrumentations[key] = function(...args) {\n pauseTracking();\n const res = toRaw(this)[key].apply(this, args);\n resetTracking();\n return res;\n };\n });\n return instrumentations;\n}\nfunction hasOwnProperty(key) {\n const obj = toRaw(this);\n track(obj, \"has\", key);\n return obj.hasOwnProperty(key);\n}\nfunction createGetter(isReadonly2 = false, shallow = false) {\n return function get2(target, key, receiver) {\n if (key === \"__v_isReactive\") {\n return !isReadonly2;\n } else if (key === \"__v_isReadonly\") {\n return isReadonly2;\n } else if (key === \"__v_isShallow\") {\n return shallow;\n } else if (key === \"__v_raw\" && receiver === (isReadonly2 ? shallow ? shallowReadonlyMap : readonlyMap : shallow ? shallowReactiveMap : reactiveMap).get(target)) {\n return target;\n }\n const targetIsArray = isArray(target);\n if (!isReadonly2) {\n if (targetIsArray && hasOwn(arrayInstrumentations, key)) {\n return Reflect.get(arrayInstrumentations, key, receiver);\n }\n if (key === \"hasOwnProperty\") {\n return hasOwnProperty;\n }\n }\n const res = Reflect.get(target, key, receiver);\n if (isSymbol(key) ? builtInSymbols.has(key) : isNonTrackableKeys(key)) {\n return res;\n }\n if (!isReadonly2) {\n track(target, \"get\", key);\n }\n if (shallow) {\n return res;\n }\n if (isRef(res)) {\n return targetIsArray && isIntegerKey(key) ? res : res.value;\n }\n if (isObject(res)) {\n return isReadonly2 ? readonly(res) : reactive(res);\n }\n return res;\n };\n}\nconst set$1 = /* @__PURE__ */ createSetter();\nconst shallowSet = /* @__PURE__ */ createSetter(true);\nfunction createSetter(shallow = false) {\n return function set2(target, key, value, receiver) {\n let oldValue = target[key];\n if (isReadonly(oldValue) && isRef(oldValue) && !isRef(value)) {\n return false;\n }\n if (!shallow) {\n if (!isShallow(value) && !isReadonly(value)) {\n oldValue = toRaw(oldValue);\n value = toRaw(value);\n }\n if (!isArray(target) && isRef(oldValue) && !isRef(value)) {\n oldValue.value = value;\n return true;\n }\n }\n const hadKey = isArray(target) && isIntegerKey(key) ? Number(key) < target.length : hasOwn(target, key);\n const result = Reflect.set(target, key, value, receiver);\n if (target === toRaw(receiver)) {\n if (!hadKey) {\n trigger(target, \"add\", key, value);\n } else if (hasChanged(value, oldValue)) {\n trigger(target, \"set\", key, value, oldValue);\n }\n }\n return result;\n };\n}\nfunction deleteProperty(target, key) {\n const hadKey = hasOwn(target, key);\n const oldValue = target[key];\n const result = Reflect.deleteProperty(target, key);\n if (result && hadKey) {\n trigger(target, \"delete\", key, void 0, oldValue);\n }\n return result;\n}\nfunction has$1(target, key) {\n const result = Reflect.has(target, key);\n if (!isSymbol(key) || !builtInSymbols.has(key)) {\n track(target, \"has\", key);\n }\n return result;\n}\nfunction ownKeys(target) {\n track(target, \"iterate\", isArray(target) ? \"length\" : ITERATE_KEY);\n return Reflect.ownKeys(target);\n}\nconst mutableHandlers = {\n get: get$1,\n set: set$1,\n deleteProperty,\n has: has$1,\n ownKeys\n};\nconst readonlyHandlers = {\n get: readonlyGet,\n set(target, key) {\n if (!!(process.env.NODE_ENV !== \"production\")) {\n warn(\n `Set operation on key \"${String(key)}\" failed: target is readonly.`,\n target\n );\n }\n return true;\n },\n deleteProperty(target, key) {\n if (!!(process.env.NODE_ENV !== \"production\")) {\n warn(\n `Delete operation on key \"${String(key)}\" failed: target is readonly.`,\n target\n );\n }\n return true;\n }\n};\nconst shallowReactiveHandlers = /* @__PURE__ */ extend(\n {},\n mutableHandlers,\n {\n get: shallowGet,\n set: shallowSet\n }\n);\nconst shallowReadonlyHandlers = /* @__PURE__ */ extend(\n {},\n readonlyHandlers,\n {\n get: shallowReadonlyGet\n }\n);\n\nconst toShallow = (value) => value;\nconst getProto = (v) => Reflect.getPrototypeOf(v);\nfunction get(target, key, isReadonly = false, isShallow = false) {\n target = target[\"__v_raw\"];\n const rawTarget = toRaw(target);\n const rawKey = toRaw(key);\n if (!isReadonly) {\n if (key !== rawKey) {\n track(rawTarget, \"get\", key);\n }\n track(rawTarget, \"get\", rawKey);\n }\n const { has: has2 } = getProto(rawTarget);\n const wrap = isShallow ? toShallow : isReadonly ? toReadonly : toReactive;\n if (has2.call(rawTarget, key)) {\n return wrap(target.get(key));\n } else if (has2.call(rawTarget, rawKey)) {\n return wrap(target.get(rawKey));\n } else if (target !== rawTarget) {\n target.get(key);\n }\n}\nfunction has(key, isReadonly = false) {\n const target = this[\"__v_raw\"];\n const rawTarget = toRaw(target);\n const rawKey = toRaw(key);\n if (!isReadonly) {\n if (key !== rawKey) {\n track(rawTarget, \"has\", key);\n }\n track(rawTarget, \"has\", rawKey);\n }\n return key === rawKey ? target.has(key) : target.has(key) || target.has(rawKey);\n}\nfunction size(target, isReadonly = false) {\n target = target[\"__v_raw\"];\n !isReadonly && track(toRaw(target), \"iterate\", ITERATE_KEY);\n return Reflect.get(target, \"size\", target);\n}\nfunction add(value) {\n value = toRaw(value);\n const target = toRaw(this);\n const proto = getProto(target);\n const hadKey = proto.has.call(target, value);\n if (!hadKey) {\n target.add(value);\n trigger(target, \"add\", value, value);\n }\n return this;\n}\nfunction set(key, value) {\n value = toRaw(value);\n const target = toRaw(this);\n const { has: has2, get: get2 } = getProto(target);\n let hadKey = has2.call(target, key);\n if (!hadKey) {\n key = toRaw(key);\n hadKey = has2.call(target, key);\n } else if (!!(process.env.NODE_ENV !== \"production\")) {\n checkIdentityKeys(target, has2, key);\n }\n const oldValue = get2.call(target, key);\n target.set(key, value);\n if (!hadKey) {\n trigger(target, \"add\", key, value);\n } else if (hasChanged(value, oldValue)) {\n trigger(target, \"set\", key, value, oldValue);\n }\n return this;\n}\nfunction deleteEntry(key) {\n const target = toRaw(this);\n const { has: has2, get: get2 } = getProto(target);\n let hadKey = has2.call(target, key);\n if (!hadKey) {\n key = toRaw(key);\n hadKey = has2.call(target, key);\n } else if (!!(process.env.NODE_ENV !== \"production\")) {\n checkIdentityKeys(target, has2, key);\n }\n const oldValue = get2 ? get2.call(target, key) : void 0;\n const result = target.delete(key);\n if (hadKey) {\n trigger(target, \"delete\", key, void 0, oldValue);\n }\n return result;\n}\nfunction clear() {\n const target = toRaw(this);\n const hadItems = target.size !== 0;\n const oldTarget = !!(process.env.NODE_ENV !== \"production\") ? isMap(target) ? new Map(target) : new Set(target) : void 0;\n const result = target.clear();\n if (hadItems) {\n trigger(target, \"clear\", void 0, void 0, oldTarget);\n }\n return result;\n}\nfunction createForEach(isReadonly, isShallow) {\n return function forEach(callback, thisArg) {\n const observed = this;\n const target = observed[\"__v_raw\"];\n const rawTarget = toRaw(target);\n const wrap = isShallow ? toShallow : isReadonly ? toReadonly : toReactive;\n !isReadonly && track(rawTarget, \"iterate\", ITERATE_KEY);\n return target.forEach((value, key) => {\n return callback.call(thisArg, wrap(value), wrap(key), observed);\n });\n };\n}\nfunction createIterableMethod(method, isReadonly, isShallow) {\n return function(...args) {\n const target = this[\"__v_raw\"];\n const rawTarget = toRaw(target);\n const targetIsMap = isMap(rawTarget);\n const isPair = method === \"entries\" || method === Symbol.iterator && targetIsMap;\n const isKeyOnly = method === \"keys\" && targetIsMap;\n const innerIterator = target[method](...args);\n const wrap = isShallow ? toShallow : isReadonly ? toReadonly : toReactive;\n !isReadonly && track(\n rawTarget,\n \"iterate\",\n isKeyOnly ? MAP_KEY_ITERATE_KEY : ITERATE_KEY\n );\n return {\n // iterator protocol\n next() {\n const { value, done } = innerIterator.next();\n return done ? { value, done } : {\n value: isPair ? [wrap(value[0]), wrap(value[1])] : wrap(value),\n done\n };\n },\n // iterable protocol\n [Symbol.iterator]() {\n return this;\n }\n };\n };\n}\nfunction createReadonlyMethod(type) {\n return function(...args) {\n if (!!(process.env.NODE_ENV !== \"production\")) {\n const key = args[0] ? `on key \"${args[0]}\" ` : ``;\n console.warn(\n `${capitalize(type)} operation ${key}failed: target is readonly.`,\n toRaw(this)\n );\n }\n return type === \"delete\" ? false : this;\n };\n}\nfunction createInstrumentations() {\n const mutableInstrumentations2 = {\n get(key) {\n return get(this, key);\n },\n get size() {\n return size(this);\n },\n has,\n add,\n set,\n delete: deleteEntry,\n clear,\n forEach: createForEach(false, false)\n };\n const shallowInstrumentations2 = {\n get(key) {\n return get(this, key, false, true);\n },\n get size() {\n return size(this);\n },\n has,\n add,\n set,\n delete: deleteEntry,\n clear,\n forEach: createForEach(false, true)\n };\n const readonlyInstrumentations2 = {\n get(key) {\n return get(this, key, true);\n },\n get size() {\n return size(this, true);\n },\n has(key) {\n return has.call(this, key, true);\n },\n add: createReadonlyMethod(\"add\"),\n set: createReadonlyMethod(\"set\"),\n delete: createReadonlyMethod(\"delete\"),\n clear: createReadonlyMethod(\"clear\"),\n forEach: createForEach(true, false)\n };\n const shallowReadonlyInstrumentations2 = {\n get(key) {\n return get(this, key, true, true);\n },\n get size() {\n return size(this, true);\n },\n has(key) {\n return has.call(this, key, true);\n },\n add: createReadonlyMethod(\"add\"),\n set: createReadonlyMethod(\"set\"),\n delete: createReadonlyMethod(\"delete\"),\n clear: createReadonlyMethod(\"clear\"),\n forEach: createForEach(true, true)\n };\n const iteratorMethods = [\"keys\", \"values\", \"entries\", Symbol.iterator];\n iteratorMethods.forEach((method) => {\n mutableInstrumentations2[method] = createIterableMethod(\n method,\n false,\n false\n );\n readonlyInstrumentations2[method] = createIterableMethod(\n method,\n true,\n false\n );\n shallowInstrumentations2[method] = createIterableMethod(\n method,\n false,\n true\n );\n shallowReadonlyInstrumentations2[method] = createIterableMethod(\n method,\n true,\n true\n );\n });\n return [\n mutableInstrumentations2,\n readonlyInstrumentations2,\n shallowInstrumentations2,\n shallowReadonlyInstrumentations2\n ];\n}\nconst [\n mutableInstrumentations,\n readonlyInstrumentations,\n shallowInstrumentations,\n shallowReadonlyInstrumentations\n] = /* @__PURE__ */ createInstrumentations();\nfunction createInstrumentationGetter(isReadonly, shallow) {\n const instrumentations = shallow ? isReadonly ? shallowReadonlyInstrumentations : shallowInstrumentations : isReadonly ? readonlyInstrumentations : mutableInstrumentations;\n return (target, key, receiver) => {\n if (key === \"__v_isReactive\") {\n return !isReadonly;\n } else if (key === \"__v_isReadonly\") {\n return isReadonly;\n } else if (key === \"__v_raw\") {\n return target;\n }\n return Reflect.get(\n hasOwn(instrumentations, key) && key in target ? instrumentations : target,\n key,\n receiver\n );\n };\n}\nconst mutableCollectionHandlers = {\n get: /* @__PURE__ */ createInstrumentationGetter(false, false)\n};\nconst shallowCollectionHandlers = {\n get: /* @__PURE__ */ createInstrumentationGetter(false, true)\n};\nconst readonlyCollectionHandlers = {\n get: /* @__PURE__ */ createInstrumentationGetter(true, false)\n};\nconst shallowReadonlyCollectionHandlers = {\n get: /* @__PURE__ */ createInstrumentationGetter(true, true)\n};\nfunction checkIdentityKeys(target, has2, key) {\n const rawKey = toRaw(key);\n if (rawKey !== key && has2.call(target, rawKey)) {\n const type = toRawType(target);\n console.warn(\n `Reactive ${type} contains both the raw and reactive versions of the same object${type === `Map` ? ` as keys` : ``}, which can lead to inconsistencies. Avoid differentiating between the raw and reactive versions of an object and only use the reactive version if possible.`\n );\n }\n}\n\nconst reactiveMap = /* @__PURE__ */ new WeakMap();\nconst shallowReactiveMap = /* @__PURE__ */ new WeakMap();\nconst readonlyMap = /* @__PURE__ */ new WeakMap();\nconst shallowReadonlyMap = /* @__PURE__ */ new WeakMap();\nfunction targetTypeMap(rawType) {\n switch (rawType) {\n case \"Object\":\n case \"Array\":\n return 1 /* COMMON */;\n case \"Map\":\n case \"Set\":\n case \"WeakMap\":\n case \"WeakSet\":\n return 2 /* COLLECTION */;\n default:\n return 0 /* INVALID */;\n }\n}\nfunction getTargetType(value) {\n return value[\"__v_skip\"] || !Object.isExtensible(value) ? 0 /* INVALID */ : targetTypeMap(toRawType(value));\n}\nfunction reactive(target) {\n if (isReadonly(target)) {\n return target;\n }\n return createReactiveObject(\n target,\n false,\n mutableHandlers,\n mutableCollectionHandlers,\n reactiveMap\n );\n}\nfunction shallowReactive(target) {\n return createReactiveObject(\n target,\n false,\n shallowReactiveHandlers,\n shallowCollectionHandlers,\n shallowReactiveMap\n );\n}\nfunction readonly(target) {\n return createReactiveObject(\n target,\n true,\n readonlyHandlers,\n readonlyCollectionHandlers,\n readonlyMap\n );\n}\nfunction shallowReadonly(target) {\n return createReactiveObject(\n target,\n true,\n shallowReadonlyHandlers,\n shallowReadonlyCollectionHandlers,\n shallowReadonlyMap\n );\n}\nfunction createReactiveObject(target, isReadonly2, baseHandlers, collectionHandlers, proxyMap) {\n if (!isObject(target)) {\n if (!!(process.env.NODE_ENV !== \"production\")) {\n console.warn(`value cannot be made reactive: ${String(target)}`);\n }\n return target;\n }\n if (target[\"__v_raw\"] && !(isReadonly2 && target[\"__v_isReactive\"])) {\n return target;\n }\n const existingProxy = proxyMap.get(target);\n if (existingProxy) {\n return existingProxy;\n }\n const targetType = getTargetType(target);\n if (targetType === 0 /* INVALID */) {\n return target;\n }\n const proxy = new Proxy(\n target,\n targetType === 2 /* COLLECTION */ ? collectionHandlers : baseHandlers\n );\n proxyMap.set(target, proxy);\n return proxy;\n}\nfunction isReactive(value) {\n if (isReadonly(value)) {\n return isReactive(value[\"__v_raw\"]);\n }\n return !!(value && value[\"__v_isReactive\"]);\n}\nfunction isReadonly(value) {\n return !!(value && value[\"__v_isReadonly\"]);\n}\nfunction isShallow(value) {\n return !!(value && value[\"__v_isShallow\"]);\n}\nfunction isProxy(value) {\n return isReactive(value) || isReadonly(value);\n}\nfunction toRaw(observed) {\n const raw = observed && observed[\"__v_raw\"];\n return raw ? toRaw(raw) : observed;\n}\nfunction markRaw(value) {\n def(value, \"__v_skip\", true);\n return value;\n}\nconst toReactive = (value) => isObject(value) ? reactive(value) : value;\nconst toReadonly = (value) => isObject(value) ? readonly(value) : value;\n\nfunction trackRefValue(ref2) {\n if (shouldTrack && activeEffect) {\n ref2 = toRaw(ref2);\n if (!!(process.env.NODE_ENV !== \"production\")) {\n trackEffects(ref2.dep || (ref2.dep = createDep()), {\n target: ref2,\n type: \"get\",\n key: \"value\"\n });\n } else {\n trackEffects(ref2.dep || (ref2.dep = createDep()));\n }\n }\n}\nfunction triggerRefValue(ref2, newVal) {\n ref2 = toRaw(ref2);\n const dep = ref2.dep;\n if (dep) {\n if (!!(process.env.NODE_ENV !== \"production\")) {\n triggerEffects(dep, {\n target: ref2,\n type: \"set\",\n key: \"value\",\n newValue: newVal\n });\n } else {\n triggerEffects(dep);\n }\n }\n}\nfunction isRef(r) {\n return !!(r && r.__v_isRef === true);\n}\nfunction ref(value) {\n return createRef(value, false);\n}\nfunction shallowRef(value) {\n return createRef(value, true);\n}\nfunction createRef(rawValue, shallow) {\n if (isRef(rawValue)) {\n return rawValue;\n }\n return new RefImpl(rawValue, shallow);\n}\nclass RefImpl {\n constructor(value, __v_isShallow) {\n this.__v_isShallow = __v_isShallow;\n this.dep = void 0;\n this.__v_isRef = true;\n this._rawValue = __v_isShallow ? value : toRaw(value);\n this._value = __v_isShallow ? value : toReactive(value);\n }\n get value() {\n trackRefValue(this);\n return this._value;\n }\n set value(newVal) {\n const useDirectValue = this.__v_isShallow || isShallow(newVal) || isReadonly(newVal);\n newVal = useDirectValue ? newVal : toRaw(newVal);\n if (hasChanged(newVal, this._rawValue)) {\n this._rawValue = newVal;\n this._value = useDirectValue ? newVal : toReactive(newVal);\n triggerRefValue(this, newVal);\n }\n }\n}\nfunction triggerRef(ref2) {\n triggerRefValue(ref2, !!(process.env.NODE_ENV !== \"production\") ? ref2.value : void 0);\n}\nfunction unref(ref2) {\n return isRef(ref2) ? ref2.value : ref2;\n}\nfunction toValue(source) {\n return isFunction(source) ? source() : unref(source);\n}\nconst shallowUnwrapHandlers = {\n get: (target, key, receiver) => unref(Reflect.get(target, key, receiver)),\n set: (target, key, value, receiver) => {\n const oldValue = target[key];\n if (isRef(oldValue) && !isRef(value)) {\n oldValue.value = value;\n return true;\n } else {\n return Reflect.set(target, key, value, receiver);\n }\n }\n};\nfunction proxyRefs(objectWithRefs) {\n return isReactive(objectWithRefs) ? objectWithRefs : new Proxy(objectWithRefs, shallowUnwrapHandlers);\n}\nclass CustomRefImpl {\n constructor(factory) {\n this.dep = void 0;\n this.__v_isRef = true;\n const { get, set } = factory(\n () => trackRefValue(this),\n () => triggerRefValue(this)\n );\n this._get = get;\n this._set = set;\n }\n get value() {\n return this._get();\n }\n set value(newVal) {\n this._set(newVal);\n }\n}\nfunction customRef(factory) {\n return new CustomRefImpl(factory);\n}\nfunction toRefs(object) {\n if (!!(process.env.NODE_ENV !== \"production\") && !isProxy(object)) {\n console.warn(`toRefs() expects a reactive object but received a plain one.`);\n }\n const ret = isArray(object) ? new Array(object.length) : {};\n for (const key in object) {\n ret[key] = propertyToRef(object, key);\n }\n return ret;\n}\nclass ObjectRefImpl {\n constructor(_object, _key, _defaultValue) {\n this._object = _object;\n this._key = _key;\n this._defaultValue = _defaultValue;\n this.__v_isRef = true;\n }\n get value() {\n const val = this._object[this._key];\n return val === void 0 ? this._defaultValue : val;\n }\n set value(newVal) {\n this._object[this._key] = newVal;\n }\n get dep() {\n return getDepFromReactive(toRaw(this._object), this._key);\n }\n}\nclass GetterRefImpl {\n constructor(_getter) {\n this._getter = _getter;\n this.__v_isRef = true;\n this.__v_isReadonly = true;\n }\n get value() {\n return this._getter();\n }\n}\nfunction toRef(source, key, defaultValue) {\n if (isRef(source)) {\n return source;\n } else if (isFunction(source)) {\n return new GetterRefImpl(source);\n } else if (isObject(source) && arguments.length > 1) {\n return propertyToRef(source, key, defaultValue);\n } else {\n return ref(source);\n }\n}\nfunction propertyToRef(source, key, defaultValue) {\n const val = source[key];\n return isRef(val) ? val : new ObjectRefImpl(\n source,\n key,\n defaultValue\n );\n}\n\nclass ComputedRefImpl {\n constructor(getter, _setter, isReadonly, isSSR) {\n this._setter = _setter;\n this.dep = void 0;\n this.__v_isRef = true;\n this[\"__v_isReadonly\"] = false;\n this._dirty = true;\n this.effect = new ReactiveEffect(getter, () => {\n if (!this._dirty) {\n this._dirty = true;\n triggerRefValue(this);\n }\n });\n this.effect.computed = this;\n this.effect.active = this._cacheable = !isSSR;\n this[\"__v_isReadonly\"] = isReadonly;\n }\n get value() {\n const self = toRaw(this);\n trackRefValue(self);\n if (self._dirty || !self._cacheable) {\n self._dirty = false;\n self._value = self.effect.run();\n }\n return self._value;\n }\n set value(newValue) {\n this._setter(newValue);\n }\n}\nfunction computed(getterOrOptions, debugOptions, isSSR = false) {\n let getter;\n let setter;\n const onlyGetter = isFunction(getterOrOptions);\n if (onlyGetter) {\n getter = getterOrOptions;\n setter = !!(process.env.NODE_ENV !== \"production\") ? () => {\n console.warn(\"Write operation failed: computed value is readonly\");\n } : NOOP;\n } else {\n getter = getterOrOptions.get;\n setter = getterOrOptions.set;\n }\n const cRef = new ComputedRefImpl(getter, setter, onlyGetter || !setter, isSSR);\n if (!!(process.env.NODE_ENV !== \"production\") && debugOptions && !isSSR) {\n cRef.effect.onTrack = debugOptions.onTrack;\n cRef.effect.onTrigger = debugOptions.onTrigger;\n }\n return cRef;\n}\n\nconst tick = /* @__PURE__ */ Promise.resolve();\nconst queue = [];\nlet queued = false;\nconst scheduler = (fn) => {\n queue.push(fn);\n if (!queued) {\n queued = true;\n tick.then(flush);\n }\n};\nconst flush = () => {\n for (let i = 0; i < queue.length; i++) {\n queue[i]();\n }\n queue.length = 0;\n queued = false;\n};\nclass DeferredComputedRefImpl {\n constructor(getter) {\n this.dep = void 0;\n this._dirty = true;\n this.__v_isRef = true;\n this[\"__v_isReadonly\"] = true;\n let compareTarget;\n let hasCompareTarget = false;\n let scheduled = false;\n this.effect = new ReactiveEffect(getter, (computedTrigger) => {\n if (this.dep) {\n if (computedTrigger) {\n compareTarget = this._value;\n hasCompareTarget = true;\n } else if (!scheduled) {\n const valueToCompare = hasCompareTarget ? compareTarget : this._value;\n scheduled = true;\n hasCompareTarget = false;\n scheduler(() => {\n if (this.effect.active && this._get() !== valueToCompare) {\n triggerRefValue(this);\n }\n scheduled = false;\n });\n }\n for (const e of this.dep) {\n if (e.computed instanceof DeferredComputedRefImpl) {\n e.scheduler(\n true\n /* computedTrigger */\n );\n }\n }\n }\n this._dirty = true;\n });\n this.effect.computed = this;\n }\n _get() {\n if (this._dirty) {\n this._dirty = false;\n return this._value = this.effect.run();\n }\n return this._value;\n }\n get value() {\n trackRefValue(this);\n return toRaw(this)._get();\n }\n}\nfunction deferredComputed(getter) {\n return new DeferredComputedRefImpl(getter);\n}\n\nexport { EffectScope, ITERATE_KEY, ReactiveEffect, computed, customRef, deferredComputed, effect, effectScope, enableTracking, getCurrentScope, isProxy, isReactive, isReadonly, isRef, isShallow, markRaw, onScopeDispose, pauseTracking, proxyRefs, reactive, readonly, ref, resetTracking, shallowReactive, shallowReadonly, shallowRef, stop, toRaw, toRef, toRefs, toValue, track, trigger, triggerRef, unref };\n","import { pauseTracking, resetTracking, isRef, toRaw, getCurrentScope, isShallow as isShallow$1, isReactive, ReactiveEffect, ref, shallowReadonly, track, reactive, shallowReactive, trigger, isProxy, proxyRefs, markRaw, EffectScope, computed as computed$1, isReadonly } from '@vue/reactivity';\nexport { EffectScope, ReactiveEffect, customRef, effect, effectScope, getCurrentScope, isProxy, isReactive, isReadonly, isRef, isShallow, markRaw, onScopeDispose, proxyRefs, reactive, readonly, ref, shallowReactive, shallowReadonly, shallowRef, stop, toRaw, toRef, toRefs, toValue, triggerRef, unref } from '@vue/reactivity';\nimport { isString, isFunction, isPromise, isArray, NOOP, getGlobalThis, extend, EMPTY_OBJ, toHandlerKey, looseToNumber, hyphenate, camelize, isObject, isOn, hasOwn, isModelListener, toNumber, hasChanged, remove, isSet, isMap, isPlainObject, isBuiltInDirective, invokeArrayFns, isRegExp, capitalize, isGloballyWhitelisted, NO, def, isReservedProp, EMPTY_ARR, toRawType, makeMap, normalizeClass, normalizeStyle } from '@vue/shared';\nexport { camelize, capitalize, normalizeClass, normalizeProps, normalizeStyle, toDisplayString, toHandlerKey } from '@vue/shared';\n\nconst stack = [];\nfunction pushWarningContext(vnode) {\n stack.push(vnode);\n}\nfunction popWarningContext() {\n stack.pop();\n}\nfunction warn(msg, ...args) {\n if (!!!(process.env.NODE_ENV !== \"production\"))\n return;\n pauseTracking();\n const instance = stack.length ? stack[stack.length - 1].component : null;\n const appWarnHandler = instance && instance.appContext.config.warnHandler;\n const trace = getComponentTrace();\n if (appWarnHandler) {\n callWithErrorHandling(\n appWarnHandler,\n instance,\n 11,\n [\n msg + args.join(\"\"),\n instance && instance.proxy,\n trace.map(\n ({ vnode }) => `at <${formatComponentName(instance, vnode.type)}>`\n ).join(\"\\n\"),\n trace\n ]\n );\n } else {\n const warnArgs = [`[Vue warn]: ${msg}`, ...args];\n if (trace.length && // avoid spamming console during tests\n true) {\n warnArgs.push(`\n`, ...formatTrace(trace));\n }\n console.warn(...warnArgs);\n }\n resetTracking();\n}\nfunction getComponentTrace() {\n let currentVNode = stack[stack.length - 1];\n if (!currentVNode) {\n return [];\n }\n const normalizedStack = [];\n while (currentVNode) {\n const last = normalizedStack[0];\n if (last && last.vnode === currentVNode) {\n last.recurseCount++;\n } else {\n normalizedStack.push({\n vnode: currentVNode,\n recurseCount: 0\n });\n }\n const parentInstance = currentVNode.component && currentVNode.component.parent;\n currentVNode = parentInstance && parentInstance.vnode;\n }\n return normalizedStack;\n}\nfunction formatTrace(trace) {\n const logs = [];\n trace.forEach((entry, i) => {\n logs.push(...i === 0 ? [] : [`\n`], ...formatTraceEntry(entry));\n });\n return logs;\n}\nfunction formatTraceEntry({ vnode, recurseCount }) {\n const postfix = recurseCount > 0 ? `... (${recurseCount} recursive calls)` : ``;\n const isRoot = vnode.component ? vnode.component.parent == null : false;\n const open = ` at <${formatComponentName(\n vnode.component,\n vnode.type,\n isRoot\n )}`;\n const close = `>` + postfix;\n return vnode.props ? [open, ...formatProps(vnode.props), close] : [open + close];\n}\nfunction formatProps(props) {\n const res = [];\n const keys = Object.keys(props);\n keys.slice(0, 3).forEach((key) => {\n res.push(...formatProp(key, props[key]));\n });\n if (keys.length > 3) {\n res.push(` ...`);\n }\n return res;\n}\nfunction formatProp(key, value, raw) {\n if (isString(value)) {\n value = JSON.stringify(value);\n return raw ? value : [`${key}=${value}`];\n } else if (typeof value === \"number\" || typeof value === \"boolean\" || value == null) {\n return raw ? value : [`${key}=${value}`];\n } else if (isRef(value)) {\n value = formatProp(key, toRaw(value.value), true);\n return raw ? value : [`${key}=Ref<`, value, `>`];\n } else if (isFunction(value)) {\n return [`${key}=fn${value.name ? `<${value.name}>` : ``}`];\n } else {\n value = toRaw(value);\n return raw ? value : [`${key}=`, value];\n }\n}\nfunction assertNumber(val, type) {\n if (!!!(process.env.NODE_ENV !== \"production\"))\n return;\n if (val === void 0) {\n return;\n } else if (typeof val !== \"number\") {\n warn(`${type} is not a valid number - got ${JSON.stringify(val)}.`);\n } else if (isNaN(val)) {\n warn(`${type} is NaN - the duration expression might be incorrect.`);\n }\n}\n\nconst ErrorTypeStrings = {\n [\"sp\"]: \"serverPrefetch hook\",\n [\"bc\"]: \"beforeCreate hook\",\n [\"c\"]: \"created hook\",\n [\"bm\"]: \"beforeMount hook\",\n [\"m\"]: \"mounted hook\",\n [\"bu\"]: \"beforeUpdate hook\",\n [\"u\"]: \"updated\",\n [\"bum\"]: \"beforeUnmount hook\",\n [\"um\"]: \"unmounted hook\",\n [\"a\"]: \"activated hook\",\n [\"da\"]: \"deactivated hook\",\n [\"ec\"]: \"errorCaptured hook\",\n [\"rtc\"]: \"renderTracked hook\",\n [\"rtg\"]: \"renderTriggered hook\",\n [0]: \"setup function\",\n [1]: \"render function\",\n [2]: \"watcher getter\",\n [3]: \"watcher callback\",\n [4]: \"watcher cleanup function\",\n [5]: \"native event handler\",\n [6]: \"component event handler\",\n [7]: \"vnode hook\",\n [8]: \"directive hook\",\n [9]: \"transition hook\",\n [10]: \"app errorHandler\",\n [11]: \"app warnHandler\",\n [12]: \"ref function\",\n [13]: \"async component loader\",\n [14]: \"scheduler flush. This is likely a Vue internals bug. Please open an issue at https://new-issue.vuejs.org/?repo=vuejs/core\"\n};\nfunction callWithErrorHandling(fn, instance, type, args) {\n let res;\n try {\n res = args ? fn(...args) : fn();\n } catch (err) {\n handleError(err, instance, type);\n }\n return res;\n}\nfunction callWithAsyncErrorHandling(fn, instance, type, args) {\n if (isFunction(fn)) {\n const res = callWithErrorHandling(fn, instance, type, args);\n if (res && isPromise(res)) {\n res.catch((err) => {\n handleError(err, instance, type);\n });\n }\n return res;\n }\n const values = [];\n for (let i = 0; i < fn.length; i++) {\n values.push(callWithAsyncErrorHandling(fn[i], instance, type, args));\n }\n return values;\n}\nfunction handleError(err, instance, type, throwInDev = true) {\n const contextVNode = instance ? instance.vnode : null;\n if (instance) {\n let cur = instance.parent;\n const exposedInstance = instance.proxy;\n const errorInfo = !!(process.env.NODE_ENV !== \"production\") ? ErrorTypeStrings[type] : type;\n while (cur) {\n const errorCapturedHooks = cur.ec;\n if (errorCapturedHooks) {\n for (let i = 0; i < errorCapturedHooks.length; i++) {\n if (errorCapturedHooks[i](err, exposedInstance, errorInfo) === false) {\n return;\n }\n }\n }\n cur = cur.parent;\n }\n const appErrorHandler = instance.appContext.config.errorHandler;\n if (appErrorHandler) {\n callWithErrorHandling(\n appErrorHandler,\n null,\n 10,\n [err, exposedInstance, errorInfo]\n );\n return;\n }\n }\n logError(err, type, contextVNode, throwInDev);\n}\nfunction logError(err, type, contextVNode, throwInDev = true) {\n if (!!(process.env.NODE_ENV !== \"production\")) {\n const info = ErrorTypeStrings[type];\n if (contextVNode) {\n pushWarningContext(contextVNode);\n }\n warn(`Unhandled error${info ? ` during execution of ${info}` : ``}`);\n if (contextVNode) {\n popWarningContext();\n }\n if (throwInDev) {\n throw err;\n } else {\n console.error(err);\n }\n } else {\n console.error(err);\n }\n}\n\nlet isFlushing = false;\nlet isFlushPending = false;\nconst queue = [];\nlet flushIndex = 0;\nconst pendingPostFlushCbs = [];\nlet activePostFlushCbs = null;\nlet postFlushIndex = 0;\nconst resolvedPromise = /* @__PURE__ */ Promise.resolve();\nlet currentFlushPromise = null;\nconst RECURSION_LIMIT = 100;\nfunction nextTick(fn) {\n const p = currentFlushPromise || resolvedPromise;\n return fn ? p.then(this ? fn.bind(this) : fn) : p;\n}\nfunction findInsertionIndex(id) {\n let start = flushIndex + 1;\n let end = queue.length;\n while (start < end) {\n const middle = start + end >>> 1;\n const middleJobId = getId(queue[middle]);\n middleJobId < id ? start = middle + 1 : end = middle;\n }\n return start;\n}\nfunction queueJob(job) {\n if (!queue.length || !queue.includes(\n job,\n isFlushing && job.allowRecurse ? flushIndex + 1 : flushIndex\n )) {\n if (job.id == null) {\n queue.push(job);\n } else {\n queue.splice(findInsertionIndex(job.id), 0, job);\n }\n queueFlush();\n }\n}\nfunction queueFlush() {\n if (!isFlushing && !isFlushPending) {\n isFlushPending = true;\n currentFlushPromise = resolvedPromise.then(flushJobs);\n }\n}\nfunction invalidateJob(job) {\n const i = queue.indexOf(job);\n if (i > flushIndex) {\n queue.splice(i, 1);\n }\n}\nfunction queuePostFlushCb(cb) {\n if (!isArray(cb)) {\n if (!activePostFlushCbs || !activePostFlushCbs.includes(\n cb,\n cb.allowRecurse ? postFlushIndex + 1 : postFlushIndex\n )) {\n pendingPostFlushCbs.push(cb);\n }\n } else {\n pendingPostFlushCbs.push(...cb);\n }\n queueFlush();\n}\nfunction flushPreFlushCbs(seen, i = isFlushing ? flushIndex + 1 : 0) {\n if (!!(process.env.NODE_ENV !== \"production\")) {\n seen = seen || /* @__PURE__ */ new Map();\n }\n for (; i < queue.length; i++) {\n const cb = queue[i];\n if (cb && cb.pre) {\n if (!!(process.env.NODE_ENV !== \"production\") && checkRecursiveUpdates(seen, cb)) {\n continue;\n }\n queue.splice(i, 1);\n i--;\n cb();\n }\n }\n}\nfunction flushPostFlushCbs(seen) {\n if (pendingPostFlushCbs.length) {\n const deduped = [...new Set(pendingPostFlushCbs)];\n pendingPostFlushCbs.length = 0;\n if (activePostFlushCbs) {\n activePostFlushCbs.push(...deduped);\n return;\n }\n activePostFlushCbs = deduped;\n if (!!(process.env.NODE_ENV !== \"production\")) {\n seen = seen || /* @__PURE__ */ new Map();\n }\n activePostFlushCbs.sort((a, b) => getId(a) - getId(b));\n for (postFlushIndex = 0; postFlushIndex < activePostFlushCbs.length; postFlushIndex++) {\n if (!!(process.env.NODE_ENV !== \"production\") && checkRecursiveUpdates(seen, activePostFlushCbs[postFlushIndex])) {\n continue;\n }\n activePostFlushCbs[postFlushIndex]();\n }\n activePostFlushCbs = null;\n postFlushIndex = 0;\n }\n}\nconst getId = (job) => job.id == null ? Infinity : job.id;\nconst comparator = (a, b) => {\n const diff = getId(a) - getId(b);\n if (diff === 0) {\n if (a.pre && !b.pre)\n return -1;\n if (b.pre && !a.pre)\n return 1;\n }\n return diff;\n};\nfunction flushJobs(seen) {\n isFlushPending = false;\n isFlushing = true;\n if (!!(process.env.NODE_ENV !== \"production\")) {\n seen = seen || /* @__PURE__ */ new Map();\n }\n queue.sort(comparator);\n const check = !!(process.env.NODE_ENV !== \"production\") ? (job) => checkRecursiveUpdates(seen, job) : NOOP;\n try {\n for (flushIndex = 0; flushIndex < queue.length; flushIndex++) {\n const job = queue[flushIndex];\n if (job && job.active !== false) {\n if (!!(process.env.NODE_ENV !== \"production\") && check(job)) {\n continue;\n }\n callWithErrorHandling(job, null, 14);\n }\n }\n } finally {\n flushIndex = 0;\n queue.length = 0;\n flushPostFlushCbs(seen);\n isFlushing = false;\n currentFlushPromise = null;\n if (queue.length || pendingPostFlushCbs.length) {\n flushJobs(seen);\n }\n }\n}\nfunction checkRecursiveUpdates(seen, fn) {\n if (!seen.has(fn)) {\n seen.set(fn, 1);\n } else {\n const count = seen.get(fn);\n if (count > RECURSION_LIMIT) {\n const instance = fn.ownerInstance;\n const componentName = instance && getComponentName(instance.type);\n warn(\n `Maximum recursive updates exceeded${componentName ? ` in component <${componentName}>` : ``}. This means you have a reactive effect that is mutating its own dependencies and thus recursively triggering itself. Possible sources include component template, render function, updated hook or watcher source function.`\n );\n return true;\n } else {\n seen.set(fn, count + 1);\n }\n }\n}\n\nlet isHmrUpdating = false;\nconst hmrDirtyComponents = /* @__PURE__ */ new Set();\nif (!!(process.env.NODE_ENV !== \"production\")) {\n getGlobalThis().__VUE_HMR_RUNTIME__ = {\n createRecord: tryWrap(createRecord),\n rerender: tryWrap(rerender),\n reload: tryWrap(reload)\n };\n}\nconst map = /* @__PURE__ */ new Map();\nfunction registerHMR(instance) {\n const id = instance.type.__hmrId;\n let record = map.get(id);\n if (!record) {\n createRecord(id, instance.type);\n record = map.get(id);\n }\n record.instances.add(instance);\n}\nfunction unregisterHMR(instance) {\n map.get(instance.type.__hmrId).instances.delete(instance);\n}\nfunction createRecord(id, initialDef) {\n if (map.has(id)) {\n return false;\n }\n map.set(id, {\n initialDef: normalizeClassComponent(initialDef),\n instances: /* @__PURE__ */ new Set()\n });\n return true;\n}\nfunction normalizeClassComponent(component) {\n return isClassComponent(component) ? component.__vccOpts : component;\n}\nfunction rerender(id, newRender) {\n const record = map.get(id);\n if (!record) {\n return;\n }\n record.initialDef.render = newRender;\n [...record.instances].forEach((instance) => {\n if (newRender) {\n instance.render = newRender;\n normalizeClassComponent(instance.type).render = newRender;\n }\n instance.renderCache = [];\n isHmrUpdating = true;\n instance.update();\n isHmrUpdating = false;\n });\n}\nfunction reload(id, newComp) {\n const record = map.get(id);\n if (!record)\n return;\n newComp = normalizeClassComponent(newComp);\n updateComponentDef(record.initialDef, newComp);\n const instances = [...record.instances];\n for (const instance of instances) {\n const oldComp = normalizeClassComponent(instance.type);\n if (!hmrDirtyComponents.has(oldComp)) {\n if (oldComp !== record.initialDef) {\n updateComponentDef(oldComp, newComp);\n }\n hmrDirtyComponents.add(oldComp);\n }\n instance.appContext.propsCache.delete(instance.type);\n instance.appContext.emitsCache.delete(instance.type);\n instance.appContext.optionsCache.delete(instance.type);\n if (instance.ceReload) {\n hmrDirtyComponents.add(oldComp);\n instance.ceReload(newComp.styles);\n hmrDirtyComponents.delete(oldComp);\n } else if (instance.parent) {\n queueJob(instance.parent.update);\n } else if (instance.appContext.reload) {\n instance.appContext.reload();\n } else if (typeof window !== \"undefined\") {\n window.location.reload();\n } else {\n console.warn(\n \"[HMR] Root or manually mounted instance modified. Full reload required.\"\n );\n }\n }\n queuePostFlushCb(() => {\n for (const instance of instances) {\n hmrDirtyComponents.delete(\n normalizeClassComponent(instance.type)\n );\n }\n });\n}\nfunction updateComponentDef(oldComp, newComp) {\n extend(oldComp, newComp);\n for (const key in oldComp) {\n if (key !== \"__file\" && !(key in newComp)) {\n delete oldComp[key];\n }\n }\n}\nfunction tryWrap(fn) {\n return (id, arg) => {\n try {\n return fn(id, arg);\n } catch (e) {\n console.error(e);\n console.warn(\n `[HMR] Something went wrong during Vue component hot-reload. Full reload required.`\n );\n }\n };\n}\n\nlet devtools;\nlet buffer = [];\nlet devtoolsNotInstalled = false;\nfunction emit$1(event, ...args) {\n if (devtools) {\n devtools.emit(event, ...args);\n } else if (!devtoolsNotInstalled) {\n buffer.push({ event, args });\n }\n}\nfunction setDevtoolsHook(hook, target) {\n var _a, _b;\n devtools = hook;\n if (devtools) {\n devtools.enabled = true;\n buffer.forEach(({ event, args }) => devtools.emit(event, ...args));\n buffer = [];\n } else if (\n // handle late devtools injection - only do this if we are in an actual\n // browser environment to avoid the timer handle stalling test runner exit\n // (#4815)\n typeof window !== \"undefined\" && // some envs mock window but not fully\n window.HTMLElement && // also exclude jsdom\n !((_b = (_a = window.navigator) == null ? void 0 : _a.userAgent) == null ? void 0 : _b.includes(\"jsdom\"))\n ) {\n const replay = target.__VUE_DEVTOOLS_HOOK_REPLAY__ = target.__VUE_DEVTOOLS_HOOK_REPLAY__ || [];\n replay.push((newHook) => {\n setDevtoolsHook(newHook, target);\n });\n setTimeout(() => {\n if (!devtools) {\n target.__VUE_DEVTOOLS_HOOK_REPLAY__ = null;\n devtoolsNotInstalled = true;\n buffer = [];\n }\n }, 3e3);\n } else {\n devtoolsNotInstalled = true;\n buffer = [];\n }\n}\nfunction devtoolsInitApp(app, version) {\n emit$1(\"app:init\" /* APP_INIT */, app, version, {\n Fragment,\n Text,\n Comment,\n Static\n });\n}\nfunction devtoolsUnmountApp(app) {\n emit$1(\"app:unmount\" /* APP_UNMOUNT */, app);\n}\nconst devtoolsComponentAdded = /* @__PURE__ */ createDevtoolsComponentHook(\n \"component:added\" /* COMPONENT_ADDED */\n);\nconst devtoolsComponentUpdated = /* @__PURE__ */ createDevtoolsComponentHook(\"component:updated\" /* COMPONENT_UPDATED */);\nconst _devtoolsComponentRemoved = /* @__PURE__ */ createDevtoolsComponentHook(\n \"component:removed\" /* COMPONENT_REMOVED */\n);\nconst devtoolsComponentRemoved = (component) => {\n if (devtools && typeof devtools.cleanupBuffer === \"function\" && // remove the component if it wasn't buffered\n !devtools.cleanupBuffer(component)) {\n _devtoolsComponentRemoved(component);\n }\n};\nfunction createDevtoolsComponentHook(hook) {\n return (component) => {\n emit$1(\n hook,\n component.appContext.app,\n component.uid,\n component.parent ? component.parent.uid : void 0,\n component\n );\n };\n}\nconst devtoolsPerfStart = /* @__PURE__ */ createDevtoolsPerformanceHook(\n \"perf:start\" /* PERFORMANCE_START */\n);\nconst devtoolsPerfEnd = /* @__PURE__ */ createDevtoolsPerformanceHook(\n \"perf:end\" /* PERFORMANCE_END */\n);\nfunction createDevtoolsPerformanceHook(hook) {\n return (component, type, time) => {\n emit$1(hook, component.appContext.app, component.uid, component, type, time);\n };\n}\nfunction devtoolsComponentEmit(component, event, params) {\n emit$1(\n \"component:emit\" /* COMPONENT_EMIT */,\n component.appContext.app,\n component,\n event,\n params\n );\n}\n\nfunction emit(instance, event, ...rawArgs) {\n if (instance.isUnmounted)\n return;\n const props = instance.vnode.props || EMPTY_OBJ;\n if (!!(process.env.NODE_ENV !== \"production\")) {\n const {\n emitsOptions,\n propsOptions: [propsOptions]\n } = instance;\n if (emitsOptions) {\n if (!(event in emitsOptions) && true) {\n if (!propsOptions || !(toHandlerKey(event) in propsOptions)) {\n warn(\n `Component emitted event \"${event}\" but it is neither declared in the emits option nor as an \"${toHandlerKey(event)}\" prop.`\n );\n }\n } else {\n const validator = emitsOptions[event];\n if (isFunction(validator)) {\n const isValid = validator(...rawArgs);\n if (!isValid) {\n warn(\n `Invalid event arguments: event validation failed for event \"${event}\".`\n );\n }\n }\n }\n }\n }\n let args = rawArgs;\n const isModelListener = event.startsWith(\"update:\");\n const modelArg = isModelListener && event.slice(7);\n if (modelArg && modelArg in props) {\n const modifiersKey = `${modelArg === \"modelValue\" ? \"model\" : modelArg}Modifiers`;\n const { number, trim } = props[modifiersKey] || EMPTY_OBJ;\n if (trim) {\n args = rawArgs.map((a) => isString(a) ? a.trim() : a);\n }\n if (number) {\n args = rawArgs.map(looseToNumber);\n }\n }\n if (!!(process.env.NODE_ENV !== \"production\") || __VUE_PROD_DEVTOOLS__) {\n devtoolsComponentEmit(instance, event, args);\n }\n if (!!(process.env.NODE_ENV !== \"production\")) {\n const lowerCaseEvent = event.toLowerCase();\n if (lowerCaseEvent !== event && props[toHandlerKey(lowerCaseEvent)]) {\n warn(\n `Event \"${lowerCaseEvent}\" is emitted in component ${formatComponentName(\n instance,\n instance.type\n )} but the handler is registered for \"${event}\". Note that HTML attributes are case-insensitive and you cannot use v-on to listen to camelCase events when using in-DOM templates. You should probably use \"${hyphenate(event)}\" instead of \"${event}\".`\n );\n }\n }\n let handlerName;\n let handler = props[handlerName = toHandlerKey(event)] || // also try camelCase event handler (#2249)\n props[handlerName = toHandlerKey(camelize(event))];\n if (!handler && isModelListener) {\n handler = props[handlerName = toHandlerKey(hyphenate(event))];\n }\n if (handler) {\n callWithAsyncErrorHandling(\n handler,\n instance,\n 6,\n args\n );\n }\n const onceHandler = props[handlerName + `Once`];\n if (onceHandler) {\n if (!instance.emitted) {\n instance.emitted = {};\n } else if (instance.emitted[handlerName]) {\n return;\n }\n instance.emitted[handlerName] = true;\n callWithAsyncErrorHandling(\n onceHandler,\n instance,\n 6,\n args\n );\n }\n}\nfunction normalizeEmitsOptions(comp, appContext, asMixin = false) {\n const cache = appContext.emitsCache;\n const cached = cache.get(comp);\n if (cached !== void 0) {\n return cached;\n }\n const raw = comp.emits;\n let normalized = {};\n let hasExtends = false;\n if (__VUE_OPTIONS_API__ && !isFunction(comp)) {\n const extendEmits = (raw2) => {\n const normalizedFromExtend = normalizeEmitsOptions(raw2, appContext, true);\n if (normalizedFromExtend) {\n hasExtends = true;\n extend(normalized, normalizedFromExtend);\n }\n };\n if (!asMixin && appContext.mixins.length) {\n appContext.mixins.forEach(extendEmits);\n }\n if (comp.extends) {\n extendEmits(comp.extends);\n }\n if (comp.mixins) {\n comp.mixins.forEach(extendEmits);\n }\n }\n if (!raw && !hasExtends) {\n if (isObject(comp)) {\n cache.set(comp, null);\n }\n return null;\n }\n if (isArray(raw)) {\n raw.forEach((key) => normalized[key] = null);\n } else {\n extend(normalized, raw);\n }\n if (isObject(comp)) {\n cache.set(comp, normalized);\n }\n return normalized;\n}\nfunction isEmitListener(options, key) {\n if (!options || !isOn(key)) {\n return false;\n }\n key = key.slice(2).replace(/Once$/, \"\");\n return hasOwn(options, key[0].toLowerCase() + key.slice(1)) || hasOwn(options, hyphenate(key)) || hasOwn(options, key);\n}\n\nlet currentRenderingInstance = null;\nlet currentScopeId = null;\nfunction setCurrentRenderingInstance(instance) {\n const prev = currentRenderingInstance;\n currentRenderingInstance = instance;\n currentScopeId = instance && instance.type.__scopeId || null;\n return prev;\n}\nfunction pushScopeId(id) {\n currentScopeId = id;\n}\nfunction popScopeId() {\n currentScopeId = null;\n}\nconst withScopeId = (_id) => withCtx;\nfunction withCtx(fn, ctx = currentRenderingInstance, isNonScopedSlot) {\n if (!ctx)\n return fn;\n if (fn._n) {\n return fn;\n }\n const renderFnWithContext = (...args) => {\n if (renderFnWithContext._d) {\n setBlockTracking(-1);\n }\n const prevInstance = setCurrentRenderingInstance(ctx);\n let res;\n try {\n res = fn(...args);\n } finally {\n setCurrentRenderingInstance(prevInstance);\n if (renderFnWithContext._d) {\n setBlockTracking(1);\n }\n }\n if (!!(process.env.NODE_ENV !== \"production\") || __VUE_PROD_DEVTOOLS__) {\n devtoolsComponentUpdated(ctx);\n }\n return res;\n };\n renderFnWithContext._n = true;\n renderFnWithContext._c = true;\n renderFnWithContext._d = true;\n return renderFnWithContext;\n}\n\nlet accessedAttrs = false;\nfunction markAttrsAccessed() {\n accessedAttrs = true;\n}\nfunction renderComponentRoot(instance) {\n const {\n type: Component,\n vnode,\n proxy,\n withProxy,\n props,\n propsOptions: [propsOptions],\n slots,\n attrs,\n emit,\n render,\n renderCache,\n data,\n setupState,\n ctx,\n inheritAttrs\n } = instance;\n let result;\n let fallthroughAttrs;\n const prev = setCurrentRenderingInstance(instance);\n if (!!(process.env.NODE_ENV !== \"production\")) {\n accessedAttrs = false;\n }\n try {\n if (vnode.shapeFlag & 4) {\n const proxyToUse = withProxy || proxy;\n result = normalizeVNode(\n render.call(\n proxyToUse,\n proxyToUse,\n renderCache,\n props,\n setupState,\n data,\n ctx\n )\n );\n fallthroughAttrs = attrs;\n } else {\n const render2 = Component;\n if (!!(process.env.NODE_ENV !== \"production\") && attrs === props) {\n markAttrsAccessed();\n }\n result = normalizeVNode(\n render2.length > 1 ? render2(\n props,\n !!(process.env.NODE_ENV !== \"production\") ? {\n get attrs() {\n markAttrsAccessed();\n return attrs;\n },\n slots,\n emit\n } : { attrs, slots, emit }\n ) : render2(\n props,\n null\n /* we know it doesn't need it */\n )\n );\n fallthroughAttrs = Component.props ? attrs : getFunctionalFallthrough(attrs);\n }\n } catch (err) {\n blockStack.length = 0;\n handleError(err, instance, 1);\n result = createVNode(Comment);\n }\n let root = result;\n let setRoot = void 0;\n if (!!(process.env.NODE_ENV !== \"production\") && result.patchFlag > 0 && result.patchFlag & 2048) {\n [root, setRoot] = getChildRoot(result);\n }\n if (fallthroughAttrs && inheritAttrs !== false) {\n const keys = Object.keys(fallthroughAttrs);\n const { shapeFlag } = root;\n if (keys.length) {\n if (shapeFlag & (1 | 6)) {\n if (propsOptions && keys.some(isModelListener)) {\n fallthroughAttrs = filterModelListeners(\n fallthroughAttrs,\n propsOptions\n );\n }\n root = cloneVNode(root, fallthroughAttrs);\n } else if (!!(process.env.NODE_ENV !== \"production\") && !accessedAttrs && root.type !== Comment) {\n const allAttrs = Object.keys(attrs);\n const eventAttrs = [];\n const extraAttrs = [];\n for (let i = 0, l = allAttrs.length; i < l; i++) {\n const key = allAttrs[i];\n if (isOn(key)) {\n if (!isModelListener(key)) {\n eventAttrs.push(key[2].toLowerCase() + key.slice(3));\n }\n } else {\n extraAttrs.push(key);\n }\n }\n if (extraAttrs.length) {\n warn(\n `Extraneous non-props attributes (${extraAttrs.join(\", \")}) were passed to component but could not be automatically inherited because component renders fragment or text root nodes.`\n );\n }\n if (eventAttrs.length) {\n warn(\n `Extraneous non-emits event listeners (${eventAttrs.join(\", \")}) were passed to component but could not be automatically inherited because component renders fragment or text root nodes. If the listener is intended to be a component custom event listener only, declare it using the \"emits\" option.`\n );\n }\n }\n }\n }\n if (vnode.dirs) {\n if (!!(process.env.NODE_ENV !== \"production\") && !isElementRoot(root)) {\n warn(\n `Runtime directive used on component with non-element root node. The directives will not function as intended.`\n );\n }\n root = cloneVNode(root);\n root.dirs = root.dirs ? root.dirs.concat(vnode.dirs) : vnode.dirs;\n }\n if (vnode.transition) {\n if (!!(process.env.NODE_ENV !== \"production\") && !isElementRoot(root)) {\n warn(\n `Component inside renders non-element root node that cannot be animated.`\n );\n }\n root.transition = vnode.transition;\n }\n if (!!(process.env.NODE_ENV !== \"production\") && setRoot) {\n setRoot(root);\n } else {\n result = root;\n }\n setCurrentRenderingInstance(prev);\n return result;\n}\nconst getChildRoot = (vnode) => {\n const rawChildren = vnode.children;\n const dynamicChildren = vnode.dynamicChildren;\n const childRoot = filterSingleRoot(rawChildren);\n if (!childRoot) {\n return [vnode, void 0];\n }\n const index = rawChildren.indexOf(childRoot);\n const dynamicIndex = dynamicChildren ? dynamicChildren.indexOf(childRoot) : -1;\n const setRoot = (updatedRoot) => {\n rawChildren[index] = updatedRoot;\n if (dynamicChildren) {\n if (dynamicIndex > -1) {\n dynamicChildren[dynamicIndex] = updatedRoot;\n } else if (updatedRoot.patchFlag > 0) {\n vnode.dynamicChildren = [...dynamicChildren, updatedRoot];\n }\n }\n };\n return [normalizeVNode(childRoot), setRoot];\n};\nfunction filterSingleRoot(children) {\n let singleRoot;\n for (let i = 0; i < children.length; i++) {\n const child = children[i];\n if (isVNode(child)) {\n if (child.type !== Comment || child.children === \"v-if\") {\n if (singleRoot) {\n return;\n } else {\n singleRoot = child;\n }\n }\n } else {\n return;\n }\n }\n return singleRoot;\n}\nconst getFunctionalFallthrough = (attrs) => {\n let res;\n for (const key in attrs) {\n if (key === \"class\" || key === \"style\" || isOn(key)) {\n (res || (res = {}))[key] = attrs[key];\n }\n }\n return res;\n};\nconst filterModelListeners = (attrs, props) => {\n const res = {};\n for (const key in attrs) {\n if (!isModelListener(key) || !(key.slice(9) in props)) {\n res[key] = attrs[key];\n }\n }\n return res;\n};\nconst isElementRoot = (vnode) => {\n return vnode.shapeFlag & (6 | 1) || vnode.type === Comment;\n};\nfunction shouldUpdateComponent(prevVNode, nextVNode, optimized) {\n const { props: prevProps, children: prevChildren, component } = prevVNode;\n const { props: nextProps, children: nextChildren, patchFlag } = nextVNode;\n const emits = component.emitsOptions;\n if (!!(process.env.NODE_ENV !== \"production\") && (prevChildren || nextChildren) && isHmrUpdating) {\n return true;\n }\n if (nextVNode.dirs || nextVNode.transition) {\n return true;\n }\n if (optimized && patchFlag >= 0) {\n if (patchFlag & 1024) {\n return true;\n }\n if (patchFlag & 16) {\n if (!prevProps) {\n return !!nextProps;\n }\n return hasPropsChanged(prevProps, nextProps, emits);\n } else if (patchFlag & 8) {\n const dynamicProps = nextVNode.dynamicProps;\n for (let i = 0; i < dynamicProps.length; i++) {\n const key = dynamicProps[i];\n if (nextProps[key] !== prevProps[key] && !isEmitListener(emits, key)) {\n return true;\n }\n }\n }\n } else {\n if (prevChildren || nextChildren) {\n if (!nextChildren || !nextChildren.$stable) {\n return true;\n }\n }\n if (prevProps === nextProps) {\n return false;\n }\n if (!prevProps) {\n return !!nextProps;\n }\n if (!nextProps) {\n return true;\n }\n return hasPropsChanged(prevProps, nextProps, emits);\n }\n return false;\n}\nfunction hasPropsChanged(prevProps, nextProps, emitsOptions) {\n const nextKeys = Object.keys(nextProps);\n if (nextKeys.length !== Object.keys(prevProps).length) {\n return true;\n }\n for (let i = 0; i < nextKeys.length; i++) {\n const key = nextKeys[i];\n if (nextProps[key] !== prevProps[key] && !isEmitListener(emitsOptions, key)) {\n return true;\n }\n }\n return false;\n}\nfunction updateHOCHostEl({ vnode, parent }, el) {\n while (parent && parent.subTree === vnode) {\n (vnode = parent.vnode).el = el;\n parent = parent.parent;\n }\n}\n\nconst isSuspense = (type) => type.__isSuspense;\nconst SuspenseImpl = {\n name: \"Suspense\",\n // In order to make Suspense tree-shakable, we need to avoid importing it\n // directly in the renderer. The renderer checks for the __isSuspense flag\n // on a vnode's type and calls the `process` method, passing in renderer\n // internals.\n __isSuspense: true,\n process(n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, rendererInternals) {\n if (n1 == null) {\n mountSuspense(\n n2,\n container,\n anchor,\n parentComponent,\n parentSuspense,\n isSVG,\n slotScopeIds,\n optimized,\n rendererInternals\n );\n } else {\n patchSuspense(\n n1,\n n2,\n container,\n anchor,\n parentComponent,\n isSVG,\n slotScopeIds,\n optimized,\n rendererInternals\n );\n }\n },\n hydrate: hydrateSuspense,\n create: createSuspenseBoundary,\n normalize: normalizeSuspenseChildren\n};\nconst Suspense = SuspenseImpl ;\nfunction triggerEvent(vnode, name) {\n const eventListener = vnode.props && vnode.props[name];\n if (isFunction(eventListener)) {\n eventListener();\n }\n}\nfunction mountSuspense(vnode, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, rendererInternals) {\n const {\n p: patch,\n o: { createElement }\n } = rendererInternals;\n const hiddenContainer = createElement(\"div\");\n const suspense = vnode.suspense = createSuspenseBoundary(\n vnode,\n parentSuspense,\n parentComponent,\n container,\n hiddenContainer,\n anchor,\n isSVG,\n slotScopeIds,\n optimized,\n rendererInternals\n );\n patch(\n null,\n suspense.pendingBranch = vnode.ssContent,\n hiddenContainer,\n null,\n parentComponent,\n suspense,\n isSVG,\n slotScopeIds\n );\n if (suspense.deps > 0) {\n triggerEvent(vnode, \"onPending\");\n triggerEvent(vnode, \"onFallback\");\n patch(\n null,\n vnode.ssFallback,\n container,\n anchor,\n parentComponent,\n null,\n // fallback tree will not have suspense context\n isSVG,\n slotScopeIds\n );\n setActiveBranch(suspense, vnode.ssFallback);\n } else {\n suspense.resolve(false, true);\n }\n}\nfunction patchSuspense(n1, n2, container, anchor, parentComponent, isSVG, slotScopeIds, optimized, { p: patch, um: unmount, o: { createElement } }) {\n const suspense = n2.suspense = n1.suspense;\n suspense.vnode = n2;\n n2.el = n1.el;\n const newBranch = n2.ssContent;\n const newFallback = n2.ssFallback;\n const { activeBranch, pendingBranch, isInFallback, isHydrating } = suspense;\n if (pendingBranch) {\n suspense.pendingBranch = newBranch;\n if (isSameVNodeType(newBranch, pendingBranch)) {\n patch(\n pendingBranch,\n newBranch,\n suspense.hiddenContainer,\n null,\n parentComponent,\n suspense,\n isSVG,\n slotScopeIds,\n optimized\n );\n if (suspense.deps <= 0) {\n suspense.resolve();\n } else if (isInFallback) {\n patch(\n activeBranch,\n newFallback,\n container,\n anchor,\n parentComponent,\n null,\n // fallback tree will not have suspense context\n isSVG,\n slotScopeIds,\n optimized\n );\n setActiveBranch(suspense, newFallback);\n }\n } else {\n suspense.pendingId++;\n if (isHydrating) {\n suspense.isHydrating = false;\n suspense.activeBranch = pendingBranch;\n } else {\n unmount(pendingBranch, parentComponent, suspense);\n }\n suspense.deps = 0;\n suspense.effects.length = 0;\n suspense.hiddenContainer = createElement(\"div\");\n if (isInFallback) {\n patch(\n null,\n newBranch,\n suspense.hiddenContainer,\n null,\n parentComponent,\n suspense,\n isSVG,\n slotScopeIds,\n optimized\n );\n if (suspense.deps <= 0) {\n suspense.resolve();\n } else {\n patch(\n activeBranch,\n newFallback,\n container,\n anchor,\n parentComponent,\n null,\n // fallback tree will not have suspense context\n isSVG,\n slotScopeIds,\n optimized\n );\n setActiveBranch(suspense, newFallback);\n }\n } else if (activeBranch && isSameVNodeType(newBranch, activeBranch)) {\n patch(\n activeBranch,\n newBranch,\n container,\n anchor,\n parentComponent,\n suspense,\n isSVG,\n slotScopeIds,\n optimized\n );\n suspense.resolve(true);\n } else {\n patch(\n null,\n newBranch,\n suspense.hiddenContainer,\n null,\n parentComponent,\n suspense,\n isSVG,\n slotScopeIds,\n optimized\n );\n if (suspense.deps <= 0) {\n suspense.resolve();\n }\n }\n }\n } else {\n if (activeBranch && isSameVNodeType(newBranch, activeBranch)) {\n patch(\n activeBranch,\n newBranch,\n container,\n anchor,\n parentComponent,\n suspense,\n isSVG,\n slotScopeIds,\n optimized\n );\n setActiveBranch(suspense, newBranch);\n } else {\n triggerEvent(n2, \"onPending\");\n suspense.pendingBranch = newBranch;\n suspense.pendingId++;\n patch(\n null,\n newBranch,\n suspense.hiddenContainer,\n null,\n parentComponent,\n suspense,\n isSVG,\n slotScopeIds,\n optimized\n );\n if (suspense.deps <= 0) {\n suspense.resolve();\n } else {\n const { timeout, pendingId } = suspense;\n if (timeout > 0) {\n setTimeout(() => {\n if (suspense.pendingId === pendingId) {\n suspense.fallback(newFallback);\n }\n }, timeout);\n } else if (timeout === 0) {\n suspense.fallback(newFallback);\n }\n }\n }\n }\n}\nlet hasWarned = false;\nfunction createSuspenseBoundary(vnode, parentSuspense, parentComponent, container, hiddenContainer, anchor, isSVG, slotScopeIds, optimized, rendererInternals, isHydrating = false) {\n if (!!(process.env.NODE_ENV !== \"production\") && true && !hasWarned) {\n hasWarned = true;\n console[console.info ? \"info\" : \"log\"](\n ` is an experimental feature and its API will likely change.`\n );\n }\n const {\n p: patch,\n m: move,\n um: unmount,\n n: next,\n o: { parentNode, remove }\n } = rendererInternals;\n let parentSuspenseId;\n const isSuspensible = isVNodeSuspensible(vnode);\n if (isSuspensible) {\n if (parentSuspense == null ? void 0 : parentSuspense.pendingBranch) {\n parentSuspenseId = parentSuspense.pendingId;\n parentSuspense.deps++;\n }\n }\n const timeout = vnode.props ? toNumber(vnode.props.timeout) : void 0;\n if (!!(process.env.NODE_ENV !== \"production\")) {\n assertNumber(timeout, `Suspense timeout`);\n }\n const suspense = {\n vnode,\n parent: parentSuspense,\n parentComponent,\n isSVG,\n container,\n hiddenContainer,\n anchor,\n deps: 0,\n pendingId: 0,\n timeout: typeof timeout === \"number\" ? timeout : -1,\n activeBranch: null,\n pendingBranch: null,\n isInFallback: true,\n isHydrating,\n isUnmounted: false,\n effects: [],\n resolve(resume = false, sync = false) {\n if (!!(process.env.NODE_ENV !== \"production\")) {\n if (!resume && !suspense.pendingBranch) {\n throw new Error(\n `suspense.resolve() is called without a pending branch.`\n );\n }\n if (suspense.isUnmounted) {\n throw new Error(\n `suspense.resolve() is called on an already unmounted suspense boundary.`\n );\n }\n }\n const {\n vnode: vnode2,\n activeBranch,\n pendingBranch,\n pendingId,\n effects,\n parentComponent: parentComponent2,\n container: container2\n } = suspense;\n if (suspense.isHydrating) {\n suspense.isHydrating = false;\n } else if (!resume) {\n const delayEnter = activeBranch && pendingBranch.transition && pendingBranch.transition.mode === \"out-in\";\n if (delayEnter) {\n activeBranch.transition.afterLeave = () => {\n if (pendingId === suspense.pendingId) {\n move(pendingBranch, container2, anchor2, 0);\n }\n };\n }\n let { anchor: anchor2 } = suspense;\n if (activeBranch) {\n anchor2 = next(activeBranch);\n unmount(activeBranch, parentComponent2, suspense, true);\n }\n if (!delayEnter) {\n move(pendingBranch, container2, anchor2, 0);\n }\n }\n setActiveBranch(suspense, pendingBranch);\n suspense.pendingBranch = null;\n suspense.isInFallback = false;\n let parent = suspense.parent;\n let hasUnresolvedAncestor = false;\n while (parent) {\n if (parent.pendingBranch) {\n parent.effects.push(...effects);\n hasUnresolvedAncestor = true;\n break;\n }\n parent = parent.parent;\n }\n if (!hasUnresolvedAncestor) {\n queuePostFlushCb(effects);\n }\n suspense.effects = [];\n if (isSuspensible) {\n if (parentSuspense && parentSuspense.pendingBranch && parentSuspenseId === parentSuspense.pendingId) {\n parentSuspense.deps--;\n if (parentSuspense.deps === 0 && !sync) {\n parentSuspense.resolve();\n }\n }\n }\n triggerEvent(vnode2, \"onResolve\");\n },\n fallback(fallbackVNode) {\n if (!suspense.pendingBranch) {\n return;\n }\n const { vnode: vnode2, activeBranch, parentComponent: parentComponent2, container: container2, isSVG: isSVG2 } = suspense;\n triggerEvent(vnode2, \"onFallback\");\n const anchor2 = next(activeBranch);\n const mountFallback = () => {\n if (!suspense.isInFallback) {\n return;\n }\n patch(\n null,\n fallbackVNode,\n container2,\n anchor2,\n parentComponent2,\n null,\n // fallback tree will not have suspense context\n isSVG2,\n slotScopeIds,\n optimized\n );\n setActiveBranch(suspense, fallbackVNode);\n };\n const delayEnter = fallbackVNode.transition && fallbackVNode.transition.mode === \"out-in\";\n if (delayEnter) {\n activeBranch.transition.afterLeave = mountFallback;\n }\n suspense.isInFallback = true;\n unmount(\n activeBranch,\n parentComponent2,\n null,\n // no suspense so unmount hooks fire now\n true\n // shouldRemove\n );\n if (!delayEnter) {\n mountFallback();\n }\n },\n move(container2, anchor2, type) {\n suspense.activeBranch && move(suspense.activeBranch, container2, anchor2, type);\n suspense.container = container2;\n },\n next() {\n return suspense.activeBranch && next(suspense.activeBranch);\n },\n registerDep(instance, setupRenderEffect) {\n const isInPendingSuspense = !!suspense.pendingBranch;\n if (isInPendingSuspense) {\n suspense.deps++;\n }\n const hydratedEl = instance.vnode.el;\n instance.asyncDep.catch((err) => {\n handleError(err, instance, 0);\n }).then((asyncSetupResult) => {\n if (instance.isUnmounted || suspense.isUnmounted || suspense.pendingId !== instance.suspenseId) {\n return;\n }\n instance.asyncResolved = true;\n const { vnode: vnode2 } = instance;\n if (!!(process.env.NODE_ENV !== \"production\")) {\n pushWarningContext(vnode2);\n }\n handleSetupResult(instance, asyncSetupResult, false);\n if (hydratedEl) {\n vnode2.el = hydratedEl;\n }\n const placeholder = !hydratedEl && instance.subTree.el;\n setupRenderEffect(\n instance,\n vnode2,\n // component may have been moved before resolve.\n // if this is not a hydration, instance.subTree will be the comment\n // placeholder.\n parentNode(hydratedEl || instance.subTree.el),\n // anchor will not be used if this is hydration, so only need to\n // consider the comment placeholder case.\n hydratedEl ? null : next(instance.subTree),\n suspense,\n isSVG,\n optimized\n );\n if (placeholder) {\n remove(placeholder);\n }\n updateHOCHostEl(instance, vnode2.el);\n if (!!(process.env.NODE_ENV !== \"production\")) {\n popWarningContext();\n }\n if (isInPendingSuspense && --suspense.deps === 0) {\n suspense.resolve();\n }\n });\n },\n unmount(parentSuspense2, doRemove) {\n suspense.isUnmounted = true;\n if (suspense.activeBranch) {\n unmount(\n suspense.activeBranch,\n parentComponent,\n parentSuspense2,\n doRemove\n );\n }\n if (suspense.pendingBranch) {\n unmount(\n suspense.pendingBranch,\n parentComponent,\n parentSuspense2,\n doRemove\n );\n }\n }\n };\n return suspense;\n}\nfunction hydrateSuspense(node, vnode, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, rendererInternals, hydrateNode) {\n const suspense = vnode.suspense = createSuspenseBoundary(\n vnode,\n parentSuspense,\n parentComponent,\n node.parentNode,\n document.createElement(\"div\"),\n null,\n isSVG,\n slotScopeIds,\n optimized,\n rendererInternals,\n true\n /* hydrating */\n );\n const result = hydrateNode(\n node,\n suspense.pendingBranch = vnode.ssContent,\n parentComponent,\n suspense,\n slotScopeIds,\n optimized\n );\n if (suspense.deps === 0) {\n suspense.resolve(false, true);\n }\n return result;\n}\nfunction normalizeSuspenseChildren(vnode) {\n const { shapeFlag, children } = vnode;\n const isSlotChildren = shapeFlag & 32;\n vnode.ssContent = normalizeSuspenseSlot(\n isSlotChildren ? children.default : children\n );\n vnode.ssFallback = isSlotChildren ? normalizeSuspenseSlot(children.fallback) : createVNode(Comment);\n}\nfunction normalizeSuspenseSlot(s) {\n let block;\n if (isFunction(s)) {\n const trackBlock = isBlockTreeEnabled && s._c;\n if (trackBlock) {\n s._d = false;\n openBlock();\n }\n s = s();\n if (trackBlock) {\n s._d = true;\n block = currentBlock;\n closeBlock();\n }\n }\n if (isArray(s)) {\n const singleChild = filterSingleRoot(s);\n if (!!(process.env.NODE_ENV !== \"production\") && !singleChild) {\n warn(` slots expect a single root node.`);\n }\n s = singleChild;\n }\n s = normalizeVNode(s);\n if (block && !s.dynamicChildren) {\n s.dynamicChildren = block.filter((c) => c !== s);\n }\n return s;\n}\nfunction queueEffectWithSuspense(fn, suspense) {\n if (suspense && suspense.pendingBranch) {\n if (isArray(fn)) {\n suspense.effects.push(...fn);\n } else {\n suspense.effects.push(fn);\n }\n } else {\n queuePostFlushCb(fn);\n }\n}\nfunction setActiveBranch(suspense, branch) {\n suspense.activeBranch = branch;\n const { vnode, parentComponent } = suspense;\n const el = vnode.el = branch.el;\n if (parentComponent && parentComponent.subTree === vnode) {\n parentComponent.vnode.el = el;\n updateHOCHostEl(parentComponent, el);\n }\n}\nfunction isVNodeSuspensible(vnode) {\n var _a;\n return ((_a = vnode.props) == null ? void 0 : _a.suspensible) != null && vnode.props.suspensible !== false;\n}\n\nfunction watchEffect(effect, options) {\n return doWatch(effect, null, options);\n}\nfunction watchPostEffect(effect, options) {\n return doWatch(\n effect,\n null,\n !!(process.env.NODE_ENV !== \"production\") ? extend({}, options, { flush: \"post\" }) : { flush: \"post\" }\n );\n}\nfunction watchSyncEffect(effect, options) {\n return doWatch(\n effect,\n null,\n !!(process.env.NODE_ENV !== \"production\") ? extend({}, options, { flush: \"sync\" }) : { flush: \"sync\" }\n );\n}\nconst INITIAL_WATCHER_VALUE = {};\nfunction watch(source, cb, options) {\n if (!!(process.env.NODE_ENV !== \"production\") && !isFunction(cb)) {\n warn(\n `\\`watch(fn, options?)\\` signature has been moved to a separate API. Use \\`watchEffect(fn, options?)\\` instead. \\`watch\\` now only supports \\`watch(source, cb, options?) signature.`\n );\n }\n return doWatch(source, cb, options);\n}\nfunction doWatch(source, cb, { immediate, deep, flush, onTrack, onTrigger } = EMPTY_OBJ) {\n var _a;\n if (!!(process.env.NODE_ENV !== \"production\") && !cb) {\n if (immediate !== void 0) {\n warn(\n `watch() \"immediate\" option is only respected when using the watch(source, callback, options?) signature.`\n );\n }\n if (deep !== void 0) {\n warn(\n `watch() \"deep\" option is only respected when using the watch(source, callback, options?) signature.`\n );\n }\n }\n const warnInvalidSource = (s) => {\n warn(\n `Invalid watch source: `,\n s,\n `A watch source can only be a getter/effect function, a ref, a reactive object, or an array of these types.`\n );\n };\n const instance = getCurrentScope() === ((_a = currentInstance) == null ? void 0 : _a.scope) ? currentInstance : null;\n let getter;\n let forceTrigger = false;\n let isMultiSource = false;\n if (isRef(source)) {\n getter = () => source.value;\n forceTrigger = isShallow$1(source);\n } else if (isReactive(source)) {\n getter = () => source;\n deep = true;\n } else if (isArray(source)) {\n isMultiSource = true;\n forceTrigger = source.some((s) => isReactive(s) || isShallow$1(s));\n getter = () => source.map((s) => {\n if (isRef(s)) {\n return s.value;\n } else if (isReactive(s)) {\n return traverse(s);\n } else if (isFunction(s)) {\n return callWithErrorHandling(s, instance, 2);\n } else {\n !!(process.env.NODE_ENV !== \"production\") && warnInvalidSource(s);\n }\n });\n } else if (isFunction(source)) {\n if (cb) {\n getter = () => callWithErrorHandling(source, instance, 2);\n } else {\n getter = () => {\n if (instance && instance.isUnmounted) {\n return;\n }\n if (cleanup) {\n cleanup();\n }\n return callWithAsyncErrorHandling(\n source,\n instance,\n 3,\n [onCleanup]\n );\n };\n }\n } else {\n getter = NOOP;\n !!(process.env.NODE_ENV !== \"production\") && warnInvalidSource(source);\n }\n if (cb && deep) {\n const baseGetter = getter;\n getter = () => traverse(baseGetter());\n }\n let cleanup;\n let onCleanup = (fn) => {\n cleanup = effect.onStop = () => {\n callWithErrorHandling(fn, instance, 4);\n };\n };\n let ssrCleanup;\n if (isInSSRComponentSetup) {\n onCleanup = NOOP;\n if (!cb) {\n getter();\n } else if (immediate) {\n callWithAsyncErrorHandling(cb, instance, 3, [\n getter(),\n isMultiSource ? [] : void 0,\n onCleanup\n ]);\n }\n if (flush === \"sync\") {\n const ctx = useSSRContext();\n ssrCleanup = ctx.__watcherHandles || (ctx.__watcherHandles = []);\n } else {\n return NOOP;\n }\n }\n let oldValue = isMultiSource ? new Array(source.length).fill(INITIAL_WATCHER_VALUE) : INITIAL_WATCHER_VALUE;\n const job = () => {\n if (!effect.active) {\n return;\n }\n if (cb) {\n const newValue = effect.run();\n if (deep || forceTrigger || (isMultiSource ? newValue.some(\n (v, i) => hasChanged(v, oldValue[i])\n ) : hasChanged(newValue, oldValue)) || false) {\n if (cleanup) {\n cleanup();\n }\n callWithAsyncErrorHandling(cb, instance, 3, [\n newValue,\n // pass undefined as the old value when it's changed for the first time\n oldValue === INITIAL_WATCHER_VALUE ? void 0 : isMultiSource && oldValue[0] === INITIAL_WATCHER_VALUE ? [] : oldValue,\n onCleanup\n ]);\n oldValue = newValue;\n }\n } else {\n effect.run();\n }\n };\n job.allowRecurse = !!cb;\n let scheduler;\n if (flush === \"sync\") {\n scheduler = job;\n } else if (flush === \"post\") {\n scheduler = () => queuePostRenderEffect(job, instance && instance.suspense);\n } else {\n job.pre = true;\n if (instance)\n job.id = instance.uid;\n scheduler = () => queueJob(job);\n }\n const effect = new ReactiveEffect(getter, scheduler);\n if (!!(process.env.NODE_ENV !== \"production\")) {\n effect.onTrack = onTrack;\n effect.onTrigger = onTrigger;\n }\n if (cb) {\n if (immediate) {\n job();\n } else {\n oldValue = effect.run();\n }\n } else if (flush === \"post\") {\n queuePostRenderEffect(\n effect.run.bind(effect),\n instance && instance.suspense\n );\n } else {\n effect.run();\n }\n const unwatch = () => {\n effect.stop();\n if (instance && instance.scope) {\n remove(instance.scope.effects, effect);\n }\n };\n if (ssrCleanup)\n ssrCleanup.push(unwatch);\n return unwatch;\n}\nfunction instanceWatch(source, value, options) {\n const publicThis = this.proxy;\n const getter = isString(source) ? source.includes(\".\") ? createPathGetter(publicThis, source) : () => publicThis[source] : source.bind(publicThis, publicThis);\n let cb;\n if (isFunction(value)) {\n cb = value;\n } else {\n cb = value.handler;\n options = value;\n }\n const cur = currentInstance;\n setCurrentInstance(this);\n const res = doWatch(getter, cb.bind(publicThis), options);\n if (cur) {\n setCurrentInstance(cur);\n } else {\n unsetCurrentInstance();\n }\n return res;\n}\nfunction createPathGetter(ctx, path) {\n const segments = path.split(\".\");\n return () => {\n let cur = ctx;\n for (let i = 0; i < segments.length && cur; i++) {\n cur = cur[segments[i]];\n }\n return cur;\n };\n}\nfunction traverse(value, seen) {\n if (!isObject(value) || value[\"__v_skip\"]) {\n return value;\n }\n seen = seen || /* @__PURE__ */ new Set();\n if (seen.has(value)) {\n return value;\n }\n seen.add(value);\n if (isRef(value)) {\n traverse(value.value, seen);\n } else if (isArray(value)) {\n for (let i = 0; i < value.length; i++) {\n traverse(value[i], seen);\n }\n } else if (isSet(value) || isMap(value)) {\n value.forEach((v) => {\n traverse(v, seen);\n });\n } else if (isPlainObject(value)) {\n for (const key in value) {\n traverse(value[key], seen);\n }\n }\n return value;\n}\n\nfunction validateDirectiveName(name) {\n if (isBuiltInDirective(name)) {\n warn(\"Do not use built-in directive ids as custom directive id: \" + name);\n }\n}\nfunction withDirectives(vnode, directives) {\n const internalInstance = currentRenderingInstance;\n if (internalInstance === null) {\n !!(process.env.NODE_ENV !== \"production\") && warn(`withDirectives can only be used inside render functions.`);\n return vnode;\n }\n const instance = getExposeProxy(internalInstance) || internalInstance.proxy;\n const bindings = vnode.dirs || (vnode.dirs = []);\n for (let i = 0; i < directives.length; i++) {\n let [dir, value, arg, modifiers = EMPTY_OBJ] = directives[i];\n if (dir) {\n if (isFunction(dir)) {\n dir = {\n mounted: dir,\n updated: dir\n };\n }\n if (dir.deep) {\n traverse(value);\n }\n bindings.push({\n dir,\n instance,\n value,\n oldValue: void 0,\n arg,\n modifiers\n });\n }\n }\n return vnode;\n}\nfunction invokeDirectiveHook(vnode, prevVNode, instance, name) {\n const bindings = vnode.dirs;\n const oldBindings = prevVNode && prevVNode.dirs;\n for (let i = 0; i < bindings.length; i++) {\n const binding = bindings[i];\n if (oldBindings) {\n binding.oldValue = oldBindings[i].value;\n }\n let hook = binding.dir[name];\n if (hook) {\n pauseTracking();\n callWithAsyncErrorHandling(hook, instance, 8, [\n vnode.el,\n binding,\n vnode,\n prevVNode\n ]);\n resetTracking();\n }\n }\n}\n\nfunction useTransitionState() {\n const state = {\n isMounted: false,\n isLeaving: false,\n isUnmounting: false,\n leavingVNodes: /* @__PURE__ */ new Map()\n };\n onMounted(() => {\n state.isMounted = true;\n });\n onBeforeUnmount(() => {\n state.isUnmounting = true;\n });\n return state;\n}\nconst TransitionHookValidator = [Function, Array];\nconst BaseTransitionPropsValidators = {\n mode: String,\n appear: Boolean,\n persisted: Boolean,\n // enter\n onBeforeEnter: TransitionHookValidator,\n onEnter: TransitionHookValidator,\n onAfterEnter: TransitionHookValidator,\n onEnterCancelled: TransitionHookValidator,\n // leave\n onBeforeLeave: TransitionHookValidator,\n onLeave: TransitionHookValidator,\n onAfterLeave: TransitionHookValidator,\n onLeaveCancelled: TransitionHookValidator,\n // appear\n onBeforeAppear: TransitionHookValidator,\n onAppear: TransitionHookValidator,\n onAfterAppear: TransitionHookValidator,\n onAppearCancelled: TransitionHookValidator\n};\nconst BaseTransitionImpl = {\n name: `BaseTransition`,\n props: BaseTransitionPropsValidators,\n setup(props, { slots }) {\n const instance = getCurrentInstance();\n const state = useTransitionState();\n let prevTransitionKey;\n return () => {\n const children = slots.default && getTransitionRawChildren(slots.default(), true);\n if (!children || !children.length) {\n return;\n }\n let child = children[0];\n if (children.length > 1) {\n let hasFound = false;\n for (const c of children) {\n if (c.type !== Comment) {\n if (!!(process.env.NODE_ENV !== \"production\") && hasFound) {\n warn(\n \" can only be used on a single element or component. Use for lists.\"\n );\n break;\n }\n child = c;\n hasFound = true;\n if (!!!(process.env.NODE_ENV !== \"production\"))\n break;\n }\n }\n }\n const rawProps = toRaw(props);\n const { mode } = rawProps;\n if (!!(process.env.NODE_ENV !== \"production\") && mode && mode !== \"in-out\" && mode !== \"out-in\" && mode !== \"default\") {\n warn(`invalid mode: ${mode}`);\n }\n if (state.isLeaving) {\n return emptyPlaceholder(child);\n }\n const innerChild = getKeepAliveChild(child);\n if (!innerChild) {\n return emptyPlaceholder(child);\n }\n const enterHooks = resolveTransitionHooks(\n innerChild,\n rawProps,\n state,\n instance\n );\n setTransitionHooks(innerChild, enterHooks);\n const oldChild = instance.subTree;\n const oldInnerChild = oldChild && getKeepAliveChild(oldChild);\n let transitionKeyChanged = false;\n const { getTransitionKey } = innerChild.type;\n if (getTransitionKey) {\n const key = getTransitionKey();\n if (prevTransitionKey === void 0) {\n prevTransitionKey = key;\n } else if (key !== prevTransitionKey) {\n prevTransitionKey = key;\n transitionKeyChanged = true;\n }\n }\n if (oldInnerChild && oldInnerChild.type !== Comment && (!isSameVNodeType(innerChild, oldInnerChild) || transitionKeyChanged)) {\n const leavingHooks = resolveTransitionHooks(\n oldInnerChild,\n rawProps,\n state,\n instance\n );\n setTransitionHooks(oldInnerChild, leavingHooks);\n if (mode === \"out-in\") {\n state.isLeaving = true;\n leavingHooks.afterLeave = () => {\n state.isLeaving = false;\n if (instance.update.active !== false) {\n instance.update();\n }\n };\n return emptyPlaceholder(child);\n } else if (mode === \"in-out\" && innerChild.type !== Comment) {\n leavingHooks.delayLeave = (el, earlyRemove, delayedLeave) => {\n const leavingVNodesCache = getLeavingNodesForType(\n state,\n oldInnerChild\n );\n leavingVNodesCache[String(oldInnerChild.key)] = oldInnerChild;\n el._leaveCb = () => {\n earlyRemove();\n el._leaveCb = void 0;\n delete enterHooks.delayedLeave;\n };\n enterHooks.delayedLeave = delayedLeave;\n };\n }\n }\n return child;\n };\n }\n};\nconst BaseTransition = BaseTransitionImpl;\nfunction getLeavingNodesForType(state, vnode) {\n const { leavingVNodes } = state;\n let leavingVNodesCache = leavingVNodes.get(vnode.type);\n if (!leavingVNodesCache) {\n leavingVNodesCache = /* @__PURE__ */ Object.create(null);\n leavingVNodes.set(vnode.type, leavingVNodesCache);\n }\n return leavingVNodesCache;\n}\nfunction resolveTransitionHooks(vnode, props, state, instance) {\n const {\n appear,\n mode,\n persisted = false,\n onBeforeEnter,\n onEnter,\n onAfterEnter,\n onEnterCancelled,\n onBeforeLeave,\n onLeave,\n onAfterLeave,\n onLeaveCancelled,\n onBeforeAppear,\n onAppear,\n onAfterAppear,\n onAppearCancelled\n } = props;\n const key = String(vnode.key);\n const leavingVNodesCache = getLeavingNodesForType(state, vnode);\n const callHook = (hook, args) => {\n hook && callWithAsyncErrorHandling(\n hook,\n instance,\n 9,\n args\n );\n };\n const callAsyncHook = (hook, args) => {\n const done = args[1];\n callHook(hook, args);\n if (isArray(hook)) {\n if (hook.every((hook2) => hook2.length <= 1))\n done();\n } else if (hook.length <= 1) {\n done();\n }\n };\n const hooks = {\n mode,\n persisted,\n beforeEnter(el) {\n let hook = onBeforeEnter;\n if (!state.isMounted) {\n if (appear) {\n hook = onBeforeAppear || onBeforeEnter;\n } else {\n return;\n }\n }\n if (el._leaveCb) {\n el._leaveCb(\n true\n /* cancelled */\n );\n }\n const leavingVNode = leavingVNodesCache[key];\n if (leavingVNode && isSameVNodeType(vnode, leavingVNode) && leavingVNode.el._leaveCb) {\n leavingVNode.el._leaveCb();\n }\n callHook(hook, [el]);\n },\n enter(el) {\n let hook = onEnter;\n let afterHook = onAfterEnter;\n let cancelHook = onEnterCancelled;\n if (!state.isMounted) {\n if (appear) {\n hook = onAppear || onEnter;\n afterHook = onAfterAppear || onAfterEnter;\n cancelHook = onAppearCancelled || onEnterCancelled;\n } else {\n return;\n }\n }\n let called = false;\n const done = el._enterCb = (cancelled) => {\n if (called)\n return;\n called = true;\n if (cancelled) {\n callHook(cancelHook, [el]);\n } else {\n callHook(afterHook, [el]);\n }\n if (hooks.delayedLeave) {\n hooks.delayedLeave();\n }\n el._enterCb = void 0;\n };\n if (hook) {\n callAsyncHook(hook, [el, done]);\n } else {\n done();\n }\n },\n leave(el, remove) {\n const key2 = String(vnode.key);\n if (el._enterCb) {\n el._enterCb(\n true\n /* cancelled */\n );\n }\n if (state.isUnmounting) {\n return remove();\n }\n callHook(onBeforeLeave, [el]);\n let called = false;\n const done = el._leaveCb = (cancelled) => {\n if (called)\n return;\n called = true;\n remove();\n if (cancelled) {\n callHook(onLeaveCancelled, [el]);\n } else {\n callHook(onAfterLeave, [el]);\n }\n el._leaveCb = void 0;\n if (leavingVNodesCache[key2] === vnode) {\n delete leavingVNodesCache[key2];\n }\n };\n leavingVNodesCache[key2] = vnode;\n if (onLeave) {\n callAsyncHook(onLeave, [el, done]);\n } else {\n done();\n }\n },\n clone(vnode2) {\n return resolveTransitionHooks(vnode2, props, state, instance);\n }\n };\n return hooks;\n}\nfunction emptyPlaceholder(vnode) {\n if (isKeepAlive(vnode)) {\n vnode = cloneVNode(vnode);\n vnode.children = null;\n return vnode;\n }\n}\nfunction getKeepAliveChild(vnode) {\n return isKeepAlive(vnode) ? vnode.children ? vnode.children[0] : void 0 : vnode;\n}\nfunction setTransitionHooks(vnode, hooks) {\n if (vnode.shapeFlag & 6 && vnode.component) {\n setTransitionHooks(vnode.component.subTree, hooks);\n } else if (vnode.shapeFlag & 128) {\n vnode.ssContent.transition = hooks.clone(vnode.ssContent);\n vnode.ssFallback.transition = hooks.clone(vnode.ssFallback);\n } else {\n vnode.transition = hooks;\n }\n}\nfunction getTransitionRawChildren(children, keepComment = false, parentKey) {\n let ret = [];\n let keyedFragmentCount = 0;\n for (let i = 0; i < children.length; i++) {\n let child = children[i];\n const key = parentKey == null ? child.key : String(parentKey) + String(child.key != null ? child.key : i);\n if (child.type === Fragment) {\n if (child.patchFlag & 128)\n keyedFragmentCount++;\n ret = ret.concat(\n getTransitionRawChildren(child.children, keepComment, key)\n );\n } else if (keepComment || child.type !== Comment) {\n ret.push(key != null ? cloneVNode(child, { key }) : child);\n }\n }\n if (keyedFragmentCount > 1) {\n for (let i = 0; i < ret.length; i++) {\n ret[i].patchFlag = -2;\n }\n }\n return ret;\n}\n\nfunction defineComponent(options, extraOptions) {\n return isFunction(options) ? (\n // #8326: extend call and options.name access are considered side-effects\n // by Rollup, so we have to wrap it in a pure-annotated IIFE.\n /* @__PURE__ */ (() => extend({ name: options.name }, extraOptions, { setup: options }))()\n ) : options;\n}\n\nconst isAsyncWrapper = (i) => !!i.type.__asyncLoader;\nfunction defineAsyncComponent(source) {\n if (isFunction(source)) {\n source = { loader: source };\n }\n const {\n loader,\n loadingComponent,\n errorComponent,\n delay = 200,\n timeout,\n // undefined = never times out\n suspensible = true,\n onError: userOnError\n } = source;\n let pendingRequest = null;\n let resolvedComp;\n let retries = 0;\n const retry = () => {\n retries++;\n pendingRequest = null;\n return load();\n };\n const load = () => {\n let thisRequest;\n return pendingRequest || (thisRequest = pendingRequest = loader().catch((err) => {\n err = err instanceof Error ? err : new Error(String(err));\n if (userOnError) {\n return new Promise((resolve, reject) => {\n const userRetry = () => resolve(retry());\n const userFail = () => reject(err);\n userOnError(err, userRetry, userFail, retries + 1);\n });\n } else {\n throw err;\n }\n }).then((comp) => {\n if (thisRequest !== pendingRequest && pendingRequest) {\n return pendingRequest;\n }\n if (!!(process.env.NODE_ENV !== \"production\") && !comp) {\n warn(\n `Async component loader resolved to undefined. If you are using retry(), make sure to return its return value.`\n );\n }\n if (comp && (comp.__esModule || comp[Symbol.toStringTag] === \"Module\")) {\n comp = comp.default;\n }\n if (!!(process.env.NODE_ENV !== \"production\") && comp && !isObject(comp) && !isFunction(comp)) {\n throw new Error(`Invalid async component load result: ${comp}`);\n }\n resolvedComp = comp;\n return comp;\n }));\n };\n return defineComponent({\n name: \"AsyncComponentWrapper\",\n __asyncLoader: load,\n get __asyncResolved() {\n return resolvedComp;\n },\n setup() {\n const instance = currentInstance;\n if (resolvedComp) {\n return () => createInnerComp(resolvedComp, instance);\n }\n const onError = (err) => {\n pendingRequest = null;\n handleError(\n err,\n instance,\n 13,\n !errorComponent\n /* do not throw in dev if user provided error component */\n );\n };\n if (suspensible && instance.suspense || isInSSRComponentSetup) {\n return load().then((comp) => {\n return () => createInnerComp(comp, instance);\n }).catch((err) => {\n onError(err);\n return () => errorComponent ? createVNode(errorComponent, {\n error: err\n }) : null;\n });\n }\n const loaded = ref(false);\n const error = ref();\n const delayed = ref(!!delay);\n if (delay) {\n setTimeout(() => {\n delayed.value = false;\n }, delay);\n }\n if (timeout != null) {\n setTimeout(() => {\n if (!loaded.value && !error.value) {\n const err = new Error(\n `Async component timed out after ${timeout}ms.`\n );\n onError(err);\n error.value = err;\n }\n }, timeout);\n }\n load().then(() => {\n loaded.value = true;\n if (instance.parent && isKeepAlive(instance.parent.vnode)) {\n queueJob(instance.parent.update);\n }\n }).catch((err) => {\n onError(err);\n error.value = err;\n });\n return () => {\n if (loaded.value && resolvedComp) {\n return createInnerComp(resolvedComp, instance);\n } else if (error.value && errorComponent) {\n return createVNode(errorComponent, {\n error: error.value\n });\n } else if (loadingComponent && !delayed.value) {\n return createVNode(loadingComponent);\n }\n };\n }\n });\n}\nfunction createInnerComp(comp, parent) {\n const { ref: ref2, props, children, ce } = parent.vnode;\n const vnode = createVNode(comp, props, children);\n vnode.ref = ref2;\n vnode.ce = ce;\n delete parent.vnode.ce;\n return vnode;\n}\n\nconst isKeepAlive = (vnode) => vnode.type.__isKeepAlive;\nconst KeepAliveImpl = {\n name: `KeepAlive`,\n // Marker for special handling inside the renderer. We are not using a ===\n // check directly on KeepAlive in the renderer, because importing it directly\n // would prevent it from being tree-shaken.\n __isKeepAlive: true,\n props: {\n include: [String, RegExp, Array],\n exclude: [String, RegExp, Array],\n max: [String, Number]\n },\n setup(props, { slots }) {\n const instance = getCurrentInstance();\n const sharedContext = instance.ctx;\n if (!sharedContext.renderer) {\n return () => {\n const children = slots.default && slots.default();\n return children && children.length === 1 ? children[0] : children;\n };\n }\n const cache = /* @__PURE__ */ new Map();\n const keys = /* @__PURE__ */ new Set();\n let current = null;\n if (!!(process.env.NODE_ENV !== \"production\") || __VUE_PROD_DEVTOOLS__) {\n instance.__v_cache = cache;\n }\n const parentSuspense = instance.suspense;\n const {\n renderer: {\n p: patch,\n m: move,\n um: _unmount,\n o: { createElement }\n }\n } = sharedContext;\n const storageContainer = createElement(\"div\");\n sharedContext.activate = (vnode, container, anchor, isSVG, optimized) => {\n const instance2 = vnode.component;\n move(vnode, container, anchor, 0, parentSuspense);\n patch(\n instance2.vnode,\n vnode,\n container,\n anchor,\n instance2,\n parentSuspense,\n isSVG,\n vnode.slotScopeIds,\n optimized\n );\n queuePostRenderEffect(() => {\n instance2.isDeactivated = false;\n if (instance2.a) {\n invokeArrayFns(instance2.a);\n }\n const vnodeHook = vnode.props && vnode.props.onVnodeMounted;\n if (vnodeHook) {\n invokeVNodeHook(vnodeHook, instance2.parent, vnode);\n }\n }, parentSuspense);\n if (!!(process.env.NODE_ENV !== \"production\") || __VUE_PROD_DEVTOOLS__) {\n devtoolsComponentAdded(instance2);\n }\n };\n sharedContext.deactivate = (vnode) => {\n const instance2 = vnode.component;\n move(vnode, storageContainer, null, 1, parentSuspense);\n queuePostRenderEffect(() => {\n if (instance2.da) {\n invokeArrayFns(instance2.da);\n }\n const vnodeHook = vnode.props && vnode.props.onVnodeUnmounted;\n if (vnodeHook) {\n invokeVNodeHook(vnodeHook, instance2.parent, vnode);\n }\n instance2.isDeactivated = true;\n }, parentSuspense);\n if (!!(process.env.NODE_ENV !== \"production\") || __VUE_PROD_DEVTOOLS__) {\n devtoolsComponentAdded(instance2);\n }\n };\n function unmount(vnode) {\n resetShapeFlag(vnode);\n _unmount(vnode, instance, parentSuspense, true);\n }\n function pruneCache(filter) {\n cache.forEach((vnode, key) => {\n const name = getComponentName(vnode.type);\n if (name && (!filter || !filter(name))) {\n pruneCacheEntry(key);\n }\n });\n }\n function pruneCacheEntry(key) {\n const cached = cache.get(key);\n if (!current || !isSameVNodeType(cached, current)) {\n unmount(cached);\n } else if (current) {\n resetShapeFlag(current);\n }\n cache.delete(key);\n keys.delete(key);\n }\n watch(\n () => [props.include, props.exclude],\n ([include, exclude]) => {\n include && pruneCache((name) => matches(include, name));\n exclude && pruneCache((name) => !matches(exclude, name));\n },\n // prune post-render after `current` has been updated\n { flush: \"post\", deep: true }\n );\n let pendingCacheKey = null;\n const cacheSubtree = () => {\n if (pendingCacheKey != null) {\n cache.set(pendingCacheKey, getInnerChild(instance.subTree));\n }\n };\n onMounted(cacheSubtree);\n onUpdated(cacheSubtree);\n onBeforeUnmount(() => {\n cache.forEach((cached) => {\n const { subTree, suspense } = instance;\n const vnode = getInnerChild(subTree);\n if (cached.type === vnode.type && cached.key === vnode.key) {\n resetShapeFlag(vnode);\n const da = vnode.component.da;\n da && queuePostRenderEffect(da, suspense);\n return;\n }\n unmount(cached);\n });\n });\n return () => {\n pendingCacheKey = null;\n if (!slots.default) {\n return null;\n }\n const children = slots.default();\n const rawVNode = children[0];\n if (children.length > 1) {\n if (!!(process.env.NODE_ENV !== \"production\")) {\n warn(`KeepAlive should contain exactly one component child.`);\n }\n current = null;\n return children;\n } else if (!isVNode(rawVNode) || !(rawVNode.shapeFlag & 4) && !(rawVNode.shapeFlag & 128)) {\n current = null;\n return rawVNode;\n }\n let vnode = getInnerChild(rawVNode);\n const comp = vnode.type;\n const name = getComponentName(\n isAsyncWrapper(vnode) ? vnode.type.__asyncResolved || {} : comp\n );\n const { include, exclude, max } = props;\n if (include && (!name || !matches(include, name)) || exclude && name && matches(exclude, name)) {\n current = vnode;\n return rawVNode;\n }\n const key = vnode.key == null ? comp : vnode.key;\n const cachedVNode = cache.get(key);\n if (vnode.el) {\n vnode = cloneVNode(vnode);\n if (rawVNode.shapeFlag & 128) {\n rawVNode.ssContent = vnode;\n }\n }\n pendingCacheKey = key;\n if (cachedVNode) {\n vnode.el = cachedVNode.el;\n vnode.component = cachedVNode.component;\n if (vnode.transition) {\n setTransitionHooks(vnode, vnode.transition);\n }\n vnode.shapeFlag |= 512;\n keys.delete(key);\n keys.add(key);\n } else {\n keys.add(key);\n if (max && keys.size > parseInt(max, 10)) {\n pruneCacheEntry(keys.values().next().value);\n }\n }\n vnode.shapeFlag |= 256;\n current = vnode;\n return isSuspense(rawVNode.type) ? rawVNode : vnode;\n };\n }\n};\nconst KeepAlive = KeepAliveImpl;\nfunction matches(pattern, name) {\n if (isArray(pattern)) {\n return pattern.some((p) => matches(p, name));\n } else if (isString(pattern)) {\n return pattern.split(\",\").includes(name);\n } else if (isRegExp(pattern)) {\n return pattern.test(name);\n }\n return false;\n}\nfunction onActivated(hook, target) {\n registerKeepAliveHook(hook, \"a\", target);\n}\nfunction onDeactivated(hook, target) {\n registerKeepAliveHook(hook, \"da\", target);\n}\nfunction registerKeepAliveHook(hook, type, target = currentInstance) {\n const wrappedHook = hook.__wdc || (hook.__wdc = () => {\n let current = target;\n while (current) {\n if (current.isDeactivated) {\n return;\n }\n current = current.parent;\n }\n return hook();\n });\n injectHook(type, wrappedHook, target);\n if (target) {\n let current = target.parent;\n while (current && current.parent) {\n if (isKeepAlive(current.parent.vnode)) {\n injectToKeepAliveRoot(wrappedHook, type, target, current);\n }\n current = current.parent;\n }\n }\n}\nfunction injectToKeepAliveRoot(hook, type, target, keepAliveRoot) {\n const injected = injectHook(\n type,\n hook,\n keepAliveRoot,\n true\n /* prepend */\n );\n onUnmounted(() => {\n remove(keepAliveRoot[type], injected);\n }, target);\n}\nfunction resetShapeFlag(vnode) {\n vnode.shapeFlag &= ~256;\n vnode.shapeFlag &= ~512;\n}\nfunction getInnerChild(vnode) {\n return vnode.shapeFlag & 128 ? vnode.ssContent : vnode;\n}\n\nfunction injectHook(type, hook, target = currentInstance, prepend = false) {\n if (target) {\n const hooks = target[type] || (target[type] = []);\n const wrappedHook = hook.__weh || (hook.__weh = (...args) => {\n if (target.isUnmounted) {\n return;\n }\n pauseTracking();\n setCurrentInstance(target);\n const res = callWithAsyncErrorHandling(hook, target, type, args);\n unsetCurrentInstance();\n resetTracking();\n return res;\n });\n if (prepend) {\n hooks.unshift(wrappedHook);\n } else {\n hooks.push(wrappedHook);\n }\n return wrappedHook;\n } else if (!!(process.env.NODE_ENV !== \"production\")) {\n const apiName = toHandlerKey(ErrorTypeStrings[type].replace(/ hook$/, \"\"));\n warn(\n `${apiName} is called when there is no active component instance to be associated with. Lifecycle injection APIs can only be used during execution of setup().` + (` If you are using async setup(), make sure to register lifecycle hooks before the first await statement.` )\n );\n }\n}\nconst createHook = (lifecycle) => (hook, target = currentInstance) => (\n // post-create lifecycle registrations are noops during SSR (except for serverPrefetch)\n (!isInSSRComponentSetup || lifecycle === \"sp\") && injectHook(lifecycle, (...args) => hook(...args), target)\n);\nconst onBeforeMount = createHook(\"bm\");\nconst onMounted = createHook(\"m\");\nconst onBeforeUpdate = createHook(\"bu\");\nconst onUpdated = createHook(\"u\");\nconst onBeforeUnmount = createHook(\"bum\");\nconst onUnmounted = createHook(\"um\");\nconst onServerPrefetch = createHook(\"sp\");\nconst onRenderTriggered = createHook(\n \"rtg\"\n);\nconst onRenderTracked = createHook(\n \"rtc\"\n);\nfunction onErrorCaptured(hook, target = currentInstance) {\n injectHook(\"ec\", hook, target);\n}\n\nconst COMPONENTS = \"components\";\nconst DIRECTIVES = \"directives\";\nfunction resolveComponent(name, maybeSelfReference) {\n return resolveAsset(COMPONENTS, name, true, maybeSelfReference) || name;\n}\nconst NULL_DYNAMIC_COMPONENT = Symbol.for(\"v-ndc\");\nfunction resolveDynamicComponent(component) {\n if (isString(component)) {\n return resolveAsset(COMPONENTS, component, false) || component;\n } else {\n return component || NULL_DYNAMIC_COMPONENT;\n }\n}\nfunction resolveDirective(name) {\n return resolveAsset(DIRECTIVES, name);\n}\nfunction resolveAsset(type, name, warnMissing = true, maybeSelfReference = false) {\n const instance = currentRenderingInstance || currentInstance;\n if (instance) {\n const Component = instance.type;\n if (type === COMPONENTS) {\n const selfName = getComponentName(\n Component,\n false\n /* do not include inferred name to avoid breaking existing code */\n );\n if (selfName && (selfName === name || selfName === camelize(name) || selfName === capitalize(camelize(name)))) {\n return Component;\n }\n }\n const res = (\n // local registration\n // check instance[type] first which is resolved for options API\n resolve(instance[type] || Component[type], name) || // global registration\n resolve(instance.appContext[type], name)\n );\n if (!res && maybeSelfReference) {\n return Component;\n }\n if (!!(process.env.NODE_ENV !== \"production\") && warnMissing && !res) {\n const extra = type === COMPONENTS ? `\nIf this is a native custom element, make sure to exclude it from component resolution via compilerOptions.isCustomElement.` : ``;\n warn(`Failed to resolve ${type.slice(0, -1)}: ${name}${extra}`);\n }\n return res;\n } else if (!!(process.env.NODE_ENV !== \"production\")) {\n warn(\n `resolve${capitalize(type.slice(0, -1))} can only be used in render() or setup().`\n );\n }\n}\nfunction resolve(registry, name) {\n return registry && (registry[name] || registry[camelize(name)] || registry[capitalize(camelize(name))]);\n}\n\nfunction renderList(source, renderItem, cache, index) {\n let ret;\n const cached = cache && cache[index];\n if (isArray(source) || isString(source)) {\n ret = new Array(source.length);\n for (let i = 0, l = source.length; i < l; i++) {\n ret[i] = renderItem(source[i], i, void 0, cached && cached[i]);\n }\n } else if (typeof source === \"number\") {\n if (!!(process.env.NODE_ENV !== \"production\") && !Number.isInteger(source)) {\n warn(`The v-for range expect an integer value but got ${source}.`);\n }\n ret = new Array(source);\n for (let i = 0; i < source; i++) {\n ret[i] = renderItem(i + 1, i, void 0, cached && cached[i]);\n }\n } else if (isObject(source)) {\n if (source[Symbol.iterator]) {\n ret = Array.from(\n source,\n (item, i) => renderItem(item, i, void 0, cached && cached[i])\n );\n } else {\n const keys = Object.keys(source);\n ret = new Array(keys.length);\n for (let i = 0, l = keys.length; i < l; i++) {\n const key = keys[i];\n ret[i] = renderItem(source[key], key, i, cached && cached[i]);\n }\n }\n } else {\n ret = [];\n }\n if (cache) {\n cache[index] = ret;\n }\n return ret;\n}\n\nfunction createSlots(slots, dynamicSlots) {\n for (let i = 0; i < dynamicSlots.length; i++) {\n const slot = dynamicSlots[i];\n if (isArray(slot)) {\n for (let j = 0; j < slot.length; j++) {\n slots[slot[j].name] = slot[j].fn;\n }\n } else if (slot) {\n slots[slot.name] = slot.key ? (...args) => {\n const res = slot.fn(...args);\n if (res)\n res.key = slot.key;\n return res;\n } : slot.fn;\n }\n }\n return slots;\n}\n\nfunction renderSlot(slots, name, props = {}, fallback, noSlotted) {\n if (currentRenderingInstance.isCE || currentRenderingInstance.parent && isAsyncWrapper(currentRenderingInstance.parent) && currentRenderingInstance.parent.isCE) {\n if (name !== \"default\")\n props.name = name;\n return createVNode(\"slot\", props, fallback && fallback());\n }\n let slot = slots[name];\n if (!!(process.env.NODE_ENV !== \"production\") && slot && slot.length > 1) {\n warn(\n `SSR-optimized slot function detected in a non-SSR-optimized render function. You need to mark this component with $dynamic-slots in the parent template.`\n );\n slot = () => [];\n }\n if (slot && slot._c) {\n slot._d = false;\n }\n openBlock();\n const validSlotContent = slot && ensureValidVNode(slot(props));\n const rendered = createBlock(\n Fragment,\n {\n key: props.key || // slot content array of a dynamic conditional slot may have a branch\n // key attached in the `createSlots` helper, respect that\n validSlotContent && validSlotContent.key || `_${name}`\n },\n validSlotContent || (fallback ? fallback() : []),\n validSlotContent && slots._ === 1 ? 64 : -2\n );\n if (!noSlotted && rendered.scopeId) {\n rendered.slotScopeIds = [rendered.scopeId + \"-s\"];\n }\n if (slot && slot._c) {\n slot._d = true;\n }\n return rendered;\n}\nfunction ensureValidVNode(vnodes) {\n return vnodes.some((child) => {\n if (!isVNode(child))\n return true;\n if (child.type === Comment)\n return false;\n if (child.type === Fragment && !ensureValidVNode(child.children))\n return false;\n return true;\n }) ? vnodes : null;\n}\n\nfunction toHandlers(obj, preserveCaseIfNecessary) {\n const ret = {};\n if (!!(process.env.NODE_ENV !== \"production\") && !isObject(obj)) {\n warn(`v-on with no argument expects an object value.`);\n return ret;\n }\n for (const key in obj) {\n ret[preserveCaseIfNecessary && /[A-Z]/.test(key) ? `on:${key}` : toHandlerKey(key)] = obj[key];\n }\n return ret;\n}\n\nconst getPublicInstance = (i) => {\n if (!i)\n return null;\n if (isStatefulComponent(i))\n return getExposeProxy(i) || i.proxy;\n return getPublicInstance(i.parent);\n};\nconst publicPropertiesMap = (\n // Move PURE marker to new line to workaround compiler discarding it\n // due to type annotation\n /* @__PURE__ */ extend(/* @__PURE__ */ Object.create(null), {\n $: (i) => i,\n $el: (i) => i.vnode.el,\n $data: (i) => i.data,\n $props: (i) => !!(process.env.NODE_ENV !== \"production\") ? shallowReadonly(i.props) : i.props,\n $attrs: (i) => !!(process.env.NODE_ENV !== \"production\") ? shallowReadonly(i.attrs) : i.attrs,\n $slots: (i) => !!(process.env.NODE_ENV !== \"production\") ? shallowReadonly(i.slots) : i.slots,\n $refs: (i) => !!(process.env.NODE_ENV !== \"production\") ? shallowReadonly(i.refs) : i.refs,\n $parent: (i) => getPublicInstance(i.parent),\n $root: (i) => getPublicInstance(i.root),\n $emit: (i) => i.emit,\n $options: (i) => __VUE_OPTIONS_API__ ? resolveMergedOptions(i) : i.type,\n $forceUpdate: (i) => i.f || (i.f = () => queueJob(i.update)),\n $nextTick: (i) => i.n || (i.n = nextTick.bind(i.proxy)),\n $watch: (i) => __VUE_OPTIONS_API__ ? instanceWatch.bind(i) : NOOP\n })\n);\nconst isReservedPrefix = (key) => key === \"_\" || key === \"$\";\nconst hasSetupBinding = (state, key) => state !== EMPTY_OBJ && !state.__isScriptSetup && hasOwn(state, key);\nconst PublicInstanceProxyHandlers = {\n get({ _: instance }, key) {\n const { ctx, setupState, data, props, accessCache, type, appContext } = instance;\n if (!!(process.env.NODE_ENV !== \"production\") && key === \"__isVue\") {\n return true;\n }\n let normalizedProps;\n if (key[0] !== \"$\") {\n const n = accessCache[key];\n if (n !== void 0) {\n switch (n) {\n case 1 /* SETUP */:\n return setupState[key];\n case 2 /* DATA */:\n return data[key];\n case 4 /* CONTEXT */:\n return ctx[key];\n case 3 /* PROPS */:\n return props[key];\n }\n } else if (hasSetupBinding(setupState, key)) {\n accessCache[key] = 1 /* SETUP */;\n return setupState[key];\n } else if (data !== EMPTY_OBJ && hasOwn(data, key)) {\n accessCache[key] = 2 /* DATA */;\n return data[key];\n } else if (\n // only cache other properties when instance has declared (thus stable)\n // props\n (normalizedProps = instance.propsOptions[0]) && hasOwn(normalizedProps, key)\n ) {\n accessCache[key] = 3 /* PROPS */;\n return props[key];\n } else if (ctx !== EMPTY_OBJ && hasOwn(ctx, key)) {\n accessCache[key] = 4 /* CONTEXT */;\n return ctx[key];\n } else if (!__VUE_OPTIONS_API__ || shouldCacheAccess) {\n accessCache[key] = 0 /* OTHER */;\n }\n }\n const publicGetter = publicPropertiesMap[key];\n let cssModule, globalProperties;\n if (publicGetter) {\n if (key === \"$attrs\") {\n track(instance, \"get\", key);\n !!(process.env.NODE_ENV !== \"production\") && markAttrsAccessed();\n } else if (!!(process.env.NODE_ENV !== \"production\") && key === \"$slots\") {\n track(instance, \"get\", key);\n }\n return publicGetter(instance);\n } else if (\n // css module (injected by vue-loader)\n (cssModule = type.__cssModules) && (cssModule = cssModule[key])\n ) {\n return cssModule;\n } else if (ctx !== EMPTY_OBJ && hasOwn(ctx, key)) {\n accessCache[key] = 4 /* CONTEXT */;\n return ctx[key];\n } else if (\n // global properties\n globalProperties = appContext.config.globalProperties, hasOwn(globalProperties, key)\n ) {\n {\n return globalProperties[key];\n }\n } else if (!!(process.env.NODE_ENV !== \"production\") && currentRenderingInstance && (!isString(key) || // #1091 avoid internal isRef/isVNode checks on component instance leading\n // to infinite warning loop\n key.indexOf(\"__v\") !== 0)) {\n if (data !== EMPTY_OBJ && isReservedPrefix(key[0]) && hasOwn(data, key)) {\n warn(\n `Property ${JSON.stringify(\n key\n )} must be accessed via $data because it starts with a reserved character (\"$\" or \"_\") and is not proxied on the render context.`\n );\n } else if (instance === currentRenderingInstance) {\n warn(\n `Property ${JSON.stringify(key)} was accessed during render but is not defined on instance.`\n );\n }\n }\n },\n set({ _: instance }, key, value) {\n const { data, setupState, ctx } = instance;\n if (hasSetupBinding(setupState, key)) {\n setupState[key] = value;\n return true;\n } else if (!!(process.env.NODE_ENV !== \"production\") && setupState.__isScriptSetup && hasOwn(setupState, key)) {\n warn(`Cannot mutate \n","export class UserProfile {\n email: string = \"\";\n name: string = \"\";\n companyId: string = \"\";\n role: string = \"\";\n lockedOut: boolean = false;\n}\n","import type { UserProfile } from \"@/models/userProfile\";\nimport axios from \"axios\";\n\nexport const getUserProfile = async (): Promise => {\n const response = await axios.get(\"/api/user-profile\");\n return response.data;\n};\n\nexport const updateUserProfile = async (\n userProfile: UserProfile\n): Promise => {\n const response = await axios.put(\"/api/user-profile\", userProfile);\n return response.data;\n};\n","export class Company {\n id: string = \"\";\n companyName: string = \"\";\n organisationNumber: string = \"\";\n operatingCountryCode: string = \"\";\n}\n","import { Company } from \"@/models/company\";\nimport { TrustGroupType } from \"@/models/enum/trustGroupType\";\n\nexport class TrustGroup {\n id: string = \"\";\n companyId: string = \"\";\n company: Company = new Company();\n userProfileEmails: string[] = [];\n isCustomer: boolean = false;\n trustGroupType: TrustGroupType = TrustGroupType.Channel2Customer;\n}\n","import type { TrustGroupUserDto } from \"@/models/dto/trustGroupUserDto\";\nimport axios from \"axios\";\nimport type { TrustGroup } from \"@/models/trustGroup\";\n\nexport const getIsCustomer = async (): Promise => {\n const response = await axios.get(\"/api/trust-group/is-customer\");\n return response.data;\n};\n\nexport const addUserToTrustGroup = async (\n user: TrustGroupUserDto\n): Promise => {\n await axios.post(\"/api/trust-group/add-user\", user);\n};\n\nexport const removeUserFromTrustGroup = async (user: TrustGroupUserDto): Promise => {\n await axios.put(\"/api/trust-group/remove-user\", user);\n}\n\nexport const getTrustGroupUsers = async (): Promise => {\n const response = await axios.get(\"/api/trust-group/users\");\n return response.data;\n};\n\nexport const getTrustGroupOnSession = async (): Promise => {\n const response = await axios.get(\"/api/trust-group\");\n return response.data;\n};","import { UserProfile } from \"@/models/userProfile\";\nimport { getUserProfile } from \"@/services/userProfileService\";\nimport { defineStore } from \"pinia\";\nimport { TrustGroup } from \"@/models/trustGroup\";\nimport { getTrustGroupOnSession } from \"@/services/trustGroupService\";\n\nexport interface IUserProfileState {\n userProfile: UserProfile;\n trustGroup: TrustGroup;\n}\n\nexport const useUserProfileStore = defineStore(\"userProfileStore\", {\n state: (): IUserProfileState => ({\n userProfile: new UserProfile(),\n trustGroup: new TrustGroup(),\n }),\n\n actions: {\n async setUserProfile(): Promise {\n this.userProfile = await getUserProfile();\n },\n\n async setTrustGroup(): Promise {\n this.trustGroup = await getTrustGroupOnSession();\n },\n },\n});\n","\n\n\n\n\n","\n\n\n\n\n","// Utilities\nimport { effectScope, onScopeDispose, watch } from 'vue';\n\n// Types\n\nexport function useToggleScope(source, fn) {\n let scope;\n function start() {\n scope = effectScope();\n scope.run(() => fn.length ? fn(() => {\n scope?.stop();\n start();\n }) : fn());\n }\n watch(source, active => {\n if (active && !scope) {\n start();\n } else if (!active) {\n scope?.stop();\n scope = undefined;\n }\n }, {\n immediate: true\n });\n onScopeDispose(() => {\n scope?.stop();\n });\n}\n//# sourceMappingURL=toggleScope.mjs.map","// Types\n\n/** Convert a point in local space to viewport space */\nexport function elementToViewport(point, offset) {\n return {\n x: point.x + offset.x,\n y: point.y + offset.y\n };\n}\n\n/** Convert a point in viewport space to local space */\nexport function viewportToElement(point, offset) {\n return {\n x: point.x - offset.x,\n y: point.y - offset.y\n };\n}\n\n/** Get the difference between two points */\nexport function getOffset(a, b) {\n return {\n x: a.x - b.x,\n y: a.y - b.y\n };\n}\n\n/** Convert an anchor object to a point in local space */\nexport function anchorToPoint(anchor, box) {\n if (anchor.side === 'top' || anchor.side === 'bottom') {\n const {\n side,\n align\n } = anchor;\n const x = align === 'left' ? 0 : align === 'center' ? box.width / 2 : align === 'right' ? box.width : align;\n const y = side === 'top' ? 0 : side === 'bottom' ? box.height : side;\n return elementToViewport({\n x,\n y\n }, box);\n } else if (anchor.side === 'left' || anchor.side === 'right') {\n const {\n side,\n align\n } = anchor;\n const x = side === 'left' ? 0 : side === 'right' ? box.width : side;\n const y = align === 'top' ? 0 : align === 'center' ? box.height / 2 : align === 'bottom' ? box.height : align;\n return elementToViewport({\n x,\n y\n }, box);\n }\n return elementToViewport({\n x: box.width / 2,\n y: box.height / 2\n }, box);\n}\n//# sourceMappingURL=point.mjs.map","function _classPrivateFieldInitSpec(obj, privateMap, value) { _checkPrivateRedeclaration(obj, privateMap); privateMap.set(obj, value); }\nfunction _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError(\"Cannot initialize the same private elements twice on an object\"); } }\nfunction _classPrivateFieldSet(receiver, privateMap, value) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, \"set\"); _classApplyDescriptorSet(receiver, descriptor, value); return value; }\nfunction _classApplyDescriptorSet(receiver, descriptor, value) { if (descriptor.set) { descriptor.set.call(receiver, value); } else { if (!descriptor.writable) { throw new TypeError(\"attempted to set read only private field\"); } descriptor.value = value; } }\nfunction _classPrivateFieldGet(receiver, privateMap) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, \"get\"); return _classApplyDescriptorGet(receiver, descriptor); }\nfunction _classExtractFieldDescriptor(receiver, privateMap, action) { if (!privateMap.has(receiver)) { throw new TypeError(\"attempted to \" + action + \" private field on non-instance\"); } return privateMap.get(receiver); }\nfunction _classApplyDescriptorGet(receiver, descriptor) { if (descriptor.get) { return descriptor.get.call(receiver); } return descriptor.value; }\n// Utilities\nimport { camelize, capitalize, computed, Fragment, reactive, toRefs, watchEffect } from 'vue';\n\n// Types\n\nexport function getNestedValue(obj, path, fallback) {\n const last = path.length - 1;\n if (last < 0) return obj === undefined ? fallback : obj;\n for (let i = 0; i < last; i++) {\n if (obj == null) {\n return fallback;\n }\n obj = obj[path[i]];\n }\n if (obj == null) return fallback;\n return obj[path[last]] === undefined ? fallback : obj[path[last]];\n}\nexport function deepEqual(a, b) {\n if (a === b) return true;\n if (a instanceof Date && b instanceof Date && a.getTime() !== b.getTime()) {\n // If the values are Date, compare them as timestamps\n return false;\n }\n if (a !== Object(a) || b !== Object(b)) {\n // If the values aren't objects, they were already checked for equality\n return false;\n }\n const props = Object.keys(a);\n if (props.length !== Object.keys(b).length) {\n // Different number of props, don't bother to check\n return false;\n }\n return props.every(p => deepEqual(a[p], b[p]));\n}\nexport function getObjectValueByPath(obj, path, fallback) {\n // credit: http://stackoverflow.com/questions/6491463/accessing-nested-javascript-objects-with-string-key#comment55278413_6491621\n if (obj == null || !path || typeof path !== 'string') return fallback;\n if (obj[path] !== undefined) return obj[path];\n path = path.replace(/\\[(\\w+)\\]/g, '.$1'); // convert indexes to properties\n path = path.replace(/^\\./, ''); // strip a leading dot\n return getNestedValue(obj, path.split('.'), fallback);\n}\nexport function getPropertyFromItem(item, property, fallback) {\n if (property == null) return item === undefined ? fallback : item;\n if (item !== Object(item)) {\n if (typeof property !== 'function') return fallback;\n const value = property(item, fallback);\n return typeof value === 'undefined' ? fallback : value;\n }\n if (typeof property === 'string') return getObjectValueByPath(item, property, fallback);\n if (Array.isArray(property)) return getNestedValue(item, property, fallback);\n if (typeof property !== 'function') return fallback;\n const value = property(item, fallback);\n return typeof value === 'undefined' ? fallback : value;\n}\nexport function createRange(length) {\n let start = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n return Array.from({\n length\n }, (v, k) => start + k);\n}\nexport function getZIndex(el) {\n if (!el || el.nodeType !== Node.ELEMENT_NODE) return 0;\n const index = +window.getComputedStyle(el).getPropertyValue('z-index');\n if (!index) return getZIndex(el.parentNode);\n return index;\n}\nexport function convertToUnit(str) {\n let unit = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'px';\n if (str == null || str === '') {\n return undefined;\n } else if (isNaN(+str)) {\n return String(str);\n } else if (!isFinite(+str)) {\n return undefined;\n } else {\n return `${Number(str)}${unit}`;\n }\n}\nexport function isObject(obj) {\n return obj !== null && typeof obj === 'object' && !Array.isArray(obj);\n}\nexport function refElement(obj) {\n return obj && '$el' in obj ? obj.$el : obj;\n}\n\n// KeyboardEvent.keyCode aliases\nexport const keyCodes = Object.freeze({\n enter: 13,\n tab: 9,\n delete: 46,\n esc: 27,\n space: 32,\n up: 38,\n down: 40,\n left: 37,\n right: 39,\n end: 35,\n home: 36,\n del: 46,\n backspace: 8,\n insert: 45,\n pageup: 33,\n pagedown: 34,\n shift: 16\n});\nexport const keyValues = Object.freeze({\n enter: 'Enter',\n tab: 'Tab',\n delete: 'Delete',\n esc: 'Escape',\n space: 'Space',\n up: 'ArrowUp',\n down: 'ArrowDown',\n left: 'ArrowLeft',\n right: 'ArrowRight',\n end: 'End',\n home: 'Home',\n del: 'Delete',\n backspace: 'Backspace',\n insert: 'Insert',\n pageup: 'PageUp',\n pagedown: 'PageDown',\n shift: 'Shift'\n});\nexport function keys(o) {\n return Object.keys(o);\n}\nexport function has(obj, key) {\n return key.every(k => obj.hasOwnProperty(k));\n}\nexport function pick(obj, paths, exclude) {\n const found = Object.create(null);\n const rest = Object.create(null);\n for (const key in obj) {\n if (paths.some(path => path instanceof RegExp ? path.test(key) : path === key) && !exclude?.some(path => path === key)) {\n found[key] = obj[key];\n } else {\n rest[key] = obj[key];\n }\n }\n return [found, rest];\n}\nexport function omit(obj, exclude) {\n const clone = {\n ...obj\n };\n exclude.forEach(prop => delete clone[prop]);\n return clone;\n}\n\n/**\n * Filter attributes that should be applied to\n * the root element of a an input component. Remaining\n * attributes should be passed to the element inside.\n */\nexport function filterInputAttrs(attrs) {\n return pick(attrs, ['class', 'style', 'id', /^data-/]);\n}\n\n/**\n * Returns the set difference of B and A, i.e. the set of elements in B but not in A\n */\nexport function arrayDiff(a, b) {\n const diff = [];\n for (let i = 0; i < b.length; i++) {\n if (!a.includes(b[i])) diff.push(b[i]);\n }\n return diff;\n}\nexport function wrapInArray(v) {\n return v == null ? [] : Array.isArray(v) ? v : [v];\n}\nexport function defaultFilter(value, search, item) {\n return value != null && search != null && typeof value !== 'boolean' && value.toString().toLocaleLowerCase().indexOf(search.toLocaleLowerCase()) !== -1;\n}\nexport function searchItems(items, search) {\n if (!search) return items;\n search = search.toString().toLowerCase();\n if (search.trim() === '') return items;\n return items.filter(item => Object.keys(item).some(key => defaultFilter(getObjectValueByPath(item, key), search, item)));\n}\nexport function debounce(fn, delay) {\n let timeoutId = 0;\n return function () {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n clearTimeout(timeoutId);\n timeoutId = setTimeout(() => fn(...args), delay);\n };\n}\nexport function throttle(fn, limit) {\n let throttling = false;\n return function () {\n if (!throttling) {\n throttling = true;\n setTimeout(() => throttling = false, limit);\n return fn(...arguments);\n }\n };\n}\n/**\n * Filters slots to only those starting with `prefix`, removing the prefix\n */\nexport function getPrefixedSlots(prefix, slots) {\n return Object.keys(slots).filter(k => k.startsWith(prefix)).reduce((obj, k) => {\n obj[k.replace(prefix, '')] = slots[k];\n return obj;\n }, {});\n}\nexport function clamp(value) {\n let min = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n let max = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;\n return Math.max(min, Math.min(max, value));\n}\nexport function getDecimals(value) {\n const trimmedStr = value.toString().trim();\n return trimmedStr.includes('.') ? trimmedStr.length - trimmedStr.indexOf('.') - 1 : 0;\n}\nexport function padEnd(str, length) {\n let char = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '0';\n return str + char.repeat(Math.max(0, length - str.length));\n}\nexport function padStart(str, length) {\n let char = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '0';\n return char.repeat(Math.max(0, length - str.length)) + str;\n}\nexport function chunk(str) {\n let size = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;\n const chunked = [];\n let index = 0;\n while (index < str.length) {\n chunked.push(str.substr(index, size));\n index += size;\n }\n return chunked;\n}\nexport function humanReadableFileSize(bytes) {\n let base = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1000;\n if (bytes < base) {\n return `${bytes} B`;\n }\n const prefix = base === 1024 ? ['Ki', 'Mi', 'Gi'] : ['k', 'M', 'G'];\n let unit = -1;\n while (Math.abs(bytes) >= base && unit < prefix.length - 1) {\n bytes /= base;\n ++unit;\n }\n return `${bytes.toFixed(1)} ${prefix[unit]}B`;\n}\nexport function camelizeObjectKeys(obj) {\n if (!obj) return {};\n return Object.keys(obj).reduce((o, key) => {\n o[camelize(key)] = obj[key];\n return o;\n }, {});\n}\nexport function mergeDeep() {\n let source = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n let target = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n let arrayFn = arguments.length > 2 ? arguments[2] : undefined;\n const out = {};\n for (const key in source) {\n out[key] = source[key];\n }\n for (const key in target) {\n const sourceProperty = source[key];\n const targetProperty = target[key];\n\n // Only continue deep merging if\n // both properties are objects\n if (isObject(sourceProperty) && isObject(targetProperty)) {\n out[key] = mergeDeep(sourceProperty, targetProperty, arrayFn);\n continue;\n }\n if (Array.isArray(sourceProperty) && Array.isArray(targetProperty) && arrayFn) {\n out[key] = arrayFn(sourceProperty, targetProperty);\n continue;\n }\n out[key] = targetProperty;\n }\n return out;\n}\nexport function fillArray(length, obj) {\n return Array(length).fill(obj);\n}\nexport function flattenFragments(nodes) {\n return nodes.map(node => {\n if (node.type === Fragment) {\n return flattenFragments(node.children);\n } else {\n return node;\n }\n }).flat();\n}\nexport const randomHexColor = () => {\n const n = (Math.random() * 0xfffff * 1000000).toString(16);\n return '#' + n.slice(0, 6);\n};\nexport function toKebabCase() {\n let str = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';\n if (toKebabCase.cache.has(str)) return toKebabCase.cache.get(str);\n const kebab = str.replace(/[^a-z]/gi, '-').replace(/\\B([A-Z])/g, '-$1').toLowerCase();\n toKebabCase.cache.set(str, kebab);\n return kebab;\n}\ntoKebabCase.cache = new Map();\nexport function findChildren(vnode) {\n if (!vnode || typeof vnode !== 'object') {\n return [];\n }\n if (Array.isArray(vnode)) {\n return vnode.map(child => findChildren(child)).filter(v => v).flat(1);\n } else if (Array.isArray(vnode.children)) {\n return vnode.children.map(child => findChildren(child)).filter(v => v).flat(1);\n } else if (vnode.component) {\n return [vnode.component, ...findChildren(vnode.component?.subTree)].filter(v => v).flat(1);\n }\n return [];\n}\nexport function findChildrenWithProvide(key, vnode) {\n if (!vnode || typeof vnode !== 'object') return [];\n if (Array.isArray(vnode)) {\n return vnode.map(child => findChildrenWithProvide(key, child)).flat(1);\n } else if (Array.isArray(vnode.children)) {\n return vnode.children.map(child => findChildrenWithProvide(key, child)).flat(1);\n } else if (vnode.component) {\n if (Object.getOwnPropertySymbols(vnode.component.provides).includes(key)) {\n return [vnode.component];\n } else if (vnode.component.subTree) {\n return findChildrenWithProvide(key, vnode.component.subTree).flat(1);\n }\n }\n return [];\n}\nvar _arr = /*#__PURE__*/new WeakMap();\nvar _pointer = /*#__PURE__*/new WeakMap();\nexport class CircularBuffer {\n constructor(size) {\n _classPrivateFieldInitSpec(this, _arr, {\n writable: true,\n value: []\n });\n _classPrivateFieldInitSpec(this, _pointer, {\n writable: true,\n value: 0\n });\n this.size = size;\n }\n push(val) {\n _classPrivateFieldGet(this, _arr)[_classPrivateFieldGet(this, _pointer)] = val;\n _classPrivateFieldSet(this, _pointer, (_classPrivateFieldGet(this, _pointer) + 1) % this.size);\n }\n values() {\n return _classPrivateFieldGet(this, _arr).slice(_classPrivateFieldGet(this, _pointer)).concat(_classPrivateFieldGet(this, _arr).slice(0, _classPrivateFieldGet(this, _pointer)));\n }\n}\nexport function getEventCoordinates(e) {\n if ('touches' in e) {\n return {\n clientX: e.touches[0].clientX,\n clientY: e.touches[0].clientY\n };\n }\n return {\n clientX: e.clientX,\n clientY: e.clientY\n };\n}\n\n// Only allow a single return type\n\nexport function destructComputed(getter) {\n const refs = reactive({});\n const base = computed(getter);\n watchEffect(() => {\n for (const key in base.value) {\n refs[key] = base.value[key];\n }\n }, {\n flush: 'sync'\n });\n return toRefs(refs);\n}\n\n/** Array.includes but value can be any type */\nexport function includes(arr, val) {\n return arr.includes(val);\n}\nconst onRE = /^on[^a-z]/;\nexport const isOn = key => onRE.test(key);\nexport function eventName(propName) {\n return propName[2].toLowerCase() + propName.slice(3);\n}\nexport const EventProp = () => [Function, Array];\nexport function hasEvent(props, name) {\n name = 'on' + capitalize(name);\n return !!(props[name] || props[`${name}Once`] || props[`${name}Capture`] || props[`${name}OnceCapture`] || props[`${name}CaptureOnce`]);\n}\nexport function callEvent(handler) {\n for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n args[_key2 - 1] = arguments[_key2];\n }\n if (Array.isArray(handler)) {\n for (const h of handler) {\n h(...args);\n }\n } else if (typeof handler === 'function') {\n handler(...args);\n }\n}\nexport function focusableChildren(el) {\n const targets = ['button', '[href]', 'input:not([type=\"hidden\"])', 'select', 'textarea', '[tabindex]'].map(s => `${s}:not([tabindex=\"-1\"]):not([disabled])`).join(', ');\n return [...el.querySelectorAll(targets)];\n}\nexport function focusChild(el, location) {\n const focusable = focusableChildren(el);\n const idx = focusable.indexOf(document.activeElement);\n if (!location) {\n if (el === document.activeElement || !el.contains(document.activeElement)) {\n focusable[0]?.focus();\n }\n } else if (location === 'first') {\n focusable[0]?.focus();\n } else if (location === 'last') {\n focusable.at(-1)?.focus();\n } else {\n let _el;\n let idxx = idx;\n const inc = location === 'next' ? 1 : -1;\n do {\n idxx += inc;\n _el = focusable[idxx];\n } while ((!_el || _el.offsetParent == null) && idxx < focusable.length && idxx >= 0);\n if (_el) _el.focus();else focusChild(el, location === 'next' ? 'first' : 'last');\n }\n}\nexport function isEmpty(val) {\n return val === null || val === undefined || typeof val === 'string' && val.trim() === '';\n}\nexport function noop() {}\n//# sourceMappingURL=helpers.mjs.map","// Utilities\nimport { includes } from \"./helpers.mjs\";\nconst block = ['top', 'bottom'];\nconst inline = ['start', 'end', 'left', 'right'];\n/** Parse a raw anchor string into an object */\nexport function parseAnchor(anchor, isRtl) {\n let [side, align] = anchor.split(' ');\n if (!align) {\n align = includes(block, side) ? 'start' : includes(inline, side) ? 'top' : 'center';\n }\n return {\n side: toPhysical(side, isRtl),\n align: toPhysical(align, isRtl)\n };\n}\nexport function toPhysical(str, isRtl) {\n if (str === 'start') return isRtl ? 'right' : 'left';\n if (str === 'end') return isRtl ? 'left' : 'right';\n return str;\n}\nexport function flipSide(anchor) {\n return {\n side: {\n center: 'center',\n top: 'bottom',\n bottom: 'top',\n left: 'right',\n right: 'left'\n }[anchor.side],\n align: anchor.align\n };\n}\nexport function flipAlign(anchor) {\n return {\n side: anchor.side,\n align: {\n center: 'center',\n top: 'bottom',\n bottom: 'top',\n left: 'right',\n right: 'left'\n }[anchor.align]\n };\n}\nexport function flipCorner(anchor) {\n return {\n side: anchor.align,\n align: anchor.side\n };\n}\nexport function getAxis(anchor) {\n return includes(block, anchor.side) ? 'y' : 'x';\n}\n//# sourceMappingURL=anchor.mjs.map","export class Box {\n constructor(_ref) {\n let {\n x,\n y,\n width,\n height\n } = _ref;\n this.x = x;\n this.y = y;\n this.width = width;\n this.height = height;\n }\n get top() {\n return this.y;\n }\n get bottom() {\n return this.y + this.height;\n }\n get left() {\n return this.x;\n }\n get right() {\n return this.x + this.width;\n }\n}\nexport function getOverflow(a, b) {\n return {\n x: {\n before: Math.max(0, b.left - a.left),\n after: Math.max(0, a.right - b.right)\n },\n y: {\n before: Math.max(0, b.top - a.top),\n after: Math.max(0, a.bottom - b.bottom)\n }\n };\n}\n//# sourceMappingURL=box.mjs.map","// Utilities\nimport { Box } from \"./box.mjs\";\n/** @see https://stackoverflow.com/a/57876601/2074736 */\nexport function nullifyTransforms(el) {\n const rect = el.getBoundingClientRect();\n const style = getComputedStyle(el);\n const tx = style.transform;\n if (tx) {\n let ta, sx, sy, dx, dy;\n if (tx.startsWith('matrix3d(')) {\n ta = tx.slice(9, -1).split(/, /);\n sx = +ta[0];\n sy = +ta[5];\n dx = +ta[12];\n dy = +ta[13];\n } else if (tx.startsWith('matrix(')) {\n ta = tx.slice(7, -1).split(/, /);\n sx = +ta[0];\n sy = +ta[3];\n dx = +ta[4];\n dy = +ta[5];\n } else {\n return new Box(rect);\n }\n const to = style.transformOrigin;\n const x = rect.x - dx - (1 - sx) * parseFloat(to);\n const y = rect.y - dy - (1 - sy) * parseFloat(to.slice(to.indexOf(' ') + 1));\n const w = sx ? rect.width / sx : el.offsetWidth + 1;\n const h = sy ? rect.height / sy : el.offsetHeight + 1;\n return new Box({\n x,\n y,\n width: w,\n height: h\n });\n } else {\n return new Box(rect);\n }\n}\nexport function animate(el, keyframes, options) {\n if (typeof el.animate === 'undefined') return {\n finished: Promise.resolve()\n };\n let animation;\n try {\n animation = el.animate(keyframes, options);\n } catch (err) {\n return {\n finished: Promise.resolve()\n };\n }\n if (typeof animation.finished === 'undefined') {\n animation.finished = new Promise(resolve => {\n animation.onfinish = () => {\n resolve(animation);\n };\n });\n }\n return animation;\n}\n//# sourceMappingURL=animation.mjs.map","// Utilities\nimport { eventName, isOn } from \"./helpers.mjs\";\nconst handlers = new WeakMap();\nexport function bindProps(el, props) {\n Object.keys(props).forEach(k => {\n if (isOn(k)) {\n const name = eventName(k);\n const handler = handlers.get(el);\n if (props[k] == null) {\n handler?.forEach(v => {\n const [n, fn] = v;\n if (n === name) {\n el.removeEventListener(name, fn);\n handler.delete(v);\n }\n });\n } else if (!handler || ![...handler]?.some(v => v[0] === name && v[1] === props[k])) {\n el.addEventListener(name, props[k]);\n const _handler = handler || new Set();\n _handler.add([name, props[k]]);\n if (!handlers.has(el)) handlers.set(el, _handler);\n }\n } else {\n if (props[k] == null) {\n el.removeAttribute(k);\n } else {\n el.setAttribute(k, props[k]);\n }\n }\n });\n}\nexport function unbindProps(el, props) {\n Object.keys(props).forEach(k => {\n if (isOn(k)) {\n const name = eventName(k);\n const handler = handlers.get(el);\n handler?.forEach(v => {\n const [n, fn] = v;\n if (n === name) {\n el.removeEventListener(name, fn);\n handler.delete(v);\n }\n });\n } else {\n el.removeAttribute(k);\n }\n });\n}\n//# sourceMappingURL=bindProps.mjs.map","/* eslint-disable no-console */\n\n// Utilities\nimport { warn } from 'vue';\nexport function consoleWarn(message) {\n warn(`Vuetify: ${message}`);\n}\nexport function consoleError(message) {\n warn(`Vuetify error: ${message}`);\n}\nexport function deprecate(original, replacement) {\n replacement = Array.isArray(replacement) ? replacement.slice(0, -1).map(s => `'${s}'`).join(', ') + ` or '${replacement.at(-1)}'` : `'${replacement}'`;\n warn(`[Vuetify UPGRADE] '${original}' is deprecated, use ${replacement} instead.`);\n}\nexport function breaking(original, replacement) {\n // warn(`[Vuetify BREAKING] '${original}' has been removed, use '${replacement}' instead. For more information, see the upgrade guide https://github.com/vuetifyjs/vuetify/releases/tag/v2.0.0#user-content-upgrade-guide`)\n}\nexport function removed(original) {\n // warn(`[Vuetify REMOVED] '${original}' has been removed. You can safely omit it.`)\n}\n//# sourceMappingURL=console.mjs.map","// Types\n\nconst delta = 0.20689655172413793; // 6÷29\n\nconst cielabForwardTransform = t => t > delta ** 3 ? Math.cbrt(t) : t / (3 * delta ** 2) + 4 / 29;\nconst cielabReverseTransform = t => t > delta ? t ** 3 : 3 * delta ** 2 * (t - 4 / 29);\nexport function fromXYZ(xyz) {\n const transform = cielabForwardTransform;\n const transformedY = transform(xyz[1]);\n return [116 * transformedY - 16, 500 * (transform(xyz[0] / 0.95047) - transformedY), 200 * (transformedY - transform(xyz[2] / 1.08883))];\n}\nexport function toXYZ(lab) {\n const transform = cielabReverseTransform;\n const Ln = (lab[0] + 16) / 116;\n return [transform(Ln + lab[1] / 500) * 0.95047, transform(Ln), transform(Ln - lab[2] / 200) * 1.08883];\n}\n//# sourceMappingURL=transformCIELAB.mjs.map","// Utilities\nimport { clamp } from \"../helpers.mjs\"; // Types\n// For converting XYZ to sRGB\nconst srgbForwardMatrix = [[3.2406, -1.5372, -0.4986], [-0.9689, 1.8758, 0.0415], [0.0557, -0.2040, 1.0570]];\n\n// Forward gamma adjust\nconst srgbForwardTransform = C => C <= 0.0031308 ? C * 12.92 : 1.055 * C ** (1 / 2.4) - 0.055;\n\n// For converting sRGB to XYZ\nconst srgbReverseMatrix = [[0.4124, 0.3576, 0.1805], [0.2126, 0.7152, 0.0722], [0.0193, 0.1192, 0.9505]];\n\n// Reverse gamma adjust\nconst srgbReverseTransform = C => C <= 0.04045 ? C / 12.92 : ((C + 0.055) / 1.055) ** 2.4;\nexport function fromXYZ(xyz) {\n const rgb = Array(3);\n const transform = srgbForwardTransform;\n const matrix = srgbForwardMatrix;\n\n // Matrix transform, then gamma adjustment\n for (let i = 0; i < 3; ++i) {\n // Rescale back to [0, 255]\n rgb[i] = Math.round(clamp(transform(matrix[i][0] * xyz[0] + matrix[i][1] * xyz[1] + matrix[i][2] * xyz[2])) * 255);\n }\n return {\n r: rgb[0],\n g: rgb[1],\n b: rgb[2]\n };\n}\nexport function toXYZ(_ref) {\n let {\n r,\n g,\n b\n } = _ref;\n const xyz = [0, 0, 0];\n const transform = srgbReverseTransform;\n const matrix = srgbReverseMatrix;\n\n // Rescale from [0, 255] to [0, 1] then adjust sRGB gamma to linear RGB\n r = transform(r / 255);\n g = transform(g / 255);\n b = transform(b / 255);\n\n // Matrix color space transform\n for (let i = 0; i < 3; ++i) {\n xyz[i] = matrix[i][0] * r + matrix[i][1] * g + matrix[i][2] * b;\n }\n return xyz;\n}\n//# sourceMappingURL=transformSRGB.mjs.map","// Utilities\nimport { consoleWarn } from \"./console.mjs\";\nimport { chunk, has, padEnd } from \"./helpers.mjs\";\nimport * as CIELAB from \"./color/transformCIELAB.mjs\";\nimport * as sRGB from \"./color/transformSRGB.mjs\"; // Types\nexport function isCssColor(color) {\n return !!color && /^(#|var\\(--|(rgb|hsl)a?\\()/.test(color);\n}\nconst cssColorRe = /^(?(?:rgb|hsl)a?)\\((?.+)\\)/;\nconst mappers = {\n rgb: (r, g, b, a) => ({\n r,\n g,\n b,\n a\n }),\n rgba: (r, g, b, a) => ({\n r,\n g,\n b,\n a\n }),\n hsl: (h, s, l, a) => HSLtoRGB({\n h,\n s,\n l,\n a\n }),\n hsla: (h, s, l, a) => HSLtoRGB({\n h,\n s,\n l,\n a\n }),\n hsv: (h, s, v, a) => HSVtoRGB({\n h,\n s,\n v,\n a\n }),\n hsva: (h, s, v, a) => HSVtoRGB({\n h,\n s,\n v,\n a\n })\n};\nexport function parseColor(color) {\n if (typeof color === 'number') {\n if (isNaN(color) || color < 0 || color > 0xFFFFFF) {\n // int can't have opacity\n consoleWarn(`'${color}' is not a valid hex color`);\n }\n return {\n r: (color & 0xFF0000) >> 16,\n g: (color & 0xFF00) >> 8,\n b: color & 0xFF\n };\n } else if (typeof color === 'string' && cssColorRe.test(color)) {\n const {\n groups\n } = color.match(cssColorRe);\n const {\n fn,\n values\n } = groups;\n const realValues = values.split(/,\\s*/).map(v => {\n if (v.endsWith('%') && ['hsl', 'hsla', 'hsv', 'hsva'].includes(fn)) {\n return parseFloat(v) / 100;\n } else {\n return parseFloat(v);\n }\n });\n return mappers[fn](...realValues);\n } else if (typeof color === 'string') {\n let hex = color.startsWith('#') ? color.slice(1) : color;\n if ([3, 4].includes(hex.length)) {\n hex = hex.split('').map(char => char + char).join('');\n } else if (![6, 8].includes(hex.length)) {\n consoleWarn(`'${color}' is not a valid hex(a) color`);\n }\n const int = parseInt(hex, 16);\n if (isNaN(int) || int < 0 || int > 0xFFFFFFFF) {\n consoleWarn(`'${color}' is not a valid hex(a) color`);\n }\n return HexToRGB(hex);\n } else if (typeof color === 'object') {\n if (has(color, ['r', 'g', 'b'])) {\n return color;\n } else if (has(color, ['h', 's', 'l'])) {\n return HSVtoRGB(HSLtoHSV(color));\n } else if (has(color, ['h', 's', 'v'])) {\n return HSVtoRGB(color);\n }\n }\n throw new TypeError(`Invalid color: ${color == null ? color : String(color) || color.constructor.name}\\nExpected #hex, #hexa, rgb(), rgba(), hsl(), hsla(), object or number`);\n}\nexport function RGBToInt(color) {\n return (color.r << 16) + (color.g << 8) + color.b;\n}\nexport function classToHex(color, colors, currentTheme) {\n const [colorName, colorModifier] = color.toString().trim().replace('-', '').split(' ', 2);\n let hexColor = '';\n if (colorName && colorName in colors) {\n if (colorModifier && colorModifier in colors[colorName]) {\n hexColor = colors[colorName][colorModifier];\n } else if ('base' in colors[colorName]) {\n hexColor = colors[colorName].base;\n }\n } else if (colorName && colorName in currentTheme) {\n hexColor = currentTheme[colorName];\n }\n return hexColor;\n}\n\n/** Converts HSVA to RGBA. Based on formula from https://en.wikipedia.org/wiki/HSL_and_HSV */\nexport function HSVtoRGB(hsva) {\n const {\n h,\n s,\n v,\n a\n } = hsva;\n const f = n => {\n const k = (n + h / 60) % 6;\n return v - v * s * Math.max(Math.min(k, 4 - k, 1), 0);\n };\n const rgb = [f(5), f(3), f(1)].map(v => Math.round(v * 255));\n return {\n r: rgb[0],\n g: rgb[1],\n b: rgb[2],\n a\n };\n}\nexport function HSLtoRGB(hsla) {\n return HSVtoRGB(HSLtoHSV(hsla));\n}\n\n/** Converts RGBA to HSVA. Based on formula from https://en.wikipedia.org/wiki/HSL_and_HSV */\nexport function RGBtoHSV(rgba) {\n if (!rgba) return {\n h: 0,\n s: 1,\n v: 1,\n a: 1\n };\n const r = rgba.r / 255;\n const g = rgba.g / 255;\n const b = rgba.b / 255;\n const max = Math.max(r, g, b);\n const min = Math.min(r, g, b);\n let h = 0;\n if (max !== min) {\n if (max === r) {\n h = 60 * (0 + (g - b) / (max - min));\n } else if (max === g) {\n h = 60 * (2 + (b - r) / (max - min));\n } else if (max === b) {\n h = 60 * (4 + (r - g) / (max - min));\n }\n }\n if (h < 0) h = h + 360;\n const s = max === 0 ? 0 : (max - min) / max;\n const hsv = [h, s, max];\n return {\n h: hsv[0],\n s: hsv[1],\n v: hsv[2],\n a: rgba.a\n };\n}\nexport function HSVtoHSL(hsva) {\n const {\n h,\n s,\n v,\n a\n } = hsva;\n const l = v - v * s / 2;\n const sprime = l === 1 || l === 0 ? 0 : (v - l) / Math.min(l, 1 - l);\n return {\n h,\n s: sprime,\n l,\n a\n };\n}\nexport function HSLtoHSV(hsl) {\n const {\n h,\n s,\n l,\n a\n } = hsl;\n const v = l + s * Math.min(l, 1 - l);\n const sprime = v === 0 ? 0 : 2 - 2 * l / v;\n return {\n h,\n s: sprime,\n v,\n a\n };\n}\nexport function RGBtoCSS(_ref) {\n let {\n r,\n g,\n b,\n a\n } = _ref;\n return a === undefined ? `rgb(${r}, ${g}, ${b})` : `rgba(${r}, ${g}, ${b}, ${a})`;\n}\nexport function HSVtoCSS(hsva) {\n return RGBtoCSS(HSVtoRGB(hsva));\n}\nfunction toHex(v) {\n const h = Math.round(v).toString(16);\n return ('00'.substr(0, 2 - h.length) + h).toUpperCase();\n}\nexport function RGBtoHex(_ref2) {\n let {\n r,\n g,\n b,\n a\n } = _ref2;\n return `#${[toHex(r), toHex(g), toHex(b), a !== undefined ? toHex(Math.round(a * 255)) : ''].join('')}`;\n}\nexport function HexToRGB(hex) {\n hex = parseHex(hex);\n let [r, g, b, a] = chunk(hex, 2).map(c => parseInt(c, 16));\n a = a === undefined ? a : a / 255;\n return {\n r,\n g,\n b,\n a\n };\n}\nexport function HexToHSV(hex) {\n const rgb = HexToRGB(hex);\n return RGBtoHSV(rgb);\n}\nexport function HSVtoHex(hsva) {\n return RGBtoHex(HSVtoRGB(hsva));\n}\nexport function parseHex(hex) {\n if (hex.startsWith('#')) {\n hex = hex.slice(1);\n }\n hex = hex.replace(/([^0-9a-f])/gi, 'F');\n if (hex.length === 3 || hex.length === 4) {\n hex = hex.split('').map(x => x + x).join('');\n }\n if (hex.length !== 6) {\n hex = padEnd(padEnd(hex, 6), 8, 'F');\n }\n return hex;\n}\nexport function parseGradient(gradient, colors, currentTheme) {\n return gradient.replace(/([a-z]+(\\s[a-z]+-[1-5])?)(?=$|,)/gi, x => {\n return classToHex(x, colors, currentTheme) || x;\n }).replace(/(rgba\\()#[0-9a-f]+(?=,)/gi, x => {\n return 'rgba(' + Object.values(HexToRGB(parseHex(x.replace(/rgba\\(/, '')))).slice(0, 3).join(',');\n });\n}\nexport function lighten(value, amount) {\n const lab = CIELAB.fromXYZ(sRGB.toXYZ(value));\n lab[0] = lab[0] + amount * 10;\n return sRGB.fromXYZ(CIELAB.toXYZ(lab));\n}\nexport function darken(value, amount) {\n const lab = CIELAB.fromXYZ(sRGB.toXYZ(value));\n lab[0] = lab[0] - amount * 10;\n return sRGB.fromXYZ(CIELAB.toXYZ(lab));\n}\n\n/**\n * Calculate the relative luminance of a given color\n * @see https://www.w3.org/TR/WCAG20/#relativeluminancedef\n */\nexport function getLuma(color) {\n const rgb = parseColor(color);\n return sRGB.toXYZ(rgb)[1];\n}\n\n/**\n * Returns the contrast ratio (1-21) between two colors.\n * @see https://www.w3.org/TR/WCAG20/#contrast-ratiodef\n */\nexport function getContrast(first, second) {\n const l1 = getLuma(first);\n const l2 = getLuma(second);\n const light = Math.max(l1, l2);\n const dark = Math.min(l1, l2);\n return (light + 0.05) / (dark + 0.05);\n}\n//# sourceMappingURL=colorUtils.mjs.map","// Types\n// eslint-disable-line vue/prefer-import-from-vue\n\n/**\n * Creates a factory function for props definitions.\n * This is used to define props in a composable then override\n * default values in an implementing component.\n *\n * @example Simplified signature\n * (props: Props) => (defaults?: Record) => Props\n *\n * @example Usage\n * const makeProps = propsFactory({\n * foo: String,\n * })\n *\n * defineComponent({\n * props: {\n * ...makeProps({\n * foo: 'a',\n * }),\n * },\n * setup (props) {\n * // would be \"string | undefined\", now \"string\" because a default has been provided\n * props.foo\n * },\n * }\n */\n\nexport function propsFactory(props, source) {\n return defaults => {\n return Object.keys(props).reduce((obj, prop) => {\n const isObjectDefinition = typeof props[prop] === 'object' && props[prop] != null && !Array.isArray(props[prop]);\n const definition = isObjectDefinition ? props[prop] : {\n type: props[prop]\n };\n if (defaults && prop in defaults) {\n obj[prop] = {\n ...definition,\n default: defaults[prop]\n };\n } else {\n obj[prop] = definition;\n }\n if (source && !obj[prop].source) {\n obj[prop].source = source;\n }\n return obj;\n }, {});\n };\n}\n//# sourceMappingURL=propsFactory.mjs.map","// Utilities\nimport { propsFactory } from \"../util/propsFactory.mjs\"; // Types\n// Composables\nexport const makeComponentProps = propsFactory({\n class: [String, Array],\n style: {\n type: [String, Array, Object],\n default: null\n }\n}, 'component');\n//# sourceMappingURL=component.mjs.map","// Composables\nimport { useToggleScope } from \"./toggleScope.mjs\"; // Utilities\nimport { computed, inject, provide, ref, shallowRef, unref, watchEffect } from 'vue';\nimport { getCurrentInstance, injectSelf, mergeDeep, toKebabCase } from \"../util/index.mjs\"; // Types\nexport const DefaultsSymbol = Symbol.for('vuetify:defaults');\nexport function createDefaults(options) {\n return ref(options);\n}\nexport function injectDefaults() {\n const defaults = inject(DefaultsSymbol);\n if (!defaults) throw new Error('[Vuetify] Could not find defaults instance');\n return defaults;\n}\nexport function provideDefaults(defaults, options) {\n const injectedDefaults = injectDefaults();\n const providedDefaults = ref(defaults);\n const newDefaults = computed(() => {\n const disabled = unref(options?.disabled);\n if (disabled) return injectedDefaults.value;\n const scoped = unref(options?.scoped);\n const reset = unref(options?.reset);\n const root = unref(options?.root);\n let properties = mergeDeep(providedDefaults.value, {\n prev: injectedDefaults.value\n });\n if (scoped) return properties;\n if (reset || root) {\n const len = Number(reset || Infinity);\n for (let i = 0; i <= len; i++) {\n if (!properties || !('prev' in properties)) {\n break;\n }\n properties = properties.prev;\n }\n if (properties && typeof root === 'string' && root in properties) {\n properties = mergeDeep(mergeDeep(properties, {\n prev: properties\n }), properties[root]);\n }\n return properties;\n }\n return properties.prev ? mergeDeep(properties.prev, properties) : properties;\n });\n provide(DefaultsSymbol, newDefaults);\n return newDefaults;\n}\nfunction propIsDefined(vnode, prop) {\n return typeof vnode.props?.[prop] !== 'undefined' || typeof vnode.props?.[toKebabCase(prop)] !== 'undefined';\n}\nexport function internalUseDefaults() {\n let props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n let name = arguments.length > 1 ? arguments[1] : undefined;\n let defaults = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : injectDefaults();\n const vm = getCurrentInstance('useDefaults');\n name = name ?? vm.type.name ?? vm.type.__name;\n if (!name) {\n throw new Error('[Vuetify] Could not determine component name');\n }\n const componentDefaults = computed(() => defaults.value?.[props._as ?? name]);\n const _props = new Proxy(props, {\n get(target, prop) {\n const propValue = Reflect.get(target, prop);\n if (prop === 'class' || prop === 'style') {\n return [componentDefaults.value?.[prop], propValue].filter(v => v != null);\n } else if (typeof prop === 'string' && !propIsDefined(vm.vnode, prop)) {\n return componentDefaults.value?.[prop] ?? defaults.value?.global?.[prop] ?? propValue;\n }\n return propValue;\n }\n });\n const _subcomponentDefaults = shallowRef();\n watchEffect(() => {\n if (componentDefaults.value) {\n const subComponents = Object.entries(componentDefaults.value).filter(_ref => {\n let [key] = _ref;\n return key.startsWith(key[0].toUpperCase());\n });\n if (subComponents.length) _subcomponentDefaults.value = Object.fromEntries(subComponents);\n }\n });\n function provideSubDefaults() {\n // If subcomponent defaults are provided, override any\n // subcomponents provided by the component's setup function.\n // This uses injectSelf so must be done after the original setup to work.\n useToggleScope(_subcomponentDefaults, () => {\n provideDefaults(mergeDeep(injectSelf(DefaultsSymbol)?.value ?? {}, _subcomponentDefaults.value));\n });\n }\n return {\n props: _props,\n provideSubDefaults\n };\n}\nexport function useDefaults() {\n let props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n let name = arguments.length > 1 ? arguments[1] : undefined;\n const {\n props: _props,\n provideSubDefaults\n } = internalUseDefaults(props, name);\n provideSubDefaults();\n return _props;\n}\n//# sourceMappingURL=defaults.mjs.map","// Composables\nimport { injectDefaults, internalUseDefaults } from \"../composables/defaults.mjs\"; // Utilities\nimport { defineComponent as _defineComponent // eslint-disable-line no-restricted-imports\n} from 'vue';\nimport { consoleWarn } from \"./console.mjs\";\nimport { pick } from \"./helpers.mjs\";\nimport { propsFactory } from \"./propsFactory.mjs\"; // Types\n// Implementation\nexport function defineComponent(options) {\n options._setup = options._setup ?? options.setup;\n if (!options.name) {\n consoleWarn('The component is missing an explicit name, unable to generate default prop value');\n return options;\n }\n if (options._setup) {\n options.props = propsFactory(options.props ?? {}, options.name)();\n const propKeys = Object.keys(options.props);\n options.filterProps = function filterProps(props) {\n return pick(props, propKeys, ['class', 'style']);\n };\n options.props._as = String;\n options.setup = function setup(props, ctx) {\n const defaults = injectDefaults();\n\n // Skip props proxy if defaults are not provided\n if (!defaults.value) return options._setup(props, ctx);\n const {\n props: _props,\n provideSubDefaults\n } = internalUseDefaults(props, props._as ?? options.name, defaults);\n const setupBindings = options._setup(_props, ctx);\n provideSubDefaults();\n return setupBindings;\n };\n }\n return options;\n}\n// Implementation\nexport function genericComponent() {\n let exposeDefaults = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;\n return options => (exposeDefaults ? defineComponent : _defineComponent)(options);\n}\nexport function defineFunctionalComponent(props, render) {\n render.props = props;\n return render;\n}\n//# sourceMappingURL=defineComponent.mjs.map","// Composables\nimport { makeComponentProps } from \"../composables/component.mjs\"; // Utilities\nimport { camelize, capitalize, h } from 'vue';\nimport { genericComponent } from \"./defineComponent.mjs\";\nexport function createSimpleFunctional(klass) {\n let tag = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'div';\n let name = arguments.length > 2 ? arguments[2] : undefined;\n return genericComponent()({\n name: name ?? capitalize(camelize(klass.replace(/__/g, '-'))),\n props: {\n tag: {\n type: String,\n default: tag\n },\n ...makeComponentProps()\n },\n setup(props, _ref) {\n let {\n slots\n } = _ref;\n return () => {\n return h(props.tag, {\n class: [klass, props.class],\n style: props.style\n }, slots.default?.());\n };\n }\n });\n}\n//# sourceMappingURL=createSimpleFunctional.mjs.map","/**\n * Returns:\n * - 'null' if the node is not attached to the DOM\n * - the root node (HTMLDocument | ShadowRoot) otherwise\n */\nexport function attachedRoot(node) {\n /* istanbul ignore next */\n if (typeof node.getRootNode !== 'function') {\n // Shadow DOM not supported (IE11), lets find the root of this node\n while (node.parentNode) node = node.parentNode;\n\n // The root parent is the document if the node is attached to the DOM\n if (node !== document) return null;\n return document;\n }\n const root = node.getRootNode();\n\n // The composed root node is the document if the node is attached to the DOM\n if (root !== document && root.getRootNode({\n composed: true\n }) !== document) return null;\n return root;\n}\n//# sourceMappingURL=dom.mjs.map","export const standardEasing = 'cubic-bezier(0.4, 0, 0.2, 1)';\nexport const deceleratedEasing = 'cubic-bezier(0.0, 0, 0.2, 1)'; // Entering\nexport const acceleratedEasing = 'cubic-bezier(0.4, 0, 1, 1)'; // Leaving\n//# sourceMappingURL=easing.mjs.map","// Utilities\nimport { getCurrentInstance as _getCurrentInstance } from 'vue';\nimport { toKebabCase } from \"./helpers.mjs\"; // Types\nexport function getCurrentInstance(name, message) {\n const vm = _getCurrentInstance();\n if (!vm) {\n throw new Error(`[Vuetify] ${name} ${message || 'must be called from inside a setup function'}`);\n }\n return vm;\n}\nexport function getCurrentInstanceName() {\n let name = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'composables';\n const vm = getCurrentInstance(name).type;\n return toKebabCase(vm?.aliasName || vm?.name);\n}\nlet _uid = 0;\nlet _map = new WeakMap();\nexport function getUid() {\n const vm = getCurrentInstance('getUid');\n if (_map.has(vm)) return _map.get(vm);else {\n const uid = _uid++;\n _map.set(vm, uid);\n return uid;\n }\n}\ngetUid.reset = () => {\n _uid = 0;\n _map = new WeakMap();\n};\n//# sourceMappingURL=getCurrentInstance.mjs.map","export function getScrollParent(el) {\n while (el) {\n if (hasScrollbar(el)) return el;\n el = el.parentElement;\n }\n return document.scrollingElement;\n}\nexport function getScrollParents(el, stopAt) {\n const elements = [];\n if (stopAt && el && !stopAt.contains(el)) return elements;\n while (el) {\n if (hasScrollbar(el)) elements.push(el);\n if (el === stopAt) break;\n el = el.parentElement;\n }\n return elements;\n}\nexport function hasScrollbar(el) {\n if (!el || el.nodeType !== Node.ELEMENT_NODE) return false;\n const style = window.getComputedStyle(el);\n return style.overflowY === 'scroll' || style.overflowY === 'auto' && el.scrollHeight > el.clientHeight;\n}\n//# sourceMappingURL=getScrollParent.mjs.map","export const IN_BROWSER = typeof window !== 'undefined';\nexport const SUPPORTS_INTERSECTION = IN_BROWSER && 'IntersectionObserver' in window;\nexport const SUPPORTS_TOUCH = IN_BROWSER && ('ontouchstart' in window || window.navigator.maxTouchPoints > 0);\nexport const SUPPORTS_FOCUS_VISIBLE = IN_BROWSER && typeof CSS !== 'undefined' && typeof CSS.supports !== 'undefined' && CSS.supports('selector(:focus-visible)');\n//# sourceMappingURL=globals.mjs.map","// Utilities\nimport { getCurrentInstance } from \"./getCurrentInstance.mjs\"; // Types\nexport function injectSelf(key) {\n const {\n provides\n } = getCurrentInstance('injectSelf');\n if (provides && key in provides) {\n // TS doesn't allow symbol as index type\n return provides[key];\n }\n return undefined;\n}\n//# sourceMappingURL=injectSelf.mjs.map","export function isFixedPosition(el) {\n while (el) {\n if (window.getComputedStyle(el).position === 'fixed') {\n return true;\n }\n el = el.offsetParent;\n }\n return false;\n}\n//# sourceMappingURL=isFixedPosition.mjs.map","// Utilities\nimport { getCurrentInstance } from \"./getCurrentInstance.mjs\"; // Types\nexport function useRender(render) {\n const vm = getCurrentInstance('useRender');\n vm.render = render;\n}\n//# sourceMappingURL=useRender.mjs.map","// Composables\nimport { useToggleScope } from \"../../composables/toggleScope.mjs\"; // Utilities\nimport { computed, nextTick, onScopeDispose, ref, watch } from 'vue';\nimport { anchorToPoint, getOffset } from \"./util/point.mjs\";\nimport { clamp, consoleError, convertToUnit, destructComputed, flipAlign, flipCorner, flipSide, getAxis, getScrollParents, IN_BROWSER, isFixedPosition, nullifyTransforms, parseAnchor, propsFactory } from \"../../util/index.mjs\";\nimport { Box, getOverflow } from \"../../util/box.mjs\"; // Types\nconst locationStrategies = {\n static: staticLocationStrategy,\n // specific viewport position, usually centered\n connected: connectedLocationStrategy // connected to a certain element\n};\n\nexport const makeLocationStrategyProps = propsFactory({\n locationStrategy: {\n type: [String, Function],\n default: 'static',\n validator: val => typeof val === 'function' || val in locationStrategies\n },\n location: {\n type: String,\n default: 'bottom'\n },\n origin: {\n type: String,\n default: 'auto'\n },\n offset: [Number, String, Array]\n}, 'VOverlay-location-strategies');\nexport function useLocationStrategies(props, data) {\n const contentStyles = ref({});\n const updateLocation = ref();\n if (IN_BROWSER) {\n useToggleScope(() => !!(data.isActive.value && props.locationStrategy), reset => {\n watch(() => props.locationStrategy, reset);\n onScopeDispose(() => {\n updateLocation.value = undefined;\n });\n if (typeof props.locationStrategy === 'function') {\n updateLocation.value = props.locationStrategy(data, props, contentStyles)?.updateLocation;\n } else {\n updateLocation.value = locationStrategies[props.locationStrategy](data, props, contentStyles)?.updateLocation;\n }\n });\n window.addEventListener('resize', onResize, {\n passive: true\n });\n onScopeDispose(() => {\n window.removeEventListener('resize', onResize);\n updateLocation.value = undefined;\n });\n }\n function onResize(e) {\n updateLocation.value?.(e);\n }\n return {\n contentStyles,\n updateLocation\n };\n}\nfunction staticLocationStrategy() {\n // TODO\n}\n\n/** Get size of element ignoring max-width/max-height */\nfunction getIntrinsicSize(el, isRtl) {\n // const scrollables = new Map()\n // el.querySelectorAll('*').forEach(el => {\n // const x = el.scrollLeft\n // const y = el.scrollTop\n // if (x || y) {\n // scrollables.set(el, [x, y])\n // }\n // })\n\n // const initialMaxWidth = el.style.maxWidth\n // const initialMaxHeight = el.style.maxHeight\n // el.style.removeProperty('max-width')\n // el.style.removeProperty('max-height')\n\n /* eslint-disable-next-line sonarjs/prefer-immediate-return */\n const contentBox = nullifyTransforms(el);\n if (isRtl) {\n contentBox.x += parseFloat(el.style.right || 0);\n } else {\n contentBox.x -= parseFloat(el.style.left || 0);\n }\n contentBox.y -= parseFloat(el.style.top || 0);\n\n // el.style.maxWidth = initialMaxWidth\n // el.style.maxHeight = initialMaxHeight\n // scrollables.forEach((position, el) => {\n // el.scrollTo(...position)\n // })\n\n return contentBox;\n}\nfunction connectedLocationStrategy(data, props, contentStyles) {\n const activatorFixed = isFixedPosition(data.activatorEl.value);\n if (activatorFixed) {\n Object.assign(contentStyles.value, {\n position: 'fixed',\n top: 0,\n [data.isRtl.value ? 'right' : 'left']: 0\n });\n }\n const {\n preferredAnchor,\n preferredOrigin\n } = destructComputed(() => {\n const parsedAnchor = parseAnchor(props.location, data.isRtl.value);\n const parsedOrigin = props.origin === 'overlap' ? parsedAnchor : props.origin === 'auto' ? flipSide(parsedAnchor) : parseAnchor(props.origin, data.isRtl.value);\n\n // Some combinations of props may produce an invalid origin\n if (parsedAnchor.side === parsedOrigin.side && parsedAnchor.align === flipAlign(parsedOrigin).align) {\n return {\n preferredAnchor: flipCorner(parsedAnchor),\n preferredOrigin: flipCorner(parsedOrigin)\n };\n } else {\n return {\n preferredAnchor: parsedAnchor,\n preferredOrigin: parsedOrigin\n };\n }\n });\n const [minWidth, minHeight, maxWidth, maxHeight] = ['minWidth', 'minHeight', 'maxWidth', 'maxHeight'].map(key => {\n return computed(() => {\n const val = parseFloat(props[key]);\n return isNaN(val) ? Infinity : val;\n });\n });\n const offset = computed(() => {\n if (Array.isArray(props.offset)) {\n return props.offset;\n }\n if (typeof props.offset === 'string') {\n const offset = props.offset.split(' ').map(parseFloat);\n if (offset.length < 2) offset.push(0);\n return offset;\n }\n return typeof props.offset === 'number' ? [props.offset, 0] : [0, 0];\n });\n let observe = false;\n const observer = new ResizeObserver(() => {\n if (observe) updateLocation();\n });\n watch([data.activatorEl, data.contentEl], (_ref, _ref2) => {\n let [newActivatorEl, newContentEl] = _ref;\n let [oldActivatorEl, oldContentEl] = _ref2;\n if (oldActivatorEl) observer.unobserve(oldActivatorEl);\n if (newActivatorEl) observer.observe(newActivatorEl);\n if (oldContentEl) observer.unobserve(oldContentEl);\n if (newContentEl) observer.observe(newContentEl);\n }, {\n immediate: true\n });\n onScopeDispose(() => {\n observer.disconnect();\n });\n\n // eslint-disable-next-line max-statements\n function updateLocation() {\n observe = false;\n requestAnimationFrame(() => {\n requestAnimationFrame(() => observe = true);\n });\n if (!data.activatorEl.value || !data.contentEl.value) return;\n const targetBox = data.activatorEl.value.getBoundingClientRect();\n const contentBox = getIntrinsicSize(data.contentEl.value, data.isRtl.value);\n const scrollParents = getScrollParents(data.contentEl.value);\n const viewportMargin = 12;\n if (!scrollParents.length) {\n scrollParents.push(document.documentElement);\n if (!(data.contentEl.value.style.top && data.contentEl.value.style.left)) {\n contentBox.x -= parseFloat(document.documentElement.style.getPropertyValue('--v-body-scroll-x') || 0);\n contentBox.y -= parseFloat(document.documentElement.style.getPropertyValue('--v-body-scroll-y') || 0);\n }\n }\n const viewport = scrollParents.reduce((box, el) => {\n const rect = el.getBoundingClientRect();\n const scrollBox = new Box({\n x: el === document.documentElement ? 0 : rect.x,\n y: el === document.documentElement ? 0 : rect.y,\n width: el.clientWidth,\n height: el.clientHeight\n });\n if (box) {\n return new Box({\n x: Math.max(box.left, scrollBox.left),\n y: Math.max(box.top, scrollBox.top),\n width: Math.min(box.right, scrollBox.right) - Math.max(box.left, scrollBox.left),\n height: Math.min(box.bottom, scrollBox.bottom) - Math.max(box.top, scrollBox.top)\n });\n }\n return scrollBox;\n }, undefined);\n viewport.x += viewportMargin;\n viewport.y += viewportMargin;\n viewport.width -= viewportMargin * 2;\n viewport.height -= viewportMargin * 2;\n let placement = {\n anchor: preferredAnchor.value,\n origin: preferredOrigin.value\n };\n function checkOverflow(_placement) {\n const box = new Box(contentBox);\n const targetPoint = anchorToPoint(_placement.anchor, targetBox);\n const contentPoint = anchorToPoint(_placement.origin, box);\n let {\n x,\n y\n } = getOffset(targetPoint, contentPoint);\n switch (_placement.anchor.side) {\n case 'top':\n y -= offset.value[0];\n break;\n case 'bottom':\n y += offset.value[0];\n break;\n case 'left':\n x -= offset.value[0];\n break;\n case 'right':\n x += offset.value[0];\n break;\n }\n switch (_placement.anchor.align) {\n case 'top':\n y -= offset.value[1];\n break;\n case 'bottom':\n y += offset.value[1];\n break;\n case 'left':\n x -= offset.value[1];\n break;\n case 'right':\n x += offset.value[1];\n break;\n }\n box.x += x;\n box.y += y;\n box.width = Math.min(box.width, maxWidth.value);\n box.height = Math.min(box.height, maxHeight.value);\n const overflows = getOverflow(box, viewport);\n return {\n overflows,\n x,\n y\n };\n }\n let x = 0;\n let y = 0;\n const available = {\n x: 0,\n y: 0\n };\n const flipped = {\n x: false,\n y: false\n };\n let resets = -1;\n while (true) {\n if (resets++ > 10) {\n consoleError('Infinite loop detected in connectedLocationStrategy');\n break;\n }\n const {\n x: _x,\n y: _y,\n overflows\n } = checkOverflow(placement);\n x += _x;\n y += _y;\n contentBox.x += _x;\n contentBox.y += _y;\n\n // flip\n {\n const axis = getAxis(placement.anchor);\n const hasOverflowX = overflows.x.before || overflows.x.after;\n const hasOverflowY = overflows.y.before || overflows.y.after;\n let reset = false;\n ['x', 'y'].forEach(key => {\n if (key === 'x' && hasOverflowX && !flipped.x || key === 'y' && hasOverflowY && !flipped.y) {\n const newPlacement = {\n anchor: {\n ...placement.anchor\n },\n origin: {\n ...placement.origin\n }\n };\n const flip = key === 'x' ? axis === 'y' ? flipAlign : flipSide : axis === 'y' ? flipSide : flipAlign;\n newPlacement.anchor = flip(newPlacement.anchor);\n newPlacement.origin = flip(newPlacement.origin);\n const {\n overflows: newOverflows\n } = checkOverflow(newPlacement);\n if (newOverflows[key].before <= overflows[key].before && newOverflows[key].after <= overflows[key].after || newOverflows[key].before + newOverflows[key].after < (overflows[key].before + overflows[key].after) / 2) {\n placement = newPlacement;\n reset = flipped[key] = true;\n }\n }\n });\n if (reset) continue;\n }\n\n // shift\n if (overflows.x.before) {\n x += overflows.x.before;\n contentBox.x += overflows.x.before;\n }\n if (overflows.x.after) {\n x -= overflows.x.after;\n contentBox.x -= overflows.x.after;\n }\n if (overflows.y.before) {\n y += overflows.y.before;\n contentBox.y += overflows.y.before;\n }\n if (overflows.y.after) {\n y -= overflows.y.after;\n contentBox.y -= overflows.y.after;\n }\n\n // size\n {\n const overflows = getOverflow(contentBox, viewport);\n available.x = viewport.width - overflows.x.before - overflows.x.after;\n available.y = viewport.height - overflows.y.before - overflows.y.after;\n x += overflows.x.before;\n contentBox.x += overflows.x.before;\n y += overflows.y.before;\n contentBox.y += overflows.y.before;\n }\n break;\n }\n const axis = getAxis(placement.anchor);\n Object.assign(contentStyles.value, {\n '--v-overlay-anchor-origin': `${placement.anchor.side} ${placement.anchor.align}`,\n transformOrigin: `${placement.origin.side} ${placement.origin.align}`,\n // transform: `translate(${pixelRound(x)}px, ${pixelRound(y)}px)`,\n top: convertToUnit(pixelRound(y)),\n left: data.isRtl.value ? undefined : convertToUnit(pixelRound(x)),\n right: data.isRtl.value ? convertToUnit(pixelRound(-x)) : undefined,\n minWidth: convertToUnit(axis === 'y' ? Math.min(minWidth.value, targetBox.width) : minWidth.value),\n maxWidth: convertToUnit(pixelCeil(clamp(available.x, minWidth.value === Infinity ? 0 : minWidth.value, maxWidth.value))),\n maxHeight: convertToUnit(pixelCeil(clamp(available.y, minHeight.value === Infinity ? 0 : minHeight.value, maxHeight.value)))\n });\n return {\n available,\n contentBox\n };\n }\n watch(() => [preferredAnchor.value, preferredOrigin.value, props.offset, props.minWidth, props.minHeight, props.maxWidth, props.maxHeight], () => updateLocation());\n nextTick(() => {\n const result = updateLocation();\n\n // TODO: overflowing content should only require a single updateLocation call\n // Icky hack to make sure the content is positioned consistently\n if (!result) return;\n const {\n available,\n contentBox\n } = result;\n if (contentBox.height > available.y) {\n requestAnimationFrame(() => {\n updateLocation();\n requestAnimationFrame(() => {\n updateLocation();\n });\n });\n }\n });\n return {\n updateLocation\n };\n}\nfunction pixelRound(val) {\n return Math.round(val * devicePixelRatio) / devicePixelRatio;\n}\nfunction pixelCeil(val) {\n return Math.ceil(val * devicePixelRatio) / devicePixelRatio;\n}\n//# sourceMappingURL=locationStrategies.mjs.map","let clean = true;\nconst frames = [];\n\n/**\n * Schedule a task to run in an animation frame on its own\n * This is useful for heavy tasks that may cause jank if all ran together\n */\nexport function requestNewFrame(cb) {\n if (!clean || frames.length) {\n frames.push(cb);\n run();\n } else {\n clean = false;\n cb();\n run();\n }\n}\nlet raf = -1;\nfunction run() {\n cancelAnimationFrame(raf);\n raf = requestAnimationFrame(() => {\n const frame = frames.shift();\n if (frame) frame();\n if (frames.length) run();else clean = true;\n });\n}\n//# sourceMappingURL=requestNewFrame.mjs.map","// Utilities\nimport { effectScope, nextTick, onScopeDispose, watchEffect } from 'vue';\nimport { requestNewFrame } from \"./requestNewFrame.mjs\";\nimport { convertToUnit, getScrollParents, hasScrollbar, IN_BROWSER, propsFactory } from \"../../util/index.mjs\"; // Types\nconst scrollStrategies = {\n none: null,\n close: closeScrollStrategy,\n block: blockScrollStrategy,\n reposition: repositionScrollStrategy\n};\nexport const makeScrollStrategyProps = propsFactory({\n scrollStrategy: {\n type: [String, Function],\n default: 'block',\n validator: val => typeof val === 'function' || val in scrollStrategies\n }\n}, 'VOverlay-scroll-strategies');\nexport function useScrollStrategies(props, data) {\n if (!IN_BROWSER) return;\n let scope;\n watchEffect(async () => {\n scope?.stop();\n if (!(data.isActive.value && props.scrollStrategy)) return;\n scope = effectScope();\n await nextTick();\n scope.active && scope.run(() => {\n if (typeof props.scrollStrategy === 'function') {\n props.scrollStrategy(data, props, scope);\n } else {\n scrollStrategies[props.scrollStrategy]?.(data, props, scope);\n }\n });\n });\n onScopeDispose(() => {\n scope?.stop();\n });\n}\nfunction closeScrollStrategy(data) {\n function onScroll(e) {\n data.isActive.value = false;\n }\n bindScroll(data.activatorEl.value ?? data.contentEl.value, onScroll);\n}\nfunction blockScrollStrategy(data, props) {\n const offsetParent = data.root.value?.offsetParent;\n const scrollElements = [...new Set([...getScrollParents(data.activatorEl.value, props.contained ? offsetParent : undefined), ...getScrollParents(data.contentEl.value, props.contained ? offsetParent : undefined)])].filter(el => !el.classList.contains('v-overlay-scroll-blocked'));\n const scrollbarWidth = window.innerWidth - document.documentElement.offsetWidth;\n const scrollableParent = (el => hasScrollbar(el) && el)(offsetParent || document.documentElement);\n if (scrollableParent) {\n data.root.value.classList.add('v-overlay--scroll-blocked');\n }\n scrollElements.forEach((el, i) => {\n el.style.setProperty('--v-body-scroll-x', convertToUnit(-el.scrollLeft));\n el.style.setProperty('--v-body-scroll-y', convertToUnit(-el.scrollTop));\n el.style.setProperty('--v-scrollbar-offset', convertToUnit(scrollbarWidth));\n el.classList.add('v-overlay-scroll-blocked');\n });\n onScopeDispose(() => {\n scrollElements.forEach((el, i) => {\n const x = parseFloat(el.style.getPropertyValue('--v-body-scroll-x'));\n const y = parseFloat(el.style.getPropertyValue('--v-body-scroll-y'));\n el.style.removeProperty('--v-body-scroll-x');\n el.style.removeProperty('--v-body-scroll-y');\n el.style.removeProperty('--v-scrollbar-offset');\n el.classList.remove('v-overlay-scroll-blocked');\n el.scrollLeft = -x;\n el.scrollTop = -y;\n });\n if (scrollableParent) {\n data.root.value.classList.remove('v-overlay--scroll-blocked');\n }\n });\n}\nfunction repositionScrollStrategy(data, props, scope) {\n let slow = false;\n let raf = -1;\n let ric = -1;\n function update(e) {\n requestNewFrame(() => {\n const start = performance.now();\n data.updateLocation.value?.(e);\n const time = performance.now() - start;\n slow = time / (1000 / 60) > 2;\n });\n }\n ric = (typeof requestIdleCallback === 'undefined' ? cb => cb() : requestIdleCallback)(() => {\n scope.run(() => {\n bindScroll(data.activatorEl.value ?? data.contentEl.value, e => {\n if (slow) {\n // If the position calculation is slow,\n // defer updates until scrolling is finished.\n // Browsers usually fire one scroll event per frame so\n // we just wait until we've got two frames without an event\n cancelAnimationFrame(raf);\n raf = requestAnimationFrame(() => {\n raf = requestAnimationFrame(() => {\n update(e);\n });\n });\n } else {\n update(e);\n }\n });\n });\n });\n onScopeDispose(() => {\n typeof cancelIdleCallback !== 'undefined' && cancelIdleCallback(ric);\n cancelAnimationFrame(raf);\n });\n}\n\n/** @private */\nfunction bindScroll(el, onScroll) {\n const scrollElements = [document, ...getScrollParents(el)];\n scrollElements.forEach(el => {\n el.addEventListener('scroll', onScroll, {\n passive: true\n });\n });\n onScopeDispose(() => {\n scrollElements.forEach(el => {\n el.removeEventListener('scroll', onScroll);\n });\n });\n}\n//# sourceMappingURL=scrollStrategies.mjs.map","// Types\n\nexport const VMenuSymbol = Symbol.for('vuetify:v-menu');\n//# sourceMappingURL=shared.mjs.map","// Utilities\nimport { IN_BROWSER, propsFactory } from \"../util/index.mjs\"; // Types\n// Composables\nexport const makeDelayProps = propsFactory({\n closeDelay: [Number, String],\n openDelay: [Number, String]\n}, 'delay');\nexport function useDelay(props, cb) {\n const delays = {};\n const runDelayFactory = prop => () => {\n // istanbul ignore next\n if (!IN_BROWSER) return Promise.resolve(true);\n const active = prop === 'openDelay';\n delays.closeDelay && window.clearTimeout(delays.closeDelay);\n delete delays.closeDelay;\n delays.openDelay && window.clearTimeout(delays.openDelay);\n delete delays.openDelay;\n return new Promise(resolve => {\n const delay = parseInt(props[prop] ?? 0, 10);\n delays[prop] = window.setTimeout(() => {\n cb?.(active);\n resolve(active);\n }, delay);\n });\n };\n return {\n runCloseDelay: runDelayFactory('closeDelay'),\n runOpenDelay: runDelayFactory('openDelay')\n };\n}\n//# sourceMappingURL=delay.mjs.map","// Components\nimport { VMenuSymbol } from \"../VMenu/shared.mjs\"; // Composables\nimport { makeDelayProps, useDelay } from \"../../composables/delay.mjs\"; // Utilities\nimport { computed, effectScope, inject, mergeProps, nextTick, onScopeDispose, ref, watch, watchEffect } from 'vue';\nimport { bindProps, getCurrentInstance, IN_BROWSER, propsFactory, refElement, SUPPORTS_FOCUS_VISIBLE, unbindProps } from \"../../util/index.mjs\"; // Types\nexport const makeActivatorProps = propsFactory({\n activator: [String, Object],\n activatorProps: {\n type: Object,\n default: () => ({})\n },\n openOnClick: {\n type: Boolean,\n default: undefined\n },\n openOnHover: Boolean,\n openOnFocus: {\n type: Boolean,\n default: undefined\n },\n closeOnContentClick: Boolean,\n ...makeDelayProps()\n}, 'VOverlay-activator');\nexport function useActivator(props, _ref) {\n let {\n isActive,\n isTop\n } = _ref;\n const activatorEl = ref();\n let isHovered = false;\n let isFocused = false;\n let firstEnter = true;\n const openOnFocus = computed(() => props.openOnFocus || props.openOnFocus == null && props.openOnHover);\n const openOnClick = computed(() => props.openOnClick || props.openOnClick == null && !props.openOnHover && !openOnFocus.value);\n const {\n runOpenDelay,\n runCloseDelay\n } = useDelay(props, value => {\n if (value === (props.openOnHover && isHovered || openOnFocus.value && isFocused) && !(props.openOnHover && isActive.value && !isTop.value)) {\n if (isActive.value !== value) {\n firstEnter = true;\n }\n isActive.value = value;\n }\n });\n const availableEvents = {\n onClick: e => {\n e.stopPropagation();\n activatorEl.value = e.currentTarget || e.target;\n isActive.value = !isActive.value;\n },\n onMouseenter: e => {\n if (e.sourceCapabilities?.firesTouchEvents) return;\n isHovered = true;\n activatorEl.value = e.currentTarget || e.target;\n runOpenDelay();\n },\n onMouseleave: e => {\n isHovered = false;\n runCloseDelay();\n },\n onFocus: e => {\n if (SUPPORTS_FOCUS_VISIBLE && !e.target.matches(':focus-visible')) return;\n isFocused = true;\n e.stopPropagation();\n activatorEl.value = e.currentTarget || e.target;\n runOpenDelay();\n },\n onBlur: e => {\n isFocused = false;\n e.stopPropagation();\n runCloseDelay();\n }\n };\n const activatorEvents = computed(() => {\n const events = {};\n if (openOnClick.value) {\n events.onClick = availableEvents.onClick;\n }\n if (props.openOnHover) {\n events.onMouseenter = availableEvents.onMouseenter;\n events.onMouseleave = availableEvents.onMouseleave;\n }\n if (openOnFocus.value) {\n events.onFocus = availableEvents.onFocus;\n events.onBlur = availableEvents.onBlur;\n }\n return events;\n });\n const contentEvents = computed(() => {\n const events = {};\n if (props.openOnHover) {\n events.onMouseenter = () => {\n isHovered = true;\n runOpenDelay();\n };\n events.onMouseleave = () => {\n isHovered = false;\n runCloseDelay();\n };\n }\n if (openOnFocus.value) {\n events.onFocusin = () => {\n isFocused = true;\n runOpenDelay();\n };\n events.onFocusout = () => {\n isFocused = false;\n runCloseDelay();\n };\n }\n if (props.closeOnContentClick) {\n const menu = inject(VMenuSymbol, null);\n events.onClick = () => {\n isActive.value = false;\n menu?.closeParents();\n };\n }\n return events;\n });\n const scrimEvents = computed(() => {\n const events = {};\n if (props.openOnHover) {\n events.onMouseenter = () => {\n if (firstEnter) {\n isHovered = true;\n firstEnter = false;\n runOpenDelay();\n }\n };\n events.onMouseleave = () => {\n isHovered = false;\n runCloseDelay();\n };\n }\n return events;\n });\n watch(isTop, val => {\n if (val && (props.openOnHover && !isHovered && (!openOnFocus.value || !isFocused) || openOnFocus.value && !isFocused && (!props.openOnHover || !isHovered))) {\n isActive.value = false;\n }\n });\n const activatorRef = ref();\n watchEffect(() => {\n if (!activatorRef.value) return;\n nextTick(() => {\n activatorEl.value = refElement(activatorRef.value);\n });\n });\n const vm = getCurrentInstance('useActivator');\n let scope;\n watch(() => !!props.activator, val => {\n if (val && IN_BROWSER) {\n scope = effectScope();\n scope.run(() => {\n _useActivator(props, vm, {\n activatorEl,\n activatorEvents\n });\n });\n } else if (scope) {\n scope.stop();\n }\n }, {\n flush: 'post',\n immediate: true\n });\n onScopeDispose(() => {\n scope?.stop();\n });\n return {\n activatorEl,\n activatorRef,\n activatorEvents,\n contentEvents,\n scrimEvents\n };\n}\nfunction _useActivator(props, vm, _ref2) {\n let {\n activatorEl,\n activatorEvents\n } = _ref2;\n watch(() => props.activator, (val, oldVal) => {\n if (oldVal && val !== oldVal) {\n const activator = getActivator(oldVal);\n activator && unbindActivatorProps(activator);\n }\n if (val) {\n nextTick(() => bindActivatorProps());\n }\n }, {\n immediate: true\n });\n watch(() => props.activatorProps, () => {\n bindActivatorProps();\n });\n onScopeDispose(() => {\n unbindActivatorProps();\n });\n function bindActivatorProps() {\n let el = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : getActivator();\n let _props = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : props.activatorProps;\n if (!el) return;\n bindProps(el, mergeProps(activatorEvents.value, _props));\n }\n function unbindActivatorProps() {\n let el = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : getActivator();\n let _props = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : props.activatorProps;\n if (!el) return;\n unbindProps(el, mergeProps(activatorEvents.value, _props));\n }\n function getActivator() {\n let selector = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : props.activator;\n let activator;\n if (selector) {\n if (selector === 'parent') {\n let el = vm?.proxy?.$el?.parentNode;\n while (el.hasAttribute('data-no-activator')) {\n el = el.parentNode;\n }\n activator = el;\n } else if (typeof selector === 'string') {\n // Selector\n activator = document.querySelector(selector);\n } else if ('$el' in selector) {\n // Component (ref)\n activator = selector.$el;\n } else {\n // HTMLElement | Element\n activator = selector;\n }\n }\n\n // The activator should only be a valid element (Ignore comments and text nodes)\n activatorEl.value = activator?.nodeType === Node.ELEMENT_NODE ? activator : null;\n return activatorEl.value;\n }\n}\n//# sourceMappingURL=useActivator.mjs.map","// Utilities\nimport { computed, isRef } from 'vue';\nimport { destructComputed, isCssColor } from \"../util/index.mjs\"; // Types\n// Composables\nexport function useColor(colors) {\n return destructComputed(() => {\n const classes = [];\n const styles = {};\n if (colors.value.background) {\n if (isCssColor(colors.value.background)) {\n styles.backgroundColor = colors.value.background;\n } else {\n classes.push(`bg-${colors.value.background}`);\n }\n }\n if (colors.value.text) {\n if (isCssColor(colors.value.text)) {\n styles.color = colors.value.text;\n styles.caretColor = colors.value.text;\n } else {\n classes.push(`text-${colors.value.text}`);\n }\n }\n return {\n colorClasses: classes,\n colorStyles: styles\n };\n });\n}\nexport function useTextColor(props, name) {\n const colors = computed(() => ({\n text: isRef(props) ? props.value : name ? props[name] : null\n }));\n const {\n colorClasses: textColorClasses,\n colorStyles: textColorStyles\n } = useColor(colors);\n return {\n textColorClasses,\n textColorStyles\n };\n}\nexport function useBackgroundColor(props, name) {\n const colors = computed(() => ({\n background: isRef(props) ? props.value : name ? props[name] : null\n }));\n const {\n colorClasses: backgroundColorClasses,\n colorStyles: backgroundColorStyles\n } = useColor(colors);\n return {\n backgroundColorClasses,\n backgroundColorStyles\n };\n}\n//# sourceMappingURL=color.mjs.map","// Utilities\nimport { computed } from 'vue';\nimport { convertToUnit, propsFactory } from \"../util/index.mjs\"; // Types\n// Composables\nexport const makeDimensionProps = propsFactory({\n height: [Number, String],\n maxHeight: [Number, String],\n maxWidth: [Number, String],\n minHeight: [Number, String],\n minWidth: [Number, String],\n width: [Number, String]\n}, 'dimension');\nexport function useDimension(props) {\n const dimensionStyles = computed(() => ({\n height: convertToUnit(props.height),\n maxHeight: convertToUnit(props.maxHeight),\n maxWidth: convertToUnit(props.maxWidth),\n minHeight: convertToUnit(props.minHeight),\n minWidth: convertToUnit(props.minWidth),\n width: convertToUnit(props.width)\n }));\n return {\n dimensionStyles\n };\n}\n//# sourceMappingURL=dimensions.mjs.map","// Utilities\nimport { inject, reactive, shallowRef, toRefs, watchEffect } from 'vue';\nimport { mergeDeep } from \"../util/index.mjs\";\nimport { IN_BROWSER, SUPPORTS_TOUCH } from \"../util/globals.mjs\"; // Types\nexport const breakpoints = ['sm', 'md', 'lg', 'xl', 'xxl']; // no xs\n\nexport const DisplaySymbol = Symbol.for('vuetify:display');\nconst defaultDisplayOptions = {\n mobileBreakpoint: 'lg',\n thresholds: {\n xs: 0,\n sm: 600,\n md: 960,\n lg: 1280,\n xl: 1920,\n xxl: 2560\n }\n};\nconst parseDisplayOptions = function () {\n let options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : defaultDisplayOptions;\n return mergeDeep(defaultDisplayOptions, options);\n};\nfunction getClientWidth(ssr) {\n return IN_BROWSER && !ssr ? window.innerWidth : typeof ssr === 'object' && ssr.clientWidth || 0;\n}\nfunction getClientHeight(ssr) {\n return IN_BROWSER && !ssr ? window.innerHeight : typeof ssr === 'object' && ssr.clientHeight || 0;\n}\nfunction getPlatform(ssr) {\n const userAgent = IN_BROWSER && !ssr ? window.navigator.userAgent : 'ssr';\n function match(regexp) {\n return Boolean(userAgent.match(regexp));\n }\n const android = match(/android/i);\n const ios = match(/iphone|ipad|ipod/i);\n const cordova = match(/cordova/i);\n const electron = match(/electron/i);\n const chrome = match(/chrome/i);\n const edge = match(/edge/i);\n const firefox = match(/firefox/i);\n const opera = match(/opera/i);\n const win = match(/win/i);\n const mac = match(/mac/i);\n const linux = match(/linux/i);\n return {\n android,\n ios,\n cordova,\n electron,\n chrome,\n edge,\n firefox,\n opera,\n win,\n mac,\n linux,\n touch: SUPPORTS_TOUCH,\n ssr: userAgent === 'ssr'\n };\n}\nexport function createDisplay(options, ssr) {\n const {\n thresholds,\n mobileBreakpoint\n } = parseDisplayOptions(options);\n const height = shallowRef(getClientHeight(ssr));\n const platform = shallowRef(getPlatform(ssr));\n const state = reactive({});\n const width = shallowRef(getClientWidth(ssr));\n function updateSize() {\n height.value = getClientHeight();\n width.value = getClientWidth();\n }\n function update() {\n updateSize();\n platform.value = getPlatform();\n }\n\n // eslint-disable-next-line max-statements\n watchEffect(() => {\n const xs = width.value < thresholds.sm;\n const sm = width.value < thresholds.md && !xs;\n const md = width.value < thresholds.lg && !(sm || xs);\n const lg = width.value < thresholds.xl && !(md || sm || xs);\n const xl = width.value < thresholds.xxl && !(lg || md || sm || xs);\n const xxl = width.value >= thresholds.xxl;\n const name = xs ? 'xs' : sm ? 'sm' : md ? 'md' : lg ? 'lg' : xl ? 'xl' : 'xxl';\n const breakpointValue = typeof mobileBreakpoint === 'number' ? mobileBreakpoint : thresholds[mobileBreakpoint];\n const mobile = width.value < breakpointValue;\n state.xs = xs;\n state.sm = sm;\n state.md = md;\n state.lg = lg;\n state.xl = xl;\n state.xxl = xxl;\n state.smAndUp = !xs;\n state.mdAndUp = !(xs || sm);\n state.lgAndUp = !(xs || sm || md);\n state.xlAndUp = !(xs || sm || md || lg);\n state.smAndDown = !(md || lg || xl || xxl);\n state.mdAndDown = !(lg || xl || xxl);\n state.lgAndDown = !(xl || xxl);\n state.xlAndDown = !xxl;\n state.name = name;\n state.height = height.value;\n state.width = width.value;\n state.mobile = mobile;\n state.mobileBreakpoint = mobileBreakpoint;\n state.platform = platform.value;\n state.thresholds = thresholds;\n });\n if (IN_BROWSER) {\n window.addEventListener('resize', updateSize, {\n passive: true\n });\n }\n return {\n ...toRefs(state),\n update,\n ssr: !!ssr\n };\n}\nexport function useDisplay() {\n const display = inject(DisplaySymbol);\n if (!display) throw new Error('Could not find Vuetify display injection');\n return display;\n}\n//# sourceMappingURL=display.mjs.map","// Composables\nimport { useDisplay } from \"./display.mjs\"; // Utilities\nimport { onMounted, shallowRef } from 'vue';\nimport { IN_BROWSER } from \"../util/index.mjs\";\nexport function useHydration() {\n if (!IN_BROWSER) return shallowRef(false);\n const {\n ssr\n } = useDisplay();\n if (ssr) {\n const isMounted = shallowRef(false);\n onMounted(() => {\n isMounted.value = true;\n });\n return isMounted;\n } else {\n return shallowRef(true);\n }\n}\n//# sourceMappingURL=hydration.mjs.map","// Utilities\nimport { computed, shallowRef, watch } from 'vue';\nimport { propsFactory } from \"../util/index.mjs\"; // Types\nexport const makeLazyProps = propsFactory({\n eager: Boolean\n}, 'lazy');\nexport function useLazy(props, active) {\n const isBooted = shallowRef(false);\n const hasContent = computed(() => isBooted.value || props.eager || active.value);\n watch(active, () => isBooted.value = true);\n function onAfterLeave() {\n if (!props.eager) isBooted.value = false;\n }\n return {\n isBooted,\n hasContent,\n onAfterLeave\n };\n}\n//# sourceMappingURL=lazy.mjs.map","export default {\n badge: 'Badge',\n close: 'Close',\n dataIterator: {\n noResultsText: 'No matching records found',\n loadingText: 'Loading items...'\n },\n dataTable: {\n itemsPerPageText: 'Rows per page:',\n ariaLabel: {\n sortDescending: 'Sorted descending.',\n sortAscending: 'Sorted ascending.',\n sortNone: 'Not sorted.',\n activateNone: 'Activate to remove sorting.',\n activateDescending: 'Activate to sort descending.',\n activateAscending: 'Activate to sort ascending.'\n },\n sortBy: 'Sort by'\n },\n dataFooter: {\n itemsPerPageText: 'Items per page:',\n itemsPerPageAll: 'All',\n nextPage: 'Next page',\n prevPage: 'Previous page',\n firstPage: 'First page',\n lastPage: 'Last page',\n pageText: '{0}-{1} of {2}'\n },\n dateRangeInput: {\n divider: 'to'\n },\n datePicker: {\n ok: 'OK',\n cancel: 'Cancel',\n range: {\n title: 'Select dates',\n header: 'Enter dates'\n },\n title: 'Select date',\n header: 'Enter date',\n input: {\n placeholder: 'Enter date'\n }\n },\n noDataText: 'No data available',\n carousel: {\n prev: 'Previous visual',\n next: 'Next visual',\n ariaLabel: {\n delimiter: 'Carousel slide {0} of {1}'\n }\n },\n calendar: {\n moreEvents: '{0} more'\n },\n input: {\n clear: 'Clear {0}',\n prependAction: '{0} prepended action',\n appendAction: '{0} appended action'\n },\n fileInput: {\n counter: '{0} files',\n counterSize: '{0} files ({1} in total)'\n },\n timePicker: {\n am: 'AM',\n pm: 'PM'\n },\n pagination: {\n ariaLabel: {\n root: 'Pagination Navigation',\n next: 'Next page',\n previous: 'Previous page',\n page: 'Go to page {0}',\n currentPage: 'Page {0}, Current page',\n first: 'First page',\n last: 'Last page'\n }\n },\n rating: {\n ariaLabel: {\n item: 'Rating {0} of {1}'\n }\n },\n loading: 'Loading...',\n infiniteScroll: {\n loadMore: 'Load more',\n empty: 'No more'\n }\n};\n//# sourceMappingURL=en.mjs.map","export { default as af } from \"./af.mjs\";\nexport { default as ar } from \"./ar.mjs\";\nexport { default as bg } from \"./bg.mjs\";\nexport { default as ca } from \"./ca.mjs\";\nexport { default as ckb } from \"./ckb.mjs\";\nexport { default as cs } from \"./cs.mjs\";\nexport { default as da } from \"./da.mjs\";\nexport { default as de } from \"./de.mjs\";\nexport { default as el } from \"./el.mjs\";\nexport { default as en } from \"./en.mjs\";\nexport { default as es } from \"./es.mjs\";\nexport { default as et } from \"./et.mjs\";\nexport { default as fa } from \"./fa.mjs\";\nexport { default as fi } from \"./fi.mjs\";\nexport { default as fr } from \"./fr.mjs\";\nexport { default as hr } from \"./hr.mjs\";\nexport { default as hu } from \"./hu.mjs\";\nexport { default as he } from \"./he.mjs\";\nexport { default as id } from \"./id.mjs\";\nexport { default as it } from \"./it.mjs\";\nexport { default as ja } from \"./ja.mjs\";\nexport { default as ko } from \"./ko.mjs\";\nexport { default as lv } from \"./lv.mjs\";\nexport { default as lt } from \"./lt.mjs\";\nexport { default as nl } from \"./nl.mjs\";\nexport { default as no } from \"./no.mjs\";\nexport { default as pl } from \"./pl.mjs\";\nexport { default as pt } from \"./pt.mjs\";\nexport { default as ro } from \"./ro.mjs\";\nexport { default as ru } from \"./ru.mjs\";\nexport { default as sk } from \"./sk.mjs\";\nexport { default as sl } from \"./sl.mjs\";\nexport { default as srCyrl } from \"./sr-Cyrl.mjs\";\nexport { default as srLatn } from \"./sr-Latn.mjs\";\nexport { default as sv } from \"./sv.mjs\";\nexport { default as th } from \"./th.mjs\";\nexport { default as tr } from \"./tr.mjs\";\nexport { default as az } from \"./az.mjs\";\nexport { default as uk } from \"./uk.mjs\";\nexport { default as vi } from \"./vi.mjs\";\nexport { default as zhHans } from \"./zh-Hans.mjs\";\nexport { default as zhHant } from \"./zh-Hant.mjs\";\nexport const defaultRtl = {\n af: false,\n ar: true,\n bg: false,\n ca: false,\n ckb: false,\n cs: false,\n de: false,\n el: false,\n en: false,\n es: false,\n et: false,\n fa: true,\n fi: false,\n fr: false,\n hr: false,\n hu: false,\n he: true,\n id: false,\n it: false,\n ja: false,\n ko: false,\n lv: false,\n lt: false,\n nl: false,\n no: false,\n pl: false,\n pt: false,\n ro: false,\n ru: false,\n sk: false,\n sl: false,\n srCyrl: false,\n srLatn: false,\n sv: false,\n th: false,\n tr: false,\n az: false,\n uk: false,\n vi: false,\n zhHans: false,\n zhHant: false\n};\n//# sourceMappingURL=index.mjs.map","// Composables\nimport { useToggleScope } from \"./toggleScope.mjs\"; // Utilities\nimport { computed, ref, toRaw, watch } from 'vue';\nimport { getCurrentInstance, toKebabCase } from \"../util/index.mjs\"; // Types\n// Composables\nexport function useProxiedModel(props, prop, defaultValue) {\n let transformIn = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : v => v;\n let transformOut = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : v => v;\n const vm = getCurrentInstance('useProxiedModel');\n const internal = ref(props[prop] !== undefined ? props[prop] : defaultValue);\n const kebabProp = toKebabCase(prop);\n const checkKebab = kebabProp !== prop;\n const isControlled = checkKebab ? computed(() => {\n void props[prop];\n return !!((vm.vnode.props?.hasOwnProperty(prop) || vm.vnode.props?.hasOwnProperty(kebabProp)) && (vm.vnode.props?.hasOwnProperty(`onUpdate:${prop}`) || vm.vnode.props?.hasOwnProperty(`onUpdate:${kebabProp}`)));\n }) : computed(() => {\n void props[prop];\n return !!(vm.vnode.props?.hasOwnProperty(prop) && vm.vnode.props?.hasOwnProperty(`onUpdate:${prop}`));\n });\n useToggleScope(() => !isControlled.value, () => {\n watch(() => props[prop], val => {\n internal.value = val;\n });\n });\n const model = computed({\n get() {\n const externalValue = props[prop];\n return transformIn(isControlled.value ? externalValue : internal.value);\n },\n set(internalValue) {\n const newValue = transformOut(internalValue);\n const value = toRaw(isControlled.value ? props[prop] : internal.value);\n if (value === newValue || transformIn(value) === internalValue) {\n return;\n }\n internal.value = newValue;\n vm?.emit(`update:${prop}`, newValue);\n }\n });\n Object.defineProperty(model, 'externalValue', {\n get: () => isControlled.value ? props[prop] : internal.value\n });\n return model;\n}\n//# sourceMappingURL=proxiedModel.mjs.map","// Composables\nimport { useProxiedModel } from \"../../composables/proxiedModel.mjs\"; // Utilities\nimport { ref, shallowRef, watch } from 'vue';\nimport { consoleError, consoleWarn, getObjectValueByPath } from \"../../util/index.mjs\"; // Locales\nimport en from \"../en.mjs\"; // Types\nconst LANG_PREFIX = '$vuetify.';\nconst replace = (str, params) => {\n return str.replace(/\\{(\\d+)\\}/g, (match, index) => {\n return String(params[+index]);\n });\n};\nconst createTranslateFunction = (current, fallback, messages) => {\n return function (key) {\n for (var _len = arguments.length, params = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n params[_key - 1] = arguments[_key];\n }\n if (!key.startsWith(LANG_PREFIX)) {\n return replace(key, params);\n }\n const shortKey = key.replace(LANG_PREFIX, '');\n const currentLocale = current.value && messages.value[current.value];\n const fallbackLocale = fallback.value && messages.value[fallback.value];\n let str = getObjectValueByPath(currentLocale, shortKey, null);\n if (!str) {\n consoleWarn(`Translation key \"${key}\" not found in \"${current.value}\", trying fallback locale`);\n str = getObjectValueByPath(fallbackLocale, shortKey, null);\n }\n if (!str) {\n consoleError(`Translation key \"${key}\" not found in fallback`);\n str = key;\n }\n if (typeof str !== 'string') {\n consoleError(`Translation key \"${key}\" has a non-string value`);\n str = key;\n }\n return replace(str, params);\n };\n};\nfunction createNumberFunction(current, fallback) {\n return (value, options) => {\n const numberFormat = new Intl.NumberFormat([current.value, fallback.value], options);\n return numberFormat.format(value);\n };\n}\nfunction useProvided(props, prop, provided) {\n const internal = useProxiedModel(props, prop, props[prop] ?? provided.value);\n\n // TODO: Remove when defaultValue works\n internal.value = props[prop] ?? provided.value;\n watch(provided, v => {\n if (props[prop] == null) {\n internal.value = provided.value;\n }\n });\n return internal;\n}\nfunction createProvideFunction(state) {\n return props => {\n const current = useProvided(props, 'locale', state.current);\n const fallback = useProvided(props, 'fallback', state.fallback);\n const messages = useProvided(props, 'messages', state.messages);\n return {\n name: 'vuetify',\n current,\n fallback,\n messages,\n t: createTranslateFunction(current, fallback, messages),\n n: createNumberFunction(current, fallback),\n provide: createProvideFunction({\n current,\n fallback,\n messages\n })\n };\n };\n}\nexport function createVuetifyAdapter(options) {\n const current = shallowRef(options?.locale ?? 'en');\n const fallback = shallowRef(options?.fallback ?? 'en');\n const messages = ref({\n en,\n ...options?.messages\n });\n return {\n name: 'vuetify',\n current,\n fallback,\n messages,\n t: createTranslateFunction(current, fallback, messages),\n n: createNumberFunction(current, fallback),\n provide: createProvideFunction({\n current,\n fallback,\n messages\n })\n };\n}\n//# sourceMappingURL=vuetify.mjs.map","// Utilities\nimport { computed, inject, provide, ref } from 'vue';\nimport { defaultRtl } from \"../locale/index.mjs\";\nimport { createVuetifyAdapter } from \"../locale/adapters/vuetify.mjs\"; // Types\nexport const LocaleSymbol = Symbol.for('vuetify:locale');\nfunction isLocaleInstance(obj) {\n return obj.name != null;\n}\nexport function createLocale(options) {\n const i18n = options?.adapter && isLocaleInstance(options?.adapter) ? options?.adapter : createVuetifyAdapter(options);\n const rtl = createRtl(i18n, options);\n return {\n ...i18n,\n ...rtl\n };\n}\nexport function useLocale() {\n const locale = inject(LocaleSymbol);\n if (!locale) throw new Error('[Vuetify] Could not find injected locale instance');\n return locale;\n}\nexport function provideLocale(props) {\n const locale = inject(LocaleSymbol);\n if (!locale) throw new Error('[Vuetify] Could not find injected locale instance');\n const i18n = locale.provide(props);\n const rtl = provideRtl(i18n, locale.rtl, props);\n const data = {\n ...i18n,\n ...rtl\n };\n provide(LocaleSymbol, data);\n return data;\n}\n\n// RTL\n\nexport const RtlSymbol = Symbol.for('vuetify:rtl');\nexport function createRtl(i18n, options) {\n const rtl = ref(options?.rtl ?? defaultRtl);\n const isRtl = computed(() => rtl.value[i18n.current.value] ?? false);\n return {\n isRtl,\n rtl,\n rtlClasses: computed(() => `v-locale--is-${isRtl.value ? 'rtl' : 'ltr'}`)\n };\n}\nexport function provideRtl(locale, rtl, props) {\n const isRtl = computed(() => props.rtl ?? rtl.value[locale.current.value] ?? false);\n return {\n isRtl,\n rtl,\n rtlClasses: computed(() => `v-locale--is-${isRtl.value ? 'rtl' : 'ltr'}`)\n };\n}\nexport function useRtl() {\n const locale = inject(LocaleSymbol);\n if (!locale) throw new Error('[Vuetify] Could not find injected rtl instance');\n return {\n isRtl: locale.isRtl,\n rtlClasses: locale.rtlClasses\n };\n}\n//# sourceMappingURL=locale.mjs.map","// Utilities\nimport { computed, nextTick, onScopeDispose, resolveDynamicComponent, toRef } from 'vue';\nimport { getCurrentInstance, hasEvent, IN_BROWSER, propsFactory } from \"../util/index.mjs\"; // Types\nexport function useRoute() {\n const vm = getCurrentInstance('useRoute');\n return computed(() => vm?.proxy?.$route);\n}\nexport function useRouter() {\n return getCurrentInstance('useRouter')?.proxy?.$router;\n}\nexport function useLink(props, attrs) {\n const RouterLink = resolveDynamicComponent('RouterLink');\n const isLink = computed(() => !!(props.href || props.to));\n const isClickable = computed(() => {\n return isLink?.value || hasEvent(attrs, 'click') || hasEvent(props, 'click');\n });\n if (typeof RouterLink === 'string') {\n return {\n isLink,\n isClickable,\n href: toRef(props, 'href')\n };\n }\n const link = props.to ? RouterLink.useLink(props) : undefined;\n return {\n isLink,\n isClickable,\n route: link?.route,\n navigate: link?.navigate,\n isActive: link && computed(() => props.exact ? link.isExactActive?.value : link.isActive?.value),\n href: computed(() => props.to ? link?.route.value.href : props.href)\n };\n}\nexport const makeRouterProps = propsFactory({\n href: String,\n replace: Boolean,\n to: [String, Object],\n exact: Boolean\n}, 'router');\nlet inTransition = false;\nexport function useBackButton(router, cb) {\n let popped = false;\n let removeBefore;\n let removeAfter;\n if (IN_BROWSER) {\n nextTick(() => {\n window.addEventListener('popstate', onPopstate);\n removeBefore = router?.beforeEach((to, from, next) => {\n if (!inTransition) {\n setTimeout(() => popped ? cb(next) : next());\n } else {\n popped ? cb(next) : next();\n }\n inTransition = true;\n });\n removeAfter = router?.afterEach(() => {\n inTransition = false;\n });\n });\n onScopeDispose(() => {\n window.removeEventListener('popstate', onPopstate);\n removeBefore?.();\n removeAfter?.();\n });\n }\n function onPopstate(e) {\n if (e.state?.replaced) return;\n popped = true;\n setTimeout(() => popped = false);\n }\n}\n//# sourceMappingURL=router.mjs.map","// Utilities\nimport { getCurrentInstance } from \"../util/index.mjs\";\nexport function useScopeId() {\n const vm = getCurrentInstance('useScopeId');\n const scopeId = vm.vnode.scopeId;\n return {\n scopeId: scopeId ? {\n [scopeId]: ''\n } : undefined\n };\n}\n//# sourceMappingURL=scopeId.mjs.map","// Composables\nimport { useToggleScope } from \"./toggleScope.mjs\"; // Utilities\nimport { computed, inject, onScopeDispose, provide, reactive, readonly, shallowRef, toRaw, watchEffect } from 'vue';\nimport { getCurrentInstance } from \"../util/index.mjs\"; // Types\nconst StackSymbol = Symbol.for('vuetify:stack');\nconst globalStack = reactive([]);\nexport function useStack(isActive, zIndex, disableGlobalStack) {\n const vm = getCurrentInstance('useStack');\n const createStackEntry = !disableGlobalStack;\n const parent = inject(StackSymbol, undefined);\n const stack = reactive({\n activeChildren: new Set()\n });\n provide(StackSymbol, stack);\n const _zIndex = shallowRef(+zIndex.value);\n useToggleScope(isActive, () => {\n const lastZIndex = globalStack.at(-1)?.[1];\n _zIndex.value = lastZIndex ? lastZIndex + 10 : +zIndex.value;\n if (createStackEntry) {\n globalStack.push([vm.uid, _zIndex.value]);\n }\n parent?.activeChildren.add(vm.uid);\n onScopeDispose(() => {\n if (createStackEntry) {\n const idx = toRaw(globalStack).findIndex(v => v[0] === vm.uid);\n globalStack.splice(idx, 1);\n }\n parent?.activeChildren.delete(vm.uid);\n });\n });\n const globalTop = shallowRef(true);\n if (createStackEntry) {\n watchEffect(() => {\n const _isTop = globalStack.at(-1)?.[0] === vm.uid;\n setTimeout(() => globalTop.value = _isTop);\n });\n }\n const localTop = computed(() => !stack.activeChildren.size);\n return {\n globalTop: readonly(globalTop),\n localTop,\n stackStyles: computed(() => ({\n zIndex: _zIndex.value\n }))\n };\n}\n//# sourceMappingURL=stack.mjs.map","// Utilities\nimport { computed, warn } from 'vue';\nimport { IN_BROWSER } from \"../util/index.mjs\"; // Types\nexport function useTeleport(target) {\n const teleportTarget = computed(() => {\n const _target = target.value;\n if (_target === true || !IN_BROWSER) return undefined;\n const targetElement = _target === false ? document.body : typeof _target === 'string' ? document.querySelector(_target) : _target;\n if (targetElement == null) {\n warn(`Unable to locate target ${_target}`);\n return undefined;\n }\n let container = targetElement.querySelector(':scope > .v-overlay-container');\n if (!container) {\n container = document.createElement('div');\n container.className = 'v-overlay-container';\n targetElement.appendChild(container);\n }\n return container;\n });\n return {\n teleportTarget\n };\n}\n//# sourceMappingURL=teleport.mjs.map","/**\n * WCAG 3.0 APCA perceptual contrast algorithm from https://github.com/Myndex/SAPC-APCA\n * @licence https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document\n * @see https://www.w3.org/WAI/GL/task-forces/silver/wiki/Visual_Contrast_of_Text_Subgroup\n */\n// Types\n\n// MAGICAL NUMBERS\n\n// sRGB Conversion to Relative Luminance (Y)\n\n// Transfer Curve (aka \"Gamma\") for sRGB linearization\n// Simple power curve vs piecewise described in docs\n// Essentially, 2.4 best models actual display\n// characteristics in combination with the total method\nconst mainTRC = 2.4;\nconst Rco = 0.2126729; // sRGB Red Coefficient (from matrix)\nconst Gco = 0.7151522; // sRGB Green Coefficient (from matrix)\nconst Bco = 0.0721750; // sRGB Blue Coefficient (from matrix)\n\n// For Finding Raw SAPC Contrast from Relative Luminance (Y)\n\n// Constants for SAPC Power Curve Exponents\n// One pair for normal text, and one for reverse\n// These are the \"beating heart\" of SAPC\nconst normBG = 0.55;\nconst normTXT = 0.58;\nconst revTXT = 0.57;\nconst revBG = 0.62;\n\n// For Clamping and Scaling Values\n\nconst blkThrs = 0.03; // Level that triggers the soft black clamp\nconst blkClmp = 1.45; // Exponent for the soft black clamp curve\nconst deltaYmin = 0.0005; // Lint trap\nconst scaleBoW = 1.25; // Scaling for dark text on light\nconst scaleWoB = 1.25; // Scaling for light text on dark\nconst loConThresh = 0.078; // Threshold for new simple offset scale\nconst loConFactor = 12.82051282051282; // = 1/0.078,\nconst loConOffset = 0.06; // The simple offset\nconst loClip = 0.001; // Output clip (lint trap #2)\n\nexport function APCAcontrast(text, background) {\n // Linearize sRGB\n const Rtxt = (text.r / 255) ** mainTRC;\n const Gtxt = (text.g / 255) ** mainTRC;\n const Btxt = (text.b / 255) ** mainTRC;\n const Rbg = (background.r / 255) ** mainTRC;\n const Gbg = (background.g / 255) ** mainTRC;\n const Bbg = (background.b / 255) ** mainTRC;\n\n // Apply the standard coefficients and sum to Y\n let Ytxt = Rtxt * Rco + Gtxt * Gco + Btxt * Bco;\n let Ybg = Rbg * Rco + Gbg * Gco + Bbg * Bco;\n\n // Soft clamp Y when near black.\n // Now clamping all colors to prevent crossover errors\n if (Ytxt <= blkThrs) Ytxt += (blkThrs - Ytxt) ** blkClmp;\n if (Ybg <= blkThrs) Ybg += (blkThrs - Ybg) ** blkClmp;\n\n // Return 0 Early for extremely low ∆Y (lint trap #1)\n if (Math.abs(Ybg - Ytxt) < deltaYmin) return 0.0;\n\n // SAPC CONTRAST\n\n let outputContrast; // For weighted final values\n if (Ybg > Ytxt) {\n // For normal polarity, black text on white\n // Calculate the SAPC contrast value and scale\n\n const SAPC = (Ybg ** normBG - Ytxt ** normTXT) * scaleBoW;\n\n // NEW! SAPC SmoothScale™\n // Low Contrast Smooth Scale Rollout to prevent polarity reversal\n // and also a low clip for very low contrasts (lint trap #2)\n // much of this is for very low contrasts, less than 10\n // therefore for most reversing needs, only loConOffset is important\n outputContrast = SAPC < loClip ? 0.0 : SAPC < loConThresh ? SAPC - SAPC * loConFactor * loConOffset : SAPC - loConOffset;\n } else {\n // For reverse polarity, light text on dark\n // WoB should always return negative value.\n\n const SAPC = (Ybg ** revBG - Ytxt ** revTXT) * scaleWoB;\n outputContrast = SAPC > -loClip ? 0.0 : SAPC > -loConThresh ? SAPC - SAPC * loConFactor * loConOffset : SAPC + loConOffset;\n }\n return outputContrast * 100;\n}\n//# sourceMappingURL=APCA.mjs.map","// Utilities\nimport { computed, inject, provide, reactive, ref, watch, watchEffect } from 'vue';\nimport { createRange, darken, getCurrentInstance, getLuma, IN_BROWSER, lighten, mergeDeep, parseColor, propsFactory, RGBtoHex } from \"../util/index.mjs\";\nimport { APCAcontrast } from \"../util/color/APCA.mjs\"; // Types\nexport const ThemeSymbol = Symbol.for('vuetify:theme');\nexport const makeThemeProps = propsFactory({\n theme: String\n}, 'theme');\nconst defaultThemeOptions = {\n defaultTheme: 'light',\n variations: {\n colors: [],\n lighten: 0,\n darken: 0\n },\n themes: {\n light: {\n dark: false,\n colors: {\n background: '#FFFFFF',\n surface: '#FFFFFF',\n 'surface-variant': '#424242',\n 'on-surface-variant': '#EEEEEE',\n primary: '#6200EE',\n 'primary-darken-1': '#3700B3',\n secondary: '#03DAC6',\n 'secondary-darken-1': '#018786',\n error: '#B00020',\n info: '#2196F3',\n success: '#4CAF50',\n warning: '#FB8C00'\n },\n variables: {\n 'border-color': '#000000',\n 'border-opacity': 0.12,\n 'high-emphasis-opacity': 0.87,\n 'medium-emphasis-opacity': 0.60,\n 'disabled-opacity': 0.38,\n 'idle-opacity': 0.04,\n 'hover-opacity': 0.04,\n 'focus-opacity': 0.12,\n 'selected-opacity': 0.08,\n 'activated-opacity': 0.12,\n 'pressed-opacity': 0.12,\n 'dragged-opacity': 0.08,\n 'theme-kbd': '#212529',\n 'theme-on-kbd': '#FFFFFF',\n 'theme-code': '#F5F5F5',\n 'theme-on-code': '#000000'\n }\n },\n dark: {\n dark: true,\n colors: {\n background: '#121212',\n surface: '#212121',\n 'surface-variant': '#BDBDBD',\n 'on-surface-variant': '#424242',\n primary: '#BB86FC',\n 'primary-darken-1': '#3700B3',\n secondary: '#03DAC5',\n 'secondary-darken-1': '#03DAC5',\n error: '#CF6679',\n info: '#2196F3',\n success: '#4CAF50',\n warning: '#FB8C00'\n },\n variables: {\n 'border-color': '#FFFFFF',\n 'border-opacity': 0.12,\n 'high-emphasis-opacity': 1,\n 'medium-emphasis-opacity': 0.70,\n 'disabled-opacity': 0.50,\n 'idle-opacity': 0.10,\n 'hover-opacity': 0.04,\n 'focus-opacity': 0.12,\n 'selected-opacity': 0.08,\n 'activated-opacity': 0.12,\n 'pressed-opacity': 0.16,\n 'dragged-opacity': 0.08,\n 'theme-kbd': '#212529',\n 'theme-on-kbd': '#FFFFFF',\n 'theme-code': '#343434',\n 'theme-on-code': '#CCCCCC'\n }\n }\n }\n};\nfunction parseThemeOptions() {\n let options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : defaultThemeOptions;\n if (!options) return {\n ...defaultThemeOptions,\n isDisabled: true\n };\n const themes = {};\n for (const [key, theme] of Object.entries(options.themes ?? {})) {\n const defaultTheme = theme.dark || key === 'dark' ? defaultThemeOptions.themes?.dark : defaultThemeOptions.themes?.light;\n themes[key] = mergeDeep(defaultTheme, theme);\n }\n return mergeDeep(defaultThemeOptions, {\n ...options,\n themes\n });\n}\n\n// Composables\nexport function createTheme(options) {\n const parsedOptions = reactive(parseThemeOptions(options));\n const name = ref(parsedOptions.defaultTheme);\n const themes = ref(parsedOptions.themes);\n const computedThemes = computed(() => {\n const acc = {};\n for (const [name, original] of Object.entries(themes.value)) {\n const theme = acc[name] = {\n ...original,\n colors: {\n ...original.colors\n }\n };\n if (parsedOptions.variations) {\n for (const name of parsedOptions.variations.colors) {\n const color = theme.colors[name];\n if (!color) continue;\n for (const variation of ['lighten', 'darken']) {\n const fn = variation === 'lighten' ? lighten : darken;\n for (const amount of createRange(parsedOptions.variations[variation], 1)) {\n theme.colors[`${name}-${variation}-${amount}`] = RGBtoHex(fn(parseColor(color), amount));\n }\n }\n }\n }\n for (const color of Object.keys(theme.colors)) {\n if (/^on-[a-z]/.test(color) || theme.colors[`on-${color}`]) continue;\n const onColor = `on-${color}`;\n const colorVal = parseColor(theme.colors[color]);\n const blackContrast = Math.abs(APCAcontrast(parseColor(0), colorVal));\n const whiteContrast = Math.abs(APCAcontrast(parseColor(0xffffff), colorVal));\n\n // TODO: warn about poor color selections\n // const contrastAsText = Math.abs(APCAcontrast(colorVal, colorToInt(theme.colors.background)))\n // const minContrast = Math.max(blackContrast, whiteContrast)\n // if (minContrast < 60) {\n // consoleInfo(`${key} theme color ${color} has poor contrast (${minContrast.toFixed()}%)`)\n // } else if (contrastAsText < 60 && !['background', 'surface'].includes(color)) {\n // consoleInfo(`${key} theme color ${color} has poor contrast as text (${contrastAsText.toFixed()}%)`)\n // }\n\n // Prefer white text if both have an acceptable contrast ratio\n theme.colors[onColor] = whiteContrast > Math.min(blackContrast, 50) ? '#fff' : '#000';\n }\n }\n return acc;\n });\n const current = computed(() => computedThemes.value[name.value]);\n const styles = computed(() => {\n const lines = [];\n if (current.value.dark) {\n createCssClass(lines, ':root', ['color-scheme: dark']);\n }\n createCssClass(lines, ':root', genCssVariables(current.value));\n for (const [themeName, theme] of Object.entries(computedThemes.value)) {\n createCssClass(lines, `.v-theme--${themeName}`, [`color-scheme: ${theme.dark ? 'dark' : 'normal'}`, ...genCssVariables(theme)]);\n }\n const bgLines = [];\n const fgLines = [];\n const colors = new Set(Object.values(computedThemes.value).flatMap(theme => Object.keys(theme.colors)));\n for (const key of colors) {\n if (/^on-[a-z]/.test(key)) {\n createCssClass(fgLines, `.${key}`, [`color: rgb(var(--v-theme-${key})) !important`]);\n } else {\n createCssClass(bgLines, `.bg-${key}`, [`--v-theme-overlay-multiplier: var(--v-theme-${key}-overlay-multiplier)`, `background-color: rgb(var(--v-theme-${key})) !important`, `color: rgb(var(--v-theme-on-${key})) !important`]);\n createCssClass(fgLines, `.text-${key}`, [`color: rgb(var(--v-theme-${key})) !important`]);\n createCssClass(fgLines, `.border-${key}`, [`--v-border-color: var(--v-theme-${key})`]);\n }\n }\n lines.push(...bgLines, ...fgLines);\n return lines.map((str, i) => i === 0 ? str : ` ${str}`).join('');\n });\n function getHead() {\n return {\n style: [{\n children: styles.value,\n id: 'vuetify-theme-stylesheet',\n nonce: parsedOptions.cspNonce || false\n }]\n };\n }\n function install(app) {\n if (parsedOptions.isDisabled) return;\n const head = app._context.provides.usehead;\n if (head) {\n if (head.push) {\n const entry = head.push(getHead);\n watch(styles, () => {\n entry.patch(getHead);\n });\n } else {\n if (IN_BROWSER) {\n head.addHeadObjs(computed(getHead));\n watchEffect(() => head.updateDOM());\n } else {\n head.addHeadObjs(getHead());\n }\n }\n } else {\n let styleEl = IN_BROWSER ? document.getElementById('vuetify-theme-stylesheet') : null;\n watch(styles, updateStyles, {\n immediate: true\n });\n function updateStyles() {\n if (typeof document !== 'undefined' && !styleEl) {\n const el = document.createElement('style');\n el.type = 'text/css';\n el.id = 'vuetify-theme-stylesheet';\n if (parsedOptions.cspNonce) el.setAttribute('nonce', parsedOptions.cspNonce);\n styleEl = el;\n document.head.appendChild(styleEl);\n }\n if (styleEl) styleEl.innerHTML = styles.value;\n }\n }\n }\n const themeClasses = computed(() => parsedOptions.isDisabled ? undefined : `v-theme--${name.value}`);\n return {\n install,\n isDisabled: parsedOptions.isDisabled,\n name,\n themes,\n current,\n computedThemes,\n themeClasses,\n styles,\n global: {\n name,\n current\n }\n };\n}\nexport function provideTheme(props) {\n getCurrentInstance('provideTheme');\n const theme = inject(ThemeSymbol, null);\n if (!theme) throw new Error('Could not find Vuetify theme injection');\n const name = computed(() => {\n return props.theme ?? theme?.name.value;\n });\n const themeClasses = computed(() => theme.isDisabled ? undefined : `v-theme--${name.value}`);\n const newTheme = {\n ...theme,\n name,\n themeClasses\n };\n provide(ThemeSymbol, newTheme);\n return newTheme;\n}\nexport function useTheme() {\n getCurrentInstance('useTheme');\n const theme = inject(ThemeSymbol, null);\n if (!theme) throw new Error('Could not find Vuetify theme injection');\n return theme;\n}\nfunction createCssClass(lines, selector, content) {\n lines.push(`${selector} {\\n`, ...content.map(line => ` ${line};\\n`), '}\\n');\n}\nfunction genCssVariables(theme) {\n const lightOverlay = theme.dark ? 2 : 1;\n const darkOverlay = theme.dark ? 1 : 2;\n const variables = [];\n for (const [key, value] of Object.entries(theme.colors)) {\n const rgb = parseColor(value);\n variables.push(`--v-theme-${key}: ${rgb.r},${rgb.g},${rgb.b}`);\n if (!key.startsWith('on-')) {\n variables.push(`--v-theme-${key}-overlay-multiplier: ${getLuma(value) > 0.18 ? lightOverlay : darkOverlay}`);\n }\n }\n for (const [key, value] of Object.entries(theme.variables)) {\n const color = typeof value === 'string' && value.startsWith('#') ? parseColor(value) : undefined;\n const rgb = color ? `${color.r}, ${color.g}, ${color.b}` : undefined;\n variables.push(`--v-${key}: ${rgb ?? value}`);\n }\n return variables;\n}\n//# sourceMappingURL=theme.mjs.map","// Utilities\nimport { h, mergeProps, Transition } from 'vue';\nimport { propsFactory } from \"../util/index.mjs\"; // Types\nexport const makeTransitionProps = propsFactory({\n transition: {\n type: [Boolean, String, Object],\n default: 'fade-transition',\n validator: val => val !== true\n }\n}, 'transition');\nexport const MaybeTransition = (props, _ref) => {\n let {\n slots\n } = _ref;\n const {\n transition,\n disabled,\n ...rest\n } = props;\n const {\n component = Transition,\n ...customProps\n } = typeof transition === 'object' ? transition : {};\n return h(component, mergeProps(typeof transition === 'string' ? {\n name: disabled ? '' : transition\n } : customProps, rest, {\n disabled\n }), slots);\n};\n//# sourceMappingURL=transition.mjs.map","// Utilities\nimport { attachedRoot } from \"../../util/index.mjs\"; // Types\nfunction defaultConditional() {\n return true;\n}\nfunction checkEvent(e, el, binding) {\n // The include element callbacks below can be expensive\n // so we should avoid calling them when we're not active.\n // Explicitly check for false to allow fallback compatibility\n // with non-toggleable components\n if (!e || checkIsActive(e, binding) === false) return false;\n\n // If we're clicking inside the shadowroot, then the app root doesn't get the same\n // level of introspection as to _what_ we're clicking. We want to check to see if\n // our target is the shadowroot parent container, and if it is, ignore.\n const root = attachedRoot(el);\n if (typeof ShadowRoot !== 'undefined' && root instanceof ShadowRoot && root.host === e.target) return false;\n\n // Check if additional elements were passed to be included in check\n // (click must be outside all included elements, if any)\n const elements = (typeof binding.value === 'object' && binding.value.include || (() => []))();\n // Add the root element for the component this directive was defined on\n elements.push(el);\n\n // Check if it's a click outside our elements, and then if our callback returns true.\n // Non-toggleable components should take action in their callback and return falsy.\n // Toggleable can return true if it wants to deactivate.\n // Note that, because we're in the capture phase, this callback will occur before\n // the bubbling click event on any outside elements.\n return !elements.some(el => el?.contains(e.target));\n}\nfunction checkIsActive(e, binding) {\n const isActive = typeof binding.value === 'object' && binding.value.closeConditional || defaultConditional;\n return isActive(e);\n}\nfunction directive(e, el, binding) {\n const handler = typeof binding.value === 'function' ? binding.value : binding.value.handler;\n el._clickOutside.lastMousedownWasOutside && checkEvent(e, el, binding) && setTimeout(() => {\n checkIsActive(e, binding) && handler && handler(e);\n }, 0);\n}\nfunction handleShadow(el, callback) {\n const root = attachedRoot(el);\n callback(document);\n if (typeof ShadowRoot !== 'undefined' && root instanceof ShadowRoot) {\n callback(root);\n }\n}\nexport const ClickOutside = {\n // [data-app] may not be found\n // if using bind, inserted makes\n // sure that the root element is\n // available, iOS does not support\n // clicks on body\n mounted(el, binding) {\n const onClick = e => directive(e, el, binding);\n const onMousedown = e => {\n el._clickOutside.lastMousedownWasOutside = checkEvent(e, el, binding);\n };\n handleShadow(el, app => {\n app.addEventListener('click', onClick, true);\n app.addEventListener('mousedown', onMousedown, true);\n });\n if (!el._clickOutside) {\n el._clickOutside = {\n lastMousedownWasOutside: false\n };\n }\n el._clickOutside[binding.instance.$.uid] = {\n onClick,\n onMousedown\n };\n },\n unmounted(el, binding) {\n if (!el._clickOutside) return;\n handleShadow(el, app => {\n if (!app || !el._clickOutside?.[binding.instance.$.uid]) return;\n const {\n onClick,\n onMousedown\n } = el._clickOutside[binding.instance.$.uid];\n app.removeEventListener('click', onClick, true);\n app.removeEventListener('mousedown', onMousedown, true);\n });\n delete el._clickOutside[binding.instance.$.uid];\n }\n};\nexport default ClickOutside;\n//# sourceMappingURL=index.mjs.map","import { withDirectives as _withDirectives, resolveDirective as _resolveDirective, vShow as _vShow, Fragment as _Fragment, createVNode as _createVNode, mergeProps as _mergeProps } from \"vue\";\n// Styles\nimport \"./VOverlay.css\";\n\n// Composables\nimport { makeLocationStrategyProps, useLocationStrategies } from \"./locationStrategies.mjs\";\nimport { makeScrollStrategyProps, useScrollStrategies } from \"./scrollStrategies.mjs\";\nimport { makeActivatorProps, useActivator } from \"./useActivator.mjs\";\nimport { useBackgroundColor } from \"../../composables/color.mjs\";\nimport { makeComponentProps } from \"../../composables/component.mjs\";\nimport { makeDimensionProps, useDimension } from \"../../composables/dimensions.mjs\";\nimport { useHydration } from \"../../composables/hydration.mjs\";\nimport { makeLazyProps, useLazy } from \"../../composables/lazy.mjs\";\nimport { useRtl } from \"../../composables/locale.mjs\";\nimport { useProxiedModel } from \"../../composables/proxiedModel.mjs\";\nimport { useBackButton, useRouter } from \"../../composables/router.mjs\";\nimport { useScopeId } from \"../../composables/scopeId.mjs\";\nimport { useStack } from \"../../composables/stack.mjs\";\nimport { useTeleport } from \"../../composables/teleport.mjs\";\nimport { makeThemeProps, provideTheme } from \"../../composables/theme.mjs\";\nimport { useToggleScope } from \"../../composables/toggleScope.mjs\";\nimport { makeTransitionProps, MaybeTransition } from \"../../composables/transition.mjs\"; // Directives\nimport { ClickOutside } from \"../../directives/click-outside/index.mjs\"; // Utilities\nimport { computed, mergeProps, ref, Teleport, toRef, Transition, watch } from 'vue';\nimport { animate, convertToUnit, genericComponent, getScrollParent, IN_BROWSER, propsFactory, standardEasing, useRender } from \"../../util/index.mjs\"; // Types\nfunction Scrim(props) {\n const {\n modelValue,\n color,\n ...rest\n } = props;\n return _createVNode(Transition, {\n \"name\": \"fade-transition\",\n \"appear\": true\n }, {\n default: () => [props.modelValue && _createVNode(\"div\", _mergeProps({\n \"class\": ['v-overlay__scrim', props.color.backgroundColorClasses.value],\n \"style\": props.color.backgroundColorStyles.value\n }, rest), null)]\n });\n}\nexport const makeVOverlayProps = propsFactory({\n absolute: Boolean,\n attach: [Boolean, String, Object],\n closeOnBack: {\n type: Boolean,\n default: true\n },\n contained: Boolean,\n contentClass: null,\n contentProps: null,\n disabled: Boolean,\n noClickAnimation: Boolean,\n modelValue: Boolean,\n persistent: Boolean,\n scrim: {\n type: [Boolean, String],\n default: true\n },\n zIndex: {\n type: [Number, String],\n default: 2000\n },\n ...makeActivatorProps(),\n ...makeComponentProps(),\n ...makeDimensionProps(),\n ...makeLazyProps(),\n ...makeLocationStrategyProps(),\n ...makeScrollStrategyProps(),\n ...makeThemeProps(),\n ...makeTransitionProps()\n}, 'VOverlay');\nexport const VOverlay = genericComponent()({\n name: 'VOverlay',\n directives: {\n ClickOutside\n },\n inheritAttrs: false,\n props: {\n _disableGlobalStack: Boolean,\n ...makeVOverlayProps()\n },\n emits: {\n 'click:outside': e => true,\n 'update:modelValue': value => true,\n afterLeave: () => true\n },\n setup(props, _ref) {\n let {\n slots,\n attrs,\n emit\n } = _ref;\n const model = useProxiedModel(props, 'modelValue');\n const isActive = computed({\n get: () => model.value,\n set: v => {\n if (!(v && props.disabled)) model.value = v;\n }\n });\n const {\n teleportTarget\n } = useTeleport(computed(() => props.attach || props.contained));\n const {\n themeClasses\n } = provideTheme(props);\n const {\n rtlClasses,\n isRtl\n } = useRtl();\n const {\n hasContent,\n onAfterLeave\n } = useLazy(props, isActive);\n const scrimColor = useBackgroundColor(computed(() => {\n return typeof props.scrim === 'string' ? props.scrim : null;\n }));\n const {\n globalTop,\n localTop,\n stackStyles\n } = useStack(isActive, toRef(props, 'zIndex'), props._disableGlobalStack);\n const {\n activatorEl,\n activatorRef,\n activatorEvents,\n contentEvents,\n scrimEvents\n } = useActivator(props, {\n isActive,\n isTop: localTop\n });\n const {\n dimensionStyles\n } = useDimension(props);\n const isMounted = useHydration();\n const {\n scopeId\n } = useScopeId();\n watch(() => props.disabled, v => {\n if (v) isActive.value = false;\n });\n const root = ref();\n const contentEl = ref();\n const {\n contentStyles,\n updateLocation\n } = useLocationStrategies(props, {\n isRtl,\n contentEl,\n activatorEl,\n isActive\n });\n useScrollStrategies(props, {\n root,\n contentEl,\n activatorEl,\n isActive,\n updateLocation\n });\n function onClickOutside(e) {\n emit('click:outside', e);\n if (!props.persistent) isActive.value = false;else animateClick();\n }\n function closeConditional() {\n return isActive.value && globalTop.value;\n }\n IN_BROWSER && watch(isActive, val => {\n if (val) {\n window.addEventListener('keydown', onKeydown);\n } else {\n window.removeEventListener('keydown', onKeydown);\n }\n }, {\n immediate: true\n });\n function onKeydown(e) {\n if (e.key === 'Escape' && globalTop.value) {\n if (!props.persistent) {\n isActive.value = false;\n if (contentEl.value?.contains(document.activeElement)) {\n activatorEl.value?.focus();\n }\n } else animateClick();\n }\n }\n const router = useRouter();\n useToggleScope(() => props.closeOnBack, () => {\n useBackButton(router, next => {\n if (globalTop.value && isActive.value) {\n next(false);\n if (!props.persistent) isActive.value = false;else animateClick();\n } else {\n next();\n }\n });\n });\n const top = ref();\n watch(() => isActive.value && (props.absolute || props.contained) && teleportTarget.value == null, val => {\n if (val) {\n const scrollParent = getScrollParent(root.value);\n if (scrollParent && scrollParent !== document.scrollingElement) {\n top.value = scrollParent.scrollTop;\n }\n }\n });\n\n // Add a quick \"bounce\" animation to the content\n function animateClick() {\n if (props.noClickAnimation) return;\n contentEl.value && animate(contentEl.value, [{\n transformOrigin: 'center'\n }, {\n transform: 'scale(1.03)'\n }, {\n transformOrigin: 'center'\n }], {\n duration: 150,\n easing: standardEasing\n });\n }\n useRender(() => _createVNode(_Fragment, null, [slots.activator?.({\n isActive: isActive.value,\n props: mergeProps({\n ref: activatorRef\n }, activatorEvents.value, props.activatorProps)\n }), isMounted.value && _createVNode(Teleport, {\n \"disabled\": !teleportTarget.value,\n \"to\": teleportTarget.value\n }, {\n default: () => [hasContent.value && _createVNode(\"div\", _mergeProps({\n \"class\": ['v-overlay', {\n 'v-overlay--absolute': props.absolute || props.contained,\n 'v-overlay--active': isActive.value,\n 'v-overlay--contained': props.contained\n }, themeClasses.value, rtlClasses.value, props.class],\n \"style\": [stackStyles.value, {\n top: convertToUnit(top.value)\n }, props.style],\n \"ref\": root\n }, scopeId, attrs), [_createVNode(Scrim, _mergeProps({\n \"color\": scrimColor,\n \"modelValue\": isActive.value && !!props.scrim\n }, scrimEvents.value), null), _createVNode(MaybeTransition, {\n \"appear\": true,\n \"persisted\": true,\n \"transition\": props.transition,\n \"target\": activatorEl.value,\n \"onAfterLeave\": () => {\n onAfterLeave();\n emit('afterLeave');\n }\n }, {\n default: () => [_withDirectives(_createVNode(\"div\", _mergeProps({\n \"ref\": contentEl,\n \"class\": ['v-overlay__content', props.contentClass],\n \"style\": [dimensionStyles.value, contentStyles.value]\n }, contentEvents.value, props.contentProps), [slots.default?.({\n isActive\n })]), [[_vShow, isActive.value], [_resolveDirective(\"click-outside\"), {\n handler: onClickOutside,\n closeConditional,\n include: () => [activatorEl.value]\n }]])]\n })])]\n })]));\n return {\n activatorEl,\n animateClick,\n contentEl,\n globalTop,\n localTop,\n updateLocation\n };\n }\n});\n//# sourceMappingURL=VOverlay.mjs.map","// Types\n\nconst Refs = Symbol('Forwarded refs');\n\n/** Omit properties starting with P */\n\nfunction getDescriptor(obj, key) {\n let currentObj = obj;\n while (currentObj) {\n const descriptor = Reflect.getOwnPropertyDescriptor(currentObj, key);\n if (descriptor) return descriptor;\n currentObj = Object.getPrototypeOf(currentObj);\n }\n return undefined;\n}\nexport function forwardRefs(target) {\n for (var _len = arguments.length, refs = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n refs[_key - 1] = arguments[_key];\n }\n target[Refs] = refs;\n return new Proxy(target, {\n get(target, key) {\n if (Reflect.has(target, key)) {\n return Reflect.get(target, key);\n }\n\n // Skip internal properties\n if (typeof key === 'symbol' || key.startsWith('__')) return;\n for (const ref of refs) {\n if (ref.value && Reflect.has(ref.value, key)) {\n const val = Reflect.get(ref.value, key);\n return typeof val === 'function' ? val.bind(ref.value) : val;\n }\n }\n },\n has(target, key) {\n if (Reflect.has(target, key)) {\n return true;\n }\n\n // Skip internal properties\n if (typeof key === 'symbol' || key.startsWith('__')) return false;\n for (const ref of refs) {\n if (ref.value && Reflect.has(ref.value, key)) {\n return true;\n }\n }\n return false;\n },\n getOwnPropertyDescriptor(target, key) {\n const descriptor = Reflect.getOwnPropertyDescriptor(target, key);\n if (descriptor) return descriptor;\n\n // Skip internal properties\n if (typeof key === 'symbol' || key.startsWith('__')) return;\n\n // Check each ref's own properties\n for (const ref of refs) {\n if (!ref.value) continue;\n const descriptor = getDescriptor(ref.value, key) ?? ('_' in ref.value ? getDescriptor(ref.value._?.setupState, key) : undefined);\n if (descriptor) return descriptor;\n }\n\n // Recursive search up each ref's prototype\n for (const ref of refs) {\n const childRefs = ref.value && ref.value[Refs];\n if (!childRefs) continue;\n const queue = childRefs.slice();\n while (queue.length) {\n const ref = queue.shift();\n const descriptor = getDescriptor(ref.value, key);\n if (descriptor) return descriptor;\n const childRefs = ref.value && ref.value[Refs];\n if (childRefs) queue.push(...childRefs);\n }\n }\n return undefined;\n }\n });\n}\n//# sourceMappingURL=forwardRefs.mjs.map","import { createVNode as _createVNode, mergeProps as _mergeProps } from \"vue\";\n// Styles\nimport \"./VTooltip.css\";\n\n// Components\nimport { VOverlay } from \"../VOverlay/index.mjs\";\nimport { makeVOverlayProps } from \"../VOverlay/VOverlay.mjs\"; // Composables\nimport { forwardRefs } from \"../../composables/forwardRefs.mjs\";\nimport { useProxiedModel } from \"../../composables/proxiedModel.mjs\";\nimport { useScopeId } from \"../../composables/scopeId.mjs\"; // Utilities\nimport { computed, mergeProps, ref } from 'vue';\nimport { genericComponent, getUid, omit, propsFactory, useRender } from \"../../util/index.mjs\"; // Types\nexport const makeVTooltipProps = propsFactory({\n id: String,\n text: String,\n ...omit(makeVOverlayProps({\n closeOnBack: false,\n location: 'end',\n locationStrategy: 'connected',\n eager: true,\n minWidth: 0,\n offset: 10,\n openOnClick: false,\n openOnHover: true,\n origin: 'auto',\n scrim: false,\n scrollStrategy: 'reposition',\n transition: false\n }), ['absolute', 'persistent'])\n}, 'VTooltip');\nexport const VTooltip = genericComponent()({\n name: 'VTooltip',\n props: makeVTooltipProps(),\n emits: {\n 'update:modelValue': value => true\n },\n setup(props, _ref) {\n let {\n slots\n } = _ref;\n const isActive = useProxiedModel(props, 'modelValue');\n const {\n scopeId\n } = useScopeId();\n const uid = getUid();\n const id = computed(() => props.id || `v-tooltip-${uid}`);\n const overlay = ref();\n const location = computed(() => {\n return props.location.split(' ').length > 1 ? props.location : props.location + ' center';\n });\n const origin = computed(() => {\n return props.origin === 'auto' || props.origin === 'overlap' || props.origin.split(' ').length > 1 || props.location.split(' ').length > 1 ? props.origin : props.origin + ' center';\n });\n const transition = computed(() => {\n if (props.transition) return props.transition;\n return isActive.value ? 'scale-transition' : 'fade-transition';\n });\n const activatorProps = computed(() => mergeProps({\n 'aria-describedby': id.value\n }, props.activatorProps));\n useRender(() => {\n const [overlayProps] = VOverlay.filterProps(props);\n return _createVNode(VOverlay, _mergeProps({\n \"ref\": overlay,\n \"class\": ['v-tooltip', props.class],\n \"style\": props.style,\n \"id\": id.value\n }, overlayProps, {\n \"modelValue\": isActive.value,\n \"onUpdate:modelValue\": $event => isActive.value = $event,\n \"transition\": transition.value,\n \"absolute\": true,\n \"location\": location.value,\n \"origin\": origin.value,\n \"persistent\": true,\n \"role\": \"tooltip\",\n \"activatorProps\": activatorProps.value,\n \"_disableGlobalStack\": true\n }, scopeId), {\n activator: slots.activator,\n default: function () {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n return slots.default?.(...args) ?? props.text;\n }\n });\n });\n return forwardRefs({}, overlay);\n }\n});\n//# sourceMappingURL=VTooltip.mjs.map","/*!\n * vue-router v4.2.2\n * (c) 2023 Eduardo San Martin Morote\n * @license MIT\n */\nimport { getCurrentInstance, inject, onUnmounted, onDeactivated, onActivated, computed, unref, watchEffect, defineComponent, reactive, h, provide, ref, watch, shallowRef, nextTick } from 'vue';\nimport { setupDevtoolsPlugin } from '@vue/devtools-api';\n\nconst isBrowser = typeof window !== 'undefined';\n\nfunction isESModule(obj) {\r\n return obj.__esModule || obj[Symbol.toStringTag] === 'Module';\r\n}\r\nconst assign = Object.assign;\r\nfunction applyToParams(fn, params) {\r\n const newParams = {};\r\n for (const key in params) {\r\n const value = params[key];\r\n newParams[key] = isArray(value)\r\n ? value.map(fn)\r\n : fn(value);\r\n }\r\n return newParams;\r\n}\r\nconst noop = () => { };\r\n/**\r\n * Typesafe alternative to Array.isArray\r\n * https://github.com/microsoft/TypeScript/pull/48228\r\n */\r\nconst isArray = Array.isArray;\n\nfunction warn(msg) {\r\n // avoid using ...args as it breaks in older Edge builds\r\n const args = Array.from(arguments).slice(1);\r\n console.warn.apply(console, ['[Vue Router warn]: ' + msg].concat(args));\r\n}\n\nconst TRAILING_SLASH_RE = /\\/$/;\r\nconst removeTrailingSlash = (path) => path.replace(TRAILING_SLASH_RE, '');\r\n/**\r\n * Transforms a URI into a normalized history location\r\n *\r\n * @param parseQuery\r\n * @param location - URI to normalize\r\n * @param currentLocation - current absolute location. Allows resolving relative\r\n * paths. Must start with `/`. Defaults to `/`\r\n * @returns a normalized history location\r\n */\r\nfunction parseURL(parseQuery, location, currentLocation = '/') {\r\n let path, query = {}, searchString = '', hash = '';\r\n // Could use URL and URLSearchParams but IE 11 doesn't support it\r\n // TODO: move to new URL()\r\n const hashPos = location.indexOf('#');\r\n let searchPos = location.indexOf('?');\r\n // the hash appears before the search, so it's not part of the search string\r\n if (hashPos < searchPos && hashPos >= 0) {\r\n searchPos = -1;\r\n }\r\n if (searchPos > -1) {\r\n path = location.slice(0, searchPos);\r\n searchString = location.slice(searchPos + 1, hashPos > -1 ? hashPos : location.length);\r\n query = parseQuery(searchString);\r\n }\r\n if (hashPos > -1) {\r\n path = path || location.slice(0, hashPos);\r\n // keep the # character\r\n hash = location.slice(hashPos, location.length);\r\n }\r\n // no search and no query\r\n path = resolveRelativePath(path != null ? path : location, currentLocation);\r\n // empty path means a relative query or hash `?foo=f`, `#thing`\r\n return {\r\n fullPath: path + (searchString && '?') + searchString + hash,\r\n path,\r\n query,\r\n hash,\r\n };\r\n}\r\n/**\r\n * Stringifies a URL object\r\n *\r\n * @param stringifyQuery\r\n * @param location\r\n */\r\nfunction stringifyURL(stringifyQuery, location) {\r\n const query = location.query ? stringifyQuery(location.query) : '';\r\n return location.path + (query && '?') + query + (location.hash || '');\r\n}\r\n/**\r\n * Strips off the base from the beginning of a location.pathname in a non-case-sensitive way.\r\n *\r\n * @param pathname - location.pathname\r\n * @param base - base to strip off\r\n */\r\nfunction stripBase(pathname, base) {\r\n // no base or base is not found at the beginning\r\n if (!base || !pathname.toLowerCase().startsWith(base.toLowerCase()))\r\n return pathname;\r\n return pathname.slice(base.length) || '/';\r\n}\r\n/**\r\n * Checks if two RouteLocation are equal. This means that both locations are\r\n * pointing towards the same {@link RouteRecord} and that all `params`, `query`\r\n * parameters and `hash` are the same\r\n *\r\n * @param stringifyQuery - A function that takes a query object of type LocationQueryRaw and returns a string representation of it.\r\n * @param a - first {@link RouteLocation}\r\n * @param b - second {@link RouteLocation}\r\n */\r\nfunction isSameRouteLocation(stringifyQuery, a, b) {\r\n const aLastIndex = a.matched.length - 1;\r\n const bLastIndex = b.matched.length - 1;\r\n return (aLastIndex > -1 &&\r\n aLastIndex === bLastIndex &&\r\n isSameRouteRecord(a.matched[aLastIndex], b.matched[bLastIndex]) &&\r\n isSameRouteLocationParams(a.params, b.params) &&\r\n stringifyQuery(a.query) === stringifyQuery(b.query) &&\r\n a.hash === b.hash);\r\n}\r\n/**\r\n * Check if two `RouteRecords` are equal. Takes into account aliases: they are\r\n * considered equal to the `RouteRecord` they are aliasing.\r\n *\r\n * @param a - first {@link RouteRecord}\r\n * @param b - second {@link RouteRecord}\r\n */\r\nfunction isSameRouteRecord(a, b) {\r\n // since the original record has an undefined value for aliasOf\r\n // but all aliases point to the original record, this will always compare\r\n // the original record\r\n return (a.aliasOf || a) === (b.aliasOf || b);\r\n}\r\nfunction isSameRouteLocationParams(a, b) {\r\n if (Object.keys(a).length !== Object.keys(b).length)\r\n return false;\r\n for (const key in a) {\r\n if (!isSameRouteLocationParamsValue(a[key], b[key]))\r\n return false;\r\n }\r\n return true;\r\n}\r\nfunction isSameRouteLocationParamsValue(a, b) {\r\n return isArray(a)\r\n ? isEquivalentArray(a, b)\r\n : isArray(b)\r\n ? isEquivalentArray(b, a)\r\n : a === b;\r\n}\r\n/**\r\n * Check if two arrays are the same or if an array with one single entry is the\r\n * same as another primitive value. Used to check query and parameters\r\n *\r\n * @param a - array of values\r\n * @param b - array of values or a single value\r\n */\r\nfunction isEquivalentArray(a, b) {\r\n return isArray(b)\r\n ? a.length === b.length && a.every((value, i) => value === b[i])\r\n : a.length === 1 && a[0] === b;\r\n}\r\n/**\r\n * Resolves a relative path that starts with `.`.\r\n *\r\n * @param to - path location we are resolving\r\n * @param from - currentLocation.path, should start with `/`\r\n */\r\nfunction resolveRelativePath(to, from) {\r\n if (to.startsWith('/'))\r\n return to;\r\n if ((process.env.NODE_ENV !== 'production') && !from.startsWith('/')) {\r\n warn(`Cannot resolve a relative location without an absolute path. Trying to resolve \"${to}\" from \"${from}\". It should look like \"/${from}\".`);\r\n return to;\r\n }\r\n if (!to)\r\n return from;\r\n const fromSegments = from.split('/');\r\n const toSegments = to.split('/');\r\n const lastToSegment = toSegments[toSegments.length - 1];\r\n // make . and ./ the same (../ === .., ../../ === ../..)\r\n // this is the same behavior as new URL()\r\n if (lastToSegment === '..' || lastToSegment === '.') {\r\n toSegments.push('');\r\n }\r\n let position = fromSegments.length - 1;\r\n let toPosition;\r\n let segment;\r\n for (toPosition = 0; toPosition < toSegments.length; toPosition++) {\r\n segment = toSegments[toPosition];\r\n // we stay on the same position\r\n if (segment === '.')\r\n continue;\r\n // go up in the from array\r\n if (segment === '..') {\r\n // we can't go below zero, but we still need to increment toPosition\r\n if (position > 1)\r\n position--;\r\n // continue\r\n }\r\n // we reached a non-relative path, we stop here\r\n else\r\n break;\r\n }\r\n return (fromSegments.slice(0, position).join('/') +\r\n '/' +\r\n toSegments\r\n // ensure we use at least the last element in the toSegments\r\n .slice(toPosition - (toPosition === toSegments.length ? 1 : 0))\r\n .join('/'));\r\n}\n\nvar NavigationType;\r\n(function (NavigationType) {\r\n NavigationType[\"pop\"] = \"pop\";\r\n NavigationType[\"push\"] = \"push\";\r\n})(NavigationType || (NavigationType = {}));\r\nvar NavigationDirection;\r\n(function (NavigationDirection) {\r\n NavigationDirection[\"back\"] = \"back\";\r\n NavigationDirection[\"forward\"] = \"forward\";\r\n NavigationDirection[\"unknown\"] = \"\";\r\n})(NavigationDirection || (NavigationDirection = {}));\r\n/**\r\n * Starting location for Histories\r\n */\r\nconst START = '';\r\n// Generic utils\r\n/**\r\n * Normalizes a base by removing any trailing slash and reading the base tag if\r\n * present.\r\n *\r\n * @param base - base to normalize\r\n */\r\nfunction normalizeBase(base) {\r\n if (!base) {\r\n if (isBrowser) {\r\n // respect tag\r\n const baseEl = document.querySelector('base');\r\n base = (baseEl && baseEl.getAttribute('href')) || '/';\r\n // strip full URL origin\r\n base = base.replace(/^\\w+:\\/\\/[^\\/]+/, '');\r\n }\r\n else {\r\n base = '/';\r\n }\r\n }\r\n // ensure leading slash when it was removed by the regex above avoid leading\r\n // slash with hash because the file could be read from the disk like file://\r\n // and the leading slash would cause problems\r\n if (base[0] !== '/' && base[0] !== '#')\r\n base = '/' + base;\r\n // remove the trailing slash so all other method can just do `base + fullPath`\r\n // to build an href\r\n return removeTrailingSlash(base);\r\n}\r\n// remove any character before the hash\r\nconst BEFORE_HASH_RE = /^[^#]+#/;\r\nfunction createHref(base, location) {\r\n return base.replace(BEFORE_HASH_RE, '#') + location;\r\n}\n\nfunction getElementPosition(el, offset) {\r\n const docRect = document.documentElement.getBoundingClientRect();\r\n const elRect = el.getBoundingClientRect();\r\n return {\r\n behavior: offset.behavior,\r\n left: elRect.left - docRect.left - (offset.left || 0),\r\n top: elRect.top - docRect.top - (offset.top || 0),\r\n };\r\n}\r\nconst computeScrollPosition = () => ({\r\n left: window.pageXOffset,\r\n top: window.pageYOffset,\r\n});\r\nfunction scrollToPosition(position) {\r\n let scrollToOptions;\r\n if ('el' in position) {\r\n const positionEl = position.el;\r\n const isIdSelector = typeof positionEl === 'string' && positionEl.startsWith('#');\r\n /**\r\n * `id`s can accept pretty much any characters, including CSS combinators\r\n * like `>` or `~`. It's still possible to retrieve elements using\r\n * `document.getElementById('~')` but it needs to be escaped when using\r\n * `document.querySelector('#\\\\~')` for it to be valid. The only\r\n * requirements for `id`s are them to be unique on the page and to not be\r\n * empty (`id=\"\"`). Because of that, when passing an id selector, it should\r\n * be properly escaped for it to work with `querySelector`. We could check\r\n * for the id selector to be simple (no CSS combinators `+ >~`) but that\r\n * would make things inconsistent since they are valid characters for an\r\n * `id` but would need to be escaped when using `querySelector`, breaking\r\n * their usage and ending up in no selector returned. Selectors need to be\r\n * escaped:\r\n *\r\n * - `#1-thing` becomes `#\\31 -thing`\r\n * - `#with~symbols` becomes `#with\\\\~symbols`\r\n *\r\n * - More information about the topic can be found at\r\n * https://mathiasbynens.be/notes/html5-id-class.\r\n * - Practical example: https://mathiasbynens.be/demo/html5-id\r\n */\r\n if ((process.env.NODE_ENV !== 'production') && typeof position.el === 'string') {\r\n if (!isIdSelector || !document.getElementById(position.el.slice(1))) {\r\n try {\r\n const foundEl = document.querySelector(position.el);\r\n if (isIdSelector && foundEl) {\r\n warn(`The selector \"${position.el}\" should be passed as \"el: document.querySelector('${position.el}')\" because it starts with \"#\".`);\r\n // return to avoid other warnings\r\n return;\r\n }\r\n }\r\n catch (err) {\r\n warn(`The selector \"${position.el}\" is invalid. If you are using an id selector, make sure to escape it. You can find more information about escaping characters in selectors at https://mathiasbynens.be/notes/css-escapes or use CSS.escape (https://developer.mozilla.org/en-US/docs/Web/API/CSS/escape).`);\r\n // return to avoid other warnings\r\n return;\r\n }\r\n }\r\n }\r\n const el = typeof positionEl === 'string'\r\n ? isIdSelector\r\n ? document.getElementById(positionEl.slice(1))\r\n : document.querySelector(positionEl)\r\n : positionEl;\r\n if (!el) {\r\n (process.env.NODE_ENV !== 'production') &&\r\n warn(`Couldn't find element using selector \"${position.el}\" returned by scrollBehavior.`);\r\n return;\r\n }\r\n scrollToOptions = getElementPosition(el, position);\r\n }\r\n else {\r\n scrollToOptions = position;\r\n }\r\n if ('scrollBehavior' in document.documentElement.style)\r\n window.scrollTo(scrollToOptions);\r\n else {\r\n window.scrollTo(scrollToOptions.left != null ? scrollToOptions.left : window.pageXOffset, scrollToOptions.top != null ? scrollToOptions.top : window.pageYOffset);\r\n }\r\n}\r\nfunction getScrollKey(path, delta) {\r\n const position = history.state ? history.state.position - delta : -1;\r\n return position + path;\r\n}\r\nconst scrollPositions = new Map();\r\nfunction saveScrollPosition(key, scrollPosition) {\r\n scrollPositions.set(key, scrollPosition);\r\n}\r\nfunction getSavedScrollPosition(key) {\r\n const scroll = scrollPositions.get(key);\r\n // consume it so it's not used again\r\n scrollPositions.delete(key);\r\n return scroll;\r\n}\r\n// TODO: RFC about how to save scroll position\r\n/**\r\n * ScrollBehavior instance used by the router to compute and restore the scroll\r\n * position when navigating.\r\n */\r\n// export interface ScrollHandler {\r\n// // returns a scroll position that can be saved in history\r\n// compute(): ScrollPositionEntry\r\n// // can take an extended ScrollPositionEntry\r\n// scroll(position: ScrollPosition): void\r\n// }\r\n// export const scrollHandler: ScrollHandler = {\r\n// compute: computeScroll,\r\n// scroll: scrollToPosition,\r\n// }\n\nlet createBaseLocation = () => location.protocol + '//' + location.host;\r\n/**\r\n * Creates a normalized history location from a window.location object\r\n * @param base - The base path\r\n * @param location - The window.location object\r\n */\r\nfunction createCurrentLocation(base, location) {\r\n const { pathname, search, hash } = location;\r\n // allows hash bases like #, /#, #/, #!, #!/, /#!/, or even /folder#end\r\n const hashPos = base.indexOf('#');\r\n if (hashPos > -1) {\r\n let slicePos = hash.includes(base.slice(hashPos))\r\n ? base.slice(hashPos).length\r\n : 1;\r\n let pathFromHash = hash.slice(slicePos);\r\n // prepend the starting slash to hash so the url starts with /#\r\n if (pathFromHash[0] !== '/')\r\n pathFromHash = '/' + pathFromHash;\r\n return stripBase(pathFromHash, '');\r\n }\r\n const path = stripBase(pathname, base);\r\n return path + search + hash;\r\n}\r\nfunction useHistoryListeners(base, historyState, currentLocation, replace) {\r\n let listeners = [];\r\n let teardowns = [];\r\n // TODO: should it be a stack? a Dict. Check if the popstate listener\r\n // can trigger twice\r\n let pauseState = null;\r\n const popStateHandler = ({ state, }) => {\r\n const to = createCurrentLocation(base, location);\r\n const from = currentLocation.value;\r\n const fromState = historyState.value;\r\n let delta = 0;\r\n if (state) {\r\n currentLocation.value = to;\r\n historyState.value = state;\r\n // ignore the popstate and reset the pauseState\r\n if (pauseState && pauseState === from) {\r\n pauseState = null;\r\n return;\r\n }\r\n delta = fromState ? state.position - fromState.position : 0;\r\n }\r\n else {\r\n replace(to);\r\n }\r\n // console.log({ deltaFromCurrent })\r\n // Here we could also revert the navigation by calling history.go(-delta)\r\n // this listener will have to be adapted to not trigger again and to wait for the url\r\n // to be updated before triggering the listeners. Some kind of validation function would also\r\n // need to be passed to the listeners so the navigation can be accepted\r\n // call all listeners\r\n listeners.forEach(listener => {\r\n listener(currentLocation.value, from, {\r\n delta,\r\n type: NavigationType.pop,\r\n direction: delta\r\n ? delta > 0\r\n ? NavigationDirection.forward\r\n : NavigationDirection.back\r\n : NavigationDirection.unknown,\r\n });\r\n });\r\n };\r\n function pauseListeners() {\r\n pauseState = currentLocation.value;\r\n }\r\n function listen(callback) {\r\n // set up the listener and prepare teardown callbacks\r\n listeners.push(callback);\r\n const teardown = () => {\r\n const index = listeners.indexOf(callback);\r\n if (index > -1)\r\n listeners.splice(index, 1);\r\n };\r\n teardowns.push(teardown);\r\n return teardown;\r\n }\r\n function beforeUnloadListener() {\r\n const { history } = window;\r\n if (!history.state)\r\n return;\r\n history.replaceState(assign({}, history.state, { scroll: computeScrollPosition() }), '');\r\n }\r\n function destroy() {\r\n for (const teardown of teardowns)\r\n teardown();\r\n teardowns = [];\r\n window.removeEventListener('popstate', popStateHandler);\r\n window.removeEventListener('beforeunload', beforeUnloadListener);\r\n }\r\n // set up the listeners and prepare teardown callbacks\r\n window.addEventListener('popstate', popStateHandler);\r\n // TODO: could we use 'pagehide' or 'visibilitychange' instead?\r\n // https://developer.chrome.com/blog/page-lifecycle-api/\r\n window.addEventListener('beforeunload', beforeUnloadListener, {\r\n passive: true,\r\n });\r\n return {\r\n pauseListeners,\r\n listen,\r\n destroy,\r\n };\r\n}\r\n/**\r\n * Creates a state object\r\n */\r\nfunction buildState(back, current, forward, replaced = false, computeScroll = false) {\r\n return {\r\n back,\r\n current,\r\n forward,\r\n replaced,\r\n position: window.history.length,\r\n scroll: computeScroll ? computeScrollPosition() : null,\r\n };\r\n}\r\nfunction useHistoryStateNavigation(base) {\r\n const { history, location } = window;\r\n // private variables\r\n const currentLocation = {\r\n value: createCurrentLocation(base, location),\r\n };\r\n const historyState = { value: history.state };\r\n // build current history entry as this is a fresh navigation\r\n if (!historyState.value) {\r\n changeLocation(currentLocation.value, {\r\n back: null,\r\n current: currentLocation.value,\r\n forward: null,\r\n // the length is off by one, we need to decrease it\r\n position: history.length - 1,\r\n replaced: true,\r\n // don't add a scroll as the user may have an anchor, and we want\r\n // scrollBehavior to be triggered without a saved position\r\n scroll: null,\r\n }, true);\r\n }\r\n function changeLocation(to, state, replace) {\r\n /**\r\n * if a base tag is provided, and we are on a normal domain, we have to\r\n * respect the provided `base` attribute because pushState() will use it and\r\n * potentially erase anything before the `#` like at\r\n * https://github.com/vuejs/router/issues/685 where a base of\r\n * `/folder/#` but a base of `/` would erase the `/folder/` section. If\r\n * there is no host, the `` tag makes no sense and if there isn't a\r\n * base tag we can just use everything after the `#`.\r\n */\r\n const hashIndex = base.indexOf('#');\r\n const url = hashIndex > -1\r\n ? (location.host && document.querySelector('base')\r\n ? base\r\n : base.slice(hashIndex)) + to\r\n : createBaseLocation() + base + to;\r\n try {\r\n // BROWSER QUIRK\r\n // NOTE: Safari throws a SecurityError when calling this function 100 times in 30 seconds\r\n history[replace ? 'replaceState' : 'pushState'](state, '', url);\r\n historyState.value = state;\r\n }\r\n catch (err) {\r\n if ((process.env.NODE_ENV !== 'production')) {\r\n warn('Error with push/replace State', err);\r\n }\r\n else {\r\n console.error(err);\r\n }\r\n // Force the navigation, this also resets the call count\r\n location[replace ? 'replace' : 'assign'](url);\r\n }\r\n }\r\n function replace(to, data) {\r\n const state = assign({}, history.state, buildState(historyState.value.back, \r\n // keep back and forward entries but override current position\r\n to, historyState.value.forward, true), data, { position: historyState.value.position });\r\n changeLocation(to, state, true);\r\n currentLocation.value = to;\r\n }\r\n function push(to, data) {\r\n // Add to current entry the information of where we are going\r\n // as well as saving the current position\r\n const currentState = assign({}, \r\n // use current history state to gracefully handle a wrong call to\r\n // history.replaceState\r\n // https://github.com/vuejs/router/issues/366\r\n historyState.value, history.state, {\r\n forward: to,\r\n scroll: computeScrollPosition(),\r\n });\r\n if ((process.env.NODE_ENV !== 'production') && !history.state) {\r\n warn(`history.state seems to have been manually replaced without preserving the necessary values. Make sure to preserve existing history state if you are manually calling history.replaceState:\\n\\n` +\r\n `history.replaceState(history.state, '', url)\\n\\n` +\r\n `You can find more information at https://next.router.vuejs.org/guide/migration/#usage-of-history-state.`);\r\n }\r\n changeLocation(currentState.current, currentState, true);\r\n const state = assign({}, buildState(currentLocation.value, to, null), { position: currentState.position + 1 }, data);\r\n changeLocation(to, state, false);\r\n currentLocation.value = to;\r\n }\r\n return {\r\n location: currentLocation,\r\n state: historyState,\r\n push,\r\n replace,\r\n };\r\n}\r\n/**\r\n * Creates an HTML5 history. Most common history for single page applications.\r\n *\r\n * @param base -\r\n */\r\nfunction createWebHistory(base) {\r\n base = normalizeBase(base);\r\n const historyNavigation = useHistoryStateNavigation(base);\r\n const historyListeners = useHistoryListeners(base, historyNavigation.state, historyNavigation.location, historyNavigation.replace);\r\n function go(delta, triggerListeners = true) {\r\n if (!triggerListeners)\r\n historyListeners.pauseListeners();\r\n history.go(delta);\r\n }\r\n const routerHistory = assign({\r\n // it's overridden right after\r\n location: '',\r\n base,\r\n go,\r\n createHref: createHref.bind(null, base),\r\n }, historyNavigation, historyListeners);\r\n Object.defineProperty(routerHistory, 'location', {\r\n enumerable: true,\r\n get: () => historyNavigation.location.value,\r\n });\r\n Object.defineProperty(routerHistory, 'state', {\r\n enumerable: true,\r\n get: () => historyNavigation.state.value,\r\n });\r\n return routerHistory;\r\n}\n\n/**\r\n * Creates an in-memory based history. The main purpose of this history is to handle SSR. It starts in a special location that is nowhere.\r\n * It's up to the user to replace that location with the starter location by either calling `router.push` or `router.replace`.\r\n *\r\n * @param base - Base applied to all urls, defaults to '/'\r\n * @returns a history object that can be passed to the router constructor\r\n */\r\nfunction createMemoryHistory(base = '') {\r\n let listeners = [];\r\n let queue = [START];\r\n let position = 0;\r\n base = normalizeBase(base);\r\n function setLocation(location) {\r\n position++;\r\n if (position === queue.length) {\r\n // we are at the end, we can simply append a new entry\r\n queue.push(location);\r\n }\r\n else {\r\n // we are in the middle, we remove everything from here in the queue\r\n queue.splice(position);\r\n queue.push(location);\r\n }\r\n }\r\n function triggerListeners(to, from, { direction, delta }) {\r\n const info = {\r\n direction,\r\n delta,\r\n type: NavigationType.pop,\r\n };\r\n for (const callback of listeners) {\r\n callback(to, from, info);\r\n }\r\n }\r\n const routerHistory = {\r\n // rewritten by Object.defineProperty\r\n location: START,\r\n // TODO: should be kept in queue\r\n state: {},\r\n base,\r\n createHref: createHref.bind(null, base),\r\n replace(to) {\r\n // remove current entry and decrement position\r\n queue.splice(position--, 1);\r\n setLocation(to);\r\n },\r\n push(to, data) {\r\n setLocation(to);\r\n },\r\n listen(callback) {\r\n listeners.push(callback);\r\n return () => {\r\n const index = listeners.indexOf(callback);\r\n if (index > -1)\r\n listeners.splice(index, 1);\r\n };\r\n },\r\n destroy() {\r\n listeners = [];\r\n queue = [START];\r\n position = 0;\r\n },\r\n go(delta, shouldTrigger = true) {\r\n const from = this.location;\r\n const direction = \r\n // we are considering delta === 0 going forward, but in abstract mode\r\n // using 0 for the delta doesn't make sense like it does in html5 where\r\n // it reloads the page\r\n delta < 0 ? NavigationDirection.back : NavigationDirection.forward;\r\n position = Math.max(0, Math.min(position + delta, queue.length - 1));\r\n if (shouldTrigger) {\r\n triggerListeners(this.location, from, {\r\n direction,\r\n delta,\r\n });\r\n }\r\n },\r\n };\r\n Object.defineProperty(routerHistory, 'location', {\r\n enumerable: true,\r\n get: () => queue[position],\r\n });\r\n return routerHistory;\r\n}\n\n/**\r\n * Creates a hash history. Useful for web applications with no host (e.g. `file://`) or when configuring a server to\r\n * handle any URL is not possible.\r\n *\r\n * @param base - optional base to provide. Defaults to `location.pathname + location.search` If there is a `` tag\r\n * in the `head`, its value will be ignored in favor of this parameter **but note it affects all the history.pushState()\r\n * calls**, meaning that if you use a `` tag, it's `href` value **has to match this parameter** (ignoring anything\r\n * after the `#`).\r\n *\r\n * @example\r\n * ```js\r\n * // at https://example.com/folder\r\n * createWebHashHistory() // gives a url of `https://example.com/folder#`\r\n * createWebHashHistory('/folder/') // gives a url of `https://example.com/folder/#`\r\n * // if the `#` is provided in the base, it won't be added by `createWebHashHistory`\r\n * createWebHashHistory('/folder/#/app/') // gives a url of `https://example.com/folder/#/app/`\r\n * // you should avoid doing this because it changes the original url and breaks copying urls\r\n * createWebHashHistory('/other-folder/') // gives a url of `https://example.com/other-folder/#`\r\n *\r\n * // at file:///usr/etc/folder/index.html\r\n * // for locations with no `host`, the base is ignored\r\n * createWebHashHistory('/iAmIgnored') // gives a url of `file:///usr/etc/folder/index.html#`\r\n * ```\r\n */\r\nfunction createWebHashHistory(base) {\r\n // Make sure this implementation is fine in terms of encoding, specially for IE11\r\n // for `file://`, directly use the pathname and ignore the base\r\n // location.pathname contains an initial `/` even at the root: `https://example.com`\r\n base = location.host ? base || location.pathname + location.search : '';\r\n // allow the user to provide a `#` in the middle: `/base/#/app`\r\n if (!base.includes('#'))\r\n base += '#';\r\n if ((process.env.NODE_ENV !== 'production') && !base.endsWith('#/') && !base.endsWith('#')) {\r\n warn(`A hash base must end with a \"#\":\\n\"${base}\" should be \"${base.replace(/#.*$/, '#')}\".`);\r\n }\r\n return createWebHistory(base);\r\n}\n\nfunction isRouteLocation(route) {\r\n return typeof route === 'string' || (route && typeof route === 'object');\r\n}\r\nfunction isRouteName(name) {\r\n return typeof name === 'string' || typeof name === 'symbol';\r\n}\n\n/**\r\n * Initial route location where the router is. Can be used in navigation guards\r\n * to differentiate the initial navigation.\r\n *\r\n * @example\r\n * ```js\r\n * import { START_LOCATION } from 'vue-router'\r\n *\r\n * router.beforeEach((to, from) => {\r\n * if (from === START_LOCATION) {\r\n * // initial navigation\r\n * }\r\n * })\r\n * ```\r\n */\r\nconst START_LOCATION_NORMALIZED = {\r\n path: '/',\r\n name: undefined,\r\n params: {},\r\n query: {},\r\n hash: '',\r\n fullPath: '/',\r\n matched: [],\r\n meta: {},\r\n redirectedFrom: undefined,\r\n};\n\nconst NavigationFailureSymbol = Symbol((process.env.NODE_ENV !== 'production') ? 'navigation failure' : '');\r\n/**\r\n * Enumeration with all possible types for navigation failures. Can be passed to\r\n * {@link isNavigationFailure} to check for specific failures.\r\n */\r\nvar NavigationFailureType;\r\n(function (NavigationFailureType) {\r\n /**\r\n * An aborted navigation is a navigation that failed because a navigation\r\n * guard returned `false` or called `next(false)`\r\n */\r\n NavigationFailureType[NavigationFailureType[\"aborted\"] = 4] = \"aborted\";\r\n /**\r\n * A cancelled navigation is a navigation that failed because a more recent\r\n * navigation finished started (not necessarily finished).\r\n */\r\n NavigationFailureType[NavigationFailureType[\"cancelled\"] = 8] = \"cancelled\";\r\n /**\r\n * A duplicated navigation is a navigation that failed because it was\r\n * initiated while already being at the exact same location.\r\n */\r\n NavigationFailureType[NavigationFailureType[\"duplicated\"] = 16] = \"duplicated\";\r\n})(NavigationFailureType || (NavigationFailureType = {}));\r\n// DEV only debug messages\r\nconst ErrorTypeMessages = {\r\n [1 /* ErrorTypes.MATCHER_NOT_FOUND */]({ location, currentLocation }) {\r\n return `No match for\\n ${JSON.stringify(location)}${currentLocation\r\n ? '\\nwhile being at\\n' + JSON.stringify(currentLocation)\r\n : ''}`;\r\n },\r\n [2 /* ErrorTypes.NAVIGATION_GUARD_REDIRECT */]({ from, to, }) {\r\n return `Redirected from \"${from.fullPath}\" to \"${stringifyRoute(to)}\" via a navigation guard.`;\r\n },\r\n [4 /* ErrorTypes.NAVIGATION_ABORTED */]({ from, to }) {\r\n return `Navigation aborted from \"${from.fullPath}\" to \"${to.fullPath}\" via a navigation guard.`;\r\n },\r\n [8 /* ErrorTypes.NAVIGATION_CANCELLED */]({ from, to }) {\r\n return `Navigation cancelled from \"${from.fullPath}\" to \"${to.fullPath}\" with a new navigation.`;\r\n },\r\n [16 /* ErrorTypes.NAVIGATION_DUPLICATED */]({ from, to }) {\r\n return `Avoided redundant navigation to current location: \"${from.fullPath}\".`;\r\n },\r\n};\r\nfunction createRouterError(type, params) {\r\n // keep full error messages in cjs versions\r\n if ((process.env.NODE_ENV !== 'production') || !true) {\r\n return assign(new Error(ErrorTypeMessages[type](params)), {\r\n type,\r\n [NavigationFailureSymbol]: true,\r\n }, params);\r\n }\r\n else {\r\n return assign(new Error(), {\r\n type,\r\n [NavigationFailureSymbol]: true,\r\n }, params);\r\n }\r\n}\r\nfunction isNavigationFailure(error, type) {\r\n return (error instanceof Error &&\r\n NavigationFailureSymbol in error &&\r\n (type == null || !!(error.type & type)));\r\n}\r\nconst propertiesToLog = ['params', 'query', 'hash'];\r\nfunction stringifyRoute(to) {\r\n if (typeof to === 'string')\r\n return to;\r\n if ('path' in to)\r\n return to.path;\r\n const location = {};\r\n for (const key of propertiesToLog) {\r\n if (key in to)\r\n location[key] = to[key];\r\n }\r\n return JSON.stringify(location, null, 2);\r\n}\n\n// default pattern for a param: non-greedy everything but /\r\nconst BASE_PARAM_PATTERN = '[^/]+?';\r\nconst BASE_PATH_PARSER_OPTIONS = {\r\n sensitive: false,\r\n strict: false,\r\n start: true,\r\n end: true,\r\n};\r\n// Special Regex characters that must be escaped in static tokens\r\nconst REGEX_CHARS_RE = /[.+*?^${}()[\\]/\\\\]/g;\r\n/**\r\n * Creates a path parser from an array of Segments (a segment is an array of Tokens)\r\n *\r\n * @param segments - array of segments returned by tokenizePath\r\n * @param extraOptions - optional options for the regexp\r\n * @returns a PathParser\r\n */\r\nfunction tokensToParser(segments, extraOptions) {\r\n const options = assign({}, BASE_PATH_PARSER_OPTIONS, extraOptions);\r\n // the amount of scores is the same as the length of segments except for the root segment \"/\"\r\n const score = [];\r\n // the regexp as a string\r\n let pattern = options.start ? '^' : '';\r\n // extracted keys\r\n const keys = [];\r\n for (const segment of segments) {\r\n // the root segment needs special treatment\r\n const segmentScores = segment.length ? [] : [90 /* PathScore.Root */];\r\n // allow trailing slash\r\n if (options.strict && !segment.length)\r\n pattern += '/';\r\n for (let tokenIndex = 0; tokenIndex < segment.length; tokenIndex++) {\r\n const token = segment[tokenIndex];\r\n // resets the score if we are inside a sub-segment /:a-other-:b\r\n let subSegmentScore = 40 /* PathScore.Segment */ +\r\n (options.sensitive ? 0.25 /* PathScore.BonusCaseSensitive */ : 0);\r\n if (token.type === 0 /* TokenType.Static */) {\r\n // prepend the slash if we are starting a new segment\r\n if (!tokenIndex)\r\n pattern += '/';\r\n pattern += token.value.replace(REGEX_CHARS_RE, '\\\\$&');\r\n subSegmentScore += 40 /* PathScore.Static */;\r\n }\r\n else if (token.type === 1 /* TokenType.Param */) {\r\n const { value, repeatable, optional, regexp } = token;\r\n keys.push({\r\n name: value,\r\n repeatable,\r\n optional,\r\n });\r\n const re = regexp ? regexp : BASE_PARAM_PATTERN;\r\n // the user provided a custom regexp /:id(\\\\d+)\r\n if (re !== BASE_PARAM_PATTERN) {\r\n subSegmentScore += 10 /* PathScore.BonusCustomRegExp */;\r\n // make sure the regexp is valid before using it\r\n try {\r\n new RegExp(`(${re})`);\r\n }\r\n catch (err) {\r\n throw new Error(`Invalid custom RegExp for param \"${value}\" (${re}): ` +\r\n err.message);\r\n }\r\n }\r\n // when we repeat we must take care of the repeating leading slash\r\n let subPattern = repeatable ? `((?:${re})(?:/(?:${re}))*)` : `(${re})`;\r\n // prepend the slash if we are starting a new segment\r\n if (!tokenIndex)\r\n subPattern =\r\n // avoid an optional / if there are more segments e.g. /:p?-static\r\n // or /:p?-:p2\r\n optional && segment.length < 2\r\n ? `(?:/${subPattern})`\r\n : '/' + subPattern;\r\n if (optional)\r\n subPattern += '?';\r\n pattern += subPattern;\r\n subSegmentScore += 20 /* PathScore.Dynamic */;\r\n if (optional)\r\n subSegmentScore += -8 /* PathScore.BonusOptional */;\r\n if (repeatable)\r\n subSegmentScore += -20 /* PathScore.BonusRepeatable */;\r\n if (re === '.*')\r\n subSegmentScore += -50 /* PathScore.BonusWildcard */;\r\n }\r\n segmentScores.push(subSegmentScore);\r\n }\r\n // an empty array like /home/ -> [[{home}], []]\r\n // if (!segment.length) pattern += '/'\r\n score.push(segmentScores);\r\n }\r\n // only apply the strict bonus to the last score\r\n if (options.strict && options.end) {\r\n const i = score.length - 1;\r\n score[i][score[i].length - 1] += 0.7000000000000001 /* PathScore.BonusStrict */;\r\n }\r\n // TODO: dev only warn double trailing slash\r\n if (!options.strict)\r\n pattern += '/?';\r\n if (options.end)\r\n pattern += '$';\r\n // allow paths like /dynamic to only match dynamic or dynamic/... but not dynamic_something_else\r\n else if (options.strict)\r\n pattern += '(?:/|$)';\r\n const re = new RegExp(pattern, options.sensitive ? '' : 'i');\r\n function parse(path) {\r\n const match = path.match(re);\r\n const params = {};\r\n if (!match)\r\n return null;\r\n for (let i = 1; i < match.length; i++) {\r\n const value = match[i] || '';\r\n const key = keys[i - 1];\r\n params[key.name] = value && key.repeatable ? value.split('/') : value;\r\n }\r\n return params;\r\n }\r\n function stringify(params) {\r\n let path = '';\r\n // for optional parameters to allow to be empty\r\n let avoidDuplicatedSlash = false;\r\n for (const segment of segments) {\r\n if (!avoidDuplicatedSlash || !path.endsWith('/'))\r\n path += '/';\r\n avoidDuplicatedSlash = false;\r\n for (const token of segment) {\r\n if (token.type === 0 /* TokenType.Static */) {\r\n path += token.value;\r\n }\r\n else if (token.type === 1 /* TokenType.Param */) {\r\n const { value, repeatable, optional } = token;\r\n const param = value in params ? params[value] : '';\r\n if (isArray(param) && !repeatable) {\r\n throw new Error(`Provided param \"${value}\" is an array but it is not repeatable (* or + modifiers)`);\r\n }\r\n const text = isArray(param)\r\n ? param.join('/')\r\n : param;\r\n if (!text) {\r\n if (optional) {\r\n // if we have more than one optional param like /:a?-static we don't need to care about the optional param\r\n if (segment.length < 2) {\r\n // remove the last slash as we could be at the end\r\n if (path.endsWith('/'))\r\n path = path.slice(0, -1);\r\n // do not append a slash on the next iteration\r\n else\r\n avoidDuplicatedSlash = true;\r\n }\r\n }\r\n else\r\n throw new Error(`Missing required param \"${value}\"`);\r\n }\r\n path += text;\r\n }\r\n }\r\n }\r\n // avoid empty path when we have multiple optional params\r\n return path || '/';\r\n }\r\n return {\r\n re,\r\n score,\r\n keys,\r\n parse,\r\n stringify,\r\n };\r\n}\r\n/**\r\n * Compares an array of numbers as used in PathParser.score and returns a\r\n * number. This function can be used to `sort` an array\r\n *\r\n * @param a - first array of numbers\r\n * @param b - second array of numbers\r\n * @returns 0 if both are equal, < 0 if a should be sorted first, > 0 if b\r\n * should be sorted first\r\n */\r\nfunction compareScoreArray(a, b) {\r\n let i = 0;\r\n while (i < a.length && i < b.length) {\r\n const diff = b[i] - a[i];\r\n // only keep going if diff === 0\r\n if (diff)\r\n return diff;\r\n i++;\r\n }\r\n // if the last subsegment was Static, the shorter segments should be sorted first\r\n // otherwise sort the longest segment first\r\n if (a.length < b.length) {\r\n return a.length === 1 && a[0] === 40 /* PathScore.Static */ + 40 /* PathScore.Segment */\r\n ? -1\r\n : 1;\r\n }\r\n else if (a.length > b.length) {\r\n return b.length === 1 && b[0] === 40 /* PathScore.Static */ + 40 /* PathScore.Segment */\r\n ? 1\r\n : -1;\r\n }\r\n return 0;\r\n}\r\n/**\r\n * Compare function that can be used with `sort` to sort an array of PathParser\r\n *\r\n * @param a - first PathParser\r\n * @param b - second PathParser\r\n * @returns 0 if both are equal, < 0 if a should be sorted first, > 0 if b\r\n */\r\nfunction comparePathParserScore(a, b) {\r\n let i = 0;\r\n const aScore = a.score;\r\n const bScore = b.score;\r\n while (i < aScore.length && i < bScore.length) {\r\n const comp = compareScoreArray(aScore[i], bScore[i]);\r\n // do not return if both are equal\r\n if (comp)\r\n return comp;\r\n i++;\r\n }\r\n if (Math.abs(bScore.length - aScore.length) === 1) {\r\n if (isLastScoreNegative(aScore))\r\n return 1;\r\n if (isLastScoreNegative(bScore))\r\n return -1;\r\n }\r\n // if a and b share the same score entries but b has more, sort b first\r\n return bScore.length - aScore.length;\r\n // this is the ternary version\r\n // return aScore.length < bScore.length\r\n // ? 1\r\n // : aScore.length > bScore.length\r\n // ? -1\r\n // : 0\r\n}\r\n/**\r\n * This allows detecting splats at the end of a path: /home/:id(.*)*\r\n *\r\n * @param score - score to check\r\n * @returns true if the last entry is negative\r\n */\r\nfunction isLastScoreNegative(score) {\r\n const last = score[score.length - 1];\r\n return score.length > 0 && last[last.length - 1] < 0;\r\n}\n\nconst ROOT_TOKEN = {\r\n type: 0 /* TokenType.Static */,\r\n value: '',\r\n};\r\nconst VALID_PARAM_RE = /[a-zA-Z0-9_]/;\r\n// After some profiling, the cache seems to be unnecessary because tokenizePath\r\n// (the slowest part of adding a route) is very fast\r\n// const tokenCache = new Map()\r\nfunction tokenizePath(path) {\r\n if (!path)\r\n return [[]];\r\n if (path === '/')\r\n return [[ROOT_TOKEN]];\r\n if (!path.startsWith('/')) {\r\n throw new Error((process.env.NODE_ENV !== 'production')\r\n ? `Route paths should start with a \"/\": \"${path}\" should be \"/${path}\".`\r\n : `Invalid path \"${path}\"`);\r\n }\r\n // if (tokenCache.has(path)) return tokenCache.get(path)!\r\n function crash(message) {\r\n throw new Error(`ERR (${state})/\"${buffer}\": ${message}`);\r\n }\r\n let state = 0 /* TokenizerState.Static */;\r\n let previousState = state;\r\n const tokens = [];\r\n // the segment will always be valid because we get into the initial state\r\n // with the leading /\r\n let segment;\r\n function finalizeSegment() {\r\n if (segment)\r\n tokens.push(segment);\r\n segment = [];\r\n }\r\n // index on the path\r\n let i = 0;\r\n // char at index\r\n let char;\r\n // buffer of the value read\r\n let buffer = '';\r\n // custom regexp for a param\r\n let customRe = '';\r\n function consumeBuffer() {\r\n if (!buffer)\r\n return;\r\n if (state === 0 /* TokenizerState.Static */) {\r\n segment.push({\r\n type: 0 /* TokenType.Static */,\r\n value: buffer,\r\n });\r\n }\r\n else if (state === 1 /* TokenizerState.Param */ ||\r\n state === 2 /* TokenizerState.ParamRegExp */ ||\r\n state === 3 /* TokenizerState.ParamRegExpEnd */) {\r\n if (segment.length > 1 && (char === '*' || char === '+'))\r\n crash(`A repeatable param (${buffer}) must be alone in its segment. eg: '/:ids+.`);\r\n segment.push({\r\n type: 1 /* TokenType.Param */,\r\n value: buffer,\r\n regexp: customRe,\r\n repeatable: char === '*' || char === '+',\r\n optional: char === '*' || char === '?',\r\n });\r\n }\r\n else {\r\n crash('Invalid state to consume buffer');\r\n }\r\n buffer = '';\r\n }\r\n function addCharToBuffer() {\r\n buffer += char;\r\n }\r\n while (i < path.length) {\r\n char = path[i++];\r\n if (char === '\\\\' && state !== 2 /* TokenizerState.ParamRegExp */) {\r\n previousState = state;\r\n state = 4 /* TokenizerState.EscapeNext */;\r\n continue;\r\n }\r\n switch (state) {\r\n case 0 /* TokenizerState.Static */:\r\n if (char === '/') {\r\n if (buffer) {\r\n consumeBuffer();\r\n }\r\n finalizeSegment();\r\n }\r\n else if (char === ':') {\r\n consumeBuffer();\r\n state = 1 /* TokenizerState.Param */;\r\n }\r\n else {\r\n addCharToBuffer();\r\n }\r\n break;\r\n case 4 /* TokenizerState.EscapeNext */:\r\n addCharToBuffer();\r\n state = previousState;\r\n break;\r\n case 1 /* TokenizerState.Param */:\r\n if (char === '(') {\r\n state = 2 /* TokenizerState.ParamRegExp */;\r\n }\r\n else if (VALID_PARAM_RE.test(char)) {\r\n addCharToBuffer();\r\n }\r\n else {\r\n consumeBuffer();\r\n state = 0 /* TokenizerState.Static */;\r\n // go back one character if we were not modifying\r\n if (char !== '*' && char !== '?' && char !== '+')\r\n i--;\r\n }\r\n break;\r\n case 2 /* TokenizerState.ParamRegExp */:\r\n // TODO: is it worth handling nested regexp? like :p(?:prefix_([^/]+)_suffix)\r\n // it already works by escaping the closing )\r\n // https://paths.esm.dev/?p=AAMeJbiAwQEcDKbAoAAkP60PG2R6QAvgNaA6AFACM2ABuQBB#\r\n // is this really something people need since you can also write\r\n // /prefix_:p()_suffix\r\n if (char === ')') {\r\n // handle the escaped )\r\n if (customRe[customRe.length - 1] == '\\\\')\r\n customRe = customRe.slice(0, -1) + char;\r\n else\r\n state = 3 /* TokenizerState.ParamRegExpEnd */;\r\n }\r\n else {\r\n customRe += char;\r\n }\r\n break;\r\n case 3 /* TokenizerState.ParamRegExpEnd */:\r\n // same as finalizing a param\r\n consumeBuffer();\r\n state = 0 /* TokenizerState.Static */;\r\n // go back one character if we were not modifying\r\n if (char !== '*' && char !== '?' && char !== '+')\r\n i--;\r\n customRe = '';\r\n break;\r\n default:\r\n crash('Unknown state');\r\n break;\r\n }\r\n }\r\n if (state === 2 /* TokenizerState.ParamRegExp */)\r\n crash(`Unfinished custom RegExp for param \"${buffer}\"`);\r\n consumeBuffer();\r\n finalizeSegment();\r\n // tokenCache.set(path, tokens)\r\n return tokens;\r\n}\n\nfunction createRouteRecordMatcher(record, parent, options) {\r\n const parser = tokensToParser(tokenizePath(record.path), options);\r\n // warn against params with the same name\r\n if ((process.env.NODE_ENV !== 'production')) {\r\n const existingKeys = new Set();\r\n for (const key of parser.keys) {\r\n if (existingKeys.has(key.name))\r\n warn(`Found duplicated params with name \"${key.name}\" for path \"${record.path}\". Only the last one will be available on \"$route.params\".`);\r\n existingKeys.add(key.name);\r\n }\r\n }\r\n const matcher = assign(parser, {\r\n record,\r\n parent,\r\n // these needs to be populated by the parent\r\n children: [],\r\n alias: [],\r\n });\r\n if (parent) {\r\n // both are aliases or both are not aliases\r\n // we don't want to mix them because the order is used when\r\n // passing originalRecord in Matcher.addRoute\r\n if (!matcher.record.aliasOf === !parent.record.aliasOf)\r\n parent.children.push(matcher);\r\n }\r\n return matcher;\r\n}\n\n/**\r\n * Creates a Router Matcher.\r\n *\r\n * @internal\r\n * @param routes - array of initial routes\r\n * @param globalOptions - global route options\r\n */\r\nfunction createRouterMatcher(routes, globalOptions) {\r\n // normalized ordered array of matchers\r\n const matchers = [];\r\n const matcherMap = new Map();\r\n globalOptions = mergeOptions({ strict: false, end: true, sensitive: false }, globalOptions);\r\n function getRecordMatcher(name) {\r\n return matcherMap.get(name);\r\n }\r\n function addRoute(record, parent, originalRecord) {\r\n // used later on to remove by name\r\n const isRootAdd = !originalRecord;\r\n const mainNormalizedRecord = normalizeRouteRecord(record);\r\n if ((process.env.NODE_ENV !== 'production')) {\r\n checkChildMissingNameWithEmptyPath(mainNormalizedRecord, parent);\r\n }\r\n // we might be the child of an alias\r\n mainNormalizedRecord.aliasOf = originalRecord && originalRecord.record;\r\n const options = mergeOptions(globalOptions, record);\r\n // generate an array of records to correctly handle aliases\r\n const normalizedRecords = [\r\n mainNormalizedRecord,\r\n ];\r\n if ('alias' in record) {\r\n const aliases = typeof record.alias === 'string' ? [record.alias] : record.alias;\r\n for (const alias of aliases) {\r\n normalizedRecords.push(assign({}, mainNormalizedRecord, {\r\n // this allows us to hold a copy of the `components` option\r\n // so that async components cache is hold on the original record\r\n components: originalRecord\r\n ? originalRecord.record.components\r\n : mainNormalizedRecord.components,\r\n path: alias,\r\n // we might be the child of an alias\r\n aliasOf: originalRecord\r\n ? originalRecord.record\r\n : mainNormalizedRecord,\r\n // the aliases are always of the same kind as the original since they\r\n // are defined on the same record\r\n }));\r\n }\r\n }\r\n let matcher;\r\n let originalMatcher;\r\n for (const normalizedRecord of normalizedRecords) {\r\n const { path } = normalizedRecord;\r\n // Build up the path for nested routes if the child isn't an absolute\r\n // route. Only add the / delimiter if the child path isn't empty and if the\r\n // parent path doesn't have a trailing slash\r\n if (parent && path[0] !== '/') {\r\n const parentPath = parent.record.path;\r\n const connectingSlash = parentPath[parentPath.length - 1] === '/' ? '' : '/';\r\n normalizedRecord.path =\r\n parent.record.path + (path && connectingSlash + path);\r\n }\r\n if ((process.env.NODE_ENV !== 'production') && normalizedRecord.path === '*') {\r\n throw new Error('Catch all routes (\"*\") must now be defined using a param with a custom regexp.\\n' +\r\n 'See more at https://next.router.vuejs.org/guide/migration/#removed-star-or-catch-all-routes.');\r\n }\r\n // create the object beforehand, so it can be passed to children\r\n matcher = createRouteRecordMatcher(normalizedRecord, parent, options);\r\n if ((process.env.NODE_ENV !== 'production') && parent && path[0] === '/')\r\n checkMissingParamsInAbsolutePath(matcher, parent);\r\n // if we are an alias we must tell the original record that we exist,\r\n // so we can be removed\r\n if (originalRecord) {\r\n originalRecord.alias.push(matcher);\r\n if ((process.env.NODE_ENV !== 'production')) {\r\n checkSameParams(originalRecord, matcher);\r\n }\r\n }\r\n else {\r\n // otherwise, the first record is the original and others are aliases\r\n originalMatcher = originalMatcher || matcher;\r\n if (originalMatcher !== matcher)\r\n originalMatcher.alias.push(matcher);\r\n // remove the route if named and only for the top record (avoid in nested calls)\r\n // this works because the original record is the first one\r\n if (isRootAdd && record.name && !isAliasRecord(matcher))\r\n removeRoute(record.name);\r\n }\r\n if (mainNormalizedRecord.children) {\r\n const children = mainNormalizedRecord.children;\r\n for (let i = 0; i < children.length; i++) {\r\n addRoute(children[i], matcher, originalRecord && originalRecord.children[i]);\r\n }\r\n }\r\n // if there was no original record, then the first one was not an alias and all\r\n // other aliases (if any) need to reference this record when adding children\r\n originalRecord = originalRecord || matcher;\r\n // TODO: add normalized records for more flexibility\r\n // if (parent && isAliasRecord(originalRecord)) {\r\n // parent.children.push(originalRecord)\r\n // }\r\n // Avoid adding a record that doesn't display anything. This allows passing through records without a component to\r\n // not be reached and pass through the catch all route\r\n if ((matcher.record.components &&\r\n Object.keys(matcher.record.components).length) ||\r\n matcher.record.name ||\r\n matcher.record.redirect) {\r\n insertMatcher(matcher);\r\n }\r\n }\r\n return originalMatcher\r\n ? () => {\r\n // since other matchers are aliases, they should be removed by the original matcher\r\n removeRoute(originalMatcher);\r\n }\r\n : noop;\r\n }\r\n function removeRoute(matcherRef) {\r\n if (isRouteName(matcherRef)) {\r\n const matcher = matcherMap.get(matcherRef);\r\n if (matcher) {\r\n matcherMap.delete(matcherRef);\r\n matchers.splice(matchers.indexOf(matcher), 1);\r\n matcher.children.forEach(removeRoute);\r\n matcher.alias.forEach(removeRoute);\r\n }\r\n }\r\n else {\r\n const index = matchers.indexOf(matcherRef);\r\n if (index > -1) {\r\n matchers.splice(index, 1);\r\n if (matcherRef.record.name)\r\n matcherMap.delete(matcherRef.record.name);\r\n matcherRef.children.forEach(removeRoute);\r\n matcherRef.alias.forEach(removeRoute);\r\n }\r\n }\r\n }\r\n function getRoutes() {\r\n return matchers;\r\n }\r\n function insertMatcher(matcher) {\r\n let i = 0;\r\n while (i < matchers.length &&\r\n comparePathParserScore(matcher, matchers[i]) >= 0 &&\r\n // Adding children with empty path should still appear before the parent\r\n // https://github.com/vuejs/router/issues/1124\r\n (matcher.record.path !== matchers[i].record.path ||\r\n !isRecordChildOf(matcher, matchers[i])))\r\n i++;\r\n matchers.splice(i, 0, matcher);\r\n // only add the original record to the name map\r\n if (matcher.record.name && !isAliasRecord(matcher))\r\n matcherMap.set(matcher.record.name, matcher);\r\n }\r\n function resolve(location, currentLocation) {\r\n let matcher;\r\n let params = {};\r\n let path;\r\n let name;\r\n if ('name' in location && location.name) {\r\n matcher = matcherMap.get(location.name);\r\n if (!matcher)\r\n throw createRouterError(1 /* ErrorTypes.MATCHER_NOT_FOUND */, {\r\n location,\r\n });\r\n // warn if the user is passing invalid params so they can debug it better when they get removed\r\n if ((process.env.NODE_ENV !== 'production')) {\r\n const invalidParams = Object.keys(location.params || {}).filter(paramName => !matcher.keys.find(k => k.name === paramName));\r\n if (invalidParams.length) {\r\n warn(`Discarded invalid param(s) \"${invalidParams.join('\", \"')}\" when navigating. See https://github.com/vuejs/router/blob/main/packages/router/CHANGELOG.md#414-2022-08-22 for more details.`);\r\n }\r\n }\r\n name = matcher.record.name;\r\n params = assign(\r\n // paramsFromLocation is a new object\r\n paramsFromLocation(currentLocation.params, \r\n // only keep params that exist in the resolved location\r\n // TODO: only keep optional params coming from a parent record\r\n matcher.keys.filter(k => !k.optional).map(k => k.name)), \r\n // discard any existing params in the current location that do not exist here\r\n // #1497 this ensures better active/exact matching\r\n location.params &&\r\n paramsFromLocation(location.params, matcher.keys.map(k => k.name)));\r\n // throws if cannot be stringified\r\n path = matcher.stringify(params);\r\n }\r\n else if ('path' in location) {\r\n // no need to resolve the path with the matcher as it was provided\r\n // this also allows the user to control the encoding\r\n path = location.path;\r\n if ((process.env.NODE_ENV !== 'production') && !path.startsWith('/')) {\r\n warn(`The Matcher cannot resolve relative paths but received \"${path}\". Unless you directly called \\`matcher.resolve(\"${path}\")\\`, this is probably a bug in vue-router. Please open an issue at https://new-issue.vuejs.org/?repo=vuejs/router.`);\r\n }\r\n matcher = matchers.find(m => m.re.test(path));\r\n // matcher should have a value after the loop\r\n if (matcher) {\r\n // we know the matcher works because we tested the regexp\r\n params = matcher.parse(path);\r\n name = matcher.record.name;\r\n }\r\n // location is a relative path\r\n }\r\n else {\r\n // match by name or path of current route\r\n matcher = currentLocation.name\r\n ? matcherMap.get(currentLocation.name)\r\n : matchers.find(m => m.re.test(currentLocation.path));\r\n if (!matcher)\r\n throw createRouterError(1 /* ErrorTypes.MATCHER_NOT_FOUND */, {\r\n location,\r\n currentLocation,\r\n });\r\n name = matcher.record.name;\r\n // since we are navigating to the same location, we don't need to pick the\r\n // params like when `name` is provided\r\n params = assign({}, currentLocation.params, location.params);\r\n path = matcher.stringify(params);\r\n }\r\n const matched = [];\r\n let parentMatcher = matcher;\r\n while (parentMatcher) {\r\n // reversed order so parents are at the beginning\r\n matched.unshift(parentMatcher.record);\r\n parentMatcher = parentMatcher.parent;\r\n }\r\n return {\r\n name,\r\n path,\r\n params,\r\n matched,\r\n meta: mergeMetaFields(matched),\r\n };\r\n }\r\n // add initial routes\r\n routes.forEach(route => addRoute(route));\r\n return { addRoute, resolve, removeRoute, getRoutes, getRecordMatcher };\r\n}\r\nfunction paramsFromLocation(params, keys) {\r\n const newParams = {};\r\n for (const key of keys) {\r\n if (key in params)\r\n newParams[key] = params[key];\r\n }\r\n return newParams;\r\n}\r\n/**\r\n * Normalizes a RouteRecordRaw. Creates a copy\r\n *\r\n * @param record\r\n * @returns the normalized version\r\n */\r\nfunction normalizeRouteRecord(record) {\r\n return {\r\n path: record.path,\r\n redirect: record.redirect,\r\n name: record.name,\r\n meta: record.meta || {},\r\n aliasOf: undefined,\r\n beforeEnter: record.beforeEnter,\r\n props: normalizeRecordProps(record),\r\n children: record.children || [],\r\n instances: {},\r\n leaveGuards: new Set(),\r\n updateGuards: new Set(),\r\n enterCallbacks: {},\r\n components: 'components' in record\r\n ? record.components || null\r\n : record.component && { default: record.component },\r\n };\r\n}\r\n/**\r\n * Normalize the optional `props` in a record to always be an object similar to\r\n * components. Also accept a boolean for components.\r\n * @param record\r\n */\r\nfunction normalizeRecordProps(record) {\r\n const propsObject = {};\r\n // props does not exist on redirect records, but we can set false directly\r\n const props = record.props || false;\r\n if ('component' in record) {\r\n propsObject.default = props;\r\n }\r\n else {\r\n // NOTE: we could also allow a function to be applied to every component.\r\n // Would need user feedback for use cases\r\n for (const name in record.components)\r\n propsObject[name] = typeof props === 'boolean' ? props : props[name];\r\n }\r\n return propsObject;\r\n}\r\n/**\r\n * Checks if a record or any of its parent is an alias\r\n * @param record\r\n */\r\nfunction isAliasRecord(record) {\r\n while (record) {\r\n if (record.record.aliasOf)\r\n return true;\r\n record = record.parent;\r\n }\r\n return false;\r\n}\r\n/**\r\n * Merge meta fields of an array of records\r\n *\r\n * @param matched - array of matched records\r\n */\r\nfunction mergeMetaFields(matched) {\r\n return matched.reduce((meta, record) => assign(meta, record.meta), {});\r\n}\r\nfunction mergeOptions(defaults, partialOptions) {\r\n const options = {};\r\n for (const key in defaults) {\r\n options[key] = key in partialOptions ? partialOptions[key] : defaults[key];\r\n }\r\n return options;\r\n}\r\nfunction isSameParam(a, b) {\r\n return (a.name === b.name &&\r\n a.optional === b.optional &&\r\n a.repeatable === b.repeatable);\r\n}\r\n/**\r\n * Check if a path and its alias have the same required params\r\n *\r\n * @param a - original record\r\n * @param b - alias record\r\n */\r\nfunction checkSameParams(a, b) {\r\n for (const key of a.keys) {\r\n if (!key.optional && !b.keys.find(isSameParam.bind(null, key)))\r\n return warn(`Alias \"${b.record.path}\" and the original record: \"${a.record.path}\" must have the exact same param named \"${key.name}\"`);\r\n }\r\n for (const key of b.keys) {\r\n if (!key.optional && !a.keys.find(isSameParam.bind(null, key)))\r\n return warn(`Alias \"${b.record.path}\" and the original record: \"${a.record.path}\" must have the exact same param named \"${key.name}\"`);\r\n }\r\n}\r\n/**\r\n * A route with a name and a child with an empty path without a name should warn when adding the route\r\n *\r\n * @param mainNormalizedRecord - RouteRecordNormalized\r\n * @param parent - RouteRecordMatcher\r\n */\r\nfunction checkChildMissingNameWithEmptyPath(mainNormalizedRecord, parent) {\r\n if (parent &&\r\n parent.record.name &&\r\n !mainNormalizedRecord.name &&\r\n !mainNormalizedRecord.path) {\r\n warn(`The route named \"${String(parent.record.name)}\" has a child without a name and an empty path. Using that name won't render the empty path child so you probably want to move the name to the child instead. If this is intentional, add a name to the child route to remove the warning.`);\r\n }\r\n}\r\nfunction checkMissingParamsInAbsolutePath(record, parent) {\r\n for (const key of parent.keys) {\r\n if (!record.keys.find(isSameParam.bind(null, key)))\r\n return warn(`Absolute path \"${record.record.path}\" must have the exact same param named \"${key.name}\" as its parent \"${parent.record.path}\".`);\r\n }\r\n}\r\nfunction isRecordChildOf(record, parent) {\r\n return parent.children.some(child => child === record || isRecordChildOf(record, child));\r\n}\n\n/**\r\n * Encoding Rules ␣ = Space Path: ␣ \" < > # ? { } Query: ␣ \" < > # & = Hash: ␣ \"\r\n * < > `\r\n *\r\n * On top of that, the RFC3986 (https://tools.ietf.org/html/rfc3986#section-2.2)\r\n * defines some extra characters to be encoded. Most browsers do not encode them\r\n * in encodeURI https://github.com/whatwg/url/issues/369, so it may be safer to\r\n * also encode `!'()*`. Leaving un-encoded only ASCII alphanumeric(`a-zA-Z0-9`)\r\n * plus `-._~`. This extra safety should be applied to query by patching the\r\n * string returned by encodeURIComponent encodeURI also encodes `[\\]^`. `\\`\r\n * should be encoded to avoid ambiguity. Browsers (IE, FF, C) transform a `\\`\r\n * into a `/` if directly typed in. The _backtick_ (`````) should also be\r\n * encoded everywhere because some browsers like FF encode it when directly\r\n * written while others don't. Safari and IE don't encode ``\"<>{}``` in hash.\r\n */\r\n// const EXTRA_RESERVED_RE = /[!'()*]/g\r\n// const encodeReservedReplacer = (c: string) => '%' + c.charCodeAt(0).toString(16)\r\nconst HASH_RE = /#/g; // %23\r\nconst AMPERSAND_RE = /&/g; // %26\r\nconst SLASH_RE = /\\//g; // %2F\r\nconst EQUAL_RE = /=/g; // %3D\r\nconst IM_RE = /\\?/g; // %3F\r\nconst PLUS_RE = /\\+/g; // %2B\r\n/**\r\n * NOTE: It's not clear to me if we should encode the + symbol in queries, it\r\n * seems to be less flexible than not doing so and I can't find out the legacy\r\n * systems requiring this for regular requests like text/html. In the standard,\r\n * the encoding of the plus character is only mentioned for\r\n * application/x-www-form-urlencoded\r\n * (https://url.spec.whatwg.org/#urlencoded-parsing) and most browsers seems lo\r\n * leave the plus character as is in queries. To be more flexible, we allow the\r\n * plus character on the query, but it can also be manually encoded by the user.\r\n *\r\n * Resources:\r\n * - https://url.spec.whatwg.org/#urlencoded-parsing\r\n * - https://stackoverflow.com/questions/1634271/url-encoding-the-space-character-or-20\r\n */\r\nconst ENC_BRACKET_OPEN_RE = /%5B/g; // [\r\nconst ENC_BRACKET_CLOSE_RE = /%5D/g; // ]\r\nconst ENC_CARET_RE = /%5E/g; // ^\r\nconst ENC_BACKTICK_RE = /%60/g; // `\r\nconst ENC_CURLY_OPEN_RE = /%7B/g; // {\r\nconst ENC_PIPE_RE = /%7C/g; // |\r\nconst ENC_CURLY_CLOSE_RE = /%7D/g; // }\r\nconst ENC_SPACE_RE = /%20/g; // }\r\n/**\r\n * Encode characters that need to be encoded on the path, search and hash\r\n * sections of the URL.\r\n *\r\n * @internal\r\n * @param text - string to encode\r\n * @returns encoded string\r\n */\r\nfunction commonEncode(text) {\r\n return encodeURI('' + text)\r\n .replace(ENC_PIPE_RE, '|')\r\n .replace(ENC_BRACKET_OPEN_RE, '[')\r\n .replace(ENC_BRACKET_CLOSE_RE, ']');\r\n}\r\n/**\r\n * Encode characters that need to be encoded on the hash section of the URL.\r\n *\r\n * @param text - string to encode\r\n * @returns encoded string\r\n */\r\nfunction encodeHash(text) {\r\n return commonEncode(text)\r\n .replace(ENC_CURLY_OPEN_RE, '{')\r\n .replace(ENC_CURLY_CLOSE_RE, '}')\r\n .replace(ENC_CARET_RE, '^');\r\n}\r\n/**\r\n * Encode characters that need to be encoded query values on the query\r\n * section of the URL.\r\n *\r\n * @param text - string to encode\r\n * @returns encoded string\r\n */\r\nfunction encodeQueryValue(text) {\r\n return (commonEncode(text)\r\n // Encode the space as +, encode the + to differentiate it from the space\r\n .replace(PLUS_RE, '%2B')\r\n .replace(ENC_SPACE_RE, '+')\r\n .replace(HASH_RE, '%23')\r\n .replace(AMPERSAND_RE, '%26')\r\n .replace(ENC_BACKTICK_RE, '`')\r\n .replace(ENC_CURLY_OPEN_RE, '{')\r\n .replace(ENC_CURLY_CLOSE_RE, '}')\r\n .replace(ENC_CARET_RE, '^'));\r\n}\r\n/**\r\n * Like `encodeQueryValue` but also encodes the `=` character.\r\n *\r\n * @param text - string to encode\r\n */\r\nfunction encodeQueryKey(text) {\r\n return encodeQueryValue(text).replace(EQUAL_RE, '%3D');\r\n}\r\n/**\r\n * Encode characters that need to be encoded on the path section of the URL.\r\n *\r\n * @param text - string to encode\r\n * @returns encoded string\r\n */\r\nfunction encodePath(text) {\r\n return commonEncode(text).replace(HASH_RE, '%23').replace(IM_RE, '%3F');\r\n}\r\n/**\r\n * Encode characters that need to be encoded on the path section of the URL as a\r\n * param. This function encodes everything {@link encodePath} does plus the\r\n * slash (`/`) character. If `text` is `null` or `undefined`, returns an empty\r\n * string instead.\r\n *\r\n * @param text - string to encode\r\n * @returns encoded string\r\n */\r\nfunction encodeParam(text) {\r\n return text == null ? '' : encodePath(text).replace(SLASH_RE, '%2F');\r\n}\r\n/**\r\n * Decode text using `decodeURIComponent`. Returns the original text if it\r\n * fails.\r\n *\r\n * @param text - string to decode\r\n * @returns decoded string\r\n */\r\nfunction decode(text) {\r\n try {\r\n return decodeURIComponent('' + text);\r\n }\r\n catch (err) {\r\n (process.env.NODE_ENV !== 'production') && warn(`Error decoding \"${text}\". Using original value`);\r\n }\r\n return '' + text;\r\n}\n\n/**\r\n * Transforms a queryString into a {@link LocationQuery} object. Accept both, a\r\n * version with the leading `?` and without Should work as URLSearchParams\r\n\n * @internal\r\n *\r\n * @param search - search string to parse\r\n * @returns a query object\r\n */\r\nfunction parseQuery(search) {\r\n const query = {};\r\n // avoid creating an object with an empty key and empty value\r\n // because of split('&')\r\n if (search === '' || search === '?')\r\n return query;\r\n const hasLeadingIM = search[0] === '?';\r\n const searchParams = (hasLeadingIM ? search.slice(1) : search).split('&');\r\n for (let i = 0; i < searchParams.length; ++i) {\r\n // pre decode the + into space\r\n const searchParam = searchParams[i].replace(PLUS_RE, ' ');\r\n // allow the = character\r\n const eqPos = searchParam.indexOf('=');\r\n const key = decode(eqPos < 0 ? searchParam : searchParam.slice(0, eqPos));\r\n const value = eqPos < 0 ? null : decode(searchParam.slice(eqPos + 1));\r\n if (key in query) {\r\n // an extra variable for ts types\r\n let currentValue = query[key];\r\n if (!isArray(currentValue)) {\r\n currentValue = query[key] = [currentValue];\r\n }\r\n currentValue.push(value);\r\n }\r\n else {\r\n query[key] = value;\r\n }\r\n }\r\n return query;\r\n}\r\n/**\r\n * Stringifies a {@link LocationQueryRaw} object. Like `URLSearchParams`, it\r\n * doesn't prepend a `?`\r\n *\r\n * @internal\r\n *\r\n * @param query - query object to stringify\r\n * @returns string version of the query without the leading `?`\r\n */\r\nfunction stringifyQuery(query) {\r\n let search = '';\r\n for (let key in query) {\r\n const value = query[key];\r\n key = encodeQueryKey(key);\r\n if (value == null) {\r\n // only null adds the value\r\n if (value !== undefined) {\r\n search += (search.length ? '&' : '') + key;\r\n }\r\n continue;\r\n }\r\n // keep null values\r\n const values = isArray(value)\r\n ? value.map(v => v && encodeQueryValue(v))\r\n : [value && encodeQueryValue(value)];\r\n values.forEach(value => {\r\n // skip undefined values in arrays as if they were not present\r\n // smaller code than using filter\r\n if (value !== undefined) {\r\n // only append & with non-empty search\r\n search += (search.length ? '&' : '') + key;\r\n if (value != null)\r\n search += '=' + value;\r\n }\r\n });\r\n }\r\n return search;\r\n}\r\n/**\r\n * Transforms a {@link LocationQueryRaw} into a {@link LocationQuery} by casting\r\n * numbers into strings, removing keys with an undefined value and replacing\r\n * undefined with null in arrays\r\n *\r\n * @param query - query object to normalize\r\n * @returns a normalized query object\r\n */\r\nfunction normalizeQuery(query) {\r\n const normalizedQuery = {};\r\n for (const key in query) {\r\n const value = query[key];\r\n if (value !== undefined) {\r\n normalizedQuery[key] = isArray(value)\r\n ? value.map(v => (v == null ? null : '' + v))\r\n : value == null\r\n ? value\r\n : '' + value;\r\n }\r\n }\r\n return normalizedQuery;\r\n}\n\n/**\r\n * RouteRecord being rendered by the closest ancestor Router View. Used for\r\n * `onBeforeRouteUpdate` and `onBeforeRouteLeave`. rvlm stands for Router View\r\n * Location Matched\r\n *\r\n * @internal\r\n */\r\nconst matchedRouteKey = Symbol((process.env.NODE_ENV !== 'production') ? 'router view location matched' : '');\r\n/**\r\n * Allows overriding the router view depth to control which component in\r\n * `matched` is rendered. rvd stands for Router View Depth\r\n *\r\n * @internal\r\n */\r\nconst viewDepthKey = Symbol((process.env.NODE_ENV !== 'production') ? 'router view depth' : '');\r\n/**\r\n * Allows overriding the router instance returned by `useRouter` in tests. r\r\n * stands for router\r\n *\r\n * @internal\r\n */\r\nconst routerKey = Symbol((process.env.NODE_ENV !== 'production') ? 'router' : '');\r\n/**\r\n * Allows overriding the current route returned by `useRoute` in tests. rl\r\n * stands for route location\r\n *\r\n * @internal\r\n */\r\nconst routeLocationKey = Symbol((process.env.NODE_ENV !== 'production') ? 'route location' : '');\r\n/**\r\n * Allows overriding the current route used by router-view. Internally this is\r\n * used when the `route` prop is passed.\r\n *\r\n * @internal\r\n */\r\nconst routerViewLocationKey = Symbol((process.env.NODE_ENV !== 'production') ? 'router view location' : '');\n\n/**\r\n * Create a list of callbacks that can be reset. Used to create before and after navigation guards list\r\n */\r\nfunction useCallbacks() {\r\n let handlers = [];\r\n function add(handler) {\r\n handlers.push(handler);\r\n return () => {\r\n const i = handlers.indexOf(handler);\r\n if (i > -1)\r\n handlers.splice(i, 1);\r\n };\r\n }\r\n function reset() {\r\n handlers = [];\r\n }\r\n return {\r\n add,\r\n list: () => handlers,\r\n reset,\r\n };\r\n}\n\nfunction registerGuard(record, name, guard) {\r\n const removeFromList = () => {\r\n record[name].delete(guard);\r\n };\r\n onUnmounted(removeFromList);\r\n onDeactivated(removeFromList);\r\n onActivated(() => {\r\n record[name].add(guard);\r\n });\r\n record[name].add(guard);\r\n}\r\n/**\r\n * Add a navigation guard that triggers whenever the component for the current\r\n * location is about to be left. Similar to {@link beforeRouteLeave} but can be\r\n * used in any component. The guard is removed when the component is unmounted.\r\n *\r\n * @param leaveGuard - {@link NavigationGuard}\r\n */\r\nfunction onBeforeRouteLeave(leaveGuard) {\r\n if ((process.env.NODE_ENV !== 'production') && !getCurrentInstance()) {\r\n warn('getCurrentInstance() returned null. onBeforeRouteLeave() must be called at the top of a setup function');\r\n return;\r\n }\r\n const activeRecord = inject(matchedRouteKey, \r\n // to avoid warning\r\n {}).value;\r\n if (!activeRecord) {\r\n (process.env.NODE_ENV !== 'production') &&\r\n warn('No active route record was found when calling `onBeforeRouteLeave()`. Make sure you call this function inside a component child of . Maybe you called it inside of App.vue?');\r\n return;\r\n }\r\n registerGuard(activeRecord, 'leaveGuards', leaveGuard);\r\n}\r\n/**\r\n * Add a navigation guard that triggers whenever the current location is about\r\n * to be updated. Similar to {@link beforeRouteUpdate} but can be used in any\r\n * component. The guard is removed when the component is unmounted.\r\n *\r\n * @param updateGuard - {@link NavigationGuard}\r\n */\r\nfunction onBeforeRouteUpdate(updateGuard) {\r\n if ((process.env.NODE_ENV !== 'production') && !getCurrentInstance()) {\r\n warn('getCurrentInstance() returned null. onBeforeRouteUpdate() must be called at the top of a setup function');\r\n return;\r\n }\r\n const activeRecord = inject(matchedRouteKey, \r\n // to avoid warning\r\n {}).value;\r\n if (!activeRecord) {\r\n (process.env.NODE_ENV !== 'production') &&\r\n warn('No active route record was found when calling `onBeforeRouteUpdate()`. Make sure you call this function inside a component child of . Maybe you called it inside of App.vue?');\r\n return;\r\n }\r\n registerGuard(activeRecord, 'updateGuards', updateGuard);\r\n}\r\nfunction guardToPromiseFn(guard, to, from, record, name) {\r\n // keep a reference to the enterCallbackArray to prevent pushing callbacks if a new navigation took place\r\n const enterCallbackArray = record &&\r\n // name is defined if record is because of the function overload\r\n (record.enterCallbacks[name] = record.enterCallbacks[name] || []);\r\n return () => new Promise((resolve, reject) => {\r\n const next = (valid) => {\r\n if (valid === false) {\r\n reject(createRouterError(4 /* ErrorTypes.NAVIGATION_ABORTED */, {\r\n from,\r\n to,\r\n }));\r\n }\r\n else if (valid instanceof Error) {\r\n reject(valid);\r\n }\r\n else if (isRouteLocation(valid)) {\r\n reject(createRouterError(2 /* ErrorTypes.NAVIGATION_GUARD_REDIRECT */, {\r\n from: to,\r\n to: valid,\r\n }));\r\n }\r\n else {\r\n if (enterCallbackArray &&\r\n // since enterCallbackArray is truthy, both record and name also are\r\n record.enterCallbacks[name] === enterCallbackArray &&\r\n typeof valid === 'function') {\r\n enterCallbackArray.push(valid);\r\n }\r\n resolve();\r\n }\r\n };\r\n // wrapping with Promise.resolve allows it to work with both async and sync guards\r\n const guardReturn = guard.call(record && record.instances[name], to, from, (process.env.NODE_ENV !== 'production') ? canOnlyBeCalledOnce(next, to, from) : next);\r\n let guardCall = Promise.resolve(guardReturn);\r\n if (guard.length < 3)\r\n guardCall = guardCall.then(next);\r\n if ((process.env.NODE_ENV !== 'production') && guard.length > 2) {\r\n const message = `The \"next\" callback was never called inside of ${guard.name ? '\"' + guard.name + '\"' : ''}:\\n${guard.toString()}\\n. If you are returning a value instead of calling \"next\", make sure to remove the \"next\" parameter from your function.`;\r\n if (typeof guardReturn === 'object' && 'then' in guardReturn) {\r\n guardCall = guardCall.then(resolvedValue => {\r\n // @ts-expect-error: _called is added at canOnlyBeCalledOnce\r\n if (!next._called) {\r\n warn(message);\r\n return Promise.reject(new Error('Invalid navigation guard'));\r\n }\r\n return resolvedValue;\r\n });\r\n }\r\n else if (guardReturn !== undefined) {\r\n // @ts-expect-error: _called is added at canOnlyBeCalledOnce\r\n if (!next._called) {\r\n warn(message);\r\n reject(new Error('Invalid navigation guard'));\r\n return;\r\n }\r\n }\r\n }\r\n guardCall.catch(err => reject(err));\r\n });\r\n}\r\nfunction canOnlyBeCalledOnce(next, to, from) {\r\n let called = 0;\r\n return function () {\r\n if (called++ === 1)\r\n warn(`The \"next\" callback was called more than once in one navigation guard when going from \"${from.fullPath}\" to \"${to.fullPath}\". It should be called exactly one time in each navigation guard. This will fail in production.`);\r\n // @ts-expect-error: we put it in the original one because it's easier to check\r\n next._called = true;\r\n if (called === 1)\r\n next.apply(null, arguments);\r\n };\r\n}\r\nfunction extractComponentsGuards(matched, guardType, to, from) {\r\n const guards = [];\r\n for (const record of matched) {\r\n if ((process.env.NODE_ENV !== 'production') && !record.components && !record.children.length) {\r\n warn(`Record with path \"${record.path}\" is either missing a \"component(s)\"` +\r\n ` or \"children\" property.`);\r\n }\r\n for (const name in record.components) {\r\n let rawComponent = record.components[name];\r\n if ((process.env.NODE_ENV !== 'production')) {\r\n if (!rawComponent ||\r\n (typeof rawComponent !== 'object' &&\r\n typeof rawComponent !== 'function')) {\r\n warn(`Component \"${name}\" in record with path \"${record.path}\" is not` +\r\n ` a valid component. Received \"${String(rawComponent)}\".`);\r\n // throw to ensure we stop here but warn to ensure the message isn't\r\n // missed by the user\r\n throw new Error('Invalid route component');\r\n }\r\n else if ('then' in rawComponent) {\r\n // warn if user wrote import('/component.vue') instead of () =>\r\n // import('./component.vue')\r\n warn(`Component \"${name}\" in record with path \"${record.path}\" is a ` +\r\n `Promise instead of a function that returns a Promise. Did you ` +\r\n `write \"import('./MyPage.vue')\" instead of ` +\r\n `\"() => import('./MyPage.vue')\" ? This will break in ` +\r\n `production if not fixed.`);\r\n const promise = rawComponent;\r\n rawComponent = () => promise;\r\n }\r\n else if (rawComponent.__asyncLoader &&\r\n // warn only once per component\r\n !rawComponent.__warnedDefineAsync) {\r\n rawComponent.__warnedDefineAsync = true;\r\n warn(`Component \"${name}\" in record with path \"${record.path}\" is defined ` +\r\n `using \"defineAsyncComponent()\". ` +\r\n `Write \"() => import('./MyPage.vue')\" instead of ` +\r\n `\"defineAsyncComponent(() => import('./MyPage.vue'))\".`);\r\n }\r\n }\r\n // skip update and leave guards if the route component is not mounted\r\n if (guardType !== 'beforeRouteEnter' && !record.instances[name])\r\n continue;\r\n if (isRouteComponent(rawComponent)) {\r\n // __vccOpts is added by vue-class-component and contain the regular options\r\n const options = rawComponent.__vccOpts || rawComponent;\r\n const guard = options[guardType];\r\n guard && guards.push(guardToPromiseFn(guard, to, from, record, name));\r\n }\r\n else {\r\n // start requesting the chunk already\r\n let componentPromise = rawComponent();\r\n if ((process.env.NODE_ENV !== 'production') && !('catch' in componentPromise)) {\r\n warn(`Component \"${name}\" in record with path \"${record.path}\" is a function that does not return a Promise. If you were passing a functional component, make sure to add a \"displayName\" to the component. This will break in production if not fixed.`);\r\n componentPromise = Promise.resolve(componentPromise);\r\n }\r\n guards.push(() => componentPromise.then(resolved => {\r\n if (!resolved)\r\n return Promise.reject(new Error(`Couldn't resolve component \"${name}\" at \"${record.path}\"`));\r\n const resolvedComponent = isESModule(resolved)\r\n ? resolved.default\r\n : resolved;\r\n // replace the function with the resolved component\r\n // cannot be null or undefined because we went into the for loop\r\n record.components[name] = resolvedComponent;\r\n // __vccOpts is added by vue-class-component and contain the regular options\r\n const options = resolvedComponent.__vccOpts || resolvedComponent;\r\n const guard = options[guardType];\r\n return guard && guardToPromiseFn(guard, to, from, record, name)();\r\n }));\r\n }\r\n }\r\n }\r\n return guards;\r\n}\r\n/**\r\n * Allows differentiating lazy components from functional components and vue-class-component\r\n * @internal\r\n *\r\n * @param component\r\n */\r\nfunction isRouteComponent(component) {\r\n return (typeof component === 'object' ||\r\n 'displayName' in component ||\r\n 'props' in component ||\r\n '__vccOpts' in component);\r\n}\r\n/**\r\n * Ensures a route is loaded, so it can be passed as o prop to ``.\r\n *\r\n * @param route - resolved route to load\r\n */\r\nfunction loadRouteLocation(route) {\r\n return route.matched.every(record => record.redirect)\r\n ? Promise.reject(new Error('Cannot load a route that redirects.'))\r\n : Promise.all(route.matched.map(record => record.components &&\r\n Promise.all(Object.keys(record.components).reduce((promises, name) => {\r\n const rawComponent = record.components[name];\r\n if (typeof rawComponent === 'function' &&\r\n !('displayName' in rawComponent)) {\r\n promises.push(rawComponent().then(resolved => {\r\n if (!resolved)\r\n return Promise.reject(new Error(`Couldn't resolve component \"${name}\" at \"${record.path}\". Ensure you passed a function that returns a promise.`));\r\n const resolvedComponent = isESModule(resolved)\r\n ? resolved.default\r\n : resolved;\r\n // replace the function with the resolved component\r\n // cannot be null or undefined because we went into the for loop\r\n record.components[name] = resolvedComponent;\r\n return;\r\n }));\r\n }\r\n return promises;\r\n }, [])))).then(() => route);\r\n}\n\n// TODO: we could allow currentRoute as a prop to expose `isActive` and\r\n// `isExactActive` behavior should go through an RFC\r\nfunction useLink(props) {\r\n const router = inject(routerKey);\r\n const currentRoute = inject(routeLocationKey);\r\n const route = computed(() => router.resolve(unref(props.to)));\r\n const activeRecordIndex = computed(() => {\r\n const { matched } = route.value;\r\n const { length } = matched;\r\n const routeMatched = matched[length - 1];\r\n const currentMatched = currentRoute.matched;\r\n if (!routeMatched || !currentMatched.length)\r\n return -1;\r\n const index = currentMatched.findIndex(isSameRouteRecord.bind(null, routeMatched));\r\n if (index > -1)\r\n return index;\r\n // possible parent record\r\n const parentRecordPath = getOriginalPath(matched[length - 2]);\r\n return (\r\n // we are dealing with nested routes\r\n length > 1 &&\r\n // if the parent and matched route have the same path, this link is\r\n // referring to the empty child. Or we currently are on a different\r\n // child of the same parent\r\n getOriginalPath(routeMatched) === parentRecordPath &&\r\n // avoid comparing the child with its parent\r\n currentMatched[currentMatched.length - 1].path !== parentRecordPath\r\n ? currentMatched.findIndex(isSameRouteRecord.bind(null, matched[length - 2]))\r\n : index);\r\n });\r\n const isActive = computed(() => activeRecordIndex.value > -1 &&\r\n includesParams(currentRoute.params, route.value.params));\r\n const isExactActive = computed(() => activeRecordIndex.value > -1 &&\r\n activeRecordIndex.value === currentRoute.matched.length - 1 &&\r\n isSameRouteLocationParams(currentRoute.params, route.value.params));\r\n function navigate(e = {}) {\r\n if (guardEvent(e)) {\r\n return router[unref(props.replace) ? 'replace' : 'push'](unref(props.to)\r\n // avoid uncaught errors are they are logged anyway\r\n ).catch(noop);\r\n }\r\n return Promise.resolve();\r\n }\r\n // devtools only\r\n if (((process.env.NODE_ENV !== 'production') || __VUE_PROD_DEVTOOLS__) && isBrowser) {\r\n const instance = getCurrentInstance();\r\n if (instance) {\r\n const linkContextDevtools = {\r\n route: route.value,\r\n isActive: isActive.value,\r\n isExactActive: isExactActive.value,\r\n };\r\n // @ts-expect-error: this is internal\r\n instance.__vrl_devtools = instance.__vrl_devtools || [];\r\n // @ts-expect-error: this is internal\r\n instance.__vrl_devtools.push(linkContextDevtools);\r\n watchEffect(() => {\r\n linkContextDevtools.route = route.value;\r\n linkContextDevtools.isActive = isActive.value;\r\n linkContextDevtools.isExactActive = isExactActive.value;\r\n }, { flush: 'post' });\r\n }\r\n }\r\n /**\r\n * NOTE: update {@link _RouterLinkI}'s `$slots` type when updating this\r\n */\r\n return {\r\n route,\r\n href: computed(() => route.value.href),\r\n isActive,\r\n isExactActive,\r\n navigate,\r\n };\r\n}\r\nconst RouterLinkImpl = /*#__PURE__*/ defineComponent({\r\n name: 'RouterLink',\r\n compatConfig: { MODE: 3 },\r\n props: {\r\n to: {\r\n type: [String, Object],\r\n required: true,\r\n },\r\n replace: Boolean,\r\n activeClass: String,\r\n // inactiveClass: String,\r\n exactActiveClass: String,\r\n custom: Boolean,\r\n ariaCurrentValue: {\r\n type: String,\r\n default: 'page',\r\n },\r\n },\r\n useLink,\r\n setup(props, { slots }) {\r\n const link = reactive(useLink(props));\r\n const { options } = inject(routerKey);\r\n const elClass = computed(() => ({\r\n [getLinkClass(props.activeClass, options.linkActiveClass, 'router-link-active')]: link.isActive,\r\n // [getLinkClass(\r\n // props.inactiveClass,\r\n // options.linkInactiveClass,\r\n // 'router-link-inactive'\r\n // )]: !link.isExactActive,\r\n [getLinkClass(props.exactActiveClass, options.linkExactActiveClass, 'router-link-exact-active')]: link.isExactActive,\r\n }));\r\n return () => {\r\n const children = slots.default && slots.default(link);\r\n return props.custom\r\n ? children\r\n : h('a', {\r\n 'aria-current': link.isExactActive\r\n ? props.ariaCurrentValue\r\n : null,\r\n href: link.href,\r\n // this would override user added attrs but Vue will still add\r\n // the listener, so we end up triggering both\r\n onClick: link.navigate,\r\n class: elClass.value,\r\n }, children);\r\n };\r\n },\r\n});\r\n// export the public type for h/tsx inference\r\n// also to avoid inline import() in generated d.ts files\r\n/**\r\n * Component to render a link that triggers a navigation on click.\r\n */\r\nconst RouterLink = RouterLinkImpl;\r\nfunction guardEvent(e) {\r\n // don't redirect with control keys\r\n if (e.metaKey || e.altKey || e.ctrlKey || e.shiftKey)\r\n return;\r\n // don't redirect when preventDefault called\r\n if (e.defaultPrevented)\r\n return;\r\n // don't redirect on right click\r\n if (e.button !== undefined && e.button !== 0)\r\n return;\r\n // don't redirect if `target=\"_blank\"`\r\n // @ts-expect-error getAttribute does exist\r\n if (e.currentTarget && e.currentTarget.getAttribute) {\r\n // @ts-expect-error getAttribute exists\r\n const target = e.currentTarget.getAttribute('target');\r\n if (/\\b_blank\\b/i.test(target))\r\n return;\r\n }\r\n // this may be a Weex event which doesn't have this method\r\n if (e.preventDefault)\r\n e.preventDefault();\r\n return true;\r\n}\r\nfunction includesParams(outer, inner) {\r\n for (const key in inner) {\r\n const innerValue = inner[key];\r\n const outerValue = outer[key];\r\n if (typeof innerValue === 'string') {\r\n if (innerValue !== outerValue)\r\n return false;\r\n }\r\n else {\r\n if (!isArray(outerValue) ||\r\n outerValue.length !== innerValue.length ||\r\n innerValue.some((value, i) => value !== outerValue[i]))\r\n return false;\r\n }\r\n }\r\n return true;\r\n}\r\n/**\r\n * Get the original path value of a record by following its aliasOf\r\n * @param record\r\n */\r\nfunction getOriginalPath(record) {\r\n return record ? (record.aliasOf ? record.aliasOf.path : record.path) : '';\r\n}\r\n/**\r\n * Utility class to get the active class based on defaults.\r\n * @param propClass\r\n * @param globalClass\r\n * @param defaultClass\r\n */\r\nconst getLinkClass = (propClass, globalClass, defaultClass) => propClass != null\r\n ? propClass\r\n : globalClass != null\r\n ? globalClass\r\n : defaultClass;\n\nconst RouterViewImpl = /*#__PURE__*/ defineComponent({\r\n name: 'RouterView',\r\n // #674 we manually inherit them\r\n inheritAttrs: false,\r\n props: {\r\n name: {\r\n type: String,\r\n default: 'default',\r\n },\r\n route: Object,\r\n },\r\n // Better compat for @vue/compat users\r\n // https://github.com/vuejs/router/issues/1315\r\n compatConfig: { MODE: 3 },\r\n setup(props, { attrs, slots }) {\r\n (process.env.NODE_ENV !== 'production') && warnDeprecatedUsage();\r\n const injectedRoute = inject(routerViewLocationKey);\r\n const routeToDisplay = computed(() => props.route || injectedRoute.value);\r\n const injectedDepth = inject(viewDepthKey, 0);\r\n // The depth changes based on empty components option, which allows passthrough routes e.g. routes with children\r\n // that are used to reuse the `path` property\r\n const depth = computed(() => {\r\n let initialDepth = unref(injectedDepth);\r\n const { matched } = routeToDisplay.value;\r\n let matchedRoute;\r\n while ((matchedRoute = matched[initialDepth]) &&\r\n !matchedRoute.components) {\r\n initialDepth++;\r\n }\r\n return initialDepth;\r\n });\r\n const matchedRouteRef = computed(() => routeToDisplay.value.matched[depth.value]);\r\n provide(viewDepthKey, computed(() => depth.value + 1));\r\n provide(matchedRouteKey, matchedRouteRef);\r\n provide(routerViewLocationKey, routeToDisplay);\r\n const viewRef = ref();\r\n // watch at the same time the component instance, the route record we are\r\n // rendering, and the name\r\n watch(() => [viewRef.value, matchedRouteRef.value, props.name], ([instance, to, name], [oldInstance, from, oldName]) => {\r\n // copy reused instances\r\n if (to) {\r\n // this will update the instance for new instances as well as reused\r\n // instances when navigating to a new route\r\n to.instances[name] = instance;\r\n // the component instance is reused for a different route or name, so\r\n // we copy any saved update or leave guards. With async setup, the\r\n // mounting component will mount before the matchedRoute changes,\r\n // making instance === oldInstance, so we check if guards have been\r\n // added before. This works because we remove guards when\r\n // unmounting/deactivating components\r\n if (from && from !== to && instance && instance === oldInstance) {\r\n if (!to.leaveGuards.size) {\r\n to.leaveGuards = from.leaveGuards;\r\n }\r\n if (!to.updateGuards.size) {\r\n to.updateGuards = from.updateGuards;\r\n }\r\n }\r\n }\r\n // trigger beforeRouteEnter next callbacks\r\n if (instance &&\r\n to &&\r\n // if there is no instance but to and from are the same this might be\r\n // the first visit\r\n (!from || !isSameRouteRecord(to, from) || !oldInstance)) {\r\n (to.enterCallbacks[name] || []).forEach(callback => callback(instance));\r\n }\r\n }, { flush: 'post' });\r\n return () => {\r\n const route = routeToDisplay.value;\r\n // we need the value at the time we render because when we unmount, we\r\n // navigated to a different location so the value is different\r\n const currentName = props.name;\r\n const matchedRoute = matchedRouteRef.value;\r\n const ViewComponent = matchedRoute && matchedRoute.components[currentName];\r\n if (!ViewComponent) {\r\n return normalizeSlot(slots.default, { Component: ViewComponent, route });\r\n }\r\n // props from route configuration\r\n const routePropsOption = matchedRoute.props[currentName];\r\n const routeProps = routePropsOption\r\n ? routePropsOption === true\r\n ? route.params\r\n : typeof routePropsOption === 'function'\r\n ? routePropsOption(route)\r\n : routePropsOption\r\n : null;\r\n const onVnodeUnmounted = vnode => {\r\n // remove the instance reference to prevent leak\r\n if (vnode.component.isUnmounted) {\r\n matchedRoute.instances[currentName] = null;\r\n }\r\n };\r\n const component = h(ViewComponent, assign({}, routeProps, attrs, {\r\n onVnodeUnmounted,\r\n ref: viewRef,\r\n }));\r\n if (((process.env.NODE_ENV !== 'production') || __VUE_PROD_DEVTOOLS__) &&\r\n isBrowser &&\r\n component.ref) {\r\n // TODO: can display if it's an alias, its props\r\n const info = {\r\n depth: depth.value,\r\n name: matchedRoute.name,\r\n path: matchedRoute.path,\r\n meta: matchedRoute.meta,\r\n };\r\n const internalInstances = isArray(component.ref)\r\n ? component.ref.map(r => r.i)\r\n : [component.ref.i];\r\n internalInstances.forEach(instance => {\r\n // @ts-expect-error\r\n instance.__vrv_devtools = info;\r\n });\r\n }\r\n return (\r\n // pass the vnode to the slot as a prop.\r\n // h and both accept vnodes\r\n normalizeSlot(slots.default, { Component: component, route }) ||\r\n component);\r\n };\r\n },\r\n});\r\nfunction normalizeSlot(slot, data) {\r\n if (!slot)\r\n return null;\r\n const slotContent = slot(data);\r\n return slotContent.length === 1 ? slotContent[0] : slotContent;\r\n}\r\n// export the public type for h/tsx inference\r\n// also to avoid inline import() in generated d.ts files\r\n/**\r\n * Component to display the current route the user is at.\r\n */\r\nconst RouterView = RouterViewImpl;\r\n// warn against deprecated usage with & \r\n// due to functional component being no longer eager in Vue 3\r\nfunction warnDeprecatedUsage() {\r\n const instance = getCurrentInstance();\r\n const parentName = instance.parent && instance.parent.type.name;\r\n const parentSubTreeType = instance.parent && instance.parent.subTree && instance.parent.subTree.type;\r\n if (parentName &&\r\n (parentName === 'KeepAlive' || parentName.includes('Transition')) &&\r\n typeof parentSubTreeType === 'object' &&\r\n parentSubTreeType.name === 'RouterView') {\r\n const comp = parentName === 'KeepAlive' ? 'keep-alive' : 'transition';\r\n warn(` can no longer be used directly inside or .\\n` +\r\n `Use slot props instead:\\n\\n` +\r\n `\\n` +\r\n ` <${comp}>\\n` +\r\n ` \\n` +\r\n ` \\n` +\r\n ``);\r\n }\r\n}\n\n/**\r\n * Copies a route location and removes any problematic properties that cannot be shown in devtools (e.g. Vue instances).\r\n *\r\n * @param routeLocation - routeLocation to format\r\n * @param tooltip - optional tooltip\r\n * @returns a copy of the routeLocation\r\n */\r\nfunction formatRouteLocation(routeLocation, tooltip) {\r\n const copy = assign({}, routeLocation, {\r\n // remove variables that can contain vue instances\r\n matched: routeLocation.matched.map(matched => omit(matched, ['instances', 'children', 'aliasOf'])),\r\n });\r\n return {\r\n _custom: {\r\n type: null,\r\n readOnly: true,\r\n display: routeLocation.fullPath,\r\n tooltip,\r\n value: copy,\r\n },\r\n };\r\n}\r\nfunction formatDisplay(display) {\r\n return {\r\n _custom: {\r\n display,\r\n },\r\n };\r\n}\r\n// to support multiple router instances\r\nlet routerId = 0;\r\nfunction addDevtools(app, router, matcher) {\r\n // Take over router.beforeEach and afterEach\r\n // make sure we are not registering the devtool twice\r\n if (router.__hasDevtools)\r\n return;\r\n router.__hasDevtools = true;\r\n // increment to support multiple router instances\r\n const id = routerId++;\r\n setupDevtoolsPlugin({\r\n id: 'org.vuejs.router' + (id ? '.' + id : ''),\r\n label: 'Vue Router',\r\n packageName: 'vue-router',\r\n homepage: 'https://router.vuejs.org',\r\n logo: 'https://router.vuejs.org/logo.png',\r\n componentStateTypes: ['Routing'],\r\n app,\r\n }, api => {\r\n if (typeof api.now !== 'function') {\r\n console.warn('[Vue Router]: You seem to be using an outdated version of Vue Devtools. Are you still using the Beta release instead of the stable one? You can find the links at https://devtools.vuejs.org/guide/installation.html.');\r\n }\r\n // display state added by the router\r\n api.on.inspectComponent((payload, ctx) => {\r\n if (payload.instanceData) {\r\n payload.instanceData.state.push({\r\n type: 'Routing',\r\n key: '$route',\r\n editable: false,\r\n value: formatRouteLocation(router.currentRoute.value, 'Current Route'),\r\n });\r\n }\r\n });\r\n // mark router-link as active and display tags on router views\r\n api.on.visitComponentTree(({ treeNode: node, componentInstance }) => {\r\n if (componentInstance.__vrv_devtools) {\r\n const info = componentInstance.__vrv_devtools;\r\n node.tags.push({\r\n label: (info.name ? `${info.name.toString()}: ` : '') + info.path,\r\n textColor: 0,\r\n tooltip: 'This component is rendered by <router-view>',\r\n backgroundColor: PINK_500,\r\n });\r\n }\r\n // if multiple useLink are used\r\n if (isArray(componentInstance.__vrl_devtools)) {\r\n componentInstance.__devtoolsApi = api;\r\n componentInstance.__vrl_devtools.forEach(devtoolsData => {\r\n let backgroundColor = ORANGE_400;\r\n let tooltip = '';\r\n if (devtoolsData.isExactActive) {\r\n backgroundColor = LIME_500;\r\n tooltip = 'This is exactly active';\r\n }\r\n else if (devtoolsData.isActive) {\r\n backgroundColor = BLUE_600;\r\n tooltip = 'This link is active';\r\n }\r\n node.tags.push({\r\n label: devtoolsData.route.path,\r\n textColor: 0,\r\n tooltip,\r\n backgroundColor,\r\n });\r\n });\r\n }\r\n });\r\n watch(router.currentRoute, () => {\r\n // refresh active state\r\n refreshRoutesView();\r\n api.notifyComponentUpdate();\r\n api.sendInspectorTree(routerInspectorId);\r\n api.sendInspectorState(routerInspectorId);\r\n });\r\n const navigationsLayerId = 'router:navigations:' + id;\r\n api.addTimelineLayer({\r\n id: navigationsLayerId,\r\n label: `Router${id ? ' ' + id : ''} Navigations`,\r\n color: 0x40a8c4,\r\n });\r\n // const errorsLayerId = 'router:errors'\r\n // api.addTimelineLayer({\r\n // id: errorsLayerId,\r\n // label: 'Router Errors',\r\n // color: 0xea5455,\r\n // })\r\n router.onError((error, to) => {\r\n api.addTimelineEvent({\r\n layerId: navigationsLayerId,\r\n event: {\r\n title: 'Error during Navigation',\r\n subtitle: to.fullPath,\r\n logType: 'error',\r\n time: api.now(),\r\n data: { error },\r\n groupId: to.meta.__navigationId,\r\n },\r\n });\r\n });\r\n // attached to `meta` and used to group events\r\n let navigationId = 0;\r\n router.beforeEach((to, from) => {\r\n const data = {\r\n guard: formatDisplay('beforeEach'),\r\n from: formatRouteLocation(from, 'Current Location during this navigation'),\r\n to: formatRouteLocation(to, 'Target location'),\r\n };\r\n // Used to group navigations together, hide from devtools\r\n Object.defineProperty(to.meta, '__navigationId', {\r\n value: navigationId++,\r\n });\r\n api.addTimelineEvent({\r\n layerId: navigationsLayerId,\r\n event: {\r\n time: api.now(),\r\n title: 'Start of navigation',\r\n subtitle: to.fullPath,\r\n data,\r\n groupId: to.meta.__navigationId,\r\n },\r\n });\r\n });\r\n router.afterEach((to, from, failure) => {\r\n const data = {\r\n guard: formatDisplay('afterEach'),\r\n };\r\n if (failure) {\r\n data.failure = {\r\n _custom: {\r\n type: Error,\r\n readOnly: true,\r\n display: failure ? failure.message : '',\r\n tooltip: 'Navigation Failure',\r\n value: failure,\r\n },\r\n };\r\n data.status = formatDisplay('❌');\r\n }\r\n else {\r\n data.status = formatDisplay('✅');\r\n }\r\n // we set here to have the right order\r\n data.from = formatRouteLocation(from, 'Current Location during this navigation');\r\n data.to = formatRouteLocation(to, 'Target location');\r\n api.addTimelineEvent({\r\n layerId: navigationsLayerId,\r\n event: {\r\n title: 'End of navigation',\r\n subtitle: to.fullPath,\r\n time: api.now(),\r\n data,\r\n logType: failure ? 'warning' : 'default',\r\n groupId: to.meta.__navigationId,\r\n },\r\n });\r\n });\r\n /**\r\n * Inspector of Existing routes\r\n */\r\n const routerInspectorId = 'router-inspector:' + id;\r\n api.addInspector({\r\n id: routerInspectorId,\r\n label: 'Routes' + (id ? ' ' + id : ''),\r\n icon: 'book',\r\n treeFilterPlaceholder: 'Search routes',\r\n });\r\n function refreshRoutesView() {\r\n // the routes view isn't active\r\n if (!activeRoutesPayload)\r\n return;\r\n const payload = activeRoutesPayload;\r\n // children routes will appear as nested\r\n let routes = matcher.getRoutes().filter(route => !route.parent);\r\n // reset match state to false\r\n routes.forEach(resetMatchStateOnRouteRecord);\r\n // apply a match state if there is a payload\r\n if (payload.filter) {\r\n routes = routes.filter(route => \r\n // save matches state based on the payload\r\n isRouteMatching(route, payload.filter.toLowerCase()));\r\n }\r\n // mark active routes\r\n routes.forEach(route => markRouteRecordActive(route, router.currentRoute.value));\r\n payload.rootNodes = routes.map(formatRouteRecordForInspector);\r\n }\r\n let activeRoutesPayload;\r\n api.on.getInspectorTree(payload => {\r\n activeRoutesPayload = payload;\r\n if (payload.app === app && payload.inspectorId === routerInspectorId) {\r\n refreshRoutesView();\r\n }\r\n });\r\n /**\r\n * Display information about the currently selected route record\r\n */\r\n api.on.getInspectorState(payload => {\r\n if (payload.app === app && payload.inspectorId === routerInspectorId) {\r\n const routes = matcher.getRoutes();\r\n const route = routes.find(route => route.record.__vd_id === payload.nodeId);\r\n if (route) {\r\n payload.state = {\r\n options: formatRouteRecordMatcherForStateInspector(route),\r\n };\r\n }\r\n }\r\n });\r\n api.sendInspectorTree(routerInspectorId);\r\n api.sendInspectorState(routerInspectorId);\r\n });\r\n}\r\nfunction modifierForKey(key) {\r\n if (key.optional) {\r\n return key.repeatable ? '*' : '?';\r\n }\r\n else {\r\n return key.repeatable ? '+' : '';\r\n }\r\n}\r\nfunction formatRouteRecordMatcherForStateInspector(route) {\r\n const { record } = route;\r\n const fields = [\r\n { editable: false, key: 'path', value: record.path },\r\n ];\r\n if (record.name != null) {\r\n fields.push({\r\n editable: false,\r\n key: 'name',\r\n value: record.name,\r\n });\r\n }\r\n fields.push({ editable: false, key: 'regexp', value: route.re });\r\n if (route.keys.length) {\r\n fields.push({\r\n editable: false,\r\n key: 'keys',\r\n value: {\r\n _custom: {\r\n type: null,\r\n readOnly: true,\r\n display: route.keys\r\n .map(key => `${key.name}${modifierForKey(key)}`)\r\n .join(' '),\r\n tooltip: 'Param keys',\r\n value: route.keys,\r\n },\r\n },\r\n });\r\n }\r\n if (record.redirect != null) {\r\n fields.push({\r\n editable: false,\r\n key: 'redirect',\r\n value: record.redirect,\r\n });\r\n }\r\n if (route.alias.length) {\r\n fields.push({\r\n editable: false,\r\n key: 'aliases',\r\n value: route.alias.map(alias => alias.record.path),\r\n });\r\n }\r\n if (Object.keys(route.record.meta).length) {\r\n fields.push({\r\n editable: false,\r\n key: 'meta',\r\n value: route.record.meta,\r\n });\r\n }\r\n fields.push({\r\n key: 'score',\r\n editable: false,\r\n value: {\r\n _custom: {\r\n type: null,\r\n readOnly: true,\r\n display: route.score.map(score => score.join(', ')).join(' | '),\r\n tooltip: 'Score used to sort routes',\r\n value: route.score,\r\n },\r\n },\r\n });\r\n return fields;\r\n}\r\n/**\r\n * Extracted from tailwind palette\r\n */\r\nconst PINK_500 = 0xec4899;\r\nconst BLUE_600 = 0x2563eb;\r\nconst LIME_500 = 0x84cc16;\r\nconst CYAN_400 = 0x22d3ee;\r\nconst ORANGE_400 = 0xfb923c;\r\n// const GRAY_100 = 0xf4f4f5\r\nconst DARK = 0x666666;\r\nfunction formatRouteRecordForInspector(route) {\r\n const tags = [];\r\n const { record } = route;\r\n if (record.name != null) {\r\n tags.push({\r\n label: String(record.name),\r\n textColor: 0,\r\n backgroundColor: CYAN_400,\r\n });\r\n }\r\n if (record.aliasOf) {\r\n tags.push({\r\n label: 'alias',\r\n textColor: 0,\r\n backgroundColor: ORANGE_400,\r\n });\r\n }\r\n if (route.__vd_match) {\r\n tags.push({\r\n label: 'matches',\r\n textColor: 0,\r\n backgroundColor: PINK_500,\r\n });\r\n }\r\n if (route.__vd_exactActive) {\r\n tags.push({\r\n label: 'exact',\r\n textColor: 0,\r\n backgroundColor: LIME_500,\r\n });\r\n }\r\n if (route.__vd_active) {\r\n tags.push({\r\n label: 'active',\r\n textColor: 0,\r\n backgroundColor: BLUE_600,\r\n });\r\n }\r\n if (record.redirect) {\r\n tags.push({\r\n label: typeof record.redirect === 'string'\r\n ? `redirect: ${record.redirect}`\r\n : 'redirects',\r\n textColor: 0xffffff,\r\n backgroundColor: DARK,\r\n });\r\n }\r\n // add an id to be able to select it. Using the `path` is not possible because\r\n // empty path children would collide with their parents\r\n let id = record.__vd_id;\r\n if (id == null) {\r\n id = String(routeRecordId++);\r\n record.__vd_id = id;\r\n }\r\n return {\r\n id,\r\n label: record.path,\r\n tags,\r\n children: route.children.map(formatRouteRecordForInspector),\r\n };\r\n}\r\n// incremental id for route records and inspector state\r\nlet routeRecordId = 0;\r\nconst EXTRACT_REGEXP_RE = /^\\/(.*)\\/([a-z]*)$/;\r\nfunction markRouteRecordActive(route, currentRoute) {\r\n // no route will be active if matched is empty\r\n // reset the matching state\r\n const isExactActive = currentRoute.matched.length &&\r\n isSameRouteRecord(currentRoute.matched[currentRoute.matched.length - 1], route.record);\r\n route.__vd_exactActive = route.__vd_active = isExactActive;\r\n if (!isExactActive) {\r\n route.__vd_active = currentRoute.matched.some(match => isSameRouteRecord(match, route.record));\r\n }\r\n route.children.forEach(childRoute => markRouteRecordActive(childRoute, currentRoute));\r\n}\r\nfunction resetMatchStateOnRouteRecord(route) {\r\n route.__vd_match = false;\r\n route.children.forEach(resetMatchStateOnRouteRecord);\r\n}\r\nfunction isRouteMatching(route, filter) {\r\n const found = String(route.re).match(EXTRACT_REGEXP_RE);\r\n route.__vd_match = false;\r\n if (!found || found.length < 3) {\r\n return false;\r\n }\r\n // use a regexp without $ at the end to match nested routes better\r\n const nonEndingRE = new RegExp(found[1].replace(/\\$$/, ''), found[2]);\r\n if (nonEndingRE.test(filter)) {\r\n // mark children as matches\r\n route.children.forEach(child => isRouteMatching(child, filter));\r\n // exception case: `/`\r\n if (route.record.path !== '/' || filter === '/') {\r\n route.__vd_match = route.re.test(filter);\r\n return true;\r\n }\r\n // hide the / route\r\n return false;\r\n }\r\n const path = route.record.path.toLowerCase();\r\n const decodedPath = decode(path);\r\n // also allow partial matching on the path\r\n if (!filter.startsWith('/') &&\r\n (decodedPath.includes(filter) || path.includes(filter)))\r\n return true;\r\n if (decodedPath.startsWith(filter) || path.startsWith(filter))\r\n return true;\r\n if (route.record.name && String(route.record.name).includes(filter))\r\n return true;\r\n return route.children.some(child => isRouteMatching(child, filter));\r\n}\r\nfunction omit(obj, keys) {\r\n const ret = {};\r\n for (const key in obj) {\r\n if (!keys.includes(key)) {\r\n // @ts-expect-error\r\n ret[key] = obj[key];\r\n }\r\n }\r\n return ret;\r\n}\n\n/**\r\n * Creates a Router instance that can be used by a Vue app.\r\n *\r\n * @param options - {@link RouterOptions}\r\n */\r\nfunction createRouter(options) {\r\n const matcher = createRouterMatcher(options.routes, options);\r\n const parseQuery$1 = options.parseQuery || parseQuery;\r\n const stringifyQuery$1 = options.stringifyQuery || stringifyQuery;\r\n const routerHistory = options.history;\r\n if ((process.env.NODE_ENV !== 'production') && !routerHistory)\r\n throw new Error('Provide the \"history\" option when calling \"createRouter()\":' +\r\n ' https://next.router.vuejs.org/api/#history.');\r\n const beforeGuards = useCallbacks();\r\n const beforeResolveGuards = useCallbacks();\r\n const afterGuards = useCallbacks();\r\n const currentRoute = shallowRef(START_LOCATION_NORMALIZED);\r\n let pendingLocation = START_LOCATION_NORMALIZED;\r\n // leave the scrollRestoration if no scrollBehavior is provided\r\n if (isBrowser && options.scrollBehavior && 'scrollRestoration' in history) {\r\n history.scrollRestoration = 'manual';\r\n }\r\n const normalizeParams = applyToParams.bind(null, paramValue => '' + paramValue);\r\n const encodeParams = applyToParams.bind(null, encodeParam);\r\n const decodeParams = \r\n // @ts-expect-error: intentionally avoid the type check\r\n applyToParams.bind(null, decode);\r\n function addRoute(parentOrRoute, route) {\r\n let parent;\r\n let record;\r\n if (isRouteName(parentOrRoute)) {\r\n parent = matcher.getRecordMatcher(parentOrRoute);\r\n record = route;\r\n }\r\n else {\r\n record = parentOrRoute;\r\n }\r\n return matcher.addRoute(record, parent);\r\n }\r\n function removeRoute(name) {\r\n const recordMatcher = matcher.getRecordMatcher(name);\r\n if (recordMatcher) {\r\n matcher.removeRoute(recordMatcher);\r\n }\r\n else if ((process.env.NODE_ENV !== 'production')) {\r\n warn(`Cannot remove non-existent route \"${String(name)}\"`);\r\n }\r\n }\r\n function getRoutes() {\r\n return matcher.getRoutes().map(routeMatcher => routeMatcher.record);\r\n }\r\n function hasRoute(name) {\r\n return !!matcher.getRecordMatcher(name);\r\n }\r\n function resolve(rawLocation, currentLocation) {\r\n // const objectLocation = routerLocationAsObject(rawLocation)\r\n // we create a copy to modify it later\r\n currentLocation = assign({}, currentLocation || currentRoute.value);\r\n if (typeof rawLocation === 'string') {\r\n const locationNormalized = parseURL(parseQuery$1, rawLocation, currentLocation.path);\r\n const matchedRoute = matcher.resolve({ path: locationNormalized.path }, currentLocation);\r\n const href = routerHistory.createHref(locationNormalized.fullPath);\r\n if ((process.env.NODE_ENV !== 'production')) {\r\n if (href.startsWith('//'))\r\n warn(`Location \"${rawLocation}\" resolved to \"${href}\". A resolved location cannot start with multiple slashes.`);\r\n else if (!matchedRoute.matched.length) {\r\n warn(`No match found for location with path \"${rawLocation}\"`);\r\n }\r\n }\r\n // locationNormalized is always a new object\r\n return assign(locationNormalized, matchedRoute, {\r\n params: decodeParams(matchedRoute.params),\r\n hash: decode(locationNormalized.hash),\r\n redirectedFrom: undefined,\r\n href,\r\n });\r\n }\r\n let matcherLocation;\r\n // path could be relative in object as well\r\n if ('path' in rawLocation) {\r\n if ((process.env.NODE_ENV !== 'production') &&\r\n 'params' in rawLocation &&\r\n !('name' in rawLocation) &&\r\n // @ts-expect-error: the type is never\r\n Object.keys(rawLocation.params).length) {\r\n warn(`Path \"${rawLocation.path}\" was passed with params but they will be ignored. Use a named route alongside params instead.`);\r\n }\r\n matcherLocation = assign({}, rawLocation, {\r\n path: parseURL(parseQuery$1, rawLocation.path, currentLocation.path).path,\r\n });\r\n }\r\n else {\r\n // remove any nullish param\r\n const targetParams = assign({}, rawLocation.params);\r\n for (const key in targetParams) {\r\n if (targetParams[key] == null) {\r\n delete targetParams[key];\r\n }\r\n }\r\n // pass encoded values to the matcher, so it can produce encoded path and fullPath\r\n matcherLocation = assign({}, rawLocation, {\r\n params: encodeParams(targetParams),\r\n });\r\n // current location params are decoded, we need to encode them in case the\r\n // matcher merges the params\r\n currentLocation.params = encodeParams(currentLocation.params);\r\n }\r\n const matchedRoute = matcher.resolve(matcherLocation, currentLocation);\r\n const hash = rawLocation.hash || '';\r\n if ((process.env.NODE_ENV !== 'production') && hash && !hash.startsWith('#')) {\r\n warn(`A \\`hash\\` should always start with the character \"#\". Replace \"${hash}\" with \"#${hash}\".`);\r\n }\r\n // the matcher might have merged current location params, so\r\n // we need to run the decoding again\r\n matchedRoute.params = normalizeParams(decodeParams(matchedRoute.params));\r\n const fullPath = stringifyURL(stringifyQuery$1, assign({}, rawLocation, {\r\n hash: encodeHash(hash),\r\n path: matchedRoute.path,\r\n }));\r\n const href = routerHistory.createHref(fullPath);\r\n if ((process.env.NODE_ENV !== 'production')) {\r\n if (href.startsWith('//')) {\r\n warn(`Location \"${rawLocation}\" resolved to \"${href}\". A resolved location cannot start with multiple slashes.`);\r\n }\r\n else if (!matchedRoute.matched.length) {\r\n warn(`No match found for location with path \"${'path' in rawLocation ? rawLocation.path : rawLocation}\"`);\r\n }\r\n }\r\n return assign({\r\n fullPath,\r\n // keep the hash encoded so fullPath is effectively path + encodedQuery +\r\n // hash\r\n hash,\r\n query: \r\n // if the user is using a custom query lib like qs, we might have\r\n // nested objects, so we keep the query as is, meaning it can contain\r\n // numbers at `$route.query`, but at the point, the user will have to\r\n // use their own type anyway.\r\n // https://github.com/vuejs/router/issues/328#issuecomment-649481567\r\n stringifyQuery$1 === stringifyQuery\r\n ? normalizeQuery(rawLocation.query)\r\n : (rawLocation.query || {}),\r\n }, matchedRoute, {\r\n redirectedFrom: undefined,\r\n href,\r\n });\r\n }\r\n function locationAsObject(to) {\r\n return typeof to === 'string'\r\n ? parseURL(parseQuery$1, to, currentRoute.value.path)\r\n : assign({}, to);\r\n }\r\n function checkCanceledNavigation(to, from) {\r\n if (pendingLocation !== to) {\r\n return createRouterError(8 /* ErrorTypes.NAVIGATION_CANCELLED */, {\r\n from,\r\n to,\r\n });\r\n }\r\n }\r\n function push(to) {\r\n return pushWithRedirect(to);\r\n }\r\n function replace(to) {\r\n return push(assign(locationAsObject(to), { replace: true }));\r\n }\r\n function handleRedirectRecord(to) {\r\n const lastMatched = to.matched[to.matched.length - 1];\r\n if (lastMatched && lastMatched.redirect) {\r\n const { redirect } = lastMatched;\r\n let newTargetLocation = typeof redirect === 'function' ? redirect(to) : redirect;\r\n if (typeof newTargetLocation === 'string') {\r\n newTargetLocation =\r\n newTargetLocation.includes('?') || newTargetLocation.includes('#')\r\n ? (newTargetLocation = locationAsObject(newTargetLocation))\r\n : // force empty params\r\n { path: newTargetLocation };\r\n // @ts-expect-error: force empty params when a string is passed to let\r\n // the router parse them again\r\n newTargetLocation.params = {};\r\n }\r\n if ((process.env.NODE_ENV !== 'production') &&\r\n !('path' in newTargetLocation) &&\r\n !('name' in newTargetLocation)) {\r\n warn(`Invalid redirect found:\\n${JSON.stringify(newTargetLocation, null, 2)}\\n when navigating to \"${to.fullPath}\". A redirect must contain a name or path. This will break in production.`);\r\n throw new Error('Invalid redirect');\r\n }\r\n return assign({\r\n query: to.query,\r\n hash: to.hash,\r\n // avoid transferring params if the redirect has a path\r\n params: 'path' in newTargetLocation ? {} : to.params,\r\n }, newTargetLocation);\r\n }\r\n }\r\n function pushWithRedirect(to, redirectedFrom) {\r\n const targetLocation = (pendingLocation = resolve(to));\r\n const from = currentRoute.value;\r\n const data = to.state;\r\n const force = to.force;\r\n // to could be a string where `replace` is a function\r\n const replace = to.replace === true;\r\n const shouldRedirect = handleRedirectRecord(targetLocation);\r\n if (shouldRedirect)\r\n return pushWithRedirect(assign(locationAsObject(shouldRedirect), {\r\n state: typeof shouldRedirect === 'object'\r\n ? assign({}, data, shouldRedirect.state)\r\n : data,\r\n force,\r\n replace,\r\n }), \r\n // keep original redirectedFrom if it exists\r\n redirectedFrom || targetLocation);\r\n // if it was a redirect we already called `pushWithRedirect` above\r\n const toLocation = targetLocation;\r\n toLocation.redirectedFrom = redirectedFrom;\r\n let failure;\r\n if (!force && isSameRouteLocation(stringifyQuery$1, from, targetLocation)) {\r\n failure = createRouterError(16 /* ErrorTypes.NAVIGATION_DUPLICATED */, { to: toLocation, from });\r\n // trigger scroll to allow scrolling to the same anchor\r\n handleScroll(from, from, \r\n // this is a push, the only way for it to be triggered from a\r\n // history.listen is with a redirect, which makes it become a push\r\n true, \r\n // This cannot be the first navigation because the initial location\r\n // cannot be manually navigated to\r\n false);\r\n }\r\n return (failure ? Promise.resolve(failure) : navigate(toLocation, from))\r\n .catch((error) => isNavigationFailure(error)\r\n ? // navigation redirects still mark the router as ready\r\n isNavigationFailure(error, 2 /* ErrorTypes.NAVIGATION_GUARD_REDIRECT */)\r\n ? error\r\n : markAsReady(error) // also returns the error\r\n : // reject any unknown error\r\n triggerError(error, toLocation, from))\r\n .then((failure) => {\r\n if (failure) {\r\n if (isNavigationFailure(failure, 2 /* ErrorTypes.NAVIGATION_GUARD_REDIRECT */)) {\r\n if ((process.env.NODE_ENV !== 'production') &&\r\n // we are redirecting to the same location we were already at\r\n isSameRouteLocation(stringifyQuery$1, resolve(failure.to), toLocation) &&\r\n // and we have done it a couple of times\r\n redirectedFrom &&\r\n // @ts-expect-error: added only in dev\r\n (redirectedFrom._count = redirectedFrom._count\r\n ? // @ts-expect-error\r\n redirectedFrom._count + 1\r\n : 1) > 30) {\r\n warn(`Detected a possibly infinite redirection in a navigation guard when going from \"${from.fullPath}\" to \"${toLocation.fullPath}\". Aborting to avoid a Stack Overflow.\\n Are you always returning a new location within a navigation guard? That would lead to this error. Only return when redirecting or aborting, that should fix this. This might break in production if not fixed.`);\r\n return Promise.reject(new Error('Infinite redirect in navigation guard'));\r\n }\r\n return pushWithRedirect(\r\n // keep options\r\n assign({\r\n // preserve an existing replacement but allow the redirect to override it\r\n replace,\r\n }, locationAsObject(failure.to), {\r\n state: typeof failure.to === 'object'\r\n ? assign({}, data, failure.to.state)\r\n : data,\r\n force,\r\n }), \r\n // preserve the original redirectedFrom if any\r\n redirectedFrom || toLocation);\r\n }\r\n }\r\n else {\r\n // if we fail we don't finalize the navigation\r\n failure = finalizeNavigation(toLocation, from, true, replace, data);\r\n }\r\n triggerAfterEach(toLocation, from, failure);\r\n return failure;\r\n });\r\n }\r\n /**\r\n * Helper to reject and skip all navigation guards if a new navigation happened\r\n * @param to\r\n * @param from\r\n */\r\n function checkCanceledNavigationAndReject(to, from) {\r\n const error = checkCanceledNavigation(to, from);\r\n return error ? Promise.reject(error) : Promise.resolve();\r\n }\r\n function runWithContext(fn) {\r\n const app = installedApps.values().next().value;\r\n // support Vue < 3.3\r\n return app && typeof app.runWithContext === 'function'\r\n ? app.runWithContext(fn)\r\n : fn();\r\n }\r\n // TODO: refactor the whole before guards by internally using router.beforeEach\r\n function navigate(to, from) {\r\n let guards;\r\n const [leavingRecords, updatingRecords, enteringRecords] = extractChangingRecords(to, from);\r\n // all components here have been resolved once because we are leaving\r\n guards = extractComponentsGuards(leavingRecords.reverse(), 'beforeRouteLeave', to, from);\r\n // leavingRecords is already reversed\r\n for (const record of leavingRecords) {\r\n record.leaveGuards.forEach(guard => {\r\n guards.push(guardToPromiseFn(guard, to, from));\r\n });\r\n }\r\n const canceledNavigationCheck = checkCanceledNavigationAndReject.bind(null, to, from);\r\n guards.push(canceledNavigationCheck);\r\n // run the queue of per route beforeRouteLeave guards\r\n return (runGuardQueue(guards)\r\n .then(() => {\r\n // check global guards beforeEach\r\n guards = [];\r\n for (const guard of beforeGuards.list()) {\r\n guards.push(guardToPromiseFn(guard, to, from));\r\n }\r\n guards.push(canceledNavigationCheck);\r\n return runGuardQueue(guards);\r\n })\r\n .then(() => {\r\n // check in components beforeRouteUpdate\r\n guards = extractComponentsGuards(updatingRecords, 'beforeRouteUpdate', to, from);\r\n for (const record of updatingRecords) {\r\n record.updateGuards.forEach(guard => {\r\n guards.push(guardToPromiseFn(guard, to, from));\r\n });\r\n }\r\n guards.push(canceledNavigationCheck);\r\n // run the queue of per route beforeEnter guards\r\n return runGuardQueue(guards);\r\n })\r\n .then(() => {\r\n // check the route beforeEnter\r\n guards = [];\r\n for (const record of to.matched) {\r\n // do not trigger beforeEnter on reused views\r\n if (record.beforeEnter && !from.matched.includes(record)) {\r\n if (isArray(record.beforeEnter)) {\r\n for (const beforeEnter of record.beforeEnter)\r\n guards.push(guardToPromiseFn(beforeEnter, to, from));\r\n }\r\n else {\r\n guards.push(guardToPromiseFn(record.beforeEnter, to, from));\r\n }\r\n }\r\n }\r\n guards.push(canceledNavigationCheck);\r\n // run the queue of per route beforeEnter guards\r\n return runGuardQueue(guards);\r\n })\r\n .then(() => {\r\n // NOTE: at this point to.matched is normalized and does not contain any () => Promise\r\n // clear existing enterCallbacks, these are added by extractComponentsGuards\r\n to.matched.forEach(record => (record.enterCallbacks = {}));\r\n // check in-component beforeRouteEnter\r\n guards = extractComponentsGuards(enteringRecords, 'beforeRouteEnter', to, from);\r\n guards.push(canceledNavigationCheck);\r\n // run the queue of per route beforeEnter guards\r\n return runGuardQueue(guards);\r\n })\r\n .then(() => {\r\n // check global guards beforeResolve\r\n guards = [];\r\n for (const guard of beforeResolveGuards.list()) {\r\n guards.push(guardToPromiseFn(guard, to, from));\r\n }\r\n guards.push(canceledNavigationCheck);\r\n return runGuardQueue(guards);\r\n })\r\n // catch any navigation canceled\r\n .catch(err => isNavigationFailure(err, 8 /* ErrorTypes.NAVIGATION_CANCELLED */)\r\n ? err\r\n : Promise.reject(err)));\r\n }\r\n function triggerAfterEach(to, from, failure) {\r\n // navigation is confirmed, call afterGuards\r\n // TODO: wrap with error handlers\r\n for (const guard of afterGuards.list()) {\r\n runWithContext(() => guard(to, from, failure));\r\n }\r\n }\r\n /**\r\n * - Cleans up any navigation guards\r\n * - Changes the url if necessary\r\n * - Calls the scrollBehavior\r\n */\r\n function finalizeNavigation(toLocation, from, isPush, replace, data) {\r\n // a more recent navigation took place\r\n const error = checkCanceledNavigation(toLocation, from);\r\n if (error)\r\n return error;\r\n // only consider as push if it's not the first navigation\r\n const isFirstNavigation = from === START_LOCATION_NORMALIZED;\r\n const state = !isBrowser ? {} : history.state;\r\n // change URL only if the user did a push/replace and if it's not the initial navigation because\r\n // it's just reflecting the url\r\n if (isPush) {\r\n // on the initial navigation, we want to reuse the scroll position from\r\n // history state if it exists\r\n if (replace || isFirstNavigation)\r\n routerHistory.replace(toLocation.fullPath, assign({\r\n scroll: isFirstNavigation && state && state.scroll,\r\n }, data));\r\n else\r\n routerHistory.push(toLocation.fullPath, data);\r\n }\r\n // accept current navigation\r\n currentRoute.value = toLocation;\r\n handleScroll(toLocation, from, isPush, isFirstNavigation);\r\n markAsReady();\r\n }\r\n let removeHistoryListener;\r\n // attach listener to history to trigger navigations\r\n function setupListeners() {\r\n // avoid setting up listeners twice due to an invalid first navigation\r\n if (removeHistoryListener)\r\n return;\r\n removeHistoryListener = routerHistory.listen((to, _from, info) => {\r\n if (!router.listening)\r\n return;\r\n // cannot be a redirect route because it was in history\r\n const toLocation = resolve(to);\r\n // due to dynamic routing, and to hash history with manual navigation\r\n // (manually changing the url or calling history.hash = '#/somewhere'),\r\n // there could be a redirect record in history\r\n const shouldRedirect = handleRedirectRecord(toLocation);\r\n if (shouldRedirect) {\r\n pushWithRedirect(assign(shouldRedirect, { replace: true }), toLocation).catch(noop);\r\n return;\r\n }\r\n pendingLocation = toLocation;\r\n const from = currentRoute.value;\r\n // TODO: should be moved to web history?\r\n if (isBrowser) {\r\n saveScrollPosition(getScrollKey(from.fullPath, info.delta), computeScrollPosition());\r\n }\r\n navigate(toLocation, from)\r\n .catch((error) => {\r\n if (isNavigationFailure(error, 4 /* ErrorTypes.NAVIGATION_ABORTED */ | 8 /* ErrorTypes.NAVIGATION_CANCELLED */)) {\r\n return error;\r\n }\r\n if (isNavigationFailure(error, 2 /* ErrorTypes.NAVIGATION_GUARD_REDIRECT */)) {\r\n // Here we could call if (info.delta) routerHistory.go(-info.delta,\r\n // false) but this is bug prone as we have no way to wait the\r\n // navigation to be finished before calling pushWithRedirect. Using\r\n // a setTimeout of 16ms seems to work but there is no guarantee for\r\n // it to work on every browser. So instead we do not restore the\r\n // history entry and trigger a new navigation as requested by the\r\n // navigation guard.\r\n // the error is already handled by router.push we just want to avoid\r\n // logging the error\r\n pushWithRedirect(error.to, toLocation\r\n // avoid an uncaught rejection, let push call triggerError\r\n )\r\n .then(failure => {\r\n // manual change in hash history #916 ending up in the URL not\r\n // changing, but it was changed by the manual url change, so we\r\n // need to manually change it ourselves\r\n if (isNavigationFailure(failure, 4 /* ErrorTypes.NAVIGATION_ABORTED */ |\r\n 16 /* ErrorTypes.NAVIGATION_DUPLICATED */) &&\r\n !info.delta &&\r\n info.type === NavigationType.pop) {\r\n routerHistory.go(-1, false);\r\n }\r\n })\r\n .catch(noop);\r\n // avoid the then branch\r\n return Promise.reject();\r\n }\r\n // do not restore history on unknown direction\r\n if (info.delta) {\r\n routerHistory.go(-info.delta, false);\r\n }\r\n // unrecognized error, transfer to the global handler\r\n return triggerError(error, toLocation, from);\r\n })\r\n .then((failure) => {\r\n failure =\r\n failure ||\r\n finalizeNavigation(\r\n // after navigation, all matched components are resolved\r\n toLocation, from, false);\r\n // revert the navigation\r\n if (failure) {\r\n if (info.delta &&\r\n // a new navigation has been triggered, so we do not want to revert, that will change the current history\r\n // entry while a different route is displayed\r\n !isNavigationFailure(failure, 8 /* ErrorTypes.NAVIGATION_CANCELLED */)) {\r\n routerHistory.go(-info.delta, false);\r\n }\r\n else if (info.type === NavigationType.pop &&\r\n isNavigationFailure(failure, 4 /* ErrorTypes.NAVIGATION_ABORTED */ | 16 /* ErrorTypes.NAVIGATION_DUPLICATED */)) {\r\n // manual change in hash history #916\r\n // it's like a push but lacks the information of the direction\r\n routerHistory.go(-1, false);\r\n }\r\n }\r\n triggerAfterEach(toLocation, from, failure);\r\n })\r\n .catch(noop);\r\n });\r\n }\r\n // Initialization and Errors\r\n let readyHandlers = useCallbacks();\r\n let errorHandlers = useCallbacks();\r\n let ready;\r\n /**\r\n * Trigger errorHandlers added via onError and throws the error as well\r\n *\r\n * @param error - error to throw\r\n * @param to - location we were navigating to when the error happened\r\n * @param from - location we were navigating from when the error happened\r\n * @returns the error as a rejected promise\r\n */\r\n function triggerError(error, to, from) {\r\n markAsReady(error);\r\n const list = errorHandlers.list();\r\n if (list.length) {\r\n list.forEach(handler => handler(error, to, from));\r\n }\r\n else {\r\n if ((process.env.NODE_ENV !== 'production')) {\r\n warn('uncaught error during route navigation:');\r\n }\r\n console.error(error);\r\n }\r\n return Promise.reject(error);\r\n }\r\n function isReady() {\r\n if (ready && currentRoute.value !== START_LOCATION_NORMALIZED)\r\n return Promise.resolve();\r\n return new Promise((resolve, reject) => {\r\n readyHandlers.add([resolve, reject]);\r\n });\r\n }\r\n function markAsReady(err) {\r\n if (!ready) {\r\n // still not ready if an error happened\r\n ready = !err;\r\n setupListeners();\r\n readyHandlers\r\n .list()\r\n .forEach(([resolve, reject]) => (err ? reject(err) : resolve()));\r\n readyHandlers.reset();\r\n }\r\n return err;\r\n }\r\n // Scroll behavior\r\n function handleScroll(to, from, isPush, isFirstNavigation) {\r\n const { scrollBehavior } = options;\r\n if (!isBrowser || !scrollBehavior)\r\n return Promise.resolve();\r\n const scrollPosition = (!isPush && getSavedScrollPosition(getScrollKey(to.fullPath, 0))) ||\r\n ((isFirstNavigation || !isPush) &&\r\n history.state &&\r\n history.state.scroll) ||\r\n null;\r\n return nextTick()\r\n .then(() => scrollBehavior(to, from, scrollPosition))\r\n .then(position => position && scrollToPosition(position))\r\n .catch(err => triggerError(err, to, from));\r\n }\r\n const go = (delta) => routerHistory.go(delta);\r\n let started;\r\n const installedApps = new Set();\r\n const router = {\r\n currentRoute,\r\n listening: true,\r\n addRoute,\r\n removeRoute,\r\n hasRoute,\r\n getRoutes,\r\n resolve,\r\n options,\r\n push,\r\n replace,\r\n go,\r\n back: () => go(-1),\r\n forward: () => go(1),\r\n beforeEach: beforeGuards.add,\r\n beforeResolve: beforeResolveGuards.add,\r\n afterEach: afterGuards.add,\r\n onError: errorHandlers.add,\r\n isReady,\r\n install(app) {\r\n const router = this;\r\n app.component('RouterLink', RouterLink);\r\n app.component('RouterView', RouterView);\r\n app.config.globalProperties.$router = router;\r\n Object.defineProperty(app.config.globalProperties, '$route', {\r\n enumerable: true,\r\n get: () => unref(currentRoute),\r\n });\r\n // this initial navigation is only necessary on client, on server it doesn't\r\n // make sense because it will create an extra unnecessary navigation and could\r\n // lead to problems\r\n if (isBrowser &&\r\n // used for the initial navigation client side to avoid pushing\r\n // multiple times when the router is used in multiple apps\r\n !started &&\r\n currentRoute.value === START_LOCATION_NORMALIZED) {\r\n // see above\r\n started = true;\r\n push(routerHistory.location).catch(err => {\r\n if ((process.env.NODE_ENV !== 'production'))\r\n warn('Unexpected error when starting the router:', err);\r\n });\r\n }\r\n const reactiveRoute = {};\r\n for (const key in START_LOCATION_NORMALIZED) {\r\n // @ts-expect-error: the key matches\r\n reactiveRoute[key] = computed(() => currentRoute.value[key]);\r\n }\r\n app.provide(routerKey, router);\r\n app.provide(routeLocationKey, reactive(reactiveRoute));\r\n app.provide(routerViewLocationKey, currentRoute);\r\n const unmountApp = app.unmount;\r\n installedApps.add(app);\r\n app.unmount = function () {\r\n installedApps.delete(app);\r\n // the router is not attached to an app anymore\r\n if (installedApps.size < 1) {\r\n // invalidate the current navigation\r\n pendingLocation = START_LOCATION_NORMALIZED;\r\n removeHistoryListener && removeHistoryListener();\r\n removeHistoryListener = null;\r\n currentRoute.value = START_LOCATION_NORMALIZED;\r\n started = false;\r\n ready = false;\r\n }\r\n unmountApp();\r\n };\r\n // TODO: this probably needs to be updated so it can be used by vue-termui\r\n if (((process.env.NODE_ENV !== 'production') || __VUE_PROD_DEVTOOLS__) && isBrowser) {\r\n addDevtools(app, router, matcher);\r\n }\r\n },\r\n };\r\n // TODO: type this as NavigationGuardReturn or similar instead of any\r\n function runGuardQueue(guards) {\r\n return guards.reduce((promise, guard) => promise.then(() => runWithContext(guard)), Promise.resolve());\r\n }\r\n return router;\r\n}\r\nfunction extractChangingRecords(to, from) {\r\n const leavingRecords = [];\r\n const updatingRecords = [];\r\n const enteringRecords = [];\r\n const len = Math.max(from.matched.length, to.matched.length);\r\n for (let i = 0; i < len; i++) {\r\n const recordFrom = from.matched[i];\r\n if (recordFrom) {\r\n if (to.matched.find(record => isSameRouteRecord(record, recordFrom)))\r\n updatingRecords.push(recordFrom);\r\n else\r\n leavingRecords.push(recordFrom);\r\n }\r\n const recordTo = to.matched[i];\r\n if (recordTo) {\r\n // the type doesn't matter because we are comparing per reference\r\n if (!from.matched.find(record => isSameRouteRecord(record, recordTo))) {\r\n enteringRecords.push(recordTo);\r\n }\r\n }\r\n }\r\n return [leavingRecords, updatingRecords, enteringRecords];\r\n}\n\n/**\r\n * Returns the router instance. Equivalent to using `$router` inside\r\n * templates.\r\n */\r\nfunction useRouter() {\r\n return inject(routerKey);\r\n}\r\n/**\r\n * Returns the current route location. Equivalent to using `$route` inside\r\n * templates.\r\n */\r\nfunction useRoute() {\r\n return inject(routeLocationKey);\r\n}\n\nexport { NavigationFailureType, RouterLink, RouterView, START_LOCATION_NORMALIZED as START_LOCATION, createMemoryHistory, createRouter, createRouterMatcher, createWebHashHistory, createWebHistory, isNavigationFailure, loadRouteLocation, matchedRouteKey, onBeforeRouteLeave, onBeforeRouteUpdate, parseQuery, routeLocationKey, routerKey, routerViewLocationKey, stringifyQuery, useLink, useRoute, useRouter, viewDepthKey };\n","// Utilities\nimport { h, Transition, TransitionGroup } from 'vue';\nimport { genericComponent, propsFactory } from \"../../util/index.mjs\"; // Types\nexport const makeTransitionProps = propsFactory({\n disabled: Boolean,\n group: Boolean,\n hideOnLeave: Boolean,\n leaveAbsolute: Boolean,\n mode: String,\n origin: String\n}, 'transition');\nexport function createCssTransition(name, origin, mode) {\n return genericComponent()({\n name,\n props: makeTransitionProps({\n mode,\n origin\n }),\n setup(props, _ref) {\n let {\n slots\n } = _ref;\n const functions = {\n onBeforeEnter(el) {\n if (props.origin) {\n el.style.transformOrigin = props.origin;\n }\n },\n onLeave(el) {\n if (props.leaveAbsolute) {\n const {\n offsetTop,\n offsetLeft,\n offsetWidth,\n offsetHeight\n } = el;\n el._transitionInitialStyles = {\n position: el.style.position,\n top: el.style.top,\n left: el.style.left,\n width: el.style.width,\n height: el.style.height\n };\n el.style.position = 'absolute';\n el.style.top = `${offsetTop}px`;\n el.style.left = `${offsetLeft}px`;\n el.style.width = `${offsetWidth}px`;\n el.style.height = `${offsetHeight}px`;\n }\n if (props.hideOnLeave) {\n el.style.setProperty('display', 'none', 'important');\n }\n },\n onAfterLeave(el) {\n if (props.leaveAbsolute && el?._transitionInitialStyles) {\n const {\n position,\n top,\n left,\n width,\n height\n } = el._transitionInitialStyles;\n delete el._transitionInitialStyles;\n el.style.position = position || '';\n el.style.top = top || '';\n el.style.left = left || '';\n el.style.width = width || '';\n el.style.height = height || '';\n }\n }\n };\n return () => {\n const tag = props.group ? TransitionGroup : Transition;\n return h(tag, {\n name: props.disabled ? '' : name,\n css: !props.disabled,\n ...(props.group ? undefined : {\n mode: props.mode\n }),\n ...(props.disabled ? {} : functions)\n }, slots.default);\n };\n }\n });\n}\nexport function createJavascriptTransition(name, functions) {\n let mode = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'in-out';\n return genericComponent()({\n name,\n props: {\n mode: {\n type: String,\n default: mode\n },\n disabled: Boolean\n },\n setup(props, _ref2) {\n let {\n slots\n } = _ref2;\n return () => {\n return h(Transition, {\n name: props.disabled ? '' : name,\n css: !props.disabled,\n // mode: props.mode, // TODO: vuejs/vue-next#3104\n ...(props.disabled ? {} : functions)\n }, slots.default);\n };\n }\n });\n}\n//# sourceMappingURL=createTransition.mjs.map","// Utilities\nimport { camelize } from 'vue';\nexport default function () {\n let expandedParentClass = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';\n let x = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n const sizeProperty = x ? 'width' : 'height';\n const offsetProperty = camelize(`offset-${sizeProperty}`);\n return {\n onBeforeEnter(el) {\n el._parent = el.parentNode;\n el._initialStyle = {\n transition: el.style.transition,\n overflow: el.style.overflow,\n [sizeProperty]: el.style[sizeProperty]\n };\n },\n onEnter(el) {\n const initialStyle = el._initialStyle;\n el.style.setProperty('transition', 'none', 'important');\n // Hide overflow to account for collapsed margins in the calculated height\n el.style.overflow = 'hidden';\n const offset = `${el[offsetProperty]}px`;\n el.style[sizeProperty] = '0';\n void el.offsetHeight; // force reflow\n\n el.style.transition = initialStyle.transition;\n if (expandedParentClass && el._parent) {\n el._parent.classList.add(expandedParentClass);\n }\n requestAnimationFrame(() => {\n el.style[sizeProperty] = offset;\n });\n },\n onAfterEnter: resetStyles,\n onEnterCancelled: resetStyles,\n onLeave(el) {\n el._initialStyle = {\n transition: '',\n overflow: el.style.overflow,\n [sizeProperty]: el.style[sizeProperty]\n };\n el.style.overflow = 'hidden';\n el.style[sizeProperty] = `${el[offsetProperty]}px`;\n void el.offsetHeight; // force reflow\n\n requestAnimationFrame(() => el.style[sizeProperty] = '0');\n },\n onAfterLeave,\n onLeaveCancelled: onAfterLeave\n };\n function onAfterLeave(el) {\n if (expandedParentClass && el._parent) {\n el._parent.classList.remove(expandedParentClass);\n }\n resetStyles(el);\n }\n function resetStyles(el) {\n const size = el._initialStyle[sizeProperty];\n el.style.overflow = el._initialStyle.overflow;\n if (size != null) el.style[sizeProperty] = size;\n delete el._initialStyle;\n }\n}\n//# sourceMappingURL=expand-transition.mjs.map","import { createVNode as _createVNode, mergeProps as _mergeProps, resolveDirective as _resolveDirective } from \"vue\";\n// Utilities\nimport { Transition } from 'vue';\nimport { acceleratedEasing, animate, deceleratedEasing, genericComponent, nullifyTransforms, propsFactory, standardEasing } from \"../../util/index.mjs\"; // Types\nexport const makeVDialogTransitionProps = propsFactory({\n target: Object\n}, 'v-dialog-transition');\nexport const VDialogTransition = genericComponent()({\n name: 'VDialogTransition',\n props: makeVDialogTransitionProps(),\n setup(props, _ref) {\n let {\n slots\n } = _ref;\n const functions = {\n onBeforeEnter(el) {\n el.style.pointerEvents = 'none';\n el.style.visibility = 'hidden';\n },\n async onEnter(el, done) {\n await new Promise(resolve => requestAnimationFrame(resolve));\n await new Promise(resolve => requestAnimationFrame(resolve));\n el.style.visibility = '';\n const {\n x,\n y,\n sx,\n sy,\n speed\n } = getDimensions(props.target, el);\n const animation = animate(el, [{\n transform: `translate(${x}px, ${y}px) scale(${sx}, ${sy})`,\n opacity: 0\n }, {}], {\n duration: 225 * speed,\n easing: deceleratedEasing\n });\n getChildren(el)?.forEach(el => {\n animate(el, [{\n opacity: 0\n }, {\n opacity: 0,\n offset: 0.33\n }, {}], {\n duration: 225 * 2 * speed,\n easing: standardEasing\n });\n });\n animation.finished.then(() => done());\n },\n onAfterEnter(el) {\n el.style.removeProperty('pointer-events');\n },\n onBeforeLeave(el) {\n el.style.pointerEvents = 'none';\n },\n async onLeave(el, done) {\n await new Promise(resolve => requestAnimationFrame(resolve));\n const {\n x,\n y,\n sx,\n sy,\n speed\n } = getDimensions(props.target, el);\n const animation = animate(el, [{}, {\n transform: `translate(${x}px, ${y}px) scale(${sx}, ${sy})`,\n opacity: 0\n }], {\n duration: 125 * speed,\n easing: acceleratedEasing\n });\n animation.finished.then(() => done());\n getChildren(el)?.forEach(el => {\n animate(el, [{}, {\n opacity: 0,\n offset: 0.2\n }, {\n opacity: 0\n }], {\n duration: 125 * 2 * speed,\n easing: standardEasing\n });\n });\n },\n onAfterLeave(el) {\n el.style.removeProperty('pointer-events');\n }\n };\n return () => {\n return props.target ? _createVNode(Transition, _mergeProps({\n \"name\": \"dialog-transition\"\n }, functions, {\n \"css\": false\n }), slots) : _createVNode(Transition, {\n \"name\": \"dialog-transition\"\n }, slots);\n };\n }\n});\n\n/** Animatable children (card, sheet, list) */\nfunction getChildren(el) {\n const els = el.querySelector(':scope > .v-card, :scope > .v-sheet, :scope > .v-list')?.children;\n return els && [...els];\n}\nfunction getDimensions(target, el) {\n const targetBox = target.getBoundingClientRect();\n const elBox = nullifyTransforms(el);\n const [originX, originY] = getComputedStyle(el).transformOrigin.split(' ').map(v => parseFloat(v));\n const [anchorSide, anchorOffset] = getComputedStyle(el).getPropertyValue('--v-overlay-anchor-origin').split(' ');\n let offsetX = targetBox.left + targetBox.width / 2;\n if (anchorSide === 'left' || anchorOffset === 'left') {\n offsetX -= targetBox.width / 2;\n } else if (anchorSide === 'right' || anchorOffset === 'right') {\n offsetX += targetBox.width / 2;\n }\n let offsetY = targetBox.top + targetBox.height / 2;\n if (anchorSide === 'top' || anchorOffset === 'top') {\n offsetY -= targetBox.height / 2;\n } else if (anchorSide === 'bottom' || anchorOffset === 'bottom') {\n offsetY += targetBox.height / 2;\n }\n const tsx = targetBox.width / elBox.width;\n const tsy = targetBox.height / elBox.height;\n const maxs = Math.max(1, tsx, tsy);\n const sx = tsx / maxs || 0;\n const sy = tsy / maxs || 0;\n\n // Animate elements larger than 12% of the screen area up to 1.5x slower\n const asa = elBox.width * elBox.height / (window.innerWidth * window.innerHeight);\n const speed = asa > 0.12 ? Math.min(1.5, (asa - 0.12) * 10 + 1) : 1;\n return {\n x: offsetX - (originX + elBox.left),\n y: offsetY - (originY + elBox.top),\n sx,\n sy,\n speed\n };\n}\n//# sourceMappingURL=dialog-transition.mjs.map","import { createCssTransition, createJavascriptTransition } from \"./createTransition.mjs\";\nimport ExpandTransitionGenerator from \"./expand-transition.mjs\"; // Component specific transitions\nexport const VFabTransition = createCssTransition('fab-transition', 'center center', 'out-in');\n\n// Generic transitions\nexport const VDialogBottomTransition = createCssTransition('dialog-bottom-transition');\nexport const VDialogTopTransition = createCssTransition('dialog-top-transition');\nexport const VFadeTransition = createCssTransition('fade-transition');\nexport const VScaleTransition = createCssTransition('scale-transition');\nexport const VScrollXTransition = createCssTransition('scroll-x-transition');\nexport const VScrollXReverseTransition = createCssTransition('scroll-x-reverse-transition');\nexport const VScrollYTransition = createCssTransition('scroll-y-transition');\nexport const VScrollYReverseTransition = createCssTransition('scroll-y-reverse-transition');\nexport const VSlideXTransition = createCssTransition('slide-x-transition');\nexport const VSlideXReverseTransition = createCssTransition('slide-x-reverse-transition');\nexport const VSlideYTransition = createCssTransition('slide-y-transition');\nexport const VSlideYReverseTransition = createCssTransition('slide-y-reverse-transition');\n\n// Javascript transitions\nexport const VExpandTransition = createJavascriptTransition('expand-transition', ExpandTransitionGenerator());\nexport const VExpandXTransition = createJavascriptTransition('expand-x-transition', ExpandTransitionGenerator('', true));\nexport { VDialogTransition } from \"./dialog-transition.mjs\";\n//# sourceMappingURL=index.mjs.map","// Composables\nimport { provideDefaults } from \"../../composables/defaults.mjs\"; // Utilities\nimport { toRefs } from 'vue';\nimport { genericComponent, propsFactory } from \"../../util/index.mjs\"; // Types\nexport const makeVDefaultsProviderProps = propsFactory({\n defaults: Object,\n disabled: Boolean,\n reset: [Number, String],\n root: [Boolean, String],\n scoped: Boolean\n}, 'VDefaultsProvider');\nexport const VDefaultsProvider = genericComponent(false)({\n name: 'VDefaultsProvider',\n props: makeVDefaultsProviderProps(),\n setup(props, _ref) {\n let {\n slots\n } = _ref;\n const {\n defaults,\n disabled,\n reset,\n root,\n scoped\n } = toRefs(props);\n provideDefaults(defaults, {\n reset,\n root,\n scoped,\n disabled\n });\n return () => slots.default?.();\n }\n});\n//# sourceMappingURL=VDefaultsProvider.mjs.map","// Utilities\nimport { computed, inject, provide, shallowRef } from 'vue';\n\n// Types\n\n// Depth\nexport const DepthKey = Symbol.for('vuetify:depth');\nexport function useDepth(hasPrepend) {\n const parent = inject(DepthKey, shallowRef(-1));\n const depth = computed(() => parent.value + 1 + (hasPrepend?.value ? 1 : 0));\n provide(DepthKey, depth);\n return depth;\n}\n\n// List\nexport const ListKey = Symbol.for('vuetify:list');\nexport function createList() {\n const parent = inject(ListKey, {\n hasPrepend: shallowRef(false),\n updateHasPrepend: () => null\n });\n const data = {\n hasPrepend: shallowRef(false),\n updateHasPrepend: value => {\n if (value) data.hasPrepend.value = value;\n }\n };\n provide(ListKey, data);\n return parent;\n}\nexport function useList() {\n return inject(ListKey, null);\n}\n//# sourceMappingURL=list.mjs.map","// Composables\nimport { VClassIcon } from \"../composables/icons.mjs\"; // Utilities\nimport { h } from 'vue';\n\n// Types\n\nconst aliases = {\n collapse: 'mdi-chevron-up',\n complete: 'mdi-check',\n cancel: 'mdi-close-circle',\n close: 'mdi-close',\n delete: 'mdi-close-circle',\n // delete (e.g. v-chip close)\n clear: 'mdi-close-circle',\n success: 'mdi-check-circle',\n info: 'mdi-information',\n warning: 'mdi-alert-circle',\n error: 'mdi-close-circle',\n prev: 'mdi-chevron-left',\n next: 'mdi-chevron-right',\n checkboxOn: 'mdi-checkbox-marked',\n checkboxOff: 'mdi-checkbox-blank-outline',\n checkboxIndeterminate: 'mdi-minus-box',\n delimiter: 'mdi-circle',\n // for carousel\n sortAsc: 'mdi-arrow-up',\n sortDesc: 'mdi-arrow-down',\n expand: 'mdi-chevron-down',\n menu: 'mdi-menu',\n subgroup: 'mdi-menu-down',\n dropdown: 'mdi-menu-down',\n radioOn: 'mdi-radiobox-marked',\n radioOff: 'mdi-radiobox-blank',\n edit: 'mdi-pencil',\n ratingEmpty: 'mdi-star-outline',\n ratingFull: 'mdi-star',\n ratingHalf: 'mdi-star-half-full',\n loading: 'mdi-cached',\n first: 'mdi-page-first',\n last: 'mdi-page-last',\n unfold: 'mdi-unfold-more-horizontal',\n file: 'mdi-paperclip',\n plus: 'mdi-plus',\n minus: 'mdi-minus',\n calendar: 'mdi-calendar'\n};\nconst mdi = {\n // Not using mergeProps here, functional components merge props by default (?)\n component: props => h(VClassIcon, {\n ...props,\n class: 'mdi'\n })\n};\nexport { aliases, mdi };\n//# sourceMappingURL=mdi.mjs.map","import { mergeProps as _mergeProps, createVNode as _createVNode } from \"vue\";\n// Icons\nimport { aliases, mdi } from \"../iconsets/mdi.mjs\"; // Utilities\nimport { computed, inject, unref } from 'vue';\nimport { defineComponent, genericComponent, mergeDeep, propsFactory } from \"../util/index.mjs\"; // Types\nexport const IconValue = [String, Function, Object, Array];\nexport const IconSymbol = Symbol.for('vuetify:icons');\nexport const makeIconProps = propsFactory({\n icon: {\n type: IconValue\n },\n // Could not remove this and use makeTagProps, types complained because it is not required\n tag: {\n type: String,\n required: true\n }\n}, 'icon');\nexport const VComponentIcon = genericComponent()({\n name: 'VComponentIcon',\n props: makeIconProps(),\n setup(props, _ref) {\n let {\n slots\n } = _ref;\n return () => {\n const Icon = props.icon;\n return _createVNode(props.tag, null, {\n default: () => [props.icon ? _createVNode(Icon, null, null) : slots.default?.()]\n });\n };\n }\n});\nexport const VSvgIcon = defineComponent({\n name: 'VSvgIcon',\n inheritAttrs: false,\n props: makeIconProps(),\n setup(props, _ref2) {\n let {\n attrs\n } = _ref2;\n return () => {\n return _createVNode(props.tag, _mergeProps(attrs, {\n \"style\": null\n }), {\n default: () => [_createVNode(\"svg\", {\n \"class\": \"v-icon__svg\",\n \"xmlns\": \"http://www.w3.org/2000/svg\",\n \"viewBox\": \"0 0 24 24\",\n \"role\": \"img\",\n \"aria-hidden\": \"true\"\n }, [Array.isArray(props.icon) ? props.icon.map(path => Array.isArray(path) ? _createVNode(\"path\", {\n \"d\": path[0],\n \"fill-opacity\": path[1]\n }, null) : _createVNode(\"path\", {\n \"d\": path\n }, null)) : _createVNode(\"path\", {\n \"d\": props.icon\n }, null)])]\n });\n };\n }\n});\nexport const VLigatureIcon = defineComponent({\n name: 'VLigatureIcon',\n props: makeIconProps(),\n setup(props) {\n return () => {\n return _createVNode(props.tag, null, {\n default: () => [props.icon]\n });\n };\n }\n});\nexport const VClassIcon = defineComponent({\n name: 'VClassIcon',\n props: makeIconProps(),\n setup(props) {\n return () => {\n return _createVNode(props.tag, {\n \"class\": props.icon\n }, null);\n };\n }\n});\nexport const defaultSets = {\n svg: {\n component: VSvgIcon\n },\n class: {\n component: VClassIcon\n }\n};\n\n// Composables\nexport function createIcons(options) {\n return mergeDeep({\n defaultSet: 'mdi',\n sets: {\n ...defaultSets,\n mdi\n },\n aliases: {\n ...aliases,\n /* eslint-disable max-len */\n vuetify: ['M8.2241 14.2009L12 21L22 3H14.4459L8.2241 14.2009Z', ['M7.26303 12.4733L7.00113 12L2 3H12.5261C12.5261 3 12.5261 3 12.5261 3L7.26303 12.4733Z', 0.6]],\n 'vuetify-outline': 'svg:M7.26 12.47 12.53 3H2L7.26 12.47ZM14.45 3 8.22 14.2 12 21 22 3H14.45ZM18.6 5 12 16.88 10.51 14.2 15.62 5ZM7.26 8.35 5.4 5H9.13L7.26 8.35Z'\n /* eslint-enable max-len */\n }\n }, options);\n}\nexport const useIcon = props => {\n const icons = inject(IconSymbol);\n if (!icons) throw new Error('Missing Vuetify Icons provide!');\n const iconData = computed(() => {\n const iconAlias = unref(props);\n if (!iconAlias) return {\n component: VComponentIcon\n };\n let icon = iconAlias;\n if (typeof icon === 'string') {\n icon = icon.trim();\n if (icon.startsWith('$')) {\n icon = icons.aliases?.[icon.slice(1)];\n }\n }\n if (!icon) throw new Error(`Could not find aliased icon \"${iconAlias}\"`);\n if (Array.isArray(icon)) {\n return {\n component: VSvgIcon,\n icon\n };\n } else if (typeof icon !== 'string') {\n return {\n component: VComponentIcon,\n icon\n };\n }\n const iconSetName = Object.keys(icons.sets).find(setName => typeof icon === 'string' && icon.startsWith(`${setName}:`));\n const iconName = iconSetName ? icon.slice(iconSetName.length + 1) : icon;\n const iconSet = icons.sets[iconSetName ?? icons.defaultSet];\n return {\n component: iconSet.component,\n icon: iconName\n };\n });\n return {\n iconData\n };\n};\n//# sourceMappingURL=icons.mjs.map","export const singleOpenStrategy = {\n open: _ref => {\n let {\n id,\n value,\n opened,\n parents\n } = _ref;\n if (value) {\n const newOpened = new Set();\n newOpened.add(id);\n let parent = parents.get(id);\n while (parent != null) {\n newOpened.add(parent);\n parent = parents.get(parent);\n }\n return newOpened;\n } else {\n opened.delete(id);\n return opened;\n }\n },\n select: () => null\n};\nexport const multipleOpenStrategy = {\n open: _ref2 => {\n let {\n id,\n value,\n opened,\n parents\n } = _ref2;\n if (value) {\n let parent = parents.get(id);\n opened.add(id);\n while (parent != null && parent !== id) {\n opened.add(parent);\n parent = parents.get(parent);\n }\n return opened;\n } else {\n opened.delete(id);\n }\n return opened;\n },\n select: () => null\n};\nexport const listOpenStrategy = {\n open: multipleOpenStrategy.open,\n select: _ref3 => {\n let {\n id,\n value,\n opened,\n parents\n } = _ref3;\n if (!value) return opened;\n const path = [];\n let parent = parents.get(id);\n while (parent != null) {\n path.push(parent);\n parent = parents.get(parent);\n }\n return new Set(path);\n }\n};\n//# sourceMappingURL=openStrategies.mjs.map","/* eslint-disable sonarjs/no-identical-functions */\n// Utilities\nimport { toRaw } from 'vue';\nexport const independentSelectStrategy = mandatory => {\n const strategy = {\n select: _ref => {\n let {\n id,\n value,\n selected\n } = _ref;\n id = toRaw(id);\n\n // When mandatory and we're trying to deselect when id\n // is the only currently selected item then do nothing\n if (mandatory && !value) {\n const on = Array.from(selected.entries()).reduce((arr, _ref2) => {\n let [key, value] = _ref2;\n return value === 'on' ? [...arr, key] : arr;\n }, []);\n if (on.length === 1 && on[0] === id) return selected;\n }\n selected.set(id, value ? 'on' : 'off');\n return selected;\n },\n in: (v, children, parents) => {\n let map = new Map();\n for (const id of v || []) {\n map = strategy.select({\n id,\n value: true,\n selected: new Map(map),\n children,\n parents\n });\n }\n return map;\n },\n out: v => {\n const arr = [];\n for (const [key, value] of v.entries()) {\n if (value === 'on') arr.push(key);\n }\n return arr;\n }\n };\n return strategy;\n};\nexport const independentSingleSelectStrategy = mandatory => {\n const parentStrategy = independentSelectStrategy(mandatory);\n const strategy = {\n select: _ref3 => {\n let {\n selected,\n id,\n ...rest\n } = _ref3;\n id = toRaw(id);\n const singleSelected = selected.has(id) ? new Map([[id, selected.get(id)]]) : new Map();\n return parentStrategy.select({\n ...rest,\n id,\n selected: singleSelected\n });\n },\n in: (v, children, parents) => {\n let map = new Map();\n if (v?.length) {\n map = parentStrategy.in(v.slice(0, 1), children, parents);\n }\n return map;\n },\n out: (v, children, parents) => {\n return parentStrategy.out(v, children, parents);\n }\n };\n return strategy;\n};\nexport const leafSelectStrategy = mandatory => {\n const parentStrategy = independentSelectStrategy(mandatory);\n const strategy = {\n select: _ref4 => {\n let {\n id,\n selected,\n children,\n ...rest\n } = _ref4;\n id = toRaw(id);\n if (children.has(id)) return selected;\n return parentStrategy.select({\n id,\n selected,\n children,\n ...rest\n });\n },\n in: parentStrategy.in,\n out: parentStrategy.out\n };\n return strategy;\n};\nexport const leafSingleSelectStrategy = mandatory => {\n const parentStrategy = independentSingleSelectStrategy(mandatory);\n const strategy = {\n select: _ref5 => {\n let {\n id,\n selected,\n children,\n ...rest\n } = _ref5;\n id = toRaw(id);\n if (children.has(id)) return selected;\n return parentStrategy.select({\n id,\n selected,\n children,\n ...rest\n });\n },\n in: parentStrategy.in,\n out: parentStrategy.out\n };\n return strategy;\n};\nexport const classicSelectStrategy = mandatory => {\n const strategy = {\n select: _ref6 => {\n let {\n id,\n value,\n selected,\n children,\n parents\n } = _ref6;\n id = toRaw(id);\n const original = new Map(selected);\n const items = [id];\n while (items.length) {\n const item = items.shift();\n selected.set(item, value ? 'on' : 'off');\n if (children.has(item)) {\n items.push(...children.get(item));\n }\n }\n let parent = parents.get(id);\n while (parent) {\n const childrenIds = children.get(parent);\n const everySelected = childrenIds.every(cid => selected.get(cid) === 'on');\n const noneSelected = childrenIds.every(cid => !selected.has(cid) || selected.get(cid) === 'off');\n selected.set(parent, everySelected ? 'on' : noneSelected ? 'off' : 'indeterminate');\n parent = parents.get(parent);\n }\n\n // If mandatory and planned deselect results in no selected\n // items then we can't do it, so return original state\n if (mandatory && !value) {\n const on = Array.from(selected.entries()).reduce((arr, _ref7) => {\n let [key, value] = _ref7;\n return value === 'on' ? [...arr, key] : arr;\n }, []);\n if (on.length === 0) return original;\n }\n return selected;\n },\n in: (v, children, parents) => {\n let map = new Map();\n for (const id of v || []) {\n map = strategy.select({\n id,\n value: true,\n selected: new Map(map),\n children,\n parents\n });\n }\n return map;\n },\n out: (v, children) => {\n const arr = [];\n for (const [key, value] of v.entries()) {\n if (value === 'on' && !children.has(key)) arr.push(key);\n }\n return arr;\n }\n };\n return strategy;\n};\n//# sourceMappingURL=selectStrategies.mjs.map","// Composables\nimport { useProxiedModel } from \"../proxiedModel.mjs\"; // Utilities\nimport { computed, inject, onBeforeUnmount, provide, ref, shallowRef, toRaw } from 'vue';\nimport { listOpenStrategy, multipleOpenStrategy, singleOpenStrategy } from \"./openStrategies.mjs\";\nimport { classicSelectStrategy, independentSelectStrategy, independentSingleSelectStrategy, leafSelectStrategy, leafSingleSelectStrategy } from \"./selectStrategies.mjs\";\nimport { getCurrentInstance, getUid, propsFactory } from \"../../util/index.mjs\"; // Types\nexport const VNestedSymbol = Symbol.for('vuetify:nested');\nexport const emptyNested = {\n id: shallowRef(),\n root: {\n register: () => null,\n unregister: () => null,\n parents: ref(new Map()),\n children: ref(new Map()),\n open: () => null,\n openOnSelect: () => null,\n select: () => null,\n opened: ref(new Set()),\n selected: ref(new Map()),\n selectedValues: ref([])\n }\n};\nexport const makeNestedProps = propsFactory({\n selectStrategy: [String, Function],\n openStrategy: [String, Object],\n opened: Array,\n selected: Array,\n mandatory: Boolean\n}, 'nested');\nexport const useNested = props => {\n let isUnmounted = false;\n const children = ref(new Map());\n const parents = ref(new Map());\n const opened = useProxiedModel(props, 'opened', props.opened, v => new Set(v), v => [...v.values()]);\n const selectStrategy = computed(() => {\n if (typeof props.selectStrategy === 'object') return props.selectStrategy;\n switch (props.selectStrategy) {\n case 'single-leaf':\n return leafSingleSelectStrategy(props.mandatory);\n case 'leaf':\n return leafSelectStrategy(props.mandatory);\n case 'independent':\n return independentSelectStrategy(props.mandatory);\n case 'single-independent':\n return independentSingleSelectStrategy(props.mandatory);\n case 'classic':\n default:\n return classicSelectStrategy(props.mandatory);\n }\n });\n const openStrategy = computed(() => {\n if (typeof props.openStrategy === 'object') return props.openStrategy;\n switch (props.openStrategy) {\n case 'list':\n return listOpenStrategy;\n case 'single':\n return singleOpenStrategy;\n case 'multiple':\n default:\n return multipleOpenStrategy;\n }\n });\n const selected = useProxiedModel(props, 'selected', props.selected, v => selectStrategy.value.in(v, children.value, parents.value), v => selectStrategy.value.out(v, children.value, parents.value));\n onBeforeUnmount(() => {\n isUnmounted = true;\n });\n function getPath(id) {\n const path = [];\n let parent = id;\n while (parent != null) {\n path.unshift(parent);\n parent = parents.value.get(parent);\n }\n return path;\n }\n const vm = getCurrentInstance('nested');\n const nested = {\n id: shallowRef(),\n root: {\n opened,\n selected,\n selectedValues: computed(() => {\n const arr = [];\n for (const [key, value] of selected.value.entries()) {\n if (value === 'on') arr.push(key);\n }\n return arr;\n }),\n register: (id, parentId, isGroup) => {\n parentId && id !== parentId && parents.value.set(id, parentId);\n isGroup && children.value.set(id, []);\n if (parentId != null) {\n children.value.set(parentId, [...(children.value.get(parentId) || []), id]);\n }\n },\n unregister: id => {\n if (isUnmounted) return;\n children.value.delete(id);\n const parent = parents.value.get(id);\n if (parent) {\n const list = children.value.get(parent) ?? [];\n children.value.set(parent, list.filter(child => child !== id));\n }\n parents.value.delete(id);\n opened.value.delete(id);\n },\n open: (id, value, event) => {\n vm.emit('click:open', {\n id,\n value,\n path: getPath(id),\n event\n });\n const newOpened = openStrategy.value.open({\n id,\n value,\n opened: new Set(opened.value),\n children: children.value,\n parents: parents.value,\n event\n });\n newOpened && (opened.value = newOpened);\n },\n openOnSelect: (id, value, event) => {\n const newOpened = openStrategy.value.select({\n id,\n value,\n selected: new Map(selected.value),\n opened: new Set(opened.value),\n children: children.value,\n parents: parents.value,\n event\n });\n newOpened && (opened.value = newOpened);\n },\n select: (id, value, event) => {\n vm.emit('click:select', {\n id,\n value,\n path: getPath(id),\n event\n });\n const newSelected = selectStrategy.value.select({\n id,\n value,\n selected: new Map(selected.value),\n children: children.value,\n parents: parents.value,\n event\n });\n newSelected && (selected.value = newSelected);\n nested.root.openOnSelect(id, value, event);\n },\n children,\n parents\n }\n };\n provide(VNestedSymbol, nested);\n return nested.root;\n};\nexport const useNestedItem = (id, isGroup) => {\n const parent = inject(VNestedSymbol, emptyNested);\n const uidSymbol = Symbol(getUid());\n const computedId = computed(() => id.value !== undefined ? id.value : uidSymbol);\n const item = {\n ...parent,\n id: computedId,\n open: (open, e) => parent.root.open(computedId.value, open, e),\n openOnSelect: (open, e) => parent.root.openOnSelect(computedId.value, open, e),\n isOpen: computed(() => parent.root.opened.value.has(computedId.value)),\n parent: computed(() => parent.root.parents.value.get(computedId.value)),\n select: (selected, e) => parent.root.select(computedId.value, selected, e),\n isSelected: computed(() => parent.root.selected.value.get(toRaw(computedId.value)) === 'on'),\n isIndeterminate: computed(() => parent.root.selected.value.get(computedId.value) === 'indeterminate'),\n isLeaf: computed(() => !parent.root.children.value.get(computedId.value)),\n isGroupActivator: parent.isGroupActivator\n };\n !parent.isGroupActivator && parent.root.register(computedId.value, parent.id.value, isGroup);\n onBeforeUnmount(() => {\n !parent.isGroupActivator && parent.root.unregister(computedId.value);\n });\n isGroup && provide(VNestedSymbol, item);\n return item;\n};\nexport const useNestedGroupActivator = () => {\n const parent = inject(VNestedSymbol, emptyNested);\n provide(VNestedSymbol, {\n ...parent,\n isGroupActivator: true\n });\n};\n//# sourceMappingURL=nested.mjs.map","// Utilities\nimport { computed, onMounted, readonly, shallowRef } from 'vue';\n\n// Composables\nexport function useSsrBoot() {\n const isBooted = shallowRef(false);\n onMounted(() => {\n window.requestAnimationFrame(() => {\n isBooted.value = true;\n });\n });\n const ssrBootStyles = computed(() => !isBooted.value ? {\n transition: 'none !important'\n } : undefined);\n return {\n ssrBootStyles,\n isBooted: readonly(isBooted)\n };\n}\n//# sourceMappingURL=ssrBoot.mjs.map","// Utilities\nimport { propsFactory } from \"../util/index.mjs\"; // Types\n// Composables\nexport const makeTagProps = propsFactory({\n tag: {\n type: String,\n default: 'div'\n }\n}, 'tag');\n//# sourceMappingURL=tag.mjs.map","import { withDirectives as _withDirectives, vShow as _vShow, createVNode as _createVNode } from \"vue\";\n// Components\nimport { VExpandTransition } from \"../transitions/index.mjs\";\nimport { VDefaultsProvider } from \"../VDefaultsProvider/index.mjs\"; // Composables\nimport { useList } from \"./list.mjs\";\nimport { makeComponentProps } from \"../../composables/component.mjs\";\nimport { IconValue } from \"../../composables/icons.mjs\";\nimport { useNestedGroupActivator, useNestedItem } from \"../../composables/nested/nested.mjs\";\nimport { useSsrBoot } from \"../../composables/ssrBoot.mjs\";\nimport { makeTagProps } from \"../../composables/tag.mjs\";\nimport { MaybeTransition } from \"../../composables/transition.mjs\"; // Utilities\nimport { computed, toRef } from 'vue';\nimport { defineComponent, genericComponent, propsFactory, useRender } from \"../../util/index.mjs\";\nconst VListGroupActivator = defineComponent({\n name: 'VListGroupActivator',\n setup(_, _ref) {\n let {\n slots\n } = _ref;\n useNestedGroupActivator();\n return () => slots.default?.();\n }\n});\nexport const makeVListGroupProps = propsFactory({\n /* @deprecated */\n activeColor: String,\n baseColor: String,\n color: String,\n collapseIcon: {\n type: IconValue,\n default: '$collapse'\n },\n expandIcon: {\n type: IconValue,\n default: '$expand'\n },\n prependIcon: IconValue,\n appendIcon: IconValue,\n fluid: Boolean,\n subgroup: Boolean,\n title: String,\n value: null,\n ...makeComponentProps(),\n ...makeTagProps()\n}, 'VListGroup');\nexport const VListGroup = genericComponent()({\n name: 'VListGroup',\n props: makeVListGroupProps(),\n setup(props, _ref2) {\n let {\n slots\n } = _ref2;\n const {\n isOpen,\n open,\n id: _id\n } = useNestedItem(toRef(props, 'value'), true);\n const id = computed(() => `v-list-group--id-${String(_id.value)}`);\n const list = useList();\n const {\n isBooted\n } = useSsrBoot();\n function onClick(e) {\n open(!isOpen.value, e);\n }\n const activatorProps = computed(() => ({\n onClick,\n class: 'v-list-group__header',\n id: id.value\n }));\n const toggleIcon = computed(() => isOpen.value ? props.collapseIcon : props.expandIcon);\n const activatorDefaults = computed(() => ({\n VListItem: {\n active: isOpen.value,\n activeColor: props.activeColor,\n baseColor: props.baseColor,\n color: props.color,\n prependIcon: props.prependIcon || props.subgroup && toggleIcon.value,\n appendIcon: props.appendIcon || !props.subgroup && toggleIcon.value,\n title: props.title,\n value: props.value\n }\n }));\n useRender(() => _createVNode(props.tag, {\n \"class\": ['v-list-group', {\n 'v-list-group--prepend': list?.hasPrepend.value,\n 'v-list-group--fluid': props.fluid,\n 'v-list-group--subgroup': props.subgroup,\n 'v-list-group--open': isOpen.value\n }, props.class],\n \"style\": props.style\n }, {\n default: () => [slots.activator && _createVNode(VDefaultsProvider, {\n \"defaults\": activatorDefaults.value\n }, {\n default: () => [_createVNode(VListGroupActivator, null, {\n default: () => [slots.activator({\n props: activatorProps.value,\n isOpen: isOpen.value\n })]\n })]\n }), _createVNode(MaybeTransition, {\n \"transition\": {\n component: VExpandTransition\n },\n \"disabled\": !isBooted.value\n }, {\n default: () => [_withDirectives(_createVNode(\"div\", {\n \"class\": \"v-list-group__items\",\n \"role\": \"group\",\n \"aria-labelledby\": id.value\n }, [slots.default?.()]), [[_vShow, isOpen.value]])]\n })]\n }));\n return {};\n }\n});\n//# sourceMappingURL=VListGroup.mjs.map","// Utilities\nimport { createSimpleFunctional } from \"../../util/index.mjs\";\nexport const VListItemSubtitle = createSimpleFunctional('v-list-item-subtitle');\n//# sourceMappingURL=VListItemSubtitle.mjs.map","// Utilities\nimport { createSimpleFunctional } from \"../../util/index.mjs\";\nexport const VListItemTitle = createSimpleFunctional('v-list-item-title');\n//# sourceMappingURL=VListItemTitle.mjs.map","// Utilities\nimport { convertToUnit, destructComputed, getCurrentInstanceName, includes, propsFactory } from \"../util/index.mjs\"; // Types\nconst predefinedSizes = ['x-small', 'small', 'default', 'large', 'x-large'];\n// Composables\nexport const makeSizeProps = propsFactory({\n size: {\n type: [String, Number],\n default: 'default'\n }\n}, 'size');\nexport function useSize(props) {\n let name = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : getCurrentInstanceName();\n return destructComputed(() => {\n let sizeClasses;\n let sizeStyles;\n if (includes(predefinedSizes, props.size)) {\n sizeClasses = `${name}--size-${props.size}`;\n } else if (props.size) {\n sizeStyles = {\n width: convertToUnit(props.size),\n height: convertToUnit(props.size)\n };\n }\n return {\n sizeClasses,\n sizeStyles\n };\n });\n}\n//# sourceMappingURL=size.mjs.map","import { createVNode as _createVNode } from \"vue\";\n// Styles\nimport \"./VIcon.css\";\n\n// Composables\nimport { useTextColor } from \"../../composables/color.mjs\";\nimport { makeComponentProps } from \"../../composables/component.mjs\";\nimport { IconValue, useIcon } from \"../../composables/icons.mjs\";\nimport { makeSizeProps, useSize } from \"../../composables/size.mjs\";\nimport { makeTagProps } from \"../../composables/tag.mjs\";\nimport { makeThemeProps, provideTheme } from \"../../composables/theme.mjs\"; // Utilities\nimport { computed, ref, Text, toRef } from 'vue';\nimport { convertToUnit, flattenFragments, genericComponent, propsFactory, useRender } from \"../../util/index.mjs\";\nexport const makeVIconProps = propsFactory({\n color: String,\n start: Boolean,\n end: Boolean,\n icon: IconValue,\n ...makeComponentProps(),\n ...makeSizeProps(),\n ...makeTagProps({\n tag: 'i'\n }),\n ...makeThemeProps()\n}, 'VIcon');\nexport const VIcon = genericComponent()({\n name: 'VIcon',\n props: makeVIconProps(),\n setup(props, _ref) {\n let {\n attrs,\n slots\n } = _ref;\n const slotIcon = ref();\n const {\n themeClasses\n } = provideTheme(props);\n const {\n iconData\n } = useIcon(computed(() => slotIcon.value || props.icon));\n const {\n sizeClasses\n } = useSize(props);\n const {\n textColorClasses,\n textColorStyles\n } = useTextColor(toRef(props, 'color'));\n useRender(() => {\n const slotValue = slots.default?.();\n if (slotValue) {\n slotIcon.value = flattenFragments(slotValue).filter(node => node.type === Text && node.children && typeof node.children === 'string')[0]?.children;\n }\n return _createVNode(iconData.value.component, {\n \"tag\": props.tag,\n \"icon\": iconData.value.icon,\n \"class\": ['v-icon', 'notranslate', themeClasses.value, sizeClasses.value, textColorClasses.value, {\n 'v-icon--clickable': !!attrs.onClick,\n 'v-icon--start': props.start,\n 'v-icon--end': props.end\n }, props.class],\n \"style\": [!sizeClasses.value ? {\n fontSize: convertToUnit(props.size),\n height: convertToUnit(props.size),\n width: convertToUnit(props.size)\n } : undefined, textColorStyles.value, props.style],\n \"role\": attrs.onClick ? 'button' : undefined,\n \"aria-hidden\": !attrs.onClick\n }, {\n default: () => [slotValue]\n });\n });\n return {};\n }\n});\n//# sourceMappingURL=VIcon.mjs.map","import { createVNode as _createVNode } from \"vue\";\n// Styles\nimport \"./VResponsive.css\";\n\n// Composables\nimport { makeComponentProps } from \"../../composables/component.mjs\";\nimport { makeDimensionProps, useDimension } from \"../../composables/dimensions.mjs\"; // Utilities\nimport { computed } from 'vue';\nimport { genericComponent, propsFactory, useRender } from \"../../util/index.mjs\";\nexport function useAspectStyles(props) {\n return {\n aspectStyles: computed(() => {\n const ratio = Number(props.aspectRatio);\n return ratio ? {\n paddingBottom: String(1 / ratio * 100) + '%'\n } : undefined;\n })\n };\n}\nexport const makeVResponsiveProps = propsFactory({\n aspectRatio: [String, Number],\n contentClass: String,\n inline: Boolean,\n ...makeComponentProps(),\n ...makeDimensionProps()\n}, 'VResponsive');\nexport const VResponsive = genericComponent()({\n name: 'VResponsive',\n props: makeVResponsiveProps(),\n setup(props, _ref) {\n let {\n slots\n } = _ref;\n const {\n aspectStyles\n } = useAspectStyles(props);\n const {\n dimensionStyles\n } = useDimension(props);\n useRender(() => _createVNode(\"div\", {\n \"class\": ['v-responsive', {\n 'v-responsive--inline': props.inline\n }, props.class],\n \"style\": [dimensionStyles.value, props.style]\n }, [_createVNode(\"div\", {\n \"class\": \"v-responsive__sizer\",\n \"style\": aspectStyles.value\n }, null), slots.additional?.(), slots.default && _createVNode(\"div\", {\n \"class\": ['v-responsive__content', props.contentClass]\n }, [slots.default()])]));\n return {};\n }\n});\n//# sourceMappingURL=VResponsive.mjs.map","// Utilities\nimport { SUPPORTS_INTERSECTION } from \"../../util/index.mjs\"; // Types\nfunction mounted(el, binding) {\n if (!SUPPORTS_INTERSECTION) return;\n const modifiers = binding.modifiers || {};\n const value = binding.value;\n const {\n handler,\n options\n } = typeof value === 'object' ? value : {\n handler: value,\n options: {}\n };\n const observer = new IntersectionObserver(function () {\n let entries = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];\n let observer = arguments.length > 1 ? arguments[1] : undefined;\n const _observe = el._observe?.[binding.instance.$.uid];\n if (!_observe) return; // Just in case, should never fire\n\n const isIntersecting = entries.some(entry => entry.isIntersecting);\n\n // If is not quiet or has already been\n // initted, invoke the user callback\n if (handler && (!modifiers.quiet || _observe.init) && (!modifiers.once || isIntersecting || _observe.init)) {\n handler(isIntersecting, entries, observer);\n }\n if (isIntersecting && modifiers.once) unmounted(el, binding);else _observe.init = true;\n }, options);\n el._observe = Object(el._observe);\n el._observe[binding.instance.$.uid] = {\n init: false,\n observer\n };\n observer.observe(el);\n}\nfunction unmounted(el, binding) {\n const observe = el._observe?.[binding.instance.$.uid];\n if (!observe) return;\n observe.observer.unobserve(el);\n delete el._observe[binding.instance.$.uid];\n}\nexport const Intersect = {\n mounted,\n unmounted\n};\nexport default Intersect;\n//# sourceMappingURL=index.mjs.map","import { withDirectives as _withDirectives, mergeProps as _mergeProps, resolveDirective as _resolveDirective, Fragment as _Fragment, createVNode as _createVNode } from \"vue\";\n// Styles\nimport \"./VImg.css\";\n\n// Components\nimport { makeVResponsiveProps, VResponsive } from \"../VResponsive/VResponsive.mjs\"; // Composables\nimport { makeComponentProps } from \"../../composables/component.mjs\";\nimport { makeTransitionProps, MaybeTransition } from \"../../composables/transition.mjs\"; // Directives\nimport intersect from \"../../directives/intersect/index.mjs\"; // Utilities\nimport { computed, nextTick, onBeforeMount, ref, shallowRef, vShow, watch, withDirectives } from 'vue';\nimport { genericComponent, propsFactory, SUPPORTS_INTERSECTION, useRender } from \"../../util/index.mjs\"; // Types\nexport const makeVImgProps = propsFactory({\n alt: String,\n cover: Boolean,\n eager: Boolean,\n gradient: String,\n lazySrc: String,\n options: {\n type: Object,\n // For more information on types, navigate to:\n // https://developer.mozilla.org/en-US/docs/Web/API/Intersection_Observer_API\n default: () => ({\n root: undefined,\n rootMargin: undefined,\n threshold: undefined\n })\n },\n sizes: String,\n src: {\n type: [String, Object],\n default: ''\n },\n srcset: String,\n ...makeVResponsiveProps(),\n ...makeComponentProps(),\n ...makeTransitionProps()\n}, 'VImg');\nexport const VImg = genericComponent()({\n name: 'VImg',\n directives: {\n intersect\n },\n props: makeVImgProps(),\n emits: {\n loadstart: value => true,\n load: value => true,\n error: value => true\n },\n setup(props, _ref) {\n let {\n emit,\n slots\n } = _ref;\n const currentSrc = shallowRef(''); // Set from srcset\n const image = ref();\n const state = shallowRef(props.eager ? 'loading' : 'idle');\n const naturalWidth = shallowRef();\n const naturalHeight = shallowRef();\n const normalisedSrc = computed(() => {\n return props.src && typeof props.src === 'object' ? {\n src: props.src.src,\n srcset: props.srcset || props.src.srcset,\n lazySrc: props.lazySrc || props.src.lazySrc,\n aspect: Number(props.aspectRatio || props.src.aspect || 0)\n } : {\n src: props.src,\n srcset: props.srcset,\n lazySrc: props.lazySrc,\n aspect: Number(props.aspectRatio || 0)\n };\n });\n const aspectRatio = computed(() => {\n return normalisedSrc.value.aspect || naturalWidth.value / naturalHeight.value || 0;\n });\n watch(() => props.src, () => {\n init(state.value !== 'idle');\n });\n watch(aspectRatio, (val, oldVal) => {\n if (!val && oldVal && image.value) {\n pollForSize(image.value);\n }\n });\n\n // TODO: getSrc when window width changes\n\n onBeforeMount(() => init());\n function init(isIntersecting) {\n if (props.eager && isIntersecting) return;\n if (SUPPORTS_INTERSECTION && !isIntersecting && !props.eager) return;\n state.value = 'loading';\n if (normalisedSrc.value.lazySrc) {\n const lazyImg = new Image();\n lazyImg.src = normalisedSrc.value.lazySrc;\n pollForSize(lazyImg, null);\n }\n if (!normalisedSrc.value.src) return;\n nextTick(() => {\n emit('loadstart', image.value?.currentSrc || normalisedSrc.value.src);\n if (image.value?.complete) {\n if (!image.value.naturalWidth) {\n onError();\n }\n if (state.value === 'error') return;\n if (!aspectRatio.value) pollForSize(image.value, null);\n onLoad();\n } else {\n if (!aspectRatio.value) pollForSize(image.value);\n getSrc();\n }\n });\n }\n function onLoad() {\n getSrc();\n state.value = 'loaded';\n emit('load', image.value?.currentSrc || normalisedSrc.value.src);\n }\n function onError() {\n state.value = 'error';\n emit('error', image.value?.currentSrc || normalisedSrc.value.src);\n }\n function getSrc() {\n const img = image.value;\n if (img) currentSrc.value = img.currentSrc || img.src;\n }\n let timer = -1;\n function pollForSize(img) {\n let timeout = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 100;\n const poll = () => {\n clearTimeout(timer);\n const {\n naturalHeight: imgHeight,\n naturalWidth: imgWidth\n } = img;\n if (imgHeight || imgWidth) {\n naturalWidth.value = imgWidth;\n naturalHeight.value = imgHeight;\n } else if (!img.complete && state.value === 'loading' && timeout != null) {\n timer = window.setTimeout(poll, timeout);\n } else if (img.currentSrc.endsWith('.svg') || img.currentSrc.startsWith('data:image/svg+xml')) {\n naturalWidth.value = 1;\n naturalHeight.value = 1;\n }\n };\n poll();\n }\n const containClasses = computed(() => ({\n 'v-img__img--cover': props.cover,\n 'v-img__img--contain': !props.cover\n }));\n const __image = () => {\n if (!normalisedSrc.value.src || state.value === 'idle') return null;\n const img = _createVNode(\"img\", {\n \"class\": ['v-img__img', containClasses.value],\n \"src\": normalisedSrc.value.src,\n \"srcset\": normalisedSrc.value.srcset,\n \"alt\": props.alt,\n \"sizes\": props.sizes,\n \"ref\": image,\n \"onLoad\": onLoad,\n \"onError\": onError\n }, null);\n const sources = slots.sources?.();\n return _createVNode(MaybeTransition, {\n \"transition\": props.transition,\n \"appear\": true\n }, {\n default: () => [withDirectives(sources ? _createVNode(\"picture\", {\n \"class\": \"v-img__picture\"\n }, [sources, img]) : img, [[vShow, state.value === 'loaded']])]\n });\n };\n const __preloadImage = () => _createVNode(MaybeTransition, {\n \"transition\": props.transition\n }, {\n default: () => [normalisedSrc.value.lazySrc && state.value !== 'loaded' && _createVNode(\"img\", {\n \"class\": ['v-img__img', 'v-img__img--preload', containClasses.value],\n \"src\": normalisedSrc.value.lazySrc,\n \"alt\": props.alt\n }, null)]\n });\n const __placeholder = () => {\n if (!slots.placeholder) return null;\n return _createVNode(MaybeTransition, {\n \"transition\": props.transition,\n \"appear\": true\n }, {\n default: () => [(state.value === 'loading' || state.value === 'error' && !slots.error) && _createVNode(\"div\", {\n \"class\": \"v-img__placeholder\"\n }, [slots.placeholder()])]\n });\n };\n const __error = () => {\n if (!slots.error) return null;\n return _createVNode(MaybeTransition, {\n \"transition\": props.transition,\n \"appear\": true\n }, {\n default: () => [state.value === 'error' && _createVNode(\"div\", {\n \"class\": \"v-img__error\"\n }, [slots.error()])]\n });\n };\n const __gradient = () => {\n if (!props.gradient) return null;\n return _createVNode(\"div\", {\n \"class\": \"v-img__gradient\",\n \"style\": {\n backgroundImage: `linear-gradient(${props.gradient})`\n }\n }, null);\n };\n const isBooted = shallowRef(false);\n {\n const stop = watch(aspectRatio, val => {\n if (val) {\n // Doesn't work with nextTick, idk why\n requestAnimationFrame(() => {\n requestAnimationFrame(() => {\n isBooted.value = true;\n });\n });\n stop();\n }\n });\n }\n useRender(() => {\n const [responsiveProps] = VResponsive.filterProps(props);\n return _withDirectives(_createVNode(VResponsive, _mergeProps({\n \"class\": ['v-img', {\n 'v-img--booting': !isBooted.value\n }, props.class],\n \"style\": props.style\n }, responsiveProps, {\n \"aspectRatio\": aspectRatio.value,\n \"aria-label\": props.alt,\n \"role\": props.alt ? 'img' : undefined\n }), {\n additional: () => _createVNode(_Fragment, null, [_createVNode(__image, null, null), _createVNode(__preloadImage, null, null), _createVNode(__gradient, null, null), _createVNode(__placeholder, null, null), _createVNode(__error, null, null)]),\n default: slots.default\n }), [[_resolveDirective(\"intersect\"), {\n handler: init,\n options: props.options\n }, null, {\n once: true\n }]]);\n });\n return {\n currentSrc,\n image,\n state,\n naturalWidth,\n naturalHeight\n };\n }\n});\n//# sourceMappingURL=VImg.mjs.map","// Utilities\nimport { computed } from 'vue';\nimport { getCurrentInstanceName, propsFactory } from \"../util/index.mjs\"; // Types\nconst allowedDensities = [null, 'default', 'comfortable', 'compact'];\n\n// typeof allowedDensities[number] evalutes to any\n// when generating api types for whatever reason.\n\n// Composables\nexport const makeDensityProps = propsFactory({\n density: {\n type: String,\n default: 'default',\n validator: v => allowedDensities.includes(v)\n }\n}, 'density');\nexport function useDensity(props) {\n let name = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : getCurrentInstanceName();\n const densityClasses = computed(() => {\n return `${name}--density-${props.density}`;\n });\n return {\n densityClasses\n };\n}\n//# sourceMappingURL=density.mjs.map","// Utilities\nimport { computed, isRef } from 'vue';\nimport { getCurrentInstanceName, propsFactory } from \"../util/index.mjs\"; // Types\n// Composables\nexport const makeRoundedProps = propsFactory({\n rounded: {\n type: [Boolean, Number, String],\n default: undefined\n }\n}, 'rounded');\nexport function useRounded(props) {\n let name = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : getCurrentInstanceName();\n const roundedClasses = computed(() => {\n const rounded = isRef(props) ? props.value : props.rounded;\n const classes = [];\n if (rounded === true || rounded === '') {\n classes.push(`${name}--rounded`);\n } else if (typeof rounded === 'string' || rounded === 0) {\n for (const value of String(rounded).split(' ')) {\n classes.push(`rounded-${value}`);\n }\n }\n return classes;\n });\n return {\n roundedClasses\n };\n}\n//# sourceMappingURL=rounded.mjs.map","import { createVNode as _createVNode, Fragment as _Fragment } from \"vue\";\n// Composables\nimport { useColor } from \"./color.mjs\"; // Utilities\nimport { computed, unref } from 'vue';\nimport { getCurrentInstanceName, propsFactory } from \"../util/index.mjs\"; // Types\nexport const allowedVariants = ['elevated', 'flat', 'tonal', 'outlined', 'text', 'plain'];\nexport function genOverlays(isClickable, name) {\n return _createVNode(_Fragment, null, [isClickable && _createVNode(\"span\", {\n \"key\": \"overlay\",\n \"class\": `${name}__overlay`\n }, null), _createVNode(\"span\", {\n \"key\": \"underlay\",\n \"class\": `${name}__underlay`\n }, null)]);\n}\nexport const makeVariantProps = propsFactory({\n color: String,\n variant: {\n type: String,\n default: 'elevated',\n validator: v => allowedVariants.includes(v)\n }\n}, 'variant');\nexport function useVariant(props) {\n let name = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : getCurrentInstanceName();\n const variantClasses = computed(() => {\n const {\n variant\n } = unref(props);\n return `${name}--variant-${variant}`;\n });\n const {\n colorClasses,\n colorStyles\n } = useColor(computed(() => {\n const {\n variant,\n color\n } = unref(props);\n return {\n [['elevated', 'flat'].includes(variant) ? 'background' : 'text']: color\n };\n }));\n return {\n colorClasses,\n colorStyles,\n variantClasses\n };\n}\n//# sourceMappingURL=variant.mjs.map","import { createVNode as _createVNode } from \"vue\";\n// Styles\nimport \"./VAvatar.css\";\n\n// Components\nimport { VIcon } from \"../VIcon/index.mjs\";\nimport { VImg } from \"../VImg/index.mjs\"; // Composables\nimport { makeComponentProps } from \"../../composables/component.mjs\";\nimport { makeDensityProps, useDensity } from \"../../composables/density.mjs\";\nimport { IconValue } from \"../../composables/icons.mjs\";\nimport { makeRoundedProps, useRounded } from \"../../composables/rounded.mjs\";\nimport { makeSizeProps, useSize } from \"../../composables/size.mjs\";\nimport { makeTagProps } from \"../../composables/tag.mjs\";\nimport { makeThemeProps, provideTheme } from \"../../composables/theme.mjs\";\nimport { genOverlays, makeVariantProps, useVariant } from \"../../composables/variant.mjs\"; // Utilities\nimport { genericComponent, propsFactory, useRender } from \"../../util/index.mjs\";\nexport const makeVAvatarProps = propsFactory({\n start: Boolean,\n end: Boolean,\n icon: IconValue,\n image: String,\n ...makeComponentProps(),\n ...makeDensityProps(),\n ...makeRoundedProps(),\n ...makeSizeProps(),\n ...makeTagProps(),\n ...makeThemeProps(),\n ...makeVariantProps({\n variant: 'flat'\n })\n}, 'VAvatar');\nexport const VAvatar = genericComponent()({\n name: 'VAvatar',\n props: makeVAvatarProps(),\n setup(props, _ref) {\n let {\n slots\n } = _ref;\n const {\n themeClasses\n } = provideTheme(props);\n const {\n colorClasses,\n colorStyles,\n variantClasses\n } = useVariant(props);\n const {\n densityClasses\n } = useDensity(props);\n const {\n roundedClasses\n } = useRounded(props);\n const {\n sizeClasses,\n sizeStyles\n } = useSize(props);\n useRender(() => _createVNode(props.tag, {\n \"class\": ['v-avatar', {\n 'v-avatar--start': props.start,\n 'v-avatar--end': props.end\n }, themeClasses.value, colorClasses.value, densityClasses.value, roundedClasses.value, sizeClasses.value, variantClasses.value, props.class],\n \"style\": [colorStyles.value, sizeStyles.value, props.style]\n }, {\n default: () => [props.image ? _createVNode(VImg, {\n \"key\": \"image\",\n \"src\": props.image,\n \"alt\": \"\",\n \"cover\": true\n }, null) : props.icon ? _createVNode(VIcon, {\n \"key\": \"icon\",\n \"icon\": props.icon\n }, null) : slots.default?.(), genOverlays(false, 'v-avatar')]\n }));\n return {};\n }\n});\n//# sourceMappingURL=VAvatar.mjs.map","// Utilities\nimport { computed, isRef } from 'vue';\nimport { getCurrentInstanceName, propsFactory } from \"../util/index.mjs\"; // Types\n// Composables\nexport const makeBorderProps = propsFactory({\n border: [Boolean, Number, String]\n}, 'border');\nexport function useBorder(props) {\n let name = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : getCurrentInstanceName();\n const borderClasses = computed(() => {\n const border = isRef(props) ? props.value : props.border;\n const classes = [];\n if (border === true || border === '') {\n classes.push(`${name}--border`);\n } else if (typeof border === 'string' || border === 0) {\n for (const value of String(border).split(' ')) {\n classes.push(`border-${value}`);\n }\n }\n return classes;\n });\n return {\n borderClasses\n };\n}\n//# sourceMappingURL=border.mjs.map","// Utilities\nimport { computed, isRef } from 'vue';\nimport { propsFactory } from \"../util/index.mjs\"; // Types\n// Composables\nexport const makeElevationProps = propsFactory({\n elevation: {\n type: [Number, String],\n validator(v) {\n const value = parseInt(v);\n return !isNaN(value) && value >= 0 &&\n // Material Design has a maximum elevation of 24\n // https://material.io/design/environment/elevation.html#default-elevations\n value <= 24;\n }\n }\n}, 'elevation');\nexport function useElevation(props) {\n const elevationClasses = computed(() => {\n const elevation = isRef(props) ? props.value : props.elevation;\n const classes = [];\n if (elevation == null) return classes;\n classes.push(`elevation-${elevation}`);\n return classes;\n });\n return {\n elevationClasses\n };\n}\n//# sourceMappingURL=elevation.mjs.map","// Styles\nimport \"./VRipple.css\";\n\n// Utilities\nimport { isObject, keyCodes } from \"../../util/index.mjs\"; // Types\nconst stopSymbol = Symbol('rippleStop');\nconst DELAY_RIPPLE = 80;\nfunction transform(el, value) {\n el.style.transform = value;\n el.style.webkitTransform = value;\n}\nfunction isTouchEvent(e) {\n return e.constructor.name === 'TouchEvent';\n}\nfunction isKeyboardEvent(e) {\n return e.constructor.name === 'KeyboardEvent';\n}\nconst calculate = function (e, el) {\n let value = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n let localX = 0;\n let localY = 0;\n if (!isKeyboardEvent(e)) {\n const offset = el.getBoundingClientRect();\n const target = isTouchEvent(e) ? e.touches[e.touches.length - 1] : e;\n localX = target.clientX - offset.left;\n localY = target.clientY - offset.top;\n }\n let radius = 0;\n let scale = 0.3;\n if (el._ripple?.circle) {\n scale = 0.15;\n radius = el.clientWidth / 2;\n radius = value.center ? radius : radius + Math.sqrt((localX - radius) ** 2 + (localY - radius) ** 2) / 4;\n } else {\n radius = Math.sqrt(el.clientWidth ** 2 + el.clientHeight ** 2) / 2;\n }\n const centerX = `${(el.clientWidth - radius * 2) / 2}px`;\n const centerY = `${(el.clientHeight - radius * 2) / 2}px`;\n const x = value.center ? centerX : `${localX - radius}px`;\n const y = value.center ? centerY : `${localY - radius}px`;\n return {\n radius,\n scale,\n x,\n y,\n centerX,\n centerY\n };\n};\nconst ripples = {\n /* eslint-disable max-statements */\n show(e, el) {\n let value = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n if (!el?._ripple?.enabled) {\n return;\n }\n const container = document.createElement('span');\n const animation = document.createElement('span');\n container.appendChild(animation);\n container.className = 'v-ripple__container';\n if (value.class) {\n container.className += ` ${value.class}`;\n }\n const {\n radius,\n scale,\n x,\n y,\n centerX,\n centerY\n } = calculate(e, el, value);\n const size = `${radius * 2}px`;\n animation.className = 'v-ripple__animation';\n animation.style.width = size;\n animation.style.height = size;\n el.appendChild(container);\n const computed = window.getComputedStyle(el);\n if (computed && computed.position === 'static') {\n el.style.position = 'relative';\n el.dataset.previousPosition = 'static';\n }\n animation.classList.add('v-ripple__animation--enter');\n animation.classList.add('v-ripple__animation--visible');\n transform(animation, `translate(${x}, ${y}) scale3d(${scale},${scale},${scale})`);\n animation.dataset.activated = String(performance.now());\n setTimeout(() => {\n animation.classList.remove('v-ripple__animation--enter');\n animation.classList.add('v-ripple__animation--in');\n transform(animation, `translate(${centerX}, ${centerY}) scale3d(1,1,1)`);\n }, 0);\n },\n hide(el) {\n if (!el?._ripple?.enabled) return;\n const ripples = el.getElementsByClassName('v-ripple__animation');\n if (ripples.length === 0) return;\n const animation = ripples[ripples.length - 1];\n if (animation.dataset.isHiding) return;else animation.dataset.isHiding = 'true';\n const diff = performance.now() - Number(animation.dataset.activated);\n const delay = Math.max(250 - diff, 0);\n setTimeout(() => {\n animation.classList.remove('v-ripple__animation--in');\n animation.classList.add('v-ripple__animation--out');\n setTimeout(() => {\n const ripples = el.getElementsByClassName('v-ripple__animation');\n if (ripples.length === 1 && el.dataset.previousPosition) {\n el.style.position = el.dataset.previousPosition;\n delete el.dataset.previousPosition;\n }\n if (animation.parentNode?.parentNode === el) el.removeChild(animation.parentNode);\n }, 300);\n }, delay);\n }\n};\nfunction isRippleEnabled(value) {\n return typeof value === 'undefined' || !!value;\n}\nfunction rippleShow(e) {\n const value = {};\n const element = e.currentTarget;\n if (!element?._ripple || element._ripple.touched || e[stopSymbol]) return;\n\n // Don't allow the event to trigger ripples on any other elements\n e[stopSymbol] = true;\n if (isTouchEvent(e)) {\n element._ripple.touched = true;\n element._ripple.isTouch = true;\n } else {\n // It's possible for touch events to fire\n // as mouse events on Android/iOS, this\n // will skip the event call if it has\n // already been registered as touch\n if (element._ripple.isTouch) return;\n }\n value.center = element._ripple.centered || isKeyboardEvent(e);\n if (element._ripple.class) {\n value.class = element._ripple.class;\n }\n if (isTouchEvent(e)) {\n // already queued that shows or hides the ripple\n if (element._ripple.showTimerCommit) return;\n element._ripple.showTimerCommit = () => {\n ripples.show(e, element, value);\n };\n element._ripple.showTimer = window.setTimeout(() => {\n if (element?._ripple?.showTimerCommit) {\n element._ripple.showTimerCommit();\n element._ripple.showTimerCommit = null;\n }\n }, DELAY_RIPPLE);\n } else {\n ripples.show(e, element, value);\n }\n}\nfunction rippleStop(e) {\n e[stopSymbol] = true;\n}\nfunction rippleHide(e) {\n const element = e.currentTarget;\n if (!element?._ripple) return;\n window.clearTimeout(element._ripple.showTimer);\n\n // The touch interaction occurs before the show timer is triggered.\n // We still want to show ripple effect.\n if (e.type === 'touchend' && element._ripple.showTimerCommit) {\n element._ripple.showTimerCommit();\n element._ripple.showTimerCommit = null;\n\n // re-queue ripple hiding\n element._ripple.showTimer = window.setTimeout(() => {\n rippleHide(e);\n });\n return;\n }\n window.setTimeout(() => {\n if (element._ripple) {\n element._ripple.touched = false;\n }\n });\n ripples.hide(element);\n}\nfunction rippleCancelShow(e) {\n const element = e.currentTarget;\n if (!element?._ripple) return;\n if (element._ripple.showTimerCommit) {\n element._ripple.showTimerCommit = null;\n }\n window.clearTimeout(element._ripple.showTimer);\n}\nlet keyboardRipple = false;\nfunction keyboardRippleShow(e) {\n if (!keyboardRipple && (e.keyCode === keyCodes.enter || e.keyCode === keyCodes.space)) {\n keyboardRipple = true;\n rippleShow(e);\n }\n}\nfunction keyboardRippleHide(e) {\n keyboardRipple = false;\n rippleHide(e);\n}\nfunction focusRippleHide(e) {\n if (keyboardRipple) {\n keyboardRipple = false;\n rippleHide(e);\n }\n}\nfunction updateRipple(el, binding, wasEnabled) {\n const {\n value,\n modifiers\n } = binding;\n const enabled = isRippleEnabled(value);\n if (!enabled) {\n ripples.hide(el);\n }\n el._ripple = el._ripple ?? {};\n el._ripple.enabled = enabled;\n el._ripple.centered = modifiers.center;\n el._ripple.circle = modifiers.circle;\n if (isObject(value) && value.class) {\n el._ripple.class = value.class;\n }\n if (enabled && !wasEnabled) {\n if (modifiers.stop) {\n el.addEventListener('touchstart', rippleStop, {\n passive: true\n });\n el.addEventListener('mousedown', rippleStop);\n return;\n }\n el.addEventListener('touchstart', rippleShow, {\n passive: true\n });\n el.addEventListener('touchend', rippleHide, {\n passive: true\n });\n el.addEventListener('touchmove', rippleCancelShow, {\n passive: true\n });\n el.addEventListener('touchcancel', rippleHide);\n el.addEventListener('mousedown', rippleShow);\n el.addEventListener('mouseup', rippleHide);\n el.addEventListener('mouseleave', rippleHide);\n el.addEventListener('keydown', keyboardRippleShow);\n el.addEventListener('keyup', keyboardRippleHide);\n el.addEventListener('blur', focusRippleHide);\n\n // Anchor tags can be dragged, causes other hides to fail - #1537\n el.addEventListener('dragstart', rippleHide, {\n passive: true\n });\n } else if (!enabled && wasEnabled) {\n removeListeners(el);\n }\n}\nfunction removeListeners(el) {\n el.removeEventListener('mousedown', rippleShow);\n el.removeEventListener('touchstart', rippleShow);\n el.removeEventListener('touchend', rippleHide);\n el.removeEventListener('touchmove', rippleCancelShow);\n el.removeEventListener('touchcancel', rippleHide);\n el.removeEventListener('mouseup', rippleHide);\n el.removeEventListener('mouseleave', rippleHide);\n el.removeEventListener('keydown', keyboardRippleShow);\n el.removeEventListener('keyup', keyboardRippleHide);\n el.removeEventListener('dragstart', rippleHide);\n el.removeEventListener('blur', focusRippleHide);\n}\nfunction mounted(el, binding) {\n updateRipple(el, binding, false);\n}\nfunction unmounted(el) {\n delete el._ripple;\n removeListeners(el);\n}\nfunction updated(el, binding) {\n if (binding.value === binding.oldValue) {\n return;\n }\n const wasEnabled = isRippleEnabled(binding.oldValue);\n updateRipple(el, binding, wasEnabled);\n}\nexport const Ripple = {\n mounted,\n unmounted,\n updated\n};\nexport default Ripple;\n//# sourceMappingURL=index.mjs.map","import { withDirectives as _withDirectives, resolveDirective as _resolveDirective, createVNode as _createVNode, Fragment as _Fragment } from \"vue\";\n// Styles\nimport \"./VListItem.css\";\n\n// Components\nimport { VListItemSubtitle } from \"./VListItemSubtitle.mjs\";\nimport { VListItemTitle } from \"./VListItemTitle.mjs\";\nimport { VAvatar } from \"../VAvatar/index.mjs\";\nimport { VDefaultsProvider } from \"../VDefaultsProvider/index.mjs\";\nimport { VIcon } from \"../VIcon/index.mjs\"; // Composables\nimport { useList } from \"./list.mjs\";\nimport { makeBorderProps, useBorder } from \"../../composables/border.mjs\";\nimport { makeComponentProps } from \"../../composables/component.mjs\";\nimport { makeDensityProps, useDensity } from \"../../composables/density.mjs\";\nimport { makeDimensionProps, useDimension } from \"../../composables/dimensions.mjs\";\nimport { makeElevationProps, useElevation } from \"../../composables/elevation.mjs\";\nimport { IconValue } from \"../../composables/icons.mjs\";\nimport { useNestedItem } from \"../../composables/nested/nested.mjs\";\nimport { makeRoundedProps, useRounded } from \"../../composables/rounded.mjs\";\nimport { makeRouterProps, useLink } from \"../../composables/router.mjs\";\nimport { makeTagProps } from \"../../composables/tag.mjs\";\nimport { makeThemeProps, provideTheme } from \"../../composables/theme.mjs\";\nimport { genOverlays, makeVariantProps, useVariant } from \"../../composables/variant.mjs\"; // Directives\nimport { Ripple } from \"../../directives/ripple/index.mjs\"; // Utilities\nimport { computed, watch } from 'vue';\nimport { deprecate, EventProp, genericComponent, propsFactory, useRender } from \"../../util/index.mjs\"; // Types\nexport const makeVListItemProps = propsFactory({\n active: {\n type: Boolean,\n default: undefined\n },\n activeClass: String,\n /* @deprecated */\n activeColor: String,\n appendAvatar: String,\n appendIcon: IconValue,\n baseColor: String,\n disabled: Boolean,\n lines: String,\n link: {\n type: Boolean,\n default: undefined\n },\n nav: Boolean,\n prependAvatar: String,\n prependIcon: IconValue,\n ripple: {\n type: [Boolean, Object],\n default: true\n },\n subtitle: [String, Number, Boolean],\n title: [String, Number, Boolean],\n value: null,\n onClick: EventProp(),\n onClickOnce: EventProp(),\n ...makeBorderProps(),\n ...makeComponentProps(),\n ...makeDensityProps(),\n ...makeDimensionProps(),\n ...makeElevationProps(),\n ...makeRoundedProps(),\n ...makeRouterProps(),\n ...makeTagProps(),\n ...makeThemeProps(),\n ...makeVariantProps({\n variant: 'text'\n })\n}, 'VListItem');\nexport const VListItem = genericComponent()({\n name: 'VListItem',\n directives: {\n Ripple\n },\n props: makeVListItemProps(),\n emits: {\n click: e => true\n },\n setup(props, _ref) {\n let {\n attrs,\n slots,\n emit\n } = _ref;\n const link = useLink(props, attrs);\n const id = computed(() => props.value === undefined ? link.href.value : props.value);\n const {\n select,\n isSelected,\n isIndeterminate,\n isGroupActivator,\n root,\n parent,\n openOnSelect\n } = useNestedItem(id, false);\n const list = useList();\n const isActive = computed(() => props.active !== false && (props.active || link.isActive?.value || isSelected.value));\n const isLink = computed(() => props.link !== false && link.isLink.value);\n const isClickable = computed(() => !props.disabled && props.link !== false && (props.link || link.isClickable.value || props.value != null && !!list));\n const roundedProps = computed(() => props.rounded || props.nav);\n const color = computed(() => props.color ?? props.activeColor);\n const variantProps = computed(() => ({\n color: isActive.value ? color.value ?? props.baseColor : props.baseColor,\n variant: props.variant\n }));\n watch(() => link.isActive?.value, val => {\n if (val && parent.value != null) {\n root.open(parent.value, true);\n }\n if (val) {\n openOnSelect(val);\n }\n }, {\n immediate: true\n });\n const {\n themeClasses\n } = provideTheme(props);\n const {\n borderClasses\n } = useBorder(props);\n const {\n colorClasses,\n colorStyles,\n variantClasses\n } = useVariant(variantProps);\n const {\n densityClasses\n } = useDensity(props);\n const {\n dimensionStyles\n } = useDimension(props);\n const {\n elevationClasses\n } = useElevation(props);\n const {\n roundedClasses\n } = useRounded(roundedProps);\n const lineClasses = computed(() => props.lines ? `v-list-item--${props.lines}-line` : undefined);\n const slotProps = computed(() => ({\n isActive: isActive.value,\n select,\n isSelected: isSelected.value,\n isIndeterminate: isIndeterminate.value\n }));\n function onClick(e) {\n emit('click', e);\n if (isGroupActivator || !isClickable.value) return;\n link.navigate?.(e);\n props.value != null && select(!isSelected.value, e);\n }\n function onKeyDown(e) {\n if (e.key === 'Enter' || e.key === ' ') {\n e.preventDefault();\n onClick(e);\n }\n }\n useRender(() => {\n const Tag = isLink.value ? 'a' : props.tag;\n const hasTitle = slots.title || props.title;\n const hasSubtitle = slots.subtitle || props.subtitle;\n const hasAppendMedia = !!(props.appendAvatar || props.appendIcon);\n const hasAppend = !!(hasAppendMedia || slots.append);\n const hasPrependMedia = !!(props.prependAvatar || props.prependIcon);\n const hasPrepend = !!(hasPrependMedia || slots.prepend);\n list?.updateHasPrepend(hasPrepend);\n if (props.activeColor) {\n deprecate('active-color', ['color', 'base-color']);\n }\n return _withDirectives(_createVNode(Tag, {\n \"class\": ['v-list-item', {\n 'v-list-item--active': isActive.value,\n 'v-list-item--disabled': props.disabled,\n 'v-list-item--link': isClickable.value,\n 'v-list-item--nav': props.nav,\n 'v-list-item--prepend': !hasPrepend && list?.hasPrepend.value,\n [`${props.activeClass}`]: props.activeClass && isActive.value\n }, themeClasses.value, borderClasses.value, colorClasses.value, densityClasses.value, elevationClasses.value, lineClasses.value, roundedClasses.value, variantClasses.value, props.class],\n \"style\": [colorStyles.value, dimensionStyles.value, props.style],\n \"href\": link.href.value,\n \"tabindex\": isClickable.value ? list ? -2 : 0 : undefined,\n \"onClick\": onClick,\n \"onKeydown\": isClickable.value && !isLink.value && onKeyDown\n }, {\n default: () => [genOverlays(isClickable.value || isActive.value, 'v-list-item'), hasPrepend && _createVNode(\"div\", {\n \"key\": \"prepend\",\n \"class\": \"v-list-item__prepend\"\n }, [!slots.prepend ? _createVNode(_Fragment, null, [props.prependAvatar && _createVNode(VAvatar, {\n \"key\": \"prepend-avatar\",\n \"density\": props.density,\n \"image\": props.prependAvatar\n }, null), props.prependIcon && _createVNode(VIcon, {\n \"key\": \"prepend-icon\",\n \"density\": props.density,\n \"icon\": props.prependIcon\n }, null)]) : _createVNode(VDefaultsProvider, {\n \"key\": \"prepend-defaults\",\n \"disabled\": !hasPrependMedia,\n \"defaults\": {\n VAvatar: {\n density: props.density,\n image: props.prependAvatar\n },\n VIcon: {\n density: props.density,\n icon: props.prependIcon\n },\n VListItemAction: {\n start: true\n }\n }\n }, {\n default: () => [slots.prepend?.(slotProps.value)]\n })]), _createVNode(\"div\", {\n \"class\": \"v-list-item__content\",\n \"data-no-activator\": \"\"\n }, [hasTitle && _createVNode(VListItemTitle, {\n \"key\": \"title\"\n }, {\n default: () => [slots.title?.({\n title: props.title\n }) ?? props.title]\n }), hasSubtitle && _createVNode(VListItemSubtitle, {\n \"key\": \"subtitle\"\n }, {\n default: () => [slots.subtitle?.({\n subtitle: props.subtitle\n }) ?? props.subtitle]\n }), slots.default?.(slotProps.value)]), hasAppend && _createVNode(\"div\", {\n \"key\": \"append\",\n \"class\": \"v-list-item__append\"\n }, [!slots.append ? _createVNode(_Fragment, null, [props.appendIcon && _createVNode(VIcon, {\n \"key\": \"append-icon\",\n \"density\": props.density,\n \"icon\": props.appendIcon\n }, null), props.appendAvatar && _createVNode(VAvatar, {\n \"key\": \"append-avatar\",\n \"density\": props.density,\n \"image\": props.appendAvatar\n }, null)]) : _createVNode(VDefaultsProvider, {\n \"key\": \"append-defaults\",\n \"disabled\": !hasAppendMedia,\n \"defaults\": {\n VAvatar: {\n density: props.density,\n image: props.appendAvatar\n },\n VIcon: {\n density: props.density,\n icon: props.appendIcon\n },\n VListItemAction: {\n end: true\n }\n }\n }, {\n default: () => [slots.append?.(slotProps.value)]\n })])]\n }), [[_resolveDirective(\"ripple\"), isClickable.value && props.ripple]]);\n });\n return {};\n }\n});\n//# sourceMappingURL=VListItem.mjs.map","import { createVNode as _createVNode } from \"vue\";\n// Composables\nimport { useTextColor } from \"../../composables/color.mjs\";\nimport { makeComponentProps } from \"../../composables/component.mjs\";\nimport { makeTagProps } from \"../../composables/tag.mjs\"; // Utilities\nimport { toRef } from 'vue';\nimport { genericComponent, propsFactory, useRender } from \"../../util/index.mjs\";\nexport const makeVListSubheaderProps = propsFactory({\n color: String,\n inset: Boolean,\n sticky: Boolean,\n title: String,\n ...makeComponentProps(),\n ...makeTagProps()\n}, 'VListSubheader');\nexport const VListSubheader = genericComponent()({\n name: 'VListSubheader',\n props: makeVListSubheaderProps(),\n setup(props, _ref) {\n let {\n slots\n } = _ref;\n const {\n textColorClasses,\n textColorStyles\n } = useTextColor(toRef(props, 'color'));\n useRender(() => {\n const hasText = !!(slots.default || props.title);\n return _createVNode(props.tag, {\n \"class\": ['v-list-subheader', {\n 'v-list-subheader--inset': props.inset,\n 'v-list-subheader--sticky': props.sticky\n }, textColorClasses.value, props.class],\n \"style\": [{\n textColorStyles\n }, props.style]\n }, {\n default: () => [hasText && _createVNode(\"div\", {\n \"class\": \"v-list-subheader__text\"\n }, [slots.default?.() ?? props.title])]\n });\n });\n return {};\n }\n});\n//# sourceMappingURL=VListSubheader.mjs.map","import { createVNode as _createVNode } from \"vue\";\n// Styles\nimport \"./VDivider.css\";\n\n// Composables\nimport { useTextColor } from \"../../composables/color.mjs\";\nimport { makeComponentProps } from \"../../composables/component.mjs\";\nimport { makeThemeProps, provideTheme } from \"../../composables/theme.mjs\"; // Utilities\nimport { computed, toRef } from 'vue';\nimport { convertToUnit, genericComponent, propsFactory, useRender } from \"../../util/index.mjs\";\nexport const makeVDividerProps = propsFactory({\n color: String,\n inset: Boolean,\n length: [Number, String],\n thickness: [Number, String],\n vertical: Boolean,\n ...makeComponentProps(),\n ...makeThemeProps()\n}, 'VDivider');\nexport const VDivider = genericComponent()({\n name: 'VDivider',\n props: makeVDividerProps(),\n setup(props, _ref) {\n let {\n attrs\n } = _ref;\n const {\n themeClasses\n } = provideTheme(props);\n const {\n textColorClasses,\n textColorStyles\n } = useTextColor(toRef(props, 'color'));\n const dividerStyles = computed(() => {\n const styles = {};\n if (props.length) {\n styles[props.vertical ? 'maxHeight' : 'maxWidth'] = convertToUnit(props.length);\n }\n if (props.thickness) {\n styles[props.vertical ? 'borderRightWidth' : 'borderTopWidth'] = convertToUnit(props.thickness);\n }\n return styles;\n });\n useRender(() => _createVNode(\"hr\", {\n \"class\": [{\n 'v-divider': true,\n 'v-divider--inset': props.inset,\n 'v-divider--vertical': props.vertical\n }, themeClasses.value, textColorClasses.value, props.class],\n \"style\": [dividerStyles.value, textColorStyles.value, props.style],\n \"aria-orientation\": !attrs.role || attrs.role === 'separator' ? props.vertical ? 'vertical' : 'horizontal' : undefined,\n \"role\": `${attrs.role || 'separator'}`\n }, null));\n return {};\n }\n});\n//# sourceMappingURL=VDivider.mjs.map","import { mergeProps as _mergeProps, resolveDirective as _resolveDirective, createVNode as _createVNode } from \"vue\";\n// Components\nimport { VListGroup } from \"./VListGroup.mjs\";\nimport { VListItem } from \"./VListItem.mjs\";\nimport { VListSubheader } from \"./VListSubheader.mjs\";\nimport { VDivider } from \"../VDivider/index.mjs\"; // Utilities\nimport { createList } from \"./list.mjs\";\nimport { genericComponent, propsFactory } from \"../../util/index.mjs\"; // Types\nexport const makeVListChildrenProps = propsFactory({\n items: Array\n}, 'VListChildren');\nexport const VListChildren = genericComponent()({\n name: 'VListChildren',\n props: makeVListChildrenProps(),\n setup(props, _ref) {\n let {\n slots\n } = _ref;\n createList();\n return () => slots.default?.() ?? props.items?.map(_ref2 => {\n let {\n children,\n props: itemProps,\n type,\n raw: item\n } = _ref2;\n if (type === 'divider') {\n return slots.divider?.({\n props: itemProps\n }) ?? _createVNode(VDivider, itemProps, null);\n }\n if (type === 'subheader') {\n return slots.subheader?.({\n props: itemProps\n }) ?? _createVNode(VListSubheader, itemProps, null);\n }\n const slotsWithItem = {\n subtitle: slots.subtitle ? slotProps => slots.subtitle?.({\n ...slotProps,\n item\n }) : undefined,\n prepend: slots.prepend ? slotProps => slots.prepend?.({\n ...slotProps,\n item\n }) : undefined,\n append: slots.append ? slotProps => slots.append?.({\n ...slotProps,\n item\n }) : undefined,\n title: slots.title ? slotProps => slots.title?.({\n ...slotProps,\n item\n }) : undefined\n };\n const [listGroupProps, _1] = VListGroup.filterProps(itemProps);\n return children ? _createVNode(VListGroup, _mergeProps({\n \"value\": itemProps?.value\n }, listGroupProps), {\n activator: _ref3 => {\n let {\n props: activatorProps\n } = _ref3;\n return slots.header ? slots.header({\n props: {\n ...itemProps,\n ...activatorProps\n }\n }) : _createVNode(VListItem, _mergeProps(itemProps, activatorProps), slotsWithItem);\n },\n default: () => _createVNode(VListChildren, {\n \"items\": children\n }, slots)\n }) : slots.item ? slots.item({\n props: itemProps\n }) : _createVNode(VListItem, itemProps, slotsWithItem);\n });\n }\n});\n//# sourceMappingURL=VListChildren.mjs.map","// Utilities\nimport { computed } from 'vue';\nimport { deepEqual, getPropertyFromItem, pick, propsFactory } from \"../util/index.mjs\"; // Types\n// Composables\nexport const makeItemsProps = propsFactory({\n items: {\n type: Array,\n default: () => []\n },\n itemTitle: {\n type: [String, Array, Function],\n default: 'title'\n },\n itemValue: {\n type: [String, Array, Function],\n default: 'value'\n },\n itemChildren: {\n type: [Boolean, String, Array, Function],\n default: 'children'\n },\n itemProps: {\n type: [Boolean, String, Array, Function],\n default: 'props'\n },\n returnObject: Boolean\n}, 'list-items');\nexport function transformItem(props, item) {\n const title = getPropertyFromItem(item, props.itemTitle, item);\n const value = props.returnObject ? item : getPropertyFromItem(item, props.itemValue, title);\n const children = getPropertyFromItem(item, props.itemChildren);\n const itemProps = props.itemProps === true ? typeof item === 'object' && item != null && !Array.isArray(item) ? 'children' in item ? pick(item, ['children'])[1] : item : undefined : getPropertyFromItem(item, props.itemProps);\n const _props = {\n title,\n value,\n ...itemProps\n };\n return {\n title: String(_props.title ?? ''),\n value: _props.value,\n props: _props,\n children: Array.isArray(children) ? transformItems(props, children) : undefined,\n raw: item\n };\n}\nexport function transformItems(props, items) {\n const array = [];\n for (const item of items) {\n array.push(transformItem(props, item));\n }\n return array;\n}\nexport function useItems(props) {\n const items = computed(() => transformItems(props, props.items));\n return useTransformItems(items, value => transformItem(props, value));\n}\nexport function useTransformItems(items, transform) {\n function transformIn(value) {\n return value\n // When the model value is null, returns an InternalItem based on null\n // only if null is one of the items\n .filter(v => v !== null || items.value.some(item => item.value === null)).map(v => {\n const existingItem = items.value.find(item => deepEqual(v, item.value));\n // Nullish existingItem means value is a custom input value from combobox\n // In this case, use transformItem to create an InternalItem based on value\n return existingItem ?? transform(v);\n });\n }\n function transformOut(value) {\n return value.map(_ref => {\n let {\n value\n } = _ref;\n return value;\n });\n }\n return {\n items,\n transformIn,\n transformOut\n };\n}\n//# sourceMappingURL=list-items.mjs.map","import { createVNode as _createVNode, resolveDirective as _resolveDirective } from \"vue\";\n// Styles\nimport \"./VList.css\";\n\n// Components\nimport { VListChildren } from \"./VListChildren.mjs\"; // Composables\nimport { createList } from \"./list.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 { makeDensityProps, useDensity } from \"../../composables/density.mjs\";\nimport { makeDimensionProps, useDimension } from \"../../composables/dimensions.mjs\";\nimport { makeElevationProps, useElevation } from \"../../composables/elevation.mjs\";\nimport { makeItemsProps } from \"../../composables/list-items.mjs\";\nimport { makeNestedProps, useNested } from \"../../composables/nested/nested.mjs\";\nimport { makeRoundedProps, useRounded } from \"../../composables/rounded.mjs\";\nimport { makeTagProps } from \"../../composables/tag.mjs\";\nimport { makeThemeProps, provideTheme } from \"../../composables/theme.mjs\";\nimport { makeVariantProps } from \"../../composables/variant.mjs\"; // Utilities\nimport { computed, ref, shallowRef, toRef } from 'vue';\nimport { focusChild, genericComponent, getPropertyFromItem, pick, propsFactory, useRender } from \"../../util/index.mjs\"; // Types\nfunction isPrimitive(value) {\n return typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean';\n}\nfunction transformItem(props, item) {\n const type = getPropertyFromItem(item, props.itemType, 'item');\n const title = isPrimitive(item) ? item : getPropertyFromItem(item, props.itemTitle);\n const value = getPropertyFromItem(item, props.itemValue, undefined);\n const children = getPropertyFromItem(item, props.itemChildren);\n const itemProps = props.itemProps === true ? pick(item, ['children'])[1] : getPropertyFromItem(item, props.itemProps);\n const _props = {\n title,\n value,\n ...itemProps\n };\n return {\n type,\n title: _props.title,\n value: _props.value,\n props: _props,\n children: type === 'item' && children ? transformItems(props, children) : undefined,\n raw: item\n };\n}\nfunction transformItems(props, items) {\n const array = [];\n for (const item of items) {\n array.push(transformItem(props, item));\n }\n return array;\n}\nfunction useListItems(props) {\n const items = computed(() => transformItems(props, props.items));\n return {\n items\n };\n}\nexport const makeVListProps = propsFactory({\n baseColor: String,\n /* @deprecated */\n activeColor: String,\n activeClass: String,\n bgColor: String,\n disabled: Boolean,\n lines: {\n type: [Boolean, String],\n default: 'one'\n },\n nav: Boolean,\n ...makeNestedProps({\n selectStrategy: 'single-leaf',\n openStrategy: 'list'\n }),\n ...makeBorderProps(),\n ...makeComponentProps(),\n ...makeDensityProps(),\n ...makeDimensionProps(),\n ...makeElevationProps(),\n itemType: {\n type: String,\n default: 'type'\n },\n ...makeItemsProps(),\n ...makeRoundedProps(),\n ...makeTagProps(),\n ...makeThemeProps(),\n ...makeVariantProps({\n variant: 'text'\n })\n}, 'VList');\nexport const VList = genericComponent()({\n name: 'VList',\n props: makeVListProps(),\n emits: {\n 'update:selected': val => true,\n 'update:opened': val => true,\n 'click:open': value => true,\n 'click:select': value => true\n },\n setup(props, _ref) {\n let {\n slots\n } = _ref;\n const {\n items\n } = useListItems(props);\n const {\n themeClasses\n } = provideTheme(props);\n const {\n backgroundColorClasses,\n backgroundColorStyles\n } = useBackgroundColor(toRef(props, 'bgColor'));\n const {\n borderClasses\n } = useBorder(props);\n const {\n densityClasses\n } = useDensity(props);\n const {\n dimensionStyles\n } = useDimension(props);\n const {\n elevationClasses\n } = useElevation(props);\n const {\n roundedClasses\n } = useRounded(props);\n const {\n open,\n select\n } = useNested(props);\n const lineClasses = computed(() => props.lines ? `v-list--${props.lines}-line` : undefined);\n const activeColor = toRef(props, 'activeColor');\n const baseColor = toRef(props, 'baseColor');\n const color = toRef(props, 'color');\n createList();\n provideDefaults({\n VListGroup: {\n activeColor,\n baseColor,\n color\n },\n VListItem: {\n activeClass: toRef(props, 'activeClass'),\n activeColor,\n baseColor,\n color,\n density: toRef(props, 'density'),\n disabled: toRef(props, 'disabled'),\n lines: toRef(props, 'lines'),\n nav: toRef(props, 'nav'),\n variant: toRef(props, 'variant')\n }\n });\n const isFocused = shallowRef(false);\n const contentRef = ref();\n function onFocusin(e) {\n isFocused.value = true;\n }\n function onFocusout(e) {\n isFocused.value = false;\n }\n function onFocus(e) {\n if (!isFocused.value && !(e.relatedTarget && contentRef.value?.contains(e.relatedTarget))) focus();\n }\n function onKeydown(e) {\n if (!contentRef.value) return;\n if (e.key === 'ArrowDown') {\n focus('next');\n } else if (e.key === 'ArrowUp') {\n focus('prev');\n } else if (e.key === 'Home') {\n focus('first');\n } else if (e.key === 'End') {\n focus('last');\n } else {\n return;\n }\n e.preventDefault();\n }\n function focus(location) {\n if (contentRef.value) {\n return focusChild(contentRef.value, location);\n }\n }\n useRender(() => {\n return _createVNode(props.tag, {\n \"ref\": contentRef,\n \"class\": ['v-list', {\n 'v-list--disabled': props.disabled,\n 'v-list--nav': props.nav\n }, themeClasses.value, backgroundColorClasses.value, borderClasses.value, densityClasses.value, elevationClasses.value, lineClasses.value, roundedClasses.value, props.class],\n \"style\": [backgroundColorStyles.value, dimensionStyles.value, props.style],\n \"tabindex\": props.disabled || isFocused.value ? -1 : 0,\n \"role\": \"listbox\",\n \"aria-activedescendant\": undefined,\n \"onFocusin\": onFocusin,\n \"onFocusout\": onFocusout,\n \"onFocus\": onFocus,\n \"onKeydown\": onKeydown\n }, {\n default: () => [_createVNode(VListChildren, {\n \"items\": items.value\n }, slots)]\n });\n });\n return {\n open,\n select,\n focus\n };\n }\n});\n//# sourceMappingURL=VList.mjs.map","\n\n\n\n\n","// 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 document.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 { useVelocity } from \"../../composables/touch.mjs\"; // Utilities\nimport { computed, onBeforeUnmount, onMounted, shallowRef } from 'vue';\n\n// Types\n\nexport function useTouch(_ref) {\n let {\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 maybeDragging = true;\n start = [touchX, touchY];\n offset.value = getOffset(isHorizontal.value ? touchX : touchY, isActive.value);\n dragProgress.value = getProgress(isHorizontal.value ? touchX : touchY);\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 return {\n isDragging,\n dragProgress,\n dragStyles\n };\n}\nfunction oops() {\n throw new Error();\n}\n//# sourceMappingURL=touch.mjs.map","// Utilities\nimport { onBeforeUnmount, readonly, ref, watch } from 'vue';\nimport { refElement } from \"../util/index.mjs\";\nimport { IN_BROWSER } from \"../util/globals.mjs\"; // Types\nexport function useResizeObserver(callback) {\n const resizeRef = ref();\n const contentRect = ref();\n if (IN_BROWSER) {\n const observer = new ResizeObserver(entries => {\n callback?.(entries, observer);\n if (!entries.length) return;\n contentRect.value = entries[0].contentRect;\n });\n onBeforeUnmount(() => {\n observer.disconnect();\n });\n watch(resizeRef, (newValue, oldValue) => {\n if (oldValue) {\n observer.unobserve(refElement(oldValue));\n contentRect.value = undefined;\n }\n if (newValue) observer.observe(refElement(newValue));\n }, {\n flush: 'post'\n });\n }\n return {\n resizeRef,\n contentRect: readonly(contentRect)\n };\n}\n//# sourceMappingURL=resizeObserver.mjs.map","// Composables\nimport { useResizeObserver } from \"./resizeObserver.mjs\"; // Utilities\nimport { computed, inject, onActivated, onBeforeUnmount, onDeactivated, onMounted, provide, reactive, ref, shallowRef } from 'vue';\nimport { convertToUnit, findChildrenWithProvide, getCurrentInstance, getUid, propsFactory } from \"../util/index.mjs\"; // Types\nexport const VuetifyLayoutKey = Symbol.for('vuetify:layout');\nexport const VuetifyLayoutItemKey = Symbol.for('vuetify:layout-item');\nconst ROOT_ZINDEX = 1000;\nexport const makeLayoutProps = propsFactory({\n overlaps: {\n type: Array,\n default: () => []\n },\n fullHeight: Boolean\n}, 'layout');\n\n// Composables\nexport const makeLayoutItemProps = propsFactory({\n name: {\n type: String\n },\n order: {\n type: [Number, String],\n default: 0\n },\n absolute: Boolean\n}, 'layout-item');\nexport function useLayout() {\n const layout = inject(VuetifyLayoutKey);\n if (!layout) throw new Error('[Vuetify] Could not find injected layout');\n return {\n getLayoutItem: layout.getLayoutItem,\n mainRect: layout.mainRect,\n mainStyles: layout.mainStyles\n };\n}\nexport function useLayoutItem(options) {\n const layout = inject(VuetifyLayoutKey);\n if (!layout) throw new Error('[Vuetify] Could not find injected layout');\n const id = options.id ?? `layout-item-${getUid()}`;\n const vm = getCurrentInstance('useLayoutItem');\n provide(VuetifyLayoutItemKey, {\n id\n });\n const isKeptAlive = shallowRef(false);\n onDeactivated(() => isKeptAlive.value = true);\n onActivated(() => isKeptAlive.value = false);\n const {\n layoutItemStyles,\n layoutItemScrimStyles\n } = layout.register(vm, {\n ...options,\n active: computed(() => isKeptAlive.value ? false : options.active.value),\n id\n });\n onBeforeUnmount(() => layout.unregister(id));\n return {\n layoutItemStyles,\n layoutRect: layout.layoutRect,\n layoutItemScrimStyles\n };\n}\nconst generateLayers = (layout, positions, layoutSizes, activeItems) => {\n let previousLayer = {\n top: 0,\n left: 0,\n right: 0,\n bottom: 0\n };\n const layers = [{\n id: '',\n layer: {\n ...previousLayer\n }\n }];\n for (const id of layout) {\n const position = positions.get(id);\n const amount = layoutSizes.get(id);\n const active = activeItems.get(id);\n if (!position || !amount || !active) continue;\n const layer = {\n ...previousLayer,\n [position.value]: parseInt(previousLayer[position.value], 10) + (active.value ? parseInt(amount.value, 10) : 0)\n };\n layers.push({\n id,\n layer\n });\n previousLayer = layer;\n }\n return layers;\n};\nexport function createLayout(props) {\n const parentLayout = inject(VuetifyLayoutKey, null);\n const rootZIndex = computed(() => parentLayout ? parentLayout.rootZIndex.value - 100 : ROOT_ZINDEX);\n const registered = ref([]);\n const positions = reactive(new Map());\n const layoutSizes = reactive(new Map());\n const priorities = reactive(new Map());\n const activeItems = reactive(new Map());\n const disabledTransitions = reactive(new Map());\n const {\n resizeRef,\n contentRect: layoutRect\n } = useResizeObserver();\n const computedOverlaps = computed(() => {\n const map = new Map();\n const overlaps = props.overlaps ?? [];\n for (const overlap of overlaps.filter(item => item.includes(':'))) {\n const [top, bottom] = overlap.split(':');\n if (!registered.value.includes(top) || !registered.value.includes(bottom)) continue;\n const topPosition = positions.get(top);\n const bottomPosition = positions.get(bottom);\n const topAmount = layoutSizes.get(top);\n const bottomAmount = layoutSizes.get(bottom);\n if (!topPosition || !bottomPosition || !topAmount || !bottomAmount) continue;\n map.set(bottom, {\n position: topPosition.value,\n amount: parseInt(topAmount.value, 10)\n });\n map.set(top, {\n position: bottomPosition.value,\n amount: -parseInt(bottomAmount.value, 10)\n });\n }\n return map;\n });\n const layers = computed(() => {\n const uniquePriorities = [...new Set([...priorities.values()].map(p => p.value))].sort((a, b) => a - b);\n const layout = [];\n for (const p of uniquePriorities) {\n const items = registered.value.filter(id => priorities.get(id)?.value === p);\n layout.push(...items);\n }\n return generateLayers(layout, positions, layoutSizes, activeItems);\n });\n const transitionsEnabled = computed(() => {\n return !Array.from(disabledTransitions.values()).some(ref => ref.value);\n });\n const mainRect = computed(() => {\n return layers.value[layers.value.length - 1].layer;\n });\n const mainStyles = computed(() => {\n return {\n '--v-layout-left': convertToUnit(mainRect.value.left),\n '--v-layout-right': convertToUnit(mainRect.value.right),\n '--v-layout-top': convertToUnit(mainRect.value.top),\n '--v-layout-bottom': convertToUnit(mainRect.value.bottom),\n ...(transitionsEnabled.value ? undefined : {\n transition: 'none'\n })\n };\n });\n const items = computed(() => {\n return layers.value.slice(1).map((_ref, index) => {\n let {\n id\n } = _ref;\n const {\n layer\n } = layers.value[index];\n const size = layoutSizes.get(id);\n const position = positions.get(id);\n return {\n id,\n ...layer,\n size: Number(size.value),\n position: position.value\n };\n });\n });\n const getLayoutItem = id => {\n return items.value.find(item => item.id === id);\n };\n const rootVm = getCurrentInstance('createLayout');\n const isMounted = shallowRef(false);\n onMounted(() => {\n isMounted.value = true;\n });\n provide(VuetifyLayoutKey, {\n register: (vm, _ref2) => {\n let {\n id,\n order,\n position,\n layoutSize,\n elementSize,\n active,\n disableTransitions,\n absolute\n } = _ref2;\n priorities.set(id, order);\n positions.set(id, position);\n layoutSizes.set(id, layoutSize);\n activeItems.set(id, active);\n disableTransitions && disabledTransitions.set(id, disableTransitions);\n const instances = findChildrenWithProvide(VuetifyLayoutItemKey, rootVm?.vnode);\n const instanceIndex = instances.indexOf(vm);\n if (instanceIndex > -1) registered.value.splice(instanceIndex, 0, id);else registered.value.push(id);\n const index = computed(() => items.value.findIndex(i => i.id === id));\n const zIndex = computed(() => rootZIndex.value + layers.value.length * 2 - index.value * 2);\n const layoutItemStyles = computed(() => {\n const isHorizontal = position.value === 'left' || position.value === 'right';\n const isOppositeHorizontal = position.value === 'right';\n const isOppositeVertical = position.value === 'bottom';\n const styles = {\n [position.value]: 0,\n zIndex: zIndex.value,\n transform: `translate${isHorizontal ? 'X' : 'Y'}(${(active.value ? 0 : -110) * (isOppositeHorizontal || isOppositeVertical ? -1 : 1)}%)`,\n position: absolute.value || rootZIndex.value !== ROOT_ZINDEX ? 'absolute' : 'fixed',\n ...(transitionsEnabled.value ? undefined : {\n transition: 'none'\n })\n };\n if (!isMounted.value) return styles;\n const item = items.value[index.value];\n if (!item) throw new Error(`[Vuetify] Could not find layout item \"${id}\"`);\n const overlap = computedOverlaps.value.get(id);\n if (overlap) {\n item[overlap.position] += overlap.amount;\n }\n return {\n ...styles,\n height: isHorizontal ? `calc(100% - ${item.top}px - ${item.bottom}px)` : elementSize.value ? `${elementSize.value}px` : undefined,\n left: isOppositeHorizontal ? undefined : `${item.left}px`,\n right: isOppositeHorizontal ? `${item.right}px` : undefined,\n top: position.value !== 'bottom' ? `${item.top}px` : undefined,\n bottom: position.value !== 'top' ? `${item.bottom}px` : undefined,\n width: !isHorizontal ? `calc(100% - ${item.left}px - ${item.right}px)` : elementSize.value ? `${elementSize.value}px` : undefined\n };\n });\n const layoutItemScrimStyles = computed(() => ({\n zIndex: zIndex.value - 1\n }));\n return {\n layoutItemStyles,\n layoutItemScrimStyles,\n zIndex\n };\n },\n unregister: id => {\n priorities.delete(id);\n positions.delete(id);\n layoutSizes.delete(id);\n activeItems.delete(id);\n disabledTransitions.delete(id);\n registered.value = registered.value.filter(v => v !== id);\n },\n mainRect,\n mainStyles,\n getLayoutItem,\n items,\n layoutRect,\n rootZIndex\n });\n const layoutClasses = computed(() => ['v-layout', {\n 'v-layout--full-height': props.fullHeight\n }]);\n const layoutStyles = computed(() => ({\n zIndex: rootZIndex.value,\n position: parentLayout ? 'relative' : undefined,\n overflow: parentLayout ? 'hidden' : undefined\n }));\n return {\n layoutClasses,\n layoutStyles,\n getLayoutItem,\n items,\n layoutRect,\n layoutRef: resizeRef\n };\n}\n//# sourceMappingURL=layout.mjs.map","import { mergeProps as _mergeProps, createVNode as _createVNode, Fragment as _Fragment } from \"vue\";\n// Styles\nimport \"./VNavigationDrawer.css\";\n\n// 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 { 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\"; // Utilities\nimport { computed, nextTick, onBeforeMount, 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 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 ...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 mobile\n } = useDisplay();\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 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 isTemporary = computed(() => !props.permanent && (mobile.value || props.temporary));\n const isSticky = computed(() => props.sticky && !isTemporary.value && location.value !== 'bottom');\n if (props.expandOnHover && props.rail != null) {\n watch(isHovering, val => emit('update:rail', !val));\n }\n if (!props.disableResizeWatcher) {\n watch(isTemporary, val => !props.permanent && nextTick(() => isActive.value = !val));\n }\n if (!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 onBeforeMount(() => {\n if (props.modelValue != null || isTemporary.value) return;\n isActive.value = props.permanent || !mobile.value;\n });\n const {\n isDragging,\n dragProgress,\n dragStyles\n } = useTouch({\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 {\n layoutItemStyles,\n layoutItemScrimStyles\n } = useLayoutItem({\n id: props.name,\n order: computed(() => parseInt(props.order, 10)),\n position: location,\n layoutSize,\n elementSize: width,\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 function onMouseenter() {\n isHovering.value = true;\n }\n function onMouseleave() {\n isHovering.value = false;\n }\n useRender(() => {\n const hasImage = slots.image || props.image;\n return _createVNode(_Fragment, null, [_createVNode(props.tag, _mergeProps({\n \"ref\": rootEl,\n \"onMouseenter\": onMouseenter,\n \"onMouseleave\": onMouseleave,\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--active': isActive.value,\n 'v-navigation-drawer--sticky': isSticky.value\n }, themeClasses.value, backgroundColorClasses.value, borderClasses.value, elevationClasses.value, roundedClasses.value, props.class],\n \"style\": [backgroundColorStyles.value, layoutItemStyles.value, dragStyles.value, ssrBootStyles.value, stickyStyles.value, props.style]\n }, scopeId, attrs), {\n default: () => [hasImage && _createVNode(\"div\", {\n \"key\": \"image\",\n \"class\": \"v-navigation-drawer__img\"\n }, [slots.image ? slots.image?.({\n image: props.image\n }) : _createVNode(\"img\", {\n \"src\": props.image,\n \"alt\": \"\"\n }, null)]), 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\": () => isActive.value = false\n }, scopeId), null)]\n })]);\n });\n return {\n isStuck\n };\n }\n});\n//# sourceMappingURL=VNavigationDrawer.mjs.map","\n\n\n","import type { TrustGroupUserDto } from \"@/models/dto/trustGroupUserDto\";\nimport { getIsCustomer, removeUserFromTrustGroup } from \"@/services/trustGroupService\";\nimport { defineStore } from \"pinia\";\n\nexport interface ITrustGroupState {\n isCustomer: boolean;\n loading: boolean;\n}\n\nexport const useTrustGroupStore = defineStore(\"trust-group\", {\n state: (): ITrustGroupState => ({\n isCustomer: false,\n loading: true,\n }),\n\n actions: {\n async setIsCustomer(): Promise {\n this.isCustomer = await getIsCustomer();\n },\n\n async removeUserFromTrustGroup(user: TrustGroupUserDto): Promise {\n this.loading = true;\n try {\n await removeUserFromTrustGroup(user);\n } catch (error: any) {\n throw new Error(error.response.data.Message);\n }\n }\n },\n});\n","export const industries = [\n \"Agriculture & Farming\",\n \"Forestry\",\n \"Construction & Engineering\",\n \"Energy Production & Utilities\",\n \"Water & Waste Services\",\n \"Casinos & Gaming\",\n \"Leisure Facilities\",\n \"Capital Markets\",\n \"Banking\",\n \"Insurance\",\n \"Health Care\",\n \"Food & Beverage Services\",\n \"Hotels & Lodging\",\n \"Aerospace & Defence\",\n \"Automobiles & Other Transport Vehicles\",\n \"Biotechnology & Pharmaceuticals\",\n \"Building Products & Furnishings\",\n \"Chemicals & Biofuels\",\n \"Construction Materials\",\n \"Electronics\",\n \"Food & Beverages\",\n \"Machinery & Equipment\",\n \"Medical Equipment & Services\",\n \"Metal Processing\",\n \"Oil & Gas - Midstream & Downstream\",\n \"Pulp, Paper & Wood products\",\n \"Textiles, Apparels, Footwear & Accessories\",\n \"Tobacco\",\n \"Toys, Sporting Goods & Musical Instruments\",\n \"Coal Operations\",\n \"Mining\",\n \"Oil & Gas - Upstream & Services\",\n \"Real Estate & Services\",\n \"Advertising & Marketing\",\n \"Education\",\n \"Professional & Commercial Services\",\n \"Media & Communication\",\n \"Software & IT Services\",\n \"Transportation\",\n \"Wholesale & Retail trade\",\n]","export const organisationForms = [\n \"Partnership or joint venture (ANS, DA, KS or fellesforetak)\",\n \"Limited liability company (AS, ASA or BA)\",\n \"Sole proprietorship (Enkeltpersonsforetak)\",\n \"Norwegian-registered foreign business - NUF foreign entity (Utenlandsk enhet)\",\n \"Savings bank (Sparebank SPA)\",\n \"Other business enterprise in accordance with special legislation (SÆR - Annet foretak ifølge særskilt lov)\",\n \"Corporation\",\n \"Other (Annet)\"\n]","import axios from \"axios\";\n\nexport const getCountries = async (): Promise> => {\n const response = await axios.get(\"/api/countries\");\n return response.data;\n};\n","export class Country {\n name: string = \"\";\n dialCode: string = \"\";\n code: string = \"\";\n dialCodeTitle: string = \"\";\n\n constructor(name: string, dialCode: string, code: string) {\n this.name = name;\n this.dialCode = dialCode;\n this.code = code;\n this.dialCodeTitle = `(${this.dialCode})`;\n }\n}","import { Country } from \"@/models/country\";\nimport type { SelectItem } from \"@/models/selectItem\";\n\nconst countriesBase = [\n {\n name: \"Afghanistan\",\n dial_code: \"+93\",\n code: \"AF\",\n },\n {\n name: \"Aland Islands\",\n dial_code: \"+358\",\n code: \"AX\",\n },\n {\n name: \"Albania\",\n dial_code: \"+355\",\n code: \"AL\",\n },\n {\n name: \"Algeria\",\n dial_code: \"+213\",\n code: \"DZ\",\n },\n {\n name: \"American Samoa\",\n dial_code: \"+1684\",\n code: \"AS\",\n },\n {\n name: \"Andorra\",\n dial_code: \"+376\",\n code: \"AD\",\n },\n {\n name: \"Angola\",\n dial_code: \"+244\",\n code: \"AO\",\n },\n {\n name: \"Anguilla\",\n dial_code: \"+1264\",\n code: \"AI\",\n },\n {\n name: \"Antarctica\",\n dial_code: \"+672\",\n code: \"AQ\",\n },\n {\n name: \"Antigua and Barbuda\",\n dial_code: \"+1268\",\n code: \"AG\",\n },\n {\n name: \"Argentina\",\n dial_code: \"+54\",\n code: \"AR\",\n },\n {\n name: \"Armenia\",\n dial_code: \"+374\",\n code: \"AM\",\n },\n {\n name: \"Aruba\",\n dial_code: \"+297\",\n code: \"AW\",\n },\n {\n name: \"Australia\",\n dial_code: \"+61\",\n code: \"AU\",\n },\n {\n name: \"Austria\",\n dial_code: \"+43\",\n code: \"AT\",\n },\n {\n name: \"Azerbaijan\",\n dial_code: \"+994\",\n code: \"AZ\",\n },\n {\n name: \"Bahamas\",\n dial_code: \"+1242\",\n code: \"BS\",\n },\n {\n name: \"Bahrain\",\n dial_code: \"+973\",\n code: \"BH\",\n },\n {\n name: \"Bangladesh\",\n dial_code: \"+880\",\n code: \"BD\",\n },\n {\n name: \"Barbados\",\n dial_code: \"+1246\",\n code: \"BB\",\n },\n {\n name: \"Belarus\",\n dial_code: \"+375\",\n code: \"BY\",\n },\n {\n name: \"Belgium\",\n dial_code: \"+32\",\n code: \"BE\",\n },\n {\n name: \"Belize\",\n dial_code: \"+501\",\n code: \"BZ\",\n },\n {\n name: \"Benin\",\n dial_code: \"+229\",\n code: \"BJ\",\n },\n {\n name: \"Bermuda\",\n dial_code: \"+1441\",\n code: \"BM\",\n },\n {\n name: \"Bhutan\",\n dial_code: \"+975\",\n code: \"BT\",\n },\n {\n name: \"Bolivia, Plurinational State of\",\n dial_code: \"+591\",\n code: \"BO\",\n },\n {\n name: \"Bosnia and Herzegovina\",\n dial_code: \"+387\",\n code: \"BA\",\n },\n {\n name: \"Botswana\",\n dial_code: \"+267\",\n code: \"BW\",\n },\n {\n name: \"Brazil\",\n dial_code: \"+55\",\n code: \"BR\",\n },\n {\n name: \"British Indian Ocean Territory\",\n dial_code: \"+246\",\n code: \"IO\",\n },\n {\n name: \"Brunei Darussalam\",\n dial_code: \"+673\",\n code: \"BN\",\n },\n {\n name: \"Bulgaria\",\n dial_code: \"+359\",\n code: \"BG\",\n },\n {\n name: \"Burkina Faso\",\n dial_code: \"+226\",\n code: \"BF\",\n },\n {\n name: \"Burundi\",\n dial_code: \"+257\",\n code: \"BI\",\n },\n {\n name: \"Cambodia\",\n dial_code: \"+855\",\n code: \"KH\",\n },\n {\n name: \"Cameroon\",\n dial_code: \"+237\",\n code: \"CM\",\n },\n {\n name: \"Canada\",\n dial_code: \"+1\",\n code: \"CA\",\n },\n {\n name: \"Cape Verde\",\n dial_code: \"+238\",\n code: \"CV\",\n },\n {\n name: \"Cayman Islands\",\n dial_code: \"+345\",\n code: \"KY\",\n },\n {\n name: \"Central African Republic\",\n dial_code: \"+236\",\n code: \"CF\",\n },\n {\n name: \"Chad\",\n dial_code: \"+235\",\n code: \"TD\",\n },\n {\n name: \"Chile\",\n dial_code: \"+56\",\n code: \"CL\",\n },\n {\n name: \"China\",\n dial_code: \"+86\",\n code: \"CN\",\n },\n {\n name: \"Christmas Island\",\n dial_code: \"+61\",\n code: \"CX\",\n },\n {\n name: \"Cocos (Keeling) Islands\",\n dial_code: \"+61\",\n code: \"CC\",\n },\n {\n name: \"Colombia\",\n dial_code: \"+57\",\n code: \"CO\",\n },\n {\n name: \"Comoros\",\n dial_code: \"+269\",\n code: \"KM\",\n },\n {\n name: \"Congo\",\n dial_code: \"+242\",\n code: \"CG\",\n },\n {\n name: \"Congo, The Democratic Republic of the Congo\",\n dial_code: \"+243\",\n code: \"CD\",\n },\n {\n name: \"Cook Islands\",\n dial_code: \"+682\",\n code: \"CK\",\n },\n {\n name: \"Costa Rica\",\n dial_code: \"+506\",\n code: \"CR\",\n },\n {\n name: \"Cote d'Ivoire\",\n dial_code: \"+225\",\n code: \"CI\",\n },\n {\n name: \"Croatia\",\n dial_code: \"+385\",\n code: \"HR\",\n },\n {\n name: \"Cuba\",\n dial_code: \"+53\",\n code: \"CU\",\n },\n {\n name: \"Cyprus\",\n dial_code: \"+357\",\n code: \"CY\",\n },\n {\n name: \"Czech Republic\",\n dial_code: \"+420\",\n code: \"CZ\",\n },\n {\n name: \"Denmark\",\n dial_code: \"+45\",\n code: \"DK\",\n },\n {\n name: \"Djibouti\",\n dial_code: \"+253\",\n code: \"DJ\",\n },\n {\n name: \"Dominica\",\n dial_code: \"+1767\",\n code: \"DM\",\n },\n {\n name: \"Dominican Republic\",\n dial_code: \"+1849\",\n code: \"DO\",\n },\n {\n name: \"Ecuador\",\n dial_code: \"+593\",\n code: \"EC\",\n },\n {\n name: \"Egypt\",\n dial_code: \"+20\",\n code: \"EG\",\n },\n {\n name: \"El Salvador\",\n dial_code: \"+503\",\n code: \"SV\",\n },\n {\n name: \"Equatorial Guinea\",\n dial_code: \"+240\",\n code: \"GQ\",\n },\n {\n name: \"Eritrea\",\n dial_code: \"+291\",\n code: \"ER\",\n },\n {\n name: \"Estonia\",\n dial_code: \"+372\",\n code: \"EE\",\n },\n {\n name: \"Eswatini\",\n dial_code: \"+268\",\n code: \"SZ\",\n },\n {\n name: \"Ethiopia\",\n dial_code: \"+251\",\n code: \"ET\",\n },\n {\n name: \"Falkland Islands (Malvinas)\",\n dial_code: \"+500\",\n code: \"FK\",\n },\n {\n name: \"Faroe Islands\",\n dial_code: \"+298\",\n code: \"FO\",\n },\n {\n name: \"Fiji\",\n dial_code: \"+679\",\n code: \"FJ\",\n },\n {\n name: \"Finland\",\n dial_code: \"+358\",\n code: \"FI\",\n },\n {\n name: \"France\",\n dial_code: \"+33\",\n code: \"FR\",\n },\n {\n name: \"French Guiana\",\n dial_code: \"+594\",\n code: \"GF\",\n },\n {\n name: \"French Polynesia\",\n dial_code: \"+689\",\n code: \"PF\",\n },\n {\n name: \"Gabon\",\n dial_code: \"+241\",\n code: \"GA\",\n },\n {\n name: \"Gambia\",\n dial_code: \"+220\",\n code: \"GM\",\n },\n {\n name: \"Georgia\",\n dial_code: \"+995\",\n code: \"GE\",\n },\n {\n name: \"Germany\",\n dial_code: \"+49\",\n code: \"DE\",\n },\n {\n name: \"Ghana\",\n dial_code: \"+233\",\n code: \"GH\",\n },\n {\n name: \"Gibraltar\",\n dial_code: \"+350\",\n code: \"GI\",\n },\n {\n name: \"Greece\",\n dial_code: \"+30\",\n code: \"GR\",\n },\n {\n name: \"Greenland\",\n dial_code: \"+299\",\n code: \"GL\",\n },\n {\n name: \"Grenada\",\n dial_code: \"+1473\",\n code: \"GD\",\n },\n {\n name: \"Guadeloupe\",\n dial_code: \"+590\",\n code: \"GP\",\n },\n {\n name: \"Guam\",\n dial_code: \"+1671\",\n code: \"GU\",\n },\n {\n name: \"Guatemala\",\n dial_code: \"+502\",\n code: \"GT\",\n },\n {\n name: \"Guernsey\",\n dial_code: \"+44\",\n code: \"GG\",\n },\n {\n name: \"Guinea\",\n dial_code: \"+224\",\n code: \"GN\",\n },\n {\n name: \"Guinea-Bissau\",\n dial_code: \"+245\",\n code: \"GW\",\n },\n {\n name: \"Guyana\",\n dial_code: \"+595\",\n code: \"GY\",\n },\n {\n name: \"Haiti\",\n dial_code: \"+509\",\n code: \"HT\",\n },\n {\n name: \"Holy See (Vatican City State)\",\n dial_code: \"+379\",\n code: \"VA\",\n },\n {\n name: \"Honduras\",\n dial_code: \"+504\",\n code: \"HN\",\n },\n {\n name: \"Hong Kong\",\n dial_code: \"+852\",\n code: \"HK\",\n },\n {\n name: \"Hungary\",\n dial_code: \"+36\",\n code: \"HU\",\n },\n {\n name: \"Iceland\",\n dial_code: \"+354\",\n code: \"IS\",\n },\n {\n name: \"India\",\n dial_code: \"+91\",\n code: \"IN\",\n },\n {\n name: \"Indonesia\",\n dial_code: \"+62\",\n code: \"ID\",\n },\n {\n name: \"Iran, Islamic Republic of Persian Gulf\",\n dial_code: \"+98\",\n code: \"IR\",\n },\n {\n name: \"Iraq\",\n dial_code: \"+964\",\n code: \"IQ\",\n },\n {\n name: \"Ireland\",\n dial_code: \"+353\",\n code: \"IE\",\n },\n {\n name: \"Isle of Man\",\n dial_code: \"+44\",\n code: \"IM\",\n },\n {\n name: \"Israel\",\n dial_code: \"+972\",\n code: \"IL\",\n },\n {\n name: \"Italy\",\n dial_code: \"+39\",\n code: \"IT\",\n },\n {\n name: \"Jamaica\",\n dial_code: \"+1876\",\n code: \"JM\",\n },\n {\n name: \"Japan\",\n dial_code: \"+81\",\n code: \"JP\",\n },\n {\n name: \"Jersey\",\n dial_code: \"+44\",\n code: \"JE\",\n },\n {\n name: \"Jordan\",\n dial_code: \"+962\",\n code: \"JO\",\n },\n {\n name: \"Kazakhstan\",\n dial_code: \"+77\",\n code: \"KZ\",\n },\n {\n name: \"Kenya\",\n dial_code: \"+254\",\n code: \"KE\",\n },\n {\n name: \"Kiribati\",\n dial_code: \"+686\",\n code: \"KI\",\n },\n {\n name: \"Korea, Democratic People's Republic of Korea\",\n dial_code: \"+850\",\n code: \"KP\",\n },\n {\n name: \"Korea, Republic of South Korea\",\n dial_code: \"+82\",\n code: \"KR\",\n },\n {\n name: \"Kosovo\",\n dial_code: \"+383\",\n code: \"XK\",\n },\n {\n name: \"Kuwait\",\n dial_code: \"+965\",\n code: \"KW\",\n },\n {\n name: \"Kyrgyzstan\",\n dial_code: \"+996\",\n code: \"KG\",\n },\n {\n name: \"Laos\",\n dial_code: \"+856\",\n code: \"LA\",\n },\n {\n name: \"Latvia\",\n dial_code: \"+371\",\n code: \"LV\",\n },\n {\n name: \"Lebanon\",\n dial_code: \"+961\",\n code: \"LB\",\n },\n {\n name: \"Lesotho\",\n dial_code: \"+266\",\n code: \"LS\",\n },\n {\n name: \"Liberia\",\n dial_code: \"+231\",\n code: \"LR\",\n },\n {\n name: \"Libyan Arab Jamahiriya\",\n dial_code: \"+218\",\n code: \"LY\",\n },\n {\n name: \"Liechtenstein\",\n dial_code: \"+423\",\n code: \"LI\",\n },\n {\n name: \"Lithuania\",\n dial_code: \"+370\",\n code: \"LT\",\n },\n {\n name: \"Luxembourg\",\n dial_code: \"+352\",\n code: \"LU\",\n },\n {\n name: \"Macao\",\n dial_code: \"+853\",\n code: \"MO\",\n },\n {\n name: \"Madagascar\",\n dial_code: \"+261\",\n code: \"MG\",\n },\n {\n name: \"Malawi\",\n dial_code: \"+265\",\n code: \"MW\",\n },\n {\n name: \"Malaysia\",\n dial_code: \"+60\",\n code: \"MY\",\n },\n {\n name: \"Maldives\",\n dial_code: \"+960\",\n code: \"MV\",\n },\n {\n name: \"Mali\",\n dial_code: \"+223\",\n code: \"ML\",\n },\n {\n name: \"Malta\",\n dial_code: \"+356\",\n code: \"MT\",\n },\n {\n name: \"Marshall Islands\",\n dial_code: \"+692\",\n code: \"MH\",\n },\n {\n name: \"Martinique\",\n dial_code: \"+596\",\n code: \"MQ\",\n },\n {\n name: \"Mauritania\",\n dial_code: \"+222\",\n code: \"MR\",\n },\n {\n name: \"Mauritius\",\n dial_code: \"+230\",\n code: \"MU\",\n },\n {\n name: \"Mayotte\",\n dial_code: \"+262\",\n code: \"YT\",\n },\n {\n name: \"Mexico\",\n dial_code: \"+52\",\n code: \"MX\",\n },\n {\n name: \"Micronesia, Federated States of Micronesia\",\n dial_code: \"+691\",\n code: \"FM\",\n },\n {\n name: \"Moldova\",\n dial_code: \"+373\",\n code: \"MD\",\n },\n {\n name: \"Monaco\",\n dial_code: \"+377\",\n code: \"MC\",\n },\n {\n name: \"Mongolia\",\n dial_code: \"+976\",\n code: \"MN\",\n },\n {\n name: \"Montenegro\",\n dial_code: \"+382\",\n code: \"ME\",\n },\n {\n name: \"Montserrat\",\n dial_code: \"+1664\",\n code: \"MS\",\n },\n {\n name: \"Morocco\",\n dial_code: \"+212\",\n code: \"MA\",\n },\n {\n name: \"Mozambique\",\n dial_code: \"+258\",\n code: \"MZ\",\n },\n {\n name: \"Myanmar\",\n dial_code: \"+95\",\n code: \"MM\",\n },\n {\n name: \"Namibia\",\n dial_code: \"+264\",\n code: \"NA\",\n },\n {\n name: \"Nauru\",\n dial_code: \"+674\",\n code: \"NR\",\n },\n {\n name: \"Nepal\",\n dial_code: \"+977\",\n code: \"NP\",\n },\n {\n name: \"Netherlands\",\n dial_code: \"+31\",\n code: \"NL\",\n },\n {\n name: \"Netherlands Antilles\",\n dial_code: \"+599\",\n code: \"AN\",\n },\n {\n name: \"New Caledonia\",\n dial_code: \"+687\",\n code: \"NC\",\n },\n {\n name: \"New Zealand\",\n dial_code: \"+64\",\n code: \"NZ\",\n },\n {\n name: \"Nicaragua\",\n dial_code: \"+505\",\n code: \"NI\",\n },\n {\n name: \"Niger\",\n dial_code: \"+227\",\n code: \"NE\",\n },\n {\n name: \"Nigeria\",\n dial_code: \"+234\",\n code: \"NG\",\n },\n {\n name: \"Niue\",\n dial_code: \"+683\",\n code: \"NU\",\n },\n {\n name: \"Norfolk Island\",\n dial_code: \"+672\",\n code: \"NF\",\n },\n {\n name: \"North Macedonia\",\n dial_code: \"+389\",\n code: \"MK\",\n },\n {\n name: \"Northern Mariana Islands\",\n dial_code: \"+1670\",\n code: \"MP\",\n },\n {\n name: \"Norway\",\n dial_code: \"+47\",\n code: \"NO\",\n },\n {\n name: \"Oman\",\n dial_code: \"+968\",\n code: \"OM\",\n },\n {\n name: \"Pakistan\",\n dial_code: \"+92\",\n code: \"PK\",\n },\n {\n name: \"Palau\",\n dial_code: \"+680\",\n code: \"PW\",\n },\n {\n name: \"Palestinian Territory, Occupied\",\n dial_code: \"+970\",\n code: \"PS\",\n },\n {\n name: \"Panama\",\n dial_code: \"+507\",\n code: \"PA\",\n },\n {\n name: \"Papua New Guinea\",\n dial_code: \"+675\",\n code: \"PG\",\n },\n {\n name: \"Paraguay\",\n dial_code: \"+595\",\n code: \"PY\",\n },\n {\n name: \"Peru\",\n dial_code: \"+51\",\n code: \"PE\",\n },\n {\n name: \"Philippines\",\n dial_code: \"+63\",\n code: \"PH\",\n },\n {\n name: \"Pitcairn\",\n dial_code: \"+872\",\n code: \"PN\",\n },\n {\n name: \"Poland\",\n dial_code: \"+48\",\n code: \"PL\",\n },\n {\n name: \"Portugal\",\n dial_code: \"+351\",\n code: \"PT\",\n },\n {\n name: \"Puerto Rico\",\n dial_code: \"+1939\",\n code: \"PR\",\n },\n {\n name: \"Qatar\",\n dial_code: \"+974\",\n code: \"QA\",\n },\n {\n name: \"Romania\",\n dial_code: \"+40\",\n code: \"RO\",\n },\n {\n name: \"Russia\",\n dial_code: \"+7\",\n code: \"RU\",\n },\n {\n name: \"Rwanda\",\n dial_code: \"+250\",\n code: \"RW\",\n },\n {\n name: \"Reunion\",\n dial_code: \"+262\",\n code: \"RE\",\n },\n {\n name: \"Saint Barthelemy\",\n dial_code: \"+590\",\n code: \"BL\",\n },\n {\n name: \"Saint Helena, Ascension and Tristan Da Cunha\",\n dial_code: \"+290\",\n code: \"SH\",\n },\n {\n name: \"Saint Kitts and Nevis\",\n dial_code: \"+1869\",\n code: \"KN\",\n },\n {\n name: \"Saint Lucia\",\n dial_code: \"+1758\",\n code: \"LC\",\n },\n {\n name: \"Saint Martin\",\n dial_code: \"+590\",\n code: \"MF\",\n },\n {\n name: \"Saint Pierre and Miquelon\",\n dial_code: \"+508\",\n code: \"PM\",\n },\n {\n name: \"Saint Vincent and the Grenadines\",\n dial_code: \"+1784\",\n code: \"VC\",\n },\n {\n name: \"Samoa\",\n dial_code: \"+685\",\n code: \"WS\",\n },\n {\n name: \"San Marino\",\n dial_code: \"+378\",\n code: \"SM\",\n },\n {\n name: \"Sao Tome and Principe\",\n dial_code: \"+239\",\n code: \"ST\",\n },\n {\n name: \"Saudi Arabia\",\n dial_code: \"+966\",\n code: \"SA\",\n },\n {\n name: \"Senegal\",\n dial_code: \"+221\",\n code: \"SN\",\n },\n {\n name: \"Serbia\",\n dial_code: \"+381\",\n code: \"RS\",\n },\n {\n name: \"Seychelles\",\n dial_code: \"+248\",\n code: \"SC\",\n },\n {\n name: \"Sierra Leone\",\n dial_code: \"+232\",\n code: \"SL\",\n },\n {\n name: \"Singapore\",\n dial_code: \"+65\",\n code: \"SG\",\n },\n {\n name: \"Slovakia\",\n dial_code: \"+421\",\n code: \"SK\",\n },\n {\n name: \"Slovenia\",\n dial_code: \"+386\",\n code: \"SI\",\n },\n {\n name: \"Solomon Islands\",\n dial_code: \"+677\",\n code: \"SB\",\n },\n {\n name: \"Somalia\",\n dial_code: \"+252\",\n code: \"SO\",\n },\n {\n name: \"South Africa\",\n dial_code: \"+27\",\n code: \"ZA\",\n },\n {\n name: \"South Sudan\",\n dial_code: \"+211\",\n code: \"SS\",\n },\n {\n name: \"South Georgia and the South Sandwich Islands\",\n dial_code: \"+500\",\n code: \"GS\",\n },\n {\n name: \"Spain\",\n dial_code: \"+34\",\n code: \"ES\",\n },\n {\n name: \"Sri Lanka\",\n dial_code: \"+94\",\n code: \"LK\",\n },\n {\n name: \"Sudan\",\n dial_code: \"+249\",\n code: \"SD\",\n },\n {\n name: \"Suriname\",\n dial_code: \"+597\",\n code: \"SR\",\n },\n {\n name: \"Svalbard and Jan Mayen\",\n dial_code: \"+47\",\n code: \"SJ\",\n },\n {\n name: \"Sweden\",\n dial_code: \"+46\",\n code: \"SE\",\n },\n {\n name: \"Switzerland\",\n dial_code: \"+41\",\n code: \"CH\",\n },\n {\n name: \"Syrian Arab Republic\",\n dial_code: \"+963\",\n code: \"SY\",\n },\n {\n name: \"Taiwan\",\n dial_code: \"+886\",\n code: \"TW\",\n },\n {\n name: \"Tajikistan\",\n dial_code: \"+992\",\n code: \"TJ\",\n },\n {\n name: \"Tanzania, United Republic of Tanzania\",\n dial_code: \"+255\",\n code: \"TZ\",\n },\n {\n name: \"Thailand\",\n dial_code: \"+66\",\n code: \"TH\",\n },\n {\n name: \"Timor-Leste\",\n dial_code: \"+670\",\n code: \"TL\",\n },\n {\n name: \"Togo\",\n dial_code: \"+228\",\n code: \"TG\",\n },\n {\n name: \"Tokelau\",\n dial_code: \"+690\",\n code: \"TK\",\n },\n {\n name: \"Tonga\",\n dial_code: \"+676\",\n code: \"TO\",\n },\n {\n name: \"Trinidad and Tobago\",\n dial_code: \"+1868\",\n code: \"TT\",\n },\n {\n name: \"Tunisia\",\n dial_code: \"+216\",\n code: \"TN\",\n },\n {\n name: \"Turkey\",\n dial_code: \"+90\",\n code: \"TR\",\n },\n {\n name: \"Turkmenistan\",\n dial_code: \"+993\",\n code: \"TM\",\n },\n {\n name: \"Turks and Caicos Islands\",\n dial_code: \"+1649\",\n code: \"TC\",\n },\n {\n name: \"Tuvalu\",\n dial_code: \"+688\",\n code: \"TV\",\n },\n {\n name: \"Uganda\",\n dial_code: \"+256\",\n code: \"UG\",\n },\n {\n name: \"Ukraine\",\n dial_code: \"+380\",\n code: \"UA\",\n },\n {\n name: \"United Arab Emirates\",\n dial_code: \"+971\",\n code: \"AE\",\n },\n {\n name: \"United Kingdom\",\n dial_code: \"+44\",\n code: \"GB\",\n },\n {\n name: \"United States\",\n dial_code: \"+1\",\n code: \"US\",\n },\n {\n name: \"Uruguay\",\n dial_code: \"+598\",\n code: \"UY\",\n },\n {\n name: \"Uzbekistan\",\n dial_code: \"+998\",\n code: \"UZ\",\n },\n {\n name: \"Vanuatu\",\n dial_code: \"+678\",\n code: \"VU\",\n },\n {\n name: \"Venezuela, Bolivarian Republic of Venezuela\",\n dial_code: \"+58\",\n code: \"VE\",\n },\n {\n name: \"Vietnam\",\n dial_code: \"+84\",\n code: \"VN\",\n },\n {\n name: \"Virgin Islands, British\",\n dial_code: \"+1284\",\n code: \"VG\",\n },\n {\n name: \"Virgin Islands, U.S.\",\n dial_code: \"+1340\",\n code: \"VI\",\n },\n {\n name: \"Wallis and Futuna\",\n dial_code: \"+681\",\n code: \"WF\",\n },\n {\n name: \"Yemen\",\n dial_code: \"+967\",\n code: \"YE\",\n },\n {\n name: \"Zambia\",\n dial_code: \"+260\",\n code: \"ZM\",\n },\n {\n name: \"Zimbabwe\",\n dial_code: \"+263\",\n code: \"ZW\",\n },\n];\n\nconst chinaRegions = [\n \"China (Guangxi)\",\n \"China (Inner Mongolia)\",\n \"China (Ningxia)\",\n \"China (Tibet)\",\n \"China (Xinjiang)\",\n \"China (Anhui)\",\n \"China (Fujian)\",\n \"China (Gansu)\",\n \"China (Guangdong)\",\n \"China (Guizhou)\",\n \"China (Hainan)\",\n \"China (Hebei)\",\n \"China (Heilongjiang)\",\n \"China (Henan)\",\n \"China (Hubei)\",\n \"China (Hunan)\",\n \"China (Jiangsu)\",\n \"China (Jiangxi)\",\n \"China (Jilin)\",\n \"China (Liaoning)\",\n \"China (Qinghai)\",\n \"China (Shaanxi)\",\n \"China (Shandong)\",\n \"China (Shanxi)\",\n \"China (Sichuan)\",\n \"China (Yunnan)\",\n \"China (Zhejiang)\",\n \"China (Beijing)\",\n \"China (Tianjin)\",\n \"China (Shanghai)\",\n \"China (Chongqing)\",\n];\n\nconst chinaRegionsWithCodes = [\n {\n name: \"China (Guangxi)\",\n code: \"CN-GX\",\n },\n {\n name: \"China (Inner Mongolia)\",\n code: \"CN-NM\",\n },\n {\n name: \"China (Ningxia)\",\n code: \"CN-NX\",\n },\n {\n name: \"China (Tibet)\",\n code: \"CN-XZ\",\n },\n {\n name: \"China (Xinjiang)\",\n code: \"CN-XJ\",\n },\n {\n name: \"China (Anhui)\",\n code: \"CN-AH\",\n },\n {\n name: \"China (Fujian)\",\n code: \"CN-FJ\",\n },\n {\n name: \"China (Gansu)\",\n code: \"CN-GS\",\n },\n {\n name: \"China (Guangdong)\",\n code: \"CN-GD\",\n },\n {\n name: \"China (Guizhou)\",\n code: \"CN-GZ\",\n },\n {\n name: \"China (Hainan)\",\n code: \"CN-HI\",\n },\n {\n name: \"China (Hebei)\",\n code: \"CN-HE\",\n },\n {\n name: \"China (Heilongjiang)\",\n code: \"CN-HL\",\n },\n {\n name: \"China (Henan)\",\n code: \"CN-HA\",\n },\n {\n name: \"China (Hubei)\",\n code: \"CN-HB\",\n },\n {\n name: \"China (Hunan)\",\n code: \"CN-HN\",\n },\n {\n name: \"China (Jiangsu)\",\n code: \"CN-JS\",\n },\n {\n name: \"China (Jiangxi)\",\n code: \"CN-JX\",\n },\n {\n name: \"China (Jilin)\",\n code: \"CN-JL\",\n },\n {\n name: \"China (Liaoning)\",\n code: \"CN-LN\",\n },\n {\n name: \"China (Qinghai)\",\n code: \"CN-QH\",\n },\n {\n name: \"China (Shaanxi)\",\n code: \"CN-SN\",\n },\n {\n name: \"China (Shandong)\",\n code: \"CN-SD\",\n },\n {\n name: \"China (Shanxi)\",\n code: \"CN-SX\",\n },\n {\n name: \"China (Sichuan)\",\n code: \"CN-SC\",\n },\n {\n name: \"China (Yunnan)\",\n code: \"CN-YN\",\n },\n {\n name: \"China (Zhejiang)\",\n code: \"CN-ZJ\",\n },\n {\n name: \"China (Beijing)\",\n code: \"CN-BJ\",\n },\n {\n name: \"China (Tianjin)\",\n code: \"CN-TJ\",\n },\n {\n name: \"China (Shanghai)\",\n code: \"CN-SH\",\n },\n {\n name: \"China (Chongqing)\",\n code: \"CN-CQ\",\n },\n];\n\nfunction getCountriesWithChineseRegions(): SelectItem[] {\n const countryListAsItems = countriesBase\n .filter((c) => c.name != \"China\")\n .map((c) => { text: c.name, id: c.code });\n\n const chinaRegionsAsItems = chinaRegionsWithCodes.map(\n (c) => { text: c.name, id: c.code }\n );\n\n return countryListAsItems.concat(chinaRegionsAsItems).sort((a, b) => {\n return a.text > b.text ? 1 : b.text > a.text ? -1 : 0;\n });\n}\n\nfunction getCountries(): Country[] {\n return countriesBase.map((c) => new Country(c.name, c.dial_code, c.code));\n}\n\nfunction getCountriesIndexedByCountryCode(): any {\n return countriesBase.reduce((acc, c) => {\n return { ...acc, [c.code]: c.name };\n }, {});\n}\n\nfunction getCountriesWithChineseRegionsIndexedByCountryCode(): any {\n let countries = countriesBase\n .filter((c) => c.name != \"China\")\n .reduce((acc, c) => {\n return { ...acc, [c.code]: c.name };\n }, {});\n countries = chinaRegionsWithCodes.reduce((acc, c) => {\n return { ...acc, [c.code]: c.name };\n }, countries);\n\n return countries;\n}\n\nfunction getCountriesWithChineseRegionsAndChinaIndexedByCountryCode(): any {\n let countries = countriesBase.reduce((acc, c) => {\n return { ...acc, [c.code]: c.name };\n }, {});\n countries = chinaRegionsWithCodes.reduce((acc, c) => {\n return { ...acc, [c.code]: c.name };\n }, countries);\n\n return countries;\n}\n\nfunction getCountryNamesWithChineseRegions(): string[] {\n const countries = countriesBase\n .map((c) => c.name)\n .filter((i) => i != \"China\");\n return countries.concat(chinaRegions).sort();\n}\n\nexport const countryIndex = getCountriesIndexedByCountryCode();\nexport const countries = getCountries();\n\nexport const countryIndexWithChineseRegions =\n getCountriesWithChineseRegionsIndexedByCountryCode();\nexport const countriesWithChineseRegions = getCountryNamesWithChineseRegions();\nexport const countriesWithChineseRegionsAsItems =\n getCountriesWithChineseRegions();\n\nexport const countriesWithChineseRegionsAndChina =\n getCountriesWithChineseRegionsAndChinaIndexedByCountryCode();\n","export const nationalities = [\n \"Afghan\",\n \"Albanian\",\n \"Algerian\",\n \"American\",\n \"Andorran\",\n \"Angolan\",\n \"Antiguans\",\n \"Argentinean\",\n \"Armenian\",\n \"Australian\",\n \"Austrian\",\n \"Azerbaijani\",\n \"Bahamian\",\n \"Bahraini\",\n \"Bangladeshi\",\n \"Barbadian\",\n \"Barbudans\",\n \"Batswana\",\n \"Belarusian\",\n \"Belgian\",\n \"Belizean\",\n \"Beninese\",\n \"Bhutanese\",\n \"Bolivian\",\n \"Bosnian\",\n \"Brazilian\",\n \"British\",\n \"Bruneian\",\n \"Bulgarian\",\n \"Burkinabe\",\n \"Burmese\",\n \"Burundian\",\n \"Cambodian\",\n \"Cameroonian\",\n \"Canadian\",\n \"Cape Verdean\",\n \"Central African\",\n \"Chadian\",\n \"Chilean\",\n \"Chinese\",\n \"Colombian\",\n \"Comoran\",\n \"Congolese\",\n \"Costa Rican\",\n \"Croatian\",\n \"Cuban\",\n \"Cypriot\",\n \"Czech\",\n \"Danish\",\n \"Djibouti\",\n \"Dominican\",\n \"Dutch\",\n \"East Timorese\",\n \"Ecuadorean\",\n \"Egyptian\",\n \"Emirian\",\n \"Equatorial Guinean\",\n \"Eritrean\",\n \"Estonian\",\n \"Ethiopian\",\n \"Fijian\",\n \"Filipino\",\n \"Finnish\",\n \"French\",\n \"Gabonese\",\n \"Gambian\",\n \"Georgian\",\n \"German\",\n \"Ghanaian\",\n \"Greek\",\n \"Grenadian\",\n \"Guatemalan\",\n \"Guinea-Bissauan\",\n \"Guinean\",\n \"Guyanese\",\n \"Haitian\",\n \"Herzegovinian\",\n \"Honduran\",\n \"Hungarian\",\n \"I-Kiribati\",\n \"Icelander\",\n \"Indian\",\n \"Indonesian\",\n \"Iranian\",\n \"Iraqi\",\n \"Irish\",\n \"Israeli\",\n \"Italian\",\n \"Ivorian\",\n \"Jamaican\",\n \"Japanese\",\n \"Jordanian\",\n \"Kazakhstani\",\n \"Kenyan\",\n \"Kittian and Nevisian\",\n \"Kuwaiti\",\n \"Kyrgyz\",\n \"Laotian\",\n \"Latvian\",\n \"Lebanese\",\n \"Liberian\",\n \"Libyan\",\n \"Liechtensteiner\",\n \"Lithuanian\",\n \"Luxembourger\",\n \"Macedonian\",\n \"Malagasy\",\n \"Malawian\",\n \"Malaysian\",\n \"Maldivan\",\n \"Malian\",\n \"Maltese\",\n \"Marshallese\",\n \"Mauritanian\",\n \"Mauritian\",\n \"Mexican\",\n \"Micronesian\",\n \"Moldovan\",\n \"Monacan\",\n \"Mongolian\",\n \"Moroccan\",\n \"Mosotho\",\n \"Motswana\",\n \"Mozambican\",\n \"Namibian\",\n \"Nauruan\",\n \"Nepalese\",\n \"New Zealander\",\n \"Nicaraguan\",\n \"Nigerian\",\n \"Nigerien\",\n \"North Korean\",\n \"Northern Irish\",\n \"Norwegian\",\n \"Omani\",\n \"Pakistani\",\n \"Palauan\",\n \"Panamanian\",\n \"Papua New Guinean\",\n \"Paraguayan\",\n \"Peruvian\",\n \"Polish\",\n \"Portuguese\",\n \"Qatari\",\n \"Romanian\",\n \"Russian\",\n \"Rwandan\",\n \"Saint Lucian\",\n \"Salvadoran\",\n \"Samoan\",\n \"San Marinese\",\n \"Sao Tomean\",\n \"Saudi\",\n \"Scottish\",\n \"Senegalese\",\n \"Serbian\",\n \"Seychellois\",\n \"Sierra Leonean\",\n \"Singaporean\",\n \"Slovakian\",\n \"Slovenian\",\n \"Solomon Islander\",\n \"Somali\",\n \"South African\",\n \"South Korean\",\n \"Spanish\",\n \"Sri Lankan\",\n \"Sudanese\",\n \"Surinamer\",\n \"Swazi\",\n \"Swedish\",\n \"Swiss\",\n \"Syrian\",\n \"Taiwanese\",\n \"Tajik\",\n \"Tanzanian\",\n \"Thai\",\n \"Togolese\",\n \"Tongan\",\n \"Trinidadian or Tobagonian\",\n \"Tunisian\",\n \"Turkish\",\n \"Tuvaluan\",\n \"Ugandan\",\n \"Ukrainian\",\n \"Uruguayan\",\n \"Uzbekistani\",\n \"Venezuelan\",\n \"Vietnamese\",\n \"Welsh\",\n \"Yemenite\",\n \"Zambian\",\n \"Zimbabwean\"\n ]","import { defineStore } from \"pinia\";\nimport type { SelectType } from \"@/models/enum/selectType\";\nimport { industries } from \"@/modules/industries\";\nimport { organisationForms } from \"@/modules/organisationForms\";\nimport { getCountries } from \"@/services/countriesService\";\nimport type { Country } from \"@/models/country\";\nimport {\n countries as countryList,\n countriesWithChineseRegions,\n} from \"@/modules/countries\";\nimport { nationalities } from \"@/modules/nationalities\";\n\nexport interface IItemsState {\n Datamap: Record;\n countries: Array;\n dialCodes: Array;\n countryNames: Array;\n countryCodes: Array;\n}\n\nexport const useItemsStore = defineStore(\"items\", {\n state: (): IItemsState => ({\n Datamap: {} as Record,\n countries: new Array(),\n dialCodes: new Array(),\n countryNames: new Array(),\n countryCodes: new Array(),\n }),\n actions: {\n async setItems() {\n try {\n const countriesList = await this.setCountries();\n\n this.countries = countriesList;\n this.countryNames = countriesList.map((c) => c.name);\n this.countryCodes = countriesList.map((c) => c.code);\n\n this.dialCodes = new Array(\n ...new Map(\n countriesList.map((c) => [c.dialCode, c.dialCode])\n ).values()\n ).sort((c1, c2) => Number(c1) - Number(c2));\n } catch (error) {\n this.countries = new Array();\n this.dialCodes = new Array();\n this.countryNames = new Array();\n this.countryCodes = new Array();\n } finally {\n this.Datamap = {\n Countries: this.countryNames,\n Industries: industries,\n OrganisationForms: organisationForms,\n Nationalities: nationalities,\n CountriesWithChineseRegions: countriesWithChineseRegions,\n };\n }\n },\n\n async setCountries(): Promise {\n if (this.countries.length == 0) {\n const response = await getCountries();\n const allCountries = new Map(Object.entries(response));\n const countriesList = countryList.filter((c) =>\n allCountries.has(c.code)\n );\n\n return countriesList;\n } else {\n return this.countries;\n }\n },\n },\n});\n","export const genericError = \"Something went wrong\";\n\nexport const throttle = (func: any, delay = 250) => {\n let shouldWait = false;\n\n return (...args: any) => {\n if (shouldWait) {\n return;\n }\n\n func(...args);\n shouldWait = true;\n setTimeout(() => {\n shouldWait = false;\n }, delay);\n };\n};\n","import { defineStore } from \"pinia\";\n\nexport interface SnackBarState {\n show: boolean;\n message: string;\n title: string;\n color: \"success\" | \"error\";\n timeout: number;\n vertical: boolean;\n}\n\nexport const useSnackBarStore = defineStore(\"snackBarStore\", {\n state: (): SnackBarState => ({\n show: false,\n message: \"\",\n title: \"\",\n color: \"success\",\n timeout: 3000,\n vertical: false,\n }),\n\n actions: {\n showNotification(\n message: string,\n title: string,\n timeout: number,\n vertical: boolean,\n color: \"success\" | \"error\"\n ): void {\n this.message = message;\n this.title = title;\n this.timeout = timeout;\n this.vertical = vertical;\n this.color = color;\n this.show = true;\n },\n\n showSuccess(\n message: string = \"Completed successfully\",\n title: string = \"\",\n timeout: number = 3000,\n vertical: boolean = false\n ): void {\n this.showNotification(message, title, timeout, vertical, \"success\");\n },\n\n showError(\n message: string = \"Operation failed\",\n title: string = \"\",\n timeout: number = 3000,\n vertical: boolean = false\n ): void {\n this.showNotification(message, title, timeout, vertical, \"error\");\n },\n\n hide(): void {\n this.show = false;\n this.message = \"\";\n this.timeout = 3000;\n this.vertical = false;\n },\n },\n});\n","import { createVNode as _createVNode, resolveDirective as _resolveDirective } from \"vue\";\n// Styles\nimport \"./VBtnGroup.css\";\n\n// Composables\nimport { makeBorderProps, useBorder } from \"../../composables/border.mjs\";\nimport { makeComponentProps } from \"../../composables/component.mjs\";\nimport { provideDefaults } from \"../../composables/defaults.mjs\";\nimport { makeDensityProps, useDensity } from \"../../composables/density.mjs\";\nimport { makeElevationProps, useElevation } from \"../../composables/elevation.mjs\";\nimport { makeRoundedProps, useRounded } from \"../../composables/rounded.mjs\";\nimport { makeTagProps } from \"../../composables/tag.mjs\";\nimport { makeThemeProps, provideTheme } from \"../../composables/theme.mjs\";\nimport { makeVariantProps } from \"../../composables/variant.mjs\"; // Utilities\nimport { toRef } from 'vue';\nimport { genericComponent, propsFactory, useRender } from \"../../util/index.mjs\";\nexport const makeVBtnGroupProps = propsFactory({\n divided: Boolean,\n ...makeBorderProps(),\n ...makeComponentProps(),\n ...makeDensityProps(),\n ...makeElevationProps(),\n ...makeRoundedProps(),\n ...makeTagProps(),\n ...makeThemeProps(),\n ...makeVariantProps()\n}, 'VBtnGroup');\nexport const VBtnGroup = genericComponent()({\n name: 'VBtnGroup',\n props: makeVBtnGroupProps(),\n setup(props, _ref) {\n let {\n slots\n } = _ref;\n const {\n themeClasses\n } = provideTheme(props);\n const {\n densityClasses\n } = useDensity(props);\n const {\n borderClasses\n } = useBorder(props);\n const {\n elevationClasses\n } = useElevation(props);\n const {\n roundedClasses\n } = useRounded(props);\n provideDefaults({\n VBtn: {\n height: 'auto',\n color: toRef(props, 'color'),\n density: toRef(props, 'density'),\n flat: true,\n variant: toRef(props, 'variant')\n }\n });\n useRender(() => {\n return _createVNode(props.tag, {\n \"class\": ['v-btn-group', {\n 'v-btn-group--divided': props.divided\n }, themeClasses.value, borderClasses.value, densityClasses.value, elevationClasses.value, roundedClasses.value, props.class],\n \"style\": props.style\n }, slots);\n });\n }\n});\n//# sourceMappingURL=VBtnGroup.mjs.map","// Composables\nimport { useProxiedModel } from \"./proxiedModel.mjs\"; // Utilities\nimport { computed, inject, onBeforeUnmount, onMounted, provide, reactive, toRef, watch } from 'vue';\nimport { consoleWarn, deepEqual, findChildrenWithProvide, getCurrentInstance, getUid, propsFactory, wrapInArray } from \"../util/index.mjs\"; // Types\nexport const makeGroupProps = propsFactory({\n modelValue: {\n type: null,\n default: undefined\n },\n multiple: Boolean,\n mandatory: [Boolean, String],\n max: Number,\n selectedClass: String,\n disabled: Boolean\n}, 'group');\nexport const makeGroupItemProps = propsFactory({\n value: null,\n disabled: Boolean,\n selectedClass: String\n}, 'group-item');\nexport function useGroupItem(props, injectKey) {\n let required = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;\n const vm = getCurrentInstance('useGroupItem');\n if (!vm) {\n throw new Error('[Vuetify] useGroupItem composable must be used inside a component setup function');\n }\n const id = getUid();\n provide(Symbol.for(`${injectKey.description}:id`), id);\n const group = inject(injectKey, null);\n if (!group) {\n if (!required) return group;\n throw new Error(`[Vuetify] Could not find useGroup injection with symbol ${injectKey.description}`);\n }\n const value = toRef(props, 'value');\n const disabled = computed(() => group.disabled.value || props.disabled);\n group.register({\n id,\n value,\n disabled\n }, vm);\n onBeforeUnmount(() => {\n group.unregister(id);\n });\n const isSelected = computed(() => {\n return group.isSelected(id);\n });\n const selectedClass = computed(() => isSelected.value && [group.selectedClass.value, props.selectedClass]);\n watch(isSelected, value => {\n vm.emit('group:selected', {\n value\n });\n });\n return {\n id,\n isSelected,\n toggle: () => group.select(id, !isSelected.value),\n select: value => group.select(id, value),\n selectedClass,\n value,\n disabled,\n group\n };\n}\nexport function useGroup(props, injectKey) {\n let isUnmounted = false;\n const items = reactive([]);\n const selected = useProxiedModel(props, 'modelValue', [], v => {\n if (v == null) return [];\n return getIds(items, wrapInArray(v));\n }, v => {\n const arr = getValues(items, v);\n return props.multiple ? arr : arr[0];\n });\n const groupVm = getCurrentInstance('useGroup');\n function register(item, vm) {\n // Is there a better way to fix this typing?\n const unwrapped = item;\n const key = Symbol.for(`${injectKey.description}:id`);\n const children = findChildrenWithProvide(key, groupVm?.vnode);\n const index = children.indexOf(vm);\n if (index > -1) {\n items.splice(index, 0, unwrapped);\n } else {\n items.push(unwrapped);\n }\n }\n function unregister(id) {\n if (isUnmounted) return;\n\n // TODO: re-evaluate this line's importance in the future\n // should we only modify the model if mandatory is set.\n // selected.value = selected.value.filter(v => v !== id)\n\n forceMandatoryValue();\n const index = items.findIndex(item => item.id === id);\n items.splice(index, 1);\n }\n\n // If mandatory and nothing is selected, then select first non-disabled item\n function forceMandatoryValue() {\n const item = items.find(item => !item.disabled);\n if (item && props.mandatory === 'force' && !selected.value.length) {\n selected.value = [item.id];\n }\n }\n onMounted(() => {\n forceMandatoryValue();\n });\n onBeforeUnmount(() => {\n isUnmounted = true;\n });\n function select(id, value) {\n const item = items.find(item => item.id === id);\n if (value && item?.disabled) return;\n if (props.multiple) {\n const internalValue = selected.value.slice();\n const index = internalValue.findIndex(v => v === id);\n const isSelected = ~index;\n value = value ?? !isSelected;\n\n // We can't remove value if group is\n // mandatory, value already exists,\n // and it is the only value\n if (isSelected && props.mandatory && internalValue.length <= 1) return;\n\n // We can't add value if it would\n // cause max limit to be exceeded\n if (!isSelected && props.max != null && internalValue.length + 1 > props.max) return;\n if (index < 0 && value) internalValue.push(id);else if (index >= 0 && !value) internalValue.splice(index, 1);\n selected.value = internalValue;\n } else {\n const isSelected = selected.value.includes(id);\n if (props.mandatory && isSelected) return;\n selected.value = value ?? !isSelected ? [id] : [];\n }\n }\n function step(offset) {\n // getting an offset from selected value obviously won't work with multiple values\n if (props.multiple) consoleWarn('This method is not supported when using \"multiple\" prop');\n if (!selected.value.length) {\n const item = items.find(item => !item.disabled);\n item && (selected.value = [item.id]);\n } else {\n const currentId = selected.value[0];\n const currentIndex = items.findIndex(i => i.id === currentId);\n let newIndex = (currentIndex + offset) % items.length;\n let newItem = items[newIndex];\n while (newItem.disabled && newIndex !== currentIndex) {\n newIndex = (newIndex + offset) % items.length;\n newItem = items[newIndex];\n }\n if (newItem.disabled) return;\n selected.value = [items[newIndex].id];\n }\n }\n const state = {\n register,\n unregister,\n selected,\n select,\n disabled: toRef(props, 'disabled'),\n prev: () => step(items.length - 1),\n next: () => step(1),\n isSelected: id => selected.value.includes(id),\n selectedClass: computed(() => props.selectedClass),\n items: computed(() => items),\n getItemIndex: value => getItemIndex(items, value)\n };\n provide(injectKey, state);\n return state;\n}\nfunction getItemIndex(items, value) {\n const ids = getIds(items, [value]);\n if (!ids.length) return -1;\n return items.findIndex(item => item.id === ids[0]);\n}\nfunction getIds(items, modelValue) {\n const ids = [];\n modelValue.forEach(value => {\n const item = items.find(item => deepEqual(value, item.value));\n const itemByIndex = items[value];\n if (item?.value != null) {\n ids.push(item.id);\n } else if (itemByIndex != null) {\n ids.push(itemByIndex.id);\n }\n });\n return ids;\n}\nfunction getValues(items, ids) {\n const values = [];\n ids.forEach(id => {\n const itemIndex = items.findIndex(item => item.id === id);\n if (~itemIndex) {\n const item = items[itemIndex];\n values.push(item.value != null ? item.value : itemIndex);\n }\n });\n return values;\n}\n//# sourceMappingURL=group.mjs.map","import { createVNode as _createVNode, mergeProps as _mergeProps } from \"vue\";\n// Styles\nimport \"./VBtnToggle.css\";\n\n// Components\nimport { makeVBtnGroupProps, VBtnGroup } from \"../VBtnGroup/VBtnGroup.mjs\"; // Composables\nimport { makeGroupProps, useGroup } from \"../../composables/group.mjs\"; // Utilities\nimport { genericComponent, propsFactory, useRender } from \"../../util/index.mjs\"; // Types\nexport const VBtnToggleSymbol = Symbol.for('vuetify:v-btn-toggle');\nexport const makeVBtnToggleProps = propsFactory({\n ...makeVBtnGroupProps(),\n ...makeGroupProps()\n}, 'VBtnToggle');\nexport const VBtnToggle = genericComponent()({\n name: 'VBtnToggle',\n props: makeVBtnToggleProps(),\n emits: {\n 'update:modelValue': value => true\n },\n setup(props, _ref) {\n let {\n slots\n } = _ref;\n const {\n isSelected,\n next,\n prev,\n select,\n selected\n } = useGroup(props, VBtnToggleSymbol);\n useRender(() => {\n const [btnGroupProps] = VBtnGroup.filterProps(props);\n return _createVNode(VBtnGroup, _mergeProps({\n \"class\": ['v-btn-toggle', props.class]\n }, btnGroupProps, {\n \"style\": props.style\n }), {\n default: () => [slots.default?.({\n isSelected,\n next,\n prev,\n select,\n selected\n })]\n });\n });\n return {\n next,\n prev,\n select\n };\n }\n});\n//# sourceMappingURL=VBtnToggle.mjs.map","// Utilities\nimport { onBeforeUnmount, ref, shallowRef, watch } from 'vue';\nimport { SUPPORTS_INTERSECTION } from \"../util/index.mjs\";\nexport function useIntersectionObserver(callback, options) {\n const intersectionRef = ref();\n const isIntersecting = shallowRef(false);\n if (SUPPORTS_INTERSECTION) {\n const observer = new IntersectionObserver(entries => {\n callback?.(entries, observer);\n isIntersecting.value = !!entries.find(entry => entry.isIntersecting);\n }, options);\n onBeforeUnmount(() => {\n observer.disconnect();\n });\n watch(intersectionRef, (newValue, oldValue) => {\n if (oldValue) {\n observer.unobserve(oldValue);\n isIntersecting.value = false;\n }\n if (newValue) observer.observe(newValue);\n }, {\n flush: 'post'\n });\n }\n return {\n intersectionRef,\n isIntersecting\n };\n}\n//# sourceMappingURL=intersectionObserver.mjs.map","import { createVNode as _createVNode } from \"vue\";\n// Styles\nimport \"./VProgressCircular.css\";\n\n// Composables\nimport { useTextColor } from \"../../composables/color.mjs\";\nimport { makeComponentProps } from \"../../composables/component.mjs\";\nimport { useIntersectionObserver } from \"../../composables/intersectionObserver.mjs\";\nimport { useResizeObserver } from \"../../composables/resizeObserver.mjs\";\nimport { makeSizeProps, useSize } from \"../../composables/size.mjs\";\nimport { makeTagProps } from \"../../composables/tag.mjs\";\nimport { makeThemeProps, provideTheme } from \"../../composables/theme.mjs\"; // Utilities\nimport { computed, ref, toRef, watchEffect } from 'vue';\nimport { convertToUnit, genericComponent, propsFactory, useRender } from \"../../util/index.mjs\"; // Types\nexport const makeVProgressCircularProps = propsFactory({\n bgColor: String,\n color: String,\n indeterminate: [Boolean, String],\n modelValue: {\n type: [Number, String],\n default: 0\n },\n rotate: {\n type: [Number, String],\n default: 0\n },\n width: {\n type: [Number, String],\n default: 4\n },\n ...makeComponentProps(),\n ...makeSizeProps(),\n ...makeTagProps({\n tag: 'div'\n }),\n ...makeThemeProps()\n}, 'VProgressCircular');\nexport const VProgressCircular = genericComponent()({\n name: 'VProgressCircular',\n props: makeVProgressCircularProps(),\n setup(props, _ref) {\n let {\n slots\n } = _ref;\n const MAGIC_RADIUS_CONSTANT = 20;\n const CIRCUMFERENCE = 2 * Math.PI * MAGIC_RADIUS_CONSTANT;\n const root = ref();\n const {\n themeClasses\n } = provideTheme(props);\n const {\n sizeClasses,\n sizeStyles\n } = useSize(props);\n const {\n textColorClasses,\n textColorStyles\n } = useTextColor(toRef(props, 'color'));\n const {\n textColorClasses: underlayColorClasses,\n textColorStyles: underlayColorStyles\n } = useTextColor(toRef(props, 'bgColor'));\n const {\n intersectionRef,\n isIntersecting\n } = useIntersectionObserver();\n const {\n resizeRef,\n contentRect\n } = useResizeObserver();\n const normalizedValue = computed(() => Math.max(0, Math.min(100, parseFloat(props.modelValue))));\n const width = computed(() => Number(props.width));\n const size = computed(() => {\n // Get size from element if size prop value is small, large etc\n return sizeStyles.value ? Number(props.size) : contentRect.value ? contentRect.value.width : Math.max(width.value, 32);\n });\n const diameter = computed(() => MAGIC_RADIUS_CONSTANT / (1 - width.value / size.value) * 2);\n const strokeWidth = computed(() => width.value / size.value * diameter.value);\n const strokeDashOffset = computed(() => convertToUnit((100 - normalizedValue.value) / 100 * CIRCUMFERENCE));\n watchEffect(() => {\n intersectionRef.value = root.value;\n resizeRef.value = root.value;\n });\n useRender(() => _createVNode(props.tag, {\n \"ref\": root,\n \"class\": ['v-progress-circular', {\n 'v-progress-circular--indeterminate': !!props.indeterminate,\n 'v-progress-circular--visible': isIntersecting.value,\n 'v-progress-circular--disable-shrink': props.indeterminate === 'disable-shrink'\n }, themeClasses.value, sizeClasses.value, textColorClasses.value, props.class],\n \"style\": [sizeStyles.value, textColorStyles.value, props.style],\n \"role\": \"progressbar\",\n \"aria-valuemin\": \"0\",\n \"aria-valuemax\": \"100\",\n \"aria-valuenow\": props.indeterminate ? undefined : normalizedValue.value\n }, {\n default: () => [_createVNode(\"svg\", {\n \"style\": {\n transform: `rotate(calc(-90deg + ${Number(props.rotate)}deg))`\n },\n \"xmlns\": \"http://www.w3.org/2000/svg\",\n \"viewBox\": `0 0 ${diameter.value} ${diameter.value}`\n }, [_createVNode(\"circle\", {\n \"class\": ['v-progress-circular__underlay', underlayColorClasses.value],\n \"style\": underlayColorStyles.value,\n \"fill\": \"transparent\",\n \"cx\": \"50%\",\n \"cy\": \"50%\",\n \"r\": MAGIC_RADIUS_CONSTANT,\n \"stroke-width\": strokeWidth.value,\n \"stroke-dasharray\": CIRCUMFERENCE,\n \"stroke-dashoffset\": 0\n }, null), _createVNode(\"circle\", {\n \"class\": \"v-progress-circular__overlay\",\n \"fill\": \"transparent\",\n \"cx\": \"50%\",\n \"cy\": \"50%\",\n \"r\": MAGIC_RADIUS_CONSTANT,\n \"stroke-width\": strokeWidth.value,\n \"stroke-dasharray\": CIRCUMFERENCE,\n \"stroke-dashoffset\": strokeDashOffset.value\n }, null)]), slots.default && _createVNode(\"div\", {\n \"class\": \"v-progress-circular__content\"\n }, [slots.default({\n value: normalizedValue.value\n })])]\n }));\n return {};\n }\n});\n//# sourceMappingURL=VProgressCircular.mjs.map","// Composables\nimport { useRtl } from \"./locale.mjs\"; // Utilities\nimport { computed } from 'vue';\nimport { parseAnchor, propsFactory } from \"../util/index.mjs\"; // Types\nconst oppositeMap = {\n center: 'center',\n top: 'bottom',\n bottom: 'top',\n left: 'right',\n right: 'left'\n};\nexport const makeLocationProps = propsFactory({\n location: String\n}, 'location');\nexport function useLocation(props) {\n let opposite = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n let offset = arguments.length > 2 ? arguments[2] : undefined;\n const {\n isRtl\n } = useRtl();\n const locationStyles = computed(() => {\n if (!props.location) return {};\n const {\n side,\n align\n } = parseAnchor(props.location.split(' ').length > 1 ? props.location : `${props.location} center`, isRtl.value);\n function getOffset(side) {\n return offset ? offset(side) : 0;\n }\n const styles = {};\n if (side !== 'center') {\n if (opposite) styles[oppositeMap[side]] = `calc(100% - ${getOffset(side)}px)`;else styles[side] = 0;\n }\n if (align !== 'center') {\n if (opposite) styles[oppositeMap[align]] = `calc(100% - ${getOffset(align)}px)`;else styles[align] = 0;\n } else {\n if (side === 'center') styles.top = styles.left = '50%';else {\n styles[{\n top: 'left',\n bottom: 'left',\n left: 'top',\n right: 'top'\n }[side]] = '50%';\n }\n styles.transform = {\n top: 'translateX(-50%)',\n bottom: 'translateX(-50%)',\n left: 'translateY(-50%)',\n right: 'translateY(-50%)',\n center: 'translate(-50%, -50%)'\n }[side];\n }\n return styles;\n });\n return {\n locationStyles\n };\n}\n//# sourceMappingURL=location.mjs.map","import { createVNode as _createVNode } from \"vue\";\n// Styles\nimport \"./VProgressLinear.css\";\n\n// Composables\nimport { useBackgroundColor, useTextColor } from \"../../composables/color.mjs\";\nimport { makeComponentProps } from \"../../composables/component.mjs\";\nimport { useIntersectionObserver } from \"../../composables/intersectionObserver.mjs\";\nimport { useRtl } from \"../../composables/locale.mjs\";\nimport { makeLocationProps, useLocation } from \"../../composables/location.mjs\";\nimport { useProxiedModel } from \"../../composables/proxiedModel.mjs\";\nimport { makeRoundedProps, useRounded } from \"../../composables/rounded.mjs\";\nimport { makeTagProps } from \"../../composables/tag.mjs\";\nimport { makeThemeProps, provideTheme } from \"../../composables/theme.mjs\"; // Utilities\nimport { computed, Transition } from 'vue';\nimport { convertToUnit, genericComponent, propsFactory, useRender } from \"../../util/index.mjs\";\nexport const makeVProgressLinearProps = propsFactory({\n absolute: Boolean,\n active: {\n type: Boolean,\n default: true\n },\n bgColor: String,\n bgOpacity: [Number, String],\n bufferValue: {\n type: [Number, String],\n default: 0\n },\n clickable: Boolean,\n color: String,\n height: {\n type: [Number, String],\n default: 4\n },\n indeterminate: Boolean,\n max: {\n type: [Number, String],\n default: 100\n },\n modelValue: {\n type: [Number, String],\n default: 0\n },\n reverse: Boolean,\n stream: Boolean,\n striped: Boolean,\n roundedBar: Boolean,\n ...makeComponentProps(),\n ...makeLocationProps({\n location: 'top'\n }),\n ...makeRoundedProps(),\n ...makeTagProps(),\n ...makeThemeProps()\n}, 'VProgressLinear');\nexport const VProgressLinear = genericComponent()({\n name: 'VProgressLinear',\n props: makeVProgressLinearProps(),\n emits: {\n 'update:modelValue': value => true\n },\n setup(props, _ref) {\n let {\n slots\n } = _ref;\n const progress = useProxiedModel(props, 'modelValue');\n const {\n isRtl,\n rtlClasses\n } = useRtl();\n const {\n themeClasses\n } = provideTheme(props);\n const {\n locationStyles\n } = useLocation(props);\n const {\n textColorClasses,\n textColorStyles\n } = useTextColor(props, 'color');\n const {\n backgroundColorClasses,\n backgroundColorStyles\n } = useBackgroundColor(computed(() => props.bgColor || props.color));\n const {\n backgroundColorClasses: barColorClasses,\n backgroundColorStyles: barColorStyles\n } = useBackgroundColor(props, 'color');\n const {\n roundedClasses\n } = useRounded(props);\n const {\n intersectionRef,\n isIntersecting\n } = useIntersectionObserver();\n const max = computed(() => parseInt(props.max, 10));\n const height = computed(() => parseInt(props.height, 10));\n const normalizedBuffer = computed(() => parseFloat(props.bufferValue) / max.value * 100);\n const normalizedValue = computed(() => parseFloat(progress.value) / max.value * 100);\n const isReversed = computed(() => isRtl.value !== props.reverse);\n const transition = computed(() => props.indeterminate ? 'fade-transition' : 'slide-x-transition');\n const opacity = computed(() => {\n return props.bgOpacity == null ? props.bgOpacity : parseFloat(props.bgOpacity);\n });\n function handleClick(e) {\n if (!intersectionRef.value) return;\n const {\n left,\n right,\n width\n } = intersectionRef.value.getBoundingClientRect();\n const value = isReversed.value ? width - e.clientX + (right - width) : e.clientX - left;\n progress.value = Math.round(value / width * max.value);\n }\n useRender(() => _createVNode(props.tag, {\n \"ref\": intersectionRef,\n \"class\": ['v-progress-linear', {\n 'v-progress-linear--absolute': props.absolute,\n 'v-progress-linear--active': props.active && isIntersecting.value,\n 'v-progress-linear--reverse': isReversed.value,\n 'v-progress-linear--rounded': props.rounded,\n 'v-progress-linear--rounded-bar': props.roundedBar,\n 'v-progress-linear--striped': props.striped\n }, roundedClasses.value, themeClasses.value, rtlClasses.value, props.class],\n \"style\": [{\n bottom: props.location === 'bottom' ? 0 : undefined,\n top: props.location === 'top' ? 0 : undefined,\n height: props.active ? convertToUnit(height.value) : 0,\n '--v-progress-linear-height': convertToUnit(height.value),\n ...locationStyles.value\n }, props.style],\n \"role\": \"progressbar\",\n \"aria-hidden\": props.active ? 'false' : 'true',\n \"aria-valuemin\": \"0\",\n \"aria-valuemax\": props.max,\n \"aria-valuenow\": props.indeterminate ? undefined : normalizedValue.value,\n \"onClick\": props.clickable && handleClick\n }, {\n default: () => [props.stream && _createVNode(\"div\", {\n \"key\": \"stream\",\n \"class\": ['v-progress-linear__stream', textColorClasses.value],\n \"style\": {\n ...textColorStyles.value,\n [isReversed.value ? 'left' : 'right']: convertToUnit(-height.value),\n borderTop: `${convertToUnit(height.value / 2)} dotted`,\n opacity: opacity.value,\n top: `calc(50% - ${convertToUnit(height.value / 4)})`,\n width: convertToUnit(100 - normalizedBuffer.value, '%'),\n '--v-progress-linear-stream-to': convertToUnit(height.value * (isReversed.value ? 1 : -1))\n }\n }, null), _createVNode(\"div\", {\n \"class\": ['v-progress-linear__background', backgroundColorClasses.value],\n \"style\": [backgroundColorStyles.value, {\n opacity: opacity.value,\n width: convertToUnit(!props.stream ? 100 : normalizedBuffer.value, '%')\n }]\n }, null), _createVNode(Transition, {\n \"name\": transition.value\n }, {\n default: () => [!props.indeterminate ? _createVNode(\"div\", {\n \"class\": ['v-progress-linear__determinate', barColorClasses.value],\n \"style\": [barColorStyles.value, {\n width: convertToUnit(normalizedValue.value, '%')\n }]\n }, null) : _createVNode(\"div\", {\n \"class\": \"v-progress-linear__indeterminate\"\n }, [['long', 'short'].map(bar => _createVNode(\"div\", {\n \"key\": bar,\n \"class\": ['v-progress-linear__indeterminate', bar, barColorClasses.value],\n \"style\": barColorStyles.value\n }, null))])]\n }), slots.default && _createVNode(\"div\", {\n \"class\": \"v-progress-linear__content\"\n }, [slots.default({\n value: normalizedValue.value,\n buffer: normalizedBuffer.value\n })])]\n }));\n return {};\n }\n});\n//# sourceMappingURL=VProgressLinear.mjs.map","import { createVNode as _createVNode } from \"vue\";\n// Components\nimport { VProgressLinear } from \"../components/VProgressLinear/index.mjs\"; // Utilities\nimport { computed } from 'vue';\nimport { getCurrentInstanceName, propsFactory } from \"../util/index.mjs\"; // Types\n// Composables\nexport const makeLoaderProps = propsFactory({\n loading: [Boolean, String]\n}, 'loader');\nexport function useLoader(props) {\n let name = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : getCurrentInstanceName();\n const loaderClasses = computed(() => ({\n [`${name}--loading`]: props.loading\n }));\n return {\n loaderClasses\n };\n}\nexport function LoaderSlot(props, _ref) {\n let {\n slots\n } = _ref;\n return _createVNode(\"div\", {\n \"class\": `${props.name}__loader`\n }, [slots.default?.({\n color: props.color,\n isActive: props.active\n }) || _createVNode(VProgressLinear, {\n \"active\": props.active,\n \"color\": props.color,\n \"height\": \"2\",\n \"indeterminate\": true\n }, null)]);\n}\n//# sourceMappingURL=loader.mjs.map","// Utilities\nimport { computed } from 'vue';\nimport { getCurrentInstanceName, propsFactory } from \"../util/index.mjs\"; // Types\nconst positionValues = ['static', 'relative', 'fixed', 'absolute', 'sticky'];\n// Composables\nexport const makePositionProps = propsFactory({\n position: {\n type: String,\n validator: /* istanbul ignore next */v => positionValues.includes(v)\n }\n}, 'position');\nexport function usePosition(props) {\n let name = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : getCurrentInstanceName();\n const positionClasses = computed(() => {\n return props.position ? `${name}--${props.position}` : undefined;\n });\n return {\n positionClasses\n };\n}\n//# sourceMappingURL=position.mjs.map","// Utilities\nimport { nextTick, watch } from 'vue';\n\n// Types\n\nexport function useSelectLink(link, select) {\n watch(() => link.isActive?.value, isActive => {\n if (link.isLink.value && isActive && select) {\n nextTick(() => {\n select(true);\n });\n }\n }, {\n immediate: true\n });\n}\n//# sourceMappingURL=selectLink.mjs.map","import { withDirectives as _withDirectives, resolveDirective as _resolveDirective, createVNode as _createVNode } from \"vue\";\n// Styles\nimport \"./VBtn.css\";\n\n// Components\nimport { VBtnToggleSymbol } from \"../VBtnToggle/VBtnToggle.mjs\";\nimport { VDefaultsProvider } from \"../VDefaultsProvider/index.mjs\";\nimport { VIcon } from \"../VIcon/index.mjs\";\nimport { VProgressCircular } from \"../VProgressCircular/index.mjs\"; // Composables\nimport { makeBorderProps, useBorder } from \"../../composables/border.mjs\";\nimport { makeComponentProps } from \"../../composables/component.mjs\";\nimport { makeDensityProps, useDensity } from \"../../composables/density.mjs\";\nimport { makeDimensionProps, useDimension } from \"../../composables/dimensions.mjs\";\nimport { makeElevationProps, useElevation } from \"../../composables/elevation.mjs\";\nimport { makeGroupItemProps, useGroupItem } from \"../../composables/group.mjs\";\nimport { IconValue } from \"../../composables/icons.mjs\";\nimport { makeLoaderProps, useLoader } from \"../../composables/loader.mjs\";\nimport { makeLocationProps, useLocation } from \"../../composables/location.mjs\";\nimport { makePositionProps, usePosition } from \"../../composables/position.mjs\";\nimport { makeRoundedProps, useRounded } from \"../../composables/rounded.mjs\";\nimport { makeRouterProps, useLink } from \"../../composables/router.mjs\";\nimport { useSelectLink } from \"../../composables/selectLink.mjs\";\nimport { makeSizeProps, useSize } from \"../../composables/size.mjs\";\nimport { makeTagProps } from \"../../composables/tag.mjs\";\nimport { makeThemeProps, provideTheme } from \"../../composables/theme.mjs\";\nimport { genOverlays, makeVariantProps, useVariant } from \"../../composables/variant.mjs\"; // Directives\nimport { Ripple } from \"../../directives/ripple/index.mjs\"; // Utilities\nimport { computed } from 'vue';\nimport { genericComponent, propsFactory, useRender } from \"../../util/index.mjs\"; // Types\nexport const makeVBtnProps = propsFactory({\n active: {\n type: Boolean,\n default: undefined\n },\n symbol: {\n type: null,\n default: VBtnToggleSymbol\n },\n flat: Boolean,\n icon: [Boolean, String, Function, Object],\n prependIcon: IconValue,\n appendIcon: IconValue,\n block: Boolean,\n stacked: Boolean,\n ripple: {\n type: [Boolean, Object],\n default: true\n },\n text: String,\n ...makeBorderProps(),\n ...makeComponentProps(),\n ...makeDensityProps(),\n ...makeDimensionProps(),\n ...makeElevationProps(),\n ...makeGroupItemProps(),\n ...makeLoaderProps(),\n ...makeLocationProps(),\n ...makePositionProps(),\n ...makeRoundedProps(),\n ...makeRouterProps(),\n ...makeSizeProps(),\n ...makeTagProps({\n tag: 'button'\n }),\n ...makeThemeProps(),\n ...makeVariantProps({\n variant: 'elevated'\n })\n}, 'VBtn');\nexport const VBtn = genericComponent()({\n name: 'VBtn',\n directives: {\n Ripple\n },\n props: makeVBtnProps(),\n emits: {\n 'group:selected': val => true\n },\n setup(props, _ref) {\n let {\n attrs,\n slots\n } = _ref;\n const {\n themeClasses\n } = provideTheme(props);\n const {\n borderClasses\n } = useBorder(props);\n const {\n colorClasses,\n colorStyles,\n variantClasses\n } = useVariant(props);\n const {\n densityClasses\n } = useDensity(props);\n const {\n dimensionStyles\n } = useDimension(props);\n const {\n elevationClasses\n } = useElevation(props);\n const {\n loaderClasses\n } = useLoader(props);\n const {\n locationStyles\n } = useLocation(props);\n const {\n positionClasses\n } = usePosition(props);\n const {\n roundedClasses\n } = useRounded(props);\n const {\n sizeClasses,\n sizeStyles\n } = useSize(props);\n const group = useGroupItem(props, props.symbol, false);\n const link = useLink(props, attrs);\n const isActive = computed(() => {\n if (props.active !== undefined) {\n return props.active;\n }\n if (link.isLink.value) {\n return link.isActive?.value;\n }\n return group?.isSelected.value;\n });\n const isDisabled = computed(() => group?.disabled.value || props.disabled);\n const isElevated = computed(() => {\n return props.variant === 'elevated' && !(props.disabled || props.flat || props.border);\n });\n const valueAttr = computed(() => {\n if (props.value === undefined) return undefined;\n return Object(props.value) === props.value ? JSON.stringify(props.value, null, 0) : props.value;\n });\n function onClick(e) {\n if (isDisabled.value) return;\n link.navigate?.(e);\n group?.toggle();\n }\n useSelectLink(link, group?.select);\n useRender(() => {\n const Tag = link.isLink.value ? 'a' : props.tag;\n const hasPrepend = !!(props.prependIcon || slots.prepend);\n const hasAppend = !!(props.appendIcon || slots.append);\n const hasIcon = !!(props.icon && props.icon !== true);\n const hasColor = group?.isSelected.value && (!link.isLink.value || link.isActive?.value) || !group || link.isActive?.value;\n return _withDirectives(_createVNode(Tag, {\n \"type\": Tag === 'a' ? undefined : 'button',\n \"class\": ['v-btn', group?.selectedClass.value, {\n 'v-btn--active': isActive.value,\n 'v-btn--block': props.block,\n 'v-btn--disabled': isDisabled.value,\n 'v-btn--elevated': isElevated.value,\n 'v-btn--flat': props.flat,\n 'v-btn--icon': !!props.icon,\n 'v-btn--loading': props.loading,\n 'v-btn--stacked': props.stacked\n }, themeClasses.value, borderClasses.value, hasColor ? colorClasses.value : undefined, densityClasses.value, elevationClasses.value, loaderClasses.value, positionClasses.value, roundedClasses.value, sizeClasses.value, variantClasses.value, props.class],\n \"style\": [hasColor ? colorStyles.value : undefined, dimensionStyles.value, locationStyles.value, sizeStyles.value, props.style],\n \"disabled\": isDisabled.value || undefined,\n \"href\": link.href.value,\n \"onClick\": onClick,\n \"value\": valueAttr.value\n }, {\n default: () => [genOverlays(true, 'v-btn'), !props.icon && hasPrepend && _createVNode(\"span\", {\n \"key\": \"prepend\",\n \"class\": \"v-btn__prepend\"\n }, [!slots.prepend ? _createVNode(VIcon, {\n \"key\": \"prepend-icon\",\n \"icon\": props.prependIcon\n }, null) : _createVNode(VDefaultsProvider, {\n \"key\": \"prepend-defaults\",\n \"disabled\": !props.prependIcon,\n \"defaults\": {\n VIcon: {\n icon: props.prependIcon\n }\n }\n }, slots.prepend)]), _createVNode(\"span\", {\n \"class\": \"v-btn__content\",\n \"data-no-activator\": \"\"\n }, [!slots.default && hasIcon ? _createVNode(VIcon, {\n \"key\": \"content-icon\",\n \"icon\": props.icon\n }, null) : _createVNode(VDefaultsProvider, {\n \"key\": \"content-defaults\",\n \"disabled\": !hasIcon,\n \"defaults\": {\n VIcon: {\n icon: props.icon\n }\n }\n }, {\n default: () => [slots.default?.() ?? props.text]\n })]), !props.icon && hasAppend && _createVNode(\"span\", {\n \"key\": \"append\",\n \"class\": \"v-btn__append\"\n }, [!slots.append ? _createVNode(VIcon, {\n \"key\": \"append-icon\",\n \"icon\": props.appendIcon\n }, null) : _createVNode(VDefaultsProvider, {\n \"key\": \"append-defaults\",\n \"disabled\": !props.appendIcon,\n \"defaults\": {\n VIcon: {\n icon: props.appendIcon\n }\n }\n }, slots.append)]), !!props.loading && _createVNode(\"span\", {\n \"key\": \"loader\",\n \"class\": \"v-btn__loader\"\n }, [slots.loader?.() ?? _createVNode(VProgressCircular, {\n \"color\": typeof props.loading === 'boolean' ? undefined : props.loading,\n \"indeterminate\": true,\n \"size\": \"23\",\n \"width\": \"2\"\n }, null)])]\n }), [[_resolveDirective(\"ripple\"), !isDisabled.value && props.ripple, null]]);\n });\n return {};\n }\n});\n//# sourceMappingURL=VBtn.mjs.map","import { mergeProps as _mergeProps, resolveDirective as _resolveDirective, createVNode as _createVNode } from \"vue\";\n// Styles\nimport \"./VSnackbar.css\";\n\n// Components\nimport { VDefaultsProvider } from \"../VDefaultsProvider/index.mjs\";\nimport { VOverlay } from \"../VOverlay/index.mjs\";\nimport { makeVOverlayProps } from \"../VOverlay/VOverlay.mjs\"; // Composables\nimport { forwardRefs } from \"../../composables/forwardRefs.mjs\";\nimport { makeLocationProps, useLocation } from \"../../composables/location.mjs\";\nimport { makePositionProps, usePosition } from \"../../composables/position.mjs\";\nimport { useProxiedModel } from \"../../composables/proxiedModel.mjs\";\nimport { makeRoundedProps, useRounded } from \"../../composables/rounded.mjs\";\nimport { useScopeId } from \"../../composables/scopeId.mjs\";\nimport { makeThemeProps, provideTheme } from \"../../composables/theme.mjs\";\nimport { genOverlays, makeVariantProps, useVariant } from \"../../composables/variant.mjs\"; // Utilities\nimport { mergeProps, onMounted, ref, watch } from 'vue';\nimport { genericComponent, omit, propsFactory, useRender } from \"../../util/index.mjs\";\nexport const makeVSnackbarProps = propsFactory({\n multiLine: Boolean,\n timeout: {\n type: [Number, String],\n default: 5000\n },\n vertical: Boolean,\n ...makeLocationProps({\n location: 'bottom'\n }),\n ...makePositionProps(),\n ...makeRoundedProps(),\n ...makeVariantProps(),\n ...makeThemeProps(),\n ...omit(makeVOverlayProps({\n transition: 'v-snackbar-transition'\n }), ['persistent', 'noClickAnimation', 'scrim', 'scrollStrategy'])\n}, 'VSnackbar');\nexport const VSnackbar = genericComponent()({\n name: 'VSnackbar',\n props: makeVSnackbarProps(),\n emits: {\n 'update:modelValue': v => true\n },\n setup(props, _ref) {\n let {\n slots\n } = _ref;\n const isActive = useProxiedModel(props, 'modelValue');\n const {\n locationStyles\n } = useLocation(props);\n const {\n positionClasses\n } = usePosition(props);\n const {\n scopeId\n } = useScopeId();\n const {\n themeClasses\n } = provideTheme(props);\n const {\n colorClasses,\n colorStyles,\n variantClasses\n } = useVariant(props);\n const {\n roundedClasses\n } = useRounded(props);\n const overlay = ref();\n watch(isActive, startTimeout);\n watch(() => props.timeout, startTimeout);\n onMounted(() => {\n if (isActive.value) startTimeout();\n });\n let activeTimeout = -1;\n function startTimeout() {\n window.clearTimeout(activeTimeout);\n const timeout = Number(props.timeout);\n if (!isActive.value || timeout === -1) return;\n activeTimeout = window.setTimeout(() => {\n isActive.value = false;\n }, timeout);\n }\n function onPointerenter() {\n window.clearTimeout(activeTimeout);\n }\n useRender(() => {\n const [overlayProps] = VOverlay.filterProps(props);\n return _createVNode(VOverlay, _mergeProps({\n \"ref\": overlay,\n \"class\": ['v-snackbar', {\n 'v-snackbar--active': isActive.value,\n 'v-snackbar--multi-line': props.multiLine && !props.vertical,\n 'v-snackbar--vertical': props.vertical\n }, positionClasses.value, props.class],\n \"style\": props.style\n }, overlayProps, {\n \"modelValue\": isActive.value,\n \"onUpdate:modelValue\": $event => isActive.value = $event,\n \"contentProps\": mergeProps({\n class: ['v-snackbar__wrapper', themeClasses.value, colorClasses.value, roundedClasses.value, variantClasses.value],\n style: [locationStyles.value, colorStyles.value],\n onPointerenter,\n onPointerleave: startTimeout\n }, overlayProps.contentProps),\n \"persistent\": true,\n \"noClickAnimation\": true,\n \"scrim\": false,\n \"scrollStrategy\": \"none\",\n \"_disableGlobalStack\": true\n }, scopeId), {\n default: () => [genOverlays(false, 'v-snackbar'), slots.default && _createVNode(\"div\", {\n \"class\": \"v-snackbar__content\",\n \"role\": \"status\",\n \"aria-live\": \"polite\"\n }, [slots.default()]), slots.actions && _createVNode(VDefaultsProvider, {\n \"defaults\": {\n VBtn: {\n variant: 'text',\n ripple: false\n }\n }\n }, {\n default: () => [_createVNode(\"div\", {\n \"class\": \"v-snackbar__actions\"\n }, [slots.actions()])]\n })],\n activator: slots.activator\n });\n });\n return forwardRefs({}, overlay);\n }\n});\n//# sourceMappingURL=VSnackbar.mjs.map","\n\n\n","// Utilities\nimport { createRange } from \"../../../util/index.mjs\"; // Types\nconst firstDay = {\n '001': 1,\n AD: 1,\n AE: 6,\n AF: 6,\n AG: 0,\n AI: 1,\n AL: 1,\n AM: 1,\n AN: 1,\n AR: 1,\n AS: 0,\n AT: 1,\n AU: 1,\n AX: 1,\n AZ: 1,\n BA: 1,\n BD: 0,\n BE: 1,\n BG: 1,\n BH: 6,\n BM: 1,\n BN: 1,\n BR: 0,\n BS: 0,\n BT: 0,\n BW: 0,\n BY: 1,\n BZ: 0,\n CA: 0,\n CH: 1,\n CL: 1,\n CM: 1,\n CN: 1,\n CO: 0,\n CR: 1,\n CY: 1,\n CZ: 1,\n DE: 1,\n DJ: 6,\n DK: 1,\n DM: 0,\n DO: 0,\n DZ: 6,\n EC: 1,\n EE: 1,\n EG: 6,\n ES: 1,\n ET: 0,\n FI: 1,\n FJ: 1,\n FO: 1,\n FR: 1,\n GB: 1,\n 'GB-alt-variant': 0,\n GE: 1,\n GF: 1,\n GP: 1,\n GR: 1,\n GT: 0,\n GU: 0,\n HK: 0,\n HN: 0,\n HR: 1,\n HU: 1,\n ID: 0,\n IE: 1,\n IL: 0,\n IN: 0,\n IQ: 6,\n IR: 6,\n IS: 1,\n IT: 1,\n JM: 0,\n JO: 6,\n JP: 0,\n KE: 0,\n KG: 1,\n KH: 0,\n KR: 0,\n KW: 6,\n KZ: 1,\n LA: 0,\n LB: 1,\n LI: 1,\n LK: 1,\n LT: 1,\n LU: 1,\n LV: 1,\n LY: 6,\n MC: 1,\n MD: 1,\n ME: 1,\n MH: 0,\n MK: 1,\n MM: 0,\n MN: 1,\n MO: 0,\n MQ: 1,\n MT: 0,\n MV: 5,\n MX: 0,\n MY: 1,\n MZ: 0,\n NI: 0,\n NL: 1,\n NO: 1,\n NP: 0,\n NZ: 1,\n OM: 6,\n PA: 0,\n PE: 0,\n PH: 0,\n PK: 0,\n PL: 1,\n PR: 0,\n PT: 0,\n PY: 0,\n QA: 6,\n RE: 1,\n RO: 1,\n RS: 1,\n RU: 1,\n SA: 0,\n SD: 6,\n SE: 1,\n SG: 0,\n SI: 1,\n SK: 1,\n SM: 1,\n SV: 0,\n SY: 6,\n TH: 0,\n TJ: 1,\n TM: 1,\n TR: 1,\n TT: 0,\n TW: 0,\n UA: 1,\n UM: 0,\n US: 0,\n UY: 1,\n UZ: 1,\n VA: 1,\n VE: 0,\n VI: 0,\n VN: 1,\n WS: 0,\n XK: 1,\n YE: 0,\n ZA: 0,\n ZW: 0\n};\nfunction getWeekArray(date, locale) {\n const weeks = [];\n let currentWeek = [];\n const firstDayOfMonth = startOfMonth(date);\n const lastDayOfMonth = endOfMonth(date);\n const firstDayWeekIndex = firstDayOfMonth.getDay() - firstDay[locale.slice(-2).toUpperCase()];\n const lastDayWeekIndex = lastDayOfMonth.getDay() - firstDay[locale.slice(-2).toUpperCase()];\n for (let i = 0; i < firstDayWeekIndex; i++) {\n const adjacentDay = new Date(firstDayOfMonth);\n adjacentDay.setDate(adjacentDay.getDate() - (firstDayWeekIndex - i));\n currentWeek.push(adjacentDay);\n }\n for (let i = 1; i <= lastDayOfMonth.getDate(); i++) {\n const day = new Date(date.getFullYear(), date.getMonth(), i);\n\n // Add the day to the current week\n currentWeek.push(day);\n\n // If the current week has 7 days, add it to the weeks array and start a new week\n if (currentWeek.length === 7) {\n weeks.push(currentWeek);\n currentWeek = [];\n }\n }\n for (let i = 1; i < 7 - lastDayWeekIndex; i++) {\n const adjacentDay = new Date(lastDayOfMonth);\n adjacentDay.setDate(adjacentDay.getDate() + i);\n currentWeek.push(adjacentDay);\n }\n weeks.push(currentWeek);\n return weeks;\n}\nfunction startOfMonth(date) {\n return new Date(date.getFullYear(), date.getMonth(), 1);\n}\nfunction endOfMonth(date) {\n return new Date(date.getFullYear(), date.getMonth() + 1, 0);\n}\nfunction date(value) {\n if (value == null) return new Date();\n if (value instanceof Date) return value;\n if (typeof value === 'string') {\n const parsed = Date.parse(value);\n if (!isNaN(parsed)) return new Date(parsed);\n }\n return null;\n}\nconst sundayJanuarySecond2000 = new Date(2000, 0, 2);\nfunction getWeekdays(locale) {\n const daysFromSunday = firstDay[locale.slice(-2).toUpperCase()];\n return createRange(7).map(i => {\n const weekday = new Date(sundayJanuarySecond2000);\n weekday.setDate(sundayJanuarySecond2000.getDate() + daysFromSunday + i);\n return new Intl.DateTimeFormat(locale, {\n weekday: 'short'\n }).format(weekday);\n });\n}\nfunction format(value, formatString, locale) {\n const date = new Date(value);\n let options = {};\n switch (formatString) {\n case 'fullDateWithWeekday':\n options = {\n weekday: 'long',\n day: 'numeric',\n month: 'long',\n year: 'numeric'\n };\n break;\n case 'normalDateWithWeekday':\n options = {\n weekday: 'short',\n day: 'numeric',\n month: 'short'\n };\n break;\n case 'keyboardDate':\n options = {};\n break;\n case 'monthAndDate':\n options = {\n month: 'long',\n day: 'numeric'\n };\n break;\n case 'monthAndYear':\n options = {\n month: 'long',\n year: 'numeric'\n };\n break;\n case 'dayOfMonth':\n options = {\n day: 'numeric'\n };\n break;\n default:\n options = {\n timeZone: 'UTC',\n timeZoneName: 'short'\n };\n }\n return new Intl.DateTimeFormat(locale, options).format(date);\n}\nfunction addDays(date, amount) {\n const d = new Date(date);\n d.setDate(d.getDate() + amount);\n return d;\n}\nfunction addMonths(date, amount) {\n const d = new Date(date);\n d.setMonth(d.getMonth() + amount);\n return d;\n}\nfunction getYear(date) {\n return date.getFullYear();\n}\nfunction getMonth(date) {\n return date.getMonth();\n}\nfunction startOfYear(date) {\n return new Date(date.getFullYear(), 0, 1);\n}\nfunction endOfYear(date) {\n return new Date(date.getFullYear(), 11, 31);\n}\nfunction isWithinRange(date, range) {\n return isAfter(date, range[0]) && isBefore(date, range[1]);\n}\nfunction isValid(date) {\n const d = new Date(date);\n return d instanceof Date && !isNaN(d.getTime());\n}\nfunction isAfter(date, comparing) {\n return date.getTime() > comparing.getTime();\n}\nfunction isBefore(date, comparing) {\n return date.getTime() < comparing.getTime();\n}\nfunction isEqual(date, comparing) {\n return date.getTime() === comparing.getTime();\n}\nfunction isSameDay(date, comparing) {\n return date.getDate() === comparing.getDate() && date.getMonth() === comparing.getMonth() && date.getFullYear() === comparing.getFullYear();\n}\nfunction isSameMonth(date, comparing) {\n return date.getMonth() === comparing.getMonth() && date.getFullYear() === comparing.getFullYear();\n}\nfunction getDiff(date, comparing, unit) {\n const d = new Date(date);\n const c = new Date(comparing);\n if (unit === 'month') {\n return d.getMonth() - c.getMonth() + (d.getFullYear() - c.getFullYear()) * 12;\n }\n return Math.floor((d.getTime() - c.getTime()) / (1000 * 60 * 60 * 24));\n}\nfunction setYear(date, year) {\n const d = new Date(date);\n d.setFullYear(year);\n return d;\n}\nexport class VuetifyDateAdapter {\n constructor(options) {\n this.locale = options.locale;\n }\n date(value) {\n return date(value);\n }\n toJsDate(date) {\n return date;\n }\n addDays(date, amount) {\n return addDays(date, amount);\n }\n addMonths(date, amount) {\n return addMonths(date, amount);\n }\n getWeekArray(date) {\n return getWeekArray(date, this.locale);\n }\n startOfMonth(date) {\n return startOfMonth(date);\n }\n endOfMonth(date) {\n return endOfMonth(date);\n }\n format(date, formatString) {\n return format(date, formatString, this.locale);\n }\n isEqual(date, comparing) {\n return isEqual(date, comparing);\n }\n isValid(date) {\n return isValid(date);\n }\n isWithinRange(date, range) {\n return isWithinRange(date, range);\n }\n isAfter(date, comparing) {\n return isAfter(date, comparing);\n }\n isBefore(date, comparing) {\n return !isAfter(date, comparing) && !isEqual(date, comparing);\n }\n isSameDay(date, comparing) {\n return isSameDay(date, comparing);\n }\n isSameMonth(date, comparing) {\n return isSameMonth(date, comparing);\n }\n setYear(date, year) {\n return setYear(date, year);\n }\n getDiff(date, comparing, unit) {\n return getDiff(date, comparing, unit);\n }\n getWeekdays() {\n return getWeekdays(this.locale);\n }\n getYear(date) {\n return getYear(date);\n }\n getMonth(date) {\n return getMonth(date);\n }\n startOfYear(date) {\n return startOfYear(date);\n }\n endOfYear(date) {\n return endOfYear(date);\n }\n}\n//# sourceMappingURL=vuetify.mjs.map","// Composables\nimport { useLocale } from \"../../composables/locale.mjs\"; // Utilities\nimport { inject, watch } from 'vue';\nimport { mergeDeep, propsFactory } from \"../../util/index.mjs\"; // Adapters\nimport { VuetifyDateAdapter } from \"./adapters/vuetify.mjs\"; // Types\nexport const DateAdapterSymbol = Symbol.for('vuetify:date-adapter');\nexport function createDate(options) {\n return mergeDeep({\n adapter: VuetifyDateAdapter,\n locale: {\n af: 'af-ZA',\n // ar: '', # not the same value for all variants\n bg: 'bg-BG',\n ca: 'ca-ES',\n ckb: '',\n cs: '',\n de: 'de-DE',\n el: 'el-GR',\n en: 'en-US',\n // es: '', # not the same value for all variants\n et: 'et-EE',\n fa: 'fa-IR',\n fi: 'fi-FI',\n // fr: '', #not the same value for all variants\n hr: 'hr-HR',\n hu: 'hu-HU',\n he: 'he-IL',\n id: 'id-ID',\n it: 'it-IT',\n ja: 'ja-JP',\n ko: 'ko-KR',\n lv: 'lv-LV',\n lt: 'lt-LT',\n nl: 'nl-NL',\n no: 'nn-NO',\n pl: 'pl-PL',\n pt: 'pt-PT',\n ro: 'ro-RO',\n ru: 'ru-RU',\n sk: 'sk-SK',\n sl: 'sl-SI',\n srCyrl: 'sr-SP',\n srLatn: 'sr-SP',\n sv: 'sv-SE',\n th: 'th-TH',\n tr: 'tr-TR',\n az: 'az-AZ',\n uk: 'uk-UA',\n vi: 'vi-VN',\n zhHans: 'zh-CN',\n zhHant: 'zh-TW'\n }\n }, options);\n}\n\n// TODO: revisit this after it starts being implemented\nexport const makeDateProps = propsFactory({\n displayDate: {\n type: Object,\n default: new Date()\n },\n hideAdjacentMonths: Boolean,\n modelValue: {\n type: null,\n default: () => []\n }\n}, 'date');\nexport function useDate() {\n const date = inject(DateAdapterSymbol);\n const locale = useLocale();\n if (!date) throw new Error('[Vuetify] Could not find injected date');\n const instance = typeof date.adapter === 'function'\n // eslint-disable-next-line new-cap\n ? new date.adapter({\n locale: date.locale?.[locale.current.value] ?? locale.current.value\n }) : date.adapter;\n watch(locale.current, value => {\n const newLocale = date.locale ? date.locale[value] : value;\n instance.locale = newLocale ?? instance.locale;\n });\n return instance;\n}\nexport function toIso(adapter, value) {\n const date = adapter.toJsDate(value);\n return `${date.getFullYear()}-${date.getMonth() + 1}-${date.getDate()}`;\n}\nfunction getMondayOfFirstWeekOfYear(year) {\n return new Date(year, 0, 1);\n}\n\n// https://stackoverflow.com/questions/274861/how-do-i-calculate-the-week-number-given-a-date/275024#275024\nexport function getWeek(adapter, value) {\n const date = adapter.toJsDate(value);\n let year = date.getFullYear();\n let d1w1 = getMondayOfFirstWeekOfYear(year);\n if (date < d1w1) {\n year = year - 1;\n d1w1 = getMondayOfFirstWeekOfYear(year);\n } else {\n const tv = getMondayOfFirstWeekOfYear(year + 1);\n if (date >= tv) {\n year = year + 1;\n d1w1 = tv;\n }\n }\n const diffTime = Math.abs(date.getTime() - d1w1.getTime());\n const diffDays = Math.ceil(diffTime / (1000 * 60 * 60 * 24));\n return Math.floor(diffDays / 7) + 1;\n}\n//# sourceMappingURL=date.mjs.map","// Composables\nimport { createDefaults, DefaultsSymbol } from \"./composables/defaults.mjs\";\nimport { createDisplay, DisplaySymbol } from \"./composables/display.mjs\";\nimport { createIcons, IconSymbol } from \"./composables/icons.mjs\";\nimport { createLocale, LocaleSymbol } from \"./composables/locale.mjs\";\nimport { createTheme, ThemeSymbol } from \"./composables/theme.mjs\";\nimport { createDate, DateAdapterSymbol } from \"./labs/date/date.mjs\"; // Utilities\nimport { nextTick, reactive } from 'vue';\nimport { defineComponent, getUid, IN_BROWSER, mergeDeep } from \"./util/index.mjs\"; // Types\nexport * from \"./composables/index.mjs\";\nexport function createVuetify() {\n let vuetify = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n const {\n blueprint,\n ...rest\n } = vuetify;\n const options = mergeDeep(blueprint, rest);\n const {\n aliases = {},\n components = {},\n directives = {}\n } = options;\n const defaults = createDefaults(options.defaults);\n const display = createDisplay(options.display, options.ssr);\n const theme = createTheme(options.theme);\n const icons = createIcons(options.icons);\n const locale = createLocale(options.locale);\n const date = createDate(options.date);\n const install = app => {\n for (const key in directives) {\n app.directive(key, directives[key]);\n }\n for (const key in components) {\n app.component(key, components[key]);\n }\n for (const key in aliases) {\n app.component(key, defineComponent({\n ...aliases[key],\n name: key,\n aliasName: aliases[key].name\n }));\n }\n theme.install(app);\n app.provide(DefaultsSymbol, defaults);\n app.provide(DisplaySymbol, display);\n app.provide(ThemeSymbol, theme);\n app.provide(IconSymbol, icons);\n app.provide(LocaleSymbol, locale);\n app.provide(DateAdapterSymbol, date);\n if (IN_BROWSER && options.ssr) {\n if (app.$nuxt) {\n app.$nuxt.hook('app:suspense:resolve', () => {\n display.update();\n });\n } else {\n const {\n mount\n } = app;\n app.mount = function () {\n const vm = mount(...arguments);\n nextTick(() => display.update());\n app.mount = mount;\n return vm;\n };\n }\n }\n getUid.reset();\n if (typeof __VUE_OPTIONS_API__ !== 'boolean' || __VUE_OPTIONS_API__) {\n app.mixin({\n computed: {\n $vuetify() {\n return reactive({\n defaults: inject.call(this, DefaultsSymbol),\n display: inject.call(this, DisplaySymbol),\n theme: inject.call(this, ThemeSymbol),\n icons: inject.call(this, IconSymbol),\n locale: inject.call(this, LocaleSymbol),\n date: inject.call(this, DateAdapterSymbol)\n });\n }\n }\n });\n }\n };\n return {\n install,\n defaults,\n display,\n theme,\n icons,\n locale,\n date\n };\n}\nexport const version = \"3.3.6\";\ncreateVuetify.version = version;\n\n// Vue's inject() can only be used in setup\nfunction inject(key) {\n const vm = this.$;\n const provides = vm.parent?.provides ?? vm.vnode.appContext?.provides;\n if (provides && key in provides) {\n return provides[key];\n }\n}\n//# sourceMappingURL=framework.mjs.map","import { createVNode as _createVNode, resolveDirective as _resolveDirective } from \"vue\";\n// Styles\nimport \"./VGrid.css\";\n\n// Composables\nimport { makeComponentProps } from \"../../composables/component.mjs\";\nimport { useRtl } from \"../../composables/locale.mjs\";\nimport { makeTagProps } from \"../../composables/tag.mjs\"; // Utilities\nimport { genericComponent, propsFactory, useRender } from \"../../util/index.mjs\";\nexport const makeVContainerProps = propsFactory({\n fluid: {\n type: Boolean,\n default: false\n },\n ...makeComponentProps(),\n ...makeTagProps()\n}, 'VContainer');\nexport const VContainer = genericComponent()({\n name: 'VContainer',\n props: makeVContainerProps(),\n setup(props, _ref) {\n let {\n slots\n } = _ref;\n const {\n rtlClasses\n } = useRtl();\n useRender(() => _createVNode(props.tag, {\n \"class\": ['v-container', {\n 'v-container--fluid': props.fluid\n }, rtlClasses.value, props.class],\n \"style\": props.style\n }, slots));\n return {};\n }\n});\n//# sourceMappingURL=VContainer.mjs.map","// Styles\nimport \"./VGrid.css\";\n\n// Composables\nimport { makeComponentProps } from \"../../composables/component.mjs\";\nimport { breakpoints } from \"../../composables/display.mjs\";\nimport { makeTagProps } from \"../../composables/tag.mjs\"; // Utilities\nimport { capitalize, computed, h } from 'vue';\nimport { genericComponent, propsFactory } from \"../../util/index.mjs\"; // Types\nconst breakpointProps = (() => {\n return breakpoints.reduce((props, val) => {\n props[val] = {\n type: [Boolean, String, Number],\n default: false\n };\n return props;\n }, {});\n})();\nconst offsetProps = (() => {\n return breakpoints.reduce((props, val) => {\n const offsetKey = 'offset' + capitalize(val);\n props[offsetKey] = {\n type: [String, Number],\n default: null\n };\n return props;\n }, {});\n})();\nconst orderProps = (() => {\n return breakpoints.reduce((props, val) => {\n const orderKey = 'order' + capitalize(val);\n props[orderKey] = {\n type: [String, Number],\n default: null\n };\n return props;\n }, {});\n})();\nconst propMap = {\n col: Object.keys(breakpointProps),\n offset: Object.keys(offsetProps),\n order: Object.keys(orderProps)\n};\nfunction breakpointClass(type, prop, val) {\n let className = type;\n if (val == null || val === false) {\n return undefined;\n }\n if (prop) {\n const breakpoint = prop.replace(type, '');\n className += `-${breakpoint}`;\n }\n if (type === 'col') {\n className = 'v-' + className;\n }\n // Handling the boolean style prop when accepting [Boolean, String, Number]\n // means Vue will not convert to sm: true for us.\n // Since the default is false, an empty string indicates the prop's presence.\n if (type === 'col' && (val === '' || val === true)) {\n // .v-col-md\n return className.toLowerCase();\n }\n // .order-md-6\n className += `-${val}`;\n return className.toLowerCase();\n}\nconst ALIGN_SELF_VALUES = ['auto', 'start', 'end', 'center', 'baseline', 'stretch'];\nexport const makeVColProps = propsFactory({\n cols: {\n type: [Boolean, String, Number],\n default: false\n },\n ...breakpointProps,\n offset: {\n type: [String, Number],\n default: null\n },\n ...offsetProps,\n order: {\n type: [String, Number],\n default: null\n },\n ...orderProps,\n alignSelf: {\n type: String,\n default: null,\n validator: str => ALIGN_SELF_VALUES.includes(str)\n },\n ...makeComponentProps(),\n ...makeTagProps()\n}, 'VCol');\nexport const VCol = genericComponent()({\n name: 'VCol',\n props: makeVColProps(),\n setup(props, _ref) {\n let {\n slots\n } = _ref;\n const classes = computed(() => {\n const classList = [];\n\n // Loop through `col`, `offset`, `order` breakpoint props\n let type;\n for (type in propMap) {\n propMap[type].forEach(prop => {\n const value = props[prop];\n const className = breakpointClass(type, prop, value);\n if (className) classList.push(className);\n });\n }\n const hasColClasses = classList.some(className => className.startsWith('v-col-'));\n classList.push({\n // Default to .v-col if no other col-{bp}-* classes generated nor `cols` specified.\n 'v-col': !hasColClasses || !props.cols,\n [`v-col-${props.cols}`]: props.cols,\n [`offset-${props.offset}`]: props.offset,\n [`order-${props.order}`]: props.order,\n [`align-self-${props.alignSelf}`]: props.alignSelf\n });\n return classList;\n });\n return () => h(props.tag, {\n class: [classes.value, props.class],\n style: props.style\n }, slots.default?.());\n }\n});\n//# sourceMappingURL=VCol.mjs.map","// Styles\nimport \"./VGrid.css\";\n\n// Composables\nimport { makeComponentProps } from \"../../composables/component.mjs\";\nimport { breakpoints } from \"../../composables/display.mjs\";\nimport { makeTagProps } from \"../../composables/tag.mjs\"; // Utilities\nimport { capitalize, computed, h } from 'vue';\nimport { genericComponent, propsFactory } from \"../../util/index.mjs\"; // Types\nconst ALIGNMENT = ['start', 'end', 'center'];\nconst SPACE = ['space-between', 'space-around', 'space-evenly'];\nfunction makeRowProps(prefix, def) {\n return breakpoints.reduce((props, val) => {\n const prefixKey = prefix + capitalize(val);\n props[prefixKey] = def();\n return props;\n }, {});\n}\nconst ALIGN_VALUES = [...ALIGNMENT, 'baseline', 'stretch'];\nconst alignValidator = str => ALIGN_VALUES.includes(str);\nconst alignProps = makeRowProps('align', () => ({\n type: String,\n default: null,\n validator: alignValidator\n}));\nconst JUSTIFY_VALUES = [...ALIGNMENT, ...SPACE];\nconst justifyValidator = str => JUSTIFY_VALUES.includes(str);\nconst justifyProps = makeRowProps('justify', () => ({\n type: String,\n default: null,\n validator: justifyValidator\n}));\nconst ALIGN_CONTENT_VALUES = [...ALIGNMENT, ...SPACE, 'stretch'];\nconst alignContentValidator = str => ALIGN_CONTENT_VALUES.includes(str);\nconst alignContentProps = makeRowProps('alignContent', () => ({\n type: String,\n default: null,\n validator: alignContentValidator\n}));\nconst propMap = {\n align: Object.keys(alignProps),\n justify: Object.keys(justifyProps),\n alignContent: Object.keys(alignContentProps)\n};\nconst classMap = {\n align: 'align',\n justify: 'justify',\n alignContent: 'align-content'\n};\nfunction breakpointClass(type, prop, val) {\n let className = classMap[type];\n if (val == null) {\n return undefined;\n }\n if (prop) {\n // alignSm -> Sm\n const breakpoint = prop.replace(type, '');\n className += `-${breakpoint}`;\n }\n // .align-items-sm-center\n className += `-${val}`;\n return className.toLowerCase();\n}\nexport const makeVRowProps = propsFactory({\n dense: Boolean,\n noGutters: Boolean,\n align: {\n type: String,\n default: null,\n validator: alignValidator\n },\n ...alignProps,\n justify: {\n type: String,\n default: null,\n validator: justifyValidator\n },\n ...justifyProps,\n alignContent: {\n type: String,\n default: null,\n validator: alignContentValidator\n },\n ...alignContentProps,\n ...makeComponentProps(),\n ...makeTagProps()\n}, 'VRow');\nexport const VRow = genericComponent()({\n name: 'VRow',\n props: makeVRowProps(),\n setup(props, _ref) {\n let {\n slots\n } = _ref;\n const classes = computed(() => {\n const classList = [];\n\n // Loop through `align`, `justify`, `alignContent` breakpoint props\n let type;\n for (type in propMap) {\n propMap[type].forEach(prop => {\n const value = props[prop];\n const className = breakpointClass(type, prop, value);\n if (className) classList.push(className);\n });\n }\n classList.push({\n 'v-row--no-gutters': props.noGutters,\n 'v-row--dense': props.dense,\n [`align-${props.align}`]: props.align,\n [`justify-${props.justify}`]: props.justify,\n [`align-content-${props.alignContent}`]: props.alignContent\n });\n return classList;\n });\n return () => h(props.tag, {\n class: ['v-row', classes.value, props.class],\n style: props.style\n }, slots.default?.());\n }\n});\n//# sourceMappingURL=VRow.mjs.map","// Utilities\nimport { createSimpleFunctional } from \"../../util/index.mjs\";\nexport const VSpacer = createSimpleFunctional('flex-grow-1', 'div', 'VSpacer');\n//# sourceMappingURL=VSpacer.mjs.map","\n\n","export const PwcTheme = {\n dark: false,\n colors: {\n // PwC custom colors\n primary: \"#ffffff\", // white\n secondary: \"#D04A02\", // orange\n tertiary: \"#EB8C00\", // tangerine\n quaternary: \"#E0301E\", // red\n darkGreyButton: \"#2d2d2d\", // darkgrey\n primaryButton: \"#EB8C00\", // tertiary\n primarySpinner: \"#FFFFFF\",\n\n statusGreen: \"#175d2d\",\n statusRed: \"#e0301e\",\n statusYellow: \"#ffb600\",\n\n primaryBlue: \"#415385\",\n\n fieldOutlineColor: \"#FFBF33\",\n },\n};\n","\n\n\n\n\n\n\n","\n\n\n\n\n","export function answerStatusToDisplayText(status: AnswerStatus): string {\n switch (status) {\n case AnswerStatus.NotRegistered:\n return \"Not Registered\";\n case AnswerStatus.NotStarted:\n return \"Not Started\";\n case AnswerStatus.InProgress:\n return \"In Progress\";\n case AnswerStatus.Completed:\n return \"Completed\";\n default:\n return \"\";\n }\n}\n\nexport enum AnswerStatus {\n NotRegistered = \"NOT_REGISTERED\",\n NotStarted = \"NOT_STARTED\",\n InProgress = \"IN_PROGRESS\",\n Completed = \"COMPLETED\",\n}\n","export enum ForwardingStatus {\n Completed = \"Completed\",\n NotStarted = \"NotStarted\",\n Pending = \"Pending\",\n NotApplicable = \"NotApplicable\",\n}\n\nexport function forwardingStatusToDisplayText(forwardingStatus: ForwardingStatus) {\n switch (forwardingStatus) {\n case ForwardingStatus.Completed:\n return \"Completed\";\n case ForwardingStatus.NotStarted:\n return \"Not started\";\n case ForwardingStatus.Pending:\n return \"Pending\";\n case ForwardingStatus.NotApplicable:\n return \"N/A\";\n }\n}\n","import { createVNode as _createVNode } from \"vue\";\n// Composables\nimport { makeComponentProps } from \"../../composables/component.mjs\";\nimport { provideDefaults } from \"../../composables/defaults.mjs\"; // Utilities\nimport { genericComponent, useRender } from \"../../util/index.mjs\";\nexport const VCardActions = genericComponent()({\n name: 'VCardActions',\n props: makeComponentProps(),\n setup(props, _ref) {\n let {\n slots\n } = _ref;\n provideDefaults({\n VBtn: {\n variant: 'text'\n }\n });\n useRender(() => _createVNode(\"div\", {\n \"class\": ['v-card-actions', props.class],\n \"style\": props.style\n }, [slots.default?.()]));\n return {};\n }\n});\n//# sourceMappingURL=VCardActions.mjs.map","// Utilities\nimport { createSimpleFunctional } from \"../../util/index.mjs\";\nexport const VCardSubtitle = createSimpleFunctional('v-card-subtitle');\n//# sourceMappingURL=VCardSubtitle.mjs.map","// Utilities\nimport { createSimpleFunctional } from \"../../util/index.mjs\";\nexport const VCardTitle = createSimpleFunctional('v-card-title');\n//# sourceMappingURL=VCardTitle.mjs.map","import { resolveDirective as _resolveDirective, createVNode as _createVNode } from \"vue\";\n// Components\nimport { VCardSubtitle } from \"./VCardSubtitle.mjs\";\nimport { VCardTitle } from \"./VCardTitle.mjs\";\nimport { VAvatar } from \"../VAvatar/index.mjs\";\nimport { VDefaultsProvider } from \"../VDefaultsProvider/index.mjs\"; // Composables\nimport { makeComponentProps } from \"../../composables/component.mjs\";\nimport { makeDensityProps } from \"../../composables/density.mjs\";\nimport { IconValue } from \"../../composables/icons.mjs\"; // Utilities\nimport { genericComponent, propsFactory, useRender } from \"../../util/index.mjs\";\nexport const makeCardItemProps = propsFactory({\n appendAvatar: String,\n appendIcon: IconValue,\n prependAvatar: String,\n prependIcon: IconValue,\n subtitle: String,\n title: String,\n ...makeComponentProps(),\n ...makeDensityProps()\n}, 'VCardItem');\nexport const VCardItem = genericComponent()({\n name: 'VCardItem',\n props: makeCardItemProps(),\n setup(props, _ref) {\n let {\n slots\n } = _ref;\n useRender(() => {\n const hasPrependMedia = !!(props.prependAvatar || props.prependIcon);\n const hasPrepend = !!(hasPrependMedia || slots.prepend);\n const hasAppendMedia = !!(props.appendAvatar || props.appendIcon);\n const hasAppend = !!(hasAppendMedia || slots.append);\n const hasTitle = !!(props.title || slots.title);\n const hasSubtitle = !!(props.subtitle || slots.subtitle);\n return _createVNode(\"div\", {\n \"class\": ['v-card-item', props.class],\n \"style\": props.style\n }, [hasPrepend && _createVNode(\"div\", {\n \"key\": \"prepend\",\n \"class\": \"v-card-item__prepend\"\n }, [!slots.prepend ? hasPrependMedia && _createVNode(VAvatar, {\n \"key\": \"prepend-avatar\",\n \"density\": props.density,\n \"icon\": props.prependIcon,\n \"image\": props.prependAvatar\n }, null) : _createVNode(VDefaultsProvider, {\n \"key\": \"prepend-defaults\",\n \"disabled\": !hasPrependMedia,\n \"defaults\": {\n VAvatar: {\n density: props.density,\n icon: props.prependIcon,\n image: props.prependAvatar\n }\n }\n }, slots.prepend)]), _createVNode(\"div\", {\n \"class\": \"v-card-item__content\"\n }, [hasTitle && _createVNode(VCardTitle, {\n \"key\": \"title\"\n }, {\n default: () => [slots.title?.() ?? props.title]\n }), hasSubtitle && _createVNode(VCardSubtitle, {\n \"key\": \"subtitle\"\n }, {\n default: () => [slots.subtitle?.() ?? props.subtitle]\n }), slots.default?.()]), hasAppend && _createVNode(\"div\", {\n \"key\": \"append\",\n \"class\": \"v-card-item__append\"\n }, [!slots.append ? hasAppendMedia && _createVNode(VAvatar, {\n \"key\": \"append-avatar\",\n \"density\": props.density,\n \"icon\": props.appendIcon,\n \"image\": props.appendAvatar\n }, null) : _createVNode(VDefaultsProvider, {\n \"key\": \"append-defaults\",\n \"disabled\": !hasAppendMedia,\n \"defaults\": {\n VAvatar: {\n density: props.density,\n icon: props.appendIcon,\n image: props.appendAvatar\n }\n }\n }, slots.append)])]);\n });\n return {};\n }\n});\n//# sourceMappingURL=VCardItem.mjs.map","// Utilities\nimport { createSimpleFunctional } from \"../../util/index.mjs\";\nexport const VCardText = createSimpleFunctional('v-card-text');\n//# sourceMappingURL=VCardText.mjs.map","import { withDirectives as _withDirectives, resolveDirective as _resolveDirective, createVNode as _createVNode } from \"vue\";\n/* eslint-disable complexity */\n\n// Styles\nimport \"./VCard.css\";\n\n// Components\nimport { VCardActions } from \"./VCardActions.mjs\";\nimport { VCardItem } from \"./VCardItem.mjs\";\nimport { VCardText } from \"./VCardText.mjs\";\nimport { VDefaultsProvider } from \"../VDefaultsProvider/index.mjs\";\nimport { VImg } from \"../VImg/index.mjs\"; // Composables\nimport { makeBorderProps, useBorder } from \"../../composables/border.mjs\";\nimport { makeComponentProps } from \"../../composables/component.mjs\";\nimport { makeDensityProps, useDensity } from \"../../composables/density.mjs\";\nimport { makeDimensionProps, useDimension } from \"../../composables/dimensions.mjs\";\nimport { makeElevationProps, useElevation } from \"../../composables/elevation.mjs\";\nimport { IconValue } from \"../../composables/icons.mjs\";\nimport { LoaderSlot, makeLoaderProps, useLoader } from \"../../composables/loader.mjs\";\nimport { makeLocationProps, useLocation } from \"../../composables/location.mjs\";\nimport { makePositionProps, usePosition } from \"../../composables/position.mjs\";\nimport { makeRoundedProps, useRounded } from \"../../composables/rounded.mjs\";\nimport { makeRouterProps, useLink } from \"../../composables/router.mjs\";\nimport { makeTagProps } from \"../../composables/tag.mjs\";\nimport { makeThemeProps, provideTheme } from \"../../composables/theme.mjs\";\nimport { genOverlays, makeVariantProps, useVariant } from \"../../composables/variant.mjs\"; // Directives\nimport { Ripple } from \"../../directives/ripple/index.mjs\"; // Utilities\nimport { computed } from 'vue';\nimport { genericComponent, propsFactory, useRender } from \"../../util/index.mjs\"; // Types\nexport const makeVCardProps = propsFactory({\n appendAvatar: String,\n appendIcon: IconValue,\n disabled: Boolean,\n flat: Boolean,\n hover: Boolean,\n image: String,\n link: {\n type: Boolean,\n default: undefined\n },\n prependAvatar: String,\n prependIcon: IconValue,\n ripple: {\n type: [Boolean, Object],\n default: true\n },\n subtitle: String,\n text: String,\n title: String,\n ...makeBorderProps(),\n ...makeComponentProps(),\n ...makeDensityProps(),\n ...makeDimensionProps(),\n ...makeElevationProps(),\n ...makeLoaderProps(),\n ...makeLocationProps(),\n ...makePositionProps(),\n ...makeRoundedProps(),\n ...makeRouterProps(),\n ...makeTagProps(),\n ...makeThemeProps(),\n ...makeVariantProps({\n variant: 'elevated'\n })\n}, 'VCard');\nexport const VCard = genericComponent()({\n name: 'VCard',\n directives: {\n Ripple\n },\n props: makeVCardProps(),\n setup(props, _ref) {\n let {\n attrs,\n slots\n } = _ref;\n const {\n themeClasses\n } = provideTheme(props);\n const {\n borderClasses\n } = useBorder(props);\n const {\n colorClasses,\n colorStyles,\n variantClasses\n } = useVariant(props);\n const {\n densityClasses\n } = useDensity(props);\n const {\n dimensionStyles\n } = useDimension(props);\n const {\n elevationClasses\n } = useElevation(props);\n const {\n loaderClasses\n } = useLoader(props);\n const {\n locationStyles\n } = useLocation(props);\n const {\n positionClasses\n } = usePosition(props);\n const {\n roundedClasses\n } = useRounded(props);\n const link = useLink(props, attrs);\n const isLink = computed(() => props.link !== false && link.isLink.value);\n const isClickable = computed(() => !props.disabled && props.link !== false && (props.link || link.isClickable.value));\n useRender(() => {\n const Tag = isLink.value ? 'a' : props.tag;\n const hasTitle = !!(slots.title || props.title);\n const hasSubtitle = !!(slots.subtitle || props.subtitle);\n const hasHeader = hasTitle || hasSubtitle;\n const hasAppend = !!(slots.append || props.appendAvatar || props.appendIcon);\n const hasPrepend = !!(slots.prepend || props.prependAvatar || props.prependIcon);\n const hasImage = !!(slots.image || props.image);\n const hasCardItem = hasHeader || hasPrepend || hasAppend;\n const hasText = !!(slots.text || props.text);\n return _withDirectives(_createVNode(Tag, {\n \"class\": ['v-card', {\n 'v-card--disabled': props.disabled,\n 'v-card--flat': props.flat,\n 'v-card--hover': props.hover && !(props.disabled || props.flat),\n 'v-card--link': isClickable.value\n }, themeClasses.value, borderClasses.value, colorClasses.value, densityClasses.value, elevationClasses.value, loaderClasses.value, positionClasses.value, roundedClasses.value, variantClasses.value, props.class],\n \"style\": [colorStyles.value, dimensionStyles.value, locationStyles.value, props.style],\n \"href\": link.href.value,\n \"onClick\": isClickable.value && link.navigate,\n \"tabindex\": props.disabled ? -1 : undefined\n }, {\n default: () => [hasImage && _createVNode(\"div\", {\n \"key\": \"image\",\n \"class\": \"v-card__image\"\n }, [!slots.image ? _createVNode(VImg, {\n \"key\": \"image-img\",\n \"cover\": true,\n \"src\": props.image\n }, null) : _createVNode(VDefaultsProvider, {\n \"key\": \"image-defaults\",\n \"disabled\": !props.image,\n \"defaults\": {\n VImg: {\n cover: true,\n src: props.image\n }\n }\n }, slots.image)]), _createVNode(LoaderSlot, {\n \"name\": \"v-card\",\n \"active\": !!props.loading,\n \"color\": typeof props.loading === 'boolean' ? undefined : props.loading\n }, {\n default: slots.loader\n }), hasCardItem && _createVNode(VCardItem, {\n \"key\": \"item\",\n \"prependAvatar\": props.prependAvatar,\n \"prependIcon\": props.prependIcon,\n \"title\": props.title,\n \"subtitle\": props.subtitle,\n \"appendAvatar\": props.appendAvatar,\n \"appendIcon\": props.appendIcon\n }, {\n default: slots.item,\n prepend: slots.prepend,\n title: slots.title,\n subtitle: slots.subtitle,\n append: slots.append\n }), hasText && _createVNode(VCardText, {\n \"key\": \"text\"\n }, {\n default: () => [slots.text?.() ?? props.text]\n }), slots.default?.(), slots.actions && _createVNode(VCardActions, null, {\n default: slots.actions\n }), genOverlays(isClickable.value, 'v-card')]\n }), [[_resolveDirective(\"ripple\"), isClickable.value && props.ripple]]);\n });\n return {};\n }\n});\n//# sourceMappingURL=VCard.mjs.map","\n\n\n\n\n","\n\n\n","export class Questionnaire {\n id: string = \"\";\n label: string = \"\";\n templateId: string = \"\";\n createdAt: string = \"\";\n}\n","import type { Questionnaire } from \"@/models/questionnaire\";\nimport type ReceivedQuestionnaires from \"@/models/receivedQuestionnaires\";\nimport type ReceivedQuestionnaire from \"@/models/receivedQuestionnaire\";\nimport axios from \"axios\";\n\nexport const getQuestionnaires = async (): Promise => {\n const resp = await axios.get(\"/api/questionnaires\");\n return resp.data;\n};\n\nexport const getReceivedQuestionnaires =\n async (): Promise => {\n const resp = await axios.get(\n \"/api/questionnaires/received\"\n );\n return resp.data;\n };\n\nexport const getSenderCompanies = async (): Promise => {\n const resp = await axios.get(\"/api/questionnaires/sender-companies\");\n return resp.data;\n};\n\nexport const getCompletedReceivedQuestionnairesForTemplateId = async (\n templateId: string\n): Promise => {\n const resp = await axios.get(\"/api/questionnaires/completed\", {\n params: { templateId },\n });\n return resp.data;\n};\n","import type ReceivedQuestionnaire from \"./receivedQuestionnaire\";\n\nexport default class ReceivedQuestionnaires {\n questionnaires = new Array();\n}\n","import { Questionnaire } from \"@/models/questionnaire\";\nimport { defineStore } from \"pinia\";\nimport { getQuestionnaires, getReceivedQuestionnaires } from \"@/services/questionnairesService\";\nimport ReceivedQuestionnaires from \"@/models/receivedQuestionnaires\";\n\nexport interface IQuestionnaires {\n selectedQuestionnaire: Questionnaire;\n latestSentQuestionnaire: Questionnaire;\n sentQuestionnaires: Questionnaire[];\n receivedQuestionnaires: ReceivedQuestionnaires;\n}\n\nexport const useQuestionnairesStore = defineStore(\"questionnaires\", {\n state: (): IQuestionnaires => ({\n selectedQuestionnaire: new Questionnaire(),\n latestSentQuestionnaire: new Questionnaire(),\n sentQuestionnaires: [],\n receivedQuestionnaires: new ReceivedQuestionnaires(),\n }),\n\n actions: {\n async getLatestQuestionnaire(): Promise {\n this.sentQuestionnaires = await getQuestionnaires();\n if (this.sentQuestionnaires.length > 1) {\n this.sentQuestionnaires.sort((a: Questionnaire, b: Questionnaire) => {\n return Date.parse(b.createdAt) - Date.parse(a.createdAt);\n });\n }\n this.latestSentQuestionnaire = this.sentQuestionnaires[0];\n },\n\n async getSentAndReceivedQuestionnaires(): Promise {\n [this.sentQuestionnaires, this.receivedQuestionnaires] = await Promise.all([\n getQuestionnaires(),\n getReceivedQuestionnaires(),\n ]);\n },\n\n getCreatedAtDateString(): string {\n if (!this.selectedQuestionnaire.createdAt) {\n return \"\";\n } else {\n let createdAtDate = new Date(this.selectedQuestionnaire.createdAt);\n return `${createdAtDate.getDate().toString().padStart(2, \"0\")}/${(\n createdAtDate.getMonth() + 1\n )\n .toString()\n .padStart(2, \"0\")}/${createdAtDate.getFullYear()}`;\n }\n },\n\n getLastEditedString(lastEdited: any): string {\n if (!lastEdited) {\n return \"\";\n } else {\n let lastEditedDate = new Date(lastEdited);\n return `${lastEditedDate.getDate().toString().padStart(2, \"0\")}/${(\n lastEditedDate.getMonth() + 1\n )\n .toString()\n .padStart(2, \"0\")}/${lastEditedDate.getFullYear()}`;\n }\n }\n },\n});\n","\n\n","\n\n\n\n\n","\n\n\n","import type { Supplier } from \"@/models/supplier\";\n\nimport axios from \"axios\";\n\nexport const deleteSupplier = async (supplier: Supplier): Promise => {\n const resp = await axios.delete(\"/api/supplier\", {\n data: supplier,\n });\n return resp.data;\n};\n\nexport const addSupplier = async (supplier: Supplier): Promise => {\n const resp = await axios.post(\"/api/supplier\", supplier);\n return resp.data;\n};\n","import type { Supplier } from \"@/models/supplier\";\n\nimport axios from \"axios\";\n\nexport const getSuppliers = async (): Promise => {\n const resp = await axios.get(\"/api/suppliers\");\n return resp.data;\n};\n\nexport const uploadSuppliers = async (formData: FormData): Promise => {\n await axios.post(\"/api/suppliers\", formData, {\n headers: {\n \"Content-Type\": \"multipart/form-data\",\n },\n });\n};\n","\nimport type { Supplier } from \"@/models/supplier\";\nimport { addSupplier, deleteSupplier } from \"@/services/supplierService\";\nimport { getSuppliers } from \"@/services/suppliersService\";\nimport { defineStore } from \"pinia\";\n\nexport interface ISuppliers {\n suppliers: Supplier[];\n loading: boolean;\n}\n\nexport const useSuppliersStore = defineStore(\"suppliers\", {\n state: (): ISuppliers => ({\n suppliers: [],\n loading: false\n }),\n\n getters: {\n hasSuppliers: (state) => state.suppliers.length > 0,\n },\n\n actions: {\n async setSupplierList(): Promise {\n this.loading = true;\n try {\n this.suppliers = await getSuppliers();\n } catch (error) {\n throw new Error(\"Could not get supplier list\");\n } finally {\n this.loading = false;\n }\n },\n\n async addSupplierToList(supplier: Supplier) {\n this.loading = true;\n try{\n await addSupplier(supplier);\n await this.setSupplierList();\n } catch (error) {\n throw new Error(\"Could not add supplier\");\n } finally {\n this.loading = false;\n }\n },\n\n async removeSupplierFromList(supplier: Supplier) {\n this.loading = true;\n try{\n await deleteSupplier(supplier);\n await this.setSupplierList();\n } catch (error) {\n throw new Error(\"Could not remove supplier\");\n } finally {\n this.loading = false;\n }\n }\n }\n})","\n\n\n","\n\n\n\n\n","\n\n\n","// Composables\nimport { useProxiedModel } from \"./proxiedModel.mjs\"; // Utilities\nimport { computed, inject, provide, ref, shallowRef, toRef, watch } from 'vue';\nimport { consoleWarn, propsFactory } from \"../util/index.mjs\"; // Types\nexport const FormKey = Symbol.for('vuetify:form');\nexport const makeFormProps = propsFactory({\n disabled: Boolean,\n fastFail: Boolean,\n readonly: Boolean,\n modelValue: {\n type: Boolean,\n default: null\n },\n validateOn: {\n type: String,\n default: 'input'\n }\n}, 'form');\nexport function createForm(props) {\n const model = useProxiedModel(props, 'modelValue');\n const isDisabled = computed(() => props.disabled);\n const isReadonly = computed(() => props.readonly);\n const isValidating = shallowRef(false);\n const items = ref([]);\n const errors = ref([]);\n async function validate() {\n const results = [];\n let valid = true;\n errors.value = [];\n isValidating.value = true;\n for (const item of items.value) {\n const itemErrorMessages = await item.validate();\n if (itemErrorMessages.length > 0) {\n valid = false;\n results.push({\n id: item.id,\n errorMessages: itemErrorMessages\n });\n }\n if (!valid && props.fastFail) break;\n }\n errors.value = results;\n isValidating.value = false;\n return {\n valid,\n errors: errors.value\n };\n }\n function reset() {\n items.value.forEach(item => item.reset());\n }\n function resetValidation() {\n items.value.forEach(item => item.resetValidation());\n }\n watch(items, () => {\n let valid = 0;\n let invalid = 0;\n const results = [];\n for (const item of items.value) {\n if (item.isValid === false) {\n invalid++;\n results.push({\n id: item.id,\n errorMessages: item.errorMessages\n });\n } else if (item.isValid === true) valid++;\n }\n errors.value = results;\n model.value = invalid > 0 ? false : valid === items.value.length ? true : null;\n }, {\n deep: true\n });\n provide(FormKey, {\n register: _ref => {\n let {\n id,\n validate,\n reset,\n resetValidation\n } = _ref;\n if (items.value.some(item => item.id === id)) {\n consoleWarn(`Duplicate input name \"${id}\"`);\n }\n items.value.push({\n id,\n validate,\n reset,\n resetValidation,\n isValid: null,\n errorMessages: []\n });\n },\n unregister: id => {\n items.value = items.value.filter(item => {\n return item.id !== id;\n });\n },\n update: (id, isValid, errorMessages) => {\n const found = items.value.find(item => item.id === id);\n if (!found) return;\n found.isValid = isValid;\n found.errorMessages = errorMessages;\n },\n isDisabled,\n isReadonly,\n isValidating,\n isValid: model,\n items,\n validateOn: toRef(props, 'validateOn')\n });\n return {\n errors,\n isDisabled,\n isReadonly,\n isValidating,\n isValid: model,\n items,\n validate,\n reset,\n resetValidation\n };\n}\nexport function useForm() {\n return inject(FormKey, null);\n}\n//# sourceMappingURL=form.mjs.map","import { createVNode as _createVNode } from \"vue\";\n// Composables\nimport { makeComponentProps } from \"../../composables/component.mjs\";\nimport { createForm, makeFormProps } from \"../../composables/form.mjs\";\nimport { forwardRefs } from \"../../composables/forwardRefs.mjs\"; // Utilities\nimport { ref } from 'vue';\nimport { genericComponent, propsFactory, useRender } from \"../../util/index.mjs\"; // Types\nexport const makeVFormProps = propsFactory({\n ...makeComponentProps(),\n ...makeFormProps()\n}, 'VForm');\nexport const VForm = genericComponent()({\n name: 'VForm',\n props: makeVFormProps(),\n emits: {\n 'update:modelValue': val => true,\n submit: e => true\n },\n setup(props, _ref) {\n let {\n slots,\n emit\n } = _ref;\n const form = createForm(props);\n const formRef = ref();\n function onReset(e) {\n e.preventDefault();\n form.reset();\n }\n function onSubmit(_e) {\n const e = _e;\n const ready = form.validate();\n e.then = ready.then.bind(ready);\n e.catch = ready.catch.bind(ready);\n e.finally = ready.finally.bind(ready);\n emit('submit', e);\n if (!e.defaultPrevented) {\n ready.then(_ref2 => {\n let {\n valid\n } = _ref2;\n if (valid) {\n formRef.value?.submit();\n }\n });\n }\n e.preventDefault();\n }\n useRender(() => _createVNode(\"form\", {\n \"ref\": formRef,\n \"class\": ['v-form', props.class],\n \"style\": props.style,\n \"novalidate\": true,\n \"onReset\": onReset,\n \"onSubmit\": onSubmit\n }, [slots.default?.(form)]));\n return forwardRefs(form, formRef);\n }\n});\n//# sourceMappingURL=VForm.mjs.map","import { withDirectives as _withDirectives, createVNode as _createVNode, vShow as _vShow } from \"vue\";\n// Styles\nimport \"./VCounter.css\";\n\n// Components\nimport { VSlideYTransition } from \"../transitions/index.mjs\"; // Composables\nimport { makeComponentProps } from \"../../composables/component.mjs\";\nimport { makeTransitionProps, MaybeTransition } from \"../../composables/transition.mjs\"; // Utilities\nimport { computed } from 'vue';\nimport { genericComponent, propsFactory, useRender } from \"../../util/index.mjs\"; // Types\nexport const makeVCounterProps = propsFactory({\n active: Boolean,\n max: [Number, String],\n value: {\n type: [Number, String],\n default: 0\n },\n ...makeComponentProps(),\n ...makeTransitionProps({\n transition: {\n component: VSlideYTransition\n }\n })\n}, 'VCounter');\nexport const VCounter = genericComponent()({\n name: 'VCounter',\n functional: true,\n props: makeVCounterProps(),\n setup(props, _ref) {\n let {\n slots\n } = _ref;\n const counter = computed(() => {\n return props.max ? `${props.value} / ${props.max}` : String(props.value);\n });\n useRender(() => _createVNode(MaybeTransition, {\n \"transition\": props.transition\n }, {\n default: () => [_withDirectives(_createVNode(\"div\", {\n \"class\": ['v-counter', props.class],\n \"style\": props.style\n }, [slots.default ? slots.default({\n counter: counter.value,\n max: props.max,\n value: props.value\n }) : counter.value]), [[_vShow, props.active]])]\n }));\n return {};\n }\n});\n//# sourceMappingURL=VCounter.mjs.map","import { createVNode as _createVNode } from \"vue\";\n// Styles\nimport \"./VLabel.css\";\n\n// Composables\nimport { makeComponentProps } from \"../../composables/component.mjs\";\nimport { makeThemeProps } from \"../../composables/theme.mjs\"; // Utilities\nimport { genericComponent, propsFactory, useRender } from \"../../util/index.mjs\";\nexport const makeVLabelProps = propsFactory({\n text: String,\n clickable: Boolean,\n ...makeComponentProps(),\n ...makeThemeProps()\n}, 'VLabel');\nexport const VLabel = genericComponent()({\n name: 'VLabel',\n props: makeVLabelProps(),\n setup(props, _ref) {\n let {\n slots\n } = _ref;\n useRender(() => _createVNode(\"label\", {\n \"class\": ['v-label', {\n 'v-label--clickable': props.clickable\n }, props.class],\n \"style\": props.style\n }, [props.text, slots.default?.()]));\n return {};\n }\n});\n//# sourceMappingURL=VLabel.mjs.map","import { createVNode as _createVNode, resolveDirective as _resolveDirective } from \"vue\";\n// Components\nimport { VLabel } from \"../VLabel/index.mjs\"; // Composables\nimport { makeComponentProps } from \"../../composables/component.mjs\"; // Utilities\nimport { genericComponent, propsFactory, useRender } from \"../../util/index.mjs\";\nexport const makeVFieldLabelProps = propsFactory({\n floating: Boolean,\n ...makeComponentProps()\n}, 'VFieldLabel');\nexport const VFieldLabel = genericComponent()({\n name: 'VFieldLabel',\n props: makeVFieldLabelProps(),\n setup(props, _ref) {\n let {\n slots\n } = _ref;\n useRender(() => _createVNode(VLabel, {\n \"class\": ['v-field-label', {\n 'v-field-label--floating': props.floating\n }, props.class],\n \"style\": props.style,\n \"aria-hidden\": props.floating || undefined\n }, slots));\n return {};\n }\n});\n//# sourceMappingURL=VFieldLabel.mjs.map","import { createVNode as _createVNode } from \"vue\";\n// Components\nimport { VIcon } from \"../VIcon/index.mjs\"; // Composables\nimport { useLocale } from \"../../composables/locale.mjs\"; // Types\nexport function useInputIcon(props) {\n const {\n t\n } = useLocale();\n function InputIcon(_ref) {\n let {\n name\n } = _ref;\n const localeKey = {\n prepend: 'prependAction',\n prependInner: 'prependAction',\n append: 'appendAction',\n appendInner: 'appendAction',\n clear: 'clear'\n }[name];\n const listener = props[`onClick:${name}`];\n const label = listener && localeKey ? t(`$vuetify.input.${localeKey}`, props.label ?? '') : undefined;\n return _createVNode(VIcon, {\n \"icon\": props[`${name}Icon`],\n \"aria-label\": label,\n \"onClick\": listener\n }, null);\n }\n return {\n InputIcon\n };\n}\n//# sourceMappingURL=InputIcon.mjs.map","// Composables\nimport { useProxiedModel } from \"./proxiedModel.mjs\"; // Utilities\nimport { computed } from 'vue';\nimport { EventProp, getCurrentInstanceName, propsFactory } from \"../util/index.mjs\"; // Types\n// Composables\nexport const makeFocusProps = propsFactory({\n focused: Boolean,\n 'onUpdate:focused': EventProp()\n}, 'focus');\nexport function useFocus(props) {\n let name = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : getCurrentInstanceName();\n const isFocused = useProxiedModel(props, 'focused');\n const focusClasses = computed(() => {\n return {\n [`${name}--focused`]: isFocused.value\n };\n });\n function focus() {\n isFocused.value = true;\n }\n function blur() {\n isFocused.value = false;\n }\n return {\n focusClasses,\n isFocused,\n focus,\n blur\n };\n}\n//# sourceMappingURL=focus.mjs.map","import { mergeProps as _mergeProps, Fragment as _Fragment, withDirectives as _withDirectives, vShow as _vShow, resolveDirective as _resolveDirective, createVNode as _createVNode } from \"vue\";\n// Styles\nimport \"./VField.css\";\n\n// Components\nimport { VFieldLabel } from \"./VFieldLabel.mjs\";\nimport { VExpandXTransition } from \"../transitions/index.mjs\";\nimport { useInputIcon } from \"../VInput/InputIcon.mjs\"; // Composables\nimport { useBackgroundColor, useTextColor } from \"../../composables/color.mjs\";\nimport { makeComponentProps } from \"../../composables/component.mjs\";\nimport { makeFocusProps, useFocus } from \"../../composables/focus.mjs\";\nimport { IconValue } from \"../../composables/icons.mjs\";\nimport { LoaderSlot, makeLoaderProps, useLoader } from \"../../composables/loader.mjs\";\nimport { useRtl } from \"../../composables/locale.mjs\";\nimport { makeRoundedProps, useRounded } from \"../../composables/rounded.mjs\";\nimport { makeThemeProps, provideTheme } from \"../../composables/theme.mjs\"; // Utilities\nimport { computed, ref, toRef, watch } from 'vue';\nimport { animate, convertToUnit, EventProp, genericComponent, getUid, isOn, nullifyTransforms, pick, propsFactory, standardEasing, useRender } from \"../../util/index.mjs\"; // Types\nconst allowedVariants = ['underlined', 'outlined', 'filled', 'solo', 'solo-inverted', 'solo-filled', 'plain'];\nexport const makeVFieldProps = propsFactory({\n appendInnerIcon: IconValue,\n bgColor: String,\n clearable: Boolean,\n clearIcon: {\n type: IconValue,\n default: '$clear'\n },\n active: Boolean,\n centerAffix: {\n type: Boolean,\n default: undefined\n },\n color: String,\n baseColor: String,\n dirty: Boolean,\n disabled: {\n type: Boolean,\n default: null\n },\n error: Boolean,\n flat: Boolean,\n label: String,\n persistentClear: Boolean,\n prependInnerIcon: IconValue,\n reverse: Boolean,\n singleLine: Boolean,\n variant: {\n type: String,\n default: 'filled',\n validator: v => allowedVariants.includes(v)\n },\n 'onClick:clear': EventProp(),\n 'onClick:appendInner': EventProp(),\n 'onClick:prependInner': EventProp(),\n ...makeComponentProps(),\n ...makeLoaderProps(),\n ...makeRoundedProps(),\n ...makeThemeProps()\n}, 'VField');\nexport const VField = genericComponent()({\n name: 'VField',\n inheritAttrs: false,\n props: {\n id: String,\n ...makeFocusProps(),\n ...makeVFieldProps()\n },\n emits: {\n 'update:focused': focused => true,\n 'update:modelValue': val => true\n },\n setup(props, _ref) {\n let {\n attrs,\n emit,\n slots\n } = _ref;\n const {\n themeClasses\n } = provideTheme(props);\n const {\n loaderClasses\n } = useLoader(props);\n const {\n focusClasses,\n isFocused,\n focus,\n blur\n } = useFocus(props);\n const {\n InputIcon\n } = useInputIcon(props);\n const {\n roundedClasses\n } = useRounded(props);\n const {\n rtlClasses\n } = useRtl();\n const isActive = computed(() => props.dirty || props.active);\n const hasLabel = computed(() => !props.singleLine && !!(props.label || slots.label));\n const uid = getUid();\n const id = computed(() => props.id || `input-${uid}`);\n const messagesId = computed(() => `${id.value}-messages`);\n const labelRef = ref();\n const floatingLabelRef = ref();\n const controlRef = ref();\n const isPlainOrUnderlined = computed(() => ['plain', 'underlined'].includes(props.variant));\n const {\n backgroundColorClasses,\n backgroundColorStyles\n } = useBackgroundColor(toRef(props, 'bgColor'));\n const {\n textColorClasses,\n textColorStyles\n } = useTextColor(computed(() => {\n return props.error || props.disabled ? undefined : isActive.value && isFocused.value ? props.color : props.baseColor;\n }));\n watch(isActive, val => {\n if (hasLabel.value) {\n const el = labelRef.value.$el;\n const targetEl = floatingLabelRef.value.$el;\n requestAnimationFrame(() => {\n const rect = nullifyTransforms(el);\n const targetRect = targetEl.getBoundingClientRect();\n const x = targetRect.x - rect.x;\n const y = targetRect.y - rect.y - (rect.height / 2 - targetRect.height / 2);\n const targetWidth = targetRect.width / 0.75;\n const width = Math.abs(targetWidth - rect.width) > 1 ? {\n maxWidth: convertToUnit(targetWidth)\n } : undefined;\n const style = getComputedStyle(el);\n const targetStyle = getComputedStyle(targetEl);\n const duration = parseFloat(style.transitionDuration) * 1000 || 150;\n const scale = parseFloat(targetStyle.getPropertyValue('--v-field-label-scale'));\n const color = targetStyle.getPropertyValue('color');\n el.style.visibility = 'visible';\n targetEl.style.visibility = 'hidden';\n animate(el, {\n transform: `translate(${x}px, ${y}px) scale(${scale})`,\n color,\n ...width\n }, {\n duration,\n easing: standardEasing,\n direction: val ? 'normal' : 'reverse'\n }).finished.then(() => {\n el.style.removeProperty('visibility');\n targetEl.style.removeProperty('visibility');\n });\n });\n }\n }, {\n flush: 'post'\n });\n const slotProps = computed(() => ({\n isActive,\n isFocused,\n controlRef,\n blur,\n focus\n }));\n function onClick(e) {\n if (e.target !== document.activeElement) {\n e.preventDefault();\n }\n }\n useRender(() => {\n const isOutlined = props.variant === 'outlined';\n const hasPrepend = slots['prepend-inner'] || props.prependInnerIcon;\n const hasClear = !!(props.clearable || slots.clear);\n const hasAppend = !!(slots['append-inner'] || props.appendInnerIcon || hasClear);\n const label = slots.label ? slots.label({\n ...slotProps.value,\n label: props.label,\n props: {\n for: id.value\n }\n }) : props.label;\n return _createVNode(\"div\", _mergeProps({\n \"class\": ['v-field', {\n 'v-field--active': isActive.value,\n 'v-field--appended': hasAppend,\n 'v-field--center-affix': props.centerAffix ?? !isPlainOrUnderlined.value,\n 'v-field--disabled': props.disabled,\n 'v-field--dirty': props.dirty,\n 'v-field--error': props.error,\n 'v-field--flat': props.flat,\n 'v-field--has-background': !!props.bgColor,\n 'v-field--persistent-clear': props.persistentClear,\n 'v-field--prepended': hasPrepend,\n 'v-field--reverse': props.reverse,\n 'v-field--single-line': props.singleLine,\n 'v-field--no-label': !label,\n [`v-field--variant-${props.variant}`]: true\n }, themeClasses.value, backgroundColorClasses.value, focusClasses.value, loaderClasses.value, roundedClasses.value, rtlClasses.value, props.class],\n \"style\": [backgroundColorStyles.value, textColorStyles.value, props.style],\n \"onClick\": onClick\n }, attrs), [_createVNode(\"div\", {\n \"class\": \"v-field__overlay\"\n }, null), _createVNode(LoaderSlot, {\n \"name\": \"v-field\",\n \"active\": !!props.loading,\n \"color\": props.error ? 'error' : props.color\n }, {\n default: slots.loader\n }), hasPrepend && _createVNode(\"div\", {\n \"key\": \"prepend\",\n \"class\": \"v-field__prepend-inner\"\n }, [props.prependInnerIcon && _createVNode(InputIcon, {\n \"key\": \"prepend-icon\",\n \"name\": \"prependInner\"\n }, null), slots['prepend-inner']?.(slotProps.value)]), _createVNode(\"div\", {\n \"class\": \"v-field__field\",\n \"data-no-activator\": \"\"\n }, [['filled', 'solo', 'solo-inverted', 'solo-filled'].includes(props.variant) && hasLabel.value && _createVNode(VFieldLabel, {\n \"key\": \"floating-label\",\n \"ref\": floatingLabelRef,\n \"class\": [textColorClasses.value],\n \"floating\": true,\n \"for\": id.value\n }, {\n default: () => [label]\n }), _createVNode(VFieldLabel, {\n \"ref\": labelRef,\n \"for\": id.value\n }, {\n default: () => [label]\n }), slots.default?.({\n ...slotProps.value,\n props: {\n id: id.value,\n class: 'v-field__input',\n 'aria-describedby': messagesId.value\n },\n focus,\n blur\n })]), hasClear && _createVNode(VExpandXTransition, {\n \"key\": \"clear\"\n }, {\n default: () => [_withDirectives(_createVNode(\"div\", {\n \"class\": \"v-field__clearable\",\n \"onMousedown\": e => {\n e.preventDefault();\n e.stopPropagation();\n }\n }, [slots.clear ? slots.clear() : _createVNode(InputIcon, {\n \"name\": \"clear\"\n }, null)]), [[_vShow, props.dirty]])]\n }), hasAppend && _createVNode(\"div\", {\n \"key\": \"append\",\n \"class\": \"v-field__append-inner\"\n }, [slots['append-inner']?.(slotProps.value), props.appendInnerIcon && _createVNode(InputIcon, {\n \"key\": \"append-icon\",\n \"name\": \"appendInner\"\n }, null)]), _createVNode(\"div\", {\n \"class\": ['v-field__outline', textColorClasses.value]\n }, [isOutlined && _createVNode(_Fragment, null, [_createVNode(\"div\", {\n \"class\": \"v-field__outline__start\"\n }, null), hasLabel.value && _createVNode(\"div\", {\n \"class\": \"v-field__outline__notch\"\n }, [_createVNode(VFieldLabel, {\n \"ref\": floatingLabelRef,\n \"floating\": true,\n \"for\": id.value\n }, {\n default: () => [label]\n })]), _createVNode(\"div\", {\n \"class\": \"v-field__outline__end\"\n }, null)]), isPlainOrUnderlined.value && hasLabel.value && _createVNode(VFieldLabel, {\n \"ref\": floatingLabelRef,\n \"floating\": true,\n \"for\": id.value\n }, {\n default: () => [label]\n })])]);\n });\n return {\n controlRef\n };\n }\n});\n// TODO: this is kinda slow, might be better to implicitly inherit props instead\nexport function filterFieldProps(attrs) {\n const keys = Object.keys(VField.props).filter(k => !isOn(k) && k !== 'class' && k !== 'style');\n return pick(attrs, keys);\n}\n//# sourceMappingURL=VField.mjs.map","import { createVNode as _createVNode } from \"vue\";\n// Styles\nimport \"./VMessages.css\";\n\n// Components\nimport { VSlideYTransition } from \"../transitions/index.mjs\"; // Composables\nimport { useTextColor } from \"../../composables/color.mjs\";\nimport { makeComponentProps } from \"../../composables/component.mjs\";\nimport { makeTransitionProps, MaybeTransition } from \"../../composables/transition.mjs\"; // Utilities\nimport { computed } from 'vue';\nimport { genericComponent, propsFactory, useRender, wrapInArray } from \"../../util/index.mjs\"; // Types\nexport const makeVMessagesProps = propsFactory({\n active: Boolean,\n color: String,\n messages: {\n type: [Array, String],\n default: () => []\n },\n ...makeComponentProps(),\n ...makeTransitionProps({\n transition: {\n component: VSlideYTransition,\n leaveAbsolute: true,\n group: true\n }\n })\n}, 'VMessages');\nexport const VMessages = genericComponent()({\n name: 'VMessages',\n props: makeVMessagesProps(),\n setup(props, _ref) {\n let {\n slots\n } = _ref;\n const messages = computed(() => wrapInArray(props.messages));\n const {\n textColorClasses,\n textColorStyles\n } = useTextColor(computed(() => props.color));\n useRender(() => _createVNode(MaybeTransition, {\n \"transition\": props.transition,\n \"tag\": \"div\",\n \"class\": ['v-messages', textColorClasses.value, props.class],\n \"style\": [textColorStyles.value, props.style],\n \"role\": \"alert\",\n \"aria-live\": \"polite\"\n }, {\n default: () => [props.active && messages.value.map((message, i) => _createVNode(\"div\", {\n \"class\": \"v-messages__message\",\n \"key\": `${i}-${messages.value}`\n }, [slots.message ? slots.message({\n message\n }) : message]))]\n }));\n return {};\n }\n});\n//# sourceMappingURL=VMessages.mjs.map","// Composables\nimport { makeFocusProps } from \"./focus.mjs\";\nimport { useForm } from \"./form.mjs\";\nimport { useProxiedModel } from \"./proxiedModel.mjs\";\nimport { useToggleScope } from \"./toggleScope.mjs\"; // Utilities\nimport { computed, nextTick, onBeforeMount, onBeforeUnmount, onMounted, ref, shallowRef, unref, watch } from 'vue';\nimport { getCurrentInstanceName, getUid, propsFactory, wrapInArray } from \"../util/index.mjs\"; // Types\nexport const makeValidationProps = propsFactory({\n disabled: {\n type: Boolean,\n default: null\n },\n error: Boolean,\n errorMessages: {\n type: [Array, String],\n default: () => []\n },\n maxErrors: {\n type: [Number, String],\n default: 1\n },\n name: String,\n label: String,\n readonly: {\n type: Boolean,\n default: null\n },\n rules: {\n type: Array,\n default: () => []\n },\n modelValue: null,\n validateOn: String,\n validationValue: null,\n ...makeFocusProps()\n}, 'validation');\nexport function useValidation(props) {\n let name = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : getCurrentInstanceName();\n let id = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : getUid();\n const model = useProxiedModel(props, 'modelValue');\n const validationModel = computed(() => props.validationValue === undefined ? model.value : props.validationValue);\n const form = useForm();\n const internalErrorMessages = ref([]);\n const isPristine = shallowRef(true);\n const isDirty = computed(() => !!(wrapInArray(model.value === '' ? null : model.value).length || wrapInArray(validationModel.value === '' ? null : validationModel.value).length));\n const isDisabled = computed(() => !!(props.disabled ?? form?.isDisabled.value));\n const isReadonly = computed(() => !!(props.readonly ?? form?.isReadonly.value));\n const errorMessages = computed(() => {\n return props.errorMessages.length ? wrapInArray(props.errorMessages).slice(0, Math.max(0, +props.maxErrors)) : internalErrorMessages.value;\n });\n const validateOn = computed(() => {\n let value = (props.validateOn ?? form?.validateOn.value) || 'input';\n if (value === 'lazy') value = 'input lazy';\n const set = new Set(value?.split(' ') ?? []);\n return {\n blur: set.has('blur') || set.has('input'),\n input: set.has('input'),\n submit: set.has('submit'),\n lazy: set.has('lazy')\n };\n });\n const isValid = computed(() => {\n if (props.error || props.errorMessages.length) return false;\n if (!props.rules.length) return true;\n if (isPristine.value) {\n return internalErrorMessages.value.length || validateOn.value.lazy ? null : true;\n } else {\n return !internalErrorMessages.value.length;\n }\n });\n const isValidating = shallowRef(false);\n const validationClasses = computed(() => {\n return {\n [`${name}--error`]: isValid.value === false,\n [`${name}--dirty`]: isDirty.value,\n [`${name}--disabled`]: isDisabled.value,\n [`${name}--readonly`]: isReadonly.value\n };\n });\n const uid = computed(() => props.name ?? unref(id));\n onBeforeMount(() => {\n form?.register({\n id: uid.value,\n validate,\n reset,\n resetValidation\n });\n });\n onBeforeUnmount(() => {\n form?.unregister(uid.value);\n });\n onMounted(async () => {\n if (!validateOn.value.lazy) {\n await validate(true);\n }\n form?.update(uid.value, isValid.value, errorMessages.value);\n });\n useToggleScope(() => validateOn.value.input, () => {\n watch(validationModel, () => {\n if (validationModel.value != null) {\n validate();\n } else if (props.focused) {\n const unwatch = watch(() => props.focused, val => {\n if (!val) validate();\n unwatch();\n });\n }\n });\n });\n useToggleScope(() => validateOn.value.blur, () => {\n watch(() => props.focused, val => {\n if (!val) validate();\n });\n });\n watch(isValid, () => {\n form?.update(uid.value, isValid.value, errorMessages.value);\n });\n function reset() {\n model.value = null;\n nextTick(resetValidation);\n }\n function resetValidation() {\n isPristine.value = true;\n if (!validateOn.value.lazy) {\n validate(true);\n } else {\n internalErrorMessages.value = [];\n }\n }\n async function validate() {\n let silent = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n const results = [];\n isValidating.value = true;\n for (const rule of props.rules) {\n if (results.length >= +(props.maxErrors ?? 1)) {\n break;\n }\n const handler = typeof rule === 'function' ? rule : () => rule;\n const result = await handler(validationModel.value);\n if (result === true) continue;\n if (result !== false && typeof result !== 'string') {\n // eslint-disable-next-line no-console\n console.warn(`${result} is not a valid value. Rule functions must return boolean true or a string.`);\n continue;\n }\n results.push(result || '');\n }\n internalErrorMessages.value = results;\n isValidating.value = false;\n isPristine.value = silent;\n return internalErrorMessages.value;\n }\n return {\n errorMessages,\n isDirty,\n isDisabled,\n isReadonly,\n isPristine,\n isValid,\n isValidating,\n reset,\n resetValidation,\n validate,\n validationClasses\n };\n}\n//# sourceMappingURL=validation.mjs.map","import { resolveDirective as _resolveDirective, createVNode as _createVNode } from \"vue\";\n// Styles\nimport \"./VInput.css\";\n\n// Components\nimport { useInputIcon } from \"./InputIcon.mjs\";\nimport { VMessages } from \"../VMessages/VMessages.mjs\"; // Composables\nimport { makeComponentProps } from \"../../composables/component.mjs\";\nimport { makeDensityProps, useDensity } from \"../../composables/density.mjs\";\nimport { IconValue } from \"../../composables/icons.mjs\";\nimport { useRtl } from \"../../composables/locale.mjs\";\nimport { makeValidationProps, useValidation } from \"../../composables/validation.mjs\"; // Utilities\nimport { computed } from 'vue';\nimport { EventProp, genericComponent, getUid, propsFactory, useRender } from \"../../util/index.mjs\"; // Types\nexport const makeVInputProps = propsFactory({\n id: String,\n appendIcon: IconValue,\n centerAffix: {\n type: Boolean,\n default: true\n },\n prependIcon: IconValue,\n hideDetails: [Boolean, String],\n hint: String,\n persistentHint: Boolean,\n messages: {\n type: [Array, String],\n default: () => []\n },\n direction: {\n type: String,\n default: 'horizontal',\n validator: v => ['horizontal', 'vertical'].includes(v)\n },\n 'onClick:prepend': EventProp(),\n 'onClick:append': EventProp(),\n ...makeComponentProps(),\n ...makeDensityProps(),\n ...makeValidationProps()\n}, 'VInput');\nexport const VInput = genericComponent()({\n name: 'VInput',\n props: {\n ...makeVInputProps()\n },\n emits: {\n 'update:modelValue': val => true\n },\n setup(props, _ref) {\n let {\n attrs,\n slots,\n emit\n } = _ref;\n const {\n densityClasses\n } = useDensity(props);\n const {\n rtlClasses\n } = useRtl();\n const {\n InputIcon\n } = useInputIcon(props);\n const uid = getUid();\n const id = computed(() => props.id || `input-${uid}`);\n const messagesId = computed(() => `${id.value}-messages`);\n const {\n errorMessages,\n isDirty,\n isDisabled,\n isReadonly,\n isPristine,\n isValid,\n isValidating,\n reset,\n resetValidation,\n validate,\n validationClasses\n } = useValidation(props, 'v-input', id);\n const slotProps = computed(() => ({\n id,\n messagesId,\n isDirty,\n isDisabled,\n isReadonly,\n isPristine,\n isValid,\n isValidating,\n reset,\n resetValidation,\n validate\n }));\n const messages = computed(() => {\n if (props.errorMessages?.length || !isPristine.value && errorMessages.value.length) {\n return errorMessages.value;\n } else if (props.hint && (props.persistentHint || props.focused)) {\n return props.hint;\n } else {\n return props.messages;\n }\n });\n useRender(() => {\n const hasPrepend = !!(slots.prepend || props.prependIcon);\n const hasAppend = !!(slots.append || props.appendIcon);\n const hasMessages = messages.value.length > 0;\n const hasDetails = !props.hideDetails || props.hideDetails === 'auto' && (hasMessages || !!slots.details);\n return _createVNode(\"div\", {\n \"class\": ['v-input', `v-input--${props.direction}`, {\n 'v-input--center-affix': props.centerAffix\n }, densityClasses.value, rtlClasses.value, validationClasses.value, props.class],\n \"style\": props.style\n }, [hasPrepend && _createVNode(\"div\", {\n \"key\": \"prepend\",\n \"class\": \"v-input__prepend\"\n }, [slots.prepend?.(slotProps.value), props.prependIcon && _createVNode(InputIcon, {\n \"key\": \"prepend-icon\",\n \"name\": \"prepend\"\n }, null)]), slots.default && _createVNode(\"div\", {\n \"class\": \"v-input__control\"\n }, [slots.default?.(slotProps.value)]), hasAppend && _createVNode(\"div\", {\n \"key\": \"append\",\n \"class\": \"v-input__append\"\n }, [props.appendIcon && _createVNode(InputIcon, {\n \"key\": \"append-icon\",\n \"name\": \"append\"\n }, null), slots.append?.(slotProps.value)]), hasDetails && _createVNode(\"div\", {\n \"class\": \"v-input__details\"\n }, [_createVNode(VMessages, {\n \"id\": messagesId.value,\n \"active\": hasMessages,\n \"messages\": messages.value\n }, {\n message: slots.message\n }), slots.details?.(slotProps.value)])]);\n });\n return {\n reset,\n resetValidation,\n validate\n };\n }\n});\n//# sourceMappingURL=VInput.mjs.map","import { Fragment as _Fragment, withDirectives as _withDirectives, createVNode as _createVNode, mergeProps as _mergeProps, resolveDirective as _resolveDirective } from \"vue\";\n// Styles\nimport \"./VTextField.css\";\n\n// Components\nimport { VCounter } from \"../VCounter/VCounter.mjs\";\nimport { filterFieldProps, makeVFieldProps, VField } from \"../VField/VField.mjs\";\nimport { makeVInputProps, VInput } from \"../VInput/VInput.mjs\"; // Composables\nimport { useFocus } from \"../../composables/focus.mjs\";\nimport { forwardRefs } from \"../../composables/forwardRefs.mjs\";\nimport { useProxiedModel } from \"../../composables/proxiedModel.mjs\"; // Directives\nimport Intersect from \"../../directives/intersect/index.mjs\"; // Utilities\nimport { cloneVNode, computed, nextTick, ref } from 'vue';\nimport { callEvent, filterInputAttrs, genericComponent, propsFactory, useRender } from \"../../util/index.mjs\"; // Types\nconst activeTypes = ['color', 'file', 'time', 'date', 'datetime-local', 'week', 'month'];\nexport const makeVTextFieldProps = propsFactory({\n autofocus: Boolean,\n counter: [Boolean, Number, String],\n counterValue: Function,\n prefix: String,\n placeholder: String,\n persistentPlaceholder: Boolean,\n persistentCounter: Boolean,\n suffix: String,\n type: {\n type: String,\n default: 'text'\n },\n modelModifiers: Object,\n ...makeVInputProps(),\n ...makeVFieldProps()\n}, 'VTextField');\nexport const VTextField = genericComponent()({\n name: 'VTextField',\n directives: {\n Intersect\n },\n inheritAttrs: false,\n props: makeVTextFieldProps(),\n emits: {\n 'click:control': e => true,\n 'mousedown:control': e => true,\n 'update:focused': focused => true,\n 'update:modelValue': val => true\n },\n setup(props, _ref) {\n let {\n attrs,\n emit,\n slots\n } = _ref;\n const model = useProxiedModel(props, 'modelValue');\n const {\n isFocused,\n focus,\n blur\n } = useFocus(props);\n const counterValue = computed(() => {\n return typeof props.counterValue === 'function' ? props.counterValue(model.value) : (model.value ?? '').toString().length;\n });\n const max = computed(() => {\n if (attrs.maxlength) return attrs.maxlength;\n if (!props.counter || typeof props.counter !== 'number' && typeof props.counter !== 'string') return undefined;\n return props.counter;\n });\n const isPlainOrUnderlined = computed(() => ['plain', 'underlined'].includes(props.variant));\n function onIntersect(isIntersecting, entries) {\n if (!props.autofocus || !isIntersecting) return;\n entries[0].target?.focus?.();\n }\n const vInputRef = ref();\n const vFieldRef = ref();\n const inputRef = ref();\n const isActive = computed(() => activeTypes.includes(props.type) || props.persistentPlaceholder || isFocused.value || props.active);\n function onFocus() {\n if (inputRef.value !== document.activeElement) {\n inputRef.value?.focus();\n }\n if (!isFocused.value) focus();\n }\n function onControlMousedown(e) {\n emit('mousedown:control', e);\n if (e.target === inputRef.value) return;\n onFocus();\n e.preventDefault();\n }\n function onControlClick(e) {\n onFocus();\n emit('click:control', e);\n }\n function onClear(e) {\n e.stopPropagation();\n onFocus();\n nextTick(() => {\n model.value = null;\n callEvent(props['onClick:clear'], e);\n });\n }\n function onInput(e) {\n const el = e.target;\n model.value = el.value;\n if (props.modelModifiers?.trim && ['text', 'search', 'password', 'tel', 'url'].includes(props.type)) {\n const caretPosition = [el.selectionStart, el.selectionEnd];\n nextTick(() => {\n el.selectionStart = caretPosition[0];\n el.selectionEnd = caretPosition[1];\n });\n }\n }\n useRender(() => {\n const hasCounter = !!(slots.counter || props.counter || props.counterValue);\n const hasDetails = !!(hasCounter || slots.details);\n const [rootAttrs, inputAttrs] = filterInputAttrs(attrs);\n const [{\n modelValue: _,\n ...inputProps\n }] = VInput.filterProps(props);\n const [fieldProps] = filterFieldProps(props);\n return _createVNode(VInput, _mergeProps({\n \"ref\": vInputRef,\n \"modelValue\": model.value,\n \"onUpdate:modelValue\": $event => model.value = $event,\n \"class\": ['v-text-field', {\n 'v-text-field--prefixed': props.prefix,\n 'v-text-field--suffixed': props.suffix,\n 'v-text-field--plain-underlined': ['plain', 'underlined'].includes(props.variant)\n }, props.class],\n \"style\": props.style\n }, rootAttrs, inputProps, {\n \"centerAffix\": !isPlainOrUnderlined.value,\n \"focused\": isFocused.value\n }), {\n ...slots,\n default: _ref2 => {\n let {\n id,\n isDisabled,\n isDirty,\n isReadonly,\n isValid\n } = _ref2;\n return _createVNode(VField, _mergeProps({\n \"ref\": vFieldRef,\n \"onMousedown\": onControlMousedown,\n \"onClick\": onControlClick,\n \"onClick:clear\": onClear,\n \"onClick:prependInner\": props['onClick:prependInner'],\n \"onClick:appendInner\": props['onClick:appendInner'],\n \"role\": \"textbox\"\n }, fieldProps, {\n \"id\": id.value,\n \"active\": isActive.value || isDirty.value,\n \"dirty\": isDirty.value || props.dirty,\n \"disabled\": isDisabled.value,\n \"focused\": isFocused.value,\n \"error\": isValid.value === false\n }), {\n ...slots,\n default: _ref3 => {\n let {\n props: {\n class: fieldClass,\n ...slotProps\n }\n } = _ref3;\n const inputNode = _withDirectives(_createVNode(\"input\", _mergeProps({\n \"ref\": inputRef,\n \"value\": model.value,\n \"onInput\": onInput,\n \"autofocus\": props.autofocus,\n \"readonly\": isReadonly.value,\n \"disabled\": isDisabled.value,\n \"name\": props.name,\n \"placeholder\": props.placeholder,\n \"size\": 1,\n \"type\": props.type,\n \"onFocus\": onFocus,\n \"onBlur\": blur\n }, slotProps, inputAttrs), null), [[_resolveDirective(\"intersect\"), {\n handler: onIntersect\n }, null, {\n once: true\n }]]);\n return _createVNode(_Fragment, null, [props.prefix && _createVNode(\"span\", {\n \"class\": \"v-text-field__prefix\"\n }, [props.prefix]), _createVNode(\"div\", {\n \"class\": fieldClass,\n \"data-no-activator\": \"\"\n }, [slots.default ? _createVNode(_Fragment, null, [slots.default(), inputNode]) : cloneVNode(inputNode)]), props.suffix && _createVNode(\"span\", {\n \"class\": \"v-text-field__suffix\"\n }, [props.suffix])]);\n }\n });\n },\n details: hasDetails ? slotProps => _createVNode(_Fragment, null, [slots.details?.(slotProps), hasCounter && _createVNode(_Fragment, null, [_createVNode(\"span\", null, null), _createVNode(VCounter, {\n \"active\": props.persistentCounter || isFocused.value,\n \"value\": counterValue.value,\n \"max\": max.value\n }, slots.counter)])]) : undefined\n });\n });\n return forwardRefs({}, vInputRef, vFieldRef, inputRef);\n }\n});\n//# sourceMappingURL=VTextField.mjs.map","\n\n\n\n\n","\n\n\n","\n\n\n\n\n","export enum QuestionType {\n Boolean = \"Boolean\",\n Text = \"Text\",\n Checkbox = \"Checkbox\",\n ListOfContactPersons = \"ListOfContactPersons\",\n Certificates = \"Certificates\",\n CertificatesV2 = \"CertificatesV2\",\n BooleanWithDetails = \"BooleanWithDetails\",\n BooleanWithDetailsOnNo = \"BooleanWithDetailsOnNo\",\n BooleanWithMultiSelect = \"BooleanWithMultiSelect\",\n BooleanWithNotRelevant = \"BooleanWithNotRelevant\",\n Address = \"Address\",\n LeadText = \"LeadText\",\n TextArea = \"TextArea\",\n Select = \"Select\",\n Date = \"Date\",\n Consent = \"Consent\",\n ListOfCheckboxes = \"ListOfCheckboxes\",\n KeyPersonnel = \"KeyPersonnel\",\n BeneficialOwners = \"BeneficialOwners\",\n Phone = \"Phone\",\n Multiselect = \"Multiselect\",\n OwnershipPubliclyListedTypes = \"OwnershipPubliclyListedTypes\",\n OwnershipIndividual = \"OwnershipIndividual\",\n OwnershipCompany = \"OwnershipCompany\",\n PersonWithPepAndSanctions = \"PersonWithPepAndSanctions\",\n PersonsWithPepAndSanctions = \"PersonsWithPepAndSanctions\",\n PersonsNameAndPosition = \"PersonsNameAndPosition\",\n}\n","export default class Address {\n street: string = \"\";\n city: string = \"\";\n region: string = \"\";\n country: string = \"\";\n}\n","\n\n\n\n\n\n","import { createVNode as _createVNode } from \"vue\";\n// Styles\nimport \"./VSelectionControlGroup.css\";\n\n// Composables\nimport { makeComponentProps } from \"../../composables/component.mjs\";\nimport { provideDefaults } from \"../../composables/defaults.mjs\";\nimport { makeDensityProps } from \"../../composables/density.mjs\";\nimport { IconValue } from \"../../composables/icons.mjs\";\nimport { useProxiedModel } from \"../../composables/proxiedModel.mjs\";\nimport { makeThemeProps } from \"../../composables/theme.mjs\"; // Utilities\nimport { computed, onScopeDispose, provide, toRef } from 'vue';\nimport { deepEqual, genericComponent, getUid, propsFactory, useRender } from \"../../util/index.mjs\"; // Types\nexport const VSelectionControlGroupSymbol = Symbol.for('vuetify:selection-control-group');\nexport const makeSelectionControlGroupProps = propsFactory({\n color: String,\n disabled: Boolean,\n defaultsTarget: String,\n error: Boolean,\n id: String,\n inline: Boolean,\n falseIcon: IconValue,\n trueIcon: IconValue,\n ripple: {\n type: Boolean,\n default: true\n },\n multiple: {\n type: Boolean,\n default: null\n },\n name: String,\n readonly: Boolean,\n modelValue: null,\n type: String,\n valueComparator: {\n type: Function,\n default: deepEqual\n },\n ...makeComponentProps(),\n ...makeDensityProps(),\n ...makeThemeProps()\n}, 'SelectionControlGroup');\nexport const makeVSelectionControlGroupProps = propsFactory({\n ...makeSelectionControlGroupProps({\n defaultsTarget: 'VSelectionControl'\n })\n}, 'VSelectionControlGroup');\nexport const VSelectionControlGroup = genericComponent()({\n name: 'VSelectionControlGroup',\n props: makeVSelectionControlGroupProps(),\n emits: {\n 'update:modelValue': val => true\n },\n setup(props, _ref) {\n let {\n slots\n } = _ref;\n const modelValue = useProxiedModel(props, 'modelValue');\n const uid = getUid();\n const id = computed(() => props.id || `v-selection-control-group-${uid}`);\n const name = computed(() => props.name || id.value);\n const updateHandlers = new Set();\n provide(VSelectionControlGroupSymbol, {\n modelValue,\n forceUpdate: () => {\n updateHandlers.forEach(fn => fn());\n },\n onForceUpdate: cb => {\n updateHandlers.add(cb);\n onScopeDispose(() => {\n updateHandlers.delete(cb);\n });\n }\n });\n provideDefaults({\n [props.defaultsTarget]: {\n color: toRef(props, 'color'),\n disabled: toRef(props, 'disabled'),\n density: toRef(props, 'density'),\n error: toRef(props, 'error'),\n inline: toRef(props, 'inline'),\n modelValue,\n multiple: computed(() => !!props.multiple || props.multiple == null && Array.isArray(modelValue.value)),\n name,\n falseIcon: toRef(props, 'falseIcon'),\n trueIcon: toRef(props, 'trueIcon'),\n readonly: toRef(props, 'readonly'),\n ripple: toRef(props, 'ripple'),\n type: toRef(props, 'type'),\n valueComparator: toRef(props, 'valueComparator')\n }\n });\n useRender(() => _createVNode(\"div\", {\n \"class\": ['v-selection-control-group', {\n 'v-selection-control-group--inline': props.inline\n }, props.class],\n \"style\": props.style,\n \"role\": props.type === 'radio' ? 'radiogroup' : undefined\n }, [slots.default?.()]));\n return {};\n }\n});\n//# sourceMappingURL=VSelectionControlGroup.mjs.map","import { withDirectives as _withDirectives, resolveDirective as _resolveDirective, mergeProps as _mergeProps, createVNode as _createVNode } from \"vue\";\n// Styles\nimport \"./VSelectionControl.css\";\n\n// Components\nimport { VIcon } from \"../VIcon/index.mjs\";\nimport { VLabel } from \"../VLabel/index.mjs\";\nimport { makeSelectionControlGroupProps, VSelectionControlGroupSymbol } from \"../VSelectionControlGroup/VSelectionControlGroup.mjs\"; // Composables\nimport { useTextColor } from \"../../composables/color.mjs\";\nimport { makeComponentProps } from \"../../composables/component.mjs\";\nimport { useDensity } from \"../../composables/density.mjs\";\nimport { useProxiedModel } from \"../../composables/proxiedModel.mjs\"; // Directives\nimport { Ripple } from \"../../directives/ripple/index.mjs\"; // Utilities\nimport { computed, inject, nextTick, ref, shallowRef } from 'vue';\nimport { filterInputAttrs, genericComponent, getUid, propsFactory, SUPPORTS_FOCUS_VISIBLE, useRender, wrapInArray } from \"../../util/index.mjs\"; // Types\nexport const makeVSelectionControlProps = propsFactory({\n label: String,\n trueValue: null,\n falseValue: null,\n value: null,\n ...makeComponentProps(),\n ...makeSelectionControlGroupProps()\n}, 'VSelectionControl');\nexport function useSelectionControl(props) {\n const group = inject(VSelectionControlGroupSymbol, undefined);\n const {\n densityClasses\n } = useDensity(props);\n const modelValue = useProxiedModel(props, 'modelValue');\n const trueValue = computed(() => props.trueValue !== undefined ? props.trueValue : props.value !== undefined ? props.value : true);\n const falseValue = computed(() => props.falseValue !== undefined ? props.falseValue : false);\n const isMultiple = computed(() => !!props.multiple || props.multiple == null && Array.isArray(modelValue.value));\n const model = computed({\n get() {\n const val = group ? group.modelValue.value : modelValue.value;\n return isMultiple.value ? val.some(v => props.valueComparator(v, trueValue.value)) : props.valueComparator(val, trueValue.value);\n },\n set(val) {\n if (props.readonly) return;\n const currentValue = val ? trueValue.value : falseValue.value;\n let newVal = currentValue;\n if (isMultiple.value) {\n newVal = val ? [...wrapInArray(modelValue.value), currentValue] : wrapInArray(modelValue.value).filter(item => !props.valueComparator(item, trueValue.value));\n }\n if (group) {\n group.modelValue.value = newVal;\n } else {\n modelValue.value = newVal;\n }\n }\n });\n const {\n textColorClasses,\n textColorStyles\n } = useTextColor(computed(() => {\n return model.value && !props.error && !props.disabled ? props.color : undefined;\n }));\n const icon = computed(() => model.value ? props.trueIcon : props.falseIcon);\n return {\n group,\n densityClasses,\n trueValue,\n falseValue,\n model,\n textColorClasses,\n textColorStyles,\n icon\n };\n}\nexport const VSelectionControl = genericComponent()({\n name: 'VSelectionControl',\n directives: {\n Ripple\n },\n inheritAttrs: false,\n props: makeVSelectionControlProps(),\n emits: {\n 'update:modelValue': val => true\n },\n setup(props, _ref) {\n let {\n attrs,\n slots\n } = _ref;\n const {\n group,\n densityClasses,\n icon,\n model,\n textColorClasses,\n textColorStyles,\n trueValue\n } = useSelectionControl(props);\n const uid = getUid();\n const id = computed(() => props.id || `input-${uid}`);\n const isFocused = shallowRef(false);\n const isFocusVisible = shallowRef(false);\n const input = ref();\n group?.onForceUpdate(() => {\n if (input.value) {\n input.value.checked = model.value;\n }\n });\n function onFocus(e) {\n isFocused.value = true;\n if (!SUPPORTS_FOCUS_VISIBLE || SUPPORTS_FOCUS_VISIBLE && e.target.matches(':focus-visible')) {\n isFocusVisible.value = true;\n }\n }\n function onBlur() {\n isFocused.value = false;\n isFocusVisible.value = false;\n }\n function onInput(e) {\n if (props.readonly && group) {\n nextTick(() => group.forceUpdate());\n }\n model.value = e.target.checked;\n }\n useRender(() => {\n const label = slots.label ? slots.label({\n label: props.label,\n props: {\n for: id.value\n }\n }) : props.label;\n const [rootAttrs, inputAttrs] = filterInputAttrs(attrs);\n return _createVNode(\"div\", _mergeProps({\n \"class\": ['v-selection-control', {\n 'v-selection-control--dirty': model.value,\n 'v-selection-control--disabled': props.disabled,\n 'v-selection-control--error': props.error,\n 'v-selection-control--focused': isFocused.value,\n 'v-selection-control--focus-visible': isFocusVisible.value,\n 'v-selection-control--inline': props.inline\n }, densityClasses.value, props.class]\n }, rootAttrs, {\n \"style\": props.style\n }), [_createVNode(\"div\", {\n \"class\": ['v-selection-control__wrapper', textColorClasses.value],\n \"style\": textColorStyles.value\n }, [slots.default?.(), _withDirectives(_createVNode(\"div\", {\n \"class\": ['v-selection-control__input']\n }, [icon.value && _createVNode(VIcon, {\n \"key\": \"icon\",\n \"icon\": icon.value\n }, null), _createVNode(\"input\", _mergeProps({\n \"ref\": input,\n \"checked\": model.value,\n \"disabled\": props.disabled,\n \"id\": id.value,\n \"onBlur\": onBlur,\n \"onFocus\": onFocus,\n \"onInput\": onInput,\n \"aria-disabled\": props.readonly,\n \"type\": props.type,\n \"value\": trueValue.value,\n \"name\": props.name,\n \"aria-checked\": props.type === 'checkbox' ? model.value : undefined\n }, inputAttrs), null), slots.input?.({\n model,\n textColorClasses,\n textColorStyles,\n props: {\n onFocus,\n onBlur,\n id: id.value\n }\n })]), [[_resolveDirective(\"ripple\"), props.ripple && [!props.disabled && !props.readonly, null, ['center', 'circle']]]])]), label && _createVNode(VLabel, {\n \"for\": id.value,\n \"clickable\": true\n }, {\n default: () => [label]\n })]);\n });\n return {\n isFocused,\n input\n };\n }\n});\n//# sourceMappingURL=VSelectionControl.mjs.map","import { createVNode as _createVNode, mergeProps as _mergeProps, resolveDirective as _resolveDirective } from \"vue\";\n// Components\nimport { makeVSelectionControlProps, VSelectionControl } from \"../VSelectionControl/VSelectionControl.mjs\"; // Composables\nimport { IconValue } from \"../../composables/icons.mjs\";\nimport { useProxiedModel } from \"../../composables/proxiedModel.mjs\"; // Utilities\nimport { computed } from 'vue';\nimport { genericComponent, propsFactory, useRender } from \"../../util/index.mjs\"; // Types\nexport const makeVCheckboxBtnProps = propsFactory({\n indeterminate: Boolean,\n indeterminateIcon: {\n type: IconValue,\n default: '$checkboxIndeterminate'\n },\n ...makeVSelectionControlProps({\n falseIcon: '$checkboxOff',\n trueIcon: '$checkboxOn'\n })\n}, 'VCheckboxBtn');\nexport const VCheckboxBtn = genericComponent()({\n name: 'VCheckboxBtn',\n props: makeVCheckboxBtnProps(),\n emits: {\n 'update:modelValue': value => true,\n 'update:indeterminate': val => true\n },\n setup(props, _ref) {\n let {\n slots\n } = _ref;\n const indeterminate = useProxiedModel(props, 'indeterminate');\n const model = useProxiedModel(props, 'modelValue');\n function onChange(v) {\n if (indeterminate.value) {\n indeterminate.value = false;\n }\n }\n const falseIcon = computed(() => {\n return indeterminate.value ? props.indeterminateIcon : props.falseIcon;\n });\n const trueIcon = computed(() => {\n return indeterminate.value ? props.indeterminateIcon : props.trueIcon;\n });\n useRender(() => _createVNode(VSelectionControl, _mergeProps(props, {\n \"modelValue\": model.value,\n \"onUpdate:modelValue\": [$event => model.value = $event, onChange],\n \"class\": ['v-checkbox-btn', props.class],\n \"style\": props.style,\n \"type\": \"checkbox\",\n \"falseIcon\": falseIcon.value,\n \"trueIcon\": trueIcon.value,\n \"aria-checked\": indeterminate.value ? 'mixed' : undefined\n }), slots));\n return {};\n }\n});\n//# sourceMappingURL=VCheckboxBtn.mjs.map","import { createVNode as _createVNode } from \"vue\";\n// Styles\nimport \"./VChipGroup.css\";\n\n// Composables\nimport { makeComponentProps } from \"../../composables/component.mjs\";\nimport { provideDefaults } from \"../../composables/defaults.mjs\";\nimport { makeGroupProps, useGroup } from \"../../composables/group.mjs\";\nimport { makeTagProps } from \"../../composables/tag.mjs\";\nimport { makeThemeProps, provideTheme } from \"../../composables/theme.mjs\";\nimport { makeVariantProps } from \"../../composables/variant.mjs\"; // Utilities\nimport { toRef } from 'vue';\nimport { deepEqual, genericComponent, propsFactory, useRender } from \"../../util/index.mjs\"; // Types\nexport const VChipGroupSymbol = Symbol.for('vuetify:v-chip-group');\nexport const makeVChipGroupProps = propsFactory({\n column: Boolean,\n filter: Boolean,\n valueComparator: {\n type: Function,\n default: deepEqual\n },\n ...makeComponentProps(),\n ...makeGroupProps({\n selectedClass: 'v-chip--selected'\n }),\n ...makeTagProps(),\n ...makeThemeProps(),\n ...makeVariantProps({\n variant: 'tonal'\n })\n}, 'VChipGroup');\nexport const VChipGroup = genericComponent()({\n name: 'VChipGroup',\n props: makeVChipGroupProps(),\n emits: {\n 'update:modelValue': value => true\n },\n setup(props, _ref) {\n let {\n slots\n } = _ref;\n const {\n themeClasses\n } = provideTheme(props);\n const {\n isSelected,\n select,\n next,\n prev,\n selected\n } = useGroup(props, VChipGroupSymbol);\n provideDefaults({\n VChip: {\n color: toRef(props, 'color'),\n disabled: toRef(props, 'disabled'),\n filter: toRef(props, 'filter'),\n variant: toRef(props, 'variant')\n }\n });\n useRender(() => _createVNode(props.tag, {\n \"class\": ['v-chip-group', {\n 'v-chip-group--column': props.column\n }, themeClasses.value, props.class],\n \"style\": props.style\n }, {\n default: () => [slots.default?.({\n isSelected,\n select,\n next,\n prev,\n selected: selected.value\n })]\n }));\n return {};\n }\n});\n//# sourceMappingURL=VChipGroup.mjs.map","import { mergeProps as _mergeProps, Fragment as _Fragment, vShow as _vShow, withDirectives as _withDirectives, resolveDirective as _resolveDirective, createVNode as _createVNode } from \"vue\";\n/* eslint-disable complexity */\n// Styles\nimport \"./VChip.css\";\n\n// Components\nimport { VExpandXTransition } from \"../transitions/index.mjs\";\nimport { VAvatar } from \"../VAvatar/index.mjs\";\nimport { VChipGroupSymbol } from \"../VChipGroup/VChipGroup.mjs\";\nimport { VDefaultsProvider } from \"../VDefaultsProvider/index.mjs\";\nimport { VIcon } from \"../VIcon/index.mjs\"; // Composables\nimport { makeBorderProps, useBorder } from \"../../composables/border.mjs\";\nimport { makeComponentProps } from \"../../composables/component.mjs\";\nimport { makeDensityProps, useDensity } from \"../../composables/density.mjs\";\nimport { makeElevationProps, useElevation } from \"../../composables/elevation.mjs\";\nimport { makeGroupItemProps, useGroupItem } from \"../../composables/group.mjs\";\nimport { IconValue } from \"../../composables/icons.mjs\";\nimport { useLocale } from \"../../composables/locale.mjs\";\nimport { useProxiedModel } from \"../../composables/proxiedModel.mjs\";\nimport { makeRoundedProps, useRounded } from \"../../composables/rounded.mjs\";\nimport { makeRouterProps, useLink } from \"../../composables/router.mjs\";\nimport { makeSizeProps, useSize } from \"../../composables/size.mjs\";\nimport { makeTagProps } from \"../../composables/tag.mjs\";\nimport { makeThemeProps, provideTheme } from \"../../composables/theme.mjs\";\nimport { genOverlays, makeVariantProps, useVariant } from \"../../composables/variant.mjs\"; // Directives\nimport { Ripple } from \"../../directives/ripple/index.mjs\"; // Utilities\nimport { computed } from 'vue';\nimport { EventProp, genericComponent, propsFactory } from \"../../util/index.mjs\"; // Types\nexport const makeVChipProps = propsFactory({\n activeClass: String,\n appendAvatar: String,\n appendIcon: IconValue,\n closable: Boolean,\n closeIcon: {\n type: IconValue,\n default: '$delete'\n },\n closeLabel: {\n type: String,\n default: '$vuetify.close'\n },\n draggable: Boolean,\n filter: Boolean,\n filterIcon: {\n type: String,\n default: '$complete'\n },\n label: Boolean,\n link: {\n type: Boolean,\n default: undefined\n },\n pill: Boolean,\n prependAvatar: String,\n prependIcon: IconValue,\n ripple: {\n type: [Boolean, Object],\n default: true\n },\n text: String,\n modelValue: {\n type: Boolean,\n default: true\n },\n onClick: EventProp(),\n onClickOnce: EventProp(),\n ...makeBorderProps(),\n ...makeComponentProps(),\n ...makeDensityProps(),\n ...makeElevationProps(),\n ...makeGroupItemProps(),\n ...makeRoundedProps(),\n ...makeRouterProps(),\n ...makeSizeProps(),\n ...makeTagProps({\n tag: 'span'\n }),\n ...makeThemeProps(),\n ...makeVariantProps({\n variant: 'tonal'\n })\n}, 'VChip');\nexport const VChip = genericComponent()({\n name: 'VChip',\n directives: {\n Ripple\n },\n props: makeVChipProps(),\n emits: {\n 'click:close': e => true,\n 'update:modelValue': value => true,\n 'group:selected': val => true,\n click: e => true\n },\n setup(props, _ref) {\n let {\n attrs,\n emit,\n slots\n } = _ref;\n const {\n t\n } = useLocale();\n const {\n borderClasses\n } = useBorder(props);\n const {\n colorClasses,\n colorStyles,\n variantClasses\n } = useVariant(props);\n const {\n densityClasses\n } = useDensity(props);\n const {\n elevationClasses\n } = useElevation(props);\n const {\n roundedClasses\n } = useRounded(props);\n const {\n sizeClasses\n } = useSize(props);\n const {\n themeClasses\n } = provideTheme(props);\n const isActive = useProxiedModel(props, 'modelValue');\n const group = useGroupItem(props, VChipGroupSymbol, false);\n const link = useLink(props, attrs);\n const isLink = computed(() => props.link !== false && link.isLink.value);\n const isClickable = computed(() => !props.disabled && props.link !== false && (!!group || props.link || link.isClickable.value));\n const closeProps = computed(() => ({\n 'aria-label': t(props.closeLabel),\n onClick(e) {\n isActive.value = false;\n emit('click:close', e);\n }\n }));\n function onClick(e) {\n emit('click', e);\n if (!isClickable.value) return;\n link.navigate?.(e);\n group?.toggle();\n }\n function onKeyDown(e) {\n if (e.key === 'Enter' || e.key === ' ') {\n e.preventDefault();\n onClick(e);\n }\n }\n return () => {\n const Tag = link.isLink.value ? 'a' : props.tag;\n const hasAppendMedia = !!(props.appendIcon || props.appendAvatar);\n const hasAppend = !!(hasAppendMedia || slots.append);\n const hasClose = !!(slots.close || props.closable);\n const hasFilter = !!(slots.filter || props.filter) && group;\n const hasPrependMedia = !!(props.prependIcon || props.prependAvatar);\n const hasPrepend = !!(hasPrependMedia || slots.prepend);\n const hasColor = !group || group.isSelected.value;\n return isActive.value && _withDirectives(_createVNode(Tag, {\n \"class\": ['v-chip', {\n 'v-chip--disabled': props.disabled,\n 'v-chip--label': props.label,\n 'v-chip--link': isClickable.value,\n 'v-chip--filter': hasFilter,\n 'v-chip--pill': props.pill\n }, themeClasses.value, borderClasses.value, hasColor ? colorClasses.value : undefined, densityClasses.value, elevationClasses.value, roundedClasses.value, sizeClasses.value, variantClasses.value, group?.selectedClass.value, props.class],\n \"style\": [hasColor ? colorStyles.value : undefined, props.style],\n \"disabled\": props.disabled || undefined,\n \"draggable\": props.draggable,\n \"href\": link.href.value,\n \"tabindex\": isClickable.value ? 0 : undefined,\n \"onClick\": onClick,\n \"onKeydown\": isClickable.value && !isLink.value && onKeyDown\n }, {\n default: () => [genOverlays(isClickable.value, 'v-chip'), hasFilter && _createVNode(VExpandXTransition, {\n \"key\": \"filter\"\n }, {\n default: () => [_withDirectives(_createVNode(\"div\", {\n \"class\": \"v-chip__filter\"\n }, [!slots.filter ? _createVNode(VIcon, {\n \"key\": \"filter-icon\",\n \"icon\": props.filterIcon\n }, null) : _withDirectives(_createVNode(VDefaultsProvider, {\n \"key\": \"filter-defaults\",\n \"disabled\": !props.filterIcon,\n \"defaults\": {\n VIcon: {\n icon: props.filterIcon\n }\n }\n }, null), [[_resolveDirective(\"slot\"), slots.filter, \"default\"]])]), [[_vShow, group.isSelected.value]])]\n }), hasPrepend && _createVNode(\"div\", {\n \"key\": \"prepend\",\n \"class\": \"v-chip__prepend\"\n }, [!slots.prepend ? _createVNode(_Fragment, null, [props.prependIcon && _createVNode(VIcon, {\n \"key\": \"prepend-icon\",\n \"icon\": props.prependIcon,\n \"start\": true\n }, null), props.prependAvatar && _createVNode(VAvatar, {\n \"key\": \"prepend-avatar\",\n \"image\": props.prependAvatar,\n \"start\": true\n }, null)]) : _createVNode(VDefaultsProvider, {\n \"key\": \"prepend-defaults\",\n \"disabled\": !hasPrependMedia,\n \"defaults\": {\n VAvatar: {\n image: props.prependAvatar,\n start: true\n },\n VIcon: {\n icon: props.prependIcon,\n start: true\n }\n }\n }, slots.prepend)]), _createVNode(\"div\", {\n \"class\": \"v-chip__content\"\n }, [slots.default?.({\n isSelected: group?.isSelected.value,\n selectedClass: group?.selectedClass.value,\n select: group?.select,\n toggle: group?.toggle,\n value: group?.value.value,\n disabled: props.disabled\n }) ?? props.text]), hasAppend && _createVNode(\"div\", {\n \"key\": \"append\",\n \"class\": \"v-chip__append\"\n }, [!slots.append ? _createVNode(_Fragment, null, [props.appendIcon && _createVNode(VIcon, {\n \"key\": \"append-icon\",\n \"end\": true,\n \"icon\": props.appendIcon\n }, null), props.appendAvatar && _createVNode(VAvatar, {\n \"key\": \"append-avatar\",\n \"end\": true,\n \"image\": props.appendAvatar\n }, null)]) : _createVNode(VDefaultsProvider, {\n \"key\": \"append-defaults\",\n \"disabled\": !hasAppendMedia,\n \"defaults\": {\n VAvatar: {\n end: true,\n image: props.appendAvatar\n },\n VIcon: {\n end: true,\n icon: props.appendIcon\n }\n }\n }, slots.append)]), hasClose && _createVNode(\"div\", _mergeProps({\n \"key\": \"close\",\n \"class\": \"v-chip__close\"\n }, closeProps.value), [!slots.close ? _createVNode(VIcon, {\n \"key\": \"close-icon\",\n \"icon\": props.closeIcon,\n \"size\": \"x-small\"\n }, null) : _createVNode(VDefaultsProvider, {\n \"key\": \"close-defaults\",\n \"defaults\": {\n VIcon: {\n icon: props.closeIcon,\n size: 'x-small'\n }\n }\n }, slots.close)])]\n }), [[_resolveDirective(\"ripple\"), isClickable.value && props.ripple, null]]);\n };\n }\n});\n//# sourceMappingURL=VChip.mjs.map","import { mergeProps as _mergeProps, createVNode as _createVNode } from \"vue\";\n// Styles\nimport \"./VMenu.css\";\n\n// Components\nimport { VDialogTransition } from \"../transitions/index.mjs\";\nimport { VDefaultsProvider } from \"../VDefaultsProvider/index.mjs\";\nimport { VOverlay } from \"../VOverlay/index.mjs\";\nimport { makeVOverlayProps } from \"../VOverlay/VOverlay.mjs\"; // Composables\nimport { forwardRefs } from \"../../composables/forwardRefs.mjs\";\nimport { useProxiedModel } from \"../../composables/proxiedModel.mjs\";\nimport { useScopeId } from \"../../composables/scopeId.mjs\"; // Utilities\nimport { computed, inject, mergeProps, provide, ref, shallowRef, watch } from 'vue';\nimport { VMenuSymbol } from \"./shared.mjs\";\nimport { focusChild, genericComponent, getUid, omit, propsFactory, useRender } from \"../../util/index.mjs\"; // Types\nexport const makeVMenuProps = propsFactory({\n // TODO\n // disableKeys: Boolean,\n id: String,\n ...omit(makeVOverlayProps({\n closeDelay: 250,\n closeOnContentClick: true,\n locationStrategy: 'connected',\n openDelay: 300,\n scrim: false,\n scrollStrategy: 'reposition',\n transition: {\n component: VDialogTransition\n }\n }), ['absolute'])\n}, 'VMenu');\nexport const VMenu = genericComponent()({\n name: 'VMenu',\n props: makeVMenuProps(),\n emits: {\n 'update:modelValue': value => true\n },\n setup(props, _ref) {\n let {\n slots\n } = _ref;\n const isActive = useProxiedModel(props, 'modelValue');\n const {\n scopeId\n } = useScopeId();\n const uid = getUid();\n const id = computed(() => props.id || `v-menu-${uid}`);\n const overlay = ref();\n const parent = inject(VMenuSymbol, null);\n const openChildren = shallowRef(0);\n provide(VMenuSymbol, {\n register() {\n ++openChildren.value;\n },\n unregister() {\n --openChildren.value;\n },\n closeParents() {\n setTimeout(() => {\n if (!openChildren.value) {\n isActive.value = false;\n parent?.closeParents();\n }\n }, 40);\n }\n });\n watch(isActive, val => {\n val ? parent?.register() : parent?.unregister();\n });\n function onClickOutside() {\n parent?.closeParents();\n }\n function onKeydown(e) {\n if (props.disabled) return;\n if (e.key === 'Tab') {\n isActive.value = false;\n overlay.value?.activatorEl?.focus();\n }\n }\n function onActivatorKeydown(e) {\n if (props.disabled) return;\n const el = overlay.value?.contentEl;\n if (el && isActive.value) {\n if (e.key === 'ArrowDown') {\n e.preventDefault();\n focusChild(el, 'next');\n } else if (e.key === 'ArrowUp') {\n e.preventDefault();\n focusChild(el, 'prev');\n }\n } else if (['ArrowDown', 'ArrowUp'].includes(e.key)) {\n isActive.value = true;\n e.preventDefault();\n setTimeout(() => setTimeout(() => onActivatorKeydown(e)));\n }\n }\n const activatorProps = computed(() => mergeProps({\n 'aria-haspopup': 'menu',\n 'aria-expanded': String(isActive.value),\n 'aria-owns': id.value,\n onKeydown: onActivatorKeydown\n }, props.activatorProps));\n useRender(() => {\n const [overlayProps] = VOverlay.filterProps(props);\n return _createVNode(VOverlay, _mergeProps({\n \"ref\": overlay,\n \"class\": ['v-menu', props.class],\n \"style\": props.style\n }, overlayProps, {\n \"modelValue\": isActive.value,\n \"onUpdate:modelValue\": $event => isActive.value = $event,\n \"absolute\": true,\n \"activatorProps\": activatorProps.value,\n \"onClick:outside\": onClickOutside,\n \"onKeydown\": onKeydown\n }, scopeId), {\n activator: slots.activator,\n default: function () {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n return _createVNode(VDefaultsProvider, {\n \"root\": \"VMenu\"\n }, {\n default: () => [slots.default?.(...args)]\n });\n }\n });\n });\n return forwardRefs({\n id,\n ΨopenChildren: openChildren\n }, overlay);\n }\n});\n//# sourceMappingURL=VMenu.mjs.map","import { createTextVNode as _createTextVNode, mergeProps as _mergeProps, createVNode as _createVNode, Fragment as _Fragment } from \"vue\";\n// Styles\nimport \"./VSelect.css\";\n\n// Components\nimport { VDialogTransition } from \"../transitions/index.mjs\";\nimport { VCheckboxBtn } from \"../VCheckbox/index.mjs\";\nimport { VChip } from \"../VChip/index.mjs\";\nimport { VDefaultsProvider } from \"../VDefaultsProvider/index.mjs\";\nimport { VIcon } from \"../VIcon/index.mjs\";\nimport { VList, VListItem } from \"../VList/index.mjs\";\nimport { VMenu } from \"../VMenu/index.mjs\";\nimport { VTextField } from \"../VTextField/index.mjs\";\nimport { makeVTextFieldProps } from \"../VTextField/VTextField.mjs\"; // Composables\nimport { useForm } from \"../../composables/form.mjs\";\nimport { forwardRefs } from \"../../composables/forwardRefs.mjs\";\nimport { IconValue } from \"../../composables/icons.mjs\";\nimport { makeItemsProps, useItems } from \"../../composables/list-items.mjs\";\nimport { useLocale } from \"../../composables/locale.mjs\";\nimport { useProxiedModel } from \"../../composables/proxiedModel.mjs\";\nimport { makeTransitionProps } from \"../../composables/transition.mjs\"; // Utilities\nimport { computed, mergeProps, ref, shallowRef } from 'vue';\nimport { deepEqual, genericComponent, omit, propsFactory, useRender, wrapInArray } from \"../../util/index.mjs\"; // Types\nexport const makeSelectProps = propsFactory({\n chips: Boolean,\n closableChips: Boolean,\n eager: Boolean,\n hideNoData: Boolean,\n hideSelected: Boolean,\n menu: Boolean,\n menuIcon: {\n type: IconValue,\n default: '$dropdown'\n },\n menuProps: {\n type: Object\n },\n multiple: Boolean,\n noDataText: {\n type: String,\n default: '$vuetify.noDataText'\n },\n openOnClear: Boolean,\n valueComparator: {\n type: Function,\n default: deepEqual\n },\n ...makeItemsProps({\n itemChildren: false\n })\n}, 'Select');\nexport const makeVSelectProps = propsFactory({\n ...makeSelectProps(),\n ...omit(makeVTextFieldProps({\n modelValue: null\n }), ['validationValue', 'dirty', 'appendInnerIcon']),\n ...makeTransitionProps({\n transition: {\n component: VDialogTransition\n }\n })\n}, 'VSelect');\nexport const VSelect = genericComponent()({\n name: 'VSelect',\n props: makeVSelectProps(),\n emits: {\n 'update:focused': focused => true,\n 'update:modelValue': val => true,\n 'update:menu': val => true\n },\n setup(props, _ref) {\n let {\n slots\n } = _ref;\n const {\n t\n } = useLocale();\n const vTextFieldRef = ref();\n const vMenuRef = ref();\n const _menu = useProxiedModel(props, 'menu');\n const menu = computed({\n get: () => _menu.value,\n set: v => {\n if (_menu.value && !v && vMenuRef.value?.ΨopenChildren) return;\n _menu.value = v;\n }\n });\n const {\n items,\n transformIn,\n transformOut\n } = useItems(props);\n const model = useProxiedModel(props, 'modelValue', [], v => transformIn(v === null ? [null] : wrapInArray(v)), v => {\n const transformed = transformOut(v);\n return props.multiple ? transformed : transformed[0] ?? null;\n });\n const form = useForm();\n const selections = computed(() => {\n return model.value.map(v => {\n return items.value.find(item => props.valueComparator(item.value, v.value)) || v;\n });\n });\n const selected = computed(() => selections.value.map(selection => selection.props.value));\n const isFocused = shallowRef(false);\n let keyboardLookupPrefix = '';\n let keyboardLookupLastTime;\n const displayItems = computed(() => {\n if (props.hideSelected) {\n return items.value.filter(item => !selections.value.some(s => s === item));\n }\n return items.value;\n });\n const menuDisabled = computed(() => props.hideNoData && !items.value.length || props.readonly || form?.isReadonly.value);\n const listRef = ref();\n function onClear(e) {\n if (props.openOnClear) {\n menu.value = true;\n }\n }\n function onMousedownControl() {\n if (menuDisabled.value) return;\n menu.value = !menu.value;\n }\n function onKeydown(e) {\n if (props.readonly || form?.isReadonly.value) return;\n if (['Enter', ' ', 'ArrowDown', 'ArrowUp', 'Home', 'End'].includes(e.key)) {\n e.preventDefault();\n }\n if (['Enter', 'ArrowDown', ' '].includes(e.key)) {\n menu.value = true;\n }\n if (['Escape', 'Tab'].includes(e.key)) {\n menu.value = false;\n }\n if (e.key === 'Home') {\n listRef.value?.focus('first');\n } else if (e.key === 'End') {\n listRef.value?.focus('last');\n }\n\n // html select hotkeys\n const KEYBOARD_LOOKUP_THRESHOLD = 1000; // milliseconds\n\n function checkPrintable(e) {\n const isPrintableChar = e.key.length === 1;\n const noModifier = !e.ctrlKey && !e.metaKey && !e.altKey;\n return isPrintableChar && noModifier;\n }\n if (props.multiple || !checkPrintable(e)) return;\n const now = performance.now();\n if (now - keyboardLookupLastTime > KEYBOARD_LOOKUP_THRESHOLD) {\n keyboardLookupPrefix = '';\n }\n keyboardLookupPrefix += e.key.toLowerCase();\n keyboardLookupLastTime = now;\n const item = items.value.find(item => item.title.toLowerCase().startsWith(keyboardLookupPrefix));\n if (item !== undefined) {\n model.value = [item];\n }\n }\n function onListKeydown(e) {\n if (e.key === 'Tab') {\n vTextFieldRef.value?.focus();\n }\n }\n function select(item) {\n if (props.multiple) {\n const index = selected.value.findIndex(selection => props.valueComparator(selection, item.value));\n if (index === -1) {\n model.value = [...model.value, item];\n } else {\n const value = [...model.value];\n value.splice(index, 1);\n model.value = value;\n }\n } else {\n model.value = [item];\n menu.value = false;\n }\n }\n function onBlur(e) {\n if (!listRef.value?.$el.contains(e.relatedTarget)) {\n menu.value = false;\n }\n }\n function onAfterLeave() {\n if (isFocused.value) {\n vTextFieldRef.value?.focus();\n }\n }\n function onFocusin(e) {\n isFocused.value = true;\n }\n useRender(() => {\n const hasChips = !!(props.chips || slots.chip);\n const hasList = !!(!props.hideNoData || displayItems.value.length || slots['prepend-item'] || slots['append-item'] || slots['no-data']);\n const isDirty = model.value.length > 0;\n const [textFieldProps] = VTextField.filterProps(props);\n const placeholder = isDirty || !isFocused.value && props.label && !props.persistentPlaceholder ? undefined : props.placeholder;\n return _createVNode(VTextField, _mergeProps({\n \"ref\": vTextFieldRef\n }, textFieldProps, {\n \"modelValue\": model.value.map(v => v.props.value).join(', '),\n \"onUpdate:modelValue\": v => {\n if (v == null) model.value = [];\n },\n \"focused\": isFocused.value,\n \"onUpdate:focused\": $event => isFocused.value = $event,\n \"validationValue\": model.externalValue,\n \"dirty\": isDirty,\n \"class\": ['v-select', {\n 'v-select--active-menu': menu.value,\n 'v-select--chips': !!props.chips,\n [`v-select--${props.multiple ? 'multiple' : 'single'}`]: true,\n 'v-select--selected': model.value.length,\n 'v-select--selection-slot': !!slots.selection\n }, props.class],\n \"style\": props.style,\n \"readonly\": true,\n \"placeholder\": placeholder,\n \"onClick:clear\": onClear,\n \"onMousedown:control\": onMousedownControl,\n \"onBlur\": onBlur,\n \"onKeydown\": onKeydown\n }), {\n ...slots,\n default: () => _createVNode(_Fragment, null, [_createVNode(VMenu, _mergeProps({\n \"ref\": vMenuRef,\n \"modelValue\": menu.value,\n \"onUpdate:modelValue\": $event => menu.value = $event,\n \"activator\": \"parent\",\n \"contentClass\": \"v-select__content\",\n \"disabled\": menuDisabled.value,\n \"eager\": props.eager,\n \"maxHeight\": 310,\n \"openOnClick\": false,\n \"closeOnContentClick\": false,\n \"transition\": props.transition,\n \"onAfterLeave\": onAfterLeave\n }, props.menuProps), {\n default: () => [hasList && _createVNode(VList, {\n \"ref\": listRef,\n \"selected\": selected.value,\n \"selectStrategy\": props.multiple ? 'independent' : 'single-independent',\n \"onMousedown\": e => e.preventDefault(),\n \"onKeydown\": onListKeydown,\n \"onFocusin\": onFocusin,\n \"tabindex\": \"-1\"\n }, {\n default: () => [slots['prepend-item']?.(), !displayItems.value.length && !props.hideNoData && (slots['no-data']?.() ?? _createVNode(VListItem, {\n \"title\": t(props.noDataText)\n }, null)), displayItems.value.map((item, index) => {\n const itemProps = mergeProps(item.props, {\n key: index,\n onClick: () => select(item)\n });\n return slots.item?.({\n item,\n index,\n props: itemProps\n }) ?? _createVNode(VListItem, itemProps, {\n prepend: _ref2 => {\n let {\n isSelected\n } = _ref2;\n return _createVNode(_Fragment, null, [props.multiple && !props.hideSelected ? _createVNode(VCheckboxBtn, {\n \"key\": item.value,\n \"modelValue\": isSelected,\n \"ripple\": false,\n \"tabindex\": \"-1\"\n }, null) : undefined, item.props.prependIcon && _createVNode(VIcon, {\n \"icon\": item.props.prependIcon\n }, null)]);\n }\n });\n }), slots['append-item']?.()]\n })]\n }), selections.value.map((item, index) => {\n function onChipClose(e) {\n e.stopPropagation();\n e.preventDefault();\n select(item);\n }\n const slotProps = {\n 'onClick:close': onChipClose,\n onMousedown(e) {\n e.preventDefault();\n e.stopPropagation();\n },\n modelValue: true,\n 'onUpdate:modelValue': undefined\n };\n return _createVNode(\"div\", {\n \"key\": item.value,\n \"class\": \"v-select__selection\"\n }, [hasChips ? !slots.chip ? _createVNode(VChip, _mergeProps({\n \"key\": \"chip\",\n \"closable\": props.closableChips,\n \"size\": \"small\",\n \"text\": item.title\n }, slotProps), null) : _createVNode(VDefaultsProvider, {\n \"key\": \"chip-defaults\",\n \"defaults\": {\n VChip: {\n closable: props.closableChips,\n size: 'small',\n text: item.title\n }\n }\n }, {\n default: () => [slots.chip?.({\n item,\n index,\n props: slotProps\n })]\n }) : slots.selection?.({\n item,\n index\n }) ?? _createVNode(\"span\", {\n \"class\": \"v-select__selection-text\"\n }, [item.title, props.multiple && index < selections.value.length - 1 && _createVNode(\"span\", {\n \"class\": \"v-select__selection-comma\"\n }, [_createTextVNode(\",\")])])]);\n })]),\n 'append-inner': function () {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n return _createVNode(_Fragment, null, [slots['append-inner']?.(...args), props.menuIcon ? _createVNode(VIcon, {\n \"class\": \"v-select__menu-icon\",\n \"icon\": props.menuIcon\n }, null) : undefined]);\n }\n });\n });\n return forwardRefs({\n isFocused,\n menu,\n select\n }, vTextFieldRef);\n }\n});\n//# sourceMappingURL=VSelect.mjs.map","/* eslint-disable max-statements */\n/* eslint-disable no-labels */\n\n// Utilities\nimport { computed, ref, unref, watchEffect } from 'vue';\nimport { getPropertyFromItem, propsFactory, wrapInArray } from \"../util/index.mjs\"; // Types\n// Composables\nexport const defaultFilter = (value, query, item) => {\n if (value == null || query == null) return -1;\n return value.toString().toLocaleLowerCase().indexOf(query.toString().toLocaleLowerCase());\n};\nexport const makeFilterProps = propsFactory({\n customFilter: Function,\n customKeyFilter: Object,\n filterKeys: [Array, String],\n filterMode: {\n type: String,\n default: 'intersection'\n },\n noFilter: Boolean\n}, 'filter');\nexport function filterItems(items, query, options) {\n const array = [];\n // always ensure we fall back to a functioning filter\n const filter = options?.default ?? defaultFilter;\n const keys = options?.filterKeys ? wrapInArray(options.filterKeys) : false;\n const customFiltersLength = Object.keys(options?.customKeyFilter ?? {}).length;\n if (!items?.length) return array;\n loop: for (let i = 0; i < items.length; i++) {\n const item = items[i];\n const customMatches = {};\n const defaultMatches = {};\n let match = -1;\n if (query && !options?.noFilter) {\n if (typeof item === 'object') {\n const filterKeys = keys || Object.keys(item);\n for (const key of filterKeys) {\n const value = getPropertyFromItem(item, key, item);\n const keyFilter = options?.customKeyFilter?.[key];\n match = keyFilter ? keyFilter(value, query, item) : filter(value, query, item);\n if (match !== -1 && match !== false) {\n if (keyFilter) customMatches[key] = match;else defaultMatches[key] = match;\n } else if (options?.filterMode === 'every') {\n continue loop;\n }\n }\n } else {\n match = filter(item, query, item);\n if (match !== -1 && match !== false) {\n defaultMatches.title = match;\n }\n }\n const defaultMatchesLength = Object.keys(defaultMatches).length;\n const customMatchesLength = Object.keys(customMatches).length;\n if (!defaultMatchesLength && !customMatchesLength) continue;\n if (options?.filterMode === 'union' && customMatchesLength !== customFiltersLength && !defaultMatchesLength) continue;\n if (options?.filterMode === 'intersection' && (customMatchesLength !== customFiltersLength || !defaultMatchesLength)) continue;\n }\n array.push({\n index: i,\n matches: {\n ...defaultMatches,\n ...customMatches\n }\n });\n }\n return array;\n}\nexport function useFilter(props, items, query, options) {\n const strQuery = computed(() => typeof query?.value !== 'string' && typeof query?.value !== 'number' ? '' : String(query.value));\n const filteredItems = ref([]);\n const filteredMatches = ref(new Map());\n const transformedItems = computed(() => options?.transform ? unref(items).map(options?.transform) : unref(items));\n watchEffect(() => {\n filteredItems.value = [];\n filteredMatches.value = new Map();\n const results = filterItems(transformedItems.value, strQuery.value, {\n customKeyFilter: props.customKeyFilter,\n default: props.customFilter,\n filterKeys: props.filterKeys,\n filterMode: props.filterMode,\n noFilter: props.noFilter\n });\n const originalItems = unref(items);\n results.forEach(_ref => {\n let {\n index,\n matches\n } = _ref;\n const item = originalItems[index];\n filteredItems.value.push(item);\n filteredMatches.value.set(item.value, matches);\n });\n });\n function getMatches(item) {\n return filteredMatches.value.get(item.value);\n }\n return {\n filteredItems,\n filteredMatches,\n getMatches\n };\n}\n//# sourceMappingURL=filter.mjs.map","import { createTextVNode as _createTextVNode, mergeProps as _mergeProps, createVNode as _createVNode, Fragment as _Fragment } from \"vue\";\n// Styles\nimport \"./VAutocomplete.css\";\n\n// Components\nimport { VCheckboxBtn } from \"../VCheckbox/index.mjs\";\nimport { VChip } from \"../VChip/index.mjs\";\nimport { VDefaultsProvider } from \"../VDefaultsProvider/index.mjs\";\nimport { VIcon } from \"../VIcon/index.mjs\";\nimport { VList, VListItem } from \"../VList/index.mjs\";\nimport { VMenu } from \"../VMenu/index.mjs\";\nimport { makeSelectProps } from \"../VSelect/VSelect.mjs\";\nimport { makeVTextFieldProps, VTextField } from \"../VTextField/VTextField.mjs\"; // Composables\nimport { useTextColor } from \"../../composables/color.mjs\";\nimport { makeFilterProps, useFilter } from \"../../composables/filter.mjs\";\nimport { useForm } from \"../../composables/form.mjs\";\nimport { forwardRefs } from \"../../composables/forwardRefs.mjs\";\nimport { useItems } from \"../../composables/list-items.mjs\";\nimport { useLocale } from \"../../composables/locale.mjs\";\nimport { useProxiedModel } from \"../../composables/proxiedModel.mjs\";\nimport { makeTransitionProps } from \"../../composables/transition.mjs\"; // Utilities\nimport { computed, mergeProps, nextTick, ref, shallowRef, watch } from 'vue';\nimport { genericComponent, noop, omit, propsFactory, useRender, wrapInArray } from \"../../util/index.mjs\"; // Types\nfunction highlightResult(text, matches, length) {\n if (matches == null) return text;\n if (Array.isArray(matches)) throw new Error('Multiple matches is not implemented');\n return typeof matches === 'number' && ~matches ? _createVNode(_Fragment, null, [_createVNode(\"span\", {\n \"class\": \"v-autocomplete__unmask\"\n }, [text.substr(0, matches)]), _createVNode(\"span\", {\n \"class\": \"v-autocomplete__mask\"\n }, [text.substr(matches, length)]), _createVNode(\"span\", {\n \"class\": \"v-autocomplete__unmask\"\n }, [text.substr(matches + length)])]) : text;\n}\nexport const makeVAutocompleteProps = propsFactory({\n autoSelectFirst: {\n type: [Boolean, String]\n },\n search: String,\n ...makeFilterProps({\n filterKeys: ['title']\n }),\n ...makeSelectProps(),\n ...omit(makeVTextFieldProps({\n modelValue: null\n }), ['validationValue', 'dirty', 'appendInnerIcon']),\n ...makeTransitionProps({\n transition: false\n })\n}, 'VAutocomplete');\nexport const VAutocomplete = genericComponent()({\n name: 'VAutocomplete',\n props: makeVAutocompleteProps(),\n emits: {\n 'update:focused': focused => true,\n 'update:search': val => true,\n 'update:modelValue': val => true,\n 'update:menu': val => true\n },\n setup(props, _ref) {\n let {\n slots\n } = _ref;\n const {\n t\n } = useLocale();\n const vTextFieldRef = ref();\n const isFocused = shallowRef(false);\n const isPristine = shallowRef(true);\n const listHasFocus = ref(false);\n const vMenuRef = ref();\n const _menu = useProxiedModel(props, 'menu');\n const menu = computed({\n get: () => _menu.value,\n set: v => {\n if (_menu.value && !v && vMenuRef.value?.ΨopenChildren) return;\n _menu.value = v;\n }\n });\n const selectionIndex = shallowRef(-1);\n const color = computed(() => vTextFieldRef.value?.color);\n const {\n items,\n transformIn,\n transformOut\n } = useItems(props);\n const {\n textColorClasses,\n textColorStyles\n } = useTextColor(color);\n const search = useProxiedModel(props, 'search', '');\n const model = useProxiedModel(props, 'modelValue', [], v => transformIn(v === null ? [null] : wrapInArray(v)), v => {\n const transformed = transformOut(v);\n return props.multiple ? transformed : transformed[0] ?? null;\n });\n const form = useForm();\n const {\n filteredItems,\n getMatches\n } = useFilter(props, items, computed(() => isPristine.value ? undefined : search.value));\n const selections = computed(() => {\n return model.value.map(v => {\n return items.value.find(item => props.valueComparator(item.value, v.value)) || v;\n });\n });\n const displayItems = computed(() => {\n if (props.hideSelected) {\n return filteredItems.value.filter(filteredItem => !selections.value.some(s => s.value === filteredItem.value));\n }\n return filteredItems.value;\n });\n const selected = computed(() => selections.value.map(selection => selection.props.value));\n const selection = computed(() => selections.value[selectionIndex.value]);\n const highlightFirst = computed(() => {\n const selectFirst = props.autoSelectFirst === true || props.autoSelectFirst === 'exact' && search.value === displayItems.value[0]?.title;\n return selectFirst && displayItems.value.length > 0 && !isPristine.value && !listHasFocus.value;\n });\n const menuDisabled = computed(() => props.hideNoData && !items.value.length || props.readonly || form?.isReadonly.value);\n const listRef = ref();\n function onClear(e) {\n if (props.openOnClear) {\n menu.value = true;\n }\n search.value = '';\n }\n function onMousedownControl() {\n if (menuDisabled.value) return;\n menu.value = true;\n }\n function onMousedownMenuIcon(e) {\n if (menuDisabled.value) return;\n if (isFocused.value) {\n e.preventDefault();\n e.stopPropagation();\n }\n menu.value = !menu.value;\n }\n function onKeydown(e) {\n if (props.readonly || form?.isReadonly.value) return;\n const selectionStart = vTextFieldRef.value.selectionStart;\n const length = selected.value.length;\n if (selectionIndex.value > -1 || ['Enter', 'ArrowDown', 'ArrowUp'].includes(e.key)) {\n e.preventDefault();\n }\n if (['Enter', 'ArrowDown'].includes(e.key)) {\n menu.value = true;\n }\n if (['Escape'].includes(e.key)) {\n menu.value = false;\n }\n if (['Enter', 'Escape', 'Tab'].includes(e.key)) {\n if (highlightFirst.value && ['Enter', 'Tab'].includes(e.key)) {\n select(filteredItems.value[0]);\n }\n isPristine.value = true;\n }\n if (e.key === 'ArrowDown' && highlightFirst.value) {\n listRef.value?.focus('next');\n }\n if (!props.multiple) return;\n if (['Backspace', 'Delete'].includes(e.key)) {\n if (selectionIndex.value < 0) {\n if (e.key === 'Backspace' && !search.value) {\n selectionIndex.value = length - 1;\n }\n return;\n }\n const originalSelectionIndex = selectionIndex.value;\n if (selection.value) select(selection.value);\n selectionIndex.value = originalSelectionIndex >= length - 1 ? length - 2 : originalSelectionIndex;\n }\n if (e.key === 'ArrowLeft') {\n if (selectionIndex.value < 0 && selectionStart > 0) return;\n const prev = selectionIndex.value > -1 ? selectionIndex.value - 1 : length - 1;\n if (selections.value[prev]) {\n selectionIndex.value = prev;\n } else {\n selectionIndex.value = -1;\n vTextFieldRef.value.setSelectionRange(search.value?.length, search.value?.length);\n }\n }\n if (e.key === 'ArrowRight') {\n if (selectionIndex.value < 0) return;\n const next = selectionIndex.value + 1;\n if (selections.value[next]) {\n selectionIndex.value = next;\n } else {\n selectionIndex.value = -1;\n vTextFieldRef.value.setSelectionRange(0, 0);\n }\n }\n }\n function onListKeydown(e) {\n if (e.key === 'Tab') {\n vTextFieldRef.value?.focus();\n }\n }\n function onInput(e) {\n search.value = e.target.value;\n }\n function onAfterLeave() {\n if (isFocused.value) {\n isPristine.value = true;\n vTextFieldRef.value?.focus();\n }\n }\n function onFocusin(e) {\n isFocused.value = true;\n setTimeout(() => {\n listHasFocus.value = true;\n });\n }\n function onFocusout(e) {\n listHasFocus.value = false;\n }\n function onUpdateModelValue(v) {\n if (v == null || v === '' && !props.multiple) model.value = [];\n }\n const isSelecting = shallowRef(false);\n function select(item) {\n if (props.multiple) {\n const index = selected.value.findIndex(selection => props.valueComparator(selection, item.value));\n if (index === -1) {\n model.value = [...model.value, item];\n } else {\n const value = [...model.value];\n value.splice(index, 1);\n model.value = value;\n }\n } else {\n model.value = [item];\n isSelecting.value = true;\n search.value = item.title;\n menu.value = false;\n isPristine.value = true;\n nextTick(() => isSelecting.value = false);\n }\n }\n watch(isFocused, (val, oldVal) => {\n if (val === oldVal) return;\n if (val) {\n isSelecting.value = true;\n search.value = props.multiple ? '' : String(selections.value.at(-1)?.props.title ?? '');\n isPristine.value = true;\n nextTick(() => isSelecting.value = false);\n } else {\n if (!props.multiple && !search.value) model.value = [];else if (highlightFirst.value && !listHasFocus.value && !selections.value.some(_ref2 => {\n let {\n value\n } = _ref2;\n return value === displayItems.value[0].value;\n })) {\n select(displayItems.value[0]);\n }\n menu.value = false;\n search.value = '';\n selectionIndex.value = -1;\n }\n });\n watch(search, val => {\n if (!isFocused.value || isSelecting.value) return;\n if (val) menu.value = true;\n isPristine.value = !val;\n });\n useRender(() => {\n const hasChips = !!(props.chips || slots.chip);\n const hasList = !!(!props.hideNoData || displayItems.value.length || slots['prepend-item'] || slots['append-item'] || slots['no-data']);\n const isDirty = model.value.length > 0;\n const [textFieldProps] = VTextField.filterProps(props);\n return _createVNode(VTextField, _mergeProps({\n \"ref\": vTextFieldRef\n }, textFieldProps, {\n \"modelValue\": search.value,\n \"onUpdate:modelValue\": onUpdateModelValue,\n \"focused\": isFocused.value,\n \"onUpdate:focused\": $event => isFocused.value = $event,\n \"validationValue\": model.externalValue,\n \"dirty\": isDirty,\n \"onInput\": onInput,\n \"class\": ['v-autocomplete', `v-autocomplete--${props.multiple ? 'multiple' : 'single'}`, {\n 'v-autocomplete--active-menu': menu.value,\n 'v-autocomplete--chips': !!props.chips,\n 'v-autocomplete--selection-slot': !!slots.selection,\n 'v-autocomplete--selecting-index': selectionIndex.value > -1\n }, props.class],\n \"style\": props.style,\n \"readonly\": props.readonly,\n \"placeholder\": isDirty ? undefined : props.placeholder,\n \"onClick:clear\": onClear,\n \"onMousedown:control\": onMousedownControl,\n \"onKeydown\": onKeydown\n }), {\n ...slots,\n default: () => _createVNode(_Fragment, null, [_createVNode(VMenu, _mergeProps({\n \"ref\": vMenuRef,\n \"modelValue\": menu.value,\n \"onUpdate:modelValue\": $event => menu.value = $event,\n \"activator\": \"parent\",\n \"contentClass\": \"v-autocomplete__content\",\n \"disabled\": menuDisabled.value,\n \"eager\": props.eager,\n \"maxHeight\": 310,\n \"openOnClick\": false,\n \"closeOnContentClick\": false,\n \"transition\": props.transition,\n \"onAfterLeave\": onAfterLeave\n }, props.menuProps), {\n default: () => [hasList && _createVNode(VList, {\n \"ref\": listRef,\n \"selected\": selected.value,\n \"selectStrategy\": props.multiple ? 'independent' : 'single-independent',\n \"onMousedown\": e => e.preventDefault(),\n \"onKeydown\": onListKeydown,\n \"onFocusin\": onFocusin,\n \"onFocusout\": onFocusout,\n \"tabindex\": \"-1\"\n }, {\n default: () => [slots['prepend-item']?.(), !displayItems.value.length && !props.hideNoData && (slots['no-data']?.() ?? _createVNode(VListItem, {\n \"title\": t(props.noDataText)\n }, null)), displayItems.value.map((item, index) => {\n const itemProps = mergeProps(item.props, {\n key: index,\n active: highlightFirst.value && index === 0 ? true : undefined,\n onClick: () => select(item)\n });\n return slots.item?.({\n item,\n index,\n props: itemProps\n }) ?? _createVNode(VListItem, itemProps, {\n prepend: _ref3 => {\n let {\n isSelected\n } = _ref3;\n return _createVNode(_Fragment, null, [props.multiple && !props.hideSelected ? _createVNode(VCheckboxBtn, {\n \"key\": item.value,\n \"modelValue\": isSelected,\n \"ripple\": false,\n \"tabindex\": \"-1\"\n }, null) : undefined, item.props.prependIcon && _createVNode(VIcon, {\n \"icon\": item.props.prependIcon\n }, null)]);\n },\n title: () => {\n return isPristine.value ? item.title : highlightResult(item.title, getMatches(item)?.title, search.value?.length ?? 0);\n }\n });\n }), slots['append-item']?.()]\n })]\n }), selections.value.map((item, index) => {\n function onChipClose(e) {\n e.stopPropagation();\n e.preventDefault();\n select(item);\n }\n const slotProps = {\n 'onClick:close': onChipClose,\n onMousedown(e) {\n e.preventDefault();\n e.stopPropagation();\n },\n modelValue: true,\n 'onUpdate:modelValue': undefined\n };\n return _createVNode(\"div\", {\n \"key\": item.value,\n \"class\": ['v-autocomplete__selection', index === selectionIndex.value && ['v-autocomplete__selection--selected', textColorClasses.value]],\n \"style\": index === selectionIndex.value ? textColorStyles.value : {}\n }, [hasChips ? !slots.chip ? _createVNode(VChip, _mergeProps({\n \"key\": \"chip\",\n \"closable\": props.closableChips,\n \"size\": \"small\",\n \"text\": item.title\n }, slotProps), null) : _createVNode(VDefaultsProvider, {\n \"key\": \"chip-defaults\",\n \"defaults\": {\n VChip: {\n closable: props.closableChips,\n size: 'small',\n text: item.title\n }\n }\n }, {\n default: () => [slots.chip?.({\n item,\n index,\n props: slotProps\n })]\n }) : slots.selection?.({\n item,\n index\n }) ?? _createVNode(\"span\", {\n \"class\": \"v-autocomplete__selection-text\"\n }, [item.title, props.multiple && index < selections.value.length - 1 && _createVNode(\"span\", {\n \"class\": \"v-autocomplete__selection-comma\"\n }, [_createTextVNode(\",\")])])]);\n })]),\n 'append-inner': function () {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n return _createVNode(_Fragment, null, [slots['append-inner']?.(...args), props.menuIcon ? _createVNode(VIcon, {\n \"class\": \"v-autocomplete__menu-icon\",\n \"icon\": props.menuIcon,\n \"onMousedown\": onMousedownMenuIcon,\n \"onClick\": noop\n }, null) : undefined]);\n }\n });\n });\n return forwardRefs({\n isFocused,\n isPristine,\n menu,\n search,\n filteredItems,\n select\n }, vTextFieldRef);\n }\n});\n//# sourceMappingURL=VAutocomplete.mjs.map","\n\n\n","\n\n\n","import { mergeProps as _mergeProps, createVNode as _createVNode } from \"vue\";\n// Styles\nimport \"./VDialog.css\";\n\n// Components\nimport { VDialogTransition } from \"../transitions/index.mjs\";\nimport { VDefaultsProvider } from \"../VDefaultsProvider/index.mjs\";\nimport { VOverlay } from \"../VOverlay/index.mjs\";\nimport { makeVOverlayProps } from \"../VOverlay/VOverlay.mjs\"; // Composables\nimport { forwardRefs } from \"../../composables/forwardRefs.mjs\";\nimport { useProxiedModel } from \"../../composables/proxiedModel.mjs\";\nimport { useScopeId } from \"../../composables/scopeId.mjs\"; // Utilities\nimport { computed, mergeProps, nextTick, ref, watch } from 'vue';\nimport { focusableChildren, genericComponent, IN_BROWSER, propsFactory, useRender } from \"../../util/index.mjs\"; // Types\nexport const makeVDialogProps = propsFactory({\n fullscreen: Boolean,\n retainFocus: {\n type: Boolean,\n default: true\n },\n scrollable: Boolean,\n ...makeVOverlayProps({\n origin: 'center center',\n scrollStrategy: 'block',\n transition: {\n component: VDialogTransition\n },\n zIndex: 2400\n })\n}, 'VDialog');\nexport const VDialog = genericComponent()({\n name: 'VDialog',\n props: makeVDialogProps(),\n emits: {\n 'update:modelValue': value => true\n },\n setup(props, _ref) {\n let {\n slots\n } = _ref;\n const isActive = useProxiedModel(props, 'modelValue');\n const {\n scopeId\n } = useScopeId();\n const overlay = ref();\n function onFocusin(e) {\n const before = e.relatedTarget;\n const after = e.target;\n if (before !== after && overlay.value?.contentEl &&\n // We're the topmost dialog\n overlay.value?.globalTop &&\n // It isn't the document or the dialog body\n ![document, overlay.value.contentEl].includes(after) &&\n // It isn't inside the dialog body\n !overlay.value.contentEl.contains(after)) {\n const focusable = focusableChildren(overlay.value.contentEl);\n if (!focusable.length) return;\n const firstElement = focusable[0];\n const lastElement = focusable[focusable.length - 1];\n if (before === firstElement) {\n lastElement.focus();\n } else {\n firstElement.focus();\n }\n }\n }\n if (IN_BROWSER) {\n watch(() => isActive.value && props.retainFocus, val => {\n val ? document.addEventListener('focusin', onFocusin) : document.removeEventListener('focusin', onFocusin);\n }, {\n immediate: true\n });\n }\n watch(isActive, async val => {\n await nextTick();\n if (val) {\n overlay.value.contentEl?.focus({\n preventScroll: true\n });\n } else {\n overlay.value.activatorEl?.focus({\n preventScroll: true\n });\n }\n });\n const activatorProps = computed(() => mergeProps({\n 'aria-haspopup': 'dialog',\n 'aria-expanded': String(isActive.value)\n }, props.activatorProps));\n useRender(() => {\n const [overlayProps] = VOverlay.filterProps(props);\n return _createVNode(VOverlay, _mergeProps({\n \"ref\": overlay,\n \"class\": ['v-dialog', {\n 'v-dialog--fullscreen': props.fullscreen,\n 'v-dialog--scrollable': props.scrollable\n }, props.class],\n \"style\": props.style\n }, overlayProps, {\n \"modelValue\": isActive.value,\n \"onUpdate:modelValue\": $event => isActive.value = $event,\n \"aria-modal\": \"true\",\n \"activatorProps\": activatorProps.value,\n \"role\": \"dialog\"\n }, scopeId), {\n activator: slots.activator,\n default: function () {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n return _createVNode(VDefaultsProvider, {\n \"root\": \"VDialog\"\n }, {\n default: () => [slots.default?.(...args)]\n });\n }\n });\n });\n return forwardRefs({}, overlay);\n }\n});\n//# sourceMappingURL=VDialog.mjs.map","\n\n\n\n\n","\n\n\n\n\n","\n\n\n\n\n","export enum QuestionnaireLanguage {\n En = \"en\",\n No = \"no\",\n}\n","import { QuestionType } from \"@/models/enum/questionType\";\n\nexport enum QuestionnaireTemplateCommonItemsId {\n Boolean = \"Boolean\",\n BooleansWithNotRelevant = \"BooleansWithNotRelevant\",\n Checkbox = \"Checkbox\",\n ContactPerson = \"ContactPerson\",\n Person = \"Person\",\n Address = \"Address\",\n KeyPersonnel = \"KeyPersonnel\",\n BeneficialOwner = \"BeneficialOwner\",\n Certificates = \"Certificates\",\n AuditResult = \"AuditResult\",\n ManagementPositions = \"ManagementPositions\",\n OwnershipPubliclyListedTypes = \"OwnershipPubliclyListedTypes\",\n PersonV2 = \"PersonV2\",\n OwnershipCompany = \"OwnershipCompany\",\n Company = \"Company\",\n PepRcaPerson = \"PepRcaPerson\",\n Sanctions = \"Sanctions\",\n}\n\nexport function getCommonItemIdForQuestionType(\n questionType: QuestionType\n): QuestionnaireTemplateCommonItemsId {\n switch (questionType) {\n case QuestionType.Boolean:\n case QuestionType.BooleanWithDetails:\n case QuestionType.BooleanWithDetailsOnNo:\n case QuestionType.BooleanWithMultiSelect:\n return QuestionnaireTemplateCommonItemsId.Boolean;\n case QuestionType.BooleanWithNotRelevant:\n return QuestionnaireTemplateCommonItemsId.BooleansWithNotRelevant;\n case QuestionType.Checkbox:\n case QuestionType.ListOfCheckboxes:\n return QuestionnaireTemplateCommonItemsId.Checkbox;\n case QuestionType.OwnershipPubliclyListedTypes:\n return QuestionnaireTemplateCommonItemsId.OwnershipPubliclyListedTypes;\n case QuestionType.OwnershipIndividual:\n return QuestionnaireTemplateCommonItemsId.PersonV2;\n case QuestionType.OwnershipCompany:\n return QuestionnaireTemplateCommonItemsId.OwnershipCompany;\n default:\n throw new Error(\"Not supported question type\");\n }\n}\n","export class BooleanOption {\n id: string = \"\";\n label: string = \"\";\n checked: boolean = false;\n disabled: boolean = false;\n\n constructor(id: string, label: string) {\n this.id = id;\n this.label = label;\n }\n}\n","import { AnswerStatus } from \"@/models/enum/answerStatus\";\nimport { ForwardingStatus } from \"@/models/enum/forwardingStatus\";\n\nexport default class ReceivedQuestionnaire {\n tlcName? = \"\";\n questionnaireId = \"\";\n questionnaireLabel = \"\";\n contextId = \"\";\n emailSent = 0;\n answerStatus = AnswerStatus.NotStarted;\n forwardingStatus = ForwardingStatus.NotStarted;\n receiverCompanyAlias = \"\";\n senderCompanies = new Array();\n isBusinessPartner = false;\n templateId = \"\";\n senderEmails = new Array();\n lastEdited = \"\";\n}\n","export enum QuestionnaireTemplateType {\n Standard = 'Standard',\n Custom = 'Custom'\n}","import { QuestionnaireTemplateType } from \"../enum/questionnaireTemplateType\";\n\nexport class QuestionnaireTemplateInfoDto {\n id: string = \"\";\n label: string = \"\";\n type: QuestionnaireTemplateType = QuestionnaireTemplateType.Standard;\n loading: boolean = false;\n}","import type { AnswerSetStatusDto } from \"@/models/dto/answerSetStatusDto\";\nimport type { QuestionnaireFormDto } from \"@/models/dto/questionnaireItemSetDto\";\nimport { QuestionnaireTemplateInfoDto } from \"@/models/dto/questionnaireTemplateInfoDto\";\nimport type { QuestionnaireLanguage } from \"@/models/enum/questionnaireLanguage\";\nimport type { Questionnaire } from \"@/models/questionnaire\";\nimport type { ForwardedQuestionnaireDto } from \"@/models/dto/forwardedQuestionnaire\";\nimport axios from \"axios\";\n\nexport const createQuestionnaire = async (\n templateId: string | null,\n templateLabel: string\n): Promise => {\n const dto = new QuestionnaireTemplateInfoDto();\n dto.label = templateLabel;\n dto.id = templateId ?? \"\";\n\n await axios.post(\"/api/questionnaire/template\", dto);\n};\n\nexport const getQuestionnaireForm = async (\n contextId: string,\n language: QuestionnaireLanguage\n): Promise => {\n const resp = await axios.get(\n \"/api/questionnaire/form\",\n { params: { contextId, language } }\n );\n return resp.data;\n};\n\nexport const getAnswerStatus = async (\n questionnaireId: string\n): Promise => {\n const resp = await axios.get(\n \"/api/questionnaire/answers-status\",\n { params: { questionnaireId } }\n );\n return resp.data;\n};\n\nexport const updateQuestionnaire = async (\n questionnaire: Questionnaire\n): Promise => {\n const resp = await axios.put(\"/api/questionnaire\", questionnaire);\n return resp.data;\n};\n\nexport const getForwardedQuestionnaires = async (\n questionnaireId: string,\n trustGroupId: string\n): Promise => {\n const resp = await axios.get(\n \"/api/questionnaire/forwarded-questionnaires\",\n { params: { questionnaireId, trustGroupId } }\n );\n return resp.data;\n};","import type { QuestionnaireTemplateInfoDto } from \"@/models/dto/questionnaireTemplateInfoDto\";\nimport type { QuestionnaireLanguage } from \"@/models/enum/questionnaireLanguage\";\nimport type { QuestionnaireTemplate } from \"@/models/questionnaireTemplate\";\nimport axios from \"axios\";\n\nexport const getTemplate = async (\n templateId: string,\n language: QuestionnaireLanguage\n): Promise => {\n const resp = await axios.get(\n \"api/questionnaire-template\",\n { params: { templateId, language } }\n );\n return resp.data;\n};\n\nexport const getTemplates = async (): Promise<\n QuestionnaireTemplateInfoDto[]\n> => {\n const resp = await axios.get(\n \"/api/questionnaire-template/available\"\n );\n return resp.data;\n};\n","import type { ItemTextDto } from \"@/models/dto/questionDto\";\nimport type {\n QuestionnaireItemSetDto,\n QuestionnaireTemplateCommonItemDto,\n} from \"@/models/dto/questionnaireItemSetDto\";\nimport { QuestionnaireLanguage } from \"@/models/enum/questionnaireLanguage\";\nimport {\n getCommonItemIdForQuestionType,\n QuestionnaireTemplateCommonItemsId,\n} from \"@/models/enum/questionnaireTemplateCommonItemsId\";\nimport type { QuestionType } from \"@/models/enum/questionType\";\nimport type { QuestionnaireTemplate } from \"@/models/questionnaireTemplate\";\nimport { BooleanOption } from \"@/models/questions/booleanOption\";\nimport ReceivedQuestionnaire from \"@/models/receivedQuestionnaire\";\nimport { getQuestionnaireForm } from \"@/services/questionnaireService\";\nimport { getTemplate } from \"@/services/templateService\";\nimport { defineStore } from \"pinia\";\n\nexport interface SelectedQuestionnaireState {\n questionnaire: ReceivedQuestionnaire;\n progress: 1 | 2 | 3;\n itemSets: QuestionnaireItemSetDto[];\n commonItems: QuestionnaireTemplateCommonItemDto[];\n language: QuestionnaireLanguage;\n reusingAnswers: boolean;\n questionnaires: ReceivedQuestionnaire[];\n}\n\nexport const useSelectedQuestionnaire = defineStore(\"selectedQuestionnaire\", {\n state: (): SelectedQuestionnaireState => {\n return {\n questionnaire: new ReceivedQuestionnaire(),\n progress: 1,\n itemSets: new Array(),\n commonItems: new Array(),\n language: QuestionnaireLanguage.En,\n reusingAnswers: false,\n questionnaires: new Array(),\n };\n },\n\n actions: {\n setSelectedQuestionnaireParams(questionnaire: ReceivedQuestionnaire) {\n this.questionnaire = questionnaire;\n this.questionnaires = [questionnaire];\n },\n\n setSelectedQuestionnairesParams(questionnaires: ReceivedQuestionnaire[]) {\n this.questionnaire = questionnaires[0];\n this.questionnaires = questionnaires;\n },\n\n setReusingAnswers() {\n this.reusingAnswers = true;\n },\n\n async getSelectedQuestionnaire(\n selectContextId: string,\n language: QuestionnaireLanguage\n ): Promise {\n const questionnaireForm = await getQuestionnaireForm(\n selectContextId,\n language\n );\n\n this.itemSets = questionnaireForm.itemSets;\n this.commonItems = questionnaireForm.commonItems;\n this.language = language;\n return questionnaireForm.itemSets;\n },\n\n async getSelectedQuestionnaireTemplate(\n templateId: string,\n language: QuestionnaireLanguage\n ): Promise {\n const template = await getTemplate(templateId, language);\n this.commonItems = template.commonItems;\n return template;\n },\n\n getCommonItems(id: QuestionnaireTemplateCommonItemsId): ItemTextDto[] {\n return (\n this.commonItems.find(\n (item: QuestionnaireTemplateCommonItemDto) => item.id == id\n )?.entries ?? new Array()\n );\n },\n\n getCommonItemsForQuestionType(questionType: QuestionType): ItemTextDto[] {\n const id = getCommonItemIdForQuestionType(questionType);\n return (\n this.commonItems.find(\n (item: QuestionnaireTemplateCommonItemDto) => item.id == id\n )?.entries ?? new Array()\n );\n },\n\n getBooleansOptions(questionType: QuestionType): BooleanOption[] {\n const booleans = this.getCommonItemsForQuestionType(questionType);\n return booleans\n ? booleans.map((x: ItemTextDto) => new BooleanOption(x.id, x.text))\n : new Array();\n },\n\n getTextForAnswerId(answerId: string, questionType: QuestionType): string {\n const entries = this.getCommonItemsForQuestionType(questionType);\n const entry = entries.find((x) => x.id == answerId);\n return entry?.text ?? \"\";\n },\n\n getKeyPersonnelDisplayTextItems(): ItemTextDto[] {\n const person = this.getCommonItems(\n QuestionnaireTemplateCommonItemsId.Person\n );\n const address = this.getCommonItems(\n QuestionnaireTemplateCommonItemsId.Address\n );\n const keyPersonnel = this.getCommonItems(\n QuestionnaireTemplateCommonItemsId.KeyPersonnel\n );\n return [...person, ...address, ...keyPersonnel];\n },\n\n getBeneficialOwnerDisplayTextItems(): ItemTextDto[] {\n const person = this.getCommonItems(\n QuestionnaireTemplateCommonItemsId.Person\n );\n const address = this.getCommonItems(\n QuestionnaireTemplateCommonItemsId.Address\n );\n const keyPersonnel = this.getCommonItems(\n QuestionnaireTemplateCommonItemsId.KeyPersonnel\n );\n const beneficialOwners = this.getCommonItems(\n QuestionnaireTemplateCommonItemsId.BeneficialOwner\n );\n return [...person, ...address, ...keyPersonnel, ...beneficialOwners];\n },\n\n getIndividualOwnerDisplayTextItems(): ItemTextDto[] {\n const person = this.getCommonItems(\n QuestionnaireTemplateCommonItemsId.PersonV2\n );\n const pepRca = this.getCommonItems(\n QuestionnaireTemplateCommonItemsId.PepRcaPerson\n );\n const address = this.getCommonItems(\n QuestionnaireTemplateCommonItemsId.Address\n );\n const sanctions = this.getCommonItems(\n QuestionnaireTemplateCommonItemsId.Sanctions\n );\n return [...person, ...pepRca, ...address, ...sanctions];\n },\n\n getCompanyOwnerDisplayTextItems(): ItemTextDto[] {\n const company = this.getCommonItems(\n QuestionnaireTemplateCommonItemsId.Company\n );\n const companyOwnership = this.getCommonItems(\n QuestionnaireTemplateCommonItemsId.OwnershipCompany\n );\n const address = this.getCommonItems(\n QuestionnaireTemplateCommonItemsId.Address\n );\n const sanctions = this.getCommonItems(\n QuestionnaireTemplateCommonItemsId.Sanctions\n );\n return [...company, ...companyOwnership, ...address, ...sanctions];\n },\n },\n});\n","\n\n\n\n\n","export enum StringBoolean {\n Yes = \"yes\",\n No = \"no\",\n True = \"true\",\n False = \"false\",\n}\n\nexport function BooleanToString(value: boolean): string {\n return value ? \"yes\" : \"no\";\n}\n\nexport function StringToBoolean(value: string): boolean {\n return value === StringBoolean.Yes;\n}","import type { StringBoolean } from \"@/models/enum/stringBoolean\";\n\nexport default class BooleanWithDetails {\n boolean: StringBoolean | string = \"\";\n details: string = \"\";\n}\n","\n\n\n","\n\n\n\n\n","//! moment.js\n//! version : 2.29.4\n//! authors : Tim Wood, Iskren Chernev, Moment.js contributors\n//! license : MIT\n//! momentjs.com\n\nvar hookCallback;\n\nfunction hooks() {\n return hookCallback.apply(null, arguments);\n}\n\n// This is done to register the method called with moment()\n// without creating circular dependencies.\nfunction setHookCallback(callback) {\n hookCallback = callback;\n}\n\nfunction isArray(input) {\n return (\n input instanceof Array ||\n Object.prototype.toString.call(input) === '[object Array]'\n );\n}\n\nfunction isObject(input) {\n // IE8 will treat undefined and null as object if it wasn't for\n // input != null\n return (\n input != null &&\n Object.prototype.toString.call(input) === '[object Object]'\n );\n}\n\nfunction hasOwnProp(a, b) {\n return Object.prototype.hasOwnProperty.call(a, b);\n}\n\nfunction isObjectEmpty(obj) {\n if (Object.getOwnPropertyNames) {\n return Object.getOwnPropertyNames(obj).length === 0;\n } else {\n var k;\n for (k in obj) {\n if (hasOwnProp(obj, k)) {\n return false;\n }\n }\n return true;\n }\n}\n\nfunction isUndefined(input) {\n return input === void 0;\n}\n\nfunction isNumber(input) {\n return (\n typeof input === 'number' ||\n Object.prototype.toString.call(input) === '[object Number]'\n );\n}\n\nfunction isDate(input) {\n return (\n input instanceof Date ||\n Object.prototype.toString.call(input) === '[object Date]'\n );\n}\n\nfunction map(arr, fn) {\n var res = [],\n i,\n arrLen = arr.length;\n for (i = 0; i < arrLen; ++i) {\n res.push(fn(arr[i], i));\n }\n return res;\n}\n\nfunction extend(a, b) {\n for (var i in b) {\n if (hasOwnProp(b, i)) {\n a[i] = b[i];\n }\n }\n\n if (hasOwnProp(b, 'toString')) {\n a.toString = b.toString;\n }\n\n if (hasOwnProp(b, 'valueOf')) {\n a.valueOf = b.valueOf;\n }\n\n return a;\n}\n\nfunction createUTC(input, format, locale, strict) {\n return createLocalOrUTC(input, format, locale, strict, true).utc();\n}\n\nfunction defaultParsingFlags() {\n // We need to deep clone this object.\n return {\n empty: false,\n unusedTokens: [],\n unusedInput: [],\n overflow: -2,\n charsLeftOver: 0,\n nullInput: false,\n invalidEra: null,\n invalidMonth: null,\n invalidFormat: false,\n userInvalidated: false,\n iso: false,\n parsedDateParts: [],\n era: null,\n meridiem: null,\n rfc2822: false,\n weekdayMismatch: false,\n };\n}\n\nfunction getParsingFlags(m) {\n if (m._pf == null) {\n m._pf = defaultParsingFlags();\n }\n return m._pf;\n}\n\nvar some;\nif (Array.prototype.some) {\n some = Array.prototype.some;\n} else {\n some = function (fun) {\n var t = Object(this),\n len = t.length >>> 0,\n i;\n\n for (i = 0; i < len; i++) {\n if (i in t && fun.call(this, t[i], i, t)) {\n return true;\n }\n }\n\n return false;\n };\n}\n\nfunction isValid(m) {\n if (m._isValid == null) {\n var flags = getParsingFlags(m),\n parsedParts = some.call(flags.parsedDateParts, function (i) {\n return i != null;\n }),\n isNowValid =\n !isNaN(m._d.getTime()) &&\n flags.overflow < 0 &&\n !flags.empty &&\n !flags.invalidEra &&\n !flags.invalidMonth &&\n !flags.invalidWeekday &&\n !flags.weekdayMismatch &&\n !flags.nullInput &&\n !flags.invalidFormat &&\n !flags.userInvalidated &&\n (!flags.meridiem || (flags.meridiem && parsedParts));\n\n if (m._strict) {\n isNowValid =\n isNowValid &&\n flags.charsLeftOver === 0 &&\n flags.unusedTokens.length === 0 &&\n flags.bigHour === undefined;\n }\n\n if (Object.isFrozen == null || !Object.isFrozen(m)) {\n m._isValid = isNowValid;\n } else {\n return isNowValid;\n }\n }\n return m._isValid;\n}\n\nfunction createInvalid(flags) {\n var m = createUTC(NaN);\n if (flags != null) {\n extend(getParsingFlags(m), flags);\n } else {\n getParsingFlags(m).userInvalidated = true;\n }\n\n return m;\n}\n\n// Plugins that add properties should also add the key here (null value),\n// so we can properly clone ourselves.\nvar momentProperties = (hooks.momentProperties = []),\n updateInProgress = false;\n\nfunction copyConfig(to, from) {\n var i,\n prop,\n val,\n momentPropertiesLen = momentProperties.length;\n\n if (!isUndefined(from._isAMomentObject)) {\n to._isAMomentObject = from._isAMomentObject;\n }\n if (!isUndefined(from._i)) {\n to._i = from._i;\n }\n if (!isUndefined(from._f)) {\n to._f = from._f;\n }\n if (!isUndefined(from._l)) {\n to._l = from._l;\n }\n if (!isUndefined(from._strict)) {\n to._strict = from._strict;\n }\n if (!isUndefined(from._tzm)) {\n to._tzm = from._tzm;\n }\n if (!isUndefined(from._isUTC)) {\n to._isUTC = from._isUTC;\n }\n if (!isUndefined(from._offset)) {\n to._offset = from._offset;\n }\n if (!isUndefined(from._pf)) {\n to._pf = getParsingFlags(from);\n }\n if (!isUndefined(from._locale)) {\n to._locale = from._locale;\n }\n\n if (momentPropertiesLen > 0) {\n for (i = 0; i < momentPropertiesLen; i++) {\n prop = momentProperties[i];\n val = from[prop];\n if (!isUndefined(val)) {\n to[prop] = val;\n }\n }\n }\n\n return to;\n}\n\n// Moment prototype object\nfunction Moment(config) {\n copyConfig(this, config);\n this._d = new Date(config._d != null ? config._d.getTime() : NaN);\n if (!this.isValid()) {\n this._d = new Date(NaN);\n }\n // Prevent infinite loop in case updateOffset creates new moment\n // objects.\n if (updateInProgress === false) {\n updateInProgress = true;\n hooks.updateOffset(this);\n updateInProgress = false;\n }\n}\n\nfunction isMoment(obj) {\n return (\n obj instanceof Moment || (obj != null && obj._isAMomentObject != null)\n );\n}\n\nfunction warn(msg) {\n if (\n hooks.suppressDeprecationWarnings === false &&\n typeof console !== 'undefined' &&\n console.warn\n ) {\n console.warn('Deprecation warning: ' + msg);\n }\n}\n\nfunction deprecate(msg, fn) {\n var firstTime = true;\n\n return extend(function () {\n if (hooks.deprecationHandler != null) {\n hooks.deprecationHandler(null, msg);\n }\n if (firstTime) {\n var args = [],\n arg,\n i,\n key,\n argLen = arguments.length;\n for (i = 0; i < argLen; i++) {\n arg = '';\n if (typeof arguments[i] === 'object') {\n arg += '\\n[' + i + '] ';\n for (key in arguments[0]) {\n if (hasOwnProp(arguments[0], key)) {\n arg += key + ': ' + arguments[0][key] + ', ';\n }\n }\n arg = arg.slice(0, -2); // Remove trailing comma and space\n } else {\n arg = arguments[i];\n }\n args.push(arg);\n }\n warn(\n msg +\n '\\nArguments: ' +\n Array.prototype.slice.call(args).join('') +\n '\\n' +\n new Error().stack\n );\n firstTime = false;\n }\n return fn.apply(this, arguments);\n }, fn);\n}\n\nvar deprecations = {};\n\nfunction deprecateSimple(name, msg) {\n if (hooks.deprecationHandler != null) {\n hooks.deprecationHandler(name, msg);\n }\n if (!deprecations[name]) {\n warn(msg);\n deprecations[name] = true;\n }\n}\n\nhooks.suppressDeprecationWarnings = false;\nhooks.deprecationHandler = null;\n\nfunction isFunction(input) {\n return (\n (typeof Function !== 'undefined' && input instanceof Function) ||\n Object.prototype.toString.call(input) === '[object Function]'\n );\n}\n\nfunction set(config) {\n var prop, i;\n for (i in config) {\n if (hasOwnProp(config, i)) {\n prop = config[i];\n if (isFunction(prop)) {\n this[i] = prop;\n } else {\n this['_' + i] = prop;\n }\n }\n }\n this._config = config;\n // Lenient ordinal parsing accepts just a number in addition to\n // number + (possibly) stuff coming from _dayOfMonthOrdinalParse.\n // TODO: Remove \"ordinalParse\" fallback in next major release.\n this._dayOfMonthOrdinalParseLenient = new RegExp(\n (this._dayOfMonthOrdinalParse.source || this._ordinalParse.source) +\n '|' +\n /\\d{1,2}/.source\n );\n}\n\nfunction mergeConfigs(parentConfig, childConfig) {\n var res = extend({}, parentConfig),\n prop;\n for (prop in childConfig) {\n if (hasOwnProp(childConfig, prop)) {\n if (isObject(parentConfig[prop]) && isObject(childConfig[prop])) {\n res[prop] = {};\n extend(res[prop], parentConfig[prop]);\n extend(res[prop], childConfig[prop]);\n } else if (childConfig[prop] != null) {\n res[prop] = childConfig[prop];\n } else {\n delete res[prop];\n }\n }\n }\n for (prop in parentConfig) {\n if (\n hasOwnProp(parentConfig, prop) &&\n !hasOwnProp(childConfig, prop) &&\n isObject(parentConfig[prop])\n ) {\n // make sure changes to properties don't modify parent config\n res[prop] = extend({}, res[prop]);\n }\n }\n return res;\n}\n\nfunction Locale(config) {\n if (config != null) {\n this.set(config);\n }\n}\n\nvar keys;\n\nif (Object.keys) {\n keys = Object.keys;\n} else {\n keys = function (obj) {\n var i,\n res = [];\n for (i in obj) {\n if (hasOwnProp(obj, i)) {\n res.push(i);\n }\n }\n return res;\n };\n}\n\nvar defaultCalendar = {\n sameDay: '[Today at] LT',\n nextDay: '[Tomorrow at] LT',\n nextWeek: 'dddd [at] LT',\n lastDay: '[Yesterday at] LT',\n lastWeek: '[Last] dddd [at] LT',\n sameElse: 'L',\n};\n\nfunction calendar(key, mom, now) {\n var output = this._calendar[key] || this._calendar['sameElse'];\n return isFunction(output) ? output.call(mom, now) : output;\n}\n\nfunction zeroFill(number, targetLength, forceSign) {\n var absNumber = '' + Math.abs(number),\n zerosToFill = targetLength - absNumber.length,\n sign = number >= 0;\n return (\n (sign ? (forceSign ? '+' : '') : '-') +\n Math.pow(10, Math.max(0, zerosToFill)).toString().substr(1) +\n absNumber\n );\n}\n\nvar formattingTokens =\n /(\\[[^\\[]*\\])|(\\\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,\n localFormattingTokens = /(\\[[^\\[]*\\])|(\\\\)?(LTS|LT|LL?L?L?|l{1,4})/g,\n formatFunctions = {},\n formatTokenFunctions = {};\n\n// token: 'M'\n// padded: ['MM', 2]\n// ordinal: 'Mo'\n// callback: function () { this.month() + 1 }\nfunction addFormatToken(token, padded, ordinal, callback) {\n var func = callback;\n if (typeof callback === 'string') {\n func = function () {\n return this[callback]();\n };\n }\n if (token) {\n formatTokenFunctions[token] = func;\n }\n if (padded) {\n formatTokenFunctions[padded[0]] = function () {\n return zeroFill(func.apply(this, arguments), padded[1], padded[2]);\n };\n }\n if (ordinal) {\n formatTokenFunctions[ordinal] = function () {\n return this.localeData().ordinal(\n func.apply(this, arguments),\n token\n );\n };\n }\n}\n\nfunction removeFormattingTokens(input) {\n if (input.match(/\\[[\\s\\S]/)) {\n return input.replace(/^\\[|\\]$/g, '');\n }\n return input.replace(/\\\\/g, '');\n}\n\nfunction makeFormatFunction(format) {\n var array = format.match(formattingTokens),\n i,\n length;\n\n for (i = 0, length = array.length; i < length; i++) {\n if (formatTokenFunctions[array[i]]) {\n array[i] = formatTokenFunctions[array[i]];\n } else {\n array[i] = removeFormattingTokens(array[i]);\n }\n }\n\n return function (mom) {\n var output = '',\n i;\n for (i = 0; i < length; i++) {\n output += isFunction(array[i])\n ? array[i].call(mom, format)\n : array[i];\n }\n return output;\n };\n}\n\n// format date using native date object\nfunction formatMoment(m, format) {\n if (!m.isValid()) {\n return m.localeData().invalidDate();\n }\n\n format = expandFormat(format, m.localeData());\n formatFunctions[format] =\n formatFunctions[format] || makeFormatFunction(format);\n\n return formatFunctions[format](m);\n}\n\nfunction expandFormat(format, locale) {\n var i = 5;\n\n function replaceLongDateFormatTokens(input) {\n return locale.longDateFormat(input) || input;\n }\n\n localFormattingTokens.lastIndex = 0;\n while (i >= 0 && localFormattingTokens.test(format)) {\n format = format.replace(\n localFormattingTokens,\n replaceLongDateFormatTokens\n );\n localFormattingTokens.lastIndex = 0;\n i -= 1;\n }\n\n return format;\n}\n\nvar defaultLongDateFormat = {\n LTS: 'h:mm:ss A',\n LT: 'h:mm A',\n L: 'MM/DD/YYYY',\n LL: 'MMMM D, YYYY',\n LLL: 'MMMM D, YYYY h:mm A',\n LLLL: 'dddd, MMMM D, YYYY h:mm A',\n};\n\nfunction longDateFormat(key) {\n var format = this._longDateFormat[key],\n formatUpper = this._longDateFormat[key.toUpperCase()];\n\n if (format || !formatUpper) {\n return format;\n }\n\n this._longDateFormat[key] = formatUpper\n .match(formattingTokens)\n .map(function (tok) {\n if (\n tok === 'MMMM' ||\n tok === 'MM' ||\n tok === 'DD' ||\n tok === 'dddd'\n ) {\n return tok.slice(1);\n }\n return tok;\n })\n .join('');\n\n return this._longDateFormat[key];\n}\n\nvar defaultInvalidDate = 'Invalid date';\n\nfunction invalidDate() {\n return this._invalidDate;\n}\n\nvar defaultOrdinal = '%d',\n defaultDayOfMonthOrdinalParse = /\\d{1,2}/;\n\nfunction ordinal(number) {\n return this._ordinal.replace('%d', number);\n}\n\nvar defaultRelativeTime = {\n future: 'in %s',\n past: '%s ago',\n s: 'a few seconds',\n ss: '%d seconds',\n m: 'a minute',\n mm: '%d minutes',\n h: 'an hour',\n hh: '%d hours',\n d: 'a day',\n dd: '%d days',\n w: 'a week',\n ww: '%d weeks',\n M: 'a month',\n MM: '%d months',\n y: 'a year',\n yy: '%d years',\n};\n\nfunction relativeTime(number, withoutSuffix, string, isFuture) {\n var output = this._relativeTime[string];\n return isFunction(output)\n ? output(number, withoutSuffix, string, isFuture)\n : output.replace(/%d/i, number);\n}\n\nfunction pastFuture(diff, output) {\n var format = this._relativeTime[diff > 0 ? 'future' : 'past'];\n return isFunction(format) ? format(output) : format.replace(/%s/i, output);\n}\n\nvar aliases = {};\n\nfunction addUnitAlias(unit, shorthand) {\n var lowerCase = unit.toLowerCase();\n aliases[lowerCase] = aliases[lowerCase + 's'] = aliases[shorthand] = unit;\n}\n\nfunction normalizeUnits(units) {\n return typeof units === 'string'\n ? aliases[units] || aliases[units.toLowerCase()]\n : undefined;\n}\n\nfunction normalizeObjectUnits(inputObject) {\n var normalizedInput = {},\n normalizedProp,\n prop;\n\n for (prop in inputObject) {\n if (hasOwnProp(inputObject, prop)) {\n normalizedProp = normalizeUnits(prop);\n if (normalizedProp) {\n normalizedInput[normalizedProp] = inputObject[prop];\n }\n }\n }\n\n return normalizedInput;\n}\n\nvar priorities = {};\n\nfunction addUnitPriority(unit, priority) {\n priorities[unit] = priority;\n}\n\nfunction getPrioritizedUnits(unitsObj) {\n var units = [],\n u;\n for (u in unitsObj) {\n if (hasOwnProp(unitsObj, u)) {\n units.push({ unit: u, priority: priorities[u] });\n }\n }\n units.sort(function (a, b) {\n return a.priority - b.priority;\n });\n return units;\n}\n\nfunction isLeapYear(year) {\n return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0;\n}\n\nfunction absFloor(number) {\n if (number < 0) {\n // -0 -> 0\n return Math.ceil(number) || 0;\n } else {\n return Math.floor(number);\n }\n}\n\nfunction toInt(argumentForCoercion) {\n var coercedNumber = +argumentForCoercion,\n value = 0;\n\n if (coercedNumber !== 0 && isFinite(coercedNumber)) {\n value = absFloor(coercedNumber);\n }\n\n return value;\n}\n\nfunction makeGetSet(unit, keepTime) {\n return function (value) {\n if (value != null) {\n set$1(this, unit, value);\n hooks.updateOffset(this, keepTime);\n return this;\n } else {\n return get(this, unit);\n }\n };\n}\n\nfunction get(mom, unit) {\n return mom.isValid()\n ? mom._d['get' + (mom._isUTC ? 'UTC' : '') + unit]()\n : NaN;\n}\n\nfunction set$1(mom, unit, value) {\n if (mom.isValid() && !isNaN(value)) {\n if (\n unit === 'FullYear' &&\n isLeapYear(mom.year()) &&\n mom.month() === 1 &&\n mom.date() === 29\n ) {\n value = toInt(value);\n mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](\n value,\n mom.month(),\n daysInMonth(value, mom.month())\n );\n } else {\n mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value);\n }\n }\n}\n\n// MOMENTS\n\nfunction stringGet(units) {\n units = normalizeUnits(units);\n if (isFunction(this[units])) {\n return this[units]();\n }\n return this;\n}\n\nfunction stringSet(units, value) {\n if (typeof units === 'object') {\n units = normalizeObjectUnits(units);\n var prioritized = getPrioritizedUnits(units),\n i,\n prioritizedLen = prioritized.length;\n for (i = 0; i < prioritizedLen; i++) {\n this[prioritized[i].unit](units[prioritized[i].unit]);\n }\n } else {\n units = normalizeUnits(units);\n if (isFunction(this[units])) {\n return this[units](value);\n }\n }\n return this;\n}\n\nvar match1 = /\\d/, // 0 - 9\n match2 = /\\d\\d/, // 00 - 99\n match3 = /\\d{3}/, // 000 - 999\n match4 = /\\d{4}/, // 0000 - 9999\n match6 = /[+-]?\\d{6}/, // -999999 - 999999\n match1to2 = /\\d\\d?/, // 0 - 99\n match3to4 = /\\d\\d\\d\\d?/, // 999 - 9999\n match5to6 = /\\d\\d\\d\\d\\d\\d?/, // 99999 - 999999\n match1to3 = /\\d{1,3}/, // 0 - 999\n match1to4 = /\\d{1,4}/, // 0 - 9999\n match1to6 = /[+-]?\\d{1,6}/, // -999999 - 999999\n matchUnsigned = /\\d+/, // 0 - inf\n matchSigned = /[+-]?\\d+/, // -inf - inf\n matchOffset = /Z|[+-]\\d\\d:?\\d\\d/gi, // +00:00 -00:00 +0000 -0000 or Z\n matchShortOffset = /Z|[+-]\\d\\d(?::?\\d\\d)?/gi, // +00 -00 +00:00 -00:00 +0000 -0000 or Z\n matchTimestamp = /[+-]?\\d+(\\.\\d{1,3})?/, // 123456789 123456789.123\n // any word (or two) characters or numbers including two/three word month in arabic.\n // includes scottish gaelic two word and hyphenated months\n matchWord =\n /[0-9]{0,256}['a-z\\u00A0-\\u05FF\\u0700-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFF07\\uFF10-\\uFFEF]{1,256}|[\\u0600-\\u06FF\\/]{1,256}(\\s*?[\\u0600-\\u06FF]{1,256}){1,2}/i,\n regexes;\n\nregexes = {};\n\nfunction addRegexToken(token, regex, strictRegex) {\n regexes[token] = isFunction(regex)\n ? regex\n : function (isStrict, localeData) {\n return isStrict && strictRegex ? strictRegex : regex;\n };\n}\n\nfunction getParseRegexForToken(token, config) {\n if (!hasOwnProp(regexes, token)) {\n return new RegExp(unescapeFormat(token));\n }\n\n return regexes[token](config._strict, config._locale);\n}\n\n// Code from http://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript\nfunction unescapeFormat(s) {\n return regexEscape(\n s\n .replace('\\\\', '')\n .replace(\n /\\\\(\\[)|\\\\(\\])|\\[([^\\]\\[]*)\\]|\\\\(.)/g,\n function (matched, p1, p2, p3, p4) {\n return p1 || p2 || p3 || p4;\n }\n )\n );\n}\n\nfunction regexEscape(s) {\n return s.replace(/[-\\/\\\\^$*+?.()|[\\]{}]/g, '\\\\$&');\n}\n\nvar tokens = {};\n\nfunction addParseToken(token, callback) {\n var i,\n func = callback,\n tokenLen;\n if (typeof token === 'string') {\n token = [token];\n }\n if (isNumber(callback)) {\n func = function (input, array) {\n array[callback] = toInt(input);\n };\n }\n tokenLen = token.length;\n for (i = 0; i < tokenLen; i++) {\n tokens[token[i]] = func;\n }\n}\n\nfunction addWeekParseToken(token, callback) {\n addParseToken(token, function (input, array, config, token) {\n config._w = config._w || {};\n callback(input, config._w, config, token);\n });\n}\n\nfunction addTimeToArrayFromToken(token, input, config) {\n if (input != null && hasOwnProp(tokens, token)) {\n tokens[token](input, config._a, config, token);\n }\n}\n\nvar YEAR = 0,\n MONTH = 1,\n DATE = 2,\n HOUR = 3,\n MINUTE = 4,\n SECOND = 5,\n MILLISECOND = 6,\n WEEK = 7,\n WEEKDAY = 8;\n\nfunction mod(n, x) {\n return ((n % x) + x) % x;\n}\n\nvar indexOf;\n\nif (Array.prototype.indexOf) {\n indexOf = Array.prototype.indexOf;\n} else {\n indexOf = function (o) {\n // I know\n var i;\n for (i = 0; i < this.length; ++i) {\n if (this[i] === o) {\n return i;\n }\n }\n return -1;\n };\n}\n\nfunction daysInMonth(year, month) {\n if (isNaN(year) || isNaN(month)) {\n return NaN;\n }\n var modMonth = mod(month, 12);\n year += (month - modMonth) / 12;\n return modMonth === 1\n ? isLeapYear(year)\n ? 29\n : 28\n : 31 - ((modMonth % 7) % 2);\n}\n\n// FORMATTING\n\naddFormatToken('M', ['MM', 2], 'Mo', function () {\n return this.month() + 1;\n});\n\naddFormatToken('MMM', 0, 0, function (format) {\n return this.localeData().monthsShort(this, format);\n});\n\naddFormatToken('MMMM', 0, 0, function (format) {\n return this.localeData().months(this, format);\n});\n\n// ALIASES\n\naddUnitAlias('month', 'M');\n\n// PRIORITY\n\naddUnitPriority('month', 8);\n\n// PARSING\n\naddRegexToken('M', match1to2);\naddRegexToken('MM', match1to2, match2);\naddRegexToken('MMM', function (isStrict, locale) {\n return locale.monthsShortRegex(isStrict);\n});\naddRegexToken('MMMM', function (isStrict, locale) {\n return locale.monthsRegex(isStrict);\n});\n\naddParseToken(['M', 'MM'], function (input, array) {\n array[MONTH] = toInt(input) - 1;\n});\n\naddParseToken(['MMM', 'MMMM'], function (input, array, config, token) {\n var month = config._locale.monthsParse(input, token, config._strict);\n // if we didn't find a month name, mark the date as invalid.\n if (month != null) {\n array[MONTH] = month;\n } else {\n getParsingFlags(config).invalidMonth = input;\n }\n});\n\n// LOCALES\n\nvar defaultLocaleMonths =\n 'January_February_March_April_May_June_July_August_September_October_November_December'.split(\n '_'\n ),\n defaultLocaleMonthsShort =\n 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),\n MONTHS_IN_FORMAT = /D[oD]?(\\[[^\\[\\]]*\\]|\\s)+MMMM?/,\n defaultMonthsShortRegex = matchWord,\n defaultMonthsRegex = matchWord;\n\nfunction localeMonths(m, format) {\n if (!m) {\n return isArray(this._months)\n ? this._months\n : this._months['standalone'];\n }\n return isArray(this._months)\n ? this._months[m.month()]\n : this._months[\n (this._months.isFormat || MONTHS_IN_FORMAT).test(format)\n ? 'format'\n : 'standalone'\n ][m.month()];\n}\n\nfunction localeMonthsShort(m, format) {\n if (!m) {\n return isArray(this._monthsShort)\n ? this._monthsShort\n : this._monthsShort['standalone'];\n }\n return isArray(this._monthsShort)\n ? this._monthsShort[m.month()]\n : this._monthsShort[\n MONTHS_IN_FORMAT.test(format) ? 'format' : 'standalone'\n ][m.month()];\n}\n\nfunction handleStrictParse(monthName, format, strict) {\n var i,\n ii,\n mom,\n llc = monthName.toLocaleLowerCase();\n if (!this._monthsParse) {\n // this is not used\n this._monthsParse = [];\n this._longMonthsParse = [];\n this._shortMonthsParse = [];\n for (i = 0; i < 12; ++i) {\n mom = createUTC([2000, i]);\n this._shortMonthsParse[i] = this.monthsShort(\n mom,\n ''\n ).toLocaleLowerCase();\n this._longMonthsParse[i] = this.months(mom, '').toLocaleLowerCase();\n }\n }\n\n if (strict) {\n if (format === 'MMM') {\n ii = indexOf.call(this._shortMonthsParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._longMonthsParse, llc);\n return ii !== -1 ? ii : null;\n }\n } else {\n if (format === 'MMM') {\n ii = indexOf.call(this._shortMonthsParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._longMonthsParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._longMonthsParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._shortMonthsParse, llc);\n return ii !== -1 ? ii : null;\n }\n }\n}\n\nfunction localeMonthsParse(monthName, format, strict) {\n var i, mom, regex;\n\n if (this._monthsParseExact) {\n return handleStrictParse.call(this, monthName, format, strict);\n }\n\n if (!this._monthsParse) {\n this._monthsParse = [];\n this._longMonthsParse = [];\n this._shortMonthsParse = [];\n }\n\n // TODO: add sorting\n // Sorting makes sure if one month (or abbr) is a prefix of another\n // see sorting in computeMonthsParse\n for (i = 0; i < 12; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, i]);\n if (strict && !this._longMonthsParse[i]) {\n this._longMonthsParse[i] = new RegExp(\n '^' + this.months(mom, '').replace('.', '') + '$',\n 'i'\n );\n this._shortMonthsParse[i] = new RegExp(\n '^' + this.monthsShort(mom, '').replace('.', '') + '$',\n 'i'\n );\n }\n if (!strict && !this._monthsParse[i]) {\n regex =\n '^' + this.months(mom, '') + '|^' + this.monthsShort(mom, '');\n this._monthsParse[i] = new RegExp(regex.replace('.', ''), 'i');\n }\n // test the regex\n if (\n strict &&\n format === 'MMMM' &&\n this._longMonthsParse[i].test(monthName)\n ) {\n return i;\n } else if (\n strict &&\n format === 'MMM' &&\n this._shortMonthsParse[i].test(monthName)\n ) {\n return i;\n } else if (!strict && this._monthsParse[i].test(monthName)) {\n return i;\n }\n }\n}\n\n// MOMENTS\n\nfunction setMonth(mom, value) {\n var dayOfMonth;\n\n if (!mom.isValid()) {\n // No op\n return mom;\n }\n\n if (typeof value === 'string') {\n if (/^\\d+$/.test(value)) {\n value = toInt(value);\n } else {\n value = mom.localeData().monthsParse(value);\n // TODO: Another silent failure?\n if (!isNumber(value)) {\n return mom;\n }\n }\n }\n\n dayOfMonth = Math.min(mom.date(), daysInMonth(mom.year(), value));\n mom._d['set' + (mom._isUTC ? 'UTC' : '') + 'Month'](value, dayOfMonth);\n return mom;\n}\n\nfunction getSetMonth(value) {\n if (value != null) {\n setMonth(this, value);\n hooks.updateOffset(this, true);\n return this;\n } else {\n return get(this, 'Month');\n }\n}\n\nfunction getDaysInMonth() {\n return daysInMonth(this.year(), this.month());\n}\n\nfunction monthsShortRegex(isStrict) {\n if (this._monthsParseExact) {\n if (!hasOwnProp(this, '_monthsRegex')) {\n computeMonthsParse.call(this);\n }\n if (isStrict) {\n return this._monthsShortStrictRegex;\n } else {\n return this._monthsShortRegex;\n }\n } else {\n if (!hasOwnProp(this, '_monthsShortRegex')) {\n this._monthsShortRegex = defaultMonthsShortRegex;\n }\n return this._monthsShortStrictRegex && isStrict\n ? this._monthsShortStrictRegex\n : this._monthsShortRegex;\n }\n}\n\nfunction monthsRegex(isStrict) {\n if (this._monthsParseExact) {\n if (!hasOwnProp(this, '_monthsRegex')) {\n computeMonthsParse.call(this);\n }\n if (isStrict) {\n return this._monthsStrictRegex;\n } else {\n return this._monthsRegex;\n }\n } else {\n if (!hasOwnProp(this, '_monthsRegex')) {\n this._monthsRegex = defaultMonthsRegex;\n }\n return this._monthsStrictRegex && isStrict\n ? this._monthsStrictRegex\n : this._monthsRegex;\n }\n}\n\nfunction computeMonthsParse() {\n function cmpLenRev(a, b) {\n return b.length - a.length;\n }\n\n var shortPieces = [],\n longPieces = [],\n mixedPieces = [],\n i,\n mom;\n for (i = 0; i < 12; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, i]);\n shortPieces.push(this.monthsShort(mom, ''));\n longPieces.push(this.months(mom, ''));\n mixedPieces.push(this.months(mom, ''));\n mixedPieces.push(this.monthsShort(mom, ''));\n }\n // Sorting makes sure if one month (or abbr) is a prefix of another it\n // will match the longer piece.\n shortPieces.sort(cmpLenRev);\n longPieces.sort(cmpLenRev);\n mixedPieces.sort(cmpLenRev);\n for (i = 0; i < 12; i++) {\n shortPieces[i] = regexEscape(shortPieces[i]);\n longPieces[i] = regexEscape(longPieces[i]);\n }\n for (i = 0; i < 24; i++) {\n mixedPieces[i] = regexEscape(mixedPieces[i]);\n }\n\n this._monthsRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n this._monthsShortRegex = this._monthsRegex;\n this._monthsStrictRegex = new RegExp(\n '^(' + longPieces.join('|') + ')',\n 'i'\n );\n this._monthsShortStrictRegex = new RegExp(\n '^(' + shortPieces.join('|') + ')',\n 'i'\n );\n}\n\n// FORMATTING\n\naddFormatToken('Y', 0, 0, function () {\n var y = this.year();\n return y <= 9999 ? zeroFill(y, 4) : '+' + y;\n});\n\naddFormatToken(0, ['YY', 2], 0, function () {\n return this.year() % 100;\n});\n\naddFormatToken(0, ['YYYY', 4], 0, 'year');\naddFormatToken(0, ['YYYYY', 5], 0, 'year');\naddFormatToken(0, ['YYYYYY', 6, true], 0, 'year');\n\n// ALIASES\n\naddUnitAlias('year', 'y');\n\n// PRIORITIES\n\naddUnitPriority('year', 1);\n\n// PARSING\n\naddRegexToken('Y', matchSigned);\naddRegexToken('YY', match1to2, match2);\naddRegexToken('YYYY', match1to4, match4);\naddRegexToken('YYYYY', match1to6, match6);\naddRegexToken('YYYYYY', match1to6, match6);\n\naddParseToken(['YYYYY', 'YYYYYY'], YEAR);\naddParseToken('YYYY', function (input, array) {\n array[YEAR] =\n input.length === 2 ? hooks.parseTwoDigitYear(input) : toInt(input);\n});\naddParseToken('YY', function (input, array) {\n array[YEAR] = hooks.parseTwoDigitYear(input);\n});\naddParseToken('Y', function (input, array) {\n array[YEAR] = parseInt(input, 10);\n});\n\n// HELPERS\n\nfunction daysInYear(year) {\n return isLeapYear(year) ? 366 : 365;\n}\n\n// HOOKS\n\nhooks.parseTwoDigitYear = function (input) {\n return toInt(input) + (toInt(input) > 68 ? 1900 : 2000);\n};\n\n// MOMENTS\n\nvar getSetYear = makeGetSet('FullYear', true);\n\nfunction getIsLeapYear() {\n return isLeapYear(this.year());\n}\n\nfunction createDate(y, m, d, h, M, s, ms) {\n // can't just apply() to create a date:\n // https://stackoverflow.com/q/181348\n var date;\n // the date constructor remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n // preserve leap years using a full 400 year cycle, then reset\n date = new Date(y + 400, m, d, h, M, s, ms);\n if (isFinite(date.getFullYear())) {\n date.setFullYear(y);\n }\n } else {\n date = new Date(y, m, d, h, M, s, ms);\n }\n\n return date;\n}\n\nfunction createUTCDate(y) {\n var date, args;\n // the Date.UTC function remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n args = Array.prototype.slice.call(arguments);\n // preserve leap years using a full 400 year cycle, then reset\n args[0] = y + 400;\n date = new Date(Date.UTC.apply(null, args));\n if (isFinite(date.getUTCFullYear())) {\n date.setUTCFullYear(y);\n }\n } else {\n date = new Date(Date.UTC.apply(null, arguments));\n }\n\n return date;\n}\n\n// start-of-first-week - start-of-year\nfunction firstWeekOffset(year, dow, doy) {\n var // first-week day -- which january is always in the first week (4 for iso, 1 for other)\n fwd = 7 + dow - doy,\n // first-week day local weekday -- which local weekday is fwd\n fwdlw = (7 + createUTCDate(year, 0, fwd).getUTCDay() - dow) % 7;\n\n return -fwdlw + fwd - 1;\n}\n\n// https://en.wikipedia.org/wiki/ISO_week_date#Calculating_a_date_given_the_year.2C_week_number_and_weekday\nfunction dayOfYearFromWeeks(year, week, weekday, dow, doy) {\n var localWeekday = (7 + weekday - dow) % 7,\n weekOffset = firstWeekOffset(year, dow, doy),\n dayOfYear = 1 + 7 * (week - 1) + localWeekday + weekOffset,\n resYear,\n resDayOfYear;\n\n if (dayOfYear <= 0) {\n resYear = year - 1;\n resDayOfYear = daysInYear(resYear) + dayOfYear;\n } else if (dayOfYear > daysInYear(year)) {\n resYear = year + 1;\n resDayOfYear = dayOfYear - daysInYear(year);\n } else {\n resYear = year;\n resDayOfYear = dayOfYear;\n }\n\n return {\n year: resYear,\n dayOfYear: resDayOfYear,\n };\n}\n\nfunction weekOfYear(mom, dow, doy) {\n var weekOffset = firstWeekOffset(mom.year(), dow, doy),\n week = Math.floor((mom.dayOfYear() - weekOffset - 1) / 7) + 1,\n resWeek,\n resYear;\n\n if (week < 1) {\n resYear = mom.year() - 1;\n resWeek = week + weeksInYear(resYear, dow, doy);\n } else if (week > weeksInYear(mom.year(), dow, doy)) {\n resWeek = week - weeksInYear(mom.year(), dow, doy);\n resYear = mom.year() + 1;\n } else {\n resYear = mom.year();\n resWeek = week;\n }\n\n return {\n week: resWeek,\n year: resYear,\n };\n}\n\nfunction weeksInYear(year, dow, doy) {\n var weekOffset = firstWeekOffset(year, dow, doy),\n weekOffsetNext = firstWeekOffset(year + 1, dow, doy);\n return (daysInYear(year) - weekOffset + weekOffsetNext) / 7;\n}\n\n// FORMATTING\n\naddFormatToken('w', ['ww', 2], 'wo', 'week');\naddFormatToken('W', ['WW', 2], 'Wo', 'isoWeek');\n\n// ALIASES\n\naddUnitAlias('week', 'w');\naddUnitAlias('isoWeek', 'W');\n\n// PRIORITIES\n\naddUnitPriority('week', 5);\naddUnitPriority('isoWeek', 5);\n\n// PARSING\n\naddRegexToken('w', match1to2);\naddRegexToken('ww', match1to2, match2);\naddRegexToken('W', match1to2);\naddRegexToken('WW', match1to2, match2);\n\naddWeekParseToken(\n ['w', 'ww', 'W', 'WW'],\n function (input, week, config, token) {\n week[token.substr(0, 1)] = toInt(input);\n }\n);\n\n// HELPERS\n\n// LOCALES\n\nfunction localeWeek(mom) {\n return weekOfYear(mom, this._week.dow, this._week.doy).week;\n}\n\nvar defaultLocaleWeek = {\n dow: 0, // Sunday is the first day of the week.\n doy: 6, // The week that contains Jan 6th is the first week of the year.\n};\n\nfunction localeFirstDayOfWeek() {\n return this._week.dow;\n}\n\nfunction localeFirstDayOfYear() {\n return this._week.doy;\n}\n\n// MOMENTS\n\nfunction getSetWeek(input) {\n var week = this.localeData().week(this);\n return input == null ? week : this.add((input - week) * 7, 'd');\n}\n\nfunction getSetISOWeek(input) {\n var week = weekOfYear(this, 1, 4).week;\n return input == null ? week : this.add((input - week) * 7, 'd');\n}\n\n// FORMATTING\n\naddFormatToken('d', 0, 'do', 'day');\n\naddFormatToken('dd', 0, 0, function (format) {\n return this.localeData().weekdaysMin(this, format);\n});\n\naddFormatToken('ddd', 0, 0, function (format) {\n return this.localeData().weekdaysShort(this, format);\n});\n\naddFormatToken('dddd', 0, 0, function (format) {\n return this.localeData().weekdays(this, format);\n});\n\naddFormatToken('e', 0, 0, 'weekday');\naddFormatToken('E', 0, 0, 'isoWeekday');\n\n// ALIASES\n\naddUnitAlias('day', 'd');\naddUnitAlias('weekday', 'e');\naddUnitAlias('isoWeekday', 'E');\n\n// PRIORITY\naddUnitPriority('day', 11);\naddUnitPriority('weekday', 11);\naddUnitPriority('isoWeekday', 11);\n\n// PARSING\n\naddRegexToken('d', match1to2);\naddRegexToken('e', match1to2);\naddRegexToken('E', match1to2);\naddRegexToken('dd', function (isStrict, locale) {\n return locale.weekdaysMinRegex(isStrict);\n});\naddRegexToken('ddd', function (isStrict, locale) {\n return locale.weekdaysShortRegex(isStrict);\n});\naddRegexToken('dddd', function (isStrict, locale) {\n return locale.weekdaysRegex(isStrict);\n});\n\naddWeekParseToken(['dd', 'ddd', 'dddd'], function (input, week, config, token) {\n var weekday = config._locale.weekdaysParse(input, token, config._strict);\n // if we didn't get a weekday name, mark the date as invalid\n if (weekday != null) {\n week.d = weekday;\n } else {\n getParsingFlags(config).invalidWeekday = input;\n }\n});\n\naddWeekParseToken(['d', 'e', 'E'], function (input, week, config, token) {\n week[token] = toInt(input);\n});\n\n// HELPERS\n\nfunction parseWeekday(input, locale) {\n if (typeof input !== 'string') {\n return input;\n }\n\n if (!isNaN(input)) {\n return parseInt(input, 10);\n }\n\n input = locale.weekdaysParse(input);\n if (typeof input === 'number') {\n return input;\n }\n\n return null;\n}\n\nfunction parseIsoWeekday(input, locale) {\n if (typeof input === 'string') {\n return locale.weekdaysParse(input) % 7 || 7;\n }\n return isNaN(input) ? null : input;\n}\n\n// LOCALES\nfunction shiftWeekdays(ws, n) {\n return ws.slice(n, 7).concat(ws.slice(0, n));\n}\n\nvar defaultLocaleWeekdays =\n 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'),\n defaultLocaleWeekdaysShort = 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),\n defaultLocaleWeekdaysMin = 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),\n defaultWeekdaysRegex = matchWord,\n defaultWeekdaysShortRegex = matchWord,\n defaultWeekdaysMinRegex = matchWord;\n\nfunction localeWeekdays(m, format) {\n var weekdays = isArray(this._weekdays)\n ? this._weekdays\n : this._weekdays[\n m && m !== true && this._weekdays.isFormat.test(format)\n ? 'format'\n : 'standalone'\n ];\n return m === true\n ? shiftWeekdays(weekdays, this._week.dow)\n : m\n ? weekdays[m.day()]\n : weekdays;\n}\n\nfunction localeWeekdaysShort(m) {\n return m === true\n ? shiftWeekdays(this._weekdaysShort, this._week.dow)\n : m\n ? this._weekdaysShort[m.day()]\n : this._weekdaysShort;\n}\n\nfunction localeWeekdaysMin(m) {\n return m === true\n ? shiftWeekdays(this._weekdaysMin, this._week.dow)\n : m\n ? this._weekdaysMin[m.day()]\n : this._weekdaysMin;\n}\n\nfunction handleStrictParse$1(weekdayName, format, strict) {\n var i,\n ii,\n mom,\n llc = weekdayName.toLocaleLowerCase();\n if (!this._weekdaysParse) {\n this._weekdaysParse = [];\n this._shortWeekdaysParse = [];\n this._minWeekdaysParse = [];\n\n for (i = 0; i < 7; ++i) {\n mom = createUTC([2000, 1]).day(i);\n this._minWeekdaysParse[i] = this.weekdaysMin(\n mom,\n ''\n ).toLocaleLowerCase();\n this._shortWeekdaysParse[i] = this.weekdaysShort(\n mom,\n ''\n ).toLocaleLowerCase();\n this._weekdaysParse[i] = this.weekdays(mom, '').toLocaleLowerCase();\n }\n }\n\n if (strict) {\n if (format === 'dddd') {\n ii = indexOf.call(this._weekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else if (format === 'ddd') {\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n }\n } else {\n if (format === 'dddd') {\n ii = indexOf.call(this._weekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else if (format === 'ddd') {\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._weekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._minWeekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._weekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n }\n }\n}\n\nfunction localeWeekdaysParse(weekdayName, format, strict) {\n var i, mom, regex;\n\n if (this._weekdaysParseExact) {\n return handleStrictParse$1.call(this, weekdayName, format, strict);\n }\n\n if (!this._weekdaysParse) {\n this._weekdaysParse = [];\n this._minWeekdaysParse = [];\n this._shortWeekdaysParse = [];\n this._fullWeekdaysParse = [];\n }\n\n for (i = 0; i < 7; i++) {\n // make the regex if we don't have it already\n\n mom = createUTC([2000, 1]).day(i);\n if (strict && !this._fullWeekdaysParse[i]) {\n this._fullWeekdaysParse[i] = new RegExp(\n '^' + this.weekdays(mom, '').replace('.', '\\\\.?') + '$',\n 'i'\n );\n this._shortWeekdaysParse[i] = new RegExp(\n '^' + this.weekdaysShort(mom, '').replace('.', '\\\\.?') + '$',\n 'i'\n );\n this._minWeekdaysParse[i] = new RegExp(\n '^' + this.weekdaysMin(mom, '').replace('.', '\\\\.?') + '$',\n 'i'\n );\n }\n if (!this._weekdaysParse[i]) {\n regex =\n '^' +\n this.weekdays(mom, '') +\n '|^' +\n this.weekdaysShort(mom, '') +\n '|^' +\n this.weekdaysMin(mom, '');\n this._weekdaysParse[i] = new RegExp(regex.replace('.', ''), 'i');\n }\n // test the regex\n if (\n strict &&\n format === 'dddd' &&\n this._fullWeekdaysParse[i].test(weekdayName)\n ) {\n return i;\n } else if (\n strict &&\n format === 'ddd' &&\n this._shortWeekdaysParse[i].test(weekdayName)\n ) {\n return i;\n } else if (\n strict &&\n format === 'dd' &&\n this._minWeekdaysParse[i].test(weekdayName)\n ) {\n return i;\n } else if (!strict && this._weekdaysParse[i].test(weekdayName)) {\n return i;\n }\n }\n}\n\n// MOMENTS\n\nfunction getSetDayOfWeek(input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n var day = this._isUTC ? this._d.getUTCDay() : this._d.getDay();\n if (input != null) {\n input = parseWeekday(input, this.localeData());\n return this.add(input - day, 'd');\n } else {\n return day;\n }\n}\n\nfunction getSetLocaleDayOfWeek(input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n var weekday = (this.day() + 7 - this.localeData()._week.dow) % 7;\n return input == null ? weekday : this.add(input - weekday, 'd');\n}\n\nfunction getSetISODayOfWeek(input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n\n // behaves the same as moment#day except\n // as a getter, returns 7 instead of 0 (1-7 range instead of 0-6)\n // as a setter, sunday should belong to the previous week.\n\n if (input != null) {\n var weekday = parseIsoWeekday(input, this.localeData());\n return this.day(this.day() % 7 ? weekday : weekday - 7);\n } else {\n return this.day() || 7;\n }\n}\n\nfunction weekdaysRegex(isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n if (isStrict) {\n return this._weekdaysStrictRegex;\n } else {\n return this._weekdaysRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n this._weekdaysRegex = defaultWeekdaysRegex;\n }\n return this._weekdaysStrictRegex && isStrict\n ? this._weekdaysStrictRegex\n : this._weekdaysRegex;\n }\n}\n\nfunction weekdaysShortRegex(isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n if (isStrict) {\n return this._weekdaysShortStrictRegex;\n } else {\n return this._weekdaysShortRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysShortRegex')) {\n this._weekdaysShortRegex = defaultWeekdaysShortRegex;\n }\n return this._weekdaysShortStrictRegex && isStrict\n ? this._weekdaysShortStrictRegex\n : this._weekdaysShortRegex;\n }\n}\n\nfunction weekdaysMinRegex(isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n if (isStrict) {\n return this._weekdaysMinStrictRegex;\n } else {\n return this._weekdaysMinRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysMinRegex')) {\n this._weekdaysMinRegex = defaultWeekdaysMinRegex;\n }\n return this._weekdaysMinStrictRegex && isStrict\n ? this._weekdaysMinStrictRegex\n : this._weekdaysMinRegex;\n }\n}\n\nfunction computeWeekdaysParse() {\n function cmpLenRev(a, b) {\n return b.length - a.length;\n }\n\n var minPieces = [],\n shortPieces = [],\n longPieces = [],\n mixedPieces = [],\n i,\n mom,\n minp,\n shortp,\n longp;\n for (i = 0; i < 7; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, 1]).day(i);\n minp = regexEscape(this.weekdaysMin(mom, ''));\n shortp = regexEscape(this.weekdaysShort(mom, ''));\n longp = regexEscape(this.weekdays(mom, ''));\n minPieces.push(minp);\n shortPieces.push(shortp);\n longPieces.push(longp);\n mixedPieces.push(minp);\n mixedPieces.push(shortp);\n mixedPieces.push(longp);\n }\n // Sorting makes sure if one weekday (or abbr) is a prefix of another it\n // will match the longer piece.\n minPieces.sort(cmpLenRev);\n shortPieces.sort(cmpLenRev);\n longPieces.sort(cmpLenRev);\n mixedPieces.sort(cmpLenRev);\n\n this._weekdaysRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n this._weekdaysShortRegex = this._weekdaysRegex;\n this._weekdaysMinRegex = this._weekdaysRegex;\n\n this._weekdaysStrictRegex = new RegExp(\n '^(' + longPieces.join('|') + ')',\n 'i'\n );\n this._weekdaysShortStrictRegex = new RegExp(\n '^(' + shortPieces.join('|') + ')',\n 'i'\n );\n this._weekdaysMinStrictRegex = new RegExp(\n '^(' + minPieces.join('|') + ')',\n 'i'\n );\n}\n\n// FORMATTING\n\nfunction hFormat() {\n return this.hours() % 12 || 12;\n}\n\nfunction kFormat() {\n return this.hours() || 24;\n}\n\naddFormatToken('H', ['HH', 2], 0, 'hour');\naddFormatToken('h', ['hh', 2], 0, hFormat);\naddFormatToken('k', ['kk', 2], 0, kFormat);\n\naddFormatToken('hmm', 0, 0, function () {\n return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2);\n});\n\naddFormatToken('hmmss', 0, 0, function () {\n return (\n '' +\n hFormat.apply(this) +\n zeroFill(this.minutes(), 2) +\n zeroFill(this.seconds(), 2)\n );\n});\n\naddFormatToken('Hmm', 0, 0, function () {\n return '' + this.hours() + zeroFill(this.minutes(), 2);\n});\n\naddFormatToken('Hmmss', 0, 0, function () {\n return (\n '' +\n this.hours() +\n zeroFill(this.minutes(), 2) +\n zeroFill(this.seconds(), 2)\n );\n});\n\nfunction meridiem(token, lowercase) {\n addFormatToken(token, 0, 0, function () {\n return this.localeData().meridiem(\n this.hours(),\n this.minutes(),\n lowercase\n );\n });\n}\n\nmeridiem('a', true);\nmeridiem('A', false);\n\n// ALIASES\n\naddUnitAlias('hour', 'h');\n\n// PRIORITY\naddUnitPriority('hour', 13);\n\n// PARSING\n\nfunction matchMeridiem(isStrict, locale) {\n return locale._meridiemParse;\n}\n\naddRegexToken('a', matchMeridiem);\naddRegexToken('A', matchMeridiem);\naddRegexToken('H', match1to2);\naddRegexToken('h', match1to2);\naddRegexToken('k', match1to2);\naddRegexToken('HH', match1to2, match2);\naddRegexToken('hh', match1to2, match2);\naddRegexToken('kk', match1to2, match2);\n\naddRegexToken('hmm', match3to4);\naddRegexToken('hmmss', match5to6);\naddRegexToken('Hmm', match3to4);\naddRegexToken('Hmmss', match5to6);\n\naddParseToken(['H', 'HH'], HOUR);\naddParseToken(['k', 'kk'], function (input, array, config) {\n var kInput = toInt(input);\n array[HOUR] = kInput === 24 ? 0 : kInput;\n});\naddParseToken(['a', 'A'], function (input, array, config) {\n config._isPm = config._locale.isPM(input);\n config._meridiem = input;\n});\naddParseToken(['h', 'hh'], function (input, array, config) {\n array[HOUR] = toInt(input);\n getParsingFlags(config).bigHour = true;\n});\naddParseToken('hmm', function (input, array, config) {\n var pos = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos));\n array[MINUTE] = toInt(input.substr(pos));\n getParsingFlags(config).bigHour = true;\n});\naddParseToken('hmmss', function (input, array, config) {\n var pos1 = input.length - 4,\n pos2 = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos1));\n array[MINUTE] = toInt(input.substr(pos1, 2));\n array[SECOND] = toInt(input.substr(pos2));\n getParsingFlags(config).bigHour = true;\n});\naddParseToken('Hmm', function (input, array, config) {\n var pos = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos));\n array[MINUTE] = toInt(input.substr(pos));\n});\naddParseToken('Hmmss', function (input, array, config) {\n var pos1 = input.length - 4,\n pos2 = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos1));\n array[MINUTE] = toInt(input.substr(pos1, 2));\n array[SECOND] = toInt(input.substr(pos2));\n});\n\n// LOCALES\n\nfunction localeIsPM(input) {\n // IE8 Quirks Mode & IE7 Standards Mode do not allow accessing strings like arrays\n // Using charAt should be more compatible.\n return (input + '').toLowerCase().charAt(0) === 'p';\n}\n\nvar defaultLocaleMeridiemParse = /[ap]\\.?m?\\.?/i,\n // Setting the hour should keep the time, because the user explicitly\n // specified which hour they want. So trying to maintain the same hour (in\n // a new timezone) makes sense. Adding/subtracting hours does not follow\n // this rule.\n getSetHour = makeGetSet('Hours', true);\n\nfunction localeMeridiem(hours, minutes, isLower) {\n if (hours > 11) {\n return isLower ? 'pm' : 'PM';\n } else {\n return isLower ? 'am' : 'AM';\n }\n}\n\nvar baseConfig = {\n calendar: defaultCalendar,\n longDateFormat: defaultLongDateFormat,\n invalidDate: defaultInvalidDate,\n ordinal: defaultOrdinal,\n dayOfMonthOrdinalParse: defaultDayOfMonthOrdinalParse,\n relativeTime: defaultRelativeTime,\n\n months: defaultLocaleMonths,\n monthsShort: defaultLocaleMonthsShort,\n\n week: defaultLocaleWeek,\n\n weekdays: defaultLocaleWeekdays,\n weekdaysMin: defaultLocaleWeekdaysMin,\n weekdaysShort: defaultLocaleWeekdaysShort,\n\n meridiemParse: defaultLocaleMeridiemParse,\n};\n\n// internal storage for locale config files\nvar locales = {},\n localeFamilies = {},\n globalLocale;\n\nfunction commonPrefix(arr1, arr2) {\n var i,\n minl = Math.min(arr1.length, arr2.length);\n for (i = 0; i < minl; i += 1) {\n if (arr1[i] !== arr2[i]) {\n return i;\n }\n }\n return minl;\n}\n\nfunction normalizeLocale(key) {\n return key ? key.toLowerCase().replace('_', '-') : key;\n}\n\n// pick the locale from the array\n// try ['en-au', 'en-gb'] as 'en-au', 'en-gb', 'en', as in move through the list trying each\n// substring from most specific to least, but move to the next array item if it's a more specific variant than the current root\nfunction chooseLocale(names) {\n var i = 0,\n j,\n next,\n locale,\n split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (\n next &&\n next.length >= j &&\n commonPrefix(split, next) >= j - 1\n ) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return globalLocale;\n}\n\nfunction isLocaleNameSane(name) {\n // Prevent names that look like filesystem paths, i.e contain '/' or '\\'\n return name.match('^[^/\\\\\\\\]*$') != null;\n}\n\nfunction loadLocale(name) {\n var oldLocale = null,\n aliasedRequire;\n // TODO: Find a better way to register and load all the locales in Node\n if (\n locales[name] === undefined &&\n typeof module !== 'undefined' &&\n module &&\n module.exports &&\n isLocaleNameSane(name)\n ) {\n try {\n oldLocale = globalLocale._abbr;\n aliasedRequire = require;\n aliasedRequire('./locale/' + name);\n getSetGlobalLocale(oldLocale);\n } catch (e) {\n // mark as not found to avoid repeating expensive file require call causing high CPU\n // when trying to find en-US, en_US, en-us for every format call\n locales[name] = null; // null means not found\n }\n }\n return locales[name];\n}\n\n// This function will load locale and then set the global locale. If\n// no arguments are passed in, it will simply return the current global\n// locale key.\nfunction getSetGlobalLocale(key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n } else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n } else {\n if (typeof console !== 'undefined' && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn(\n 'Locale ' + key + ' not found. Did you forget to load it?'\n );\n }\n }\n }\n\n return globalLocale._abbr;\n}\n\nfunction defineLocale(name, config) {\n if (config !== null) {\n var locale,\n parentConfig = baseConfig;\n config.abbr = name;\n if (locales[name] != null) {\n deprecateSimple(\n 'defineLocaleOverride',\n 'use moment.updateLocale(localeName, config) to change ' +\n 'an existing locale. moment.defineLocale(localeName, ' +\n 'config) should only be used for creating a new locale ' +\n 'See http://momentjs.com/guides/#/warnings/define-locale/ for more info.'\n );\n parentConfig = locales[name]._config;\n } else if (config.parentLocale != null) {\n if (locales[config.parentLocale] != null) {\n parentConfig = locales[config.parentLocale]._config;\n } else {\n locale = loadLocale(config.parentLocale);\n if (locale != null) {\n parentConfig = locale._config;\n } else {\n if (!localeFamilies[config.parentLocale]) {\n localeFamilies[config.parentLocale] = [];\n }\n localeFamilies[config.parentLocale].push({\n name: name,\n config: config,\n });\n return null;\n }\n }\n }\n locales[name] = new Locale(mergeConfigs(parentConfig, config));\n\n if (localeFamilies[name]) {\n localeFamilies[name].forEach(function (x) {\n defineLocale(x.name, x.config);\n });\n }\n\n // backwards compat for now: also set the locale\n // make sure we set the locale AFTER all child locales have been\n // created, so we won't end up with the child locale set.\n getSetGlobalLocale(name);\n\n return locales[name];\n } else {\n // useful for testing\n delete locales[name];\n return null;\n }\n}\n\nfunction updateLocale(name, config) {\n if (config != null) {\n var locale,\n tmpLocale,\n parentConfig = baseConfig;\n\n if (locales[name] != null && locales[name].parentLocale != null) {\n // Update existing child locale in-place to avoid memory-leaks\n locales[name].set(mergeConfigs(locales[name]._config, config));\n } else {\n // MERGE\n tmpLocale = loadLocale(name);\n if (tmpLocale != null) {\n parentConfig = tmpLocale._config;\n }\n config = mergeConfigs(parentConfig, config);\n if (tmpLocale == null) {\n // updateLocale is called for creating a new locale\n // Set abbr so it will have a name (getters return\n // undefined otherwise).\n config.abbr = name;\n }\n locale = new Locale(config);\n locale.parentLocale = locales[name];\n locales[name] = locale;\n }\n\n // backwards compat for now: also set the locale\n getSetGlobalLocale(name);\n } else {\n // pass null for config to unupdate, useful for tests\n if (locales[name] != null) {\n if (locales[name].parentLocale != null) {\n locales[name] = locales[name].parentLocale;\n if (name === getSetGlobalLocale()) {\n getSetGlobalLocale(name);\n }\n } else if (locales[name] != null) {\n delete locales[name];\n }\n }\n }\n return locales[name];\n}\n\n// returns locale data\nfunction getLocale(key) {\n var locale;\n\n if (key && key._locale && key._locale._abbr) {\n key = key._locale._abbr;\n }\n\n if (!key) {\n return globalLocale;\n }\n\n if (!isArray(key)) {\n //short-circuit everything else\n locale = loadLocale(key);\n if (locale) {\n return locale;\n }\n key = [key];\n }\n\n return chooseLocale(key);\n}\n\nfunction listLocales() {\n return keys(locales);\n}\n\nfunction checkOverflow(m) {\n var overflow,\n a = m._a;\n\n if (a && getParsingFlags(m).overflow === -2) {\n overflow =\n a[MONTH] < 0 || a[MONTH] > 11\n ? MONTH\n : a[DATE] < 1 || a[DATE] > daysInMonth(a[YEAR], a[MONTH])\n ? DATE\n : a[HOUR] < 0 ||\n a[HOUR] > 24 ||\n (a[HOUR] === 24 &&\n (a[MINUTE] !== 0 ||\n a[SECOND] !== 0 ||\n a[MILLISECOND] !== 0))\n ? HOUR\n : a[MINUTE] < 0 || a[MINUTE] > 59\n ? MINUTE\n : a[SECOND] < 0 || a[SECOND] > 59\n ? SECOND\n : a[MILLISECOND] < 0 || a[MILLISECOND] > 999\n ? MILLISECOND\n : -1;\n\n if (\n getParsingFlags(m)._overflowDayOfYear &&\n (overflow < YEAR || overflow > DATE)\n ) {\n overflow = DATE;\n }\n if (getParsingFlags(m)._overflowWeeks && overflow === -1) {\n overflow = WEEK;\n }\n if (getParsingFlags(m)._overflowWeekday && overflow === -1) {\n overflow = WEEKDAY;\n }\n\n getParsingFlags(m).overflow = overflow;\n }\n\n return m;\n}\n\n// iso 8601 regex\n// 0000-00-00 0000-W00 or 0000-W00-0 + T + 00 or 00:00 or 00:00:00 or 00:00:00.000 + +00:00 or +0000 or +00)\nvar extendedIsoRegex =\n /^\\s*((?:[+-]\\d{6}|\\d{4})-(?:\\d\\d-\\d\\d|W\\d\\d-\\d|W\\d\\d|\\d\\d\\d|\\d\\d))(?:(T| )(\\d\\d(?::\\d\\d(?::\\d\\d(?:[.,]\\d+)?)?)?)([+-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?$/,\n basicIsoRegex =\n /^\\s*((?:[+-]\\d{6}|\\d{4})(?:\\d\\d\\d\\d|W\\d\\d\\d|W\\d\\d|\\d\\d\\d|\\d\\d|))(?:(T| )(\\d\\d(?:\\d\\d(?:\\d\\d(?:[.,]\\d+)?)?)?)([+-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?$/,\n tzRegex = /Z|[+-]\\d\\d(?::?\\d\\d)?/,\n isoDates = [\n ['YYYYYY-MM-DD', /[+-]\\d{6}-\\d\\d-\\d\\d/],\n ['YYYY-MM-DD', /\\d{4}-\\d\\d-\\d\\d/],\n ['GGGG-[W]WW-E', /\\d{4}-W\\d\\d-\\d/],\n ['GGGG-[W]WW', /\\d{4}-W\\d\\d/, false],\n ['YYYY-DDD', /\\d{4}-\\d{3}/],\n ['YYYY-MM', /\\d{4}-\\d\\d/, false],\n ['YYYYYYMMDD', /[+-]\\d{10}/],\n ['YYYYMMDD', /\\d{8}/],\n ['GGGG[W]WWE', /\\d{4}W\\d{3}/],\n ['GGGG[W]WW', /\\d{4}W\\d{2}/, false],\n ['YYYYDDD', /\\d{7}/],\n ['YYYYMM', /\\d{6}/, false],\n ['YYYY', /\\d{4}/, false],\n ],\n // iso time formats and regexes\n isoTimes = [\n ['HH:mm:ss.SSSS', /\\d\\d:\\d\\d:\\d\\d\\.\\d+/],\n ['HH:mm:ss,SSSS', /\\d\\d:\\d\\d:\\d\\d,\\d+/],\n ['HH:mm:ss', /\\d\\d:\\d\\d:\\d\\d/],\n ['HH:mm', /\\d\\d:\\d\\d/],\n ['HHmmss.SSSS', /\\d\\d\\d\\d\\d\\d\\.\\d+/],\n ['HHmmss,SSSS', /\\d\\d\\d\\d\\d\\d,\\d+/],\n ['HHmmss', /\\d\\d\\d\\d\\d\\d/],\n ['HHmm', /\\d\\d\\d\\d/],\n ['HH', /\\d\\d/],\n ],\n aspNetJsonRegex = /^\\/?Date\\((-?\\d+)/i,\n // RFC 2822 regex: For details see https://tools.ietf.org/html/rfc2822#section-3.3\n rfc2822 =\n /^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\\s)?(\\d{1,2})\\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\\s(\\d{2,4})\\s(\\d\\d):(\\d\\d)(?::(\\d\\d))?\\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\\d{4}))$/,\n obsOffsets = {\n UT: 0,\n GMT: 0,\n EDT: -4 * 60,\n EST: -5 * 60,\n CDT: -5 * 60,\n CST: -6 * 60,\n MDT: -6 * 60,\n MST: -7 * 60,\n PDT: -7 * 60,\n PST: -8 * 60,\n };\n\n// date from iso format\nfunction configFromISO(config) {\n var i,\n l,\n string = config._i,\n match = extendedIsoRegex.exec(string) || basicIsoRegex.exec(string),\n allowTime,\n dateFormat,\n timeFormat,\n tzFormat,\n isoDatesLen = isoDates.length,\n isoTimesLen = isoTimes.length;\n\n if (match) {\n getParsingFlags(config).iso = true;\n for (i = 0, l = isoDatesLen; i < l; i++) {\n if (isoDates[i][1].exec(match[1])) {\n dateFormat = isoDates[i][0];\n allowTime = isoDates[i][2] !== false;\n break;\n }\n }\n if (dateFormat == null) {\n config._isValid = false;\n return;\n }\n if (match[3]) {\n for (i = 0, l = isoTimesLen; i < l; i++) {\n if (isoTimes[i][1].exec(match[3])) {\n // match[2] should be 'T' or space\n timeFormat = (match[2] || ' ') + isoTimes[i][0];\n break;\n }\n }\n if (timeFormat == null) {\n config._isValid = false;\n return;\n }\n }\n if (!allowTime && timeFormat != null) {\n config._isValid = false;\n return;\n }\n if (match[4]) {\n if (tzRegex.exec(match[4])) {\n tzFormat = 'Z';\n } else {\n config._isValid = false;\n return;\n }\n }\n config._f = dateFormat + (timeFormat || '') + (tzFormat || '');\n configFromStringAndFormat(config);\n } else {\n config._isValid = false;\n }\n}\n\nfunction extractFromRFC2822Strings(\n yearStr,\n monthStr,\n dayStr,\n hourStr,\n minuteStr,\n secondStr\n) {\n var result = [\n untruncateYear(yearStr),\n defaultLocaleMonthsShort.indexOf(monthStr),\n parseInt(dayStr, 10),\n parseInt(hourStr, 10),\n parseInt(minuteStr, 10),\n ];\n\n if (secondStr) {\n result.push(parseInt(secondStr, 10));\n }\n\n return result;\n}\n\nfunction untruncateYear(yearStr) {\n var year = parseInt(yearStr, 10);\n if (year <= 49) {\n return 2000 + year;\n } else if (year <= 999) {\n return 1900 + year;\n }\n return year;\n}\n\nfunction preprocessRFC2822(s) {\n // Remove comments and folding whitespace and replace multiple-spaces with a single space\n return s\n .replace(/\\([^()]*\\)|[\\n\\t]/g, ' ')\n .replace(/(\\s\\s+)/g, ' ')\n .replace(/^\\s\\s*/, '')\n .replace(/\\s\\s*$/, '');\n}\n\nfunction checkWeekday(weekdayStr, parsedInput, config) {\n if (weekdayStr) {\n // TODO: Replace the vanilla JS Date object with an independent day-of-week check.\n var weekdayProvided = defaultLocaleWeekdaysShort.indexOf(weekdayStr),\n weekdayActual = new Date(\n parsedInput[0],\n parsedInput[1],\n parsedInput[2]\n ).getDay();\n if (weekdayProvided !== weekdayActual) {\n getParsingFlags(config).weekdayMismatch = true;\n config._isValid = false;\n return false;\n }\n }\n return true;\n}\n\nfunction calculateOffset(obsOffset, militaryOffset, numOffset) {\n if (obsOffset) {\n return obsOffsets[obsOffset];\n } else if (militaryOffset) {\n // the only allowed military tz is Z\n return 0;\n } else {\n var hm = parseInt(numOffset, 10),\n m = hm % 100,\n h = (hm - m) / 100;\n return h * 60 + m;\n }\n}\n\n// date and time from ref 2822 format\nfunction configFromRFC2822(config) {\n var match = rfc2822.exec(preprocessRFC2822(config._i)),\n parsedArray;\n if (match) {\n parsedArray = extractFromRFC2822Strings(\n match[4],\n match[3],\n match[2],\n match[5],\n match[6],\n match[7]\n );\n if (!checkWeekday(match[1], parsedArray, config)) {\n return;\n }\n\n config._a = parsedArray;\n config._tzm = calculateOffset(match[8], match[9], match[10]);\n\n config._d = createUTCDate.apply(null, config._a);\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n\n getParsingFlags(config).rfc2822 = true;\n } else {\n config._isValid = false;\n }\n}\n\n// date from 1) ASP.NET, 2) ISO, 3) RFC 2822 formats, or 4) optional fallback if parsing isn't strict\nfunction configFromString(config) {\n var matched = aspNetJsonRegex.exec(config._i);\n if (matched !== null) {\n config._d = new Date(+matched[1]);\n return;\n }\n\n configFromISO(config);\n if (config._isValid === false) {\n delete config._isValid;\n } else {\n return;\n }\n\n configFromRFC2822(config);\n if (config._isValid === false) {\n delete config._isValid;\n } else {\n return;\n }\n\n if (config._strict) {\n config._isValid = false;\n } else {\n // Final attempt, use Input Fallback\n hooks.createFromInputFallback(config);\n }\n}\n\nhooks.createFromInputFallback = deprecate(\n 'value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), ' +\n 'which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are ' +\n 'discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.',\n function (config) {\n config._d = new Date(config._i + (config._useUTC ? ' UTC' : ''));\n }\n);\n\n// Pick the first defined of two or three arguments.\nfunction defaults(a, b, c) {\n if (a != null) {\n return a;\n }\n if (b != null) {\n return b;\n }\n return c;\n}\n\nfunction currentDateArray(config) {\n // hooks is actually the exported moment object\n var nowValue = new Date(hooks.now());\n if (config._useUTC) {\n return [\n nowValue.getUTCFullYear(),\n nowValue.getUTCMonth(),\n nowValue.getUTCDate(),\n ];\n }\n return [nowValue.getFullYear(), nowValue.getMonth(), nowValue.getDate()];\n}\n\n// convert an array to a date.\n// the array should mirror the parameters below\n// note: all values past the year are optional and will default to the lowest possible value.\n// [year, month, day , hour, minute, second, millisecond]\nfunction configFromArray(config) {\n var i,\n date,\n input = [],\n currentDate,\n expectedWeekday,\n yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config);\n\n //compute day of the year from weeks and weekdays\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n }\n\n //if the day of the year is set, figure out what it is\n if (config._dayOfYear != null) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (\n config._dayOfYear > daysInYear(yearToUse) ||\n config._dayOfYear === 0\n ) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n }\n\n // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n }\n\n // Zero out whatever was not defaulted, including time\n for (; i < 7; i++) {\n config._a[i] = input[i] =\n config._a[i] == null ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // Check for 24:00:00.000\n if (\n config._a[HOUR] === 24 &&\n config._a[MINUTE] === 0 &&\n config._a[SECOND] === 0 &&\n config._a[MILLISECOND] === 0\n ) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(\n null,\n input\n );\n expectedWeekday = config._useUTC\n ? config._d.getUTCDay()\n : config._d.getDay();\n\n // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n }\n\n // check for mismatching day of week\n if (\n config._w &&\n typeof config._w.d !== 'undefined' &&\n config._w.d !== expectedWeekday\n ) {\n getParsingFlags(config).weekdayMismatch = true;\n }\n}\n\nfunction dayOfYearFromWeekInfo(config) {\n var w, weekYear, week, weekday, dow, doy, temp, weekdayOverflow, curWeek;\n\n w = config._w;\n if (w.GG != null || w.W != null || w.E != null) {\n dow = 1;\n doy = 4;\n\n // TODO: We need to take the current isoWeekYear, but that depends on\n // how we interpret now (local, utc, fixed offset). So create\n // a now version of current config (take local/utc/offset flags, and\n // create now).\n weekYear = defaults(\n w.GG,\n config._a[YEAR],\n weekOfYear(createLocal(), 1, 4).year\n );\n week = defaults(w.W, 1);\n weekday = defaults(w.E, 1);\n if (weekday < 1 || weekday > 7) {\n weekdayOverflow = true;\n }\n } else {\n dow = config._locale._week.dow;\n doy = config._locale._week.doy;\n\n curWeek = weekOfYear(createLocal(), dow, doy);\n\n weekYear = defaults(w.gg, config._a[YEAR], curWeek.year);\n\n // Default to current week.\n week = defaults(w.w, curWeek.week);\n\n if (w.d != null) {\n // weekday -- low day numbers are considered next week\n weekday = w.d;\n if (weekday < 0 || weekday > 6) {\n weekdayOverflow = true;\n }\n } else if (w.e != null) {\n // local weekday -- counting starts from beginning of week\n weekday = w.e + dow;\n if (w.e < 0 || w.e > 6) {\n weekdayOverflow = true;\n }\n } else {\n // default to beginning of week\n weekday = dow;\n }\n }\n if (week < 1 || week > weeksInYear(weekYear, dow, doy)) {\n getParsingFlags(config)._overflowWeeks = true;\n } else if (weekdayOverflow != null) {\n getParsingFlags(config)._overflowWeekday = true;\n } else {\n temp = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy);\n config._a[YEAR] = temp.year;\n config._dayOfYear = temp.dayOfYear;\n }\n}\n\n// constant that refers to the ISO standard\nhooks.ISO_8601 = function () {};\n\n// constant that refers to the RFC 2822 form\nhooks.RFC_2822 = function () {};\n\n// date from string and format string\nfunction configFromStringAndFormat(config) {\n // TODO: Move this to another part of the creation flow to prevent circular deps\n if (config._f === hooks.ISO_8601) {\n configFromISO(config);\n return;\n }\n if (config._f === hooks.RFC_2822) {\n configFromRFC2822(config);\n return;\n }\n config._a = [];\n getParsingFlags(config).empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var string = '' + config._i,\n i,\n parsedInput,\n tokens,\n token,\n skipped,\n stringLength = string.length,\n totalParsedInputLength = 0,\n era,\n tokenLen;\n\n tokens =\n expandFormat(config._f, config._locale).match(formattingTokens) || [];\n tokenLen = tokens.length;\n for (i = 0; i < tokenLen; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) ||\n [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n getParsingFlags(config).unusedInput.push(skipped);\n }\n string = string.slice(\n string.indexOf(parsedInput) + parsedInput.length\n );\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n getParsingFlags(config).empty = false;\n } else {\n getParsingFlags(config).unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n } else if (config._strict && !parsedInput) {\n getParsingFlags(config).unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n getParsingFlags(config).charsLeftOver =\n stringLength - totalParsedInputLength;\n if (string.length > 0) {\n getParsingFlags(config).unusedInput.push(string);\n }\n\n // clear _12h flag if hour is <= 12\n if (\n config._a[HOUR] <= 12 &&\n getParsingFlags(config).bigHour === true &&\n config._a[HOUR] > 0\n ) {\n getParsingFlags(config).bigHour = undefined;\n }\n\n getParsingFlags(config).parsedDateParts = config._a.slice(0);\n getParsingFlags(config).meridiem = config._meridiem;\n // handle meridiem\n config._a[HOUR] = meridiemFixWrap(\n config._locale,\n config._a[HOUR],\n config._meridiem\n );\n\n // handle era\n era = getParsingFlags(config).era;\n if (era !== null) {\n config._a[YEAR] = config._locale.erasConvertYear(era, config._a[YEAR]);\n }\n\n configFromArray(config);\n checkOverflow(config);\n}\n\nfunction meridiemFixWrap(locale, hour, meridiem) {\n var isPm;\n\n if (meridiem == null) {\n // nothing to do\n return hour;\n }\n if (locale.meridiemHour != null) {\n return locale.meridiemHour(hour, meridiem);\n } else if (locale.isPM != null) {\n // Fallback\n isPm = locale.isPM(meridiem);\n if (isPm && hour < 12) {\n hour += 12;\n }\n if (!isPm && hour === 12) {\n hour = 0;\n }\n return hour;\n } else {\n // this is not supposed to happen\n return hour;\n }\n}\n\n// date from string and array of format strings\nfunction configFromStringAndArray(config) {\n var tempConfig,\n bestMoment,\n scoreToBeat,\n i,\n currentScore,\n validFormatFound,\n bestFormatIsValid = false,\n configfLen = config._f.length;\n\n if (configfLen === 0) {\n getParsingFlags(config).invalidFormat = true;\n config._d = new Date(NaN);\n return;\n }\n\n for (i = 0; i < configfLen; i++) {\n currentScore = 0;\n validFormatFound = false;\n tempConfig = copyConfig({}, config);\n if (config._useUTC != null) {\n tempConfig._useUTC = config._useUTC;\n }\n tempConfig._f = config._f[i];\n configFromStringAndFormat(tempConfig);\n\n if (isValid(tempConfig)) {\n validFormatFound = true;\n }\n\n // if there is any input that was not parsed add a penalty for that format\n currentScore += getParsingFlags(tempConfig).charsLeftOver;\n\n //or tokens\n currentScore += getParsingFlags(tempConfig).unusedTokens.length * 10;\n\n getParsingFlags(tempConfig).score = currentScore;\n\n if (!bestFormatIsValid) {\n if (\n scoreToBeat == null ||\n currentScore < scoreToBeat ||\n validFormatFound\n ) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n if (validFormatFound) {\n bestFormatIsValid = true;\n }\n }\n } else {\n if (currentScore < scoreToBeat) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n }\n }\n }\n\n extend(config, bestMoment || tempConfig);\n}\n\nfunction configFromObject(config) {\n if (config._d) {\n return;\n }\n\n var i = normalizeObjectUnits(config._i),\n dayOrDate = i.day === undefined ? i.date : i.day;\n config._a = map(\n [i.year, i.month, dayOrDate, i.hour, i.minute, i.second, i.millisecond],\n function (obj) {\n return obj && parseInt(obj, 10);\n }\n );\n\n configFromArray(config);\n}\n\nfunction createFromConfig(config) {\n var res = new Moment(checkOverflow(prepareConfig(config)));\n if (res._nextDay) {\n // Adding is smart enough around DST\n res.add(1, 'd');\n res._nextDay = undefined;\n }\n\n return res;\n}\n\nfunction prepareConfig(config) {\n var input = config._i,\n format = config._f;\n\n config._locale = config._locale || getLocale(config._l);\n\n if (input === null || (format === undefined && input === '')) {\n return createInvalid({ nullInput: true });\n }\n\n if (typeof input === 'string') {\n config._i = input = config._locale.preparse(input);\n }\n\n if (isMoment(input)) {\n return new Moment(checkOverflow(input));\n } else if (isDate(input)) {\n config._d = input;\n } else if (isArray(format)) {\n configFromStringAndArray(config);\n } else if (format) {\n configFromStringAndFormat(config);\n } else {\n configFromInput(config);\n }\n\n if (!isValid(config)) {\n config._d = null;\n }\n\n return config;\n}\n\nfunction configFromInput(config) {\n var input = config._i;\n if (isUndefined(input)) {\n config._d = new Date(hooks.now());\n } else if (isDate(input)) {\n config._d = new Date(input.valueOf());\n } else if (typeof input === 'string') {\n configFromString(config);\n } else if (isArray(input)) {\n config._a = map(input.slice(0), function (obj) {\n return parseInt(obj, 10);\n });\n configFromArray(config);\n } else if (isObject(input)) {\n configFromObject(config);\n } else if (isNumber(input)) {\n // from milliseconds\n config._d = new Date(input);\n } else {\n hooks.createFromInputFallback(config);\n }\n}\n\nfunction createLocalOrUTC(input, format, locale, strict, isUTC) {\n var c = {};\n\n if (format === true || format === false) {\n strict = format;\n format = undefined;\n }\n\n if (locale === true || locale === false) {\n strict = locale;\n locale = undefined;\n }\n\n if (\n (isObject(input) && isObjectEmpty(input)) ||\n (isArray(input) && input.length === 0)\n ) {\n input = undefined;\n }\n // object construction must be done this way.\n // https://github.com/moment/moment/issues/1423\n c._isAMomentObject = true;\n c._useUTC = c._isUTC = isUTC;\n c._l = locale;\n c._i = input;\n c._f = format;\n c._strict = strict;\n\n return createFromConfig(c);\n}\n\nfunction createLocal(input, format, locale, strict) {\n return createLocalOrUTC(input, format, locale, strict, false);\n}\n\nvar prototypeMin = deprecate(\n 'moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/',\n function () {\n var other = createLocal.apply(null, arguments);\n if (this.isValid() && other.isValid()) {\n return other < this ? this : other;\n } else {\n return createInvalid();\n }\n }\n ),\n prototypeMax = deprecate(\n 'moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/',\n function () {\n var other = createLocal.apply(null, arguments);\n if (this.isValid() && other.isValid()) {\n return other > this ? this : other;\n } else {\n return createInvalid();\n }\n }\n );\n\n// Pick a moment m from moments so that m[fn](other) is true for all\n// other. This relies on the function fn to be transitive.\n//\n// moments should either be an array of moment objects or an array, whose\n// first element is an array of moment objects.\nfunction pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return createLocal();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (!moments[i].isValid() || moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n}\n\n// TODO: Use [].sort instead?\nfunction min() {\n var args = [].slice.call(arguments, 0);\n\n return pickBy('isBefore', args);\n}\n\nfunction max() {\n var args = [].slice.call(arguments, 0);\n\n return pickBy('isAfter', args);\n}\n\nvar now = function () {\n return Date.now ? Date.now() : +new Date();\n};\n\nvar ordering = [\n 'year',\n 'quarter',\n 'month',\n 'week',\n 'day',\n 'hour',\n 'minute',\n 'second',\n 'millisecond',\n];\n\nfunction isDurationValid(m) {\n var key,\n unitHasDecimal = false,\n i,\n orderLen = ordering.length;\n for (key in m) {\n if (\n hasOwnProp(m, key) &&\n !(\n indexOf.call(ordering, key) !== -1 &&\n (m[key] == null || !isNaN(m[key]))\n )\n ) {\n return false;\n }\n }\n\n for (i = 0; i < orderLen; ++i) {\n if (m[ordering[i]]) {\n if (unitHasDecimal) {\n return false; // only allow non-integers for smallest unit\n }\n if (parseFloat(m[ordering[i]]) !== toInt(m[ordering[i]])) {\n unitHasDecimal = true;\n }\n }\n }\n\n return true;\n}\n\nfunction isValid$1() {\n return this._isValid;\n}\n\nfunction createInvalid$1() {\n return createDuration(NaN);\n}\n\nfunction Duration(duration) {\n var normalizedInput = normalizeObjectUnits(duration),\n years = normalizedInput.year || 0,\n quarters = normalizedInput.quarter || 0,\n months = normalizedInput.month || 0,\n weeks = normalizedInput.week || normalizedInput.isoWeek || 0,\n days = normalizedInput.day || 0,\n hours = normalizedInput.hour || 0,\n minutes = normalizedInput.minute || 0,\n seconds = normalizedInput.second || 0,\n milliseconds = normalizedInput.millisecond || 0;\n\n this._isValid = isDurationValid(normalizedInput);\n\n // representation for dateAddRemove\n this._milliseconds =\n +milliseconds +\n seconds * 1e3 + // 1000\n minutes * 6e4 + // 1000 * 60\n hours * 1000 * 60 * 60; //using 1000 * 60 * 60 instead of 36e5 to avoid floating point rounding errors https://github.com/moment/moment/issues/2978\n // Because of dateAddRemove treats 24 hours as different from a\n // day when working around DST, we need to store them separately\n this._days = +days + weeks * 7;\n // It is impossible to translate months into days without knowing\n // which months you are are talking about, so we have to store\n // it separately.\n this._months = +months + quarters * 3 + years * 12;\n\n this._data = {};\n\n this._locale = getLocale();\n\n this._bubble();\n}\n\nfunction isDuration(obj) {\n return obj instanceof Duration;\n}\n\nfunction absRound(number) {\n if (number < 0) {\n return Math.round(-1 * number) * -1;\n } else {\n return Math.round(number);\n }\n}\n\n// compare two arrays, return the number of differences\nfunction compareArrays(array1, array2, dontConvert) {\n var len = Math.min(array1.length, array2.length),\n lengthDiff = Math.abs(array1.length - array2.length),\n diffs = 0,\n i;\n for (i = 0; i < len; i++) {\n if (\n (dontConvert && array1[i] !== array2[i]) ||\n (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))\n ) {\n diffs++;\n }\n }\n return diffs + lengthDiff;\n}\n\n// FORMATTING\n\nfunction offset(token, separator) {\n addFormatToken(token, 0, 0, function () {\n var offset = this.utcOffset(),\n sign = '+';\n if (offset < 0) {\n offset = -offset;\n sign = '-';\n }\n return (\n sign +\n zeroFill(~~(offset / 60), 2) +\n separator +\n zeroFill(~~offset % 60, 2)\n );\n });\n}\n\noffset('Z', ':');\noffset('ZZ', '');\n\n// PARSING\n\naddRegexToken('Z', matchShortOffset);\naddRegexToken('ZZ', matchShortOffset);\naddParseToken(['Z', 'ZZ'], function (input, array, config) {\n config._useUTC = true;\n config._tzm = offsetFromString(matchShortOffset, input);\n});\n\n// HELPERS\n\n// timezone chunker\n// '+10:00' > ['10', '00']\n// '-1530' > ['-15', '30']\nvar chunkOffset = /([\\+\\-]|\\d\\d)/gi;\n\nfunction offsetFromString(matcher, string) {\n var matches = (string || '').match(matcher),\n chunk,\n parts,\n minutes;\n\n if (matches === null) {\n return null;\n }\n\n chunk = matches[matches.length - 1] || [];\n parts = (chunk + '').match(chunkOffset) || ['-', 0, 0];\n minutes = +(parts[1] * 60) + toInt(parts[2]);\n\n return minutes === 0 ? 0 : parts[0] === '+' ? minutes : -minutes;\n}\n\n// Return a moment from input, that is local/utc/zone equivalent to model.\nfunction cloneWithOffset(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff =\n (isMoment(input) || isDate(input)\n ? input.valueOf()\n : createLocal(input).valueOf()) - res.valueOf();\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(res._d.valueOf() + diff);\n hooks.updateOffset(res, false);\n return res;\n } else {\n return createLocal(input).local();\n }\n}\n\nfunction getDateOffset(m) {\n // On Firefox.24 Date#getTimezoneOffset returns a floating point.\n // https://github.com/moment/moment/pull/1871\n return -Math.round(m._d.getTimezoneOffset());\n}\n\n// HOOKS\n\n// This function will be called whenever a moment is mutated.\n// It is intended to keep the offset in sync with the timezone.\nhooks.updateOffset = function () {};\n\n// MOMENTS\n\n// keepLocalTime = true means only change the timezone, without\n// affecting the local hour. So 5:31:26 +0300 --[utcOffset(2, true)]-->\n// 5:31:26 +0200 It is possible that 5:31:26 doesn't exist with offset\n// +0200, so we adjust the time as needed, to be valid.\n//\n// Keeping the time actually adds/subtracts (one hour)\n// from the actual represented time. That is why we call updateOffset\n// a second time. In case it wants us to change the offset again\n// _changeInProgress == true case, then we have to adjust, because\n// there is no such time in the given timezone.\nfunction getSetOffset(input, keepLocalTime, keepMinutes) {\n var offset = this._offset || 0,\n localAdjust;\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(matchShortOffset, input);\n if (input === null) {\n return this;\n }\n } else if (Math.abs(input) < 16 && !keepMinutes) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n addSubtract(\n this,\n createDuration(input - offset, 'm'),\n 1,\n false\n );\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n}\n\nfunction getSetZone(input, keepLocalTime) {\n if (input != null) {\n if (typeof input !== 'string') {\n input = -input;\n }\n\n this.utcOffset(input, keepLocalTime);\n\n return this;\n } else {\n return -this.utcOffset();\n }\n}\n\nfunction setOffsetToUTC(keepLocalTime) {\n return this.utcOffset(0, keepLocalTime);\n}\n\nfunction setOffsetToLocal(keepLocalTime) {\n if (this._isUTC) {\n this.utcOffset(0, keepLocalTime);\n this._isUTC = false;\n\n if (keepLocalTime) {\n this.subtract(getDateOffset(this), 'm');\n }\n }\n return this;\n}\n\nfunction setOffsetToParsedOffset() {\n if (this._tzm != null) {\n this.utcOffset(this._tzm, false, true);\n } else if (typeof this._i === 'string') {\n var tZone = offsetFromString(matchOffset, this._i);\n if (tZone != null) {\n this.utcOffset(tZone);\n } else {\n this.utcOffset(0, true);\n }\n }\n return this;\n}\n\nfunction hasAlignedHourOffset(input) {\n if (!this.isValid()) {\n return false;\n }\n input = input ? createLocal(input).utcOffset() : 0;\n\n return (this.utcOffset() - input) % 60 === 0;\n}\n\nfunction isDaylightSavingTime() {\n return (\n this.utcOffset() > this.clone().month(0).utcOffset() ||\n this.utcOffset() > this.clone().month(5).utcOffset()\n );\n}\n\nfunction isDaylightSavingTimeShifted() {\n if (!isUndefined(this._isDSTShifted)) {\n return this._isDSTShifted;\n }\n\n var c = {},\n other;\n\n copyConfig(c, this);\n c = prepareConfig(c);\n\n if (c._a) {\n other = c._isUTC ? createUTC(c._a) : createLocal(c._a);\n this._isDSTShifted =\n this.isValid() && compareArrays(c._a, other.toArray()) > 0;\n } else {\n this._isDSTShifted = false;\n }\n\n return this._isDSTShifted;\n}\n\nfunction isLocal() {\n return this.isValid() ? !this._isUTC : false;\n}\n\nfunction isUtcOffset() {\n return this.isValid() ? this._isUTC : false;\n}\n\nfunction isUtc() {\n return this.isValid() ? this._isUTC && this._offset === 0 : false;\n}\n\n// ASP.NET json date format regex\nvar aspNetRegex = /^(-|\\+)?(?:(\\d*)[. ])?(\\d+):(\\d+)(?::(\\d+)(\\.\\d*)?)?$/,\n // from http://docs.closure-library.googlecode.com/git/closure_goog_date_date.js.source.html\n // somewhat more in line with 4.4.3.2 2004 spec, but allows decimal anywhere\n // and further modified to allow for strings containing both week and day\n isoRegex =\n /^(-|\\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;\n\nfunction createDuration(input, key) {\n var duration = input,\n // matching against regexp is expensive, do it on demand\n match = null,\n sign,\n ret,\n diffRes;\n\n if (isDuration(input)) {\n duration = {\n ms: input._milliseconds,\n d: input._days,\n M: input._months,\n };\n } else if (isNumber(input) || !isNaN(+input)) {\n duration = {};\n if (key) {\n duration[key] = +input;\n } else {\n duration.milliseconds = +input;\n }\n } else if ((match = aspNetRegex.exec(input))) {\n sign = match[1] === '-' ? -1 : 1;\n duration = {\n y: 0,\n d: toInt(match[DATE]) * sign,\n h: toInt(match[HOUR]) * sign,\n m: toInt(match[MINUTE]) * sign,\n s: toInt(match[SECOND]) * sign,\n ms: toInt(absRound(match[MILLISECOND] * 1000)) * sign, // the millisecond decimal point is included in the match\n };\n } else if ((match = isoRegex.exec(input))) {\n sign = match[1] === '-' ? -1 : 1;\n duration = {\n y: parseIso(match[2], sign),\n M: parseIso(match[3], sign),\n w: parseIso(match[4], sign),\n d: parseIso(match[5], sign),\n h: parseIso(match[6], sign),\n m: parseIso(match[7], sign),\n s: parseIso(match[8], sign),\n };\n } else if (duration == null) {\n // checks for null or undefined\n duration = {};\n } else if (\n typeof duration === 'object' &&\n ('from' in duration || 'to' in duration)\n ) {\n diffRes = momentsDifference(\n createLocal(duration.from),\n createLocal(duration.to)\n );\n\n duration = {};\n duration.ms = diffRes.milliseconds;\n duration.M = diffRes.months;\n }\n\n ret = new Duration(duration);\n\n if (isDuration(input) && hasOwnProp(input, '_locale')) {\n ret._locale = input._locale;\n }\n\n if (isDuration(input) && hasOwnProp(input, '_isValid')) {\n ret._isValid = input._isValid;\n }\n\n return ret;\n}\n\ncreateDuration.fn = Duration.prototype;\ncreateDuration.invalid = createInvalid$1;\n\nfunction parseIso(inp, sign) {\n // We'd normally use ~~inp for this, but unfortunately it also\n // converts floats to ints.\n // inp may be undefined, so careful calling replace on it.\n var res = inp && parseFloat(inp.replace(',', '.'));\n // apply sign while we're at it\n return (isNaN(res) ? 0 : res) * sign;\n}\n\nfunction positiveMomentsDifference(base, other) {\n var res = {};\n\n res.months =\n other.month() - base.month() + (other.year() - base.year()) * 12;\n if (base.clone().add(res.months, 'M').isAfter(other)) {\n --res.months;\n }\n\n res.milliseconds = +other - +base.clone().add(res.months, 'M');\n\n return res;\n}\n\nfunction momentsDifference(base, other) {\n var res;\n if (!(base.isValid() && other.isValid())) {\n return { milliseconds: 0, months: 0 };\n }\n\n other = cloneWithOffset(other, base);\n if (base.isBefore(other)) {\n res = positiveMomentsDifference(base, other);\n } else {\n res = positiveMomentsDifference(other, base);\n res.milliseconds = -res.milliseconds;\n res.months = -res.months;\n }\n\n return res;\n}\n\n// TODO: remove 'name' arg after deprecation is removed\nfunction createAdder(direction, name) {\n return function (val, period) {\n var dur, tmp;\n //invert the arguments, but complain about it\n if (period !== null && !isNaN(+period)) {\n deprecateSimple(\n name,\n 'moment().' +\n name +\n '(period, number) is deprecated. Please use moment().' +\n name +\n '(number, period). ' +\n 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.'\n );\n tmp = val;\n val = period;\n period = tmp;\n }\n\n dur = createDuration(val, period);\n addSubtract(this, dur, direction);\n return this;\n };\n}\n\nfunction addSubtract(mom, duration, isAdding, updateOffset) {\n var milliseconds = duration._milliseconds,\n days = absRound(duration._days),\n months = absRound(duration._months);\n\n if (!mom.isValid()) {\n // No op\n return;\n }\n\n updateOffset = updateOffset == null ? true : updateOffset;\n\n if (months) {\n setMonth(mom, get(mom, 'Month') + months * isAdding);\n }\n if (days) {\n set$1(mom, 'Date', get(mom, 'Date') + days * isAdding);\n }\n if (milliseconds) {\n mom._d.setTime(mom._d.valueOf() + milliseconds * isAdding);\n }\n if (updateOffset) {\n hooks.updateOffset(mom, days || months);\n }\n}\n\nvar add = createAdder(1, 'add'),\n subtract = createAdder(-1, 'subtract');\n\nfunction isString(input) {\n return typeof input === 'string' || input instanceof String;\n}\n\n// type MomentInput = Moment | Date | string | number | (number | string)[] | MomentInputObject | void; // null | undefined\nfunction isMomentInput(input) {\n return (\n isMoment(input) ||\n isDate(input) ||\n isString(input) ||\n isNumber(input) ||\n isNumberOrStringArray(input) ||\n isMomentInputObject(input) ||\n input === null ||\n input === undefined\n );\n}\n\nfunction isMomentInputObject(input) {\n var objectTest = isObject(input) && !isObjectEmpty(input),\n propertyTest = false,\n properties = [\n 'years',\n 'year',\n 'y',\n 'months',\n 'month',\n 'M',\n 'days',\n 'day',\n 'd',\n 'dates',\n 'date',\n 'D',\n 'hours',\n 'hour',\n 'h',\n 'minutes',\n 'minute',\n 'm',\n 'seconds',\n 'second',\n 's',\n 'milliseconds',\n 'millisecond',\n 'ms',\n ],\n i,\n property,\n propertyLen = properties.length;\n\n for (i = 0; i < propertyLen; i += 1) {\n property = properties[i];\n propertyTest = propertyTest || hasOwnProp(input, property);\n }\n\n return objectTest && propertyTest;\n}\n\nfunction isNumberOrStringArray(input) {\n var arrayTest = isArray(input),\n dataTypeTest = false;\n if (arrayTest) {\n dataTypeTest =\n input.filter(function (item) {\n return !isNumber(item) && isString(input);\n }).length === 0;\n }\n return arrayTest && dataTypeTest;\n}\n\nfunction isCalendarSpec(input) {\n var objectTest = isObject(input) && !isObjectEmpty(input),\n propertyTest = false,\n properties = [\n 'sameDay',\n 'nextDay',\n 'lastDay',\n 'nextWeek',\n 'lastWeek',\n 'sameElse',\n ],\n i,\n property;\n\n for (i = 0; i < properties.length; i += 1) {\n property = properties[i];\n propertyTest = propertyTest || hasOwnProp(input, property);\n }\n\n return objectTest && propertyTest;\n}\n\nfunction getCalendarFormat(myMoment, now) {\n var diff = myMoment.diff(now, 'days', true);\n return diff < -6\n ? 'sameElse'\n : diff < -1\n ? 'lastWeek'\n : diff < 0\n ? 'lastDay'\n : diff < 1\n ? 'sameDay'\n : diff < 2\n ? 'nextDay'\n : diff < 7\n ? 'nextWeek'\n : 'sameElse';\n}\n\nfunction calendar$1(time, formats) {\n // Support for single parameter, formats only overload to the calendar function\n if (arguments.length === 1) {\n if (!arguments[0]) {\n time = undefined;\n formats = undefined;\n } else if (isMomentInput(arguments[0])) {\n time = arguments[0];\n formats = undefined;\n } else if (isCalendarSpec(arguments[0])) {\n formats = arguments[0];\n time = undefined;\n }\n }\n // We want to compare the start of today, vs this.\n // Getting start-of-today depends on whether we're local/utc/offset or not.\n var now = time || createLocal(),\n sod = cloneWithOffset(now, this).startOf('day'),\n format = hooks.calendarFormat(this, sod) || 'sameElse',\n output =\n formats &&\n (isFunction(formats[format])\n ? formats[format].call(this, now)\n : formats[format]);\n\n return this.format(\n output || this.localeData().calendar(format, this, createLocal(now))\n );\n}\n\nfunction clone() {\n return new Moment(this);\n}\n\nfunction isAfter(input, units) {\n var localInput = isMoment(input) ? input : createLocal(input);\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n units = normalizeUnits(units) || 'millisecond';\n if (units === 'millisecond') {\n return this.valueOf() > localInput.valueOf();\n } else {\n return localInput.valueOf() < this.clone().startOf(units).valueOf();\n }\n}\n\nfunction isBefore(input, units) {\n var localInput = isMoment(input) ? input : createLocal(input);\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n units = normalizeUnits(units) || 'millisecond';\n if (units === 'millisecond') {\n return this.valueOf() < localInput.valueOf();\n } else {\n return this.clone().endOf(units).valueOf() < localInput.valueOf();\n }\n}\n\nfunction isBetween(from, to, units, inclusivity) {\n var localFrom = isMoment(from) ? from : createLocal(from),\n localTo = isMoment(to) ? to : createLocal(to);\n if (!(this.isValid() && localFrom.isValid() && localTo.isValid())) {\n return false;\n }\n inclusivity = inclusivity || '()';\n return (\n (inclusivity[0] === '('\n ? this.isAfter(localFrom, units)\n : !this.isBefore(localFrom, units)) &&\n (inclusivity[1] === ')'\n ? this.isBefore(localTo, units)\n : !this.isAfter(localTo, units))\n );\n}\n\nfunction isSame(input, units) {\n var localInput = isMoment(input) ? input : createLocal(input),\n inputMs;\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n units = normalizeUnits(units) || 'millisecond';\n if (units === 'millisecond') {\n return this.valueOf() === localInput.valueOf();\n } else {\n inputMs = localInput.valueOf();\n return (\n this.clone().startOf(units).valueOf() <= inputMs &&\n inputMs <= this.clone().endOf(units).valueOf()\n );\n }\n}\n\nfunction isSameOrAfter(input, units) {\n return this.isSame(input, units) || this.isAfter(input, units);\n}\n\nfunction isSameOrBefore(input, units) {\n return this.isSame(input, units) || this.isBefore(input, units);\n}\n\nfunction diff(input, units, asFloat) {\n var that, zoneDelta, output;\n\n if (!this.isValid()) {\n return NaN;\n }\n\n that = cloneWithOffset(input, this);\n\n if (!that.isValid()) {\n return NaN;\n }\n\n zoneDelta = (that.utcOffset() - this.utcOffset()) * 6e4;\n\n units = normalizeUnits(units);\n\n switch (units) {\n case 'year':\n output = monthDiff(this, that) / 12;\n break;\n case 'month':\n output = monthDiff(this, that);\n break;\n case 'quarter':\n output = monthDiff(this, that) / 3;\n break;\n case 'second':\n output = (this - that) / 1e3;\n break; // 1000\n case 'minute':\n output = (this - that) / 6e4;\n break; // 1000 * 60\n case 'hour':\n output = (this - that) / 36e5;\n break; // 1000 * 60 * 60\n case 'day':\n output = (this - that - zoneDelta) / 864e5;\n break; // 1000 * 60 * 60 * 24, negate dst\n case 'week':\n output = (this - that - zoneDelta) / 6048e5;\n break; // 1000 * 60 * 60 * 24 * 7, negate dst\n default:\n output = this - that;\n }\n\n return asFloat ? output : absFloor(output);\n}\n\nfunction monthDiff(a, b) {\n if (a.date() < b.date()) {\n // end-of-month calculations work correct when the start month has more\n // days than the end month.\n return -monthDiff(b, a);\n }\n // difference in months\n var wholeMonthDiff = (b.year() - a.year()) * 12 + (b.month() - a.month()),\n // b is in (anchor - 1 month, anchor + 1 month)\n anchor = a.clone().add(wholeMonthDiff, 'months'),\n anchor2,\n adjust;\n\n if (b - anchor < 0) {\n anchor2 = a.clone().add(wholeMonthDiff - 1, 'months');\n // linear across the month\n adjust = (b - anchor) / (anchor - anchor2);\n } else {\n anchor2 = a.clone().add(wholeMonthDiff + 1, 'months');\n // linear across the month\n adjust = (b - anchor) / (anchor2 - anchor);\n }\n\n //check for negative zero, return zero if negative zero\n return -(wholeMonthDiff + adjust) || 0;\n}\n\nhooks.defaultFormat = 'YYYY-MM-DDTHH:mm:ssZ';\nhooks.defaultFormatUtc = 'YYYY-MM-DDTHH:mm:ss[Z]';\n\nfunction toString() {\n return this.clone().locale('en').format('ddd MMM DD YYYY HH:mm:ss [GMT]ZZ');\n}\n\nfunction toISOString(keepOffset) {\n if (!this.isValid()) {\n return null;\n }\n var utc = keepOffset !== true,\n m = utc ? this.clone().utc() : this;\n if (m.year() < 0 || m.year() > 9999) {\n return formatMoment(\n m,\n utc\n ? 'YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]'\n : 'YYYYYY-MM-DD[T]HH:mm:ss.SSSZ'\n );\n }\n if (isFunction(Date.prototype.toISOString)) {\n // native implementation is ~50x faster, use it when we can\n if (utc) {\n return this.toDate().toISOString();\n } else {\n return new Date(this.valueOf() + this.utcOffset() * 60 * 1000)\n .toISOString()\n .replace('Z', formatMoment(m, 'Z'));\n }\n }\n return formatMoment(\n m,\n utc ? 'YYYY-MM-DD[T]HH:mm:ss.SSS[Z]' : 'YYYY-MM-DD[T]HH:mm:ss.SSSZ'\n );\n}\n\n/**\n * Return a human readable representation of a moment that can\n * also be evaluated to get a new moment which is the same\n *\n * @link https://nodejs.org/dist/latest/docs/api/util.html#util_custom_inspect_function_on_objects\n */\nfunction inspect() {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment',\n zone = '',\n prefix,\n year,\n datetime,\n suffix;\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n prefix = '[' + func + '(\"]';\n year = 0 <= this.year() && this.year() <= 9999 ? 'YYYY' : 'YYYYYY';\n datetime = '-MM-DD[T]HH:mm:ss.SSS';\n suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}\n\nfunction format(inputString) {\n if (!inputString) {\n inputString = this.isUtc()\n ? hooks.defaultFormatUtc\n : hooks.defaultFormat;\n }\n var output = formatMoment(this, inputString);\n return this.localeData().postformat(output);\n}\n\nfunction from(time, withoutSuffix) {\n if (\n this.isValid() &&\n ((isMoment(time) && time.isValid()) || createLocal(time).isValid())\n ) {\n return createDuration({ to: this, from: time })\n .locale(this.locale())\n .humanize(!withoutSuffix);\n } else {\n return this.localeData().invalidDate();\n }\n}\n\nfunction fromNow(withoutSuffix) {\n return this.from(createLocal(), withoutSuffix);\n}\n\nfunction to(time, withoutSuffix) {\n if (\n this.isValid() &&\n ((isMoment(time) && time.isValid()) || createLocal(time).isValid())\n ) {\n return createDuration({ from: this, to: time })\n .locale(this.locale())\n .humanize(!withoutSuffix);\n } else {\n return this.localeData().invalidDate();\n }\n}\n\nfunction toNow(withoutSuffix) {\n return this.to(createLocal(), withoutSuffix);\n}\n\n// If passed a locale key, it will set the locale for this\n// instance. Otherwise, it will return the locale configuration\n// variables for this instance.\nfunction locale(key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}\n\nvar lang = deprecate(\n 'moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.',\n function (key) {\n if (key === undefined) {\n return this.localeData();\n } else {\n return this.locale(key);\n }\n }\n);\n\nfunction localeData() {\n return this._locale;\n}\n\nvar MS_PER_SECOND = 1000,\n MS_PER_MINUTE = 60 * MS_PER_SECOND,\n MS_PER_HOUR = 60 * MS_PER_MINUTE,\n MS_PER_400_YEARS = (365 * 400 + 97) * 24 * MS_PER_HOUR;\n\n// actual modulo - handles negative numbers (for dates before 1970):\nfunction mod$1(dividend, divisor) {\n return ((dividend % divisor) + divisor) % divisor;\n}\n\nfunction localStartOfDate(y, m, d) {\n // the date constructor remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n // preserve leap years using a full 400 year cycle, then reset\n return new Date(y + 400, m, d) - MS_PER_400_YEARS;\n } else {\n return new Date(y, m, d).valueOf();\n }\n}\n\nfunction utcStartOfDate(y, m, d) {\n // Date.UTC remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n // preserve leap years using a full 400 year cycle, then reset\n return Date.UTC(y + 400, m, d) - MS_PER_400_YEARS;\n } else {\n return Date.UTC(y, m, d);\n }\n}\n\nfunction startOf(units) {\n var time, startOfDate;\n units = normalizeUnits(units);\n if (units === undefined || units === 'millisecond' || !this.isValid()) {\n return this;\n }\n\n startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate;\n\n switch (units) {\n case 'year':\n time = startOfDate(this.year(), 0, 1);\n break;\n case 'quarter':\n time = startOfDate(\n this.year(),\n this.month() - (this.month() % 3),\n 1\n );\n break;\n case 'month':\n time = startOfDate(this.year(), this.month(), 1);\n break;\n case 'week':\n time = startOfDate(\n this.year(),\n this.month(),\n this.date() - this.weekday()\n );\n break;\n case 'isoWeek':\n time = startOfDate(\n this.year(),\n this.month(),\n this.date() - (this.isoWeekday() - 1)\n );\n break;\n case 'day':\n case 'date':\n time = startOfDate(this.year(), this.month(), this.date());\n break;\n case 'hour':\n time = this._d.valueOf();\n time -= mod$1(\n time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE),\n MS_PER_HOUR\n );\n break;\n case 'minute':\n time = this._d.valueOf();\n time -= mod$1(time, MS_PER_MINUTE);\n break;\n case 'second':\n time = this._d.valueOf();\n time -= mod$1(time, MS_PER_SECOND);\n break;\n }\n\n this._d.setTime(time);\n hooks.updateOffset(this, true);\n return this;\n}\n\nfunction endOf(units) {\n var time, startOfDate;\n units = normalizeUnits(units);\n if (units === undefined || units === 'millisecond' || !this.isValid()) {\n return this;\n }\n\n startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate;\n\n switch (units) {\n case 'year':\n time = startOfDate(this.year() + 1, 0, 1) - 1;\n break;\n case 'quarter':\n time =\n startOfDate(\n this.year(),\n this.month() - (this.month() % 3) + 3,\n 1\n ) - 1;\n break;\n case 'month':\n time = startOfDate(this.year(), this.month() + 1, 1) - 1;\n break;\n case 'week':\n time =\n startOfDate(\n this.year(),\n this.month(),\n this.date() - this.weekday() + 7\n ) - 1;\n break;\n case 'isoWeek':\n time =\n startOfDate(\n this.year(),\n this.month(),\n this.date() - (this.isoWeekday() - 1) + 7\n ) - 1;\n break;\n case 'day':\n case 'date':\n time = startOfDate(this.year(), this.month(), this.date() + 1) - 1;\n break;\n case 'hour':\n time = this._d.valueOf();\n time +=\n MS_PER_HOUR -\n mod$1(\n time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE),\n MS_PER_HOUR\n ) -\n 1;\n break;\n case 'minute':\n time = this._d.valueOf();\n time += MS_PER_MINUTE - mod$1(time, MS_PER_MINUTE) - 1;\n break;\n case 'second':\n time = this._d.valueOf();\n time += MS_PER_SECOND - mod$1(time, MS_PER_SECOND) - 1;\n break;\n }\n\n this._d.setTime(time);\n hooks.updateOffset(this, true);\n return this;\n}\n\nfunction valueOf() {\n return this._d.valueOf() - (this._offset || 0) * 60000;\n}\n\nfunction unix() {\n return Math.floor(this.valueOf() / 1000);\n}\n\nfunction toDate() {\n return new Date(this.valueOf());\n}\n\nfunction toArray() {\n var m = this;\n return [\n m.year(),\n m.month(),\n m.date(),\n m.hour(),\n m.minute(),\n m.second(),\n m.millisecond(),\n ];\n}\n\nfunction toObject() {\n var m = this;\n return {\n years: m.year(),\n months: m.month(),\n date: m.date(),\n hours: m.hours(),\n minutes: m.minutes(),\n seconds: m.seconds(),\n milliseconds: m.milliseconds(),\n };\n}\n\nfunction toJSON() {\n // new Date(NaN).toJSON() === null\n return this.isValid() ? this.toISOString() : null;\n}\n\nfunction isValid$2() {\n return isValid(this);\n}\n\nfunction parsingFlags() {\n return extend({}, getParsingFlags(this));\n}\n\nfunction invalidAt() {\n return getParsingFlags(this).overflow;\n}\n\nfunction creationData() {\n return {\n input: this._i,\n format: this._f,\n locale: this._locale,\n isUTC: this._isUTC,\n strict: this._strict,\n };\n}\n\naddFormatToken('N', 0, 0, 'eraAbbr');\naddFormatToken('NN', 0, 0, 'eraAbbr');\naddFormatToken('NNN', 0, 0, 'eraAbbr');\naddFormatToken('NNNN', 0, 0, 'eraName');\naddFormatToken('NNNNN', 0, 0, 'eraNarrow');\n\naddFormatToken('y', ['y', 1], 'yo', 'eraYear');\naddFormatToken('y', ['yy', 2], 0, 'eraYear');\naddFormatToken('y', ['yyy', 3], 0, 'eraYear');\naddFormatToken('y', ['yyyy', 4], 0, 'eraYear');\n\naddRegexToken('N', matchEraAbbr);\naddRegexToken('NN', matchEraAbbr);\naddRegexToken('NNN', matchEraAbbr);\naddRegexToken('NNNN', matchEraName);\naddRegexToken('NNNNN', matchEraNarrow);\n\naddParseToken(\n ['N', 'NN', 'NNN', 'NNNN', 'NNNNN'],\n function (input, array, config, token) {\n var era = config._locale.erasParse(input, token, config._strict);\n if (era) {\n getParsingFlags(config).era = era;\n } else {\n getParsingFlags(config).invalidEra = input;\n }\n }\n);\n\naddRegexToken('y', matchUnsigned);\naddRegexToken('yy', matchUnsigned);\naddRegexToken('yyy', matchUnsigned);\naddRegexToken('yyyy', matchUnsigned);\naddRegexToken('yo', matchEraYearOrdinal);\n\naddParseToken(['y', 'yy', 'yyy', 'yyyy'], YEAR);\naddParseToken(['yo'], function (input, array, config, token) {\n var match;\n if (config._locale._eraYearOrdinalRegex) {\n match = input.match(config._locale._eraYearOrdinalRegex);\n }\n\n if (config._locale.eraYearOrdinalParse) {\n array[YEAR] = config._locale.eraYearOrdinalParse(input, match);\n } else {\n array[YEAR] = parseInt(input, 10);\n }\n});\n\nfunction localeEras(m, format) {\n var i,\n l,\n date,\n eras = this._eras || getLocale('en')._eras;\n for (i = 0, l = eras.length; i < l; ++i) {\n switch (typeof eras[i].since) {\n case 'string':\n // truncate time\n date = hooks(eras[i].since).startOf('day');\n eras[i].since = date.valueOf();\n break;\n }\n\n switch (typeof eras[i].until) {\n case 'undefined':\n eras[i].until = +Infinity;\n break;\n case 'string':\n // truncate time\n date = hooks(eras[i].until).startOf('day').valueOf();\n eras[i].until = date.valueOf();\n break;\n }\n }\n return eras;\n}\n\nfunction localeErasParse(eraName, format, strict) {\n var i,\n l,\n eras = this.eras(),\n name,\n abbr,\n narrow;\n eraName = eraName.toUpperCase();\n\n for (i = 0, l = eras.length; i < l; ++i) {\n name = eras[i].name.toUpperCase();\n abbr = eras[i].abbr.toUpperCase();\n narrow = eras[i].narrow.toUpperCase();\n\n if (strict) {\n switch (format) {\n case 'N':\n case 'NN':\n case 'NNN':\n if (abbr === eraName) {\n return eras[i];\n }\n break;\n\n case 'NNNN':\n if (name === eraName) {\n return eras[i];\n }\n break;\n\n case 'NNNNN':\n if (narrow === eraName) {\n return eras[i];\n }\n break;\n }\n } else if ([name, abbr, narrow].indexOf(eraName) >= 0) {\n return eras[i];\n }\n }\n}\n\nfunction localeErasConvertYear(era, year) {\n var dir = era.since <= era.until ? +1 : -1;\n if (year === undefined) {\n return hooks(era.since).year();\n } else {\n return hooks(era.since).year() + (year - era.offset) * dir;\n }\n}\n\nfunction getEraName() {\n var i,\n l,\n val,\n eras = this.localeData().eras();\n for (i = 0, l = eras.length; i < l; ++i) {\n // truncate time\n val = this.clone().startOf('day').valueOf();\n\n if (eras[i].since <= val && val <= eras[i].until) {\n return eras[i].name;\n }\n if (eras[i].until <= val && val <= eras[i].since) {\n return eras[i].name;\n }\n }\n\n return '';\n}\n\nfunction getEraNarrow() {\n var i,\n l,\n val,\n eras = this.localeData().eras();\n for (i = 0, l = eras.length; i < l; ++i) {\n // truncate time\n val = this.clone().startOf('day').valueOf();\n\n if (eras[i].since <= val && val <= eras[i].until) {\n return eras[i].narrow;\n }\n if (eras[i].until <= val && val <= eras[i].since) {\n return eras[i].narrow;\n }\n }\n\n return '';\n}\n\nfunction getEraAbbr() {\n var i,\n l,\n val,\n eras = this.localeData().eras();\n for (i = 0, l = eras.length; i < l; ++i) {\n // truncate time\n val = this.clone().startOf('day').valueOf();\n\n if (eras[i].since <= val && val <= eras[i].until) {\n return eras[i].abbr;\n }\n if (eras[i].until <= val && val <= eras[i].since) {\n return eras[i].abbr;\n }\n }\n\n return '';\n}\n\nfunction getEraYear() {\n var i,\n l,\n dir,\n val,\n eras = this.localeData().eras();\n for (i = 0, l = eras.length; i < l; ++i) {\n dir = eras[i].since <= eras[i].until ? +1 : -1;\n\n // truncate time\n val = this.clone().startOf('day').valueOf();\n\n if (\n (eras[i].since <= val && val <= eras[i].until) ||\n (eras[i].until <= val && val <= eras[i].since)\n ) {\n return (\n (this.year() - hooks(eras[i].since).year()) * dir +\n eras[i].offset\n );\n }\n }\n\n return this.year();\n}\n\nfunction erasNameRegex(isStrict) {\n if (!hasOwnProp(this, '_erasNameRegex')) {\n computeErasParse.call(this);\n }\n return isStrict ? this._erasNameRegex : this._erasRegex;\n}\n\nfunction erasAbbrRegex(isStrict) {\n if (!hasOwnProp(this, '_erasAbbrRegex')) {\n computeErasParse.call(this);\n }\n return isStrict ? this._erasAbbrRegex : this._erasRegex;\n}\n\nfunction erasNarrowRegex(isStrict) {\n if (!hasOwnProp(this, '_erasNarrowRegex')) {\n computeErasParse.call(this);\n }\n return isStrict ? this._erasNarrowRegex : this._erasRegex;\n}\n\nfunction matchEraAbbr(isStrict, locale) {\n return locale.erasAbbrRegex(isStrict);\n}\n\nfunction matchEraName(isStrict, locale) {\n return locale.erasNameRegex(isStrict);\n}\n\nfunction matchEraNarrow(isStrict, locale) {\n return locale.erasNarrowRegex(isStrict);\n}\n\nfunction matchEraYearOrdinal(isStrict, locale) {\n return locale._eraYearOrdinalRegex || matchUnsigned;\n}\n\nfunction computeErasParse() {\n var abbrPieces = [],\n namePieces = [],\n narrowPieces = [],\n mixedPieces = [],\n i,\n l,\n eras = this.eras();\n\n for (i = 0, l = eras.length; i < l; ++i) {\n namePieces.push(regexEscape(eras[i].name));\n abbrPieces.push(regexEscape(eras[i].abbr));\n narrowPieces.push(regexEscape(eras[i].narrow));\n\n mixedPieces.push(regexEscape(eras[i].name));\n mixedPieces.push(regexEscape(eras[i].abbr));\n mixedPieces.push(regexEscape(eras[i].narrow));\n }\n\n this._erasRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n this._erasNameRegex = new RegExp('^(' + namePieces.join('|') + ')', 'i');\n this._erasAbbrRegex = new RegExp('^(' + abbrPieces.join('|') + ')', 'i');\n this._erasNarrowRegex = new RegExp(\n '^(' + narrowPieces.join('|') + ')',\n 'i'\n );\n}\n\n// FORMATTING\n\naddFormatToken(0, ['gg', 2], 0, function () {\n return this.weekYear() % 100;\n});\n\naddFormatToken(0, ['GG', 2], 0, function () {\n return this.isoWeekYear() % 100;\n});\n\nfunction addWeekYearFormatToken(token, getter) {\n addFormatToken(0, [token, token.length], 0, getter);\n}\n\naddWeekYearFormatToken('gggg', 'weekYear');\naddWeekYearFormatToken('ggggg', 'weekYear');\naddWeekYearFormatToken('GGGG', 'isoWeekYear');\naddWeekYearFormatToken('GGGGG', 'isoWeekYear');\n\n// ALIASES\n\naddUnitAlias('weekYear', 'gg');\naddUnitAlias('isoWeekYear', 'GG');\n\n// PRIORITY\n\naddUnitPriority('weekYear', 1);\naddUnitPriority('isoWeekYear', 1);\n\n// PARSING\n\naddRegexToken('G', matchSigned);\naddRegexToken('g', matchSigned);\naddRegexToken('GG', match1to2, match2);\naddRegexToken('gg', match1to2, match2);\naddRegexToken('GGGG', match1to4, match4);\naddRegexToken('gggg', match1to4, match4);\naddRegexToken('GGGGG', match1to6, match6);\naddRegexToken('ggggg', match1to6, match6);\n\naddWeekParseToken(\n ['gggg', 'ggggg', 'GGGG', 'GGGGG'],\n function (input, week, config, token) {\n week[token.substr(0, 2)] = toInt(input);\n }\n);\n\naddWeekParseToken(['gg', 'GG'], function (input, week, config, token) {\n week[token] = hooks.parseTwoDigitYear(input);\n});\n\n// MOMENTS\n\nfunction getSetWeekYear(input) {\n return getSetWeekYearHelper.call(\n this,\n input,\n this.week(),\n this.weekday(),\n this.localeData()._week.dow,\n this.localeData()._week.doy\n );\n}\n\nfunction getSetISOWeekYear(input) {\n return getSetWeekYearHelper.call(\n this,\n input,\n this.isoWeek(),\n this.isoWeekday(),\n 1,\n 4\n );\n}\n\nfunction getISOWeeksInYear() {\n return weeksInYear(this.year(), 1, 4);\n}\n\nfunction getISOWeeksInISOWeekYear() {\n return weeksInYear(this.isoWeekYear(), 1, 4);\n}\n\nfunction getWeeksInYear() {\n var weekInfo = this.localeData()._week;\n return weeksInYear(this.year(), weekInfo.dow, weekInfo.doy);\n}\n\nfunction getWeeksInWeekYear() {\n var weekInfo = this.localeData()._week;\n return weeksInYear(this.weekYear(), weekInfo.dow, weekInfo.doy);\n}\n\nfunction getSetWeekYearHelper(input, week, weekday, dow, doy) {\n var weeksTarget;\n if (input == null) {\n return weekOfYear(this, dow, doy).year;\n } else {\n weeksTarget = weeksInYear(input, dow, doy);\n if (week > weeksTarget) {\n week = weeksTarget;\n }\n return setWeekAll.call(this, input, week, weekday, dow, doy);\n }\n}\n\nfunction setWeekAll(weekYear, week, weekday, dow, doy) {\n var dayOfYearData = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy),\n date = createUTCDate(dayOfYearData.year, 0, dayOfYearData.dayOfYear);\n\n this.year(date.getUTCFullYear());\n this.month(date.getUTCMonth());\n this.date(date.getUTCDate());\n return this;\n}\n\n// FORMATTING\n\naddFormatToken('Q', 0, 'Qo', 'quarter');\n\n// ALIASES\n\naddUnitAlias('quarter', 'Q');\n\n// PRIORITY\n\naddUnitPriority('quarter', 7);\n\n// PARSING\n\naddRegexToken('Q', match1);\naddParseToken('Q', function (input, array) {\n array[MONTH] = (toInt(input) - 1) * 3;\n});\n\n// MOMENTS\n\nfunction getSetQuarter(input) {\n return input == null\n ? Math.ceil((this.month() + 1) / 3)\n : this.month((input - 1) * 3 + (this.month() % 3));\n}\n\n// FORMATTING\n\naddFormatToken('D', ['DD', 2], 'Do', 'date');\n\n// ALIASES\n\naddUnitAlias('date', 'D');\n\n// PRIORITY\naddUnitPriority('date', 9);\n\n// PARSING\n\naddRegexToken('D', match1to2);\naddRegexToken('DD', match1to2, match2);\naddRegexToken('Do', function (isStrict, locale) {\n // TODO: Remove \"ordinalParse\" fallback in next major release.\n return isStrict\n ? locale._dayOfMonthOrdinalParse || locale._ordinalParse\n : locale._dayOfMonthOrdinalParseLenient;\n});\n\naddParseToken(['D', 'DD'], DATE);\naddParseToken('Do', function (input, array) {\n array[DATE] = toInt(input.match(match1to2)[0]);\n});\n\n// MOMENTS\n\nvar getSetDayOfMonth = makeGetSet('Date', true);\n\n// FORMATTING\n\naddFormatToken('DDD', ['DDDD', 3], 'DDDo', 'dayOfYear');\n\n// ALIASES\n\naddUnitAlias('dayOfYear', 'DDD');\n\n// PRIORITY\naddUnitPriority('dayOfYear', 4);\n\n// PARSING\n\naddRegexToken('DDD', match1to3);\naddRegexToken('DDDD', match3);\naddParseToken(['DDD', 'DDDD'], function (input, array, config) {\n config._dayOfYear = toInt(input);\n});\n\n// HELPERS\n\n// MOMENTS\n\nfunction getSetDayOfYear(input) {\n var dayOfYear =\n Math.round(\n (this.clone().startOf('day') - this.clone().startOf('year')) / 864e5\n ) + 1;\n return input == null ? dayOfYear : this.add(input - dayOfYear, 'd');\n}\n\n// FORMATTING\n\naddFormatToken('m', ['mm', 2], 0, 'minute');\n\n// ALIASES\n\naddUnitAlias('minute', 'm');\n\n// PRIORITY\n\naddUnitPriority('minute', 14);\n\n// PARSING\n\naddRegexToken('m', match1to2);\naddRegexToken('mm', match1to2, match2);\naddParseToken(['m', 'mm'], MINUTE);\n\n// MOMENTS\n\nvar getSetMinute = makeGetSet('Minutes', false);\n\n// FORMATTING\n\naddFormatToken('s', ['ss', 2], 0, 'second');\n\n// ALIASES\n\naddUnitAlias('second', 's');\n\n// PRIORITY\n\naddUnitPriority('second', 15);\n\n// PARSING\n\naddRegexToken('s', match1to2);\naddRegexToken('ss', match1to2, match2);\naddParseToken(['s', 'ss'], SECOND);\n\n// MOMENTS\n\nvar getSetSecond = makeGetSet('Seconds', false);\n\n// FORMATTING\n\naddFormatToken('S', 0, 0, function () {\n return ~~(this.millisecond() / 100);\n});\n\naddFormatToken(0, ['SS', 2], 0, function () {\n return ~~(this.millisecond() / 10);\n});\n\naddFormatToken(0, ['SSS', 3], 0, 'millisecond');\naddFormatToken(0, ['SSSS', 4], 0, function () {\n return this.millisecond() * 10;\n});\naddFormatToken(0, ['SSSSS', 5], 0, function () {\n return this.millisecond() * 100;\n});\naddFormatToken(0, ['SSSSSS', 6], 0, function () {\n return this.millisecond() * 1000;\n});\naddFormatToken(0, ['SSSSSSS', 7], 0, function () {\n return this.millisecond() * 10000;\n});\naddFormatToken(0, ['SSSSSSSS', 8], 0, function () {\n return this.millisecond() * 100000;\n});\naddFormatToken(0, ['SSSSSSSSS', 9], 0, function () {\n return this.millisecond() * 1000000;\n});\n\n// ALIASES\n\naddUnitAlias('millisecond', 'ms');\n\n// PRIORITY\n\naddUnitPriority('millisecond', 16);\n\n// PARSING\n\naddRegexToken('S', match1to3, match1);\naddRegexToken('SS', match1to3, match2);\naddRegexToken('SSS', match1to3, match3);\n\nvar token, getSetMillisecond;\nfor (token = 'SSSS'; token.length <= 9; token += 'S') {\n addRegexToken(token, matchUnsigned);\n}\n\nfunction parseMs(input, array) {\n array[MILLISECOND] = toInt(('0.' + input) * 1000);\n}\n\nfor (token = 'S'; token.length <= 9; token += 'S') {\n addParseToken(token, parseMs);\n}\n\ngetSetMillisecond = makeGetSet('Milliseconds', false);\n\n// FORMATTING\n\naddFormatToken('z', 0, 0, 'zoneAbbr');\naddFormatToken('zz', 0, 0, 'zoneName');\n\n// MOMENTS\n\nfunction getZoneAbbr() {\n return this._isUTC ? 'UTC' : '';\n}\n\nfunction getZoneName() {\n return this._isUTC ? 'Coordinated Universal Time' : '';\n}\n\nvar proto = Moment.prototype;\n\nproto.add = add;\nproto.calendar = calendar$1;\nproto.clone = clone;\nproto.diff = diff;\nproto.endOf = endOf;\nproto.format = format;\nproto.from = from;\nproto.fromNow = fromNow;\nproto.to = to;\nproto.toNow = toNow;\nproto.get = stringGet;\nproto.invalidAt = invalidAt;\nproto.isAfter = isAfter;\nproto.isBefore = isBefore;\nproto.isBetween = isBetween;\nproto.isSame = isSame;\nproto.isSameOrAfter = isSameOrAfter;\nproto.isSameOrBefore = isSameOrBefore;\nproto.isValid = isValid$2;\nproto.lang = lang;\nproto.locale = locale;\nproto.localeData = localeData;\nproto.max = prototypeMax;\nproto.min = prototypeMin;\nproto.parsingFlags = parsingFlags;\nproto.set = stringSet;\nproto.startOf = startOf;\nproto.subtract = subtract;\nproto.toArray = toArray;\nproto.toObject = toObject;\nproto.toDate = toDate;\nproto.toISOString = toISOString;\nproto.inspect = inspect;\nif (typeof Symbol !== 'undefined' && Symbol.for != null) {\n proto[Symbol.for('nodejs.util.inspect.custom')] = function () {\n return 'Moment<' + this.format() + '>';\n };\n}\nproto.toJSON = toJSON;\nproto.toString = toString;\nproto.unix = unix;\nproto.valueOf = valueOf;\nproto.creationData = creationData;\nproto.eraName = getEraName;\nproto.eraNarrow = getEraNarrow;\nproto.eraAbbr = getEraAbbr;\nproto.eraYear = getEraYear;\nproto.year = getSetYear;\nproto.isLeapYear = getIsLeapYear;\nproto.weekYear = getSetWeekYear;\nproto.isoWeekYear = getSetISOWeekYear;\nproto.quarter = proto.quarters = getSetQuarter;\nproto.month = getSetMonth;\nproto.daysInMonth = getDaysInMonth;\nproto.week = proto.weeks = getSetWeek;\nproto.isoWeek = proto.isoWeeks = getSetISOWeek;\nproto.weeksInYear = getWeeksInYear;\nproto.weeksInWeekYear = getWeeksInWeekYear;\nproto.isoWeeksInYear = getISOWeeksInYear;\nproto.isoWeeksInISOWeekYear = getISOWeeksInISOWeekYear;\nproto.date = getSetDayOfMonth;\nproto.day = proto.days = getSetDayOfWeek;\nproto.weekday = getSetLocaleDayOfWeek;\nproto.isoWeekday = getSetISODayOfWeek;\nproto.dayOfYear = getSetDayOfYear;\nproto.hour = proto.hours = getSetHour;\nproto.minute = proto.minutes = getSetMinute;\nproto.second = proto.seconds = getSetSecond;\nproto.millisecond = proto.milliseconds = getSetMillisecond;\nproto.utcOffset = getSetOffset;\nproto.utc = setOffsetToUTC;\nproto.local = setOffsetToLocal;\nproto.parseZone = setOffsetToParsedOffset;\nproto.hasAlignedHourOffset = hasAlignedHourOffset;\nproto.isDST = isDaylightSavingTime;\nproto.isLocal = isLocal;\nproto.isUtcOffset = isUtcOffset;\nproto.isUtc = isUtc;\nproto.isUTC = isUtc;\nproto.zoneAbbr = getZoneAbbr;\nproto.zoneName = getZoneName;\nproto.dates = deprecate(\n 'dates accessor is deprecated. Use date instead.',\n getSetDayOfMonth\n);\nproto.months = deprecate(\n 'months accessor is deprecated. Use month instead',\n getSetMonth\n);\nproto.years = deprecate(\n 'years accessor is deprecated. Use year instead',\n getSetYear\n);\nproto.zone = deprecate(\n 'moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/',\n getSetZone\n);\nproto.isDSTShifted = deprecate(\n 'isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information',\n isDaylightSavingTimeShifted\n);\n\nfunction createUnix(input) {\n return createLocal(input * 1000);\n}\n\nfunction createInZone() {\n return createLocal.apply(null, arguments).parseZone();\n}\n\nfunction preParsePostFormat(string) {\n return string;\n}\n\nvar proto$1 = Locale.prototype;\n\nproto$1.calendar = calendar;\nproto$1.longDateFormat = longDateFormat;\nproto$1.invalidDate = invalidDate;\nproto$1.ordinal = ordinal;\nproto$1.preparse = preParsePostFormat;\nproto$1.postformat = preParsePostFormat;\nproto$1.relativeTime = relativeTime;\nproto$1.pastFuture = pastFuture;\nproto$1.set = set;\nproto$1.eras = localeEras;\nproto$1.erasParse = localeErasParse;\nproto$1.erasConvertYear = localeErasConvertYear;\nproto$1.erasAbbrRegex = erasAbbrRegex;\nproto$1.erasNameRegex = erasNameRegex;\nproto$1.erasNarrowRegex = erasNarrowRegex;\n\nproto$1.months = localeMonths;\nproto$1.monthsShort = localeMonthsShort;\nproto$1.monthsParse = localeMonthsParse;\nproto$1.monthsRegex = monthsRegex;\nproto$1.monthsShortRegex = monthsShortRegex;\nproto$1.week = localeWeek;\nproto$1.firstDayOfYear = localeFirstDayOfYear;\nproto$1.firstDayOfWeek = localeFirstDayOfWeek;\n\nproto$1.weekdays = localeWeekdays;\nproto$1.weekdaysMin = localeWeekdaysMin;\nproto$1.weekdaysShort = localeWeekdaysShort;\nproto$1.weekdaysParse = localeWeekdaysParse;\n\nproto$1.weekdaysRegex = weekdaysRegex;\nproto$1.weekdaysShortRegex = weekdaysShortRegex;\nproto$1.weekdaysMinRegex = weekdaysMinRegex;\n\nproto$1.isPM = localeIsPM;\nproto$1.meridiem = localeMeridiem;\n\nfunction get$1(format, index, field, setter) {\n var locale = getLocale(),\n utc = createUTC().set(setter, index);\n return locale[field](utc, format);\n}\n\nfunction listMonthsImpl(format, index, field) {\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n\n if (index != null) {\n return get$1(format, index, field, 'month');\n }\n\n var i,\n out = [];\n for (i = 0; i < 12; i++) {\n out[i] = get$1(format, i, field, 'month');\n }\n return out;\n}\n\n// ()\n// (5)\n// (fmt, 5)\n// (fmt)\n// (true)\n// (true, 5)\n// (true, fmt, 5)\n// (true, fmt)\nfunction listWeekdaysImpl(localeSorted, format, index, field) {\n if (typeof localeSorted === 'boolean') {\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n } else {\n format = localeSorted;\n index = format;\n localeSorted = false;\n\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n }\n\n var locale = getLocale(),\n shift = localeSorted ? locale._week.dow : 0,\n i,\n out = [];\n\n if (index != null) {\n return get$1(format, (index + shift) % 7, field, 'day');\n }\n\n for (i = 0; i < 7; i++) {\n out[i] = get$1(format, (i + shift) % 7, field, 'day');\n }\n return out;\n}\n\nfunction listMonths(format, index) {\n return listMonthsImpl(format, index, 'months');\n}\n\nfunction listMonthsShort(format, index) {\n return listMonthsImpl(format, index, 'monthsShort');\n}\n\nfunction listWeekdays(localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdays');\n}\n\nfunction listWeekdaysShort(localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdaysShort');\n}\n\nfunction listWeekdaysMin(localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdaysMin');\n}\n\ngetSetGlobalLocale('en', {\n eras: [\n {\n since: '0001-01-01',\n until: +Infinity,\n offset: 1,\n name: 'Anno Domini',\n narrow: 'AD',\n abbr: 'AD',\n },\n {\n since: '0000-12-31',\n until: -Infinity,\n offset: 1,\n name: 'Before Christ',\n narrow: 'BC',\n abbr: 'BC',\n },\n ],\n dayOfMonthOrdinalParse: /\\d{1,2}(th|st|nd|rd)/,\n ordinal: function (number) {\n var b = number % 10,\n output =\n toInt((number % 100) / 10) === 1\n ? 'th'\n : b === 1\n ? 'st'\n : b === 2\n ? 'nd'\n : b === 3\n ? 'rd'\n : 'th';\n return number + output;\n },\n});\n\n// Side effect imports\n\nhooks.lang = deprecate(\n 'moment.lang is deprecated. Use moment.locale instead.',\n getSetGlobalLocale\n);\nhooks.langData = deprecate(\n 'moment.langData is deprecated. Use moment.localeData instead.',\n getLocale\n);\n\nvar mathAbs = Math.abs;\n\nfunction abs() {\n var data = this._data;\n\n this._milliseconds = mathAbs(this._milliseconds);\n this._days = mathAbs(this._days);\n this._months = mathAbs(this._months);\n\n data.milliseconds = mathAbs(data.milliseconds);\n data.seconds = mathAbs(data.seconds);\n data.minutes = mathAbs(data.minutes);\n data.hours = mathAbs(data.hours);\n data.months = mathAbs(data.months);\n data.years = mathAbs(data.years);\n\n return this;\n}\n\nfunction addSubtract$1(duration, input, value, direction) {\n var other = createDuration(input, value);\n\n duration._milliseconds += direction * other._milliseconds;\n duration._days += direction * other._days;\n duration._months += direction * other._months;\n\n return duration._bubble();\n}\n\n// supports only 2.0-style add(1, 's') or add(duration)\nfunction add$1(input, value) {\n return addSubtract$1(this, input, value, 1);\n}\n\n// supports only 2.0-style subtract(1, 's') or subtract(duration)\nfunction subtract$1(input, value) {\n return addSubtract$1(this, input, value, -1);\n}\n\nfunction absCeil(number) {\n if (number < 0) {\n return Math.floor(number);\n } else {\n return Math.ceil(number);\n }\n}\n\nfunction bubble() {\n var milliseconds = this._milliseconds,\n days = this._days,\n months = this._months,\n data = this._data,\n seconds,\n minutes,\n hours,\n years,\n monthsFromDays;\n\n // if we have a mix of positive and negative values, bubble down first\n // check: https://github.com/moment/moment/issues/2166\n if (\n !(\n (milliseconds >= 0 && days >= 0 && months >= 0) ||\n (milliseconds <= 0 && days <= 0 && months <= 0)\n )\n ) {\n milliseconds += absCeil(monthsToDays(months) + days) * 864e5;\n days = 0;\n months = 0;\n }\n\n // The following code bubbles up values, see the tests for\n // examples of what that means.\n data.milliseconds = milliseconds % 1000;\n\n seconds = absFloor(milliseconds / 1000);\n data.seconds = seconds % 60;\n\n minutes = absFloor(seconds / 60);\n data.minutes = minutes % 60;\n\n hours = absFloor(minutes / 60);\n data.hours = hours % 24;\n\n days += absFloor(hours / 24);\n\n // convert days to months\n monthsFromDays = absFloor(daysToMonths(days));\n months += monthsFromDays;\n days -= absCeil(monthsToDays(monthsFromDays));\n\n // 12 months -> 1 year\n years = absFloor(months / 12);\n months %= 12;\n\n data.days = days;\n data.months = months;\n data.years = years;\n\n return this;\n}\n\nfunction daysToMonths(days) {\n // 400 years have 146097 days (taking into account leap year rules)\n // 400 years have 12 months === 4800\n return (days * 4800) / 146097;\n}\n\nfunction monthsToDays(months) {\n // the reverse of daysToMonths\n return (months * 146097) / 4800;\n}\n\nfunction as(units) {\n if (!this.isValid()) {\n return NaN;\n }\n var days,\n months,\n milliseconds = this._milliseconds;\n\n units = normalizeUnits(units);\n\n if (units === 'month' || units === 'quarter' || units === 'year') {\n days = this._days + milliseconds / 864e5;\n months = this._months + daysToMonths(days);\n switch (units) {\n case 'month':\n return months;\n case 'quarter':\n return months / 3;\n case 'year':\n return months / 12;\n }\n } else {\n // handle milliseconds separately because of floating point math errors (issue #1867)\n days = this._days + Math.round(monthsToDays(this._months));\n switch (units) {\n case 'week':\n return days / 7 + milliseconds / 6048e5;\n case 'day':\n return days + milliseconds / 864e5;\n case 'hour':\n return days * 24 + milliseconds / 36e5;\n case 'minute':\n return days * 1440 + milliseconds / 6e4;\n case 'second':\n return days * 86400 + milliseconds / 1000;\n // Math.floor prevents floating point math errors here\n case 'millisecond':\n return Math.floor(days * 864e5) + milliseconds;\n default:\n throw new Error('Unknown unit ' + units);\n }\n }\n}\n\n// TODO: Use this.as('ms')?\nfunction valueOf$1() {\n if (!this.isValid()) {\n return NaN;\n }\n return (\n this._milliseconds +\n this._days * 864e5 +\n (this._months % 12) * 2592e6 +\n toInt(this._months / 12) * 31536e6\n );\n}\n\nfunction makeAs(alias) {\n return function () {\n return this.as(alias);\n };\n}\n\nvar asMilliseconds = makeAs('ms'),\n asSeconds = makeAs('s'),\n asMinutes = makeAs('m'),\n asHours = makeAs('h'),\n asDays = makeAs('d'),\n asWeeks = makeAs('w'),\n asMonths = makeAs('M'),\n asQuarters = makeAs('Q'),\n asYears = makeAs('y');\n\nfunction clone$1() {\n return createDuration(this);\n}\n\nfunction get$2(units) {\n units = normalizeUnits(units);\n return this.isValid() ? this[units + 's']() : NaN;\n}\n\nfunction makeGetter(name) {\n return function () {\n return this.isValid() ? this._data[name] : NaN;\n };\n}\n\nvar milliseconds = makeGetter('milliseconds'),\n seconds = makeGetter('seconds'),\n minutes = makeGetter('minutes'),\n hours = makeGetter('hours'),\n days = makeGetter('days'),\n months = makeGetter('months'),\n years = makeGetter('years');\n\nfunction weeks() {\n return absFloor(this.days() / 7);\n}\n\nvar round = Math.round,\n thresholds = {\n ss: 44, // a few seconds to seconds\n s: 45, // seconds to minute\n m: 45, // minutes to hour\n h: 22, // hours to day\n d: 26, // days to month/week\n w: null, // weeks to month\n M: 11, // months to year\n };\n\n// helper function for moment.fn.from, moment.fn.fromNow, and moment.duration.fn.humanize\nfunction substituteTimeAgo(string, number, withoutSuffix, isFuture, locale) {\n return locale.relativeTime(number || 1, !!withoutSuffix, string, isFuture);\n}\n\nfunction relativeTime$1(posNegDuration, withoutSuffix, thresholds, locale) {\n var duration = createDuration(posNegDuration).abs(),\n seconds = round(duration.as('s')),\n minutes = round(duration.as('m')),\n hours = round(duration.as('h')),\n days = round(duration.as('d')),\n months = round(duration.as('M')),\n weeks = round(duration.as('w')),\n years = round(duration.as('y')),\n a =\n (seconds <= thresholds.ss && ['s', seconds]) ||\n (seconds < thresholds.s && ['ss', seconds]) ||\n (minutes <= 1 && ['m']) ||\n (minutes < thresholds.m && ['mm', minutes]) ||\n (hours <= 1 && ['h']) ||\n (hours < thresholds.h && ['hh', hours]) ||\n (days <= 1 && ['d']) ||\n (days < thresholds.d && ['dd', days]);\n\n if (thresholds.w != null) {\n a =\n a ||\n (weeks <= 1 && ['w']) ||\n (weeks < thresholds.w && ['ww', weeks]);\n }\n a = a ||\n (months <= 1 && ['M']) ||\n (months < thresholds.M && ['MM', months]) ||\n (years <= 1 && ['y']) || ['yy', years];\n\n a[2] = withoutSuffix;\n a[3] = +posNegDuration > 0;\n a[4] = locale;\n return substituteTimeAgo.apply(null, a);\n}\n\n// This function allows you to set the rounding function for relative time strings\nfunction getSetRelativeTimeRounding(roundingFunction) {\n if (roundingFunction === undefined) {\n return round;\n }\n if (typeof roundingFunction === 'function') {\n round = roundingFunction;\n return true;\n }\n return false;\n}\n\n// This function allows you to set a threshold for relative time strings\nfunction getSetRelativeTimeThreshold(threshold, limit) {\n if (thresholds[threshold] === undefined) {\n return false;\n }\n if (limit === undefined) {\n return thresholds[threshold];\n }\n thresholds[threshold] = limit;\n if (threshold === 's') {\n thresholds.ss = limit - 1;\n }\n return true;\n}\n\nfunction humanize(argWithSuffix, argThresholds) {\n if (!this.isValid()) {\n return this.localeData().invalidDate();\n }\n\n var withSuffix = false,\n th = thresholds,\n locale,\n output;\n\n if (typeof argWithSuffix === 'object') {\n argThresholds = argWithSuffix;\n argWithSuffix = false;\n }\n if (typeof argWithSuffix === 'boolean') {\n withSuffix = argWithSuffix;\n }\n if (typeof argThresholds === 'object') {\n th = Object.assign({}, thresholds, argThresholds);\n if (argThresholds.s != null && argThresholds.ss == null) {\n th.ss = argThresholds.s - 1;\n }\n }\n\n locale = this.localeData();\n output = relativeTime$1(this, !withSuffix, th, locale);\n\n if (withSuffix) {\n output = locale.pastFuture(+this, output);\n }\n\n return locale.postformat(output);\n}\n\nvar abs$1 = Math.abs;\n\nfunction sign(x) {\n return (x > 0) - (x < 0) || +x;\n}\n\nfunction toISOString$1() {\n // for ISO strings we do not use the normal bubbling rules:\n // * milliseconds bubble up until they become hours\n // * days do not bubble at all\n // * months bubble up until they become years\n // This is because there is no context-free conversion between hours and days\n // (think of clock changes)\n // and also not between days and months (28-31 days per month)\n if (!this.isValid()) {\n return this.localeData().invalidDate();\n }\n\n var seconds = abs$1(this._milliseconds) / 1000,\n days = abs$1(this._days),\n months = abs$1(this._months),\n minutes,\n hours,\n years,\n s,\n total = this.asSeconds(),\n totalSign,\n ymSign,\n daysSign,\n hmsSign;\n\n if (!total) {\n // this is the same as C#'s (Noda) and python (isodate)...\n // but not other JS (goog.date)\n return 'P0D';\n }\n\n // 3600 seconds -> 60 minutes -> 1 hour\n minutes = absFloor(seconds / 60);\n hours = absFloor(minutes / 60);\n seconds %= 60;\n minutes %= 60;\n\n // 12 months -> 1 year\n years = absFloor(months / 12);\n months %= 12;\n\n // inspired by https://github.com/dordille/moment-isoduration/blob/master/moment.isoduration.js\n s = seconds ? seconds.toFixed(3).replace(/\\.?0+$/, '') : '';\n\n totalSign = total < 0 ? '-' : '';\n ymSign = sign(this._months) !== sign(total) ? '-' : '';\n daysSign = sign(this._days) !== sign(total) ? '-' : '';\n hmsSign = sign(this._milliseconds) !== sign(total) ? '-' : '';\n\n return (\n totalSign +\n 'P' +\n (years ? ymSign + years + 'Y' : '') +\n (months ? ymSign + months + 'M' : '') +\n (days ? daysSign + days + 'D' : '') +\n (hours || minutes || seconds ? 'T' : '') +\n (hours ? hmsSign + hours + 'H' : '') +\n (minutes ? hmsSign + minutes + 'M' : '') +\n (seconds ? hmsSign + s + 'S' : '')\n );\n}\n\nvar proto$2 = Duration.prototype;\n\nproto$2.isValid = isValid$1;\nproto$2.abs = abs;\nproto$2.add = add$1;\nproto$2.subtract = subtract$1;\nproto$2.as = as;\nproto$2.asMilliseconds = asMilliseconds;\nproto$2.asSeconds = asSeconds;\nproto$2.asMinutes = asMinutes;\nproto$2.asHours = asHours;\nproto$2.asDays = asDays;\nproto$2.asWeeks = asWeeks;\nproto$2.asMonths = asMonths;\nproto$2.asQuarters = asQuarters;\nproto$2.asYears = asYears;\nproto$2.valueOf = valueOf$1;\nproto$2._bubble = bubble;\nproto$2.clone = clone$1;\nproto$2.get = get$2;\nproto$2.milliseconds = milliseconds;\nproto$2.seconds = seconds;\nproto$2.minutes = minutes;\nproto$2.hours = hours;\nproto$2.days = days;\nproto$2.weeks = weeks;\nproto$2.months = months;\nproto$2.years = years;\nproto$2.humanize = humanize;\nproto$2.toISOString = toISOString$1;\nproto$2.toString = toISOString$1;\nproto$2.toJSON = toISOString$1;\nproto$2.locale = locale;\nproto$2.localeData = localeData;\n\nproto$2.toIsoString = deprecate(\n 'toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)',\n toISOString$1\n);\nproto$2.lang = lang;\n\n// FORMATTING\n\naddFormatToken('X', 0, 0, 'unix');\naddFormatToken('x', 0, 0, 'valueOf');\n\n// PARSING\n\naddRegexToken('x', matchSigned);\naddRegexToken('X', matchTimestamp);\naddParseToken('X', function (input, array, config) {\n config._d = new Date(parseFloat(input) * 1000);\n});\naddParseToken('x', function (input, array, config) {\n config._d = new Date(toInt(input));\n});\n\n//! moment.js\n\nhooks.version = '2.29.4';\n\nsetHookCallback(createLocal);\n\nhooks.fn = proto;\nhooks.min = min;\nhooks.max = max;\nhooks.now = now;\nhooks.utc = createUTC;\nhooks.unix = createUnix;\nhooks.months = listMonths;\nhooks.isDate = isDate;\nhooks.locale = getSetGlobalLocale;\nhooks.invalid = createInvalid;\nhooks.duration = createDuration;\nhooks.isMoment = isMoment;\nhooks.weekdays = listWeekdays;\nhooks.parseZone = createInZone;\nhooks.localeData = getLocale;\nhooks.isDuration = isDuration;\nhooks.monthsShort = listMonthsShort;\nhooks.weekdaysMin = listWeekdaysMin;\nhooks.defineLocale = defineLocale;\nhooks.updateLocale = updateLocale;\nhooks.locales = listLocales;\nhooks.weekdaysShort = listWeekdaysShort;\nhooks.normalizeUnits = normalizeUnits;\nhooks.relativeTimeRounding = getSetRelativeTimeRounding;\nhooks.relativeTimeThreshold = getSetRelativeTimeThreshold;\nhooks.calendarFormat = getCalendarFormat;\nhooks.prototype = proto;\n\n// currently HTML5 input type only supports 24-hour formats\nhooks.HTML5_FMT = {\n DATETIME_LOCAL: 'YYYY-MM-DDTHH:mm', // \n DATETIME_LOCAL_SECONDS: 'YYYY-MM-DDTHH:mm:ss', // \n DATETIME_LOCAL_MS: 'YYYY-MM-DDTHH:mm:ss.SSS', // \n DATE: 'YYYY-MM-DD', // \n TIME: 'HH:mm', // \n TIME_SECONDS: 'HH:mm:ss', // \n TIME_MS: 'HH:mm:ss.SSS', // \n WEEK: 'GGGG-[W]WW', // \n MONTH: 'YYYY-MM', // \n};\n\nexport default hooks;\n","\n\n\n","import type { ItemTextDto } from \"@/models/dto/questionDto\";\n\nexport class CertificateModel {\n label: string = \"\";\n details: string = \"\";\n expiryDate: string = \"\";\n auditDate: string = \"\";\n auditResult: ItemTextDto = { id: \"\", text: \"\" };\n checked: boolean = false;\n\n constructor(certificateName: string, details: string) {\n this.label = certificateName;\n this.details = details;\n }\n\n setChecked(newChecked: boolean): void {\n this.checked = newChecked;\n if (!this.checked) {\n this.expiryDate = \"\";\n this.expiryDate = \"\";\n this.auditDate = \"\";\n this.auditResult.id = \"\";\n this.auditResult.text = \"\";\n }\n }\n\n toAnswerModel(): AnswerCertificateModel {\n return new AnswerCertificateModel(\n this.label,\n this.expiryDate,\n this.auditDate,\n this.auditResult.id,\n this.checked\n );\n }\n}\n\nexport class AnswerCertificateModel {\n label: string;\n expiryDate: string;\n auditDate: string;\n auditResult: string;\n checked: boolean;\n\n constructor(\n label: string,\n expiryDate: string,\n auditDate: string,\n auditResult: string,\n checked: boolean\n ) {\n this.label = label;\n this.expiryDate = expiryDate;\n this.auditDate = auditDate;\n this.auditResult = auditResult;\n this.checked = checked;\n }\n}\n","\n\n\n","\n\n\n","export class ConsentPerson {\n name: string;\n surname: string;\n birth: string;\n nationality: string;\n position: string;\n\n constructor(person?: ConsentPerson | null) {\n this.name = person?.name ?? \"\";\n this.surname = person?.surname ?? \"\";\n this.birth = person?.birth ?? \"\";\n this.nationality = person?.nationality ?? \"\";\n this.position = person?.position ?? \"\";\n }\n}\n","\n\n\n","\n\n\n","\n\n\n","export default class ContactPerson {\n name: string = \"\";\n email: string = \"\";\n phone: string = \"\";\n dialCode: string = \"\";\n}\n","\n\n\n","\n\n\n","import { vModelText as _vModelText, withDirectives as _withDirectives, mergeProps as _mergeProps, resolveDirective as _resolveDirective, createVNode as _createVNode, Fragment as _Fragment } from \"vue\";\n// Styles\nimport \"./VTextarea.css\";\nimport \"../VTextField/VTextField.css\";\n\n// Components\nimport { VCounter } from \"../VCounter/VCounter.mjs\";\nimport { VField } from \"../VField/index.mjs\";\nimport { filterFieldProps, makeVFieldProps } from \"../VField/VField.mjs\";\nimport { makeVInputProps, VInput } from \"../VInput/VInput.mjs\"; // Composables\nimport { useFocus } from \"../../composables/focus.mjs\";\nimport { forwardRefs } from \"../../composables/forwardRefs.mjs\";\nimport { useProxiedModel } from \"../../composables/proxiedModel.mjs\"; // Directives\nimport Intersect from \"../../directives/intersect/index.mjs\"; // Utilities\nimport { computed, nextTick, onBeforeUnmount, onMounted, ref, shallowRef, watch, watchEffect } from 'vue';\nimport { callEvent, clamp, convertToUnit, filterInputAttrs, genericComponent, propsFactory, useRender } from \"../../util/index.mjs\"; // Types\nexport const makeVTextareaProps = propsFactory({\n autoGrow: Boolean,\n autofocus: Boolean,\n counter: [Boolean, Number, String],\n counterValue: Function,\n prefix: String,\n placeholder: String,\n persistentPlaceholder: Boolean,\n persistentCounter: Boolean,\n noResize: Boolean,\n rows: {\n type: [Number, String],\n default: 5,\n validator: v => !isNaN(parseFloat(v))\n },\n maxRows: {\n type: [Number, String],\n validator: v => !isNaN(parseFloat(v))\n },\n suffix: String,\n modelModifiers: Object,\n ...makeVInputProps(),\n ...makeVFieldProps()\n}, 'VTextarea');\nexport const VTextarea = genericComponent()({\n name: 'VTextarea',\n directives: {\n Intersect\n },\n inheritAttrs: false,\n props: makeVTextareaProps(),\n emits: {\n 'click:control': e => true,\n 'mousedown:control': e => true,\n 'update:focused': focused => true,\n 'update:modelValue': val => true\n },\n setup(props, _ref) {\n let {\n attrs,\n emit,\n slots\n } = _ref;\n const model = useProxiedModel(props, 'modelValue');\n const {\n isFocused,\n focus,\n blur\n } = useFocus(props);\n const counterValue = computed(() => {\n return typeof props.counterValue === 'function' ? props.counterValue(model.value) : (model.value || '').toString().length;\n });\n const max = computed(() => {\n if (attrs.maxlength) return attrs.maxlength;\n if (!props.counter || typeof props.counter !== 'number' && typeof props.counter !== 'string') return undefined;\n return props.counter;\n });\n function onIntersect(isIntersecting, entries) {\n if (!props.autofocus || !isIntersecting) return;\n entries[0].target?.focus?.();\n }\n const vInputRef = ref();\n const vFieldRef = ref();\n const controlHeight = shallowRef('');\n const textareaRef = ref();\n const isActive = computed(() => props.persistentPlaceholder || isFocused.value || props.active);\n function onFocus() {\n if (textareaRef.value !== document.activeElement) {\n textareaRef.value?.focus();\n }\n if (!isFocused.value) focus();\n }\n function onControlClick(e) {\n onFocus();\n emit('click:control', e);\n }\n function onControlMousedown(e) {\n emit('mousedown:control', e);\n }\n function onClear(e) {\n e.stopPropagation();\n onFocus();\n nextTick(() => {\n model.value = '';\n callEvent(props['onClick:clear'], e);\n });\n }\n function onInput(e) {\n const el = e.target;\n model.value = el.value;\n if (props.modelModifiers?.trim) {\n const caretPosition = [el.selectionStart, el.selectionEnd];\n nextTick(() => {\n el.selectionStart = caretPosition[0];\n el.selectionEnd = caretPosition[1];\n });\n }\n }\n const sizerRef = ref();\n const rows = ref(+props.rows);\n const isPlainOrUnderlined = computed(() => ['plain', 'underlined'].includes(props.variant));\n watchEffect(() => {\n if (!props.autoGrow) rows.value = +props.rows;\n });\n function calculateInputHeight() {\n if (!props.autoGrow) return;\n nextTick(() => {\n if (!sizerRef.value || !vFieldRef.value) return;\n const style = getComputedStyle(sizerRef.value);\n const fieldStyle = getComputedStyle(vFieldRef.value.$el);\n const padding = parseFloat(style.getPropertyValue('--v-field-padding-top')) + parseFloat(style.getPropertyValue('--v-input-padding-top')) + parseFloat(style.getPropertyValue('--v-field-padding-bottom'));\n const height = sizerRef.value.scrollHeight;\n const lineHeight = parseFloat(style.lineHeight);\n const minHeight = Math.max(parseFloat(props.rows) * lineHeight + padding, parseFloat(fieldStyle.getPropertyValue('--v-input-control-height')));\n const maxHeight = parseFloat(props.maxRows) * lineHeight + padding || Infinity;\n const newHeight = clamp(height ?? 0, minHeight, maxHeight);\n rows.value = Math.floor((newHeight - padding) / lineHeight);\n controlHeight.value = convertToUnit(newHeight);\n });\n }\n onMounted(calculateInputHeight);\n watch(model, calculateInputHeight);\n watch(() => props.rows, calculateInputHeight);\n watch(() => props.maxRows, calculateInputHeight);\n watch(() => props.density, calculateInputHeight);\n let observer;\n watch(sizerRef, val => {\n if (val) {\n observer = new ResizeObserver(calculateInputHeight);\n observer.observe(sizerRef.value);\n } else {\n observer?.disconnect();\n }\n });\n onBeforeUnmount(() => {\n observer?.disconnect();\n });\n useRender(() => {\n const hasCounter = !!(slots.counter || props.counter || props.counterValue);\n const hasDetails = !!(hasCounter || slots.details);\n const [rootAttrs, inputAttrs] = filterInputAttrs(attrs);\n const [{\n modelValue: _,\n ...inputProps\n }] = VInput.filterProps(props);\n const [fieldProps] = filterFieldProps(props);\n return _createVNode(VInput, _mergeProps({\n \"ref\": vInputRef,\n \"modelValue\": model.value,\n \"onUpdate:modelValue\": $event => model.value = $event,\n \"class\": ['v-textarea v-text-field', {\n 'v-textarea--prefixed': props.prefix,\n 'v-textarea--suffixed': props.suffix,\n 'v-text-field--prefixed': props.prefix,\n 'v-text-field--suffixed': props.suffix,\n 'v-textarea--auto-grow': props.autoGrow,\n 'v-textarea--no-resize': props.noResize || props.autoGrow,\n 'v-text-field--plain-underlined': isPlainOrUnderlined.value\n }, props.class],\n \"style\": props.style\n }, rootAttrs, inputProps, {\n \"centerAffix\": rows.value === 1 && !isPlainOrUnderlined.value,\n \"focused\": isFocused.value\n }), {\n ...slots,\n default: _ref2 => {\n let {\n isDisabled,\n isDirty,\n isReadonly,\n isValid\n } = _ref2;\n return _createVNode(VField, _mergeProps({\n \"ref\": vFieldRef,\n \"style\": {\n '--v-textarea-control-height': controlHeight.value\n },\n \"onClick\": onControlClick,\n \"onMousedown\": onControlMousedown,\n \"onClick:clear\": onClear,\n \"onClick:prependInner\": props['onClick:prependInner'],\n \"onClick:appendInner\": props['onClick:appendInner'],\n \"role\": \"textbox\"\n }, fieldProps, {\n \"active\": isActive.value || isDirty.value,\n \"centerAffix\": rows.value === 1 && !isPlainOrUnderlined.value,\n \"dirty\": isDirty.value || props.dirty,\n \"disabled\": isDisabled.value,\n \"focused\": isFocused.value,\n \"error\": isValid.value === false\n }), {\n ...slots,\n default: _ref3 => {\n let {\n props: {\n class: fieldClass,\n ...slotProps\n }\n } = _ref3;\n return _createVNode(_Fragment, null, [props.prefix && _createVNode(\"span\", {\n \"class\": \"v-text-field__prefix\"\n }, [props.prefix]), _withDirectives(_createVNode(\"textarea\", _mergeProps({\n \"ref\": textareaRef,\n \"class\": fieldClass,\n \"value\": model.value,\n \"onInput\": onInput,\n \"autofocus\": props.autofocus,\n \"readonly\": isReadonly.value,\n \"disabled\": isDisabled.value,\n \"placeholder\": props.placeholder,\n \"rows\": props.rows,\n \"name\": props.name,\n \"onFocus\": onFocus,\n \"onBlur\": blur\n }, slotProps, inputAttrs), null), [[_resolveDirective(\"intersect\"), {\n handler: onIntersect\n }, null, {\n once: true\n }]]), props.autoGrow && _withDirectives(_createVNode(\"textarea\", {\n \"class\": [fieldClass, 'v-textarea__sizer'],\n \"onUpdate:modelValue\": $event => model.value = $event,\n \"ref\": sizerRef,\n \"readonly\": true,\n \"aria-hidden\": \"true\"\n }, null), [[_vModelText, model.value]]), props.suffix && _createVNode(\"span\", {\n \"class\": \"v-text-field__suffix\"\n }, [props.suffix])]);\n }\n });\n },\n details: hasDetails ? slotProps => _createVNode(_Fragment, null, [slots.details?.(slotProps), hasCounter && _createVNode(_Fragment, null, [_createVNode(\"span\", null, null), _createVNode(VCounter, {\n \"active\": props.persistentCounter || isFocused.value,\n \"value\": counterValue.value,\n \"max\": max.value\n }, slots.counter)])]) : undefined\n });\n });\n return forwardRefs({}, vInputRef, vFieldRef, textareaRef);\n }\n});\n//# sourceMappingURL=VTextarea.mjs.map","\n\n\n","export class CheckboxModel {\n label: string = \"\";\n checked: boolean = false;\n\n private _id: string = \"\";\n\n get id(): string {\n return this._id == null || this._id == \"\" ? this.label : this._id;\n }\n\n set id(newId: string) {\n this._id = newId;\n }\n\n constructor(id: string, label: string) {\n this.id = id;\n this.label = label;\n }\n\n toAnswerModel(): AnswersCheckboxModel {\n return new AnswersCheckboxModel(this.id, this.checked);\n }\n}\n\nexport class AnswersCheckboxModel {\n label: string;\n checked: boolean;\n\n constructor(label: string, checked: boolean) {\n this.label = label;\n this.checked = checked;\n }\n}\n","\n\n\n","import type { StringBoolean } from \"@/models/enum/stringBoolean\";\n\nexport class BooleanWithMultiSelect {\n boolean: StringBoolean | string = \"\";\n selectedItems: string[] = new Array();\n}","\n\n\n","\n\n","\n\n\n\n\n","export class Person {\n name: string;\n surname: string;\n birth: string;\n nationality: string;\n position: string;\n\n constructor(person?: AnswerPerson) {\n if (person == undefined) {\n this.name = \"\";\n this.surname = \"\";\n this.birth = \"\";\n this.nationality = \"\";\n this.position = \"\";\n } else {\n this.name = person.name;\n this.surname = person.surname;\n this.birth = person.birth;\n this.nationality = person.nationality;\n this.position = person.position;\n }\n }\n\n toAnswerModel(): AnswerPerson {\n return new AnswerPerson(this);\n }\n}\n\nexport class AnswerPerson {\n name: string;\n surname: string;\n birth: string;\n nationality: string;\n position: string;\n\n constructor(person: Person) {\n this.name = person.name;\n this.surname = person.surname;\n this.birth = person.birth;\n this.nationality = person.nationality;\n this.position = person.position;\n }\n}\n","import { StringBoolean } from \"@/models/enum/stringBoolean\";\nimport { AnswerPerson, Person } from \"@/models/persons/person\";\n\nexport class KeyPersonnel extends Person {\n pep: string;\n pepPosition: string;\n pepCountry: string;\n\n constructor(keyPersonnel?: AnswerKeyPersonnel) {\n super(keyPersonnel);\n if (keyPersonnel == undefined) {\n this.pep = \"\";\n this.pepPosition = \"\";\n this.pepCountry = \"\";\n } else {\n this.pep = keyPersonnel.pep;\n this.pepPosition = keyPersonnel.pepPosition;\n this.pepCountry = keyPersonnel.pepCountry;\n }\n }\n\n setPep(pepValue: string): void {\n this.pep = pepValue;\n if (pepValue != StringBoolean.Yes) {\n this.pepPosition = \"\";\n this.pepCountry = \"\";\n }\n }\n\n toAnswerModel(): AnswerKeyPersonnel {\n return new AnswerKeyPersonnel(this);\n }\n}\n\nexport class AnswerKeyPersonnel extends AnswerPerson {\n pep: string;\n pepPosition: string;\n pepCountry: string;\n\n constructor(keyPersonnel: KeyPersonnel) {\n super(keyPersonnel);\n this.pep = keyPersonnel.pep;\n this.pepPosition = keyPersonnel.pepPosition;\n this.pepCountry = keyPersonnel.pepCountry;\n }\n}\n","import type { QuestionnaireItemDto } from \"@/models/dto/questionnaireItemSetDto\";\nimport { QuestionType } from \"@/models/enum/questionType\";\nimport { AnswerKeyPersonnel } from \"@/models/persons/keyPersonnel\";\nimport { AnswerBeneficialOwner } from \"@/models/persons/beneficialOwner\";\nimport type { AnswerIndividualOwner } from \"@/models/persons/individualOwner\";\nimport type { AnswerCompanyOwner } from \"@/models/questions/companyOwner\";\nimport type {\n AnswerPersonWithPepAndSanctions,\n PersonWithPepAndSanctions,\n} from \"@/models/persons/personWithPepAndSanctions\";\nimport type { AnswerPersonWithNameAndPosition } from \"@/models/persons/personWithNameAndPosition\";\n\nconst stringQuestionTypes = [\n QuestionType.Text,\n QuestionType.Select,\n QuestionType.Date,\n QuestionType.TextArea,\n];\n\nexport const answerSetIsComplete = (answerSet: QuestionnaireItemDto[]) => {\n const someRequiredAnswersAreNull = answerSet.some(\n (x) => !x.answers && (x.questionModel.validations?.required ?? true)\n );\n\n if (someRequiredAnswersAreNull) {\n return false;\n }\n\n for (const answer of answerSet) {\n if (!answer.questionModel.validations?.required ?? true) {\n continue;\n }\n\n if (stringQuestionTypes.includes(answer.questionModel.question.type)) {\n if (\n typeof answer.answers === \"string\" &&\n answer.answers.trim().length === 0\n ) {\n return false;\n }\n continue;\n }\n\n if (answer.questionModel.question.type === QuestionType.Multiselect) {\n if (Array.isArray(answer.answers) && answer.answers.length === 0) {\n return false;\n }\n continue;\n }\n\n if (answer.questionModel.question.type === QuestionType.ListOfCheckboxes) {\n if (\n Array.isArray(answer.answers) &&\n answer.answers.every((item) => item[\"checked\"] === false)\n ) {\n return false;\n }\n }\n }\n return true;\n};\n\nexport function personnelAnswerComplete(\n answers: AnswerKeyPersonnel[] | null | undefined\n) {\n if (answers === null || answers === undefined) {\n return false;\n } else if (answers.length > 1) {\n return true;\n } else if (Object.values(answers[0]).every((x) => x === null || x === \"\")) {\n return false;\n } else {\n return true;\n }\n}\n\nexport function individualOwnershipAnswerComplete(\n answers: AnswerIndividualOwner[] | null | undefined\n) {\n if (answers === null || answers === undefined) {\n return false;\n } else if (answers.length > 1) {\n return true;\n } else return !individualOwnerIsEmpty(answers[0]);\n}\n\nexport function personsWithPepAndSanctionsAnswerComplete(\n answers: AnswerPersonWithPepAndSanctions[] | null | undefined\n) {\n if (answers === null || answers === undefined) {\n return false;\n } else if (answers.length > 1) {\n return true;\n } else return !personWithPepAndSanctionsIsEmpty(answers[0]);\n}\n\nfunction personWithPepAndSanctionsIsEmpty(\n o: PersonWithPepAndSanctions\n): boolean {\n const { [\"pepRca\"]: pepRca, ...everyThingElse } = o;\n return objectIsEmpty(pepRca) && objectIsEmpty(everyThingElse);\n}\n\nexport function personsWithNameAndPositionAnswerComplete(\n answers: AnswerPersonWithNameAndPosition[] | null | undefined\n) {\n if (answers === null || answers === undefined) {\n return false;\n } else if (answers.length > 1) {\n return true;\n } else return !objectIsEmpty(answers[0]);\n}\n\nfunction individualOwnerIsEmpty(o: AnswerIndividualOwner): boolean {\n const { [\"address\"]: address, [\"pepRca\"]: pepRca, ...everyThingElse } = o;\n return (\n objectIsEmpty(address) &&\n objectIsEmpty(pepRca) &&\n objectIsEmpty(everyThingElse)\n );\n}\n\nexport function companyOwnershipAnswerComplete(\n answers: AnswerCompanyOwner[] | null | undefined\n) {\n if (answers === null || answers === undefined) {\n return false;\n } else if (answers.length > 1) {\n return true;\n } else return !companyOwnerIsEmpty(answers[0]);\n}\n\nfunction companyOwnerIsEmpty(o: AnswerCompanyOwner): boolean {\n const { [\"address\"]: address, ...everyThingElse } = o;\n return objectIsEmpty(address) && objectIsEmpty(everyThingElse);\n}\n\nexport function ownershipAnswerComplete(\n answers: AnswerBeneficialOwner[] | null | undefined\n) {\n if (answers === null || answers === undefined) {\n return false;\n } else if (answers.length > 1) {\n return true;\n } else return !beneficialOwnerIsEmpty(answers[0]);\n}\n\nfunction beneficialOwnerIsEmpty(o: AnswerBeneficialOwner): boolean {\n const { [\"address\"]: address, ...answerNoAddress } = o;\n return objectIsEmpty(address) && objectIsEmpty(answerNoAddress);\n}\n\nexport function objectIsEmpty(obj: object): boolean {\n return Object.values(obj).every((v) => v === null || v === \"\");\n}\n","\n\n\n","import type Address from \"@/models/questions/address\";\nimport {\n AnswerKeyPersonnel,\n KeyPersonnel,\n} from \"@/models/persons/keyPersonnel\";\n\nexport class BeneficialOwner extends KeyPersonnel {\n address: Address;\n share: string;\n\n constructor(beneficialOwner?: AnswerBeneficialOwner) {\n super(beneficialOwner);\n if (beneficialOwner == undefined) {\n this.address = { street: \"\", city: \"\", country: \"\", region: \"\" };\n this.share = \"\";\n } else {\n this.address = {\n street: beneficialOwner.address?.street ?? \"\",\n city: beneficialOwner.address?.city ?? \"\",\n country: beneficialOwner.address?.country ?? \"\",\n region: beneficialOwner.address?.region ?? \"\",\n };\n this.share = beneficialOwner.share;\n }\n }\n\n toAnswerModel(): AnswerBeneficialOwner {\n return new AnswerBeneficialOwner(this);\n }\n}\n\nexport class AnswerBeneficialOwner extends AnswerKeyPersonnel {\n address: Address;\n share: string;\n\n constructor(beneficialOwner: BeneficialOwner) {\n super(beneficialOwner);\n this.address = {\n street: beneficialOwner.address?.street ?? \"\",\n city: beneficialOwner.address?.city ?? \"\",\n country: beneficialOwner.address?.country ?? \"\",\n region: beneficialOwner.address?.region ?? \"\",\n };\n this.share = beneficialOwner.share;\n }\n}\n","import { createTextVNode as _createTextVNode, mergeProps as _mergeProps, createVNode as _createVNode, Fragment as _Fragment } from \"vue\";\n// Styles\nimport \"./VCombobox.css\";\n\n// Components\nimport { VCheckboxBtn } from \"../VCheckbox/index.mjs\";\nimport { VChip } from \"../VChip/index.mjs\";\nimport { VDefaultsProvider } from \"../VDefaultsProvider/index.mjs\";\nimport { VIcon } from \"../VIcon/index.mjs\";\nimport { VList, VListItem } from \"../VList/index.mjs\";\nimport { VMenu } from \"../VMenu/index.mjs\";\nimport { makeSelectProps } from \"../VSelect/VSelect.mjs\";\nimport { VTextField } from \"../VTextField/index.mjs\";\nimport { makeVTextFieldProps } from \"../VTextField/VTextField.mjs\"; // Composables\nimport { useTextColor } from \"../../composables/color.mjs\";\nimport { makeFilterProps, useFilter } from \"../../composables/filter.mjs\";\nimport { useForm } from \"../../composables/form.mjs\";\nimport { forwardRefs } from \"../../composables/forwardRefs.mjs\";\nimport { transformItem, useItems } from \"../../composables/list-items.mjs\";\nimport { useLocale } from \"../../composables/locale.mjs\";\nimport { useProxiedModel } from \"../../composables/proxiedModel.mjs\";\nimport { makeTransitionProps } from \"../../composables/transition.mjs\"; // Utilities\nimport { computed, mergeProps, nextTick, ref, shallowRef, watch } from 'vue';\nimport { genericComponent, noop, omit, propsFactory, useRender, wrapInArray } from \"../../util/index.mjs\"; // Types\nfunction highlightResult(text, matches, length) {\n if (matches == null) return text;\n if (Array.isArray(matches)) throw new Error('Multiple matches is not implemented');\n return typeof matches === 'number' && ~matches ? _createVNode(_Fragment, null, [_createVNode(\"span\", {\n \"class\": \"v-combobox__unmask\"\n }, [text.substr(0, matches)]), _createVNode(\"span\", {\n \"class\": \"v-combobox__mask\"\n }, [text.substr(matches, length)]), _createVNode(\"span\", {\n \"class\": \"v-combobox__unmask\"\n }, [text.substr(matches + length)])]) : text;\n}\nexport const makeVComboboxProps = propsFactory({\n autoSelectFirst: {\n type: [Boolean, String]\n },\n delimiters: Array,\n ...makeFilterProps({\n filterKeys: ['title']\n }),\n ...makeSelectProps({\n hideNoData: true,\n returnObject: true\n }),\n ...omit(makeVTextFieldProps({\n modelValue: null\n }), ['validationValue', 'dirty', 'appendInnerIcon']),\n ...makeTransitionProps({\n transition: false\n })\n}, 'VCombobox');\nexport const VCombobox = genericComponent()({\n name: 'VCombobox',\n props: makeVComboboxProps(),\n emits: {\n 'update:focused': focused => true,\n 'update:modelValue': val => true,\n 'update:search': val => true,\n 'update:menu': val => true\n },\n setup(props, _ref) {\n let {\n emit,\n slots\n } = _ref;\n const {\n t\n } = useLocale();\n const vTextFieldRef = ref();\n const isFocused = shallowRef(false);\n const isPristine = shallowRef(true);\n const listHasFocus = ref(false);\n const vMenuRef = ref();\n const _menu = useProxiedModel(props, 'menu');\n const menu = computed({\n get: () => _menu.value,\n set: v => {\n if (_menu.value && !v && vMenuRef.value?.ΨopenChildren) return;\n _menu.value = v;\n }\n });\n const selectionIndex = shallowRef(-1);\n let cleared = false;\n const color = computed(() => vTextFieldRef.value?.color);\n const {\n items,\n transformIn,\n transformOut\n } = useItems(props);\n const {\n textColorClasses,\n textColorStyles\n } = useTextColor(color);\n const model = useProxiedModel(props, 'modelValue', [], v => transformIn(wrapInArray(v)), v => {\n const transformed = transformOut(v);\n return props.multiple ? transformed : transformed[0] ?? null;\n });\n const form = useForm();\n const _search = shallowRef(!props.multiple ? model.value[0]?.title ?? '' : '');\n const search = computed({\n get: () => {\n return _search.value;\n },\n set: val => {\n _search.value = val;\n if (!props.multiple) {\n model.value = [transformItem(props, val)];\n }\n if (val && props.multiple && props.delimiters?.length) {\n const values = val.split(new RegExp(`(?:${props.delimiters.join('|')})+`));\n if (values.length > 1) {\n values.forEach(v => {\n v = v.trim();\n if (v) select(transformItem(props, v));\n });\n _search.value = '';\n }\n }\n if (!val) selectionIndex.value = -1;\n isPristine.value = !val;\n }\n });\n watch(_search, value => {\n if (cleared) {\n // wait for clear to finish, VTextField sets _search to null\n // then search computed triggers and updates _search to ''\n nextTick(() => cleared = false);\n } else if (isFocused.value && !menu.value) {\n menu.value = true;\n }\n emit('update:search', value);\n });\n watch(model, value => {\n if (!props.multiple) {\n _search.value = value[0]?.title ?? '';\n }\n });\n const {\n filteredItems,\n getMatches\n } = useFilter(props, items, computed(() => isPristine.value ? undefined : search.value));\n const selections = computed(() => {\n return model.value.map(v => {\n return items.value.find(item => props.valueComparator(item.value, v.value)) || v;\n });\n });\n const displayItems = computed(() => {\n if (props.hideSelected) {\n return filteredItems.value.filter(filteredItem => !selections.value.some(s => s.value === filteredItem.value));\n }\n return filteredItems.value;\n });\n const selected = computed(() => selections.value.map(selection => selection.props.value));\n const selection = computed(() => selections.value[selectionIndex.value]);\n const highlightFirst = computed(() => {\n const selectFirst = props.autoSelectFirst === true || props.autoSelectFirst === 'exact' && search.value === displayItems.value[0]?.title;\n return selectFirst && displayItems.value.length > 0 && !isPristine.value && !listHasFocus.value;\n });\n const menuDisabled = computed(() => props.hideNoData && !items.value.length || props.readonly || form?.isReadonly.value);\n const listRef = ref();\n function onClear(e) {\n cleared = true;\n if (props.openOnClear) {\n menu.value = true;\n }\n }\n function onMousedownControl() {\n if (menuDisabled.value) return;\n menu.value = true;\n }\n function onMousedownMenuIcon(e) {\n if (menuDisabled.value) return;\n if (isFocused.value) {\n e.preventDefault();\n e.stopPropagation();\n }\n menu.value = !menu.value;\n }\n function onKeydown(e) {\n if (props.readonly || form?.isReadonly.value) return;\n const selectionStart = vTextFieldRef.value.selectionStart;\n const length = selected.value.length;\n if (selectionIndex.value > -1 || ['Enter', 'ArrowDown', 'ArrowUp'].includes(e.key)) {\n e.preventDefault();\n }\n if (['Enter', 'ArrowDown'].includes(e.key)) {\n menu.value = true;\n }\n if (['Escape'].includes(e.key)) {\n menu.value = false;\n }\n if (['Enter', 'Escape', 'Tab'].includes(e.key)) {\n if (highlightFirst.value && ['Enter', 'Tab'].includes(e.key)) {\n select(filteredItems.value[0]);\n }\n isPristine.value = true;\n }\n if (e.key === 'ArrowDown' && highlightFirst.value) {\n listRef.value?.focus('next');\n }\n if (!props.multiple) return;\n if (['Backspace', 'Delete'].includes(e.key)) {\n if (selectionIndex.value < 0) {\n if (e.key === 'Backspace' && !search.value) {\n selectionIndex.value = length - 1;\n }\n return;\n }\n const originalSelectionIndex = selectionIndex.value;\n if (selection.value) select(selection.value);\n selectionIndex.value = originalSelectionIndex >= length - 1 ? length - 2 : originalSelectionIndex;\n }\n if (e.key === 'ArrowLeft') {\n if (selectionIndex.value < 0 && selectionStart > 0) return;\n const prev = selectionIndex.value > -1 ? selectionIndex.value - 1 : length - 1;\n if (selections.value[prev]) {\n selectionIndex.value = prev;\n } else {\n selectionIndex.value = -1;\n vTextFieldRef.value.setSelectionRange(search.value.length, search.value.length);\n }\n }\n if (e.key === 'ArrowRight') {\n if (selectionIndex.value < 0) return;\n const next = selectionIndex.value + 1;\n if (selections.value[next]) {\n selectionIndex.value = next;\n } else {\n selectionIndex.value = -1;\n vTextFieldRef.value.setSelectionRange(0, 0);\n }\n }\n if (e.key === 'Enter' && search.value) {\n select(transformItem(props, search.value));\n search.value = '';\n }\n }\n function onListKeydown(e) {\n if (e.key === 'Tab') {\n vTextFieldRef.value?.focus();\n }\n }\n function onAfterLeave() {\n if (isFocused.value) {\n isPristine.value = true;\n vTextFieldRef.value?.focus();\n }\n }\n function select(item) {\n if (props.multiple) {\n const index = selected.value.findIndex(selection => props.valueComparator(selection, item.value));\n if (index === -1) {\n model.value = [...model.value, item];\n } else {\n const value = [...model.value];\n value.splice(index, 1);\n model.value = value;\n }\n search.value = '';\n } else {\n model.value = [item];\n _search.value = item.title;\n\n // watch for search watcher to trigger\n nextTick(() => {\n menu.value = false;\n isPristine.value = true;\n });\n }\n }\n function onFocusin(e) {\n isFocused.value = true;\n setTimeout(() => {\n listHasFocus.value = true;\n });\n }\n function onFocusout(e) {\n listHasFocus.value = false;\n }\n function onUpdateModelValue(v) {\n if (v == null || v === '' && !props.multiple) model.value = [];\n }\n watch(filteredItems, val => {\n if (!val.length && props.hideNoData) menu.value = false;\n });\n watch(isFocused, (val, oldVal) => {\n if (val || val === oldVal) return;\n selectionIndex.value = -1;\n menu.value = false;\n if (highlightFirst.value && !listHasFocus.value && !selections.value.some(_ref2 => {\n let {\n value\n } = _ref2;\n return value === displayItems.value[0].value;\n })) {\n select(displayItems.value[0]);\n } else if (props.multiple && search.value) {\n model.value = [...model.value, transformItem(props, search.value)];\n search.value = '';\n }\n });\n useRender(() => {\n const hasChips = !!(props.chips || slots.chip);\n const hasList = !!(!props.hideNoData || displayItems.value.length || slots['prepend-item'] || slots['append-item'] || slots['no-data']);\n const isDirty = model.value.length > 0;\n const [textFieldProps] = VTextField.filterProps(props);\n return _createVNode(VTextField, _mergeProps({\n \"ref\": vTextFieldRef\n }, textFieldProps, {\n \"modelValue\": search.value,\n \"onUpdate:modelValue\": [$event => search.value = $event, onUpdateModelValue],\n \"focused\": isFocused.value,\n \"onUpdate:focused\": $event => isFocused.value = $event,\n \"validationValue\": model.externalValue,\n \"dirty\": isDirty,\n \"class\": ['v-combobox', {\n 'v-combobox--active-menu': menu.value,\n 'v-combobox--chips': !!props.chips,\n 'v-combobox--selection-slot': !!slots.selection,\n 'v-combobox--selecting-index': selectionIndex.value > -1,\n [`v-combobox--${props.multiple ? 'multiple' : 'single'}`]: true\n }, props.class],\n \"style\": props.style,\n \"readonly\": props.readonly,\n \"placeholder\": isDirty ? undefined : props.placeholder,\n \"onClick:clear\": onClear,\n \"onMousedown:control\": onMousedownControl,\n \"onKeydown\": onKeydown\n }), {\n ...slots,\n default: () => _createVNode(_Fragment, null, [_createVNode(VMenu, _mergeProps({\n \"ref\": vMenuRef,\n \"modelValue\": menu.value,\n \"onUpdate:modelValue\": $event => menu.value = $event,\n \"activator\": \"parent\",\n \"contentClass\": \"v-combobox__content\",\n \"disabled\": menuDisabled.value,\n \"eager\": props.eager,\n \"maxHeight\": 310,\n \"openOnClick\": false,\n \"closeOnContentClick\": false,\n \"transition\": props.transition,\n \"onAfterLeave\": onAfterLeave\n }, props.menuProps), {\n default: () => [hasList && _createVNode(VList, {\n \"ref\": listRef,\n \"selected\": selected.value,\n \"selectStrategy\": props.multiple ? 'independent' : 'single-independent',\n \"onMousedown\": e => e.preventDefault(),\n \"onKeydown\": onListKeydown,\n \"onFocusin\": onFocusin,\n \"onFocusout\": onFocusout,\n \"tabindex\": \"-1\"\n }, {\n default: () => [slots['prepend-item']?.(), !displayItems.value.length && !props.hideNoData && (slots['no-data']?.() ?? _createVNode(VListItem, {\n \"title\": t(props.noDataText)\n }, null)), displayItems.value.map((item, index) => {\n const itemProps = mergeProps(item.props, {\n key: index,\n active: highlightFirst.value && index === 0 ? true : undefined,\n onClick: () => select(item)\n });\n return slots.item?.({\n item,\n index,\n props: itemProps\n }) ?? _createVNode(VListItem, itemProps, {\n prepend: _ref3 => {\n let {\n isSelected\n } = _ref3;\n return _createVNode(_Fragment, null, [props.multiple && !props.hideSelected ? _createVNode(VCheckboxBtn, {\n \"key\": item.value,\n \"modelValue\": isSelected,\n \"ripple\": false,\n \"tabindex\": \"-1\"\n }, null) : undefined, item.props.prependIcon && _createVNode(VIcon, {\n \"icon\": item.props.prependIcon\n }, null)]);\n },\n title: () => {\n return isPristine.value ? item.title : highlightResult(item.title, getMatches(item)?.title, search.value?.length ?? 0);\n }\n });\n }), slots['append-item']?.()]\n })]\n }), selections.value.map((item, index) => {\n function onChipClose(e) {\n e.stopPropagation();\n e.preventDefault();\n select(item);\n }\n const slotProps = {\n 'onClick:close': onChipClose,\n onMousedown(e) {\n e.preventDefault();\n e.stopPropagation();\n },\n modelValue: true,\n 'onUpdate:modelValue': undefined\n };\n return _createVNode(\"div\", {\n \"key\": item.value,\n \"class\": ['v-combobox__selection', index === selectionIndex.value && ['v-combobox__selection--selected', textColorClasses.value]],\n \"style\": index === selectionIndex.value ? textColorStyles.value : {}\n }, [hasChips ? !slots.chip ? _createVNode(VChip, _mergeProps({\n \"key\": \"chip\",\n \"closable\": props.closableChips,\n \"size\": \"small\",\n \"text\": item.title\n }, slotProps), null) : _createVNode(VDefaultsProvider, {\n \"key\": \"chip-defaults\",\n \"defaults\": {\n VChip: {\n closable: props.closableChips,\n size: 'small',\n text: item.title\n }\n }\n }, {\n default: () => [slots.chip?.({\n item,\n index,\n props: slotProps\n })]\n }) : slots.selection?.({\n item,\n index\n }) ?? _createVNode(\"span\", {\n \"class\": \"v-combobox__selection-text\"\n }, [item.title, props.multiple && index < selections.value.length - 1 && _createVNode(\"span\", {\n \"class\": \"v-combobox__selection-comma\"\n }, [_createTextVNode(\",\")])])]);\n })]),\n 'append-inner': function () {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n return _createVNode(_Fragment, null, [slots['append-inner']?.(...args), (!props.hideNoData || props.items.length) && props.menuIcon ? _createVNode(VIcon, {\n \"class\": \"v-combobox__menu-icon\",\n \"icon\": props.menuIcon,\n \"onMousedown\": onMousedownMenuIcon,\n \"onClick\": noop\n }, null) : undefined]);\n }\n });\n });\n return forwardRefs({\n isFocused,\n isPristine,\n menu,\n search,\n selectionIndex,\n filteredItems,\n select\n }, vTextFieldRef);\n }\n});\n//# sourceMappingURL=VCombobox.mjs.map","\n\n\n","\n\n\n","\n\n\n","\n\n\n","export enum SelectType {\n Countries = \"Countries\",\n Industries = \"Industries\",\n OrganisationForms = \"OrganisationForms\",\n Nationalities = \"Nationalities\",\n CountriesWithChineseRegions = \"CountriesWithChineseRegions\",\n}\n","\n\n\n","export interface PepRca {\n isPepRca: string;\n pepRcaRoleAndCountry: PepRcaRoleAndCountry[];\n}\n\nexport interface PepRcaRoleAndCountry {\n role: string;\n country: string;\n}\n\nexport function createEmptyPepRcaRoleAndCountry(): PepRcaRoleAndCountry {\n return { role: \"\", country: \"\" };\n}\n","import Address from \"@/models/questions/address\";\nimport type { PepRca } from \"@/models/persons/pepRca\";\nimport { createEmptyPepRcaRoleAndCountry } from \"@/models/persons/pepRca\";\n\nexport interface AnswerIndividualOwner extends IndividualOwner {}\n\nexport interface IndividualOwner {\n name: string;\n surname: string;\n birth: string;\n nationality: string;\n address: Address;\n pepRca: PepRca;\n subjectToSanctions: string;\n}\n\nexport function createEmptyIndividualOwner(): IndividualOwner {\n return {\n name: \"\",\n surname: \"\",\n birth: \"\",\n nationality: \"\",\n address: new Address(),\n pepRca: {\n isPepRca: \"\",\n pepRcaRoleAndCountry: [createEmptyPepRcaRoleAndCountry()],\n },\n subjectToSanctions: \"\",\n };\n}\n","\n\n\n","import Address from \"@/models/questions/address\";\n\nexport interface AnswerCompanyOwner extends CompanyOwner {}\n\nexport interface CompanyOwner {\n companyName: string;\n dateOfIncorporation: string;\n countryOfIncorporation: string;\n businessRegistrationNumber: string;\n organizationalForm: string;\n industry: string;\n website: string;\n address: Address;\n knownBeneficialOwner: string;\n subjectToSanctions: string;\n}\n\nexport function createEmptyCompanyOwner(): CompanyOwner {\n return {\n companyName: \"\",\n businessRegistrationNumber: \"\",\n countryOfIncorporation: \"\",\n dateOfIncorporation: \"\",\n industry: \"\",\n website: \"\",\n organizationalForm: \"\",\n address: new Address(),\n knownBeneficialOwner: \"\",\n subjectToSanctions: \"\",\n };\n}\n","\n\n\n","import type { PepRca } from \"@/models/persons/pepRca\";\nimport { createEmptyPepRcaRoleAndCountry } from \"@/models/persons/pepRca\";\n\nexport interface AnswerPersonWithPepAndSanctions\n extends PersonWithPepAndSanctions {}\n\nexport interface PersonWithPepAndSanctions {\n name: string;\n surname: string;\n birth: string;\n nationality: string;\n pepRca: PepRca;\n subjectToSanctions: string;\n}\n\nexport function createEmptyPersonWithPepAndSanctions(): PersonWithPepAndSanctions {\n return {\n name: \"\",\n surname: \"\",\n birth: \"\",\n nationality: \"\",\n pepRca: {\n isPepRca: \"\",\n pepRcaRoleAndCountry: [createEmptyPepRcaRoleAndCountry()],\n },\n subjectToSanctions: \"\",\n };\n}\n","\n\n\n","\n\n\n","export interface AnswerPersonWithNameAndPosition\n extends PersonWithNameAndPosition {}\n\nexport interface PersonWithNameAndPosition {\n name: string;\n surname: string;\n position: string;\n}\n\nexport const createEmptyPersonWithNameAndPosition =\n (): PersonWithNameAndPosition => {\n return {\n name: \"\",\n surname: \"\",\n position: \"\",\n };\n };\n","\n\n\n","\n\n\n\n\n","export class CertificateModelV2 {\n label: string = \"\";\n details: string = \"\";\n expiryDate: string = \"\";\n auditDate: string = \"\";\n certifier: string = \"\";\n checked: boolean = false;\n\n constructor(certificateName: string, details: string) {\n this.label = certificateName;\n this.details = details;\n }\n\n setChecked(newChecked: boolean): void {\n this.checked = newChecked;\n if (!this.checked) {\n this.expiryDate = \"\";\n this.expiryDate = \"\";\n this.auditDate = \"\";\n this.certifier = \"\";\n }\n }\n\n toAnswerModel(): AnswerCertificateModelV2 {\n return new AnswerCertificateModelV2(\n this.label,\n this.expiryDate,\n this.auditDate,\n this.checked,\n this.certifier\n );\n }\n}\n\nexport class AnswerCertificateModelV2 {\n label: string;\n expiryDate: string;\n auditDate: string;\n checked: boolean;\n certifier: string;\n\n constructor(\n label: string,\n expiryDate: string,\n auditDate: string,\n checked: boolean,\n certifier: string\n ) {\n this.label = label;\n this.expiryDate = expiryDate;\n this.auditDate = auditDate;\n this.checked = checked;\n this.certifier = certifier;\n }\n}\n","\n\n\n","\n\n\n","export enum QuestionConditionOperator {\n SINGLE = \"SINGLE\",\n AND = \"AND\",\n OR = \"OR\",\n}\n\nexport interface QuestionConditionDependency {\n dependsOn: string;\n dependantValue: string;\n requiresAnswer: boolean;\n}\n\nexport interface QuestionConditionsDto {\n operator: QuestionConditionOperator;\n dependencies: QuestionConditionDependency[];\n}\n","\n\n\n","import { createVNode as _createVNode, resolveDirective as _resolveDirective } from \"vue\";\n// Styles\nimport \"./VTimeline.css\";\n\n// Composables\nimport { makeComponentProps } from \"../../composables/component.mjs\";\nimport { provideDefaults } from \"../../composables/defaults.mjs\";\nimport { makeDensityProps, useDensity } from \"../../composables/density.mjs\";\nimport { useRtl } from \"../../composables/locale.mjs\";\nimport { makeTagProps } from \"../../composables/tag.mjs\";\nimport { makeThemeProps, provideTheme } from \"../../composables/theme.mjs\"; // Utilities\nimport { computed, toRef } from 'vue';\nimport { convertToUnit, genericComponent, propsFactory, useRender } from \"../../util/index.mjs\"; // Types\nexport const makeVTimelineProps = propsFactory({\n align: {\n type: String,\n default: 'center',\n validator: v => ['center', 'start'].includes(v)\n },\n direction: {\n type: String,\n default: 'vertical',\n validator: v => ['vertical', 'horizontal'].includes(v)\n },\n justify: {\n type: String,\n default: 'auto',\n validator: v => ['auto', 'center'].includes(v)\n },\n side: {\n type: String,\n validator: v => v == null || ['start', 'end'].includes(v)\n },\n lineInset: {\n type: [String, Number],\n default: 0\n },\n lineThickness: {\n type: [String, Number],\n default: 2\n },\n lineColor: String,\n truncateLine: {\n type: String,\n validator: v => ['start', 'end', 'both'].includes(v)\n },\n ...makeComponentProps(),\n ...makeDensityProps(),\n ...makeTagProps(),\n ...makeThemeProps()\n}, 'VTimeline');\nexport const VTimeline = genericComponent()({\n name: 'VTimeline',\n props: makeVTimelineProps(),\n setup(props, _ref) {\n let {\n slots\n } = _ref;\n const {\n themeClasses\n } = provideTheme(props);\n const {\n densityClasses\n } = useDensity(props);\n const {\n rtlClasses\n } = useRtl();\n provideDefaults({\n VTimelineDivider: {\n lineColor: toRef(props, 'lineColor')\n },\n VTimelineItem: {\n density: toRef(props, 'density'),\n lineInset: toRef(props, 'lineInset')\n }\n });\n const sideClasses = computed(() => {\n const side = props.side ? props.side : props.density !== 'default' ? 'end' : null;\n return side && `v-timeline--side-${side}`;\n });\n const truncateClasses = computed(() => {\n const classes = ['v-timeline--truncate-line-start', 'v-timeline--truncate-line-end'];\n switch (props.truncateLine) {\n case 'both':\n return classes;\n case 'start':\n return classes[0];\n case 'end':\n return classes[1];\n default:\n return null;\n }\n });\n useRender(() => _createVNode(props.tag, {\n \"class\": ['v-timeline', `v-timeline--${props.direction}`, `v-timeline--align-${props.align}`, `v-timeline--justify-${props.justify}`, truncateClasses.value, {\n 'v-timeline--inset-line': !!props.lineInset\n }, themeClasses.value, densityClasses.value, sideClasses.value, rtlClasses.value, props.class],\n \"style\": [{\n '--v-timeline-line-thickness': convertToUnit(props.lineThickness)\n }, props.style]\n }, slots));\n return {};\n }\n});\n//# sourceMappingURL=VTimeline.mjs.map","import { resolveDirective as _resolveDirective, createVNode as _createVNode } from \"vue\";\n// Components\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 { makeElevationProps, useElevation } from \"../../composables/elevation.mjs\";\nimport { IconValue } from \"../../composables/icons.mjs\";\nimport { makeRoundedProps, useRounded } from \"../../composables/rounded.mjs\";\nimport { makeSizeProps, useSize } from \"../../composables/size.mjs\"; // Utilities\nimport { toRef } from 'vue';\nimport { genericComponent, propsFactory, useRender } from \"../../util/index.mjs\";\nexport const makeVTimelineDividerProps = propsFactory({\n dotColor: String,\n fillDot: Boolean,\n hideDot: Boolean,\n icon: IconValue,\n iconColor: String,\n lineColor: String,\n ...makeComponentProps(),\n ...makeRoundedProps(),\n ...makeSizeProps(),\n ...makeElevationProps()\n}, 'VTimelineDivider');\nexport const VTimelineDivider = genericComponent()({\n name: 'VTimelineDivider',\n props: makeVTimelineDividerProps(),\n setup(props, _ref) {\n let {\n slots\n } = _ref;\n const {\n sizeClasses,\n sizeStyles\n } = useSize(props, 'v-timeline-divider__dot');\n const {\n backgroundColorStyles,\n backgroundColorClasses\n } = useBackgroundColor(toRef(props, 'dotColor'));\n const {\n roundedClasses\n } = useRounded(props, 'v-timeline-divider__dot');\n const {\n elevationClasses\n } = useElevation(props);\n const {\n backgroundColorClasses: lineColorClasses,\n backgroundColorStyles: lineColorStyles\n } = useBackgroundColor(toRef(props, 'lineColor'));\n useRender(() => _createVNode(\"div\", {\n \"class\": ['v-timeline-divider', {\n 'v-timeline-divider--fill-dot': props.fillDot\n }, props.class],\n \"style\": props.style\n }, [_createVNode(\"div\", {\n \"class\": ['v-timeline-divider__before', lineColorClasses.value],\n \"style\": lineColorStyles.value\n }, null), !props.hideDot && _createVNode(\"div\", {\n \"key\": \"dot\",\n \"class\": ['v-timeline-divider__dot', elevationClasses.value, roundedClasses.value, sizeClasses.value],\n \"style\": sizeStyles.value\n }, [_createVNode(\"div\", {\n \"class\": ['v-timeline-divider__inner-dot', backgroundColorClasses.value, roundedClasses.value],\n \"style\": backgroundColorStyles.value\n }, [!slots.default ? _createVNode(VIcon, {\n \"key\": \"icon\",\n \"color\": props.iconColor,\n \"icon\": props.icon,\n \"size\": props.size\n }, null) : _createVNode(VDefaultsProvider, {\n \"key\": \"icon-defaults\",\n \"disabled\": !props.icon,\n \"defaults\": {\n VIcon: {\n color: props.iconColor,\n icon: props.icon,\n size: props.size\n }\n }\n }, slots.default)])]), _createVNode(\"div\", {\n \"class\": ['v-timeline-divider__after', lineColorClasses.value],\n \"style\": lineColorStyles.value\n }, null)]));\n return {};\n }\n});\n//# sourceMappingURL=VTimelineDivider.mjs.map","import { resolveDirective as _resolveDirective, createVNode as _createVNode } from \"vue\";\n// Components\nimport { VTimelineDivider } from \"./VTimelineDivider.mjs\"; // Composables\nimport { makeComponentProps } from \"../../composables/component.mjs\";\nimport { makeDimensionProps, useDimension } from \"../../composables/dimensions.mjs\";\nimport { makeElevationProps } from \"../../composables/elevation.mjs\";\nimport { IconValue } from \"../../composables/icons.mjs\";\nimport { makeRoundedProps } from \"../../composables/rounded.mjs\";\nimport { makeSizeProps } from \"../../composables/size.mjs\";\nimport { makeTagProps } from \"../../composables/tag.mjs\"; // Utilities\nimport { ref, shallowRef, watch } from 'vue';\nimport { convertToUnit, genericComponent, propsFactory, useRender } from \"../../util/index.mjs\"; // Types\nexport const makeVTimelineItemProps = propsFactory({\n density: String,\n dotColor: String,\n fillDot: Boolean,\n hideDot: Boolean,\n hideOpposite: {\n type: Boolean,\n default: undefined\n },\n icon: IconValue,\n iconColor: String,\n lineInset: [Number, String],\n ...makeComponentProps(),\n ...makeDimensionProps(),\n ...makeElevationProps(),\n ...makeRoundedProps(),\n ...makeSizeProps(),\n ...makeTagProps()\n}, 'VTimelineItem');\nexport const VTimelineItem = genericComponent()({\n name: 'VTimelineItem',\n props: makeVTimelineItemProps(),\n setup(props, _ref) {\n let {\n slots\n } = _ref;\n const {\n dimensionStyles\n } = useDimension(props);\n const dotSize = shallowRef(0);\n const dotRef = ref();\n watch(dotRef, newValue => {\n if (!newValue) return;\n dotSize.value = newValue.$el.querySelector('.v-timeline-divider__dot')?.getBoundingClientRect().width ?? 0;\n }, {\n flush: 'post'\n });\n useRender(() => _createVNode(\"div\", {\n \"class\": ['v-timeline-item', {\n 'v-timeline-item--fill-dot': props.fillDot\n }, props.class],\n \"style\": [{\n '--v-timeline-dot-size': convertToUnit(dotSize.value),\n '--v-timeline-line-inset': props.lineInset ? `calc(var(--v-timeline-dot-size) / 2 + ${convertToUnit(props.lineInset)})` : convertToUnit(0)\n }, props.style]\n }, [_createVNode(\"div\", {\n \"class\": \"v-timeline-item__body\",\n \"style\": dimensionStyles.value\n }, [slots.default?.()]), _createVNode(VTimelineDivider, {\n \"ref\": dotRef,\n \"hideDot\": props.hideDot,\n \"icon\": props.icon,\n \"iconColor\": props.iconColor,\n \"size\": props.size,\n \"elevation\": props.elevation,\n \"dotColor\": props.dotColor,\n \"fillDot\": props.fillDot,\n \"rounded\": props.rounded\n }, {\n default: slots.icon\n }), props.density !== 'compact' && _createVNode(\"div\", {\n \"class\": \"v-timeline-item__opposite\"\n }, [!props.hideOpposite && slots.opposite?.()])]));\n return {};\n }\n});\n//# sourceMappingURL=VTimelineItem.mjs.map","\n\n\n\n\n","import { AnswerStatus } from \"@/models/enum/answerStatus\";\n\nexport class AnswerSetDto {\n questionSetId: string = \"\";\n contextId: string = \"\";\n contextIds: string[] = [];\n answerStatus: AnswerStatus = AnswerStatus.NotStarted;\n answers: AnswerDto = {};\n submitWithNonCompletedAnswers: boolean = false;\n}\n\nexport interface AnswerDto {\n [key: string]: object; // Key: QuestionId, Value: Answer\n}","import type { AnswerSet } from \"@/models/answerSet\";\nimport { AnswerSetDto } from \"@/models/dto/answerSetDto\";\nimport type { QuestionnaireItemSetDto } from \"@/models/dto/questionnaireItemSetDto\";\nimport axios from \"axios\";\n\nexport const saveAnswerSet = async (\n set: QuestionnaireItemSetDto\n): Promise => {\n const answerSet = new AnswerSetDto();\n answerSet.questionSetId = set.id;\n answerSet.contextId = set.contextId;\n answerSet.contextIds = set.contextIds;\n answerSet.answerStatus = set.answerStatus;\n\n for (const itemRow of set.items) {\n for (const item of itemRow) {\n answerSet.answers[item.questionModel.question.id] =\n item.answers as object;\n }\n }\n\n const resp = await axios.post(\n \"/api/answers/save-answer-set\",\n answerSet\n );\n return resp.data;\n};\n\nexport const submitAnswerSet = async (\n set: QuestionnaireItemSetDto\n): Promise => {\n const answerSet = new AnswerSetDto();\n answerSet.questionSetId = set.id;\n answerSet.contextId = set.contextId;\n answerSet.contextIds = set.contextIds;\n answerSet.answerStatus = set.answerStatus;\n answerSet.submitWithNonCompletedAnswers = set.submitWithNonCompletedQuestions;\n\n for (const itemRow of set.items) {\n for (const item of itemRow) {\n answerSet.answers[item.questionModel.question.id] =\n item.answers as object;\n }\n }\n\n const resp = await axios.post(\n \"/api/answers/submit-answer-set\",\n answerSet\n );\n return resp.data;\n};\n\nexport const cloneAnswerSet = async (\n sourceQuestionnaireId: string,\n targetQuestionnaireIds: string[]\n): Promise => {\n const resp = await axios.post(\"/api/answers/clone-answers\", {\n sourceQuestionnaireId: sourceQuestionnaireId,\n targetQuestionnaireIds: targetQuestionnaireIds,\n });\n\n return resp.data;\n};\n","import type { AnswerStatus } from \"@/models/enum/answerStatus\";\n\nexport class QuestionnaireSideMenuItem {\n sectionTitle: string;\n isSectionCompleted: AnswerStatus;\n\n constructor(sectionTitle: string, isSectionCompleted: AnswerStatus) {\n this.sectionTitle = sectionTitle;\n this.isSectionCompleted = isSectionCompleted;\n }\n}\n","\n\n\n","\n\n\n","\n\n\n\n\n","\n\n\n\n\n","\n\n\n","\n\n\n\n\n","import type { Questionnaire } from \"@/models/questionnaire\";\nimport type ReceivedQuestionnaire from \"@/models/receivedQuestionnaire\";\nimport { defineStore } from \"pinia\";\n\nexport interface SenderState {\n questionnaireId: string;\n questionnaireLabel: string;\n templateId: string;\n contextId: string;\n canSendToBP: boolean;\n isQuestionnairesOwner: boolean;\n isBusinessPartner: boolean;\n}\n\nexport const useSenderStore = defineStore(\"sender\", {\n state: (): SenderState => ({\n questionnaireId: \"\",\n questionnaireLabel: \"\",\n templateId: \"\",\n contextId: \"\",\n canSendToBP: true,\n isQuestionnairesOwner: false,\n isBusinessPartner: false,\n }),\n\n actions: {\n setOwnerParams(questionnaire: Questionnaire): void {\n this.questionnaireId = questionnaire.id;\n this.questionnaireLabel = questionnaire.label;\n this.templateId = questionnaire.templateId;\n this.contextId = \"\";\n this.canSendToBP = true;\n this.isQuestionnairesOwner = true;\n this.isBusinessPartner = false;\n },\n\n setSupplierParams(questionnaire: ReceivedQuestionnaire): void {\n this.questionnaireId = questionnaire.questionnaireId;\n this.questionnaireLabel = questionnaire.questionnaireLabel;\n this.templateId = questionnaire.templateId;\n this.contextId = questionnaire.contextId;\n this.canSendToBP = false;\n this.isQuestionnairesOwner = false;\n this.isBusinessPartner = questionnaire.isBusinessPartner;\n },\n },\n});\n","\n\n\n","import { AnswerStatus } from \"@/models/enum/answerStatus\";\nimport { ForwardingStatus } from \"@/models/enum/forwardingStatus\";\n\nexport type QuestionnaireStatus = AnswerStatus | ForwardingStatus;\n\nexport function getQuestionnaireStatusColor(\n status: ForwardingStatus | AnswerStatus\n) {\n if (\n status == ForwardingStatus.Completed ||\n status == AnswerStatus.Completed\n ) {\n return \"var(--dark-status-green)\";\n } else if (status == AnswerStatus.InProgress) {\n return \"var(--status-blue)\";\n } else if (\n status == AnswerStatus.NotStarted ||\n status == ForwardingStatus.NotStarted\n ) {\n return \"var(--status-orange-yellow)\";\n } else if (\n status == AnswerStatus.NotRegistered ||\n status == ForwardingStatus.Pending\n ) {\n return \"var(--status-grey)\";\n } else if (status == ForwardingStatus.NotApplicable) {\n return \"var(--violet)\";\n }\n}\n\nexport function getQuestionnaireStatusTextColor(\n status: ForwardingStatus | AnswerStatus\n) {\n if (\n status == ForwardingStatus.Completed ||\n status == AnswerStatus.Completed\n ) {\n return \"white\";\n } else if (status == AnswerStatus.InProgress) {\n return \"white\";\n } else if (\n status == AnswerStatus.NotStarted ||\n status == ForwardingStatus.NotStarted\n ) {\n return \"black\";\n } else if (\n status == AnswerStatus.NotRegistered ||\n status == ForwardingStatus.Pending\n ) {\n return \"black\";\n } else if (status == ForwardingStatus.NotApplicable) {\n return \"white\";\n }\n}\n\nexport function questionnaireStatusToDisplayText(\n status: ForwardingStatus | AnswerStatus\n) {\n if (\n status == ForwardingStatus.Completed ||\n status == AnswerStatus.Completed\n ) {\n return \"Completed\";\n } else if (status == AnswerStatus.InProgress) {\n return \"In progress\";\n } else if (\n status == AnswerStatus.NotStarted ||\n status == ForwardingStatus.NotStarted\n ) {\n return \"Not started\";\n } else if (\n status == AnswerStatus.NotRegistered ||\n status == ForwardingStatus.Pending\n ) {\n return \"Pending\";\n } else if (status == ForwardingStatus.NotApplicable) {\n return \"N/A\";\n }\n}\n","\n\n\n\n\n","\n\n\n\n\n","\n\n\n","// Types\n\nexport const VTabsSymbol = Symbol.for('vuetify:v-tabs');\n//# sourceMappingURL=shared.mjs.map","import { mergeProps as _mergeProps, createVNode as _createVNode } from \"vue\";\n// Styles\nimport \"./VTab.css\";\n\n// Components\nimport { makeVBtnProps, VBtn } from \"../VBtn/VBtn.mjs\"; // Composables\nimport { useTextColor } from \"../../composables/color.mjs\"; // Utilities\nimport { computed, ref, shallowRef } from 'vue';\nimport { VTabsSymbol } from \"./shared.mjs\";\nimport { animate, genericComponent, omit, propsFactory, standardEasing, useRender } from \"../../util/index.mjs\"; // Types\nexport const makeVTabProps = propsFactory({\n fixed: Boolean,\n sliderColor: String,\n hideSlider: Boolean,\n direction: {\n type: String,\n default: 'horizontal'\n },\n ...omit(makeVBtnProps({\n selectedClass: 'v-tab--selected',\n variant: 'text'\n }), ['active', 'block', 'flat', 'location', 'position', 'symbol'])\n}, 'VTab');\nexport const VTab = genericComponent()({\n name: 'VTab',\n props: makeVTabProps(),\n setup(props, _ref) {\n let {\n slots,\n attrs\n } = _ref;\n const {\n textColorClasses: sliderColorClasses,\n textColorStyles: sliderColorStyles\n } = useTextColor(props, 'sliderColor');\n const isHorizontal = computed(() => props.direction === 'horizontal');\n const isSelected = shallowRef(false);\n const rootEl = ref();\n const sliderEl = ref();\n function updateSlider(_ref2) {\n let {\n value\n } = _ref2;\n isSelected.value = value;\n if (value) {\n const prevEl = rootEl.value?.$el.parentElement?.querySelector('.v-tab--selected .v-tab__slider');\n const nextEl = sliderEl.value;\n if (!prevEl || !nextEl) return;\n const color = getComputedStyle(prevEl).color;\n const prevBox = prevEl.getBoundingClientRect();\n const nextBox = nextEl.getBoundingClientRect();\n const xy = isHorizontal.value ? 'x' : 'y';\n const XY = isHorizontal.value ? 'X' : 'Y';\n const rightBottom = isHorizontal.value ? 'right' : 'bottom';\n const widthHeight = isHorizontal.value ? 'width' : 'height';\n const prevPos = prevBox[xy];\n const nextPos = nextBox[xy];\n const delta = prevPos > nextPos ? prevBox[rightBottom] - nextBox[rightBottom] : prevBox[xy] - nextBox[xy];\n const origin = Math.sign(delta) > 0 ? isHorizontal.value ? 'right' : 'bottom' : Math.sign(delta) < 0 ? isHorizontal.value ? 'left' : 'top' : 'center';\n const size = Math.abs(delta) + (Math.sign(delta) < 0 ? prevBox[widthHeight] : nextBox[widthHeight]);\n const scale = size / Math.max(prevBox[widthHeight], nextBox[widthHeight]);\n const initialScale = prevBox[widthHeight] / nextBox[widthHeight];\n const sigma = 1.5;\n animate(nextEl, {\n backgroundColor: [color, 'currentcolor'],\n transform: [`translate${XY}(${delta}px) scale${XY}(${initialScale})`, `translate${XY}(${delta / sigma}px) scale${XY}(${(scale - 1) / sigma + 1})`, 'none'],\n transformOrigin: Array(3).fill(origin)\n }, {\n duration: 225,\n easing: standardEasing\n });\n }\n }\n useRender(() => {\n const [btnProps] = VBtn.filterProps(props);\n return _createVNode(VBtn, _mergeProps({\n \"symbol\": VTabsSymbol,\n \"ref\": rootEl,\n \"class\": ['v-tab', props.class],\n \"style\": props.style,\n \"tabindex\": isSelected.value ? 0 : -1,\n \"role\": \"tab\",\n \"aria-selected\": String(isSelected.value),\n \"active\": false,\n \"block\": props.fixed,\n \"maxWidth\": props.fixed ? 300 : undefined,\n \"rounded\": 0\n }, btnProps, attrs, {\n \"onGroup:selected\": updateSlider\n }), {\n default: () => [slots.default?.() ?? props.text, !props.hideSlider && _createVNode(\"div\", {\n \"ref\": sliderEl,\n \"class\": ['v-tab__slider', sliderColorClasses.value],\n \"style\": sliderColorStyles.value\n }, null)]\n });\n });\n return {};\n }\n});\n//# sourceMappingURL=VTab.mjs.map","export function bias(val) {\n const c = 0.501;\n const x = Math.abs(val);\n return Math.sign(val) * (x / ((1 / c - 2) * (1 - x) + 1));\n}\nexport function calculateUpdatedOffset(_ref) {\n let {\n selectedElement,\n containerSize,\n contentSize,\n isRtl,\n currentScrollOffset,\n isHorizontal\n } = _ref;\n const clientSize = isHorizontal ? selectedElement.clientWidth : selectedElement.clientHeight;\n const offsetStart = isHorizontal ? selectedElement.offsetLeft : selectedElement.offsetTop;\n const adjustedOffsetStart = isRtl && isHorizontal ? contentSize - offsetStart - clientSize : offsetStart;\n const totalSize = containerSize + currentScrollOffset;\n const itemOffset = clientSize + adjustedOffsetStart;\n const additionalOffset = clientSize * 0.4;\n if (adjustedOffsetStart <= currentScrollOffset) {\n currentScrollOffset = Math.max(adjustedOffsetStart - additionalOffset, 0);\n } else if (totalSize <= itemOffset) {\n currentScrollOffset = Math.min(currentScrollOffset - (totalSize - itemOffset - additionalOffset), contentSize - containerSize);\n }\n return currentScrollOffset;\n}\nexport function calculateCenteredOffset(_ref2) {\n let {\n selectedElement,\n containerSize,\n contentSize,\n isRtl,\n isHorizontal\n } = _ref2;\n const clientSize = isHorizontal ? selectedElement.clientWidth : selectedElement.clientHeight;\n const offsetStart = isHorizontal ? selectedElement.offsetLeft : selectedElement.offsetTop;\n const offsetCentered = isRtl && isHorizontal ? contentSize - offsetStart - clientSize / 2 - containerSize / 2 : offsetStart + clientSize / 2 - containerSize / 2;\n return Math.min(contentSize - containerSize, Math.max(0, offsetCentered));\n}\n//# sourceMappingURL=helpers.mjs.map","import { createVNode as _createVNode } from \"vue\";\n// Styles\nimport \"./VSlideGroup.css\";\n\n// Components\nimport { VFadeTransition } from \"../transitions/index.mjs\";\nimport { VIcon } from \"../VIcon/index.mjs\"; // Composables\nimport { useDisplay } from \"../../composables/index.mjs\";\nimport { makeComponentProps } from \"../../composables/component.mjs\";\nimport { makeGroupProps, useGroup } from \"../../composables/group.mjs\";\nimport { IconValue } from \"../../composables/icons.mjs\";\nimport { useRtl } from \"../../composables/locale.mjs\";\nimport { useResizeObserver } from \"../../composables/resizeObserver.mjs\";\nimport { makeTagProps } from \"../../composables/tag.mjs\"; // Utilities\nimport { computed, shallowRef, watch } from 'vue';\nimport { bias, calculateCenteredOffset, calculateUpdatedOffset } from \"./helpers.mjs\";\nimport { clamp, focusableChildren, genericComponent, IN_BROWSER, propsFactory, useRender } from \"../../util/index.mjs\"; // Types\nexport const VSlideGroupSymbol = Symbol.for('vuetify:v-slide-group');\nexport const makeVSlideGroupProps = propsFactory({\n centerActive: Boolean,\n direction: {\n type: String,\n default: 'horizontal'\n },\n symbol: {\n type: null,\n default: VSlideGroupSymbol\n },\n nextIcon: {\n type: IconValue,\n default: '$next'\n },\n prevIcon: {\n type: IconValue,\n default: '$prev'\n },\n showArrows: {\n type: [Boolean, String],\n validator: v => typeof v === 'boolean' || ['always', 'desktop', 'mobile'].includes(v)\n },\n ...makeComponentProps(),\n ...makeTagProps(),\n ...makeGroupProps({\n selectedClass: 'v-slide-group-item--active'\n })\n}, 'VSlideGroup');\nexport const VSlideGroup = genericComponent()({\n name: 'VSlideGroup',\n props: makeVSlideGroupProps(),\n emits: {\n 'update:modelValue': value => true\n },\n setup(props, _ref) {\n let {\n slots\n } = _ref;\n const {\n isRtl\n } = useRtl();\n const {\n mobile\n } = useDisplay();\n const group = useGroup(props, props.symbol);\n const isOverflowing = shallowRef(false);\n const scrollOffset = shallowRef(0);\n const containerSize = shallowRef(0);\n const contentSize = shallowRef(0);\n const isHorizontal = computed(() => props.direction === 'horizontal');\n const {\n resizeRef: containerRef,\n contentRect: containerRect\n } = useResizeObserver();\n const {\n resizeRef: contentRef,\n contentRect\n } = useResizeObserver();\n const firstSelectedIndex = computed(() => {\n if (!group.selected.value.length) return -1;\n return group.items.value.findIndex(item => item.id === group.selected.value[0]);\n });\n const lastSelectedIndex = computed(() => {\n if (!group.selected.value.length) return -1;\n return group.items.value.findIndex(item => item.id === group.selected.value[group.selected.value.length - 1]);\n });\n if (IN_BROWSER) {\n let frame = -1;\n watch(() => [group.selected.value, containerRect.value, contentRect.value, isHorizontal.value], () => {\n cancelAnimationFrame(frame);\n frame = requestAnimationFrame(() => {\n if (containerRect.value && contentRect.value) {\n const sizeProperty = isHorizontal.value ? 'width' : 'height';\n containerSize.value = containerRect.value[sizeProperty];\n contentSize.value = contentRect.value[sizeProperty];\n isOverflowing.value = containerSize.value + 1 < contentSize.value;\n }\n if (firstSelectedIndex.value >= 0 && contentRef.value) {\n // TODO: Is this too naive? Should we store element references in group composable?\n const selectedElement = contentRef.value.children[lastSelectedIndex.value];\n if (firstSelectedIndex.value === 0 || !isOverflowing.value) {\n scrollOffset.value = 0;\n } else if (props.centerActive) {\n scrollOffset.value = calculateCenteredOffset({\n selectedElement,\n containerSize: containerSize.value,\n contentSize: contentSize.value,\n isRtl: isRtl.value,\n isHorizontal: isHorizontal.value\n });\n } else if (isOverflowing.value) {\n scrollOffset.value = calculateUpdatedOffset({\n selectedElement,\n containerSize: containerSize.value,\n contentSize: contentSize.value,\n isRtl: isRtl.value,\n currentScrollOffset: scrollOffset.value,\n isHorizontal: isHorizontal.value\n });\n }\n }\n });\n });\n }\n const disableTransition = shallowRef(false);\n let startTouch = 0;\n let startOffset = 0;\n function onTouchstart(e) {\n const sizeProperty = isHorizontal.value ? 'clientX' : 'clientY';\n const sign = isRtl.value && isHorizontal.value ? -1 : 1;\n startOffset = sign * scrollOffset.value;\n startTouch = e.touches[0][sizeProperty];\n disableTransition.value = true;\n }\n function onTouchmove(e) {\n if (!isOverflowing.value) return;\n const sizeProperty = isHorizontal.value ? 'clientX' : 'clientY';\n const sign = isRtl.value && isHorizontal.value ? -1 : 1;\n scrollOffset.value = sign * (startOffset + startTouch - e.touches[0][sizeProperty]);\n }\n function onTouchend(e) {\n const maxScrollOffset = contentSize.value - containerSize.value;\n if (scrollOffset.value < 0 || !isOverflowing.value) {\n scrollOffset.value = 0;\n } else if (scrollOffset.value >= maxScrollOffset) {\n scrollOffset.value = maxScrollOffset;\n }\n disableTransition.value = false;\n }\n function onScroll() {\n if (!containerRef.value) return;\n containerRef.value[isHorizontal.value ? 'scrollLeft' : 'scrollTop'] = 0;\n }\n const isFocused = shallowRef(false);\n function onFocusin(e) {\n isFocused.value = true;\n if (!isOverflowing.value || !contentRef.value) return;\n\n // Focused element is likely to be the root of an item, so a\n // breadth-first search will probably find it in the first iteration\n for (const el of e.composedPath()) {\n for (const item of contentRef.value.children) {\n if (item === el) {\n scrollOffset.value = calculateUpdatedOffset({\n selectedElement: item,\n containerSize: containerSize.value,\n contentSize: contentSize.value,\n isRtl: isRtl.value,\n currentScrollOffset: scrollOffset.value,\n isHorizontal: isHorizontal.value\n });\n return;\n }\n }\n }\n }\n function onFocusout(e) {\n isFocused.value = false;\n }\n function onFocus(e) {\n if (!isFocused.value && !(e.relatedTarget && contentRef.value?.contains(e.relatedTarget))) focus();\n }\n function onKeydown(e) {\n if (!contentRef.value) return;\n if (isHorizontal.value) {\n if (e.key === 'ArrowRight') {\n focus(isRtl.value ? 'prev' : 'next');\n } else if (e.key === 'ArrowLeft') {\n focus(isRtl.value ? 'next' : 'prev');\n }\n } else {\n if (e.key === 'ArrowDown') {\n focus('next');\n } else if (e.key === 'ArrowUp') {\n focus('prev');\n }\n }\n if (e.key === 'Home') {\n focus('first');\n } else if (e.key === 'End') {\n focus('last');\n }\n }\n function focus(location) {\n if (!contentRef.value) return;\n if (!location) {\n const focusable = focusableChildren(contentRef.value);\n focusable[0]?.focus();\n } else if (location === 'next') {\n const el = contentRef.value.querySelector(':focus')?.nextElementSibling;\n if (el) el.focus();else focus('first');\n } else if (location === 'prev') {\n const el = contentRef.value.querySelector(':focus')?.previousElementSibling;\n if (el) el.focus();else focus('last');\n } else if (location === 'first') {\n contentRef.value.firstElementChild?.focus();\n } else if (location === 'last') {\n contentRef.value.lastElementChild?.focus();\n }\n }\n function scrollTo(location) {\n const newAbsoluteOffset = scrollOffset.value + (location === 'prev' ? -1 : 1) * containerSize.value;\n scrollOffset.value = clamp(newAbsoluteOffset, 0, contentSize.value - containerSize.value);\n }\n const contentStyles = computed(() => {\n // This adds friction when scrolling the 'wrong' way when at max offset\n let scrollAmount = scrollOffset.value > contentSize.value - containerSize.value ? -(contentSize.value - containerSize.value) + bias(contentSize.value - containerSize.value - scrollOffset.value) : -scrollOffset.value;\n\n // This adds friction when scrolling the 'wrong' way when at min offset\n if (scrollOffset.value <= 0) {\n scrollAmount = bias(-scrollOffset.value);\n }\n const sign = isRtl.value && isHorizontal.value ? -1 : 1;\n return {\n transform: `translate${isHorizontal.value ? 'X' : 'Y'}(${sign * scrollAmount}px)`,\n transition: disableTransition.value ? 'none' : '',\n willChange: disableTransition.value ? 'transform' : ''\n };\n });\n const slotProps = computed(() => ({\n next: group.next,\n prev: group.prev,\n select: group.select,\n isSelected: group.isSelected\n }));\n const hasAffixes = computed(() => {\n switch (props.showArrows) {\n // Always show arrows on desktop & mobile\n case 'always':\n return true;\n\n // Always show arrows on desktop\n case 'desktop':\n return !mobile.value;\n\n // Show arrows on mobile when overflowing.\n // This matches the default 2.2 behavior\n case true:\n return isOverflowing.value || Math.abs(scrollOffset.value) > 0;\n\n // Always show on mobile\n case 'mobile':\n return mobile.value || isOverflowing.value || Math.abs(scrollOffset.value) > 0;\n\n // https://material.io/components/tabs#scrollable-tabs\n // Always show arrows when\n // overflowed on desktop\n default:\n return !mobile.value && (isOverflowing.value || Math.abs(scrollOffset.value) > 0);\n }\n });\n const hasPrev = computed(() => {\n return Math.abs(scrollOffset.value) > 0;\n });\n const hasNext = computed(() => {\n // Check one scroll ahead to know the width of right-most item\n return contentSize.value > Math.abs(scrollOffset.value) + containerSize.value;\n });\n useRender(() => _createVNode(props.tag, {\n \"class\": ['v-slide-group', {\n 'v-slide-group--vertical': !isHorizontal.value,\n 'v-slide-group--has-affixes': hasAffixes.value,\n 'v-slide-group--is-overflowing': isOverflowing.value\n }, props.class],\n \"style\": props.style,\n \"tabindex\": isFocused.value || group.selected.value.length ? -1 : 0,\n \"onFocus\": onFocus\n }, {\n default: () => [hasAffixes.value && _createVNode(\"div\", {\n \"key\": \"prev\",\n \"class\": ['v-slide-group__prev', {\n 'v-slide-group__prev--disabled': !hasPrev.value\n }],\n \"onClick\": () => scrollTo('prev')\n }, [slots.prev?.(slotProps.value) ?? _createVNode(VFadeTransition, null, {\n default: () => [_createVNode(VIcon, {\n \"icon\": isRtl.value ? props.nextIcon : props.prevIcon\n }, null)]\n })]), _createVNode(\"div\", {\n \"key\": \"container\",\n \"ref\": containerRef,\n \"class\": \"v-slide-group__container\",\n \"onScroll\": onScroll\n }, [_createVNode(\"div\", {\n \"ref\": contentRef,\n \"class\": \"v-slide-group__content\",\n \"style\": contentStyles.value,\n \"onTouchstartPassive\": onTouchstart,\n \"onTouchmovePassive\": onTouchmove,\n \"onTouchendPassive\": onTouchend,\n \"onFocusin\": onFocusin,\n \"onFocusout\": onFocusout,\n \"onKeydown\": onKeydown\n }, [slots.default?.(slotProps.value)])]), hasAffixes.value && _createVNode(\"div\", {\n \"key\": \"next\",\n \"class\": ['v-slide-group__next', {\n 'v-slide-group__next--disabled': !hasNext.value\n }],\n \"onClick\": () => scrollTo('next')\n }, [slots.next?.(slotProps.value) ?? _createVNode(VFadeTransition, null, {\n default: () => [_createVNode(VIcon, {\n \"icon\": isRtl.value ? props.prevIcon : props.nextIcon\n }, null)]\n })])]\n }));\n return {\n selected: group.selected,\n scrollTo,\n scrollOffset,\n focus\n };\n }\n});\n//# sourceMappingURL=VSlideGroup.mjs.map","import { createVNode as _createVNode, mergeProps as _mergeProps } from \"vue\";\n// Styles\nimport \"./VTabs.css\";\n\n// Components\nimport { VTab } from \"./VTab.mjs\";\nimport { makeVSlideGroupProps, VSlideGroup } from \"../VSlideGroup/VSlideGroup.mjs\"; // Composables\nimport { useBackgroundColor } from \"../../composables/color.mjs\";\nimport { provideDefaults } from \"../../composables/defaults.mjs\";\nimport { makeDensityProps, useDensity } from \"../../composables/density.mjs\";\nimport { useProxiedModel } from \"../../composables/proxiedModel.mjs\";\nimport { makeTagProps } from \"../../composables/tag.mjs\"; // Utilities\nimport { computed, toRef } from 'vue';\nimport { convertToUnit, genericComponent, propsFactory, useRender } from \"../../util/index.mjs\"; // Types\nimport { VTabsSymbol } from \"./shared.mjs\";\nfunction parseItems(items) {\n if (!items) return [];\n return items.map(item => {\n if (typeof item === 'string') return {\n title: item,\n value: item\n };\n return item;\n });\n}\nexport const makeVTabsProps = propsFactory({\n alignTabs: {\n type: String,\n default: 'start'\n },\n color: String,\n fixedTabs: Boolean,\n items: {\n type: Array,\n default: () => []\n },\n stacked: Boolean,\n bgColor: String,\n grow: Boolean,\n height: {\n type: [Number, String],\n default: undefined\n },\n hideSlider: Boolean,\n sliderColor: String,\n ...makeVSlideGroupProps({\n mandatory: 'force'\n }),\n ...makeDensityProps(),\n ...makeTagProps()\n}, 'VTabs');\nexport const VTabs = genericComponent()({\n name: 'VTabs',\n props: makeVTabsProps(),\n emits: {\n 'update:modelValue': v => true\n },\n setup(props, _ref) {\n let {\n slots\n } = _ref;\n const model = useProxiedModel(props, 'modelValue');\n const parsedItems = computed(() => parseItems(props.items));\n const {\n densityClasses\n } = useDensity(props);\n const {\n backgroundColorClasses,\n backgroundColorStyles\n } = useBackgroundColor(toRef(props, 'bgColor'));\n provideDefaults({\n VTab: {\n color: toRef(props, 'color'),\n direction: toRef(props, 'direction'),\n stacked: toRef(props, 'stacked'),\n fixed: toRef(props, 'fixedTabs'),\n sliderColor: toRef(props, 'sliderColor'),\n hideSlider: toRef(props, 'hideSlider')\n }\n });\n useRender(() => {\n const [slideGroupProps] = VSlideGroup.filterProps(props);\n return _createVNode(VSlideGroup, _mergeProps(slideGroupProps, {\n \"modelValue\": model.value,\n \"onUpdate:modelValue\": $event => model.value = $event,\n \"class\": ['v-tabs', `v-tabs--${props.direction}`, `v-tabs--align-tabs-${props.alignTabs}`, {\n 'v-tabs--fixed-tabs': props.fixedTabs,\n 'v-tabs--grow': props.grow,\n 'v-tabs--stacked': props.stacked\n }, densityClasses.value, backgroundColorClasses.value, props.class],\n \"style\": [{\n '--v-tabs-height': convertToUnit(props.height)\n }, backgroundColorStyles.value, props.style],\n \"role\": \"tablist\",\n \"symbol\": VTabsSymbol\n }), {\n default: () => [slots.default ? slots.default() : parsedItems.value.map(item => _createVNode(VTab, _mergeProps(item, {\n \"key\": item.title\n }), null))]\n });\n });\n return {};\n }\n});\n//# sourceMappingURL=VTabs.mjs.map","// Utilities\nimport { keys } from \"../../util/index.mjs\"; // Types\nconst handleGesture = wrapper => {\n const {\n touchstartX,\n touchendX,\n touchstartY,\n touchendY\n } = wrapper;\n const dirRatio = 0.5;\n const minDistance = 16;\n wrapper.offsetX = touchendX - touchstartX;\n wrapper.offsetY = touchendY - touchstartY;\n if (Math.abs(wrapper.offsetY) < dirRatio * Math.abs(wrapper.offsetX)) {\n wrapper.left && touchendX < touchstartX - minDistance && wrapper.left(wrapper);\n wrapper.right && touchendX > touchstartX + minDistance && wrapper.right(wrapper);\n }\n if (Math.abs(wrapper.offsetX) < dirRatio * Math.abs(wrapper.offsetY)) {\n wrapper.up && touchendY < touchstartY - minDistance && wrapper.up(wrapper);\n wrapper.down && touchendY > touchstartY + minDistance && wrapper.down(wrapper);\n }\n};\nfunction touchstart(event, wrapper) {\n const touch = event.changedTouches[0];\n wrapper.touchstartX = touch.clientX;\n wrapper.touchstartY = touch.clientY;\n wrapper.start?.({\n originalEvent: event,\n ...wrapper\n });\n}\nfunction touchend(event, wrapper) {\n const touch = event.changedTouches[0];\n wrapper.touchendX = touch.clientX;\n wrapper.touchendY = touch.clientY;\n wrapper.end?.({\n originalEvent: event,\n ...wrapper\n });\n handleGesture(wrapper);\n}\nfunction touchmove(event, wrapper) {\n const touch = event.changedTouches[0];\n wrapper.touchmoveX = touch.clientX;\n wrapper.touchmoveY = touch.clientY;\n wrapper.move?.({\n originalEvent: event,\n ...wrapper\n });\n}\nfunction createHandlers() {\n let value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n const wrapper = {\n touchstartX: 0,\n touchstartY: 0,\n touchendX: 0,\n touchendY: 0,\n touchmoveX: 0,\n touchmoveY: 0,\n offsetX: 0,\n offsetY: 0,\n left: value.left,\n right: value.right,\n up: value.up,\n down: value.down,\n start: value.start,\n move: value.move,\n end: value.end\n };\n return {\n touchstart: e => touchstart(e, wrapper),\n touchend: e => touchend(e, wrapper),\n touchmove: e => touchmove(e, wrapper)\n };\n}\nfunction mounted(el, binding) {\n const value = binding.value;\n const target = value?.parent ? el.parentElement : el;\n const options = value?.options ?? {\n passive: true\n };\n const uid = binding.instance?.$.uid; // TODO: use custom uid generator\n\n if (!target || !uid) return;\n const handlers = createHandlers(binding.value);\n target._touchHandlers = target._touchHandlers ?? Object.create(null);\n target._touchHandlers[uid] = handlers;\n keys(handlers).forEach(eventName => {\n target.addEventListener(eventName, handlers[eventName], options);\n });\n}\nfunction unmounted(el, binding) {\n const target = binding.value?.parent ? el.parentElement : el;\n const uid = binding.instance?.$.uid;\n if (!target?._touchHandlers || !uid) return;\n const handlers = target._touchHandlers[uid];\n keys(handlers).forEach(eventName => {\n target.removeEventListener(eventName, handlers[eventName]);\n });\n delete target._touchHandlers[uid];\n}\nexport const Touch = {\n mounted,\n unmounted\n};\nexport default Touch;\n//# sourceMappingURL=index.mjs.map","import { withDirectives as _withDirectives, resolveDirective as _resolveDirective, createVNode as _createVNode } from \"vue\";\n// Styles\nimport \"./VWindow.css\";\n\n// Components\nimport { VBtn } from \"../VBtn/index.mjs\"; // Composables\nimport { makeComponentProps } from \"../../composables/component.mjs\";\nimport { useGroup } from \"../../composables/group.mjs\";\nimport { useLocale, useRtl } from \"../../composables/locale.mjs\";\nimport { makeTagProps } from \"../../composables/tag.mjs\";\nimport { makeThemeProps, provideTheme } from \"../../composables/theme.mjs\"; // Directives\nimport { Touch } from \"../../directives/touch/index.mjs\"; // Utilities\nimport { computed, provide, ref, shallowRef, watch } from 'vue';\nimport { genericComponent, propsFactory, useRender } from \"../../util/index.mjs\"; // Types\nexport const VWindowSymbol = Symbol.for('vuetify:v-window');\nexport const VWindowGroupSymbol = Symbol.for('vuetify:v-window-group');\nexport const makeVWindowProps = propsFactory({\n continuous: Boolean,\n nextIcon: {\n type: [Boolean, String, Function, Object],\n default: '$next'\n },\n prevIcon: {\n type: [Boolean, String, Function, Object],\n default: '$prev'\n },\n reverse: Boolean,\n showArrows: {\n type: [Boolean, String],\n validator: v => typeof v === 'boolean' || v === 'hover'\n },\n touch: {\n type: [Object, Boolean],\n default: undefined\n },\n direction: {\n type: String,\n default: 'horizontal'\n },\n modelValue: null,\n disabled: Boolean,\n selectedClass: {\n type: String,\n default: 'v-window-item--active'\n },\n // TODO: mandatory should probably not be exposed but do this for now\n mandatory: {\n default: 'force'\n },\n ...makeComponentProps(),\n ...makeTagProps(),\n ...makeThemeProps()\n}, 'VWindow');\nexport const VWindow = genericComponent()({\n name: 'VWindow',\n directives: {\n Touch\n },\n props: makeVWindowProps(),\n emits: {\n 'update:modelValue': v => true\n },\n setup(props, _ref) {\n let {\n slots\n } = _ref;\n const {\n themeClasses\n } = provideTheme(props);\n const {\n isRtl\n } = useRtl();\n const {\n t\n } = useLocale();\n const group = useGroup(props, VWindowGroupSymbol);\n const rootRef = ref();\n const isRtlReverse = computed(() => isRtl.value ? !props.reverse : props.reverse);\n const isReversed = shallowRef(false);\n const transition = computed(() => {\n const axis = props.direction === 'vertical' ? 'y' : 'x';\n const reverse = isRtlReverse.value ? !isReversed.value : isReversed.value;\n const direction = reverse ? '-reverse' : '';\n return `v-window-${axis}${direction}-transition`;\n });\n const transitionCount = shallowRef(0);\n const transitionHeight = ref(undefined);\n const activeIndex = computed(() => {\n return group.items.value.findIndex(item => group.selected.value.includes(item.id));\n });\n watch(activeIndex, (newVal, oldVal) => {\n const itemsLength = group.items.value.length;\n const lastIndex = itemsLength - 1;\n if (itemsLength <= 2) {\n isReversed.value = newVal < oldVal;\n } else if (newVal === lastIndex && oldVal === 0) {\n isReversed.value = true;\n } else if (newVal === 0 && oldVal === lastIndex) {\n isReversed.value = false;\n } else {\n isReversed.value = newVal < oldVal;\n }\n });\n provide(VWindowSymbol, {\n transition,\n isReversed,\n transitionCount,\n transitionHeight,\n rootRef\n });\n const canMoveBack = computed(() => props.continuous || activeIndex.value !== 0);\n const canMoveForward = computed(() => props.continuous || activeIndex.value !== group.items.value.length - 1);\n function prev() {\n canMoveBack.value && group.prev();\n }\n function next() {\n canMoveForward.value && group.next();\n }\n const arrows = computed(() => {\n const arrows = [];\n const prevProps = {\n icon: isRtl.value ? props.nextIcon : props.prevIcon,\n class: `v-window__${isRtlReverse.value ? 'right' : 'left'}`,\n onClick: group.prev,\n ariaLabel: t('$vuetify.carousel.prev')\n };\n arrows.push(canMoveBack.value ? slots.prev ? slots.prev({\n props: prevProps\n }) : _createVNode(VBtn, prevProps, null) : _createVNode(\"div\", null, null));\n const nextProps = {\n icon: isRtl.value ? props.prevIcon : props.nextIcon,\n class: `v-window__${isRtlReverse.value ? 'left' : 'right'}`,\n onClick: group.next,\n ariaLabel: t('$vuetify.carousel.next')\n };\n arrows.push(canMoveForward.value ? slots.next ? slots.next({\n props: nextProps\n }) : _createVNode(VBtn, nextProps, null) : _createVNode(\"div\", null, null));\n return arrows;\n });\n const touchOptions = computed(() => {\n if (props.touch === false) return props.touch;\n const options = {\n left: () => {\n isRtlReverse.value ? prev() : next();\n },\n right: () => {\n isRtlReverse.value ? next() : prev();\n },\n start: _ref2 => {\n let {\n originalEvent\n } = _ref2;\n originalEvent.stopPropagation();\n }\n };\n return {\n ...options,\n ...(props.touch === true ? {} : props.touch)\n };\n });\n useRender(() => _withDirectives(_createVNode(props.tag, {\n \"ref\": rootRef,\n \"class\": ['v-window', {\n 'v-window--show-arrows-on-hover': props.showArrows === 'hover'\n }, themeClasses.value, props.class],\n \"style\": props.style\n }, {\n default: () => [_createVNode(\"div\", {\n \"class\": \"v-window__container\",\n \"style\": {\n height: transitionHeight.value\n }\n }, [slots.default?.({\n group\n }), props.showArrows !== false && _createVNode(\"div\", {\n \"class\": \"v-window__controls\"\n }, [arrows.value])]), slots.additional?.({\n group\n })]\n }), [[_resolveDirective(\"touch\"), touchOptions.value]]));\n return {\n group\n };\n }\n});\n//# sourceMappingURL=VWindow.mjs.map","import { withDirectives as _withDirectives, createVNode as _createVNode, vShow as _vShow } from \"vue\";\n// Composables\nimport { makeComponentProps } from \"../../composables/component.mjs\";\nimport { makeGroupItemProps, useGroupItem } from \"../../composables/group.mjs\";\nimport { makeLazyProps, useLazy } from \"../../composables/lazy.mjs\";\nimport { useSsrBoot } from \"../../composables/ssrBoot.mjs\";\nimport { MaybeTransition } from \"../../composables/transition.mjs\"; // Directives\nimport Touch from \"../../directives/touch/index.mjs\"; // Utilities\nimport { computed, inject, nextTick, shallowRef } from 'vue';\nimport { convertToUnit, genericComponent, propsFactory, useRender } from \"../../util/index.mjs\"; // Types\nimport { VWindowGroupSymbol, VWindowSymbol } from \"./VWindow.mjs\";\nexport const makeVWindowItemProps = propsFactory({\n reverseTransition: {\n type: [Boolean, String],\n default: undefined\n },\n transition: {\n type: [Boolean, String],\n default: undefined\n },\n ...makeComponentProps(),\n ...makeGroupItemProps(),\n ...makeLazyProps()\n}, 'VWindowItem');\nexport const VWindowItem = genericComponent()({\n name: 'VWindowItem',\n directives: {\n Touch\n },\n props: makeVWindowItemProps(),\n emits: {\n 'group:selected': val => true\n },\n setup(props, _ref) {\n let {\n slots\n } = _ref;\n const window = inject(VWindowSymbol);\n const groupItem = useGroupItem(props, VWindowGroupSymbol);\n const {\n isBooted\n } = useSsrBoot();\n if (!window || !groupItem) throw new Error('[Vuetify] VWindowItem must be used inside VWindow');\n const isTransitioning = shallowRef(false);\n const hasTransition = computed(() => isBooted.value && (window.isReversed.value ? props.reverseTransition !== false : props.transition !== false));\n function onAfterTransition() {\n if (!isTransitioning.value || !window) {\n return;\n }\n\n // Finalize transition state.\n isTransitioning.value = false;\n if (window.transitionCount.value > 0) {\n window.transitionCount.value -= 1;\n\n // Remove container height if we are out of transition.\n if (window.transitionCount.value === 0) {\n window.transitionHeight.value = undefined;\n }\n }\n }\n function onBeforeTransition() {\n if (isTransitioning.value || !window) {\n return;\n }\n\n // Initialize transition state here.\n isTransitioning.value = true;\n if (window.transitionCount.value === 0) {\n // Set initial height for height transition.\n window.transitionHeight.value = convertToUnit(window.rootRef.value?.clientHeight);\n }\n window.transitionCount.value += 1;\n }\n function onTransitionCancelled() {\n onAfterTransition(); // This should have the same path as normal transition end.\n }\n\n function onEnterTransition(el) {\n if (!isTransitioning.value) {\n return;\n }\n nextTick(() => {\n // Do not set height if no transition or cancelled.\n if (!hasTransition.value || !isTransitioning.value || !window) {\n return;\n }\n\n // Set transition target height.\n window.transitionHeight.value = convertToUnit(el.clientHeight);\n });\n }\n const transition = computed(() => {\n const name = window.isReversed.value ? props.reverseTransition : props.transition;\n return !hasTransition.value ? false : {\n name: typeof name !== 'string' ? window.transition.value : name,\n onBeforeEnter: onBeforeTransition,\n onAfterEnter: onAfterTransition,\n onEnterCancelled: onTransitionCancelled,\n onBeforeLeave: onBeforeTransition,\n onAfterLeave: onAfterTransition,\n onLeaveCancelled: onTransitionCancelled,\n onEnter: onEnterTransition\n };\n });\n const {\n hasContent\n } = useLazy(props, groupItem.isSelected);\n useRender(() => _createVNode(MaybeTransition, {\n \"transition\": transition.value,\n \"disabled\": !isBooted.value\n }, {\n default: () => [_withDirectives(_createVNode(\"div\", {\n \"class\": ['v-window-item', groupItem.selectedClass.value, props.class],\n \"style\": props.style\n }, [hasContent.value && slots.default?.()]), [[_vShow, groupItem.isSelected.value]])]\n }));\n return {};\n }\n});\n//# sourceMappingURL=VWindowItem.mjs.map","\n\n\n\n\n","\n","\n\n\n\n\n","\n\n\n","\n","import { createVNode as _createVNode } from \"vue\";\n// Composables\nimport { makeComponentProps } from \"../../composables/component.mjs\";\nimport { makeTagProps } from \"../../composables/tag.mjs\"; // Utilities\nimport { genericComponent, propsFactory, useRender } from \"../../util/index.mjs\";\nexport const makeVToolbarTitleProps = propsFactory({\n text: String,\n ...makeComponentProps(),\n ...makeTagProps()\n}, 'VToolbarTitle');\nexport const VToolbarTitle = genericComponent()({\n name: 'VToolbarTitle',\n props: makeVToolbarTitleProps(),\n setup(props, _ref) {\n let {\n slots\n } = _ref;\n useRender(() => {\n const hasText = !!(slots.default || slots.text || props.text);\n return _createVNode(props.tag, {\n \"class\": ['v-toolbar-title', props.class],\n \"style\": props.style\n }, {\n default: () => [hasText && _createVNode(\"div\", {\n \"class\": \"v-toolbar-title__placeholder\"\n }, [slots.text ? slots.text() : props.text, slots.default?.()])]\n });\n });\n return {};\n }\n});\n//# sourceMappingURL=VToolbarTitle.mjs.map","import { resolveDirective as _resolveDirective, createVNode as _createVNode } from \"vue\";\n// Styles\nimport \"./VToolbar.css\";\n\n// Components\nimport { VToolbarTitle } from \"./VToolbarTitle.mjs\";\nimport { VExpandTransition } from \"../transitions/index.mjs\";\nimport { VDefaultsProvider } from \"../VDefaultsProvider/index.mjs\";\nimport { VImg } from \"../VImg/index.mjs\"; // Composables\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 { makeElevationProps, useElevation } from \"../../composables/elevation.mjs\";\nimport { useRtl } from \"../../composables/locale.mjs\";\nimport { makeRoundedProps, useRounded } from \"../../composables/rounded.mjs\";\nimport { makeTagProps } from \"../../composables/tag.mjs\";\nimport { makeThemeProps, provideTheme } from \"../../composables/theme.mjs\"; // Utilities\nimport { computed, shallowRef, toRef } from 'vue';\nimport { convertToUnit, genericComponent, propsFactory, useRender } from \"../../util/index.mjs\"; // Types\nconst allowedDensities = [null, 'prominent', 'default', 'comfortable', 'compact'];\nexport const makeVToolbarProps = propsFactory({\n absolute: Boolean,\n collapse: Boolean,\n color: String,\n density: {\n type: String,\n default: 'default',\n validator: v => allowedDensities.includes(v)\n },\n extended: Boolean,\n extensionHeight: {\n type: [Number, String],\n default: 48\n },\n flat: Boolean,\n floating: Boolean,\n height: {\n type: [Number, String],\n default: 64\n },\n image: String,\n title: String,\n ...makeBorderProps(),\n ...makeComponentProps(),\n ...makeElevationProps(),\n ...makeRoundedProps(),\n ...makeTagProps({\n tag: 'header'\n }),\n ...makeThemeProps()\n}, 'VToolbar');\nexport const VToolbar = genericComponent()({\n name: 'VToolbar',\n props: makeVToolbarProps(),\n setup(props, _ref) {\n let {\n slots\n } = _ref;\n const {\n backgroundColorClasses,\n backgroundColorStyles\n } = useBackgroundColor(toRef(props, 'color'));\n const {\n borderClasses\n } = useBorder(props);\n const {\n elevationClasses\n } = useElevation(props);\n const {\n roundedClasses\n } = useRounded(props);\n const {\n themeClasses\n } = provideTheme(props);\n const {\n rtlClasses\n } = useRtl();\n const isExtended = shallowRef(!!(props.extended || slots.extension?.()));\n const contentHeight = computed(() => parseInt(Number(props.height) + (props.density === 'prominent' ? Number(props.height) : 0) - (props.density === 'comfortable' ? 8 : 0) - (props.density === 'compact' ? 16 : 0), 10));\n const extensionHeight = computed(() => isExtended.value ? parseInt(Number(props.extensionHeight) + (props.density === 'prominent' ? Number(props.extensionHeight) : 0) - (props.density === 'comfortable' ? 4 : 0) - (props.density === 'compact' ? 8 : 0), 10) : 0);\n provideDefaults({\n VBtn: {\n variant: 'text'\n }\n });\n useRender(() => {\n const hasTitle = !!(props.title || slots.title);\n const hasImage = !!(slots.image || props.image);\n const extension = slots.extension?.();\n isExtended.value = !!(props.extended || extension);\n return _createVNode(props.tag, {\n \"class\": ['v-toolbar', {\n 'v-toolbar--absolute': props.absolute,\n 'v-toolbar--collapse': props.collapse,\n 'v-toolbar--flat': props.flat,\n 'v-toolbar--floating': props.floating,\n [`v-toolbar--density-${props.density}`]: true\n }, backgroundColorClasses.value, borderClasses.value, elevationClasses.value, roundedClasses.value, themeClasses.value, rtlClasses.value, props.class],\n \"style\": [backgroundColorStyles.value, props.style]\n }, {\n default: () => [hasImage && _createVNode(\"div\", {\n \"key\": \"image\",\n \"class\": \"v-toolbar__image\"\n }, [!slots.image ? _createVNode(VImg, {\n \"key\": \"image-img\",\n \"cover\": true,\n \"src\": props.image\n }, null) : _createVNode(VDefaultsProvider, {\n \"key\": \"image-defaults\",\n \"disabled\": !props.image,\n \"defaults\": {\n VImg: {\n cover: true,\n src: props.image\n }\n }\n }, slots.image)]), _createVNode(VDefaultsProvider, {\n \"defaults\": {\n VTabs: {\n height: convertToUnit(contentHeight.value)\n }\n }\n }, {\n default: () => [_createVNode(\"div\", {\n \"class\": \"v-toolbar__content\",\n \"style\": {\n height: convertToUnit(contentHeight.value)\n }\n }, [slots.prepend && _createVNode(\"div\", {\n \"class\": \"v-toolbar__prepend\"\n }, [slots.prepend?.()]), hasTitle && _createVNode(VToolbarTitle, {\n \"key\": \"title\",\n \"text\": props.title\n }, {\n text: slots.title\n }), slots.default?.(), slots.append && _createVNode(\"div\", {\n \"class\": \"v-toolbar__append\"\n }, [slots.append?.()])])]\n }), _createVNode(VDefaultsProvider, {\n \"defaults\": {\n VTabs: {\n height: convertToUnit(extensionHeight.value)\n }\n }\n }, {\n default: () => [_createVNode(VExpandTransition, null, {\n default: () => [isExtended.value && _createVNode(\"div\", {\n \"class\": \"v-toolbar__extension\",\n \"style\": {\n height: convertToUnit(extensionHeight.value)\n }\n }, [extension])]\n })]\n })]\n });\n });\n return {\n contentHeight,\n extensionHeight\n };\n }\n});\n//# sourceMappingURL=VToolbar.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 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 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\n const canScroll = computed(() => {\n const behavior = scrollBehavior.value;\n return behavior.hide ||\n // behavior.fullyHide ||\n 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 isCollapsed = computed(() => props.collapse || scrollBehavior.value.collapse && (scrollBehavior.value.inverted ? scrollRatio.value > 0 : scrollRatio.value === 0));\n const isFlat = computed(() => props.flat || 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 return height + extensionHeight;\n });\n useToggleScope(computed(() => !!props.scrollBehavior), () => {\n watchEffect(() => {\n if (scrollBehavior.value.hide) {\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// Styles\nimport \"./VLayout.css\";\n\n// Composables\nimport { makeComponentProps } from \"../../composables/component.mjs\";\nimport { createLayout, makeLayoutProps } from \"../../composables/layout.mjs\"; // Utilities\nimport { genericComponent, propsFactory, useRender } from \"../../util/index.mjs\";\nexport const makeVLayoutProps = propsFactory({\n ...makeComponentProps(),\n ...makeLayoutProps()\n}, 'VLayout');\nexport const VLayout = genericComponent()({\n name: 'VLayout',\n props: makeVLayoutProps(),\n setup(props, _ref) {\n let {\n slots\n } = _ref;\n const {\n layoutClasses,\n layoutStyles,\n getLayoutItem,\n items,\n layoutRef\n } = createLayout(props);\n useRender(() => _createVNode(\"div\", {\n \"ref\": layoutRef,\n \"class\": [layoutClasses.value, props.class],\n \"style\": [layoutStyles.value, props.style]\n }, [slots.default?.()]));\n return {\n getLayoutItem,\n items\n };\n }\n});\n//# sourceMappingURL=VLayout.mjs.map","import { createVNode as _createVNode } from \"vue\";\n// Styles\nimport \"./VMain.css\";\n\n// Composables\nimport { makeComponentProps } from \"../../composables/component.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 ...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 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, 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","\n\n\n","\n\n\n","export class Supplier {\n companyName = \"\";\n isBusinessPartner = false;\n email = \"\";\n}\n","import { isReactive, isReadonly, computed, unref, ref, watch, isRef, reactive, nextTick, inject, provide, getCurrentInstance, onBeforeMount, onBeforeUnmount } from 'vue-demi';\n\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n enumerableOnly && (symbols = symbols.filter(function (sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n })), keys.push.apply(keys, symbols);\n }\n\n return keys;\n}\n\nfunction _objectSpread2(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = null != arguments[i] ? arguments[i] : {};\n i % 2 ? ownKeys(Object(source), !0).forEach(function (key) {\n _defineProperty(target, key, source[key]);\n }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n\n return target;\n}\n\nfunction _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nfunction unwrapObj(obj) {\n let ignoreKeys = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n return Object.keys(obj).reduce((o, k) => {\n if (ignoreKeys.includes(k)) return o;\n o[k] = unref(obj[k]);\n return o;\n }, {});\n}\nfunction isFunction(val) {\n return typeof val === 'function';\n}\nfunction isProxy(value) {\n return isReactive(value) || isReadonly(value);\n}\nfunction get(obj, stringPath, def) {\n let current = obj;\n const path = stringPath.split('.');\n\n for (let i = 0; i < path.length; i++) {\n if (!current[path[i]]) return def;\n current = current[path[i]];\n }\n\n return current;\n}\nfunction gatherBooleanGroupProperties(group, nestedResults, property) {\n return computed(() => {\n return group.some(path => {\n return get(nestedResults, path, {\n [property]: false\n })[property];\n });\n });\n}\nfunction gatherArrayGroupProperties(group, nestedResults, property) {\n return computed(() => {\n return group.reduce((all, path) => {\n const fetchedProperty = get(nestedResults, path, {\n [property]: false\n })[property] || [];\n return all.concat(fetchedProperty);\n }, []);\n });\n}\n\nfunction callRule(rule, value, siblingState, instance) {\n return rule.call(instance, unref(value), unref(siblingState), instance);\n}\n\nfunction normalizeValidatorResponse(result) {\n return result.$valid !== undefined ? !result.$valid : !result;\n}\n\nfunction createAsyncResult(rule, model, $pending, $dirty, _ref, $response, instance) {\n let {\n $lazy,\n $rewardEarly\n } = _ref;\n let watchTargets = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : [];\n let siblingState = arguments.length > 8 ? arguments[8] : undefined;\n let $lastInvalidState = arguments.length > 9 ? arguments[9] : undefined;\n let $lastCommittedOn = arguments.length > 10 ? arguments[10] : undefined;\n const $invalid = ref(!!$dirty.value);\n const $pendingCounter = ref(0);\n $pending.value = false;\n const $unwatch = watch([model, $dirty].concat(watchTargets, $lastCommittedOn), () => {\n if ($lazy && !$dirty.value || $rewardEarly && !$lastInvalidState.value && !$pending.value) {\n return;\n }\n\n let ruleResult;\n\n try {\n ruleResult = callRule(rule, model, siblingState, instance);\n } catch (err) {\n ruleResult = Promise.reject(err);\n }\n\n $pendingCounter.value++;\n $pending.value = !!$pendingCounter.value;\n $invalid.value = false;\n Promise.resolve(ruleResult).then(data => {\n $pendingCounter.value--;\n $pending.value = !!$pendingCounter.value;\n $response.value = data;\n $invalid.value = normalizeValidatorResponse(data);\n }).catch(error => {\n $pendingCounter.value--;\n $pending.value = !!$pendingCounter.value;\n $response.value = error;\n $invalid.value = true;\n });\n }, {\n immediate: true,\n deep: typeof model === 'object'\n });\n return {\n $invalid,\n $unwatch\n };\n}\n\nfunction createSyncResult(rule, model, $dirty, _ref2, $response, instance, siblingState, $lastInvalidState) {\n let {\n $lazy,\n $rewardEarly\n } = _ref2;\n\n const $unwatch = () => ({});\n\n const $invalid = computed(() => {\n if ($lazy && !$dirty.value || $rewardEarly && !$lastInvalidState.value) {\n return false;\n }\n\n let returnValue = true;\n\n try {\n const result = callRule(rule, model, siblingState, instance);\n $response.value = result;\n returnValue = normalizeValidatorResponse(result);\n } catch (err) {\n $response.value = err;\n }\n\n return returnValue;\n });\n return {\n $unwatch,\n $invalid\n };\n}\n\nfunction createValidatorResult(rule, model, $dirty, config, instance, validatorName, propertyKey, propertyPath, siblingState, $lastInvalidState, $lastCommittedOn) {\n const $pending = ref(false);\n const $params = rule.$params || {};\n const $response = ref(null);\n let $invalid;\n let $unwatch;\n\n if (rule.$async) {\n ({\n $invalid,\n $unwatch\n } = createAsyncResult(rule.$validator, model, $pending, $dirty, config, $response, instance, rule.$watchTargets, siblingState, $lastInvalidState, $lastCommittedOn));\n } else {\n ({\n $invalid,\n $unwatch\n } = createSyncResult(rule.$validator, model, $dirty, config, $response, instance, siblingState, $lastInvalidState));\n }\n\n const message = rule.$message;\n const $message = isFunction(message) ? computed(() => message(unwrapObj({\n $pending,\n $invalid,\n $params: unwrapObj($params),\n $model: model,\n $response,\n $validator: validatorName,\n $propertyPath: propertyPath,\n $property: propertyKey\n }))) : message || '';\n return {\n $message,\n $params,\n $pending,\n $invalid,\n $response,\n $unwatch\n };\n}\n\nfunction sortValidations() {\n let validationsRaw = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n const validations = unref(validationsRaw);\n const validationKeys = Object.keys(validations);\n const rules = {};\n const nestedValidators = {};\n const config = {};\n let validationGroups = null;\n validationKeys.forEach(key => {\n const v = validations[key];\n\n switch (true) {\n case isFunction(v.$validator):\n rules[key] = v;\n break;\n\n case isFunction(v):\n rules[key] = {\n $validator: v\n };\n break;\n\n case key === '$validationGroups':\n validationGroups = v;\n break;\n\n case key.startsWith('$'):\n config[key] = v;\n break;\n\n default:\n nestedValidators[key] = v;\n }\n });\n return {\n rules,\n nestedValidators,\n config,\n validationGroups\n };\n}\n\nconst ROOT_PATH = '__root';\n\nfunction createValidationResults(rules, model, key, resultsCache, path, config, instance, externalResults, siblingState) {\n const ruleKeys = Object.keys(rules);\n const cachedResult = resultsCache.get(path, rules);\n const $dirty = ref(false);\n const $lastInvalidState = ref(false);\n const $lastCommittedOn = ref(0);\n\n if (cachedResult) {\n if (!cachedResult.$partial) return cachedResult;\n cachedResult.$unwatch();\n $dirty.value = cachedResult.$dirty.value;\n }\n\n const result = {\n $dirty,\n $path: path,\n $touch: () => {\n if (!$dirty.value) $dirty.value = true;\n },\n $reset: () => {\n if ($dirty.value) $dirty.value = false;\n },\n $commit: () => {}\n };\n\n if (!ruleKeys.length) {\n cachedResult && resultsCache.set(path, rules, result);\n return result;\n }\n\n ruleKeys.forEach(ruleKey => {\n result[ruleKey] = createValidatorResult(rules[ruleKey], model, result.$dirty, config, instance, ruleKey, key, path, siblingState, $lastInvalidState, $lastCommittedOn);\n });\n result.$externalResults = computed(() => {\n if (!externalResults.value) return [];\n return [].concat(externalResults.value).map((stringError, index) => ({\n $propertyPath: path,\n $property: key,\n $validator: '$externalResults',\n $uid: `${path}-externalResult-${index}`,\n $message: stringError,\n $params: {},\n $response: null,\n $pending: false\n }));\n });\n result.$invalid = computed(() => {\n const r = ruleKeys.some(ruleKey => unref(result[ruleKey].$invalid));\n $lastInvalidState.value = r;\n return !!result.$externalResults.value.length || r;\n });\n result.$pending = computed(() => ruleKeys.some(ruleKey => unref(result[ruleKey].$pending)));\n result.$error = computed(() => result.$dirty.value ? result.$pending.value || result.$invalid.value : false);\n result.$silentErrors = computed(() => ruleKeys.filter(ruleKey => unref(result[ruleKey].$invalid)).map(ruleKey => {\n const res = result[ruleKey];\n return reactive({\n $propertyPath: path,\n $property: key,\n $validator: ruleKey,\n $uid: `${path}-${ruleKey}`,\n $message: res.$message,\n $params: res.$params,\n $response: res.$response,\n $pending: res.$pending\n });\n }).concat(result.$externalResults.value));\n result.$errors = computed(() => result.$dirty.value ? result.$silentErrors.value : []);\n\n result.$unwatch = () => ruleKeys.forEach(ruleKey => {\n result[ruleKey].$unwatch();\n });\n\n result.$commit = () => {\n $lastInvalidState.value = true;\n $lastCommittedOn.value = Date.now();\n };\n\n resultsCache.set(path, rules, result);\n return result;\n}\n\nfunction collectNestedValidationResults(validations, nestedState, path, resultsCache, config, instance, nestedExternalResults) {\n const nestedValidationKeys = Object.keys(validations);\n if (!nestedValidationKeys.length) return {};\n return nestedValidationKeys.reduce((results, nestedKey) => {\n results[nestedKey] = setValidations({\n validations: validations[nestedKey],\n state: nestedState,\n key: nestedKey,\n parentKey: path,\n resultsCache,\n globalConfig: config,\n instance,\n externalResults: nestedExternalResults\n });\n return results;\n }, {});\n}\n\nfunction createMetaFields(results, nestedResults, childResults) {\n const allResults = computed(() => [nestedResults, childResults].filter(res => res).reduce((allRes, res) => {\n return allRes.concat(Object.values(unref(res)));\n }, []));\n const $dirty = computed({\n get() {\n return results.$dirty.value || (allResults.value.length ? allResults.value.every(r => r.$dirty) : false);\n },\n\n set(v) {\n results.$dirty.value = v;\n }\n\n });\n const $silentErrors = computed(() => {\n const modelErrors = unref(results.$silentErrors) || [];\n const nestedErrors = allResults.value.filter(result => (unref(result).$silentErrors || []).length).reduce((errors, result) => {\n return errors.concat(...result.$silentErrors);\n }, []);\n return modelErrors.concat(nestedErrors);\n });\n const $errors = computed(() => {\n const modelErrors = unref(results.$errors) || [];\n const nestedErrors = allResults.value.filter(result => (unref(result).$errors || []).length).reduce((errors, result) => {\n return errors.concat(...result.$errors);\n }, []);\n return modelErrors.concat(nestedErrors);\n });\n const $invalid = computed(() => allResults.value.some(r => r.$invalid) || unref(results.$invalid) || false);\n const $pending = computed(() => allResults.value.some(r => unref(r.$pending)) || unref(results.$pending) || false);\n const $anyDirty = computed(() => allResults.value.some(r => r.$dirty) || allResults.value.some(r => r.$anyDirty) || $dirty.value);\n const $error = computed(() => $dirty.value ? $pending.value || $invalid.value : false);\n\n const $touch = () => {\n results.$touch();\n allResults.value.forEach(result => {\n result.$touch();\n });\n };\n\n const $commit = () => {\n results.$commit();\n allResults.value.forEach(result => {\n result.$commit();\n });\n };\n\n const $reset = () => {\n results.$reset();\n allResults.value.forEach(result => {\n result.$reset();\n });\n };\n\n if (allResults.value.length && allResults.value.every(nr => nr.$dirty)) $touch();\n return {\n $dirty,\n $errors,\n $invalid,\n $anyDirty,\n $error,\n $pending,\n $touch,\n $reset,\n $silentErrors,\n $commit\n };\n}\n\nfunction setValidations(_ref) {\n let {\n validations,\n state,\n key,\n parentKey,\n childResults,\n resultsCache,\n globalConfig = {},\n instance,\n externalResults\n } = _ref;\n const path = parentKey ? `${parentKey}.${key}` : key;\n const {\n rules,\n nestedValidators,\n config,\n validationGroups\n } = sortValidations(validations);\n\n const mergedConfig = _objectSpread2(_objectSpread2({}, globalConfig), config);\n\n const nestedState = key ? computed(() => {\n const s = unref(state);\n return s ? unref(s[key]) : undefined;\n }) : state;\n\n const cachedExternalResults = _objectSpread2({}, unref(externalResults) || {});\n\n const nestedExternalResults = computed(() => {\n const results = unref(externalResults);\n if (!key) return results;\n return results ? unref(results[key]) : undefined;\n });\n const results = createValidationResults(rules, nestedState, key, resultsCache, path, mergedConfig, instance, nestedExternalResults, state);\n const nestedResults = collectNestedValidationResults(nestedValidators, nestedState, path, resultsCache, mergedConfig, instance, nestedExternalResults);\n const $validationGroups = {};\n\n if (validationGroups) {\n Object.entries(validationGroups).forEach(_ref2 => {\n let [key, group] = _ref2;\n $validationGroups[key] = {\n $invalid: gatherBooleanGroupProperties(group, nestedResults, '$invalid'),\n $error: gatherBooleanGroupProperties(group, nestedResults, '$error'),\n $pending: gatherBooleanGroupProperties(group, nestedResults, '$pending'),\n $errors: gatherArrayGroupProperties(group, nestedResults, '$errors'),\n $silentErrors: gatherArrayGroupProperties(group, nestedResults, '$silentErrors')\n };\n });\n }\n\n const {\n $dirty,\n $errors,\n $invalid,\n $anyDirty,\n $error,\n $pending,\n $touch,\n $reset,\n $silentErrors,\n $commit\n } = createMetaFields(results, nestedResults, childResults);\n const $model = key ? computed({\n get: () => unref(nestedState),\n set: val => {\n $dirty.value = true;\n const s = unref(state);\n const external = unref(externalResults);\n\n if (external) {\n external[key] = cachedExternalResults[key];\n }\n\n if (isRef(s[key])) {\n s[key].value = val;\n } else {\n s[key] = val;\n }\n }\n }) : null;\n\n if (key && mergedConfig.$autoDirty) {\n watch(nestedState, () => {\n if (!$dirty.value) $touch();\n const external = unref(externalResults);\n\n if (external) {\n external[key] = cachedExternalResults[key];\n }\n }, {\n flush: 'sync'\n });\n }\n\n async function $validate() {\n $touch();\n\n if (mergedConfig.$rewardEarly) {\n $commit();\n await nextTick();\n }\n\n await nextTick();\n return new Promise(resolve => {\n if (!$pending.value) return resolve(!$invalid.value);\n const unwatch = watch($pending, () => {\n resolve(!$invalid.value);\n unwatch();\n });\n });\n }\n\n function $getResultsForChild(key) {\n return (childResults.value || {})[key];\n }\n\n function $clearExternalResults() {\n if (isRef(externalResults)) {\n externalResults.value = cachedExternalResults;\n } else {\n if (Object.keys(cachedExternalResults).length === 0) {\n Object.keys(externalResults).forEach(k => {\n delete externalResults[k];\n });\n } else {\n Object.assign(externalResults, cachedExternalResults);\n }\n }\n }\n\n return reactive(_objectSpread2(_objectSpread2(_objectSpread2({}, results), {}, {\n $model,\n $dirty,\n $error,\n $errors,\n $invalid,\n $anyDirty,\n $pending,\n $touch,\n $reset,\n $path: path || ROOT_PATH,\n $silentErrors,\n $validate,\n $commit\n }, childResults && {\n $getResultsForChild,\n $clearExternalResults,\n $validationGroups\n }), nestedResults));\n}\n\nclass ResultsStorage {\n constructor() {\n this.storage = new Map();\n }\n\n set(path, rules, result) {\n this.storage.set(path, {\n rules,\n result\n });\n }\n\n checkRulesValidity(path, rules, storedRules) {\n const storedRulesKeys = Object.keys(storedRules);\n const newRulesKeys = Object.keys(rules);\n if (newRulesKeys.length !== storedRulesKeys.length) return false;\n const hasAllValidators = newRulesKeys.every(ruleKey => storedRulesKeys.includes(ruleKey));\n if (!hasAllValidators) return false;\n return newRulesKeys.every(ruleKey => {\n if (!rules[ruleKey].$params) return true;\n return Object.keys(rules[ruleKey].$params).every(paramKey => {\n return unref(storedRules[ruleKey].$params[paramKey]) === unref(rules[ruleKey].$params[paramKey]);\n });\n });\n }\n\n get(path, rules) {\n const storedRuleResultPair = this.storage.get(path);\n if (!storedRuleResultPair) return undefined;\n const {\n rules: storedRules,\n result\n } = storedRuleResultPair;\n const isValidCache = this.checkRulesValidity(path, rules, storedRules);\n const $unwatch = result.$unwatch ? result.$unwatch : () => ({});\n if (!isValidCache) return {\n $dirty: result.$dirty,\n $partial: true,\n $unwatch\n };\n return result;\n }\n\n}\n\nconst CollectFlag = {\n COLLECT_ALL: true,\n COLLECT_NONE: false\n};\nconst VuelidateInjectChildResults = Symbol('vuelidate#injectChildResults');\nconst VuelidateRemoveChildResults = Symbol('vuelidate#removeChildResults');\nfunction nestedValidations(_ref) {\n let {\n $scope,\n instance\n } = _ref;\n const childResultsRaw = {};\n const childResultsKeys = ref([]);\n const childResults = computed(() => childResultsKeys.value.reduce((results, key) => {\n results[key] = unref(childResultsRaw[key]);\n return results;\n }, {}));\n\n function injectChildResultsIntoParent(results, _ref2) {\n let {\n $registerAs: key,\n $scope: childScope,\n $stopPropagation\n } = _ref2;\n if ($stopPropagation || $scope === CollectFlag.COLLECT_NONE || childScope === CollectFlag.COLLECT_NONE || $scope !== CollectFlag.COLLECT_ALL && $scope !== childScope) return;\n childResultsRaw[key] = results;\n childResultsKeys.value.push(key);\n }\n\n instance.__vuelidateInjectInstances = [].concat(instance.__vuelidateInjectInstances || [], injectChildResultsIntoParent);\n\n function removeChildResultsFromParent(key) {\n childResultsKeys.value = childResultsKeys.value.filter(childKey => childKey !== key);\n delete childResultsRaw[key];\n }\n\n instance.__vuelidateRemoveInstances = [].concat(instance.__vuelidateRemoveInstances || [], removeChildResultsFromParent);\n const sendValidationResultsToParent = inject(VuelidateInjectChildResults, []);\n provide(VuelidateInjectChildResults, instance.__vuelidateInjectInstances);\n const removeValidationResultsFromParent = inject(VuelidateRemoveChildResults, []);\n provide(VuelidateRemoveChildResults, instance.__vuelidateRemoveInstances);\n return {\n childResults,\n sendValidationResultsToParent,\n removeValidationResultsFromParent\n };\n}\n\nfunction ComputedProxyFactory(target) {\n return new Proxy(target, {\n get(target, prop) {\n return typeof target[prop] === 'object' ? ComputedProxyFactory(target[prop]) : computed(() => target[prop]);\n }\n\n });\n}\n\nlet uid = 0;\nfunction useVuelidate(validations, state) {\n var _getCurrentInstance;\n\n let globalConfig = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n\n if (arguments.length === 1) {\n globalConfig = validations;\n validations = undefined;\n state = undefined;\n }\n\n let {\n $registerAs,\n $scope = CollectFlag.COLLECT_ALL,\n $stopPropagation,\n $externalResults,\n currentVueInstance\n } = globalConfig;\n const instance = currentVueInstance || ((_getCurrentInstance = getCurrentInstance()) === null || _getCurrentInstance === void 0 ? void 0 : _getCurrentInstance.proxy);\n const componentOptions = instance ? instance.$options : {};\n\n if (!$registerAs) {\n uid += 1;\n $registerAs = `_vuelidate_${uid}`;\n }\n\n const validationResults = ref({});\n const resultsCache = new ResultsStorage();\n const {\n childResults,\n sendValidationResultsToParent,\n removeValidationResultsFromParent\n } = instance ? nestedValidations({\n $scope,\n instance\n }) : {\n childResults: ref({})\n };\n\n if (!validations && componentOptions.validations) {\n const rules = componentOptions.validations;\n state = ref({});\n onBeforeMount(() => {\n state.value = instance;\n watch(() => isFunction(rules) ? rules.call(state.value, new ComputedProxyFactory(state.value)) : rules, validations => {\n validationResults.value = setValidations({\n validations,\n state,\n childResults,\n resultsCache,\n globalConfig,\n instance,\n externalResults: $externalResults || instance.vuelidateExternalResults\n });\n }, {\n immediate: true\n });\n });\n globalConfig = componentOptions.validationsConfig || globalConfig;\n } else {\n const validationsWatchTarget = isRef(validations) || isProxy(validations) ? validations : reactive(validations || {});\n watch(validationsWatchTarget, newValidationRules => {\n validationResults.value = setValidations({\n validations: newValidationRules,\n state,\n childResults,\n resultsCache,\n globalConfig,\n instance: instance !== null && instance !== void 0 ? instance : {},\n externalResults: $externalResults\n });\n }, {\n immediate: true\n });\n }\n\n if (instance) {\n sendValidationResultsToParent.forEach(f => f(validationResults, {\n $registerAs,\n $scope,\n $stopPropagation\n }));\n onBeforeUnmount(() => removeValidationResultsFromParent.forEach(f => f($registerAs)));\n }\n\n return computed(() => {\n return _objectSpread2(_objectSpread2({}, unref(validationResults.value)), childResults.value);\n });\n}\n\nexport { CollectFlag, useVuelidate as default, useVuelidate };\n","import { unref } from 'vue-demi';\n\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n enumerableOnly && (symbols = symbols.filter(function (sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n })), keys.push.apply(keys, symbols);\n }\n\n return keys;\n}\n\nfunction _objectSpread2(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = null != arguments[i] ? arguments[i] : {};\n i % 2 ? ownKeys(Object(source), !0).forEach(function (key) {\n _defineProperty(target, key, source[key]);\n }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n\n return target;\n}\n\nfunction _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nfunction isFunction(val) {\n return typeof val === 'function';\n}\nfunction isObject(o) {\n return o !== null && typeof o === 'object' && !Array.isArray(o);\n}\nfunction normalizeValidatorObject(validator) {\n return isFunction(validator.$validator) ? _objectSpread2({}, validator) : {\n $validator: validator\n };\n}\nfunction isPromise(object) {\n return isObject(object) && isFunction(object.then);\n}\nfunction unwrapValidatorResponse(result) {\n if (typeof result === 'object') return result.$valid;\n return result;\n}\nfunction unwrapNormalizedValidator(validator) {\n return validator.$validator || validator;\n}\n\nfunction withParams($params, $validator) {\n if (!isObject($params)) throw new Error(`[@vuelidate/validators]: First parameter to \"withParams\" should be an object, provided ${typeof $params}`);\n if (!isObject($validator) && !isFunction($validator)) throw new Error(`[@vuelidate/validators]: Validator must be a function or object with $validator parameter`);\n const validatorObj = normalizeValidatorObject($validator);\n validatorObj.$params = _objectSpread2(_objectSpread2({}, validatorObj.$params || {}), $params);\n return validatorObj;\n}\n\nfunction withMessage($message, $validator) {\n if (!isFunction($message) && typeof unref($message) !== 'string') throw new Error(`[@vuelidate/validators]: First parameter to \"withMessage\" should be string or a function returning a string, provided ${typeof $message}`);\n if (!isObject($validator) && !isFunction($validator)) throw new Error(`[@vuelidate/validators]: Validator must be a function or object with $validator parameter`);\n const validatorObj = normalizeValidatorObject($validator);\n validatorObj.$message = $message;\n return validatorObj;\n}\n\nfunction withAsync($validator) {\n let $watchTargets = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n const validatorObj = normalizeValidatorObject($validator);\n return _objectSpread2(_objectSpread2({}, validatorObj), {}, {\n $async: true,\n $watchTargets\n });\n}\n\nfunction forEach(validators) {\n return {\n $validator(collection) {\n for (var _len = arguments.length, others = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n others[_key - 1] = arguments[_key];\n }\n\n return unref(collection).reduce((previous, collectionItem, index) => {\n const collectionEntryResult = Object.entries(collectionItem).reduce((all, _ref) => {\n let [property, $model] = _ref;\n const innerValidators = validators[property] || {};\n const propertyResult = Object.entries(innerValidators).reduce((all, _ref2) => {\n let [validatorName, currentValidator] = _ref2;\n const validatorFunction = unwrapNormalizedValidator(currentValidator);\n const $response = validatorFunction.call(this, $model, collectionItem, index, ...others);\n const $valid = unwrapValidatorResponse($response);\n all.$data[validatorName] = $response;\n all.$data.$invalid = !$valid || !!all.$data.$invalid;\n all.$data.$error = all.$data.$invalid;\n\n if (!$valid) {\n let $message = currentValidator.$message || '';\n const $params = currentValidator.$params || {};\n\n if (typeof $message === 'function') {\n $message = $message({\n $pending: false,\n $invalid: !$valid,\n $params,\n $model,\n $response\n });\n }\n\n all.$errors.push({\n $property: property,\n $message,\n $params,\n $response,\n $model,\n $pending: false,\n $validator: validatorName\n });\n }\n\n return {\n $valid: all.$valid && $valid,\n $data: all.$data,\n $errors: all.$errors\n };\n }, {\n $valid: true,\n $data: {},\n $errors: []\n });\n all.$data[property] = propertyResult.$data;\n all.$errors[property] = propertyResult.$errors;\n return {\n $valid: all.$valid && propertyResult.$valid,\n $data: all.$data,\n $errors: all.$errors\n };\n }, {\n $valid: true,\n $data: {},\n $errors: {}\n });\n return {\n $valid: previous.$valid && collectionEntryResult.$valid,\n $data: previous.$data.concat(collectionEntryResult.$data),\n $errors: previous.$errors.concat(collectionEntryResult.$errors)\n };\n }, {\n $valid: true,\n $data: [],\n $errors: []\n });\n },\n\n $message: _ref3 => {\n let {\n $response\n } = _ref3;\n return $response ? $response.$errors.map(context => {\n return Object.values(context).map(errors => errors.map(error => error.$message)).reduce((a, b) => a.concat(b), []);\n }) : [];\n }\n };\n}\n\nconst req = value => {\n value = unref(value);\n if (Array.isArray(value)) return !!value.length;\n\n if (value === undefined || value === null) {\n return false;\n }\n\n if (value === false) {\n return true;\n }\n\n if (value instanceof Date) {\n return !isNaN(value.getTime());\n }\n\n if (typeof value === 'object') {\n for (let _ in value) return true;\n\n return false;\n }\n\n return !!String(value).length;\n};\nconst len = value => {\n value = unref(value);\n if (Array.isArray(value)) return value.length;\n\n if (typeof value === 'object') {\n return Object.keys(value).length;\n }\n\n return String(value).length;\n};\nfunction regex() {\n for (var _len = arguments.length, expr = new Array(_len), _key = 0; _key < _len; _key++) {\n expr[_key] = arguments[_key];\n }\n\n return value => {\n value = unref(value);\n return !req(value) || expr.every(reg => {\n reg.lastIndex = 0;\n return reg.test(value);\n });\n };\n}\n\nvar common = /*#__PURE__*/Object.freeze({\n __proto__: null,\n forEach: forEach,\n len: len,\n normalizeValidatorObject: normalizeValidatorObject,\n regex: regex,\n req: req,\n unwrap: unref,\n unwrapNormalizedValidator: unwrapNormalizedValidator,\n unwrapValidatorResponse: unwrapValidatorResponse,\n withAsync: withAsync,\n withMessage: withMessage,\n withParams: withParams\n});\n\nvar alpha$1 = regex(/^[a-zA-Z]*$/);\n\nvar alpha = {\n $validator: alpha$1,\n $message: 'The value is not alphabetical',\n $params: {\n type: 'alpha'\n }\n};\n\nvar alphaNum$1 = regex(/^[a-zA-Z0-9]*$/);\n\nvar alphaNum = {\n $validator: alphaNum$1,\n $message: 'The value must be alpha-numeric',\n $params: {\n type: 'alphaNum'\n }\n};\n\nvar numeric$1 = regex(/^\\d*(\\.\\d+)?$/);\n\nvar numeric = {\n $validator: numeric$1,\n $message: 'Value must be numeric',\n $params: {\n type: 'numeric'\n }\n};\n\nfunction between$1 (min, max) {\n return value => !req(value) || (!/\\s/.test(value) || value instanceof Date) && +unref(min) <= +value && +unref(max) >= +value;\n}\n\nfunction between (min, max) {\n return {\n $validator: between$1(min, max),\n $message: _ref => {\n let {\n $params\n } = _ref;\n return `The value must be between ${$params.min} and ${$params.max}`;\n },\n $params: {\n min,\n max,\n type: 'between'\n }\n };\n}\n\nconst emailRegex = /^(?:[A-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[A-z0-9!#$%&'*+/=?^_`{|}~-]+)*|\"(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21\\x23-\\x5b\\x5d-\\x7f]|[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])*\")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9]{2,}(?:[a-z0-9-]*[a-z0-9])?|\\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21-\\x5a\\x53-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])+)\\])$/i;\nvar email$1 = regex(emailRegex);\n\nvar email = {\n $validator: email$1,\n $message: 'Value is not a valid email address',\n $params: {\n type: 'email'\n }\n};\n\nfunction ipAddress$1 (value) {\n if (!req(value)) {\n return true;\n }\n\n if (typeof value !== 'string') {\n return false;\n }\n\n const nibbles = value.split('.');\n return nibbles.length === 4 && nibbles.every(nibbleValid);\n}\n\nconst nibbleValid = nibble => {\n if (nibble.length > 3 || nibble.length === 0) {\n return false;\n }\n\n if (nibble[0] === '0' && nibble !== '0') {\n return false;\n }\n\n if (!nibble.match(/^\\d+$/)) {\n return false;\n }\n\n const numeric = +nibble | 0;\n return numeric >= 0 && numeric <= 255;\n};\n\nvar ipAddress = {\n $validator: ipAddress$1,\n $message: 'The value is not a valid IP address',\n $params: {\n type: 'ipAddress'\n }\n};\n\nfunction macAddress$1 () {\n let separator = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : ':';\n return value => {\n separator = unref(separator);\n\n if (!req(value)) {\n return true;\n }\n\n if (typeof value !== 'string') {\n return false;\n }\n\n const parts = typeof separator === 'string' && separator !== '' ? value.split(separator) : value.length === 12 || value.length === 16 ? value.match(/.{2}/g) : null;\n return parts !== null && (parts.length === 6 || parts.length === 8) && parts.every(hexValid);\n };\n}\n\nconst hexValid = hex => hex.toLowerCase().match(/^[0-9a-f]{2}$/);\n\nfunction macAddress (separator) {\n return {\n $validator: macAddress$1(separator),\n $message: 'The value is not a valid MAC Address',\n $params: {\n type: 'macAddress'\n }\n };\n}\n\nfunction maxLength$1 (length) {\n return value => !req(value) || len(value) <= unref(length);\n}\n\nfunction maxLength (max) {\n return {\n $validator: maxLength$1(max),\n $message: _ref => {\n let {\n $params\n } = _ref;\n return `The maximum length allowed is ${$params.max}`;\n },\n $params: {\n max,\n type: 'maxLength'\n }\n };\n}\n\nfunction minLength$1 (length) {\n return value => !req(value) || len(value) >= unref(length);\n}\n\nfunction minLength (min) {\n return {\n $validator: minLength$1(min),\n $message: _ref => {\n let {\n $params\n } = _ref;\n return `This field should be at least ${$params.min} characters long`;\n },\n $params: {\n min,\n type: 'minLength'\n }\n };\n}\n\nfunction required$1 (value) {\n if (typeof value === 'string') {\n value = value.trim();\n }\n\n return req(value);\n}\n\nvar required = {\n $validator: required$1,\n $message: 'Value is required',\n $params: {\n type: 'required'\n }\n};\n\nconst validate$1 = (prop, val) => prop ? req(typeof val === 'string' ? val.trim() : val) : true;\n\nfunction requiredIf$1(propOrFunction) {\n return function (value, parentVM) {\n if (typeof propOrFunction !== 'function') {\n return validate$1(unref(propOrFunction), value);\n }\n\n const result = propOrFunction.call(this, value, parentVM);\n return validate$1(result, value);\n };\n}\n\nfunction requiredIf (prop) {\n return {\n $validator: requiredIf$1(prop),\n $message: 'The value is required',\n $params: {\n type: 'requiredIf',\n prop\n }\n };\n}\n\nconst validate = (prop, val) => !prop ? req(typeof val === 'string' ? val.trim() : val) : true;\n\nfunction requiredUnless$1(propOrFunction) {\n return function (value, parentVM) {\n if (typeof propOrFunction !== 'function') {\n return validate(unref(propOrFunction), value);\n }\n\n const result = propOrFunction.call(this, value, parentVM);\n return validate(result, value);\n };\n}\n\nfunction requiredUnless (prop) {\n return {\n $validator: requiredUnless$1(prop),\n $message: 'The value is required',\n $params: {\n type: 'requiredUnless',\n prop\n }\n };\n}\n\nfunction sameAs$1 (equalTo) {\n return value => unref(value) === unref(equalTo);\n}\n\nfunction sameAs (equalTo) {\n let otherName = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'other';\n return {\n $validator: sameAs$1(equalTo),\n $message: _ref => {\n return `The value must be equal to the ${otherName} value`;\n },\n $params: {\n equalTo,\n otherName,\n type: 'sameAs'\n }\n };\n}\n\nconst urlRegex = /^(?:(?:(?:https?|ftp):)?\\/\\/)(?:\\S+(?::\\S*)?@)?(?:(?!(?:10|127)(?:\\.\\d{1,3}){3})(?!(?:169\\.254|192\\.168)(?:\\.\\d{1,3}){2})(?!172\\.(?:1[6-9]|2\\d|3[0-1])(?:\\.\\d{1,3}){2})(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[1-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z0-9\\u00a1-\\uffff][a-z0-9\\u00a1-\\uffff_-]{0,62})?[a-z0-9\\u00a1-\\uffff]\\.)+(?:[a-z\\u00a1-\\uffff]{2,}\\.?))(?::\\d{2,5})?(?:[/?#]\\S*)?$/i;\nvar url$1 = regex(urlRegex);\n\nvar url = {\n $validator: url$1,\n $message: 'The value is not a valid URL address',\n $params: {\n type: 'url'\n }\n};\n\nfunction syncOr(validators) {\n return function () {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return validators.reduce((valid, fn) => {\n if (unwrapValidatorResponse(valid)) return valid;\n return unwrapNormalizedValidator(fn).apply(this, args);\n }, false);\n };\n}\n\nfunction asyncOr(validators) {\n return function () {\n for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args[_key2] = arguments[_key2];\n }\n\n return validators.reduce(async (valid, fn) => {\n const r = await valid;\n if (unwrapValidatorResponse(r)) return r;\n return unwrapNormalizedValidator(fn).apply(this, args);\n }, Promise.resolve(false));\n };\n}\n\nfunction or$1() {\n for (var _len3 = arguments.length, validators = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {\n validators[_key3] = arguments[_key3];\n }\n\n const $async = validators.some(v => v.$async);\n const $watchTargets = validators.reduce((all, v) => {\n if (!v.$watchTargets) return all;\n return all.concat(v.$watchTargets);\n }, []);\n\n let $validator = () => false;\n\n if (validators.length) $validator = $async ? asyncOr(validators) : syncOr(validators);\n return {\n $async,\n $validator,\n $watchTargets\n };\n}\n\nfunction or () {\n return withParams({\n type: 'or'\n }, withMessage('The value does not match any of the provided validators', or$1(...arguments)));\n}\n\nfunction syncAnd(validators) {\n return function () {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return validators.reduce((valid, fn) => {\n if (!unwrapValidatorResponse(valid)) return valid;\n return unwrapNormalizedValidator(fn).apply(this, args);\n }, true);\n };\n}\n\nfunction asyncAnd(validators) {\n return function () {\n for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args[_key2] = arguments[_key2];\n }\n\n return validators.reduce(async (valid, fn) => {\n const r = await valid;\n if (!unwrapValidatorResponse(r)) return r;\n return unwrapNormalizedValidator(fn).apply(this, args);\n }, Promise.resolve(true));\n };\n}\n\nfunction and$1() {\n for (var _len3 = arguments.length, validators = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {\n validators[_key3] = arguments[_key3];\n }\n\n const $async = validators.some(v => v.$async);\n const $watchTargets = validators.reduce((all, v) => {\n if (!v.$watchTargets) return all;\n return all.concat(v.$watchTargets);\n }, []);\n\n let $validator = () => false;\n\n if (validators.length) $validator = $async ? asyncAnd(validators) : syncAnd(validators);\n return {\n $async,\n $validator,\n $watchTargets\n };\n}\n\nfunction and () {\n return withParams({\n type: 'and'\n }, withMessage('The value does not match all of the provided validators', and$1(...arguments)));\n}\n\nfunction not$1 (validator) {\n return function (value, vm) {\n if (!req(value)) return true;\n const response = unwrapNormalizedValidator(validator).call(this, value, vm);\n if (!isPromise(response)) return !unwrapValidatorResponse(response);\n return response.then(r => !unwrapValidatorResponse(r));\n };\n}\n\nfunction not (validator) {\n return {\n $validator: not$1(validator),\n $message: `The value does not match the provided validator`,\n $params: {\n type: 'not'\n }\n };\n}\n\nfunction minValue$1 (min) {\n return value => !req(value) || (!/\\s/.test(value) || value instanceof Date) && +value >= +unref(min);\n}\n\nfunction minValue (min) {\n return {\n $validator: minValue$1(min),\n $message: _ref => {\n let {\n $params\n } = _ref;\n return `The minimum value allowed is ${$params.min}`;\n },\n $params: {\n min,\n type: 'minValue'\n }\n };\n}\n\nfunction maxValue$1 (max) {\n return value => !req(value) || (!/\\s/.test(value) || value instanceof Date) && +value <= +unref(max);\n}\n\nvar maxValue = (max => ({\n $validator: maxValue$1(max),\n $message: _ref => {\n let {\n $params\n } = _ref;\n return `The maximum value allowed is ${$params.max}`;\n },\n $params: {\n max,\n type: 'maxValue'\n }\n}));\n\nvar integer$1 = regex(/(^[0-9]*$)|(^-[0-9]+$)/);\n\nvar integer = {\n $validator: integer$1,\n $message: 'Value is not an integer',\n $params: {\n type: 'integer'\n }\n};\n\nvar decimal$1 = regex(/^[-]?\\d*(\\.\\d+)?$/);\n\nvar decimal = {\n $validator: decimal$1,\n $message: 'Value must be decimal',\n $params: {\n type: 'decimal'\n }\n};\n\nfunction createI18nMessage(_ref) {\n let {\n t,\n messagePath = _ref2 => {\n let {\n $validator\n } = _ref2;\n return `validations.${$validator}`;\n },\n messageParams = params => params\n } = _ref;\n return function withI18nMessage(validator) {\n let {\n withArguments = false,\n messagePath: localMessagePath = messagePath,\n messageParams: localMessageParams = messageParams\n } = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n function message(props) {\n return t(localMessagePath(props), localMessageParams(_objectSpread2({\n model: props.$model,\n property: props.$property,\n pending: props.$pending,\n invalid: props.$invalid,\n response: props.$response,\n validator: props.$validator,\n propertyPath: props.$propertyPath\n }, props.$params)));\n }\n\n if (withArguments && typeof validator === 'function') {\n return function () {\n return withMessage(message, validator(...arguments));\n };\n }\n\n return withMessage(message, validator);\n };\n}\n\nexport { alpha, alphaNum, and, between, createI18nMessage, decimal, email, common as helpers, integer, ipAddress, macAddress, maxLength, maxValue, minLength, minValue, not, numeric, or, required, requiredIf, requiredUnless, sameAs, url };\n","\n\n\n","\n\n\n","\n\n\n","\n\n\n","\n\n\n","\n\n\n\n\n","\n\n\n\n\n","\n\n\n\n\n","// Utilities\nimport { createSimpleFunctional } from \"../../util/index.mjs\";\nexport const VAlertTitle = createSimpleFunctional('v-alert-title');\n//# sourceMappingURL=VAlertTitle.mjs.map","import { mergeProps as _mergeProps, resolveDirective as _resolveDirective, createVNode as _createVNode } from \"vue\";\n// Styles\nimport \"./VAlert.css\";\n\n// Components\nimport { VAlertTitle } from \"./VAlertTitle.mjs\";\nimport { VBtn } from \"../VBtn/index.mjs\";\nimport { VDefaultsProvider } from \"../VDefaultsProvider/index.mjs\";\nimport { VIcon } from \"../VIcon/index.mjs\"; // Composables\nimport { useTextColor } from \"../../composables/color.mjs\";\nimport { makeComponentProps } from \"../../composables/component.mjs\";\nimport { makeDensityProps, useDensity } from \"../../composables/density.mjs\";\nimport { makeDimensionProps, useDimension } from \"../../composables/dimensions.mjs\";\nimport { makeElevationProps, useElevation } from \"../../composables/elevation.mjs\";\nimport { IconValue } from \"../../composables/icons.mjs\";\nimport { useLocale } from \"../../composables/locale.mjs\";\nimport { makeLocationProps, useLocation } from \"../../composables/location.mjs\";\nimport { makePositionProps, usePosition } from \"../../composables/position.mjs\";\nimport { useProxiedModel } from \"../../composables/proxiedModel.mjs\";\nimport { makeRoundedProps, useRounded } from \"../../composables/rounded.mjs\";\nimport { makeTagProps } from \"../../composables/tag.mjs\";\nimport { makeThemeProps, provideTheme } from \"../../composables/theme.mjs\";\nimport { genOverlays, makeVariantProps, useVariant } from \"../../composables/variant.mjs\"; // Utilities\nimport { computed, toRef } from 'vue';\nimport { genericComponent, propsFactory } from \"../../util/index.mjs\"; // Types\nconst allowedTypes = ['success', 'info', 'warning', 'error'];\nexport const makeVAlertProps = propsFactory({\n border: {\n type: [Boolean, String],\n validator: val => {\n return typeof val === 'boolean' || ['top', 'end', 'bottom', 'start'].includes(val);\n }\n },\n borderColor: String,\n closable: Boolean,\n closeIcon: {\n type: IconValue,\n default: '$close'\n },\n closeLabel: {\n type: String,\n default: '$vuetify.close'\n },\n icon: {\n type: [Boolean, String, Function, Object],\n default: null\n },\n modelValue: {\n type: Boolean,\n default: true\n },\n prominent: Boolean,\n title: String,\n text: String,\n type: {\n type: String,\n validator: val => allowedTypes.includes(val)\n },\n ...makeComponentProps(),\n ...makeDensityProps(),\n ...makeDimensionProps(),\n ...makeElevationProps(),\n ...makeLocationProps(),\n ...makePositionProps(),\n ...makeRoundedProps(),\n ...makeTagProps(),\n ...makeThemeProps(),\n ...makeVariantProps({\n variant: 'flat'\n })\n}, 'VAlert');\nexport const VAlert = genericComponent()({\n name: 'VAlert',\n props: makeVAlertProps(),\n emits: {\n 'click:close': e => true,\n 'update:modelValue': value => true\n },\n setup(props, _ref) {\n let {\n emit,\n slots\n } = _ref;\n const isActive = useProxiedModel(props, 'modelValue');\n const icon = computed(() => {\n if (props.icon === false) return undefined;\n if (!props.type) return props.icon;\n return props.icon ?? `$${props.type}`;\n });\n const variantProps = computed(() => ({\n color: props.color ?? props.type,\n variant: props.variant\n }));\n const {\n themeClasses\n } = provideTheme(props);\n const {\n colorClasses,\n colorStyles,\n variantClasses\n } = useVariant(variantProps);\n const {\n densityClasses\n } = useDensity(props);\n const {\n dimensionStyles\n } = useDimension(props);\n const {\n elevationClasses\n } = useElevation(props);\n const {\n locationStyles\n } = useLocation(props);\n const {\n positionClasses\n } = usePosition(props);\n const {\n roundedClasses\n } = useRounded(props);\n const {\n textColorClasses,\n textColorStyles\n } = useTextColor(toRef(props, 'borderColor'));\n const {\n t\n } = useLocale();\n const closeProps = computed(() => ({\n 'aria-label': t(props.closeLabel),\n onClick(e) {\n isActive.value = false;\n emit('click:close', e);\n }\n }));\n return () => {\n const hasPrepend = !!(slots.prepend || icon.value);\n const hasTitle = !!(slots.title || props.title);\n const hasClose = !!(slots.close || props.closable);\n return isActive.value && _createVNode(props.tag, {\n \"class\": ['v-alert', props.border && {\n 'v-alert--border': !!props.border,\n [`v-alert--border-${props.border === true ? 'start' : props.border}`]: true\n }, {\n 'v-alert--prominent': props.prominent\n }, themeClasses.value, colorClasses.value, densityClasses.value, elevationClasses.value, positionClasses.value, roundedClasses.value, variantClasses.value, props.class],\n \"style\": [colorStyles.value, dimensionStyles.value, locationStyles.value, props.style],\n \"role\": \"alert\"\n }, {\n default: () => [genOverlays(false, 'v-alert'), props.border && _createVNode(\"div\", {\n \"key\": \"border\",\n \"class\": ['v-alert__border', textColorClasses.value],\n \"style\": textColorStyles.value\n }, null), hasPrepend && _createVNode(\"div\", {\n \"key\": \"prepend\",\n \"class\": \"v-alert__prepend\"\n }, [!slots.prepend ? _createVNode(VIcon, {\n \"key\": \"prepend-icon\",\n \"density\": props.density,\n \"icon\": icon.value,\n \"size\": props.prominent ? 44 : 28\n }, null) : _createVNode(VDefaultsProvider, {\n \"key\": \"prepend-defaults\",\n \"disabled\": !icon.value,\n \"defaults\": {\n VIcon: {\n density: props.density,\n icon: icon.value,\n size: props.prominent ? 44 : 28\n }\n }\n }, slots.prepend)]), _createVNode(\"div\", {\n \"class\": \"v-alert__content\"\n }, [hasTitle && _createVNode(VAlertTitle, {\n \"key\": \"title\"\n }, {\n default: () => [slots.title?.() ?? props.title]\n }), slots.text?.() ?? props.text, slots.default?.()]), slots.append && _createVNode(\"div\", {\n \"key\": \"append\",\n \"class\": \"v-alert__append\"\n }, [slots.append()]), hasClose && _createVNode(\"div\", {\n \"key\": \"close\",\n \"class\": \"v-alert__close\"\n }, [!slots.close ? _createVNode(VBtn, _mergeProps({\n \"key\": \"close-btn\",\n \"icon\": props.closeIcon,\n \"size\": \"x-small\",\n \"variant\": \"text\"\n }, closeProps.value), null) : _createVNode(VDefaultsProvider, {\n \"key\": \"close-defaults\",\n \"defaults\": {\n VBtn: {\n icon: props.closeIcon,\n size: 'x-small',\n variant: 'text'\n }\n }\n }, {\n default: () => [slots.close?.({\n props: closeProps.value\n })]\n })])]\n });\n };\n }\n});\n//# sourceMappingURL=VAlert.mjs.map","\n\n\n\n\n","\n\n\n","\n\n\n","import { defineStore } from \"pinia\";\n\nexport interface RouterHelperState {\n isFirstRequest: boolean;\n displayBackButton: boolean;\n showQuestionnaireProgressBar: boolean;\n}\n\nexport const useRouterHelper = defineStore(\"routerHelper\", {\n state: (): RouterHelperState => ({\n isFirstRequest: true,\n displayBackButton: false,\n showQuestionnaireProgressBar: false,\n }),\n actions: {\n changeStateAfterFirstRequest(): void {\n this.isFirstRequest = false;\n },\n },\n});\n","import { defineStore } from \"pinia\";\n\nexport interface ReportsState {\n selectedQuestionnareId: string;\n selectedContextId: string;\n selectedQuestionnaireLabel: string;\n selectedReceiverCompanyName: string;\n}\n\nexport const useReportViewStore = defineStore(\"reportViewStore\", {\n state: () => ({\n selectedQuestionnareId: \"\",\n selectedQuestionnaireLabel: \"\",\n selectedContextId: \"\",\n selectedReceiverCompanyName: \"\",\n }),\n});","\n\n\n\n\n","import { createVNode as _createVNode, resolveDirective as _resolveDirective } from \"vue\";\n// Styles\nimport \"./VExpansionPanel.css\";\n\n// Composables\nimport { makeComponentProps } from \"../../composables/component.mjs\";\nimport { provideDefaults } from \"../../composables/defaults.mjs\";\nimport { makeGroupProps, useGroup } from \"../../composables/group.mjs\";\nimport { makeTagProps } from \"../../composables/tag.mjs\";\nimport { makeThemeProps, provideTheme } from \"../../composables/theme.mjs\"; // Utilities\nimport { computed, toRef } from 'vue';\nimport { genericComponent, propsFactory, useRender } from \"../../util/index.mjs\"; // Types\nexport const VExpansionPanelSymbol = Symbol.for('vuetify:v-expansion-panel');\nconst allowedVariants = ['default', 'accordion', 'inset', 'popout'];\nexport const makeVExpansionPanelsProps = propsFactory({\n color: String,\n variant: {\n type: String,\n default: 'default',\n validator: v => allowedVariants.includes(v)\n },\n readonly: Boolean,\n ...makeComponentProps(),\n ...makeGroupProps(),\n ...makeTagProps(),\n ...makeThemeProps()\n}, 'VExpansionPanels');\nexport const VExpansionPanels = genericComponent()({\n name: 'VExpansionPanels',\n props: makeVExpansionPanelsProps(),\n emits: {\n 'update:modelValue': val => true\n },\n setup(props, _ref) {\n let {\n slots\n } = _ref;\n useGroup(props, VExpansionPanelSymbol);\n const {\n themeClasses\n } = provideTheme(props);\n const variantClass = computed(() => props.variant && `v-expansion-panels--variant-${props.variant}`);\n provideDefaults({\n VExpansionPanel: {\n color: toRef(props, 'color')\n },\n VExpansionPanelTitle: {\n readonly: toRef(props, 'readonly')\n }\n });\n useRender(() => _createVNode(props.tag, {\n \"class\": ['v-expansion-panels', themeClasses.value, variantClass.value, props.class],\n \"style\": props.style\n }, slots));\n return {};\n }\n});\n//# sourceMappingURL=VExpansionPanels.mjs.map","import { withDirectives as _withDirectives, vShow as _vShow, createVNode as _createVNode } from \"vue\";\n// Components\nimport { VExpansionPanelSymbol } from \"./VExpansionPanels.mjs\";\nimport { VExpandTransition } from \"../transitions/index.mjs\"; // Composables\nimport { makeComponentProps } from \"../../composables/component.mjs\";\nimport { makeLazyProps, useLazy } from \"../../composables/lazy.mjs\"; // Utilities\nimport { inject } from 'vue';\nimport { genericComponent, propsFactory, useRender } from \"../../util/index.mjs\";\nexport const makeVExpansionPanelTextProps = propsFactory({\n ...makeComponentProps(),\n ...makeLazyProps()\n}, 'VExpansionPanelText');\nexport const VExpansionPanelText = genericComponent()({\n name: 'VExpansionPanelText',\n props: makeVExpansionPanelTextProps(),\n setup(props, _ref) {\n let {\n slots\n } = _ref;\n const expansionPanel = inject(VExpansionPanelSymbol);\n if (!expansionPanel) throw new Error('[Vuetify] v-expansion-panel-text needs to be placed inside v-expansion-panel');\n const {\n hasContent,\n onAfterLeave\n } = useLazy(props, expansionPanel.isSelected);\n useRender(() => _createVNode(VExpandTransition, {\n \"onAfterLeave\": onAfterLeave\n }, {\n default: () => [_withDirectives(_createVNode(\"div\", {\n \"class\": ['v-expansion-panel-text', props.class],\n \"style\": props.style\n }, [slots.default && hasContent.value && _createVNode(\"div\", {\n \"class\": \"v-expansion-panel-text__wrapper\"\n }, [slots.default?.()])]), [[_vShow, expansionPanel.isSelected.value]])]\n }));\n return {};\n }\n});\n//# sourceMappingURL=VExpansionPanelText.mjs.map","import { withDirectives as _withDirectives, resolveDirective as _resolveDirective, createVNode as _createVNode } from \"vue\";\n// Components\nimport { VExpansionPanelSymbol } from \"./VExpansionPanels.mjs\";\nimport { VIcon } from \"../VIcon/index.mjs\"; // Composables\nimport { useBackgroundColor } from \"../../composables/color.mjs\";\nimport { makeComponentProps } from \"../../composables/component.mjs\";\nimport { IconValue } from \"../../composables/icons.mjs\"; // Directives\nimport { Ripple } from \"../../directives/ripple/index.mjs\"; // Utilities\nimport { computed, inject } from 'vue';\nimport { genericComponent, propsFactory, useRender } from \"../../util/index.mjs\"; // Types\nexport const makeVExpansionPanelTitleProps = propsFactory({\n color: String,\n expandIcon: {\n type: IconValue,\n default: '$expand'\n },\n collapseIcon: {\n type: IconValue,\n default: '$collapse'\n },\n hideActions: Boolean,\n ripple: {\n type: [Boolean, Object],\n default: false\n },\n readonly: Boolean,\n ...makeComponentProps()\n}, 'VExpansionPanelTitle');\nexport const VExpansionPanelTitle = genericComponent()({\n name: 'VExpansionPanelTitle',\n directives: {\n Ripple\n },\n props: makeVExpansionPanelTitleProps(),\n setup(props, _ref) {\n let {\n slots\n } = _ref;\n const expansionPanel = inject(VExpansionPanelSymbol);\n if (!expansionPanel) throw new Error('[Vuetify] v-expansion-panel-title needs to be placed inside v-expansion-panel');\n const {\n backgroundColorClasses,\n backgroundColorStyles\n } = useBackgroundColor(props, 'color');\n const slotProps = computed(() => ({\n collapseIcon: props.collapseIcon,\n disabled: expansionPanel.disabled.value,\n expanded: expansionPanel.isSelected.value,\n expandIcon: props.expandIcon,\n readonly: props.readonly\n }));\n useRender(() => _withDirectives(_createVNode(\"button\", {\n \"class\": ['v-expansion-panel-title', {\n 'v-expansion-panel-title--active': expansionPanel.isSelected.value\n }, backgroundColorClasses.value, props.class],\n \"style\": [backgroundColorStyles.value, props.style],\n \"type\": \"button\",\n \"tabindex\": expansionPanel.disabled.value ? -1 : undefined,\n \"disabled\": expansionPanel.disabled.value,\n \"aria-expanded\": expansionPanel.isSelected.value,\n \"onClick\": !props.readonly ? expansionPanel.toggle : undefined\n }, [_createVNode(\"span\", {\n \"class\": \"v-expansion-panel-title__overlay\"\n }, null), slots.default?.(slotProps.value), !props.hideActions && _createVNode(\"span\", {\n \"class\": \"v-expansion-panel-title__icon\"\n }, [slots.actions ? slots.actions(slotProps.value) : _createVNode(VIcon, {\n \"icon\": expansionPanel.isSelected.value ? props.collapseIcon : props.expandIcon\n }, null)])]), [[_resolveDirective(\"ripple\"), props.ripple]]));\n return {};\n }\n});\n//# sourceMappingURL=VExpansionPanelTitle.mjs.map","import { createVNode as _createVNode } from \"vue\";\n// Components\nimport { VExpansionPanelSymbol } from \"./VExpansionPanels.mjs\";\nimport { VExpansionPanelText } from \"./VExpansionPanelText.mjs\";\nimport { makeVExpansionPanelTitleProps, VExpansionPanelTitle } from \"./VExpansionPanelTitle.mjs\"; // Composables\nimport { useBackgroundColor } from \"../../composables/color.mjs\";\nimport { makeComponentProps } from \"../../composables/component.mjs\";\nimport { makeElevationProps, useElevation } from \"../../composables/elevation.mjs\";\nimport { makeGroupItemProps, useGroupItem } from \"../../composables/group.mjs\";\nimport { makeLazyProps } from \"../../composables/lazy.mjs\";\nimport { makeRoundedProps, useRounded } from \"../../composables/rounded.mjs\";\nimport { makeTagProps } from \"../../composables/tag.mjs\"; // Utilities\nimport { computed, provide } from 'vue';\nimport { genericComponent, propsFactory, useRender } from \"../../util/index.mjs\";\nexport const makeVExpansionPanelProps = propsFactory({\n title: String,\n text: String,\n bgColor: String,\n ...makeComponentProps(),\n ...makeElevationProps(),\n ...makeGroupItemProps(),\n ...makeLazyProps(),\n ...makeRoundedProps(),\n ...makeTagProps(),\n ...makeVExpansionPanelTitleProps()\n}, 'VExpansionPanel');\nexport const VExpansionPanel = genericComponent()({\n name: 'VExpansionPanel',\n props: makeVExpansionPanelProps(),\n emits: {\n 'group:selected': val => true\n },\n setup(props, _ref) {\n let {\n slots\n } = _ref;\n const groupItem = useGroupItem(props, VExpansionPanelSymbol);\n const {\n backgroundColorClasses,\n backgroundColorStyles\n } = useBackgroundColor(props, 'bgColor');\n const {\n elevationClasses\n } = useElevation(props);\n const {\n roundedClasses\n } = useRounded(props);\n const isDisabled = computed(() => groupItem?.disabled.value || props.disabled);\n const selectedIndices = computed(() => groupItem.group.items.value.reduce((arr, item, index) => {\n if (groupItem.group.selected.value.includes(item.id)) arr.push(index);\n return arr;\n }, []));\n const isBeforeSelected = computed(() => {\n const index = groupItem.group.items.value.findIndex(item => item.id === groupItem.id);\n return !groupItem.isSelected.value && selectedIndices.value.some(selectedIndex => selectedIndex - index === 1);\n });\n const isAfterSelected = computed(() => {\n const index = groupItem.group.items.value.findIndex(item => item.id === groupItem.id);\n return !groupItem.isSelected.value && selectedIndices.value.some(selectedIndex => selectedIndex - index === -1);\n });\n provide(VExpansionPanelSymbol, groupItem);\n useRender(() => {\n const hasText = !!(slots.text || props.text);\n const hasTitle = !!(slots.title || props.title);\n return _createVNode(props.tag, {\n \"class\": ['v-expansion-panel', {\n 'v-expansion-panel--active': groupItem.isSelected.value,\n 'v-expansion-panel--before-active': isBeforeSelected.value,\n 'v-expansion-panel--after-active': isAfterSelected.value,\n 'v-expansion-panel--disabled': isDisabled.value\n }, roundedClasses.value, backgroundColorClasses.value, props.class],\n \"style\": [backgroundColorStyles.value, props.style]\n }, {\n default: () => [_createVNode(\"div\", {\n \"class\": ['v-expansion-panel__shadow', ...elevationClasses.value]\n }, null), hasTitle && _createVNode(VExpansionPanelTitle, {\n \"key\": \"title\",\n \"collapseIcon\": props.collapseIcon,\n \"color\": props.color,\n \"expandIcon\": props.expandIcon,\n \"hideActions\": props.hideActions,\n \"ripple\": props.ripple\n }, {\n default: () => [slots.title ? slots.title() : props.title]\n }), hasText && _createVNode(VExpansionPanelText, {\n \"key\": \"text\",\n \"eager\": props.eager\n }, {\n default: () => [slots.text ? slots.text() : props.text]\n }), slots.default?.()]\n });\n });\n return {};\n }\n});\n//# sourceMappingURL=VExpansionPanel.mjs.map","\n\n\n","\n\n\n","\n\n","import axios from \"axios\";\nimport type { UserProfile } from \"@/models/userProfile\";\nimport type { TrustGroup } from \"@/models/trustGroup\";\n\nexport const getUserProfile = async (email: string): Promise => {\n const response = await axios.get(\"/api/admin/user-profile\", {\n params: {\n email: email,\n },\n });\n return response.data;\n};\n\nexport const updateTrustGroup = async (\n trustGroup: TrustGroup\n): Promise => {\n const response = await axios.put(\"/api/admin/trust-group/update\", trustGroup);\n return response.data;\n};\n\nexport const createUserProfile = async (\n userProfile: UserProfile\n): Promise => {\n await axios.post(\"/api/admin/user-profile\", userProfile);\n};\n\nexport const updateUserProfile = async (\n userProfile: UserProfile\n): Promise => {\n const response = await axios.put(\"/api/admin/user-profile\", userProfile);\n return response.data;\n};\n\nexport const updateUserRole = async (\n userProfile: UserProfile\n): Promise => {\n const response = await axios.put(\"/api/admin/user-profile/role\", userProfile);\n return response.data;\n};\n\nexport const removeUserFromTrustGroup = async (\n userProfile: UserProfile,\n trustGroupId: string\n): Promise => {\n const response = await updateUserProfile(userProfile);\n};\n\nexport const deleteUserProfile = async (email: string): Promise => {\n await axios.delete(\"/api/admin/user-profile\", {\n params: {\n email: email,\n },\n });\n};\n\nexport const lockOutUserProfile = async (\n userProfile: UserProfile\n): Promise => {\n const response = await axios.put(\"/api/admin/user-profile/lock\", userProfile);\n return response.data;\n};\n\nexport const unlockUserProfile = async (\n userProfile: UserProfile\n): Promise => {\n const response = await axios.put(\n \"/api/admin/user-profile/unlock\",\n userProfile\n );\n return response.data;\n};\n\nexport const unlockAndResetSuspensionUserProfile = async (\n email: string\n): Promise => {\n const response = await axios.put(\n \"/api/admin/user-profile/unlock-and-reset-suspension\",\n {},\n {\n params: {\n email: email,\n },\n }\n );\n return response.data;\n};\n","\n\n\n","import type { TrustGroup } from \"@/models/trustGroup\";\nimport axios from \"axios\";\nimport type { AddTrustGroupUserDto } from \"@/models/dto/addTrustGroupUserDto\";\nimport type { TrustGroupDto } from \"@/models/dto/trustGroupDto\";\n\nexport const getTrustGroup = async (\n email: string\n): Promise => {\n try {\n const response = await axios.get(\"/api/admin/trust-group\", {\n params: {\n email,\n },\n });\n return response.data;\n } catch (error) {\n return undefined;\n }\n};\n\nexport const addMemberToTrustGroup = async (\n addTrustGroupUserDto: AddTrustGroupUserDto\n): Promise => {\n const response = await axios.put(\n \"/api/admin/trust-group/add-user\",\n addTrustGroupUserDto\n );\n return response.data;\n};\n\nexport const removeMemberFromTrustGroup = async (\n addTrustGroupUserDto: AddTrustGroupUserDto\n): Promise => {\n const response = await axios.put(\n \"/api/admin/trust-group/remove-user\",\n addTrustGroupUserDto\n );\n return response.data;\n};\n\nexport const createTrustGroup = async (\n trustGroupDto: TrustGroupDto\n): Promise => {\n const response = await axios.post(\"/api/admin/trust-group\", trustGroupDto\n );\n return response.data;\n};\n","\n\n\n","export class AddTrustGroupUserDto {\n email: string = \"\";\n trustGroupId: string = \"\";\n}\n","\n\n\n","\n\n\n","\n\n\n","\n\n\n","\n\n\n","\n\n\n","\n\n\n","import type { UserProfile } from \"@/models/userProfile\";\nimport axios from \"axios\";\n\nexport const getUserProfiles = async () : Promise> => {\n const response = await axios.get(\"/api/admin/user-profiles\");\n return response.data;\n}\n\nexport const getLockedUserProfiles = async() : Promise> => {\n const response = await axios.get(\"/api/admin/user-profiles/locked\");\n return response.data;\n}\n\nexport const getAdminUserProfiles = async() : Promise> => {\n const response = await axios.get(\"/api/admin/user-profiles/admin-users\");\n return response.data;\n}","import { createVNode as _createVNode } from \"vue\";\n// Styles\nimport \"./VTable.css\";\n\n// Composables\nimport { makeComponentProps } from \"../../composables/component.mjs\";\nimport { makeDensityProps, useDensity } from \"../../composables/density.mjs\";\nimport { makeTagProps } from \"../../composables/tag.mjs\";\nimport { makeThemeProps, provideTheme } from \"../../composables/theme.mjs\"; // Utilities\nimport { convertToUnit, genericComponent, propsFactory, useRender } from \"../../util/index.mjs\";\nexport const makeVTableProps = propsFactory({\n fixedHeader: Boolean,\n fixedFooter: Boolean,\n height: [Number, String],\n hover: Boolean,\n ...makeComponentProps(),\n ...makeDensityProps(),\n ...makeTagProps(),\n ...makeThemeProps()\n}, 'VTable');\nexport const VTable = genericComponent()({\n name: 'VTable',\n props: makeVTableProps(),\n setup(props, _ref) {\n let {\n slots\n } = _ref;\n const {\n themeClasses\n } = provideTheme(props);\n const {\n densityClasses\n } = useDensity(props);\n useRender(() => _createVNode(props.tag, {\n \"class\": ['v-table', {\n 'v-table--fixed-height': !!props.height,\n 'v-table--fixed-header': props.fixedHeader,\n 'v-table--fixed-footer': props.fixedFooter,\n 'v-table--has-top': !!slots.top,\n 'v-table--has-bottom': !!slots.bottom,\n 'v-table--hover': props.hover\n }, themeClasses.value, densityClasses.value, props.class],\n \"style\": props.style\n }, {\n default: () => [slots.top?.(), slots.default ? _createVNode(\"div\", {\n \"class\": \"v-table__wrapper\",\n \"style\": {\n height: convertToUnit(props.height)\n }\n }, [_createVNode(\"table\", null, [slots.default()])]) : slots.wrapper?.(), slots.bottom?.()]\n }));\n return {};\n }\n});\n//# sourceMappingURL=VTable.mjs.map","\n\n\n","\n\n\n","export class CompanyDto {\n id: string = \"\";\n companyName: string = \"\";\n organisationNumber: string = \"\";\n operatingCountryCode: string = \"\";\n}\n","import { TrustGroupType } from \"@/models/enum/trustGroupType\";\nimport { CompanyDto } from \"@/models/dto/companyDto\";\n\nexport class TrustGroupDto {\n id: string = \"\";\n company: CompanyDto = new CompanyDto();\n userProfileEmails: Array = new Array();\n trustGroupType: TrustGroupType = TrustGroupType.Channel2Customer;\n}\n","\n\n\n\n\n","\n\n\n\n\n","\n\n\n","\n\n","\n\n\n\n\n","\n\n\n\n\n","\n\n\n","\n\n\n\n\n","\n\n\n","\n\n\n\n\n","\n\n\n\n\n","import type { Company } from \"@/models/company\";\nimport axios from \"axios\";\n\nexport const registerDefaultCompany = async (\n company: Company\n): Promise => {\n const response = await axios.post(\"/api/company/register-default\", company);\n return response.data;\n};\n\nexport const searchCompany = async (searchText: string): Promise => {\n const searchRequest = new CompanySearchRequest(\n SearchType.FullSearch,\n searchText\n );\n\n const response = await axios.post(\"api/companies/search\", searchRequest);\n return response.data;\n};\n\nexport const suggestCompany = async (\n searchText: string\n): Promise => {\n const searchRequest = new CompanySearchRequest(\n SearchType.Suggestion,\n searchText\n );\n\n const response = await axios.post(\"api/companies/search\", searchRequest);\n return response.data;\n};\n\nclass CompanySearchRequest {\n searchType: SearchType;\n searchText: string;\n\n constructor(type: SearchType, text: string) {\n this.searchType = type;\n this.searchText = text;\n }\n}\n\nenum SearchType {\n FullSearch = \"FullSearch\",\n Suggestion = \"Suggestion\",\n}\n","\n\n\n","\n\n\n","\n\n\n\n\n","\n\n\n","import { RouterPath } from \"@/models/enum/routerPath\";\nimport RegisterCompanyView from \"@/views/register-supplier/RegisterCompanyView.vue\";\nimport AddColleaguesView from \"@/views/register-supplier/AddColleaguesView.vue\";\nimport WelcomeView from \"@/views/register-supplier/WelcomeView.vue\";\n\nconst registerSupplierRoutes = [\n {\n path: RouterPath.RegisterSupplierWelcome,\n name: RouterPath.RegisterSupplierWelcome,\n component: WelcomeView,\n meta: { disableBackButton: true },\n },\n {\n path: RouterPath.RegisterSupplierCompany,\n name: RouterPath.RegisterSupplierCompany,\n component: RegisterCompanyView,\n meta: { disableBackButton: true },\n },\n {\n path: RouterPath.AddColleaguesView,\n name: RouterPath.AddColleaguesView,\n component: AddColleaguesView,\n meta: { disableBackButton: true },\n },\n];\n\nexport const allRegisterSupplierRoutes = registerSupplierRoutes.map((value) =>\n value.path.toString()\n);\n\nexport default registerSupplierRoutes;\n","\n\n\n\n\n","import { RouterPath } from \"@/models/enum/routerPath\";\nimport HelpView from \"@/views/help-view/HelpView.vue\";\nimport AboutTheActView from \"@/views/help-view/AboutTheActView.vue\";\nimport AboutTransparencyChainView from \"@/views/help-view/AboutTransparencyChainView.vue\";\n\nconst helpRoutes = [\n {\n path: RouterPath.Help,\n name: \"help\",\n component: HelpView,\n },\n {\n path: RouterPath.AboutTheAct,\n name: RouterPath.AboutTheAct,\n component: AboutTheActView,\n },\n {\n path: RouterPath.AboutTransparencyChain,\n name: RouterPath.AboutTransparencyChain,\n component: AboutTransparencyChainView,\n },\n];\n\nexport default helpRoutes;\n","\n\n\n","\n\n\n","\n\n\n","\n\n\n","import { createVNode as _createVNode, mergeProps as _mergeProps, resolveDirective as _resolveDirective } from \"vue\";\n// Components\nimport { makeVSelectionControlProps, VSelectionControl } from \"../VSelectionControl/VSelectionControl.mjs\"; // Utilities\nimport { genericComponent, propsFactory, useRender } from \"../../util/index.mjs\"; // Types\nexport const makeVRadioProps = propsFactory({\n ...makeVSelectionControlProps({\n falseIcon: '$radioOff',\n trueIcon: '$radioOn'\n })\n}, 'VRadio');\nexport const VRadio = genericComponent()({\n name: 'VRadio',\n props: makeVRadioProps(),\n setup(props, _ref) {\n let {\n slots\n } = _ref;\n useRender(() => _createVNode(VSelectionControl, _mergeProps(props, {\n \"class\": ['v-radio', props.class],\n \"style\": props.style,\n \"type\": \"radio\"\n }), slots));\n return {};\n }\n});\n//# sourceMappingURL=VRadio.mjs.map","import { mergeProps as _mergeProps, resolveDirective as _resolveDirective, createVNode as _createVNode, Fragment as _Fragment } from \"vue\";\n// Styles\nimport \"./VRadioGroup.css\";\n\n// Components\nimport { makeVInputProps, VInput } from \"../VInput/VInput.mjs\";\nimport { VLabel } from \"../VLabel/index.mjs\";\nimport { VSelectionControl } from \"../VSelectionControl/index.mjs\";\nimport { makeSelectionControlGroupProps, VSelectionControlGroup } from \"../VSelectionControlGroup/VSelectionControlGroup.mjs\"; // Composables\nimport { IconValue } from \"../../composables/icons.mjs\";\nimport { useProxiedModel } from \"../../composables/proxiedModel.mjs\"; // Utilities\nimport { computed } from 'vue';\nimport { filterInputAttrs, genericComponent, getUid, omit, propsFactory, useRender } from \"../../util/index.mjs\"; // Types\nexport const makeVRadioGroupProps = propsFactory({\n height: {\n type: [Number, String],\n default: 'auto'\n },\n ...makeVInputProps(),\n ...omit(makeSelectionControlGroupProps(), ['multiple']),\n trueIcon: {\n type: IconValue,\n default: '$radioOn'\n },\n falseIcon: {\n type: IconValue,\n default: '$radioOff'\n },\n type: {\n type: String,\n default: 'radio'\n }\n}, 'VRadioGroup');\nexport const VRadioGroup = genericComponent()({\n name: 'VRadioGroup',\n inheritAttrs: false,\n props: makeVRadioGroupProps(),\n emits: {\n 'update:modelValue': val => true\n },\n setup(props, _ref) {\n let {\n attrs,\n slots\n } = _ref;\n const uid = getUid();\n const id = computed(() => props.id || `radio-group-${uid}`);\n const model = useProxiedModel(props, 'modelValue');\n useRender(() => {\n const [inputAttrs, controlAttrs] = filterInputAttrs(attrs);\n const [inputProps, _1] = VInput.filterProps(props);\n const [controlProps, _2] = VSelectionControl.filterProps(props);\n const label = slots.label ? slots.label({\n label: props.label,\n props: {\n for: id.value\n }\n }) : props.label;\n return _createVNode(VInput, _mergeProps({\n \"class\": ['v-radio-group', props.class],\n \"style\": props.style\n }, inputAttrs, inputProps, {\n \"modelValue\": model.value,\n \"onUpdate:modelValue\": $event => model.value = $event,\n \"id\": id.value\n }), {\n ...slots,\n default: _ref2 => {\n let {\n id,\n messagesId,\n isDisabled,\n isReadonly\n } = _ref2;\n return _createVNode(_Fragment, null, [label && _createVNode(VLabel, {\n \"id\": id.value\n }, {\n default: () => [label]\n }), _createVNode(VSelectionControlGroup, _mergeProps(controlProps, {\n \"id\": id.value,\n \"aria-describedby\": messagesId.value,\n \"defaultsTarget\": \"VRadio\",\n \"trueIcon\": props.trueIcon,\n \"falseIcon\": props.falseIcon,\n \"type\": props.type,\n \"disabled\": isDisabled.value,\n \"readonly\": isReadonly.value,\n \"aria-labelledby\": label ? id.value : undefined,\n \"multiple\": false\n }, controlAttrs, {\n \"modelValue\": model.value,\n \"onUpdate:modelValue\": $event => model.value = $event\n }), slots)]);\n }\n });\n });\n return {};\n }\n});\n//# sourceMappingURL=VRadioGroup.mjs.map","\n\n\n","\n\n\n","\n\n\n","\n\n\n\n\n","import { createRouter, createWebHistory } from \"vue-router\";\nimport HomeView from \"@/views/HomeView.vue\";\nimport LoginView from \"@/views/login-view/LoginView.vue\";\nimport LoginLinkSentView from \"@/views/login-link-sent-view/LoginLinkSentView.vue\";\nimport QuestionnaireView from \"../views/questionnaire/QuestionnaireView.vue\";\nimport QuestionnairesView from \"@/views/questionnaires/QuestionnairesView.vue\";\nimport DesignView from \"../views/Design/DesignView.vue\";\nimport SupplierRegistryView from \"@/views/supplier-registry/SupplierRegistryView.vue\";\nimport { useAuthenticationStore } from \"@/stores/authentication\";\nimport { RouterPath } from \"@/models/enum/routerPath\";\nimport { useRouterHelper } from \"@/stores/routerHelper\";\nimport QuestionnaireAnswersView from \"@/views/reports/QuestionnaireAnswersView.vue\";\nimport QuestionnaireTemplateView from \"@/views/template/QuestionnaireTemplateView.vue\";\nimport CustomerTermsAndConditions from \"@/views/terms-view/CustomerTermsAndConditions.vue\";\nimport adminRoutes from \"@/router/adminRoutes\";\nimport superUserRoutes from \"@/router/superUserRoutes\";\nimport TeamView from \"@/views/users/TeamView.vue\";\nimport DashboardView from \"@/views/dashboard-view/DashboardView.vue\";\nimport CreateQuestionnaireView from \"@/views/questionnaires/CreateQuestionnaireView.vue\";\nimport EditQuestionnaireView from \"@/views/questionnaires/EditQuestionnaireView.vue\";\nimport ManagerUserProfileView from \"@/views/ManagerUserProfileView.vue\";\nimport SendQuestionnaireView from \"@/views/questionnaires/SendQuestionnaireView.vue\";\nimport StartQuestionnaireView from \"@/views/questionnaire/StartQuestionnaireView.vue\";\nimport LoginHelpView from \"@/views/login-help-view/LoginHelpView.vue\";\nimport DetailedRiskPageView from \"@/views/dashboard-view/DetailedRiskPageView.vue\";\nimport UnitProfileView from \"@/views/unit-profile/UnitProfileView.vue\";\nimport ReceivedQuestionnaireStatus from \"@/views/questionnaires/ReceivedQuestionnaireStatusView.vue\";\nimport MyQuestionnaireStatus from \"@/views/questionnaires/my-questionnaires/MyQuestionnaireStatusView.vue\";\nimport registerNewSupplierRoutes, {\n allRegisterSupplierRoutes,\n} from \"@/router/registerSupplierRoutes\";\nimport helpRoutes from \"@/router/helpRoutes\";\nimport UploadSuppliersView from \"@/views/upload-suppliers/UploadSuppliersView.vue\";\nimport UploadSuppliersQuestionnaireView from \"@/views/questionnaire/UploadSuppliersQuestionnaireView.vue\";\nimport ForwardQuestionnaireView from \"@/views/questionnaire/ForwardQuestionnaireView.vue\";\nimport ReuseAnswersView from \"@/views/questionnaire/ReuseAnswersView.vue\";\nimport LoggedOutView from \"@/views/login-view/LoggedOutView.vue\";\nimport LoginTokenExpiredView from \"@/views/login-view/LoginTokenExpiredView.vue\";\nimport VerifyLinkView from \"@/views/login-view/VerifyLinkView.vue\";\n\nconst router = createRouter({\n history: createWebHistory(import.meta.env.BASE_URL),\n routes: [\n {\n path: RouterPath.Home,\n name: \"home\",\n component: HomeView,\n meta: { disableBackButton: true },\n },\n {\n path: RouterPath.Login,\n name: RouterPath.Login,\n component: LoginView,\n meta: { open: true },\n },\n {\n path: RouterPath.LoggedOut,\n name: RouterPath.LoggedOut,\n component: LoggedOutView,\n meta: { open: true },\n },\n {\n path: RouterPath.LoginTokenExpired,\n name: RouterPath.LoginTokenExpired,\n component: LoginTokenExpiredView,\n meta: { open: true },\n },\n {\n path: RouterPath.LoginLinkSent,\n name: RouterPath.LoginLinkSent,\n component: LoginLinkSentView,\n meta: { open: true },\n },\n {\n path: RouterPath.VerifyLink,\n name: RouterPath.VerifyLink,\n component: VerifyLinkView,\n meta: { open: true },\n },\n {\n path: RouterPath.StartQuestionnaire,\n name: \"start-questionnaire\",\n component: StartQuestionnaireView,\n },\n {\n path: RouterPath.Questionnaire,\n name: \"questionnaire\",\n component: QuestionnaireView,\n meta: { disableBackButton: true, displayQuestionnaireProgressBar: true },\n props: true,\n },\n {\n path: RouterPath.UploadSuppliersForQuestionnaire,\n name: \"upload-suppliers-questionnaire\",\n component: UploadSuppliersQuestionnaireView,\n meta: { disableBackButton: true, displayQuestionnaireProgressBar: true },\n props: true,\n },\n {\n path: RouterPath.ForwardQuestionnaire,\n name: \"forward-questionnaire\",\n component: ForwardQuestionnaireView,\n meta: { disableBackButton: true, displayQuestionnaireProgressBar: true },\n props: true,\n },\n {\n path: RouterPath.SendQuestionnaire,\n name: \"send-questionnaire\",\n component: SendQuestionnaireView,\n },\n {\n path: RouterPath.Questionnaires,\n name: \"questionnaires\",\n component: QuestionnairesView,\n props: true,\n },\n {\n path: \"/design\",\n name: \"design\",\n component: DesignView,\n meta: { open: true },\n },\n {\n path: RouterPath.Team,\n name: \"team\",\n component: TeamView,\n },\n {\n path: RouterPath.QuestionnaireAnswers,\n name: \"questionnaireAnswers\",\n component: QuestionnaireAnswersView,\n },\n {\n path: RouterPath.QuestionnaireTemplate,\n name: RouterPath.QuestionnaireTemplate,\n component: QuestionnaireTemplateView,\n },\n {\n path: RouterPath.SuppliersRegistry,\n name: RouterPath.SuppliersRegistry,\n component: SupplierRegistryView,\n },\n {\n path: RouterPath.CustomerTermsAndConditions,\n name: \"customerTermsAndConditions\",\n component: CustomerTermsAndConditions,\n meta: { requiresTermsAndConditionAccess: true },\n },\n {\n path: RouterPath.Dashboard,\n name: \"dashboard\",\n component: DashboardView,\n meta: { requiresDashboardAccess: true, disableBackButton: true },\n },\n {\n path: RouterPath.DetailedRiskCategory,\n name: RouterPath.DetailedRiskCategory,\n component: DetailedRiskPageView,\n meta: { requiresDetailedRiskPageAccess: true },\n },\n {\n path: RouterPath.CreateQuestionnaire,\n name: \"createQuestionnaire\",\n component: CreateQuestionnaireView,\n meta: { requiresCreateQuestionnaireAccess: true },\n },\n {\n path: RouterPath.EditQuestionnaire,\n name: \"editQuestionnaire\",\n component: EditQuestionnaireView,\n meta: { requiresEditQuestionnaireAccess: true },\n },\n {\n path: RouterPath.UnitProfile,\n name: RouterPath.UnitProfile,\n component: UnitProfileView,\n meta: { requiresUnitProfileAccess: true },\n },\n {\n path: RouterPath.ManageUserProfile,\n name: \"manageUserProfile\",\n component: ManagerUserProfileView,\n },\n {\n path: RouterPath.LoginHelp,\n name: \"loginHelp\",\n component: LoginHelpView,\n meta: { open: true },\n },\n {\n path: RouterPath.ReceivedQuestionnaireStatus,\n name: \"receivedQuestionnaireStatus\",\n component: ReceivedQuestionnaireStatus,\n },\n {\n path: RouterPath.MyQuestionnaireStatus,\n name: \"myQuestionnaireStatus\",\n component: MyQuestionnaireStatus,\n },\n {\n path: RouterPath.UploadSuppliers,\n name: \"uploadSuppliers\",\n component: UploadSuppliersView,\n },\n {\n path: RouterPath.ReuseAnswers,\n name: \"reuseAnswers\",\n component: ReuseAnswersView,\n },\n ...adminRoutes,\n ...superUserRoutes,\n ...registerNewSupplierRoutes,\n ...helpRoutes,\n ],\n});\n\nrouter.beforeEach((to) => {\n const authenticationStore = useAuthenticationStore();\n const routerHelperStore = useRouterHelper();\n\n routerHelperStore.displayBackButton = !to.meta.disableBackButton;\n routerHelperStore.showQuestionnaireProgressBar =\n !!to.meta.displayQuestionnaireProgressBar;\n\n if (\n routerHelperStore.isFirstRequest &&\n to.name !== \"design\" &&\n to.name !== \"searchCompany\"\n ) {\n routerHelperStore.changeStateAfterFirstRequest();\n if (!authenticationStore.authenticated) {\n if (\n RouterPath.Login === to.name ||\n RouterPath.LoggedOut === to.name ||\n RouterPath.LoginTokenExpired === to.name ||\n RouterPath.VerifyLink === to.name\n ) {\n return;\n }\n return RouterPath.Login;\n } else {\n if (authenticationStore.isSuperUser) {\n return RouterPath.SuperUserWelcome;\n }\n\n return RouterPath.Home;\n }\n }\n\n if (!authenticationStore.authenticated) {\n if (!to.meta.open) {\n return RouterPath.Login;\n }\n } else {\n if (to.path == RouterPath.Login) {\n return RouterPath.Home;\n }\n\n if (\n !authenticationStore.registered &&\n !allRegisterSupplierRoutes.includes(to.path)\n ) {\n return RouterPath.RegisterSupplierWelcome;\n }\n\n if (\n to.meta.requiresDashboardAccess &&\n !authenticationStore.canAccessCustomerDashboard()\n ) {\n return RouterPath.Home;\n }\n\n if (\n to.meta.requiresCreateQuestionnaireAccess &&\n !authenticationStore.canCreateQuestionnaires()\n ) {\n return RouterPath.Home;\n }\n\n if (\n to.meta.requiresEditQuestionnaireAccess &&\n !authenticationStore.canEditQuestionnaires()\n ) {\n return RouterPath.Home;\n }\n\n if (\n to.meta.requiresDetailedRiskPageAccess &&\n !authenticationStore.canAccessDetailedRiskPage()\n ) {\n return RouterPath.Home;\n }\n\n if (\n to.meta.requiresUnitProfileAccess &&\n !authenticationStore.canAccessUnitProfile()\n ) {\n return RouterPath.Home;\n }\n\n if (\n to.meta.requiresTermsAndConditionAccess &&\n !authenticationStore.canAccessCustomerTermsAndConditions\n ) {\n return RouterPath.Home;\n }\n\n if (to.meta.requiresAdmin && !authenticationStore.isAdmin) {\n return RouterPath.Home;\n }\n\n if (to.meta.requiresSuperUser && !authenticationStore.isSuperUser) {\n return RouterPath.Home;\n }\n }\n});\n\nexport default router;\n","\n\n\n\n\n","\n\n\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 layoutStyles,\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\": [layoutStyles.value, 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","\n\n\n\n\n","\n\n\n\n\n","\n\n\n\n\n","\n\n\n\n\n\n","// Styles\nimport \"@mdi/font/css/materialdesignicons.css\";\nimport \"vuetify/styles\";\nimport \"../assets/pwc.scss\";\nimport { PwcTheme } from \"./pwc-theme\";\n\n// Vuetify\nimport { createVuetify } from \"vuetify\";\n\nexport default createVuetify({\n theme: {\n defaultTheme: \"pwc\",\n themes: {\n pwc: PwcTheme,\n },\n },\n iconfont: \"mdi\",\n display: {\n mobileBreakpoint: \"md\"\n }\n});\n// https://vuetifyjs.com/en/introduction/why-vuetify/#feature-guides\n","/**\r\n * +/- function to native math sign\r\n */\r\nfunction signPoly(value) {\r\n if (value < 0)\r\n return -1;\r\n return value > 0 ? 1 : 0;\r\n}\r\nconst sign = Math.sign || signPoly;\r\n/**\r\n * Checks if the flag is set\r\n * @param val\r\n * @param flag\r\n * @returns {boolean}\r\n */\r\nfunction hasFlag(val, flag) {\r\n return (val & flag) === flag;\r\n}\r\n/**\r\n * Native modulo bug with negative numbers\r\n * @param n\r\n * @param mod\r\n * @returns {number}\r\n */\r\nfunction mod(n, mod) {\r\n return ((n % mod) + mod) % mod;\r\n}\r\n/**\r\n * Asserts a value is beetween min and max\r\n * @param val\r\n * @param min\r\n * @param max\r\n * @returns {number}\r\n */\r\nfunction bound(val, min, max) {\r\n return Math.max(min, Math.min(max, val));\r\n}\r\n/**\r\n * Get value of an object property/path even if it's nested\r\n */\r\nfunction getValueByPath(obj, path, defaultValue = undefined) {\r\n const value = path.split('.').reduce((o, i) => typeof o !== 'undefined' ? o[i] : undefined, obj);\r\n return typeof value !== 'undefined' ? value : defaultValue;\r\n}\r\n/**\r\n * Set value of an object property/path even if it's nested\r\n */\r\nfunction setValueByPath(obj, path, value) {\r\n const p = path.split('.');\r\n if (p.length === 1) {\r\n obj[path] = value;\r\n return;\r\n }\r\n const field = p[0];\r\n if (typeof obj[field] === 'undefined')\r\n obj[field] = {};\r\n return setValueByPath(obj[field], p.slice(1).join('.'), value);\r\n}\r\n/**\r\n * Extension of indexOf method by equality function if specified\r\n */\r\nfunction indexOf(array, obj, fn) {\r\n if (!array)\r\n return -1;\r\n if (!fn || typeof fn !== 'function')\r\n return array.indexOf(obj);\r\n for (let i = 0; i < array.length; i++) {\r\n if (fn(array[i], obj)) {\r\n return i;\r\n }\r\n }\r\n return -1;\r\n}\r\n/**\r\n * Merge function to replace Object.assign with deep merging possibility\r\n */\r\nconst isObject = (item) => typeof item === 'object' && !Array.isArray(item);\r\nconst mergeFn = (target, source, deep = false) => {\r\n if (deep || !Object.assign) {\r\n const isDeep = (prop) => isObject(source[prop]) &&\r\n target !== null &&\r\n Object.prototype.hasOwnProperty.call(target, prop) &&\r\n isObject(target[prop]);\r\n let replaced;\r\n if (source === null || typeof source === 'undefined') {\r\n replaced = false;\r\n }\r\n else {\r\n replaced = Object.getOwnPropertyNames(source)\r\n .map((prop) => ({ [prop]: isDeep(prop)\r\n ? mergeFn(target[prop], source[prop], deep)\r\n : source[prop] }))\r\n .reduce((a, b) => ({ ...a, ...b }), {});\r\n }\r\n return {\r\n ...target,\r\n ...replaced\r\n };\r\n }\r\n else {\r\n return Object.assign(target, source);\r\n }\r\n};\r\nconst merge = mergeFn;\r\n/**\r\n * Mobile detection\r\n * https://www.abeautifulsite.net/detecting-mobile-devices-with-javascript\r\n */\r\nconst isMobile = {\r\n Android: function () {\r\n return (typeof window !== 'undefined' &&\r\n window.navigator.userAgent.match(/Android/i));\r\n },\r\n BlackBerry: function () {\r\n return (typeof window !== 'undefined' &&\r\n window.navigator.userAgent.match(/BlackBerry/i));\r\n },\r\n iOS: function () {\r\n return (typeof window !== 'undefined' &&\r\n window.navigator.userAgent.match(/iPhone|iPad|iPod/i));\r\n },\r\n Opera: function () {\r\n return (typeof window !== 'undefined' &&\r\n window.navigator.userAgent.match(/Opera Mini/i));\r\n },\r\n Windows: function () {\r\n return (typeof window !== 'undefined' &&\r\n window.navigator.userAgent.match(/IEMobile/i));\r\n },\r\n any: function () {\r\n return (isMobile.Android() ||\r\n isMobile.BlackBerry() ||\r\n isMobile.iOS() ||\r\n isMobile.Opera() ||\r\n isMobile.Windows());\r\n }\r\n};\r\n// Microsoft Edge \"pretends\" to be all other major browsers, so we need to filter it out.\r\n// It doesn't use a very consistent string to represent its own name (\"Edge\", \"Edg\", \"EdgA\", etc.),\r\n// but it looks like WebKit never pretends to be Chrome, Edge does, and Chrome doesn't have the bug\r\n// that this flag is used to work around.\r\nfunction isWebKit() {\r\n return typeof window !== 'undefined'\r\n && window.navigator.userAgent.indexOf('AppleWebKit/') !== -1\r\n && window.navigator.userAgent.indexOf('Chrome/') === -1;\r\n}\r\nfunction removeElement(el) {\r\n if (typeof el.remove !== 'undefined') {\r\n el.remove();\r\n }\r\n else if (typeof el.parentNode !== 'undefined' && el.parentNode !== null) {\r\n el.parentNode.removeChild(el);\r\n }\r\n}\r\nfunction createAbsoluteElement(el) {\r\n const root = document.createElement('div');\r\n root.style.position = 'absolute';\r\n root.style.left = '0px';\r\n root.style.top = '0px';\r\n const wrapper = document.createElement('div');\r\n root.appendChild(wrapper);\r\n wrapper.appendChild(el);\r\n document.body.appendChild(root);\r\n return root;\r\n}\r\n/**\r\n * Escape regex characters\r\n * http://stackoverflow.com/a/6969486\r\n */\r\nfunction escapeRegExpChars(value) {\r\n if (!value)\r\n return value;\r\n return value.replace(/[\\-\\[\\]\\/\\{\\}\\(\\)\\*\\+\\?\\.\\\\\\^\\$\\|]/g, '\\\\$&');\r\n}\r\nfunction createNewEvent(eventName) {\r\n let event;\r\n if (typeof Event === 'function') {\r\n event = new Event(eventName);\r\n }\r\n else {\r\n event = document.createEvent('Event');\r\n event.initEvent(eventName, true, true);\r\n }\r\n return event;\r\n}\r\nfunction toCssDimension(width) {\r\n return width === undefined ? null : (isNaN(width) ? width : width + 'px');\r\n}\r\nfunction blankIfUndefined(value) {\r\n return typeof value !== 'undefined' && value !== null ? value : '';\r\n}\r\nfunction defaultIfUndefined(value, defaultValue) {\r\n return typeof value !== 'undefined' && value !== null ? value : defaultValue;\r\n}\r\nfunction getMonthNames(locale = undefined, format = 'long') {\r\n const dates = [];\r\n for (let i = 0; i < 12; i++) {\r\n dates.push(new Date(2000, i, 15));\r\n }\r\n const dtf = new Intl.DateTimeFormat(locale, {\r\n month: format,\r\n });\r\n return dates.map((d) => dtf.format(d));\r\n}\r\nfunction getWeekdayNames(locale = undefined, firstDayOfWeek = 0, format = 'narrow') {\r\n const dates = [];\r\n for (let i = 1, j = 0; j < 7; i++) {\r\n const d = new Date(2000, 0, i);\r\n const day = d.getDay();\r\n if (day === firstDayOfWeek || j > 0) {\r\n dates.push(d);\r\n j++;\r\n }\r\n }\r\n const dtf = new Intl.DateTimeFormat(locale, {\r\n weekday: format,\r\n });\r\n return dates.map((d) => dtf.format(d));\r\n}\r\n/**\r\n * Accept a regex with group names and return an object\r\n * ex. matchWithGroups(/((?!=)\\d+)\\/((?!=)\\d+)\\/((?!=)\\d+)/, '2000/12/25')\r\n * will return { year: 2000, month: 12, day: 25 }\r\n * @param {String} includes injections of (?!={groupname}) for each group\r\n * @param {String} the string to run regex\r\n * @return {Object} an object with a property for each group having the group's match as the value\r\n */\r\nfunction matchWithGroups(pattern, str) {\r\n const matches = str.match(pattern);\r\n return pattern\r\n // get the pattern as a string\r\n .toString()\r\n // suss out the groups\r\n .match(/<(.+?)>/g)\r\n // remove the braces\r\n .map((group) => {\r\n const groupMatches = group.match(/<(.+)>/);\r\n if (!groupMatches || groupMatches.length <= 0) {\r\n return null;\r\n }\r\n return group.match(/<(.+)>/)[1];\r\n })\r\n // create an object with a property for each group having the group's match as the value\r\n .reduce((acc, curr, index) => {\r\n if (matches && matches.length > index) {\r\n acc[curr] = matches[index + 1];\r\n }\r\n else {\r\n acc[curr] = null;\r\n }\r\n return acc;\r\n }, {});\r\n}\r\nfunction getStyleValue(value) {\r\n if (typeof value === 'object') {\r\n for (const key in value) {\r\n if (value[key])\r\n return key;\r\n }\r\n return '';\r\n }\r\n return value;\r\n}\r\nfunction debounce(func, wait, immediate) {\r\n let timeout;\r\n return function () {\r\n const context = this;\r\n const args = arguments;\r\n const later = function () {\r\n timeout = null;\r\n if (!immediate)\r\n func.apply(context, args);\r\n };\r\n const callNow = immediate && !timeout;\r\n clearTimeout(timeout);\r\n timeout = setTimeout(later, wait);\r\n if (callNow)\r\n func.apply(context, args);\r\n };\r\n}\r\nfunction endsWith(str, suffix) {\r\n return str.indexOf(suffix, str.length - suffix.length) !== -1;\r\n}\r\nconst isDefined = (d) => d !== undefined;\r\n/**\r\n * Remove accents/diacritics in a string in JavaScript\r\n * https://stackoverflow.com/a/37511463\r\n */\r\nfunction removeDiacriticsFromString(value) {\r\n if (!value)\r\n return value;\r\n return value.normalize('NFD').replace(/[\\u0300-\\u036f]/g, '');\r\n}\r\nfunction isClient() {\r\n return typeof window !== 'undefined';\r\n}\n\nexport { blankIfUndefined, bound, createAbsoluteElement, createNewEvent, debounce, defaultIfUndefined, endsWith, escapeRegExpChars, getMonthNames, getStyleValue, getValueByPath, getWeekdayNames, hasFlag, indexOf, isClient, isDefined, isMobile, isWebKit, matchWithGroups, merge, mod, removeDiacriticsFromString, removeElement, setValueByPath, sign, toCssDimension };\n","import { merge } from './helpers.mjs';\n\nlet config = {\r\n iconPack: 'mdi',\r\n useHtml5Validation: true,\r\n statusIcon: true,\r\n transformClasses: undefined\r\n};\r\nconst setOptions = (options) => { config = options; };\r\nconst getOptions = () => { return config; };\r\nlet VueInstance;\r\nconst setVueInstance = (Vue) => { VueInstance = Vue; };\r\nconst Programmatic = {\r\n getOptions,\r\n setOptions(options) {\r\n setOptions(merge(getOptions(), options, true));\r\n }\r\n};\r\nconst Plugin = {\r\n install(Vue, options = {}) {\r\n setVueInstance(Vue);\r\n // Options\r\n setOptions(merge(getOptions(), options, true));\r\n }\r\n};\n\nexport { Plugin, Programmatic, VueInstance, getOptions, setOptions, setVueInstance };\n","import { defineComponent } from 'vue';\nimport { getValueByPath, blankIfUndefined, endsWith } from './helpers.mjs';\nimport { getOptions } from './config.mjs';\n\nconst _defaultSuffixProcessor = (input, suffix) => {\r\n return blankIfUndefined(input)\r\n .split(' ')\r\n .filter((cls) => cls.length > 0)\r\n .map((cls) => cls + suffix)\r\n .join(' ');\r\n};\r\nconst _getContext = (vm) => {\r\n const computedNames = vm.$options.computed ? Object.keys(vm.$options.computed) : [];\r\n const computed = computedNames.filter(e => !endsWith(e, 'Classes')).reduce((o, key) => {\r\n o[key] = vm[key];\r\n return o;\r\n }, {});\r\n return { props: vm.$props, data: vm.$data, computed };\r\n};\r\nvar BaseComponentMixin = defineComponent({\r\n isOruga: true,\r\n props: {\r\n override: Boolean\r\n },\r\n methods: {\r\n computedClass(field, defaultValue, suffix = '') {\r\n const config = this.$props.override === true ? {} : getOptions();\r\n const override = this.$props.override || getValueByPath(config, `${this.$options.configField}.override`, false);\r\n const overrideClass = getValueByPath(config, `${this.$options.configField}.${field}.override`, override);\r\n const globalTransformClasses = getValueByPath(config, `transformClasses`, undefined);\r\n const localTransformClasses = getValueByPath(config, `${this.$options.configField}.transformClasses`, undefined);\r\n let globalClass = getValueByPath(config, `${this.$options.configField}.${field}.class`, '')\r\n || getValueByPath(config, `${this.$options.configField}.${field}`, '');\r\n let currentClass = getValueByPath(this.$props, field);\r\n if (Array.isArray(currentClass)) {\r\n currentClass = currentClass.join(' ');\r\n }\r\n if (defaultValue.search(\"{*}\") !== -1) {\r\n defaultValue = defaultValue.replace(/\\{\\*\\}/g, suffix);\r\n }\r\n else {\r\n defaultValue = defaultValue + suffix;\r\n }\r\n let context = null;\r\n if (typeof currentClass === \"function\") {\r\n context = _getContext(this);\r\n currentClass = currentClass(suffix, context);\r\n }\r\n else {\r\n currentClass = _defaultSuffixProcessor(currentClass, suffix);\r\n }\r\n if (typeof globalClass === \"function\") {\r\n globalClass = globalClass(suffix, context || _getContext(this));\r\n }\r\n else {\r\n globalClass = _defaultSuffixProcessor(globalClass, suffix);\r\n }\r\n let appliedClasses = (`${(override && !overrideClass) || (!override && !overrideClass) ? defaultValue : ''} `\r\n + `${blankIfUndefined(globalClass)} `\r\n + `${blankIfUndefined(currentClass)}`).trim().replace(/\\s\\s+/g, ' ');\r\n if (localTransformClasses) {\r\n appliedClasses = localTransformClasses(appliedClasses);\r\n }\r\n if (globalTransformClasses) {\r\n appliedClasses = globalTransformClasses(appliedClasses);\r\n }\r\n return appliedClasses;\r\n }\r\n }\r\n});\n\n// oruga object for programmatic components\r\nconst oruga = {};\r\n// add components to the oruga object\r\nfunction addProgrammatic(property, component) {\r\n oruga[property] = component;\r\n}\r\n// composable for internal and external usage\r\nfunction useProgrammatic() {\r\n return { oruga, addProgrammatic };\r\n}\n\nconst registerPlugin = (app, plugin) => {\r\n app.use(plugin);\r\n};\r\nconst registerComponent = (app, component) => {\r\n app.component(component.name, component);\r\n};\r\nconst registerComponentProgrammatic = (app, property, component) => {\r\n // use composable for unified access to programmatic oruga object\r\n const { oruga, addProgrammatic } = useProgrammatic();\r\n // add component (manipulates the programmatic oruga object)\r\n addProgrammatic(property, component);\r\n // add provide and $oruga (only needed once)\r\n if (!(app._context.provides && app._context.provides.oruga))\r\n app.provide('oruga', oruga);\r\n if (!app.config.globalProperties.$oruga)\r\n app.config.globalProperties.$oruga = oruga;\r\n};\n\nexport { BaseComponentMixin as B, registerComponentProgrammatic as a, registerComponent as b, registerPlugin as r, useProgrammatic as u };\n","import { defineComponent, openBlock, createBlock, Fragment, createCommentVNode, resolveDynamicComponent } from 'vue';\nimport { getValueByPath, merge } from './helpers.mjs';\nimport { getOptions } from './config.mjs';\nimport { B as BaseComponentMixin } from './plugins-ba5e2464.mjs';\n\nconst mdiIcons = {\r\n sizes: {\r\n 'default': 'mdi-24px',\r\n 'small': null,\r\n 'medium': 'mdi-36px',\r\n 'large': 'mdi-48px'\r\n },\r\n iconPrefix: 'mdi-'\r\n};\r\nconst faIcons = () => {\r\n const iconComponent = getValueByPath(getOptions(), 'iconComponent');\r\n const faIconPrefix = iconComponent ? '' : 'fa-';\r\n return {\r\n sizes: {\r\n 'default': null,\r\n 'small': null,\r\n 'medium': faIconPrefix + 'lg',\r\n 'large': faIconPrefix + '2x'\r\n },\r\n iconPrefix: faIconPrefix,\r\n internalIcons: {\r\n 'check': 'check',\r\n 'information': 'info-circle',\r\n 'alert': 'exclamation-triangle',\r\n 'alert-circle': 'exclamation-circle',\r\n 'arrow-up': 'arrow-up',\r\n 'chevron-right': 'angle-right',\r\n 'chevron-left': 'angle-left',\r\n 'chevron-down': 'angle-down',\r\n 'chevron-up': 'angle-up',\r\n 'eye': 'eye',\r\n 'eye-off': 'eye-slash',\r\n 'caret-down': 'caret-down',\r\n 'caret-up': 'caret-up',\r\n 'close-circle': 'times-circle',\r\n 'close': 'times',\r\n 'loading': 'circle-notch'\r\n }\r\n };\r\n};\r\nconst getIcons = () => {\r\n let icons = {\r\n mdi: mdiIcons,\r\n fa: faIcons(),\r\n fas: faIcons(),\r\n far: faIcons(),\r\n fad: faIcons(),\r\n fab: faIcons(),\r\n fal: faIcons()\r\n };\r\n const customIconPacks = getValueByPath(getOptions(), 'customIconPacks');\r\n if (customIconPacks) {\r\n icons = merge(icons, customIconPacks, true);\r\n }\r\n return icons;\r\n};\n\n/**\r\n * Icons take an important role of any application\r\n * @displayName Icon\r\n * @style _icon.scss\r\n */\r\nvar script = defineComponent({\r\n name: 'OIcon',\r\n mixins: [BaseComponentMixin],\r\n configField: 'icon',\r\n props: {\r\n /**\r\n * \tColor of the icon, optional\r\n * @values primary, info, success, warning, danger, and any other custom color\r\n */\r\n variant: [String, Object],\r\n /**\r\n * Icon component name\r\n */\r\n component: String,\r\n /**\r\n * Icon pack to use\r\n * @values mdi, fa, fas and any other custom icon pack\r\n */\r\n pack: String,\r\n /**\r\n * Icon name\r\n */\r\n icon: String,\r\n /**\r\n * Icon size, optional\r\n * @values small, medium, large\r\n */\r\n size: String,\r\n /**\r\n * Overrides icon font size, optional\r\n * @values Depends on library: null (smallest), fa-lg, fa-2x, fa-3x, fa-4x, fa-5x, mdi-18px, mdi-24px, mdi-36px, mdi-48px\r\n */\r\n customSize: String,\r\n /**\r\n * Add class to icon font, optional. See here for MDI, here for FontAwesome 4 and here for FontAwesome 5 custom classes\r\n */\r\n customClass: String,\r\n /**\r\n * When true makes icon clickable\r\n */\r\n clickable: Boolean,\r\n /** Enable spin effect on icon */\r\n spin: Boolean,\r\n /** Rotation 0-360 */\r\n rotation: [Number, String],\r\n /** @ignore */\r\n both: Boolean,\r\n rootClass: [String, Function, Array],\r\n clickableClass: [String, Function, Array],\r\n spinClass: [String, Function, Array],\r\n sizeClass: [String, Function, Array],\r\n variantClass: [String, Function, Array]\r\n },\r\n computed: {\r\n rootClasses() {\r\n return [\r\n this.computedClass('rootClass', 'o-icon'),\r\n { [this.computedClass('clickableClass', 'o-icon--clickable')]: this.clickable },\r\n { [this.computedClass('spinClass', 'o-icon--spin')]: this.spin },\r\n { [this.computedClass('sizeClass', 'o-icon--', this.size)]: this.size },\r\n { [this.computedClass('variantClass', 'o-icon--', this.newVariant)]: this.newVariant }\r\n ];\r\n },\r\n rootStyle() {\r\n const style = {};\r\n if (this.rotation) {\r\n style['transform'] = `rotate(${this.rotation}deg)`;\r\n }\r\n return style;\r\n },\r\n iconConfig() {\r\n return getIcons()[this.newPack];\r\n },\r\n iconPrefix() {\r\n if (this.iconConfig && this.iconConfig.iconPrefix) {\r\n return this.iconConfig.iconPrefix;\r\n }\r\n return '';\r\n },\r\n /**\r\n * Internal icon name based on the pack.\r\n * If pack is 'fa', gets the equivalent FA icon name of the MDI,\r\n * internal icons are always MDI.\r\n */\r\n newIcon() {\r\n return `${this.iconPrefix}${this.getEquivalentIconOf(this.icon)}`;\r\n },\r\n newPack() {\r\n return this.pack || getValueByPath(getOptions(), 'iconPack', 'mdi');\r\n },\r\n newVariant() {\r\n if (!this.variant)\r\n return;\r\n let newVariant = '';\r\n if (typeof this.variant === 'string') {\r\n newVariant = this.variant;\r\n }\r\n else {\r\n newVariant = Object.keys(this.variant).filter(key => this.variant[key])[0];\r\n }\r\n return newVariant;\r\n },\r\n newCustomSize() {\r\n return this.customSize || this.customSizeByPack;\r\n },\r\n customSizeByPack() {\r\n if (this.iconConfig && this.iconConfig.sizes) {\r\n if (this.size && this.iconConfig.sizes[this.size] !== undefined) {\r\n return this.iconConfig.sizes[this.size];\r\n }\r\n else if (this.iconConfig.sizes.default) {\r\n return this.iconConfig.sizes.default;\r\n }\r\n }\r\n return null;\r\n },\r\n useIconComponent() {\r\n if (this.component)\r\n return this.component;\r\n const component = getValueByPath(getOptions(), 'iconComponent');\r\n if (component)\r\n return component;\r\n return null;\r\n }\r\n },\r\n methods: {\r\n /**\r\n * Equivalent icon name of the MDI.\r\n */\r\n getEquivalentIconOf(value) {\r\n // Only transform the class if the both prop is set to true\r\n if (!this.both) {\r\n return value;\r\n }\r\n if (this.iconConfig &&\r\n this.iconConfig.internalIcons &&\r\n this.iconConfig.internalIcons[value]) {\r\n return this.iconConfig.internalIcons[value];\r\n }\r\n return value;\r\n }\r\n }\r\n});\n\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n return openBlock(), createBlock(\"span\", {\n class: _ctx.rootClasses,\n style: _ctx.rootStyle\n }, [!_ctx.useIconComponent ? (openBlock(), createBlock(\"i\", {\n key: 0,\n class: [_ctx.newPack, _ctx.newIcon, _ctx.newCustomSize, _ctx.customClass]\n }, null, 2\n /* CLASS */\n )) : (openBlock(), createBlock(Fragment, {\n key: 1\n }, [createCommentVNode(\" custom icon component \"), (openBlock(), createBlock(resolveDynamicComponent(_ctx.useIconComponent), {\n icon: [_ctx.newPack, _ctx.newIcon],\n size: _ctx.newCustomSize,\n class: [_ctx.customClass]\n }, null, 8\n /* PROPS */\n , [\"icon\", \"size\", \"class\"]))], 64\n /* STABLE_FRAGMENT */\n ))], 6\n /* CLASS, STYLE */\n );\n}\n\nscript.render = render;\nscript.__file = \"src/components/icon/Icon.vue\";\n\nexport { script as s };\n","import { defineComponent } from 'vue';\nimport { getValueByPath } from './helpers.mjs';\nimport { getOptions } from './config.mjs';\n\nvar FormElementMixin = defineComponent({\r\n inject: {\r\n $field: { from: \"$field\", default: false }\r\n },\r\n emits: ['blur', 'focus'],\r\n props: {\r\n /**\r\n * Makes input full width when inside a grouped or addon field\r\n */\r\n expanded: Boolean,\r\n /**\r\n * Makes the element rounded\r\n */\r\n rounded: Boolean,\r\n /**\r\n * Icon name to be added\r\n */\r\n icon: String,\r\n /**\r\n * Icon pack to use\r\n * @values mdi, fa, fas and any other custom icon pack\r\n */\r\n iconPack: String,\r\n /** Native options to use in HTML5 validation */\r\n autocomplete: String,\r\n /** Same as native maxlength, plus character counter */\r\n maxlength: [Number, String],\r\n /** Enable html 5 native validation */\r\n useHtml5Validation: {\r\n type: Boolean,\r\n default: () => {\r\n return getValueByPath(getOptions(), \"useHtml5Validation\", true);\r\n },\r\n },\r\n /** Show status icon using field and variant prop */\r\n statusIcon: {\r\n type: Boolean,\r\n default: () => {\r\n return getValueByPath(getOptions(), \"statusIcon\", true);\r\n },\r\n },\r\n /**\r\n * The message which is shown when a validation error occurs\r\n */\r\n validationMessage: String,\r\n },\r\n data() {\r\n return {\r\n isValid: true,\r\n isFocused: false,\r\n newIconPack: this.iconPack,\r\n };\r\n },\r\n computed: {\r\n parentField() {\r\n return this.$field;\r\n },\r\n /**\r\n * Get the type prop from parent if it's a Field.\r\n */\r\n statusVariant() {\r\n if (!this.parentField)\r\n return;\r\n if (!this.parentField.newVariant)\r\n return;\r\n if (typeof this.parentField.newVariant === \"string\") {\r\n return this.parentField.newVariant;\r\n }\r\n else {\r\n for (const key in this.parentField.newVariant) {\r\n if (this.parentField.newVariant[key]) {\r\n return key;\r\n }\r\n }\r\n }\r\n },\r\n /**\r\n * Get the message prop from parent if it's a Field.\r\n */\r\n statusMessage() {\r\n if (!this.parentField)\r\n return;\r\n return this.parentField.newMessage || this.parentField.hasMessageSlot;\r\n },\r\n /**\r\n * Icon name based on the variant.\r\n */\r\n statusVariantIcon() {\r\n const statusVariantIcon = getValueByPath(getOptions(), \"statusVariantIcon\", {\r\n 'success': 'check',\r\n 'danger': 'alert-circle',\r\n 'info': 'information',\r\n 'warning': 'alert'\r\n });\r\n return statusVariantIcon[this.statusVariant] || '';\r\n }\r\n },\r\n methods: {\r\n /**\r\n * Focus method that work dynamically depending on the component.\r\n */\r\n focus() {\r\n const el = this.getElement();\r\n if (!el)\r\n return;\r\n this.$nextTick(() => {\r\n if (el)\r\n el.focus();\r\n });\r\n },\r\n onBlur(event) {\r\n this.isFocused = false;\r\n if (this.parentField) {\r\n this.parentField.isFocused = false;\r\n }\r\n this.$emit(\"blur\", event);\r\n this.checkHtml5Validity();\r\n },\r\n onFocus(event) {\r\n this.isFocused = true;\r\n if (this.parentField) {\r\n this.parentField.isFocused = true;\r\n }\r\n this.$emit(\"focus\", event);\r\n },\r\n getElement() {\r\n let el = this.$refs[this.$elementRef];\r\n while (el && el.$elementRef) {\r\n el = el.$refs[el.$elementRef];\r\n }\r\n return el;\r\n },\r\n setInvalid() {\r\n const variant = \"danger\";\r\n const message = this.validationMessage || this.getElement().validationMessage;\r\n this.setValidity(variant, message);\r\n },\r\n setValidity(variant, message) {\r\n this.$nextTick(() => {\r\n if (this.parentField) {\r\n // Set type only if not defined\r\n if (!this.parentField.variant) {\r\n this.parentField.newVariant = variant;\r\n }\r\n // Set message only if not defined\r\n if (!this.parentField.message) {\r\n this.parentField.newMessage = message;\r\n }\r\n }\r\n });\r\n },\r\n /**\r\n * Check HTML5 validation, set isValid property.\r\n * If validation fail, send 'danger' type,\r\n * and error message to parent if it's a Field.\r\n */\r\n checkHtml5Validity() {\r\n if (!this.useHtml5Validation)\r\n return;\r\n const el = this.getElement();\r\n if (!el)\r\n return;\r\n if (!el.checkValidity()) {\r\n this.setInvalid();\r\n this.isValid = false;\r\n }\r\n else {\r\n this.setValidity(null, null);\r\n this.isValid = true;\r\n }\r\n return this.isValid;\r\n },\r\n syncFilled(value) {\r\n if (this.parentField) {\r\n this.parentField.isFilled = !!value;\r\n }\r\n }\r\n }\r\n});\n\nexport { FormElementMixin as F };\n","import { defineComponent, resolveComponent, openBlock, createBlock, mergeProps, createVNode, createCommentVNode, toDisplayString } from 'vue';\nimport { getValueByPath } from './helpers.mjs';\nimport { getOptions } from './config.mjs';\nimport { B as BaseComponentMixin } from './plugins-ba5e2464.mjs';\nimport { s as script$1 } from './Icon-a7b85e86.mjs';\nimport { F as FormElementMixin } from './FormElementMixin-29581863.mjs';\n\n/**\r\n * Get user Input. Use with Field to access all functionalities\r\n * @displayName Input\r\n * @style _input.scss\r\n */\r\nvar script = defineComponent({\r\n name: 'OInput',\r\n components: {\r\n [script$1.name]: script$1\r\n },\r\n mixins: [BaseComponentMixin, FormElementMixin],\r\n configField: 'input',\r\n inheritAttrs: false,\r\n emits: ['update:modelValue', 'icon-click', 'icon-right-click'],\r\n props: {\r\n /** @model */\r\n modelValue: [Number, String],\r\n /** Native options to use in HTML5 validation */\r\n autocomplete: String,\r\n /**\r\n * Input type, like native\r\n * @values Any native input type, and textarea\r\n */\r\n type: {\r\n type: String,\r\n default: 'text'\r\n },\r\n /**\r\n * Vertical size of input, optional\r\n * @values small, medium, large\r\n */\r\n size: String,\r\n /**\r\n * Color of the control, optional\r\n * @values primary, info, success, warning, danger, and any other custom color\r\n */\r\n variant: String,\r\n /**\r\n * \tAdds the reveal password functionality\r\n */\r\n passwordReveal: Boolean,\r\n /**\r\n * Makes the icon clickable\r\n */\r\n iconClickable: Boolean,\r\n /**\r\n * Show character counter when maxlength prop is passed\r\n */\r\n hasCounter: {\r\n type: Boolean,\r\n default: () => { return getValueByPath(getOptions(), 'input.counter', false); }\r\n },\r\n /**\r\n * Automatically adjust height in textarea\r\n */\r\n autosize: {\r\n type: Boolean,\r\n default: false\r\n },\r\n /**\r\n * \tIcon name to be added on the right side\r\n */\r\n iconRight: String,\r\n /**\r\n * Make the icon right clickable\r\n */\r\n iconRightClickable: Boolean,\r\n /** Variant of right icon */\r\n iconRightVariant: String,\r\n /** Add a button/icon to clear the inputed text */\r\n clearable: {\r\n type: Boolean,\r\n default: () => { return getValueByPath(getOptions(), 'input.clearable', false); }\r\n },\r\n rootClass: [String, Function, Array],\r\n expandedClass: [String, Function, Array],\r\n iconLeftSpaceClass: [String, Function, Array],\r\n iconRightSpaceClass: [String, Function, Array],\r\n inputClass: [String, Function, Array],\r\n roundedClass: [String, Function, Array],\r\n iconLeftClass: [String, Function, Array],\r\n iconRightClass: [String, Function, Array],\r\n counterClass: [String, Function, Array],\r\n sizeClass: [String, Function, Array],\r\n variantClass: [String, Function, Array]\r\n },\r\n data() {\r\n return {\r\n newValue: this.modelValue,\r\n newType: this.type,\r\n // from mixin (ts workaround)\r\n newAutocomplete: this.autocomplete || getValueByPath(getOptions(), 'input.autocompletete', 'off'),\r\n isPasswordVisible: false,\r\n height: 'auto'\r\n };\r\n },\r\n computed: {\r\n rootClasses() {\r\n return [\r\n this.computedClass('rootClass', 'o-ctrl-input'),\r\n { [this.computedClass('expandedClass', 'o-ctrl-input--expanded')]: this.expanded }\r\n ];\r\n },\r\n inputClasses() {\r\n return [\r\n this.computedClass('inputClass', 'o-input'),\r\n { [this.computedClass('roundedClass', 'o-input--rounded')]: this.rounded },\r\n { [this.computedClass('sizeClass', 'o-input--', this.size)]: this.size },\r\n { [this.computedClass('variantClass', 'o-input--', (this.statusVariant || this.variant))]: (this.statusVariant || this.variant) },\r\n { [this.computedClass('textareaClass', 'o-input__textarea')]: this.type === 'textarea' },\r\n { [this.computedClass('iconLeftSpaceClass', 'o-input-iconspace-left')]: this.icon },\r\n { [this.computedClass('iconRightSpaceClass', 'o-input-iconspace-right')]: this.hasIconRight }\r\n ];\r\n },\r\n iconLeftClasses() {\r\n return [\r\n this.computedClass('iconLeftClass', 'o-input__icon-left')\r\n ];\r\n },\r\n iconRightClasses() {\r\n return [\r\n this.computedClass('iconRightClass', 'o-input__icon-right')\r\n ];\r\n },\r\n counterClasses() {\r\n return [\r\n this.computedClass('counterClass', 'o-input__counter')\r\n ];\r\n },\r\n computedValue: {\r\n get() {\r\n return this.newValue;\r\n },\r\n set(value) {\r\n this.newValue = value;\r\n this.$emit('update:modelValue', this.newValue);\r\n this.syncFilled(this.newValue);\r\n !this.isValid && this.checkHtml5Validity();\r\n }\r\n },\r\n hasIconRight() {\r\n return this.passwordReveal\r\n || (this.statusIcon && this.statusVariantIcon)\r\n || (this.clearable && this.newValue)\r\n || this.iconRight;\r\n },\r\n rightIcon() {\r\n if (this.passwordReveal) {\r\n return this.passwordVisibleIcon;\r\n }\r\n else if (this.clearable && this.newValue) {\r\n return 'close-circle';\r\n }\r\n else if (this.iconRight) {\r\n return this.iconRight;\r\n }\r\n return this.statusVariantIcon;\r\n },\r\n rightIconVariant() {\r\n if (this.passwordReveal || this.iconRight) {\r\n return this.iconRightVariant || this.variant || null;\r\n }\r\n return this.statusVariant;\r\n },\r\n /**\r\n * Check if have any message prop from parent if it's a Field.\r\n */\r\n hasMessage() {\r\n return !!this.statusMessage;\r\n },\r\n /**\r\n * Current password-reveal icon name.\r\n */\r\n passwordVisibleIcon() {\r\n return !this.isPasswordVisible ? 'eye' : 'eye-off';\r\n },\r\n /**\r\n * Get value length\r\n */\r\n valueLength() {\r\n if (typeof this.computedValue === 'string') {\r\n return this.computedValue.length;\r\n }\r\n else if (typeof this.computedValue === 'number') {\r\n return this.computedValue.toString().length;\r\n }\r\n return 0;\r\n },\r\n /**\r\n * Computed inline styles for autoresize\r\n */\r\n computedStyles() {\r\n if (!this.autosize)\r\n return {};\r\n return {\r\n resize: 'none',\r\n height: this.height,\r\n overflow: 'hidden'\r\n };\r\n },\r\n $elementRef() {\r\n return this.type === 'textarea'\r\n ? 'textarea'\r\n : 'input';\r\n }\r\n },\r\n watch: {\r\n /**\r\n * When v-model is changed:\r\n * 1. Set internal value.\r\n */\r\n modelValue: {\r\n immediate: true,\r\n handler(value) {\r\n this.newValue = value;\r\n this.syncFilled(this.newValue);\r\n if (this.autosize) {\r\n this.resize();\r\n }\r\n }\r\n },\r\n type(type) {\r\n this.newType = type;\r\n }\r\n },\r\n methods: {\r\n /**\r\n * Toggle the visibility of a password-reveal input\r\n * by changing the type and focus the input right away.\r\n */\r\n togglePasswordVisibility() {\r\n this.isPasswordVisible = !this.isPasswordVisible;\r\n this.newType = this.isPasswordVisible ? 'text' : 'password';\r\n this.$nextTick(() => {\r\n this.focus();\r\n });\r\n },\r\n iconClick(emit, event) {\r\n this.$emit(emit, event);\r\n this.$nextTick(() => {\r\n this.focus();\r\n });\r\n },\r\n rightIconClick(event) {\r\n if (this.passwordReveal) {\r\n this.togglePasswordVisibility();\r\n }\r\n else if (this.clearable) {\r\n this.computedValue = '';\r\n }\r\n else if (this.iconRightClickable) {\r\n this.iconClick('icon-right-click', event);\r\n }\r\n },\r\n resize() {\r\n this.height = 'auto';\r\n this.$nextTick(() => {\r\n const scrollHeight = this.$refs.textarea.scrollHeight;\r\n this.height = scrollHeight + 'px';\r\n });\r\n }\r\n }\r\n});\n\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n const _component_o_icon = resolveComponent(\"o-icon\");\n\n return openBlock(), createBlock(\"div\", {\n class: _ctx.rootClasses\n }, [_ctx.type !== 'textarea' ? (openBlock(), createBlock(\"input\", mergeProps({\n key: 0\n }, _ctx.$attrs, {\n ref: \"input\",\n class: _ctx.inputClasses,\n type: _ctx.newType,\n autocomplete: _ctx.newAutocomplete,\n maxlength: _ctx.maxlength,\n value: _ctx.computedValue,\n onInput: _cache[1] || (_cache[1] = $event => _ctx.computedValue = $event.target.value),\n onBlur: _cache[2] || (_cache[2] = (...args) => _ctx.onBlur(...args)),\n onFocus: _cache[3] || (_cache[3] = (...args) => _ctx.onFocus(...args))\n }), null, 16\n /* FULL_PROPS */\n , [\"type\", \"autocomplete\", \"maxlength\", \"value\"])) : (openBlock(), createBlock(\"textarea\", mergeProps({\n key: 1\n }, _ctx.$attrs, {\n ref: \"textarea\",\n class: _ctx.inputClasses,\n maxlength: _ctx.maxlength,\n value: _ctx.computedValue,\n onInput: _cache[4] || (_cache[4] = $event => _ctx.computedValue = $event.target.value),\n onBlur: _cache[5] || (_cache[5] = (...args) => _ctx.onBlur(...args)),\n onFocus: _cache[6] || (_cache[6] = (...args) => _ctx.onFocus(...args)),\n style: _ctx.computedStyles\n }), null, 16\n /* FULL_PROPS */\n , [\"maxlength\", \"value\"])), _ctx.icon ? createVNode(_component_o_icon, {\n key: 2,\n class: _ctx.iconLeftClasses,\n clickable: _ctx.iconClickable,\n icon: _ctx.icon,\n pack: _ctx.iconPack,\n size: _ctx.size,\n onClick: _cache[7] || (_cache[7] = $event => _ctx.iconClick('icon-click', $event))\n }, null, 8\n /* PROPS */\n , [\"class\", \"clickable\", \"icon\", \"pack\", \"size\"]) : createCommentVNode(\"v-if\", true), _ctx.hasIconRight ? createVNode(_component_o_icon, {\n key: 3,\n class: _ctx.iconRightClasses,\n clickable: _ctx.passwordReveal || _ctx.clearable || _ctx.iconRightClickable,\n icon: _ctx.rightIcon,\n pack: _ctx.iconPack,\n size: _ctx.size,\n variant: _ctx.rightIconVariant,\n both: \"\",\n onClick: _ctx.rightIconClick\n }, null, 8\n /* PROPS */\n , [\"class\", \"clickable\", \"icon\", \"pack\", \"size\", \"variant\", \"onClick\"]) : createCommentVNode(\"v-if\", true), _ctx.maxlength && _ctx.hasCounter && _ctx.isFocused && _ctx.type !== 'number' ? (openBlock(), createBlock(\"small\", {\n key: 4,\n class: _ctx.counterClasses\n }, toDisplayString(_ctx.valueLength) + \" / \" + toDisplayString(_ctx.maxlength), 3\n /* TEXT, CLASS */\n )) : createCommentVNode(\"v-if\", true)], 2\n /* CLASS */\n );\n}\n\nscript.render = render;\nscript.__file = \"src/components/input/Input.vue\";\n\nexport { script as s };\n","import { defineComponent, resolveComponent, openBlock, createBlock, createVNode, mergeProps, withKeys, withModifiers, Transition, withCtx, withDirectives, renderSlot, createCommentVNode, Fragment, renderList, toDisplayString, vShow } from 'vue';\nimport { getValueByPath, toCssDimension, debounce, createAbsoluteElement, removeElement } from './helpers.mjs';\nimport { getOptions } from './config.mjs';\nimport { B as BaseComponentMixin } from './plugins-ba5e2464.mjs';\nimport { F as FormElementMixin } from './FormElementMixin-29581863.mjs';\nimport { s as script$1 } from './Input-19e906a1.mjs';\n\n/**\r\n * Extended input that provide suggestions while the user types\r\n * @displayName Autocomplete\r\n * @style _autocomplete.scss\r\n */\r\nvar script = defineComponent({\r\n name: 'OAutocomplete',\r\n configField: 'autocomplete',\r\n components: {\r\n [script$1.name]: script$1\r\n },\r\n mixins: [BaseComponentMixin, FormElementMixin],\r\n inheritAttrs: false,\r\n emits: ['update:modelValue', 'select', 'infinite-scroll', 'typing', 'focus', 'blur', 'icon-click', 'icon-right-click'],\r\n props: {\r\n /** @model */\r\n modelValue: [Number, String],\r\n /** Options / suggestions */\r\n data: {\r\n type: Array,\r\n default: () => []\r\n },\r\n /** Native options to use in HTML5 validation */\r\n autocomplete: String,\r\n /**\r\n * Vertical size of input, optional\r\n * @values small, medium, large\r\n */\r\n size: String,\r\n /** Property of the object (if data is array of objects) to use as display text, and to keep track of selected option */\r\n field: {\r\n type: String,\r\n default: 'value'\r\n },\r\n /** The first option will always be pre-selected (easier to just hit enter or tab) */\r\n keepFirst: Boolean,\r\n /** Clear input text on select */\r\n clearOnSelect: Boolean,\r\n /** Open dropdown list on focus */\r\n openOnFocus: Boolean,\r\n /** Function to format an option to a string for display in the input as alternative to field prop) */\r\n customFormatter: Function,\r\n /** Makes the component check if list reached scroll end and emit infinite-scroll event. */\r\n checkInfiniteScroll: Boolean,\r\n /** Keep open dropdown list after select */\r\n keepOpen: Boolean,\r\n /** Add a button/icon to clear the inputed text */\r\n clearable: Boolean,\r\n /** Max height of dropdown content */\r\n maxHeight: [String, Number],\r\n /**\r\n * Position of dropdown\r\n * @values auto, top, bottom\r\n */\r\n menuPosition: {\r\n type: String,\r\n default: 'auto'\r\n },\r\n /** Transition name to apply on dropdown list */\r\n animation: {\r\n type: String,\r\n default: () => {\r\n return getValueByPath(getOptions(), 'autocomplete.animation', 'fade');\r\n }\r\n },\r\n /** Property of the object (if data is array of objects) to use as display text of group */\r\n groupField: String,\r\n /** Property of the object (if data is array of objects) to use as key to get items array of each group, optional */\r\n groupOptions: String,\r\n /** Number of milliseconds to delay before to emit typing event */\r\n debounceTyping: Number,\r\n /** Icon name to be added on the right side */\r\n iconRight: String,\r\n /** Clickable icon right if exists */\r\n iconRightClickable: Boolean,\r\n /** Append autocomplete content to body */\r\n appendToBody: Boolean,\r\n /** Array of keys (https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key/Key_Values) which will add a tag when typing (default tab and enter) */\r\n confirmKeys: {\r\n type: Array,\r\n default: () => ['Tab', 'Enter']\r\n },\r\n /** Input type */\r\n type: {\r\n type: String,\r\n default: 'text'\r\n },\r\n /**\r\n * Menu tag name\r\n */\r\n menuTag: {\r\n type: String,\r\n default: () => {\r\n return getValueByPath(getOptions(), 'autocomplete.menuTag', 'div');\r\n }\r\n },\r\n /**\r\n * Menu item tag name\r\n */\r\n itemTag: {\r\n type: String,\r\n default: () => {\r\n return getValueByPath(getOptions(), 'autocomplete.itemTag', 'div');\r\n }\r\n },\r\n /** Trigger the select event for the first pre-selected option when clicking outside and keep-first is enabled */\r\n selectOnClickOutside: Boolean,\r\n /** Allows the header in the autocomplete to be selectable */\r\n selectableHeader: Boolean,\r\n /** Allows the footer in the autocomplete to be selectable */\r\n selectableFooter: Boolean,\r\n rootClass: [String, Function, Array],\r\n menuClass: [String, Function, Array],\r\n expandedClass: [String, Function, Array],\r\n menuPositionClass: [String, Function, Array],\r\n itemClass: [String, Function, Array],\r\n itemHoverClass: [String, Function, Array],\r\n itemGroupTitleClass: [String, Function, Array],\r\n itemEmptyClass: [String, Function, Array],\r\n itemHeaderClass: [String, Function, Array],\r\n itemFooterClass: [String, Function, Array],\r\n inputClasses: {\r\n type: Object,\r\n default: () => {\r\n return getValueByPath(getOptions(), 'autocomplete.inputClasses', {});\r\n }\r\n }\r\n },\r\n data() {\r\n return {\r\n selected: null,\r\n hovered: null,\r\n headerHovered: null,\r\n footerHovered: null,\r\n isActive: false,\r\n newValue: this.modelValue,\r\n ariaAutocomplete: this.keepFirst ? 'both' : 'list',\r\n newAutocomplete: this.autocomplete || 'off',\r\n isListInViewportVertically: true,\r\n hasFocus: false,\r\n itemRefs: [],\r\n width: undefined,\r\n bodyEl: undefined,\r\n };\r\n },\r\n computed: {\r\n rootClasses() {\r\n return [\r\n this.computedClass('rootClass', 'o-acp'),\r\n { [this.computedClass('expandedClass', 'o-acp--expanded')]: this.expanded }\r\n ];\r\n },\r\n menuClasses() {\r\n return [\r\n this.computedClass('menuClass', 'o-acp__menu'),\r\n { [this.computedClass('menuPositionClass', 'o-acp__menu--', this.newDropdownPosition)]: !this.appendToBody },\r\n ];\r\n },\r\n itemClasses() {\r\n return [\r\n this.computedClass('itemClass', 'o-acp__item')\r\n ];\r\n },\r\n itemEmptyClasses() {\r\n return [\r\n ...this.itemClasses,\r\n this.computedClass('itemEmptyClass', 'o-acp__item--empty')\r\n ];\r\n },\r\n itemGroupClasses() {\r\n return [\r\n ...this.itemClasses,\r\n this.computedClass('itemGroupTitleClass', 'o-acp__item-group-title')\r\n ];\r\n },\r\n itemHeaderClasses() {\r\n return [\r\n ...this.itemClasses,\r\n this.computedClass('itemHeaderClass', 'o-acp__item-header'),\r\n { [this.computedClass('itemHoverClass', 'o-acp__item--hover')]: this.headerHovered }\r\n ];\r\n },\r\n itemFooterClasses() {\r\n return [\r\n ...this.itemClasses,\r\n this.computedClass('itemFooterClass', 'o-acp__item-footer'),\r\n { [this.computedClass('itemHoverClass', 'o-acp__item--hover')]: this.footerHovered }\r\n ];\r\n },\r\n inputBind() {\r\n return {\r\n ...this.$attrs,\r\n ...this.inputClasses\r\n };\r\n },\r\n computedData() {\r\n if (this.groupField) {\r\n if (this.groupOptions) {\r\n const newData = [];\r\n this.data.forEach((option) => {\r\n const group = getValueByPath(option, this.groupField);\r\n const items = getValueByPath(option, this.groupOptions);\r\n newData.push({ group, items });\r\n });\r\n return newData;\r\n }\r\n else {\r\n const tmp = {};\r\n this.data.forEach((option) => {\r\n const group = getValueByPath(option, this.groupField);\r\n if (!tmp[group])\r\n tmp[group] = [];\r\n tmp[group].push(option);\r\n });\r\n const newData = [];\r\n Object.keys(this.data).forEach((group) => {\r\n newData.push({ group, items: this.data[group] });\r\n });\r\n return newData;\r\n }\r\n }\r\n return [{ items: this.data }];\r\n },\r\n isEmpty() {\r\n if (!this.computedData)\r\n return true;\r\n return !this.computedData.some((element) => element.items && element.items.length);\r\n },\r\n /**\r\n * White-listed items to not close when clicked.\r\n * Add input, dropdown and all children.\r\n */\r\n whiteList() {\r\n const whiteList = [];\r\n whiteList.push(this.$refs.input.$el.querySelector('input'));\r\n whiteList.push(this.$refs.dropdown);\r\n // Add all children from dropdown\r\n if (this.$refs.dropdown !== undefined) {\r\n const children = this.$refs.dropdown.querySelectorAll('*');\r\n for (const child of children) {\r\n whiteList.push(child);\r\n }\r\n }\r\n return whiteList;\r\n },\r\n newDropdownPosition() {\r\n if (this.menuPosition === 'top' || (this.menuPosition === 'auto' && !this.isListInViewportVertically)) {\r\n return 'top';\r\n }\r\n return 'bottom';\r\n },\r\n newIconRight() {\r\n if (this.clearable && this.newValue) {\r\n return 'close-circle';\r\n }\r\n return this.iconRight;\r\n },\r\n newIconRightClickable() {\r\n if (this.clearable) {\r\n return true;\r\n }\r\n return this.iconRightClickable;\r\n },\r\n menuStyle() {\r\n return {\r\n maxHeight: toCssDimension(this.maxHeight)\r\n };\r\n },\r\n $elementRef() {\r\n return 'input';\r\n }\r\n },\r\n watch: {\r\n /**\r\n * When v-model is changed:\r\n * 1. Update internal value.\r\n * 2. If it's invalid, validate again.\r\n */\r\n modelValue(value) {\r\n this.newValue = value;\r\n },\r\n /**\r\n * When dropdown is toggled, check the visibility to know when\r\n * to open upwards.\r\n */\r\n isActive(active) {\r\n if (this.menuPosition === 'auto') {\r\n if (active) {\r\n this.calcDropdownInViewportVertical();\r\n }\r\n else {\r\n // Timeout to wait for the animation to finish before recalculating\r\n setTimeout(() => {\r\n this.calcDropdownInViewportVertical();\r\n }, 100);\r\n }\r\n }\r\n },\r\n /**\r\n * When updating input's value\r\n * 1. Emit changes\r\n * 2. If value isn't the same as selected, set null\r\n * 3. Close dropdown if value is clear or else open it\r\n */\r\n newValue(value) {\r\n this.$emit('update:modelValue', value);\r\n // Check if selected is invalid\r\n const currentValue = this.getValue(this.selected);\r\n if (currentValue && currentValue !== value) {\r\n this.setSelected(null, false);\r\n }\r\n // Close dropdown if input is clear or else open it\r\n if (this.hasFocus && (!this.openOnFocus || value)) {\r\n this.isActive = !!value;\r\n }\r\n },\r\n /**\r\n * Select first option if \"keep-first\r\n */\r\n data() {\r\n // Keep first option always pre-selected\r\n if (this.keepFirst) {\r\n this.$nextTick(() => {\r\n if (this.isActive) {\r\n this.selectFirstOption(this.computedData);\r\n }\r\n else {\r\n this.setHovered(null);\r\n }\r\n });\r\n }\r\n else {\r\n if (this.hovered) {\r\n // reset hovered if list doesn't contain it\r\n const hoveredValue = this.getValue(this.hovered);\r\n const data = this.computedData.map((d) => d.items).reduce((a, b) => ([...a, ...b]), []);\r\n if (!data.some(d => this.getValue(d) === hoveredValue)) {\r\n this.setHovered(null);\r\n }\r\n }\r\n }\r\n },\r\n debounceTyping: {\r\n handler(value) {\r\n this.debouncedEmitTyping = debounce(this.emitTyping, value);\r\n },\r\n immediate: true\r\n }\r\n },\r\n methods: {\r\n itemOptionClasses(option) {\r\n return [\r\n ...this.itemClasses,\r\n { [this.computedClass('itemHoverClass', 'o-acp__item--hover')]: option === this.hovered }\r\n ];\r\n },\r\n /**\r\n * Set which option is currently hovered.\r\n */\r\n setHovered(option) {\r\n if (option === undefined)\r\n return;\r\n this.hovered = option;\r\n },\r\n /**\r\n * Set which option is currently selected, update v-model,\r\n * update input value and close dropdown.\r\n */\r\n setSelected(option, closeDropdown = true, event = undefined) {\r\n if (option === undefined)\r\n return;\r\n this.selected = option;\r\n /**\r\n * @property {Object} selected selected option\r\n * @property {Event} event native event\r\n */\r\n this.$emit('select', this.selected, event);\r\n if (this.selected !== null) {\r\n if (this.clearOnSelect) {\r\n const input = this.$refs.input;\r\n input.newValue = '';\r\n input.$refs.input.value = '';\r\n }\r\n else {\r\n this.newValue = this.getValue(this.selected);\r\n }\r\n this.setHovered(null);\r\n }\r\n closeDropdown && this.$nextTick(() => { this.isActive = false; });\r\n this.checkValidity();\r\n },\r\n /**\r\n * Select first option\r\n */\r\n selectFirstOption(computedData) {\r\n this.$nextTick(() => {\r\n const nonEmptyElements = computedData.filter((element) => element.items && element.items.length);\r\n if (nonEmptyElements.length) {\r\n const option = nonEmptyElements[0].items[0];\r\n this.setHovered(option);\r\n }\r\n else {\r\n this.setHovered(null);\r\n }\r\n });\r\n },\r\n /**\r\n * Key listener.\r\n * Select the hovered option.\r\n */\r\n keydown(event) {\r\n const { key } = event; // cannot destructure preventDefault (https://stackoverflow.com/a/49616808/2774496)\r\n // prevent emit submit event\r\n if (key === 'Enter')\r\n event.preventDefault();\r\n // Close dropdown on Tab & no hovered\r\n if (key === 'Escape' || key === 'Tab') {\r\n this.isActive = false;\r\n }\r\n if (this.confirmKeys.indexOf(key) >= 0) {\r\n // If adding by comma, don't add the comma to the input\r\n if (key === ',')\r\n event.preventDefault();\r\n // Close dropdown on select by Tab\r\n const closeDropdown = !this.keepOpen || key === 'Tab';\r\n if (this.hovered === null) {\r\n // header and footer uses headerHovered && footerHovered. If header or footer\r\n // was selected then fire event otherwise just return so a value isn't selected\r\n this.checkIfHeaderOrFooterSelected(event, null, closeDropdown);\r\n return;\r\n }\r\n this.setSelected(this.hovered, closeDropdown, event);\r\n }\r\n },\r\n selectHeaderOrFoterByClick(event, origin) {\r\n this.checkIfHeaderOrFooterSelected(event, { origin: origin });\r\n },\r\n /**\r\n * Check if header or footer was selected.\r\n */\r\n checkIfHeaderOrFooterSelected(event, triggerClick, closeDropdown = true) {\r\n if (this.selectableHeader && (this.headerHovered || (triggerClick && triggerClick.origin === 'header'))) {\r\n this.$emit('select-header', event);\r\n this.headerHovered = false;\r\n if (triggerClick)\r\n this.setHovered(null);\r\n if (closeDropdown)\r\n this.isActive = false;\r\n }\r\n if (this.selectableFooter && (this.footerHovered || (triggerClick && triggerClick.origin === 'header'))) {\r\n this.$emit('select-footer', event);\r\n this.footerHovered = false;\r\n if (triggerClick)\r\n this.setHovered(null);\r\n if (closeDropdown)\r\n this.isActive = false;\r\n }\r\n },\r\n /**\r\n * Close dropdown if clicked outside.\r\n */\r\n clickedOutside(event) {\r\n if (!this.hasFocus && this.whiteList.indexOf(event.target) < 0) {\r\n if (this.keepFirst && this.hovered && this.selectOnClickOutside) {\r\n this.setSelected(this.hovered, true);\r\n }\r\n else {\r\n this.isActive = false;\r\n }\r\n }\r\n },\r\n /**\r\n * Return display text for the input.\r\n * If object, get value from path, or else just the value.\r\n */\r\n getValue(option) {\r\n if (option === null)\r\n return;\r\n if (typeof this.customFormatter !== 'undefined') {\r\n return this.customFormatter(option);\r\n }\r\n return typeof option === 'object'\r\n ? getValueByPath(option, this.field)\r\n : option;\r\n },\r\n /**\r\n * Check if the scroll list inside the dropdown\r\n * reached it's end.\r\n */\r\n checkIfReachedTheEndOfScroll() {\r\n const list = this.$refs.dropdown;\r\n const footerHeight = this.$slots.footer ? this.$refs.footer.clientHeight : 0;\r\n if (list.clientHeight !== list.scrollHeight &&\r\n list.scrollTop + list.clientHeight + footerHeight >= list.scrollHeight) {\r\n this.$emit('infinite-scroll');\r\n }\r\n },\r\n /**\r\n * Calculate if the dropdown is vertically visible when activated,\r\n * otherwise it is openened upwards.\r\n */\r\n calcDropdownInViewportVertical() {\r\n this.$nextTick(() => {\r\n /**\r\n * this.$refs.dropdown may be undefined\r\n * when Autocomplete is conditional rendered\r\n */\r\n if (!this.$refs.dropdown)\r\n return;\r\n const rect = this.$refs.dropdown.getBoundingClientRect();\r\n this.isListInViewportVertically = (rect.top >= 0 &&\r\n rect.bottom <= (window.innerHeight ||\r\n document.documentElement.clientHeight));\r\n if (this.appendToBody) {\r\n this.updateAppendToBody();\r\n }\r\n });\r\n },\r\n /**\r\n * Arrows keys listener.\r\n * If dropdown is active, set hovered option, or else just open.\r\n */\r\n keyArrows(direction) {\r\n const sum = direction === 'down' ? 1 : -1;\r\n if (this.isActive) {\r\n const data = this.computedData.map((d) => d.items).reduce((a, b) => ([...a, ...b]), []);\r\n if (this.$slots.header && this.selectableHeader) {\r\n data.unshift(undefined);\r\n }\r\n if (this.$slots.footer && this.selectableFooter) {\r\n data.push(undefined);\r\n }\r\n let index;\r\n if (this.headerHovered) {\r\n index = 0 + sum;\r\n }\r\n else if (this.footerHovered) {\r\n index = (data.length - 1) + sum;\r\n }\r\n else {\r\n index = data.indexOf(this.hovered) + sum;\r\n }\r\n index = index > data.length - 1 ? data.length - 1 : index;\r\n index = index < 0 ? 0 : index;\r\n this.footerHovered = false;\r\n this.headerHovered = false;\r\n this.setHovered(data[index] !== undefined ? data[index] : null);\r\n if (this.$slots.footer && this.selectableFooter && index === data.length - 1) {\r\n this.footerHovered = true;\r\n }\r\n if (this.$slots.header && this.selectableHeader && index === 0) {\r\n this.headerHovered = true;\r\n }\r\n const list = this.$refs.dropdown;\r\n let items = this.itemRefs || [];\r\n if (this.$slots.header && this.selectableHeader) {\r\n items = [this.$refs.header, ...items];\r\n }\r\n if (this.$slots.footer && this.selectableFooter) {\r\n items = [...items, this.$refs.footer];\r\n }\r\n const element = items[index];\r\n if (!element)\r\n return;\r\n const visMin = list.scrollTop;\r\n const visMax = list.scrollTop + list.clientHeight - element.clientHeight;\r\n if (element.offsetTop < visMin) {\r\n list.scrollTop = element.offsetTop;\r\n }\r\n else if (element.offsetTop >= visMax) {\r\n list.scrollTop = (element.offsetTop -\r\n list.clientHeight +\r\n element.clientHeight);\r\n }\r\n }\r\n else {\r\n this.isActive = true;\r\n }\r\n },\r\n /**\r\n * Focus listener.\r\n * If value is the same as selected, select all text.\r\n */\r\n focused(event) {\r\n if (this.getValue(this.selected) === this.newValue) {\r\n this.$el.querySelector('input').select();\r\n }\r\n if (this.openOnFocus) {\r\n this.isActive = true;\r\n if (this.keepFirst) {\r\n // If open on focus, update the hovered\r\n this.selectFirstOption(this.computedData);\r\n }\r\n }\r\n this.hasFocus = true;\r\n this.$emit('focus', event);\r\n },\r\n /**\r\n * Blur listener.\r\n */\r\n onBlur(event) {\r\n this.hasFocus = false;\r\n this.$emit('blur', event);\r\n },\r\n onInput() {\r\n const currentValue = this.getValue(this.selected);\r\n if (currentValue && currentValue === this.newValue)\r\n return;\r\n if (this.debounceTyping) {\r\n this.debouncedEmitTyping();\r\n }\r\n else {\r\n this.emitTyping();\r\n }\r\n },\r\n emitTyping() {\r\n this.$emit('typing', this.newValue);\r\n this.checkValidity();\r\n },\r\n rightIconClick(event) {\r\n if (this.clearable) {\r\n this.newValue = '';\r\n this.setSelected(null, false);\r\n if (this.openOnFocus) {\r\n this.$refs.input.$el.focus();\r\n }\r\n }\r\n else {\r\n this.$emit('icon-right-click', event);\r\n }\r\n },\r\n checkValidity() {\r\n if (this.useHtml5Validation) {\r\n this.$nextTick(() => {\r\n this.checkHtml5Validity();\r\n });\r\n }\r\n },\r\n setItemRef(el) {\r\n if (el) {\r\n this.itemRefs.push(el);\r\n }\r\n },\r\n updateAppendToBody() {\r\n const dropdownMenu = this.$refs.dropdown;\r\n const trigger = this.$refs.input.$el;\r\n if (dropdownMenu && trigger) {\r\n // update wrapper dropdown\r\n const root = this.$data.bodyEl;\r\n root.classList.forEach((item) => root.classList.remove(...item.split(' ')));\r\n this.rootClasses.forEach((item) => {\r\n if (item) {\r\n if (typeof item === 'object') {\r\n Object.keys(item).filter(key => key && item[key]).forEach(key => root.classList.add(key));\r\n }\r\n else {\r\n root.classList.add(...item.split(' '));\r\n }\r\n }\r\n });\r\n const rect = trigger.getBoundingClientRect();\r\n let top = rect.top + window.scrollY;\r\n const left = rect.left + window.scrollX;\r\n if (this.newDropdownPosition !== 'top') {\r\n top += trigger.clientHeight;\r\n }\r\n else {\r\n top -= dropdownMenu.clientHeight;\r\n }\r\n dropdownMenu.style.position = 'absolute';\r\n dropdownMenu.style.top = `${top}px`;\r\n dropdownMenu.style.left = `${left}px`;\r\n dropdownMenu.style.width = `${trigger.clientWidth}px`;\r\n dropdownMenu.style.maxWidth = `${trigger.clientWidth}px`;\r\n dropdownMenu.style.zIndex = '9999';\r\n }\r\n }\r\n },\r\n created() {\r\n if (typeof window !== 'undefined') {\r\n document.addEventListener('click', this.clickedOutside);\r\n if (this.menuPosition === 'auto')\r\n window.addEventListener('resize', this.calcDropdownInViewportVertical);\r\n }\r\n },\r\n mounted() {\r\n const list = this.$refs.dropdown;\r\n if (this.checkInfiniteScroll && list) {\r\n list.addEventListener('scroll', this.checkIfReachedTheEndOfScroll);\r\n }\r\n if (this.appendToBody) {\r\n this.$data.bodyEl = createAbsoluteElement(list);\r\n this.updateAppendToBody();\r\n }\r\n },\r\n beforeUpdate() {\r\n this.width = this.$refs.input ? this.$refs.input.$el.clientWidth : undefined;\r\n this.itemRefs = [];\r\n },\r\n beforeUnmount() {\r\n if (typeof window !== 'undefined') {\r\n document.removeEventListener('click', this.clickedOutside);\r\n if (this.menuPosition === 'auto')\r\n window.removeEventListener('resize', this.calcDropdownInViewportVertical);\r\n }\r\n if (this.checkInfiniteScroll && this.$refs.dropdown) {\r\n const list = this.$refs.dropdown;\r\n list.removeEventListener('scroll', this.checkIfReachedTheEndOfScroll);\r\n }\r\n if (this.appendToBody) {\r\n removeElement(this.$data.bodyEl);\r\n }\r\n }\r\n});\n\nconst _hoisted_1 = {\n key: 1\n};\nconst _hoisted_2 = {\n key: 1\n};\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n const _component_o_input = resolveComponent(\"o-input\");\n\n return openBlock(), createBlock(\"div\", {\n class: _ctx.rootClasses\n }, [createVNode(_component_o_input, mergeProps(_ctx.inputBind, {\n modelValue: _ctx.newValue,\n \"onUpdate:modelValue\": [_cache[1] || (_cache[1] = $event => _ctx.newValue = $event), _ctx.onInput],\n ref: \"input\",\n type: _ctx.type,\n size: _ctx.size,\n rounded: _ctx.rounded,\n icon: _ctx.icon,\n \"icon-right\": _ctx.newIconRight,\n \"icon-right-clickable\": _ctx.newIconRightClickable,\n \"icon-pack\": _ctx.iconPack,\n maxlength: _ctx.maxlength,\n autocomplete: _ctx.newAutocomplete,\n \"use-html5-validation\": false,\n \"aria-autocomplete\": _ctx.ariaAutocomplete,\n expanded: _ctx.expanded,\n onFocus: _ctx.focused,\n onBlur: _ctx.onBlur,\n onKeydown: [_ctx.keydown, _cache[2] || (_cache[2] = withKeys(withModifiers($event => _ctx.keyArrows('up'), [\"prevent\"]), [\"up\"])), _cache[3] || (_cache[3] = withKeys(withModifiers($event => _ctx.keyArrows('down'), [\"prevent\"]), [\"down\"]))],\n \"onIcon-right-click\": _ctx.rightIconClick,\n \"onIcon-click\": _cache[4] || (_cache[4] = event => _ctx.$emit('icon-click', event))\n }), null, 16\n /* FULL_PROPS */\n , [\"modelValue\", \"type\", \"size\", \"rounded\", \"icon\", \"icon-right\", \"icon-right-clickable\", \"icon-pack\", \"maxlength\", \"autocomplete\", \"aria-autocomplete\", \"expanded\", \"onUpdate:modelValue\", \"onFocus\", \"onBlur\", \"onKeydown\", \"onIcon-right-click\"]), createVNode(Transition, {\n name: _ctx.animation\n }, {\n default: withCtx(() => [withDirectives(createVNode(\"div\", {\n class: _ctx.menuClasses,\n is: _ctx.menuTag,\n style: _ctx.menuStyle,\n ref: \"dropdown\"\n }, [_ctx.$slots.header ? (openBlock(), createBlock(\"div\", {\n key: 0,\n is: _ctx.itemTag,\n ref: \"header\",\n role: \"button\",\n tabindex: 0,\n onClick: _cache[5] || (_cache[5] = $event => _ctx.selectHeaderOrFoterByClick($event, 'header')),\n class: _ctx.itemHeaderClasses\n }, [renderSlot(_ctx.$slots, \"header\")], 10\n /* CLASS, PROPS */\n , [\"is\"])) : createCommentVNode(\"v-if\", true), (openBlock(true), createBlock(Fragment, null, renderList(_ctx.computedData, (element, groupindex) => {\n return openBlock(), createBlock(Fragment, null, [element.group ? (openBlock(), createBlock(\"div\", {\n is: _ctx.itemTag,\n key: groupindex + 'group',\n class: _ctx.itemGroupClasses\n }, [_ctx.$slots.group ? renderSlot(_ctx.$slots, \"group\", {\n key: 0,\n group: element.group,\n index: groupindex\n }) : (openBlock(), createBlock(\"span\", _hoisted_1, toDisplayString(element.group), 1\n /* TEXT */\n ))], 10\n /* CLASS, PROPS */\n , [\"is\"])) : createCommentVNode(\"v-if\", true), (openBlock(true), createBlock(Fragment, null, renderList(element.items, (option, index) => {\n return openBlock(), createBlock(\"div\", {\n key: groupindex + ':' + index,\n is: _ctx.itemTag,\n class: _ctx.itemOptionClasses(option),\n onClick: withModifiers($event => _ctx.setSelected(option, !_ctx.keepOpen, $event), [\"stop\"]),\n ref: _ctx.setItemRef\n }, [_ctx.$slots.default ? renderSlot(_ctx.$slots, \"default\", {\n key: 0,\n option: option,\n index: index\n }) : (openBlock(), createBlock(\"span\", _hoisted_2, toDisplayString(_ctx.getValue(option)), 1\n /* TEXT */\n ))], 10\n /* CLASS, PROPS */\n , [\"is\", \"onClick\"]);\n }), 128\n /* KEYED_FRAGMENT */\n ))], 64\n /* STABLE_FRAGMENT */\n );\n }), 256\n /* UNKEYED_FRAGMENT */\n )), _ctx.isEmpty && _ctx.$slots.empty ? (openBlock(), createBlock(\"div\", {\n key: 1,\n is: _ctx.itemTag,\n class: _ctx.itemEmptyClasses\n }, [renderSlot(_ctx.$slots, \"empty\")], 10\n /* CLASS, PROPS */\n , [\"is\"])) : createCommentVNode(\"v-if\", true), _ctx.$slots.footer ? (openBlock(), createBlock(\"div\", {\n key: 2,\n is: _ctx.itemTag,\n ref: \"footer\",\n role: \"button\",\n tabindex: 0,\n onClick: _cache[6] || (_cache[6] = $event => _ctx.selectHeaderOrFoterByClick($event, 'footer')),\n class: _ctx.itemFooterClasses\n }, [renderSlot(_ctx.$slots, \"footer\")], 10\n /* CLASS, PROPS */\n , [\"is\"])) : createCommentVNode(\"v-if\", true)], 14\n /* CLASS, STYLE, PROPS */\n , [\"is\"]), [[vShow, _ctx.isActive && (!_ctx.isEmpty || _ctx.$slots.empty || _ctx.$slots.header || _ctx.$slots.footer)]])]),\n _: 1\n }, 8\n /* PROPS */\n , [\"name\"])], 2\n /* CLASS */\n );\n}\n\nscript.render = render;\nscript.__file = \"src/components/autocomplete/Autocomplete.vue\";\n\nexport { script as s };\n","import 'vue';\nimport './helpers.mjs';\nimport './config.mjs';\nimport { b as registerComponent } from './plugins-ba5e2464.mjs';\nimport './Icon-a7b85e86.mjs';\nimport './FormElementMixin-29581863.mjs';\nimport './Input-19e906a1.mjs';\nimport { s as script } from './Autocomplete-a23ad844.mjs';\nexport { s as OAutocomplete } from './Autocomplete-a23ad844.mjs';\n\nvar index = {\r\n install(app) {\r\n registerComponent(app, script);\r\n }\r\n};\n\nexport default index;\n","import { defineComponent, resolveComponent, openBlock, createBlock, resolveDynamicComponent, mergeProps, withCtx, createVNode, createCommentVNode, renderSlot, createTextVNode, toDisplayString } from 'vue';\nimport { getValueByPath } from './helpers.mjs';\nimport { getOptions } from './config.mjs';\nimport { B as BaseComponentMixin } from './plugins-ba5e2464.mjs';\nimport { s as script$1 } from './Icon-a7b85e86.mjs';\n\n/**\r\n * The classic button, in different colors, sizes, and states\r\n * @displayName Button\r\n * @style _button.scss\r\n */\r\nvar script = defineComponent({\r\n name: 'OButton',\r\n components: {\r\n [script$1.name]: script$1\r\n },\r\n configField: 'button',\r\n mixins: [BaseComponentMixin],\r\n inheritAttrs: false,\r\n props: {\r\n /**\r\n * Color of the control, optional\r\n * @values primary, info, success, warning, danger, and any other custom color\r\n */\r\n variant: String,\r\n /**\r\n * Size of button, optional\r\n * @values small, medium, large\r\n */\r\n size: String,\r\n /**\r\n * Button label, optional when default slot\r\n */\r\n label: String,\r\n /**\r\n * Icon pack to use\r\n * @values mdi, fa, fas and any other custom icon pack\r\n */\r\n iconPack: String,\r\n /**\r\n * Icon name to show on the left\r\n */\r\n iconLeft: String,\r\n /**\r\n * Icon name to show on the right\r\n */\r\n iconRight: String,\r\n /**\r\n * Rounded style\r\n */\r\n rounded: {\r\n type: Boolean,\r\n default: () => { return getValueByPath(getOptions(), 'button.rounded', false); }\r\n },\r\n /**\r\n * Outlined style\r\n */\r\n outlined: Boolean,\r\n /**\r\n * Button will be expanded (full-width)\r\n */\r\n expanded: Boolean,\r\n inverted: Boolean,\r\n /**\r\n * Button type, like native\r\n */\r\n nativeType: {\r\n type: String,\r\n default: 'button',\r\n validator: (value) => {\r\n return [\r\n 'button',\r\n 'submit',\r\n 'reset'\r\n ].indexOf(value) >= 0;\r\n }\r\n },\r\n /**\r\n * Button tag name\r\n * @values button, a, input, router-link, nuxt-link (or other nuxt alias)\r\n */\r\n tag: {\r\n type: String,\r\n default: 'button'\r\n },\r\n /**\r\n * Button will be disabled\r\n */\r\n disabled: Boolean,\r\n /** @ignore */\r\n iconBoth: Boolean,\r\n elementsWrapperClass: [String, Function, Array],\r\n rootClass: [String, Function, Array],\r\n outlinedClass: [String, Function, Array],\r\n invertedClass: [String, Function, Array],\r\n expandedClass: [String, Function, Array],\r\n roundedClass: [String, Function, Array],\r\n disabledClass: [String, Function, Array],\r\n iconClass: [String, Function, Array],\r\n iconLeftClass: [String, Function, Array],\r\n iconRightClass: [String, Function, Array],\r\n labelClass: [String, Function, Array],\r\n sizeClass: [String, Function, Array],\r\n variantClass: [String, Function, Array]\r\n },\r\n computed: {\r\n rootClasses() {\r\n return [\r\n this.computedClass('rootClass', 'o-btn'),\r\n { [this.computedClass('sizeClass', 'o-btn--', this.size)]: this.size },\r\n { [this.computedClass('variantClass', 'o-btn--', this.variant)]: this.variant },\r\n { [this.computedClass('outlinedClass', 'o-btn--outlined')]: this.outlined && !this.variant },\r\n { [this.computedClass('invertedClass', 'o-btn--inverted')]: this.inverted && !this.variant },\r\n { [this.computedClass('outlinedClass', 'o-btn--outlined-', this.variant)]: this.outlined && this.variant },\r\n { [this.computedClass('invertedClass', 'o-btn--inverted-', this.variant)]: this.inverted && this.variant },\r\n { [this.computedClass('expandedClass', 'o-btn--expanded')]: this.expanded },\r\n { [this.computedClass('roundedClass', 'o-btn--rounded')]: this.rounded },\r\n { [this.computedClass('disabledClass', 'o-btn--disabled')]: this.disabled },\r\n ];\r\n },\r\n labelClasses() {\r\n return [\r\n this.computedClass('labelClass', 'o-btn__label'),\r\n ];\r\n },\r\n iconClasses() {\r\n return [\r\n this.computedClass('iconClass', 'o-btn__icon'),\r\n ];\r\n },\r\n iconLeftClasses() {\r\n return [\r\n ...this.iconClasses,\r\n this.computedClass('iconLeftClass', 'o-btn__icon-left')\r\n ];\r\n },\r\n iconRightClasses() {\r\n return [\r\n ...this.iconClasses,\r\n this.computedClass('iconRightClass', 'o-btn__icon-right')\r\n ];\r\n },\r\n elementsWrapperClasses() {\r\n return [\r\n this.computedClass('elementsWrapperClass', 'o-btn__wrapper'),\r\n ];\r\n },\r\n computedTag() {\r\n if (typeof this.disabled !== 'undefined' && this.disabled !== false) {\r\n return 'button';\r\n }\r\n return this.tag;\r\n },\r\n computedNativeType() {\r\n if (this.tag === 'button' || this.tag === 'input') {\r\n return this.nativeType;\r\n }\r\n return null;\r\n },\r\n computedDisabled() {\r\n if (this.disabled)\r\n return true;\r\n return null;\r\n }\r\n }\r\n});\n\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n const _component_o_icon = resolveComponent(\"o-icon\");\n\n return openBlock(), createBlock(resolveDynamicComponent(_ctx.computedTag), mergeProps(_ctx.$attrs, {\n disabled: _ctx.computedDisabled,\n type: _ctx.computedNativeType,\n class: _ctx.rootClasses\n }), {\n default: withCtx(() => [createVNode(\"span\", {\n class: _ctx.elementsWrapperClasses\n }, [_ctx.iconLeft ? createVNode(_component_o_icon, {\n key: 0,\n pack: _ctx.iconPack,\n icon: _ctx.iconLeft,\n size: _ctx.size,\n both: _ctx.iconBoth,\n class: _ctx.iconLeftClasses\n }, null, 8\n /* PROPS */\n , [\"pack\", \"icon\", \"size\", \"both\", \"class\"]) : createCommentVNode(\"v-if\", true), _ctx.label || _ctx.$slots.default ? (openBlock(), createBlock(\"span\", {\n key: 1,\n class: _ctx.labelClasses\n }, [renderSlot(_ctx.$slots, \"default\", {}, () => [createTextVNode(toDisplayString(_ctx.label), 1\n /* TEXT */\n )])], 2\n /* CLASS */\n )) : createCommentVNode(\"v-if\", true), _ctx.iconRight ? createVNode(_component_o_icon, {\n key: 2,\n pack: _ctx.iconPack,\n icon: _ctx.iconRight,\n size: _ctx.size,\n both: _ctx.iconBoth,\n class: _ctx.iconRightClasses\n }, null, 8\n /* PROPS */\n , [\"pack\", \"icon\", \"size\", \"both\", \"class\"]) : createCommentVNode(\"v-if\", true)], 2\n /* CLASS */\n )]),\n _: 1\n }, 16\n /* FULL_PROPS */\n , [\"disabled\", \"type\", \"class\"]);\n}\n\nscript.render = render;\nscript.__file = \"src/components/button/Button.vue\";\n\nexport { script as s };\n","import 'vue';\nimport './helpers.mjs';\nimport './config.mjs';\nimport { b as registerComponent } from './plugins-ba5e2464.mjs';\nimport './Icon-a7b85e86.mjs';\nimport { s as script } from './Button-c75f7992.mjs';\nexport { s as OButton } from './Button-c75f7992.mjs';\n\nvar index = {\r\n install(app) {\r\n registerComponent(app, script);\r\n }\r\n};\n\nexport default index;\n","import { defineComponent } from 'vue';\nimport { hasFlag, defaultIfUndefined } from './helpers.mjs';\n\nconst items = 1;\r\nconst sorted = 3;\r\nconst Sorted = sorted;\r\nvar ProviderParentMixin = (itemName, flags = 0) => {\r\n const mixin = defineComponent({\r\n provide() {\r\n return {\r\n ['o' + itemName]: this\r\n };\r\n }\r\n });\r\n if (hasFlag(flags, items)) {\r\n mixin.data = function () {\r\n return {\r\n childItems: [],\r\n sequence: 1\r\n };\r\n };\r\n mixin.methods = {\r\n _registerItem(item) {\r\n item.index = this.childItems.length;\r\n this.childItems.push(item);\r\n if (this.$el) {\r\n this.$nextTick(() => {\r\n const ids = this.childItems.map(it => `[data-id=\"${itemName}-${it.newValue}\"]`).join(',');\r\n const sortedIds = Array.from(this.$el.querySelectorAll(ids)).map((el) => el.getAttribute('data-id').replace(`${itemName}-`, ''));\r\n this.childItems.forEach(it => it.index = sortedIds.indexOf(`${it.newValue}`));\r\n });\r\n }\r\n },\r\n _unregisterItem(item) {\r\n this.childItems = this.childItems.filter((i) => i !== item);\r\n },\r\n _nextSequence() {\r\n return this.sequence++;\r\n }\r\n };\r\n if (hasFlag(flags, sorted)) {\r\n mixin.computed = {\r\n /**\r\n * When items are added/removed sort them according to their position\r\n */\r\n sortedItems() {\r\n return this.childItems.slice().sort((i1, i2) => {\r\n return i1.index - i2.index;\r\n });\r\n }\r\n };\r\n }\r\n }\r\n return mixin;\r\n};\n\nconst sorted$1 = 1;\r\nconst optional = 2;\r\nconst Sorted$1 = sorted$1;\r\nvar InjectedChildMixin = (parentItemName, flags = 0) => {\r\n const mixin = defineComponent({\r\n inject: {\r\n parent: { from: 'o' + parentItemName }\r\n },\r\n created() {\r\n this.newValue = defaultIfUndefined(this.value, this.parent && this.parent._nextSequence());\r\n if (!this.parent) {\r\n if (!hasFlag(flags, optional)) {\r\n throw new Error('You should wrap ' + this.$options.name + ' in a ' + parentItemName);\r\n }\r\n }\r\n else {\r\n this.parent._registerItem(this);\r\n }\r\n },\r\n beforeUnmount() {\r\n if (this.parent) {\r\n this.parent._unregisterItem(this);\r\n }\r\n }\r\n });\r\n if (hasFlag(flags, sorted$1)) {\r\n mixin.data = () => {\r\n return {\r\n index: null\r\n };\r\n };\r\n }\r\n return mixin;\r\n};\n\nexport { InjectedChildMixin as I, ProviderParentMixin as P, Sorted as S, Sorted$1 as a };\n","import { defineComponent, resolveComponent, openBlock, createBlock, createVNode, renderSlot, Fragment, withDirectives, vShow, createCommentVNode, renderList } from 'vue';\nimport { getValueByPath, bound, mod, sign } from './helpers.mjs';\nimport { getOptions } from './config.mjs';\nimport { B as BaseComponentMixin, b as registerComponent } from './plugins-ba5e2464.mjs';\nimport { s as script$2 } from './Icon-a7b85e86.mjs';\nimport { P as ProviderParentMixin, S as Sorted, I as InjectedChildMixin, a as Sorted$1 } from './InjectedChildMixin-5282461d.mjs';\n\n/**\r\n * A Slideshow for cycling images in confined spaces\r\n * @displayName Carousel\r\n * @style _carousel.scss\r\n */\r\nvar script = defineComponent({\r\n name: 'OCarousel',\r\n components: {\r\n [script$2.name]: script$2\r\n },\r\n configField: 'carousel',\r\n mixins: [ProviderParentMixin('carousel', Sorted), BaseComponentMixin],\r\n emits: ['update:modelValue', 'scroll', 'click'],\r\n props: {\r\n modelValue: {\r\n type: Number,\r\n default: 0\r\n },\r\n interval: {\r\n type: Number,\r\n default: () => { return getValueByPath(getOptions(), 'carousel.interval', 3500); }\r\n },\r\n hasDrag: {\r\n type: Boolean,\r\n default: true\r\n },\r\n autoplay: {\r\n type: Boolean,\r\n default: false\r\n },\r\n pauseHover: {\r\n type: Boolean,\r\n default: false\r\n },\r\n repeat: {\r\n type: Boolean,\r\n default: false\r\n },\r\n indicator: {\r\n type: Boolean,\r\n default: true\r\n },\r\n indicatorInside: {\r\n type: Boolean,\r\n default: false\r\n },\r\n indicatorMode: {\r\n type: String,\r\n default: 'click'\r\n },\r\n indicatorPosition: {\r\n type: String,\r\n default: 'bottom'\r\n },\r\n indicatorStyle: {\r\n type: String,\r\n default: 'dots'\r\n },\r\n overlay: Boolean,\r\n itemsToShow: {\r\n type: Number,\r\n default: 1\r\n },\r\n itemsToList: {\r\n type: Number,\r\n default: 1\r\n },\r\n asIndicator: Boolean,\r\n arrow: {\r\n type: Boolean,\r\n default: true\r\n },\r\n arrowHover: {\r\n type: Boolean,\r\n default: true\r\n },\r\n iconPack: String,\r\n iconSize: String,\r\n iconPrev: {\r\n type: String,\r\n default: () => { return getValueByPath(getOptions(), 'carousel.iconPrev', 'chevron-left'); }\r\n },\r\n iconNext: {\r\n type: String,\r\n default: () => { return getValueByPath(getOptions(), 'carousel.iconNext', 'chevron-right'); }\r\n },\r\n breakpoints: {\r\n type: Object,\r\n default: () => ({})\r\n },\r\n rootClass: [String, Function, Array],\r\n overlayClass: [String, Function, Array],\r\n sceneClass: [String, Function, Array],\r\n itemsClass: [String, Function, Array],\r\n itemsDraggingClass: [String, Function, Array],\r\n arrowIconClass: [String, Function, Array],\r\n arrowIconPrevClass: [String, Function, Array],\r\n arrowIconNextClass: [String, Function, Array],\r\n indicatorsClass: [String, Function, Array],\r\n indicatorsInsideClass: [String, Function, Array],\r\n indicatorsInsidePositionClass: [String, Function, Array],\r\n indicatorItemClass: [String, Function, Array],\r\n indicatorItemActiveClass: [String, Function, Array],\r\n indicatorItemStyleClass: [String, Function, Array]\r\n },\r\n data() {\r\n return {\r\n activeIndex: this.modelValue,\r\n scrollIndex: this.modelValue,\r\n delta: 0,\r\n dragX: false,\r\n hold: 0,\r\n windowWidth: 0,\r\n touch: false,\r\n observer: null,\r\n refresh_: 0,\r\n itemsHovered: false,\r\n isPause: false,\r\n timer: null\r\n };\r\n },\r\n computed: {\r\n rootClasses() {\r\n return [\r\n this.computedClass('rootClass', 'o-car'),\r\n { [this.computedClass('overlayClass', 'o-car__overlay')]: this.overlay }\r\n ];\r\n },\r\n sceneClasses() {\r\n return [\r\n this.computedClass('sceneClass', 'o-car__scene')\r\n ];\r\n },\r\n itemsClasses() {\r\n return [\r\n this.computedClass('itemsClass', 'o-car__items'),\r\n { [this.computedClass('itemsDraggingClass', 'o-car__items--dragging')]: this.dragging },\r\n ];\r\n },\r\n arrowIconClasses() {\r\n return [\r\n this.computedClass('arrowIconClass', 'o-car__arrow__icon'),\r\n ];\r\n },\r\n arrowIconPrevClasses() {\r\n return [\r\n ...this.arrowIconClasses,\r\n this.computedClass('arrowIconPrevClass', 'o-car__arrow__icon-prev')\r\n ];\r\n },\r\n arrowIconNextClasses() {\r\n return [\r\n ...this.arrowIconClasses,\r\n this.computedClass('arrowIconNextClass', 'o-car__arrow__icon-next')\r\n ];\r\n },\r\n indicatorsClasses() {\r\n return [\r\n this.computedClass('indicatorsClass', 'o-car__indicators'),\r\n { [this.computedClass('indicatorsInsideClass', 'o-car__indicators--inside')]: this.indicatorInside },\r\n { [this.computedClass('indicatorsInsidePositionClass', 'o-car__indicators--inside--', this.indicatorPosition)]: this.indicatorInside && this.indicatorPosition }\r\n ];\r\n },\r\n indicatorClasses() {\r\n return [\r\n this.computedClass('indicatorClass', 'o-car__indicator')\r\n ];\r\n },\r\n dragging() {\r\n return this.dragX !== false;\r\n },\r\n itemStyle() {\r\n return `width: ${this.itemWidth}px;`;\r\n },\r\n translation() {\r\n return -bound(this.delta + (this.scrollIndex * this.itemWidth), 0, (this.childItems.length - this.settings.itemsToShow) * this.itemWidth);\r\n },\r\n total() {\r\n return this.childItems.length - this.settings.itemsToShow;\r\n },\r\n indicatorCount() {\r\n return Math.ceil(this.total / this.settings.itemsToList) + 1;\r\n },\r\n indicatorIndex() {\r\n return Math.ceil(this.scrollIndex / this.settings.itemsToList);\r\n },\r\n hasArrows() {\r\n return (this.settings.arrowHover && this.itemsHovered) || !this.settings.arrowHover;\r\n },\r\n hasPrev() {\r\n return (this.settings.repeat || this.scrollIndex > 0) && this.hasArrows;\r\n },\r\n hasNext() {\r\n return (this.settings.repeat || this.scrollIndex < this.total) && this.hasArrows;\r\n },\r\n breakpointKeys() {\r\n const keys = Object.keys(this.breakpoints).map(Number);\r\n return keys.sort((a, b) => b - a);\r\n },\r\n settings() {\r\n let breakpoint = this.breakpointKeys.filter((breakpoint) => {\r\n if (this.windowWidth >= breakpoint) {\r\n return true;\r\n }\r\n })[0];\r\n if (breakpoint) {\r\n return { ...this.$props, ...this.breakpoints[breakpoint] };\r\n }\r\n return this.$props;\r\n },\r\n itemWidth() {\r\n if (this.windowWidth) { // Ensure component is mounted\r\n /* eslint-disable-next-line */\r\n this.refresh_; // We force the computed property to refresh if this prop is changed\r\n const rect = this.$el.getBoundingClientRect();\r\n return rect.width / this.settings.itemsToShow;\r\n }\r\n return 0;\r\n }\r\n },\r\n watch: {\r\n /**\r\n * When v-model is changed set the new active item.\r\n */\r\n modelValue(value) {\r\n if (value <= this.childItems.length - 1) {\r\n this.activeIndex = value;\r\n this.switchTo(value * this.settings.itemsToList, true);\r\n }\r\n },\r\n /**\r\n * When autoplay is changed, start or pause timer accordingly\r\n */\r\n autoplay(status) {\r\n if (status) {\r\n this.startTimer();\r\n }\r\n else {\r\n this.pauseTimer();\r\n }\r\n },\r\n /**\r\n * Since the timer can get paused at the end, if repeat is changed we need to restart it\r\n */\r\n repeat(status) {\r\n if (status) {\r\n this.startTimer();\r\n }\r\n }\r\n },\r\n methods: {\r\n indicatorItemClasses(index) {\r\n return [\r\n this.computedClass('indicatorItemClass', 'o-car__indicator__item'),\r\n { [this.computedClass('indicatorItemActiveClass', 'o-car__indicator__item--active')]: this.indicatorIndex === index },\r\n { [this.computedClass('indicatorItemStyleClass', 'o-car__indicator__item--', this.indicatorStyle)]: this.indicatorStyle },\r\n ];\r\n },\r\n onMouseEnter() {\r\n this.itemsHovered = true;\r\n this.checkPause();\r\n },\r\n onMouseLeave() {\r\n this.itemsHovered = false;\r\n this.startTimer();\r\n },\r\n startTimer() {\r\n if (!this.autoplay || this.timer)\r\n return;\r\n this.isPause = false;\r\n this.timer = setInterval(() => {\r\n if (!this.repeat && this.activeIndex >= this.childItems.length - 1) {\r\n this.pauseTimer();\r\n }\r\n else {\r\n this.next();\r\n }\r\n }, this.interval);\r\n },\r\n pauseTimer() {\r\n this.isPause = true;\r\n if (this.timer) {\r\n clearInterval(this.timer);\r\n this.timer = null;\r\n }\r\n },\r\n restartTimer() {\r\n this.pauseTimer();\r\n this.startTimer();\r\n },\r\n checkPause() {\r\n if (this.pauseHover && this.autoplay) {\r\n this.pauseTimer();\r\n }\r\n },\r\n modeChange(trigger, value) {\r\n if (this.indicatorMode === trigger) {\r\n return this.switchTo(value * this.settings.itemsToList);\r\n }\r\n },\r\n resized() {\r\n this.windowWidth = window.innerWidth;\r\n },\r\n switchTo(newIndex, onlyMove = this.asIndicator) {\r\n if (this.settings.repeat) {\r\n newIndex = mod(newIndex, this.total + 1);\r\n }\r\n newIndex = bound(newIndex, 0, this.total);\r\n this.scrollIndex = newIndex;\r\n this.$emit('scroll', this.indicatorIndex);\r\n if (!onlyMove) {\r\n this.activeIndex = Math.ceil(newIndex / this.settings.itemsToList);\r\n if (this.modelValue !== this.activeIndex) {\r\n this.$emit('update:modelValue', this.activeIndex);\r\n }\r\n }\r\n },\r\n next() {\r\n this.switchTo(this.scrollIndex + this.settings.itemsToList);\r\n },\r\n prev() {\r\n this.switchTo(this.scrollIndex - this.settings.itemsToList);\r\n },\r\n // handle drag event\r\n dragStart(event) {\r\n if (this.dragging || !this.settings.hasDrag || (event.button !== 0 && event.type !== 'touchstart'))\r\n return;\r\n this.hold = Date.now();\r\n this.touch = !!event.touches;\r\n this.dragX = this.touch ? event.touches[0].clientX : event.clientX;\r\n if (this.touch) {\r\n this.pauseTimer();\r\n }\r\n window.addEventListener(this.touch ? 'touchmove' : 'mousemove', this.dragMove);\r\n window.addEventListener(this.touch ? 'touchend' : 'mouseup', this.dragEnd);\r\n },\r\n dragMove(event) {\r\n if (!this.dragging)\r\n return;\r\n const dragEndX = event.touches\r\n ? (event.changedTouches[0] || event.touches[0]).clientX : event.clientX;\r\n this.delta = this.dragX - dragEndX;\r\n if (!event.touches) {\r\n event.preventDefault();\r\n }\r\n },\r\n dragEnd(event) {\r\n if (!this.dragging && !this.hold)\r\n return;\r\n if (this.hold) {\r\n const signCheck = sign(this.delta);\r\n const results = Math.round(Math.abs(this.delta / this.itemWidth) + 0.15); // Hack\r\n this.switchTo(this.scrollIndex + signCheck * results);\r\n }\r\n this.delta = 0;\r\n this.dragX = false;\r\n if (event && event.touches) {\r\n this.startTimer();\r\n }\r\n window.removeEventListener(this.touch ? 'touchmove' : 'mousemove', this.dragMove);\r\n window.removeEventListener(this.touch ? 'touchend' : 'mouseup', this.dragEnd);\r\n },\r\n refresh() {\r\n this.$nextTick(() => {\r\n this.refresh_++;\r\n });\r\n }\r\n },\r\n mounted() {\r\n if (typeof window !== 'undefined') {\r\n if (window.ResizeObserver) {\r\n this.observer = new window.ResizeObserver(this.refresh);\r\n this.observer.observe(this.$el);\r\n }\r\n window.addEventListener('resize', this.resized);\r\n document.addEventListener('animationend', this.refresh);\r\n document.addEventListener('transitionend', this.refresh);\r\n document.addEventListener('transitionstart', this.refresh);\r\n this.resized();\r\n this.startTimer();\r\n }\r\n if (this.$attrs.config) {\r\n throw new Error('The config prop was removed, you need to use v-bind instead');\r\n }\r\n },\r\n beforeUnmount() {\r\n if (typeof window !== 'undefined') {\r\n if (window.ResizeObserver) {\r\n this.observer.disconnect();\r\n }\r\n window.removeEventListener('resize', this.resized);\r\n document.removeEventListener('animationend', this.refresh);\r\n document.removeEventListener('transitionend', this.refresh);\r\n document.removeEventListener('transitionstart', this.refresh);\r\n this.dragEnd();\r\n this.pauseTimer();\r\n }\r\n }\r\n});\n\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n const _component_o_icon = resolveComponent(\"o-icon\");\n\n return openBlock(), createBlock(\"div\", {\n class: _ctx.rootClasses,\n onMouseenter: _cache[3] || (_cache[3] = (...args) => _ctx.onMouseEnter(...args)),\n onMouseleave: _cache[4] || (_cache[4] = (...args) => _ctx.onMouseLeave(...args))\n }, [createVNode(\"div\", {\n class: _ctx.sceneClasses\n }, [createVNode(\"div\", {\n onMousedown: _cache[1] || (_cache[1] = (...args) => _ctx.dragStart(...args)),\n onTouchstart: _cache[2] || (_cache[2] = (...args) => _ctx.dragStart(...args)),\n class: _ctx.itemsClasses,\n style: 'transform:translateX(' + _ctx.translation + 'px)'\n }, [renderSlot(_ctx.$slots, \"default\")], 38\n /* CLASS, STYLE, HYDRATE_EVENTS */\n ), renderSlot(_ctx.$slots, \"arrow\", {\n hasPrev: _ctx.hasPrev,\n prev: _ctx.prev,\n hasNext: _ctx.hasNext,\n next: _ctx.next\n }, () => [_ctx.arrow ? (openBlock(), createBlock(Fragment, {\n key: 0\n }, [withDirectives(createVNode(_component_o_icon, {\n class: _ctx.arrowIconPrevClasses,\n onClick: _ctx.prev,\n pack: _ctx.iconPack,\n icon: _ctx.iconPrev,\n size: _ctx.iconSize,\n both: \"\"\n }, null, 8\n /* PROPS */\n , [\"class\", \"onClick\", \"pack\", \"icon\", \"size\"]), [[vShow, _ctx.hasPrev]]), withDirectives(createVNode(_component_o_icon, {\n class: _ctx.arrowIconNextClasses,\n onClick: _ctx.next,\n pack: _ctx.iconPack,\n icon: _ctx.iconNext,\n size: _ctx.iconSize,\n both: \"\"\n }, null, 8\n /* PROPS */\n , [\"class\", \"onClick\", \"pack\", \"icon\", \"size\"]), [[vShow, _ctx.hasNext]])], 64\n /* STABLE_FRAGMENT */\n )) : createCommentVNode(\"v-if\", true)])], 2\n /* CLASS */\n ), renderSlot(_ctx.$slots, \"indicators\", {\n active: _ctx.activeIndex,\n switchTo: _ctx.switchTo,\n indicatorIndex: _ctx.indicatorIndex\n }, () => [_ctx.childItems.length ? (openBlock(), createBlock(Fragment, {\n key: 0\n }, [_ctx.indicator && !_ctx.asIndicator ? (openBlock(), createBlock(\"div\", {\n key: 0,\n class: _ctx.indicatorsClasses\n }, [(openBlock(true), createBlock(Fragment, null, renderList(_ctx.indicatorCount, (_, index) => {\n return openBlock(), createBlock(\"a\", {\n class: _ctx.indicatorClasses,\n onMouseover: $event => _ctx.modeChange('hover', index),\n onClick: $event => _ctx.modeChange('click', index),\n key: index\n }, [renderSlot(_ctx.$slots, \"indicator\", {\n i: index\n }, () => [createVNode(\"span\", {\n class: _ctx.indicatorItemClasses(index)\n }, null, 2\n /* CLASS */\n )])], 42\n /* CLASS, PROPS, HYDRATE_EVENTS */\n , [\"onMouseover\", \"onClick\"]);\n }), 128\n /* KEYED_FRAGMENT */\n ))], 2\n /* CLASS */\n )) : createCommentVNode(\"v-if\", true)], 64\n /* STABLE_FRAGMENT */\n )) : createCommentVNode(\"v-if\", true)]), _ctx.overlay ? renderSlot(_ctx.$slots, \"overlay\", {\n key: 0\n }) : createCommentVNode(\"v-if\", true)], 34\n /* CLASS, HYDRATE_EVENTS */\n );\n}\n\nscript.render = render;\nscript.__file = \"src/components/carousel/Carousel.vue\";\n\n/**\r\n * @displayName Carousel Item\r\n */\r\nvar script$1 = defineComponent({\r\n name: 'OCarouselItem',\r\n configField: 'carousel',\r\n mixins: [InjectedChildMixin('carousel', Sorted$1), BaseComponentMixin],\r\n props: {\r\n itemClass: [String, Function, Array],\r\n itemActiveClass: [String, Function, Array]\r\n },\r\n computed: {\r\n itemClasses() {\r\n return [\r\n this.computedClass('itemClass', 'o-car__item'),\r\n { [this.computedClass('itemActiveClass', 'o-car__item--active')]: this.isActive }\r\n ];\r\n },\r\n itemStyle() {\r\n return `width: ${this.parent.itemWidth}px;`;\r\n },\r\n isActive() {\r\n return this.parent.activeIndex === this.index;\r\n }\r\n },\r\n methods: {\r\n onClick(event) {\r\n if (this.isActive) {\r\n this.parent.$emit('click', event);\r\n }\r\n if (this.parent.asIndicator) {\r\n this.parent.activeIndex = this.index;\r\n this.parent.$emit('update:modelValue', this.index);\r\n }\r\n }\r\n }\r\n});\n\nfunction render$1(_ctx, _cache, $props, $setup, $data, $options) {\n return openBlock(), createBlock(\"div\", {\n class: _ctx.itemClasses,\n onClick: _cache[1] || (_cache[1] = (...args) => _ctx.onClick(...args)),\n style: _ctx.itemStyle\n }, [renderSlot(_ctx.$slots, \"default\")], 6\n /* CLASS, STYLE */\n );\n}\n\nscript$1.render = render$1;\nscript$1.__file = \"src/components/carousel/CarouselItem.vue\";\n\nvar index = {\r\n install(app) {\r\n registerComponent(app, script);\r\n registerComponent(app, script$1);\r\n }\r\n};\n\nexport default index;\nexport { script as OCarousel, script$1 as OCarouselItem };\n","import { defineComponent } from 'vue';\n\nvar CheckRadioMixin = defineComponent({\r\n emits: ['update:modelValue'],\r\n props: {\r\n /** @model */\r\n modelValue: [String, Number, Boolean, Array],\r\n /**\r\n * Same as native value\r\n */\r\n nativeValue: [String, Number, Boolean, Array],\r\n /**\r\n * Color of the control, optional\r\n * @values primary, info, success, warning, danger, and any other custom color\r\n */\r\n variant: String,\r\n /**\r\n * Same as native disabled\r\n */\r\n disabled: Boolean,\r\n required: Boolean,\r\n /**\r\n * Same as native name\r\n */\r\n name: String,\r\n /**\r\n * Size of the control, optional\r\n * @values small, medium, large\r\n */\r\n size: String\r\n },\r\n data() {\r\n return {\r\n newValue: this.modelValue\r\n };\r\n },\r\n computed: {\r\n computedValue: {\r\n get() {\r\n return this.newValue;\r\n },\r\n set(value) {\r\n this.newValue = value;\r\n this.$emit('update:modelValue', this.newValue);\r\n }\r\n }\r\n },\r\n watch: {\r\n /**\r\n * When v-model change, set internal value.\r\n */\r\n modelValue(value) {\r\n this.newValue = value;\r\n }\r\n },\r\n methods: {\r\n focus() {\r\n // MacOS FireFox and Safari do not focus when clicked\r\n this.$refs.input.focus();\r\n }\r\n }\r\n});\n\nexport { CheckRadioMixin as C };\n","import { defineComponent, openBlock, createBlock, withModifiers, withKeys, withDirectives, createVNode, mergeProps, vModelCheckbox, renderSlot } from 'vue';\nimport { B as BaseComponentMixin } from './plugins-ba5e2464.mjs';\nimport { C as CheckRadioMixin } from './CheckRadioMixin-f5b57344.mjs';\n\n/**\r\n * Select a single or grouped options\r\n * @displayName Checkbox\r\n * @style _checkbox.scss\r\n */\r\nvar script = defineComponent({\r\n name: 'OCheckbox',\r\n mixins: [BaseComponentMixin, CheckRadioMixin],\r\n configField: 'checkbox',\r\n emits: [\r\n 'input'\r\n ],\r\n props: {\r\n /**\r\n * Same as native indeterminate\r\n */\r\n indeterminate: {\r\n type: Boolean,\r\n default: false\r\n },\r\n /**\r\n * Overrides the returned value when it's checked\r\n */\r\n trueValue: {\r\n type: [String, Number, Boolean],\r\n default: true\r\n },\r\n /**\r\n * Overrides the returned value when it's not checked\r\n */\r\n falseValue: {\r\n type: [String, Number, Boolean],\r\n default: false\r\n },\r\n /** Accessibility label to establish relationship between the checkbox and control label */\r\n ariaLabelledby: String,\r\n /* Same as native autocomplete */\r\n autocomplete: String,\r\n rootClass: [String, Function, Array],\r\n disabledClass: [String, Function, Array],\r\n checkClass: [String, Function, Array],\r\n checkCheckedClass: [String, Function, Array],\r\n checkIndeterminateClass: [String, Function, Array],\r\n labelClass: [String, Function, Array],\r\n sizeClass: [String, Function, Array],\r\n variantClass: [String, Function, Array]\r\n },\r\n watch: {\r\n indeterminate: {\r\n handler(val) {\r\n this.isIndeterminate = val;\r\n },\r\n immediate: true,\r\n },\r\n },\r\n computed: {\r\n isChecked() {\r\n return this.computedValue === this.trueValue\r\n || Array.isArray(this.computedValue) && this.computedValue.indexOf(this.nativeValue) !== -1;\r\n },\r\n rootClasses() {\r\n return [\r\n this.computedClass('rootClass', 'o-chk'),\r\n { [this.computedClass('checkedClass', 'o-chk--checked')]: this.isChecked },\r\n { [this.computedClass('sizeClass', 'o-chk--', this.size)]: this.size },\r\n { [this.computedClass('disabledClass', 'o-chk--disabled')]: this.disabled },\r\n { [this.computedClass('variantClass', 'o-chk--', this.variant)]: this.variant }\r\n ];\r\n },\r\n checkClasses() {\r\n return [\r\n this.computedClass('checkClass', 'o-chk__check'),\r\n { [this.computedClass('checkCheckedClass', 'o-chk__check--checked')]: this.isChecked },\r\n { [this.computedClass('checkIndeterminateClass', 'o-chk__check--indeterminate')]: this.isIndeterminate },\r\n ];\r\n },\r\n labelClasses() {\r\n return [\r\n this.computedClass('labelClass', 'o-chk__label')\r\n ];\r\n }\r\n }\r\n});\n\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n return openBlock(), createBlock(\"label\", {\n class: _ctx.rootClasses,\n ref: \"label\",\n onClick: _cache[3] || (_cache[3] = withModifiers((...args) => _ctx.focus(...args), [\"stop\"])),\n onKeydown: _cache[4] || (_cache[4] = withKeys(withModifiers($event => _ctx.$refs.label.click(), [\"prevent\"]), [\"enter\"]))\n }, [withDirectives(createVNode(\"input\", mergeProps({\n \"onUpdate:modelValue\": _cache[1] || (_cache[1] = $event => _ctx.computedValue = $event),\n type: \"checkbox\"\n }, _ctx.$attrs, {\n ref: \"input\",\n onClick: _cache[2] || (_cache[2] = withModifiers(() => {}, [\"stop\"])),\n class: _ctx.checkClasses,\n disabled: _ctx.disabled,\n required: _ctx.required,\n name: _ctx.name,\n autocomplete: _ctx.autocomplete,\n value: _ctx.nativeValue,\n indeterminate: _ctx.indeterminate,\n \"true-value\": _ctx.trueValue,\n \"false-value\": _ctx.falseValue,\n \"aria-labelledby\": _ctx.ariaLabelledby\n }), null, 16\n /* FULL_PROPS */\n , [\"disabled\", \"required\", \"name\", \"autocomplete\", \"value\", \"indeterminate\", \"true-value\", \"false-value\", \"aria-labelledby\"]), [[vModelCheckbox, _ctx.computedValue]]), createVNode(\"span\", {\n id: _ctx.ariaLabelledby,\n class: _ctx.labelClasses\n }, [renderSlot(_ctx.$slots, \"default\")], 10\n /* CLASS, PROPS */\n , [\"id\"])], 34\n /* CLASS, HYDRATE_EVENTS */\n );\n}\n\nscript.render = render;\nscript.__file = \"src/components/checkbox/Checkbox.vue\";\n\nexport { script as s };\n","import 'vue';\nimport './helpers.mjs';\nimport './config.mjs';\nimport { b as registerComponent } from './plugins-ba5e2464.mjs';\nimport './CheckRadioMixin-f5b57344.mjs';\nimport { s as script } from './Checkbox-8670724c.mjs';\nexport { s as OCheckbox } from './Checkbox-8670724c.mjs';\n\nvar index = {\r\n install(app) {\r\n registerComponent(app, script);\r\n }\r\n};\n\nexport default index;\n","import { defineComponent, h, Transition, withDirectives, vShow } from 'vue';\nimport { getValueByPath } from './helpers.mjs';\nimport { getOptions } from './config.mjs';\nimport { B as BaseComponentMixin, b as registerComponent } from './plugins-ba5e2464.mjs';\n\n/**\r\n * An easy way to toggle what you want\r\n * @displayName Collapse\r\n * @style _collapse.scss\r\n */\r\nvar script = defineComponent({\r\n name: 'OCollapse',\r\n mixins: [BaseComponentMixin],\r\n configField: 'collapse',\r\n emits: ['update:open', 'open', 'close'],\r\n props: {\r\n /**\r\n * Whether collapse is open or not, v-model:open to make it two-way binding\r\n */\r\n open: {\r\n type: Boolean,\r\n default: true\r\n },\r\n /**\r\n * Custom animation (transition name)\r\n */\r\n animation: {\r\n type: String,\r\n default: () => {\r\n return getValueByPath(getOptions(), 'collapse.animation', 'fade');\r\n }\r\n },\r\n ariaId: {\r\n type: String,\r\n default: ''\r\n },\r\n /**\r\n * Trigger position\r\n * @values top, bottom\r\n */\r\n position: {\r\n type: String,\r\n default: 'top',\r\n validator: (value) => {\r\n return [\r\n 'top',\r\n 'bottom'\r\n ].indexOf(value) > -1;\r\n }\r\n },\r\n rootClass: [String, Function, Array],\r\n triggerClass: [String, Function, Array],\r\n contentClass: [String, Function, Array]\r\n },\r\n data() {\r\n return {\r\n isOpen: this.open\r\n };\r\n },\r\n watch: {\r\n open(value) {\r\n this.isOpen = value;\r\n }\r\n },\r\n methods: {\r\n /**\r\n * Toggle and emit events\r\n */\r\n toggle() {\r\n this.isOpen = !this.isOpen;\r\n this.$emit('update:open', this.isOpen);\r\n this.$emit(this.isOpen ? 'open' : 'close');\r\n }\r\n },\r\n render() {\r\n const trigger = h('div', {\r\n class: this.computedClass('triggerClass', 'o-clps__trigger'),\r\n onClick: this.toggle\r\n }, this.$slots.trigger({ open: this.isOpen }));\r\n const content = h(Transition, { name: this.animation }, () => withDirectives(h('div', {\r\n class: this.computedClass('contentClass', 'o-clps__content'),\r\n 'id': this.ariaId\r\n }, this.$slots.default()), [[vShow, this.isOpen]]));\r\n return h('div', { class: this.computedClass('rootClass', 'o-clps') }, (this.position === 'top' ? [trigger, content] : [content, trigger]));\r\n }\r\n});\n\nscript.__file = \"src/components/collapse/Collapse.vue\";\n\nvar index = {\r\n install(app) {\r\n registerComponent(app, script);\r\n }\r\n};\n\nexport default index;\nexport { script as OCollapse };\n","import { defineComponent } from 'vue';\nimport { getValueByPath } from './helpers.mjs';\nimport { getOptions } from './config.mjs';\n\nvar MatchMediaMixin = defineComponent({\r\n props: {\r\n /**\r\n * Mobile breakpoint as max-width value\r\n */\r\n mobileBreakpoint: String\r\n },\r\n data() {\r\n return {\r\n matchMediaRef: undefined,\r\n isMatchMedia: undefined\r\n };\r\n },\r\n methods: {\r\n onMatchMedia(event) {\r\n this.isMatchMedia = event.matches;\r\n }\r\n },\r\n created() {\r\n if (typeof window !== 'undefined') {\r\n let width = this.mobileBreakpoint;\r\n if (!width) {\r\n const config = getOptions();\r\n const defaultWidth = getValueByPath(config, `mobileBreakpoint`, '1023px');\r\n width = getValueByPath(config, `${this.$options.configField}.mobileBreakpoint`, defaultWidth);\r\n }\r\n this.matchMediaRef = window.matchMedia(`(max-width: ${width})`);\r\n if (this.matchMediaRef) {\r\n this.isMatchMedia = this.matchMediaRef.matches;\r\n this.matchMediaRef.addListener(this.onMatchMedia, false);\r\n }\r\n else {\r\n this.isMatchMedia = false;\r\n }\r\n }\r\n },\r\n beforeUnmount() {\r\n if (typeof window !== 'undefined') {\r\n if (this.matchMediaRef) {\r\n this.matchMediaRef.removeListener(this.checkMatchMedia);\r\n }\r\n }\r\n }\r\n});\n\nexport { MatchMediaMixin as M };\n","const findFocusable = (element, programmatic = false) => {\r\n if (!element) {\r\n return null;\r\n }\r\n if (programmatic) {\r\n return element.querySelectorAll(`*[tabindex=\"-1\"]`);\r\n }\r\n return element.querySelectorAll(`a[href]:not([tabindex=\"-1\"]),\n area[href],\n input:not([disabled]),\n select:not([disabled]),\n textarea:not([disabled]),\n button:not([disabled]),\n iframe,\n object,\n embed,\n *[tabindex]:not([tabindex=\"-1\"]),\n *[contenteditable]`);\r\n};\r\nlet onKeyDown;\r\nconst bind = (el, { value = true }) => {\r\n if (value) {\r\n let focusable = findFocusable(el);\r\n let focusableProg = findFocusable(el, true);\r\n if (focusable && focusable.length > 0) {\r\n onKeyDown = (event) => {\r\n // Need to get focusable each time since it can change between key events\r\n // ex. changing month in a datepicker\r\n focusable = findFocusable(el);\r\n focusableProg = findFocusable(el, true);\r\n const firstFocusable = focusable[0];\r\n const lastFocusable = focusable[focusable.length - 1];\r\n if (event.target === firstFocusable && event.shiftKey && event.key === 'Tab') {\r\n event.preventDefault();\r\n lastFocusable.focus();\r\n }\r\n else if ((event.target === lastFocusable || Array.from(focusableProg).indexOf(event.target) >= 0) && !event.shiftKey && event.key === 'Tab') {\r\n event.preventDefault();\r\n firstFocusable.focus();\r\n }\r\n };\r\n el.addEventListener('keydown', onKeyDown);\r\n }\r\n }\r\n};\r\nconst unbind = (el) => {\r\n el.removeEventListener('keydown', onKeyDown);\r\n};\r\nconst directive = {\r\n beforeMount: bind,\r\n beforeUnmount: unbind,\r\n};\n\nexport { directive as d };\n","import { defineComponent, resolveDirective, openBlock, createBlock, withModifiers, renderSlot, createCommentVNode, createVNode, Transition, withCtx, withDirectives, vShow, resolveDynamicComponent } from 'vue';\nimport { getValueByPath, toCssDimension, createAbsoluteElement, removeElement } from './helpers.mjs';\nimport { getOptions } from './config.mjs';\nimport { B as BaseComponentMixin } from './plugins-ba5e2464.mjs';\nimport { M as MatchMediaMixin } from './MatchMediaMixin-09b141ca.mjs';\nimport { d as directive } from './trapFocus-dc03669f.mjs';\n\n/**\r\n * Dropdowns are very versatile, can used as a quick menu or even like a select for discoverable content\r\n * @displayName Dropdown\r\n * @requires ./DropdownItem.vue\r\n * @style _dropdown.scss\r\n */\r\nvar script = defineComponent({\r\n name: 'ODropdown',\r\n directives: {\r\n trapFocus: directive\r\n },\r\n configField: 'dropdown',\r\n mixins: [BaseComponentMixin, MatchMediaMixin],\r\n provide() {\r\n return {\r\n $dropdown: this\r\n };\r\n },\r\n emits: ['update:modelValue', 'active-change', 'change'],\r\n props: {\r\n /** @model */\r\n modelValue: {\r\n type: [String, Number, Boolean, Object, Array],\r\n default: null\r\n },\r\n /**\r\n * Dropdown disabled\r\n */\r\n disabled: Boolean,\r\n /**\r\n * Dropdown content (items) are shown inline, trigger is removed\r\n */\r\n inline: Boolean,\r\n /**\r\n * Dropdown content will be scrollable\r\n */\r\n scrollable: Boolean,\r\n /**\r\n * Max height of dropdown content\r\n */\r\n maxHeight: {\r\n type: [String, Number],\r\n default: () => {\r\n return getValueByPath(getOptions(), 'dropdown.maxHeight', 200);\r\n }\r\n },\r\n /**\r\n * Optional, position of the dropdown relative to the trigger\r\n * @values top-right, top-left, bottom-left\r\n */\r\n position: {\r\n type: String,\r\n validator: (value) => {\r\n return [\r\n 'top-right',\r\n 'top-left',\r\n 'bottom-left',\r\n 'bottom-right'\r\n ].indexOf(value) > -1;\r\n }\r\n },\r\n /**\r\n * Dropdown content (items) are shown into a modal on mobile\r\n */\r\n mobileModal: {\r\n type: Boolean,\r\n default: () => {\r\n return getValueByPath(getOptions(), 'dropdown.mobileModal', true);\r\n }\r\n },\r\n /**\r\n * Role attribute to be passed to list container for better accessibility. Use menu only in situations where your dropdown is related to navigation menus\r\n * @values list, menu, dialog\r\n */\r\n ariaRole: {\r\n type: String,\r\n validator: (value) => {\r\n return [\r\n 'menu',\r\n 'list',\r\n 'dialog'\r\n ].indexOf(value) > -1;\r\n },\r\n default: null\r\n },\r\n /**\r\n * Custom animation (transition name)\r\n */\r\n animation: {\r\n type: String,\r\n default: () => {\r\n return getValueByPath(getOptions(), 'dropdown.animation', 'fade');\r\n }\r\n },\r\n /**\r\n * Allows multiple selections\r\n */\r\n multiple: Boolean,\r\n /**\r\n * Trap focus inside the dropdown.\r\n */\r\n trapFocus: {\r\n type: Boolean,\r\n default: () => {\r\n return getValueByPath(getOptions(), 'dropdown.trapFocus', true);\r\n }\r\n },\r\n /**\r\n * Close dropdown when content is clicked\r\n */\r\n closeOnClick: {\r\n type: Boolean,\r\n default: true\r\n },\r\n /**\r\n * Can close dropdown by pressing escape or by clicking outside\r\n * @values escape, outside\r\n */\r\n canClose: {\r\n type: [Array, Boolean],\r\n default: true\r\n },\r\n /**\r\n * Dropdown will be expanded (full-width)\r\n */\r\n expanded: Boolean,\r\n /**\r\n * Dropdown will be triggered by any events\r\n * @values click, hover, contextmenu, focus\r\n */\r\n triggers: {\r\n type: Array,\r\n default: () => ['click']\r\n },\r\n /**\r\n * Dropdown menu tag name\r\n */\r\n menuTag: {\r\n type: String,\r\n default: () => {\r\n return getValueByPath(getOptions(), 'dropdown.menuTag', 'div');\r\n }\r\n },\r\n /**\r\n * Set the tabindex attribute on the dropdown trigger div (-1 to prevent selection via tab key)\r\n */\r\n triggerTabindex: {\r\n type: Number,\r\n default: 0\r\n },\r\n /**\r\n * Append dropdown content to body\r\n */\r\n appendToBody: Boolean,\r\n /**\r\n * @ignore\r\n */\r\n appendToBodyCopyParent: Boolean,\r\n rootClass: [String, Function, Array],\r\n triggerClass: [String, Function, Array],\r\n inlineClass: [String, Function, Array],\r\n menuMobileOverlayClass: [String, Function, Array],\r\n menuClass: [String, Function, Array],\r\n menuPositionClass: [String, Function, Array],\r\n menuActiveClass: [String, Function, Array],\r\n mobileClass: [String, Function, Array],\r\n disabledClass: [String, Function, Array],\r\n expandedClass: [String, Function, Array]\r\n },\r\n data() {\r\n return {\r\n selected: this.modelValue,\r\n isActive: false,\r\n isHoverable: false,\r\n bodyEl: undefined // Used to append to body\r\n };\r\n },\r\n computed: {\r\n rootClasses() {\r\n return [\r\n this.computedClass('rootClass', 'o-drop'),\r\n { [this.computedClass('disabledClass', 'o-drop--disabled')]: this.disabled },\r\n { [this.computedClass('expandedClass', 'o-drop--expanded')]: this.expanded },\r\n { [this.computedClass('inlineClass', 'o-drop--inline')]: this.inline },\r\n { [this.computedClass('mobileClass', 'o-drop--mobile')]: this.isMobileModal && this.isMatchMedia && !this.hoverable },\r\n ];\r\n },\r\n triggerClasses() {\r\n return [\r\n this.computedClass('triggerClass', 'o-drop__trigger')\r\n ];\r\n },\r\n menuMobileOverlayClasses() {\r\n return [\r\n this.computedClass('menuMobileOverlayClass', 'o-drop__overlay')\r\n ];\r\n },\r\n menuClasses() {\r\n return [\r\n this.computedClass('menuClass', 'o-drop__menu'),\r\n { [this.computedClass('menuPositionClass', 'o-drop__menu--', this.position)]: this.position },\r\n { [this.computedClass('menuActiveClass', 'o-drop__menu--active')]: (this.isActive || this.inline) }\r\n ];\r\n },\r\n isMobileModal() {\r\n return this.mobileModal && !this.inline;\r\n },\r\n cancelOptions() {\r\n return typeof this.canClose === 'boolean'\r\n ? this.canClose\r\n ? ['escape', 'outside']\r\n : []\r\n : this.canClose;\r\n },\r\n menuStyle() {\r\n return {\r\n maxHeight: this.scrollable ? toCssDimension(this.maxHeight) : null,\r\n overflow: this.scrollable ? 'auto' : null\r\n };\r\n },\r\n hoverable() {\r\n return this.triggers.indexOf('hover') >= 0;\r\n }\r\n },\r\n watch: {\r\n /**\r\n * When v-model is changed set the new selected item.\r\n */\r\n modelValue(value) {\r\n this.selected = value;\r\n },\r\n /**\r\n * Emit event when isActive value is changed.\r\n */\r\n isActive(value) {\r\n this.$emit('active-change', value);\r\n if (this.appendToBody) {\r\n this.$nextTick(() => {\r\n this.updateAppendToBody();\r\n });\r\n }\r\n }\r\n },\r\n methods: {\r\n /**\r\n * Click listener from DropdownItem.\r\n * 1. Set new selected item.\r\n * 2. Emit input event to update the user v-model.\r\n * 3. Close the dropdown.\r\n */\r\n selectItem(value) {\r\n if (this.multiple) {\r\n if (this.selected) {\r\n if (this.selected.indexOf(value) === -1) {\r\n // Add value\r\n this.selected = [...this.selected, value];\r\n }\r\n else {\r\n // Remove value\r\n this.selected = this.selected.filter((val) => val !== value);\r\n }\r\n }\r\n else {\r\n this.selected = [value];\r\n }\r\n this.$emit('change', this.selected);\r\n }\r\n else {\r\n if (this.selected !== value) {\r\n this.selected = value;\r\n this.$emit('change', this.selected);\r\n }\r\n }\r\n this.$emit('update:modelValue', this.selected);\r\n if (!this.multiple) {\r\n this.isActive = !this.closeOnClick;\r\n if (this.hoverable && this.closeOnClick) {\r\n this.isHoverable = false;\r\n }\r\n }\r\n },\r\n /**\r\n * White-listed items to not close when clicked.\r\n */\r\n isInWhiteList(el) {\r\n if (el === this.$refs.dropdownMenu)\r\n return true;\r\n if (el === this.$refs.trigger)\r\n return true;\r\n // All chidren from dropdown\r\n if (this.$refs.dropdownMenu !== undefined) {\r\n const children = this.$refs.dropdownMenu.querySelectorAll('*');\r\n for (const child of children) {\r\n if (el === child) {\r\n return true;\r\n }\r\n }\r\n }\r\n // All children from trigger\r\n if (this.$refs.trigger !== undefined) {\r\n const children = this.$refs.trigger.querySelectorAll('*');\r\n for (const child of children) {\r\n if (el === child) {\r\n return true;\r\n }\r\n }\r\n }\r\n return false;\r\n },\r\n /**\r\n * Close dropdown if clicked outside.\r\n */\r\n clickedOutside(event) {\r\n if (this.cancelOptions.indexOf('outside') < 0)\r\n return;\r\n if (this.inline)\r\n return;\r\n if (!this.isInWhiteList(event.target))\r\n this.isActive = false;\r\n },\r\n /**\r\n * Keypress event that is bound to the document\r\n */\r\n keyPress({ key }) {\r\n if (this.isActive && (key === 'Escape' || key === 'Esc')) {\r\n if (this.cancelOptions.indexOf('escape') < 0)\r\n return;\r\n this.isActive = false;\r\n }\r\n },\r\n onClick() {\r\n if (this.triggers.indexOf('click') < 0)\r\n return;\r\n this.toggle();\r\n },\r\n onContextMenu() {\r\n if (this.triggers.indexOf('contextmenu') < 0)\r\n return;\r\n this.toggle();\r\n },\r\n onHover() {\r\n if (this.triggers.indexOf('hover') < 0)\r\n return;\r\n this.isHoverable = true;\r\n },\r\n onFocus() {\r\n if (this.triggers.indexOf('focus') < 0)\r\n return;\r\n this.toggle();\r\n },\r\n /**\r\n * Toggle dropdown if it's not disabled.\r\n */\r\n toggle() {\r\n if (this.disabled)\r\n return;\r\n if (!this.isActive) {\r\n // if not active, toggle after clickOutside event\r\n // this fixes toggling programmatic\r\n this.$nextTick(() => {\r\n const value = !this.isActive;\r\n this.isActive = value;\r\n // Vue 2.6.x ???\r\n setTimeout(() => (this.isActive = value));\r\n });\r\n }\r\n else {\r\n this.isActive = !this.isActive;\r\n }\r\n },\r\n updateAppendToBody() {\r\n const dropdownMenu = this.$refs.dropdownMenu;\r\n const trigger = this.$refs.trigger;\r\n if (dropdownMenu && trigger) {\r\n // update wrapper dropdown\r\n const dropdown = this.$data.bodyEl.children[0];\r\n dropdown.classList.forEach((item) => dropdown.classList.remove(...item.split(' ')));\r\n this.rootClasses.forEach((item) => {\r\n if (item) {\r\n if (typeof item === 'object') {\r\n Object.keys(item).filter(key => key && item[key]).forEach(key => dropdown.classList.add(key));\r\n }\r\n else {\r\n dropdown.classList.add(...item.split(' '));\r\n }\r\n }\r\n });\r\n if (this.appendToBodyCopyParent) {\r\n const parentNode = this.$refs.dropdown.parentNode;\r\n const parent = this.$data.bodyEl;\r\n parent.classList.forEach((item) => parent.classList.remove(...item.split(' ')));\r\n parentNode.classList.forEach((item) => parent.classList.add(...item.split(' ')));\r\n }\r\n const rect = trigger.getBoundingClientRect();\r\n let top = rect.top + window.scrollY;\r\n let left = rect.left + window.scrollX;\r\n if (!this.position || this.position.indexOf('bottom') >= 0) {\r\n top += trigger.clientHeight;\r\n }\r\n else {\r\n top -= dropdownMenu.clientHeight;\r\n }\r\n if (this.position && this.position.indexOf('left') >= 0) {\r\n left -= (dropdownMenu.clientWidth - trigger.clientWidth);\r\n }\r\n dropdownMenu.style.position = 'absolute';\r\n dropdownMenu.style.top = `${top}px`;\r\n dropdownMenu.style.left = `${left}px`;\r\n dropdownMenu.style.zIndex = '9999';\r\n }\r\n }\r\n },\r\n mounted() {\r\n if (this.appendToBody) {\r\n this.$data.bodyEl = createAbsoluteElement(this.$refs.dropdownMenu);\r\n this.updateAppendToBody();\r\n }\r\n },\r\n created() {\r\n if (typeof window !== 'undefined') {\r\n document.addEventListener('click', this.clickedOutside);\r\n document.addEventListener('keyup', this.keyPress);\r\n }\r\n },\r\n beforeUnmount() {\r\n if (typeof window !== 'undefined') {\r\n document.removeEventListener('click', this.clickedOutside);\r\n document.removeEventListener('keyup', this.keyPress);\r\n }\r\n if (this.appendToBody) {\r\n removeElement(this.$data.bodyEl);\r\n }\r\n }\r\n});\n\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n const _directive_trap_focus = resolveDirective(\"trap-focus\");\n\n return openBlock(), createBlock(\"div\", {\n ref: \"dropdown\",\n class: _ctx.rootClasses,\n onMouseleave: _cache[5] || (_cache[5] = $event => _ctx.isHoverable = false)\n }, [!_ctx.inline ? (openBlock(), createBlock(\"div\", {\n key: 0,\n tabindex: _ctx.disabled ? null : _ctx.triggerTabindex,\n ref: \"trigger\",\n class: _ctx.triggerClasses,\n onClick: _cache[1] || (_cache[1] = (...args) => _ctx.onClick(...args)),\n onContextmenu: _cache[2] || (_cache[2] = withModifiers((...args) => _ctx.onContextMenu(...args), [\"prevent\"])),\n onMouseenter: _cache[3] || (_cache[3] = (...args) => _ctx.onHover(...args)),\n onFocusCapture: _cache[4] || (_cache[4] = (...args) => _ctx.onFocus(...args)),\n \"aria-haspopup\": \"true\"\n }, [renderSlot(_ctx.$slots, \"trigger\", {\n active: _ctx.isActive\n })], 42\n /* CLASS, PROPS, HYDRATE_EVENTS */\n , [\"tabindex\"])) : createCommentVNode(\"v-if\", true), createVNode(Transition, {\n name: _ctx.animation\n }, {\n default: withCtx(() => [_ctx.isMobileModal ? withDirectives((openBlock(), createBlock(\"div\", {\n key: 0,\n class: _ctx.menuMobileOverlayClasses,\n \"aria-hidden\": !_ctx.isActive\n }, null, 10\n /* CLASS, PROPS */\n , [\"aria-hidden\"])), [[vShow, _ctx.isActive]]) : createCommentVNode(\"v-if\", true)]),\n _: 1\n }, 8\n /* PROPS */\n , [\"name\"]), createVNode(Transition, {\n name: _ctx.animation\n }, {\n default: withCtx(() => [withDirectives(createVNode(\"div\", {\n ref: \"dropdownMenu\",\n is: _ctx.menuTag,\n class: _ctx.menuClasses,\n \"aria-hidden\": !_ctx.isActive,\n role: _ctx.ariaRole,\n \"aria-modal\": !_ctx.inline,\n style: _ctx.menuStyle\n }, [renderSlot(_ctx.$slots, \"default\")], 14\n /* CLASS, STYLE, PROPS */\n , [\"is\", \"aria-hidden\", \"role\", \"aria-modal\"]), [[vShow, !_ctx.disabled && (_ctx.isActive || _ctx.isHoverable) || _ctx.inline], [_directive_trap_focus, _ctx.trapFocus]])]),\n _: 3\n }, 8\n /* PROPS */\n , [\"name\"])], 34\n /* CLASS, HYDRATE_EVENTS */\n );\n}\n\nscript.render = render;\nscript.__file = \"src/components/dropdown/Dropdown.vue\";\n\n/**\r\n * @displayName Dropdown Item\r\n */\r\nvar script$1 = defineComponent({\r\n name: 'ODropdownItem',\r\n mixins: [BaseComponentMixin],\r\n configField: 'dropdown',\r\n inject: [\"$dropdown\"],\r\n emits: ['click'],\r\n props: {\r\n /**\r\n * The value that will be returned on events and v-model\r\n */\r\n value: {\r\n type: [String, Number, Boolean, Object, Array]\r\n },\r\n /**\r\n * Item is disabled\r\n */\r\n disabled: Boolean,\r\n /**\r\n * Item is clickable and emit an event\r\n */\r\n clickable: {\r\n type: Boolean,\r\n default: true\r\n },\r\n /**\r\n * Dropdown item tag name\r\n */\r\n tag: {\r\n type: String,\r\n default: () => {\r\n return getValueByPath(getOptions(), 'dropdown.itemTag', 'div');\r\n }\r\n },\r\n tabindex: {\r\n type: [Number, String],\r\n default: 0\r\n },\r\n ariaRole: {\r\n type: String,\r\n default: ''\r\n },\r\n itemClass: [String, Function, Array],\r\n itemActiveClass: [String, Function, Array],\r\n itemDisabledClass: [String, Function, Array],\r\n },\r\n computed: {\r\n parent() {\r\n return this.$dropdown;\r\n },\r\n rootClasses() {\r\n return [\r\n this.computedClass('itemClass', 'o-drop__item'),\r\n { [this.computedClass('itemDisabledClass', 'o-drop__item--disabled')]: (this.parent.disabled || this.disabled) },\r\n { [this.computedClass('itemActiveClass', 'o-drop__item--active')]: this.isActive }\r\n ];\r\n },\r\n ariaRoleItem() {\r\n return this.ariaRole === 'menuitem' || this.ariaRole === 'listitem' ? this.ariaRole : null;\r\n },\r\n isClickable() {\r\n return !this.parent.disabled && !this.disabled && this.clickable;\r\n },\r\n isActive() {\r\n if (this.parent.selected === null)\r\n return false;\r\n if (this.parent.multiple)\r\n return this.parent.selected.indexOf(this.value) >= 0;\r\n return this.value === this.parent.selected;\r\n }\r\n },\r\n methods: {\r\n /**\r\n * Click listener, select the item.\r\n */\r\n selectItem() {\r\n if (!this.isClickable)\r\n return;\r\n this.parent.selectItem(this.value);\r\n this.$emit('click');\r\n }\r\n },\r\n created() {\r\n if (!this.parent) {\r\n throw new Error('You should wrap oDropdownItem on a oDropdown');\r\n }\r\n }\r\n});\n\nfunction render$1(_ctx, _cache, $props, $setup, $data, $options) {\n return openBlock(), createBlock(resolveDynamicComponent(_ctx.tag), {\n class: _ctx.rootClasses,\n onClick: _ctx.selectItem,\n role: _ctx.ariaRoleItem,\n tabindex: _ctx.tabindex\n }, {\n default: withCtx(() => [renderSlot(_ctx.$slots, \"default\")]),\n _: 3\n }, 8\n /* PROPS */\n , [\"class\", \"onClick\", \"role\", \"tabindex\"]);\n}\n\nscript$1.render = render$1;\nscript$1.__file = \"src/components/dropdown/DropdownItem.vue\";\n\nexport { script$1 as a, script as s };\n","import { defineComponent, h, Comment, Text, resolveComponent, openBlock, createBlock, renderSlot, Fragment, createTextVNode, toDisplayString, createCommentVNode, createVNode, withCtx } from 'vue';\nimport { B as BaseComponentMixin } from './plugins-ba5e2464.mjs';\nimport { M as MatchMediaMixin } from './MatchMediaMixin-09b141ca.mjs';\n\nvar script = defineComponent({\r\n name: 'OFieldBody',\r\n inject: ['$field'],\r\n configField: 'field',\r\n computed: {\r\n parent() {\r\n return this.$field;\r\n }\r\n },\r\n render() {\r\n let first = true;\r\n const slot = this.$slots.default();\r\n const children = slot.length === 1 && Array.isArray(slot[0].children) ? slot[0].children : slot;\r\n return h('div', { class: this.parent.bodyHorizontalClasses }, children.map((element) => {\r\n let message;\r\n if (element.type === Comment || element.type === Text) {\r\n return element;\r\n }\r\n if (first) {\r\n message = this.parent.newMessage;\r\n first = false;\r\n }\r\n // @ts-ignore (Why props null ??)\r\n return h(resolveComponent('OField'), { variant: this.parent.newVariant, message }, () => [element]);\r\n }));\r\n }\r\n});\n\nscript.__file = \"src/components/field/FieldBody.vue\";\n\n/**\r\n * Fields are used to add functionality to controls and to attach/group components and elements together\r\n * @displayName Field\r\n * @style _field.scss\r\n */\r\nvar script$1 = defineComponent({\r\n name: 'OField',\r\n components: {\r\n [script.name]: script\r\n },\r\n configField: 'field',\r\n mixins: [BaseComponentMixin, MatchMediaMixin],\r\n provide() {\r\n return {\r\n $field: this\r\n };\r\n },\r\n inject: {\r\n $field: { from: '$field', default: false }\r\n },\r\n props: {\r\n /**\r\n * \tColor of the field and help message, also adds a matching icon, optional. Used by Input, Select and Autocomplete\r\n * @values primary, info, success, warning, danger, and any other custom color\r\n */\r\n variant: String,\r\n /**\r\n * Field label\r\n */\r\n label: String,\r\n /**\r\n * Same as native for set on the label\r\n */\r\n labelFor: String,\r\n /**\r\n * Help message text\r\n */\r\n message: String,\r\n /**\r\n * Direct child components/elements of Field will be grouped horizontally (see which ones at the top of the page)\r\n */\r\n grouped: Boolean,\r\n /**\r\n * Allow controls to fill up multiple lines, making it responsive\r\n */\r\n groupMultiline: Boolean,\r\n /**\r\n * Group label and control on the same line for horizontal forms\r\n */\r\n horizontal: Boolean,\r\n /**\r\n * Field automatically attach controls together\r\n */\r\n addons: {\r\n type: Boolean,\r\n default: true\r\n },\r\n /**\r\n * Vertical size of input, optional\r\n * @values small, medium, large\r\n */\r\n labelSize: String,\r\n rootClass: [String, Function, Array],\r\n horizontalClass: [String, Function, Array],\r\n groupedClass: [String, Function, Array],\r\n groupMultilineClass: [String, Function, Array],\r\n labelClass: [String, Function, Array],\r\n labelSizeClass: [String, Function, Array],\r\n labelHorizontalClass: [String, Function, Array],\r\n bodyClass: [String, Function, Array],\r\n bodyHorizontalClass: [String, Function, Array],\r\n addonsClass: [String, Function, Array],\r\n messageClass: [String, Function, Array],\r\n variantMessageClass: [String, Function, Array],\r\n variantLabelClass: [String, Function, Array],\r\n mobileClass: [String, Function, Array],\r\n focusedClass: [String, Function, Array],\r\n filledClass: [String, Function, Array]\r\n },\r\n data() {\r\n return {\r\n newVariant: this.variant,\r\n newMessage: this.message,\r\n isFocused: false,\r\n isFilled: false\r\n };\r\n },\r\n computed: {\r\n rootClasses() {\r\n return [\r\n this.computedClass('rootClass', 'o-field'),\r\n { [this.computedClass('horizontalClass', 'o-field--horizontal')]: this.horizontal },\r\n { [this.computedClass('mobileClass', 'o-field--mobile')]: this.isMatchMedia },\r\n { [this.computedClass('focusedClass', 'o-field--focused')]: this.isFocused },\r\n { [this.computedClass('filledClass', 'o-field--filled')]: this.isFilled }\r\n ];\r\n },\r\n messageClasses() {\r\n return [\r\n this.computedClass('messageClass', 'o-field__message'),\r\n { [this.computedClass('variantMessageClass', 'o-field__message-', this.newVariant)]: this.newVariant }\r\n ];\r\n },\r\n labelClasses() {\r\n return [\r\n this.computedClass('labelClass', 'o-field__label'),\r\n { [this.computedClass('labelSizeClass', 'o-field__label-', this.labelSize)]: this.labelSize },\r\n { [this.computedClass('variantLabelClass', 'o-field__label-', this.newVariant)]: this.newVariant }\r\n ];\r\n },\r\n labelHorizontalClasses() {\r\n return [\r\n this.computedClass('labelHorizontalClass', 'o-field__horizontal-label')\r\n ];\r\n },\r\n bodyClasses() {\r\n return [\r\n this.computedClass('bodyClass', 'o-field__body')\r\n ];\r\n },\r\n bodyHorizontalClasses() {\r\n return [\r\n this.computedClass('bodyHorizontalClass', 'o-field__horizontal-body')\r\n ];\r\n },\r\n innerFieldClasses() {\r\n return [\r\n this.computedClass('rootClass', 'o-field'),\r\n { [this.computedClass('groupMultilineClass', 'o-field--grouped-multiline')]: this.groupMultiline },\r\n { [this.computedClass('groupedClass', 'o-field--grouped')]: this.grouped },\r\n { [this.computedClass('addonsClass', 'o-field--addons')]: !this.grouped && this.hasAddons() },\r\n ];\r\n },\r\n parent() {\r\n return this.$field;\r\n },\r\n hasLabelSlot() {\r\n return this.$slots.label;\r\n },\r\n hasMessageSlot() {\r\n return this.$slots.message;\r\n },\r\n hasLabel() {\r\n return this.label || this.hasLabelSlot;\r\n },\r\n hasMessage() {\r\n return ((!this.parent || !this.parent.hasInnerField) && this.newMessage) || this.hasMessageSlot;\r\n },\r\n hasInnerField() {\r\n return this.grouped || this.groupMultiline || this.hasAddons();\r\n }\r\n },\r\n watch: {\r\n /**\r\n * Set internal variant when prop change.\r\n */\r\n variant(value) {\r\n this.newVariant = value;\r\n },\r\n /**\r\n * Set internal message when prop change.\r\n */\r\n message(value) {\r\n this.newMessage = value;\r\n },\r\n /**\r\n * Set parent message if we use Field in Field.\r\n */\r\n newMessage(value) {\r\n if (this.parent && this.parent.hasInnerField) {\r\n if (!this.parent.variant) {\r\n this.parent.newVariant = this.newVariant;\r\n }\r\n if (!this.parent.message) {\r\n this.parent.newMessage = value;\r\n }\r\n }\r\n }\r\n },\r\n methods: {\r\n hasAddons() {\r\n let renderedNode = 0;\r\n const slot = this.$slots.default();\r\n if (slot) {\r\n const children = slot.length === 1 && Array.isArray(slot[0].children) ? slot[0].children : slot;\r\n renderedNode = children.reduce((i, node) => node ? i + 1 : i, 0);\r\n }\r\n return renderedNode > 1 && this.addons && !this.horizontal;\r\n }\r\n }\r\n});\n\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n const _component_o_field_body = resolveComponent(\"o-field-body\");\n\n return openBlock(), createBlock(\"div\", {\n class: _ctx.rootClasses\n }, [_ctx.horizontal ? (openBlock(), createBlock(\"div\", {\n key: 0,\n class: _ctx.labelHorizontalClasses\n }, [_ctx.hasLabel ? (openBlock(), createBlock(\"label\", {\n key: 0,\n for: _ctx.labelFor,\n class: _ctx.labelClasses\n }, [_ctx.hasLabelSlot ? renderSlot(_ctx.$slots, \"label\", {\n key: 0\n }) : (openBlock(), createBlock(Fragment, {\n key: 1\n }, [createTextVNode(toDisplayString(_ctx.label), 1\n /* TEXT */\n )], 64\n /* STABLE_FRAGMENT */\n ))], 10\n /* CLASS, PROPS */\n , [\"for\"])) : createCommentVNode(\"v-if\", true)], 2\n /* CLASS */\n )) : (openBlock(), createBlock(Fragment, {\n key: 1\n }, [_ctx.hasLabel ? (openBlock(), createBlock(\"label\", {\n key: 0,\n for: _ctx.labelFor,\n class: _ctx.labelClasses\n }, [_ctx.hasLabelSlot ? renderSlot(_ctx.$slots, \"label\", {\n key: 0\n }) : (openBlock(), createBlock(Fragment, {\n key: 1\n }, [createTextVNode(toDisplayString(_ctx.label), 1\n /* TEXT */\n )], 64\n /* STABLE_FRAGMENT */\n ))], 10\n /* CLASS, PROPS */\n , [\"for\"])) : createCommentVNode(\"v-if\", true)], 64\n /* STABLE_FRAGMENT */\n )), _ctx.horizontal ? createVNode(_component_o_field_body, {\n key: 2\n }, {\n default: withCtx(() => [renderSlot(_ctx.$slots, \"default\")]),\n _: 3\n }) : _ctx.hasInnerField ? (openBlock(), createBlock(\"div\", {\n key: 3,\n class: _ctx.bodyClasses\n }, [createVNode(\"div\", {\n class: _ctx.innerFieldClasses\n }, [renderSlot(_ctx.$slots, \"default\")], 2\n /* CLASS */\n )], 2\n /* CLASS */\n )) : renderSlot(_ctx.$slots, \"default\", {\n key: 4\n }), _ctx.hasMessage && !_ctx.horizontal ? (openBlock(), createBlock(\"p\", {\n key: 5,\n class: _ctx.messageClasses\n }, [_ctx.hasMessageSlot ? renderSlot(_ctx.$slots, \"message\", {\n key: 0\n }) : (openBlock(), createBlock(Fragment, {\n key: 1\n }, [createTextVNode(toDisplayString(_ctx.newMessage), 1\n /* TEXT */\n )], 64\n /* STABLE_FRAGMENT */\n ))], 2\n /* CLASS */\n )) : createCommentVNode(\"v-if\", true)], 2\n /* CLASS */\n );\n}\n\nscript$1.render = render;\nscript$1.__file = \"src/components/field/Field.vue\";\n\nexport { script$1 as s };\n","import { defineComponent, resolveComponent, openBlock, createBlock, withDirectives, createVNode, mergeProps, Fragment, toDisplayString, createCommentVNode, renderSlot, vModelSelect } from 'vue';\nimport { getValueByPath } from './helpers.mjs';\nimport { getOptions } from './config.mjs';\nimport { B as BaseComponentMixin } from './plugins-ba5e2464.mjs';\nimport { s as script$1 } from './Icon-a7b85e86.mjs';\nimport { F as FormElementMixin } from './FormElementMixin-29581863.mjs';\n\n/**\r\n * Select an item in a dropdown list. Use with Field to access all functionalities\r\n * @displayName Select\r\n * @style _select.scss\r\n */\r\nvar script = defineComponent({\r\n name: 'OSelect',\r\n components: {\r\n [script$1.name]: script$1\r\n },\r\n mixins: [BaseComponentMixin, FormElementMixin],\r\n configField: 'select',\r\n inheritAttrs: false,\r\n emits: ['update:modelValue', 'focus', 'blur'],\r\n props: {\r\n /** @model */\r\n modelValue: {\r\n type: [String, Number, Boolean, Object, Array],\r\n default: null\r\n },\r\n /**\r\n * Vertical size of input, optional\r\n * @values small, medium, large\r\n */\r\n size: String,\r\n /**\r\n * Color of the control, optional\r\n * @values primary, info, success, warning, danger, and any other custom color\r\n */\r\n variant: String,\r\n /**\r\n * Icon pack to use\r\n * @values mdi, fa, fas and any other custom icon pack\r\n */\r\n iconPack: {\r\n type: String,\r\n default: () => { return getValueByPath(getOptions(), 'select.iconPack', undefined); }\r\n },\r\n /**\r\n * \tIcon name to be added on the right side\r\n */\r\n iconRight: {\r\n type: String,\r\n default: () => { return getValueByPath(getOptions(), 'select.iconRight', undefined); }\r\n },\r\n /** Text when nothing is selected */\r\n placeholder: String,\r\n multiple: Boolean,\r\n /** Same as native size */\r\n nativeSize: [String, Number],\r\n rootClass: [String, Function, Array],\r\n selectClass: [String, Function, Array],\r\n iconLeftSpaceClass: [String, Function, Array],\r\n iconRightSpaceClass: [String, Function, Array],\r\n roundedClass: [String, Function, Array],\r\n multipleClass: [String, Function, Array],\r\n expandedClass: [String, Function, Array],\r\n iconLeftClass: [String, Function, Array],\r\n iconRightClass: [String, Function, Array],\r\n sizeClass: [String, Function, Array],\r\n variantClass: [String, Function, Array],\r\n placeholderClass: [String, Function, Array],\r\n arrowClass: [String, Function, Array]\r\n },\r\n data() {\r\n return {\r\n selected: this.modelValue\r\n };\r\n },\r\n computed: {\r\n rootClasses() {\r\n return [\r\n this.computedClass('rootClass', 'o-ctrl-sel'),\r\n { [this.computedClass('expandedClass', 'o-ctrl-sel--expanded')]: this.expanded },\r\n ];\r\n },\r\n selectClasses() {\r\n return [\r\n this.computedClass('selectClass', 'o-sel'),\r\n { [this.computedClass('roundedClass', 'o-sel--rounded')]: this.rounded },\r\n { [this.computedClass('multipleClass', 'o-sel--multiple')]: this.multiple },\r\n { [this.computedClass('sizeClass', 'o-sel--', this.size)]: this.size },\r\n { [this.computedClass('variantClass', 'o-sel--', (this.statusVariant || this.variant))]: (this.statusVariant || this.variant) },\r\n { [this.computedClass('iconLeftSpaceClass', 'o-sel-iconspace-left')]: this.icon },\r\n { [this.computedClass('iconRightSpaceClass', 'o-sel-iconspace-right')]: this.iconRight },\r\n { [this.computedClass('placeholderClass', 'o-sel--placeholder')]: this.placeholderVisible },\r\n { [this.computedClass('arrowClass', 'o-sel-arrow')]: !this.iconRight && !this.multiple }\r\n ];\r\n },\r\n iconLeftClasses() {\r\n return [\r\n this.computedClass('iconLeftClass', 'o-sel__icon-left')\r\n ];\r\n },\r\n iconRightClasses() {\r\n return [\r\n this.computedClass('iconRightClass', 'o-sel__icon-right')\r\n ];\r\n },\r\n placeholderVisible() {\r\n return this.computedValue === null;\r\n },\r\n computedValue: {\r\n get() {\r\n return this.selected;\r\n },\r\n set(value) {\r\n this.selected = value;\r\n this.$emit('update:modelValue', value);\r\n this.syncFilled(this.selected);\r\n !this.isValid && this.checkHtml5Validity();\r\n }\r\n },\r\n $elementRef() {\r\n return 'select';\r\n }\r\n },\r\n watch: {\r\n /**\r\n * When v-model is changed:\r\n * 1. Set the selected option.\r\n * 2. If it's invalid, validate again.\r\n */\r\n modelValue(value) {\r\n this.selected = value;\r\n this.syncFilled(this.selected);\r\n !this.isValid && this.checkHtml5Validity();\r\n }\r\n }\r\n});\n\nconst _hoisted_1 = {\n key: 0,\n value: null,\n disabled: \"\",\n hidden: \"\"\n};\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n const _component_o_icon = resolveComponent(\"o-icon\");\n\n return openBlock(), createBlock(\"div\", {\n class: _ctx.rootClasses\n }, [withDirectives(createVNode(\"select\", mergeProps(_ctx.$attrs, {\n \"onUpdate:modelValue\": _cache[1] || (_cache[1] = $event => _ctx.computedValue = $event),\n class: _ctx.selectClasses,\n ref: \"select\",\n autocomplete: _ctx.autocomplete,\n multiple: _ctx.multiple,\n size: _ctx.nativeSize,\n onBlur: _cache[2] || (_cache[2] = (...args) => _ctx.onBlur(...args)),\n onFocus: _cache[3] || (_cache[3] = (...args) => _ctx.onFocus(...args))\n }), [_ctx.placeholder ? (openBlock(), createBlock(Fragment, {\n key: 0\n }, [_ctx.placeholderVisible ? (openBlock(), createBlock(\"option\", _hoisted_1, toDisplayString(_ctx.placeholder), 1\n /* TEXT */\n )) : createCommentVNode(\"v-if\", true)], 64\n /* STABLE_FRAGMENT */\n )) : createCommentVNode(\"v-if\", true), renderSlot(_ctx.$slots, \"default\")], 16\n /* FULL_PROPS */\n , [\"autocomplete\", \"multiple\", \"size\"]), [[vModelSelect, _ctx.computedValue]]), _ctx.icon ? createVNode(_component_o_icon, {\n key: 0,\n class: _ctx.iconLeftClasses,\n icon: _ctx.icon,\n pack: _ctx.iconPack,\n size: _ctx.size\n }, null, 8\n /* PROPS */\n , [\"class\", \"icon\", \"pack\", \"size\"]) : createCommentVNode(\"v-if\", true), _ctx.iconRight && !_ctx.multiple ? createVNode(_component_o_icon, {\n key: 1,\n class: _ctx.iconRightClasses,\n icon: _ctx.iconRight,\n pack: _ctx.iconPack,\n size: _ctx.size\n }, null, 8\n /* PROPS */\n , [\"class\", \"icon\", \"pack\", \"size\"]) : createCommentVNode(\"v-if\", true)], 2\n /* CLASS */\n );\n}\n\nscript.render = render;\nscript.__file = \"src/components/select/Select.vue\";\n\nexport { script as s };\n","import { defineComponent, openBlock, createBlock, withModifiers, createVNode, toDisplayString, createCommentVNode, Fragment, renderList, resolveComponent, createTextVNode, mergeProps, createSlots, withCtx, renderSlot, withDirectives, withKeys, vShow } from 'vue';\nimport { isDefined, getValueByPath, getMonthNames, getWeekdayNames, isMobile, matchWithGroups } from './helpers.mjs';\nimport { getOptions } from './config.mjs';\nimport { B as BaseComponentMixin } from './plugins-ba5e2464.mjs';\nimport { s as script$7 } from './Icon-a7b85e86.mjs';\nimport { F as FormElementMixin } from './FormElementMixin-29581863.mjs';\nimport { s as script$5 } from './Input-19e906a1.mjs';\nimport { M as MatchMediaMixin } from './MatchMediaMixin-09b141ca.mjs';\nimport { s as script$8, a as script$9 } from './DropdownItem-c744c4e9.mjs';\nimport { s as script$4 } from './Field-937b4591.mjs';\nimport { s as script$6 } from './Select-2cca695f.mjs';\n\nvar script = defineComponent({\r\n name: 'ODatepickerTableRow',\r\n mixins: [BaseComponentMixin],\r\n configField: 'datepicker',\r\n inject: {\r\n $datepicker: { from: '$datepicker', default: false }\r\n },\r\n emits: ['select', 'rangeHoverEndDate', 'change-focus'],\r\n props: {\r\n selectedDate: {\r\n type: [Date, Array]\r\n },\r\n hoveredDateRange: Array,\r\n day: {\r\n type: Number\r\n },\r\n week: {\r\n type: Array,\r\n required: true\r\n },\r\n month: {\r\n type: Number,\r\n required: true\r\n },\r\n showWeekNumber: Boolean,\r\n minDate: Date,\r\n maxDate: Date,\r\n disabled: Boolean,\r\n unselectableDates: Array,\r\n unselectableDaysOfWeek: Array,\r\n selectableDates: Array,\r\n events: Array,\r\n indicators: String,\r\n dateCreator: Function,\r\n nearbyMonthDays: Boolean,\r\n nearbySelectableMonthDays: Boolean,\r\n weekNumberClickable: Boolean,\r\n range: Boolean,\r\n multiple: Boolean,\r\n rulesForFirstWeek: Number,\r\n firstDayOfWeek: Number,\r\n tableRowClass: [String, Function, Array],\r\n tableCellClass: [String, Function, Array],\r\n tableCellSelectedClass: [String, Function, Array],\r\n tableCellFirstSelectedClass: [String, Function, Array],\r\n tableCellWithinSelectedClass: [String, Function, Array],\r\n tableCellLastSelectedClass: [String, Function, Array],\r\n tableCellFirstHoveredClass: [String, Function, Array],\r\n tableCellInvisibleClass: [String, Function, Array],\r\n tableCellWithinHoveredClass: [String, Function, Array],\r\n tableCellLastHoveredClass: [String, Function, Array],\r\n tableCellTodayClass: [String, Function, Array],\r\n tableCellSelectableClass: [String, Function, Array],\r\n tableCellUnselectableClass: [String, Function, Array],\r\n tableCellNearbyClass: [String, Function, Array],\r\n tableCellEventsClass: [String, Function, Array],\r\n tableEventClass: [String, Function, Array],\r\n tableEventIndicatorsClass: [String, Function, Array],\r\n tableEventsClass: [String, Function, Array],\r\n tableEventVariantClass: [String, Function, Array],\r\n },\r\n computed: {\r\n tableRowClasses() {\r\n return [\r\n this.computedClass('tableRowClass', 'o-dpck__table__row'),\r\n ];\r\n },\r\n tableCellClasses() {\r\n return [\r\n this.computedClass('tableCellClass', 'o-dpck__table__cell'),\r\n ];\r\n },\r\n tableEventsClasses() {\r\n return [\r\n this.computedClass('tableEventsClass', 'o-dpck__table__events'),\r\n ];\r\n },\r\n hasEvents() {\r\n return this.events && this.events.length;\r\n }\r\n },\r\n watch: {\r\n day(day) {\r\n const refName = `day-${this.month}-${day}`;\r\n this.$nextTick(() => {\r\n if (this.$refs[refName] && this.$refs[refName].length > 0) {\r\n if (this.$refs[refName][0]) {\r\n this.$refs[refName][0].focus();\r\n }\r\n }\r\n }); // $nextTick needed when month is changed\r\n }\r\n },\r\n methods: {\r\n firstWeekOffset(year, dow, doy) {\r\n // first-week day -- which january is always in the first week (4 for iso, 1 for other)\r\n const fwd = 7 + dow - doy;\r\n // first-week day local weekday -- which local weekday is fwd\r\n const firstJanuary = new Date(year, 0, fwd);\r\n const fwdlw = (7 + firstJanuary.getDay() - dow) % 7;\r\n return -fwdlw + fwd - 1;\r\n },\r\n daysInYear(year) {\r\n return this.isLeapYear(year) ? 366 : 365;\r\n },\r\n isLeapYear(year) {\r\n return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0;\r\n },\r\n getSetDayOfYear(input) {\r\n return Math.round((input.getTime() - new Date(input.getFullYear(), 0, 1).getTime()) / 864e5) + 1;\r\n },\r\n weeksInYear(year, dow, doy) {\r\n const weekOffset = this.firstWeekOffset(year, dow, doy);\r\n const weekOffsetNext = this.firstWeekOffset(year + 1, dow, doy);\r\n return (this.daysInYear(year) - weekOffset + weekOffsetNext) / 7;\r\n },\r\n getWeekNumber(mom) {\r\n const dow = this.firstDayOfWeek; // first day of week\r\n // Rules for the first week : 1 for the 1st January, 4 for the 4th January\r\n const doy = this.rulesForFirstWeek;\r\n const weekOffset = this.firstWeekOffset(mom.getFullYear(), dow, doy);\r\n const week = Math.floor((this.getSetDayOfYear(mom) - weekOffset - 1) / 7) + 1;\r\n let resWeek;\r\n let resYear;\r\n if (week < 1) {\r\n resYear = mom.getFullYear() - 1;\r\n resWeek = week + this.weeksInYear(resYear, dow, doy);\r\n }\r\n else if (week > this.weeksInYear(mom.getFullYear(), dow, doy)) {\r\n resWeek = week - this.weeksInYear(mom.getFullYear(), dow, doy);\r\n resYear = mom.getFullYear() + 1;\r\n }\r\n else {\r\n resYear = mom.getFullYear();\r\n resWeek = week;\r\n }\r\n return resWeek;\r\n },\r\n clickWeekNumber(week) {\r\n if (this.weekNumberClickable) {\r\n this.$datepicker.$emit('week-number-click', week);\r\n }\r\n },\r\n /*\r\n * Check that selected day is within earliest/latest params and\r\n * is within this month\r\n */\r\n selectableDate(day) {\r\n const validity = [];\r\n if (this.minDate) {\r\n validity.push(day >= this.minDate);\r\n }\r\n if (this.maxDate) {\r\n validity.push(day <= this.maxDate);\r\n }\r\n if (this.nearbyMonthDays && !this.nearbySelectableMonthDays) {\r\n validity.push(day.getMonth() === this.month);\r\n }\r\n if (this.selectableDates) {\r\n for (let i = 0; i < this.selectableDates.length; i++) {\r\n const enabledDate = this.selectableDates[i];\r\n if (day.getDate() === enabledDate.getDate() &&\r\n day.getFullYear() === enabledDate.getFullYear() &&\r\n day.getMonth() === enabledDate.getMonth()) {\r\n return true;\r\n }\r\n else {\r\n validity.push(false);\r\n }\r\n }\r\n }\r\n if (this.unselectableDates) {\r\n for (let i = 0; i < this.unselectableDates.length; i++) {\r\n const disabledDate = this.unselectableDates[i];\r\n validity.push(day.getDate() !== disabledDate.getDate() ||\r\n day.getFullYear() !== disabledDate.getFullYear() ||\r\n day.getMonth() !== disabledDate.getMonth());\r\n }\r\n }\r\n if (this.unselectableDaysOfWeek) {\r\n for (let i = 0; i < this.unselectableDaysOfWeek.length; i++) {\r\n const dayOfWeek = this.unselectableDaysOfWeek[i];\r\n validity.push(day.getDay() !== dayOfWeek);\r\n }\r\n }\r\n return validity.indexOf(false) < 0;\r\n },\r\n /*\r\n * Emit select event with chosen date as payload\r\n */\r\n emitChosenDate(day) {\r\n if (this.disabled)\r\n return;\r\n if (this.selectableDate(day)) {\r\n this.$emit('select', day);\r\n }\r\n },\r\n eventsDateMatch(day) {\r\n if (!this.events || !this.events.length)\r\n return false;\r\n const dayEvents = [];\r\n for (let i = 0; i < this.events.length; i++) {\r\n if (this.events[i].date.getDay() === day.getDay()) {\r\n dayEvents.push(this.events[i]);\r\n }\r\n }\r\n if (!dayEvents.length) {\r\n return false;\r\n }\r\n return dayEvents;\r\n },\r\n /*\r\n * Build cellClasses for cell using validations\r\n */\r\n cellClasses(day) {\r\n function dateMatch(dateOne, dateTwo, multiple = false) {\r\n // if either date is null or undefined, return false\r\n // if using multiple flag, return false\r\n if (!dateOne || !dateTwo || multiple) {\r\n return false;\r\n }\r\n if (Array.isArray(dateTwo)) {\r\n return dateTwo.some((date) => (dateOne.getDate() === date.getDate() &&\r\n dateOne.getFullYear() === date.getFullYear() &&\r\n dateOne.getMonth() === date.getMonth()));\r\n }\r\n return (dateOne.getDate() === dateTwo.getDate() &&\r\n dateOne.getFullYear() === dateTwo.getFullYear() &&\r\n dateOne.getMonth() === dateTwo.getMonth());\r\n }\r\n function dateWithin(dateOne, dates, multiple = false) {\r\n if (!Array.isArray(dates) || multiple) {\r\n return false;\r\n }\r\n return dateOne > dates[0] && dateOne < dates[1];\r\n }\r\n return [\r\n ...this.tableCellClasses,\r\n {\r\n [this.computedClass('tableCellSelectedClass', 'o-dpck__table__cell--selected')]: dateMatch(day, this.selectedDate) || dateWithin(day, this.selectedDate, this.multiple)\r\n },\r\n {\r\n [this.computedClass('tableCellFirstSelectedClass', 'o-dpck__table__cell--first-selected')]: dateMatch(day, Array.isArray(this.selectedDate) && this.selectedDate[0], this.multiple),\r\n },\r\n {\r\n [this.computedClass('tableCellWithinSelectedClass', 'o-dpck__table__cell--within-selected')]: dateWithin(day, this.selectedDate, this.multiple)\r\n },\r\n {\r\n [this.computedClass('tableCellLastSelectedClass', 'o-dpck__table__cell--last-selected')]: dateMatch(day, Array.isArray(this.selectedDate) && this.selectedDate[1], this.multiple),\r\n },\r\n {\r\n [this.computedClass('tableCellFirstHoveredClass', 'o-dpck__table__cell--first-hovered')]: dateMatch(day, Array.isArray(this.hoveredDateRange) && this.hoveredDateRange[0]),\r\n },\r\n {\r\n [this.computedClass('tableCellWithinHoveredClass', 'o-dpck__table__cell--within-hovered')]: dateWithin(day, this.hoveredDateRange)\r\n },\r\n {\r\n [this.computedClass('tableCellLastHoveredClass', 'o-dpck__table__cell--last-hovered')]: dateMatch(day, Array.isArray(this.hoveredDateRange) && this.hoveredDateRange[1])\r\n },\r\n {\r\n [this.computedClass('tableCellTodayClass', 'o-dpck__table__cell--today')]: dateMatch(day, this.dateCreator())\r\n },\r\n {\r\n [this.computedClass('tableCellSelectableClass', 'o-dpck__table__cell--selectable')]: this.selectableDate(day) && !this.disabled\r\n },\r\n {\r\n [this.computedClass('tableCellUnselectableClass', 'o-dpck__table__cell--unselectable')]: !this.selectableDate(day) || this.disabled\r\n },\r\n {\r\n [this.computedClass('tableCellInvisibleClass', 'o-dpck__table__cell--invisible')]: !this.nearbyMonthDays && day.getMonth() !== this.month\r\n },\r\n {\r\n [this.computedClass('tableCellNearbyClass', 'o-dpck__table__cell--nearby')]: this.nearbySelectableMonthDays && day.getMonth() !== this.month\r\n },\r\n {\r\n [this.computedClass('tableCellEventsClass', 'o-dpck__table__cell--events')]: this.hasEvents\r\n },\r\n {\r\n [this.computedClass('tableCellTodayClass', 'o-dpck__table__cell--today')]: dateMatch(day, this.dateCreator())\r\n }\r\n ];\r\n },\r\n eventClasses(event) {\r\n return [\r\n this.computedClass('tableEventClass', 'o-dpck__table__event'),\r\n { [this.computedClass('tableEventVariantClass', 'o-dpck__table__event--', event.type)]: event.type },\r\n { [this.computedClass('tableEventIndicatorsClass', 'o-dpck__table__event--', this.indicators)]: this.indicators }\r\n ];\r\n },\r\n setRangeHoverEndDate(day) {\r\n if (this.range) {\r\n this.$emit('rangeHoverEndDate', day);\r\n }\r\n },\r\n manageKeydown(event, weekDay) {\r\n // https://developer.mozilla.org/fr/docs/Web/API/KeyboardEvent/key/Key_Values#Navigation_keys\r\n const { key } = event;\r\n let preventDefault = true;\r\n switch (key) {\r\n case 'Tab': {\r\n preventDefault = false;\r\n break;\r\n }\r\n case ' ':\r\n case 'Space':\r\n case 'Spacebar':\r\n case 'Enter': {\r\n this.emitChosenDate(weekDay);\r\n break;\r\n }\r\n case 'ArrowLeft':\r\n case 'Left': {\r\n this.changeFocus(weekDay, -1);\r\n break;\r\n }\r\n case 'ArrowRight':\r\n case 'Right': {\r\n this.changeFocus(weekDay, 1);\r\n break;\r\n }\r\n case 'ArrowUp':\r\n case 'Up': {\r\n this.changeFocus(weekDay, -7);\r\n break;\r\n }\r\n case 'ArrowDown':\r\n case 'Down': {\r\n this.changeFocus(weekDay, 7);\r\n break;\r\n }\r\n }\r\n if (preventDefault) {\r\n event.preventDefault();\r\n }\r\n },\r\n changeFocus(day, inc) {\r\n const nextDay = new Date(day.getTime());\r\n nextDay.setDate(day.getDate() + inc);\r\n while ((!this.minDate || nextDay > this.minDate) &&\r\n (!this.maxDate || nextDay < this.maxDate) &&\r\n !this.selectableDate(nextDay)) {\r\n nextDay.setDate(day.getDate() + Math.sign(inc));\r\n }\r\n this.setRangeHoverEndDate(nextDay);\r\n this.$emit('change-focus', nextDay);\r\n }\r\n }\r\n});\n\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n return openBlock(), createBlock(\"div\", {\n class: _ctx.tableRowClasses\n }, [_ctx.showWeekNumber ? (openBlock(), createBlock(\"a\", {\n key: 0,\n class: _ctx.tableCellClasses,\n style: {\n 'cursor: pointer': _ctx.weekNumberClickable\n },\n onClick: _cache[1] || (_cache[1] = withModifiers($event => _ctx.clickWeekNumber(_ctx.getWeekNumber(_ctx.week[6])), [\"prevent\"]))\n }, [createVNode(\"span\", null, toDisplayString(_ctx.getWeekNumber(_ctx.week[6])), 1\n /* TEXT */\n )], 6\n /* CLASS, STYLE */\n )) : createCommentVNode(\"v-if\", true), (openBlock(true), createBlock(Fragment, null, renderList(_ctx.week, (weekDay, index) => {\n return openBlock(), createBlock(Fragment, {\n key: index\n }, [_ctx.selectableDate(weekDay) && !_ctx.disabled ? (openBlock(), createBlock(\"a\", {\n key: 0,\n ref: `day-${weekDay.getMonth()}-${weekDay.getDate()}`,\n class: _ctx.cellClasses(weekDay),\n role: \"button\",\n href: \"#\",\n disabled: _ctx.disabled,\n onClick: withModifiers($event => _ctx.emitChosenDate(weekDay), [\"prevent\"]),\n onMouseenter: $event => _ctx.setRangeHoverEndDate(weekDay),\n onKeydown: $event => _ctx.manageKeydown($event, weekDay),\n tabindex: _ctx.day === weekDay.getDate() && _ctx.month === weekDay.getMonth() ? null : -1\n }, [createVNode(\"span\", null, toDisplayString(weekDay.getDate()), 1\n /* TEXT */\n ), _ctx.eventsDateMatch(weekDay) ? (openBlock(), createBlock(\"div\", {\n key: 0,\n class: _ctx.tableEventsClasses\n }, [(openBlock(true), createBlock(Fragment, null, renderList(_ctx.eventsDateMatch(weekDay), (event, index) => {\n return openBlock(), createBlock(\"div\", {\n class: _ctx.eventClasses(event),\n key: index\n }, null, 2\n /* CLASS */\n );\n }), 128\n /* KEYED_FRAGMENT */\n ))], 2\n /* CLASS */\n )) : createCommentVNode(\"v-if\", true)], 42\n /* CLASS, PROPS, HYDRATE_EVENTS */\n , [\"disabled\", \"onClick\", \"onMouseenter\", \"onKeydown\", \"tabindex\"])) : (openBlock(), createBlock(\"div\", {\n key: index,\n class: _ctx.cellClasses(weekDay)\n }, [createVNode(\"span\", null, toDisplayString(weekDay.getDate()), 1\n /* TEXT */\n )], 2\n /* CLASS */\n ))], 64\n /* STABLE_FRAGMENT */\n );\n }), 128\n /* KEYED_FRAGMENT */\n ))], 2\n /* CLASS */\n );\n}\n\nscript.render = render;\nscript.__file = \"src/components/datepicker/DatepickerTableRow.vue\";\n\nvar script$1 = defineComponent({\r\n name: 'ODatepickerTable',\r\n mixins: [BaseComponentMixin],\r\n configField: 'datepicker',\r\n components: {\r\n [script.name]: script\r\n },\r\n emits: ['update:modelValue', 'range-start', 'range-end', 'update:focused'],\r\n props: {\r\n modelValue: {\r\n type: [Date, Array]\r\n },\r\n dayNames: Array,\r\n monthNames: Array,\r\n firstDayOfWeek: Number,\r\n events: Array,\r\n indicators: String,\r\n minDate: Date,\r\n maxDate: Date,\r\n focused: Object,\r\n disabled: Boolean,\r\n dateCreator: Function,\r\n unselectableDates: Array,\r\n unselectableDaysOfWeek: Array,\r\n selectableDates: Array,\r\n nearbyMonthDays: Boolean,\r\n nearbySelectableMonthDays: Boolean,\r\n showWeekNumber: Boolean,\r\n weekNumberClickable: Boolean,\r\n rulesForFirstWeek: Number,\r\n range: Boolean,\r\n multiple: Boolean,\r\n tableClass: [String, Function, Array],\r\n tableHeadClass: [String, Function, Array],\r\n tableHeadCellClass: [String, Function, Array],\r\n tableBodyClass: [String, Function, Array],\r\n tableRowClass: [String, Function, Array],\r\n tableCellClass: [String, Function, Array],\r\n tableCellSelectedClass: [String, Function, Array],\r\n tableCellFirstSelectedClass: [String, Function, Array],\r\n tableCellInvisibleClass: [String, Function, Array],\r\n tableCellWithinSelectedClass: [String, Function, Array],\r\n tableCellLastSelectedClass: [String, Function, Array],\r\n tableCellFirstHoveredClass: [String, Function, Array],\r\n tableCellWithinHoveredClass: [String, Function, Array],\r\n tableCellLastHoveredClass: [String, Function, Array],\r\n tableCellTodayClass: [String, Function, Array],\r\n tableCellSelectableClass: [String, Function, Array],\r\n tableCellUnselectableClass: [String, Function, Array],\r\n tableCellNearbyClass: [String, Function, Array],\r\n tableCellEventsClass: [String, Function, Array],\r\n tableEventClass: [String, Function, Array],\r\n tableEventIndicatorsClass: [String, Function, Array],\r\n tableEventsClass: [String, Function, Array],\r\n tableEventVariantClass: [String, Function, Array],\r\n },\r\n data() {\r\n return {\r\n selectedBeginDate: undefined,\r\n selectedEndDate: undefined,\r\n hoveredEndDate: undefined\r\n };\r\n },\r\n computed: {\r\n tableClasses() {\r\n return [\r\n this.computedClass('tableClass', 'o-dpck__table')\r\n ];\r\n },\r\n tableHeadClasses() {\r\n return [\r\n this.computedClass('tableHeadClass', 'o-dpck__table__head')\r\n ];\r\n },\r\n tableHeadCellClasses() {\r\n return [\r\n this.computedClass('tableHeadCellClass', 'o-dpck__table__head-cell'),\r\n ...this.tableCellClasses\r\n ];\r\n },\r\n tableBodyClasses() {\r\n return [\r\n this.computedClass('tableBodyClass', 'o-dpck__table__body')\r\n ];\r\n },\r\n tableCellClasses() {\r\n return [\r\n this.computedClass('tableCellClass', 'o-dpck__table__cell'),\r\n ];\r\n },\r\n visibleDayNames() {\r\n const visibleDayNames = [];\r\n let index = this.firstDayOfWeek;\r\n while (visibleDayNames.length < this.dayNames.length) {\r\n const currentDayName = this.dayNames[(index % this.dayNames.length)];\r\n visibleDayNames.push(currentDayName);\r\n index++;\r\n }\r\n if (this.showWeekNumber)\r\n visibleDayNames.unshift('');\r\n return visibleDayNames;\r\n },\r\n /*\r\n * Return array of all events in the specified month\r\n */\r\n eventsInThisMonth() {\r\n if (!this.events)\r\n return [];\r\n const monthEvents = [];\r\n for (let i = 0; i < this.events.length; i++) {\r\n let event = this.events[i];\r\n if (!Object.prototype.hasOwnProperty.call(event, 'date')) {\r\n event = { date: event };\r\n }\r\n if (event.date.getMonth() === this.focused.month &&\r\n event.date.getFullYear() === this.focused.year) {\r\n monthEvents.push(event);\r\n }\r\n }\r\n return monthEvents;\r\n },\r\n /*\r\n * Return array of all weeks in the specified month\r\n */\r\n weeksInThisMonth() {\r\n this.validateFocusedDay();\r\n const month = this.focused.month;\r\n const year = this.focused.year;\r\n const weeksInThisMonth = [];\r\n let startingDay = 1;\r\n while (weeksInThisMonth.length < 6) {\r\n const newWeek = this.weekBuilder(startingDay, month, year);\r\n weeksInThisMonth.push(newWeek);\r\n startingDay += 7;\r\n }\r\n return weeksInThisMonth;\r\n },\r\n hoveredDateRange() {\r\n if (!this.range) {\r\n return [];\r\n }\r\n if (!isNaN(this.selectedEndDate)) {\r\n return [];\r\n }\r\n if (this.hoveredEndDate < this.selectedBeginDate) {\r\n return [this.hoveredEndDate, this.selectedBeginDate].filter(d => d !== undefined);\r\n }\r\n return [this.selectedBeginDate, this.hoveredEndDate].filter(d => d !== undefined);\r\n }\r\n },\r\n methods: {\r\n /*\r\n * Emit input event with selected date as payload for v-model in parent\r\n */\r\n updateSelectedDate(date) {\r\n if (!this.range && !this.multiple) {\r\n this.$emit('update:modelValue', date);\r\n }\r\n else if (this.range) {\r\n this.handleSelectRangeDate(date);\r\n }\r\n else if (this.multiple) {\r\n this.handleSelectMultipleDates(date);\r\n }\r\n },\r\n /*\r\n * If both begin and end dates are set, reset the end date and set the begin date.\r\n * If only begin date is selected, emit an array of the begin date and the new date.\r\n * If not set, only set the begin date.\r\n */\r\n handleSelectRangeDate(date) {\r\n if (this.selectedBeginDate && this.selectedEndDate) {\r\n this.selectedBeginDate = date;\r\n this.selectedEndDate = undefined;\r\n this.$emit('range-start', date);\r\n }\r\n else if (this.selectedBeginDate && !this.selectedEndDate) {\r\n if (this.selectedBeginDate > date) {\r\n this.selectedEndDate = this.selectedBeginDate;\r\n this.selectedBeginDate = date;\r\n }\r\n else {\r\n this.selectedEndDate = date;\r\n }\r\n this.$emit('range-end', date);\r\n this.$emit('update:modelValue', [this.selectedBeginDate, this.selectedEndDate]);\r\n }\r\n else {\r\n this.selectedBeginDate = date;\r\n this.$emit('range-start', date);\r\n }\r\n },\r\n /*\r\n * If selected date already exists list of selected dates, remove it from the list\r\n * Otherwise, add date to list of selected dates\r\n */\r\n handleSelectMultipleDates(date) {\r\n let multipleSelectedDates = this.modelValue;\r\n const multipleSelect = multipleSelectedDates.filter((selectedDate) => selectedDate.getDate() === date.getDate() &&\r\n selectedDate.getFullYear() === date.getFullYear() &&\r\n selectedDate.getMonth() === date.getMonth());\r\n if (multipleSelect.length) {\r\n multipleSelectedDates = multipleSelectedDates.filter((selectedDate) => selectedDate.getDate() !== date.getDate() ||\r\n selectedDate.getFullYear() !== date.getFullYear() ||\r\n selectedDate.getMonth() !== date.getMonth());\r\n }\r\n else {\r\n multipleSelectedDates = [...multipleSelectedDates, date];\r\n }\r\n this.$emit('update:modelValue', multipleSelectedDates);\r\n },\r\n /*\r\n * Return array of all days in the week that the startingDate is within\r\n */\r\n weekBuilder(startingDate, month, year) {\r\n const thisMonth = new Date(year, month);\r\n const thisWeek = [];\r\n const dayOfWeek = new Date(year, month, startingDate).getDay();\r\n const end = dayOfWeek >= this.firstDayOfWeek\r\n ? (dayOfWeek - this.firstDayOfWeek)\r\n : ((7 - this.firstDayOfWeek) + dayOfWeek);\r\n let daysAgo = 1;\r\n for (let i = 0; i < end; i++) {\r\n thisWeek.unshift(new Date(thisMonth.getFullYear(), thisMonth.getMonth(), startingDate - daysAgo));\r\n daysAgo++;\r\n }\r\n thisWeek.push(new Date(year, month, startingDate));\r\n let daysForward = 1;\r\n while (thisWeek.length < 7) {\r\n thisWeek.push(new Date(year, month, startingDate + daysForward));\r\n daysForward++;\r\n }\r\n return thisWeek;\r\n },\r\n validateFocusedDay() {\r\n const focusedDate = new Date(this.focused.year, this.focused.month, this.focused.day);\r\n if (this.selectableDate(focusedDate))\r\n return;\r\n let day = 0;\r\n // Number of days in the current month\r\n const monthDays = new Date(this.focused.year, this.focused.month + 1, 0).getDate();\r\n let firstFocusable = null;\r\n while (!firstFocusable && ++day < monthDays) {\r\n const date = new Date(this.focused.year, this.focused.month, day);\r\n if (this.selectableDate(date)) {\r\n firstFocusable = focusedDate;\r\n const focused = {\r\n day: date.getDate(),\r\n month: date.getMonth(),\r\n year: date.getFullYear()\r\n };\r\n this.$emit('update:focused', focused);\r\n }\r\n }\r\n },\r\n /*\r\n * Check that selected day is within earliest/latest params and\r\n * is within this month\r\n */\r\n selectableDate(day) {\r\n const validity = [];\r\n if (this.minDate) {\r\n validity.push(day >= this.minDate);\r\n }\r\n if (this.maxDate) {\r\n validity.push(day <= this.maxDate);\r\n }\r\n if (this.nearbyMonthDays && !this.nearbySelectableMonthDays) {\r\n validity.push(day.getMonth() === this.focused.month);\r\n }\r\n if (this.selectableDates) {\r\n for (let i = 0; i < this.selectableDates.length; i++) {\r\n const enabledDate = this.selectableDates[i];\r\n if (day.getDate() === enabledDate.getDate() &&\r\n day.getFullYear() === enabledDate.getFullYear() &&\r\n day.getMonth() === enabledDate.getMonth()) {\r\n return true;\r\n }\r\n else {\r\n validity.push(false);\r\n }\r\n }\r\n }\r\n if (this.unselectableDates) {\r\n for (let i = 0; i < this.unselectableDates.length; i++) {\r\n const disabledDate = this.unselectableDates[i];\r\n validity.push(day.getDate() !== disabledDate.getDate() ||\r\n day.getFullYear() !== disabledDate.getFullYear() ||\r\n day.getMonth() !== disabledDate.getMonth());\r\n }\r\n }\r\n if (this.unselectableDaysOfWeek) {\r\n for (let i = 0; i < this.unselectableDaysOfWeek.length; i++) {\r\n const dayOfWeek = this.unselectableDaysOfWeek[i];\r\n validity.push(day.getDay() !== dayOfWeek);\r\n }\r\n }\r\n return validity.indexOf(false) < 0;\r\n },\r\n eventsInThisWeek(week) {\r\n return this.eventsInThisMonth.filter((event) => {\r\n const stripped = new Date(Date.parse(event.date));\r\n stripped.setHours(0, 0, 0, 0);\r\n const timed = stripped.getTime();\r\n return week.some((weekDate) => weekDate.getTime() === timed);\r\n });\r\n },\r\n setRangeHoverEndDate(day) {\r\n this.hoveredEndDate = day;\r\n },\r\n changeFocus(day) {\r\n const focused = {\r\n day: day.getDate(),\r\n month: day.getMonth(),\r\n year: day.getFullYear()\r\n };\r\n this.$emit('update:focused', focused);\r\n }\r\n }\r\n});\n\nfunction render$1(_ctx, _cache, $props, $setup, $data, $options) {\n const _component_o_datepicker_table_row = resolveComponent(\"o-datepicker-table-row\");\n\n return openBlock(), createBlock(\"section\", {\n class: _ctx.tableClasses\n }, [createVNode(\"header\", {\n class: _ctx.tableHeadClasses\n }, [(openBlock(true), createBlock(Fragment, null, renderList(_ctx.visibleDayNames, (day, index) => {\n return openBlock(), createBlock(\"div\", {\n key: index,\n class: _ctx.tableHeadCellClasses\n }, [createVNode(\"span\", null, toDisplayString(day), 1\n /* TEXT */\n )], 2\n /* CLASS */\n );\n }), 128\n /* KEYED_FRAGMENT */\n ))], 2\n /* CLASS */\n ), createVNode(\"div\", {\n class: _ctx.tableBodyClasses\n }, [(openBlock(true), createBlock(Fragment, null, renderList(_ctx.weeksInThisMonth, (week, index) => {\n return openBlock(), createBlock(_component_o_datepicker_table_row, {\n key: index,\n \"selected-date\": _ctx.modelValue,\n day: _ctx.focused.day,\n week: week,\n month: _ctx.focused.month,\n \"min-date\": _ctx.minDate,\n \"max-date\": _ctx.maxDate,\n disabled: _ctx.disabled,\n \"unselectable-dates\": _ctx.unselectableDates,\n \"unselectable-days-of-week\": _ctx.unselectableDaysOfWeek,\n \"selectable-dates\": _ctx.selectableDates,\n events: _ctx.eventsInThisWeek(week),\n indicators: _ctx.indicators,\n \"date-creator\": _ctx.dateCreator,\n \"nearby-month-days\": _ctx.nearbyMonthDays,\n \"nearby-selectable-month-days\": _ctx.nearbySelectableMonthDays,\n \"show-week-number\": _ctx.showWeekNumber,\n \"week-number-clickable\": _ctx.weekNumberClickable,\n \"first-day-of-week\": _ctx.firstDayOfWeek,\n \"rules-for-first-week\": _ctx.rulesForFirstWeek,\n range: _ctx.range,\n \"hovered-date-range\": _ctx.hoveredDateRange,\n multiple: _ctx.multiple,\n \"table-row-class\": _ctx.tableRowClass,\n \"table-cell-class\": _ctx.tableCellClass,\n \"table-cell-selected-class\": _ctx.tableCellSelectedClass,\n \"table-cell-first-selected-class\": _ctx.tableCellFirstSelectedClass,\n \"table-cell-invisible-class\": _ctx.tableCellInvisibleClass,\n \"table-cell-within-selected-class\": _ctx.tableCellWithinSelectedClass,\n \"table-cell-last-selected-class\": _ctx.tableCellLastSelectedClass,\n \"table-cell-first-hovered-class\": _ctx.tableCellFirstHoveredClass,\n \"table-cell-within-hovered-class\": _ctx.tableCellWithinHoveredClass,\n \"table-cell-last-hovered-class\": _ctx.tableCellLastHoveredClass,\n \"table-cell-today-class\": _ctx.tableCellTodayClass,\n \"table-cell-selectable-class\": _ctx.tableCellSelectableClass,\n \"table-cell-unselectable-class\": _ctx.tableCellUnselectableClass,\n \"table-cell-nearby-class\": _ctx.tableCellNearbyClass,\n \"table-cell-events-class\": _ctx.tableCellEventsClass,\n \"table-events-class\": _ctx.tableEventsClass,\n \"table-event-variant-class\": _ctx.tableEventVariantClass,\n \"table-event-class\": _ctx.tableEventClass,\n \"table-event-indicators-class\": _ctx.tableEventIndicatorsClass,\n onSelect: _ctx.updateSelectedDate,\n onRangeHoverEndDate: _ctx.setRangeHoverEndDate,\n \"onChange-focus\": _ctx.changeFocus\n }, null, 8\n /* PROPS */\n , [\"selected-date\", \"day\", \"week\", \"month\", \"min-date\", \"max-date\", \"disabled\", \"unselectable-dates\", \"unselectable-days-of-week\", \"selectable-dates\", \"events\", \"indicators\", \"date-creator\", \"nearby-month-days\", \"nearby-selectable-month-days\", \"show-week-number\", \"week-number-clickable\", \"first-day-of-week\", \"rules-for-first-week\", \"range\", \"hovered-date-range\", \"multiple\", \"table-row-class\", \"table-cell-class\", \"table-cell-selected-class\", \"table-cell-first-selected-class\", \"table-cell-invisible-class\", \"table-cell-within-selected-class\", \"table-cell-last-selected-class\", \"table-cell-first-hovered-class\", \"table-cell-within-hovered-class\", \"table-cell-last-hovered-class\", \"table-cell-today-class\", \"table-cell-selectable-class\", \"table-cell-unselectable-class\", \"table-cell-nearby-class\", \"table-cell-events-class\", \"table-events-class\", \"table-event-variant-class\", \"table-event-class\", \"table-event-indicators-class\", \"onSelect\", \"onRangeHoverEndDate\", \"onChange-focus\"]);\n }), 128\n /* KEYED_FRAGMENT */\n ))], 2\n /* CLASS */\n )], 2\n /* CLASS */\n );\n}\n\nscript$1.render = render$1;\nscript$1.__file = \"src/components/datepicker/DatepickerTable.vue\";\n\nvar DatepickerMixin = {\r\n methods: {\r\n manageKeydown(event, weekDay) {\r\n // https://developer.mozilla.org/fr/docs/Web/API/KeyboardEvent/key/Key_Values#Navigation_keys\r\n const { key } = event;\r\n let preventDefault = true;\r\n switch (key) {\r\n case 'Tab': {\r\n preventDefault = false;\r\n break;\r\n }\r\n case ' ':\r\n case 'Space':\r\n case 'Spacebar':\r\n case 'Enter': {\r\n this.emitChosenDate(weekDay);\r\n break;\r\n }\r\n case 'ArrowLeft':\r\n case 'Left': {\r\n this.changeFocus(weekDay, -1);\r\n break;\r\n }\r\n case 'ArrowRight':\r\n case 'Right': {\r\n this.changeFocus(weekDay, 1);\r\n break;\r\n }\r\n case 'ArrowUp':\r\n case 'Up': {\r\n this.changeFocus(weekDay, -7);\r\n break;\r\n }\r\n case 'ArrowDown':\r\n case 'Down': {\r\n this.changeFocus(weekDay, 7);\r\n break;\r\n }\r\n }\r\n if (preventDefault) {\r\n event.preventDefault();\r\n }\r\n }\r\n }\r\n};\n\nvar script$2 = {\r\n name: 'ODatepickerMonth',\r\n mixins: [BaseComponentMixin, DatepickerMixin],\r\n configField: 'datepicker',\r\n emits: ['update:modelValue', 'range-start', 'range-end', 'updated:focused'],\r\n props: {\r\n modelValue: {\r\n type: [Date, Array]\r\n },\r\n monthNames: Array,\r\n events: Array,\r\n indicators: String,\r\n minDate: Date,\r\n maxDate: Date,\r\n focused: Object,\r\n disabled: Boolean,\r\n dateCreator: Function,\r\n unselectableDates: [Array, Function],\r\n unselectableDaysOfWeek: Array,\r\n selectableDates: [Array, Function],\r\n range: Boolean,\r\n multiple: Boolean,\r\n monthClass: [String, Function, Array],\r\n monthBodyClass: [String, Function, Array],\r\n monthTableClass: [String, Function, Array],\r\n monthCellClass: [String, Function, Array],\r\n monthCellSelectedClass: [String, Function, Array],\r\n monthCellFirstSelectedClass: [String, Function, Array],\r\n monthCellWithinSelectedClass: [String, Function, Array],\r\n monthCellLastSelectedClass: [String, Function, Array],\r\n monthCellWithinHoveredRangeClass: [String, Function, Array],\r\n monthCellFirstHoveredClass: [String, Function, Array],\r\n monthCellWithinHoveredClass: [String, Function, Array],\r\n monthCellLastHoveredClass: [String, Function, Array],\r\n monthCellTodayClass: [String, Function, Array],\r\n monthCellSelectableClass: [String, Function, Array],\r\n monthCellUnselectableClass: [String, Function, Array],\r\n monthCellEventsClass: [String, Function, Array]\r\n },\r\n data() {\r\n return {\r\n selectedBeginDate: undefined,\r\n selectedEndDate: undefined,\r\n hoveredEndDate: undefined,\r\n multipleSelectedDates: this.multiple && this.modelValue ? this.modelValue : []\r\n };\r\n },\r\n computed: {\r\n monthClasses() {\r\n return [\r\n this.computedClass('monthClass', 'o-dpck__month')\r\n ];\r\n },\r\n monthBodyClasses() {\r\n return [\r\n this.computedClass('monthBodyClass', 'o-dpck__month__body')\r\n ];\r\n },\r\n monthTableClasses() {\r\n return [\r\n this.computedClass('monthTableClass', 'o-dpck__month__table')\r\n ];\r\n },\r\n monthCellClasses() {\r\n return [\r\n this.computedClass('monthCellClass', 'o-dpck__month__cell')\r\n ];\r\n },\r\n hasEvents() {\r\n return this.events && this.events.length;\r\n },\r\n /*\r\n * Return array of all events in the specified month\r\n */\r\n eventsInThisYear() {\r\n if (!this.events)\r\n return [];\r\n const yearEvents = [];\r\n for (let i = 0; i < this.events.length; i++) {\r\n let event = this.events[i];\r\n if (!Object.prototype.hasOwnProperty.call(event, 'date')) {\r\n event = { date: event };\r\n }\r\n if (!Object.prototype.hasOwnProperty.call(event, 'type')) {\r\n event.type = 'is-primary';\r\n }\r\n if (event.date.getFullYear() === this.focused.year) {\r\n yearEvents.push(event);\r\n }\r\n }\r\n return yearEvents;\r\n },\r\n monthDates() {\r\n const year = this.focused.year;\r\n const months = [];\r\n for (let i = 0; i < 12; i++) {\r\n const d = new Date(year, i, 1);\r\n d.setHours(0, 0, 0, 0);\r\n months.push(d);\r\n }\r\n return months;\r\n },\r\n focusedMonth() {\r\n return this.focused.month;\r\n },\r\n hoveredDateRange() {\r\n if (!this.range) {\r\n return [];\r\n }\r\n if (!isNaN(this.selectedEndDate)) {\r\n return [];\r\n }\r\n if (this.hoveredEndDate < this.selectedBeginDate) {\r\n return [this.hoveredEndDate, this.selectedBeginDate].filter(isDefined);\r\n }\r\n return [this.selectedBeginDate, this.hoveredEndDate].filter(isDefined);\r\n }\r\n },\r\n watch: {\r\n focusedMonth(month) {\r\n const refName = `month-${month}`;\r\n if (this.$refs[refName] && this.$refs[refName].length > 0) {\r\n this.$nextTick(() => {\r\n if (this.$refs[refName][0]) {\r\n this.$refs[refName][0].focus();\r\n }\r\n }); // $nextTick needed when year is changed\r\n }\r\n }\r\n },\r\n methods: {\r\n selectMultipleDates(date) {\r\n const multipleSelect = this.multipleSelectedDates.filter((selectedDate) => selectedDate.getDate() === date.getDate() &&\r\n selectedDate.getFullYear() === date.getFullYear() &&\r\n selectedDate.getMonth() === date.getMonth());\r\n if (multipleSelect.length) {\r\n this.multipleSelectedDates = this.multipleSelectedDates.filter((selectedDate) => selectedDate.getDate() !== date.getDate() ||\r\n selectedDate.getFullYear() !== date.getFullYear() ||\r\n selectedDate.getMonth() !== date.getMonth());\r\n }\r\n else {\r\n this.multipleSelectedDates.push(date);\r\n }\r\n this.$emit('update:modelValue', this.multipleSelectedDates);\r\n },\r\n selectableDate(day) {\r\n const validity = [];\r\n if (this.minDate) {\r\n validity.push(day >= this.minDate);\r\n }\r\n if (this.maxDate) {\r\n validity.push(day <= this.maxDate);\r\n }\r\n validity.push(day.getFullYear() === this.focused.year);\r\n if (this.selectableDates) {\r\n if (typeof this.selectableDates === 'function') {\r\n if (this.selectableDates(day)) {\r\n return true;\r\n }\r\n else {\r\n validity.push(false);\r\n }\r\n }\r\n else {\r\n for (let i = 0; i < this.selectableDates.length; i++) {\r\n const enabledDate = this.selectableDates[i];\r\n if (day.getFullYear() === enabledDate.getFullYear() &&\r\n day.getMonth() === enabledDate.getMonth()) {\r\n return true;\r\n }\r\n else {\r\n validity.push(false);\r\n }\r\n }\r\n }\r\n }\r\n if (this.unselectableDates) {\r\n if (typeof this.unselectableDates === 'function') {\r\n validity.push(!this.unselectableDates(day));\r\n }\r\n else {\r\n for (let i = 0; i < this.unselectableDates.length; i++) {\r\n const disabledDate = this.unselectableDates[i];\r\n validity.push(day.getFullYear() !== disabledDate.getFullYear() ||\r\n day.getMonth() !== disabledDate.getMonth());\r\n }\r\n }\r\n }\r\n if (this.unselectableDaysOfWeek) {\r\n for (let i = 0; i < this.unselectableDaysOfWeek.length; i++) {\r\n const dayOfWeek = this.unselectableDaysOfWeek[i];\r\n validity.push(day.getDay() !== dayOfWeek);\r\n }\r\n }\r\n return validity.indexOf(false) < 0;\r\n },\r\n eventsDateMatch(day) {\r\n if (!this.eventsInThisYear.length)\r\n return false;\r\n const monthEvents = [];\r\n for (let i = 0; i < this.eventsInThisYear.length; i++) {\r\n if (this.eventsInThisYear[i].date.getMonth() === day.getMonth()) {\r\n monthEvents.push(this.events[i]);\r\n }\r\n }\r\n if (!monthEvents.length) {\r\n return false;\r\n }\r\n return monthEvents;\r\n },\r\n /*\r\n * Build cellClasses for cell using validations\r\n */\r\n cellClasses(day) {\r\n function dateMatch(dateOne, dateTwo, multiple = false) {\r\n // if either date is null or undefined, return false\r\n if (!dateOne || !dateTwo || multiple) {\r\n return false;\r\n }\r\n if (Array.isArray(dateTwo)) {\r\n return dateTwo.some((date) => (dateOne.getFullYear() === date.getFullYear() &&\r\n dateOne.getMonth() === date.getMonth()));\r\n }\r\n return (dateOne.getFullYear() === dateTwo.getFullYear() &&\r\n dateOne.getMonth() === dateTwo.getMonth());\r\n }\r\n function dateWithin(dateOne, dates, multiple = false) {\r\n if (!Array.isArray(dates) || multiple) {\r\n return false;\r\n }\r\n return dateOne > dates[0] && dateOne < dates[1];\r\n }\r\n function dateMultipleSelected(dateOne, dates, multiple = false) {\r\n if (!Array.isArray(dates) || !multiple) {\r\n return false;\r\n }\r\n return dates.some((date) => (dateOne.getDate() === date.getDate() &&\r\n dateOne.getFullYear() === date.getFullYear() &&\r\n dateOne.getMonth() === date.getMonth()));\r\n }\r\n return [\r\n ...this.monthCellClasses,\r\n {\r\n [this.computedClass('monthCellSelectedClass', 'o-dpck__month__cell--selected')]: dateMatch(day, this.modelValue, this.multiple) ||\r\n dateWithin(day, this.modelValue, this.multiple) ||\r\n dateMultipleSelected(day, this.multipleSelectedDates, this.multiple)\r\n },\r\n {\r\n [this.computedClass('monthCellFirstSelectedClass', 'o-dpck__month__cell--first-selected')]: dateMatch(day, Array.isArray(this.modelValue) && this.modelValue[0], this.multiple)\r\n },\r\n {\r\n [this.computedClass('monthCellWithinSelectedClass', 'o-dpck__month__cell--within-selected')]: dateWithin(day, this.modelValue, this.multiple)\r\n },\r\n {\r\n [this.computedClass('monthCellLastSelectedClass', 'o-dpck__month__cell--last-selected')]: dateMatch(day, Array.isArray(this.modelValue) && this.modelValue[1], this.multiple)\r\n },\r\n {\r\n [this.computedClass('monthCellWithinHoveredRangeClass', 'o-dpck__month__cell--within-hovered-range')]: this.hoveredDateRange && this.hoveredDateRange.length === 2 &&\r\n (dateMatch(day, this.hoveredDateRange) ||\r\n dateWithin(day, this.hoveredDateRange))\r\n },\r\n {\r\n [this.computedClass('monthCellFirstHoveredClass', 'o-dpck__month__cell--first-hovered')]: dateMatch(day, Array.isArray(this.hoveredDateRange) && this.hoveredDateRange[0])\r\n },\r\n {\r\n [this.computedClass('monthCellWithinHoveredClass', 'o-dpck__month__cell--within-hovered')]: dateWithin(day, this.hoveredDateRange)\r\n },\r\n {\r\n [this.computedClass('monthCellLastHoveredClass', 'o-dpck__month__cell--last-hovered')]: dateMatch(day, Array.isArray(this.hoveredDateRange) && this.hoveredDateRange[1])\r\n },\r\n {\r\n [this.computedClass('monthCellTodayClass', 'o-dpck__month__cell--today')]: dateMatch(day, this.dateCreator())\r\n },\r\n {\r\n [this.computedClass('monthCellSelectableclass', 'o-dpck__month__cell--selectable')]: this.selectableDate(day) && !this.disabled\r\n },\r\n {\r\n [this.computedClass('monthCellUnselectableClass', 'o-dpck__month__cell--unselectable')]: !this.selectableDate(day) || this.disabled\r\n },\r\n {\r\n [this.computedClass('monthCellEventsClass', 'o-dpck__month__cell--events')]: this.hasEvents\r\n },\r\n ];\r\n },\r\n /*\r\n * Emit update:modelValue event with selected date as payload for v-model in parent\r\n */\r\n updateSelectedDate(date) {\r\n if (!this.range && !this.multiple) {\r\n this.emitChosenDate(date);\r\n }\r\n else if (this.range) {\r\n this.handleSelectRangeDate(date);\r\n }\r\n else if (this.multiple) {\r\n this.selectMultipleDates(date);\r\n }\r\n },\r\n /*\r\n * Emit select event with chosen date as payload\r\n */\r\n emitChosenDate(day) {\r\n if (this.disabled)\r\n return;\r\n if (!this.multiple) {\r\n if (this.selectableDate(day)) {\r\n this.$emit('update:modelValue', day);\r\n }\r\n }\r\n else {\r\n this.selectMultipleDates(day);\r\n }\r\n },\r\n /*\r\n * If both begin and end dates are set, reset the end date and set the begin date.\r\n * If only begin date is selected, emit an array of the begin date and the new date.\r\n * If not set, only set the begin date.\r\n */\r\n handleSelectRangeDate(date) {\r\n if (this.disabled)\r\n return;\r\n if (this.selectedBeginDate && this.selectedEndDate) {\r\n this.selectedBeginDate = date;\r\n this.selectedEndDate = undefined;\r\n this.$emit('range-start', date);\r\n }\r\n else if (this.selectedBeginDate && !this.selectedEndDate) {\r\n if (this.selectedBeginDate > date) {\r\n this.selectedEndDate = this.selectedBeginDate;\r\n this.selectedBeginDate = date;\r\n }\r\n else {\r\n this.selectedEndDate = date;\r\n }\r\n this.$emit('range-end', date);\r\n this.$emit('update:modelValue', [this.selectedBeginDate, this.selectedEndDate]);\r\n }\r\n else {\r\n this.selectedBeginDate = date;\r\n this.$emit('range-start', date);\r\n }\r\n },\r\n setRangeHoverEndDate(day) {\r\n if (this.range) {\r\n this.hoveredEndDate = day;\r\n }\r\n },\r\n changeFocus(month, inc) {\r\n const nextMonth = month;\r\n nextMonth.setMonth(month.getMonth() + inc);\r\n this.$emit('update:focused', nextMonth);\r\n }\r\n }\r\n};\n\nconst _hoisted_1 = {\n key: 0,\n class: \"events\"\n};\nfunction render$2(_ctx, _cache, $props, $setup, $data, $options) {\n return openBlock(), createBlock(\"section\", {\n class: $options.monthClasses\n }, [createVNode(\"div\", {\n class: $options.monthBodyClasses\n }, [createVNode(\"div\", {\n class: $options.monthTableClasses\n }, [(openBlock(true), createBlock(Fragment, null, renderList($options.monthDates, (date, index) => {\n return openBlock(), createBlock(Fragment, {\n key: index\n }, [$options.selectableDate(date) && !$props.disabled ? (openBlock(), createBlock(\"a\", {\n key: 0,\n ref: `month-${date.getMonth()}`,\n class: $options.cellClasses(date),\n role: \"button\",\n href: \"#\",\n disabled: $props.disabled,\n onClick: withModifiers($event => $options.updateSelectedDate(date), [\"prevent\"]),\n onMouseenter: $event => $options.setRangeHoverEndDate(date),\n onKeydown: withModifiers($event => _ctx.manageKeydown($event, date), [\"prevent\"]),\n tabindex: $props.focused.month === date.getMonth() ? null : -1\n }, [createTextVNode(toDisplayString($props.monthNames[date.getMonth()]) + \" \", 1\n /* TEXT */\n ), $options.eventsDateMatch(date) ? (openBlock(), createBlock(\"div\", _hoisted_1, [(openBlock(true), createBlock(Fragment, null, renderList($options.eventsDateMatch(date), (event, index) => {\n return openBlock(), createBlock(\"div\", {\n class: [\"event\", event.type],\n key: index\n }, null, 2\n /* CLASS */\n );\n }), 128\n /* KEYED_FRAGMENT */\n ))])) : createCommentVNode(\"v-if\", true)], 42\n /* CLASS, PROPS, HYDRATE_EVENTS */\n , [\"disabled\", \"onClick\", \"onMouseenter\", \"onKeydown\", \"tabindex\"])) : (openBlock(), createBlock(\"div\", {\n key: 1,\n class: $options.cellClasses(date)\n }, toDisplayString($props.monthNames[date.getMonth()]), 3\n /* TEXT, CLASS */\n ))], 64\n /* STABLE_FRAGMENT */\n );\n }), 128\n /* KEYED_FRAGMENT */\n ))], 2\n /* CLASS */\n )], 2\n /* CLASS */\n )], 2\n /* CLASS */\n );\n}\n\nscript$2.render = render$2;\nscript$2.__file = \"src/components/datepicker/DatepickerMonth.vue\";\n\nconst defaultDateFormatter = (date, vm) => {\r\n const targetDates = Array.isArray(date) ? date : [date];\r\n const dates = targetDates.map((date) => {\r\n const d = new Date(date.getFullYear(), date.getMonth(), date.getDate(), 12);\r\n return !vm.isTypeMonth ? vm.dtf.format(d) : vm.dtfMonth.format(d);\r\n });\r\n return !vm.multiple ? dates.join(' - ') : dates.join(', ');\r\n};\r\nconst defaultDateParser = (date, vm) => {\r\n if (vm.dtf.formatToParts && typeof vm.dtf.formatToParts === 'function') {\r\n const formatRegex = (vm.isTypeMonth ? vm.dtfMonth : vm.dtf)\r\n .formatToParts(new Date(2000, 11, 25)).map((part) => {\r\n if (part.type === 'literal') {\r\n return part.value;\r\n }\r\n return `((?!=<${part.type}>)\\\\d+)`;\r\n }).join('');\r\n const dateGroups = matchWithGroups(formatRegex, date);\r\n // We do a simple validation for the group.\r\n // If it is not valid, it will fallback to Date.parse below\r\n if (dateGroups.year &&\r\n dateGroups.year.length === 4 &&\r\n dateGroups.month &&\r\n dateGroups.month <= 12) {\r\n if (vm.isTypeMonth)\r\n return new Date(dateGroups.year, dateGroups.month - 1);\r\n else if (dateGroups.day && dateGroups.day <= 31) {\r\n return new Date(dateGroups.year, dateGroups.month - 1, dateGroups.day, 12);\r\n }\r\n }\r\n }\r\n // Fallback if formatToParts is not supported or if we were not able to parse a valid date\r\n if (!vm.isTypeMonth)\r\n return new Date(Date.parse(date));\r\n if (date) {\r\n const s = date.split('/');\r\n const year = s[0].length === 4 ? s[0] : s[1];\r\n const month = s[0].length === 2 ? s[0] : s[1];\r\n if (year && month) {\r\n return new Date(parseInt(year, 10), parseInt(month, 10) - 1, 1, 0, 0, 0, 0);\r\n }\r\n }\r\n return null;\r\n};\r\n/**\r\n * An input with a simple dropdown/modal for selecting a date, uses native datepicker for mobile\r\n * @displayName Datepicker\r\n * @style _datepicker.scss\r\n */\r\nvar script$3 = defineComponent({\r\n name: 'ODatepicker',\r\n components: {\r\n [script$1.name]: script$1,\r\n [script$2.name]: script$2,\r\n [script$4.name]: script$4,\r\n [script$5.name]: script$5,\r\n [script$6.name]: script$6,\r\n [script$7.name]: script$7,\r\n [script$8.name]: script$8,\r\n [script$9.name]: script$9\r\n },\r\n configField: 'datepicker',\r\n mixins: [BaseComponentMixin, FormElementMixin, MatchMediaMixin],\r\n inheritAttrs: false,\r\n provide() {\r\n return {\r\n $datepicker: this\r\n };\r\n },\r\n emits: ['update:modelValue', 'focus', 'blur', 'change-month', 'change-year', 'range-start', 'range-end', 'active-change', 'icon-right-click'],\r\n props: {\r\n modelValue: {\r\n type: [Date, Array]\r\n },\r\n dayNames: {\r\n type: Array,\r\n default: () => {\r\n return getValueByPath(getOptions(), 'datepicker.dayNames', undefined);\r\n }\r\n },\r\n monthNames: {\r\n type: Array,\r\n default: () => {\r\n return getValueByPath(getOptions(), 'datepicker.monthNames', undefined);\r\n }\r\n },\r\n firstDayOfWeek: {\r\n type: Number,\r\n default: () => {\r\n return getValueByPath(getOptions(), 'datepicker.firstDayOfWeek', 0);\r\n }\r\n },\r\n /**\r\n * Size of button, optional\r\n * @values small, medium, large\r\n */\r\n size: String,\r\n inline: Boolean,\r\n minDate: Date,\r\n maxDate: Date,\r\n focusedDate: Date,\r\n placeholder: String,\r\n editable: Boolean,\r\n disabled: Boolean,\r\n unselectableDates: [Array, Function],\r\n unselectableDaysOfWeek: {\r\n type: Array,\r\n default: () => {\r\n return getValueByPath(getOptions(), 'datepicker.unselectableDaysOfWeek', undefined);\r\n }\r\n },\r\n selectableDates: [Array, Function],\r\n dateFormatter: {\r\n type: Function,\r\n default: (date, vm) => {\r\n const dateFormatter = getValueByPath(getOptions(), 'datepicker.dateFormatter', undefined);\r\n if (typeof dateFormatter === 'function') {\r\n return dateFormatter(date);\r\n }\r\n else {\r\n return defaultDateFormatter(date, vm);\r\n }\r\n }\r\n },\r\n dateParser: {\r\n type: Function,\r\n default: (date, vm) => {\r\n const dateParser = getValueByPath(getOptions(), 'datepicker.dateParser', undefined);\r\n if (typeof dateParser === 'function') {\r\n return dateParser(date);\r\n }\r\n else {\r\n return defaultDateParser(date, vm);\r\n }\r\n }\r\n },\r\n dateCreator: {\r\n type: Function,\r\n default: () => {\r\n const dateCreator = getValueByPath(getOptions(), 'datepicker.dateCreator', undefined);\r\n if (typeof dateCreator === 'function') {\r\n return dateCreator();\r\n }\r\n else {\r\n return new Date();\r\n }\r\n }\r\n },\r\n mobileNative: {\r\n type: Boolean,\r\n default: () => {\r\n return getValueByPath(getOptions(), 'datepicker.mobileNative', true);\r\n }\r\n },\r\n position: String,\r\n iconRight: String,\r\n iconRightClickable: Boolean,\r\n events: Array,\r\n indicators: {\r\n type: String,\r\n default: 'dots'\r\n },\r\n openOnFocus: Boolean,\r\n iconPrev: {\r\n type: String,\r\n default: () => {\r\n return getValueByPath(getOptions(), 'datepicker.iconPrev', 'chevron-left');\r\n }\r\n },\r\n iconNext: {\r\n type: String,\r\n default: () => {\r\n return getValueByPath(getOptions(), 'datepicker.iconNext', 'chevron-right');\r\n }\r\n },\r\n yearsRange: {\r\n type: Array,\r\n default: () => {\r\n return getValueByPath(getOptions(), 'datepicker.yearsRange', [-100, 10]);\r\n }\r\n },\r\n type: {\r\n type: String,\r\n validator: (value) => {\r\n return [\r\n 'month'\r\n ].indexOf(value) >= 0;\r\n }\r\n },\r\n nearbyMonthDays: {\r\n type: Boolean,\r\n default: () => {\r\n return getValueByPath(getOptions(), 'datepicker.nearbyMonthDays', true);\r\n }\r\n },\r\n nearbySelectableMonthDays: {\r\n type: Boolean,\r\n default: () => {\r\n return getValueByPath(getOptions(), 'datepicker.nearbySelectableMonthDays', false);\r\n }\r\n },\r\n showWeekNumber: {\r\n type: Boolean,\r\n default: () => {\r\n return getValueByPath(getOptions(), 'datepicker.showWeekNumber', false);\r\n }\r\n },\r\n weekNumberClickable: {\r\n type: Boolean,\r\n default: () => {\r\n return getValueByPath(getOptions(), 'datepicker.weekNumberClickable', false);\r\n }\r\n },\r\n rulesForFirstWeek: {\r\n type: Number,\r\n default: () => 4\r\n },\r\n range: {\r\n type: Boolean,\r\n default: false\r\n },\r\n closeOnClick: {\r\n type: Boolean,\r\n default: true\r\n },\r\n multiple: {\r\n type: Boolean,\r\n default: false\r\n },\r\n mobileModal: {\r\n type: Boolean,\r\n default: () => {\r\n return getValueByPath(getOptions(), 'datepicker.mobileModal', true);\r\n }\r\n },\r\n trapFocus: {\r\n type: Boolean,\r\n default: () => {\r\n return getValueByPath(getOptions(), 'datepicker.trapFocus', true);\r\n }\r\n },\r\n locale: {\r\n type: [String, Array],\r\n default: () => {\r\n return getValueByPath(getOptions(), 'locale');\r\n }\r\n },\r\n appendToBody: Boolean,\r\n ariaNextLabel: String,\r\n ariaPreviousLabel: String,\r\n rootClass: [String, Function, Array],\r\n sizeClass: [String, Function, Array],\r\n boxClass: [String, Function, Array],\r\n headerClass: [String, Function, Array],\r\n headerButtonsClass: [String, Function, Array],\r\n headerButtonsSizeClass: [String, Function, Array],\r\n prevBtnClass: [String, Function, Array],\r\n nextBtnClass: [String, Function, Array],\r\n listsClass: [String, Function, Array],\r\n footerClass: [String, Function, Array],\r\n tableClass: [String, Function, Array],\r\n tableHeadClass: [String, Function, Array],\r\n tableHeadCellClass: [String, Function, Array],\r\n tableBodyClass: [String, Function, Array],\r\n tableRowClass: [String, Function, Array],\r\n tableCellClass: [String, Function, Array],\r\n tableCellSelectedClass: [String, Function, Array],\r\n tableCellFirstSelectedClass: [String, Function, Array],\r\n tableCellInvisibleClass: [String, Function, Array],\r\n tableCellWithinSelectedClass: [String, Function, Array],\r\n tableCellLastSelectedClass: [String, Function, Array],\r\n tableCellFirstHoveredClass: [String, Function, Array],\r\n tableCellWithinHoveredClass: [String, Function, Array],\r\n tableCellLastHoveredClass: [String, Function, Array],\r\n tableCellTodayClass: [String, Function, Array],\r\n tableCellSelectableClass: [String, Function, Array],\r\n tableCellUnselectableClass: [String, Function, Array],\r\n tableCellNearbyClass: [String, Function, Array],\r\n tableCellEventsClass: [String, Function, Array],\r\n tableEventsClass: [String, Function, Array],\r\n tableEventVariantClass: [String, Function, Array],\r\n tableEventClass: [String, Function, Array],\r\n tableEventIndicatorsClass: [String, Function, Array],\r\n mobileClass: [String, Function, Array],\r\n /* datapickermonth classes */\r\n monthClass: [String, Function, Array],\r\n monthBodyClass: [String, Function, Array],\r\n monthTableClass: [String, Function, Array],\r\n monthCellClass: [String, Function, Array],\r\n monthCellSelectedClass: [String, Function, Array],\r\n monthCellFirstSelectedClass: [String, Function, Array],\r\n monthCellWithinSelectedClass: [String, Function, Array],\r\n monthCellLastSelectedClass: [String, Function, Array],\r\n monthCellWithinHoveredRangeClass: [String, Function, Array],\r\n monthCellFirstHoveredClass: [String, Function, Array],\r\n monthCellWithinHoveredClass: [String, Function, Array],\r\n monthCellLastHoveredClass: [String, Function, Array],\r\n monthCellTodayClass: [String, Function, Array],\r\n monthCellSelectableClass: [String, Function, Array],\r\n monthCellUnselectableClass: [String, Function, Array],\r\n monthCellEventsClass: [String, Function, Array],\r\n inputClasses: {\r\n type: Object,\r\n default: () => {\r\n return getValueByPath(getOptions(), 'datepicker.inputClasses', {});\r\n }\r\n },\r\n dropdownClasses: {\r\n type: Object,\r\n default: () => {\r\n return getValueByPath(getOptions(), 'datepicker.dropdownClasses', {});\r\n }\r\n },\r\n selectListClasses: Object\r\n },\r\n data() {\r\n const focusedDate = (Array.isArray(this.modelValue) ? this.modelValue[0] : (this.modelValue)) ||\r\n this.focusedDate || this.dateCreator();\r\n if (!this.modelValue && this.maxDate && this.maxDate.getFullYear() < focusedDate.getFullYear()) {\r\n focusedDate.setFullYear(this.maxDate.getFullYear());\r\n }\r\n return {\r\n dateSelected: this.modelValue,\r\n focusedDateData: {\r\n day: focusedDate.getDate(),\r\n month: focusedDate.getMonth(),\r\n year: focusedDate.getFullYear()\r\n }\r\n };\r\n },\r\n computed: {\r\n inputBind() {\r\n return {\r\n ...this.$attrs,\r\n ...this.inputClasses\r\n };\r\n },\r\n dropdownBind() {\r\n return {\r\n 'root-class': this.computedClass('dropdownClasses.rootClass', 'o-dpck__dropdown'),\r\n ...this.dropdownClasses\r\n };\r\n },\r\n selectListBind() {\r\n return {\r\n ...this.selectListClasses\r\n };\r\n },\r\n rootClasses() {\r\n return [\r\n this.computedClass('rootClass', 'o-dpck'),\r\n { [this.computedClass('sizeClass', 'o-dpck--', this.size)]: this.size },\r\n { [this.computedClass('mobileClass', 'o-dpck--mobile')]: this.isMatchMedia },\r\n ];\r\n },\r\n boxClasses() {\r\n return [\r\n this.computedClass('boxClass', 'o-dpck__box')\r\n ];\r\n },\r\n headerClasses() {\r\n return [\r\n this.computedClass('headerClass', 'o-dpck__header')\r\n ];\r\n },\r\n headerButtonsClasses() {\r\n return [\r\n this.computedClass('headerButtonsClass', 'o-dpck__header__buttons'),\r\n { [this.computedClass('headerButtonsSizeClass', 'o-dpck__header__buttons--', this.size)]: this.size },\r\n ];\r\n },\r\n prevBtnClasses() {\r\n return [\r\n this.computedClass('prevBtnClass', 'o-dpck__header__previous')\r\n ];\r\n },\r\n nextBtnClasses() {\r\n return [\r\n this.computedClass('nextBtnClass', 'o-dpck__header__next')\r\n ];\r\n },\r\n listsClasses() {\r\n return [\r\n this.computedClass('listsClass', 'o-dpck__header__list')\r\n ];\r\n },\r\n footerClasses() {\r\n return [\r\n this.computedClass('footerClass', 'o-dpck__footer')\r\n ];\r\n },\r\n computedValue: {\r\n get() {\r\n return this.dateSelected;\r\n },\r\n set(value) {\r\n this.updateInternalState(value);\r\n if (!this.multiple)\r\n this.togglePicker(false);\r\n this.$emit('update:modelValue', value);\r\n if (this.useHtml5Validation) {\r\n this.$nextTick(() => {\r\n this.checkHtml5Validity();\r\n });\r\n }\r\n }\r\n },\r\n formattedValue() {\r\n return this.formatValue(this.computedValue);\r\n },\r\n localeOptions() {\r\n return new Intl.DateTimeFormat(this.locale, {\r\n year: 'numeric',\r\n month: 'numeric'\r\n }).resolvedOptions();\r\n },\r\n dtf() {\r\n return new Intl.DateTimeFormat(this.locale /*, { timeZone: 'UTC' }*/);\r\n },\r\n dtfMonth() {\r\n return new Intl.DateTimeFormat(this.locale, {\r\n year: this.localeOptions.year || 'numeric',\r\n month: this.localeOptions.month || '2-digit',\r\n });\r\n },\r\n newMonthNames() {\r\n if (Array.isArray(this.monthNames)) {\r\n return this.monthNames;\r\n }\r\n return getMonthNames(this.locale);\r\n },\r\n newDayNames() {\r\n if (Array.isArray(this.dayNames)) {\r\n return this.dayNames;\r\n }\r\n return getWeekdayNames(this.locale);\r\n },\r\n listOfMonths() {\r\n let minMonth = 0;\r\n let maxMonth = 12;\r\n if (this.minDate && this.focusedDateData.year === this.minDate.getFullYear()) {\r\n minMonth = this.minDate.getMonth();\r\n }\r\n if (this.maxDate && this.focusedDateData.year === this.maxDate.getFullYear()) {\r\n maxMonth = this.maxDate.getMonth();\r\n }\r\n return this.newMonthNames.map((name, index) => {\r\n return {\r\n name: name,\r\n index: index,\r\n disabled: index < minMonth || index > maxMonth\r\n };\r\n });\r\n },\r\n /*\r\n * Returns an array of years for the year dropdown. If earliest/latest\r\n * dates are set by props, range of years will fall within those dates.\r\n */\r\n listOfYears() {\r\n let latestYear = this.focusedDateData.year + this.yearsRange[1];\r\n if (this.maxDate && this.maxDate.getFullYear() < latestYear) {\r\n latestYear = Math.max(this.maxDate.getFullYear(), this.focusedDateData.year);\r\n }\r\n let earliestYear = this.focusedDateData.year + this.yearsRange[0];\r\n if (this.minDate && this.minDate.getFullYear() > earliestYear) {\r\n earliestYear = Math.min(this.minDate.getFullYear(), this.focusedDateData.year);\r\n }\r\n const arrayOfYears = [];\r\n for (let i = earliestYear; i <= latestYear; i++) {\r\n arrayOfYears.push(i);\r\n }\r\n return arrayOfYears.reverse();\r\n },\r\n showPrev() {\r\n if (!this.minDate)\r\n return false;\r\n if (this.isTypeMonth) {\r\n return this.focusedDateData.year <= this.minDate.getFullYear();\r\n }\r\n const dateToCheck = new Date(this.focusedDateData.year, this.focusedDateData.month);\r\n const date = new Date(this.minDate.getFullYear(), this.minDate.getMonth());\r\n return (dateToCheck <= date);\r\n },\r\n showNext() {\r\n if (!this.maxDate)\r\n return false;\r\n if (this.isTypeMonth) {\r\n return this.focusedDateData.year >= this.maxDate.getFullYear();\r\n }\r\n const dateToCheck = new Date(this.focusedDateData.year, this.focusedDateData.month);\r\n const date = new Date(this.maxDate.getFullYear(), this.maxDate.getMonth());\r\n return (dateToCheck >= date);\r\n },\r\n isMobile() {\r\n return this.mobileNative && isMobile.any();\r\n },\r\n isTypeMonth() {\r\n return this.type === 'month';\r\n },\r\n ariaRole() {\r\n return !this.inline ? 'dialog' : undefined;\r\n },\r\n $elementRef() {\r\n return 'input';\r\n }\r\n },\r\n watch: {\r\n /**\r\n * When v-model is changed:\r\n * 1. Update internal value.\r\n * 2. If it's invalid, validate again.\r\n */\r\n modelValue(value) {\r\n this.updateInternalState(value);\r\n if (!this.multiple)\r\n this.togglePicker(false);\r\n },\r\n focusedDate(value) {\r\n if (value) {\r\n this.focusedDateData = {\r\n day: value.getDate(),\r\n month: value.getMonth(),\r\n year: value.getFullYear()\r\n };\r\n }\r\n },\r\n /*\r\n * Emit input event on month and/or year change\r\n */\r\n 'focusedDateData.month'(value) {\r\n this.$emit('change-month', value);\r\n },\r\n 'focusedDateData.year'(value) {\r\n this.$emit('change-year', value);\r\n }\r\n },\r\n methods: {\r\n /*\r\n * Parse string into date\r\n */\r\n onChange(value) {\r\n const date = this.dateParser(value, this);\r\n if (date && (!isNaN(date) ||\r\n (Array.isArray(date) && date.length === 2 && !isNaN(date[0]) && !isNaN(date[1])))) {\r\n this.computedValue = date;\r\n }\r\n else {\r\n // Force refresh input value when not valid date\r\n this.computedValue = null;\r\n if (this.$refs.input) {\r\n this.$refs.input.newValue = this.computedValue;\r\n }\r\n }\r\n },\r\n /*\r\n * Format date into string\r\n */\r\n formatValue(value) {\r\n if (Array.isArray(value)) {\r\n const isArrayWithValidDates = Array.isArray(value) && value.every((v) => !isNaN(v));\r\n return isArrayWithValidDates ? this.dateFormatter([...value], this) : null;\r\n }\r\n return (value && !isNaN(value)) ? this.dateFormatter(value, this) : null;\r\n },\r\n /*\r\n * Either decrement month by 1 if not January or decrement year by 1\r\n * and set month to 11 (December) or decrement year when 'month'\r\n */\r\n prev() {\r\n if (this.disabled)\r\n return;\r\n if (this.isTypeMonth) {\r\n this.focusedDateData.year -= 1;\r\n }\r\n else {\r\n if (this.focusedDateData.month > 0) {\r\n this.focusedDateData.month -= 1;\r\n }\r\n else {\r\n this.focusedDateData.month = 11;\r\n this.focusedDateData.year -= 1;\r\n }\r\n }\r\n },\r\n /*\r\n * Either increment month by 1 if not December or increment year by 1\r\n * and set month to 0 (January) or increment year when 'month'\r\n */\r\n next() {\r\n if (this.disabled)\r\n return;\r\n if (this.isTypeMonth) {\r\n this.focusedDateData.year += 1;\r\n }\r\n else {\r\n if (this.focusedDateData.month < 11) {\r\n this.focusedDateData.month += 1;\r\n }\r\n else {\r\n this.focusedDateData.month = 0;\r\n this.focusedDateData.year += 1;\r\n }\r\n }\r\n },\r\n formatNative(value) {\r\n return this.isTypeMonth\r\n ? this.formatYYYYMM(value) : this.formatYYYYMMDD(value);\r\n },\r\n /*\r\n * Format date into string 'YYYY-MM-DD'\r\n */\r\n formatYYYYMMDD(value) {\r\n const date = new Date(value);\r\n if (value && !isNaN(date.getTime())) {\r\n const year = date.getFullYear();\r\n const month = date.getMonth() + 1;\r\n const day = date.getDate();\r\n return year + '-' +\r\n ((month < 10 ? '0' : '') + month) + '-' +\r\n ((day < 10 ? '0' : '') + day);\r\n }\r\n return '';\r\n },\r\n /*\r\n * Format date into string 'YYYY-MM'\r\n */\r\n formatYYYYMM(value) {\r\n const date = new Date(value);\r\n if (value && !isNaN(date.getTime())) {\r\n const year = date.getFullYear();\r\n const month = date.getMonth() + 1;\r\n return year + '-' +\r\n ((month < 10 ? '0' : '') + month);\r\n }\r\n return '';\r\n },\r\n /*\r\n * Parse date from string\r\n */\r\n onChangeNativePicker(event) {\r\n const date = event.target.value;\r\n const s = date ? date.split('-') : [];\r\n if (s.length === 3) {\r\n const year = parseInt(s[0], 10);\r\n const month = parseInt(s[1]) - 1;\r\n const day = parseInt(s[2]);\r\n this.computedValue = new Date(year, month, day);\r\n }\r\n else {\r\n this.computedValue = null;\r\n }\r\n },\r\n updateInternalState(value) {\r\n if (this.dateSelected === value)\r\n return;\r\n const isArray = Array.isArray(value);\r\n const currentDate = isArray\r\n ? (!value.length ? this.dateCreator() : value[value.length - 1])\r\n : (!value ? this.dateCreator() : value);\r\n if (!isArray || (isArray && this.dateSelected && value.length > this.dateSelected.length)) {\r\n this.focusedDateData = {\r\n day: currentDate.getDate(),\r\n month: currentDate.getMonth(),\r\n year: currentDate.getFullYear()\r\n };\r\n }\r\n this.dateSelected = value;\r\n },\r\n /*\r\n * Toggle datepicker\r\n */\r\n togglePicker(active) {\r\n if (this.$refs.dropdown) {\r\n const isActive = typeof active === 'boolean'\r\n ? active\r\n : !this.$refs.dropdown.isActive;\r\n if (isActive) {\r\n this.$refs.dropdown.isActive = isActive;\r\n }\r\n else if (this.closeOnClick) {\r\n this.$refs.dropdown.isActive = isActive;\r\n }\r\n }\r\n },\r\n /*\r\n * Call default onFocus method and show datepicker\r\n */\r\n handleOnFocus(event) {\r\n this.onFocus(event);\r\n if (this.openOnFocus) {\r\n this.togglePicker(true);\r\n }\r\n },\r\n /*\r\n * Toggle dropdown\r\n */\r\n toggle() {\r\n if (this.mobileNative && this.isMobile) {\r\n const input = this.$refs.input.$refs.input;\r\n input.focus();\r\n input.click();\r\n return;\r\n }\r\n this.$refs.dropdown.toggle();\r\n },\r\n /*\r\n * Avoid dropdown toggle when is already visible\r\n */\r\n onInputClick(event) {\r\n if (this.$refs.dropdown.isActive) {\r\n event.stopPropagation();\r\n }\r\n },\r\n /**\r\n * Keypress event that is bound to the document.\r\n */\r\n keyPress({ key }) {\r\n if (this.$refs.dropdown && this.$refs.dropdown.isActive && (key === 'Escape' || key === 'Esc')) {\r\n this.togglePicker(false);\r\n }\r\n },\r\n /**\r\n * Emit 'blur' event on dropdown is not active (closed)\r\n */\r\n onActiveChange(value) {\r\n if (!value) {\r\n this.onBlur();\r\n }\r\n this.$emit('active-change', value);\r\n },\r\n changeFocus(day) {\r\n this.focusedDateData = {\r\n day: day.getDate(),\r\n month: day.getMonth(),\r\n year: day.getFullYear()\r\n };\r\n }\r\n },\r\n created() {\r\n if (typeof window !== 'undefined') {\r\n document.addEventListener('keyup', this.keyPress);\r\n }\r\n },\r\n beforeUnmount() {\r\n if (typeof window !== 'undefined') {\r\n document.removeEventListener('keyup', this.keyPress);\r\n }\r\n }\r\n});\n\nfunction render$3(_ctx, _cache, $props, $setup, $data, $options) {\n const _component_o_input = resolveComponent(\"o-input\");\n\n const _component_o_icon = resolveComponent(\"o-icon\");\n\n const _component_o_select = resolveComponent(\"o-select\");\n\n const _component_o_datepicker_table = resolveComponent(\"o-datepicker-table\");\n\n const _component_o_datepicker_month = resolveComponent(\"o-datepicker-month\");\n\n const _component_o_dropdown_item = resolveComponent(\"o-dropdown-item\");\n\n const _component_o_dropdown = resolveComponent(\"o-dropdown\");\n\n return openBlock(), createBlock(\"div\", {\n class: _ctx.rootClasses\n }, [!_ctx.isMobile || _ctx.inline ? createVNode(_component_o_dropdown, mergeProps({\n key: 0,\n ref: \"dropdown\"\n }, _ctx.dropdownBind, {\n position: _ctx.position,\n disabled: _ctx.disabled,\n inline: _ctx.inline,\n \"mobile-modal\": _ctx.mobileModal,\n \"trap-focus\": _ctx.trapFocus,\n \"aria-role\": _ctx.ariaRole,\n \"aria-modal\": !_ctx.inline,\n \"trigger-tabindex\": -1,\n \"append-to-body\": _ctx.appendToBody,\n \"append-to-body-copy-parent\": \"\",\n \"onActive-change\": _ctx.onActiveChange\n }), createSlots({\n default: withCtx(() => [createVNode(_component_o_dropdown_item, {\n override: \"\",\n tag: \"div\",\n \"item-class\": _ctx.boxClasses,\n disabled: _ctx.disabled,\n clickable: false\n }, {\n default: withCtx(() => [createVNode(\"header\", {\n class: _ctx.headerClasses\n }, [renderSlot(_ctx.$slots, \"header\", {}, () => [createVNode(\"div\", {\n class: _ctx.headerButtonsClasses\n }, [withDirectives(createVNode(\"a\", {\n class: _ctx.prevBtnClasses,\n role: \"button\",\n href: \"#\",\n \"aria-label\": _ctx.ariaPreviousLabel,\n onClick: _cache[4] || (_cache[4] = withModifiers((...args) => _ctx.prev(...args), [\"prevent\"])),\n onKeydown: [_cache[5] || (_cache[5] = withKeys(withModifiers((...args) => _ctx.prev(...args), [\"prevent\"]), [\"enter\"])), _cache[6] || (_cache[6] = withKeys(withModifiers((...args) => _ctx.prev(...args), [\"prevent\"]), [\"space\"]))]\n }, [createVNode(_component_o_icon, {\n icon: _ctx.iconPrev,\n pack: _ctx.iconPack,\n both: \"\",\n clickable: \"\"\n }, null, 8\n /* PROPS */\n , [\"icon\", \"pack\"])], 42\n /* CLASS, PROPS, HYDRATE_EVENTS */\n , [\"aria-label\"]), [[vShow, !_ctx.showPrev && !_ctx.disabled]]), withDirectives(createVNode(\"a\", {\n class: _ctx.nextBtnClasses,\n role: \"button\",\n href: \"#\",\n \"aria-label\": _ctx.ariaNextLabel,\n onClick: _cache[7] || (_cache[7] = withModifiers((...args) => _ctx.next(...args), [\"prevent\"])),\n onKeydown: [_cache[8] || (_cache[8] = withKeys(withModifiers((...args) => _ctx.next(...args), [\"prevent\"]), [\"enter\"])), _cache[9] || (_cache[9] = withKeys(withModifiers((...args) => _ctx.next(...args), [\"prevent\"]), [\"space\"]))]\n }, [createVNode(_component_o_icon, {\n icon: _ctx.iconNext,\n pack: _ctx.iconPack,\n both: \"\",\n clickable: \"\"\n }, null, 8\n /* PROPS */\n , [\"icon\", \"pack\"])], 42\n /* CLASS, PROPS, HYDRATE_EVENTS */\n , [\"aria-label\"]), [[vShow, !_ctx.showNext && !_ctx.disabled]]), createVNode(\"div\", {\n class: _ctx.listsClasses\n }, [!_ctx.isTypeMonth ? createVNode(_component_o_select, mergeProps({\n key: 0,\n modelValue: _ctx.focusedDateData.month,\n \"onUpdate:modelValue\": _cache[10] || (_cache[10] = $event => _ctx.focusedDateData.month = $event),\n disabled: _ctx.disabled,\n size: _ctx.size\n }, _ctx.selectListBind), {\n default: withCtx(() => [(openBlock(true), createBlock(Fragment, null, renderList(_ctx.listOfMonths, month => {\n return openBlock(), createBlock(\"option\", {\n value: month.index,\n key: month.name,\n disabled: month.disabled\n }, toDisplayString(month.name), 9\n /* TEXT, PROPS */\n , [\"value\", \"disabled\"]);\n }), 128\n /* KEYED_FRAGMENT */\n ))]),\n _: 1\n }, 16\n /* FULL_PROPS */\n , [\"modelValue\", \"disabled\", \"size\"]) : createCommentVNode(\"v-if\", true), createVNode(_component_o_select, mergeProps({\n modelValue: _ctx.focusedDateData.year,\n \"onUpdate:modelValue\": _cache[11] || (_cache[11] = $event => _ctx.focusedDateData.year = $event),\n disabled: _ctx.disabled,\n size: _ctx.size\n }, _ctx.selectListBind), {\n default: withCtx(() => [(openBlock(true), createBlock(Fragment, null, renderList(_ctx.listOfYears, year => {\n return openBlock(), createBlock(\"option\", {\n value: year,\n key: year\n }, toDisplayString(year), 9\n /* TEXT, PROPS */\n , [\"value\"]);\n }), 128\n /* KEYED_FRAGMENT */\n ))]),\n _: 1\n }, 16\n /* FULL_PROPS */\n , [\"modelValue\", \"disabled\", \"size\"])], 2\n /* CLASS */\n )], 2\n /* CLASS */\n )])], 2\n /* CLASS */\n ), renderSlot(_ctx.$slots, \"table\", {}, () => [!_ctx.isTypeMonth ? createVNode(_component_o_datepicker_table, {\n key: 0,\n modelValue: _ctx.computedValue,\n \"onUpdate:modelValue\": _cache[12] || (_cache[12] = $event => _ctx.computedValue = $event),\n \"day-names\": _ctx.newDayNames,\n \"month-names\": _ctx.newMonthNames,\n \"first-day-of-week\": _ctx.firstDayOfWeek,\n \"rules-for-first-week\": _ctx.rulesForFirstWeek,\n \"min-date\": _ctx.minDate,\n \"max-date\": _ctx.maxDate,\n focused: _ctx.focusedDateData,\n disabled: _ctx.disabled,\n \"unselectable-dates\": _ctx.unselectableDates,\n \"unselectable-days-of-week\": _ctx.unselectableDaysOfWeek,\n \"selectable-dates\": _ctx.selectableDates,\n events: _ctx.events,\n indicators: _ctx.indicators,\n \"date-creator\": _ctx.dateCreator,\n \"type-month\": _ctx.isTypeMonth,\n \"nearby-month-days\": _ctx.nearbyMonthDays,\n \"nearby-selectable-month-days\": _ctx.nearbySelectableMonthDays,\n \"show-week-number\": _ctx.showWeekNumber,\n \"week-number-clickable\": _ctx.weekNumberClickable,\n range: _ctx.range,\n multiple: _ctx.multiple,\n \"table-class\": _ctx.tableClass,\n \"table-head-class\": _ctx.tableHeadClass,\n \"table-head-cell-class\": _ctx.tableHeadCellClass,\n \"table-body-class\": _ctx.tableBodyClass,\n \"table-row-class\": _ctx.tableRowClass,\n \"table-cell-class\": _ctx.tableCellClass,\n \"table-cell-selected-class\": _ctx.tableCellSelectedClass,\n \"table-cell-first-selected-class\": _ctx.tableCellFirstSelectedClass,\n \"table-cell-invisible-class\": _ctx.tableCellInvisibleClass,\n \"table-cell-within-selected-class\": _ctx.tableCellWithinSelectedClass,\n \"table-cell-last-selected-class\": _ctx.tableCellLastSelectedClass,\n \"table-cell-first-hovered-class\": _ctx.tableCellFirstHoveredClass,\n \"table-cell-within-hovered-class\": _ctx.tableCellWithinHoveredClass,\n \"table-cell-last-hovered-class\": _ctx.tableCellLastHoveredClass,\n \"table-cell-today-class\": _ctx.tableCellTodayClass,\n \"table-cell-selectable-class\": _ctx.tableCellSelectableClass,\n \"table-cell-unselectable-class\": _ctx.tableCellUnselectableClass,\n \"table-cell-nearby-class\": _ctx.tableCellNearbyClass,\n \"table-cell-events-class\": _ctx.tableCellEventsClass,\n \"table-events-class\": _ctx.tableEventsClass,\n \"table-event-variant-class\": _ctx.tableEventVariantClass,\n \"table-event-class\": _ctx.tableEventClass,\n \"table-event-indicators-class\": _ctx.tableEventIndicatorsClass,\n \"onRange-start\": _cache[13] || (_cache[13] = date => _ctx.$emit('range-start', date)),\n \"onRange-end\": _cache[14] || (_cache[14] = date => _ctx.$emit('range-end', date)),\n onClose: _cache[15] || (_cache[15] = $event => _ctx.togglePicker(false)),\n \"onUpdate:focused\": _cache[16] || (_cache[16] = $event => _ctx.focusedDateData = $event)\n }, null, 8\n /* PROPS */\n , [\"modelValue\", \"day-names\", \"month-names\", \"first-day-of-week\", \"rules-for-first-week\", \"min-date\", \"max-date\", \"focused\", \"disabled\", \"unselectable-dates\", \"unselectable-days-of-week\", \"selectable-dates\", \"events\", \"indicators\", \"date-creator\", \"type-month\", \"nearby-month-days\", \"nearby-selectable-month-days\", \"show-week-number\", \"week-number-clickable\", \"range\", \"multiple\", \"table-class\", \"table-head-class\", \"table-head-cell-class\", \"table-body-class\", \"table-row-class\", \"table-cell-class\", \"table-cell-selected-class\", \"table-cell-first-selected-class\", \"table-cell-invisible-class\", \"table-cell-within-selected-class\", \"table-cell-last-selected-class\", \"table-cell-first-hovered-class\", \"table-cell-within-hovered-class\", \"table-cell-last-hovered-class\", \"table-cell-today-class\", \"table-cell-selectable-class\", \"table-cell-unselectable-class\", \"table-cell-nearby-class\", \"table-cell-events-class\", \"table-events-class\", \"table-event-variant-class\", \"table-event-class\", \"table-event-indicators-class\"]) : createCommentVNode(\"v-if\", true), _ctx.isTypeMonth ? createVNode(_component_o_datepicker_month, {\n key: 1,\n modelValue: _ctx.computedValue,\n \"onUpdate:modelValue\": _cache[17] || (_cache[17] = $event => _ctx.computedValue = $event),\n \"month-names\": _ctx.newMonthNames,\n \"min-date\": _ctx.minDate,\n \"max-date\": _ctx.maxDate,\n focused: _ctx.focusedDateData,\n disabled: _ctx.disabled,\n \"unselectable-dates\": _ctx.unselectableDates,\n \"unselectable-days-of-week\": _ctx.unselectableDaysOfWeek,\n \"selectable-dates\": _ctx.selectableDates,\n events: _ctx.events,\n indicators: _ctx.indicators,\n \"date-creator\": _ctx.dateCreator,\n range: _ctx.range,\n multiple: _ctx.multiple,\n \"month-class\": _ctx.monthClass,\n \"month-body-class\": _ctx.monthBodyClass,\n \"month-table-class\": _ctx.monthTableClass,\n \"month-cell-class\": _ctx.monthCellClass,\n \"month-cell-selected-class\": _ctx.monthCellSelectedClass,\n \"month-cell-first-selected-class\": _ctx.monthCellFirstSelectedClass,\n \"month-cell-within-selected-class\": _ctx.monthCellWithinSelectedClass,\n \"month-cell-last-selected-class\": _ctx.monthCellLastSelectedClass,\n \"month-cell-within-hovered-range-class\": _ctx.monthCellWithinHoveredRangeClass,\n \"month-cell-first-hovered-class\": _ctx.monthCellFirstHoveredClass,\n \"month-cell-within-hovered-class\": _ctx.monthCellWithinHoveredClass,\n \"month-cell-last-hovered-class\": _ctx.monthCellLastHoveredClass,\n \"month-cell-today-class\": _ctx.monthCellTodayClass,\n \"month-cell-selectable-class\": _ctx.monthCellSelectableClass,\n \"month-cell-unselectable-class\": _ctx.monthCellUnselectableClass,\n \"month-cell-events-class\": _ctx.monthCellEventsClass,\n \"onRange-start\": _cache[18] || (_cache[18] = date => _ctx.$emit('range-start', date)),\n \"onRange-end\": _cache[19] || (_cache[19] = date => _ctx.$emit('range-end', date)),\n onClose: _cache[20] || (_cache[20] = $event => _ctx.togglePicker(false)),\n \"onChange-focus\": _ctx.changeFocus,\n \"onUpdate:focused\": _cache[21] || (_cache[21] = $event => _ctx.focusedDateData = $event)\n }, null, 8\n /* PROPS */\n , [\"modelValue\", \"month-names\", \"min-date\", \"max-date\", \"focused\", \"disabled\", \"unselectable-dates\", \"unselectable-days-of-week\", \"selectable-dates\", \"events\", \"indicators\", \"date-creator\", \"range\", \"multiple\", \"month-class\", \"month-body-class\", \"month-table-class\", \"month-cell-class\", \"month-cell-selected-class\", \"month-cell-first-selected-class\", \"month-cell-within-selected-class\", \"month-cell-last-selected-class\", \"month-cell-within-hovered-range-class\", \"month-cell-first-hovered-class\", \"month-cell-within-hovered-class\", \"month-cell-last-hovered-class\", \"month-cell-today-class\", \"month-cell-selectable-class\", \"month-cell-unselectable-class\", \"month-cell-events-class\", \"onChange-focus\"]) : createCommentVNode(\"v-if\", true)]), _ctx.$slots.footer !== undefined ? (openBlock(), createBlock(\"footer\", {\n key: 0,\n class: _ctx.footerClasses\n }, [renderSlot(_ctx.$slots, \"footer\")], 2\n /* CLASS */\n )) : createCommentVNode(\"v-if\", true)]),\n _: 3\n }, 8\n /* PROPS */\n , [\"item-class\", \"disabled\"])]),\n _: 2\n }, [!_ctx.inline ? {\n name: \"trigger\",\n fn: withCtx(() => [renderSlot(_ctx.$slots, \"trigger\", {}, () => [createVNode(_component_o_input, mergeProps({\n ref: \"input\",\n autocomplete: \"off\",\n \"model-value\": _ctx.formattedValue,\n expanded: _ctx.expanded,\n placeholder: _ctx.placeholder,\n size: _ctx.size,\n icon: _ctx.icon,\n \"icon-right\": _ctx.iconRight,\n \"icon-right-clickable\": _ctx.iconRightClickable,\n \"icon-pack\": _ctx.iconPack,\n rounded: _ctx.rounded,\n disabled: _ctx.disabled,\n readonly: !_ctx.editable\n }, _ctx.inputBind, {\n \"use-html5-validation\": false,\n onClick: _ctx.onInputClick,\n \"onIcon-right-click\": _cache[1] || (_cache[1] = $event => _ctx.$emit('icon-right-click')),\n onKeyup: _cache[2] || (_cache[2] = withKeys($event => _ctx.togglePicker(true), [\"enter\"])),\n onChange: _cache[3] || (_cache[3] = $event => _ctx.onChange($event.target.value)),\n onFocus: _ctx.handleOnFocus\n }), null, 16\n /* FULL_PROPS */\n , [\"model-value\", \"expanded\", \"placeholder\", \"size\", \"icon\", \"icon-right\", \"icon-right-clickable\", \"icon-pack\", \"rounded\", \"disabled\", \"readonly\", \"onClick\", \"onFocus\"])])])\n } : undefined]), 1040\n /* FULL_PROPS, DYNAMIC_SLOTS */\n , [\"position\", \"disabled\", \"inline\", \"mobile-modal\", \"trap-focus\", \"aria-role\", \"aria-modal\", \"append-to-body\", \"onActive-change\"]) : createVNode(_component_o_input, mergeProps({\n key: 1,\n ref: \"input\",\n type: !_ctx.isTypeMonth ? 'date' : 'month',\n autocomplete: \"off\",\n value: _ctx.formatNative(_ctx.computedValue),\n placeholder: _ctx.placeholder,\n size: _ctx.size,\n icon: _ctx.icon,\n \"icon-pack\": _ctx.iconPack,\n rounded: _ctx.rounded,\n max: _ctx.formatNative(_ctx.maxDate),\n min: _ctx.formatNative(_ctx.minDate),\n disabled: _ctx.disabled,\n readonly: false\n }, _ctx.$attrs, {\n \"use-html5-validation\": false,\n onChange: _ctx.onChangeNativePicker,\n onFocus: _ctx.onFocus,\n onBlur: _ctx.onBlur\n }), null, 16\n /* FULL_PROPS */\n , [\"type\", \"value\", \"placeholder\", \"size\", \"icon\", \"icon-pack\", \"rounded\", \"max\", \"min\", \"disabled\", \"onChange\", \"onFocus\", \"onBlur\"])], 2\n /* CLASS */\n );\n}\n\nscript$3.render = render$3;\nscript$3.__file = \"src/components/datepicker/Datepicker.vue\";\n\nexport { script$3 as s };\n","import 'vue';\nimport './helpers.mjs';\nimport './config.mjs';\nimport { b as registerComponent } from './plugins-ba5e2464.mjs';\nimport './Icon-a7b85e86.mjs';\nimport './FormElementMixin-29581863.mjs';\nimport './Input-19e906a1.mjs';\nimport './MatchMediaMixin-09b141ca.mjs';\nimport './trapFocus-dc03669f.mjs';\nimport './DropdownItem-c744c4e9.mjs';\nimport './Field-937b4591.mjs';\nimport './Select-2cca695f.mjs';\nimport { s as script } from './Datepicker-42aca091.mjs';\nexport { s as ODatepicker } from './Datepicker-42aca091.mjs';\n\nvar index = {\r\n install(app) {\r\n registerComponent(app, script);\r\n }\r\n};\n\nexport default index;\n","import { defineComponent, resolveComponent, openBlock, createBlock, createVNode, mergeProps, createSlots, withCtx, Fragment, renderList, toDisplayString, createCommentVNode, renderSlot, withKeys } from 'vue';\nimport { getValueByPath, isMobile, matchWithGroups } from './helpers.mjs';\nimport { getOptions } from './config.mjs';\nimport { B as BaseComponentMixin } from './plugins-ba5e2464.mjs';\nimport { s as script$3 } from './Icon-a7b85e86.mjs';\nimport { F as FormElementMixin } from './FormElementMixin-29581863.mjs';\nimport { s as script$1 } from './Input-19e906a1.mjs';\nimport { M as MatchMediaMixin } from './MatchMediaMixin-09b141ca.mjs';\nimport { s as script$4, a as script$5 } from './DropdownItem-c744c4e9.mjs';\nimport { s as script$2 } from './Select-2cca695f.mjs';\n\nconst AM = 'AM';\r\nconst PM = 'PM';\r\nconst HOUR_FORMAT_24 = '24';\r\nconst HOUR_FORMAT_12 = '12';\r\nconst defaultTimeFormatter = (date, vm) => {\r\n return vm.dtf.format(date);\r\n};\r\nconst defaultTimeParser = (timeString, vm) => {\r\n if (timeString) {\r\n let d = null;\r\n if (vm.computedValue && !isNaN(vm.computedValue)) {\r\n d = new Date(vm.computedValue);\r\n }\r\n else {\r\n d = vm.timeCreator();\r\n d.setMilliseconds(0);\r\n }\r\n if (vm.dtf.formatToParts && typeof vm.dtf.formatToParts === 'function') {\r\n const formatRegex = vm.dtf\r\n .formatToParts(d).map((part) => {\r\n if (part.type === 'literal') {\r\n return part.value.replace(/ /g, '\\\\s?');\r\n }\r\n else if (part.type === 'dayPeriod') {\r\n return `((?!=<${part.type}>)(${vm.amString}|${vm.pmString}|${AM}|${PM}|${AM.toLowerCase()}|${PM.toLowerCase()})?)`;\r\n }\r\n return `((?!=<${part.type}>)\\\\d+)`;\r\n }).join('');\r\n const timeGroups = matchWithGroups(formatRegex, timeString);\r\n // We do a simple validation for the group.\r\n // If it is not valid, it will fallback to Date.parse below\r\n timeGroups.hour = timeGroups.hour ? parseInt(timeGroups.hour, 10) : null;\r\n timeGroups.minute = timeGroups.minute ? parseInt(timeGroups.minute, 10) : null;\r\n timeGroups.second = timeGroups.second ? parseInt(timeGroups.second, 10) : null;\r\n if (timeGroups.hour &&\r\n timeGroups.hour >= 0 &&\r\n timeGroups.hour < 24 &&\r\n timeGroups.minute &&\r\n timeGroups.minute >= 0 &&\r\n timeGroups.minute < 59) {\r\n if (timeGroups.dayPeriod &&\r\n (timeGroups.dayPeriod.toLowerCase() === vm.pmString.toLowerCase() ||\r\n timeGroups.dayPeriod.toLowerCase() === PM.toLowerCase()) &&\r\n timeGroups.hour < 12) {\r\n timeGroups.hour += 12;\r\n }\r\n d.setHours(timeGroups.hour);\r\n d.setMinutes(timeGroups.minute);\r\n d.setSeconds(timeGroups.second || 0);\r\n return d;\r\n }\r\n }\r\n // Fallback if formatToParts is not supported or if we were not able to parse a valid date\r\n let am = false;\r\n if (vm.hourFormat === HOUR_FORMAT_12) {\r\n const dateString12 = timeString.split(' ');\r\n timeString = dateString12[0];\r\n am = (dateString12[1] === vm.amString || dateString12[1] === AM);\r\n }\r\n const time = timeString.split(':');\r\n let hours = parseInt(time[0], 10);\r\n const minutes = parseInt(time[1], 10);\r\n const seconds = vm.enableSeconds ? parseInt(time[2], 10) : 0;\r\n if (isNaN(hours) || hours < 0 || hours > 23 ||\r\n (vm.hourFormat === HOUR_FORMAT_12 && (hours < 1 || hours > 12)) ||\r\n isNaN(minutes) || minutes < 0 || minutes > 59) {\r\n return null;\r\n }\r\n d.setSeconds(seconds);\r\n d.setMinutes(minutes);\r\n if (vm.hourFormat === HOUR_FORMAT_12) {\r\n if (am && hours === 12) {\r\n hours = 0;\r\n }\r\n else if (!am && hours !== 12) {\r\n hours += 12;\r\n }\r\n }\r\n d.setHours(hours);\r\n return new Date(d.getTime());\r\n }\r\n return null;\r\n};\r\nvar TimepickerMixin = defineComponent({\r\n mixins: [FormElementMixin],\r\n inheritAttrs: false,\r\n emits: ['update:modelValue'],\r\n props: {\r\n /** @model */\r\n modelValue: Date,\r\n inline: Boolean,\r\n minTime: Date,\r\n maxTime: Date,\r\n placeholder: String,\r\n editable: Boolean,\r\n disabled: Boolean,\r\n /**\r\n * Size of button, optional\r\n * @values small, medium, large\r\n */\r\n size: String,\r\n hourFormat: {\r\n type: String\r\n },\r\n incrementHours: {\r\n type: Number,\r\n default: 1\r\n },\r\n incrementMinutes: {\r\n type: Number,\r\n default: 1\r\n },\r\n incrementSeconds: {\r\n type: Number,\r\n default: 1\r\n },\r\n timeFormatter: {\r\n type: Function,\r\n default: (date, vm) => {\r\n const timeFormatter = getValueByPath(getOptions(), 'timepicker.timeFormatter', undefined);\r\n if (typeof timeFormatter === 'function') {\r\n return timeFormatter(date);\r\n }\r\n else {\r\n return defaultTimeFormatter(date, vm);\r\n }\r\n }\r\n },\r\n timeParser: {\r\n type: Function,\r\n default: (date, vm) => {\r\n const timeParser = getValueByPath(getOptions(), 'timepicker.timeParser', undefined);\r\n if (typeof timeParser === 'function') {\r\n return timeParser(date);\r\n }\r\n else {\r\n return defaultTimeParser(date, vm);\r\n }\r\n }\r\n },\r\n mobileNative: {\r\n type: Boolean,\r\n default: () => {\r\n return getValueByPath(getOptions(), 'timepicker.mobileNative', true);\r\n }\r\n },\r\n timeCreator: {\r\n type: Function,\r\n default: () => {\r\n const timeCreator = getValueByPath(getOptions(), 'timepicker.timeCreator', undefined);\r\n if (typeof timeCreator === 'function') {\r\n return timeCreator();\r\n }\r\n else {\r\n return new Date();\r\n }\r\n }\r\n },\r\n position: String,\r\n unselectableTimes: Array,\r\n openOnFocus: Boolean,\r\n enableSeconds: Boolean,\r\n defaultMinutes: Number,\r\n defaultSeconds: Number,\r\n appendToBody: Boolean,\r\n resetOnMeridianChange: {\r\n type: Boolean,\r\n default: false\r\n }\r\n },\r\n data() {\r\n return {\r\n dateSelected: this.modelValue,\r\n hoursSelected: null,\r\n minutesSelected: null,\r\n secondsSelected: null,\r\n meridienSelected: null,\r\n _elementRef: 'input'\r\n };\r\n },\r\n computed: {\r\n computedValue: {\r\n get() {\r\n return this.dateSelected;\r\n },\r\n set(value) {\r\n this.dateSelected = value;\r\n this.$emit('update:modelValue', this.dateSelected);\r\n }\r\n },\r\n localeOptions() {\r\n return new Intl.DateTimeFormat(this.locale, {\r\n hour: 'numeric',\r\n minute: 'numeric',\r\n second: this.enableSeconds ? 'numeric' : undefined\r\n }).resolvedOptions();\r\n },\r\n dtf() {\r\n return new Intl.DateTimeFormat(this.locale, {\r\n hour: this.localeOptions.hour || 'numeric',\r\n minute: this.localeOptions.minute || 'numeric',\r\n second: this.enableSeconds ? this.localeOptions.second || 'numeric' : undefined,\r\n // @ts-ignore to update types\r\n hourCycle: !this.isHourFormat24 ? 'h12' : 'h23'\r\n });\r\n },\r\n newHourFormat() {\r\n return this.hourFormat || (this.localeOptions.hour12 ? HOUR_FORMAT_12 : HOUR_FORMAT_24);\r\n },\r\n sampleTime() {\r\n let d = this.timeCreator();\r\n d.setHours(10);\r\n d.setSeconds(0);\r\n d.setMinutes(0);\r\n d.setMilliseconds(0);\r\n return d;\r\n },\r\n hourLiteral() {\r\n if (this.dtf.formatToParts && typeof this.dtf.formatToParts === 'function') {\r\n let d = this.sampleTime;\r\n const parts = this.dtf.formatToParts(d);\r\n const literal = parts.find((part, idx) => (idx > 0 && parts[idx - 1].type === 'hour'));\r\n if (literal) {\r\n return literal.value;\r\n }\r\n }\r\n return ':';\r\n },\r\n minuteLiteral() {\r\n if (this.dtf.formatToParts && typeof this.dtf.formatToParts === 'function') {\r\n let d = this.sampleTime;\r\n const parts = this.dtf.formatToParts(d);\r\n const literal = parts.find((part, idx) => (idx > 0 && parts[idx - 1].type === 'minute'));\r\n if (literal) {\r\n return literal.value;\r\n }\r\n }\r\n return ':';\r\n },\r\n secondLiteral() {\r\n if (this.dtf.formatToParts && typeof this.dtf.formatToParts === 'function') {\r\n let d = this.sampleTime;\r\n const parts = this.dtf.formatToParts(d);\r\n const literal = parts.find((part, idx) => (idx > 0 && parts[idx - 1].type === 'second'));\r\n if (literal) {\r\n return literal.value;\r\n }\r\n }\r\n },\r\n amString() {\r\n if (this.dtf.formatToParts && typeof this.dtf.formatToParts === 'function') {\r\n let d = this.sampleTime;\r\n d.setHours(10);\r\n const dayPeriod = this.dtf.formatToParts(d).find((part) => part.type === 'dayPeriod');\r\n if (dayPeriod) {\r\n return dayPeriod.value;\r\n }\r\n }\r\n return AM;\r\n },\r\n pmString() {\r\n if (this.dtf.formatToParts && typeof this.dtf.formatToParts === 'function') {\r\n let d = this.sampleTime;\r\n d.setHours(20);\r\n const dayPeriod = this.dtf.formatToParts(d).find((part) => part.type === 'dayPeriod');\r\n if (dayPeriod) {\r\n return dayPeriod.value;\r\n }\r\n }\r\n return PM;\r\n },\r\n hours() {\r\n if (!this.incrementHours || this.incrementHours < 1)\r\n throw new Error('Hour increment cannot be null or less than 1.');\r\n const hours = [];\r\n const numberOfHours = this.isHourFormat24 ? 24 : 12;\r\n for (let i = 0; i < numberOfHours; i += this.incrementHours) {\r\n let value = i;\r\n let label = value;\r\n if (!this.isHourFormat24) {\r\n value = (i + 1);\r\n label = value;\r\n if (this.meridienSelected === this.amString) {\r\n if (value === 12) {\r\n value = 0;\r\n }\r\n }\r\n else if (this.meridienSelected === this.pmString) {\r\n if (value !== 12) {\r\n value += 12;\r\n }\r\n }\r\n }\r\n hours.push({\r\n label: this.formatNumber(label),\r\n value: value\r\n });\r\n }\r\n return hours;\r\n },\r\n minutes() {\r\n if (!this.incrementMinutes || this.incrementMinutes < 1)\r\n throw new Error('Minute increment cannot be null or less than 1.');\r\n const minutes = [];\r\n for (let i = 0; i < 60; i += this.incrementMinutes) {\r\n minutes.push({\r\n label: this.formatNumber(i, true),\r\n value: i\r\n });\r\n }\r\n return minutes;\r\n },\r\n seconds() {\r\n if (!this.incrementSeconds || this.incrementSeconds < 1)\r\n throw new Error('Second increment cannot be null or less than 1.');\r\n const seconds = [];\r\n for (let i = 0; i < 60; i += this.incrementSeconds) {\r\n seconds.push({\r\n label: this.formatNumber(i, true),\r\n value: i\r\n });\r\n }\r\n return seconds;\r\n },\r\n meridiens() {\r\n return [this.amString, this.pmString];\r\n },\r\n isMobile() {\r\n return this.mobileNative && isMobile.any();\r\n },\r\n isHourFormat24() {\r\n return this.newHourFormat === HOUR_FORMAT_24;\r\n }\r\n },\r\n watch: {\r\n hourFormat() {\r\n if (this.hoursSelected !== null) {\r\n this.meridienSelected = this.hoursSelected >= 12 ? this.pmString : this.amString;\r\n }\r\n },\r\n locale() {\r\n // see updateInternalState default\r\n if (!this.value) {\r\n this.meridienSelected = this.amString;\r\n }\r\n },\r\n /**\r\n * When v-model is changed:\r\n * 1. Update internal value.\r\n * 2. If it's invalid, validate again.\r\n */\r\n modelValue: {\r\n handler(value) {\r\n this.updateInternalState(value);\r\n !this.isValid && this.$refs.input.checkHtml5Validity();\r\n },\r\n immediate: true\r\n }\r\n },\r\n methods: {\r\n onMeridienChange(value) {\r\n if (this.hoursSelected !== null && this.resetOnMeridianChange) {\r\n this.hoursSelected = null;\r\n this.minutesSelected = null;\r\n this.secondsSelected = null;\r\n this.computedValue = null;\r\n }\r\n else if (this.hoursSelected !== null) {\r\n if (value === this.pmString) {\r\n this.hoursSelected += 12;\r\n }\r\n else if (value === this.amString) {\r\n this.hoursSelected -= 12;\r\n }\r\n }\r\n this.updateDateSelected(this.hoursSelected, this.minutesSelected, this.enableSeconds ? this.secondsSelected : 0, value);\r\n },\r\n onHoursChange(value) {\r\n if (!this.minutesSelected && typeof this.defaultMinutes !== 'undefined') {\r\n this.minutesSelected = this.defaultMinutes;\r\n }\r\n if (!this.secondsSelected && typeof this.defaultSeconds !== 'undefined') {\r\n this.secondsSelected = this.defaultSeconds;\r\n }\r\n this.updateDateSelected(parseInt(value, 10), this.minutesSelected, this.enableSeconds ? this.secondsSelected : 0, this.meridienSelected);\r\n },\r\n onMinutesChange(value) {\r\n if (!this.secondsSelected && this.defaultSeconds) {\r\n this.secondsSelected = this.defaultSeconds;\r\n }\r\n this.updateDateSelected(this.hoursSelected, parseInt(value, 10), this.enableSeconds ? this.secondsSelected : 0, this.meridienSelected);\r\n },\r\n onSecondsChange(value) {\r\n this.updateDateSelected(this.hoursSelected, this.minutesSelected, parseInt(value, 10), this.meridienSelected);\r\n },\r\n updateDateSelected(hours, minutes, seconds, meridiens) {\r\n if (hours != null && minutes != null &&\r\n ((!this.isHourFormat24 && meridiens !== null) || this.isHourFormat24)) {\r\n let time = null;\r\n if (this.computedValue && !isNaN(this.computedValue)) {\r\n time = new Date(this.computedValue);\r\n }\r\n else {\r\n time = this.timeCreator();\r\n time.setMilliseconds(0);\r\n }\r\n time.setHours(hours);\r\n time.setMinutes(minutes);\r\n time.setSeconds(seconds);\r\n if (!isNaN(time.getTime())) {\r\n this.computedValue = new Date(time.getTime());\r\n }\r\n }\r\n },\r\n updateInternalState(value) {\r\n if (value) {\r\n this.hoursSelected = value.getHours();\r\n this.minutesSelected = value.getMinutes();\r\n this.secondsSelected = value.getSeconds();\r\n this.meridienSelected = value.getHours() >= 12 ? this.pmString : this.amString;\r\n }\r\n else {\r\n this.hoursSelected = null;\r\n this.minutesSelected = null;\r\n this.secondsSelected = null;\r\n this.meridienSelected = this.amString;\r\n }\r\n this.dateSelected = value;\r\n },\r\n isHourDisabled(hour) {\r\n let disabled = false;\r\n if (this.minTime) {\r\n const minHours = this.minTime.getHours();\r\n const noMinutesAvailable = this.minutes.every((minute) => {\r\n return this.isMinuteDisabledForHour(hour, minute.value);\r\n });\r\n disabled = hour < minHours || noMinutesAvailable;\r\n }\r\n if (this.maxTime) {\r\n if (!disabled) {\r\n const maxHours = this.maxTime.getHours();\r\n disabled = hour > maxHours;\r\n }\r\n }\r\n if (this.unselectableTimes) {\r\n if (!disabled) {\r\n const unselectable = this.unselectableTimes.filter((time) => {\r\n if (this.enableSeconds && this.secondsSelected !== null) {\r\n return time.getHours() === hour &&\r\n time.getMinutes() === this.minutesSelected &&\r\n time.getSeconds() === this.secondsSelected;\r\n }\r\n else if (this.minutesSelected !== null) {\r\n return time.getHours() === hour &&\r\n time.getMinutes() === this.minutesSelected;\r\n }\r\n return false;\r\n });\r\n if (unselectable.length > 0) {\r\n disabled = true;\r\n }\r\n else {\r\n disabled = this.minutes.every((minute) => {\r\n return this.unselectableTimes.filter((time) => {\r\n return time.getHours() === hour &&\r\n time.getMinutes() === minute.value;\r\n }).length > 0;\r\n });\r\n }\r\n }\r\n }\r\n return disabled;\r\n },\r\n isMinuteDisabledForHour(hour, minute) {\r\n let disabled = false;\r\n if (this.minTime) {\r\n const minHours = this.minTime.getHours();\r\n const minMinutes = this.minTime.getMinutes();\r\n disabled = hour === minHours && minute < minMinutes;\r\n }\r\n if (this.maxTime) {\r\n if (!disabled) {\r\n const maxHours = this.maxTime.getHours();\r\n const maxMinutes = this.maxTime.getMinutes();\r\n disabled = hour === maxHours && minute > maxMinutes;\r\n }\r\n }\r\n return disabled;\r\n },\r\n isMinuteDisabled(minute) {\r\n let disabled = false;\r\n if (this.hoursSelected !== null) {\r\n if (this.isHourDisabled(this.hoursSelected)) {\r\n disabled = true;\r\n }\r\n else {\r\n disabled = this.isMinuteDisabledForHour(this.hoursSelected, minute);\r\n }\r\n if (this.unselectableTimes) {\r\n if (!disabled) {\r\n const unselectable = this.unselectableTimes.filter((time) => {\r\n if (this.enableSeconds && this.secondsSelected !== null) {\r\n return time.getHours() === this.hoursSelected &&\r\n time.getMinutes() === minute &&\r\n time.getSeconds() === this.secondsSelected;\r\n }\r\n else {\r\n return time.getHours() === this.hoursSelected &&\r\n time.getMinutes() === minute;\r\n }\r\n });\r\n disabled = unselectable.length > 0;\r\n }\r\n }\r\n }\r\n return disabled;\r\n },\r\n isSecondDisabled(second) {\r\n let disabled = false;\r\n if (this.minutesSelected !== null) {\r\n if (this.isMinuteDisabled(this.minutesSelected)) {\r\n disabled = true;\r\n }\r\n else {\r\n if (this.minTime) {\r\n const minHours = this.minTime.getHours();\r\n const minMinutes = this.minTime.getMinutes();\r\n const minSeconds = this.minTime.getSeconds();\r\n disabled = this.hoursSelected === minHours &&\r\n this.minutesSelected === minMinutes &&\r\n second < minSeconds;\r\n }\r\n if (this.maxTime) {\r\n if (!disabled) {\r\n const maxHours = this.maxTime.getHours();\r\n const maxMinutes = this.maxTime.getMinutes();\r\n const maxSeconds = this.maxTime.getSeconds();\r\n disabled = this.hoursSelected === maxHours &&\r\n this.minutesSelected === maxMinutes &&\r\n second > maxSeconds;\r\n }\r\n }\r\n }\r\n if (this.unselectableTimes) {\r\n if (!disabled) {\r\n const unselectable = this.unselectableTimes.filter((time) => {\r\n return time.getHours() === this.hoursSelected &&\r\n time.getMinutes() === this.minutesSelected &&\r\n time.getSeconds() === second;\r\n });\r\n disabled = unselectable.length > 0;\r\n }\r\n }\r\n }\r\n return disabled;\r\n },\r\n isMeridienDisabled(meridienString) {\r\n const offset = meridienString == \"AM\" ? 0 : 12;\r\n for (let i = 0; i < 12; i++) {\r\n if (!this.isHourDisabled(i + offset)) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n },\r\n /*\r\n * Parse string into date\r\n */\r\n onChange(value) {\r\n const date = this.timeParser(value, this);\r\n this.updateInternalState(date);\r\n if (date && !isNaN(date)) {\r\n this.computedValue = date;\r\n }\r\n else {\r\n // Force refresh input value when not valid date\r\n this.computedValue = null;\r\n this.$refs.input.newValue = this.computedValue;\r\n }\r\n },\r\n /*\r\n * Toggle timepicker\r\n */\r\n toggle(active) {\r\n if (this.$refs.dropdown) {\r\n this.$refs.dropdown.isActive = typeof active === 'boolean'\r\n ? active\r\n : !this.$refs.dropdown.isActive;\r\n }\r\n },\r\n /*\r\n * Close timepicker\r\n */\r\n close() {\r\n this.toggle(false);\r\n },\r\n /*\r\n * Call default onFocus method and show timepicker\r\n */\r\n handleOnFocus() {\r\n this.onFocus();\r\n if (this.openOnFocus) {\r\n this.toggle(true);\r\n }\r\n },\r\n /*\r\n * Format date into string 'HH-MM-SS'\r\n */\r\n formatHHMMSS(value) {\r\n const date = new Date(value);\r\n if (value && !isNaN(date.getTime())) {\r\n const hours = date.getHours();\r\n const minutes = date.getMinutes();\r\n const seconds = date.getSeconds();\r\n return this.formatNumber(hours, true) + ':' +\r\n this.formatNumber(minutes, true) + ':' +\r\n this.formatNumber(seconds, true);\r\n }\r\n return '';\r\n },\r\n /*\r\n * Parse time from string\r\n */\r\n onChangeNativePicker(event) {\r\n const date = event.target.value;\r\n if (date) {\r\n let time = null;\r\n if (this.computedValue && !isNaN(this.computedValue)) {\r\n time = new Date(this.computedValue);\r\n }\r\n else {\r\n time = new Date();\r\n time.setMilliseconds(0);\r\n }\r\n const t = date.split(':');\r\n time.setHours(parseInt(t[0], 10));\r\n time.setMinutes(parseInt(t[1], 10));\r\n time.setSeconds(t[2] ? parseInt(t[2], 10) : 0);\r\n this.computedValue = new Date(time.getTime());\r\n }\r\n else {\r\n this.computedValue = null;\r\n }\r\n },\r\n formatNumber(value, prependZero) {\r\n return this.isHourFormat24 || prependZero\r\n ? this.pad(value)\r\n : value;\r\n },\r\n pad(value) {\r\n return (value < 10 ? '0' : '') + value;\r\n },\r\n /*\r\n * Format date into string\r\n */\r\n formatValue(date) {\r\n if (date && !isNaN(date)) {\r\n return this.timeFormatter(date, this);\r\n }\r\n else {\r\n return null;\r\n }\r\n },\r\n /**\r\n * Keypress event that is bound to the document.\r\n */\r\n keyPress({ key }) {\r\n if (this.$refs.dropdown && this.$refs.dropdown.isActive && (key === 'Escape' || key === 'Esc')) {\r\n this.toggle(false);\r\n }\r\n },\r\n /**\r\n * Emit 'blur' event on dropdown is not active (closed)\r\n */\r\n onActiveChange(value) {\r\n if (!value) {\r\n this.onBlur();\r\n }\r\n }\r\n },\r\n created() {\r\n if (typeof window !== 'undefined') {\r\n document.addEventListener('keyup', this.keyPress);\r\n }\r\n },\r\n beforeUnmount() {\r\n if (typeof window !== 'undefined') {\r\n document.removeEventListener('keyup', this.keyPress);\r\n }\r\n }\r\n});\n\n/**\r\n * An input with a simple dropdown/modal for selecting a time, uses native timepicker for mobile\r\n * @displayName Timepicker\r\n * @style _timepicker.scss\r\n */\r\nvar script = defineComponent({\r\n name: 'OTimepicker',\r\n components: {\r\n [script$1.name]: script$1,\r\n [script$2.name]: script$2,\r\n [script$3.name]: script$3,\r\n [script$4.name]: script$4,\r\n [script$5.name]: script$5\r\n },\r\n configField: 'timepicker',\r\n mixins: [BaseComponentMixin, TimepickerMixin, MatchMediaMixin],\r\n inheritAttrs: false,\r\n props: {\r\n rootClass: [String, Function, Array],\r\n sizeClass: [String, Function, Array],\r\n boxClass: [String, Function, Array],\r\n separatorClass: [String, Function, Array],\r\n footerClass: [String, Function, Array],\r\n inputClasses: {\r\n type: Object,\r\n default: () => {\r\n return getValueByPath(getOptions(), 'timepicker.inputClasses', {});\r\n }\r\n },\r\n dropdownClasses: {\r\n type: Object,\r\n default: () => {\r\n return getValueByPath(getOptions(), 'timepicker.dropdownClasses', {});\r\n }\r\n },\r\n selectClasses: {\r\n type: Object,\r\n default: () => {\r\n return getValueByPath(getOptions(), 'timepicker.selectClasses', {});\r\n }\r\n }\r\n },\r\n computed: {\r\n inputBind() {\r\n return {\r\n ...this.$attrs,\r\n ...this.inputClasses\r\n };\r\n },\r\n dropdownBind() {\r\n return {\r\n 'root-class': this.computedClass('dropdownClasses.rootClass', 'o-tpck__dropdown'),\r\n ...this.dropdownClasses\r\n };\r\n },\r\n selectBind() {\r\n return {\r\n 'select-class': this.computedClass('selectClasses.selectClass', 'o-tpck__select'),\r\n 'placeholder-class': this.computedClass('selectClasses.placeholderClass', 'o-tpck__select-placeholder'),\r\n ...this.selectClasses\r\n };\r\n },\r\n rootClasses() {\r\n return [\r\n this.computedClass('rootClass', 'o-tpck'),\r\n { [this.computedClass('sizeClass', 'o-tpck--', this.size)]: this.size },\r\n { [this.computedClass('mobileClass', 'o-tpck--mobile')]: this.isMatchMedia },\r\n ];\r\n },\r\n boxClasses() {\r\n return [\r\n this.computedClass('boxClass', 'o-tpck__box')\r\n ];\r\n },\r\n separatorClasses() {\r\n return [\r\n this.computedClass('separatorClass', 'o-tpck__separator')\r\n ];\r\n },\r\n footerClasses() {\r\n return [\r\n this.computedClass('footerClass', 'o-tpck__footer')\r\n ];\r\n },\r\n nativeStep() {\r\n if (this.enableSeconds)\r\n return '1';\r\n return null;\r\n }\r\n }\r\n});\n\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n const _component_o_input = resolveComponent(\"o-input\");\n\n const _component_o_select = resolveComponent(\"o-select\");\n\n const _component_o_dropdown_item = resolveComponent(\"o-dropdown-item\");\n\n const _component_o_dropdown = resolveComponent(\"o-dropdown\");\n\n return openBlock(), createBlock(\"div\", {\n class: _ctx.rootClasses\n }, [!_ctx.isMobile || _ctx.inline ? createVNode(_component_o_dropdown, mergeProps({\n key: 0,\n ref: \"dropdown\"\n }, _ctx.dropdownBind, {\n position: _ctx.position,\n disabled: _ctx.disabled,\n inline: _ctx.inline,\n \"append-to-body\": _ctx.appendToBody,\n \"append-to-body-copy-parent\": \"\",\n \"onActive-change\": _ctx.onActiveChange\n }), createSlots({\n default: withCtx(() => [createVNode(_component_o_dropdown_item, {\n override: \"\",\n tag: \"div\",\n \"item-class\": _ctx.boxClasses,\n disabled: _ctx.disabled,\n clickable: false\n }, {\n default: withCtx(() => [createVNode(_component_o_select, mergeProps({\n override: \"\"\n }, _ctx.selectBind, {\n modelValue: _ctx.hoursSelected,\n \"onUpdate:modelValue\": _cache[3] || (_cache[3] = $event => _ctx.hoursSelected = $event),\n onChange: _cache[4] || (_cache[4] = $event => _ctx.onHoursChange($event.target.value)),\n disabled: _ctx.disabled,\n placeholder: \"00\"\n }), {\n default: withCtx(() => [(openBlock(true), createBlock(Fragment, null, renderList(_ctx.hours, hour => {\n return openBlock(), createBlock(\"option\", {\n value: hour.value,\n key: hour.value,\n disabled: _ctx.isHourDisabled(hour.value)\n }, toDisplayString(hour.label), 9\n /* TEXT, PROPS */\n , [\"value\", \"disabled\"]);\n }), 128\n /* KEYED_FRAGMENT */\n ))]),\n _: 1\n }, 16\n /* FULL_PROPS */\n , [\"modelValue\", \"disabled\"]), createVNode(\"span\", {\n class: _ctx.separatorClasses\n }, toDisplayString(_ctx.hourLiteral), 3\n /* TEXT, CLASS */\n ), createVNode(_component_o_select, mergeProps({\n override: \"\"\n }, _ctx.selectBind, {\n modelValue: _ctx.minutesSelected,\n \"onUpdate:modelValue\": _cache[5] || (_cache[5] = $event => _ctx.minutesSelected = $event),\n onChange: _cache[6] || (_cache[6] = $event => _ctx.onMinutesChange($event.target.value)),\n disabled: _ctx.disabled,\n placeholder: \"00\"\n }), {\n default: withCtx(() => [(openBlock(true), createBlock(Fragment, null, renderList(_ctx.minutes, minute => {\n return openBlock(), createBlock(\"option\", {\n value: minute.value,\n key: minute.value,\n disabled: _ctx.isMinuteDisabled(minute.value)\n }, toDisplayString(minute.label), 9\n /* TEXT, PROPS */\n , [\"value\", \"disabled\"]);\n }), 128\n /* KEYED_FRAGMENT */\n ))]),\n _: 1\n }, 16\n /* FULL_PROPS */\n , [\"modelValue\", \"disabled\"]), _ctx.enableSeconds ? (openBlock(), createBlock(Fragment, {\n key: 0\n }, [createVNode(\"span\", {\n class: _ctx.separatorClasses\n }, toDisplayString(_ctx.minuteLiteral), 3\n /* TEXT, CLASS */\n ), createVNode(_component_o_select, mergeProps({\n override: \"\"\n }, _ctx.selectBind, {\n modelValue: _ctx.secondsSelected,\n \"onUpdate:modelValue\": _cache[7] || (_cache[7] = $event => _ctx.secondsSelected = $event),\n onChange: _cache[8] || (_cache[8] = $event => _ctx.onSecondsChange($event.target.value)),\n disabled: _ctx.disabled,\n placeholder: \"00\"\n }), {\n default: withCtx(() => [(openBlock(true), createBlock(Fragment, null, renderList(_ctx.seconds, second => {\n return openBlock(), createBlock(\"option\", {\n value: second.value,\n key: second.value,\n disabled: _ctx.isSecondDisabled(second.value)\n }, toDisplayString(second.label), 9\n /* TEXT, PROPS */\n , [\"value\", \"disabled\"]);\n }), 128\n /* KEYED_FRAGMENT */\n ))]),\n _: 1\n }, 16\n /* FULL_PROPS */\n , [\"modelValue\", \"disabled\"]), createVNode(\"span\", {\n class: _ctx.separatorClasses\n }, toDisplayString(_ctx.secondLiteral), 3\n /* TEXT, CLASS */\n )], 64\n /* STABLE_FRAGMENT */\n )) : createCommentVNode(\"v-if\", true), !_ctx.isHourFormat24 ? createVNode(_component_o_select, mergeProps({\n key: 1,\n override: \"\"\n }, _ctx.selectBind, {\n modelValue: _ctx.meridienSelected,\n \"onUpdate:modelValue\": _cache[9] || (_cache[9] = $event => _ctx.meridienSelected = $event),\n onChange: _cache[10] || (_cache[10] = $event => _ctx.onMeridienChange($event.target.value)),\n disabled: _ctx.disabled\n }), {\n default: withCtx(() => [(openBlock(true), createBlock(Fragment, null, renderList(_ctx.meridiens, meridien => {\n return openBlock(), createBlock(\"option\", {\n value: meridien,\n key: meridien,\n disabled: _ctx.isMeridienDisabled(meridien)\n }, toDisplayString(meridien), 9\n /* TEXT, PROPS */\n , [\"value\", \"disabled\"]);\n }), 128\n /* KEYED_FRAGMENT */\n ))]),\n _: 1\n }, 16\n /* FULL_PROPS */\n , [\"modelValue\", \"disabled\"]) : createCommentVNode(\"v-if\", true), _ctx.$slots.default !== undefined ? (openBlock(), createBlock(\"footer\", {\n key: 2,\n class: _ctx.footerClasses\n }, [renderSlot(_ctx.$slots, \"default\")], 2\n /* CLASS */\n )) : createCommentVNode(\"v-if\", true)]),\n _: 1\n }, 8\n /* PROPS */\n , [\"item-class\", \"disabled\"])]),\n _: 2\n }, [!_ctx.inline ? {\n name: \"trigger\",\n fn: withCtx(() => [renderSlot(_ctx.$slots, \"trigger\", {}, () => [createVNode(_component_o_input, mergeProps({\n ref: \"input\",\n \"model-value\": _ctx.formatValue(_ctx.computedValue),\n autocomplete: \"off\",\n placeholder: _ctx.placeholder,\n size: _ctx.size,\n icon: _ctx.icon,\n \"icon-pack\": _ctx.iconPack,\n disabled: _ctx.disabled,\n readonly: !_ctx.editable,\n rounded: _ctx.rounded\n }, _ctx.inputBind, {\n \"use-html5-validation\": _ctx.useHtml5Validation,\n onKeyup: _cache[1] || (_cache[1] = withKeys($event => _ctx.toggle(true), [\"enter\"])),\n onChange: _cache[2] || (_cache[2] = $event => _ctx.onChange($event.target.value)),\n onFocus: _ctx.handleOnFocus\n }), null, 16\n /* FULL_PROPS */\n , [\"model-value\", \"placeholder\", \"size\", \"icon\", \"icon-pack\", \"disabled\", \"readonly\", \"rounded\", \"use-html5-validation\", \"onFocus\"])])])\n } : undefined]), 1040\n /* FULL_PROPS, DYNAMIC_SLOTS */\n , [\"position\", \"disabled\", \"inline\", \"append-to-body\", \"onActive-change\"]) : createVNode(_component_o_input, mergeProps({\n key: 1,\n ref: \"input\"\n }, _ctx.inputBind, {\n type: \"time\",\n step: _ctx.nativeStep,\n autocomplete: \"off\",\n value: _ctx.formatHHMMSS(_ctx.computedValue),\n placeholder: _ctx.placeholder,\n size: _ctx.size,\n icon: _ctx.icon,\n \"icon-pack\": _ctx.iconPack,\n rounded: _ctx.rounded,\n max: _ctx.formatHHMMSS(_ctx.maxTime),\n min: _ctx.formatHHMMSS(_ctx.minTime),\n disabled: _ctx.disabled,\n readonly: false,\n \"use-html5-validation\": _ctx.useHtml5Validation,\n onChange: _cache[11] || (_cache[11] = $event => _ctx.onChange($event.target.value)),\n onFocus: _ctx.handleOnFocus,\n onBlur: _cache[12] || (_cache[12] = $event => _ctx.onBlur() && _ctx.checkHtml5Validity())\n }), null, 16\n /* FULL_PROPS */\n , [\"step\", \"value\", \"placeholder\", \"size\", \"icon\", \"icon-pack\", \"rounded\", \"max\", \"min\", \"disabled\", \"use-html5-validation\", \"onFocus\"])], 2\n /* CLASS */\n );\n}\n\nscript.render = render;\nscript.__file = \"src/components/timepicker/Timepicker.vue\";\n\nexport { script as s };\n","import { defineComponent, resolveComponent, createVNode, mergeProps, withCtx, renderSlot, createCommentVNode } from 'vue';\nimport { getValueByPath, isMobile, matchWithGroups } from './helpers.mjs';\nimport { getOptions } from './config.mjs';\nimport { B as BaseComponentMixin, b as registerComponent } from './plugins-ba5e2464.mjs';\nimport './Icon-a7b85e86.mjs';\nimport { F as FormElementMixin } from './FormElementMixin-29581863.mjs';\nimport './Input-19e906a1.mjs';\nimport './MatchMediaMixin-09b141ca.mjs';\nimport './trapFocus-dc03669f.mjs';\nimport './DropdownItem-c744c4e9.mjs';\nimport './Field-937b4591.mjs';\nimport './Select-2cca695f.mjs';\nimport { s as script$1 } from './Datepicker-42aca091.mjs';\nimport { s as script$2 } from './Timepicker-c2f10909.mjs';\n\nconst AM = 'AM';\r\nconst PM = 'PM';\r\n/**\r\n * An input with a simple dropdown/modal for selecting a date and time, uses native datetimepicker for mobile\r\n * @displayName Datetimepicker\r\n * @style _datetimepicker.scss\r\n */\r\nvar script = defineComponent({\r\n name: 'ODatetimepicker',\r\n components: {\r\n [script$1.name]: script$1,\r\n [script$2.name]: script$2\r\n },\r\n configField: 'datetimepicker',\r\n mixins: [FormElementMixin, BaseComponentMixin],\r\n inheritAttrs: false,\r\n emits: ['update:modelValue', 'change-year', 'change-month', 'icon-right-click', 'active-change'],\r\n props: {\r\n modelValue: {\r\n type: Date\r\n },\r\n editable: {\r\n type: Boolean,\r\n default: false\r\n },\r\n size: String,\r\n placeholder: String,\r\n disabled: Boolean,\r\n iconRight: String,\r\n iconRightClickable: Boolean,\r\n inline: Boolean,\r\n openOnFocus: Boolean,\r\n position: String,\r\n mobileNative: {\r\n type: Boolean,\r\n default: true\r\n },\r\n minDatetime: Date,\r\n maxDatetime: Date,\r\n datetimeFormatter: {\r\n type: Function\r\n },\r\n datetimeParser: {\r\n type: Function\r\n },\r\n datetimeCreator: {\r\n type: Function,\r\n default: (date) => {\r\n const datetimeCreator = getValueByPath(getOptions(), 'datetimepicker.datetimeCreator', undefined);\r\n if (typeof datetimeCreator === 'function') {\r\n return datetimeCreator(date);\r\n }\r\n else {\r\n return date;\r\n }\r\n }\r\n },\r\n datepicker: Object,\r\n timepicker: Object,\r\n locale: {\r\n type: [String, Array],\r\n default: () => {\r\n return getValueByPath(getOptions(), 'locale');\r\n }\r\n },\r\n appendToBody: Boolean,\r\n datepickerWrapperClass: [String, Function, Array],\r\n timepickerWrapperClass: [String, Function, Array],\r\n },\r\n data() {\r\n return {\r\n newValue: this.modelValue\r\n };\r\n },\r\n computed: {\r\n datepickerWrapperClasses() {\r\n return [\r\n this.computedClass('datepickerWrapperClass', 'o-dtpck__date')\r\n ];\r\n },\r\n timepickerWrapperClasses() {\r\n return [\r\n this.computedClass('timepickerWrapperClass', 'o-dtpck__time')\r\n ];\r\n },\r\n computedValue: {\r\n get() {\r\n return this.newValue;\r\n },\r\n set(value) {\r\n if (value) {\r\n let val = new Date(value.getTime());\r\n if (this.newValue) {\r\n // restore time part\r\n if ((value.getDate() !== this.newValue.getDate() ||\r\n value.getMonth() !== this.newValue.getMonth() ||\r\n value.getFullYear() !== this.newValue.getFullYear()) &&\r\n value.getHours() === 0 &&\r\n value.getMinutes() === 0 &&\r\n value.getSeconds() === 0) {\r\n val.setHours(this.newValue.getHours(), this.newValue.getMinutes(), this.newValue.getSeconds(), 0);\r\n }\r\n }\r\n else {\r\n val = this.datetimeCreator(value);\r\n }\r\n // check min and max range\r\n if (this.minDatetime && val < this.minDatetime) {\r\n val = this.minDatetime;\r\n }\r\n else if (this.maxDatetime && val > this.maxDatetime) {\r\n val = this.maxDatetime;\r\n }\r\n this.newValue = new Date(val.getTime());\r\n }\r\n else {\r\n this.newValue = value;\r\n }\r\n this.$emit('update:modelValue', this.newValue);\r\n }\r\n },\r\n localeOptions() {\r\n return new Intl.DateTimeFormat(this.locale, {\r\n year: 'numeric',\r\n month: 'numeric',\r\n day: 'numeric',\r\n hour: 'numeric',\r\n minute: 'numeric',\r\n second: this.enableSeconds() ? 'numeric' : undefined\r\n }).resolvedOptions();\r\n },\r\n dtf() {\r\n return new Intl.DateTimeFormat(this.locale, {\r\n year: this.localeOptions.year || 'numeric',\r\n month: this.localeOptions.month || 'numeric',\r\n day: this.localeOptions.day || 'numeric',\r\n hour: this.localeOptions.hour || 'numeric',\r\n minute: this.localeOptions.minute || 'numeric',\r\n second: this.enableSeconds() ? this.localeOptions.second || 'numeric' : undefined,\r\n // @ts-ignore to update types\r\n hourCycle: !this.isHourFormat24() ? 'h12' : 'h23'\r\n });\r\n },\r\n isMobileNative() {\r\n return this.mobileNative;\r\n },\r\n isMobile() {\r\n return this.isMobileNative && isMobile.any();\r\n },\r\n minDate() {\r\n if (!this.minDatetime) {\r\n return this.datepicker ? this.datepicker.minDate : null;\r\n }\r\n return new Date(this.minDatetime.getFullYear(), this.minDatetime.getMonth(), this.minDatetime.getDate(), 0, 0, 0, 0);\r\n },\r\n maxDate() {\r\n if (!this.maxDatetime) {\r\n return this.datepicker ? this.datepicker.maxDate : null;\r\n }\r\n return new Date(this.maxDatetime.getFullYear(), this.maxDatetime.getMonth(), this.maxDatetime.getDate(), 0, 0, 0, 0);\r\n },\r\n // Only enable min/max time if local (not necessarily UTC) date portion matches\r\n minTime() {\r\n if (!this.minDatetime || (this.newValue === null || typeof this.newValue === 'undefined')\r\n || this.newValue.getFullYear() != this.minDatetime.getFullYear()\r\n || this.newValue.getMonth() != this.minDatetime.getMonth()\r\n || this.newValue.getDate() != this.minDatetime.getDate()) {\r\n return this.timepicker ? this.timepicker.minTime : null;\r\n }\r\n return this.minDatetime;\r\n },\r\n maxTime() {\r\n if (!this.maxDatetime || (this.newValue === null || typeof this.newValue === 'undefined')\r\n || this.newValue.getFullYear() != this.maxDatetime.getFullYear()\r\n || this.newValue.getMonth() != this.maxDatetime.getMonth()\r\n || this.newValue.getDate() != this.maxDatetime.getDate()) {\r\n return this.timepicker ? this.timepicker.maxTime : null;\r\n }\r\n return this.maxDatetime;\r\n },\r\n datepickerSize() {\r\n return this.datepicker && this.datepicker.size\r\n ? this.datepicker.size : this.size;\r\n },\r\n timepickerSize() {\r\n return this.timepicker && this.timepicker.size\r\n ? this.timepicker.size : this.size;\r\n },\r\n timepickerDisabled() {\r\n return this.timepicker && this.timepicker.disabled\r\n ? this.timepicker.disabled : this.disabled;\r\n }\r\n },\r\n watch: {\r\n modelValue(value) {\r\n this.newValue = value;\r\n }\r\n },\r\n methods: {\r\n enableSeconds() {\r\n if (this.$refs.timepicker) {\r\n return this.$refs.timepicker.enableSeconds;\r\n }\r\n return false;\r\n },\r\n isHourFormat24() {\r\n if (this.$refs.timepicker) {\r\n return this.$refs.timepicker.isHourFormat24;\r\n }\r\n return !this.localeOptions.hour12;\r\n },\r\n defaultDatetimeParser(date) {\r\n const datetimeParser = getValueByPath(getOptions(), 'datetimepicker.datetimeParser', undefined);\r\n if (typeof this.datetimeParser === 'function') {\r\n return this.datetimeParser(date);\r\n }\r\n else if (typeof datetimeParser === 'function') {\r\n return datetimeParser(date);\r\n }\r\n else {\r\n if (this.dtf.formatToParts && typeof this.dtf.formatToParts === 'function') {\r\n let dayPeriods = [AM, PM, AM.toLowerCase(), PM.toLowerCase()];\r\n if (this.$refs.timepicker) {\r\n dayPeriods.push(this.$refs.timepicker.amString);\r\n dayPeriods.push(this.$refs.timepicker.pmString);\r\n }\r\n const parts = this.dtf.formatToParts(new Date());\r\n const formatRegex = parts.map((part, idx) => {\r\n if (part.type === 'literal') {\r\n if (idx + 1 < parts.length && parts[idx + 1].type === 'hour') {\r\n return `[^\\\\d]+`;\r\n }\r\n return part.value.replace(/ /g, '\\\\s?');\r\n }\r\n else if (part.type === 'dayPeriod') {\r\n return `((?!=<${part.type}>)(${dayPeriods.join('|')})?)`;\r\n }\r\n return `((?!=<${part.type}>)\\\\d+)`;\r\n }).join('');\r\n const datetimeGroups = matchWithGroups(formatRegex, date);\r\n // We do a simple validation for the group.\r\n // If it is not valid, it will fallback to Date.parse below\r\n if (datetimeGroups.year &&\r\n datetimeGroups.year.length === 4 &&\r\n datetimeGroups.month &&\r\n datetimeGroups.month <= 12 &&\r\n datetimeGroups.day &&\r\n datetimeGroups.day <= 31 &&\r\n datetimeGroups.hour &&\r\n datetimeGroups.hour >= 0 &&\r\n datetimeGroups.hour < 24 &&\r\n datetimeGroups.minute &&\r\n datetimeGroups.minute >= 0 &&\r\n datetimeGroups.minute <= 59) {\r\n const d = new Date(datetimeGroups.year, datetimeGroups.month - 1, datetimeGroups.day, datetimeGroups.hour, datetimeGroups.minute, datetimeGroups.second || 0);\r\n return d;\r\n }\r\n }\r\n return new Date(Date.parse(date));\r\n }\r\n },\r\n defaultDatetimeFormatter(date) {\r\n const datetimeFormatter = getValueByPath(getOptions(), 'datetimepicker.datetimeFormatter', undefined);\r\n if (typeof this.datetimeFormatter === 'function') {\r\n return this.datetimeFormatter(date);\r\n }\r\n else if (typeof datetimeFormatter === 'function') {\r\n return datetimeFormatter(date);\r\n }\r\n else {\r\n return this.dtf.format(date);\r\n }\r\n },\r\n /*\r\n * Parse date from string\r\n */\r\n onChangeNativePicker(event) {\r\n const date = event.target.value;\r\n const s = date ? date.split(/\\D/) : [];\r\n if (s.length >= 5) {\r\n const year = parseInt(s[0], 10);\r\n const month = parseInt(s[1], 10) - 1;\r\n const day = parseInt(s[2], 10);\r\n const hours = parseInt(s[3], 10);\r\n const minutes = parseInt(s[4], 10);\r\n // Seconds are omitted intentionally; they are unsupported by input\r\n // type=datetime-local and cause the control to fail native validation\r\n this.computedValue = new Date(year, month, day, hours, minutes);\r\n }\r\n else {\r\n this.computedValue = null;\r\n }\r\n },\r\n formatNative(value) {\r\n const date = new Date(value);\r\n if (value && !isNaN(date.getTime())) {\r\n const year = date.getFullYear();\r\n const month = date.getMonth() + 1;\r\n const day = date.getDate();\r\n const hours = date.getHours();\r\n const minutes = date.getMinutes();\r\n const seconds = date.getSeconds();\r\n return year + '-' +\r\n ((month < 10 ? '0' : '') + month) + '-' +\r\n ((day < 10 ? '0' : '') + day) + 'T' +\r\n ((hours < 10 ? '0' : '') + hours) + ':' +\r\n ((minutes < 10 ? '0' : '') + minutes) + ':' +\r\n ((seconds < 10 ? '0' : '') + seconds);\r\n }\r\n return '';\r\n },\r\n toggle() {\r\n this.$refs.datepicker.toggle();\r\n }\r\n },\r\n mounted() {\r\n if (!this.isMobile || this.inline) {\r\n // $refs attached, it's time to refresh datepicker (input)\r\n if (this.newValue) {\r\n this.$refs.datepicker.$forceUpdate();\r\n }\r\n }\r\n }\r\n});\n\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n const _component_o_timepicker = resolveComponent(\"o-timepicker\");\n\n const _component_o_datepicker = resolveComponent(\"o-datepicker\");\n\n const _component_o_input = resolveComponent(\"o-input\");\n\n return !_ctx.isMobile || _ctx.inline ? createVNode(_component_o_datepicker, mergeProps({\n key: 0,\n ref: \"datepicker\",\n modelValue: _ctx.computedValue,\n \"onUpdate:modelValue\": _cache[2] || (_cache[2] = $event => _ctx.computedValue = $event)\n }, _ctx.datepicker, {\n class: _ctx.datepickerWrapperClasses,\n rounded: _ctx.rounded,\n \"open-on-focus\": _ctx.openOnFocus,\n position: _ctx.position,\n inline: _ctx.inline,\n editable: _ctx.editable,\n expanded: _ctx.expanded,\n \"close-on-click\": false,\n \"date-formatter\": _ctx.defaultDatetimeFormatter,\n \"date-parser\": _ctx.defaultDatetimeParser,\n \"min-date\": _ctx.minDate,\n \"max-date\": _ctx.maxDate,\n icon: _ctx.icon,\n \"icon-right\": _ctx.iconRight,\n \"icon-right-clickable\": _ctx.iconRightClickable,\n \"icon-pack\": _ctx.iconPack,\n size: _ctx.datepickerSize,\n placeholder: _ctx.placeholder,\n range: false,\n disabled: _ctx.disabled,\n \"mobile-native\": _ctx.isMobileNative,\n locale: _ctx.locale,\n \"append-to-body\": _ctx.appendToBody,\n onFocus: _ctx.onFocus,\n onBlur: _ctx.onBlur,\n \"onActive-change\": _cache[3] || (_cache[3] = $event => _ctx.$emit('active-change', $event)),\n \"onIcon-right-click\": _cache[4] || (_cache[4] = $event => _ctx.$emit('icon-right-click')),\n \"onChange-month\": _cache[5] || (_cache[5] = $event => _ctx.$emit('change-month', $event)),\n \"onChange-year\": _cache[6] || (_cache[6] = $event => _ctx.$emit('change-year', $event))\n }), {\n footer: withCtx(() => [createVNode(\"div\", {\n class: _ctx.timepickerWrapperClasses\n }, [createVNode(_component_o_timepicker, mergeProps({\n ref: \"timepicker\"\n }, _ctx.timepicker, {\n modelValue: _ctx.computedValue,\n \"onUpdate:modelValue\": _cache[1] || (_cache[1] = $event => _ctx.computedValue = $event),\n inline: \"\",\n editable: _ctx.editable,\n \"min-time\": _ctx.minTime,\n \"max-time\": _ctx.maxTime,\n size: _ctx.timepickerSize,\n disabled: _ctx.timepickerDisabled,\n \"mobile-native\": _ctx.isMobileNative,\n locale: _ctx.locale\n }), null, 16\n /* FULL_PROPS */\n , [\"modelValue\", \"editable\", \"min-time\", \"max-time\", \"size\", \"disabled\", \"mobile-native\", \"locale\"])], 2\n /* CLASS */\n ), _ctx.$slots.footer !== undefined ? renderSlot(_ctx.$slots, \"footer\", {\n key: 0\n }) : createCommentVNode(\"v-if\", true)]),\n _: 1\n }, 16\n /* FULL_PROPS */\n , [\"modelValue\", \"class\", \"rounded\", \"open-on-focus\", \"position\", \"inline\", \"editable\", \"expanded\", \"date-formatter\", \"date-parser\", \"min-date\", \"max-date\", \"icon\", \"icon-right\", \"icon-right-clickable\", \"icon-pack\", \"size\", \"placeholder\", \"disabled\", \"mobile-native\", \"locale\", \"append-to-body\", \"onFocus\", \"onBlur\"]) : createVNode(_component_o_input, mergeProps({\n key: 1,\n ref: \"input\",\n type: \"datetime-local\",\n autocomplete: \"off\",\n value: _ctx.formatNative(_ctx.computedValue),\n placeholder: _ctx.placeholder,\n size: _ctx.datepickerSize,\n icon: _ctx.icon,\n \"icon-pack\": _ctx.iconPack,\n rounded: _ctx.rounded,\n max: _ctx.formatNative(_ctx.maxDate),\n min: _ctx.formatNative(_ctx.minDate),\n disabled: _ctx.disabled,\n readonly: false\n }, _ctx.$attrs, {\n \"use-html5-validation\": _ctx.useHtml5Validation,\n onChange: _ctx.onChangeNativePicker,\n onFocus: _ctx.onFocus,\n onBlur: _ctx.onBlur\n }), null, 16\n /* FULL_PROPS */\n , [\"value\", \"placeholder\", \"size\", \"icon\", \"icon-pack\", \"rounded\", \"max\", \"min\", \"disabled\", \"use-html5-validation\", \"onChange\", \"onFocus\", \"onBlur\"]);\n}\n\nscript.render = render;\nscript.__file = \"src/components/datetimepicker/Datetimepicker.vue\";\n\nvar index = {\r\n install(app) {\r\n registerComponent(app, script);\r\n }\r\n};\n\nexport default index;\nexport { script as ODatetimepicker };\n","import 'vue';\nimport './helpers.mjs';\nimport './config.mjs';\nimport { b as registerComponent } from './plugins-ba5e2464.mjs';\nimport './MatchMediaMixin-09b141ca.mjs';\nimport './trapFocus-dc03669f.mjs';\nimport { s as script, a as script$1 } from './DropdownItem-c744c4e9.mjs';\nexport { s as ODropdown, a as ODropdownItem } from './DropdownItem-c744c4e9.mjs';\n\nvar index = {\r\n install(app) {\r\n registerComponent(app, script);\r\n registerComponent(app, script$1);\r\n }\r\n};\n\nexport default index;\n","import 'vue';\nimport './helpers.mjs';\nimport './config.mjs';\nimport { b as registerComponent } from './plugins-ba5e2464.mjs';\nimport './MatchMediaMixin-09b141ca.mjs';\nimport { s as script } from './Field-937b4591.mjs';\nexport { s as OField } from './Field-937b4591.mjs';\n\nvar index = {\r\n install(app) {\r\n registerComponent(app, script);\r\n }\r\n};\n\nexport default index;\n","import 'vue';\nimport './helpers.mjs';\nimport './config.mjs';\nimport { b as registerComponent } from './plugins-ba5e2464.mjs';\nimport { s as script } from './Icon-a7b85e86.mjs';\nexport { s as OIcon } from './Icon-a7b85e86.mjs';\n\nvar index = {\r\n install(app) {\r\n registerComponent(app, script);\r\n }\r\n};\n\nexport default index;\n","import 'vue';\nimport './helpers.mjs';\nimport './config.mjs';\nimport { b as registerComponent } from './plugins-ba5e2464.mjs';\nimport './Icon-a7b85e86.mjs';\nimport './FormElementMixin-29581863.mjs';\nimport { s as script } from './Input-19e906a1.mjs';\nexport { s as OInput } from './Input-19e906a1.mjs';\n\nvar index = {\r\n install(app) {\r\n registerComponent(app, script);\r\n }\r\n};\n\nexport default index;\n","import { defineComponent, resolveComponent, openBlock, createBlock, createVNode, renderSlot, Fragment, renderList, toDisplayString, createCommentVNode, mergeProps, createSlots, withCtx, createTextVNode } from 'vue';\nimport { getValueByPath } from './helpers.mjs';\nimport { getOptions } from './config.mjs';\nimport { B as BaseComponentMixin, b as registerComponent } from './plugins-ba5e2464.mjs';\nimport { s as script$2 } from './Icon-a7b85e86.mjs';\nimport { F as FormElementMixin } from './FormElementMixin-29581863.mjs';\nimport './Input-19e906a1.mjs';\nimport { s as script$1 } from './Autocomplete-a23ad844.mjs';\n\n/**\r\n * A simple item input field that can have autocomplete functionality\r\n * @displayName Inputitems\r\n * @style _inputitems.scss\r\n */\r\nvar script = defineComponent({\r\n name: 'OInputitems',\r\n components: {\r\n [script$1.name]: script$1,\r\n [script$2.name]: script$2\r\n },\r\n mixins: [FormElementMixin, BaseComponentMixin],\r\n inheritAttrs: false,\r\n configField: 'inputitems',\r\n emits: ['update:modelValue', 'focus', 'blur', 'add', 'remove', 'typing', 'infinite-scroll', 'icon-right-click'],\r\n props: {\r\n /** @model */\r\n modelValue: {\r\n type: Array,\r\n default: () => []\r\n },\r\n /**\r\n * Vertical size of input, optional\r\n * @values small, medium, large\r\n */\r\n size: String,\r\n /** Items data */\r\n data: {\r\n type: Array,\r\n default: () => []\r\n },\r\n /**\r\n * Color of the each items, optional\r\n * @values primary, info, success, warning, danger, and any other custom color\r\n */\r\n variant: String,\r\n /** Limits the number of items, plus item counter */\r\n maxitems: {\r\n type: [Number, String],\r\n required: false\r\n },\r\n /** Show counter when maxlength or maxtags props are passed */\r\n hasCounter: {\r\n type: Boolean,\r\n default: () => {\r\n return getValueByPath(getOptions(), 'inputitems.hasCounter', true);\r\n }\r\n },\r\n /** Property of the object (if data is array of objects) to use as display text */\r\n field: {\r\n type: String,\r\n default: 'value'\r\n },\r\n /** Add autocomplete feature (if true, any Autocomplete props may be used too) */\r\n autocomplete: Boolean,\r\n /** Property of the object (if data is array of objects) to use as display text of group */\r\n groupField: String,\r\n /** Property of the object (if data is array of objects) to use as key to get items array of each group, optional */\r\n groupOptions: String,\r\n nativeAutocomplete: String,\r\n /** Opens a dropdown with choices when the input field is focused */\r\n openOnFocus: Boolean,\r\n /** Input will be disabled */\r\n disabled: Boolean,\r\n /** Add close/delete button to the item */\r\n closable: {\r\n type: Boolean,\r\n default: () => {\r\n return getValueByPath(getOptions(), 'inputitems.closable', true);\r\n }\r\n },\r\n /**\r\n * Array of keys\r\n * (https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key/Key_Values)\r\n * which will add a item when typing (default comma, tab and enter)\r\n */\r\n confirmKeys: {\r\n type: Array,\r\n default: () => {\r\n return getValueByPath(getOptions(), 'inputitems.confirmKeys', [',', 'Tab', 'Enter']);\r\n }\r\n },\r\n /** Allow removing last item when pressing given keys, if input is empty */\r\n removeOnKeys: {\r\n type: Array,\r\n default: () => {\r\n return getValueByPath(getOptions(), 'inputitems.removeOnKeys', ['Backspace']);\r\n }\r\n },\r\n /** When autocomplete, it allow to add new items */\r\n allowNew: Boolean,\r\n /** Array of chars used to split when pasting a new string */\r\n onPasteSeparators: {\r\n type: Array,\r\n default: () => {\r\n return getValueByPath(getOptions(), 'inputitems.onPasteSeparators', [',']);\r\n }\r\n },\r\n /** Function to validate the value of the item before adding */\r\n beforeAdding: {\r\n type: Function,\r\n default: () => true\r\n },\r\n /** Allows adding the same item multiple time */\r\n allowDuplicates: {\r\n type: Boolean,\r\n default: false\r\n },\r\n /** Makes the autocomplete component check if list reached scroll end and emit infinite-scroll event */\r\n checkInfiniteScroll: {\r\n type: Boolean,\r\n default: false\r\n },\r\n /** Function to create a new item to push into v-model (items) */\r\n createItem: {\r\n type: Function,\r\n default: (item) => item\r\n },\r\n /** Icon name of close icon on selected item */\r\n closeIcon: {\r\n type: String,\r\n default: () => {\r\n return getValueByPath(getOptions(), 'inputitems.closeIcon', 'close');\r\n }\r\n },\r\n /** The first option will always be pre-selected (easier to just hit enter or tab) */\r\n keepFirst: Boolean,\r\n /** Accessibility label for the close button */\r\n ariaCloseLabel: String,\r\n /** Append autocomplete content to body */\r\n appendToBody: Boolean,\r\n rootClass: [String, Array, Function],\r\n expandedClass: [String, Array, Function],\r\n variantClass: [String, Array, Function],\r\n closeClass: [String, Array, Function],\r\n itemClass: [String, Array, Function],\r\n counterClass: [String, Array, Function],\r\n autocompleteClasses: {\r\n type: Object,\r\n default: () => {\r\n return getValueByPath(getOptions(), 'inputitems.autocompleteClasses', {});\r\n }\r\n }\r\n },\r\n data() {\r\n return {\r\n items: Array.isArray(this.modelValue) ? this.modelValue.slice(0) : (this.modelValue || []),\r\n newItem: '',\r\n isComposing: false\r\n };\r\n },\r\n computed: {\r\n rootClasses() {\r\n return [\r\n this.computedClass('rootClass', 'o-inputit'),\r\n { [this.computedClass('expandedClass', 'o-inputit--expanded')]: this.expanded }\r\n ];\r\n },\r\n containerClasses() {\r\n return [\r\n this.computedClass('containerClass', 'o-inputit__container'),\r\n { [this.computedClass('sizeClass', 'o-inputit__container--', this.size)]: this.size },\r\n ];\r\n },\r\n itemClasses() {\r\n return [\r\n this.computedClass('itemClass', 'o-inputit__item'),\r\n { [this.computedClass('variantClass', 'o-inputit__item--', this.variant)]: this.variant }\r\n ];\r\n },\r\n closeClasses() {\r\n return [\r\n this.computedClass('closeClass', 'o-inputit__item__close')\r\n ];\r\n },\r\n counterClasses() {\r\n return [\r\n this.computedClass('counterClass', 'o-inputit__counter')\r\n ];\r\n },\r\n autocompleteBind() {\r\n return {\r\n ...this.$attrs,\r\n 'root-class': this.computedClass('autocompleteClasses.rootClass', 'o-inputit__autocomplete'),\r\n 'input-classes': {\r\n 'input-class': this.computedClass('autocompleteClasses.inputClasses.inputClass', 'o-inputit__input'),\r\n },\r\n ...this.autocompleteClasses\r\n };\r\n },\r\n valueLength() {\r\n return this.newItem.trim().length;\r\n },\r\n hasDefaultSlot() {\r\n return !!this.$slots.default;\r\n },\r\n hasEmptySlot() {\r\n return !!this.$slots.empty;\r\n },\r\n hasHeaderSlot() {\r\n return !!this.$slots.header;\r\n },\r\n hasFooterSlot() {\r\n return !!this.$slots.footer;\r\n },\r\n /**\r\n * Show the input field if a maxitems hasn't been set or reached.\r\n */\r\n hasInput() {\r\n return this.maxitems == null || this.itemsLength < this.maxitems;\r\n },\r\n itemsLength() {\r\n return this.items.length;\r\n },\r\n /**\r\n * If input has onPasteSeparators prop,\r\n * returning new RegExp used to split pasted string.\r\n */\r\n separatorsAsRegExp() {\r\n const sep = this.onPasteSeparators;\r\n return sep.length ? new RegExp(sep.map((s) => {\r\n return s ? s.replace(/[-[\\]{}()*+?.,\\\\^$|#\\s]/g, '\\\\$&') : null;\r\n }).join('|'), 'g') : null;\r\n },\r\n $elementRef() {\r\n return 'autocomplete';\r\n }\r\n },\r\n watch: {\r\n /**\r\n * When modelValue is changed set internal value.\r\n */\r\n modelValue(value) {\r\n this.items = Array.isArray(value) ? value.slice(0) : (value || []);\r\n },\r\n hasInput() {\r\n if (!this.hasInput)\r\n this.onBlur();\r\n }\r\n },\r\n methods: {\r\n addItem(item) {\r\n const itemToAdd = item || this.newItem.trim();\r\n if (itemToAdd) {\r\n if (!this.autocomplete) {\r\n const reg = this.separatorsAsRegExp;\r\n if (reg && itemToAdd.match(reg)) {\r\n itemToAdd.split(reg)\r\n .map((t) => t.trim())\r\n .filter((t) => t.length !== 0)\r\n .map(this.addItem);\r\n return;\r\n }\r\n }\r\n // Add the item input if it is not blank\r\n // or previously added (if not allowDuplicates).\r\n const add = !this.allowDuplicates ? this.items.indexOf(this.createItem(itemToAdd)) === -1 : true;\r\n if (add && this.beforeAdding(itemToAdd)) {\r\n this.items.push(this.createItem(itemToAdd));\r\n this.$emit('update:modelValue', this.items);\r\n this.$emit('add', itemToAdd);\r\n }\r\n }\r\n // after autocomplete events\r\n requestAnimationFrame(() => {\r\n this.newItem = '';\r\n this.$emit('typing', '');\r\n });\r\n },\r\n getNormalizedItemText(item) {\r\n if (typeof item === 'object') {\r\n item = getValueByPath(item, this.field);\r\n }\r\n return `${item}`;\r\n },\r\n customOnBlur(event) {\r\n // Add item on-blur if not select only\r\n if (!this.autocomplete)\r\n this.addItem();\r\n this.onBlur(event);\r\n },\r\n onSelect(option) {\r\n if (!option)\r\n return;\r\n this.addItem(option);\r\n this.$nextTick(() => {\r\n this.newItem = '';\r\n });\r\n },\r\n removeItem(index, event) {\r\n const item = this.items.splice(index, 1)[0];\r\n this.$emit('update:modelValue', this.items);\r\n this.$emit('remove', item);\r\n if (event)\r\n event.stopPropagation();\r\n if (this.openOnFocus && this.$refs.autocomplete) {\r\n this.$refs.autocomplete.focus();\r\n }\r\n return item;\r\n },\r\n removeLastItem() {\r\n if (this.itemsLength > 0) {\r\n this.removeItem(this.itemsLength - 1);\r\n }\r\n },\r\n keydown(event) {\r\n const { key } = event; // cannot destructure preventDefault (https://stackoverflow.com/a/49616808/2774496)\r\n if (this.removeOnKeys.indexOf(key) !== -1 && !this.newItem.length) {\r\n this.removeLastItem();\r\n }\r\n // Stop if is to accept select only\r\n if (this.autocomplete && !this.allowNew)\r\n return;\r\n if (this.confirmKeys.indexOf(key) >= 0) {\r\n // Allow Tab to advance to next field regardless\r\n if (key !== 'Tab')\r\n event.preventDefault();\r\n if (key === 'Enter' && this.isComposing)\r\n return;\r\n this.addItem();\r\n }\r\n },\r\n onTyping(event) {\r\n this.$emit('typing', event.trim());\r\n }\r\n }\r\n});\n\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n const _component_o_icon = resolveComponent(\"o-icon\");\n\n const _component_o_autocomplete = resolveComponent(\"o-autocomplete\");\n\n return openBlock(), createBlock(\"div\", {\n class: _ctx.rootClasses\n }, [createVNode(\"div\", {\n class: _ctx.containerClasses,\n onClick: _cache[6] || (_cache[6] = $event => _ctx.hasInput && _ctx.focus($event))\n }, [renderSlot(_ctx.$slots, \"selected\", {\n items: _ctx.items\n }, () => [(openBlock(true), createBlock(Fragment, null, renderList(_ctx.items, (item, index) => {\n return openBlock(), createBlock(\"span\", {\n key: _ctx.getNormalizedItemText(item) + index,\n class: _ctx.itemClasses\n }, [createVNode(\"span\", null, toDisplayString(_ctx.getNormalizedItemText(item)), 1\n /* TEXT */\n ), _ctx.closable ? createVNode(_component_o_icon, {\n key: 0,\n class: _ctx.closeClasses,\n clickable: \"\",\n both: \"\",\n icon: _ctx.closeIcon,\n onClick: $event => _ctx.removeItem(index, $event),\n \"aria-label\": _ctx.ariaCloseLabel\n }, null, 8\n /* PROPS */\n , [\"class\", \"icon\", \"onClick\", \"aria-label\"]) : createCommentVNode(\"v-if\", true)], 2\n /* CLASS */\n );\n }), 128\n /* KEYED_FRAGMENT */\n ))]), _ctx.hasInput ? createVNode(_component_o_autocomplete, mergeProps({\n key: 0,\n ref: \"autocomplete\",\n modelValue: _ctx.newItem,\n \"onUpdate:modelValue\": _cache[1] || (_cache[1] = $event => _ctx.newItem = $event)\n }, _ctx.autocompleteBind, {\n data: _ctx.data,\n field: _ctx.field,\n icon: _ctx.icon,\n \"icon-pack\": _ctx.iconPack,\n maxlength: _ctx.maxlength,\n \"has-counter\": false,\n size: _ctx.size,\n disabled: _ctx.disabled,\n autocomplete: _ctx.nativeAutocomplete,\n \"open-on-focus\": _ctx.openOnFocus,\n \"keep-first\": _ctx.keepFirst,\n \"keep-open\": _ctx.openOnFocus,\n \"group-field\": _ctx.groupField,\n \"group-options\": _ctx.groupOptions,\n \"use-html5-validation\": _ctx.useHtml5Validation,\n \"check-infinite-scroll\": _ctx.checkInfiniteScroll,\n \"append-to-body\": _ctx.appendToBody,\n \"confirm-keys\": _ctx.confirmKeys,\n onTyping: _ctx.onTyping,\n onFocus: _ctx.onFocus,\n onBlur: _ctx.customOnBlur,\n onKeydown: _ctx.keydown,\n onCompositionstart: _cache[2] || (_cache[2] = $event => _ctx.isComposing = true),\n onCompositionend: _cache[3] || (_cache[3] = $event => _ctx.isComposing = false),\n onSelect: _ctx.onSelect,\n \"onInfinite-scroll\": _cache[4] || (_cache[4] = $event => _ctx.$emit('infinite-scroll', $event)),\n \"onIcon-right-click\": _cache[5] || (_cache[5] = $event => _ctx.$emit('icon-right-click', $event))\n }), createSlots({\n _: 2\n }, [_ctx.hasHeaderSlot ? {\n name: \"header\",\n fn: withCtx(() => [renderSlot(_ctx.$slots, \"header\")])\n } : undefined, _ctx.hasDefaultSlot ? {\n name: \"default\",\n fn: withCtx(props => [renderSlot(_ctx.$slots, \"default\", {\n option: props.option,\n index: props.index\n })])\n } : undefined, _ctx.hasEmptySlot ? {\n name: \"empty\",\n fn: withCtx(() => [renderSlot(_ctx.$slots, \"empty\")])\n } : undefined, _ctx.hasFooterSlot ? {\n name: \"footer\",\n fn: withCtx(() => [renderSlot(_ctx.$slots, \"footer\")])\n } : undefined]), 1040\n /* FULL_PROPS, DYNAMIC_SLOTS */\n , [\"modelValue\", \"data\", \"field\", \"icon\", \"icon-pack\", \"maxlength\", \"size\", \"disabled\", \"autocomplete\", \"open-on-focus\", \"keep-first\", \"keep-open\", \"group-field\", \"group-options\", \"use-html5-validation\", \"check-infinite-scroll\", \"append-to-body\", \"confirm-keys\", \"onTyping\", \"onFocus\", \"onBlur\", \"onKeydown\", \"onSelect\"]) : createCommentVNode(\"v-if\", true)], 2\n /* CLASS */\n ), _ctx.hasCounter && (_ctx.maxitems || _ctx.maxlength) ? (openBlock(), createBlock(\"small\", {\n key: 0,\n class: _ctx.counterClasses\n }, [_ctx.maxlength && _ctx.valueLength > 0 ? (openBlock(), createBlock(Fragment, {\n key: 0\n }, [createTextVNode(toDisplayString(_ctx.valueLength) + \" / \" + toDisplayString(_ctx.maxlength), 1\n /* TEXT */\n )], 64\n /* STABLE_FRAGMENT */\n )) : _ctx.maxitems ? (openBlock(), createBlock(Fragment, {\n key: 1\n }, [createTextVNode(toDisplayString(_ctx.itemsLength) + \" / \" + toDisplayString(_ctx.maxitems), 1\n /* TEXT */\n )], 64\n /* STABLE_FRAGMENT */\n )) : createCommentVNode(\"v-if\", true)], 2\n /* CLASS */\n )) : createCommentVNode(\"v-if\", true)], 2\n /* CLASS */\n );\n}\n\nscript.render = render;\nscript.__file = \"src/components/inputitems/Inputitems.vue\";\n\nvar index = {\r\n install(Vue) {\r\n registerComponent(Vue, script);\r\n }\r\n};\n\nexport default index;\nexport { script as OInputitems };\n","// Polyfills for SSR\r\nconst isSSR = typeof window === 'undefined';\r\nconst HTMLElement = isSSR ? Object : window.HTMLElement;\r\nconst File = isSSR ? Object : window.File;\n\nexport { File as F, HTMLElement as H };\n","import { defineComponent, resolveComponent, openBlock, createBlock, Transition, withCtx, createVNode, renderSlot, createCommentVNode } from 'vue';\nimport { getValueByPath, removeElement } from './helpers.mjs';\nimport { getOptions } from './config.mjs';\nimport { B as BaseComponentMixin } from './plugins-ba5e2464.mjs';\nimport { s as script$1 } from './Icon-a7b85e86.mjs';\nimport { H as HTMLElement } from './ssr-85c76d50.mjs';\n\n/**\r\n * A simple loading overlay\r\n * @displayName Loading\r\n * @style _loading.scss\r\n */\r\nvar script = defineComponent({\r\n name: 'OLoading',\r\n components: {\r\n [script$1.name]: script$1\r\n },\r\n mixins: [BaseComponentMixin],\r\n configField: 'loading',\r\n emits: ['update:active', 'close', 'update:full-page'],\r\n props: {\r\n /** Whether loading is active or not, use v-model:active to make it two-way binding */\r\n active: Boolean,\r\n /** @ignore */\r\n programmatic: Object,\r\n /** @ignore */\r\n promise: Promise,\r\n container: [Object, Function, HTMLElement],\r\n /** Loader will overlay the full page */\r\n fullPage: {\r\n type: Boolean,\r\n default: true\r\n },\r\n /* Custom animation (transition name) */\r\n animation: {\r\n type: String,\r\n default: () => { return getValueByPath(getOptions(), 'loading.animation', 'fade'); }\r\n },\r\n /** Can close Loading by pressing escape or clicking outside */\r\n canCancel: {\r\n type: Boolean,\r\n default: false\r\n },\r\n /** Callback function to call after user canceled (pressed escape / clicked outside) */\r\n onCancel: {\r\n type: Function,\r\n default: () => { }\r\n },\r\n /** Icon name */\r\n icon: {\r\n type: String,\r\n default: () => { return getValueByPath(getOptions(), 'loading.icon', 'loading'); }\r\n },\r\n /** Enable spin effect on icon */\r\n iconSpin: {\r\n type: Boolean,\r\n default: true\r\n },\r\n iconSize: {\r\n type: String,\r\n default: 'medium'\r\n },\r\n rootClass: [String, Function, Array],\r\n overlayClass: [String, Function, Array],\r\n iconClass: [String, Function, Array],\r\n fullPageClass: [String, Function, Array]\r\n },\r\n data() {\r\n return {\r\n isActive: this.active || false,\r\n displayInFullPage: this.fullPage\r\n };\r\n },\r\n watch: {\r\n active(value) {\r\n this.isActive = value;\r\n },\r\n fullPage(value) {\r\n this.displayInFullPage = value;\r\n }\r\n },\r\n computed: {\r\n rootClasses() {\r\n return [\r\n this.computedClass('rootClass', 'o-load'),\r\n { [this.computedClass('fullPageClass', 'o-load--fullpage')]: this.displayInFullPage }\r\n ];\r\n },\r\n overlayClasses() {\r\n return [\r\n this.computedClass('overlayClass', 'o-load__overlay')\r\n ];\r\n },\r\n iconClasses() {\r\n return [\r\n this.computedClass('iconClass', 'o-load__icon')\r\n ];\r\n }\r\n },\r\n methods: {\r\n /**\r\n * Close the Modal if canCancel.\r\n */\r\n cancel(method) {\r\n if (!this.canCancel || !this.isActive)\r\n return;\r\n this.close({ action: 'cancel', method });\r\n },\r\n /**\r\n * Emit events, and destroy modal if it's programmatic.\r\n */\r\n close() {\r\n this.onCancel.apply(null, arguments);\r\n this.$emit('close');\r\n this.$emit('update:active', false);\r\n // Timeout for the animation complete before destroying\r\n if (this.programmatic) {\r\n if (this.programmatic.instances) {\r\n this.programmatic.instances.remove(this);\r\n }\r\n if (this.programmatic.resolve) {\r\n this.programmatic.resolve.apply(null, arguments);\r\n }\r\n this.isActive = false;\r\n window.requestAnimationFrame(() => {\r\n removeElement(this.$el);\r\n });\r\n }\r\n },\r\n /**\r\n * Keypress event that is bound to the document.\r\n */\r\n keyPress({ key }) {\r\n if (key === 'Escape' || key === 'Esc')\r\n this.cancel('escape');\r\n }\r\n },\r\n created() {\r\n if (typeof window !== 'undefined') {\r\n document.addEventListener('keyup', this.keyPress);\r\n }\r\n },\r\n mounted() {\r\n if (this.programmatic) {\r\n if (this.programmatic.instances) {\r\n this.programmatic.instances.add(this);\r\n }\r\n // Insert the Loading component in body tag\r\n // only if it's programmatic\r\n if (!this.container) {\r\n document.body.appendChild(this.$el);\r\n }\r\n else {\r\n this.displayInFullPage = false;\r\n this.$emit('update:full-page', false);\r\n this.container.appendChild(this.$el);\r\n }\r\n this.isActive = true;\r\n }\r\n },\r\n beforeUnmount() {\r\n if (typeof window !== 'undefined') {\r\n document.removeEventListener('keyup', this.keyPress);\r\n }\r\n }\r\n});\n\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n const _component_o_icon = resolveComponent(\"o-icon\");\n\n return openBlock(), createBlock(Transition, {\n name: _ctx.animation\n }, {\n default: withCtx(() => [_ctx.isActive ? (openBlock(), createBlock(\"div\", {\n key: 0,\n class: _ctx.rootClasses\n }, [createVNode(\"div\", {\n class: _ctx.overlayClasses,\n onClick: _cache[1] || (_cache[1] = $event => _ctx.cancel('outside'))\n }, null, 2\n /* CLASS */\n ), renderSlot(_ctx.$slots, \"default\", {}, () => [createVNode(_component_o_icon, {\n icon: _ctx.icon,\n spin: _ctx.iconSpin,\n size: _ctx.iconSize,\n class: _ctx.iconClasses,\n both: \"\"\n }, null, 8\n /* PROPS */\n , [\"icon\", \"spin\", \"size\", \"class\"])])], 2\n /* CLASS */\n )) : createCommentVNode(\"v-if\", true)]),\n _: 1\n }, 8\n /* PROPS */\n , [\"name\"]);\n}\n\nscript.render = render;\nscript.__file = \"src/components/loading/Loading.vue\";\n\nexport { script as s };\n","class InstanceRegistry {\r\n constructor() {\r\n this.entries = [];\r\n }\r\n add(entry) {\r\n this.entries.push(entry);\r\n }\r\n remove(entry) {\r\n let index = this.entries.indexOf(entry);\r\n this.entries.splice(index, 1);\r\n }\r\n walk(callback) {\r\n // Walk a copy of the array so that the callback is allowed to remove the instance\r\n this.entries = [...this.entries].filter((e) => {\r\n const ret = callback(e);\r\n return !(ret === true);\r\n });\r\n }\r\n}\n\nexport { InstanceRegistry as I };\n","import { createVNode, render } from 'vue';\nimport { merge } from './helpers.mjs';\nimport { VueInstance } from './config.mjs';\nimport { b as registerComponent, a as registerComponentProgrammatic } from './plugins-ba5e2464.mjs';\nimport './Icon-a7b85e86.mjs';\nimport './ssr-85c76d50.mjs';\nimport { s as script } from './Loading-20d29914.mjs';\nexport { s as OLoading } from './Loading-20d29914.mjs';\nimport { I as InstanceRegistry } from './InstanceRegistry-2fdb6ee8.mjs';\n\nlet localVueInstance;\r\nlet instances = new InstanceRegistry();\r\nconst LoadingProgrammatic = {\r\n open(params) {\r\n const defaultParam = {\r\n programmatic: { instances }\r\n };\r\n const propsData = merge(defaultParam, params);\r\n propsData.promise = new Promise((p1, p2) => {\r\n propsData.programmatic.resolve = p1;\r\n propsData.programmatic.reject = p2;\r\n });\r\n const app = localVueInstance || VueInstance;\r\n const vnode = createVNode(script, propsData);\r\n vnode.appContext = app._context;\r\n render(vnode, document.createElement('div'));\r\n return vnode.component.proxy;\r\n },\r\n closeAll() {\r\n instances.walk((entry) => {\r\n entry.close(...arguments);\r\n });\r\n }\r\n};\r\nvar index = {\r\n install(app) {\r\n localVueInstance = app;\r\n registerComponent(app, script);\r\n registerComponentProgrammatic(app, 'loading', LoadingProgrammatic);\r\n }\r\n};\n\nexport default index;\nexport { LoadingProgrammatic };\n","import { defineComponent, openBlock, createBlock, renderSlot, resolveComponent, createVNode, createCommentVNode, toDisplayString, resolveDynamicComponent, mergeProps, withCtx, Transition, withDirectives, vShow } from 'vue';\nimport './helpers.mjs';\nimport './config.mjs';\nimport { B as BaseComponentMixin, b as registerComponent } from './plugins-ba5e2464.mjs';\n\n/**\r\n * A simple menu\r\n * @displayName Menu\r\n * @style _menu.scss\r\n */\r\nvar script = defineComponent({\r\n name: 'OMenu',\r\n configField: 'menu',\r\n mixins: [BaseComponentMixin],\r\n props: {\r\n accordion: {\r\n type: Boolean,\r\n default: true\r\n },\r\n activable: {\r\n type: Boolean,\r\n default: true\r\n },\r\n rootClass: [String, Array, Function]\r\n },\r\n data() {\r\n return {\r\n menuItems: [],\r\n };\r\n },\r\n computed: {\r\n rootClasses() {\r\n return this.computedClass('rootClass', 'o-menu');\r\n },\r\n },\r\n methods: {\r\n registerMenuItem(item) {\r\n this.menuItems.push(item);\r\n },\r\n resetMenu(excludedItems = []) {\r\n this.menuItems.forEach((item) => {\r\n if (!excludedItems.includes(item))\r\n item.reset();\r\n });\r\n },\r\n },\r\n provide() {\r\n return {\r\n registerMenuItem: this.registerMenuItem,\r\n resetMenu: this.resetMenu,\r\n accordion: () => this.accordion,\r\n activable: () => this.activable,\r\n };\r\n }\r\n});\n\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n return openBlock(), createBlock(\"div\", {\n class: _ctx.rootClasses\n }, [renderSlot(_ctx.$slots, \"default\")], 2\n /* CLASS */\n );\n}\n\nscript.render = render;\nscript.__file = \"src/components/menu/Menu.vue\";\n\nvar script$1 = defineComponent({\r\n name: 'OMenuList',\r\n configField: 'menu',\r\n mixins: [BaseComponentMixin],\r\n props: {\r\n ariaRole: String,\r\n label: String,\r\n icon: String,\r\n iconPack: String,\r\n /**\r\n * Icon size, optional\r\n * @values small, medium, large\r\n */\r\n size: String,\r\n listClass: [String, Array, Function],\r\n listLabelClass: [String, Array, Function],\r\n },\r\n computed: {\r\n listClasses() {\r\n return this.computedClass('listClass', 'o-menu-list');\r\n },\r\n labelClasses() {\r\n return this.computedClass('listLabelClass', 'o-menu-label');\r\n },\r\n computedAriaRole() {\r\n return this.ariaRole === 'menu' ? this.ariaRole : null;\r\n }\r\n }\r\n});\n\nconst _hoisted_1 = {\n key: 1\n};\nfunction render$1(_ctx, _cache, $props, $setup, $data, $options) {\n const _component_o_icon = resolveComponent(\"o-icon\");\n\n return openBlock(), createBlock(\"div\", null, [_ctx.label || _ctx.$slots.label ? (openBlock(), createBlock(\"div\", {\n key: 0,\n class: _ctx.labelClasses\n }, [_ctx.label && _ctx.icon ? createVNode(_component_o_icon, {\n key: 0,\n icon: _ctx.icon,\n pack: _ctx.iconPack,\n size: _ctx.size\n }, null, 8\n /* PROPS */\n , [\"icon\", \"pack\", \"size\"]) : createCommentVNode(\"v-if\", true), _ctx.label ? (openBlock(), createBlock(\"span\", _hoisted_1, toDisplayString(_ctx.label), 1\n /* TEXT */\n )) : renderSlot(_ctx.$slots, \"label\", {\n key: 2\n })], 2\n /* CLASS */\n )) : createCommentVNode(\"v-if\", true), createVNode(\"ul\", {\n class: _ctx.listClasses,\n role: _ctx.computedAriaRole\n }, [renderSlot(_ctx.$slots, \"default\")], 10\n /* CLASS, PROPS */\n , [\"role\"])]);\n}\n\nscript$1.render = render$1;\nscript$1.__file = \"src/components/menu/MenuList.vue\";\n\nvar script$2 = defineComponent({\r\n name: 'OMenuItem',\r\n mixins: [BaseComponentMixin],\r\n configField: 'menu',\r\n inheritAttrs: false,\r\n props: {\r\n label: String,\r\n active: Boolean,\r\n expanded: Boolean,\r\n disabled: Boolean,\r\n iconPack: String,\r\n icon: String,\r\n animation: {\r\n type: String,\r\n default: 'slide'\r\n },\r\n tag: {\r\n type: String,\r\n default: 'a'\r\n },\r\n ariaRole: {\r\n type: String,\r\n default: ''\r\n },\r\n /**\r\n * Icon size, optional\r\n * @values small, medium, large\r\n */\r\n size: String,\r\n itemClass: [String, Array, Function],\r\n itemActiveClass: [String, Array, Function],\r\n itemDisabledClass: [String, Array, Function],\r\n itemIconTextClass: [String, Array, Function],\r\n itemSubmenuClass: [String, Array, Function],\r\n itemWrapperClass: [String, Array, Function],\r\n },\r\n data() {\r\n return {\r\n newActive: this.active,\r\n newExpanded: this.expanded\r\n };\r\n },\r\n computed: {\r\n ariaRoleMenu() {\r\n return this.ariaRole === 'menuitem' ? this.ariaRole : null;\r\n },\r\n itemClasses() {\r\n return {\r\n [this.computedClass('itemClass', 'o-menu-item')]: true,\r\n [this.computedClass('itemActiveClass', 'o-menu-item--active')]: this.newActive,\r\n [this.computedClass('itemDisabledClass', 'o-menu-item--disabled')]: this.disabled,\r\n [this.computedClass('itemIconTextClass', 'o-menu-item--icon-text')]: this.icon,\r\n };\r\n },\r\n submenuClasses() {\r\n return this.computedClass('itemSubmenuClass', 'o-menu-item__submenu');\r\n },\r\n wrapperClasses() {\r\n return this.computedClass('itemWrapperClass', 'o-menu-item__wrapper');\r\n },\r\n },\r\n watch: {\r\n active(value) {\r\n this.newActive = value;\r\n },\r\n expanded(value) {\r\n this.newExpanded = value;\r\n }\r\n },\r\n methods: {\r\n handleClick() {\r\n if (this.disabled)\r\n return;\r\n this.triggerReset();\r\n this.newExpanded = this.$props.expanded || !this.newExpanded;\r\n this.$emit('update:expanded', this.newExpanded);\r\n if (this.activable) {\r\n this.newActive = true;\r\n this.$emit('update:active', this.newActive);\r\n }\r\n },\r\n triggerReset(child) {\r\n // The point of this method is to collect references to the clicked item and any parent, this way we can skip resetting those elements.\r\n if (this.triggerParentReset) {\r\n this.triggerParentReset(this);\r\n }\r\n else if (this.resetMenu) {\r\n this.resetMenu([this, child]);\r\n }\r\n },\r\n reset() {\r\n if (!this.$parent.$data.isMenu || (this.$parent.$data.isMenu && this.accordion)) {\r\n this.newExpanded = false;\r\n this.$emit('update:expanded', this.newExpanded);\r\n }\r\n if (this.activable) {\r\n this.newActive = false;\r\n this.$emit('update:active', this.newActive);\r\n }\r\n },\r\n },\r\n mounted() {\r\n if (this.registerMenuItem) {\r\n this.registerMenuItem(this);\r\n }\r\n },\r\n provide() {\r\n return {\r\n triggerParentReset: this.triggerReset,\r\n };\r\n },\r\n inject: {\r\n registerMenuItem: { default: false },\r\n resetMenu: { default: false },\r\n triggerParentReset: { default: false },\r\n accordion: { default: false },\r\n activable: { default: false }\r\n }\r\n});\n\nconst _hoisted_1$1 = {\n key: 1\n};\nfunction render$2(_ctx, _cache, $props, $setup, $data, $options) {\n const _component_o_icon = resolveComponent(\"o-icon\");\n\n return openBlock(), createBlock(\"li\", {\n role: _ctx.ariaRoleMenu,\n class: _ctx.wrapperClasses\n }, [(openBlock(), createBlock(resolveDynamicComponent(_ctx.tag), mergeProps(_ctx.$attrs, {\n class: _ctx.itemClasses,\n onClick: _cache[1] || (_cache[1] = $event => _ctx.handleClick())\n }), {\n default: withCtx(() => [_ctx.icon ? createVNode(_component_o_icon, {\n key: 0,\n icon: _ctx.icon,\n pack: _ctx.iconPack,\n size: _ctx.size\n }, null, 8\n /* PROPS */\n , [\"icon\", \"pack\", \"size\"]) : createCommentVNode(\"v-if\", true), _ctx.label ? (openBlock(), createBlock(\"span\", _hoisted_1$1, toDisplayString(_ctx.label), 1\n /* TEXT */\n )) : renderSlot(_ctx.$slots, \"label\", {\n key: 2,\n expanded: _ctx.newExpanded,\n active: _ctx.newActive\n })]),\n _: 1\n }, 16\n /* FULL_PROPS */\n , [\"class\"])), createCommentVNode(\" sub menu items \"), _ctx.$slots.default ? createVNode(Transition, {\n key: 0,\n name: _ctx.animation\n }, {\n default: withCtx(() => [withDirectives(createVNode(\"ul\", {\n class: _ctx.submenuClasses\n }, [renderSlot(_ctx.$slots, \"default\")], 2\n /* CLASS */\n ), [[vShow, _ctx.newExpanded]])]),\n _: 3\n }, 8\n /* PROPS */\n , [\"name\"]) : createCommentVNode(\"v-if\", true)], 10\n /* CLASS, PROPS */\n , [\"role\"]);\n}\n\nscript$2.render = render$2;\nscript$2.__file = \"src/components/menu/MenuItem.vue\";\n\nvar index = {\r\n install(app) {\r\n registerComponent(app, script);\r\n registerComponent(app, script$1);\r\n registerComponent(app, script$2);\r\n }\r\n};\n\nexport default index;\nexport { script as OMenu, script$2 as OMenuItem, script$1 as OMenuList };\n","import { defineComponent, resolveComponent, resolveDirective, openBlock, createBlock, Transition, withCtx, withDirectives, createVNode, resolveDynamicComponent, mergeProps, toHandlers, toDisplayString, renderSlot, vShow, createCommentVNode, render as render$1 } from 'vue';\nimport { getValueByPath, toCssDimension, removeElement, merge } from './helpers.mjs';\nimport { getOptions, VueInstance } from './config.mjs';\nimport { B as BaseComponentMixin, b as registerComponent, a as registerComponentProgrammatic } from './plugins-ba5e2464.mjs';\nimport { s as script$1 } from './Icon-a7b85e86.mjs';\nimport { M as MatchMediaMixin } from './MatchMediaMixin-09b141ca.mjs';\nimport { d as directive } from './trapFocus-dc03669f.mjs';\nimport { I as InstanceRegistry } from './InstanceRegistry-2fdb6ee8.mjs';\n\n/**\r\n * Classic modal overlay to include any content you may need\r\n * @displayName Modal\r\n * @style _modal.scss\r\n */\r\nvar script = defineComponent({\r\n name: 'OModal',\r\n components: {\r\n [script$1.name]: script$1\r\n },\r\n configField: 'modal',\r\n directives: {\r\n trapFocus: directive\r\n },\r\n mixins: [BaseComponentMixin, MatchMediaMixin],\r\n emits: ['update:active', 'close'],\r\n props: {\r\n /** Whether modal is active or not, use v-model:active to make it two-way binding */\r\n active: Boolean,\r\n /** Component to be injected, used to open a component modal programmatically. Close modal within the component by emitting a 'close' event — this.$emit('close') */\r\n component: [Object, Function],\r\n /** Text content */\r\n content: String,\r\n /** @ignore */\r\n programmatic: Object,\r\n /** @ignore */\r\n promise: Promise,\r\n /** Props to be binded to the injected component */\r\n props: Object,\r\n /** Events to be binded to the injected component */\r\n events: Object,\r\n /** Width of the Modal */\r\n width: {\r\n type: [String, Number],\r\n default: () => {\r\n return getValueByPath(getOptions(), 'modal.width', 960);\r\n }\r\n },\r\n /** Custom animation (transition name) */\r\n animation: {\r\n type: String,\r\n default: () => {\r\n return getValueByPath(getOptions(), 'modal.animation', 'zoom-out');\r\n }\r\n },\r\n /**\r\n * Can close Modal by clicking 'X', pressing escape or clicking outside\r\n * @values escape, x, outside, button\r\n */\r\n canCancel: {\r\n type: [Array, Boolean],\r\n default: () => {\r\n return getValueByPath(getOptions(), 'modal.canCancel', ['escape', 'x', 'outside', 'button']);\r\n }\r\n },\r\n /** Callback function to call after user canceled (clicked 'X' / pressed escape / clicked outside) */\r\n onCancel: {\r\n type: Function,\r\n default: () => { }\r\n },\r\n /** Callback function to call after close (programmatically close or user canceled) */\r\n onClose: {\r\n type: Function,\r\n default: () => { }\r\n },\r\n /**\r\n * clip to remove the body scrollbar, keep to have a non scrollable scrollbar to avoid shifting background, but will set body to position fixed, might break some layouts\r\n * @values keep, clip\r\n */\r\n scroll: {\r\n type: String,\r\n default: () => {\r\n return getValueByPath(getOptions(), 'modal.scroll', 'keep');\r\n }\r\n },\r\n /** Display modal as full screen */\r\n fullScreen: Boolean,\r\n /** Trap focus inside the modal. */\r\n trapFocus: {\r\n type: Boolean,\r\n default: () => {\r\n return getValueByPath(getOptions(), 'modal.trapFocus', true);\r\n }\r\n },\r\n ariaRole: {\r\n type: String,\r\n validator: (value) => {\r\n return ['dialog', 'alertdialog'].indexOf(value) >= 0;\r\n }\r\n },\r\n ariaModal: Boolean,\r\n ariaLabel: String,\r\n /** Destroy modal on hide */\r\n destroyOnHide: {\r\n type: Boolean,\r\n default: () => {\r\n return getValueByPath(getOptions(), 'modal.destroyOnHide', true);\r\n }\r\n },\r\n /** Automatically focus modal when active */\r\n autoFocus: {\r\n type: Boolean,\r\n default: () => {\r\n return getValueByPath(getOptions(), 'modal.autoFocus', true);\r\n }\r\n },\r\n /** Icon name */\r\n closeIcon: {\r\n type: String,\r\n default: () => {\r\n return getValueByPath(getOptions(), 'modal.closeIcon', 'close');\r\n }\r\n },\r\n closeIconSize: {\r\n type: String,\r\n default: 'medium'\r\n },\r\n rootClass: [String, Function, Array],\r\n overlayClass: [String, Function, Array],\r\n contentClass: [String, Function, Array],\r\n closeClass: [String, Function, Array],\r\n fullScreenClass: [String, Function, Array],\r\n mobileClass: [String, Function, Array],\r\n scrollClipClass: [String, Function, Array],\r\n noScrollClass: [String, Function, Array]\r\n },\r\n data() {\r\n return {\r\n isActive: this.active || false,\r\n savedScrollTop: null,\r\n newWidth: toCssDimension(this.width),\r\n animating: !this.active,\r\n destroyed: !this.active\r\n };\r\n },\r\n computed: {\r\n rootClasses() {\r\n return [\r\n this.computedClass('rootClass', 'o-modal'),\r\n { [this.computedClass('mobileClass', 'o-modal--mobile')]: this.isMatchMedia },\r\n ];\r\n },\r\n overlayClasses() {\r\n return [\r\n this.computedClass('overlayClass', 'o-modal__overlay')\r\n ];\r\n },\r\n contentClasses() {\r\n return [\r\n this.computedClass('contentClass', 'o-modal__content'),\r\n { [this.computedClass('fullScreenClass', 'o-modal__content--full-screen')]: this.fullScreen }\r\n ];\r\n },\r\n closeClasses() {\r\n return [\r\n this.computedClass('closeClass', 'o-modal__close')\r\n ];\r\n },\r\n scrollClass() {\r\n if (this.scroll === 'clip') {\r\n return this.computedClass('scrollClipClass', 'o-clipped');\r\n }\r\n return this.computedClass('noScrollClass', 'o-noscroll');\r\n },\r\n cancelOptions() {\r\n return typeof this.canCancel === 'boolean'\r\n ? this.canCancel\r\n ? getValueByPath(getOptions(), 'modal.canCancel', ['escape', 'x', 'outside', 'button'])\r\n : []\r\n : this.canCancel;\r\n },\r\n showX() {\r\n return this.cancelOptions.indexOf('x') >= 0;\r\n },\r\n customStyle() {\r\n if (!this.fullScreen) {\r\n return { maxWidth: this.newWidth };\r\n }\r\n return null;\r\n }\r\n },\r\n watch: {\r\n active(value) {\r\n this.isActive = value;\r\n },\r\n isActive(value) {\r\n if (value)\r\n this.destroyed = false;\r\n this.handleScroll();\r\n this.$nextTick(() => {\r\n if (value && this.$el && this.$el.focus && this.autoFocus) {\r\n this.$el.focus();\r\n }\r\n });\r\n }\r\n },\r\n methods: {\r\n handleScroll() {\r\n if (typeof window === 'undefined')\r\n return;\r\n if (this.scroll === 'clip') {\r\n if (this.scrollClass) {\r\n if (this.isActive) {\r\n document.documentElement.classList.add(this.scrollClass);\r\n }\r\n else {\r\n document.documentElement.classList.remove(this.scrollClass);\r\n }\r\n return;\r\n }\r\n }\r\n this.savedScrollTop = !this.savedScrollTop\r\n ? document.documentElement.scrollTop\r\n : this.savedScrollTop;\r\n if (this.scrollClass) {\r\n if (this.isActive) {\r\n document.body.classList.add(this.scrollClass);\r\n }\r\n else {\r\n document.body.classList.remove(this.scrollClass);\r\n }\r\n }\r\n if (this.isActive) {\r\n document.body.style.top = `-${this.savedScrollTop}px`;\r\n return;\r\n }\r\n document.documentElement.scrollTop = this.savedScrollTop;\r\n document.body.style.top = null;\r\n this.savedScrollTop = null;\r\n },\r\n /**\r\n * Close the Modal if canCancel and call the onCancel prop (function).\r\n */\r\n cancel(method) {\r\n if (this.cancelOptions.indexOf(method) < 0)\r\n return;\r\n this.onCancel.apply(null, arguments);\r\n this.close({ action: 'cancel', method });\r\n },\r\n /**\r\n * Emit events, and destroy modal if it's programmatic.\r\n */\r\n close() {\r\n this.isActive = false;\r\n if (this.destroyOnHide) {\r\n this.destroyed = true;\r\n }\r\n this.$emit('update:active', false);\r\n this.onClose.apply(null, arguments);\r\n // Waiting for the animation complete before destroying\r\n if (this.programmatic) {\r\n if (this.programmatic.instances) {\r\n this.programmatic.instances.remove(this);\r\n }\r\n if (this.programmatic.resolve) {\r\n this.programmatic.resolve.apply(null, arguments);\r\n }\r\n window.requestAnimationFrame(() => {\r\n removeElement(this.$el);\r\n });\r\n }\r\n },\r\n /**\r\n * Keypress event that is bound to the document.\r\n */\r\n keyPress({ key }) {\r\n if (this.isActive && (key === 'Escape' || key === 'Esc'))\r\n this.cancel('escape');\r\n },\r\n /**\r\n * Transition after-enter hook\r\n */\r\n afterEnter() {\r\n this.animating = false;\r\n },\r\n /**\r\n * Transition before-leave hook\r\n */\r\n beforeLeave() {\r\n this.animating = true;\r\n }\r\n },\r\n created() {\r\n if (typeof window !== 'undefined') {\r\n document.addEventListener('keyup', this.keyPress);\r\n }\r\n },\r\n mounted() {\r\n if (this.programmatic) {\r\n if (this.programmatic.instances) {\r\n this.programmatic.instances.add(this);\r\n }\r\n // Insert the Modal component in body tag\r\n // only if it's programmatic\r\n document.body.appendChild(this.$el);\r\n this.isActive = true;\r\n }\r\n else if (this.isActive)\r\n this.handleScroll();\r\n },\r\n beforeUnmount() {\r\n if (typeof window !== 'undefined') {\r\n document.removeEventListener('keyup', this.keyPress);\r\n // reset scroll\r\n const savedScrollTop = !this.savedScrollTop\r\n ? document.documentElement.scrollTop\r\n : this.savedScrollTop;\r\n if (this.scrollClass) {\r\n document.body.classList.remove(this.scrollClass);\r\n document.documentElement.classList.remove(this.scrollClass);\r\n }\r\n document.documentElement.scrollTop = savedScrollTop;\r\n document.body.style.top = null;\r\n }\r\n }\r\n});\n\nconst _hoisted_1 = {\n key: 1\n};\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n const _component_o_icon = resolveComponent(\"o-icon\");\n\n const _directive_trap_focus = resolveDirective(\"trap-focus\");\n\n return openBlock(), createBlock(Transition, {\n name: _ctx.animation,\n \"onAfter-enter\": _ctx.afterEnter,\n \"onBefore-leave\": _ctx.beforeLeave\n }, {\n default: withCtx(() => [!_ctx.destroyed ? withDirectives((openBlock(), createBlock(\"div\", {\n key: 0,\n class: _ctx.rootClasses,\n tabindex: -1,\n role: _ctx.ariaRole,\n \"aria-label\": _ctx.ariaLabel,\n \"aria-modal\": _ctx.ariaModal\n }, [createVNode(\"div\", {\n class: _ctx.overlayClasses,\n onClick: _cache[1] || (_cache[1] = $event => _ctx.cancel('outside'))\n }, null, 2\n /* CLASS */\n ), createVNode(\"div\", {\n class: _ctx.contentClasses,\n style: _ctx.customStyle\n }, [_ctx.component ? (openBlock(), createBlock(resolveDynamicComponent(_ctx.component), mergeProps({\n key: 0\n }, _ctx.props, toHandlers(_ctx.events || {}), {\n onClose: _ctx.close\n }), null, 16\n /* FULL_PROPS */\n , [\"onClose\"])) : _ctx.content ? (openBlock(), createBlock(\"div\", _hoisted_1, toDisplayString(_ctx.content), 1\n /* TEXT */\n )) : renderSlot(_ctx.$slots, \"default\", {\n key: 2\n }), _ctx.showX ? withDirectives(createVNode(_component_o_icon, {\n key: 3,\n clickable: \"\",\n both: \"\",\n class: _ctx.closeClasses,\n icon: _ctx.closeIcon,\n size: _ctx.closeIconSize,\n onClick: _cache[2] || (_cache[2] = $event => _ctx.cancel('x'))\n }, null, 8\n /* PROPS */\n , [\"class\", \"icon\", \"size\"]), [[vShow, !_ctx.animating]]) : createCommentVNode(\"v-if\", true)], 6\n /* CLASS, STYLE */\n )], 10\n /* CLASS, PROPS */\n , [\"role\", \"aria-label\", \"aria-modal\"])), [[vShow, _ctx.isActive], [_directive_trap_focus, _ctx.trapFocus]]) : createCommentVNode(\"v-if\", true)]),\n _: 1\n }, 8\n /* PROPS */\n , [\"name\", \"onAfter-enter\", \"onBefore-leave\"]);\n}\n\nscript.render = render;\nscript.__file = \"src/components/modal/Modal.vue\";\n\nlet localVueInstance;\r\nlet instances = new InstanceRegistry();\r\nconst ModalProgrammatic = {\r\n open(params) {\r\n let newParams;\r\n if (typeof params === 'string') {\r\n newParams = {\r\n content: params\r\n };\r\n }\r\n else {\r\n newParams = params;\r\n }\r\n const defaultParam = {\r\n programmatic: { instances }\r\n };\r\n let slot;\r\n if (Array.isArray(newParams.content)) {\r\n slot = newParams.content;\r\n delete newParams.content;\r\n }\r\n const propsData = merge(defaultParam, newParams);\r\n propsData.promise = new Promise((p1, p2) => {\r\n propsData.programmatic.resolve = p1;\r\n propsData.programmatic.reject = p2;\r\n });\r\n const app = localVueInstance || VueInstance;\r\n const defaultSlot = () => { return slot; };\r\n const vnode = createVNode(script, propsData, defaultSlot);\r\n vnode.appContext = app._context;\r\n render$1(vnode, document.createElement('div'));\r\n return vnode.component.proxy;\r\n },\r\n closeAll() {\r\n console.log(instances);\r\n instances.walk((entry) => {\r\n entry.close(...arguments);\r\n });\r\n }\r\n};\r\nvar index = {\r\n install(app) {\r\n localVueInstance = app;\r\n registerComponent(app, script);\r\n registerComponentProgrammatic(app, 'modal', ModalProgrammatic);\r\n }\r\n};\n\nexport default index;\nexport { ModalProgrammatic, script as OModal };\n","import { resolveComponent, openBlock, createBlock, Transition, withCtx, withDirectives, createVNode, createCommentVNode, resolveDynamicComponent, mergeProps, toHandlers, renderSlot, vShow, defineComponent, render as render$2 } from 'vue';\nimport { getValueByPath, removeElement, merge } from './helpers.mjs';\nimport { getOptions, VueInstance } from './config.mjs';\nimport { B as BaseComponentMixin, b as registerComponent, a as registerComponentProgrammatic } from './plugins-ba5e2464.mjs';\nimport { s as script$2 } from './Icon-a7b85e86.mjs';\nimport { I as InstanceRegistry } from './InstanceRegistry-2fdb6ee8.mjs';\n\nvar MessageMixin = {\r\n components: {\r\n [script$2.name]: script$2\r\n },\r\n props: {\r\n /** Whether modal is active or not, use the .sync modifier (Vue 2.x) or v-model:active (Vue 3.x) to make it two-way binding */\r\n active: {\r\n type: Boolean,\r\n default: true\r\n },\r\n /** Adds an 'X' button that closes the notification. */\r\n closable: {\r\n type: Boolean,\r\n default: false\r\n },\r\n /** Message text (can contain HTML). */\r\n message: String,\r\n /** Type (color) of the notification, optional. */\r\n type: String,\r\n /** Adds an icon on the left side depending on the type (or the icon prop if defined). */\r\n hasIcon: Boolean,\r\n /** Icon name to use with has-icon. */\r\n icon: String,\r\n /** Icon pack to use. */\r\n iconPack: String,\r\n /** Icon size */\r\n iconSize: {\r\n type: String,\r\n default: 'large'\r\n },\r\n /** Hide notification after duration only not programmatic. */\r\n autoClose: {\r\n type: Boolean,\r\n default: false\r\n },\r\n /** Visibility duration in miliseconds. */\r\n duration: {\r\n type: Number,\r\n default: 2000\r\n }\r\n },\r\n data() {\r\n return {\r\n isActive: this.active\r\n };\r\n },\r\n watch: {\r\n active(value) {\r\n this.isActive = value;\r\n },\r\n isActive(value) {\r\n if (value) {\r\n this.setAutoClose();\r\n }\r\n else {\r\n if (this.timer) {\r\n clearTimeout(this.timer);\r\n }\r\n }\r\n }\r\n },\r\n computed: {\r\n /**\r\n * Icon name (MDI) based on type.\r\n */\r\n computedIcon() {\r\n if (this.icon) {\r\n return this.icon;\r\n }\r\n switch (this.type) {\r\n case 'info':\r\n return 'information';\r\n case 'success':\r\n return 'check-circle';\r\n case 'warning':\r\n return 'alert';\r\n case 'danger':\r\n return 'alert-circle';\r\n default:\r\n return null;\r\n }\r\n }\r\n },\r\n methods: {\r\n /**\r\n * Close the Message and emit events.\r\n */\r\n close() {\r\n this.isActive = false;\r\n this.$emit('close', ...arguments);\r\n this.$emit('update:active', false);\r\n },\r\n /**\r\n * Set timer to auto close message\r\n */\r\n setAutoClose() {\r\n if (this.autoClose) {\r\n this.timer = setTimeout(() => {\r\n if (this.isActive) {\r\n this.close({ action: 'close', method: 'timeout' });\r\n }\r\n }, this.duration);\r\n }\r\n }\r\n },\r\n mounted() {\r\n this.setAutoClose();\r\n }\r\n};\n\n/**\r\n * Bold notification blocks to alert your users of something\r\n * @displayName Notification\r\n * @requires ./NotificationNotice.vue\r\n * @style _notification.scss\r\n */\r\nvar script = {\r\n name: 'ONotification',\r\n configField: 'notification',\r\n mixins: [BaseComponentMixin, MessageMixin],\r\n emits: ['update:active', 'close'],\r\n props: {\r\n /**\r\n * Which position the notification will appear when programmatically\r\n * @values top-right, top, top-left, bottom-right, bottom, bottom-left\r\n */\r\n position: String,\r\n /**\r\n * Color of the control, optional\r\n * @values primary, info, success, warning, danger, and any other custom color\r\n */\r\n variant: [String, Object],\r\n /**\r\n * Label for the close button, to be read by accessibility screenreaders.\r\n */\r\n ariaCloseLabel: String,\r\n /**\r\n * Size of close icon\r\n */\r\n closeIconSize: {\r\n type: String,\r\n default: 'small'\r\n },\r\n /**\r\n * Custom animation (transition name).\r\n */\r\n animation: {\r\n type: String,\r\n default: 'fade'\r\n },\r\n /** Component to be injected, used to open a component modal programmatically. Close modal within the component by emitting a 'close' event — this.$emit('close') */\r\n component: [Object, Function],\r\n /** Props to be binded to the injected component */\r\n props: Object,\r\n /** Events to be binded to the injected component */\r\n events: {\r\n type: Object,\r\n default: () => ({})\r\n },\r\n /** Close icon name */\r\n closeIcon: {\r\n type: String,\r\n default: () => {\r\n return getValueByPath(getOptions(), 'notification.closeIcon', 'close');\r\n }\r\n },\r\n rootClass: [String, Function, Array],\r\n closeClass: [String, Function, Array],\r\n contentClass: [String, Function, Array],\r\n iconClass: [String, Function, Array],\r\n positionClass: [String, Function, Array],\r\n variantClass: [String, Function, Array],\r\n wrapperClass: [String, Function, Array],\r\n },\r\n computed: {\r\n rootClasses() {\r\n return [\r\n this.computedClass('rootClass', 'o-notification'),\r\n { [this.computedClass('variantClass', 'o-notification--', this.variant)]: this.variant },\r\n { [this.computedClass('positionClass', 'o-notification--', this.position)]: this.position },\r\n ];\r\n },\r\n wrapperClasses() {\r\n return [\r\n this.computedClass('wrapperClass', 'o-notification__wrapper')\r\n ];\r\n },\r\n iconClasses() {\r\n return [\r\n this.computedClass('iconClass', 'o-notification__icon')\r\n ];\r\n },\r\n contentClasses() {\r\n return [\r\n this.computedClass('contentClass', 'o-notification__content')\r\n ];\r\n },\r\n closeClasses() {\r\n return [\r\n this.computedClass('closeClass', 'o-notification__close')\r\n ];\r\n },\r\n },\r\n};\n\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n const _component_o_icon = resolveComponent(\"o-icon\");\n\n return openBlock(), createBlock(Transition, {\n name: $props.animation\n }, {\n default: withCtx(() => [withDirectives(createVNode(\"article\", {\n class: $options.rootClasses\n }, [_ctx.closable ? (openBlock(), createBlock(\"button\", {\n key: 0,\n class: $options.closeClasses,\n type: \"button\",\n onClick: _cache[1] || (_cache[1] = $event => _ctx.close({\n action: 'close',\n method: 'x'\n })),\n \"aria-label\": $props.ariaCloseLabel\n }, [createVNode(_component_o_icon, {\n clickable: \"\",\n pack: _ctx.iconPack,\n both: \"\",\n icon: $props.closeIcon,\n size: $props.closeIconSize\n }, null, 8\n /* PROPS */\n , [\"pack\", \"icon\", \"size\"])], 10\n /* CLASS, PROPS */\n , [\"aria-label\"])) : createCommentVNode(\"v-if\", true), $props.component ? (openBlock(), createBlock(resolveDynamicComponent($props.component), mergeProps({\n key: 1\n }, $props.props, toHandlers($props.events), {\n onClose: _ctx.close\n }), null, 16\n /* FULL_PROPS */\n , [\"onClose\"])) : createCommentVNode(\"v-if\", true), _ctx.$slots.default || _ctx.message ? (openBlock(), createBlock(\"div\", {\n key: 2,\n class: $options.wrapperClasses\n }, [_ctx.computedIcon ? createVNode(_component_o_icon, {\n key: 0,\n icon: _ctx.computedIcon,\n pack: _ctx.iconPack,\n class: $options.iconClasses,\n both: \"\",\n size: _ctx.iconSize,\n \"aria-hidden\": \"\"\n }, null, 8\n /* PROPS */\n , [\"icon\", \"pack\", \"class\", \"size\"]) : createCommentVNode(\"v-if\", true), createVNode(\"div\", {\n class: $options.contentClasses\n }, [_ctx.message ? (openBlock(), createBlock(\"span\", {\n key: 0,\n innerHTML: _ctx.message\n }, null, 8\n /* PROPS */\n , [\"innerHTML\"])) : renderSlot(_ctx.$slots, \"default\", {\n key: 1,\n closeNotification: _ctx.close\n })], 2\n /* CLASS */\n )], 2\n /* CLASS */\n )) : createCommentVNode(\"v-if\", true)], 2\n /* CLASS */\n ), [[vShow, _ctx.isActive]])]),\n _: 1\n }, 8\n /* PROPS */\n , [\"name\"]);\n}\n\nscript.render = render;\nscript.__file = \"src/components/notification/Notification.vue\";\n\nvar NoticeMixin = {\r\n props: {\r\n /** Type (color) of the notification, optional. */\r\n type: {\r\n type: String,\r\n },\r\n /** Message text (can contain HTML). */\r\n message: [String, Array],\r\n /** Visibility duration in miliseconds. */\r\n duration: {\r\n type: Number,\r\n default: () => {\r\n return getValueByPath(getOptions(), 'notification.duration', 1000);\r\n }\r\n },\r\n /** If should queue with others notices (snackbar/toast/notification). */\r\n queue: {\r\n type: Boolean,\r\n default: () => {\r\n return getValueByPath(getOptions(), 'notification.noticeQueue', undefined);\r\n }\r\n },\r\n /** Show the Notification indefinitely until it is dismissed when programmatically. */\r\n indefinite: {\r\n type: Boolean,\r\n default: false\r\n },\r\n /** Which position the notification will appear when programmatically. */\r\n position: {\r\n type: String,\r\n default: 'top',\r\n validator(value) {\r\n return [\r\n 'top-right',\r\n 'top',\r\n 'top-left',\r\n 'bottom-right',\r\n 'bottom',\r\n 'bottom-left'\r\n ].indexOf(value) > -1;\r\n }\r\n },\r\n /** DOM element the toast will be created on. Note that this also changes the position of the toast from fixed to absolute. Meaning that the container should be fixed. */\r\n container: {\r\n type: String,\r\n default: () => {\r\n return getValueByPath(getOptions(), 'notification.containerElement', undefined);\r\n }\r\n },\r\n /** @ignore */\r\n programmatic: Object,\r\n /** @ignore */\r\n promise: Promise,\r\n /** Callback function to call after close (programmatically close or user canceled) */\r\n onClose: {\r\n type: Function,\r\n default: () => { }\r\n }\r\n },\r\n data() {\r\n return {\r\n isActive: false,\r\n parentTop: null,\r\n parentBottom: null,\r\n newDuration: this.duration,\r\n newContainer: this.container\r\n };\r\n },\r\n computed: {\r\n correctParent() {\r\n switch (this.position) {\r\n case 'top-right':\r\n case 'top':\r\n case 'top-left':\r\n return this.parentTop;\r\n case 'bottom-right':\r\n case 'bottom':\r\n case 'bottom-left':\r\n return this.parentBottom;\r\n }\r\n },\r\n transition() {\r\n switch (this.position) {\r\n case 'top-right':\r\n case 'top':\r\n case 'top-left':\r\n return {\r\n enter: 'fadeInDown',\r\n leave: 'fadeOut'\r\n };\r\n case 'bottom-right':\r\n case 'bottom':\r\n case 'bottom-left':\r\n return {\r\n enter: 'fadeInUp',\r\n leave: 'fadeOut'\r\n };\r\n }\r\n }\r\n },\r\n methods: {\r\n shouldQueue() {\r\n if (!this.queue)\r\n return false;\r\n return (this.parentTop.childElementCount > 0 ||\r\n this.parentBottom.childElementCount > 0);\r\n },\r\n close() {\r\n clearTimeout(this.timer);\r\n this.$emit('close');\r\n this.onClose.apply(null, arguments);\r\n if (this.programmatic) {\r\n if (this.programmatic.instances) {\r\n this.programmatic.instances.remove(this);\r\n }\r\n if (this.programmatic.resolve) {\r\n this.programmatic.resolve.apply(null, arguments);\r\n }\r\n }\r\n // Timeout for the animation complete before destroying\r\n setTimeout(() => {\r\n this.isActive = false;\r\n removeElement(this.$el);\r\n }, 150);\r\n },\r\n showNotice() {\r\n if (this.shouldQueue())\r\n this.correctParent.innerHTML = '';\r\n this.correctParent.insertAdjacentElement('afterbegin', this.$el);\r\n this.isActive = true;\r\n if (!this.indefinite) {\r\n this.timer = setTimeout(() => this.timeoutCallback(), this.newDuration);\r\n }\r\n },\r\n setupContainer() {\r\n if (this.rootClasses() && this.positionClasses('top') && this.positionClasses('bottom')) {\r\n this.parentTop = document.querySelector((this.newContainer ? this.newContainer : 'body') + `>.${this.rootClasses().join('.')}.${this.positionClasses('top').join('.')}`);\r\n this.parentBottom = document.querySelector((this.newContainer ? this.newContainer : 'body') + `>.${this.rootClasses().join('.')}.${this.positionClasses('bottom').join('.')}`);\r\n if (this.parentTop && this.parentBottom)\r\n return;\r\n if (!this.parentTop) {\r\n this.parentTop = document.createElement('div');\r\n this.parentTop.className = `${this.rootClasses().join(' ')} ${this.positionClasses('top').join(' ')}`;\r\n }\r\n if (!this.parentBottom) {\r\n this.parentBottom = document.createElement('div');\r\n this.parentBottom.className = `${this.rootClasses().join(' ')} ${this.positionClasses('bottom').join(' ')}`;\r\n }\r\n const container = document.querySelector(this.newContainer) || document.body;\r\n container.appendChild(this.parentTop);\r\n container.appendChild(this.parentBottom);\r\n if (this.newContainer) {\r\n const classes = this.noticeCustomContainerClasses();\r\n if (classes && classes.length) {\r\n classes.filter((c) => !!c).forEach((c) => {\r\n this.parentTop.classList.add(c);\r\n this.parentBottom.classList.add(c);\r\n });\r\n }\r\n }\r\n }\r\n },\r\n timeoutCallback() {\r\n return this.close({ action: 'close', method: 'timeout' });\r\n }\r\n },\r\n beforeMount() {\r\n this.setupContainer();\r\n },\r\n mounted() {\r\n if (this.programmatic && this.programmatic.instances) {\r\n this.programmatic.instances.add(this);\r\n }\r\n this.showNotice();\r\n }\r\n};\n\n/**\r\n * @displayName Notification Notice\r\n */\r\nvar script$1 = defineComponent({\r\n name: 'ONotificationNotice',\r\n configField: 'notification',\r\n mixins: [BaseComponentMixin, NoticeMixin],\r\n props: {\r\n propsNotification: Object,\r\n noticeClass: [String, Function, Array],\r\n noticePositionClass: [String, Function, Array],\r\n noticeCustomContainerClass: [String, Function, Array],\r\n },\r\n emits: ['update:active', 'close'],\r\n methods: {\r\n rootClasses() {\r\n return [\r\n this.computedClass('noticeClass', 'o-notices'),\r\n ];\r\n },\r\n positionClasses(position) {\r\n return [\r\n this.computedClass('noticePositionClass', 'o-notices--', position),\r\n ];\r\n },\r\n noticeCustomContainerClasses() {\r\n return [\r\n this.computedClass('noticeCustomContainerClass', 'o-notices__custom-container')\r\n ];\r\n },\r\n timeoutCallback() {\r\n return this.$refs.notification.close({ action: 'close', method: 'timeout' });\r\n }\r\n }\r\n});\n\nfunction render$1(_ctx, _cache, $props, $setup, $data, $options) {\n const _component_o_notification = resolveComponent(\"o-notification\");\n\n return openBlock(), createBlock(_component_o_notification, mergeProps(_ctx.propsNotification, {\n ref: \"notification\",\n onClose: _ctx.close\n }), {\n default: withCtx(() => [renderSlot(_ctx.$slots, \"default\")]),\n _: 3\n }, 16\n /* FULL_PROPS */\n , [\"onClose\"]);\n}\n\nscript$1.render = render$1;\nscript$1.__file = \"src/components/notification/NotificationNotice.vue\";\n\nlet localVueInstance;\r\nlet instances = new InstanceRegistry();\r\nconst NotificationProgrammatic = {\r\n open(params) {\r\n let newParams;\r\n if (typeof params === 'string') {\r\n newParams = {\r\n message: params\r\n };\r\n }\r\n else {\r\n newParams = params;\r\n }\r\n const defaultParam = {\r\n programmatic: { instances },\r\n position: getValueByPath(getOptions(), 'notification.position', 'top-right'),\r\n closable: params.closable || getValueByPath(getOptions(), 'notification.closable', false)\r\n };\r\n let slot;\r\n if (Array.isArray(newParams.message)) {\r\n slot = newParams.message;\r\n delete newParams.message;\r\n }\r\n newParams.active = true;\r\n const propsData = merge(defaultParam, newParams);\r\n propsData.promise = new Promise((p1, p2) => {\r\n propsData.programmatic.resolve = p1;\r\n propsData.programmatic.reject = p2;\r\n });\r\n const app = localVueInstance || VueInstance;\r\n propsData.propsNotification = Object.assign({}, propsData);\r\n propsData.propsNotification.isActive = true;\r\n const defaultSlot = () => { return slot; };\r\n const vnode = createVNode(script$1, propsData, defaultSlot);\r\n vnode.appContext = app._context;\r\n render$2(vnode, document.createElement('div'));\r\n return vnode.component.proxy;\r\n },\r\n closeAll() {\r\n instances.walk((entry) => {\r\n entry.close(...arguments);\r\n });\r\n }\r\n};\r\nvar index = {\r\n install(app) {\r\n localVueInstance = app;\r\n registerComponent(app, script);\r\n registerComponentProgrammatic(app, 'notification', NotificationProgrammatic);\r\n }\r\n};\n\nexport default index;\nexport { NotificationProgrammatic, script as ONotification };\n","import { defineComponent, openBlock, createBlock, resolveDynamicComponent, mergeProps, withModifiers, withCtx, renderSlot, createTextVNode, toDisplayString, resolveComponent, createVNode, Fragment, createCommentVNode, renderList } from 'vue';\nimport { getValueByPath } from './helpers.mjs';\nimport { getOptions } from './config.mjs';\nimport { B as BaseComponentMixin } from './plugins-ba5e2464.mjs';\nimport { s as script$2 } from './Icon-a7b85e86.mjs';\nimport { M as MatchMediaMixin } from './MatchMediaMixin-09b141ca.mjs';\n\nvar script = defineComponent({\r\n name: 'OPaginationButton',\r\n inject: ['$pagination'],\r\n configField: 'pagination',\r\n props: {\r\n page: {\r\n type: Object,\r\n required: true\r\n },\r\n tag: {\r\n type: String,\r\n default: 'a',\r\n validator: (value) => getValueByPath(getOptions(), 'linkTags', ['a', 'button', 'input', 'router-link', 'nuxt-link']).indexOf(value) >= 0\r\n },\r\n disabled: {\r\n type: Boolean,\r\n default: false\r\n },\r\n linkClass: [String, Array, Object],\r\n linkCurrentClass: [String, Array, Object]\r\n },\r\n computed: {\r\n linkClasses() {\r\n return [\r\n this.linkClass || [...this.$pagination.linkClasses],\r\n this.page.class,\r\n { [this.linkCurrentClass || this.$pagination.linkCurrentClasses]: this.page.isCurrent }\r\n ];\r\n },\r\n href() {\r\n if (this.tag === 'a') {\r\n return '#';\r\n }\r\n return '';\r\n },\r\n isDisabled() {\r\n if (this.tag === 'a')\r\n return null;\r\n return this.disabled || this.page.disabled;\r\n }\r\n }\r\n});\n\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n return openBlock(), createBlock(resolveDynamicComponent(_ctx.tag), mergeProps({\n role: \"button\",\n href: _ctx.href,\n disabled: _ctx.isDisabled,\n class: _ctx.linkClasses\n }, _ctx.$attrs, {\n onClick: withModifiers(_ctx.page.click, [\"prevent\"]),\n \"aria-label\": _ctx.page['aria-label'],\n \"aria-current\": _ctx.page.isCurrent\n }), {\n default: withCtx(() => [renderSlot(_ctx.$slots, \"default\", {}, () => [createTextVNode(toDisplayString(_ctx.page.number), 1\n /* TEXT */\n )])]),\n _: 3\n }, 16\n /* FULL_PROPS */\n , [\"href\", \"disabled\", \"class\", \"onClick\", \"aria-label\", \"aria-current\"]);\n}\n\nscript.render = render;\nscript.__file = \"src/components/pagination/PaginationButton.vue\";\n\n/**\r\n * A responsive and flexible pagination\r\n * @displayName Pagination\r\n * @style _pagination.scss\r\n */\r\nvar script$1 = defineComponent({\r\n name: 'OPagination',\r\n components: {\r\n [script$2.name]: script$2,\r\n [script.name]: script\r\n },\r\n configField: 'pagination',\r\n mixins: [BaseComponentMixin, MatchMediaMixin],\r\n provide() {\r\n return {\r\n $pagination: this\r\n };\r\n },\r\n emits: ['update:active', 'change', 'update:current'],\r\n props: {\r\n /** Total count of items */\r\n total: [Number, String],\r\n /** Items count for each page */\r\n perPage: {\r\n type: [Number, String],\r\n default: () => { return getValueByPath(getOptions(), 'pagination.perPage', 20); }\r\n },\r\n /** Current page number, use v-model:current to make it two-way binding */\r\n current: {\r\n type: [Number, String],\r\n default: 1\r\n },\r\n /** Number of pagination items to show before current page */\r\n rangeBefore: {\r\n type: [Number, String],\r\n default: 1\r\n },\r\n /** Number of pagination items to show after current page */\r\n rangeAfter: {\r\n type: [Number, String],\r\n default: 1\r\n },\r\n /**\r\n * Pagination size, optional\r\n * @values small, medium, large\r\n */\r\n size: String,\r\n /** Simple style */\r\n simple: Boolean,\r\n /** Rounded button styles */\r\n rounded: Boolean,\r\n /**\r\n * Buttons order, optional\r\n * @values centered, right, left\r\n */\r\n order: {\r\n type: String,\r\n default: () => { return getValueByPath(getOptions(), 'pagination.order', 'right'); }\r\n },\r\n /**\r\n * Icon pack to use\r\n * @values mdi, fa, fas and any other custom icon pack\r\n */\r\n iconPack: String,\r\n /** Icon to use for previous button */\r\n iconPrev: {\r\n type: String,\r\n default: () => { return getValueByPath(getOptions(), 'pagination.iconPrev', 'chevron-left'); }\r\n },\r\n /** Icon to use for next button */\r\n iconNext: {\r\n type: String,\r\n default: () => { return getValueByPath(getOptions(), 'pagination.iconNext', 'chevron-right'); }\r\n },\r\n ariaNextLabel: String,\r\n ariaPreviousLabel: String,\r\n ariaPageLabel: String,\r\n ariaCurrentLabel: String,\r\n rootClass: [String, Function, Array],\r\n prevBtnClass: [String, Function, Array],\r\n nextBtnClass: [String, Function, Array],\r\n listClass: [String, Function, Array],\r\n linkClass: [String, Function, Array],\r\n linkCurrentClass: [String, Function, Array],\r\n ellipsisClass: [String, Function, Array],\r\n infoClass: [String, Function, Array],\r\n orderClass: [String, Function, Array],\r\n simpleClass: [String, Function, Array],\r\n roundedClass: [String, Function, Array],\r\n linkDisabledClass: [String, Function, Array],\r\n sizeClass: [String, Function, Array],\r\n mobileClass: [String, Function, Array]\r\n },\r\n computed: {\r\n rootClasses() {\r\n return [\r\n this.computedClass('rootClass', 'o-pag'),\r\n { [this.computedClass('orderClass', 'o-pag--', this.order)]: this.order },\r\n { [this.computedClass('sizeClass', 'o-pag--', this.size)]: this.size },\r\n { [this.computedClass('simpleClass', 'o-pag--simple')]: this.simple },\r\n { [this.computedClass('mobileClass', 'o-pag--mobile')]: this.isMatchMedia },\r\n ];\r\n },\r\n prevBtnClasses() {\r\n return [\r\n this.computedClass('prevBtnClass', 'o-pag__previous'),\r\n { [this.computedClass('linkDisabledClass', 'o-pag__link--disabled')]: !this.hasPrev }\r\n ];\r\n },\r\n nextBtnClasses() {\r\n return [\r\n this.computedClass('nextBtnClass', 'o-pag__next'),\r\n { [this.computedClass('linkDisabledClass', 'o-pag__link--disabled')]: !this.hasNext }\r\n ];\r\n },\r\n infoClasses() {\r\n return [\r\n this.computedClass('infoClass', 'o-pag__info')\r\n ];\r\n },\r\n ellipsisClasses() {\r\n return [\r\n this.computedClass('ellipsisClass', 'o-pag__ellipsis')\r\n ];\r\n },\r\n listClasses() {\r\n return [\r\n this.computedClass('listClass', 'o-pag__list')\r\n ];\r\n },\r\n linkClasses() {\r\n return [\r\n this.computedClass('linkClass', 'o-pag__link'),\r\n { [this.computedClass('roundedClass', 'o-pag__link--rounded')]: this.rounded }\r\n ];\r\n },\r\n linkCurrentClasses() {\r\n return [\r\n this.computedClass('linkCurrentClass', 'o-pag__link--current'),\r\n ];\r\n },\r\n beforeCurrent() {\r\n return parseInt(this.rangeBefore);\r\n },\r\n afterCurrent() {\r\n return parseInt(this.rangeAfter);\r\n },\r\n /**\r\n * Total page size (count).\r\n */\r\n pageCount() {\r\n return Math.ceil(this.total / this.perPage);\r\n },\r\n /**\r\n * First item of the page (count).\r\n */\r\n firstItem() {\r\n const firstItem = this.current * this.perPage - this.perPage + 1;\r\n return firstItem >= 0 ? firstItem : 0;\r\n },\r\n /**\r\n * Check if previous button is available.\r\n */\r\n hasPrev() {\r\n return this.current > 1;\r\n },\r\n /**\r\n * Check if first page button should be visible.\r\n */\r\n hasFirst() {\r\n return this.current >= (2 + this.beforeCurrent);\r\n },\r\n /**\r\n * Check if first ellipsis should be visible.\r\n */\r\n hasFirstEllipsis() {\r\n return this.current >= (this.beforeCurrent + 4);\r\n },\r\n /**\r\n * Check if last page button should be visible.\r\n */\r\n hasLast() {\r\n return this.current <= this.pageCount - (1 + this.afterCurrent);\r\n },\r\n /**\r\n * Check if last ellipsis should be visible.\r\n */\r\n hasLastEllipsis() {\r\n return this.current < this.pageCount - (2 + this.afterCurrent);\r\n },\r\n /**\r\n * Check if next button is available.\r\n */\r\n hasNext() {\r\n return this.current < this.pageCount;\r\n },\r\n /**\r\n * Get near pages, 1 before and 1 after the current.\r\n * Also add the click event to the array.\r\n */\r\n pagesInRange() {\r\n if (this.simple)\r\n return;\r\n let left = Math.max(1, this.current - this.beforeCurrent);\r\n if (left - 1 === 2) {\r\n left--; // Do not show the ellipsis if there is only one to hide\r\n }\r\n let right = Math.min(this.current + this.afterCurrent, this.pageCount);\r\n if (this.pageCount - right === 2) {\r\n right++; // Do not show the ellipsis if there is only one to hide\r\n }\r\n const pages = [];\r\n for (let i = left; i <= right; i++) {\r\n pages.push(this.getPage(i));\r\n }\r\n return pages;\r\n },\r\n hasDefaultSlot() {\r\n return this.$slots.default;\r\n },\r\n hasPreviousSlot() {\r\n return this.$slots.previous;\r\n },\r\n hasNextSlot() {\r\n return this.$slots.next;\r\n }\r\n },\r\n watch: {\r\n /**\r\n * If current page is trying to be greater than page count, set to last.\r\n */\r\n pageCount(value) {\r\n if (this.current > value)\r\n this.last();\r\n }\r\n },\r\n methods: {\r\n /**\r\n * Previous button click listener.\r\n */\r\n prev(event) {\r\n this.changePage(this.current - 1, event);\r\n },\r\n /**\r\n * Next button click listener.\r\n */\r\n next(event) {\r\n this.changePage(this.current + 1, event);\r\n },\r\n /**\r\n * First button click listener.\r\n */\r\n first(event) {\r\n this.changePage(1, event);\r\n },\r\n /**\r\n * Last button click listener.\r\n */\r\n last(event) {\r\n this.changePage(this.pageCount, event);\r\n },\r\n changePage(num, event) {\r\n if (this.current === num || num < 1 || num > this.pageCount)\r\n return;\r\n this.$emit('change', num);\r\n this.$emit('update:current', num);\r\n // Set focus on element to keep tab order\r\n if (event && event.target) {\r\n this.$nextTick(() => event.target.focus());\r\n }\r\n },\r\n getPage(num, options = {}) {\r\n return {\r\n number: num,\r\n isCurrent: this.current === num,\r\n click: (event) => this.changePage(num, event),\r\n disabled: options.disabled || false,\r\n class: options.class || '',\r\n 'aria-label': options['aria-label'] || this.getAriaPageLabel(num, this.current === num)\r\n };\r\n },\r\n /**\r\n * Get text for aria-label according to page number.\r\n */\r\n getAriaPageLabel(pageNumber, isCurrent) {\r\n if (this.ariaPageLabel && (!isCurrent || !this.ariaCurrentLabel)) {\r\n return this.ariaPageLabel + ' ' + pageNumber + '.';\r\n }\r\n else if (this.ariaPageLabel && isCurrent && this.ariaCurrentLabel) {\r\n return this.ariaCurrentLabel + ', ' + this.ariaPageLabel + ' ' + pageNumber + '.';\r\n }\r\n return null;\r\n }\r\n }\r\n});\n\nconst _hoisted_1 = {\n key: 0\n};\nconst _hoisted_2 = {\n key: 1\n};\nconst _hoisted_3 = {\n key: 2\n};\nconst _hoisted_4 = {\n key: 3\n};\nfunction render$1(_ctx, _cache, $props, $setup, $data, $options) {\n const _component_o_icon = resolveComponent(\"o-icon\");\n\n const _component_o_pagination_button = resolveComponent(\"o-pagination-button\");\n\n return openBlock(), createBlock(\"nav\", {\n class: _ctx.rootClasses\n }, [_ctx.hasPreviousSlot ? renderSlot(_ctx.$slots, \"previous\", {\n key: 0,\n linkClass: _ctx.linkClasses,\n linkCurrentClass: _ctx.linkCurrentClasses,\n page: _ctx.getPage(_ctx.current - 1, {\n class: _ctx.prevBtnClasses,\n 'aria-label': _ctx.ariaPreviousLabel\n })\n }, () => [createVNode(_component_o_icon, {\n icon: _ctx.iconPrev,\n pack: _ctx.iconPack,\n both: \"\",\n \"aria-hidden\": \"true\"\n }, null, 8\n /* PROPS */\n , [\"icon\", \"pack\"])]) : createVNode(_component_o_pagination_button, {\n key: 1,\n class: _ctx.prevBtnClasses,\n linkClass: _ctx.linkClasses,\n linkCurrentClass: _ctx.linkCurrentClasses,\n page: _ctx.getPage(_ctx.current - 1)\n }, {\n default: withCtx(() => [createVNode(_component_o_icon, {\n icon: _ctx.iconPrev,\n pack: _ctx.iconPack,\n both: \"\",\n \"aria-hidden\": \"true\"\n }, null, 8\n /* PROPS */\n , [\"icon\", \"pack\"])]),\n _: 1\n }, 8\n /* PROPS */\n , [\"class\", \"linkClass\", \"linkCurrentClass\", \"page\"]), _ctx.hasNextSlot ? renderSlot(_ctx.$slots, \"next\", {\n key: 2,\n linkClass: _ctx.linkClasses,\n linkCurrentClass: _ctx.linkCurrentClasses,\n page: _ctx.getPage(_ctx.current + 1, {\n class: _ctx.nextBtnClasses,\n 'aria-label': _ctx.ariaNextLabel\n })\n }, () => [createVNode(_component_o_icon, {\n icon: _ctx.iconNext,\n pack: _ctx.iconPack,\n both: \"\",\n \"aria-hidden\": \"true\"\n }, null, 8\n /* PROPS */\n , [\"icon\", \"pack\"])]) : createVNode(_component_o_pagination_button, {\n key: 3,\n class: _ctx.nextBtnClasses,\n linkClass: _ctx.linkClasses,\n linkCurrentClass: _ctx.linkCurrentClasses,\n page: _ctx.getPage(_ctx.current + 1)\n }, {\n default: withCtx(() => [createVNode(_component_o_icon, {\n icon: _ctx.iconNext,\n pack: _ctx.iconPack,\n both: \"\",\n \"aria-hidden\": \"true\"\n }, null, 8\n /* PROPS */\n , [\"icon\", \"pack\"])]),\n _: 1\n }, 8\n /* PROPS */\n , [\"class\", \"linkClass\", \"linkCurrentClass\", \"page\"]), _ctx.simple ? (openBlock(), createBlock(\"small\", {\n key: 4,\n class: _ctx.infoClasses\n }, [_ctx.perPage == 1 ? (openBlock(), createBlock(Fragment, {\n key: 0\n }, [createTextVNode(toDisplayString(_ctx.firstItem) + \" / \" + toDisplayString(_ctx.total), 1\n /* TEXT */\n )], 64\n /* STABLE_FRAGMENT */\n )) : (openBlock(), createBlock(Fragment, {\n key: 1\n }, [createTextVNode(toDisplayString(_ctx.firstItem) + \"-\" + toDisplayString(Math.min(_ctx.current * _ctx.perPage, _ctx.total)) + \" / \" + toDisplayString(_ctx.total), 1\n /* TEXT */\n )], 64\n /* STABLE_FRAGMENT */\n ))], 2\n /* CLASS */\n )) : (openBlock(), createBlock(\"ul\", {\n key: 5,\n class: _ctx.listClasses\n }, [createCommentVNode(\"First\"), _ctx.hasFirst ? (openBlock(), createBlock(\"li\", _hoisted_1, [_ctx.hasDefaultSlot ? renderSlot(_ctx.$slots, \"default\", {\n key: 0,\n page: _ctx.getPage(1),\n linkClass: _ctx.linkClasses,\n linkCurrentClass: _ctx.linkCurrentClasses\n }) : createVNode(_component_o_pagination_button, {\n key: 1,\n linkClass: _ctx.linkClasses,\n linkCurrentClass: _ctx.linkCurrentClasses,\n page: _ctx.getPage(1)\n }, null, 8\n /* PROPS */\n , [\"linkClass\", \"linkCurrentClass\", \"page\"])])) : createCommentVNode(\"v-if\", true), _ctx.hasFirstEllipsis ? (openBlock(), createBlock(\"li\", _hoisted_2, [createVNode(\"span\", {\n class: _ctx.ellipsisClasses\n }, \"…\", 2\n /* CLASS */\n )])) : createCommentVNode(\"v-if\", true), createCommentVNode(\"Pages\"), (openBlock(true), createBlock(Fragment, null, renderList(_ctx.pagesInRange, page => {\n return openBlock(), createBlock(\"li\", {\n key: page.number\n }, [_ctx.hasDefaultSlot ? renderSlot(_ctx.$slots, \"default\", {\n key: 0,\n page: page,\n linkClass: _ctx.linkClasses,\n linkCurrentClass: _ctx.linkCurrentClasses\n }) : createVNode(_component_o_pagination_button, {\n key: 1,\n linkClass: _ctx.linkClasses,\n linkCurrentClass: _ctx.linkCurrentClasses,\n page: page\n }, null, 8\n /* PROPS */\n , [\"linkClass\", \"linkCurrentClass\", \"page\"])]);\n }), 128\n /* KEYED_FRAGMENT */\n )), createCommentVNode(\"Last\"), _ctx.hasLastEllipsis ? (openBlock(), createBlock(\"li\", _hoisted_3, [createVNode(\"span\", {\n class: _ctx.ellipsisClasses\n }, \"…\", 2\n /* CLASS */\n )])) : createCommentVNode(\"v-if\", true), _ctx.hasLast ? (openBlock(), createBlock(\"li\", _hoisted_4, [_ctx.hasDefaultSlot ? renderSlot(_ctx.$slots, \"default\", {\n key: 0,\n page: _ctx.getPage(_ctx.pageCount),\n linkClass: _ctx.linkClasses,\n linkCurrentClass: _ctx.linkCurrentClasses\n }) : createVNode(_component_o_pagination_button, {\n key: 1,\n linkClass: _ctx.linkClasses,\n linkCurrentClass: _ctx.linkCurrentClasses,\n page: _ctx.getPage(_ctx.pageCount)\n }, null, 8\n /* PROPS */\n , [\"linkClass\", \"linkCurrentClass\", \"page\"])])) : createCommentVNode(\"v-if\", true)], 2\n /* CLASS */\n ))], 2\n /* CLASS */\n );\n}\n\nscript$1.render = render$1;\nscript$1.__file = \"src/components/pagination/Pagination.vue\";\n\nexport { script as a, script$1 as s };\n","import 'vue';\nimport './helpers.mjs';\nimport './config.mjs';\nimport { b as registerComponent } from './plugins-ba5e2464.mjs';\nimport './Icon-a7b85e86.mjs';\nimport './MatchMediaMixin-09b141ca.mjs';\nimport { s as script, a as script$1 } from './Pagination-02a660a8.mjs';\nexport { s as OPagination, a as OPaginationButton } from './Pagination-02a660a8.mjs';\n\nvar index = {\r\n install(app) {\r\n registerComponent(app, script);\r\n registerComponent(app, script$1);\r\n }\r\n};\n\nexport default index;\n","import { defineComponent, openBlock, createBlock, withModifiers, withKeys, withDirectives, createVNode, vModelRadio, renderSlot } from 'vue';\nimport './helpers.mjs';\nimport './config.mjs';\nimport { B as BaseComponentMixin, b as registerComponent } from './plugins-ba5e2464.mjs';\nimport { C as CheckRadioMixin } from './CheckRadioMixin-f5b57344.mjs';\n\n/**\r\n * Select an option from a set\r\n * @displayName Radio\r\n * @style _radio.scss\r\n */\r\nvar script = defineComponent({\r\n name: 'ORadio',\r\n mixins: [BaseComponentMixin, CheckRadioMixin],\r\n configField: 'radio',\r\n emits: [\r\n 'input'\r\n ],\r\n props: {\r\n rootClass: [String, Function, Array],\r\n disabledClass: [String, Function, Array],\r\n checkCheckedClass: [String, Function, Array],\r\n checkClass: [String, Function, Array],\r\n labelClass: [String, Function, Array],\r\n sizeClass: [String, Function, Array],\r\n variantClass: [String, Function, Array]\r\n },\r\n computed: {\r\n isChecked() {\r\n return this.modelValue === this.nativeValue;\r\n },\r\n rootClasses() {\r\n return [\r\n this.computedClass('rootClass', 'o-radio'),\r\n { [this.computedClass('checkedClass', 'o-radio--checked')]: this.isChecked },\r\n { [this.computedClass('sizeClass', 'o-radio--', this.size)]: this.size },\r\n { [this.computedClass('disabledClass', 'o-radio--disabled')]: this.disabled },\r\n { [this.computedClass('variantClass', 'o-radio--', this.variant)]: this.variant }\r\n ];\r\n },\r\n checkClasses() {\r\n return [\r\n this.computedClass('checkClass', 'o-radio__check'),\r\n { [this.computedClass('checkCheckedClass', 'o-radio__check--checked')]: this.isChecked },\r\n ];\r\n },\r\n labelClasses() {\r\n return [\r\n this.computedClass('labelClass', 'o-radio__label')\r\n ];\r\n }\r\n }\r\n});\n\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n return openBlock(), createBlock(\"label\", {\n class: _ctx.rootClasses,\n ref: \"label\",\n onClick: _cache[3] || (_cache[3] = withModifiers((...args) => _ctx.focus(...args), [\"stop\"])),\n onKeydown: _cache[4] || (_cache[4] = withKeys(withModifiers($event => _ctx.$refs.label.click(), [\"prevent\"]), [\"enter\"]))\n }, [withDirectives(createVNode(\"input\", {\n \"onUpdate:modelValue\": _cache[1] || (_cache[1] = $event => _ctx.computedValue = $event),\n type: \"radio\",\n ref: \"input\",\n onClick: _cache[2] || (_cache[2] = withModifiers(() => {}, [\"stop\"])),\n class: _ctx.checkClasses,\n disabled: _ctx.disabled,\n required: _ctx.required,\n name: _ctx.name,\n value: _ctx.nativeValue\n }, null, 10\n /* CLASS, PROPS */\n , [\"disabled\", \"required\", \"name\", \"value\"]), [[vModelRadio, _ctx.computedValue]]), createVNode(\"span\", {\n class: _ctx.labelClasses\n }, [renderSlot(_ctx.$slots, \"default\")], 2\n /* CLASS */\n )], 34\n /* CLASS, HYDRATE_EVENTS */\n );\n}\n\nscript.render = render;\nscript.__file = \"src/components/radio/Radio.vue\";\n\nvar index = {\r\n install(app) {\r\n registerComponent(app, script);\r\n }\r\n};\n\nexport default index;\nexport { script as ORadio };\n","import 'vue';\nimport './helpers.mjs';\nimport './config.mjs';\nimport { b as registerComponent } from './plugins-ba5e2464.mjs';\nimport './Icon-a7b85e86.mjs';\nimport './FormElementMixin-29581863.mjs';\nimport { s as script } from './Select-2cca695f.mjs';\nexport { s as OSelect } from './Select-2cca695f.mjs';\n\nvar index = {\r\n install(app) {\r\n registerComponent(app, script);\r\n }\r\n};\n\nexport default index;\n","import { defineComponent, h } from 'vue';\nimport { toCssDimension } from './helpers.mjs';\nimport './config.mjs';\nimport { B as BaseComponentMixin, b as registerComponent } from './plugins-ba5e2464.mjs';\n\n/**\r\n * A placeholder for content to load\r\n * @displayName Skeleton\r\n * @style _skeleton.scss\r\n */\r\nvar script = defineComponent({\r\n name: 'OSkeleton',\r\n mixins: [BaseComponentMixin],\r\n configField: 'skeleton',\r\n props: {\r\n /** Show or hide loader\t */\r\n active: {\r\n type: Boolean,\r\n default: true\r\n },\r\n /** Show a loading animation */\r\n animated: {\r\n type: Boolean,\r\n default: true\r\n },\r\n /** Custom width */\r\n width: [Number, String],\r\n /** Custom height */\r\n height: [Number, String],\r\n /** Show a circle shape */\r\n circle: Boolean,\r\n /** Rounded style */\r\n rounded: {\r\n type: Boolean,\r\n default: true\r\n },\r\n /** Number of shapes to display */\r\n count: {\r\n type: Number,\r\n default: 1\r\n },\r\n /**\r\n * Skeleton position in relation to the element\r\n * @values left, centered, right\r\n */\r\n position: {\r\n type: String,\r\n default: 'left',\r\n validator(value) {\r\n return [\r\n 'left',\r\n 'centered',\r\n 'right'\r\n ].indexOf(value) > -1;\r\n }\r\n },\r\n /**\r\n * Size of skeleton\r\n * @values small, medium, large\r\n */\r\n size: String,\r\n rootClass: [String, Function, Array],\r\n animationClass: [String, Function, Array],\r\n positionClass: [String, Function, Array],\r\n itemClass: [String, Function, Array],\r\n itemRoundedClass: [String, Function, Array],\r\n sizeClass: [String, Function, Array]\r\n },\r\n render() {\r\n if (!this.active)\r\n return;\r\n const items = [];\r\n const width = this.width;\r\n const height = this.height;\r\n for (let i = 0; i < this.count; i++) {\r\n items.push(h('div', {\r\n class: [\r\n this.computedClass('itemClass', 'o-sklt__item'),\r\n { [this.computedClass('itemRoundedClass', 'o-sklt__item--rounded')]: this.rounded },\r\n { [this.computedClass('animationClass', 'o-sklt__item--animated')]: this.animated },\r\n { [this.computedClass('sizeClass', 'o-sklt__item--', this.size)]: this.size },\r\n ],\r\n key: i,\r\n style: {\r\n height: toCssDimension(height),\r\n width: toCssDimension(width),\r\n borderRadius: this.circle ? '50%' : null\r\n }\r\n }));\r\n }\r\n return h('div', {\r\n class: [\r\n this.computedClass('rootClass', 'o-sklt'),\r\n { [this.computedClass('positionClass', 'o-sklt--', this.position)]: this.position }\r\n ]\r\n }, items);\r\n }\r\n});\n\nscript.__file = \"src/components/skeleton/Skeleton.vue\";\n\nvar index = {\r\n install(app) {\r\n registerComponent(app, script);\r\n }\r\n};\n\nexport default index;\nexport { script as OSkeleton };\n","import { defineComponent, withDirectives, openBlock, createBlock, createCommentVNode, createVNode, Transition, withCtx, renderSlot, vShow } from 'vue';\nimport { getValueByPath, removeElement } from './helpers.mjs';\nimport { getOptions } from './config.mjs';\nimport { B as BaseComponentMixin, b as registerComponent } from './plugins-ba5e2464.mjs';\nimport { M as MatchMediaMixin } from './MatchMediaMixin-09b141ca.mjs';\n\n/**\r\n * A sidebar to use as left/right overlay or static\r\n * @displayName Sidebar\r\n * @style _sidebar.scss\r\n */\r\nvar script = defineComponent({\r\n name: 'OSidebar',\r\n mixins: [BaseComponentMixin, MatchMediaMixin],\r\n configField: 'sidebar',\r\n emits: ['update:open', 'close'],\r\n props: {\r\n /** To control the behaviour of the sidebar programmatically, use the v-model:open to make it two-way binding */\r\n open: Boolean,\r\n /**\r\n * Color of the sidebar, optional\r\n * @values primary, info, success, warning, danger, and any other custom color\r\n */\r\n variant: [String, Object],\r\n /** Show an overlay like modal */\r\n overlay: Boolean,\r\n /**\r\n * Skeleton position in relation to the window\r\n * @values fixed, absolute, static\r\n */\r\n position: {\r\n type: String,\r\n default: () => { return getValueByPath(getOptions(), 'sidebar.position', 'fixed'); },\r\n validator: (value) => {\r\n return [\r\n 'fixed',\r\n 'absolute',\r\n 'static'\r\n ].indexOf(value) >= 0;\r\n }\r\n },\r\n /** Show sidebar in fullheight */\r\n fullheight: Boolean,\r\n /** Show sidebar in fullwidth */\r\n fullwidth: Boolean,\r\n /** Show the sidebar on right */\r\n right: Boolean,\r\n /**\r\n * Custom layout on mobile\r\n * @values fullwidth, reduced, hidden\r\n */\r\n mobile: {\r\n type: String,\r\n validator: (value) => {\r\n return [\r\n '',\r\n 'fullwidth',\r\n 'reduced',\r\n 'hidden'\r\n ].indexOf(value) >= 0;\r\n }\r\n },\r\n /** Show a small sidebar */\r\n reduce: Boolean,\r\n /** Expand sidebar on hover when reduced or mobile is reduce */\r\n expandOnHover: Boolean,\r\n /** Expand sidebar on hover with fixed position when reduced or mobile is reduce */\r\n expandOnHoverFixed: Boolean,\r\n /**\r\n * Sidebar cancel options\r\n * @values true, false, 'escape', 'outside'\r\n */\r\n canCancel: {\r\n type: [Array, Boolean],\r\n default: () => { return getValueByPath(getOptions(), 'sidebar.canCancel', ['escape', 'outside']); }\r\n },\r\n /**\r\n * Callback on cancel\r\n */\r\n onCancel: {\r\n type: Function,\r\n default: () => { }\r\n },\r\n scroll: {\r\n type: String,\r\n default: () => {\r\n return getValueByPath(getOptions(), 'sidebar.scroll', 'clip');\r\n },\r\n validator: (value) => {\r\n return [\r\n 'clip',\r\n 'keep'\r\n ].indexOf(value) >= 0;\r\n }\r\n },\r\n rootClass: [String, Function, Array],\r\n overlayClass: [String, Function, Array],\r\n contentClass: [String, Function, Array],\r\n fixedClass: [String, Function, Array],\r\n staticClass: [String, Function, Array],\r\n absoluteClass: [String, Function, Array],\r\n fullheightClass: [String, Function, Array],\r\n fullwidthClass: [String, Function, Array],\r\n rightClass: [String, Function, Array],\r\n reduceClass: [String, Function, Array],\r\n expandOnHoverClass: [String, Function, Array],\r\n expandOnHoverFixedClass: [String, Function, Array],\r\n variantClass: [String, Function, Array],\r\n mobileClass: [String, Function, Array],\r\n scrollClipClass: [String, Function, Array],\r\n noScrollClass: [String, Function, Array],\r\n hiddenClass: [String, Function, Array],\r\n visibleClass: [String, Function, Array]\r\n },\r\n data() {\r\n return {\r\n isOpen: this.open,\r\n transitionName: null,\r\n animating: true,\r\n savedScrollTop: null\r\n };\r\n },\r\n computed: {\r\n rootClasses() {\r\n return [\r\n this.computedClass('rootClass', 'o-side'),\r\n { [this.computedClass('mobileClass', 'o-side--mobile')]: this.isMatchMedia },\r\n ];\r\n },\r\n overlayClasses() {\r\n return [\r\n this.computedClass('overlayClass', 'o-side__overlay')\r\n ];\r\n },\r\n contentClasses() {\r\n return [\r\n this.computedClass('contentClass', 'o-side__content'),\r\n { [this.computedClass('variantClass', 'o-side__content--', this.variant)]: this.variant },\r\n { [this.computedClass('fixedClass', 'o-side__content--fixed')]: this.isFixed },\r\n { [this.computedClass('staticClass', 'o-side__content--static')]: this.isStatic },\r\n { [this.computedClass('absoluteClass', 'o-side__content--absolute')]: this.isAbsolute },\r\n { [this.computedClass('fullheightClass', 'o-side__content--fullheight')]: this.fullheight },\r\n { [this.computedClass('fullwidthClass', 'o-side__content--fullwidth')]: this.fullwidth || (this.mobile === 'fullwidth' && this.isMatchMedia) },\r\n { [this.computedClass('rightClass', 'o-side__content--right')]: this.right },\r\n { [this.computedClass('reduceClass', 'o-side__content--mini')]: this.reduce || (this.mobile === 'reduced' && this.isMatchMedia) },\r\n { [this.computedClass('expandOnHoverClass', 'o-side__content--mini-expand')]: (this.expandOnHover && this.mobile !== 'fullwidth') },\r\n { [this.computedClass('expandOnHoverFixedClass', 'o-side__content--expand-mini-hover-fixed')]: (this.expandOnHover && this.expandOnHoverFixed && this.mobile !== 'fullwidth') },\r\n { [this.computedClass('visibleClass', 'o-side__content--visible')]: this.isOpen },\r\n { [this.computedClass('hiddenClass', 'o-side__content--hidden')]: !this.isOpen },\r\n ];\r\n },\r\n scrollClass() {\r\n if (this.scroll === 'clip') {\r\n return this.computedClass('scrollClipClass', 'o-clipped');\r\n }\r\n return this.computedClass('noScrollClass', 'o-noscroll');\r\n },\r\n cancelOptions() {\r\n return typeof this.canCancel === 'boolean'\r\n ? this.canCancel\r\n ? getValueByPath(getOptions(), 'sidebar.canCancel', ['escape', 'outside'])\r\n : []\r\n : this.canCancel;\r\n },\r\n isStatic() {\r\n return this.position === 'static';\r\n },\r\n isFixed() {\r\n return this.position === 'fixed';\r\n },\r\n isAbsolute() {\r\n return this.position === 'absolute';\r\n },\r\n hideOnMobile() {\r\n return this.mobile === 'hidden' && this.isMatchMedia;\r\n }\r\n },\r\n watch: {\r\n open: {\r\n handler(value) {\r\n this.isOpen = value;\r\n if (this.overlay) {\r\n this.handleScroll();\r\n }\r\n const open = this.right ? !value : value;\r\n this.transitionName = !open ? 'slide-prev' : 'slide-next';\r\n },\r\n immediate: true\r\n }\r\n },\r\n methods: {\r\n /**\r\n * Keypress event that is bound to the document.\r\n */\r\n keyPress({ key }) {\r\n if (this.isFixed) {\r\n if (this.isOpen && (key === 'Escape' || key === 'Esc'))\r\n this.cancel('escape');\r\n }\r\n },\r\n /**\r\n * Close the Sidebar if canCancel and call the onCancel prop (function).\r\n */\r\n cancel(method) {\r\n if (this.cancelOptions.indexOf(method) < 0)\r\n return;\r\n if (this.isStatic)\r\n return;\r\n this.onCancel.apply(null, arguments);\r\n this.close();\r\n },\r\n /**\r\n * Call the onCancel prop (function) and emit events\r\n */\r\n close() {\r\n this.isOpen = false;\r\n this.$emit('close');\r\n this.$emit('update:open', false);\r\n },\r\n /**\r\n * Close fixed sidebar if clicked outside.\r\n */\r\n clickedOutside(event) {\r\n if (!this.isFixed || !this.isOpen || this.animating) {\r\n return;\r\n }\r\n if (!event.composedPath().includes(this.$refs.sidebarContent)) {\r\n this.cancel('outside');\r\n }\r\n },\r\n /**\r\n * Transition before-enter hook\r\n */\r\n beforeEnter() {\r\n this.animating = true;\r\n },\r\n /**\r\n * Transition after-leave hook\r\n */\r\n afterEnter() {\r\n this.animating = false;\r\n },\r\n handleScroll() {\r\n if (typeof window === 'undefined')\r\n return;\r\n if (this.scroll === 'clip') {\r\n if (this.scrollClass) {\r\n if (this.open) {\r\n document.documentElement.classList.add(this.scrollClass);\r\n }\r\n else {\r\n document.documentElement.classList.remove(this.scrollClass);\r\n }\r\n return;\r\n }\r\n }\r\n this.savedScrollTop = !this.savedScrollTop\r\n ? document.documentElement.scrollTop\r\n : this.savedScrollTop;\r\n if (this.scrollClass) {\r\n if (this.open) {\r\n document.body.classList.add(this.scrollClass);\r\n }\r\n else {\r\n document.body.classList.remove(this.scrollClass);\r\n }\r\n }\r\n if (this.open) {\r\n document.body.style.top = `-${this.savedScrollTop}px`;\r\n return;\r\n }\r\n document.documentElement.scrollTop = this.savedScrollTop;\r\n document.body.style.top = null;\r\n this.savedScrollTop = null;\r\n }\r\n },\r\n created() {\r\n if (typeof window !== 'undefined') {\r\n document.addEventListener('keyup', this.keyPress);\r\n document.addEventListener('click', this.clickedOutside);\r\n }\r\n },\r\n mounted() {\r\n if (typeof window !== 'undefined') {\r\n if (this.isFixed) {\r\n document.body.appendChild(this.$el);\r\n }\r\n if (this.overlay && this.open) {\r\n this.handleScroll();\r\n }\r\n }\r\n },\r\n beforeUnmount() {\r\n if (typeof window !== 'undefined') {\r\n document.removeEventListener('keyup', this.keyPress);\r\n document.removeEventListener('click', this.clickedOutside);\r\n if (this.overlay) {\r\n // reset scroll\r\n const savedScrollTop = !this.savedScrollTop\r\n ? document.documentElement.scrollTop\r\n : this.savedScrollTop;\r\n if (this.scrollClass) {\r\n document.body.classList.remove(this.scrollClass);\r\n document.documentElement.classList.remove(this.scrollClass);\r\n }\r\n document.documentElement.scrollTop = savedScrollTop;\r\n document.body.style.top = null;\r\n }\r\n }\r\n if (this.isFixed) {\r\n removeElement(this.$el);\r\n }\r\n }\r\n});\n\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n return withDirectives((openBlock(), createBlock(\"div\", {\n class: _ctx.rootClasses\n }, [_ctx.overlay && _ctx.isOpen ? (openBlock(), createBlock(\"div\", {\n key: 0,\n class: _ctx.overlayClasses\n }, null, 2\n /* CLASS */\n )) : createCommentVNode(\"v-if\", true), createVNode(Transition, {\n name: _ctx.transitionName,\n \"onBefore-enter\": _ctx.beforeEnter,\n \"onAfter-enter\": _ctx.afterEnter\n }, {\n default: withCtx(() => [withDirectives(createVNode(\"div\", {\n ref: \"sidebarContent\",\n class: _ctx.contentClasses\n }, [renderSlot(_ctx.$slots, \"default\")], 2\n /* CLASS */\n ), [[vShow, _ctx.isOpen]])]),\n _: 3\n }, 8\n /* PROPS */\n , [\"name\", \"onBefore-enter\", \"onAfter-enter\"])], 2\n /* CLASS */\n )), [[vShow, !_ctx.hideOnMobile]]);\n}\n\nscript.render = render;\nscript.__file = \"src/components/sidebar/Sidebar.vue\";\n\nvar index = {\r\n install(app) {\r\n registerComponent(app, script);\r\n }\r\n};\n\nexport default index;\nexport { script as OSidebar };\n","import { defineComponent, openBlock, createBlock, createVNode, Transition, withCtx, withDirectives, Fragment, createTextVNode, toDisplayString, renderSlot, createCommentVNode, vShow } from 'vue';\nimport { getValueByPath, isWebKit, createAbsoluteElement, removeElement } from './helpers.mjs';\nimport { getOptions } from './config.mjs';\nimport { B as BaseComponentMixin } from './plugins-ba5e2464.mjs';\n\nconst opposites = {\r\n top: 'bottom',\r\n bottom: 'top',\r\n right: 'left',\r\n left: 'right',\r\n};\r\nfunction intersectionArea(a, b) {\r\n const left = Math.max(a.left, b.left);\r\n const right = Math.min(a.right, b.right);\r\n const top = Math.max(a.top, b.top);\r\n const bottom = Math.min(a.bottom, b.bottom);\r\n return Math.max(right - left, 0) * Math.max(bottom - top, 0);\r\n}\r\n/**\r\n * @param rect the bounding rectangle of the trigger element\r\n * @return the \"anchor points\" (points where the arrow attaches) for each side of the tooltip\r\n */\r\nconst anchors = (rect) => ({\r\n top: { x: (rect.left + rect.right) * 0.5, y: rect.top },\r\n bottom: { x: (rect.left + rect.right) * 0.5, y: rect.bottom },\r\n left: { x: rect.left, y: (rect.top + rect.bottom) * 0.5 },\r\n right: { x: rect.right, y: (rect.top + rect.bottom) * 0.5 },\r\n});\r\n/**\r\n * Display a brief helper text to your user\r\n * @displayName Tooltip\r\n * @style _tooltip.scss\r\n */\r\nvar script = defineComponent({\r\n name: 'OTooltip',\r\n mixins: [BaseComponentMixin],\r\n configField: 'tooltip',\r\n emits: ['open', 'close'],\r\n props: {\r\n /** Whether tooltip is active or not, use v-model:active to make it two-way binding */\r\n active: {\r\n type: Boolean,\r\n default: true\r\n },\r\n /** Tooltip text */\r\n label: String,\r\n /** Tooltip delay before it appears (number in ms) */\r\n delay: Number,\r\n /**\r\n * Tooltip position in relation to the element\r\n * @values top, bottom, left, right,\r\n */\r\n position: {\r\n type: String,\r\n default: () => { return getValueByPath(getOptions(), 'tooltip.position', 'top'); },\r\n validator: (value) => {\r\n return [\r\n 'top',\r\n 'bottom',\r\n 'left',\r\n 'right',\r\n 'auto',\r\n ].indexOf(value) > -1;\r\n }\r\n },\r\n /**\r\n * Tooltip trigger events\r\n * @values hover, click, focus, contextmenu\r\n */\r\n triggers: {\r\n type: Array,\r\n default: () => { return getValueByPath(getOptions(), 'tooltip.triggers', ['hover']); }\r\n },\r\n /** Tooltip will be always active */\r\n always: Boolean,\r\n /** Tooltip will have an animation */\r\n animated: {\r\n type: Boolean,\r\n default: true\r\n },\r\n /** Tooltip default animation */\r\n animation: {\r\n type: String,\r\n default: () => { return getValueByPath(getOptions(), 'tooltip.animation', 'fade'); }\r\n },\r\n /**\r\n * Tooltip auto close options\r\n * @values true, false, 'inside', 'outside'\r\n */\r\n autoClose: {\r\n type: [Array, Boolean],\r\n default: true\r\n },\r\n /** Tooltip will be multilined */\r\n multiline: Boolean,\r\n /** Append tooltip content to body */\r\n appendToBody: Boolean,\r\n /**\r\n * Color of the tooltip\r\n * @values primary, info, success, warning, danger, and any other custom color\r\n */\r\n variant: [String, Function, Array],\r\n rootClass: [String, Function, Array],\r\n contentClass: [String, Function, Array],\r\n orderClass: [String, Function, Array],\r\n triggerClass: [String, Function, Array],\r\n multilineClass: [String, Function, Array],\r\n alwaysClass: [String, Function, Array],\r\n variantClass: [String, Function, Array],\r\n arrowClass: [String, Function, Array],\r\n arrowOrderClass: [String, Function, Array]\r\n },\r\n data() {\r\n return {\r\n isActive: false,\r\n triggerStyle: {},\r\n bodyEl: undefined,\r\n metrics: null,\r\n };\r\n },\r\n computed: {\r\n rootClasses() {\r\n return [\r\n this.computedClass('rootClass', 'o-tip')\r\n ];\r\n },\r\n triggerClasses() {\r\n return [\r\n this.computedClass('triggerClass', 'o-tip__trigger'),\r\n ];\r\n },\r\n arrowClasses() {\r\n return [\r\n this.computedClass('arrowClass', 'o-tip__arrow'),\r\n { [this.computedClass('arrowOrderClass', 'o-tip__arrow--', this.newPosition)]: this.newPosition },\r\n { [this.computedClass('variantArrowClass', 'o-tip__arrow--', this.variant)]: this.variant },\r\n ];\r\n },\r\n contentClasses() {\r\n return [\r\n this.computedClass('contentClass', 'o-tip__content'),\r\n { [this.computedClass('orderClass', 'o-tip__content--', this.newPosition)]: this.newPosition },\r\n { [this.computedClass('variantClass', 'o-tip__content--', this.variant)]: this.variant },\r\n { [this.computedClass('multilineClass', 'o-tip__content--multiline')]: this.multiline },\r\n { [this.computedClass('alwaysClass', 'o-tip__content--always')]: this.always }\r\n ];\r\n },\r\n newAnimation() {\r\n return this.animated ? this.animation : undefined;\r\n },\r\n newPosition() {\r\n if (this.position !== 'auto') {\r\n return this.position;\r\n }\r\n const defaultPosition = getValueByPath(getOptions(), 'tooltip.position', 'top');\r\n let bestPosition = defaultPosition;\r\n if (this.metrics != null) {\r\n let viewRect;\r\n const viewport = window.visualViewport; // Not available with our current types package\r\n if (viewport != undefined) {\r\n if (isWebKit()) {\r\n // On WebKit, getBoundingClientRect offsets relative to the the visual viewport's origin, not the layout viewport's.\r\n // See https://bugs.webkit.org/show_bug.cgi?id=170981\r\n viewRect = new DOMRect(0, 0, viewport.width, viewport.height);\r\n }\r\n else {\r\n viewRect = new DOMRect(viewport.offsetLeft, viewport.offsetTop, viewport.width, viewport.height);\r\n }\r\n }\r\n else {\r\n viewRect = new DOMRect(0, 0, document.documentElement.clientWidth, document.documentElement.clientHeight);\r\n }\r\n const triggerAnchors = anchors(this.metrics.trigger);\r\n const contentRect = this.metrics.content;\r\n const contentAnchors = anchors(contentRect);\r\n const contentRectAtAnchor = (pos) => {\r\n const triggerAnchor = triggerAnchors[pos];\r\n const contentAnchor = contentAnchors[opposites[pos]];\r\n // Translates contentRect so contentAnchor is on top of triggerAnchor\r\n // NOTE: this doesn't account for the extra offset that the tooltip arrow provides.\r\n // That offset should be small, and it's tricky to get it from the CSS.\r\n return new DOMRect(contentRect.x + (triggerAnchor.x - contentAnchor.x), contentRect.y + (triggerAnchor.y - contentAnchor.y), contentRect.width, contentRect.height);\r\n };\r\n const defaultOpposite = opposites[defaultPosition];\r\n const crossPosition = (defaultPosition === 'top' || defaultPosition === 'bottom') ? 'left' : 'top';\r\n const crossOpposite = opposites[crossPosition];\r\n // In descending order of priority\r\n const positions = [defaultPosition, defaultOpposite, crossPosition, crossOpposite];\r\n let maxOverlap = 0;\r\n for (const position of positions) {\r\n const overlap = intersectionArea(viewRect, contentRectAtAnchor(position));\r\n if (overlap > maxOverlap) {\r\n maxOverlap = overlap;\r\n bestPosition = position;\r\n }\r\n }\r\n }\r\n return bestPosition;\r\n },\r\n },\r\n watch: {\r\n isActive(value) {\r\n this.$emit(value ? 'open' : 'close');\r\n if (value && this.position === 'auto') {\r\n this.$nextTick(() => {\r\n this.metrics = {\r\n content: this.$refs.content.getBoundingClientRect(),\r\n trigger: this.$refs.trigger.getBoundingClientRect(),\r\n };\r\n });\r\n }\r\n if (value && this.appendToBody) {\r\n this.updateAppendToBody();\r\n }\r\n }\r\n },\r\n methods: {\r\n updateAppendToBody() {\r\n const tooltip = this.$refs.tooltip;\r\n const trigger = this.$refs.trigger;\r\n if (tooltip && trigger) {\r\n // update wrapper tooltip\r\n const tooltipEl = this.$data.bodyEl.children[0];\r\n tooltipEl.classList.forEach((item) => tooltipEl.classList.remove(...item.split(' ')));\r\n if (this.$vnode && this.$vnode.data && this.$vnode.data.staticClass) {\r\n tooltipEl.classList.add(this.$vnode.data.staticClass);\r\n }\r\n this.rootClasses.forEach((item) => {\r\n if (typeof item === 'object') {\r\n Object.keys(item).filter(key => key && item[key]).forEach(key => tooltipEl.classList.add(key));\r\n }\r\n else {\r\n tooltipEl.classList.add(...item.split(' '));\r\n }\r\n });\r\n tooltipEl.style.width = `${trigger.clientWidth}px`;\r\n tooltipEl.style.height = `${trigger.clientHeight}px`;\r\n const rect = trigger.getBoundingClientRect();\r\n const top = rect.top + window.scrollY;\r\n const left = rect.left + window.scrollX;\r\n const wrapper = this.$data.bodyEl;\r\n wrapper.style.position = 'absolute';\r\n wrapper.style.top = `${top}px`;\r\n wrapper.style.left = `${left}px`;\r\n wrapper.style.zIndex = this.isActive || this.always ? '99' : '-1';\r\n this.triggerStyle = { zIndex: this.isActive || this.always ? '100' : undefined };\r\n }\r\n },\r\n onClick() {\r\n if (this.triggers.indexOf('click') < 0)\r\n return;\r\n // if not active, toggle after clickOutside event\r\n // this fixes toggling programmatic\r\n this.$nextTick(() => {\r\n setTimeout(() => this.open());\r\n });\r\n },\r\n onHover() {\r\n if (this.triggers.indexOf('hover') < 0)\r\n return;\r\n this.open();\r\n },\r\n onFocus() {\r\n if (this.triggers.indexOf('focus') < 0)\r\n return;\r\n this.open();\r\n },\r\n onContextMenu(event) {\r\n if (this.triggers.indexOf('contextmenu') < 0)\r\n return;\r\n event.preventDefault();\r\n this.open();\r\n },\r\n open() {\r\n if (this.delay) {\r\n this.timer = setTimeout(() => {\r\n this.isActive = true;\r\n this.timer = null;\r\n }, this.delay);\r\n }\r\n else {\r\n this.isActive = true;\r\n }\r\n },\r\n close() {\r\n if (typeof this.autoClose === 'boolean') {\r\n this.isActive = !this.autoClose;\r\n }\r\n if (this.autoClose && this.timer)\r\n clearTimeout(this.timer);\r\n },\r\n /**\r\n * Close tooltip if clicked outside.\r\n */\r\n clickedOutside(event) {\r\n if (this.isActive) {\r\n if (Array.isArray(this.autoClose)) {\r\n if (this.autoClose.indexOf('outside') >= 0) {\r\n if (!this.isInWhiteList(event.target))\r\n this.isActive = false;\r\n }\r\n if (this.autoClose.indexOf('inside') >= 0) {\r\n if (this.isInWhiteList(event.target))\r\n this.isActive = false;\r\n }\r\n }\r\n }\r\n },\r\n /**\r\n * Keypress event that is bound to the document\r\n */\r\n keyPress({ key }) {\r\n if (this.isActive && (key === 'Escape' || key === 'Esc')) {\r\n if (Array.isArray(this.autoClose)) {\r\n if (this.autoClose.indexOf('escape') >= 0)\r\n this.isActive = false;\r\n }\r\n }\r\n },\r\n /**\r\n * White-listed items to not close when clicked.\r\n */\r\n isInWhiteList(el) {\r\n if (el === this.$refs.content)\r\n return true;\r\n // All chidren from content\r\n if (this.$refs.content !== undefined) {\r\n const children = this.$refs.content.querySelectorAll('*');\r\n for (const child of children) {\r\n if (el === child) {\r\n return true;\r\n }\r\n }\r\n }\r\n return false;\r\n }\r\n },\r\n mounted() {\r\n if (this.appendToBody) {\r\n this.$data.bodyEl = createAbsoluteElement(this.$refs.content);\r\n this.updateAppendToBody();\r\n }\r\n },\r\n created() {\r\n if (typeof window !== 'undefined') {\r\n document.addEventListener('click', this.clickedOutside);\r\n document.addEventListener('keyup', this.keyPress);\r\n }\r\n },\r\n beforeUnmount() {\r\n if (typeof window !== 'undefined') {\r\n document.removeEventListener('click', this.clickedOutside);\r\n document.removeEventListener('keyup', this.keyPress);\r\n }\r\n if (this.appendToBody) {\r\n removeElement(this.$data.bodyEl);\r\n }\r\n }\r\n});\n\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n return openBlock(), createBlock(\"div\", {\n ref: \"tooltip\",\n class: _ctx.rootClasses\n }, [createVNode(Transition, {\n name: _ctx.newAnimation,\n \"onAfter-leave\": _cache[1] || (_cache[1] = $event => _ctx.metrics = null),\n \"onEnter-cancelled\": _cache[2] || (_cache[2] = $event => _ctx.metrics = null)\n }, {\n default: withCtx(() => [withDirectives(createVNode(\"div\", {\n ref: \"content\",\n class: _ctx.contentClasses\n }, [createVNode(\"span\", {\n class: _ctx.arrowClasses\n }, null, 2\n /* CLASS */\n ), _ctx.label ? (openBlock(), createBlock(Fragment, {\n key: 0\n }, [createTextVNode(toDisplayString(_ctx.label), 1\n /* TEXT */\n )], 64\n /* STABLE_FRAGMENT */\n )) : _ctx.$slots.default ? renderSlot(_ctx.$slots, \"content\", {\n key: 1\n }) : createCommentVNode(\"v-if\", true)], 2\n /* CLASS */\n ), [[vShow, _ctx.active && (_ctx.isActive || _ctx.always)]])]),\n _: 1\n }, 8\n /* PROPS */\n , [\"name\"]), createVNode(\"div\", {\n ref: \"trigger\",\n class: _ctx.triggerClasses,\n style: _ctx.triggerStyle,\n onClick: _cache[3] || (_cache[3] = (...args) => _ctx.onClick(...args)),\n onContextmenu: _cache[4] || (_cache[4] = (...args) => _ctx.onContextMenu(...args)),\n onMouseenter: _cache[5] || (_cache[5] = (...args) => _ctx.onHover(...args)),\n onFocusCapture: _cache[6] || (_cache[6] = (...args) => _ctx.onFocus(...args)),\n onBlurCapture: _cache[7] || (_cache[7] = (...args) => _ctx.close(...args)),\n onMouseleave: _cache[8] || (_cache[8] = (...args) => _ctx.close(...args))\n }, [renderSlot(_ctx.$slots, \"default\", {\n ref: \"slot\"\n })], 38\n /* CLASS, STYLE, HYDRATE_EVENTS */\n )], 2\n /* CLASS */\n );\n}\n\nscript.render = render;\nscript.__file = \"src/components/tooltip/Tooltip.vue\";\n\nexport { script as s };\n","import { defineComponent, resolveComponent, openBlock, createBlock, createVNode, withCtx, mergeProps, withKeys, withModifiers, toDisplayString, createCommentVNode, renderSlot, Fragment, renderList } from 'vue';\nimport { getValueByPath } from './helpers.mjs';\nimport { getOptions } from './config.mjs';\nimport { B as BaseComponentMixin, b as registerComponent } from './plugins-ba5e2464.mjs';\nimport { s as script$3 } from './Tooltip-7e114fbb.mjs';\n\nvar script = defineComponent({\r\n name: 'OSliderThumb',\r\n components: {\r\n [script$3.name]: script$3\r\n },\r\n configField: 'slider',\r\n inheritAttrs: false,\r\n inject: ['$slider'],\r\n emits: ['update:modelValue', 'dragstart', 'dragend'],\r\n props: {\r\n modelValue: {\r\n type: Number,\r\n default: 0\r\n },\r\n variant: {\r\n type: String,\r\n default: ''\r\n },\r\n tooltip: {\r\n type: Boolean,\r\n default: true\r\n },\r\n indicator: {\r\n type: Boolean,\r\n default: false\r\n },\r\n customFormatter: Function,\r\n format: {\r\n type: String,\r\n default: 'raw',\r\n validator: (value) => {\r\n return [\r\n 'raw',\r\n 'percent'\r\n ].indexOf(value) >= 0;\r\n }\r\n },\r\n locale: {\r\n type: [String, Array],\r\n default: () => {\r\n return getValueByPath(getOptions(), 'locale');\r\n }\r\n },\r\n tooltipAlways: {\r\n type: Boolean,\r\n default: false\r\n }\r\n },\r\n data() {\r\n return {\r\n isFocused: false,\r\n dragging: false,\r\n startX: 0,\r\n startPosition: 0,\r\n newPosition: null,\r\n oldValue: this.modelValue\r\n };\r\n },\r\n computed: {\r\n disabled() {\r\n return this.$parent.disabled;\r\n },\r\n max() {\r\n return this.$parent.max;\r\n },\r\n min() {\r\n return this.$parent.min;\r\n },\r\n step() {\r\n return this.$parent.step;\r\n },\r\n precision() {\r\n return this.$parent.precision;\r\n },\r\n currentPosition() {\r\n return `${(this.modelValue - this.min) / (this.max - this.min) * 100}%`;\r\n },\r\n wrapperStyle() {\r\n return { left: this.currentPosition };\r\n },\r\n formattedValue() {\r\n if (typeof this.customFormatter !== 'undefined') {\r\n return this.customFormatter(this.modelValue);\r\n }\r\n if (this.format === 'percent') {\r\n return new Intl.NumberFormat(this.locale, {\r\n style: 'percent'\r\n }).format(((this.modelValue - this.min)) / (this.max - this.min));\r\n }\r\n return new Intl.NumberFormat(this.locale).format(this.modelValue);\r\n }\r\n },\r\n methods: {\r\n onFocus() {\r\n this.isFocused = true;\r\n },\r\n onBlur() {\r\n this.isFocused = false;\r\n },\r\n onButtonDown(event) {\r\n if (this.disabled)\r\n return;\r\n event.preventDefault();\r\n this.onDragStart(event);\r\n if (typeof window !== 'undefined') {\r\n document.addEventListener('mousemove', this.onDragging);\r\n document.addEventListener('touchmove', this.onDragging);\r\n document.addEventListener('mouseup', this.onDragEnd);\r\n document.addEventListener('touchend', this.onDragEnd);\r\n document.addEventListener('contextmenu', this.onDragEnd);\r\n }\r\n },\r\n onLeftKeyDown() {\r\n if (this.disabled || this.modelvalue === this.min)\r\n return;\r\n this.newPosition = parseFloat(this.currentPosition) -\r\n this.step / (this.max - this.min) * 100;\r\n this.setPosition(this.newPosition);\r\n this.$parent.emitValue('change');\r\n },\r\n onRightKeyDown() {\r\n if (this.disabled || this.modelvalue === this.max)\r\n return;\r\n this.newPosition = parseFloat(this.currentPosition) +\r\n this.step / (this.max - this.min) * 100;\r\n this.setPosition(this.newPosition);\r\n this.$parent.emitValue('change');\r\n },\r\n onHomeKeyDown() {\r\n if (this.disabled || this.modelvalue === this.min)\r\n return;\r\n this.newPosition = 0;\r\n this.setPosition(this.newPosition);\r\n this.$parent.emitValue('change');\r\n },\r\n onEndKeyDown() {\r\n if (this.disabled || this.modelvalue === this.max)\r\n return;\r\n this.newPosition = 100;\r\n this.setPosition(this.newPosition);\r\n this.$parent.emitValue('change');\r\n },\r\n onDragStart(event) {\r\n this.dragging = true;\r\n this.$emit('dragstart');\r\n if (event.type === 'touchstart') {\r\n event.clientX = event.touches[0].clientX;\r\n }\r\n this.startX = event.clientX;\r\n this.startPosition = parseFloat(this.currentPosition);\r\n this.newPosition = this.startPosition;\r\n },\r\n onDragging(event) {\r\n if (this.dragging) {\r\n if (event.type === 'touchmove') {\r\n event.clientX = event.touches[0].clientX;\r\n }\r\n const diff = (event.clientX - this.startX) / this.$parent.sliderSize() * 100;\r\n this.newPosition = this.startPosition + diff;\r\n this.setPosition(this.newPosition);\r\n }\r\n },\r\n onDragEnd() {\r\n this.dragging = false;\r\n this.$emit('dragend');\r\n if (this.modelvalue !== this.oldValue) {\r\n this.$parent.emitValue('change');\r\n }\r\n this.setPosition(this.newPosition);\r\n if (typeof window !== 'undefined') {\r\n document.removeEventListener('mousemove', this.onDragging);\r\n document.removeEventListener('touchmove', this.onDragging);\r\n document.removeEventListener('mouseup', this.onDragEnd);\r\n document.removeEventListener('touchend', this.onDragEnd);\r\n document.removeEventListener('contextmenu', this.onDragEnd);\r\n }\r\n },\r\n setPosition(percent) {\r\n if (percent === null || isNaN(percent))\r\n return;\r\n if (percent < 0) {\r\n percent = 0;\r\n }\r\n else if (percent > 100) {\r\n percent = 100;\r\n }\r\n const stepLength = 100 / ((this.max - this.min) / this.step);\r\n const steps = Math.round(percent / stepLength);\r\n let value = steps * stepLength / 100 * (this.max - this.min) + this.min;\r\n value = parseFloat(value.toFixed(this.precision));\r\n this.$emit('update:modelValue', value);\r\n if (!this.dragging && value !== this.oldValue) {\r\n this.oldValue = value;\r\n }\r\n }\r\n }\r\n});\n\nconst _hoisted_1 = {\n key: 0\n};\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n const _component_o_tooltip = resolveComponent(\"o-tooltip\");\n\n return openBlock(), createBlock(\"div\", {\n class: _ctx.$slider.thumbWrapperClasses,\n style: _ctx.wrapperStyle\n }, [createVNode(_component_o_tooltip, {\n label: _ctx.formattedValue,\n variant: _ctx.variant,\n always: _ctx.dragging || _ctx.isFocused || _ctx.tooltipAlways,\n active: !_ctx.disabled && _ctx.tooltip\n }, {\n default: withCtx(() => [createVNode(\"div\", mergeProps(_ctx.$attrs, {\n class: _ctx.$slider.thumbClasses,\n tabindex: _ctx.disabled ? false : 0,\n onMousedown: _cache[1] || (_cache[1] = (...args) => _ctx.onButtonDown(...args)),\n onTouchstart: _cache[2] || (_cache[2] = (...args) => _ctx.onButtonDown(...args)),\n onFocus: _cache[3] || (_cache[3] = (...args) => _ctx.onFocus(...args)),\n onBlur: _cache[4] || (_cache[4] = (...args) => _ctx.onBlur(...args)),\n onKeydown: [_cache[5] || (_cache[5] = withKeys(withModifiers((...args) => _ctx.onLeftKeyDown(...args), [\"prevent\"]), [\"left\"])), _cache[6] || (_cache[6] = withKeys(withModifiers((...args) => _ctx.onRightKeyDown(...args), [\"prevent\"]), [\"right\"])), _cache[7] || (_cache[7] = withKeys(withModifiers((...args) => _ctx.onLeftKeyDown(...args), [\"prevent\"]), [\"down\"])), _cache[8] || (_cache[8] = withKeys(withModifiers((...args) => _ctx.onRightKeyDown(...args), [\"prevent\"]), [\"up\"])), _cache[9] || (_cache[9] = withKeys(withModifiers((...args) => _ctx.onHomeKeyDown(...args), [\"prevent\"]), [\"home\"])), _cache[10] || (_cache[10] = withKeys(withModifiers((...args) => _ctx.onEndKeyDown(...args), [\"prevent\"]), [\"end\"]))]\n }), [_ctx.indicator ? (openBlock(), createBlock(\"span\", _hoisted_1, toDisplayString(_ctx.formattedValue), 1\n /* TEXT */\n )) : createCommentVNode(\"v-if\", true)], 16\n /* FULL_PROPS */\n , [\"tabindex\"])]),\n _: 1\n }, 8\n /* PROPS */\n , [\"label\", \"variant\", \"always\", \"active\"])], 6\n /* CLASS, STYLE */\n );\n}\n\nscript.render = render;\nscript.__file = \"src/components/slider/SliderThumb.vue\";\n\n/**\r\n * @displayName Slider Tick\r\n */\r\nvar script$1 = defineComponent({\r\n name: 'OSliderTick',\r\n mixins: [BaseComponentMixin],\r\n configField: 'slider',\r\n inject: ['$slider'],\r\n props: {\r\n /** Value of single tick */\r\n value: {\r\n variant: Number,\r\n default: 0\r\n },\r\n tickClass: [String, Function, Array],\r\n tickHiddenClass: [String, Function, Array],\r\n tickLabelClass: [String, Function, Array]\r\n },\r\n computed: {\r\n rootClasses() {\r\n return [\r\n this.computedClass('tickClass', 'o-slide__tick'),\r\n { [this.computedClass('tickHiddenClass', 'o-slide__tick--hidden')]: this.hidden },\r\n ];\r\n },\r\n tickLabelClasses() {\r\n return [\r\n this.computedClass('tickLabelClass', 'o-slide__tick-label')\r\n ];\r\n },\r\n position() {\r\n const pos = (this.value - this.$parent.min) /\r\n (this.$parent.max - this.$parent.min) * 100;\r\n return (pos >= 0 && pos <= 100) ? pos : 0;\r\n },\r\n hidden() {\r\n return this.value === this.$parent.min || this.value === this.$parent.max;\r\n },\r\n tickStyle() {\r\n return { 'left': this.position + '%' };\r\n }\r\n },\r\n created() {\r\n if (!this.$slider) {\r\n throw new Error('You should wrap oSliderTick on a oSlider');\r\n }\r\n }\r\n});\n\nfunction render$1(_ctx, _cache, $props, $setup, $data, $options) {\n return openBlock(), createBlock(\"div\", {\n class: _ctx.rootClasses,\n style: _ctx.tickStyle\n }, [_ctx.$slots.default ? (openBlock(), createBlock(\"span\", {\n key: 0,\n class: _ctx.tickLabelClasses\n }, [renderSlot(_ctx.$slots, \"default\")], 2\n /* CLASS */\n )) : createCommentVNode(\"v-if\", true)], 6\n /* CLASS, STYLE */\n );\n}\n\nscript$1.render = render$1;\nscript$1.__file = \"src/components/slider/SliderTick.vue\";\n\n/**\r\n * A slider to select a value or range from a given range\r\n * @displayName Slider\r\n * @requires ./SliderTick.vue\r\n * @style _slider.scss\r\n */\r\nvar script$2 = defineComponent({\r\n name: 'OSlider',\r\n components: {\r\n [script.name]: script,\r\n [script$1.name]: script$1\r\n },\r\n configField: 'slider',\r\n mixins: [BaseComponentMixin],\r\n provide() {\r\n return {\r\n $slider: this\r\n };\r\n },\r\n emits: ['update:modelValue', 'change', 'dragging', 'dragstart', 'dragend'],\r\n props: {\r\n /** @model */\r\n modelValue: {\r\n type: [Number, Array],\r\n default: 0\r\n },\r\n /** Minimum value */\r\n min: {\r\n type: Number,\r\n default: 0\r\n },\r\n /** Maximum value */\r\n max: {\r\n type: Number,\r\n default: 100\r\n },\r\n /** Step interval of ticks */\r\n step: {\r\n type: Number,\r\n default: 1\r\n },\r\n /**\r\n * Color of the slider\r\n * @values primary, info, success, warning, danger, and any other custom color\r\n */\r\n variant: {\r\n type: String\r\n },\r\n /**\r\n * Vertical size of slider, optional\r\n * @values small, medium, large\r\n */\r\n size: String,\r\n /** Show tick marks */\r\n ticks: {\r\n type: Boolean,\r\n default: false\r\n },\r\n /** Show tooltip when thumb is being dragged */\r\n tooltip: {\r\n type: Boolean,\r\n default: () => {\r\n return getValueByPath(getOptions(), 'slider.tooltip', true);\r\n }\r\n },\r\n /**\r\n * Color of the tooltip\r\n * @values primary, info, success, warning, danger, and any other custom color\r\n */\r\n tooltipVariant: String,\r\n /** Rounded thumb */\r\n rounded: {\r\n type: Boolean,\r\n default: () => {\r\n return getValueByPath(getOptions(), 'slider.rounded', false);\r\n }\r\n },\r\n disabled: {\r\n type: Boolean,\r\n default: false\r\n },\r\n /** Update v-model only when dragging is finished */\r\n lazy: {\r\n type: Boolean,\r\n default: false\r\n },\r\n /** Function to format the tooltip label for display */\r\n customFormatter: Function,\r\n ariaLabel: [String, Array],\r\n /** Increases slider size on focus */\r\n biggerSliderFocus: {\r\n type: Boolean,\r\n default: false\r\n },\r\n indicator: {\r\n type: Boolean,\r\n default: false\r\n },\r\n format: {\r\n type: String,\r\n default: 'raw',\r\n validator: (value) => {\r\n return [\r\n 'raw',\r\n 'percent'\r\n ].indexOf(value) >= 0;\r\n }\r\n },\r\n locale: {\r\n type: [String, Array],\r\n default: () => {\r\n return getValueByPath(getOptions(), 'locale');\r\n }\r\n },\r\n /** Tooltip displays always */\r\n tooltipAlways: {\r\n type: Boolean,\r\n default: false\r\n },\r\n rootClass: [String, Function, Array],\r\n sizeClass: [String, Function, Array],\r\n trackClass: [String, Function, Array],\r\n fillClass: [String, Function, Array],\r\n thumbRoundedClass: [String, Function, Array],\r\n thumbDraggingClass: [String, Function, Array],\r\n disabledClass: [String, Function, Array],\r\n thumbWrapperClass: [String, Function, Array],\r\n thumbClass: [String, Function, Array],\r\n variantClass: [String, Function, Array]\r\n },\r\n data() {\r\n return {\r\n value1: null,\r\n value2: null,\r\n dragging: false,\r\n isRange: false\r\n };\r\n },\r\n computed: {\r\n rootClasses() {\r\n return [\r\n this.computedClass('rootClass', 'o-slide'),\r\n { [this.computedClass('sizeClass', 'o-slide--', this.size)]: this.size },\r\n { [this.computedClass('disabledClass', 'o-slide--disabled')]: this.disabled },\r\n ];\r\n },\r\n trackClasses() {\r\n return [\r\n this.computedClass('trackClass', 'o-slide__track'),\r\n ];\r\n },\r\n fillClasses() {\r\n return [\r\n this.computedClass('fillClass', 'o-slide__fill'),\r\n { [this.computedClass('variantClass', 'o-slide__fill--', this.variant)]: this.variant },\r\n ];\r\n },\r\n thumbClasses() {\r\n return [\r\n this.computedClass('thumbClass', 'o-slide__thumb'),\r\n { [this.computedClass('thumbDraggingClass', 'o-slide__thumb--dragging')]: this.dragging },\r\n { [this.computedClass('thumbRoundedClass', 'o-slide__thumb--rounded')]: this.rounded },\r\n ];\r\n },\r\n thumbWrapperClasses() {\r\n return [\r\n this.computedClass('thumbWrapperClass', 'o-slide__thumb-wrapper'),\r\n ];\r\n },\r\n newTooltipVariant() {\r\n return this.tooltipVariant ? this.tooltipVariant : this.variant;\r\n },\r\n tickValues() {\r\n if (!this.ticks || this.min > this.max || this.step === 0)\r\n return [];\r\n const result = [];\r\n for (let i = this.min + this.step; i < this.max; i = i + this.step) {\r\n result.push(i);\r\n }\r\n return result;\r\n },\r\n minValue() {\r\n return Math.min(this.value1, this.value2);\r\n },\r\n maxValue() {\r\n return Math.max(this.value1, this.value2);\r\n },\r\n barSize() {\r\n return this.isRange\r\n ? `${100 * (this.maxValue - this.minValue) / (this.max - this.min)}%`\r\n : `${100 * (this.value1 - this.min) / (this.max - this.min)}%`;\r\n },\r\n barStart() {\r\n return this.isRange\r\n ? `${100 * (this.minValue - this.min) / (this.max - this.min)}%`\r\n : '0%';\r\n },\r\n precision() {\r\n const precisions = [this.min, this.max, this.step].map((item) => {\r\n const decimal = ('' + item).split('.')[1];\r\n return decimal ? decimal.length : 0;\r\n });\r\n return Math.max(...precisions);\r\n },\r\n barStyle() {\r\n return {\r\n width: this.barSize,\r\n left: this.barStart\r\n };\r\n }\r\n },\r\n watch: {\r\n value1() {\r\n this.onInternalValueUpdate();\r\n },\r\n value2() {\r\n this.onInternalValueUpdate();\r\n },\r\n min() {\r\n this.setValues(this.value);\r\n },\r\n max() {\r\n this.setValues(this.value);\r\n },\r\n /**\r\n * When v-model is changed set the new active step.\r\n */\r\n modelValue(value) {\r\n this.setValues(value);\r\n }\r\n },\r\n methods: {\r\n setValues(newValue) {\r\n if (this.min > this.max) {\r\n return;\r\n }\r\n if (Array.isArray(newValue)) {\r\n this.isRange = true;\r\n const smallValue = typeof newValue[0] !== 'number' || isNaN(newValue[0])\r\n ? this.min\r\n : Math.min(Math.max(this.min, newValue[0]), this.max);\r\n const largeValue = typeof newValue[1] !== 'number' || isNaN(newValue[1])\r\n ? this.max\r\n : Math.max(Math.min(this.max, newValue[1]), this.min);\r\n this.value1 = this.isThumbReversed ? largeValue : smallValue;\r\n this.value2 = this.isThumbReversed ? smallValue : largeValue;\r\n }\r\n else {\r\n this.isRange = false;\r\n this.value1 = isNaN(newValue)\r\n ? this.min\r\n : Math.min(this.max, Math.max(this.min, newValue));\r\n this.value2 = null;\r\n }\r\n },\r\n onInternalValueUpdate() {\r\n if (this.isRange) {\r\n this.isThumbReversed = this.value1 > this.value2;\r\n }\r\n if (!this.lazy || !this.dragging) {\r\n this.emitValue('update:modelValue');\r\n }\r\n if (this.dragging) {\r\n this.emitValue('dragging');\r\n }\r\n },\r\n sliderSize() {\r\n return this.$refs.slider.getBoundingClientRect().width;\r\n },\r\n onSliderClick(event) {\r\n if (this.disabled || this.isTrackClickDisabled)\r\n return;\r\n const sliderOffsetLeft = this.$refs.slider.getBoundingClientRect().left;\r\n const percent = (event.clientX - sliderOffsetLeft) / this.sliderSize() * 100;\r\n const targetValue = this.min + percent * (this.max - this.min) / 100;\r\n const diffFirst = Math.abs(targetValue - this.value1);\r\n if (!this.isRange) {\r\n if (diffFirst < this.step / 2)\r\n return;\r\n this.$refs.button1.setPosition(percent);\r\n }\r\n else {\r\n const diffSecond = Math.abs(targetValue - this.value2);\r\n if (diffFirst <= diffSecond) {\r\n if (diffFirst < this.step / 2)\r\n return;\r\n this.$refs['button1'].setPosition(percent);\r\n }\r\n else {\r\n if (diffSecond < this.step / 2)\r\n return;\r\n this.$refs['button2'].setPosition(percent);\r\n }\r\n }\r\n this.emitValue('change');\r\n },\r\n onDragStart() {\r\n this.dragging = true;\r\n this.$emit('dragstart');\r\n },\r\n onDragEnd() {\r\n this.isTrackClickDisabled = true;\r\n setTimeout(() => {\r\n // avoid triggering onSliderClick after dragend\r\n this.isTrackClickDisabled = false;\r\n }, 0);\r\n this.dragging = false;\r\n this.$emit('dragend');\r\n if (this.lazy) {\r\n this.emitValue('update:modelValue');\r\n }\r\n },\r\n emitValue(event) {\r\n const val = this.isRange\r\n ? [this.minValue, this.maxValue]\r\n : this.value1;\r\n this.$emit(event, val);\r\n }\r\n },\r\n created() {\r\n this.isThumbReversed = false;\r\n this.isTrackClickDisabled = false;\r\n this.setValues(this.modelValue);\r\n }\r\n});\n\nfunction render$2(_ctx, _cache, $props, $setup, $data, $options) {\n const _component_o_slider_tick = resolveComponent(\"o-slider-tick\");\n\n const _component_o_slider_thumb = resolveComponent(\"o-slider-thumb\");\n\n return openBlock(), createBlock(\"div\", {\n onClick: _cache[3] || (_cache[3] = (...args) => _ctx.onSliderClick(...args)),\n class: _ctx.rootClasses\n }, [createVNode(\"div\", {\n class: _ctx.trackClasses,\n ref: \"slider\"\n }, [createVNode(\"div\", {\n class: _ctx.fillClasses,\n style: _ctx.barStyle\n }, null, 6\n /* CLASS, STYLE */\n ), _ctx.ticks ? (openBlock(true), createBlock(Fragment, {\n key: 0\n }, renderList(_ctx.tickValues, (val, key) => {\n return openBlock(), createBlock(_component_o_slider_tick, {\n key: key,\n value: val\n }, null, 8\n /* PROPS */\n , [\"value\"]);\n }), 128\n /* KEYED_FRAGMENT */\n )) : createCommentVNode(\"v-if\", true), renderSlot(_ctx.$slots, \"default\"), createVNode(_component_o_slider_thumb, {\n modelValue: _ctx.value1,\n \"onUpdate:modelValue\": _cache[1] || (_cache[1] = $event => _ctx.value1 = $event),\n variant: _ctx.newTooltipVariant,\n tooltip: _ctx.tooltip,\n \"custom-formatter\": _ctx.customFormatter,\n indicator: _ctx.indicator,\n ref: \"button1\",\n role: \"slider\",\n format: _ctx.format,\n locale: _ctx.locale,\n \"tooltip-always\": _ctx.tooltipAlways,\n \"aria-valuenow\": _ctx.value1,\n \"aria-valuemin\": _ctx.min,\n \"aria-valuemax\": _ctx.max,\n \"aria-orientation\": \"horizontal\",\n \"aria-label\": Array.isArray(_ctx.ariaLabel) ? _ctx.ariaLabel[0] : _ctx.ariaLabel,\n \"aria-disabled\": _ctx.disabled,\n onDragstart: _ctx.onDragStart,\n onDragend: _ctx.onDragEnd\n }, null, 8\n /* PROPS */\n , [\"modelValue\", \"variant\", \"tooltip\", \"custom-formatter\", \"indicator\", \"format\", \"locale\", \"tooltip-always\", \"aria-valuenow\", \"aria-valuemin\", \"aria-valuemax\", \"aria-label\", \"aria-disabled\", \"onDragstart\", \"onDragend\"]), _ctx.isRange ? createVNode(_component_o_slider_thumb, {\n key: 1,\n modelValue: _ctx.value2,\n \"onUpdate:modelValue\": _cache[2] || (_cache[2] = $event => _ctx.value2 = $event),\n variant: _ctx.newTooltipVariant,\n tooltip: _ctx.tooltip,\n \"custom-formatter\": _ctx.customFormatter,\n indicator: _ctx.indicator,\n ref: \"button2\",\n role: \"slider\",\n format: _ctx.format,\n locale: _ctx.locale,\n \"tooltip-always\": _ctx.tooltipAlways,\n \"aria-valuenow\": _ctx.value2,\n \"aria-valuemin\": _ctx.min,\n \"aria-valuemax\": _ctx.max,\n \"aria-orientation\": \"horizontal\",\n \"aria-label\": Array.isArray(_ctx.ariaLabel) ? _ctx.ariaLabel[1] : '',\n \"aria-disabled\": _ctx.disabled,\n onDragstart: _ctx.onDragStart,\n onDragend: _ctx.onDragEnd\n }, null, 8\n /* PROPS */\n , [\"modelValue\", \"variant\", \"tooltip\", \"custom-formatter\", \"indicator\", \"format\", \"locale\", \"tooltip-always\", \"aria-valuenow\", \"aria-valuemin\", \"aria-valuemax\", \"aria-label\", \"aria-disabled\", \"onDragstart\", \"onDragend\"]) : createCommentVNode(\"v-if\", true)], 2\n /* CLASS */\n )], 2\n /* CLASS */\n );\n}\n\nscript$2.render = render$2;\nscript$2.__file = \"src/components/slider/Slider.vue\";\n\nvar index = {\r\n install(app) {\r\n registerComponent(app, script$2);\r\n registerComponent(app, script$1);\r\n }\r\n};\n\nexport default index;\nexport { script$2 as OSlider, script$1 as OSliderTick };\n","import { defineComponent, h } from 'vue';\n\nvar SlotComponent = defineComponent({\r\n name: 'OSlotComponent',\r\n props: {\r\n component: {\r\n type: Object,\r\n required: true\r\n },\r\n name: {\r\n type: String,\r\n default: 'default'\r\n },\r\n props: {\r\n type: Object\r\n },\r\n tag: {\r\n type: String,\r\n default: 'div'\r\n }\r\n },\r\n render() {\r\n const slot = this.component.$slots[this.name](this.props);\r\n return h(this.tag, {}, slot);\r\n }\r\n});\n\nexport { SlotComponent as S };\n","import { defineComponent, withDirectives, h, vShow, Transition } from 'vue';\nimport { mod } from './helpers.mjs';\nimport { s as script } from './Icon-a7b85e86.mjs';\nimport { P as ProviderParentMixin, S as Sorted, I as InjectedChildMixin, a as Sorted$1 } from './InjectedChildMixin-5282461d.mjs';\nimport { S as SlotComponent } from './SlotComponent-11a269f3.mjs';\n\nvar TabbedMixin = (cmp) => defineComponent({\r\n mixins: [ProviderParentMixin(cmp, Sorted)],\r\n components: {\r\n [script.name]: script,\r\n [SlotComponent.name]: SlotComponent\r\n },\r\n emits: ['update:modelValue'],\r\n props: {\r\n /** @model */\r\n modelValue: [String, Number],\r\n /**\r\n * Color of the control, optional\r\n * @values primary, info, success, warning, danger, and any other custom color\r\n */\r\n variant: [String, Object],\r\n /**\r\n * Tab size, optional\r\n * @values small, medium, large\r\n */\r\n size: String,\r\n animated: {\r\n type: Boolean,\r\n default: true\r\n },\r\n /** Show tab in vertical layout */\r\n vertical: {\r\n type: Boolean,\r\n default: false\r\n },\r\n /**\r\n * Position of the tab, optional\r\n * @values centered, right\r\n */\r\n position: String,\r\n /** Destroy tab on hide */\r\n destroyOnHide: {\r\n type: Boolean,\r\n default: false\r\n }\r\n },\r\n data() {\r\n return {\r\n activeId: this.modelValue,\r\n contentHeight: 0,\r\n isTransitioning: false\r\n };\r\n },\r\n computed: {\r\n activeItem() {\r\n return this.activeId !== undefined && this.activeId !== null\r\n ? this.childItems.filter((i) => i.newValue === this.activeId)[0] : this.items[0];\r\n },\r\n activeIndex() {\r\n return this.childItems.findIndex((item => item.newValue === this.activeId));\r\n },\r\n items() {\r\n return this.sortedItems;\r\n }\r\n },\r\n watch: {\r\n /**\r\n * When v-model is changed set the new active tab.\r\n */\r\n modelValue(value) {\r\n if (this.activeId !== value) {\r\n this.performAction(value);\r\n }\r\n }\r\n },\r\n methods: {\r\n /**\r\n * Child click listener, emit input event and change active child.\r\n */\r\n childClick(child) {\r\n if (this.activeId !== child.newValue) {\r\n this.performAction(child.newValue);\r\n this.$emit('update:modelValue', this.activeId);\r\n }\r\n },\r\n /**\r\n * Select the first 'viable' child, starting at startingIndex and in the direction specified\r\n * by the boolean parameter forward. In other words, first try to select the child at index\r\n * startingIndex, and if it is not visible or it is disabled, then go to the index in the\r\n * specified direction until either returning to startIndex or finding a viable child item.\r\n */\r\n clickFirstViableChild(startingIndex, forward) {\r\n let direction = forward ? 1 : -1;\r\n let newIndex = startingIndex;\r\n for (; newIndex !== this.activeIndex; newIndex = mod((newIndex + direction), this.childItems.length)) {\r\n // Break if the item at this index is viable (not disabled and is visible)\r\n if (this.childItems[newIndex].visible && !this.childItems[newIndex].disabled) {\r\n break;\r\n }\r\n }\r\n this.childClick(this.childItems[newIndex]);\r\n },\r\n /**\r\n * Go to the next item or wrap around\r\n */\r\n next() {\r\n let newIndex = mod((this.activeIndex + 1), this.childItems.length);\r\n this.clickFirstViableChild(newIndex, true);\r\n },\r\n /**\r\n * Go to the previous item or wrap around\r\n */\r\n prev() {\r\n let newIndex = mod(this.activeIndex - 1, this.childItems.length);\r\n this.clickFirstViableChild(newIndex, false);\r\n },\r\n /**\r\n * Go to the first viable item\r\n */\r\n homePressed() {\r\n if (this.childItems.length < 1) {\r\n return;\r\n }\r\n this.clickFirstViableChild(0, true);\r\n },\r\n /**\r\n * Go to the last viable item\r\n */\r\n endPressed() {\r\n if (this.childItems.length < 1) {\r\n return;\r\n }\r\n this.clickFirstViableChild(this.childItems.length - 1, false);\r\n },\r\n /**\r\n * Activate next child and deactivate prev child\r\n */\r\n performAction(newId) {\r\n const oldValue = this.activeId;\r\n const oldTab = oldValue !== undefined && oldValue !== null\r\n ? this.childItems.filter((i) => i.newValue === oldValue)[0] : this.items[0];\r\n this.activeId = newId;\r\n if (oldTab && this.activeItem) {\r\n oldTab.deactivate(this.activeItem.index);\r\n this.activeItem.activate(oldTab.index);\r\n }\r\n }\r\n }\r\n});\n\nvar TabbedChildMixin = (parentCmp) => defineComponent({\r\n mixins: [InjectedChildMixin(parentCmp, Sorted$1)],\r\n props: {\r\n /**\r\n * Item value (it will be used as v-model of wrapper component)\r\n */\r\n value: [String, Number],\r\n /**\r\n * Item label\r\n */\r\n label: String,\r\n /**\r\n * Icon on the left\r\n */\r\n icon: String,\r\n /**\r\n * Icon pack\r\n */\r\n iconPack: String,\r\n /**\r\n * Show/hide item\r\n */\r\n visible: {\r\n type: Boolean,\r\n default: true\r\n },\r\n /**\r\n * Header class of the item\r\n */\r\n headerClass: [String, Array, Object]\r\n },\r\n data() {\r\n return {\r\n transitionName: undefined,\r\n newValue: this.value\r\n };\r\n },\r\n computed: {\r\n isActive() {\r\n return this.parent.activeItem === this;\r\n },\r\n elementClasses() {\r\n return [];\r\n }\r\n },\r\n methods: {\r\n /**\r\n * Activate element, alter animation name based on the index.\r\n */\r\n activate(oldIndex) {\r\n this.transitionName = this.index < oldIndex\r\n ? this.parent.vertical ? 'slide-down' : 'slide-next'\r\n : this.parent.vertical ? 'slide-up' : 'slide-prev';\r\n this.$emit(\"activate\");\r\n },\r\n /**\r\n * Deactivate element, alter animation name based on the index.\r\n */\r\n deactivate(newIndex) {\r\n this.transitionName = newIndex < this.index\r\n ? this.parent.vertical ? 'slide-down' : 'slide-next'\r\n : this.parent.vertical ? 'slide-up' : 'slide-prev';\r\n }\r\n },\r\n render() {\r\n // if destroy apply v-if\r\n if (this.parent.destroyOnHide) {\r\n if (!this.isActive || !this.visible)\r\n return;\r\n }\r\n const content = this.$slots.default ? this.$slots.default() : [];\r\n const vnode = withDirectives(h('div', {\r\n class: this.elementClasses,\r\n 'data-id': `${parentCmp}-${this.newValue}`,\r\n 'tabindex': this.isActive ? 0 : -1\r\n }, content), [[vShow, this.isActive && this.visible]]);\r\n // check animated prop\r\n if (this.parent.animated) {\r\n return h(Transition, {\r\n 'name': this.transitionName,\r\n 'onBeforeEnter': () => { this.parent.isTransitioning = true; },\r\n 'onAfterEnter': () => { this.parent.isTransitioning = false; }\r\n }, () => ([vnode]));\r\n }\r\n return vnode;\r\n }\r\n});\n\nexport { TabbedMixin as T, TabbedChildMixin as a };\n","import { defineComponent, resolveComponent, openBlock, createBlock, createVNode, Fragment, renderList, withDirectives, createCommentVNode, toDisplayString, vShow, renderSlot, withModifiers } from 'vue';\nimport { getValueByPath } from './helpers.mjs';\nimport { getOptions } from './config.mjs';\nimport { B as BaseComponentMixin, b as registerComponent } from './plugins-ba5e2464.mjs';\nimport { s as script$3 } from './Icon-a7b85e86.mjs';\nimport { s as script$2 } from './Button-c75f7992.mjs';\nimport './InjectedChildMixin-5282461d.mjs';\nimport { M as MatchMediaMixin } from './MatchMediaMixin-09b141ca.mjs';\nimport './SlotComponent-11a269f3.mjs';\nimport { T as TabbedMixin, a as TabbedChildMixin } from './TabbedChildMixin-8b374962.mjs';\n\n/**\r\n * Responsive horizontal process steps\r\n * @displayName Steps\r\n * @requires ./StepItem.vue\r\n * @style _steps.scss\r\n */\r\nvar script = defineComponent({\r\n name: 'OSteps',\r\n components: {\r\n [script$2.name]: script$2,\r\n [script$3.name]: script$3\r\n },\r\n configField: 'steps',\r\n mixins: [BaseComponentMixin, MatchMediaMixin, TabbedMixin('step')],\r\n props: {\r\n /**\r\n * Icon pack to use for the navigation\r\n * @values mdi, fa, fas and any other custom icon pack\r\n */\r\n iconPack: String,\r\n /** Icon to use for navigation button */\r\n iconPrev: {\r\n type: String,\r\n default: () => {\r\n return getValueByPath(getOptions(), 'steps.iconPrev', 'chevron-left');\r\n }\r\n },\r\n /** Icon to use for navigation button */\r\n iconNext: {\r\n type: String,\r\n default: () => {\r\n return getValueByPath(getOptions(), 'steps.iconNext', 'chevron-right');\r\n }\r\n },\r\n /**\r\n * Next and previous buttons below the component. You can use this property if you want to use your own custom navigation items.\r\n */\r\n hasNavigation: {\r\n type: Boolean,\r\n default: true\r\n },\r\n /**\r\n * Step navigation is animated\r\n */\r\n animated: {\r\n type: Boolean,\r\n default: true\r\n },\r\n /**\r\n * Position of the marker label, optional\r\n * @values bottom, right, left\r\n */\r\n labelPosition: {\r\n type: String,\r\n validator(value) {\r\n return [\r\n 'bottom',\r\n 'right',\r\n 'left'\r\n ].indexOf(value) > -1;\r\n },\r\n default: 'bottom'\r\n },\r\n /** Rounded step markers */\r\n rounded: {\r\n type: Boolean,\r\n default: true\r\n },\r\n ariaNextLabel: String,\r\n ariaPreviousLabel: String,\r\n rootClass: [String, Function, Array],\r\n sizeClass: [String, Function, Array],\r\n verticalClass: [String, Function, Array],\r\n positionClass: [String, Function, Array],\r\n stepsClass: [String, Function, Array],\r\n animatedClass: [String, Function, Array],\r\n stepMarkerRoundedClass: [String, Function, Array],\r\n stepDividerClass: [String, Function, Array],\r\n stepMarkerClass: [String, Function, Array],\r\n stepContentClass: [String, Function, Array],\r\n stepContentTransitioningClass: [String, Function, Array],\r\n stepNavigationClass: [String, Function, Array],\r\n stepLinkClass: [String, Function, Array],\r\n stepLinkClickableClass: [String, Function, Array],\r\n stepLinkLabelClass: [String, Function, Array],\r\n stepLinkLabelPositionClass: [String, Function, Array],\r\n mobileClass: [String, Function, Array],\r\n },\r\n computed: {\r\n wrapperClasses() {\r\n return [\r\n this.computedClass('rootClass', 'o-steps__wrapper'),\r\n { [this.computedClass('sizeClass', 'o-steps--', this.size)]: this.size },\r\n { [this.computedClass('verticalClass', 'o-steps__wrapper-vertical')]: this.vertical },\r\n { [this.computedClass('positionClass', 'o-steps__wrapper-position-', this.position)]: this.position && this.vertical },\r\n { [this.computedClass('mobileClass', 'o-steps--mobile')]: this.isMatchMedia },\r\n ];\r\n },\r\n mainClasses() {\r\n return [\r\n this.computedClass('stepsClass', 'o-steps'),\r\n { [this.computedClass('animatedClass', 'o-steps--animated')]: this.animated }\r\n ];\r\n },\r\n stepDividerClasses() {\r\n return [\r\n this.computedClass('stepDividerClass', 'o-steps__divider')\r\n ];\r\n },\r\n stepMarkerClasses() {\r\n return [\r\n this.computedClass('stepMarkerClass', 'o-steps__marker'),\r\n { [this.computedClass('stepMarkerRoundedClass', 'o-steps__marker--rounded')]: this.rounded }\r\n ];\r\n },\r\n stepContentClasses() {\r\n return [\r\n this.computedClass('stepContentClass', 'o-steps__content'),\r\n { [this.computedClass('stepContentTransitioningClass', 'o-steps__content-transitioning')]: this.isTransitioning }\r\n ];\r\n },\r\n stepNavigationClasses() {\r\n return [\r\n this.computedClass('stepNavigationClass', 'o-steps__navigation')\r\n ];\r\n },\r\n stepLinkLabelClasses() {\r\n return [\r\n this.computedClass('stepLinkLabelClass', 'o-steps__title')\r\n ];\r\n },\r\n // Override mixin implementation to always have a value\r\n activeItem() {\r\n return this.childItems.filter((i) => i.newValue === this.activeId)[0] || this.items[0];\r\n },\r\n /**\r\n * Check if previous button is available.\r\n */\r\n hasPrev() {\r\n return !!this.prevItem;\r\n },\r\n /**\r\n * Retrieves the next visible item\r\n */\r\n nextItem() {\r\n let nextItem = null;\r\n let idx = this.activeItem ? this.items.indexOf(this.activeItem) + 1 : 0;\r\n for (; idx < this.items.length; idx++) {\r\n if (this.items[idx].visible) {\r\n nextItem = this.items[idx];\r\n break;\r\n }\r\n }\r\n return nextItem;\r\n },\r\n /**\r\n * Retrieves the previous visible item\r\n */\r\n prevItem() {\r\n if (!this.activeItem) {\r\n return null;\r\n }\r\n let prevItem = null;\r\n for (let idx = this.items.indexOf(this.activeItem) - 1; idx >= 0; idx--) {\r\n if (this.items[idx].visible) {\r\n prevItem = this.items[idx];\r\n break;\r\n }\r\n }\r\n return prevItem;\r\n },\r\n /**\r\n * Check if next button is available.\r\n */\r\n hasNext() {\r\n return !!this.nextItem;\r\n },\r\n navigationProps() {\r\n return {\r\n previous: {\r\n disabled: !this.hasPrev,\r\n action: this.prev\r\n },\r\n next: {\r\n disabled: !this.hasNext,\r\n action: this.next\r\n }\r\n };\r\n }\r\n },\r\n methods: {\r\n stepLinkClasses(childItem) {\r\n return [\r\n this.computedClass('stepLinkClass', 'o-steps__link'),\r\n { [this.computedClass('stepLinkLabelPositionClass', 'o-steps__link-label-', this.labelPosition)]: this.labelPosition },\r\n { [this.computedClass('stepLinkClickableClass', 'o-steps__link-clickable')]: this.isItemClickable(childItem) }\r\n ];\r\n },\r\n /**\r\n * Return if the step should be clickable or not.\r\n */\r\n isItemClickable(stepItem) {\r\n if (stepItem.clickable === undefined) {\r\n return stepItem.index < this.activeItem.index;\r\n }\r\n return stepItem.clickable;\r\n },\r\n /**\r\n * Previous button click listener.\r\n */\r\n prev() {\r\n if (this.hasPrev) {\r\n this.childClick(this.prevItem);\r\n }\r\n },\r\n /**\r\n * Previous button click listener.\r\n */\r\n next() {\r\n if (this.hasNext) {\r\n this.childClick(this.nextItem);\r\n }\r\n }\r\n }\r\n});\n\nconst _hoisted_1 = {\n key: 1\n};\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n const _component_o_icon = resolveComponent(\"o-icon\");\n\n const _component_o_button = resolveComponent(\"o-button\");\n\n return openBlock(), createBlock(\"div\", {\n class: _ctx.wrapperClasses\n }, [createVNode(\"nav\", {\n class: _ctx.mainClasses\n }, [(openBlock(true), createBlock(Fragment, null, renderList(_ctx.items, (childItem, index) => {\n return withDirectives((openBlock(), createBlock(\"div\", {\n key: childItem.newValue,\n class: childItem.itemClasses\n }, [index > 0 ? (openBlock(), createBlock(\"span\", {\n key: 0,\n class: _ctx.stepDividerClasses\n }, null, 2\n /* CLASS */\n )) : createCommentVNode(\"v-if\", true), createVNode(\"a\", {\n class: _ctx.stepLinkClasses(childItem),\n onClick: $event => _ctx.isItemClickable(childItem) && _ctx.childClick(childItem)\n }, [createVNode(\"div\", {\n class: _ctx.stepMarkerClasses\n }, [childItem.icon ? createVNode(_component_o_icon, {\n key: 0,\n icon: childItem.icon,\n pack: childItem.iconPack,\n size: _ctx.size\n }, null, 8\n /* PROPS */\n , [\"icon\", \"pack\", \"size\"]) : childItem.step ? (openBlock(), createBlock(\"span\", _hoisted_1, toDisplayString(childItem.step), 1\n /* TEXT */\n )) : createCommentVNode(\"v-if\", true)], 2\n /* CLASS */\n ), createVNode(\"div\", {\n class: _ctx.stepLinkLabelClasses\n }, toDisplayString(childItem.label), 3\n /* TEXT, CLASS */\n )], 10\n /* CLASS, PROPS */\n , [\"onClick\"])], 2\n /* CLASS */\n )), [[vShow, childItem.visible]]);\n }), 128\n /* KEYED_FRAGMENT */\n ))], 2\n /* CLASS */\n ), createVNode(\"section\", {\n class: _ctx.stepContentClasses\n }, [renderSlot(_ctx.$slots, \"default\")], 2\n /* CLASS */\n ), renderSlot(_ctx.$slots, \"navigation\", {\n previous: _ctx.navigationProps.previous,\n next: _ctx.navigationProps.next\n }, () => [_ctx.hasNavigation ? (openBlock(), createBlock(\"nav\", {\n key: 0,\n class: _ctx.stepNavigationClasses\n }, [createVNode(_component_o_button, {\n role: \"button\",\n \"icon-left\": _ctx.iconPrev,\n \"icon-pack\": _ctx.iconPack,\n \"icon-both\": \"\",\n disabled: _ctx.navigationProps.previous.disabled,\n onClick: withModifiers(_ctx.navigationProps.previous.action, [\"prevent\"]),\n \"aria-label\": _ctx.ariaPreviousLabel\n }, null, 8\n /* PROPS */\n , [\"icon-left\", \"icon-pack\", \"disabled\", \"onClick\", \"aria-label\"]), createVNode(_component_o_button, {\n role: \"button\",\n \"icon-left\": _ctx.iconNext,\n \"icon-pack\": _ctx.iconPack,\n \"icon-both\": \"\",\n disabled: _ctx.navigationProps.next.disabled,\n onClick: withModifiers(_ctx.navigationProps.next.action, [\"prevent\"]),\n \"aria-label\": _ctx.ariaNextLabel\n }, null, 8\n /* PROPS */\n , [\"icon-left\", \"icon-pack\", \"disabled\", \"onClick\", \"aria-label\"])], 2\n /* CLASS */\n )) : createCommentVNode(\"v-if\", true)])], 2\n /* CLASS */\n );\n}\n\nscript.render = render;\nscript.__file = \"src/components/steps/Steps.vue\";\n\n/**\r\n * @displayName Step Item\r\n */\r\nvar script$1 = defineComponent({\r\n name: 'OStepItem',\r\n mixins: [BaseComponentMixin, TabbedChildMixin('step')],\r\n configField: 'steps',\r\n props: {\r\n /** Step marker content (when there is no icon) */\r\n step: [String, Number],\r\n /** Default style for the step, optional This will override parent type. Could be used to set a completed step to \"success\" for example */\r\n variant: [String, Object],\r\n /** Item can be used directly to navigate. If undefined, previous steps are clickable while the others are not */\r\n clickable: {\r\n type: Boolean,\r\n default: undefined\r\n },\r\n itemClass: [String, Function, Array],\r\n itemHeaderClass: [String, Function, Array],\r\n itemHeaderActiveClass: [String, Function, Array],\r\n itemHeaderPreviousClass: [String, Function, Array],\r\n itemHeaderVariantClass: [String, Function, Array],\r\n },\r\n computed: {\r\n elementClasses() {\r\n return [\r\n this.computedClass('itemClass', 'o-steps__item')\r\n ];\r\n },\r\n itemClasses() {\r\n return [\r\n this.headerClass,\r\n this.computedClass('itemHeaderClass', 'o-steps__nav-item'),\r\n { [this.computedClass('itemHeaderVariantClass', 'o-steps__nav-item--', this.variant || this.parent.variant)]: this.variant || this.parent.variant },\r\n { [this.computedClass('itemHeaderActiveClass', 'o-steps__nav-item-active')]: this.isActive },\r\n { [this.computedClass('itemHeaderPreviousClass', 'o-steps__nav-item-previous')]: this.parent.activeItem.index > this.index }\r\n ];\r\n }\r\n }\r\n});\n\nscript$1.__file = \"src/components/steps/StepItem.vue\";\n\nvar index = {\r\n install(app) {\r\n registerComponent(app, script);\r\n registerComponent(app, script$1);\r\n }\r\n};\n\nexport default index;\nexport { script$1 as OStepItem, script as OSteps };\n","import { defineComponent, openBlock, createBlock, withKeys, withModifiers, withDirectives, createVNode, vModelCheckbox, renderSlot } from 'vue';\nimport './helpers.mjs';\nimport './config.mjs';\nimport { B as BaseComponentMixin, b as registerComponent } from './plugins-ba5e2464.mjs';\n\n/**\r\n * Switch between two opposing states\r\n * @displayName Switch\r\n * @style _switch.scss\r\n */\r\nvar script = defineComponent({\r\n name: 'OSwitch',\r\n mixins: [BaseComponentMixin],\r\n configField: 'switch',\r\n emits: ['update:modelValue'],\r\n props: {\r\n /** @model */\r\n modelValue: [String, Number, Boolean],\r\n /**\r\n * Same as native value\r\n */\r\n nativeValue: [String, Number, Boolean],\r\n disabled: Boolean,\r\n /**\r\n * Color of the switch, optional\r\n * @values primary, info, success, warning, danger, and any other custom color\r\n */\r\n variant: String,\r\n /**\r\n * Color of the switch when is passive, optional\r\n * @values primary, info, success, warning, danger, and any other custom color\r\n */\r\n passiveVariant: String,\r\n /** Name attribute on native checkbox */\r\n name: String,\r\n required: Boolean,\r\n /**\r\n * Vertical size of switch, optional\r\n * @values small, medium, large\r\n */\r\n size: String,\r\n /**\r\n * Overrides the returned value when it's checked\r\n */\r\n trueValue: {\r\n type: [String, Number, Boolean],\r\n default: true\r\n },\r\n /**\r\n * Overrides the returned value when it's not checked\r\n */\r\n falseValue: {\r\n type: [String, Number, Boolean],\r\n default: false\r\n },\r\n /** Rounded style */\r\n rounded: {\r\n type: Boolean,\r\n default: true\r\n },\r\n /** Label position */\r\n position: {\r\n type: String,\r\n default: 'right'\r\n },\r\n /** Accessibility label to establish relationship between the switch and control label' */\r\n ariaLabelledby: String,\r\n rootClass: [String, Function, Array],\r\n disabledClass: [String, Function, Array],\r\n checkClass: [String, Function, Array],\r\n checkCheckedClass: [String, Function, Array],\r\n checkSwitchClass: [String, Function, Array],\r\n roundedClass: [String, Function, Array],\r\n labelClass: [String, Function, Array],\r\n sizeClass: [String, Function, Array],\r\n variantClass: [String, Function, Array],\r\n elementsWrapperClass: [String, Function, Array],\r\n passiveVariantClass: [String, Function, Array],\r\n positionClass: [String, Function, Array],\r\n inputClass: [String, Function, Array]\r\n },\r\n data() {\r\n return {\r\n newValue: this.modelValue,\r\n isMouseDown: false\r\n };\r\n },\r\n computed: {\r\n rootClasses() {\r\n return [\r\n this.computedClass('rootClass', 'o-switch'),\r\n { [this.computedClass('sizeClass', 'o-switch--', this.size)]: this.size },\r\n { [this.computedClass('disabledClass', 'o-switch--disabled')]: this.disabled },\r\n { [this.computedClass('variantClass', 'o-switch--', this.variant)]: this.variant },\r\n { [this.computedClass('positionClass', 'o-switch--', this.position)]: this.position },\r\n { [this.computedClass('passiveVariantClass', 'o-switch--', this.passiveVariant + '-passive')]: this.passiveVariant }\r\n ];\r\n },\r\n inputClasses() {\r\n return [\r\n this.computedClass('inputClass', 'o-switch__input')\r\n ];\r\n },\r\n checkClasses() {\r\n return [\r\n this.computedClass('checkClass', 'o-switch__check'),\r\n { [this.computedClass('checkCheckedClass', 'o-switch__check--checked')]: (this.newValue === this.trueValue) },\r\n { [this.computedClass('roundedClass', 'o-switch--rounded')]: this.rounded },\r\n ];\r\n },\r\n checkSwitchClasses() {\r\n return [\r\n this.computedClass('checkSwitchClass', 'o-switch__check-switch'),\r\n { [this.computedClass('roundedClass', 'o-switch--rounded')]: this.rounded },\r\n ];\r\n },\r\n labelClasses() {\r\n return [\r\n this.computedClass('labelClass', 'o-switch__label')\r\n ];\r\n },\r\n computedValue: {\r\n get() {\r\n return this.newValue;\r\n },\r\n set(value) {\r\n this.newValue = value;\r\n this.$emit('update:modelValue', this.newValue);\r\n }\r\n }\r\n },\r\n watch: {\r\n /**\r\n * When v-model change, set internal value.\r\n */\r\n modelValue(value) {\r\n this.newValue = value;\r\n }\r\n },\r\n methods: {\r\n focus() {\r\n // MacOS FireFox and Safari do not focus when clicked\r\n this.$refs.input.focus();\r\n }\r\n }\r\n});\n\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n return openBlock(), createBlock(\"label\", {\n class: _ctx.rootClasses,\n ref: \"label\",\n onClick: _cache[3] || (_cache[3] = (...args) => _ctx.focus(...args)),\n onKeydown: _cache[4] || (_cache[4] = withKeys(withModifiers($event => _ctx.$refs.label.click(), [\"prevent\"]), [\"enter\"])),\n onMousedown: _cache[5] || (_cache[5] = $event => _ctx.isMouseDown = true),\n onMouseup: _cache[6] || (_cache[6] = $event => _ctx.isMouseDown = false),\n onMouseout: _cache[7] || (_cache[7] = $event => _ctx.isMouseDown = false),\n onBlur: _cache[8] || (_cache[8] = $event => _ctx.isMouseDown = false)\n }, [withDirectives(createVNode(\"input\", {\n \"onUpdate:modelValue\": _cache[1] || (_cache[1] = $event => _ctx.computedValue = $event),\n type: \"checkbox\",\n ref: \"input\",\n class: _ctx.inputClasses,\n onClick: _cache[2] || (_cache[2] = withModifiers(() => {}, [\"stop\"])),\n disabled: _ctx.disabled,\n name: _ctx.name,\n required: _ctx.required,\n value: _ctx.nativeValue,\n \"true-value\": _ctx.trueValue,\n \"false-value\": _ctx.falseValue,\n \"aria-labelledby\": _ctx.ariaLabelledby\n }, null, 10\n /* CLASS, PROPS */\n , [\"disabled\", \"name\", \"required\", \"value\", \"true-value\", \"false-value\", \"aria-labelledby\"]), [[vModelCheckbox, _ctx.computedValue]]), createVNode(\"span\", {\n class: _ctx.checkClasses\n }, [createVNode(\"span\", {\n class: _ctx.checkSwitchClasses\n }, null, 2\n /* CLASS */\n )], 2\n /* CLASS */\n ), createVNode(\"span\", {\n id: _ctx.ariaLabelledby,\n class: _ctx.labelClasses\n }, [renderSlot(_ctx.$slots, \"default\")], 10\n /* CLASS, PROPS */\n , [\"id\"])], 34\n /* CLASS, HYDRATE_EVENTS */\n );\n}\n\nscript.render = render;\nscript.__file = \"src/components/switch/Switch.vue\";\n\nvar index = {\r\n install(app) {\r\n registerComponent(app, script);\r\n }\r\n};\n\nexport default index;\nexport { script as OSwitch };\n","import { defineComponent, resolveComponent, openBlock, createBlock, createVNode, withCtx, withDirectives, toDisplayString, vShow, createCommentVNode, Fragment, renderList, h, renderSlot, createApp, mergeProps, withKeys, withModifiers, createTextVNode, capitalize, Transition } from 'vue';\nimport { getValueByPath, toCssDimension, indexOf, debounce, escapeRegExpChars, removeDiacriticsFromString } from './helpers.mjs';\nimport { getOptions } from './config.mjs';\nimport { B as BaseComponentMixin, b as registerComponent } from './plugins-ba5e2464.mjs';\nimport { s as script$6 } from './Icon-a7b85e86.mjs';\nimport './FormElementMixin-29581863.mjs';\nimport { s as script$a } from './Input-19e906a1.mjs';\nimport { s as script$4 } from './Button-c75f7992.mjs';\nimport './CheckRadioMixin-f5b57344.mjs';\nimport { s as script$9 } from './Checkbox-8670724c.mjs';\nimport { M as MatchMediaMixin } from './MatchMediaMixin-09b141ca.mjs';\nimport { s as script$7 } from './Field-937b4591.mjs';\nimport { s as script$5 } from './Select-2cca695f.mjs';\nimport './ssr-85c76d50.mjs';\nimport { s as script$b } from './Loading-20d29914.mjs';\nimport { s as script$8 } from './Pagination-02a660a8.mjs';\nimport { S as SlotComponent } from './SlotComponent-11a269f3.mjs';\n\nvar script = defineComponent({\r\n name: 'OTableMobileSort',\r\n components: {\r\n [script$4.name]: script$4,\r\n [script$5.name]: script$5,\r\n [script$6.name]: script$6,\r\n [script$7.name]: script$7\r\n },\r\n inject: ['$table'],\r\n emits: ['sort'],\r\n props: {\r\n currentSortColumn: Object,\r\n columns: Array,\r\n placeholder: String,\r\n iconPack: String,\r\n sortIcon: {\r\n type: String,\r\n default: 'arrow-up'\r\n },\r\n sortIconSize: {\r\n type: String,\r\n default: 'small'\r\n },\r\n isAsc: Boolean\r\n },\r\n data() {\r\n return {\r\n mobileSort: getValueByPath(this.currentSortColumn, 'newKey'),\r\n defaultEvent: {\r\n shiftKey: true,\r\n altKey: true,\r\n ctrlKey: true\r\n },\r\n ignoreSort: false\r\n };\r\n },\r\n computed: {\r\n showPlaceholder() {\r\n return !this.columns || !this.columns.some((column) => (getValueByPath(column, 'newKey') === this.mobileSort));\r\n },\r\n sortableColumns() {\r\n if (!this.columns)\r\n return [];\r\n return this.columns.filter(c => c.sortable);\r\n },\r\n isCurrentSort() {\r\n return getValueByPath(this.currentSortColumn, 'newKey') === this.mobileSort;\r\n }\r\n },\r\n watch: {\r\n mobileSort(value) {\r\n if (this.currentSortColumn.newKey === value)\r\n return;\r\n const column = this.sortableColumns.filter(c => (getValueByPath(c, 'newKey') === value))[0];\r\n this.$emit('sort', column, this.defaultEvent);\r\n },\r\n currentSortColumn(column) {\r\n this.mobileSort = getValueByPath(column, 'newKey');\r\n }\r\n },\r\n methods: {\r\n sort() {\r\n const column = this.sortableColumns.filter(c => (getValueByPath(c, 'newKey') === this.mobileSort))[0];\r\n this.$emit('sort', column, this.defaultEvent);\r\n }\r\n }\r\n});\n\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n const _component_o_select = resolveComponent(\"o-select\");\n\n const _component_o_icon = resolveComponent(\"o-icon\");\n\n const _component_o_button = resolveComponent(\"o-button\");\n\n const _component_o_field = resolveComponent(\"o-field\");\n\n return openBlock(), createBlock(\"div\", {\n class: _ctx.$table.mobileSortClasses\n }, [createVNode(_component_o_field, null, {\n default: withCtx(() => [createVNode(_component_o_select, {\n modelValue: _ctx.mobileSort,\n \"onUpdate:modelValue\": _cache[1] || (_cache[1] = $event => _ctx.mobileSort = $event),\n expanded: \"\"\n }, {\n default: withCtx(() => [_ctx.placeholder ? withDirectives((openBlock(), createBlock(\"option\", {\n key: 0,\n value: {},\n selected: \"\",\n disabled: \"\",\n hidden: \"\"\n }, toDisplayString(_ctx.placeholder), 513\n /* TEXT, NEED_PATCH */\n )), [[vShow, _ctx.showPlaceholder]]) : createCommentVNode(\"v-if\", true), (openBlock(true), createBlock(Fragment, null, renderList(_ctx.sortableColumns, (column, index) => {\n return openBlock(), createBlock(\"option\", {\n key: index,\n value: column.newKey\n }, toDisplayString(column.label), 9\n /* TEXT, PROPS */\n , [\"value\"]);\n }), 128\n /* KEYED_FRAGMENT */\n ))]),\n _: 1\n }, 8\n /* PROPS */\n , [\"modelValue\"]), createVNode(_component_o_button, {\n onClick: _ctx.sort\n }, {\n default: withCtx(() => [withDirectives(createVNode(_component_o_icon, {\n icon: _ctx.sortIcon,\n pack: _ctx.iconPack,\n size: _ctx.sortIconSize,\n both: \"\",\n rotation: !_ctx.isAsc ? 180 : 0\n }, null, 8\n /* PROPS */\n , [\"icon\", \"pack\", \"size\", \"rotation\"]), [[vShow, _ctx.isCurrentSort]])]),\n _: 1\n }, 8\n /* PROPS */\n , [\"onClick\"])]),\n _: 1\n })], 2\n /* CLASS */\n );\n}\n\nscript.render = render;\nscript.__file = \"src/components/table/TableMobileSort.vue\";\n\n/**\r\n * @displayName Table Column\r\n */\r\nvar script$1 = defineComponent({\r\n name: 'OTableColumn',\r\n inject: ['$table'],\r\n props: {\r\n label: String,\r\n customKey: [String, Number],\r\n field: String,\r\n meta: [String, Number, Boolean, Function, Object, Array],\r\n width: [Number, String],\r\n numeric: Boolean,\r\n /**\r\n * Optional, position of column content\r\n * @values left, centered, right\r\n */\r\n position: {\r\n type: String,\r\n validator(value) {\r\n return [\r\n 'left',\r\n 'centered',\r\n 'right'\r\n ].indexOf(value) > -1;\r\n }\r\n },\r\n searchable: Boolean,\r\n sortable: Boolean,\r\n visible: {\r\n type: Boolean,\r\n default: true\r\n },\r\n customSort: Function,\r\n customSearch: Function,\r\n sticky: Boolean,\r\n headerSelectable: Boolean,\r\n /** Adds native attributes to th :th-attrs=\"(column)\" => ({})\" */\r\n thAttrs: {\r\n type: Function,\r\n default: () => ({})\r\n },\r\n /** Adds native attributes to td :td-attrs=\"(row, column)\" => ({})\" */\r\n tdAttrs: {\r\n type: Function,\r\n default: () => ({})\r\n },\r\n subheading: String\r\n },\r\n data() {\r\n return {\r\n newKey: undefined,\r\n thAttrsData: {},\r\n tdAttrsData: []\r\n };\r\n },\r\n computed: {\r\n style() {\r\n return {\r\n width: toCssDimension(this.width)\r\n };\r\n },\r\n hasDefaultSlot() {\r\n return this.$slots.default;\r\n },\r\n hasSearchableSlot() {\r\n return this.$slots.searchable;\r\n },\r\n hasHeaderSlot() {\r\n return this.$slots.header;\r\n },\r\n isHeaderUnselectable() {\r\n return !this.headerSelectable && this.sortable;\r\n }\r\n },\r\n created() {\r\n if (!this.$table) {\r\n throw new Error('You should wrap oTableColumn on a oTable');\r\n }\r\n this.newKey = this.$table._nextSequence();\r\n this.$table._addColumn(this);\r\n },\r\n beforeMount() {\r\n if (typeof this.thAttrs !== 'undefined') {\r\n this.thAttrsData = this.thAttrs(this);\r\n }\r\n },\r\n beforeUnmount() {\r\n this.$table._removeColumn(this);\r\n },\r\n render() {\r\n // renderless\r\n return h('span', { 'data-id': this.newKey }, this.label);\r\n }\r\n});\n\nscript$1.__file = \"src/components/table/TableColumn.vue\";\n\nvar script$2 = defineComponent({\n name: 'OTablePagination',\n components: {\n [script$8.name]: script$8\n },\n emits: ['update:currentPage', 'page-change'],\n props: {\n paginated: Boolean,\n total: [Number, String],\n perPage: [Number, String],\n currentPage: [Number, String],\n paginationSimple: Boolean,\n paginationSize: String,\n rounded: Boolean,\n iconPack: String,\n rootClass: [String, Array, Object],\n ariaNextLabel: String,\n ariaPreviousLabel: String,\n ariaPageLabel: String,\n ariaCurrentLabel: String\n },\n\n data() {\n return {\n newCurrentPage: this.currentPage\n };\n },\n\n watch: {\n currentPage(newVal) {\n this.newCurrentPage = newVal;\n }\n\n },\n methods: {\n /**\n * Paginator change listener.\n */\n pageChanged(page) {\n this.newCurrentPage = page > 0 ? page : 1;\n this.$emit('update:currentPage', this.newCurrentPage);\n this.$emit('page-change', this.newCurrentPage);\n }\n\n }\n});\n\nconst _hoisted_1 = {\n key: 0\n};\nfunction render$1(_ctx, _cache, $props, $setup, $data, $options) {\n const _component_o_pagination = resolveComponent(\"o-pagination\");\n\n return openBlock(), createBlock(\"div\", {\n class: _ctx.rootClass\n }, [createVNode(\"div\", null, [renderSlot(_ctx.$slots, \"default\")]), createVNode(\"div\", null, [_ctx.paginated ? (openBlock(), createBlock(\"div\", _hoisted_1, [createVNode(_component_o_pagination, {\n \"icon-pack\": _ctx.iconPack,\n total: _ctx.total,\n \"per-page\": _ctx.perPage,\n simple: _ctx.paginationSimple,\n size: _ctx.paginationSize,\n current: _ctx.newCurrentPage,\n rounded: _ctx.rounded,\n onChange: _ctx.pageChanged,\n \"aria-next-label\": _ctx.ariaNextLabel,\n \"aria-previous-label\": _ctx.ariaPreviousLabel,\n \"aria-page-label\": _ctx.ariaPageLabel,\n \"aria-current-label\": _ctx.ariaCurrentLabel\n }, null, 8\n /* PROPS */\n , [\"icon-pack\", \"total\", \"per-page\", \"simple\", \"size\", \"current\", \"rounded\", \"onChange\", \"aria-next-label\", \"aria-previous-label\", \"aria-page-label\", \"aria-current-label\"])])) : createCommentVNode(\"v-if\", true)])], 2\n /* CLASS */\n );\n}\n\nscript$2.render = render$1;\nscript$2.__file = \"src/components/table/TablePagination.vue\";\n\n/**\r\n * Tabulated data are sometimes needed, it's even better when it's responsive\r\n * @displayName Table\r\n * @requires ./TableColumn.vue\r\n * @style _table.scss\r\n */\r\nvar script$3 = defineComponent({\r\n name: 'OTable',\r\n components: {\r\n [script$4.name]: script$4,\r\n [script$9.name]: script$9,\r\n [script$6.name]: script$6,\r\n [script$a.name]: script$a,\r\n [script$b.name]: script$b,\r\n [SlotComponent.name]: SlotComponent,\r\n [script.name]: script,\r\n [script$1.name]: script$1,\r\n [script$2.name]: script$2\r\n },\r\n mixins: [BaseComponentMixin, MatchMediaMixin],\r\n configField: 'table',\r\n inheritAttrs: false,\r\n provide() {\r\n return {\r\n $table: this\r\n };\r\n },\r\n emits: [\r\n 'page-change', 'click', 'dblclick', 'contextmenu',\r\n 'check', 'check-all', 'update:checkedRows',\r\n 'select', 'update:selected', 'filters-change', 'details-open', 'details-close', 'update:openedDetailed',\r\n 'mouseenter', 'mouseleave', 'sort', 'sorting-priority-removed',\r\n 'dragstart', 'dragend', 'drop', 'dragleave', 'dragover', 'cell-click',\r\n 'columndragstart', 'columndragend', 'columndrop', 'columndragleave', 'columndragover',\r\n 'update:currentPage'\r\n ],\r\n props: {\r\n /** Table data */\r\n data: {\r\n type: Array,\r\n default: () => []\r\n },\r\n /** Table columns */\r\n columns: {\r\n type: Array,\r\n default: () => []\r\n },\r\n /** Border to all cells */\r\n bordered: Boolean,\r\n /** Whether table is striped */\r\n striped: Boolean,\r\n /** Makes the cells narrower */\r\n narrowed: Boolean,\r\n /** Rows are highlighted when hovering */\r\n hoverable: Boolean,\r\n /** Loading state */\r\n loading: Boolean,\r\n /** Allow row details */\r\n detailed: Boolean,\r\n /** Rows can be checked (multiple), checked rows will have a .is-checked class if you want to style */\r\n checkable: Boolean,\r\n /** Show check/uncheck all checkbox in table header when checkable */\r\n headerCheckable: {\r\n type: Boolean,\r\n default: true\r\n },\r\n /**\r\n * Position of the checkbox (if checkable is true)\r\n * @values left, right\r\n */\r\n checkboxPosition: {\r\n type: String,\r\n default: 'left',\r\n validator: (value) => {\r\n return [\r\n 'left',\r\n 'right'\r\n ].indexOf(value) >= 0;\r\n }\r\n },\r\n /** Set which row is selected, use v-model:selected to make it two-way binding */\r\n selected: Object,\r\n /** Custom method to verify if a row is selectable, works when is selected. */\r\n isRowSelectable: {\r\n type: Function,\r\n default: () => true\r\n },\r\n /** Table can be focused and user can navigate with keyboard arrows (require selected) and rows are highlighted when hovering */\r\n focusable: Boolean,\r\n /** Custom method to verify if row is checked, works when is checkable. Useful for backend pagination */\r\n customIsChecked: Function,\r\n /** Custom method to verify if a row is checkable, works when is checkable */\r\n isRowCheckable: {\r\n type: Function,\r\n default: () => true\r\n },\r\n /** Set which rows are checked, use v-model:checkedRows to make it two-way binding */\r\n checkedRows: {\r\n type: Array,\r\n default: () => []\r\n },\r\n /** Rows appears as cards on mobile (collapse rows) */\r\n mobileCards: {\r\n type: Boolean,\r\n default: () => {\r\n return getValueByPath(getOptions(), 'table.mobileCards', true);\r\n }\r\n },\r\n /** Sets the default sort column and order — e.g. ['first_name', 'desc']\t */\r\n defaultSort: [String, Array],\r\n /**\r\n * Sets the default sort column direction on the first click\r\n * @values asc, desc\r\n */\r\n defaultSortDirection: {\r\n type: String,\r\n default: 'asc'\r\n },\r\n /** Sets the header sorting icon */\r\n sortIcon: {\r\n type: String,\r\n default: () => { return getValueByPath(getOptions(), 'table.sortIcon', 'arrow-up'); }\r\n },\r\n /**\r\n * Sets the size of the sorting icon\r\n * @values small, medium, large\r\n */\r\n sortIconSize: {\r\n type: String,\r\n default: () => { return getValueByPath(getOptions(), 'table.sortIconSize', 'small'); }\r\n },\r\n /** Adds pagination to the table */\r\n paginated: Boolean,\r\n /** Current page of table data (if paginated), use v-model:currentPage to make it two-way binding */\r\n currentPage: {\r\n type: Number,\r\n default: 1\r\n },\r\n /** How many rows per page (if paginated) */\r\n perPage: {\r\n type: [Number, String],\r\n default: () => { return getValueByPath(getOptions(), 'table.perPage', 20); }\r\n },\r\n /** Allow chevron icon and column to be visible */\r\n showDetailIcon: {\r\n type: Boolean,\r\n default: true\r\n },\r\n /** Icon name of detail action */\r\n detailIcon: {\r\n type: String,\r\n default: 'chevron-right'\r\n },\r\n /**\r\n * Pagination position (if paginated)\r\n * @values bottom, top, bot\r\n */\r\n paginationPosition: {\r\n type: String,\r\n default: () => { return getValueByPath(getOptions(), 'table.paginationPosition', 'bottom'); },\r\n validator: (value) => {\r\n return [\r\n 'bottom',\r\n 'top',\r\n 'both'\r\n ].indexOf(value) >= 0;\r\n }\r\n },\r\n /** Columns won't be sorted with Javascript, use with sort event to sort in your backend */\r\n backendSorting: Boolean,\r\n /** Columns won't be filtered with Javascript, use with searchable prop to the columns to filter in your backend */\r\n backendFiltering: Boolean,\r\n /** Add a class to row based on the return */\r\n rowClass: {\r\n type: Function,\r\n default: () => ''\r\n },\r\n /** Allow pre-defined opened details. Ideal to open details via vue-router. (A unique key is required; check detail-key prop) */\r\n openedDetailed: {\r\n type: Array,\r\n default: () => []\r\n },\r\n /** Controls the visibility of the trigger that toggles the detailed rows. */\r\n hasDetailedVisible: {\r\n type: Function,\r\n default: () => true\r\n },\r\n /** Use a unique key of your data Object when use detailed or opened detailed. (id recommended) */\r\n detailKey: {\r\n type: String,\r\n default: ''\r\n },\r\n /** Custom style on details */\r\n customDetailRow: {\r\n type: Boolean,\r\n default: false\r\n },\r\n /* Transition name to use when toggling row details. */\r\n detailTransition: {\r\n type: String,\r\n default: ''\r\n },\r\n /** Rows won't be paginated with Javascript, use with page-change event to paginate in your backend */\r\n backendPagination: Boolean,\r\n /** Total number of table data if backend-pagination is enabled */\r\n total: {\r\n type: [Number, String],\r\n default: 0\r\n },\r\n /** Icon pack to use */\r\n iconPack: String,\r\n /** Text when nothing is selected */\r\n mobileSortPlaceholder: String,\r\n /** Use a unique key of your data Object for each row. Useful if your data prop has dynamic indices. (id recommended) */\r\n customRowKey: String,\r\n /** Allows rows to be draggable */\r\n draggable: {\r\n type: Boolean,\r\n default: false\r\n },\r\n /** Allows columns to be draggable */\r\n draggableColumn: {\r\n type: Boolean,\r\n default: false\r\n },\r\n /** Add a horizontal scrollbar when table is too wide */\r\n scrollable: Boolean,\r\n ariaNextLabel: String,\r\n ariaPreviousLabel: String,\r\n ariaPageLabel: String,\r\n ariaCurrentLabel: String,\r\n /** Show a sticky table header */\r\n stickyHeader: Boolean,\r\n /** Table fixed height */\r\n height: [Number, String],\r\n /** Add a native event to filter */\r\n filtersEvent: {\r\n type: String,\r\n default: ''\r\n },\r\n /** Filtering debounce time (in milliseconds) */\r\n debounceSearch: Number,\r\n /** Show header */\r\n showHeader: {\r\n type: Boolean,\r\n default: () => { return getValueByPath(getOptions(), 'table.showHeader', true); }\r\n },\r\n /** Make the checkbox column sticky when checkable */\r\n stickyCheckbox: {\r\n type: Boolean,\r\n default: false\r\n },\r\n /** Rounded pagination if paginated */\r\n paginationRounded: Boolean,\r\n rootClass: [String, Function, Array],\r\n tableClass: [String, Function, Array],\r\n wrapperClass: [String, Function, Array],\r\n footerClass: [String, Function, Array],\r\n emptyClass: [String, Function, Array],\r\n detailedClass: [String, Function, Array],\r\n borderedClass: [String, Function, Array],\r\n stripedClass: [String, Function, Array],\r\n narrowedClass: [String, Function, Array],\r\n hoverableClass: [String, Function, Array],\r\n thClass: [String, Function, Array],\r\n tdClass: [String, Function, Array],\r\n thPositionClass: [String, Function, Array],\r\n thStickyClass: [String, Function, Array],\r\n thCheckboxClass: [String, Function, Array],\r\n thCurrentSortClass: [String, Function, Array],\r\n thSortableClass: [String, Function, Array],\r\n thUnselectableClass: [String, Function, Array],\r\n thSortIconClass: [String, Function, Array],\r\n thDetailedClass: [String, Function, Array],\r\n tdPositionClass: [String, Function, Array],\r\n tdStickyClass: [String, Function, Array],\r\n tdCheckboxClass: [String, Function, Array],\r\n tdDetailedChevronClass: [String, Function, Array],\r\n trSelectedClass: [String, Function, Array],\r\n stickyHeaderClass: [String, Function, Array],\r\n scrollableClass: [String, Function, Array],\r\n mobileSortClass: [String, Function, Array],\r\n paginationWrapperClass: [String, Function, Array],\r\n mobileClass: [String, Function, Array],\r\n thSubheadingClass: [String, Function, Array]\r\n },\r\n data() {\r\n return {\r\n visibleDetailRows: this.openedDetailed,\r\n newData: this.data,\r\n newDataTotal: this.backendPagination ? this.total : this.data.length,\r\n newCheckedRows: [...this.checkedRows],\r\n lastCheckedRowIndex: null,\r\n newCurrentPage: this.currentPage,\r\n currentSortColumn: {},\r\n isAsc: true,\r\n filters: {},\r\n defaultSlots: [],\r\n firstTimeSort: true,\r\n sequence: 1,\r\n isDraggingRow: false,\r\n isDraggingColumn: false\r\n };\r\n },\r\n mounted() {\r\n this.$nextTick(() => {\r\n this.checkSort();\r\n });\r\n },\r\n computed: {\r\n rootClasses() {\r\n return [\r\n this.computedClass('rootClass', 'o-table__root'),\r\n { [this.computedClass('mobileClass', 'o-table__wrapper--mobile')]: this.isMobile }\r\n ];\r\n },\r\n tableClasses() {\r\n return [\r\n this.computedClass('tableClass', 'o-table'),\r\n { [this.computedClass('borderedClass', 'o-table--bordered')]: this.bordered },\r\n { [this.computedClass('stripedClass', 'o-table--striped')]: this.striped },\r\n { [this.computedClass('narrowedClass', 'o-table--narrowed')]: this.narrowed },\r\n { [this.computedClass('hoverableClass', 'o-table--hoverable')]: ((this.hoverable || this.focusable) && this.visibleData.length) },\r\n { [this.computedClass('emptyClass', 'o-table--table__empty')]: !this.visibleData.length }\r\n ];\r\n },\r\n tableWrapperClasses() {\r\n return [\r\n this.computedClass('wrapperClass', 'o-table__wrapper'),\r\n { [this.computedClass('stickyHeaderClass', 'o-table__wrapper--sticky-header')]: this.stickyHeader },\r\n { [this.computedClass('scrollableClass', 'o-table__wrapper--scrollable')]: this.isScrollable },\r\n { [this.computedClass('mobileClass', 'o-table__wrapper--mobile')]: this.isMobile },\r\n ];\r\n },\r\n footerClasses() {\r\n return [\r\n this.computedClass('footerClass', 'o-table__footer')\r\n ];\r\n },\r\n thBaseClasses() {\r\n return [\r\n this.computedClass('thClass', 'o-table__th')\r\n ];\r\n },\r\n tdBaseClasses() {\r\n return [\r\n this.computedClass('tdClass', 'o-table__td')\r\n ];\r\n },\r\n thCheckboxClasses() {\r\n return [\r\n ...this.thBaseClasses,\r\n this.computedClass('thCheckboxClass', 'o-table__th-checkbox')\r\n ];\r\n },\r\n thDetailedClasses() {\r\n return [\r\n ...this.thBaseClasses,\r\n this.computedClass('thDetailedClass', 'o-table__th--detailed')\r\n ];\r\n },\r\n thSubheadingClasses() {\r\n return [\r\n ...this.thBaseClasses,\r\n this.computedClass('thSubheadingClass', 'o-table__th')\r\n ];\r\n },\r\n tdCheckboxClasses() {\r\n return [\r\n ...this.tdBaseClasses,\r\n this.computedClass('tdCheckboxClass', 'o-table__td-checkbox'),\r\n ...this.thStickyClasses({ sticky: this.stickyCheckbox })\r\n ];\r\n },\r\n detailedClasses() {\r\n return [\r\n this.computedClass('detailedClass', 'o-table__detail')\r\n ];\r\n },\r\n tdDetailedChevronClasses() {\r\n return [\r\n ...this.tdBaseClasses,\r\n this.computedClass('tdDetailedChevronClass', 'o-table__td-chevron')\r\n ];\r\n },\r\n mobileSortClasses() {\r\n return [\r\n this.computedClass('mobileSortClass', 'o-table__mobile-sort')\r\n ];\r\n },\r\n paginationWrapperClasses() {\r\n return [\r\n this.computedClass('paginationWrapperClass', 'o-table__pagination')\r\n ];\r\n },\r\n tableWrapperStyle() {\r\n return {\r\n height: toCssDimension(this.height)\r\n };\r\n },\r\n /**\r\n * Splitted data based on the pagination.\r\n */\r\n visibleData() {\r\n if (!this.paginated)\r\n return this.newData;\r\n const currentPage = this.newCurrentPage;\r\n const perPage = this.perPage;\r\n if (this.newData.length <= perPage) {\r\n return this.newData;\r\n }\r\n else {\r\n const start = (currentPage - 1) * perPage;\r\n const end = start + parseInt(perPage, 10);\r\n return this.newData.slice(start, end);\r\n }\r\n },\r\n visibleColumns() {\r\n if (!this.newColumns)\r\n return this.newColumns;\r\n return this.newColumns.filter((column) => {\r\n return column.visible || column.visible === undefined;\r\n });\r\n },\r\n /**\r\n * Check if all rows in the page are checked.\r\n */\r\n isAllChecked() {\r\n const validVisibleData = this.visibleData.filter((row) => this.isRowCheckable(row));\r\n if (validVisibleData.length === 0)\r\n return false;\r\n const isAllChecked = validVisibleData.some((currentVisibleRow) => {\r\n return indexOf(this.newCheckedRows, currentVisibleRow, this.customIsChecked) < 0;\r\n });\r\n return !isAllChecked;\r\n },\r\n /**\r\n * Check if all rows in the page are checkable.\r\n */\r\n isAllUncheckable() {\r\n const validVisibleData = this.visibleData.filter((row) => this.isRowCheckable(row));\r\n return validVisibleData.length === 0;\r\n },\r\n /**\r\n * Check if has any sortable column.\r\n */\r\n hasSortablenewColumns() {\r\n return this.newColumns.some((column) => {\r\n return column.sortable;\r\n });\r\n },\r\n /**\r\n * Check if has any searchable column.\r\n */\r\n hasSearchablenewColumns() {\r\n return this.newColumns.some((column) => {\r\n return column.searchable;\r\n });\r\n },\r\n /**\r\n * Return total column count based if it's checkable or expanded\r\n */\r\n columnCount() {\r\n let count = this.visibleColumns.length;\r\n count += this.checkable ? 1 : 0;\r\n count += (this.detailed && this.showDetailIcon) ? 1 : 0;\r\n return count;\r\n },\r\n /**\r\n * return if detailed row tabled\r\n * will be with chevron column & icon or not\r\n */\r\n showDetailRowIcon() {\r\n return this.detailed && this.showDetailIcon;\r\n },\r\n /**\r\n * return if scrollable table\r\n */\r\n isScrollable() {\r\n if (this.scrollable)\r\n return true;\r\n if (!this.newColumns)\r\n return false;\r\n return this.newColumns.some((column) => {\r\n return column.sticky;\r\n });\r\n },\r\n newColumns() {\r\n if (this.columns && this.columns.length) {\r\n return this.columns.map((column) => {\r\n const vnode = createVNode(script$1, column, (props) => {\r\n const vnode = h('span', {}, getValueByPath(props.row, column.field));\r\n return [vnode];\r\n });\r\n return createApp(vnode)\r\n .provide('$table', this)\r\n .mount(document.createElement('div'));\r\n });\r\n }\r\n return this.defaultSlots;\r\n },\r\n isMobile() {\r\n return this.mobileCards && this.isMatchMedia;\r\n },\r\n hasCustomSubheadings() {\r\n if (this.$slots.subheading)\r\n return true;\r\n return this.newColumns.some((column) => {\r\n return column.subheading || (column.$slots.subheading);\r\n });\r\n },\r\n canDragRow() {\r\n return this.draggable && !this.isDraggingColumn;\r\n },\r\n canDragColumn() {\r\n return this.draggableColumn && !this.isDraggingRow;\r\n }\r\n },\r\n watch: {\r\n /**\r\n * When data prop change:\r\n * 1. Update internal value.\r\n * 2. Filter data if it's not backend-filtered.\r\n * 3. Sort again if it's not backend-sorted.\r\n * 4. Set new total if it's not backend-paginated.\r\n */\r\n data: {\r\n handler(value) {\r\n this.newData = value;\r\n if (!this.backendFiltering) {\r\n this.newData = value.filter((row) => this.isRowFiltered(row));\r\n }\r\n if (!this.backendSorting) {\r\n this.sort(this.currentSortColumn, true);\r\n }\r\n if (!this.backendPagination) {\r\n this.newDataTotal = this.newData.length;\r\n }\r\n },\r\n deep: true,\r\n },\r\n visibleColumns: {\r\n handler() {\r\n this.processTdAttrs();\r\n }\r\n },\r\n visibleData: {\r\n handler() {\r\n this.processTdAttrs();\r\n }\r\n },\r\n /**\r\n * When Pagination total change, update internal total\r\n * only if it's backend-paginated.\r\n */\r\n total(newTotal) {\r\n if (!this.backendPagination)\r\n return;\r\n this.newDataTotal = newTotal;\r\n },\r\n currentPage(newValue) {\r\n this.newCurrentPage = newValue;\r\n },\r\n /**\r\n * When checkedRows prop change, update internal value without\r\n * mutating original data.\r\n */\r\n checkedRows: {\r\n handler(rows) {\r\n this.newCheckedRows = [...rows];\r\n },\r\n deep: true,\r\n },\r\n debounceSearch: {\r\n handler(value) {\r\n this.debouncedHandleFiltersChange = debounce(this.handleFiltersChange, value);\r\n },\r\n immediate: true\r\n },\r\n filters: {\r\n handler(value) {\r\n if (this.debounceSearch) {\r\n this.debouncedHandleFiltersChange(value);\r\n }\r\n else {\r\n this.handleFiltersChange(value);\r\n }\r\n },\r\n deep: true,\r\n },\r\n /**\r\n * When the user wants to control the detailed rows via props.\r\n * Or wants to open the details of certain row with the router for example.\r\n */\r\n openedDetailed(expandedRows) {\r\n this.visibleDetailRows = expandedRows;\r\n },\r\n newCurrentPage(newVal) {\r\n this.$emit('update:currentPage', newVal);\r\n }\r\n },\r\n methods: {\r\n thClasses(column) {\r\n return [\r\n ...this.thBaseClasses,\r\n ...this.thStickyClasses(column),\r\n { [this.computedClass('thCurrentSortClass', 'o-table__th-current-sort')]: (this.currentSortColumn === column) },\r\n { [this.computedClass('thSortableClass', 'o-table__th--sortable')]: column.sortable },\r\n { [this.computedClass('thUnselectableClass', 'o-table__th--unselectable')]: column.isHeaderUnselectable },\r\n { [this.computedClass('thPositionClass', 'o-table__th--', column.position)]: column.position },\r\n ];\r\n },\r\n thStickyClasses(column) {\r\n return [\r\n { [this.computedClass('thStickyClass', 'o-table__th--sticky')]: column.sticky }\r\n ];\r\n },\r\n rowClasses(row, index) {\r\n return [\r\n this.rowClass(row, index),\r\n { [this.computedClass('trSelectedClass', 'o-table__tr--selected')]: this.isRowSelected(row, this.selected) }\r\n ];\r\n },\r\n thSortIconClasses() {\r\n return [\r\n this.computedClass('thSortIconClass', 'o-table__th__sort-icon'),\r\n ];\r\n },\r\n tdClasses(row, column) {\r\n return [\r\n ...this.tdBaseClasses,\r\n { [this.computedClass('tdPositionClass', 'o-table__td--', column.position)]: column.position },\r\n { [this.computedClass('tdStickyClass', 'o-table__td--sticky')]: column.sticky }\r\n ];\r\n },\r\n onFiltersEvent(event) {\r\n this.$emit(`filters-event-${this.filtersEvent}`, { event, filters: this.filters });\r\n },\r\n handleFiltersChange(value) {\r\n if (this.backendFiltering) {\r\n this.$emit('filters-change', value);\r\n }\r\n else {\r\n this.newData = this.data.filter((row) => this.isRowFiltered(row));\r\n if (!this.backendPagination) {\r\n this.newDataTotal = this.newData.length;\r\n }\r\n if (!this.backendSorting) {\r\n if (Object.keys(this.currentSortColumn).length > 0) {\r\n this.doSortSingleColumn(this.currentSortColumn);\r\n }\r\n }\r\n }\r\n },\r\n /**\r\n * Sort an array by key without mutating original data.\r\n * Call the user sort function if it was passed.\r\n */\r\n sortBy(array, key, fn, isAsc) {\r\n let sorted = [];\r\n // Sorting without mutating original data\r\n if (fn && typeof fn === 'function') {\r\n sorted = [...array].sort((a, b) => fn(a, b, isAsc));\r\n }\r\n else {\r\n sorted = [...array].sort((a, b) => {\r\n // Get nested values from objects\r\n let newA = getValueByPath(a, key);\r\n let newB = getValueByPath(b, key);\r\n // sort boolean type\r\n if (typeof newA === 'boolean' && typeof newB === 'boolean') {\r\n return isAsc ? newA > newB ? 1 : -1 : newA > newB ? -1 : 1;\r\n }\r\n if (!newA && newA !== 0)\r\n return 1;\r\n if (!newB && newB !== 0)\r\n return -1;\r\n if (newA === newB)\r\n return 0;\r\n newA = (typeof newA === 'string')\r\n ? newA.toUpperCase()\r\n : newA;\r\n newB = (typeof newB === 'string')\r\n ? newB.toUpperCase()\r\n : newB;\r\n return isAsc\r\n ? newA > newB ? 1 : -1\r\n : newA > newB ? -1 : 1;\r\n });\r\n }\r\n return sorted;\r\n },\r\n /**\r\n * Sort the column.\r\n * Toggle current direction on column if it's sortable\r\n * and not just updating the prop.\r\n */\r\n sort(column, updatingData = false, event = null) {\r\n if (!column || !column.sortable)\r\n return;\r\n if (!updatingData) {\r\n this.isAsc = column === this.currentSortColumn\r\n ? !this.isAsc\r\n : (this.defaultSortDirection.toLowerCase() !== 'desc');\r\n }\r\n if (!this.firstTimeSort) {\r\n /**\r\n * @property {string} field column field\r\n * @property {boolean} direction 'asc' or 'desc'\r\n * @property {Event} event native event\r\n */\r\n this.$emit('sort', column.field, this.isAsc ? 'asc' : 'desc', event);\r\n }\r\n if (!this.backendSorting) {\r\n this.doSortSingleColumn(column);\r\n }\r\n this.currentSortColumn = column;\r\n },\r\n doSortSingleColumn(column) {\r\n this.newData = this.sortBy(this.newData, column.field, column.customSort, this.isAsc);\r\n },\r\n isRowSelected(row, selected) {\r\n if (!selected) {\r\n return false;\r\n }\r\n if (this.customRowKey) {\r\n return row[this.customRowKey] === selected[this.customRowKey];\r\n }\r\n return row === selected;\r\n },\r\n /**\r\n * Check if the row is checked (is added to the array).\r\n */\r\n isRowChecked(row) {\r\n return indexOf(this.newCheckedRows, row, this.customIsChecked) >= 0;\r\n },\r\n /**\r\n * Remove a checked row from the array.\r\n */\r\n removeCheckedRow(row) {\r\n const index = indexOf(this.newCheckedRows, row, this.customIsChecked);\r\n if (index >= 0) {\r\n this.newCheckedRows.splice(index, 1);\r\n }\r\n },\r\n /**\r\n * Header checkbox click listener.\r\n * Add or remove all rows in current page.\r\n */\r\n checkAll() {\r\n const isAllChecked = this.isAllChecked;\r\n this.visibleData.forEach((currentRow) => {\r\n if (this.isRowCheckable(currentRow)) {\r\n this.removeCheckedRow(currentRow);\r\n }\r\n if (!isAllChecked) {\r\n if (this.isRowCheckable(currentRow)) {\r\n this.newCheckedRows.push(currentRow);\r\n }\r\n }\r\n });\r\n /**\r\n * @property {Array} newCheckedRows checked rows\r\n */\r\n this.$emit('check', this.newCheckedRows);\r\n this.$emit('check-all', this.newCheckedRows);\r\n // Emit checked rows to update user variable\r\n this.$emit('update:checkedRows', this.newCheckedRows);\r\n },\r\n /**\r\n * Row checkbox click listener.\r\n */\r\n checkRow(row, index, event) {\r\n if (!this.isRowCheckable(row))\r\n return;\r\n const lastIndex = this.lastCheckedRowIndex;\r\n this.lastCheckedRowIndex = index;\r\n if (event.shiftKey && lastIndex !== null && index !== lastIndex) {\r\n this.shiftCheckRow(row, index, lastIndex);\r\n }\r\n else if (!this.isRowChecked(row)) {\r\n this.newCheckedRows.push(row);\r\n }\r\n else {\r\n this.removeCheckedRow(row);\r\n }\r\n this.$emit('check', this.newCheckedRows, row);\r\n // Emit checked rows to update user variable\r\n this.$emit('update:checkedRows', this.newCheckedRows);\r\n },\r\n /**\r\n * Check row when shift is pressed.\r\n */\r\n shiftCheckRow(row, index, lastCheckedRowIndex) {\r\n // Get the subset of the list between the two indicies\r\n const subset = this.visibleData.slice(Math.min(index, lastCheckedRowIndex), Math.max(index, lastCheckedRowIndex) + 1);\r\n // Determine the operation based on the state of the clicked checkbox\r\n const shouldCheck = !this.isRowChecked(row);\r\n subset.forEach((item) => {\r\n this.removeCheckedRow(item);\r\n if (shouldCheck && this.isRowCheckable(item)) {\r\n this.newCheckedRows.push(item);\r\n }\r\n });\r\n },\r\n /**\r\n * Row click listener.\r\n * Emit all necessary events.\r\n */\r\n selectRow(row, index) {\r\n /**\r\n * @property {Object} row clicked row\r\n * @property {number} index index of clicked row\r\n */\r\n this.$emit('click', row, index);\r\n if (this.selected === row)\r\n return;\r\n if (!this.isRowSelectable(row))\r\n return;\r\n // Emit new and old row\r\n /**\r\n * @property {Object} row selected row\r\n * @property {Array} selected selected rows\r\n */\r\n this.$emit('select', row, this.selected);\r\n // Emit new row to update user variable\r\n this.$emit('update:selected', row);\r\n },\r\n /**\r\n * Toggle to show/hide details slot\r\n */\r\n toggleDetails(obj) {\r\n const found = this.isVisibleDetailRow(obj);\r\n if (found) {\r\n this.closeDetailRow(obj);\r\n this.$emit('details-close', obj);\r\n }\r\n else {\r\n this.openDetailRow(obj);\r\n this.$emit('details-open', obj);\r\n }\r\n // Syncs the detailed rows with the parent component\r\n this.$emit('update:openedDetailed', this.visibleDetailRows);\r\n },\r\n openDetailRow(obj) {\r\n const index = this.handleDetailKey(obj);\r\n this.visibleDetailRows.push(index);\r\n },\r\n closeDetailRow(obj) {\r\n const index = this.handleDetailKey(obj);\r\n const i = this.visibleDetailRows.indexOf(index);\r\n if (i >= 0) {\r\n this.visibleDetailRows.splice(i, 1);\r\n }\r\n },\r\n isVisibleDetailRow(obj) {\r\n const index = this.handleDetailKey(obj);\r\n return this.visibleDetailRows.indexOf(index) >= 0;\r\n },\r\n isActiveDetailRow(row) {\r\n return this.detailed && !this.customDetailRow && this.isVisibleDetailRow(row);\r\n },\r\n isActiveCustomDetailRow(row) {\r\n return this.detailed && this.customDetailRow && this.isVisibleDetailRow(row);\r\n },\r\n isRowFiltered(row) {\r\n for (const key in this.filters) {\r\n if (!this.filters[key])\r\n continue;\r\n const input = this.filters[key];\r\n const column = this.newColumns.filter((c) => c.field === key)[0];\r\n if (column && column.customSearch && typeof column.customSearch === 'function') {\r\n if (!column.customSearch(row, input))\r\n return false;\r\n }\r\n else {\r\n const value = getValueByPath(row, key);\r\n if (value == null)\r\n return false;\r\n if (Number.isInteger(value)) {\r\n if (value !== Number(input))\r\n return false;\r\n }\r\n else {\r\n const re = new RegExp(escapeRegExpChars(input), 'i');\r\n if (Array.isArray(value)) {\r\n const valid = value.some((val) => re.test(removeDiacriticsFromString(val)) || re.test(val));\r\n if (!valid)\r\n return false;\r\n }\r\n else {\r\n if (!re.test(removeDiacriticsFromString(value)) && !re.test(value)) {\r\n return false;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n return true;\r\n },\r\n /**\r\n * When the detailKey is defined we use the object[detailKey] as index.\r\n * If not, use the object reference by default.\r\n */\r\n handleDetailKey(index) {\r\n const key = this.detailKey;\r\n return !key.length || !index\r\n ? index\r\n : index[key];\r\n },\r\n /**\r\n * Call initSort only first time (For example async data).\r\n */\r\n checkSort() {\r\n if (this.newColumns.length && this.firstTimeSort) {\r\n this.initSort();\r\n this.firstTimeSort = false;\r\n }\r\n else if (this.newColumns.length) {\r\n if (Object.keys(this.currentSortColumn).length > 0) {\r\n for (let i = 0; i < this.newColumns.length; i++) {\r\n if (this.newColumns[i].field === this.currentSortColumn.field) {\r\n this.currentSortColumn = this.newColumns[i];\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n },\r\n /**\r\n * Check if footer slot has custom content.\r\n */\r\n hasCustomFooterSlot() {\r\n if (this.$slots.footer) {\r\n const footer = this.$slots.footer();\r\n if (footer.length > 1)\r\n return true;\r\n const tag = footer[0].tag;\r\n if (tag !== 'th' && tag !== 'td')\r\n return false;\r\n }\r\n return true;\r\n },\r\n /**\r\n * Table arrow keys listener, change selection.\r\n */\r\n pressedArrow(pos) {\r\n if (!this.visibleData.length)\r\n return;\r\n let index = this.visibleData.indexOf(this.selected) + pos;\r\n // Prevent from going up from first and down from last\r\n index = index < 0\r\n ? 0\r\n : index > this.visibleData.length - 1\r\n ? this.visibleData.length - 1\r\n : index;\r\n const row = this.visibleData[index];\r\n if (!this.isRowSelectable(row)) {\r\n let newIndex = null;\r\n if (pos > 0) {\r\n for (let i = index; i < this.visibleData.length && newIndex === null; i++) {\r\n if (this.isRowSelectable(this.visibleData[i]))\r\n newIndex = i;\r\n }\r\n }\r\n else {\r\n for (let i = index; i >= 0 && newIndex === null; i--) {\r\n if (this.isRowSelectable(this.visibleData[i]))\r\n newIndex = i;\r\n }\r\n }\r\n if (newIndex >= 0) {\r\n this.selectRow(this.visibleData[newIndex]);\r\n }\r\n }\r\n else {\r\n this.selectRow(row);\r\n }\r\n },\r\n /**\r\n * Focus table element if has selected prop.\r\n */\r\n focus() {\r\n if (!this.focusable)\r\n return;\r\n this.$el.querySelector('table').focus();\r\n },\r\n /**\r\n * Initial sorted column based on the default-sort prop.\r\n */\r\n initSort() {\r\n if (!this.defaultSort)\r\n return;\r\n let sortField = '';\r\n let sortDirection = this.defaultSortDirection;\r\n if (Array.isArray(this.defaultSort)) {\r\n sortField = this.defaultSort[0];\r\n if (this.defaultSort[1]) {\r\n sortDirection = this.defaultSort[1];\r\n }\r\n }\r\n else {\r\n sortField = this.defaultSort;\r\n }\r\n const sortColumn = this.newColumns.filter((column) => (column.field === sortField))[0];\r\n if (sortColumn) {\r\n this.isAsc = sortDirection.toLowerCase() !== 'desc';\r\n this.sort(sortColumn, true);\r\n }\r\n },\r\n /**\r\n * Emits drag start event\r\n */\r\n handleDragStart(event, row, index) {\r\n if (!this.draggable)\r\n return;\r\n this.$emit('dragstart', { event, row, index });\r\n },\r\n /**\r\n * Emits drag leave event\r\n */\r\n handleDragEnd(event, row, index) {\r\n if (!this.draggable)\r\n return;\r\n this.$emit('dragend', { event, row, index });\r\n },\r\n /**\r\n * Emits drop event\r\n */\r\n handleDrop(event, row, index) {\r\n if (!this.draggable)\r\n return;\r\n this.$emit('drop', { event, row, index });\r\n },\r\n /**\r\n * Emits drag over event\r\n */\r\n handleDragOver(event, row, index) {\r\n if (!this.draggable)\r\n return;\r\n this.$emit('dragover', { event, row, index });\r\n },\r\n /**\r\n * Emits drag leave event\r\n */\r\n handleDragLeave(event, row, index) {\r\n if (!this.draggable)\r\n return;\r\n this.$emit('dragleave', { event, row, index });\r\n },\r\n /**\r\n * Emits drag start event (column)\r\n */\r\n handleColumnDragStart(event, column, index) {\r\n if (!this.canDragColumn)\r\n return;\r\n this.isDraggingColumn = true;\r\n this.$emit('columndragstart', { event, column, index });\r\n },\r\n /**\r\n * Emits drag leave event (column)\r\n */\r\n handleColumnDragEnd(event, column, index) {\r\n if (!this.canDragColumn)\r\n return;\r\n this.isDraggingColumn = false;\r\n this.$emit('columndragend', { event, column, index });\r\n },\r\n /**\r\n * Emits drop event (column)\r\n */\r\n handleColumnDrop(event, column, index) {\r\n if (!this.canDragColumn)\r\n return;\r\n this.$emit('columndrop', { event, column, index });\r\n },\r\n /**\r\n * Emits drag over event (column)\r\n */\r\n handleColumnDragOver(event, column, index) {\r\n if (!this.canDragColumn)\r\n return;\r\n this.$emit('columndragover', { event, column, index });\r\n },\r\n /**\r\n * Emits drag leave event (column)\r\n */\r\n handleColumnDragLeave(event, column, index) {\r\n if (!this.canDragColumn)\r\n return;\r\n this.$emit('columndragleave', { event, column, index });\r\n },\r\n emitEventForRow(eventName, event, row) {\r\n return this.$attrs[eventName] ? this.$emit(eventName, row, event) : null;\r\n },\r\n processTdAttrs() {\r\n if (this.visibleColumns.length && this.visibleData.length) {\r\n for (let i = 0; i < this.visibleColumns.length; i++) {\r\n const col = this.visibleColumns[i];\r\n if (typeof col.tdAttrs !== 'undefined') {\r\n this.visibleData.forEach((data, index) => {\r\n col.tdAttrsData[index] = col.tdAttrs(data, col);\r\n });\r\n }\r\n }\r\n }\r\n },\r\n _addColumn(column) {\r\n this.defaultSlots.push(column);\r\n const slot = this.$refs['slot'];\r\n if (slot && slot.children) {\r\n this.$nextTick(() => {\r\n const ids = this.defaultSlots.map(it => `[data-id=\"${it.newKey}\"]`).join(',');\r\n const sortedIds = Array.from(slot.querySelectorAll(ids)).map((el) => el.getAttribute('data-id'));\r\n this.defaultSlots = this.defaultSlots.sort((a, b) => sortedIds.indexOf(`${a.newKey}`) - sortedIds.indexOf(`${b.newKey}`));\r\n });\r\n }\r\n },\r\n _removeColumn(column) {\r\n this.defaultSlots = this.defaultSlots.filter(d => d.newKey !== column.newKey);\r\n },\r\n _nextSequence() {\r\n return this.sequence++;\r\n }\r\n }\r\n});\n\nconst _hoisted_1$1 = {\n ref: \"slot\",\n style: {\n \"display\": \"none\"\n }\n};\nconst _hoisted_2 = {\n key: 0\n};\nconst _hoisted_3 = {\n key: 1\n};\nconst _hoisted_4 = {\n key: 1\n};\nconst _hoisted_5 = {\n key: 0\n};\nconst _hoisted_6 = {\n key: 1\n};\nconst _hoisted_7 = {\n key: 2\n};\nconst _hoisted_8 = {\n key: 1\n};\nconst _hoisted_9 = {\n key: 1\n};\nconst _hoisted_10 = {\n key: 2\n};\nconst _hoisted_11 = {\n key: 0\n};\nconst _hoisted_12 = {\n key: 2\n};\nfunction render$2(_ctx, _cache, $props, $setup, $data, $options) {\n const _component_o_table_mobile_sort = resolveComponent(\"o-table-mobile-sort\");\n\n const _component_o_table_pagination = resolveComponent(\"o-table-pagination\");\n\n const _component_o_checkbox = resolveComponent(\"o-checkbox\");\n\n const _component_o_slot_component = resolveComponent(\"o-slot-component\");\n\n const _component_o_icon = resolveComponent(\"o-icon\");\n\n const _component_o_input = resolveComponent(\"o-input\");\n\n const _component_o_loading = resolveComponent(\"o-loading\");\n\n return openBlock(), createBlock(\"div\", {\n class: _ctx.rootClasses\n }, [createVNode(\"div\", _hoisted_1$1, [renderSlot(_ctx.$slots, \"default\")], 512\n /* NEED_PATCH */\n ), _ctx.isMobile && _ctx.hasSortablenewColumns ? createVNode(_component_o_table_mobile_sort, {\n key: 0,\n \"current-sort-column\": _ctx.currentSortColumn,\n columns: _ctx.newColumns,\n placeholder: _ctx.mobileSortPlaceholder,\n \"icon-pack\": _ctx.iconPack,\n \"sort-icon\": _ctx.sortIcon,\n \"sort-icon-size\": _ctx.sortIconSize,\n \"is-asc\": _ctx.isAsc,\n onSort: _cache[1] || (_cache[1] = (column, event) => _ctx.sort(column, null, event))\n }, null, 8\n /* PROPS */\n , [\"current-sort-column\", \"columns\", \"placeholder\", \"icon-pack\", \"sort-icon\", \"sort-icon-size\", \"is-asc\"]) : createCommentVNode(\"v-if\", true), _ctx.paginated && (_ctx.paginationPosition === 'top' || _ctx.paginationPosition === 'both') ? renderSlot(_ctx.$slots, \"pagination\", {\n key: 1\n }, () => [createVNode(_component_o_table_pagination, mergeProps(_ctx.$attrs, {\n \"per-page\": _ctx.perPage,\n paginated: _ctx.paginated,\n total: _ctx.newDataTotal,\n \"current-page\": _ctx.newCurrentPage,\n \"onUpdate:currentPage\": _cache[2] || (_cache[2] = $event => _ctx.newCurrentPage = $event),\n \"root-class\": _ctx.paginationWrapperClasses,\n \"icon-pack\": _ctx.iconPack,\n rounded: _ctx.paginationRounded,\n \"onPage-change\": _cache[3] || (_cache[3] = event => _ctx.$emit('page-change', event)),\n \"aria-next-label\": _ctx.ariaNextLabel,\n \"aria-previous-label\": _ctx.ariaPreviousLabel,\n \"aria-page-label\": _ctx.ariaPageLabel,\n \"aria-current-label\": _ctx.ariaCurrentLabel\n }), {\n default: withCtx(() => [renderSlot(_ctx.$slots, \"top-left\")]),\n _: 3\n }, 16\n /* FULL_PROPS */\n , [\"per-page\", \"paginated\", \"total\", \"current-page\", \"root-class\", \"icon-pack\", \"rounded\", \"aria-next-label\", \"aria-previous-label\", \"aria-page-label\", \"aria-current-label\"])]) : createCommentVNode(\"v-if\", true), createVNode(\"div\", {\n class: _ctx.tableWrapperClasses,\n style: _ctx.tableWrapperStyle\n }, [createVNode(\"table\", {\n class: _ctx.tableClasses,\n tabindex: !_ctx.focusable ? false : 0,\n onKeydown: [_cache[4] || (_cache[4] = withKeys(withModifiers($event => _ctx.pressedArrow(-1), [\"self\", \"prevent\"]), [\"up\"])), _cache[5] || (_cache[5] = withKeys(withModifiers($event => _ctx.pressedArrow(1), [\"self\", \"prevent\"]), [\"down\"]))]\n }, [_ctx.$slots.caption ? (openBlock(), createBlock(\"caption\", _hoisted_2, [renderSlot(_ctx.$slots, \"caption\")])) : createCommentVNode(\"v-if\", true), _ctx.newColumns.length && _ctx.showHeader ? (openBlock(), createBlock(\"thead\", _hoisted_3, [createVNode(\"tr\", null, [_ctx.showDetailRowIcon ? (openBlock(), createBlock(\"th\", {\n key: 0,\n class: _ctx.thDetailedClasses\n }, null, 2\n /* CLASS */\n )) : createCommentVNode(\"v-if\", true), _ctx.checkable && _ctx.checkboxPosition === 'left' ? (openBlock(), createBlock(\"th\", {\n key: 1,\n class: _ctx.thCheckboxClasses\n }, [_ctx.headerCheckable ? createVNode(_component_o_checkbox, {\n key: 0,\n autocomplete: \"off\",\n modelValue: _ctx.isAllChecked,\n disabled: _ctx.isAllUncheckable,\n \"onUpdate:modelValue\": _ctx.checkAll\n }, null, 8\n /* PROPS */\n , [\"modelValue\", \"disabled\", \"onUpdate:modelValue\"]) : createCommentVNode(\"v-if\", true)], 2\n /* CLASS */\n )) : createCommentVNode(\"v-if\", true), (openBlock(true), createBlock(Fragment, null, renderList(_ctx.visibleColumns, (column, index) => {\n return openBlock(), createBlock(\"th\", mergeProps({\n key: column.newKey + ':' + index + 'header'\n }, column.thAttrsData, {\n class: _ctx.thClasses(column),\n style: _ctx.isMobile ? {} : column.style,\n onClick: withModifiers($event => _ctx.sort(column, null, $event), [\"stop\"]),\n draggable: _ctx.canDragColumn,\n onDragstart: $event => _ctx.handleColumnDragStart($event, column, index),\n onDragend: $event => _ctx.handleColumnDragEnd($event, column, index),\n onDrop: $event => _ctx.handleColumnDrop($event, column, index),\n onDragover: $event => _ctx.handleColumnDragOver($event, column, index),\n onDragleave: $event => _ctx.handleColumnDragLeave($event, column, index)\n }), [column.hasHeaderSlot ? createVNode(_component_o_slot_component, {\n key: 0,\n component: column,\n name: \"header\",\n tag: \"span\",\n props: {\n column,\n index\n }\n }, null, 8\n /* PROPS */\n , [\"component\", \"props\"]) : (openBlock(), createBlock(\"span\", _hoisted_4, [createTextVNode(toDisplayString(column.label) + \" \", 1\n /* TEXT */\n ), withDirectives(createVNode(\"span\", {\n class: _ctx.thSortIconClasses()\n }, [createVNode(_component_o_icon, {\n icon: _ctx.sortIcon,\n pack: _ctx.iconPack,\n both: \"\",\n size: _ctx.sortIconSize,\n rotation: !_ctx.isAsc ? 180 : 0\n }, null, 8\n /* PROPS */\n , [\"icon\", \"pack\", \"size\", \"rotation\"])], 2\n /* CLASS */\n ), [[vShow, column.sortable && _ctx.currentSortColumn === column]])]))], 16\n /* FULL_PROPS */\n , [\"onClick\", \"draggable\", \"onDragstart\", \"onDragend\", \"onDrop\", \"onDragover\", \"onDragleave\"]);\n }), 128\n /* KEYED_FRAGMENT */\n )), _ctx.checkable && _ctx.checkboxPosition === 'right' ? (openBlock(), createBlock(\"th\", {\n key: 2,\n class: _ctx.thCheckboxClasses\n }, [_ctx.headerCheckable ? createVNode(_component_o_checkbox, {\n key: 0,\n autocomplete: \"off\",\n modelValue: _ctx.isAllChecked,\n disabled: _ctx.isAllUncheckable,\n \"onUpdate:modelValue\": _ctx.checkAll\n }, null, 8\n /* PROPS */\n , [\"modelValue\", \"disabled\", \"onUpdate:modelValue\"]) : createCommentVNode(\"v-if\", true)], 2\n /* CLASS */\n )) : createCommentVNode(\"v-if\", true)]), _ctx.hasSearchablenewColumns ? (openBlock(), createBlock(\"tr\", _hoisted_5, [_ctx.showDetailRowIcon ? (openBlock(), createBlock(\"th\", {\n key: 0,\n class: _ctx.thDetailedClasses\n }, null, 2\n /* CLASS */\n )) : createCommentVNode(\"v-if\", true), _ctx.checkable && _ctx.checkboxPosition === 'left' ? (openBlock(), createBlock(\"th\", _hoisted_6)) : createCommentVNode(\"v-if\", true), (openBlock(true), createBlock(Fragment, null, renderList(_ctx.visibleColumns, (column, index) => {\n return openBlock(), createBlock(\"th\", mergeProps({\n key: column.newKey + ':' + index + 'searchable'\n }, column.thAttrsData, {\n class: _ctx.thClasses(column),\n style: _ctx.isMobile ? {} : column.style\n }), [column.searchable ? (openBlock(), createBlock(Fragment, {\n key: 0\n }, [column.hasSearchableSlot ? createVNode(_component_o_slot_component, {\n key: 0,\n component: column,\n name: \"searchable\",\n tag: \"span\",\n props: {\n column,\n filters: _ctx.filters\n }\n }, null, 8\n /* PROPS */\n , [\"component\", \"props\"]) : createVNode(_component_o_input, {\n key: 1,\n [\"on\" + capitalize(_ctx.filtersEvent)]: _ctx.onFiltersEvent,\n modelValue: _ctx.filters[column.field],\n \"onUpdate:modelValue\": $event => _ctx.filters[column.field] = $event,\n type: column.numeric ? 'number' : 'text'\n }, null, 16\n /* FULL_PROPS */\n , [\"modelValue\", \"onUpdate:modelValue\", \"type\"])], 64\n /* STABLE_FRAGMENT */\n )) : createCommentVNode(\"v-if\", true)], 16\n /* FULL_PROPS */\n );\n }), 128\n /* KEYED_FRAGMENT */\n )), _ctx.checkable && _ctx.checkboxPosition === 'right' ? (openBlock(), createBlock(\"th\", _hoisted_7)) : createCommentVNode(\"v-if\", true)])) : createCommentVNode(\"v-if\", true), _ctx.hasCustomSubheadings ? (openBlock(), createBlock(\"tr\", _hoisted_8, [_ctx.showDetailRowIcon ? (openBlock(), createBlock(\"th\", {\n key: 0,\n class: _ctx.thDetailedClasses\n }, null, 2\n /* CLASS */\n )) : createCommentVNode(\"v-if\", true), _ctx.checkable && _ctx.checkboxPosition === 'left' ? (openBlock(), createBlock(\"th\", _hoisted_9)) : createCommentVNode(\"v-if\", true), (openBlock(true), createBlock(Fragment, null, renderList(_ctx.visibleColumns, (column, index) => {\n return openBlock(), createBlock(\"th\", {\n key: column.newKey + ':' + index + 'subheading',\n style: _ctx.isMobile ? {} : column.style,\n class: _ctx.thSubheadingClasses\n }, [column.$slots && column.$slots.subheading ? createVNode(_component_o_slot_component, {\n key: 0,\n component: column,\n name: \"subheading\",\n tag: \"span\",\n props: {\n column,\n index\n }\n }, null, 8\n /* PROPS */\n , [\"component\", \"props\"]) : (openBlock(), createBlock(Fragment, {\n key: 1\n }, [createTextVNode(toDisplayString(column.subheading), 1\n /* TEXT */\n )], 64\n /* STABLE_FRAGMENT */\n ))], 6\n /* CLASS, STYLE */\n );\n }), 128\n /* KEYED_FRAGMENT */\n )), _ctx.checkable && _ctx.checkboxPosition === 'right' ? (openBlock(), createBlock(\"th\", _hoisted_10)) : createCommentVNode(\"v-if\", true)])) : createCommentVNode(\"v-if\", true)])) : createCommentVNode(\"v-if\", true), createVNode(\"tbody\", null, [(openBlock(true), createBlock(Fragment, null, renderList(_ctx.visibleData, (row, index) => {\n return openBlock(), createBlock(Fragment, {\n key: this.customRowKey ? row[this.customRowKey] : index\n }, [createVNode(\"tr\", {\n class: _ctx.rowClasses(row, index),\n onClick: $event => _ctx.selectRow(row, index),\n onDblclick: $event => _ctx.$emit('dblclick', row),\n onMouseenter: $event => _ctx.emitEventForRow('mouseenter', $event, row),\n onMouseleave: $event => _ctx.emitEventForRow('mouseleave', $event, row),\n onContextmenu: $event => _ctx.$emit('contextmenu', row, $event),\n draggable: _ctx.canDragRow,\n onDragstart: $event => _ctx.handleDragStart($event, row, index),\n onDragend: $event => _ctx.handleDragEnd($event, row, index),\n onDrop: $event => _ctx.handleDrop($event, row, index),\n onDragover: $event => _ctx.handleDragOver($event, row, index),\n onDragleave: $event => _ctx.handleDragLeave($event, row, index)\n }, [_ctx.showDetailRowIcon ? (openBlock(), createBlock(\"td\", {\n key: 0,\n class: _ctx.tdDetailedChevronClasses\n }, [_ctx.hasDetailedVisible(row) ? createVNode(_component_o_icon, {\n key: 0,\n icon: _ctx.detailIcon,\n pack: _ctx.iconPack,\n rotation: _ctx.isVisibleDetailRow(row) ? 90 : 0,\n role: \"button\",\n onClick: withModifiers($event => _ctx.toggleDetails(row), [\"stop\"]),\n clickable: \"\",\n both: \"\"\n }, null, 8\n /* PROPS */\n , [\"icon\", \"pack\", \"rotation\", \"onClick\"]) : createCommentVNode(\"v-if\", true)], 2\n /* CLASS */\n )) : createCommentVNode(\"v-if\", true), _ctx.checkable && _ctx.checkboxPosition === 'left' ? (openBlock(), createBlock(\"td\", {\n key: 1,\n class: _ctx.tdCheckboxClasses\n }, [createVNode(_component_o_checkbox, {\n autocomplete: \"off\",\n disabled: !_ctx.isRowCheckable(row),\n modelValue: _ctx.isRowChecked(row),\n \"onUpdate:modelValue\": $event => _ctx.checkRow(row, index, $event)\n }, null, 8\n /* PROPS */\n , [\"disabled\", \"modelValue\", \"onUpdate:modelValue\"])], 2\n /* CLASS */\n )) : createCommentVNode(\"v-if\", true), (openBlock(true), createBlock(Fragment, null, renderList(_ctx.visibleColumns, (column, colindex) => {\n return openBlock(), createBlock(_component_o_slot_component, mergeProps({\n key: column.newKey + index + ':' + colindex\n }, column.tdAttrsData[index], {\n component: column,\n name: \"default\",\n tag: \"td\",\n class: _ctx.tdClasses(row, column),\n style: _ctx.isMobile ? {} : column.style,\n \"data-label\": column.label,\n props: {\n row,\n column,\n index,\n colindex,\n toggleDetails: _ctx.toggleDetails\n },\n onClick: $event => _ctx.$emit('cell-click', row, column, index, colindex, $event)\n }), null, 16\n /* FULL_PROPS */\n , [\"component\", \"class\", \"style\", \"data-label\", \"props\", \"onClick\"]);\n }), 128\n /* KEYED_FRAGMENT */\n )), _ctx.checkable && _ctx.checkboxPosition === 'right' ? (openBlock(), createBlock(\"td\", {\n key: 2,\n class: _ctx.tdCheckboxClasses\n }, [createVNode(_component_o_checkbox, {\n autocomplete: \"off\",\n disabled: !_ctx.isRowCheckable(row),\n modelValue: _ctx.isRowChecked(row),\n \"onUpdate:modelValue\": $event => _ctx.checkRow(row, index, $event)\n }, null, 8\n /* PROPS */\n , [\"disabled\", \"modelValue\", \"onUpdate:modelValue\"])], 2\n /* CLASS */\n )) : createCommentVNode(\"v-if\", true)], 42\n /* CLASS, PROPS, HYDRATE_EVENTS */\n , [\"onClick\", \"onDblclick\", \"onMouseenter\", \"onMouseleave\", \"onContextmenu\", \"draggable\", \"onDragstart\", \"onDragend\", \"onDrop\", \"onDragover\", \"onDragleave\"]), createVNode(Transition, {\n name: _ctx.detailTransition\n }, {\n default: withCtx(() => [_ctx.isActiveDetailRow(row) ? (openBlock(), createBlock(\"tr\", {\n key: (_ctx.customRowKey ? row[_ctx.customRowKey] : index) + 'detail',\n class: _ctx.detailedClasses\n }, [createVNode(\"td\", {\n colspan: _ctx.columnCount\n }, [renderSlot(_ctx.$slots, \"detail\", {\n row: row,\n index: index\n })], 8\n /* PROPS */\n , [\"colspan\"])], 2\n /* CLASS */\n )) : createCommentVNode(\"v-if\", true)]),\n _: 2\n }, 1032\n /* PROPS, DYNAMIC_SLOTS */\n , [\"name\"]), _ctx.isActiveCustomDetailRow(row) ? renderSlot(_ctx.$slots, \"detail\", {\n key: 0,\n row: row,\n index: index\n }) : createCommentVNode(\"v-if\", true)], 64\n /* STABLE_FRAGMENT */\n );\n }), 128\n /* KEYED_FRAGMENT */\n )), !_ctx.visibleData.length ? (openBlock(), createBlock(\"tr\", _hoisted_11, [createVNode(\"td\", {\n colspan: _ctx.columnCount\n }, [renderSlot(_ctx.$slots, \"empty\")], 8\n /* PROPS */\n , [\"colspan\"])])) : createCommentVNode(\"v-if\", true)]), _ctx.$slots.footer ? (openBlock(), createBlock(\"tfoot\", _hoisted_12, [createVNode(\"tr\", {\n class: _ctx.footerClasses\n }, [_ctx.hasCustomFooterSlot() ? renderSlot(_ctx.$slots, \"footer\", {\n key: 0\n }) : (openBlock(), createBlock(\"th\", {\n key: 1,\n colspan: _ctx.columnCount\n }, [renderSlot(_ctx.$slots, \"footer\")], 8\n /* PROPS */\n , [\"colspan\"]))], 2\n /* CLASS */\n )])) : createCommentVNode(\"v-if\", true)], 42\n /* CLASS, PROPS, HYDRATE_EVENTS */\n , [\"tabindex\"]), renderSlot(_ctx.$slots, \"loading\", {}, () => [createVNode(_component_o_loading, {\n \"full-page\": false,\n active: _ctx.loading\n }, null, 8\n /* PROPS */\n , [\"active\"])])], 6\n /* CLASS, STYLE */\n ), _ctx.checkable && _ctx.$slots['bottom-left'] || _ctx.paginated && (_ctx.paginationPosition === 'bottom' || _ctx.paginationPosition === 'both') ? renderSlot(_ctx.$slots, \"pagination\", {\n key: 2\n }, () => [createVNode(_component_o_table_pagination, mergeProps(_ctx.$attrs, {\n \"per-page\": _ctx.perPage,\n paginated: _ctx.paginated,\n total: _ctx.newDataTotal,\n \"current-page\": _ctx.newCurrentPage,\n \"onUpdate:currentPage\": _cache[6] || (_cache[6] = $event => _ctx.newCurrentPage = $event),\n \"root-class\": _ctx.paginationWrapperClasses,\n \"icon-pack\": _ctx.iconPack,\n rounded: _ctx.paginationRounded,\n \"onPage-change\": _cache[7] || (_cache[7] = event => _ctx.$emit('page-change', event)),\n \"aria-next-label\": _ctx.ariaNextLabel,\n \"aria-previous-label\": _ctx.ariaPreviousLabel,\n \"aria-page-label\": _ctx.ariaPageLabel,\n \"aria-current-label\": _ctx.ariaCurrentLabel\n }), {\n default: withCtx(() => [renderSlot(_ctx.$slots, \"bottom-left\")]),\n _: 3\n }, 16\n /* FULL_PROPS */\n , [\"per-page\", \"paginated\", \"total\", \"current-page\", \"root-class\", \"icon-pack\", \"rounded\", \"aria-next-label\", \"aria-previous-label\", \"aria-page-label\", \"aria-current-label\"])]) : createCommentVNode(\"v-if\", true)], 2\n /* CLASS */\n );\n}\n\nscript$3.render = render$2;\nscript$3.__file = \"src/components/table/Table.vue\";\n\nvar index = {\r\n install(app) {\r\n registerComponent(app, script$3);\r\n registerComponent(app, script$1);\r\n }\r\n};\n\nexport default index;\nexport { script$3 as OTable, script$1 as OTableColumn };\n","import { defineComponent, resolveComponent, openBlock, createBlock, createVNode, renderSlot, Fragment, renderList, withDirectives, withKeys, withModifiers, resolveDynamicComponent, withCtx, createCommentVNode, toDisplayString, vShow } from 'vue';\nimport { getValueByPath } from './helpers.mjs';\nimport { getOptions } from './config.mjs';\nimport { B as BaseComponentMixin, b as registerComponent } from './plugins-ba5e2464.mjs';\nimport './Icon-a7b85e86.mjs';\nimport './InjectedChildMixin-5282461d.mjs';\nimport './SlotComponent-11a269f3.mjs';\nimport { T as TabbedMixin, a as TabbedChildMixin } from './TabbedChildMixin-8b374962.mjs';\n\n/**\r\n * Responsive horizontal navigation tabs, switch between contents with ease\r\n * @displayName Tabs\r\n * @requires ./TabItem.vue\r\n * @style _tabs.scss\r\n */\r\nvar script = defineComponent({\r\n name: 'OTabs',\r\n mixins: [BaseComponentMixin, TabbedMixin('tab')],\r\n configField: 'tabs',\r\n props: {\r\n /**\r\n * Tab type\r\n * @values boxed, toggle\r\n */\r\n type: {\r\n type: String,\r\n default: 'default'\r\n },\r\n /**\r\n * Tabs will be expanded (full-width)\r\n */\r\n expanded: Boolean,\r\n /** Tab will have an animation */\r\n animated: {\r\n type: Boolean,\r\n default: () => {\r\n return getValueByPath(getOptions(), 'tabs.animated', true);\r\n }\r\n },\r\n /** Show tab items multiline when there is no space */\r\n multiline: Boolean,\r\n rootClass: [String, Function, Array],\r\n positionClass: [String, Function, Array],\r\n expandedClass: [String, Function, Array],\r\n verticalClass: [String, Function, Array],\r\n multilineClass: [String, Function, Array],\r\n navTabsClass: [String, Function, Array],\r\n navSizeClass: [String, Function, Array],\r\n navPositionClass: [String, Function, Array],\r\n navTypeClass: [String, Function, Array],\r\n contentClass: [String, Function, Array],\r\n transitioningClass: [String, Function, Array],\r\n tabItemWrapperClass: [String, Function, Array],\r\n },\r\n computed: {\r\n rootClasses() {\r\n return [\r\n this.computedClass('rootClass', 'o-tabs'),\r\n { [this.computedClass('positionClass', 'o-tabs--', this.position)]: this.position && this.vertical },\r\n { [this.computedClass('expandedClass', 'o-tabs--fullwidth')]: this.expanded },\r\n { [this.computedClass('verticalClass', 'o-tabs--vertical')]: this.vertical },\r\n { [this.computedClass('multilineClass', 'o-tabs--multiline')]: this.multiline }\r\n ];\r\n },\r\n itemWrapperClasses() {\r\n return [\r\n this.computedClass('tabItemWrapperClass', 'o-tabs__nav-item-wrapper'),\r\n ];\r\n },\r\n navClasses() {\r\n return [\r\n this.computedClass('navTabsClass', 'o-tabs__nav'),\r\n { [this.computedClass('navSizeClass', 'o-tabs__nav--', this.size)]: this.size },\r\n { [this.computedClass('navPositionClass', 'o-tabs__nav--', this.position)]: this.position && !this.vertical },\r\n { [this.computedClass('navTypeClass', 'o-tabs__nav--', this.type)]: this.type }\r\n ];\r\n },\r\n contentClasses() {\r\n return [\r\n this.computedClass('contentClass', 'o-tabs__content'),\r\n { [this.computedClass('transitioningClass', 'o-tabs__content--transitioning')]: this.isTransitioning }\r\n ];\r\n }\r\n }\r\n});\n\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n const _component_o_slot_component = resolveComponent(\"o-slot-component\");\n\n const _component_o_icon = resolveComponent(\"o-icon\");\n\n return openBlock(), createBlock(\"div\", {\n class: _ctx.rootClasses\n }, [createVNode(\"nav\", {\n class: _ctx.navClasses,\n role: \"tablist\",\n \"aria-orientation\": _ctx.vertical ? 'vertical' : 'horizontal'\n }, [renderSlot(_ctx.$slots, \"start\"), (openBlock(true), createBlock(Fragment, null, renderList(_ctx.items, childItem => {\n return withDirectives((openBlock(), createBlock(\"div\", {\n key: childItem.newValue,\n onKeydown: [_cache[1] || (_cache[1] = withKeys(withModifiers((...args) => _ctx.prev(...args), [\"prevent\"]), [\"left\"])), _cache[2] || (_cache[2] = withKeys(withModifiers((...args) => _ctx.next(...args), [\"prevent\"]), [\"right\"])), _cache[3] || (_cache[3] = withKeys(withModifiers((...args) => _ctx.prev(...args), [\"prevent\"]), [\"up\"])), _cache[4] || (_cache[4] = withKeys(withModifiers((...args) => _ctx.next(...args), [\"prevent\"]), [\"down\"])), _cache[5] || (_cache[5] = withKeys(withModifiers((...args) => _ctx.homePressed(...args), [\"prevent\"]), [\"home\"])), _cache[6] || (_cache[6] = withKeys(withModifiers((...args) => _ctx.endPressed(...args), [\"prevent\"]), [\"end\"]))],\n class: _ctx.itemWrapperClasses,\n role: \"tab\",\n \"aria-controls\": `${childItem.value}-content`,\n \"aria-selected\": `${childItem.isActive}`\n }, [childItem.$slots.header ? createVNode(_component_o_slot_component, {\n key: 0,\n component: childItem,\n tag: childItem.tag,\n name: \"header\",\n onClick: $event => _ctx.childClick(childItem),\n onKeydown: [withKeys(withModifiers(_ctx.prev, [\"prevent\"]), [\"left\"]), withKeys(withModifiers(_ctx.next, [\"prevent\"]), [\"right\"]), withKeys(withModifiers(_ctx.prev, [\"prevent\"]), [\"up\"]), withKeys(withModifiers(_ctx.next, [\"prevent\"]), [\"down\"]), withKeys(withModifiers(_ctx.homePressed, [\"prevent\"]), [\"home\"]), withKeys(withModifiers(_ctx.endPressed, [\"prevent\"]), [\"end\"])],\n class: childItem.headerClasses\n }, null, 8\n /* PROPS */\n , [\"component\", \"tag\", \"onClick\", \"onKeydown\", \"class\"]) : (openBlock(), createBlock(resolveDynamicComponent(childItem.tag), {\n key: 1,\n onClick: $event => _ctx.childClick(childItem),\n class: childItem.headerClasses\n }, {\n default: withCtx(() => [childItem.icon ? createVNode(_component_o_icon, {\n key: 0,\n rootClass: childItem.headerIconClasses,\n icon: childItem.icon,\n pack: childItem.iconPack,\n size: _ctx.size\n }, null, 8\n /* PROPS */\n , [\"rootClass\", \"icon\", \"pack\", \"size\"]) : createCommentVNode(\"v-if\", true), createVNode(\"span\", {\n class: childItem.headerTextClasses\n }, toDisplayString(childItem.label), 3\n /* TEXT, CLASS */\n )]),\n _: 2\n }, 1032\n /* PROPS, DYNAMIC_SLOTS */\n , [\"onClick\", \"class\"]))], 42\n /* CLASS, PROPS, HYDRATE_EVENTS */\n , [\"aria-controls\", \"aria-selected\"])), [[vShow, childItem.visible]]);\n }), 128\n /* KEYED_FRAGMENT */\n )), renderSlot(_ctx.$slots, \"end\")], 10\n /* CLASS, PROPS */\n , [\"aria-orientation\"]), createVNode(\"section\", {\n class: _ctx.contentClasses\n }, [renderSlot(_ctx.$slots, \"default\")], 2\n /* CLASS */\n )], 2\n /* CLASS */\n );\n}\n\nscript.render = render;\nscript.__file = \"src/components/tabs/Tabs.vue\";\n\n/**\r\n * @displayName Tab Item\r\n */\r\nvar script$1 = defineComponent({\r\n name: 'OTabItem',\r\n mixins: [BaseComponentMixin, TabbedChildMixin('tab')],\r\n configField: 'tabs',\r\n props: {\r\n /** Item will be disabled */\r\n disabled: Boolean,\r\n /**\r\n * Tabs item tag name\r\n */\r\n tag: {\r\n type: String,\r\n default: () => {\r\n return getValueByPath(getOptions(), 'tabs.itemTag', 'button');\r\n }\r\n },\r\n itemClass: [String, Function, Array],\r\n itemHeaderClass: [String, Function, Array],\r\n itemHeaderActiveClass: [String, Function, Array],\r\n itemHeaderDisabledClass: [String, Function, Array],\r\n itemHeaderTypeClass: [String, Function, Array],\r\n itemHeaderIconClass: [String, Function, Array],\r\n itemHeaderTextClass: [String, Function, Array]\r\n },\r\n computed: {\r\n elementClasses() {\r\n return [\r\n this.computedClass('itemClass', 'o-tab-item__content')\r\n ];\r\n },\r\n headerClasses() {\r\n return [\r\n this.computedClass('itemHeaderClass', 'o-tabs__nav-item'),\r\n { [this.computedClass('itemHeaderActiveClass', 'o-tabs__nav-item-{*}--active', this.parent.type)]: this.isActive },\r\n { [this.computedClass('itemHeaderDisabledClass', 'o-tabs__nav-item-{*}--disabled', this.parent.type)]: this.disabled },\r\n { [this.computedClass('itemHeaderTypeClass', 'o-tabs__nav-item-', this.parent.type)]: this.parent.type },\r\n ];\r\n },\r\n headerIconClasses() {\r\n return [\r\n this.computedClass('itemHeaderIconClass', 'o-tabs__nav-item-icon')\r\n ];\r\n },\r\n headerTextClasses() {\r\n return [\r\n this.computedClass('itemHeaderTextClass', 'o-tabs__nav-item-text')\r\n ];\r\n }\r\n }\r\n});\n\nscript$1.__file = \"src/components/tabs/TabItem.vue\";\n\nvar index = {\r\n install(app) {\r\n registerComponent(app, script);\r\n registerComponent(app, script$1);\r\n }\r\n};\n\nexport default index;\nexport { script$1 as OTabItem, script as OTabs };\n","import 'vue';\nimport './helpers.mjs';\nimport './config.mjs';\nimport { b as registerComponent } from './plugins-ba5e2464.mjs';\nimport './Icon-a7b85e86.mjs';\nimport './FormElementMixin-29581863.mjs';\nimport './Input-19e906a1.mjs';\nimport './MatchMediaMixin-09b141ca.mjs';\nimport './trapFocus-dc03669f.mjs';\nimport './DropdownItem-c744c4e9.mjs';\nimport './Select-2cca695f.mjs';\nimport { s as script } from './Timepicker-c2f10909.mjs';\nexport { s as OTimepicker } from './Timepicker-c2f10909.mjs';\n\nvar index = {\r\n install(app) {\r\n registerComponent(app, script);\r\n }\r\n};\n\nexport default index;\n","import 'vue';\nimport './helpers.mjs';\nimport './config.mjs';\nimport { b as registerComponent } from './plugins-ba5e2464.mjs';\nimport { s as script } from './Tooltip-7e114fbb.mjs';\nexport { s as OTooltip } from './Tooltip-7e114fbb.mjs';\n\nvar index = {\r\n install(app) {\r\n registerComponent(app, script);\r\n }\r\n};\n\nexport default index;\n","import { defineComponent, openBlock, createBlock, renderSlot, withModifiers, createVNode, mergeProps } from 'vue';\nimport './helpers.mjs';\nimport './config.mjs';\nimport { B as BaseComponentMixin, b as registerComponent } from './plugins-ba5e2464.mjs';\nimport { F as FormElementMixin } from './FormElementMixin-29581863.mjs';\nimport { F as File } from './ssr-85c76d50.mjs';\n\n/**\r\n * Upload one or more files\r\n * @displayName Upload\r\n * @style _upload.scss\r\n */\r\nvar script = defineComponent({\r\n name: 'OUpload',\r\n mixins: [BaseComponentMixin, FormElementMixin],\r\n configField: 'upload',\r\n inheritAttrs: false,\r\n emits: ['update:modelValue'],\r\n props: {\r\n /** @model */\r\n modelValue: [Object, File, Array],\r\n /** Same as native, also push new item to v-model instead of replacing */\r\n multiple: Boolean,\r\n /** Same as native disabled */\r\n disabled: Boolean,\r\n /** Same as native accept */\r\n accept: String,\r\n /** Accepts drag & drop and change its style */\r\n dragDrop: Boolean,\r\n /**\r\n * Color of the control, optional\r\n * @values primary, info, success, warning, danger, and any other custom color\r\n */\r\n variant: {\r\n type: String\r\n },\r\n /** Replace last chosen files every time (like native file input element) */\r\n native: {\r\n type: Boolean,\r\n default: false\r\n },\r\n /** Upload will be expanded (full-width) */\r\n expanded: {\r\n type: Boolean,\r\n default: false\r\n },\r\n rootClass: [String, Function, Array],\r\n draggableClass: [String, Function, Array],\r\n variantClass: [String, Function, Array],\r\n expandedClass: [String, Function, Array],\r\n disabledClass: [String, Function, Array],\r\n hoveredClass: [String, Function, Array]\r\n },\r\n data() {\r\n return {\r\n newValue: this.modelValue,\r\n dragDropFocus: false\r\n };\r\n },\r\n computed: {\r\n rootClasses() {\r\n return [\r\n this.computedClass('rootClass', 'o-upl'),\r\n { [this.computedClass('expandedClass', 'o-upl--expanded')]: this.expanded },\r\n { [this.computedClass('disabledClass', 'o-upl--disabled')]: this.disabled }\r\n ];\r\n },\r\n draggableClasses() {\r\n return [\r\n this.computedClass('draggableClass', 'o-upl__draggable'),\r\n { [this.computedClass('hoveredClass', 'o-upl__draggable--hovered')]: !this.variant && this.dragDropFocus },\r\n { [this.computedClass('variantClass', 'o-upl__draggable--hovered-', this.variant)]: this.variant && this.dragDropFocus },\r\n ];\r\n },\r\n $elementRef() {\r\n return 'input';\r\n }\r\n },\r\n watch: {\r\n /**\r\n * When v-model is changed:\r\n * 1. Set internal value.\r\n * 2. Reset interna input file value\r\n * 3. If it's invalid, validate again.\r\n */\r\n modelValue(value) {\r\n this.newValue = value;\r\n if (!value || (Array.isArray(value) && value.length === 0)) {\r\n this.$refs.input.value = null;\r\n }\r\n !this.isValid && !this.dragDrop && this.checkHtml5Validity();\r\n },\r\n },\r\n methods: {\r\n /**\r\n * Listen change event on input type 'file',\r\n * emit 'input' event and validate\r\n */\r\n onFileChange(event) {\r\n if (this.disabled)\r\n return;\r\n if (this.dragDrop)\r\n this.updateDragDropFocus(false);\r\n const value = event.target.files || event.dataTransfer.files;\r\n if (value.length === 0) {\r\n if (!this.newValue)\r\n return;\r\n if (this.native)\r\n this.newValue = null;\r\n }\r\n else if (!this.multiple) {\r\n // only one element in case drag drop mode and isn't multiple\r\n if (this.dragDrop && value.length !== 1)\r\n return;\r\n else {\r\n const file = value[0];\r\n if (this.checkType(file))\r\n this.newValue = file;\r\n else if (this.newValue) {\r\n this.newValue = null;\r\n this.clearInput();\r\n }\r\n else {\r\n // Force input back to empty state and recheck validity\r\n this.clearInput();\r\n this.checkHtml5Validity();\r\n return;\r\n }\r\n }\r\n }\r\n else {\r\n // always new values if native or undefined local\r\n let newValues = false;\r\n if (this.native || !this.newValue) {\r\n this.newValue = [];\r\n newValues = true;\r\n }\r\n for (let i = 0; i < value.length; i++) {\r\n const file = value[i];\r\n if (this.checkType(file)) {\r\n this.newValue.push(file);\r\n newValues = true;\r\n }\r\n }\r\n if (!newValues)\r\n return;\r\n }\r\n this.$emit('update:modelValue', this.newValue);\r\n !this.dragDrop && this.checkHtml5Validity();\r\n },\r\n /*\r\n * Reset file input value\r\n */\r\n clearInput() {\r\n this.$refs.input.value = null;\r\n },\r\n /**\r\n * Listen drag-drop to update internal variable\r\n */\r\n updateDragDropFocus(focus) {\r\n if (!this.disabled) {\r\n this.dragDropFocus = focus;\r\n }\r\n },\r\n /**\r\n * Check mime type of file\r\n */\r\n checkType(file) {\r\n if (!this.accept)\r\n return true;\r\n const types = this.accept.split(',');\r\n if (types.length === 0)\r\n return true;\r\n for (let i = 0; i < types.length; i++) {\r\n const type = types[i].trim();\r\n if (type) {\r\n if (type.substring(0, 1) === '.') {\r\n const extension = file.name.toLowerCase().slice(-type.length);\r\n if (extension === type.toLowerCase()) {\r\n return true;\r\n }\r\n }\r\n else {\r\n // check mime type\r\n if (file.type.match(type))\r\n return true;\r\n }\r\n }\r\n }\r\n return false;\r\n }\r\n }\r\n});\n\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n return openBlock(), createBlock(\"label\", {\n class: _ctx.rootClasses\n }, [!_ctx.dragDrop ? renderSlot(_ctx.$slots, \"default\", {\n key: 0\n }) : (openBlock(), createBlock(\"div\", {\n key: 1,\n class: _ctx.draggableClasses,\n onMouseenter: _cache[1] || (_cache[1] = $event => _ctx.updateDragDropFocus(true)),\n onMouseleave: _cache[2] || (_cache[2] = $event => _ctx.updateDragDropFocus(false)),\n onDragover: _cache[3] || (_cache[3] = withModifiers($event => _ctx.updateDragDropFocus(true), [\"prevent\"])),\n onDragleave: _cache[4] || (_cache[4] = withModifiers($event => _ctx.updateDragDropFocus(false), [\"prevent\"])),\n onDragenter: _cache[5] || (_cache[5] = withModifiers($event => _ctx.updateDragDropFocus(true), [\"prevent\"])),\n onDrop: _cache[6] || (_cache[6] = withModifiers((...args) => _ctx.onFileChange(...args), [\"prevent\"]))\n }, [renderSlot(_ctx.$slots, \"default\")], 34\n /* CLASS, HYDRATE_EVENTS */\n )), createVNode(\"input\", mergeProps({\n ref: \"input\",\n type: \"file\"\n }, _ctx.$attrs, {\n multiple: _ctx.multiple,\n accept: _ctx.accept,\n disabled: _ctx.disabled,\n onChange: _cache[7] || (_cache[7] = (...args) => _ctx.onFileChange(...args))\n }), null, 16\n /* FULL_PROPS */\n , [\"multiple\", \"accept\", \"disabled\"])], 2\n /* CLASS */\n );\n}\n\nscript.render = render;\nscript.__file = \"src/components/upload/Upload.vue\";\n\nvar index = {\r\n install(app) {\r\n registerComponent(app, script);\r\n }\r\n};\n\nexport default index;\nexport { script as OUpload };\n","import 'vue';\nimport { merge } from './helpers.mjs';\nimport { setVueInstance, setOptions, Programmatic, getOptions } from './config.mjs';\nexport { Plugin as Config, Programmatic as ConfigProgrammatic } from './config.mjs';\nimport { r as registerPlugin, a as registerComponentProgrammatic } from './plugins-ba5e2464.mjs';\nexport { u as useProgrammatic } from './plugins-ba5e2464.mjs';\nexport { s as OIcon } from './Icon-a7b85e86.mjs';\nimport './FormElementMixin-29581863.mjs';\nexport { s as OInput } from './Input-19e906a1.mjs';\nexport { s as OAutocomplete } from './Autocomplete-a23ad844.mjs';\nimport index from './autocomplete.mjs';\nexport { default as Autocomplete } from './autocomplete.mjs';\nexport { s as OButton } from './Button-c75f7992.mjs';\nimport index$1 from './button.mjs';\nexport { default as Button } from './button.mjs';\nimport './InjectedChildMixin-5282461d.mjs';\nimport index$2 from './carousel.mjs';\nexport { default as Carousel, OCarousel, OCarouselItem } from './carousel.mjs';\nimport './CheckRadioMixin-f5b57344.mjs';\nexport { s as OCheckbox } from './Checkbox-8670724c.mjs';\nimport index$3 from './checkbox.mjs';\nexport { default as Checkbox } from './checkbox.mjs';\nimport index$4 from './collapse.mjs';\nexport { default as Collapse, OCollapse } from './collapse.mjs';\nimport './MatchMediaMixin-09b141ca.mjs';\nimport './trapFocus-dc03669f.mjs';\nexport { s as ODropdown, a as ODropdownItem } from './DropdownItem-c744c4e9.mjs';\nexport { s as OField } from './Field-937b4591.mjs';\nexport { s as OSelect } from './Select-2cca695f.mjs';\nexport { s as ODatepicker } from './Datepicker-42aca091.mjs';\nimport index$5 from './datepicker.mjs';\nexport { default as Datepicker } from './datepicker.mjs';\nexport { s as OTimepicker } from './Timepicker-c2f10909.mjs';\nimport index$6 from './datetimepicker.mjs';\nexport { default as Datetimepicker, ODatetimepicker } from './datetimepicker.mjs';\nimport index$7 from './dropdown.mjs';\nexport { default as Dropdown } from './dropdown.mjs';\nimport index$8 from './field.mjs';\nexport { default as Field } from './field.mjs';\nimport index$9 from './icon.mjs';\nexport { default as Icon } from './icon.mjs';\nimport index$a from './input.mjs';\nexport { default as Input } from './input.mjs';\nimport index$b from './inputitems.mjs';\nexport { default as Inputitems, OInputitems } from './inputitems.mjs';\nimport './ssr-85c76d50.mjs';\nexport { s as OLoading } from './Loading-20d29914.mjs';\nimport './InstanceRegistry-2fdb6ee8.mjs';\nimport index$c from './loading.mjs';\nexport { default as Loading, LoadingProgrammatic } from './loading.mjs';\nimport index$d from './menu.mjs';\nexport { default as Menu, OMenu, OMenuItem, OMenuList } from './menu.mjs';\nimport index$e from './modal.mjs';\nexport { default as Modal, ModalProgrammatic, OModal } from './modal.mjs';\nimport index$f from './notification.mjs';\nexport { default as Notification, NotificationProgrammatic, ONotification } from './notification.mjs';\nexport { s as OPagination, a as OPaginationButton } from './Pagination-02a660a8.mjs';\nimport index$g from './pagination.mjs';\nexport { default as Pagination } from './pagination.mjs';\nimport index$h from './radio.mjs';\nexport { ORadio, default as Radio } from './radio.mjs';\nimport index$i from './select.mjs';\nexport { default as Select } from './select.mjs';\nimport index$j from './skeleton.mjs';\nexport { OSkeleton, default as Skeleton } from './skeleton.mjs';\nimport index$k from './sidebar.mjs';\nexport { OSidebar, default as Sidebar } from './sidebar.mjs';\nexport { s as OTooltip } from './Tooltip-7e114fbb.mjs';\nimport index$l from './slider.mjs';\nexport { OSlider, OSliderTick, default as Slider } from './slider.mjs';\nimport './SlotComponent-11a269f3.mjs';\nimport './TabbedChildMixin-8b374962.mjs';\nimport index$m from './steps.mjs';\nexport { OStepItem, OSteps, default as Steps } from './steps.mjs';\nimport index$n from './switch.mjs';\nexport { OSwitch, default as Switch } from './switch.mjs';\nimport index$o from './table.mjs';\nexport { OTable, OTableColumn, default as Table } from './table.mjs';\nimport index$p from './tabs.mjs';\nexport { OTabItem, OTabs, default as Tabs } from './tabs.mjs';\nimport index$q from './timepicker.mjs';\nexport { default as Timepicker } from './timepicker.mjs';\nimport index$r from './tooltip.mjs';\nexport { default as Tooltip } from './tooltip.mjs';\nimport index$s from './upload.mjs';\nexport { OUpload, default as Upload } from './upload.mjs';\n\nvar plugins = /*#__PURE__*/Object.freeze({\n __proto__: null,\n Autocomplete: index,\n Button: index$1,\n Carousel: index$2,\n Checkbox: index$3,\n Collapse: index$4,\n Datepicker: index$5,\n Datetimepicker: index$6,\n Dropdown: index$7,\n Field: index$8,\n Icon: index$9,\n Input: index$a,\n Inputitems: index$b,\n Loading: index$c,\n Menu: index$d,\n Modal: index$e,\n Notification: index$f,\n Pagination: index$g,\n Radio: index$h,\n Select: index$i,\n Skeleton: index$j,\n Sidebar: index$k,\n Slider: index$l,\n Steps: index$m,\n Switch: index$n,\n Table: index$o,\n Tabs: index$p,\n Timepicker: index$q,\n Tooltip: index$r,\n Upload: index$s\n});\n\nconst Oruga = {\r\n install(app, options = {}) {\r\n setVueInstance(app);\r\n // Options\r\n const defaultConfig = getOptions();\r\n setOptions(merge(defaultConfig, options, true));\r\n // Components\r\n for (const componentKey in plugins) {\r\n registerPlugin(app, plugins[componentKey]);\r\n }\r\n // Config component\r\n registerComponentProgrammatic(app, 'config', Programmatic);\r\n }\r\n};\n\nexport default Oruga;\n","/*! @license DOMPurify 2.4.3 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/2.4.3/LICENSE */\n\nfunction _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) {\n return typeof obj;\n } : function (obj) {\n return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n }, _typeof(obj);\n}\n\nfunction _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}\n\nfunction _isNativeReflectConstruct() {\n if (typeof Reflect === \"undefined\" || !Reflect.construct) return false;\n if (Reflect.construct.sham) return false;\n if (typeof Proxy === \"function\") return true;\n\n try {\n Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));\n return true;\n } catch (e) {\n return false;\n }\n}\n\nfunction _construct(Parent, args, Class) {\n if (_isNativeReflectConstruct()) {\n _construct = Reflect.construct;\n } else {\n _construct = function _construct(Parent, args, Class) {\n var a = [null];\n a.push.apply(a, args);\n var Constructor = Function.bind.apply(Parent, a);\n var instance = new Constructor();\n if (Class) _setPrototypeOf(instance, Class.prototype);\n return instance;\n };\n }\n\n return _construct.apply(null, arguments);\n}\n\nfunction _toConsumableArray(arr) {\n return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();\n}\n\nfunction _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return _arrayLikeToArray(arr);\n}\n\nfunction _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter);\n}\n\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);\n}\n\nfunction _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];\n\n return arr2;\n}\n\nfunction _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nvar hasOwnProperty = Object.hasOwnProperty,\n setPrototypeOf = Object.setPrototypeOf,\n isFrozen = Object.isFrozen,\n getPrototypeOf = Object.getPrototypeOf,\n getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\nvar freeze = Object.freeze,\n seal = Object.seal,\n create = Object.create; // eslint-disable-line import/no-mutable-exports\n\nvar _ref = typeof Reflect !== 'undefined' && Reflect,\n apply = _ref.apply,\n construct = _ref.construct;\n\nif (!apply) {\n apply = function apply(fun, thisValue, args) {\n return fun.apply(thisValue, args);\n };\n}\n\nif (!freeze) {\n freeze = function freeze(x) {\n return x;\n };\n}\n\nif (!seal) {\n seal = function seal(x) {\n return x;\n };\n}\n\nif (!construct) {\n construct = function construct(Func, args) {\n return _construct(Func, _toConsumableArray(args));\n };\n}\n\nvar arrayForEach = unapply(Array.prototype.forEach);\nvar arrayPop = unapply(Array.prototype.pop);\nvar arrayPush = unapply(Array.prototype.push);\nvar stringToLowerCase = unapply(String.prototype.toLowerCase);\nvar stringToString = unapply(String.prototype.toString);\nvar stringMatch = unapply(String.prototype.match);\nvar stringReplace = unapply(String.prototype.replace);\nvar stringIndexOf = unapply(String.prototype.indexOf);\nvar stringTrim = unapply(String.prototype.trim);\nvar regExpTest = unapply(RegExp.prototype.test);\nvar typeErrorCreate = unconstruct(TypeError);\nfunction unapply(func) {\n return function (thisArg) {\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n return apply(func, thisArg, args);\n };\n}\nfunction unconstruct(func) {\n return function () {\n for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args[_key2] = arguments[_key2];\n }\n\n return construct(func, args);\n };\n}\n/* Add properties to a lookup table */\n\nfunction addToSet(set, array, transformCaseFunc) {\n transformCaseFunc = transformCaseFunc ? transformCaseFunc : stringToLowerCase;\n\n if (setPrototypeOf) {\n // Make 'in' and truthy checks like Boolean(set.constructor)\n // independent of any properties defined on Object.prototype.\n // Prevent prototype setters from intercepting set as a this value.\n setPrototypeOf(set, null);\n }\n\n var l = array.length;\n\n while (l--) {\n var element = array[l];\n\n if (typeof element === 'string') {\n var lcElement = transformCaseFunc(element);\n\n if (lcElement !== element) {\n // Config presets (e.g. tags.js, attrs.js) are immutable.\n if (!isFrozen(array)) {\n array[l] = lcElement;\n }\n\n element = lcElement;\n }\n }\n\n set[element] = true;\n }\n\n return set;\n}\n/* Shallow clone an object */\n\nfunction clone(object) {\n var newObject = create(null);\n var property;\n\n for (property in object) {\n if (apply(hasOwnProperty, object, [property]) === true) {\n newObject[property] = object[property];\n }\n }\n\n return newObject;\n}\n/* IE10 doesn't support __lookupGetter__ so lets'\n * simulate it. It also automatically checks\n * if the prop is function or getter and behaves\n * accordingly. */\n\nfunction lookupGetter(object, prop) {\n while (object !== null) {\n var desc = getOwnPropertyDescriptor(object, prop);\n\n if (desc) {\n if (desc.get) {\n return unapply(desc.get);\n }\n\n if (typeof desc.value === 'function') {\n return unapply(desc.value);\n }\n }\n\n object = getPrototypeOf(object);\n }\n\n function fallbackValue(element) {\n console.warn('fallback value for', element);\n return null;\n }\n\n return fallbackValue;\n}\n\nvar html$1 = freeze(['a', 'abbr', 'acronym', 'address', 'area', 'article', 'aside', 'audio', 'b', 'bdi', 'bdo', 'big', 'blink', 'blockquote', 'body', 'br', 'button', 'canvas', 'caption', 'center', 'cite', 'code', 'col', 'colgroup', 'content', 'data', 'datalist', 'dd', 'decorator', 'del', 'details', 'dfn', 'dialog', 'dir', 'div', 'dl', 'dt', 'element', 'em', 'fieldset', 'figcaption', 'figure', 'font', 'footer', 'form', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'header', 'hgroup', 'hr', 'html', 'i', 'img', 'input', 'ins', 'kbd', 'label', 'legend', 'li', 'main', 'map', 'mark', 'marquee', 'menu', 'menuitem', 'meter', 'nav', 'nobr', 'ol', 'optgroup', 'option', 'output', 'p', 'picture', 'pre', 'progress', 'q', 'rp', 'rt', 'ruby', 's', 'samp', 'section', 'select', 'shadow', 'small', 'source', 'spacer', 'span', 'strike', 'strong', 'style', 'sub', 'summary', 'sup', 'table', 'tbody', 'td', 'template', 'textarea', 'tfoot', 'th', 'thead', 'time', 'tr', 'track', 'tt', 'u', 'ul', 'var', 'video', 'wbr']); // SVG\n\nvar svg$1 = freeze(['svg', 'a', 'altglyph', 'altglyphdef', 'altglyphitem', 'animatecolor', 'animatemotion', 'animatetransform', 'circle', 'clippath', 'defs', 'desc', 'ellipse', 'filter', 'font', 'g', 'glyph', 'glyphref', 'hkern', 'image', 'line', 'lineargradient', 'marker', 'mask', 'metadata', 'mpath', 'path', 'pattern', 'polygon', 'polyline', 'radialgradient', 'rect', 'stop', 'style', 'switch', 'symbol', 'text', 'textpath', 'title', 'tref', 'tspan', 'view', 'vkern']);\nvar svgFilters = freeze(['feBlend', 'feColorMatrix', 'feComponentTransfer', 'feComposite', 'feConvolveMatrix', 'feDiffuseLighting', 'feDisplacementMap', 'feDistantLight', 'feFlood', 'feFuncA', 'feFuncB', 'feFuncG', 'feFuncR', 'feGaussianBlur', 'feImage', 'feMerge', 'feMergeNode', 'feMorphology', 'feOffset', 'fePointLight', 'feSpecularLighting', 'feSpotLight', 'feTile', 'feTurbulence']); // List of SVG elements that are disallowed by default.\n// We still need to know them so that we can do namespace\n// checks properly in case one wants to add them to\n// allow-list.\n\nvar svgDisallowed = freeze(['animate', 'color-profile', 'cursor', 'discard', 'fedropshadow', 'font-face', 'font-face-format', 'font-face-name', 'font-face-src', 'font-face-uri', 'foreignobject', 'hatch', 'hatchpath', 'mesh', 'meshgradient', 'meshpatch', 'meshrow', 'missing-glyph', 'script', 'set', 'solidcolor', 'unknown', 'use']);\nvar mathMl$1 = freeze(['math', 'menclose', 'merror', 'mfenced', 'mfrac', 'mglyph', 'mi', 'mlabeledtr', 'mmultiscripts', 'mn', 'mo', 'mover', 'mpadded', 'mphantom', 'mroot', 'mrow', 'ms', 'mspace', 'msqrt', 'mstyle', 'msub', 'msup', 'msubsup', 'mtable', 'mtd', 'mtext', 'mtr', 'munder', 'munderover']); // Similarly to SVG, we want to know all MathML elements,\n// even those that we disallow by default.\n\nvar mathMlDisallowed = freeze(['maction', 'maligngroup', 'malignmark', 'mlongdiv', 'mscarries', 'mscarry', 'msgroup', 'mstack', 'msline', 'msrow', 'semantics', 'annotation', 'annotation-xml', 'mprescripts', 'none']);\nvar text = freeze(['#text']);\n\nvar html = freeze(['accept', 'action', 'align', 'alt', 'autocapitalize', 'autocomplete', 'autopictureinpicture', 'autoplay', 'background', 'bgcolor', 'border', 'capture', 'cellpadding', 'cellspacing', 'checked', 'cite', 'class', 'clear', 'color', 'cols', 'colspan', 'controls', 'controlslist', 'coords', 'crossorigin', 'datetime', 'decoding', 'default', 'dir', 'disabled', 'disablepictureinpicture', 'disableremoteplayback', 'download', 'draggable', 'enctype', 'enterkeyhint', 'face', 'for', 'headers', 'height', 'hidden', 'high', 'href', 'hreflang', 'id', 'inputmode', 'integrity', 'ismap', 'kind', 'label', 'lang', 'list', 'loading', 'loop', 'low', 'max', 'maxlength', 'media', 'method', 'min', 'minlength', 'multiple', 'muted', 'name', 'nonce', 'noshade', 'novalidate', 'nowrap', 'open', 'optimum', 'pattern', 'placeholder', 'playsinline', 'poster', 'preload', 'pubdate', 'radiogroup', 'readonly', 'rel', 'required', 'rev', 'reversed', 'role', 'rows', 'rowspan', 'spellcheck', 'scope', 'selected', 'shape', 'size', 'sizes', 'span', 'srclang', 'start', 'src', 'srcset', 'step', 'style', 'summary', 'tabindex', 'title', 'translate', 'type', 'usemap', 'valign', 'value', 'width', 'xmlns', 'slot']);\nvar svg = freeze(['accent-height', 'accumulate', 'additive', 'alignment-baseline', 'ascent', 'attributename', 'attributetype', 'azimuth', 'basefrequency', 'baseline-shift', 'begin', 'bias', 'by', 'class', 'clip', 'clippathunits', 'clip-path', 'clip-rule', 'color', 'color-interpolation', 'color-interpolation-filters', 'color-profile', 'color-rendering', 'cx', 'cy', 'd', 'dx', 'dy', 'diffuseconstant', 'direction', 'display', 'divisor', 'dur', 'edgemode', 'elevation', 'end', 'fill', 'fill-opacity', 'fill-rule', 'filter', 'filterunits', 'flood-color', 'flood-opacity', 'font-family', 'font-size', 'font-size-adjust', 'font-stretch', 'font-style', 'font-variant', 'font-weight', 'fx', 'fy', 'g1', 'g2', 'glyph-name', 'glyphref', 'gradientunits', 'gradienttransform', 'height', 'href', 'id', 'image-rendering', 'in', 'in2', 'k', 'k1', 'k2', 'k3', 'k4', 'kerning', 'keypoints', 'keysplines', 'keytimes', 'lang', 'lengthadjust', 'letter-spacing', 'kernelmatrix', 'kernelunitlength', 'lighting-color', 'local', 'marker-end', 'marker-mid', 'marker-start', 'markerheight', 'markerunits', 'markerwidth', 'maskcontentunits', 'maskunits', 'max', 'mask', 'media', 'method', 'mode', 'min', 'name', 'numoctaves', 'offset', 'operator', 'opacity', 'order', 'orient', 'orientation', 'origin', 'overflow', 'paint-order', 'path', 'pathlength', 'patterncontentunits', 'patterntransform', 'patternunits', 'points', 'preservealpha', 'preserveaspectratio', 'primitiveunits', 'r', 'rx', 'ry', 'radius', 'refx', 'refy', 'repeatcount', 'repeatdur', 'restart', 'result', 'rotate', 'scale', 'seed', 'shape-rendering', 'specularconstant', 'specularexponent', 'spreadmethod', 'startoffset', 'stddeviation', 'stitchtiles', 'stop-color', 'stop-opacity', 'stroke-dasharray', 'stroke-dashoffset', 'stroke-linecap', 'stroke-linejoin', 'stroke-miterlimit', 'stroke-opacity', 'stroke', 'stroke-width', 'style', 'surfacescale', 'systemlanguage', 'tabindex', 'targetx', 'targety', 'transform', 'transform-origin', 'text-anchor', 'text-decoration', 'text-rendering', 'textlength', 'type', 'u1', 'u2', 'unicode', 'values', 'viewbox', 'visibility', 'version', 'vert-adv-y', 'vert-origin-x', 'vert-origin-y', 'width', 'word-spacing', 'wrap', 'writing-mode', 'xchannelselector', 'ychannelselector', 'x', 'x1', 'x2', 'xmlns', 'y', 'y1', 'y2', 'z', 'zoomandpan']);\nvar mathMl = freeze(['accent', 'accentunder', 'align', 'bevelled', 'close', 'columnsalign', 'columnlines', 'columnspan', 'denomalign', 'depth', 'dir', 'display', 'displaystyle', 'encoding', 'fence', 'frame', 'height', 'href', 'id', 'largeop', 'length', 'linethickness', 'lspace', 'lquote', 'mathbackground', 'mathcolor', 'mathsize', 'mathvariant', 'maxsize', 'minsize', 'movablelimits', 'notation', 'numalign', 'open', 'rowalign', 'rowlines', 'rowspacing', 'rowspan', 'rspace', 'rquote', 'scriptlevel', 'scriptminsize', 'scriptsizemultiplier', 'selection', 'separator', 'separators', 'stretchy', 'subscriptshift', 'supscriptshift', 'symmetric', 'voffset', 'width', 'xmlns']);\nvar xml = freeze(['xlink:href', 'xml:id', 'xlink:title', 'xml:space', 'xmlns:xlink']);\n\nvar MUSTACHE_EXPR = seal(/\\{\\{[\\w\\W]*|[\\w\\W]*\\}\\}/gm); // Specify template detection regex for SAFE_FOR_TEMPLATES mode\n\nvar ERB_EXPR = seal(/<%[\\w\\W]*|[\\w\\W]*%>/gm);\nvar TMPLIT_EXPR = seal(/\\${[\\w\\W]*}/gm);\nvar DATA_ATTR = seal(/^data-[\\-\\w.\\u00B7-\\uFFFF]/); // eslint-disable-line no-useless-escape\n\nvar ARIA_ATTR = seal(/^aria-[\\-\\w]+$/); // eslint-disable-line no-useless-escape\n\nvar IS_ALLOWED_URI = seal(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\\-]+(?:[^a-z+.\\-:]|$))/i // eslint-disable-line no-useless-escape\n);\nvar IS_SCRIPT_OR_DATA = seal(/^(?:\\w+script|data):/i);\nvar ATTR_WHITESPACE = seal(/[\\u0000-\\u0020\\u00A0\\u1680\\u180E\\u2000-\\u2029\\u205F\\u3000]/g // eslint-disable-line no-control-regex\n);\nvar DOCTYPE_NAME = seal(/^html$/i);\n\nvar getGlobal = function getGlobal() {\n return typeof window === 'undefined' ? null : window;\n};\n/**\n * Creates a no-op policy for internal use only.\n * Don't export this function outside this module!\n * @param {?TrustedTypePolicyFactory} trustedTypes The policy factory.\n * @param {Document} document The document object (to determine policy name suffix)\n * @return {?TrustedTypePolicy} The policy created (or null, if Trusted Types\n * are not supported).\n */\n\n\nvar _createTrustedTypesPolicy = function _createTrustedTypesPolicy(trustedTypes, document) {\n if (_typeof(trustedTypes) !== 'object' || typeof trustedTypes.createPolicy !== 'function') {\n return null;\n } // Allow the callers to control the unique policy name\n // by adding a data-tt-policy-suffix to the script element with the DOMPurify.\n // Policy creation with duplicate names throws in Trusted Types.\n\n\n var suffix = null;\n var ATTR_NAME = 'data-tt-policy-suffix';\n\n if (document.currentScript && document.currentScript.hasAttribute(ATTR_NAME)) {\n suffix = document.currentScript.getAttribute(ATTR_NAME);\n }\n\n var policyName = 'dompurify' + (suffix ? '#' + suffix : '');\n\n try {\n return trustedTypes.createPolicy(policyName, {\n createHTML: function createHTML(html) {\n return html;\n },\n createScriptURL: function createScriptURL(scriptUrl) {\n return scriptUrl;\n }\n });\n } catch (_) {\n // Policy creation failed (most likely another DOMPurify script has\n // already run). Skip creating the policy, as this will only cause errors\n // if TT are enforced.\n console.warn('TrustedTypes policy ' + policyName + ' could not be created.');\n return null;\n }\n};\n\nfunction createDOMPurify() {\n var window = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : getGlobal();\n\n var DOMPurify = function DOMPurify(root) {\n return createDOMPurify(root);\n };\n /**\n * Version label, exposed for easier checks\n * if DOMPurify is up to date or not\n */\n\n\n DOMPurify.version = '2.4.3';\n /**\n * Array of elements that DOMPurify removed during sanitation.\n * Empty if nothing was removed.\n */\n\n DOMPurify.removed = [];\n\n if (!window || !window.document || window.document.nodeType !== 9) {\n // Not running in a browser, provide a factory function\n // so that you can pass your own Window\n DOMPurify.isSupported = false;\n return DOMPurify;\n }\n\n var originalDocument = window.document;\n var document = window.document;\n var DocumentFragment = window.DocumentFragment,\n HTMLTemplateElement = window.HTMLTemplateElement,\n Node = window.Node,\n Element = window.Element,\n NodeFilter = window.NodeFilter,\n _window$NamedNodeMap = window.NamedNodeMap,\n NamedNodeMap = _window$NamedNodeMap === void 0 ? window.NamedNodeMap || window.MozNamedAttrMap : _window$NamedNodeMap,\n HTMLFormElement = window.HTMLFormElement,\n DOMParser = window.DOMParser,\n trustedTypes = window.trustedTypes;\n var ElementPrototype = Element.prototype;\n var cloneNode = lookupGetter(ElementPrototype, 'cloneNode');\n var getNextSibling = lookupGetter(ElementPrototype, 'nextSibling');\n var getChildNodes = lookupGetter(ElementPrototype, 'childNodes');\n var getParentNode = lookupGetter(ElementPrototype, 'parentNode'); // As per issue #47, the web-components registry is inherited by a\n // new document created via createHTMLDocument. As per the spec\n // (http://w3c.github.io/webcomponents/spec/custom/#creating-and-passing-registries)\n // a new empty registry is used when creating a template contents owner\n // document, so we use that as our parent document to ensure nothing\n // is inherited.\n\n if (typeof HTMLTemplateElement === 'function') {\n var template = document.createElement('template');\n\n if (template.content && template.content.ownerDocument) {\n document = template.content.ownerDocument;\n }\n }\n\n var trustedTypesPolicy = _createTrustedTypesPolicy(trustedTypes, originalDocument);\n\n var emptyHTML = trustedTypesPolicy ? trustedTypesPolicy.createHTML('') : '';\n var _document = document,\n implementation = _document.implementation,\n createNodeIterator = _document.createNodeIterator,\n createDocumentFragment = _document.createDocumentFragment,\n getElementsByTagName = _document.getElementsByTagName;\n var importNode = originalDocument.importNode;\n var documentMode = {};\n\n try {\n documentMode = clone(document).documentMode ? document.documentMode : {};\n } catch (_) {}\n\n var hooks = {};\n /**\n * Expose whether this browser supports running the full DOMPurify.\n */\n\n DOMPurify.isSupported = typeof getParentNode === 'function' && implementation && typeof implementation.createHTMLDocument !== 'undefined' && documentMode !== 9;\n var MUSTACHE_EXPR$1 = MUSTACHE_EXPR,\n ERB_EXPR$1 = ERB_EXPR,\n TMPLIT_EXPR$1 = TMPLIT_EXPR,\n DATA_ATTR$1 = DATA_ATTR,\n ARIA_ATTR$1 = ARIA_ATTR,\n IS_SCRIPT_OR_DATA$1 = IS_SCRIPT_OR_DATA,\n ATTR_WHITESPACE$1 = ATTR_WHITESPACE;\n var IS_ALLOWED_URI$1 = IS_ALLOWED_URI;\n /**\n * We consider the elements and attributes below to be safe. Ideally\n * don't add any new ones but feel free to remove unwanted ones.\n */\n\n /* allowed element names */\n\n var ALLOWED_TAGS = null;\n var DEFAULT_ALLOWED_TAGS = addToSet({}, [].concat(_toConsumableArray(html$1), _toConsumableArray(svg$1), _toConsumableArray(svgFilters), _toConsumableArray(mathMl$1), _toConsumableArray(text)));\n /* Allowed attribute names */\n\n var ALLOWED_ATTR = null;\n var DEFAULT_ALLOWED_ATTR = addToSet({}, [].concat(_toConsumableArray(html), _toConsumableArray(svg), _toConsumableArray(mathMl), _toConsumableArray(xml)));\n /*\n * Configure how DOMPUrify should handle custom elements and their attributes as well as customized built-in elements.\n * @property {RegExp|Function|null} tagNameCheck one of [null, regexPattern, predicate]. Default: `null` (disallow any custom elements)\n * @property {RegExp|Function|null} attributeNameCheck one of [null, regexPattern, predicate]. Default: `null` (disallow any attributes not on the allow list)\n * @property {boolean} allowCustomizedBuiltInElements allow custom elements derived from built-ins if they pass CUSTOM_ELEMENT_HANDLING.tagNameCheck. Default: `false`.\n */\n\n var CUSTOM_ELEMENT_HANDLING = Object.seal(Object.create(null, {\n tagNameCheck: {\n writable: true,\n configurable: false,\n enumerable: true,\n value: null\n },\n attributeNameCheck: {\n writable: true,\n configurable: false,\n enumerable: true,\n value: null\n },\n allowCustomizedBuiltInElements: {\n writable: true,\n configurable: false,\n enumerable: true,\n value: false\n }\n }));\n /* Explicitly forbidden tags (overrides ALLOWED_TAGS/ADD_TAGS) */\n\n var FORBID_TAGS = null;\n /* Explicitly forbidden attributes (overrides ALLOWED_ATTR/ADD_ATTR) */\n\n var FORBID_ATTR = null;\n /* Decide if ARIA attributes are okay */\n\n var ALLOW_ARIA_ATTR = true;\n /* Decide if custom data attributes are okay */\n\n var ALLOW_DATA_ATTR = true;\n /* Decide if unknown protocols are okay */\n\n var ALLOW_UNKNOWN_PROTOCOLS = false;\n /* Output should be safe for common template engines.\n * This means, DOMPurify removes data attributes, mustaches and ERB\n */\n\n var SAFE_FOR_TEMPLATES = false;\n /* Decide if document with ... should be returned */\n\n var WHOLE_DOCUMENT = false;\n /* Track whether config is already set on this instance of DOMPurify. */\n\n var SET_CONFIG = false;\n /* Decide if all elements (e.g. style, script) must be children of\n * document.body. By default, browsers might move them to document.head */\n\n var FORCE_BODY = false;\n /* Decide if a DOM `HTMLBodyElement` should be returned, instead of a html\n * string (or a TrustedHTML object if Trusted Types are supported).\n * If `WHOLE_DOCUMENT` is enabled a `HTMLHtmlElement` will be returned instead\n */\n\n var RETURN_DOM = false;\n /* Decide if a DOM `DocumentFragment` should be returned, instead of a html\n * string (or a TrustedHTML object if Trusted Types are supported) */\n\n var RETURN_DOM_FRAGMENT = false;\n /* Try to return a Trusted Type object instead of a string, return a string in\n * case Trusted Types are not supported */\n\n var RETURN_TRUSTED_TYPE = false;\n /* Output should be free from DOM clobbering attacks?\n * This sanitizes markups named with colliding, clobberable built-in DOM APIs.\n */\n\n var SANITIZE_DOM = true;\n /* Achieve full DOM Clobbering protection by isolating the namespace of named\n * properties and JS variables, mitigating attacks that abuse the HTML/DOM spec rules.\n *\n * HTML/DOM spec rules that enable DOM Clobbering:\n * - Named Access on Window (§7.3.3)\n * - DOM Tree Accessors (§3.1.5)\n * - Form Element Parent-Child Relations (§4.10.3)\n * - Iframe srcdoc / Nested WindowProxies (§4.8.5)\n * - HTMLCollection (§4.2.10.2)\n *\n * Namespace isolation is implemented by prefixing `id` and `name` attributes\n * with a constant string, i.e., `user-content-`\n */\n\n var SANITIZE_NAMED_PROPS = false;\n var SANITIZE_NAMED_PROPS_PREFIX = 'user-content-';\n /* Keep element content when removing element? */\n\n var KEEP_CONTENT = true;\n /* If a `Node` is passed to sanitize(), then performs sanitization in-place instead\n * of importing it into a new Document and returning a sanitized copy */\n\n var IN_PLACE = false;\n /* Allow usage of profiles like html, svg and mathMl */\n\n var USE_PROFILES = {};\n /* Tags to ignore content of when KEEP_CONTENT is true */\n\n var FORBID_CONTENTS = null;\n var DEFAULT_FORBID_CONTENTS = addToSet({}, ['annotation-xml', 'audio', 'colgroup', 'desc', 'foreignobject', 'head', 'iframe', 'math', 'mi', 'mn', 'mo', 'ms', 'mtext', 'noembed', 'noframes', 'noscript', 'plaintext', 'script', 'style', 'svg', 'template', 'thead', 'title', 'video', 'xmp']);\n /* Tags that are safe for data: URIs */\n\n var DATA_URI_TAGS = null;\n var DEFAULT_DATA_URI_TAGS = addToSet({}, ['audio', 'video', 'img', 'source', 'image', 'track']);\n /* Attributes safe for values like \"javascript:\" */\n\n var URI_SAFE_ATTRIBUTES = null;\n var DEFAULT_URI_SAFE_ATTRIBUTES = addToSet({}, ['alt', 'class', 'for', 'id', 'label', 'name', 'pattern', 'placeholder', 'role', 'summary', 'title', 'value', 'style', 'xmlns']);\n var MATHML_NAMESPACE = 'http://www.w3.org/1998/Math/MathML';\n var SVG_NAMESPACE = 'http://www.w3.org/2000/svg';\n var HTML_NAMESPACE = 'http://www.w3.org/1999/xhtml';\n /* Document namespace */\n\n var NAMESPACE = HTML_NAMESPACE;\n var IS_EMPTY_INPUT = false;\n /* Allowed XHTML+XML namespaces */\n\n var ALLOWED_NAMESPACES = null;\n var DEFAULT_ALLOWED_NAMESPACES = addToSet({}, [MATHML_NAMESPACE, SVG_NAMESPACE, HTML_NAMESPACE], stringToString);\n /* Parsing of strict XHTML documents */\n\n var PARSER_MEDIA_TYPE;\n var SUPPORTED_PARSER_MEDIA_TYPES = ['application/xhtml+xml', 'text/html'];\n var DEFAULT_PARSER_MEDIA_TYPE = 'text/html';\n var transformCaseFunc;\n /* Keep a reference to config to pass to hooks */\n\n var CONFIG = null;\n /* Ideally, do not touch anything below this line */\n\n /* ______________________________________________ */\n\n var formElement = document.createElement('form');\n\n var isRegexOrFunction = function isRegexOrFunction(testValue) {\n return testValue instanceof RegExp || testValue instanceof Function;\n };\n /**\n * _parseConfig\n *\n * @param {Object} cfg optional config literal\n */\n // eslint-disable-next-line complexity\n\n\n var _parseConfig = function _parseConfig(cfg) {\n if (CONFIG && CONFIG === cfg) {\n return;\n }\n /* Shield configuration object from tampering */\n\n\n if (!cfg || _typeof(cfg) !== 'object') {\n cfg = {};\n }\n /* Shield configuration object from prototype pollution */\n\n\n cfg = clone(cfg);\n PARSER_MEDIA_TYPE = // eslint-disable-next-line unicorn/prefer-includes\n SUPPORTED_PARSER_MEDIA_TYPES.indexOf(cfg.PARSER_MEDIA_TYPE) === -1 ? PARSER_MEDIA_TYPE = DEFAULT_PARSER_MEDIA_TYPE : PARSER_MEDIA_TYPE = cfg.PARSER_MEDIA_TYPE; // HTML tags and attributes are not case-sensitive, converting to lowercase. Keeping XHTML as is.\n\n transformCaseFunc = PARSER_MEDIA_TYPE === 'application/xhtml+xml' ? stringToString : stringToLowerCase;\n /* Set configuration parameters */\n\n ALLOWED_TAGS = 'ALLOWED_TAGS' in cfg ? addToSet({}, cfg.ALLOWED_TAGS, transformCaseFunc) : DEFAULT_ALLOWED_TAGS;\n ALLOWED_ATTR = 'ALLOWED_ATTR' in cfg ? addToSet({}, cfg.ALLOWED_ATTR, transformCaseFunc) : DEFAULT_ALLOWED_ATTR;\n ALLOWED_NAMESPACES = 'ALLOWED_NAMESPACES' in cfg ? addToSet({}, cfg.ALLOWED_NAMESPACES, stringToString) : DEFAULT_ALLOWED_NAMESPACES;\n URI_SAFE_ATTRIBUTES = 'ADD_URI_SAFE_ATTR' in cfg ? addToSet(clone(DEFAULT_URI_SAFE_ATTRIBUTES), // eslint-disable-line indent\n cfg.ADD_URI_SAFE_ATTR, // eslint-disable-line indent\n transformCaseFunc // eslint-disable-line indent\n ) // eslint-disable-line indent\n : DEFAULT_URI_SAFE_ATTRIBUTES;\n DATA_URI_TAGS = 'ADD_DATA_URI_TAGS' in cfg ? addToSet(clone(DEFAULT_DATA_URI_TAGS), // eslint-disable-line indent\n cfg.ADD_DATA_URI_TAGS, // eslint-disable-line indent\n transformCaseFunc // eslint-disable-line indent\n ) // eslint-disable-line indent\n : DEFAULT_DATA_URI_TAGS;\n FORBID_CONTENTS = 'FORBID_CONTENTS' in cfg ? addToSet({}, cfg.FORBID_CONTENTS, transformCaseFunc) : DEFAULT_FORBID_CONTENTS;\n FORBID_TAGS = 'FORBID_TAGS' in cfg ? addToSet({}, cfg.FORBID_TAGS, transformCaseFunc) : {};\n FORBID_ATTR = 'FORBID_ATTR' in cfg ? addToSet({}, cfg.FORBID_ATTR, transformCaseFunc) : {};\n USE_PROFILES = 'USE_PROFILES' in cfg ? cfg.USE_PROFILES : false;\n ALLOW_ARIA_ATTR = cfg.ALLOW_ARIA_ATTR !== false; // Default true\n\n ALLOW_DATA_ATTR = cfg.ALLOW_DATA_ATTR !== false; // Default true\n\n ALLOW_UNKNOWN_PROTOCOLS = cfg.ALLOW_UNKNOWN_PROTOCOLS || false; // Default false\n\n SAFE_FOR_TEMPLATES = cfg.SAFE_FOR_TEMPLATES || false; // Default false\n\n WHOLE_DOCUMENT = cfg.WHOLE_DOCUMENT || false; // Default false\n\n RETURN_DOM = cfg.RETURN_DOM || false; // Default false\n\n RETURN_DOM_FRAGMENT = cfg.RETURN_DOM_FRAGMENT || false; // Default false\n\n RETURN_TRUSTED_TYPE = cfg.RETURN_TRUSTED_TYPE || false; // Default false\n\n FORCE_BODY = cfg.FORCE_BODY || false; // Default false\n\n SANITIZE_DOM = cfg.SANITIZE_DOM !== false; // Default true\n\n SANITIZE_NAMED_PROPS = cfg.SANITIZE_NAMED_PROPS || false; // Default false\n\n KEEP_CONTENT = cfg.KEEP_CONTENT !== false; // Default true\n\n IN_PLACE = cfg.IN_PLACE || false; // Default false\n\n IS_ALLOWED_URI$1 = cfg.ALLOWED_URI_REGEXP || IS_ALLOWED_URI$1;\n NAMESPACE = cfg.NAMESPACE || HTML_NAMESPACE;\n\n if (cfg.CUSTOM_ELEMENT_HANDLING && isRegexOrFunction(cfg.CUSTOM_ELEMENT_HANDLING.tagNameCheck)) {\n CUSTOM_ELEMENT_HANDLING.tagNameCheck = cfg.CUSTOM_ELEMENT_HANDLING.tagNameCheck;\n }\n\n if (cfg.CUSTOM_ELEMENT_HANDLING && isRegexOrFunction(cfg.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)) {\n CUSTOM_ELEMENT_HANDLING.attributeNameCheck = cfg.CUSTOM_ELEMENT_HANDLING.attributeNameCheck;\n }\n\n if (cfg.CUSTOM_ELEMENT_HANDLING && typeof cfg.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements === 'boolean') {\n CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements = cfg.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements;\n }\n\n if (SAFE_FOR_TEMPLATES) {\n ALLOW_DATA_ATTR = false;\n }\n\n if (RETURN_DOM_FRAGMENT) {\n RETURN_DOM = true;\n }\n /* Parse profile info */\n\n\n if (USE_PROFILES) {\n ALLOWED_TAGS = addToSet({}, _toConsumableArray(text));\n ALLOWED_ATTR = [];\n\n if (USE_PROFILES.html === true) {\n addToSet(ALLOWED_TAGS, html$1);\n addToSet(ALLOWED_ATTR, html);\n }\n\n if (USE_PROFILES.svg === true) {\n addToSet(ALLOWED_TAGS, svg$1);\n addToSet(ALLOWED_ATTR, svg);\n addToSet(ALLOWED_ATTR, xml);\n }\n\n if (USE_PROFILES.svgFilters === true) {\n addToSet(ALLOWED_TAGS, svgFilters);\n addToSet(ALLOWED_ATTR, svg);\n addToSet(ALLOWED_ATTR, xml);\n }\n\n if (USE_PROFILES.mathMl === true) {\n addToSet(ALLOWED_TAGS, mathMl$1);\n addToSet(ALLOWED_ATTR, mathMl);\n addToSet(ALLOWED_ATTR, xml);\n }\n }\n /* Merge configuration parameters */\n\n\n if (cfg.ADD_TAGS) {\n if (ALLOWED_TAGS === DEFAULT_ALLOWED_TAGS) {\n ALLOWED_TAGS = clone(ALLOWED_TAGS);\n }\n\n addToSet(ALLOWED_TAGS, cfg.ADD_TAGS, transformCaseFunc);\n }\n\n if (cfg.ADD_ATTR) {\n if (ALLOWED_ATTR === DEFAULT_ALLOWED_ATTR) {\n ALLOWED_ATTR = clone(ALLOWED_ATTR);\n }\n\n addToSet(ALLOWED_ATTR, cfg.ADD_ATTR, transformCaseFunc);\n }\n\n if (cfg.ADD_URI_SAFE_ATTR) {\n addToSet(URI_SAFE_ATTRIBUTES, cfg.ADD_URI_SAFE_ATTR, transformCaseFunc);\n }\n\n if (cfg.FORBID_CONTENTS) {\n if (FORBID_CONTENTS === DEFAULT_FORBID_CONTENTS) {\n FORBID_CONTENTS = clone(FORBID_CONTENTS);\n }\n\n addToSet(FORBID_CONTENTS, cfg.FORBID_CONTENTS, transformCaseFunc);\n }\n /* Add #text in case KEEP_CONTENT is set to true */\n\n\n if (KEEP_CONTENT) {\n ALLOWED_TAGS['#text'] = true;\n }\n /* Add html, head and body to ALLOWED_TAGS in case WHOLE_DOCUMENT is true */\n\n\n if (WHOLE_DOCUMENT) {\n addToSet(ALLOWED_TAGS, ['html', 'head', 'body']);\n }\n /* Add tbody to ALLOWED_TAGS in case tables are permitted, see #286, #365 */\n\n\n if (ALLOWED_TAGS.table) {\n addToSet(ALLOWED_TAGS, ['tbody']);\n delete FORBID_TAGS.tbody;\n } // Prevent further manipulation of configuration.\n // Not available in IE8, Safari 5, etc.\n\n\n if (freeze) {\n freeze(cfg);\n }\n\n CONFIG = cfg;\n };\n\n var MATHML_TEXT_INTEGRATION_POINTS = addToSet({}, ['mi', 'mo', 'mn', 'ms', 'mtext']);\n var HTML_INTEGRATION_POINTS = addToSet({}, ['foreignobject', 'desc', 'title', 'annotation-xml']); // Certain elements are allowed in both SVG and HTML\n // namespace. We need to specify them explicitly\n // so that they don't get erroneously deleted from\n // HTML namespace.\n\n var COMMON_SVG_AND_HTML_ELEMENTS = addToSet({}, ['title', 'style', 'font', 'a', 'script']);\n /* Keep track of all possible SVG and MathML tags\n * so that we can perform the namespace checks\n * correctly. */\n\n var ALL_SVG_TAGS = addToSet({}, svg$1);\n addToSet(ALL_SVG_TAGS, svgFilters);\n addToSet(ALL_SVG_TAGS, svgDisallowed);\n var ALL_MATHML_TAGS = addToSet({}, mathMl$1);\n addToSet(ALL_MATHML_TAGS, mathMlDisallowed);\n /**\n *\n *\n * @param {Element} element a DOM element whose namespace is being checked\n * @returns {boolean} Return false if the element has a\n * namespace that a spec-compliant parser would never\n * return. Return true otherwise.\n */\n\n var _checkValidNamespace = function _checkValidNamespace(element) {\n var parent = getParentNode(element); // In JSDOM, if we're inside shadow DOM, then parentNode\n // can be null. We just simulate parent in this case.\n\n if (!parent || !parent.tagName) {\n parent = {\n namespaceURI: NAMESPACE,\n tagName: 'template'\n };\n }\n\n var tagName = stringToLowerCase(element.tagName);\n var parentTagName = stringToLowerCase(parent.tagName);\n\n if (!ALLOWED_NAMESPACES[element.namespaceURI]) {\n return false;\n }\n\n if (element.namespaceURI === SVG_NAMESPACE) {\n // The only way to switch from HTML namespace to SVG\n // is via . If it happens via any other tag, then\n // it should be killed.\n if (parent.namespaceURI === HTML_NAMESPACE) {\n return tagName === 'svg';\n } // The only way to switch from MathML to SVG is via`\n // svg if parent is either or MathML\n // text integration points.\n\n\n if (parent.namespaceURI === MATHML_NAMESPACE) {\n return tagName === 'svg' && (parentTagName === 'annotation-xml' || MATHML_TEXT_INTEGRATION_POINTS[parentTagName]);\n } // We only allow elements that are defined in SVG\n // spec. All others are disallowed in SVG namespace.\n\n\n return Boolean(ALL_SVG_TAGS[tagName]);\n }\n\n if (element.namespaceURI === MATHML_NAMESPACE) {\n // The only way to switch from HTML namespace to MathML\n // is via . If it happens via any other tag, then\n // it should be killed.\n if (parent.namespaceURI === HTML_NAMESPACE) {\n return tagName === 'math';\n } // The only way to switch from SVG to MathML is via\n // and HTML integration points\n\n\n if (parent.namespaceURI === SVG_NAMESPACE) {\n return tagName === 'math' && HTML_INTEGRATION_POINTS[parentTagName];\n } // We only allow elements that are defined in MathML\n // spec. All others are disallowed in MathML namespace.\n\n\n return Boolean(ALL_MATHML_TAGS[tagName]);\n }\n\n if (element.namespaceURI === HTML_NAMESPACE) {\n // The only way to switch from SVG to HTML is via\n // HTML integration points, and from MathML to HTML\n // is via MathML text integration points\n if (parent.namespaceURI === SVG_NAMESPACE && !HTML_INTEGRATION_POINTS[parentTagName]) {\n return false;\n }\n\n if (parent.namespaceURI === MATHML_NAMESPACE && !MATHML_TEXT_INTEGRATION_POINTS[parentTagName]) {\n return false;\n } // We disallow tags that are specific for MathML\n // or SVG and should never appear in HTML namespace\n\n\n return !ALL_MATHML_TAGS[tagName] && (COMMON_SVG_AND_HTML_ELEMENTS[tagName] || !ALL_SVG_TAGS[tagName]);\n } // For XHTML and XML documents that support custom namespaces\n\n\n if (PARSER_MEDIA_TYPE === 'application/xhtml+xml' && ALLOWED_NAMESPACES[element.namespaceURI]) {\n return true;\n } // The code should never reach this place (this means\n // that the element somehow got namespace that is not\n // HTML, SVG, MathML or allowed via ALLOWED_NAMESPACES).\n // Return false just in case.\n\n\n return false;\n };\n /**\n * _forceRemove\n *\n * @param {Node} node a DOM node\n */\n\n\n var _forceRemove = function _forceRemove(node) {\n arrayPush(DOMPurify.removed, {\n element: node\n });\n\n try {\n // eslint-disable-next-line unicorn/prefer-dom-node-remove\n node.parentNode.removeChild(node);\n } catch (_) {\n try {\n node.outerHTML = emptyHTML;\n } catch (_) {\n node.remove();\n }\n }\n };\n /**\n * _removeAttribute\n *\n * @param {String} name an Attribute name\n * @param {Node} node a DOM node\n */\n\n\n var _removeAttribute = function _removeAttribute(name, node) {\n try {\n arrayPush(DOMPurify.removed, {\n attribute: node.getAttributeNode(name),\n from: node\n });\n } catch (_) {\n arrayPush(DOMPurify.removed, {\n attribute: null,\n from: node\n });\n }\n\n node.removeAttribute(name); // We void attribute values for unremovable \"is\"\" attributes\n\n if (name === 'is' && !ALLOWED_ATTR[name]) {\n if (RETURN_DOM || RETURN_DOM_FRAGMENT) {\n try {\n _forceRemove(node);\n } catch (_) {}\n } else {\n try {\n node.setAttribute(name, '');\n } catch (_) {}\n }\n }\n };\n /**\n * _initDocument\n *\n * @param {String} dirty a string of dirty markup\n * @return {Document} a DOM, filled with the dirty markup\n */\n\n\n var _initDocument = function _initDocument(dirty) {\n /* Create a HTML document */\n var doc;\n var leadingWhitespace;\n\n if (FORCE_BODY) {\n dirty = '' + dirty;\n } else {\n /* If FORCE_BODY isn't used, leading whitespace needs to be preserved manually */\n var matches = stringMatch(dirty, /^[\\r\\n\\t ]+/);\n leadingWhitespace = matches && matches[0];\n }\n\n if (PARSER_MEDIA_TYPE === 'application/xhtml+xml' && NAMESPACE === HTML_NAMESPACE) {\n // Root of XHTML doc must contain xmlns declaration (see https://www.w3.org/TR/xhtml1/normative.html#strict)\n dirty = '' + dirty + '';\n }\n\n var dirtyPayload = trustedTypesPolicy ? trustedTypesPolicy.createHTML(dirty) : dirty;\n /*\n * Use the DOMParser API by default, fallback later if needs be\n * DOMParser not work for svg when has multiple root element.\n */\n\n if (NAMESPACE === HTML_NAMESPACE) {\n try {\n doc = new DOMParser().parseFromString(dirtyPayload, PARSER_MEDIA_TYPE);\n } catch (_) {}\n }\n /* Use createHTMLDocument in case DOMParser is not available */\n\n\n if (!doc || !doc.documentElement) {\n doc = implementation.createDocument(NAMESPACE, 'template', null);\n\n try {\n doc.documentElement.innerHTML = IS_EMPTY_INPUT ? emptyHTML : dirtyPayload;\n } catch (_) {// Syntax error if dirtyPayload is invalid xml\n }\n }\n\n var body = doc.body || doc.documentElement;\n\n if (dirty && leadingWhitespace) {\n body.insertBefore(document.createTextNode(leadingWhitespace), body.childNodes[0] || null);\n }\n /* Work on whole document or just its body */\n\n\n if (NAMESPACE === HTML_NAMESPACE) {\n return getElementsByTagName.call(doc, WHOLE_DOCUMENT ? 'html' : 'body')[0];\n }\n\n return WHOLE_DOCUMENT ? doc.documentElement : body;\n };\n /**\n * _createIterator\n *\n * @param {Document} root document/fragment to create iterator for\n * @return {Iterator} iterator instance\n */\n\n\n var _createIterator = function _createIterator(root) {\n return createNodeIterator.call(root.ownerDocument || root, root, // eslint-disable-next-line no-bitwise\n NodeFilter.SHOW_ELEMENT | NodeFilter.SHOW_COMMENT | NodeFilter.SHOW_TEXT, null, false);\n };\n /**\n * _isClobbered\n *\n * @param {Node} elm element to check for clobbering attacks\n * @return {Boolean} true if clobbered, false if safe\n */\n\n\n var _isClobbered = function _isClobbered(elm) {\n return elm instanceof HTMLFormElement && (typeof elm.nodeName !== 'string' || typeof elm.textContent !== 'string' || typeof elm.removeChild !== 'function' || !(elm.attributes instanceof NamedNodeMap) || typeof elm.removeAttribute !== 'function' || typeof elm.setAttribute !== 'function' || typeof elm.namespaceURI !== 'string' || typeof elm.insertBefore !== 'function' || typeof elm.hasChildNodes !== 'function');\n };\n /**\n * _isNode\n *\n * @param {Node} obj object to check whether it's a DOM node\n * @return {Boolean} true is object is a DOM node\n */\n\n\n var _isNode = function _isNode(object) {\n return _typeof(Node) === 'object' ? object instanceof Node : object && _typeof(object) === 'object' && typeof object.nodeType === 'number' && typeof object.nodeName === 'string';\n };\n /**\n * _executeHook\n * Execute user configurable hooks\n *\n * @param {String} entryPoint Name of the hook's entry point\n * @param {Node} currentNode node to work on with the hook\n * @param {Object} data additional hook parameters\n */\n\n\n var _executeHook = function _executeHook(entryPoint, currentNode, data) {\n if (!hooks[entryPoint]) {\n return;\n }\n\n arrayForEach(hooks[entryPoint], function (hook) {\n hook.call(DOMPurify, currentNode, data, CONFIG);\n });\n };\n /**\n * _sanitizeElements\n *\n * @protect nodeName\n * @protect textContent\n * @protect removeChild\n *\n * @param {Node} currentNode to check for permission to exist\n * @return {Boolean} true if node was killed, false if left alive\n */\n\n\n var _sanitizeElements = function _sanitizeElements(currentNode) {\n var content;\n /* Execute a hook if present */\n\n _executeHook('beforeSanitizeElements', currentNode, null);\n /* Check if element is clobbered or can clobber */\n\n\n if (_isClobbered(currentNode)) {\n _forceRemove(currentNode);\n\n return true;\n }\n /* Check if tagname contains Unicode */\n\n\n if (regExpTest(/[\\u0080-\\uFFFF]/, currentNode.nodeName)) {\n _forceRemove(currentNode);\n\n return true;\n }\n /* Now let's check the element's type and name */\n\n\n var tagName = transformCaseFunc(currentNode.nodeName);\n /* Execute a hook if present */\n\n _executeHook('uponSanitizeElement', currentNode, {\n tagName: tagName,\n allowedTags: ALLOWED_TAGS\n });\n /* Detect mXSS attempts abusing namespace confusion */\n\n\n if (currentNode.hasChildNodes() && !_isNode(currentNode.firstElementChild) && (!_isNode(currentNode.content) || !_isNode(currentNode.content.firstElementChild)) && regExpTest(/<[/\\w]/g, currentNode.innerHTML) && regExpTest(/<[/\\w]/g, currentNode.textContent)) {\n _forceRemove(currentNode);\n\n return true;\n }\n /* Mitigate a problem with templates inside select */\n\n\n if (tagName === 'select' && regExpTest(/