@4alldigital/foundation-ui--gamma 1.41.2 → 1.43.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/foundation-ui.css +1 -1
- package/dist/index.esm.js +1 -1994
- package/dist/index.js +1 -2056
- package/dist/types/{fui → lib}/components/Card/constants/index.d.ts +1 -1
- package/dist/types/lib/components/Form/Form.types.d.ts +21 -0
- package/dist/types/{fui → lib}/components/FormSelect/FormSelect.types.d.ts +0 -14
- package/dist/types/{fui → lib}/components/Icon/Icon.d.ts +0 -4
- package/dist/types/{fui → lib}/components/Image/Image.d.ts +0 -1
- package/dist/types/{fui → lib}/components/Image/Image.types.d.ts +0 -4
- package/dist/types/{fui → lib}/components/TextInput/TextInput.types.d.ts +0 -8
- package/dist/types/{fui/context/AppContext.d.ts → lib/context/App/index.d.ts} +1 -1
- package/dist/types/lib/context/index.d.ts +4 -0
- package/dist/types/lib/features/Search/view-helpers/getUrlSanitizer.d.ts +1 -0
- package/dist/types/{fui → lib}/index.d.ts +1 -2
- package/dist/types/lib/translations/index.d.ts +1 -0
- package/dist/types/packages/default/theme/styles/settings/settings.themes.d.ts +5 -5
- package/dist/types/packages/gamma/src/index.d.ts +2 -1
- package/dist/types/packages/gamma/theme/index.d.ts +57 -5
- package/dist/types/packages/gamma/theme/styles/settings/settings.themes.d.ts +5 -5
- package/package.json +4 -4
- package/dist/types/fui/components/Form/Form.types.d.ts +0 -36
- package/dist/types/fui/components/ListItem/ListItem.d.ts +0 -7
- package/dist/types/fui/components/ListItem/index.d.ts +0 -1
- package/dist/types/fui/features/Search/view-helpers/getUrlSanitizer.d.ts +0 -6
- package/dist/types/fui/features/Search/views/Sidebar/Sidebar.d.ts +0 -8
- package/dist/types/fui/features/Search/views/Sidebar/Sidebar.types.d.ts +0 -3
- package/dist/types/fui/features/Search/views/Sidebar/index.d.ts +0 -1
- package/dist/types/fui/hooks/useTheme.d.ts +0 -1
- package/dist/types/fui/setupTests.d.ts +0 -1
- package/dist/types/fui/stories/Page.d.ts +0 -6
- package/dist/types/fui/translations/index.d.ts +0 -2
- package/dist/types/fui/utils/parseDuration/index.d.ts +0 -19
- package/dist/types/packages/alpha/src/index.d.ts +0 -3
- package/dist/types/packages/alpha/theme/index.d.ts +0 -64
- package/dist/types/packages/alpha/theme/styles/buttons/buttons.themes.d.ts +0 -4
- package/dist/types/packages/alpha/theme/styles/colors/colors.themes.d.ts +0 -2
- package/dist/types/packages/alpha/theme/styles/fonts/fonts.themes.d.ts +0 -9
- package/dist/types/packages/alpha/theme/styles/settings/settings.themes.d.ts +0 -245
- package/dist/types/packages/beta/src/index.d.ts +0 -3
- package/dist/types/packages/beta/theme/index.d.ts +0 -64
- package/dist/types/packages/beta/theme/styles/buttons/buttons.themes.d.ts +0 -4
- package/dist/types/packages/beta/theme/styles/colors/colors.themes.d.ts +0 -2
- package/dist/types/packages/beta/theme/styles/fonts/fonts.themes.d.ts +0 -9
- package/dist/types/packages/beta/theme/styles/settings/settings.themes.d.ts +0 -246
- package/dist/types/packages/default/src/index.d.ts +0 -3
- package/dist/types/packages/default/theme/index.d.ts +0 -64
- package/dist/types/packages/default/theme/styles/cards/cards.themes.d.ts +0 -7
- /package/dist/types/{fui → lib}/components/AnimationCounter/AnimationCounter.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/AnimationCounter/AnimationCounter.types.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/AnimationCounter/index.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/AnimationSet1/AnimationSet1.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/AnimationSet1/AnimationSet1.types.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/AnimationSet1/index.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/Authenticator/Authenticator.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/Authenticator/Authenticator.types.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/Authenticator/index.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/Avatar/Avatar.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/Avatar/Avatar.types.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/Avatar/index.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/Blockquote/Blockquote.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/Blockquote/Blockquote.types.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/Blockquote/index.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/Button/Button.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/Button/Button.types.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/Button/index.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/ButtonGroup/ButtonGroup.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/ButtonGroup/ButtonGroup.types.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/ButtonGroup/index.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/Card/Card.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/Card/Card.types.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/Card/index.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/Card/types/CardBasic/CardBasic.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/Card/types/CardBasic/CardBasic.types.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/Card/types/CardBasic/index.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/Card/types/CardData/CardData.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/Card/types/CardData/CardData.types.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/Card/types/CardData/index.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/Card/types/CardHorz/CardHorz.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/Card/types/CardHorz/CardHorz.types.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/Card/types/CardHorz/index.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/Card/types/CardIcon/CardIcon.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/Card/types/CardIcon/CardIcon.types.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/Card/types/CardIcon/index.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/Card/types/CardMedia/CardMedia.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/Card/types/CardMedia/CardMedia.types.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/Card/types/CardMedia/index.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/Card/types/CardVideo/CardVideo.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/Card/types/CardVideo/CardVideo.types.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/Card/types/CardVideo/index.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/Checkbox/Checkbox.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/Checkbox/Checkbox.types.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/Checkbox/index.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/Chip/Chip.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/Chip/Chip.types.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/Chip/index.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/Container/Container.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/Container/Container.types.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/Container/index.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/ContentPageLayout/ContentPageLayout.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/ContentPageLayout/ContentPageLayout.types.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/ContentPageLayout/index.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/ContentRowsLayout/ContentRowsLayout.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/ContentRowsLayout/ContentRowsLayout.types.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/ContentRowsLayout/index.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/Copy/Copy.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/Copy/Copy.types.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/Copy/index.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/DisplayHeading/DisplayHeading.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/DisplayHeading/DisplayHeading.types.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/DisplayHeading/index.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/FileUpload/FileUpload.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/FileUpload/FileUpload.types.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/FileUpload/index.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/Footer/Footer.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/Footer/Footer.types.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/Footer/index.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/Form/Form.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/Form/index.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/FormField/FormField.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/FormField/FormField.types.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/FormField/index.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/FormSelect/FormSelect.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/FormSelect/index.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/Header/Header.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/Header/Header.types.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/Header/index.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/Heading/Heading.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/Heading/Heading.types.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/Heading/index.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/Hero/Hero.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/Hero/Hero.types.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/Hero/index.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/Hr/Hr.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/Hr/Hr.types.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/Hr/index.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/HtmlContent/HtmlContent.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/HtmlContent/HtmlContent.types.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/HtmlContent/index.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/Icon/Icon.types.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/Icon/index.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/Image/index.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/Label/Label.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/Label/Label.types.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/Label/index.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/Link/Link.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/Link/Link.types.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/Link/index.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/List/List.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/List/List.types.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/List/index.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/ListItem/ListItem.types.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/Loader/Loader.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/Loader/Loader.types.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/Loader/index.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/Logo/Logo.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/Logo/Logo.types.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/Logo/index.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/Menu/Menu.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/Menu/Menu.types.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/Menu/index.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/Notice/Notice.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/Notice/Notice.types.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/Notice/index.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/OTPInput/OTPInput.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/OTPInput/OTPInput.types.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/OTPInput/index.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/PanelCards/PanelCards.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/PanelCards/PanelCards.types.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/PanelCards/index.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/PanelFeature/PanelFeature.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/PanelFeature/PanelFeature.types.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/PanelFeature/index.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/PanelHero/PanelHero.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/PanelHero/PanelHero.types.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/PanelHero/index.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/PanelProduct/PanelProduct.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/PanelProduct/PanelProduct.types.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/PanelProduct/index.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/PanelVideo/PanelVideo.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/PanelVideo/PanelVideo.types.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/PanelVideo/index.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/Radio/Radio.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/Radio/Radio.types.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/Radio/index.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/Share/Share.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/Share/Share.types.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/Share/index.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/Switch/Switch.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/Switch/Switch.types.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/Switch/index.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/Tabs/Tabs.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/Tabs/Tabs.types.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/Tabs/index.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/TextInput/TextInput.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/TextInput/index.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/Video/Video.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/Video/Video.types.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/Video/index.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/VisitUs/VisitUs.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/VisitUs/VisitUs.types.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/VisitUs/index.d.ts +0 -0
- /package/dist/types/{fui → lib}/components/index.d.ts +0 -0
- /package/dist/types/{fui/context/ThemeContext.d.ts → lib/context/Theme/index.d.ts} +0 -0
- /package/dist/types/{fui → lib}/features/Search/Search.d.ts +0 -0
- /package/dist/types/{fui → lib}/features/Search/Search.types.d.ts +0 -0
- /package/dist/types/{fui → lib}/features/Search/index.d.ts +0 -0
- /package/dist/types/{fui → lib}/features/Search/view-helpers/appendClassName.d.ts +0 -0
- /package/dist/types/{fui → lib}/features/Search/view-helpers/formatResult.d.ts +0 -0
- /package/dist/types/{fui → lib}/features/Search/view-helpers/getFilterValueDisplay.d.ts +0 -0
- /package/dist/types/{fui → lib}/features/Search/view-helpers/index.d.ts +0 -0
- /package/dist/types/{fui → lib}/features/Search/views/Layout/Layout.d.ts +0 -0
- /package/dist/types/{fui → lib}/features/Search/views/Layout/Layout.types.d.ts +0 -0
- /package/dist/types/{fui → lib}/features/Search/views/Layout/index.d.ts +0 -0
- /package/dist/types/{fui → lib}/features/Search/views/MultiCheckboxFacet/MultiCheckboxFacet.d.ts +0 -0
- /package/dist/types/{fui → lib}/features/Search/views/MultiCheckboxFacet/MultiCheckboxFacet.types.d.ts +0 -0
- /package/dist/types/{fui → lib}/features/Search/views/MultiCheckboxFacet/index.d.ts +0 -0
- /package/dist/types/{fui → lib}/features/Search/views/Paging/Paging.d.ts +0 -0
- /package/dist/types/{fui → lib}/features/Search/views/Paging/Paging.types.d.ts +0 -0
- /package/dist/types/{fui → lib}/features/Search/views/Paging/index.d.ts +0 -0
- /package/dist/types/{fui → lib}/features/Search/views/PagingInfo/PagingInfo.d.ts +0 -0
- /package/dist/types/{fui → lib}/features/Search/views/PagingInfo/PagingInfo.types.d.ts +0 -0
- /package/dist/types/{fui → lib}/features/Search/views/PagingInfo/index.d.ts +0 -0
- /package/dist/types/{fui → lib}/features/Search/views/Result/Result.d.ts +0 -0
- /package/dist/types/{fui → lib}/features/Search/views/Result/Result.types.d.ts +0 -0
- /package/dist/types/{fui → lib}/features/Search/views/Result/index.d.ts +0 -0
- /package/dist/types/{fui → lib}/features/Search/views/Results/Results.d.ts +0 -0
- /package/dist/types/{fui → lib}/features/Search/views/Results/Results.types.d.ts +0 -0
- /package/dist/types/{fui → lib}/features/Search/views/Results/index.d.ts +0 -0
- /package/dist/types/{fui → lib}/features/Search/views/ResultsPerPage/ResultsPerPage.d.ts +0 -0
- /package/dist/types/{fui → lib}/features/Search/views/ResultsPerPage/ResultsPerPage.types.d.ts +0 -0
- /package/dist/types/{fui → lib}/features/Search/views/ResultsPerPage/index.d.ts +0 -0
- /package/dist/types/{fui → lib}/features/Search/views/SearchBox/SearchBox.d.ts +0 -0
- /package/dist/types/{fui → lib}/features/Search/views/SearchBox/SearchBox.types.d.ts +0 -0
- /package/dist/types/{fui → lib}/features/Search/views/SearchBox/index.d.ts +0 -0
- /package/dist/types/{fui → lib}/features/Search/views/SingleLinksFacet/SingleLinksFacet.d.ts +0 -0
- /package/dist/types/{fui → lib}/features/Search/views/SingleLinksFacet/SingleLinksFacet.types.d.ts +0 -0
- /package/dist/types/{fui → lib}/features/Search/views/SingleLinksFacet/index.d.ts +0 -0
- /package/dist/types/{fui → lib}/features/Search/views/SingleSelectFacet/SingleSelectFacet.d.ts +0 -0
- /package/dist/types/{fui → lib}/features/Search/views/SingleSelectFacet/SingleSelectFacet.types.d.ts +0 -0
- /package/dist/types/{fui → lib}/features/Search/views/SingleSelectFacet/index.d.ts +0 -0
- /package/dist/types/{fui → lib}/features/Search/views/Sorting/Sorting.d.ts +0 -0
- /package/dist/types/{fui → lib}/features/Search/views/Sorting/Sorting.types.d.ts +0 -0
- /package/dist/types/{fui → lib}/features/Search/views/Sorting/index.d.ts +0 -0
- /package/dist/types/{fui → lib}/features/index.d.ts +0 -0
- /package/dist/types/{fui → lib}/forms/ForgotPasswordForm/ForgotPasswordForm.d.ts +0 -0
- /package/dist/types/{fui → lib}/forms/ForgotPasswordForm/ForgotPasswordForm.types.d.ts +0 -0
- /package/dist/types/{fui → lib}/forms/ForgotPasswordForm/index.d.ts +0 -0
- /package/dist/types/{fui → lib}/forms/LoginForm/LoginForm.d.ts +0 -0
- /package/dist/types/{fui → lib}/forms/LoginForm/LoginForm.types.d.ts +0 -0
- /package/dist/types/{fui → lib}/forms/LoginForm/index.d.ts +0 -0
- /package/dist/types/{fui → lib}/forms/ProfileForm/ProfileForm.d.ts +0 -0
- /package/dist/types/{fui → lib}/forms/ProfileForm/ProfileForm.types.d.ts +0 -0
- /package/dist/types/{fui → lib}/forms/ProfileForm/index.d.ts +0 -0
- /package/dist/types/{fui → lib}/forms/RegisterForm/RegisterForm.d.ts +0 -0
- /package/dist/types/{fui → lib}/forms/RegisterForm/RegisterForm.types.d.ts +0 -0
- /package/dist/types/{fui → lib}/forms/RegisterForm/index.d.ts +0 -0
- /package/dist/types/{fui → lib}/forms/ResetPasswordForm/ResetPasswordForm.d.ts +0 -0
- /package/dist/types/{fui → lib}/forms/ResetPasswordForm/ResetPasswordForm.types.d.ts +0 -0
- /package/dist/types/{fui → lib}/forms/ResetPasswordForm/index.d.ts +0 -0
- /package/dist/types/{fui → lib}/forms/constants/index.d.ts +0 -0
- /package/dist/types/{fui → lib}/forms/index.d.ts +0 -0
- /package/dist/types/{fui → lib}/forms/validations/index.d.ts +0 -0
- /package/dist/types/{fui → lib}/translations/en.d.ts +0 -0
- /package/dist/types/{fui → lib}/utils/htmlParser/index.d.ts +0 -0
package/dist/index.esm.js
CHANGED
|
@@ -1,1994 +1 @@
|
|
|
1
|
-
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
2
|
-
import React, { useRef, useEffect, useState, useMemo, createContext, useContext } from 'react';
|
|
3
|
-
import cx from 'classnames';
|
|
4
|
-
import { useInView, useIsomorphicLayoutEffect, animate, motion, motionValue, useAnimation } from 'framer-motion';
|
|
5
|
-
import { twMerge } from 'tailwind-merge';
|
|
6
|
-
import { Icon as Icon$1 } from '@iconify/react';
|
|
7
|
-
import { Tabs as Tabs$1, TabList, Tab, TabPanel } from 'react-tabs';
|
|
8
|
-
import { useForm, FormProvider, useFormContext, Controller } from 'react-hook-form';
|
|
9
|
-
import HoverVideoPlayer from 'react-hover-video-player';
|
|
10
|
-
import ReactPlayer from 'react-player/youtube';
|
|
11
|
-
import videojs from 'video.js';
|
|
12
|
-
import parse, { attributesToProps, domToReact } from 'html-react-parser';
|
|
13
|
-
import { FacebookShareButton, TwitterShareButton, WhatsappShareButton, EmailShareButton, LinkedinShareButton } from 'react-share';
|
|
14
|
-
import ROtpInput from 'react-otp-input';
|
|
15
|
-
import ElasticSearchAPIConnector from '@elastic/search-ui-elasticsearch-connector';
|
|
16
|
-
import { SearchContext, SearchProvider, WithSearch, ErrorBoundary, SearchBox as SearchBox$1, Sorting as Sorting$1, Facet, Results as Results$1, PagingInfo as PagingInfo$1, ResultsPerPage as ResultsPerPage$1, Paging as Paging$1 } from '@elastic/react-search-ui';
|
|
17
|
-
import RCPagination from 'rc-pagination';
|
|
18
|
-
import enUsLocale from 'rc-pagination/lib/locale/en_US';
|
|
19
|
-
|
|
20
|
-
/******************************************************************************
|
|
21
|
-
Copyright (c) Microsoft Corporation.
|
|
22
|
-
|
|
23
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
24
|
-
purpose with or without fee is hereby granted.
|
|
25
|
-
|
|
26
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
27
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
28
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
29
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
30
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
31
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
32
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
33
|
-
***************************************************************************** */
|
|
34
|
-
/* global Reflect, Promise, SuppressedError, Symbol */
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
var __assign = function() {
|
|
38
|
-
__assign = Object.assign || function __assign(t) {
|
|
39
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
40
|
-
s = arguments[i];
|
|
41
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
42
|
-
}
|
|
43
|
-
return t;
|
|
44
|
-
};
|
|
45
|
-
return __assign.apply(this, arguments);
|
|
46
|
-
};
|
|
47
|
-
|
|
48
|
-
function __rest(s, e) {
|
|
49
|
-
var t = {};
|
|
50
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
51
|
-
t[p] = s[p];
|
|
52
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
53
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
54
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
55
|
-
t[p[i]] = s[p[i]];
|
|
56
|
-
}
|
|
57
|
-
return t;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
function __awaiter(thisArg, _arguments, P, generator) {
|
|
61
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
62
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
63
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
64
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
65
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
66
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
67
|
-
});
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
function __generator(thisArg, body) {
|
|
71
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
72
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
73
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
74
|
-
function step(op) {
|
|
75
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
76
|
-
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
77
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
78
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
79
|
-
switch (op[0]) {
|
|
80
|
-
case 0: case 1: t = op; break;
|
|
81
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
82
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
83
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
84
|
-
default:
|
|
85
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
86
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
87
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
88
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
89
|
-
if (t[2]) _.ops.pop();
|
|
90
|
-
_.trys.pop(); continue;
|
|
91
|
-
}
|
|
92
|
-
op = body.call(thisArg, _);
|
|
93
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
94
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
|
|
99
|
-
var e = new Error(message);
|
|
100
|
-
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
101
|
-
};
|
|
102
|
-
|
|
103
|
-
var AnimationCounter = function (_a) {
|
|
104
|
-
var testID = _a.testID, from = _a.from, to = _a.to, animationOptions = _a.animationOptions, className = _a.className, _b = _a.numDecimals, numDecimals = _b === void 0 ? 0 : _b;
|
|
105
|
-
var ref = React.useRef(null);
|
|
106
|
-
var inView = useInView(ref, { once: true });
|
|
107
|
-
useIsomorphicLayoutEffect(function () {
|
|
108
|
-
var element = ref.current;
|
|
109
|
-
if (!element || !inView) {
|
|
110
|
-
return;
|
|
111
|
-
}
|
|
112
|
-
if (window.matchMedia('(prefers-reduced-motion: reduce)').matches) {
|
|
113
|
-
element.textContent = to.toString();
|
|
114
|
-
return;
|
|
115
|
-
}
|
|
116
|
-
element.textContent = from.toString();
|
|
117
|
-
var controls = animate(from, to, __assign(__assign({ duration: 1, ease: 'easeOut' }, animationOptions), { onUpdate: function (value) {
|
|
118
|
-
element.textContent = value.toFixed(numDecimals);
|
|
119
|
-
} }));
|
|
120
|
-
return function () {
|
|
121
|
-
controls.stop();
|
|
122
|
-
};
|
|
123
|
-
}, [ref, inView, from, to, animationOptions]);
|
|
124
|
-
return jsx("span", { ref: ref, "data-testid": testID || 'AnimationCounter', className: cx('relative', className) });
|
|
125
|
-
};
|
|
126
|
-
AnimationCounter.displayName = 'AnimationCounter';
|
|
127
|
-
|
|
128
|
-
var Blockquote = function (_a) {
|
|
129
|
-
var text = _a.text, citation = _a.citation, className = _a.className, citationAttribute = _a.citationAttribute, _b = _a.showIcon, showIcon = _b === void 0 ? true : _b;
|
|
130
|
-
var classes = cx('text-xl italic font-bold', className);
|
|
131
|
-
return (jsxs("blockquote", { "data-testid": "Blockquote", className: classes, children: [showIcon && jsx("svg", { "aria-hidden": "true", className: "w-10 h-10", viewBox: "0 0 24 27", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: jsx("path", { d: "M14.017 18L14.017 10.609C14.017 4.905 17.748 1.039 23 0L23.995 2.151C21.563 3.068 20 5.789 20 8H24V18H14.017ZM0 18V10.609C0 4.905 3.748 1.038 9 0L9.996 2.151C7.563 3.068 6 5.789 6 8H9.983L9.983 18L0 18Z", fill: "currentColor" }) }), jsx("div", { children: text }), citation && (jsx("figcaption", { className: "flex flex-start items-center mt-6 space-x-3", children: jsxs("div", { className: "flex items-center divide-x-2", children: [jsx("cite", { className: "pr-3 font-medium", children: citation }), citationAttribute && jsx("cite", { className: "pl-3 text-sm font-light", children: citationAttribute })] }) }))] }));
|
|
132
|
-
};
|
|
133
|
-
Blockquote.displayName = 'Blockquote';
|
|
134
|
-
|
|
135
|
-
var BTN_TYPES;
|
|
136
|
-
(function (BTN_TYPES) {
|
|
137
|
-
BTN_TYPES["SUBMIT"] = "submit";
|
|
138
|
-
BTN_TYPES["RESET"] = "reset";
|
|
139
|
-
BTN_TYPES["BUTTON"] = "button";
|
|
140
|
-
})(BTN_TYPES || (BTN_TYPES = {}));
|
|
141
|
-
var BTN_VARIANTS;
|
|
142
|
-
(function (BTN_VARIANTS) {
|
|
143
|
-
BTN_VARIANTS["PRIMARY"] = "primary";
|
|
144
|
-
BTN_VARIANTS["SECONDARY"] = "secondary";
|
|
145
|
-
BTN_VARIANTS["TERTIARY"] = "tertiary";
|
|
146
|
-
BTN_VARIANTS["LINK"] = "link";
|
|
147
|
-
// DANGER = 'danger',
|
|
148
|
-
// WARNING = 'warning',
|
|
149
|
-
// SUCCESS = 'success',
|
|
150
|
-
// INFO = 'info',
|
|
151
|
-
})(BTN_VARIANTS || (BTN_VARIANTS = {}));
|
|
152
|
-
var BTN_SIZES;
|
|
153
|
-
(function (BTN_SIZES) {
|
|
154
|
-
BTN_SIZES["SMALL"] = "small";
|
|
155
|
-
BTN_SIZES["MEDIUM"] = "medium";
|
|
156
|
-
BTN_SIZES["LARGE"] = "large";
|
|
157
|
-
})(BTN_SIZES || (BTN_SIZES = {}));
|
|
158
|
-
|
|
159
|
-
/**
|
|
160
|
-
* Icon component
|
|
161
|
-
* List of supported icons can be found at https://icon-sets.iconify.design.
|
|
162
|
-
*/
|
|
163
|
-
var Icon = function (_a) {
|
|
164
|
-
// if (color) {
|
|
165
|
-
// return (
|
|
166
|
-
// <IconifyIcon
|
|
167
|
-
// data-testid={testID || id || 'Icon'}
|
|
168
|
-
// icon={name}
|
|
169
|
-
// width={size}
|
|
170
|
-
// height={size}
|
|
171
|
-
// color={color}
|
|
172
|
-
// className={className}
|
|
173
|
-
// fill={color || 'currentColor'}
|
|
174
|
-
// />
|
|
175
|
-
// );
|
|
176
|
-
// }
|
|
177
|
-
var name = _a.name, _b = _a.size, size = _b === void 0 ? 24 : _b, color = _a.color, id = _a.id, className = _a.className, testID = _a.testID;
|
|
178
|
-
return (jsx(Icon$1, { "data-testid": testID || id || 'Icon', icon: name, width: size, height: size, color: color || 'currentColor', className: className }));
|
|
179
|
-
};
|
|
180
|
-
Icon.displayName = 'Icon';
|
|
181
|
-
|
|
182
|
-
var Loader = function (_a) {
|
|
183
|
-
var color = _a.color, _b = _a.size, size = _b === void 0 ? 8 : _b, _c = _a.thickness, thickness = _c === void 0 ? 4 : _c;
|
|
184
|
-
var sizeClass = size ? "w-".concat(size, " h-").concat(size) : 'w-8 h-8';
|
|
185
|
-
return (jsx("div", { "data-testid": "Loader", className: 'flex items-center justify-center', children: jsxs("div", { role: "status", className: 'flex items-center', children: [jsxs("svg", { className: "animate-spin ".concat(sizeClass, " text-white"), xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", children: [jsx("circle", { className: "opacity-25", cx: "12", cy: "12", r: "10", stroke: color || 'currentColor', strokeWidth: thickness }), jsx("path", { className: "opacity-75", fill: color || 'currentColor', d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z" })] }), jsx("span", { className: "sr-only", children: "Loading..." })] }) }));
|
|
186
|
-
};
|
|
187
|
-
Loader.displayName = 'Loader';
|
|
188
|
-
|
|
189
|
-
var Button = function (_a) {
|
|
190
|
-
var _b, _c, _d, _e;
|
|
191
|
-
var _f = _a.variant, variant = _f === void 0 ? BTN_VARIANTS.PRIMARY : _f, _g = _a.size, size = _g === void 0 ? BTN_SIZES.MEDIUM : _g, _h = _a.type, type = _h === void 0 ? BTN_TYPES.BUTTON : _h, _j = _a.wide, wide = _j === void 0 ? true : _j, _k = _a.rounded, rounded = _k === void 0 ? true : _k, _l = _a.raised, raised = _l === void 0 ? true : _l, uppercase = _a.uppercase, children = _a.children, id = _a.id, disabled = _a.disabled, ariaLabel = _a.ariaLabel, onClick = _a.onClick, icon = _a.icon, external = _a.external, iconFirst = _a.iconFirst, outline = _a.outline, testID = _a.testID, className = _a.className, isLoading = _a.isLoading;
|
|
192
|
-
var smallX = wide ? 'px-5' : 'px-3';
|
|
193
|
-
var mediumX = wide ? 'px-8' : 'px-4';
|
|
194
|
-
var largeX = wide ? 'px-11' : 'px-5';
|
|
195
|
-
var sizes = {
|
|
196
|
-
small: {
|
|
197
|
-
x: children ? smallX : 'px-1',
|
|
198
|
-
y: 'py-1',
|
|
199
|
-
space: 'space-x-2',
|
|
200
|
-
text: 'text-sm',
|
|
201
|
-
icon: 'w-3 h-3',
|
|
202
|
-
},
|
|
203
|
-
medium: {
|
|
204
|
-
x: children ? mediumX : 'px-2',
|
|
205
|
-
y: 'py-2',
|
|
206
|
-
space: 'space-x-3',
|
|
207
|
-
text: 'text-base',
|
|
208
|
-
icon: 'w-5 h-5',
|
|
209
|
-
},
|
|
210
|
-
large: {
|
|
211
|
-
x: children ? largeX : 'px-3',
|
|
212
|
-
y: 'py-3',
|
|
213
|
-
space: 'space-x-4',
|
|
214
|
-
text: 'text-lg',
|
|
215
|
-
icon: 'w-6 h-6',
|
|
216
|
-
},
|
|
217
|
-
};
|
|
218
|
-
var classes = twMerge(cx('appearance-none font-body flex items-center transition-all duration-200 transform active:scale-95 justify-around border-solid border rounded cursor-pointer outline-none focus:outline-none focus-visible:outline-none', { 'border-primary': outline }, { 'border-primary300 dark:border-primary400 hover:border-primary400 dark:hover:border-primary500': outline }, { shadow: raised }, { uppercase: uppercase }, { 'auto-cols-auto grid-cols-2 gap-4': isLoading || icon || external }, { 'rounded-full': rounded }, { 'flex-row-reverse': iconFirst }, { 'opacity-50 cursor-not-allowed': disabled }, "".concat((_b = sizes === null || sizes === void 0 ? void 0 : sizes[size]) === null || _b === void 0 ? void 0 : _b.y, " ").concat((_c = sizes === null || sizes === void 0 ? void 0 : sizes[size]) === null || _c === void 0 ? void 0 : _c.x, " ").concat((_d = sizes === null || sizes === void 0 ? void 0 : sizes[size]) === null || _d === void 0 ? void 0 : _d.text), { 'text-white border-primary bg-primary hover:bg-primary-darker': variant === BTN_VARIANTS.PRIMARY }, { 'text-white border-secondary bg-secondary hover:bg-secondary-darker': variant === BTN_VARIANTS.SECONDARY }, { 'text-black border-tertiary bg-tertiary hover:bg-tertiary-darker': variant === BTN_VARIANTS.TERTIARY }, {
|
|
219
|
-
'px-0 text-primary border-transparent bg-transparent hover:bg-transparent shadow-none group-hover:invert': variant === BTN_VARIANTS.LINK,
|
|
220
|
-
}, className));
|
|
221
|
-
var iconClasses = cx((_e = sizes === null || sizes === void 0 ? void 0 : sizes[size]) === null || _e === void 0 ? void 0 : _e.icon);
|
|
222
|
-
return (jsx("button", { id: id, "data-testid": testID || id || 'Button', onClick: onClick, className: classes, type: type, disabled: disabled, "aria-label": ariaLabel, role: "button", children: jsxs(Fragment, { children: [children, icon && !external && (jsx("span", { className: "flex items-center", children: jsx(Icon, { name: icon, className: iconClasses }) })), external && (jsx("span", { className: "flex items-center", children: jsx(Icon, { name: "carbon:launch", className: iconClasses }) })), isLoading && (jsx("div", { className: "flex items-center", children: jsx(Loader, { size: 4 }) }))] }) }));
|
|
223
|
-
};
|
|
224
|
-
Button.displayName = 'Button';
|
|
225
|
-
|
|
226
|
-
var Checkbox = React.forwardRef(function MyInput(_a, ref) {
|
|
227
|
-
var id = _a.id, label = _a.label, required = _a.required, className = _a.className, disabled = _a.disabled, rest = __rest(_a, ["id", "label", "required", "className", "disabled"]);
|
|
228
|
-
return (jsxs("div", { "data-testid": "Checkbox", className: cx('flex items-center', className), children: [jsxs("div", { className: "relative bg-none w-5 h-5 flex justify-center items-center", children: [jsx("input", __assign({ id: id, ref: ref, disabled: disabled, type: "checkbox", className: "form-item checkbox m-0 appearance-none peer h-full w-full shrink-0 focus:ring-2", required: required }, rest)), jsx("span", { className: "absolute transition-opacity opacity-0 pointer-events-none peer-checked:opacity-100 w-full h-full flex items-center justify-center top-0 left-0", children: jsx(Icon, { name: "mdi:check-bold", size: 12 }) })] }), label && (jsx("label", { className: "label pl-2 leading-none text-sm", htmlFor: id, children: label }))] }));
|
|
229
|
-
});
|
|
230
|
-
Checkbox.displayName = 'Checkbox';
|
|
231
|
-
|
|
232
|
-
var Link = function (_a) {
|
|
233
|
-
var href = _a.href, children = _a.children, _b = _a.onClick, onClick = _b === void 0 ? function () { return console.log('Link clicked'); } : _b, history = _a.history, target = _a.target, id = _a.id, testID = _a.testID, className = _a.className, prefetch = _a.prefetch, _c = _a.hideExternalIcon, hideExternalIcon = _c === void 0 ? false : _c;
|
|
234
|
-
var linkClasses = cx('link cursor-pointer no-underline text-body-text dark:text-dark-body-text', className);
|
|
235
|
-
// Check if link is external
|
|
236
|
-
var isExternal = !hideExternalIcon && href && href.startsWith('http');
|
|
237
|
-
if (isExternal) {
|
|
238
|
-
return (jsxs("span", { children: [jsx("a", { "data-testid": testID || id || 'Link', className: cx(linkClasses), href: href, target: "_blank", rel: "noopener noreferrer", children: children }), jsx(Icon, { name: "mdi:external-link", className: "inline-block w-4 h-4 ml-1 mb-0" })] }));
|
|
239
|
-
}
|
|
240
|
-
// Allow for non-next.js Application usage.
|
|
241
|
-
try {
|
|
242
|
-
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
|
243
|
-
var nextLink = require('next/link').default;
|
|
244
|
-
if (!nextLink)
|
|
245
|
-
throw new Error('Next.js Image not found');
|
|
246
|
-
return React.createElement(nextLink, {
|
|
247
|
-
href: href,
|
|
248
|
-
'data-testid': testID || id || 'Link',
|
|
249
|
-
className: linkClasses,
|
|
250
|
-
target: target || '_self',
|
|
251
|
-
prefetch: prefetch || false,
|
|
252
|
-
}, children);
|
|
253
|
-
}
|
|
254
|
-
catch (_d) {
|
|
255
|
-
console.log('Not using Next Link.');
|
|
256
|
-
var handleClick = function (event) {
|
|
257
|
-
if (onClick) {
|
|
258
|
-
onClick(event);
|
|
259
|
-
return;
|
|
260
|
-
}
|
|
261
|
-
if (event.defaultPrevented === true) {
|
|
262
|
-
return;
|
|
263
|
-
}
|
|
264
|
-
if (history && href) {
|
|
265
|
-
event.preventDefault();
|
|
266
|
-
history.push(href);
|
|
267
|
-
}
|
|
268
|
-
};
|
|
269
|
-
return (jsx("a", { "data-testid": testID || id || 'Link', className: linkClasses, href: href, onClick: handleClick, target: target, children: children }));
|
|
270
|
-
}
|
|
271
|
-
};
|
|
272
|
-
Link.displayName = 'Link';
|
|
273
|
-
|
|
274
|
-
var Chip = function (_a) {
|
|
275
|
-
var testID = _a.testID, text = _a.text, outline = _a.outline, rounded = _a.rounded, variant = _a.variant, _b = _a.size, size = _b === void 0 ? 'medium' : _b, icon = _a.icon, iconFirst = _a.iconFirst, onClick = _a.onClick;
|
|
276
|
-
var classes = twMerge(cx('flex inline-flex items-center justify-center rounded select-none gap-2', { 'border border-solid border-primary': outline }, { 'rounded-full': rounded }, { 'flex-row-reverse': iconFirst }, {
|
|
277
|
-
'bg-primary text-white': variant === 'primary',
|
|
278
|
-
}, { 'bg-secondary text-white': variant === 'secondary' }, { 'bg-info text-white': variant === 'info' }, {
|
|
279
|
-
'bg-success text-white': variant === 'success',
|
|
280
|
-
}, { 'bg-warning text-white': variant === 'warning' }, { 'bg-error text-white': variant === 'error' }, {
|
|
281
|
-
'py-1 px-2': size === 'small',
|
|
282
|
-
}, { 'py-2 px-4': size === 'medium' }, { 'py-3 px-6': size === 'large' }));
|
|
283
|
-
if (onClick && typeof onClick === 'function') {
|
|
284
|
-
return (jsxs(Link, { "data-testid": testID || 'Chip', className: classes, onClick: onClick, children: [jsx("div", { children: text }), icon && (jsx("div", { className: "flex items-center justify-center", children: jsx(Icon, { name: icon }) }))] }));
|
|
285
|
-
}
|
|
286
|
-
return (jsxs("div", { "data-testid": testID || 'Chip', className: classes, children: [jsx("div", { children: text }), icon && (jsx("div", { className: "flex items-center justify-center", children: jsx(Icon, { name: icon }) }))] }));
|
|
287
|
-
};
|
|
288
|
-
Chip.displayName = 'Chip';
|
|
289
|
-
|
|
290
|
-
var COPY_ALIGN;
|
|
291
|
-
(function (COPY_ALIGN) {
|
|
292
|
-
COPY_ALIGN["LEFT"] = "left";
|
|
293
|
-
COPY_ALIGN["CENTER"] = "center";
|
|
294
|
-
COPY_ALIGN["RIGHT"] = "right";
|
|
295
|
-
COPY_ALIGN["JUSTIFY"] = "justify";
|
|
296
|
-
COPY_ALIGN["NOWRAP"] = "nowrap";
|
|
297
|
-
})(COPY_ALIGN || (COPY_ALIGN = {}));
|
|
298
|
-
var COPY_TRANSFORM;
|
|
299
|
-
(function (COPY_TRANSFORM) {
|
|
300
|
-
COPY_TRANSFORM["LOWERCASE"] = "lowercase";
|
|
301
|
-
COPY_TRANSFORM["UPPERCASE"] = "uppercase";
|
|
302
|
-
COPY_TRANSFORM["CAPITALIZE"] = "capitalize";
|
|
303
|
-
COPY_TRANSFORM["NORMALCASE"] = "normal-case";
|
|
304
|
-
})(COPY_TRANSFORM || (COPY_TRANSFORM = {}));
|
|
305
|
-
var COPY_CONTEXTUAL;
|
|
306
|
-
(function (COPY_CONTEXTUAL) {
|
|
307
|
-
COPY_CONTEXTUAL["INVERTED"] = "inverted";
|
|
308
|
-
COPY_CONTEXTUAL["MUTED"] = "muted";
|
|
309
|
-
})(COPY_CONTEXTUAL || (COPY_CONTEXTUAL = {}));
|
|
310
|
-
var COPY_SIZE;
|
|
311
|
-
(function (COPY_SIZE) {
|
|
312
|
-
COPY_SIZE["SMALL"] = "small";
|
|
313
|
-
COPY_SIZE["LARGE"] = "large";
|
|
314
|
-
COPY_SIZE["INTRO"] = "intro";
|
|
315
|
-
})(COPY_SIZE || (COPY_SIZE = {}));
|
|
316
|
-
var COPY_TAG;
|
|
317
|
-
(function (COPY_TAG) {
|
|
318
|
-
COPY_TAG["P"] = "p";
|
|
319
|
-
COPY_TAG["SPAN"] = "span";
|
|
320
|
-
COPY_TAG["DIV"] = "div";
|
|
321
|
-
COPY_TAG["SMALL"] = "small";
|
|
322
|
-
})(COPY_TAG || (COPY_TAG = {}));
|
|
323
|
-
|
|
324
|
-
var Copy = function (_a) {
|
|
325
|
-
var _b;
|
|
326
|
-
var children = _a.children, _c = _a.as, Tag = _c === void 0 ? COPY_TAG.P : _c, size = _a.size, align = _a.align, transform = _a.transform, id = _a.id, className = _a.className, testID = _a.testID;
|
|
327
|
-
var classes = cx((_b = {}, _b["text-".concat(align)] = align, _b), { 'text-sm': size === 'small' }, { 'text-lg': size === 'large' }, { 'text-2xl': size === 'intro' }, { 'mb-3 leading-5 mt-0': Tag === 'p' }, { 'text-sm': Tag === 'small' },
|
|
328
|
-
//'body-text',
|
|
329
|
-
transform, className);
|
|
330
|
-
return (jsx(Tag, { "data-testid": testID || id || 'Copy', className: twMerge(classes), children: children }));
|
|
331
|
-
};
|
|
332
|
-
Copy.displayName = 'Copy';
|
|
333
|
-
|
|
334
|
-
var FileUpload = React.forwardRef(function FileUploadInput(_a, ref) {
|
|
335
|
-
var id = _a.id, name = _a.name, required = _a.required, disabled = _a.disabled, className = _a.className, onChangeCallback = _a.onChangeCallback, onChange = _a.onChange, rest = __rest(_a, ["id", "name", "required", "disabled", "className", "onChangeCallback", "onChange"]);
|
|
336
|
-
var handleFileChange = function (event) {
|
|
337
|
-
if (onChangeCallback && typeof onChangeCallback === 'function') {
|
|
338
|
-
onChangeCallback(event);
|
|
339
|
-
}
|
|
340
|
-
if (onChange && typeof onChange === 'function') {
|
|
341
|
-
onChange({ target: { value: event.target.value, name: name } });
|
|
342
|
-
}
|
|
343
|
-
};
|
|
344
|
-
return (jsx("div", { "data-testid": "FileUpload", className: className, children: jsx("input", __assign({ ref: ref, className: cx('form-item text-input file-upload p-0 relative m-0 min-w-0 flex-auto appearance-none block box-border bg-clip-padding file:p-3 file:cursor-pointer file:mr-3 file:overflow-hidden cursor-pointer file:border-0 file:rounded-none file:border-solid file:border-inherit file:transition file:duration-150 file:ease-in-out file:[border-inline-end-width:1px] file:[margin-inline-end:0.75rem] '), "aria-describedby": name, type: "file", disabled: disabled, required: required, name: name, id: id, onChange: handleFileChange }, rest)) }));
|
|
345
|
-
});
|
|
346
|
-
FileUpload.displayName = 'FileUpload';
|
|
347
|
-
|
|
348
|
-
var HEADING_TAGS;
|
|
349
|
-
(function (HEADING_TAGS) {
|
|
350
|
-
HEADING_TAGS["H1"] = "h1";
|
|
351
|
-
HEADING_TAGS["H2"] = "h2";
|
|
352
|
-
HEADING_TAGS["H3"] = "h3";
|
|
353
|
-
HEADING_TAGS["H4"] = "h4";
|
|
354
|
-
HEADING_TAGS["H5"] = "h5";
|
|
355
|
-
})(HEADING_TAGS || (HEADING_TAGS = {}));
|
|
356
|
-
var HEADING_ALIGN;
|
|
357
|
-
(function (HEADING_ALIGN) {
|
|
358
|
-
HEADING_ALIGN["LEFT"] = "left";
|
|
359
|
-
HEADING_ALIGN["CENTER"] = "center";
|
|
360
|
-
HEADING_ALIGN["RIGHT"] = "right";
|
|
361
|
-
HEADING_ALIGN["JUSTIFY"] = "justify";
|
|
362
|
-
HEADING_ALIGN["NOWRAP"] = "nowrap";
|
|
363
|
-
})(HEADING_ALIGN || (HEADING_ALIGN = {}));
|
|
364
|
-
var HEADING_TRANSFORM;
|
|
365
|
-
(function (HEADING_TRANSFORM) {
|
|
366
|
-
HEADING_TRANSFORM["LOWERCASE"] = "lowercase";
|
|
367
|
-
HEADING_TRANSFORM["UPPERCASE"] = "uppercase";
|
|
368
|
-
HEADING_TRANSFORM["CAPITALIZE"] = "capitalize";
|
|
369
|
-
HEADING_TRANSFORM["NORMAL_CASE"] = "normal-case";
|
|
370
|
-
})(HEADING_TRANSFORM || (HEADING_TRANSFORM = {}));
|
|
371
|
-
|
|
372
|
-
var Heading = function (_a) {
|
|
373
|
-
var _b;
|
|
374
|
-
var children = _a.children, _c = _a.tag, tag = _c === void 0 ? HEADING_TAGS.H2 : _c, transform = _a.transform, align = _a.align, id = _a.id, testID = _a.testID, flush = _a.flush, className = _a.className, singleLine = _a.singleLine;
|
|
375
|
-
var fontSize = function () {
|
|
376
|
-
switch (tag) {
|
|
377
|
-
case 'h1':
|
|
378
|
-
return 'text-5xl md:text-5xl lg:text-5xl';
|
|
379
|
-
case 'h2':
|
|
380
|
-
return 'text-4xl md:text-4xl lg:text-4xl';
|
|
381
|
-
case 'h3':
|
|
382
|
-
return 'text-3xl md:text-3xl lg:text-3xl';
|
|
383
|
-
case 'h4':
|
|
384
|
-
return 'text-2xl md:text-2xl lg:text-2xl';
|
|
385
|
-
case 'h5':
|
|
386
|
-
return 'text-lg md:text-lg lg:text-lg';
|
|
387
|
-
default:
|
|
388
|
-
return 'text-2xl md:text-2xl lg:text-2xl';
|
|
389
|
-
}
|
|
390
|
-
};
|
|
391
|
-
var size = fontSize();
|
|
392
|
-
var Tag = tag;
|
|
393
|
-
var classes = cx("m-0 p-0 font-heading font-bold ".concat(size), (_b = {}, _b["text-".concat(align)] = align, _b), { 'mb-2': !flush }, { 'm-0': flush }, { 'whitespace-nowrap text-ellipsis overflow-hidden': singleLine }, transform, className);
|
|
394
|
-
return (jsx(Tag, { "data-testid": testID || id || 'Heading', className: classes, children: children }));
|
|
395
|
-
};
|
|
396
|
-
Heading.displayName = 'Heading';
|
|
397
|
-
|
|
398
|
-
var Hr = function (_a) {
|
|
399
|
-
var _b = _a.size, size = _b === void 0 ? 'small' : _b;
|
|
400
|
-
return (jsx("hr", { className: cx('border-0 border-b border-dark-body-text dark:border-dark-body-text', {
|
|
401
|
-
'mt-4 mb-4': size === 'small',
|
|
402
|
-
'mt-8 mb-8': size === 'medium',
|
|
403
|
-
'mt-16 mb-16 ': size === 'large',
|
|
404
|
-
}) }));
|
|
405
|
-
};
|
|
406
|
-
Hr.displayName = 'Hr';
|
|
407
|
-
|
|
408
|
-
var Image = function (_a) {
|
|
409
|
-
var src = _a.src, alt = _a.alt, title = _a.title, caption = _a.caption, _b = _a.figure, figure = _b === void 0 ? false : _b, onLoad = _a.onLoad, id = _a.id, className = _a.className, _c = _a.sizes, sizes = _c === void 0 ? '(max-width: 768px) 100vw, (max-width: 1200px) 50vw, 33vw' : _c, testID = _a.testID, rest = __rest(_a, ["src", "alt", "title", "caption", "figure", "onLoad", "id", "className", "sizes", "testID"]);
|
|
410
|
-
try {
|
|
411
|
-
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
|
412
|
-
var nextImage = require('next/image').default;
|
|
413
|
-
if (!nextImage)
|
|
414
|
-
throw new Error('Next.js Image not found');
|
|
415
|
-
var hasFill = !rest.width ? true : false;
|
|
416
|
-
var useSizes = hasFill ? { sizes: sizes } : {};
|
|
417
|
-
return React.createElement(nextImage, __assign(__assign({ src: typeof src === 'string' ? src : src, alt: alt, title: title, fill: hasFill, onLoad: onLoad, className: className }, useSizes), rest));
|
|
418
|
-
}
|
|
419
|
-
catch (_d) {
|
|
420
|
-
var figureClasses = cx('m-0');
|
|
421
|
-
var classes = cx('w-full h-full', className);
|
|
422
|
-
/**
|
|
423
|
-
* Render as a figure.
|
|
424
|
-
*/
|
|
425
|
-
if (figure || caption) {
|
|
426
|
-
return (jsxs("figure", { "data-testid": testID || id || 'Image', className: figureClasses, children: [jsx("img", { onLoad: onLoad, src: src, alt: alt, title: title, className: classes }), caption && jsx("figcaption", { children: caption })] }));
|
|
427
|
-
}
|
|
428
|
-
/**
|
|
429
|
-
* Default render as an image.
|
|
430
|
-
*/
|
|
431
|
-
return (jsx("img", { "data-testid": testID || id || 'Image', onLoad: onLoad, src: src, alt: alt, title: title, className: classes }));
|
|
432
|
-
}
|
|
433
|
-
};
|
|
434
|
-
Image.displayName = 'Image';
|
|
435
|
-
|
|
436
|
-
var Label = function (_a) {
|
|
437
|
-
var children = _a.children, id = _a.id, transform = _a.transform, className = _a.className;
|
|
438
|
-
return (jsx("label", { "data-testid": "Label", className: twMerge(cx('label mb-2', transform, className)), htmlFor: id, children: children }));
|
|
439
|
-
};
|
|
440
|
-
Label.displayName = 'Label';
|
|
441
|
-
|
|
442
|
-
var Variants;
|
|
443
|
-
(function (Variants) {
|
|
444
|
-
Variants["UNSTYLED"] = "unstyled";
|
|
445
|
-
Variants["INLINE"] = "inline";
|
|
446
|
-
Variants["SMALL"] = "small";
|
|
447
|
-
Variants["LARGE"] = "large";
|
|
448
|
-
})(Variants || (Variants = {}));
|
|
449
|
-
var ListTag;
|
|
450
|
-
(function (ListTag) {
|
|
451
|
-
ListTag["OL"] = "ol";
|
|
452
|
-
ListTag["UL"] = "ul";
|
|
453
|
-
ListTag["DL"] = "dl";
|
|
454
|
-
ListTag["DIV"] = "div";
|
|
455
|
-
ListTag["DT"] = "dt";
|
|
456
|
-
ListTag["DD"] = "dd";
|
|
457
|
-
ListTag["LI"] = "li";
|
|
458
|
-
})(ListTag || (ListTag = {}));
|
|
459
|
-
|
|
460
|
-
var List = function (_a) {
|
|
461
|
-
var variants = _a.variants, children = _a.children, _b = _a.as, as = _b === void 0 ? ListTag.UL : _b, id = _a.id, testID = _a.testID, className = _a.className;
|
|
462
|
-
var modifiers = variants ? variants.map(function (el) { return "list--".concat(el); }) : null;
|
|
463
|
-
var Tag = as;
|
|
464
|
-
return (jsx(Tag, { "data-testid": testID || id || 'List', className: cx(modifiers, className), children: children }));
|
|
465
|
-
};
|
|
466
|
-
List.displayName = 'List';
|
|
467
|
-
|
|
468
|
-
var Logo = function (_a) {
|
|
469
|
-
var testID = _a.testID, logo = _a.logo, className = _a.className, _b = _a.aspectRatioClass, aspectRatioClass = _b === void 0 ? 'aspect-[1/1]' : _b;
|
|
470
|
-
return (jsx("div", { "data-testid": testID || 'Logo', className: cx('relative w-full', aspectRatioClass, className), children: jsx(Image, { src: logo, alt: "logo", fill: true, sizes: "(max-width: 600px) 100px, 200px", priority: true }) }));
|
|
471
|
-
};
|
|
472
|
-
Logo.displayName = 'Logo';
|
|
473
|
-
|
|
474
|
-
var Notice = function (_a) {
|
|
475
|
-
var id = _a.id, testID = _a.testID, title = _a.title, text = _a.text, icon = _a.icon, type = _a.type, onCloseCallback = _a.onCloseCallback, onClickCallback = _a.onClickCallback, actionText = _a.actionText;
|
|
476
|
-
var classes = cx('p-4 rounded relative', {
|
|
477
|
-
'bg-info text-white': type === 'info',
|
|
478
|
-
'bg-success text-white': type === 'success',
|
|
479
|
-
'bg-warning text-black': type === 'warning',
|
|
480
|
-
'bg-error text-white': type === 'error',
|
|
481
|
-
});
|
|
482
|
-
return (jsx("div", { "data-testid": testID || id || 'Notice', className: classes, children: jsxs("div", { className: "flex gap-2", children: [icon && (jsx("div", { className: "mr-2", children: jsx(Icon, { name: icon }) })), jsxs("div", { children: [title && jsx(Heading, { tag: HEADING_TAGS.H3, children: title }), jsx(Copy, { className: "mb-0", children: text })] }), onClickCallback && actionText && (jsx("div", { className: "ml-auto flex items-end", children: jsx(Button, { variant: BTN_VARIANTS.PRIMARY, onClick: onClickCallback, "aria-label": "Action", size: BTN_SIZES.SMALL, children: actionText }) })), onCloseCallback && (jsx("div", { className: "absolute top-2 right-4", children: jsx(Button, { variant: BTN_VARIANTS.LINK, icon: "mdi:close", onClick: onCloseCallback, "aria-label": "Close" }) }))] }) }));
|
|
483
|
-
};
|
|
484
|
-
Notice.displayName = 'Notice';
|
|
485
|
-
|
|
486
|
-
var Radio = React.forwardRef(function MyInput(_a, ref) {
|
|
487
|
-
var name = _a.name, required = _a.required, className = _a.className, options = _a.options, rest = __rest(_a, ["name", "required", "className", "options"]);
|
|
488
|
-
return (jsx("div", { "data-testid": "Radio", className: cx('flex items-center', className), children: jsx("div", { className: cx('flex flex-col gap-2', className), children: options === null || options === void 0 ? void 0 : options.map(function (option) {
|
|
489
|
-
var _a;
|
|
490
|
-
var value = ((_a = option === null || option === void 0 ? void 0 : option.value) === null || _a === void 0 ? void 0 : _a.toString()) || undefined;
|
|
491
|
-
return (jsxs("div", { className: "flex items-center relative", children: [jsxs("div", { className: "relative flex items-center", children: [jsx("input", __assign({ ref: ref, name: name, type: "radio", required: required, className: "form-item radio peer appearance-none m-0 p-0 w-4 h-4" }, rest, {
|
|
492
|
-
// Prevent controller overriding radio values.
|
|
493
|
-
id: value, value: value })), jsx("div", { className: "form-icon opacity-0 peer-checked:opacity-100 absolute w-4 h-4 flex items-center justify-center top-0 left-0 pointer-events-none", children: jsx(Icon, { name: "mdi:circle", size: 12 }) })] }), jsx("label", { className: "label pl-2 leading-none", htmlFor: value, children: option.label })] }, value));
|
|
494
|
-
}) }) }));
|
|
495
|
-
});
|
|
496
|
-
Radio.displayName = 'Radio';
|
|
497
|
-
|
|
498
|
-
var Switch = React.forwardRef(function MyInput(_a, ref) {
|
|
499
|
-
var id = _a.id, name = _a.name, required = _a.required, disabled = _a.disabled, className = _a.className, rest = __rest(_a, ["id", "name", "required", "disabled", "className"]);
|
|
500
|
-
return (jsxs("label", { "data-testid": "Switch", className: cx('inline-flex items-center cursor-pointer', className), children: [jsx("input", __assign({ ref: ref, id: id, name: name, type: "checkbox", value: "", className: "sr-only peer", disabled: disabled, required: required }, rest)), jsx("div", { className: "form-item switch peer-focus:ring-info dark:peer-focus:ring-info relative w-11 h-6 peer-checked:after:translate-x-full rtl:peer-checked:after:-translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[1px] after:start-[1px] after:bg-white after:border after:rounded-full after:h-5 after:w-5 after:transition-all transition-all" })] }));
|
|
501
|
-
});
|
|
502
|
-
Switch.displayName = 'Switch';
|
|
503
|
-
|
|
504
|
-
var InputType;
|
|
505
|
-
(function (InputType) {
|
|
506
|
-
InputType["TEXT"] = "text";
|
|
507
|
-
InputType["PASSWORD"] = "password";
|
|
508
|
-
InputType["EMAIL"] = "email";
|
|
509
|
-
InputType["NUMBER"] = "number";
|
|
510
|
-
InputType["TEL"] = "tel";
|
|
511
|
-
InputType["URL"] = "url";
|
|
512
|
-
InputType["SEARCH"] = "search";
|
|
513
|
-
InputType["DATE"] = "date";
|
|
514
|
-
InputType["TIME"] = "time";
|
|
515
|
-
InputType["DATETIME"] = "datetime-local";
|
|
516
|
-
InputType["MONTH"] = "month";
|
|
517
|
-
InputType["WEEK"] = "week";
|
|
518
|
-
InputType["FILE"] = "file";
|
|
519
|
-
InputType["TEXTAREA"] = "textarea";
|
|
520
|
-
InputType["HIDDEN"] = "hidden";
|
|
521
|
-
})(InputType || (InputType = {}));
|
|
522
|
-
|
|
523
|
-
var TextInput = React.forwardRef(function MyInput(_a, ref) {
|
|
524
|
-
var _b = _a.type, type = _b === void 0 ? InputType.TEXT : _b, _c = _a.required, required = _c === void 0 ? false : _c, className = _a.className, onChange = _a.onChange, placeholder = _a.placeholder, icon = _a.icon, _d = _a.disabled, disabled = _d === void 0 ? false : _d, name = _a.name, autoComplete = _a.autoComplete, rest = __rest(_a, ["type", "required", "className", "onChange", "placeholder", "icon", "disabled", "name", "autoComplete"]);
|
|
525
|
-
React.useEffect(function () {
|
|
526
|
-
if (typeof window !== 'undefined') {
|
|
527
|
-
// eslint-disable-next-line global-require
|
|
528
|
-
require('date-input-polyfill');
|
|
529
|
-
}
|
|
530
|
-
}, []);
|
|
531
|
-
var format = 'dd/mm/yyyy';
|
|
532
|
-
var placeholderSet = type === 'date' ? format.toUpperCase() : placeholder;
|
|
533
|
-
if (type === InputType.TEXTAREA) {
|
|
534
|
-
return (jsx("div", { "data-testid": "TextInput", className: "relative", children: jsx("textarea", __assign({ ref: ref, id: name, autoComplete: name, required: required, "aria-required": required, disabled: disabled, placeholder: placeholderSet, onChange: onChange, rows: 4, className: cx('form-item text-input resize-none', className) }, rest)) }));
|
|
535
|
-
}
|
|
536
|
-
return (jsxs("div", { "data-testid": "TextInput", className: "relative", children: [icon && (jsx("div", { className: "form-icon absolute inset-y-0 start-3 flex items-center ps-3.5 pointer-events-none", children: jsx(Icon, { name: icon }) })), jsx("input", __assign({ ref: ref, id: name, type: type, autoComplete: autoComplete, required: required, "aria-required": required, disabled: disabled, placeholder: placeholderSet, onChange: onChange, className: cx('form-item text-input', { 'pl-12': icon }, className) }, rest))] }));
|
|
537
|
-
});
|
|
538
|
-
TextInput.displayName = 'TextInput';
|
|
539
|
-
|
|
540
|
-
var en = {
|
|
541
|
-
GLOBAL: {},
|
|
542
|
-
FORMS: {
|
|
543
|
-
LOGIN_FORM: {
|
|
544
|
-
TITLE: 'Login',
|
|
545
|
-
SUBMIT: 'Login',
|
|
546
|
-
FORGOT_PASSWORD: 'Forgot password?',
|
|
547
|
-
REGISTER: 'Register',
|
|
548
|
-
EMAIL: 'Email',
|
|
549
|
-
PASSWORD: 'Password',
|
|
550
|
-
},
|
|
551
|
-
REGISTER_FORM: {
|
|
552
|
-
TITLE: 'Register',
|
|
553
|
-
SUBMIT: 'Register',
|
|
554
|
-
EMAIL: 'Email',
|
|
555
|
-
PASSWORD: 'Password',
|
|
556
|
-
PASSWORD_DESCRIPTION: 'Password must be at least 8 characters long and contain at least one number, one uppercase letter, one lowercase letter, and one special character.',
|
|
557
|
-
},
|
|
558
|
-
FORGOT_PASSWORD_FORM: {
|
|
559
|
-
TITLE: 'Forgot Password',
|
|
560
|
-
SUBMIT: 'Send Reset Email',
|
|
561
|
-
EMAIL: 'Email',
|
|
562
|
-
},
|
|
563
|
-
RESET_PASSWORD_FORM: {
|
|
564
|
-
TITLE: 'Reset Password',
|
|
565
|
-
SUBMIT: 'Reset Password',
|
|
566
|
-
PASSWORD: 'Password',
|
|
567
|
-
CONFIRM_PASSWORD: 'Confirm Password',
|
|
568
|
-
},
|
|
569
|
-
PROFILE_FORM: {
|
|
570
|
-
TITLE: 'Profile',
|
|
571
|
-
SUBMIT: 'Save',
|
|
572
|
-
FIRST_NAME: 'First Name',
|
|
573
|
-
LAST_NAME: 'Last Name',
|
|
574
|
-
AVATAR: 'Avatar',
|
|
575
|
-
EMAIL: 'Email',
|
|
576
|
-
PASSWORD: 'Password',
|
|
577
|
-
PASSWORD_DESCRIPTION: 'Password must be at least 8 characters long and contain at least one number, one uppercase letter, one lowercase letter, and one special character.',
|
|
578
|
-
},
|
|
579
|
-
},
|
|
580
|
-
UI: {
|
|
581
|
-
SHOW: 'Show',
|
|
582
|
-
NO_IMAGE: 'No image',
|
|
583
|
-
UPLOAD: 'Upload',
|
|
584
|
-
SAVE: 'Save',
|
|
585
|
-
CANCEL: 'Cancel',
|
|
586
|
-
DELETE: 'Delete',
|
|
587
|
-
LOGIN_WITH_GOOGLE: 'Login with Google',
|
|
588
|
-
LOGIN_WITH_APPLE: 'Login with Apple',
|
|
589
|
-
SIGNUP_WITH_GOOGLE: 'Signup with Google',
|
|
590
|
-
SIGNUP_WITH_APPLE: 'Signup with Apple',
|
|
591
|
-
BACK_TO_LOGIN: 'Back to Login',
|
|
592
|
-
FORGOT_PASSWORD: 'Forgot Password?',
|
|
593
|
-
SUBMIT: 'Submit',
|
|
594
|
-
LOGIN: 'Login',
|
|
595
|
-
LOGOUT: 'Logout',
|
|
596
|
-
REGISTER: 'Register',
|
|
597
|
-
SOCIAL: {
|
|
598
|
-
GOOGLE: 'Google',
|
|
599
|
-
FACEBOOK: 'Facebook',
|
|
600
|
-
TWITTER: 'Twitter',
|
|
601
|
-
EMAIL: 'Email',
|
|
602
|
-
},
|
|
603
|
-
READ_MORE: 'Read more',
|
|
604
|
-
READ_LESS: 'Show less',
|
|
605
|
-
CLOSE: 'Close',
|
|
606
|
-
BACK: 'Back',
|
|
607
|
-
SHARE: 'Share',
|
|
608
|
-
DOWNLOAD: 'Download',
|
|
609
|
-
FORMAT_HOUR: '{hour}hr',
|
|
610
|
-
FORMAT_HOURS: '{hours}hrs',
|
|
611
|
-
FORMAT_MINUTE: '{minute}min',
|
|
612
|
-
FORMAT_MINUTES: '{minutes}mins',
|
|
613
|
-
LOAD_MORE_LABEL: 'Load more',
|
|
614
|
-
NO_MORE_RESULTS: "That's all folks.",
|
|
615
|
-
UNKNOWN_ERROR_TITLE: 'Unknown error',
|
|
616
|
-
UNKNOWN_ERROR_MESSAGE: 'Sorry, something bad happened! Please try again.',
|
|
617
|
-
CONTENT_SORT_TITLE: 'Sort by',
|
|
618
|
-
CONTENT_FILTERS_TITLE: 'Filters',
|
|
619
|
-
CONTENT_FILTERS_LABEL: 'Filter',
|
|
620
|
-
CLOSE_FILTERS_LABEL: 'Done',
|
|
621
|
-
CLEAR_ALL_FILTERS_LABEL: 'Clear All',
|
|
622
|
-
CLEAR_FILTERS_LABEL: 'Clear',
|
|
623
|
-
MORE_ITEMS_LABEL: 'Next items',
|
|
624
|
-
PREVIOUS_ITEMS_LABEL: 'Previous items',
|
|
625
|
-
CHOOSE_BTN_LABEL: 'Choose',
|
|
626
|
-
ADD_BTN_LABEL: 'Add',
|
|
627
|
-
SEND_BTN_LABEL: 'Send',
|
|
628
|
-
CANCEL_BTN_LABEL: 'Cancel',
|
|
629
|
-
DONE_BTN_LABEL: 'Done',
|
|
630
|
-
EDIT_BTN_LABEL: 'Edit',
|
|
631
|
-
CHANGE_BTN_LABEL: 'Change',
|
|
632
|
-
REMOVE_BTN_LABEL: 'Remove',
|
|
633
|
-
MESSAGE_PROMPT_BTN_LABEL: 'Add one',
|
|
634
|
-
SELECT_FILE_BTN_LABEL: 'Select file',
|
|
635
|
-
TOO_MANY_REQUESTS_MESSAGE: 'Too many requests. Please try again later.',
|
|
636
|
-
COPYRIGHT: 'Copyright',
|
|
637
|
-
ALL_RIGHTS_RESERVED: 'All rights reserved',
|
|
638
|
-
},
|
|
639
|
-
ERRORS: {},
|
|
640
|
-
};
|
|
641
|
-
|
|
642
|
-
var Avatar = function (_a) {
|
|
643
|
-
var testID = _a.testID, _b = _a.name, name = _b === void 0 ? 'avatar' : _b, _c = _a.isEditable, isEditable = _c === void 0 ? true : _c, initValue = _a.initValue;
|
|
644
|
-
var _d = React.useState(initValue), file = _d[0], setFile = _d[1];
|
|
645
|
-
return (jsxs("div", { "data-testid": testID || '"Avatar"', className: "foo-bar", children: [jsxs("div", { className: "relative w-[200px] aspect-1 rounded-full border border-solid overflow-hidden flex items-center justify-center m-4", children: [file && (jsxs(Fragment, { children: [jsx(Image, { src: file, alt: name, width: 200, height: 200 }), isEditable && (jsx("div", { className: "absolute w-full h-full flex items-center justify-center", children: jsx(Button, { onClick: function () {
|
|
646
|
-
setFile(undefined);
|
|
647
|
-
}, children: en.UI.REMOVE_BTN_LABEL }) }))] })), !file && (jsxs(Fragment, { children: [jsx("div", { className: "w-full h-full flex items-center justify-center" }), isEditable && (jsx("div", { className: "absolute w-full h-full flex items-center justify-center", children: jsx(Label, { id: name, className: "button cursor-pointer mb-0", children: jsx(Copy, { className: "mb-0", children: en.UI.UPLOAD }) }) }))] }))] }), jsx("input", { type: "file", id: name, name: name, className: "hidden", onChange: function (event) {
|
|
648
|
-
var _a;
|
|
649
|
-
var file = (_a = event.target.files) === null || _a === void 0 ? void 0 : _a[0];
|
|
650
|
-
if (file) {
|
|
651
|
-
var imageURL = URL.createObjectURL(file);
|
|
652
|
-
setFile(imageURL);
|
|
653
|
-
}
|
|
654
|
-
} })] }));
|
|
655
|
-
};
|
|
656
|
-
Avatar.displayName = 'Avatar';
|
|
657
|
-
|
|
658
|
-
var AnimationSet1 = function (_a) {
|
|
659
|
-
var testID = _a.testID, bgAsset = _a.bgAsset, focalAsset1 = _a.focalAsset1, focalAsset2 = _a.focalAsset2, focalAsset3 = _a.focalAsset3;
|
|
660
|
-
var ref = useRef(null);
|
|
661
|
-
var isInView = useInView(ref);
|
|
662
|
-
console.log('isInView', isInView);
|
|
663
|
-
// Animation data.
|
|
664
|
-
var assetsInitial = { opacity: 0.001, rotate: 0, scale: 1, x: 200, y: 0 };
|
|
665
|
-
var assetsAnimate = {
|
|
666
|
-
opacity: 1,
|
|
667
|
-
rotate: 0,
|
|
668
|
-
rotateX: 0,
|
|
669
|
-
rotateY: 0,
|
|
670
|
-
scale: 1,
|
|
671
|
-
transition: { damping: 60, delay: 0, mass: 1.2, stiffness: 300, type: 'spring' },
|
|
672
|
-
x: 0,
|
|
673
|
-
y: 0,
|
|
674
|
-
};
|
|
675
|
-
return (jsxs("div", { "data-testid": testID || 'AnimationSet1', className: cx("relative w-full h-full"), children: [bgAsset && (jsx(motion.div, { className: "absolute left-1/2 top-1/2 w-full h-full", initial: {
|
|
676
|
-
opacity: 0.001,
|
|
677
|
-
rotate: 0,
|
|
678
|
-
scale: 0.5,
|
|
679
|
-
x: 0,
|
|
680
|
-
y: 0,
|
|
681
|
-
perspective: '1200px',
|
|
682
|
-
translateX: '-50%',
|
|
683
|
-
translateY: '-50%',
|
|
684
|
-
}, animate: {
|
|
685
|
-
opacity: 0.5,
|
|
686
|
-
rotate: 0,
|
|
687
|
-
rotateX: 0,
|
|
688
|
-
rotateY: 0,
|
|
689
|
-
scale: 1.25,
|
|
690
|
-
transition: { damping: 60, delay: 0.7, mass: 1.2, stiffness: 300, type: 'spring' },
|
|
691
|
-
perspective: '1200px',
|
|
692
|
-
translateX: '-50%',
|
|
693
|
-
translateY: '-50%',
|
|
694
|
-
x: 0,
|
|
695
|
-
y: 0,
|
|
696
|
-
}, transition: { duration: 0.5 }, children: jsx(Image, { src: bgAsset.src, alt: bgAsset.alt, fill: true }) })), (focalAsset1 || focalAsset2) && (jsxs(motion.div, { className: "absolute right-0 top-1/2 z-10 overflow-visible w-3/4 aspect-[0.78/1]", style: { transform: 'translateY(-50%)' }, children: [focalAsset1 && (jsx(motion.div, { className: "absolute w-1/2 aspect-[0.35/1] right-16 top-0", initial: assetsInitial, animate: assetsAnimate, children: jsx(Image, { src: focalAsset1.src, alt: focalAsset1.alt, fill: true }) })), focalAsset2 && (jsx(motion.div, { className: "absolute w-1/2 aspect-[0.5/1] left-0 top-20", initial: assetsInitial, animate: __assign(__assign({}, assetsAnimate), { transition: __assign(__assign({}, assetsAnimate.transition), { delay: 0.3 }) }), children: jsx(Image, { src: focalAsset2.src, alt: focalAsset2.alt, fill: true }) }))] })), focalAsset3 && (jsx("div", { className: "absolute w-1/4 aspect-[0.5/1] flex flex-col flex-nowrap p-0 top-10 z-20 items-end justify-end left-10", children: jsx(motion.div, { className: "relative w-full overflow-visible aspect-[1.2/1]", initial: { opacity: 0.001, rotate: 0, scale: 1, x: 100, y: 0 }, animate: {
|
|
697
|
-
opacity: 1,
|
|
698
|
-
rotate: 0,
|
|
699
|
-
rotateX: 0,
|
|
700
|
-
rotateY: 0,
|
|
701
|
-
scale: 1,
|
|
702
|
-
transition: { damping: 60, delay: 0.6, mass: 1.2, stiffness: 300, type: 'spring' },
|
|
703
|
-
x: 0,
|
|
704
|
-
y: 0,
|
|
705
|
-
}, children: jsx(Image, { src: focalAsset3.src, fill: true, alt: focalAsset3.alt }) }) }))] }));
|
|
706
|
-
};
|
|
707
|
-
AnimationSet1.displayName = 'AnimationSet1';
|
|
708
|
-
|
|
709
|
-
var Tabs = function (_a) {
|
|
710
|
-
var data = _a.data;
|
|
711
|
-
var _b = React.useState(0), activeTab = _b[0], setActiveTab = _b[1];
|
|
712
|
-
if (!data) {
|
|
713
|
-
return jsx(Fragment, {});
|
|
714
|
-
}
|
|
715
|
-
return (jsx("div", { "data-testid": "Tabs", children: jsxs(Tabs$1, { onSelect: function (index) { return setActiveTab(index); }, children: [jsx(TabList, { className: "mb-8 flex p-0", children: data.map(function (tab, index) {
|
|
716
|
-
return (jsx(Tab, { className: cx('list-none rel ative cursor-pointer inline-block flex-1 items-center justify-center p-4', {
|
|
717
|
-
'border-transparent border-solid border-0 border-b-2': activeTab !== index,
|
|
718
|
-
'border-primary border-solid border-0 border-b-2': activeTab === index,
|
|
719
|
-
}), children: jsx(Copy, { className: "m-0 text-center", children: tab.title }) }, index));
|
|
720
|
-
}) }), data.map(function (tab, index) { return (jsx(TabPanel, { className: "", children: tab.content }, index)); })] }) }));
|
|
721
|
-
};
|
|
722
|
-
Tabs.displayName = 'Tabs';
|
|
723
|
-
|
|
724
|
-
var socialLoginUrlGoogle = "".concat(process.env.AWS_COGNITO_USERPOOL_DOMAIN, "/oauth2/authorize?client_id=").concat(process.env.AWS_COGNITO_CLIENT_ID, "&response_type=code&scope=aws.cognito.signin.user.admin+email+openid+profile&identity_provider=Google&redirect_uri=").concat(process.env.AWS_COGNITO_REDIRECT_URI);
|
|
725
|
-
var socialLoginUrlApple = "".concat(process.env.AWS_COGNITO_USERPOOL_DOMAIN, "/oauth2/authorize?client_id=").concat(process.env.AWS_COGNITO_CLIENT_ID, "&response_type=CODE&scope=aws.cognito.signin.user.admin+email+openid+profile&identity_provider=SignInWithApple&redirect_uri=").concat(process.env.AWS_COGNITO_REDIRECT_URI);
|
|
726
|
-
|
|
727
|
-
var validEmail = {
|
|
728
|
-
required: 'Email required',
|
|
729
|
-
pattern: {
|
|
730
|
-
value: /^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,}$/i,
|
|
731
|
-
message: 'Invalid email address',
|
|
732
|
-
},
|
|
733
|
-
};
|
|
734
|
-
var validPassword = {
|
|
735
|
-
required: 'You must specify a password',
|
|
736
|
-
minLength: {
|
|
737
|
-
value: 8,
|
|
738
|
-
message: 'Password must have at least 8 characters',
|
|
739
|
-
},
|
|
740
|
-
pattern: {
|
|
741
|
-
value: /^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[a-zA-Z]).{8,}$/,
|
|
742
|
-
message: 'Password must contain contain at least one number, one uppercase letter, one lowercase letter, and one special character.',
|
|
743
|
-
},
|
|
744
|
-
};
|
|
745
|
-
|
|
746
|
-
var Form = function (_a) {
|
|
747
|
-
var children = _a.children, className = _a.className, submit = _a.submit, _b = _a.onSubmit, onSubmit = _b === void 0 ? function () { } : _b, onChange = _a.onChange, hideSubmit = _a.hideSubmit, ariaSubmitLabel = _a.ariaSubmitLabel, submitID = _a.submitID, _c = _a.submitVariant, submitVariant = _c === void 0 ? BTN_VARIANTS.PRIMARY : _c, _d = _a.initialValues, initialValues = _d === void 0 ? {} : _d, _e = _a.isBoxed, isBoxed = _e === void 0 ? false : _e, _f = _a.submitType, submitType = _f === void 0 ? BTN_TYPES.SUBMIT : _f, _g = _a.disabledSubmitWithReturn, disabledSubmitWithReturn = _g === void 0 ? false : _g, _h = _a.isDisabled, isDisabled = _h === void 0 ? false : _h;
|
|
748
|
-
var methods = useForm({
|
|
749
|
-
defaultValues: initialValues,
|
|
750
|
-
mode: 'onBlur',
|
|
751
|
-
reValidateMode: 'onChange',
|
|
752
|
-
});
|
|
753
|
-
useEffect(function () {
|
|
754
|
-
if (onChange && typeof onChange === 'function') {
|
|
755
|
-
var subscription_1 = methods.watch(function (value, event) {
|
|
756
|
-
onChange(value, event);
|
|
757
|
-
});
|
|
758
|
-
return function () { return subscription_1.unsubscribe(); };
|
|
759
|
-
}
|
|
760
|
-
}, []);
|
|
761
|
-
var submitClasses = cx({ 'sr-only': hideSubmit });
|
|
762
|
-
var _j = methods.formState, isSubmitting = _j.isSubmitting, isDirty = _j.isDirty, isValid = _j.isValid;
|
|
763
|
-
return (jsx(FormProvider, __assign({}, methods, { children: jsx("div", { "data-testid": "Form", className: cx('w-full max-w-s @containers @form'), children: jsxs("form", { onSubmit: methods.handleSubmit(onSubmit), onKeyDown: function (event) {
|
|
764
|
-
if (disabledSubmitWithReturn && event.key === 'Enter') {
|
|
765
|
-
event.preventDefault();
|
|
766
|
-
}
|
|
767
|
-
}, className: cx('w-2xs relative', { 'form px-8 pt-6 pb-8 ': isBoxed }, { 'opacity-50': isSubmitting }, className), children: [children, submit && (jsx("div", { className: "flex items-center justify-end", children: jsx(Button, { id: submitID || submit, className: submitClasses, ariaLabel: ariaSubmitLabel || submit || 'Submit', type: submitType, outline: true, isLoading: isSubmitting, disabled: isSubmitting || !isValid || !isDirty || isDisabled, variant: submitVariant, children: submit }) }))] }) }) })));
|
|
768
|
-
};
|
|
769
|
-
Form.displayName = 'Form';
|
|
770
|
-
|
|
771
|
-
var FIELD_TYPES;
|
|
772
|
-
(function (FIELD_TYPES) {
|
|
773
|
-
FIELD_TYPES["TEXT"] = "text";
|
|
774
|
-
FIELD_TYPES["TEXTAREA"] = "textarea";
|
|
775
|
-
FIELD_TYPES["SELECT"] = "select";
|
|
776
|
-
FIELD_TYPES["CHECKBOX"] = "checkbox";
|
|
777
|
-
FIELD_TYPES["RADIO"] = "radio";
|
|
778
|
-
FIELD_TYPES["SWITCH"] = "switch";
|
|
779
|
-
FIELD_TYPES["DATE"] = "date";
|
|
780
|
-
FIELD_TYPES["TIME"] = "time";
|
|
781
|
-
FIELD_TYPES["DATETIME"] = "datetime";
|
|
782
|
-
FIELD_TYPES["FILE"] = "file";
|
|
783
|
-
FIELD_TYPES["PASSWORD"] = "password";
|
|
784
|
-
FIELD_TYPES["EMAIL"] = "email";
|
|
785
|
-
FIELD_TYPES["NUMBER"] = "number";
|
|
786
|
-
FIELD_TYPES["TEL"] = "tel";
|
|
787
|
-
FIELD_TYPES["URL"] = "url";
|
|
788
|
-
FIELD_TYPES["SEARCH"] = "search";
|
|
789
|
-
FIELD_TYPES["HIDDEN"] = "hidden";
|
|
790
|
-
// MONTH = 'month',
|
|
791
|
-
// WEEK = 'week',
|
|
792
|
-
// HIDDEN = 'hidden',
|
|
793
|
-
// COLOR = 'color',
|
|
794
|
-
// RANGE = 'range',
|
|
795
|
-
// CURRENCY = 'currency',
|
|
796
|
-
// PERCENT = 'percent',
|
|
797
|
-
})(FIELD_TYPES || (FIELD_TYPES = {}));
|
|
798
|
-
|
|
799
|
-
var FormSelect = React.forwardRef(function MyInput(_a, ref) {
|
|
800
|
-
var id = _a.id, name = _a.name, options = _a.options, required = _a.required, className = _a.className, disabled = _a.disabled, rest = __rest(_a, ["id", "name", "options", "required", "className", "disabled"]);
|
|
801
|
-
if (!options) {
|
|
802
|
-
throw new Error('FormSelect requires options prop');
|
|
803
|
-
}
|
|
804
|
-
return (jsx("div", { id: id, className: cx('pb-2 min-w-20', className), children: jsxs("div", { className: "relative", children: [jsx("select", __assign({ ref: ref,
|
|
805
|
-
// id={id}
|
|
806
|
-
name: name, disabled: disabled, required: required, className: "form-item text-input" }, rest, { children: options.map(function (option, index) {
|
|
807
|
-
var _a, _b;
|
|
808
|
-
return (jsx("option", { value: (_a = option === null || option === void 0 ? void 0 : option.value) === null || _a === void 0 ? void 0 : _a.toString(), disabled: option.disabled, className: "bg-body-background dark:bg-dark-body-background", children: option.label }, "".concat((_b = option === null || option === void 0 ? void 0 : option.value) === null || _b === void 0 ? void 0 : _b.toString(), "--").concat(index)));
|
|
809
|
-
}) })), jsx("div", { className: "form-icon absolute inset-0 z-10 pointer-events-none h-full w-12 items-center justify-center top-0 right-0 left-auto flex", children: jsx(Icon, { name: "mdi:chevron-down", size: 24, className: "pointer-events-none" }) })] }) }));
|
|
810
|
-
});
|
|
811
|
-
FormSelect.displayName = 'FormSelect';
|
|
812
|
-
|
|
813
|
-
var FormField = function (_a) {
|
|
814
|
-
var _b, _c;
|
|
815
|
-
var name = _a.name, type = _a.type, label = _a.label, required = _a.required, className = _a.className, icon = _a.icon, options = _a.options, disabled = _a.disabled, description = _a.description, showPasswordLabel = _a.showPasswordLabel, hidePasswordLabel = _a.hidePasswordLabel, _d = _a.validations, validations = _d === void 0 ? {} : _d, _e = _a.fileUploadCallback, fileUploadCallback = _e === void 0 ? function () { } : _e, autoComplete = _a.autoComplete;
|
|
816
|
-
var _f = useState(false), passwordShowStatus = _f[0], setPasswordShow = _f[1];
|
|
817
|
-
var _g = useFormContext(), control = _g.control, formState = _g.formState;
|
|
818
|
-
var errors = formState.errors;
|
|
819
|
-
var renderType = function (type, field) {
|
|
820
|
-
switch (type) {
|
|
821
|
-
case FIELD_TYPES.HIDDEN:
|
|
822
|
-
return jsx("input", __assign({ type: InputType.HIDDEN, disabled: disabled }, field));
|
|
823
|
-
case FIELD_TYPES.TEXT:
|
|
824
|
-
return (jsx(TextInput, __assign({ type: InputType.TEXT, required: required || Boolean(validations.required), icon: icon, className: className, disabled: disabled, autoComplete: autoComplete }, field)));
|
|
825
|
-
case FIELD_TYPES.PASSWORD: {
|
|
826
|
-
var toggleType = passwordShowStatus ? InputType.TEXT : InputType.PASSWORD;
|
|
827
|
-
var btnClass = 'appearance-none border-none bg-transparent flex items-center';
|
|
828
|
-
return (jsxs("div", { className: "relative", children: [jsx("span", { className: "absolute right-0 top-0 flex items-center justify-center h-full z-10 pr-2", onClick: function () { return setPasswordShow(function (pS) { return !pS; }); }, role: "button", tabIndex: 0, children: passwordShowStatus ? (jsx("button", { type: "button", "aria-label": hidePasswordLabel, className: cx(btnClass, 'form-icon'), children: jsx(Icon, { name: "mdi:eye-off", size: 24 }) })) : (jsx("button", { type: "button", "aria-label": showPasswordLabel, className: cx(btnClass, 'form-icon'), children: jsx(Icon, { name: "mdi:eye", size: 24 }) })) }), jsx(TextInput, __assign({ type: toggleType, required: required || Boolean(validations.required), icon: icon, className: className, disabled: disabled, autoComplete: autoComplete }, field))] }));
|
|
829
|
-
}
|
|
830
|
-
case FIELD_TYPES.TEXTAREA:
|
|
831
|
-
return (jsx(TextInput, __assign({ type: InputType.TEXTAREA, required: required || Boolean(validations.required), icon: icon, className: className, disabled: disabled }, field)));
|
|
832
|
-
case FIELD_TYPES.EMAIL:
|
|
833
|
-
return (jsx(TextInput, __assign({ type: InputType.EMAIL, required: required || Boolean(validations.required), icon: icon, className: className, disabled: disabled, autoComplete: autoComplete }, field)));
|
|
834
|
-
case FIELD_TYPES.DATE:
|
|
835
|
-
return (jsx(TextInput, __assign({ type: InputType.DATE, required: required || Boolean(validations.required), icon: icon, className: className, disabled: disabled }, field)));
|
|
836
|
-
case FIELD_TYPES.DATETIME:
|
|
837
|
-
return (jsx(TextInput, __assign({ type: InputType.DATETIME, required: required || Boolean(validations.required), icon: icon, className: className, disabled: disabled }, field)));
|
|
838
|
-
case FIELD_TYPES.NUMBER:
|
|
839
|
-
return (jsx(TextInput, __assign({ type: InputType.NUMBER, required: required || Boolean(validations.required), icon: icon, className: className, disabled: disabled }, field)));
|
|
840
|
-
case FIELD_TYPES.CHECKBOX:
|
|
841
|
-
return (jsx(Checkbox, __assign({ required: required || Boolean(validations.required), id: name, className: className, label: label, disabled: disabled }, field)));
|
|
842
|
-
case FIELD_TYPES.RADIO:
|
|
843
|
-
return (jsx(Radio, __assign({ required: required || Boolean(validations.required), id: name, className: className, options: options, disabled: disabled }, field)));
|
|
844
|
-
case FIELD_TYPES.SWITCH:
|
|
845
|
-
return (jsx(Switch, __assign({ id: name, required: required || Boolean(validations.required), className: className, disabled: disabled }, field)));
|
|
846
|
-
case FIELD_TYPES.SELECT:
|
|
847
|
-
return (jsx(FormSelect, __assign({ required: required || Boolean(validations.required), id: name, className: className, disabled: disabled, label: label, options: options }, field)));
|
|
848
|
-
case FIELD_TYPES.FILE:
|
|
849
|
-
return (jsx(FileUpload, __assign({ required: required || Boolean(validations.required), id: name, className: className, disabled: disabled, onChangeCallback: function (event) {
|
|
850
|
-
fileUploadCallback(event);
|
|
851
|
-
} }, field)));
|
|
852
|
-
default:
|
|
853
|
-
return (jsx(TextInput, __assign({ type: InputType.TEXT, required: required || Boolean(validations.required), disabled: disabled, icon: icon, className: className }, field)));
|
|
854
|
-
}
|
|
855
|
-
};
|
|
856
|
-
// TODO: HELPER CLASSES : data-[invalid=true]:bg-error data-[valid]:bg-success
|
|
857
|
-
var showLabel = label && type !== FIELD_TYPES.CHECKBOX;
|
|
858
|
-
var labelWithAsterisk = required || Boolean(validations.required) ? "".concat(label, " *") : label;
|
|
859
|
-
return (jsx("div", { className: "relative", children: jsxs("div", { "data-testid": "FormField", className: "mb-4", children: [showLabel && (jsx("div", { className: "flex items-baseline justify-between", children: jsx(Label, { id: name, children: labelWithAsterisk }) })), jsx("div", { className: "mb-1", children: jsx(Controller
|
|
860
|
-
// https://stackoverflow.com/questions/47012169/a-component-is-changing-an-uncontrolled-input-of-type-text-to-be-controlled-erro
|
|
861
|
-
, {
|
|
862
|
-
// https://stackoverflow.com/questions/47012169/a-component-is-changing-an-uncontrolled-input-of-type-text-to-be-controlled-erro
|
|
863
|
-
defaultValue: '', name: name, control: control, rules: validations, render: function (_a) {
|
|
864
|
-
var field = _a.field;
|
|
865
|
-
return renderType(type, field);
|
|
866
|
-
} }) }), description && (jsx("div", { className: "formfield-description", children: jsx(Copy, { size: COPY_SIZE.SMALL, className: "mb-0", children: description }) })), errors[name] && (jsx("div", { className: "formfield-error text-error italic", children: jsx(Copy, { size: COPY_SIZE.SMALL, className: "mb-0", children: (_c = (_b = errors === null || errors === void 0 ? void 0 : errors[name]) === null || _b === void 0 ? void 0 : _b.message) === null || _c === void 0 ? void 0 : _c.toString() }) }))] }) }));
|
|
867
|
-
};
|
|
868
|
-
FormField.displayName = 'FormField';
|
|
869
|
-
|
|
870
|
-
var LoginForm = function (_a) {
|
|
871
|
-
var handleSubmit = _a.handleSubmit, initialValues = _a.initialValues, _b = _a.showSocialButtons, showSocialButtons = _b === void 0 ? false : _b;
|
|
872
|
-
return (jsxs("div", { "data-testid": "LoginForm", className: "form-wrapper", children: [jsxs(Form, { onSubmit: handleSubmit, submit: en.FORMS.LOGIN_FORM.SUBMIT, disabledSubmitWithReturn: true, initialValues: initialValues, children: [jsx(FormField, { name: "email", type: FIELD_TYPES.EMAIL, label: en.FORMS.LOGIN_FORM.EMAIL, required: true, validations: validEmail, autoComplete: "email" }), jsx(FormField, { name: "password", type: FIELD_TYPES.PASSWORD, label: en.FORMS.LOGIN_FORM.PASSWORD, required: true, autoComplete: "current-password" })] }), showSocialButtons && (jsxs(Fragment, { children: [jsx(Hr, {}), jsx("div", { className: "flex flex-col gap-4 items-center", children: jsxs("div", { className: "flex flex-col gap-4 max-w-[250px]", children: [jsx(Button, { onClick: function () { return window.location.assign(socialLoginUrlGoogle); }, variant: BTN_VARIANTS.PRIMARY, iconFirst: true, icon: "mdi:google", children: en.UI.LOGIN_WITH_GOOGLE }), jsx(Button, { onClick: function () { return window.location.assign(socialLoginUrlApple); }, variant: BTN_VARIANTS.PRIMARY, iconFirst: true, icon: "mdi:apple", children: en.UI.LOGIN_WITH_APPLE })] }) })] }))] }));
|
|
873
|
-
};
|
|
874
|
-
LoginForm.displayName = 'LoginForm';
|
|
875
|
-
|
|
876
|
-
var RegisterForm = function (_a) {
|
|
877
|
-
var handleSubmit = _a.handleSubmit, _b = _a.showSocialButtons, showSocialButtons = _b === void 0 ? false : _b;
|
|
878
|
-
return (jsxs("div", { "data-testid": "RegisterForm", className: "form-wrapper", children: [jsxs(Form, { onSubmit: handleSubmit, submit: en.FORMS.REGISTER_FORM.SUBMIT, disabledSubmitWithReturn: true, children: [jsx(FormField, { name: "email", type: FIELD_TYPES.EMAIL, label: en.FORMS.REGISTER_FORM.EMAIL, required: true, validations: validEmail, autoComplete: "email" }), jsx(FormField, { name: "password", type: FIELD_TYPES.PASSWORD, label: en.FORMS.REGISTER_FORM.PASSWORD, required: true, description: en.FORMS.REGISTER_FORM.PASSWORD_DESCRIPTION, validations: validPassword, autoComplete: "new-password" })] }), showSocialButtons && (jsxs(Fragment, { children: [jsx(Hr, {}), jsx("div", { className: "flex flex-col gap-4 items-center", children: jsxs("div", { className: "flex flex-col gap-4 max-w-[250px]", children: [jsx(Button, { onClick: function () { return window.location.assign(socialLoginUrlGoogle); }, variant: BTN_VARIANTS.PRIMARY, iconFirst: true, icon: "mdi:google", children: en.UI.SIGNUP_WITH_GOOGLE }), jsx(Button, { onClick: function () { return window.location.assign(socialLoginUrlApple); }, variant: BTN_VARIANTS.PRIMARY, iconFirst: true, icon: "mdi:apple", children: en.UI.SIGNUP_WITH_APPLE })] }) })] }))] }));
|
|
879
|
-
};
|
|
880
|
-
RegisterForm.displayName = 'RegisterForm';
|
|
881
|
-
|
|
882
|
-
var ForgotPasswordForm = function (_a) {
|
|
883
|
-
var handleSubmit = _a.handleSubmit;
|
|
884
|
-
return (jsx("div", { "data-testid": "ForgotPasswordForm", className: "form-wrapper", children: jsx(Form, { onSubmit: handleSubmit, submit: en.FORMS.FORGOT_PASSWORD_FORM.SUBMIT, disabledSubmitWithReturn: true, children: jsx(FormField, { name: "email", type: FIELD_TYPES.EMAIL, label: en.FORMS.FORGOT_PASSWORD_FORM.EMAIL, required: true, validations: validEmail }) }) }));
|
|
885
|
-
};
|
|
886
|
-
ForgotPasswordForm.displayName = 'ForgotPasswordForm';
|
|
887
|
-
|
|
888
|
-
var Authenticator = function (_a) {
|
|
889
|
-
var loginSubmit = _a.loginSubmit, registerSubmit = _a.registerSubmit, passwordForgotSubmit = _a.passwordForgotSubmit, handleTokenCallback = _a.handleTokenCallback, _b = _a.showSocialLogin, showSocialLogin = _b === void 0 ? false : _b;
|
|
890
|
-
var _c = React.useState(false), showForgotPassword = _c[0], setShowForgotPassword = _c[1];
|
|
891
|
-
// TODO: Move this up into AuthProvider Component.
|
|
892
|
-
useEffect(function () {
|
|
893
|
-
console.log('Authenticator useEffect', process.env);
|
|
894
|
-
function fetchToken() {
|
|
895
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
896
|
-
var searchParams, code, url, params, response, data;
|
|
897
|
-
return __generator(this, function (_a) {
|
|
898
|
-
switch (_a.label) {
|
|
899
|
-
case 0:
|
|
900
|
-
// Only run this code if the environment variables are set
|
|
901
|
-
if (!process.env.AWS_COGNITO_USERPOOL_DOMAIN ||
|
|
902
|
-
!process.env.AWS_COGNITO_CLIENT_ID ||
|
|
903
|
-
!process.env.AWS_COGNITO_REDIRECT_URI)
|
|
904
|
-
return [2 /*return*/];
|
|
905
|
-
searchParams = new URLSearchParams(window.location.search);
|
|
906
|
-
code = searchParams.get('code');
|
|
907
|
-
if (!code) return [3 /*break*/, 3];
|
|
908
|
-
url = "".concat(process.env.AWS_COGNITO_USERPOOL_DOMAIN, "/oauth2/token");
|
|
909
|
-
params = new URLSearchParams();
|
|
910
|
-
params.append('grant_type', 'authorization_code');
|
|
911
|
-
params.append('client_id', process.env.AWS_COGNITO_CLIENT_ID);
|
|
912
|
-
params.append('code', code);
|
|
913
|
-
params.append('redirect_uri', process.env.AWS_COGNITO_REDIRECT_URI);
|
|
914
|
-
return [4 /*yield*/, fetch(url, {
|
|
915
|
-
method: 'POST',
|
|
916
|
-
headers: {
|
|
917
|
-
'Content-Type': 'application/x-www-form-urlencoded',
|
|
918
|
-
},
|
|
919
|
-
body: params,
|
|
920
|
-
})];
|
|
921
|
-
case 1:
|
|
922
|
-
response = _a.sent();
|
|
923
|
-
return [4 /*yield*/, response.json()];
|
|
924
|
-
case 2:
|
|
925
|
-
data = _a.sent();
|
|
926
|
-
if (data) {
|
|
927
|
-
if (handleTokenCallback && typeof handleTokenCallback === 'function') {
|
|
928
|
-
handleTokenCallback(data);
|
|
929
|
-
}
|
|
930
|
-
}
|
|
931
|
-
_a.label = 3;
|
|
932
|
-
case 3: return [2 /*return*/];
|
|
933
|
-
}
|
|
934
|
-
});
|
|
935
|
-
});
|
|
936
|
-
}
|
|
937
|
-
fetchToken();
|
|
938
|
-
}, []);
|
|
939
|
-
return (jsxs("div", { "data-testid": "Authenticator", className: "w-full", children: [!showForgotPassword && (jsx(Tabs, { data: [
|
|
940
|
-
{
|
|
941
|
-
title: 'Login',
|
|
942
|
-
content: (jsxs("div", { className: "flex flex-col gap-4", children: [jsx(LoginForm, { handleSubmit: loginSubmit, showSocialButtons: showSocialLogin }), jsx("div", { className: "mt-4", children: jsx(Button, { variant: BTN_VARIANTS.LINK, onClick: function () { return setShowForgotPassword(!showForgotPassword); }, children: showForgotPassword ? 'Back to Login' : 'Forgot Password?' }) })] })),
|
|
943
|
-
},
|
|
944
|
-
{
|
|
945
|
-
title: 'Register',
|
|
946
|
-
content: jsx(RegisterForm, { handleSubmit: registerSubmit, showSocialButtons: showSocialLogin }),
|
|
947
|
-
},
|
|
948
|
-
] })), showForgotPassword && (jsx(Tabs, { data: [
|
|
949
|
-
{
|
|
950
|
-
title: 'Forgot Password',
|
|
951
|
-
content: (jsxs("div", { className: "flex flex-col gap-4", children: [jsx(ForgotPasswordForm, { handleSubmit: passwordForgotSubmit }), jsx("div", { className: "mt-4", children: jsx(Button, { variant: BTN_VARIANTS.LINK, onClick: function () { return setShowForgotPassword(!showForgotPassword); }, children: showForgotPassword ? 'Back to Login' : 'Forgot Password?' }) })] })),
|
|
952
|
-
},
|
|
953
|
-
] }))] }));
|
|
954
|
-
};
|
|
955
|
-
Authenticator.displayName = 'Authenticator';
|
|
956
|
-
|
|
957
|
-
var cardWrapperClasses = 'relative rounded-lg overflow-hidden transition duration-300 ease-in-out cursor-pointer hover:scale-105 shadow hover:shadow-lg bg-white text-black hover:bg-primary hover:text-body-text-inverted';
|
|
958
|
-
|
|
959
|
-
var CardBasic = function (_a) {
|
|
960
|
-
var id = _a.id, title = _a.title, description = _a.description, image = _a.image, className = _a.className, metaData = _a.metaData, actions = _a.actions, padded = _a.padded, scaleOnHover = _a.scaleOnHover, _b = _a.onClick, onClick = _b === void 0 ? function () { } : _b;
|
|
961
|
-
return (jsxs("div", { id: id, "data-testid": "CardBasic", className: twMerge(cx(cardWrapperClasses, { 'p-8': padded }, { 'hover:scale-100': !scaleOnHover }, className)), onClick: onClick, children: [image && (jsx("div", { className: twMerge(cx('relative w-full overflow-hidden aspect-[16/9]', { rounded: padded }, image.aspectRatio)), children: jsx(Image, { fill: true, src: image === null || image === void 0 ? void 0 : image.src, sizes: "100vh", alt: image === null || image === void 0 ? void 0 : image.alt, className: "absolute inset-0 object-cover" }) })), jsx("div", { className: "w-full flex flex-col gap-1", children: jsxs("div", { className: cx({ 'p-3': !padded }, { 'pt-3': padded }), children: [jsx("div", { children: title && (jsx(Heading, { tag: HEADING_TAGS.H4, singleLine: true, children: title })) }), jsx("div", { children: description && jsx(Copy, { className: "mb-0", children: description }) }), jsxs("div", { className: "flex items-center justify-between gap-2", children: [metaData && (jsx("div", { className: "flex shrink-0 mt-2", children: metaData.map(function (meta, index) {
|
|
962
|
-
if (index === 0) {
|
|
963
|
-
return (jsxs(Copy, { className: "text-xs", as: COPY_TAG.SMALL, children: [meta, "\u00A0\u00B7"] }, meta));
|
|
964
|
-
}
|
|
965
|
-
if (index === metaData.length - 1) {
|
|
966
|
-
return (jsxs(Copy, { className: "text-xs", as: COPY_TAG.SMALL, children: ["\u00A0", meta] }, meta));
|
|
967
|
-
}
|
|
968
|
-
return (jsxs(Copy, { className: "text-xs", as: COPY_TAG.SMALL, children: ["\u00A0", meta, "\u00A0\u00B7"] }, meta));
|
|
969
|
-
}) })), actions && (jsxs("div", { className: "flex items-center gap-1 flex-wrap", children: [actions.like && (jsx(Button, { variant: BTN_VARIANTS.PRIMARY, icon: actions.like.isActive ? 'mdi:like' : 'mdi:like-outline', size: BTN_SIZES.SMALL, onClick: function (event) {
|
|
970
|
-
var _a;
|
|
971
|
-
event.stopPropagation();
|
|
972
|
-
if (((_a = actions === null || actions === void 0 ? void 0 : actions.like) === null || _a === void 0 ? void 0 : _a.onClick) && typeof actions.like.onClick === 'function') {
|
|
973
|
-
actions.like.onClick({ id: id });
|
|
974
|
-
}
|
|
975
|
-
} })), actions.share && (jsx(Button, { variant: BTN_VARIANTS.PRIMARY, icon: actions.share.isActive ? 'mdi:share' : 'mdi:share-outline', size: BTN_SIZES.SMALL, onClick: function (event) {
|
|
976
|
-
var _a;
|
|
977
|
-
event.stopPropagation();
|
|
978
|
-
if (((_a = actions === null || actions === void 0 ? void 0 : actions.share) === null || _a === void 0 ? void 0 : _a.onClick) && typeof actions.share.onClick === 'function') {
|
|
979
|
-
actions.share.onClick({ id: id });
|
|
980
|
-
}
|
|
981
|
-
} })), actions.save && (jsx(Button, { variant: BTN_VARIANTS.PRIMARY, icon: actions.save.isActive ? 'mdi:bookmark' : 'mdi:bookmark-outline', size: BTN_SIZES.SMALL, onClick: function (event) {
|
|
982
|
-
var _a;
|
|
983
|
-
event.stopPropagation();
|
|
984
|
-
if (((_a = actions === null || actions === void 0 ? void 0 : actions.save) === null || _a === void 0 ? void 0 : _a.onClick) && typeof actions.save.onClick === 'function') {
|
|
985
|
-
actions.save.onClick({ id: id });
|
|
986
|
-
}
|
|
987
|
-
} })), actions.comment && (jsx(Button, { variant: BTN_VARIANTS.PRIMARY, icon: actions.comment.isActive ? 'mdi:comment' : 'mdi:comment-outline', size: BTN_SIZES.SMALL, onClick: function (event) {
|
|
988
|
-
var _a;
|
|
989
|
-
event.stopPropagation();
|
|
990
|
-
if (((_a = actions === null || actions === void 0 ? void 0 : actions.comment) === null || _a === void 0 ? void 0 : _a.onClick) && typeof actions.comment.onClick === 'function') {
|
|
991
|
-
actions.comment.onClick({ id: id });
|
|
992
|
-
}
|
|
993
|
-
} })), actions.bookmark && (jsx(Button, { variant: BTN_VARIANTS.PRIMARY, icon: actions.bookmark.isActive ? 'mdi:bookmark' : 'mdi:bookmark-outline', size: BTN_SIZES.SMALL, onClick: function (event) {
|
|
994
|
-
var _a;
|
|
995
|
-
event.stopPropagation();
|
|
996
|
-
if (((_a = actions === null || actions === void 0 ? void 0 : actions.bookmark) === null || _a === void 0 ? void 0 : _a.onClick) && typeof actions.bookmark.onClick === 'function') {
|
|
997
|
-
actions.bookmark.onClick({ id: id });
|
|
998
|
-
}
|
|
999
|
-
} })), actions.report && (jsx(Button, { variant: BTN_VARIANTS.PRIMARY, icon: actions.report.isActive ? 'mdi:flag' : 'mdi:flag-outline', size: BTN_SIZES.SMALL, onClick: function (event) {
|
|
1000
|
-
var _a;
|
|
1001
|
-
event.stopPropagation();
|
|
1002
|
-
if (((_a = actions === null || actions === void 0 ? void 0 : actions.report) === null || _a === void 0 ? void 0 : _a.onClick) && typeof actions.report.onClick === 'function') {
|
|
1003
|
-
actions.report.onClick({ id: id });
|
|
1004
|
-
}
|
|
1005
|
-
} })), actions.follow && (jsx(Button, { variant: BTN_VARIANTS.PRIMARY, icon: actions.follow.isActive ? 'mdi:account-plus' : 'mdi:account-plus-outline', size: BTN_SIZES.SMALL, onClick: function (event) {
|
|
1006
|
-
var _a;
|
|
1007
|
-
event.stopPropagation();
|
|
1008
|
-
if (((_a = actions === null || actions === void 0 ? void 0 : actions.follow) === null || _a === void 0 ? void 0 : _a.onClick) && typeof actions.follow.onClick === 'function') {
|
|
1009
|
-
actions.follow.onClick({ id: id });
|
|
1010
|
-
}
|
|
1011
|
-
} })), actions.download && (jsx(Button, { variant: BTN_VARIANTS.PRIMARY, icon: actions.download.isActive ? 'mdi:download' : 'mdi:download-outline', size: BTN_SIZES.SMALL, onClick: function (event) {
|
|
1012
|
-
var _a;
|
|
1013
|
-
event.stopPropagation();
|
|
1014
|
-
if (((_a = actions === null || actions === void 0 ? void 0 : actions.download) === null || _a === void 0 ? void 0 : _a.onClick) && typeof actions.download.onClick === 'function') {
|
|
1015
|
-
actions.download.onClick({ id: id });
|
|
1016
|
-
}
|
|
1017
|
-
} })), actions.edit && (jsx(Button, { variant: BTN_VARIANTS.PRIMARY, icon: actions.edit.isActive ? 'mdi:pencil' : 'mdi:pencil-outline', size: BTN_SIZES.SMALL, onClick: function (event) {
|
|
1018
|
-
var _a;
|
|
1019
|
-
event.stopPropagation();
|
|
1020
|
-
if (((_a = actions === null || actions === void 0 ? void 0 : actions.edit) === null || _a === void 0 ? void 0 : _a.onClick) && typeof actions.edit.onClick === 'function') {
|
|
1021
|
-
actions.edit.onClick({ id: id });
|
|
1022
|
-
}
|
|
1023
|
-
} })), actions.delete && (jsx(Button, { variant: BTN_VARIANTS.PRIMARY, icon: actions.delete.isActive ? 'mdi:delete' : 'mdi:delete-outline', size: BTN_SIZES.SMALL, onClick: function (event) {
|
|
1024
|
-
var _a;
|
|
1025
|
-
event.stopPropagation();
|
|
1026
|
-
if (((_a = actions === null || actions === void 0 ? void 0 : actions.delete) === null || _a === void 0 ? void 0 : _a.onClick) && typeof actions.delete.onClick === 'function') {
|
|
1027
|
-
actions.delete.onClick({ id: id });
|
|
1028
|
-
}
|
|
1029
|
-
} }))] }))] })] }) })] }));
|
|
1030
|
-
};
|
|
1031
|
-
CardBasic.displayName = 'CardBasic';
|
|
1032
|
-
|
|
1033
|
-
var CardMedia = function (_a) {
|
|
1034
|
-
var id = _a.id, title = _a.title, description = _a.description, image = _a.image, className = _a.className, metaData = _a.metaData, actions = _a.actions, _b = _a.onClick, onClick = _b === void 0 ? function () { } : _b, playCallback = _a.playCallback;
|
|
1035
|
-
return (jsxs("div", { id: id, "data-testid": "CardBasic", className: cx(cardWrapperClasses, className), onClick: onClick, children: [image && (jsxs("div", { className: cx('relative w-full overflow-hidden aspect-[16/9]', image.aspectRatio), children: [jsx(Image, { fill: true, src: image === null || image === void 0 ? void 0 : image.src, sizes: "100vh", alt: image === null || image === void 0 ? void 0 : image.alt, className: "absolute inset-0 object-cover" }), playCallback && (jsx("div", { className: "absolute inset-0 flex items-center justify-center", children: jsx(Button, { variant: BTN_VARIANTS.PRIMARY, icon: "mdi:play", size: BTN_SIZES.LARGE, onClick: function (event) {
|
|
1036
|
-
event.stopPropagation();
|
|
1037
|
-
if (typeof playCallback === 'function') {
|
|
1038
|
-
playCallback(event);
|
|
1039
|
-
}
|
|
1040
|
-
} }) }))] })), jsx("div", { className: "w-full flex flex-col gap-1", children: jsxs("div", { className: "p-3", children: [jsx("div", { children: title && (jsx(Heading, { tag: HEADING_TAGS.H5, singleLine: true, flush: true, children: title })) }), jsx("div", { children: description && jsx(Copy, { children: description }) }), jsxs("div", { className: "flex items-center justify-between gap-2", children: [metaData && (jsx("div", { className: "flex shrink-0", children: metaData.map(function (meta, index) {
|
|
1041
|
-
if (index === 0) {
|
|
1042
|
-
return (jsxs(Copy, { className: "text-xs", as: COPY_TAG.SMALL, children: [meta, "\u00A0\u00B7"] }, meta));
|
|
1043
|
-
}
|
|
1044
|
-
if (index === metaData.length - 1) {
|
|
1045
|
-
return (jsxs(Copy, { className: "text-xs", as: COPY_TAG.SMALL, children: ["\u00A0", meta] }, meta));
|
|
1046
|
-
}
|
|
1047
|
-
return (jsxs(Copy, { className: "text-xs", as: COPY_TAG.SMALL, children: ["\u00A0", meta, "\u00A0\u00B7"] }, meta));
|
|
1048
|
-
}) })), actions && (jsxs("div", { className: "flex items-center gap-1 flex-wrap", children: [actions.like && (jsx(Button, { variant: BTN_VARIANTS.PRIMARY, icon: actions.like.isActive ? 'mdi:like' : 'mdi:like-outline', size: BTN_SIZES.SMALL, onClick: function (event) {
|
|
1049
|
-
var _a;
|
|
1050
|
-
event.stopPropagation();
|
|
1051
|
-
if (((_a = actions === null || actions === void 0 ? void 0 : actions.like) === null || _a === void 0 ? void 0 : _a.onClick) && typeof actions.like.onClick === 'function') {
|
|
1052
|
-
actions.like.onClick({ id: id });
|
|
1053
|
-
}
|
|
1054
|
-
} })), actions.share && (jsx(Button, { variant: BTN_VARIANTS.PRIMARY, icon: actions.share.isActive ? 'mdi:share' : 'mdi:share-outline', size: BTN_SIZES.SMALL, onClick: function (event) {
|
|
1055
|
-
var _a;
|
|
1056
|
-
event.stopPropagation();
|
|
1057
|
-
if (((_a = actions === null || actions === void 0 ? void 0 : actions.share) === null || _a === void 0 ? void 0 : _a.onClick) && typeof actions.share.onClick === 'function') {
|
|
1058
|
-
actions.share.onClick({ id: id });
|
|
1059
|
-
}
|
|
1060
|
-
} })), actions.save && (jsx(Button, { variant: BTN_VARIANTS.PRIMARY, icon: actions.save.isActive ? 'mdi:bookmark' : 'mdi:bookmark-outline', size: BTN_SIZES.SMALL, onClick: function (event) {
|
|
1061
|
-
var _a;
|
|
1062
|
-
event.stopPropagation();
|
|
1063
|
-
if (((_a = actions === null || actions === void 0 ? void 0 : actions.save) === null || _a === void 0 ? void 0 : _a.onClick) && typeof actions.save.onClick === 'function') {
|
|
1064
|
-
actions.save.onClick({ id: id });
|
|
1065
|
-
}
|
|
1066
|
-
} })), actions.comment && (jsx(Button, { variant: BTN_VARIANTS.PRIMARY, icon: actions.comment.isActive ? 'mdi:comment' : 'mdi:comment-outline', size: BTN_SIZES.SMALL, onClick: function (event) {
|
|
1067
|
-
var _a;
|
|
1068
|
-
event.stopPropagation();
|
|
1069
|
-
if (((_a = actions === null || actions === void 0 ? void 0 : actions.comment) === null || _a === void 0 ? void 0 : _a.onClick) && typeof actions.comment.onClick === 'function') {
|
|
1070
|
-
actions.comment.onClick({ id: id });
|
|
1071
|
-
}
|
|
1072
|
-
} })), actions.bookmark && (jsx(Button, { variant: BTN_VARIANTS.PRIMARY, icon: actions.bookmark.isActive ? 'mdi:bookmark' : 'mdi:bookmark-outline', size: BTN_SIZES.SMALL, onClick: function (event) {
|
|
1073
|
-
var _a;
|
|
1074
|
-
event.stopPropagation();
|
|
1075
|
-
if (((_a = actions === null || actions === void 0 ? void 0 : actions.bookmark) === null || _a === void 0 ? void 0 : _a.onClick) && typeof actions.bookmark.onClick === 'function') {
|
|
1076
|
-
actions.bookmark.onClick({ id: id });
|
|
1077
|
-
}
|
|
1078
|
-
} })), actions.report && (jsx(Button, { variant: BTN_VARIANTS.PRIMARY, icon: actions.report.isActive ? 'mdi:flag' : 'mdi:flag-outline', size: BTN_SIZES.SMALL, onClick: function (event) {
|
|
1079
|
-
var _a;
|
|
1080
|
-
event.stopPropagation();
|
|
1081
|
-
if (((_a = actions === null || actions === void 0 ? void 0 : actions.report) === null || _a === void 0 ? void 0 : _a.onClick) && typeof actions.report.onClick === 'function') {
|
|
1082
|
-
actions.report.onClick({ id: id });
|
|
1083
|
-
}
|
|
1084
|
-
} })), actions.follow && (jsx(Button, { variant: BTN_VARIANTS.PRIMARY, icon: actions.follow.isActive ? 'mdi:account-plus' : 'mdi:account-plus-outline', size: BTN_SIZES.SMALL, onClick: function (event) {
|
|
1085
|
-
var _a;
|
|
1086
|
-
event.stopPropagation();
|
|
1087
|
-
if (((_a = actions === null || actions === void 0 ? void 0 : actions.follow) === null || _a === void 0 ? void 0 : _a.onClick) && typeof actions.follow.onClick === 'function') {
|
|
1088
|
-
actions.follow.onClick({ id: id });
|
|
1089
|
-
}
|
|
1090
|
-
} })), actions.download && (jsx(Button, { variant: BTN_VARIANTS.PRIMARY, icon: actions.download.isActive ? 'mdi:download' : 'mdi:download-outline', size: BTN_SIZES.SMALL, onClick: function (event) {
|
|
1091
|
-
var _a;
|
|
1092
|
-
event.stopPropagation();
|
|
1093
|
-
if (((_a = actions === null || actions === void 0 ? void 0 : actions.download) === null || _a === void 0 ? void 0 : _a.onClick) && typeof actions.download.onClick === 'function') {
|
|
1094
|
-
actions.download.onClick({ id: id });
|
|
1095
|
-
}
|
|
1096
|
-
} })), actions.edit && (jsx(Button, { variant: BTN_VARIANTS.PRIMARY, icon: actions.edit.isActive ? 'mdi:pencil' : 'mdi:pencil-outline', size: BTN_SIZES.SMALL, onClick: function (event) {
|
|
1097
|
-
var _a;
|
|
1098
|
-
event.stopPropagation();
|
|
1099
|
-
if (((_a = actions === null || actions === void 0 ? void 0 : actions.edit) === null || _a === void 0 ? void 0 : _a.onClick) && typeof actions.edit.onClick === 'function') {
|
|
1100
|
-
actions.edit.onClick({ id: id });
|
|
1101
|
-
}
|
|
1102
|
-
} })), actions.delete && (jsx(Button, { variant: BTN_VARIANTS.PRIMARY, icon: actions.delete.isActive ? 'mdi:delete' : 'mdi:delete-outline', size: BTN_SIZES.SMALL, onClick: function (event) {
|
|
1103
|
-
var _a;
|
|
1104
|
-
event.stopPropagation();
|
|
1105
|
-
if (((_a = actions === null || actions === void 0 ? void 0 : actions.delete) === null || _a === void 0 ? void 0 : _a.onClick) && typeof actions.delete.onClick === 'function') {
|
|
1106
|
-
actions.delete.onClick({ id: id });
|
|
1107
|
-
}
|
|
1108
|
-
} }))] }))] })] }) })] }));
|
|
1109
|
-
};
|
|
1110
|
-
CardMedia.displayName = 'CardMedia';
|
|
1111
|
-
|
|
1112
|
-
var CardVideo = function (_a) {
|
|
1113
|
-
var video = _a.video, _b = _a.isMuted, isMuted = _b === void 0 ? true : _b, id = _a.id, title = _a.title, description = _a.description, image = _a.image, className = _a.className, metaData = _a.metaData, actions = _a.actions, _c = _a.onClick, onClick = _c === void 0 ? function () { } : _c;
|
|
1114
|
-
return (jsxs("div", { id: id, "data-testid": "CardVideo", className: cx(cardWrapperClasses, className), onClick: onClick, children: [image && video && (jsx("div", { className: cx('relative w-full h-full aspect-[16/9]', image.aspectRatio), children: jsx(HoverVideoPlayer, { videoId: "video--".concat(id), playbackStartDelay: 1000, videoSrc: jsx("source", { src: video, type: "video/mp4" }), videoClassName: cx('hls-hover-video w-full aspect-[16/9]', image.aspectRatio), sizingMode: "overlay", preload: "none", loop: false, muted: isMuted, className: cx('w-full overflow-hidden aspect-[16/9]', image.aspectRatio), pausedOverlay: jsx("div", { className: cx('relative w-full overflow-hidden aspect-[16/9]', image.aspectRatio), children: jsx(Image, { fill: true, src: image === null || image === void 0 ? void 0 : image.src, width: 0, height: 0,
|
|
1115
|
-
// sizes="100vh"
|
|
1116
|
-
alt: image === null || image === void 0 ? void 0 : image.alt, className: "absolute inset-0 object-cover" }) }), loadingOverlay: jsx("div", { className: cx('w-full flex items-center justify-center aspect-[16/9]', image.aspectRatio), children: jsx("div", { className: "", children: jsx(Loader, {}) }) }) }, "".concat(id, "--card")) })), jsx("div", { className: "w-full flex flex-col gap-1", children: jsxs("div", { className: "p-3", children: [jsx("div", { children: title && (jsx(Heading, { tag: HEADING_TAGS.H5, singleLine: true, flush: true, children: title })) }), jsx("div", { children: description && jsx(Copy, { children: description }) }), jsxs("div", { className: "flex items-center justify-between gap-2", children: [metaData && (jsx("div", { className: "flex shrink-0", children: metaData.map(function (meta, index) {
|
|
1117
|
-
if (index === 0) {
|
|
1118
|
-
return (jsxs(Copy, { className: "text-xs", as: COPY_TAG.SMALL, children: [meta, "\u00A0\u00B7"] }, meta));
|
|
1119
|
-
}
|
|
1120
|
-
if (index === metaData.length - 1) {
|
|
1121
|
-
return (jsxs(Copy, { className: "text-xs", as: COPY_TAG.SMALL, children: ["\u00A0", meta] }, meta));
|
|
1122
|
-
}
|
|
1123
|
-
return (jsxs(Copy, { className: "text-xs", as: COPY_TAG.SMALL, children: ["\u00A0", meta, "\u00A0\u00B7"] }, meta));
|
|
1124
|
-
}) })), actions && (jsxs("div", { className: "flex items-center gap-1 flex-wrap", children: [actions.like && (jsx(Button, { variant: BTN_VARIANTS.PRIMARY, icon: actions.like.isActive ? 'mdi:like' : 'mdi:like-outline', size: BTN_SIZES.SMALL, onClick: function (event) {
|
|
1125
|
-
var _a;
|
|
1126
|
-
event.stopPropagation();
|
|
1127
|
-
if (((_a = actions === null || actions === void 0 ? void 0 : actions.like) === null || _a === void 0 ? void 0 : _a.onClick) && typeof actions.like.onClick === 'function') {
|
|
1128
|
-
actions.like.onClick({ id: id });
|
|
1129
|
-
}
|
|
1130
|
-
} })), actions.share && (jsx(Button, { variant: BTN_VARIANTS.PRIMARY, icon: actions.share.isActive ? 'mdi:share' : 'mdi:share-outline', size: BTN_SIZES.SMALL, onClick: function (event) {
|
|
1131
|
-
var _a;
|
|
1132
|
-
event.stopPropagation();
|
|
1133
|
-
if (((_a = actions === null || actions === void 0 ? void 0 : actions.share) === null || _a === void 0 ? void 0 : _a.onClick) && typeof actions.share.onClick === 'function') {
|
|
1134
|
-
actions.share.onClick({ id: id });
|
|
1135
|
-
}
|
|
1136
|
-
} })), actions.save && (jsx(Button, { variant: BTN_VARIANTS.PRIMARY, icon: actions.save.isActive ? 'mdi:bookmark' : 'mdi:bookmark-outline', size: BTN_SIZES.SMALL, onClick: function (event) {
|
|
1137
|
-
var _a;
|
|
1138
|
-
event.stopPropagation();
|
|
1139
|
-
if (((_a = actions === null || actions === void 0 ? void 0 : actions.save) === null || _a === void 0 ? void 0 : _a.onClick) && typeof actions.save.onClick === 'function') {
|
|
1140
|
-
actions.save.onClick({ id: id });
|
|
1141
|
-
}
|
|
1142
|
-
} })), actions.comment && (jsx(Button, { variant: BTN_VARIANTS.PRIMARY, icon: actions.comment.isActive ? 'mdi:comment' : 'mdi:comment-outline', size: BTN_SIZES.SMALL, onClick: function (event) {
|
|
1143
|
-
var _a;
|
|
1144
|
-
event.stopPropagation();
|
|
1145
|
-
if (((_a = actions === null || actions === void 0 ? void 0 : actions.comment) === null || _a === void 0 ? void 0 : _a.onClick) && typeof actions.comment.onClick === 'function') {
|
|
1146
|
-
actions.comment.onClick({ id: id });
|
|
1147
|
-
}
|
|
1148
|
-
} })), actions.bookmark && (jsx(Button, { variant: BTN_VARIANTS.PRIMARY, icon: actions.bookmark.isActive ? 'mdi:bookmark' : 'mdi:bookmark-outline', size: BTN_SIZES.SMALL, onClick: function (event) {
|
|
1149
|
-
var _a;
|
|
1150
|
-
event.stopPropagation();
|
|
1151
|
-
if (((_a = actions === null || actions === void 0 ? void 0 : actions.bookmark) === null || _a === void 0 ? void 0 : _a.onClick) && typeof actions.bookmark.onClick === 'function') {
|
|
1152
|
-
actions.bookmark.onClick({ id: id });
|
|
1153
|
-
}
|
|
1154
|
-
} })), actions.report && (jsx(Button, { variant: BTN_VARIANTS.PRIMARY, icon: actions.report.isActive ? 'mdi:flag' : 'mdi:flag-outline', size: BTN_SIZES.SMALL, onClick: function (event) {
|
|
1155
|
-
var _a;
|
|
1156
|
-
event.stopPropagation();
|
|
1157
|
-
if (((_a = actions === null || actions === void 0 ? void 0 : actions.report) === null || _a === void 0 ? void 0 : _a.onClick) && typeof actions.report.onClick === 'function') {
|
|
1158
|
-
actions.report.onClick({ id: id });
|
|
1159
|
-
}
|
|
1160
|
-
} })), actions.follow && (jsx(Button, { variant: BTN_VARIANTS.PRIMARY, icon: actions.follow.isActive ? 'mdi:account-plus' : 'mdi:account-plus-outline', size: BTN_SIZES.SMALL, onClick: function (event) {
|
|
1161
|
-
var _a;
|
|
1162
|
-
event.stopPropagation();
|
|
1163
|
-
if (((_a = actions === null || actions === void 0 ? void 0 : actions.follow) === null || _a === void 0 ? void 0 : _a.onClick) && typeof actions.follow.onClick === 'function') {
|
|
1164
|
-
actions.follow.onClick({ id: id });
|
|
1165
|
-
}
|
|
1166
|
-
} })), actions.download && (jsx(Button, { variant: BTN_VARIANTS.PRIMARY, icon: actions.download.isActive ? 'mdi:download' : 'mdi:download-outline', size: BTN_SIZES.SMALL, onClick: function (event) {
|
|
1167
|
-
var _a;
|
|
1168
|
-
event.stopPropagation();
|
|
1169
|
-
if (((_a = actions === null || actions === void 0 ? void 0 : actions.download) === null || _a === void 0 ? void 0 : _a.onClick) && typeof actions.download.onClick === 'function') {
|
|
1170
|
-
actions.download.onClick({ id: id });
|
|
1171
|
-
}
|
|
1172
|
-
} })), actions.edit && (jsx(Button, { variant: BTN_VARIANTS.PRIMARY, icon: actions.edit.isActive ? 'mdi:pencil' : 'mdi:pencil-outline', size: BTN_SIZES.SMALL, onClick: function (event) {
|
|
1173
|
-
var _a;
|
|
1174
|
-
event.stopPropagation();
|
|
1175
|
-
if (((_a = actions === null || actions === void 0 ? void 0 : actions.edit) === null || _a === void 0 ? void 0 : _a.onClick) && typeof actions.edit.onClick === 'function') {
|
|
1176
|
-
actions.edit.onClick({ id: id });
|
|
1177
|
-
}
|
|
1178
|
-
} })), actions.delete && (jsx(Button, { variant: BTN_VARIANTS.PRIMARY, icon: actions.delete.isActive ? 'mdi:delete' : 'mdi:delete-outline', size: BTN_SIZES.SMALL, onClick: function (event) {
|
|
1179
|
-
var _a;
|
|
1180
|
-
event.stopPropagation();
|
|
1181
|
-
if (((_a = actions === null || actions === void 0 ? void 0 : actions.delete) === null || _a === void 0 ? void 0 : _a.onClick) && typeof actions.delete.onClick === 'function') {
|
|
1182
|
-
actions.delete.onClick({ id: id });
|
|
1183
|
-
}
|
|
1184
|
-
} }))] }))] })] }) })] }));
|
|
1185
|
-
};
|
|
1186
|
-
CardVideo.displayName = 'CardVideo';
|
|
1187
|
-
|
|
1188
|
-
var CardIcon = function (_a) {
|
|
1189
|
-
var id = _a.id, title = _a.title, description = _a.description, icon = _a.icon, className = _a.className, _b = _a.onClick, onClick = _b === void 0 ? undefined : _b, moreTitle = _a.moreTitle, align = _a.align;
|
|
1190
|
-
var cardClasses = onClick ? cardWrapperClasses : '';
|
|
1191
|
-
return (jsxs("div", { id: id, "data-testid": "CardIcon", className: twMerge(cx(cardClasses, 'p-8 group gap-4 flex flex-col cursor-default', { 'items-start': align === 'left' }, { 'items-center': align === 'center' }, { 'items-end': align === 'right' }, className)), children: [icon && (jsx("div", { className: cx('relative'), children: jsx(Icon, { name: icon, size: 48 }) })), jsxs("div", { className: cx({ 'text-left': align === 'left' }, { 'text-center': align === 'center' }, { 'text-right': align === 'right' }), children: [jsx("div", { children: title && (jsx(Heading, { tag: HEADING_TAGS.H5, singleLine: true, children: title })) }), jsx("div", { children: description && jsx(Copy, { align: align, children: description }) })] }), onClick && (jsx("div", { className: "flex items-center justify-start gap-2", children: jsx(Button, { icon: "mdi:arrow-right", variant: BTN_VARIANTS.LINK, onClick: onClick, children: moreTitle }) }))] }));
|
|
1192
|
-
};
|
|
1193
|
-
CardIcon.displayName = 'CardIcon';
|
|
1194
|
-
|
|
1195
|
-
var CardHorz = function (_a) {
|
|
1196
|
-
var testID = _a.testID, id = _a.id, title = _a.title, description = _a.description, image = _a.image, onClick = _a.onClick, className = _a.className, padded = _a.padded, icon = _a.icon;
|
|
1197
|
-
return (jsxs("div", { id: id, "data-testid": testID || 'CardHorz', className: cx('relative rounded-lg overflow-hidden flex gap-4 cursor-pointer shadow hover:shadow-lg', { 'p-4': padded }, className), onClick: onClick, children: [image && (jsx("div", { className: "w-1/3 aspect-[1/1]", children: jsx("div", { className: twMerge(cx('relative w-full overflow-hidden h-full', image.aspectRatio)), children: jsx(Image, { fill: true, src: image === null || image === void 0 ? void 0 : image.src, alt: image === null || image === void 0 ? void 0 : image.alt, className: "absolute inset-0 object-cover" }) }) })), icon && (jsx("div", { className: "py-2 pl-2", children: jsx(Icon, { name: icon, size: 30 }) })), jsx("div", { className: "flex flex-1 overflow-hidden h-min", children: jsxs("div", { className: "flex-col gap-2 py-2 pr-2 overflow-hidden", children: [title && (jsx("div", { className: "", children: jsx(Heading, { tag: HEADING_TAGS.H4, children: title }) })), description && (jsx("div", { children: jsx(Copy, { className: "mb-0", children: description }) }))] }) })] }));
|
|
1198
|
-
};
|
|
1199
|
-
CardHorz.displayName = 'CardHorz';
|
|
1200
|
-
|
|
1201
|
-
var CardData = function (_a) {
|
|
1202
|
-
var testID = _a.testID, className = _a.className, data = _a.data, padded = _a.padded, _b = _a.shadow, shadow = _b === void 0 ? true : _b;
|
|
1203
|
-
var x = motionValue(0);
|
|
1204
|
-
useEffect(function () {
|
|
1205
|
-
// TODO; make this global
|
|
1206
|
-
if (window.matchMedia('(prefers-reduced-motion: reduce)').matches) {
|
|
1207
|
-
return;
|
|
1208
|
-
}
|
|
1209
|
-
animate(x, 200, { duration: 0.5 });
|
|
1210
|
-
}, [x]);
|
|
1211
|
-
if (!data) {
|
|
1212
|
-
return jsx(Fragment, {});
|
|
1213
|
-
}
|
|
1214
|
-
return (jsxs("div", { "data-testid": testID || 'CardData', className: cx('relative rounded-lg overflow-hidden flex flex-col items-center gap-4', { 'p-4': padded }, { shadow: shadow }, className), children: [(data === null || data === void 0 ? void 0 : data.animateNumber) && (jsxs("div", { className: "font-heading text-4xl md:text-4xl lg:text-4xl font-bold", children: [jsx(AnimationCounter, { from: data.numberData.from, to: data.numberData.to, numDecimals: data.numberData.numDecimals }), jsx("span", { children: data === null || data === void 0 ? void 0 : data.item })] })), !(data === null || data === void 0 ? void 0 : data.animateNumber) && (jsx("div", { className: "text-lg", children: jsx(Heading, { tag: HEADING_TAGS.H2, flush: true, children: data === null || data === void 0 ? void 0 : data.item }) })), jsx("div", { children: jsx(Copy, { children: data === null || data === void 0 ? void 0 : data.label }) })] }));
|
|
1215
|
-
};
|
|
1216
|
-
CardData.displayName = 'CardData';
|
|
1217
|
-
|
|
1218
|
-
var Card = function (_a) {
|
|
1219
|
-
var variant = _a.variant, className = _a.className, data = _a.data, rest = __rest(_a, ["variant", "className", "data"]);
|
|
1220
|
-
switch (variant) {
|
|
1221
|
-
case 'basic':
|
|
1222
|
-
return jsx(CardBasic, __assign({ className: className }, data, rest));
|
|
1223
|
-
case 'media':
|
|
1224
|
-
return jsx(CardMedia, __assign({ className: className }, data, rest));
|
|
1225
|
-
case 'video':
|
|
1226
|
-
return jsx(CardVideo, __assign({ className: className }, data, rest));
|
|
1227
|
-
case 'icon':
|
|
1228
|
-
return jsx(CardIcon, __assign({ className: className }, data, rest));
|
|
1229
|
-
case 'horz':
|
|
1230
|
-
return jsx(CardHorz, __assign({ className: className }, data, rest));
|
|
1231
|
-
case 'data':
|
|
1232
|
-
return jsx(CardData, __assign({ className: className }, data, rest));
|
|
1233
|
-
default:
|
|
1234
|
-
return jsx(CardBasic, __assign({ className: className }, data, rest));
|
|
1235
|
-
}
|
|
1236
|
-
};
|
|
1237
|
-
Card.displayName = 'Card';
|
|
1238
|
-
|
|
1239
|
-
var DisplayHeading = function (_a) {
|
|
1240
|
-
var text = _a.text;
|
|
1241
|
-
// split the text into an array of words
|
|
1242
|
-
var arrayOfWords = text.split(' ');
|
|
1243
|
-
return (jsx("div", { "data-testid": "DisplayHeading", className: "relative", children: jsx(Heading, { tag: HEADING_TAGS.H1, className: "", children: arrayOfWords.map(function (word, index) {
|
|
1244
|
-
// if last word.
|
|
1245
|
-
var isLastWord = index === arrayOfWords.length - 1;
|
|
1246
|
-
var dhKey = "".concat(word, "-").concat(index);
|
|
1247
|
-
return (jsxs("span", { children: [jsx("span", { className: cx({ 'display-heading relative font-heading': !isLastWord }, { 'inline-block relative font-heading': isLastWord }), children: jsxs(Fragment, { children: [isLastWord && (jsxs(Fragment, { children: [jsx("div", { className: "display-heading--emphasis" }), jsx("span", { className: "display-heading--lastword", children: word })] })), !isLastWord && jsx("span", { children: word })] }) }), !isLastWord && ' '] }, dhKey));
|
|
1248
|
-
}) }) }));
|
|
1249
|
-
};
|
|
1250
|
-
DisplayHeading.displayName = 'DisplayHeading';
|
|
1251
|
-
|
|
1252
|
-
var SPACING;
|
|
1253
|
-
(function (SPACING) {
|
|
1254
|
-
SPACING["NONE"] = "py-0";
|
|
1255
|
-
SPACING["ATOM"] = "py-8";
|
|
1256
|
-
SPACING["DEFAULT"] = "py-16";
|
|
1257
|
-
SPACING["ELEMENT"] = "py-24";
|
|
1258
|
-
SPACING["COMPONENT"] = "py-32";
|
|
1259
|
-
SPACING["MODULE"] = "py-40";
|
|
1260
|
-
SPACING["FEATURE"] = "py-64";
|
|
1261
|
-
})(SPACING || (SPACING = {}));
|
|
1262
|
-
|
|
1263
|
-
var PanelCards = function (_a) {
|
|
1264
|
-
var testID = _a.testID, cardData = _a.cardData, title = _a.title, description = _a.description, withSeparators = _a.withSeparators, _b = _a.spacing, spacing = _b === void 0 ? SPACING.MODULE : _b;
|
|
1265
|
-
var ref = useRef(null);
|
|
1266
|
-
var isInView = useInView(ref, { once: true });
|
|
1267
|
-
return (jsxs("div", { ref: ref, "data-testid": testID || 'PanelCards', className: spacing, children: [(title || description) && (jsxs("div", { className: "relative text-center py-8", children: [title && jsx(DisplayHeading, { text: title }), description && jsx(Copy, { align: COPY_ALIGN.CENTER, children: description })] })), jsx("div", { className: "flex gap-8", children: cardData === null || cardData === void 0 ? void 0 : cardData.map(function (card, index) { return (jsxs("span", { className: "flex gap-8 justify-between", children: [jsx("div", { className: cx('relative flex flex-1 items-center justify-center', { '': withSeparators }), style: {
|
|
1268
|
-
transform: isInView ? 'none' : 'translateY(200px)',
|
|
1269
|
-
opacity: isInView ? 1 : 0,
|
|
1270
|
-
transition: "all 0.9s cubic-bezier(0.17, 0.55, 0.55, 1) ".concat(0.1 * index, "s"),
|
|
1271
|
-
}, children: jsx(Card, __assign({}, card)) }), withSeparators && index < cardData.length - 1 && (jsx("div", { className: "w-1 h-10 border-0 border-r border-solid border-primary500" }, "separator-".concat(index)))] }, "card-".concat(index))); }) })] }));
|
|
1272
|
-
};
|
|
1273
|
-
PanelCards.displayName = 'PanelCards';
|
|
1274
|
-
|
|
1275
|
-
var Container = function (_a) {
|
|
1276
|
-
var children = _a.children, className = _a.className, spacing = _a.spacing, padded = _a.padded, isNarrow = _a.isNarrow, isCentered = _a.isCentered, isFlush = _a.isFlush;
|
|
1277
|
-
var classes = twMerge(cx('container mx-auto my-0', { 'px-4': padded }, { 'py-40': spacing === 'feature' }, { 'py-24': spacing === 'component' }, { 'py-16': spacing === 'module' }, { 'py-10': spacing === 'element' }, { 'py-4': spacing === 'atom' }, { 'py-0': spacing === 'none' }, { 'max-w-3xl': isNarrow }, { 'flex items-center justify-center flex-col': isCentered }, { 'px-0 max-w-full mx-0': isFlush }));
|
|
1278
|
-
var contentClasses = cx('mx-4 md:mx-0', {
|
|
1279
|
-
'w-full': !isCentered,
|
|
1280
|
-
}, className);
|
|
1281
|
-
return (jsx("div", { "data-testid": "Container", className: classes, children: jsx("div", { className: contentClasses, children: children }) }));
|
|
1282
|
-
};
|
|
1283
|
-
Container.displayName = 'Container';
|
|
1284
|
-
|
|
1285
|
-
var PanelFeature = function (_a) {
|
|
1286
|
-
var testID = _a.testID, title = _a.title, description = _a.description, inversed = _a.inversed, assets = _a.assets, buttonData = _a.buttonData, _b = _a.withBg, withBg = _b === void 0 ? true : _b, _c = _a.spacing, spacing = _c === void 0 ? SPACING.DEFAULT : _c;
|
|
1287
|
-
return (jsxs("div", { "data-testid": testID || 'PanelFeature', className: cx("relative m-auto w-full flex flex-none flex-nowrap", spacing), children: [withBg && (jsx("div", { className: "rounded-full blur-[250px] flex flex-none aspect-1 absolute -top-24 -left-48 w-[500px] opacity-20 bg-gradient-to-r from-primary-darker to-primary-lighter" })), jsx(Container, { children: jsxs("div", { className: cx('relative flex sm:flex-col md:flex-row flex-nowrap w-full h-min justify-between overflow-visible p-0 items-center gap-16', {
|
|
1288
|
-
'flex-row-reverse': inversed,
|
|
1289
|
-
}), children: [jsxs("div", { className: "w-1/2 flex flex-col items-start justify-center", children: [jsxs("div", { className: "relative text-left", children: [jsx(DisplayHeading, { text: title }), jsx(Copy, { className: "mb-0", children: description })] }), jsxs("div", { className: "grid grid-cols-3 gap-2 my-8", children: [jsx(Chip, { rounded: true, text: "New", variant: "info" }), jsx(Chip, { rounded: true, text: "Trending", variant: "info" }), jsx(Chip, { rounded: true, text: "Popular", variant: "info" })] }), jsx("div", { className: "", children: jsx(Button, __assign({}, buttonData)) })] }), jsx("div", { className: "w-1/2 flex items-center justify-center", children: jsx("div", { className: "w-full aspect-[1/1] flex items-center justify-center", children: jsx(AnimationSet1, { bgAsset: assets.bgAsset, focalAsset1: assets.focalAsset1, focalAsset2: assets.focalAsset2, focalAsset3: assets.focalAsset3 }) }) })] }) })] }));
|
|
1290
|
-
};
|
|
1291
|
-
PanelFeature.displayName = 'PanelFeature';
|
|
1292
|
-
|
|
1293
|
-
// VideoJS CSS.
|
|
1294
|
-
// import 'video.js/dist/video-js.css';
|
|
1295
|
-
var Video = function (_a) {
|
|
1296
|
-
var url = _a.url, sources = _a.sources, onReady = _a.onReady, className = _a.className, _b = _a.options, options = _b === void 0 ? {} : _b, _c = _a.isYoutube, isYoutube = _c === void 0 ? false : _c, _d = _a.defaultAudioTrack, defaultAudioTrack = _d === void 0 ? 'No Music' : _d, _e = _a.rounded, rounded = _e === void 0 ? true : _e, aspectRatioValue = _a.aspectRatioValue;
|
|
1297
|
-
var reactPlayerRef = React.useRef(null);
|
|
1298
|
-
var videoRef = React.useRef(null);
|
|
1299
|
-
var playerRef = React.useRef(null);
|
|
1300
|
-
var aspectRatioConfig = useMemo(function () {
|
|
1301
|
-
switch (aspectRatioValue) {
|
|
1302
|
-
case '4/3':
|
|
1303
|
-
return {
|
|
1304
|
-
aspectRatio: '4:3',
|
|
1305
|
-
className: 'aspect-[4/3]',
|
|
1306
|
-
};
|
|
1307
|
-
case '1/1':
|
|
1308
|
-
return {
|
|
1309
|
-
aspectRatio: '1:1',
|
|
1310
|
-
className: 'aspect-[1/1]',
|
|
1311
|
-
};
|
|
1312
|
-
case '3/4':
|
|
1313
|
-
return {
|
|
1314
|
-
aspectRatio: '3:4',
|
|
1315
|
-
className: 'aspect-[3/4]',
|
|
1316
|
-
};
|
|
1317
|
-
case '9/16':
|
|
1318
|
-
return {
|
|
1319
|
-
aspectRatio: '9:16',
|
|
1320
|
-
className: 'aspect-[9/16]',
|
|
1321
|
-
};
|
|
1322
|
-
case '16/7':
|
|
1323
|
-
return {
|
|
1324
|
-
aspectRatio: '16:7',
|
|
1325
|
-
className: 'aspect-[16/7]',
|
|
1326
|
-
};
|
|
1327
|
-
case '16/5':
|
|
1328
|
-
return {
|
|
1329
|
-
aspectRatio: '16:5',
|
|
1330
|
-
className: 'aspect-[16/5]',
|
|
1331
|
-
};
|
|
1332
|
-
default:
|
|
1333
|
-
return {
|
|
1334
|
-
aspectRatio: '16:9',
|
|
1335
|
-
className: 'aspect-[16/9]',
|
|
1336
|
-
};
|
|
1337
|
-
}
|
|
1338
|
-
}, [aspectRatioValue]);
|
|
1339
|
-
useEffect(function () {
|
|
1340
|
-
var _a;
|
|
1341
|
-
// Do not initialize Video.js player if it's a YouTube video
|
|
1342
|
-
if (isYoutube)
|
|
1343
|
-
return;
|
|
1344
|
-
var videoOptions = __assign(__assign({ autoplay: true, controls: true, muted: false, responsive: true, fill: true, fluid: true, aspectRatio: aspectRatioConfig.aspectRatio || '16:9', controlBar: {
|
|
1345
|
-
skipButtons: {
|
|
1346
|
-
forward: 30,
|
|
1347
|
-
backward: 30,
|
|
1348
|
-
},
|
|
1349
|
-
volumePanel: {
|
|
1350
|
-
inline: true,
|
|
1351
|
-
},
|
|
1352
|
-
}, html5: {
|
|
1353
|
-
hls: {
|
|
1354
|
-
enableLowInitialPlaylist: true, // Optional configuration for better HLS performance
|
|
1355
|
-
},
|
|
1356
|
-
} }, options), { sources: sources });
|
|
1357
|
-
// Make sure Video.js player is only initialized once
|
|
1358
|
-
if (!playerRef.current) {
|
|
1359
|
-
// The Video.js player needs to be _inside_ the component el for React 18 Strict Mode.
|
|
1360
|
-
var videoElement = document.createElement('video-js');
|
|
1361
|
-
videoElement.classList.add('vjs-big-play-centered');
|
|
1362
|
-
(_a = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _a === void 0 ? void 0 : _a.appendChild(videoElement);
|
|
1363
|
-
var player_1 = (playerRef.current = videojs(videoElement, videoOptions, function () {
|
|
1364
|
-
videojs.log('player is ready', player_1);
|
|
1365
|
-
onReady && onReady(player_1);
|
|
1366
|
-
}));
|
|
1367
|
-
// Wait for metadata to be loaded.
|
|
1368
|
-
player_1.on('loadedmetadata', function () {
|
|
1369
|
-
// @ts-expect-error - TS doesn't know about the audioTracks function.
|
|
1370
|
-
var audioTracksList = player_1.audioTracks();
|
|
1371
|
-
for (var i = 0; i < audioTracksList.length; i++) {
|
|
1372
|
-
if (audioTracksList[i].label === defaultAudioTrack) {
|
|
1373
|
-
audioTracksList[i].enabled = true;
|
|
1374
|
-
}
|
|
1375
|
-
}
|
|
1376
|
-
});
|
|
1377
|
-
// You could update an existing player in the `else` block here
|
|
1378
|
-
// on prop change, for example:
|
|
1379
|
-
}
|
|
1380
|
-
}, [options, videoRef]);
|
|
1381
|
-
// Dispose the Video.js player when the functional component unmounts
|
|
1382
|
-
useEffect(function () {
|
|
1383
|
-
// DO NOT dispose the player if it's a YouTube video
|
|
1384
|
-
if (isYoutube)
|
|
1385
|
-
return;
|
|
1386
|
-
var player = playerRef.current;
|
|
1387
|
-
return function () {
|
|
1388
|
-
if (player && !player.isDisposed()) {
|
|
1389
|
-
player.dispose();
|
|
1390
|
-
playerRef.current = null;
|
|
1391
|
-
}
|
|
1392
|
-
};
|
|
1393
|
-
}, [playerRef]);
|
|
1394
|
-
if (isYoutube && url) {
|
|
1395
|
-
return (jsx("div", { "data-testid": "Video", className: cx('relative w-full h-full aspect-[16/9]', className), children: jsx(ReactPlayer, { ref: reactPlayerRef, className: "react-player", url: url, width: "100%", height: "100%", controls: true, onReady: onReady }) }));
|
|
1396
|
-
}
|
|
1397
|
-
return (jsx("div", { className: twMerge(cx('relative w-full overflow-hidden h-full aspect-[16/9] bg-black object-cover', {
|
|
1398
|
-
rouded: rounded,
|
|
1399
|
-
}, aspectRatioConfig.className, className)), children: jsx("div", { "data-vjs-player": true, children: jsx("div", { ref: videoRef, className: "object-cover" }) }) }));
|
|
1400
|
-
};
|
|
1401
|
-
Video.displayName = 'Video';
|
|
1402
|
-
|
|
1403
|
-
var options = {
|
|
1404
|
-
replace: function (domNode) {
|
|
1405
|
-
// Handle a tag links.
|
|
1406
|
-
if (domNode.name === 'a') {
|
|
1407
|
-
var props = attributesToProps(domNode.attribs);
|
|
1408
|
-
return jsx(Link, __assign({}, props, { children: domToReact(domNode.children, options) }));
|
|
1409
|
-
}
|
|
1410
|
-
// Handle p tag copy.
|
|
1411
|
-
if (domNode.attribs && domNode.name === 'p') {
|
|
1412
|
-
var props = attributesToProps(domNode.attribs);
|
|
1413
|
-
return jsx(Copy, __assign({}, props, { children: domToReact(domNode.children, options) }));
|
|
1414
|
-
}
|
|
1415
|
-
// Handle default.
|
|
1416
|
-
return domNode;
|
|
1417
|
-
},
|
|
1418
|
-
};
|
|
1419
|
-
|
|
1420
|
-
var HtmlContent = function (_a) {
|
|
1421
|
-
var testID = _a.testID, data = _a.data, align = _a.align, className = _a.className;
|
|
1422
|
-
return (jsx("span", { "data-testid": testID || '"HtmlContent"', className: cx('relative', {
|
|
1423
|
-
'text-right': align === 'right',
|
|
1424
|
-
}, {
|
|
1425
|
-
'text-center': align === 'center',
|
|
1426
|
-
}, {
|
|
1427
|
-
'text-left': align === 'left',
|
|
1428
|
-
}, className), children: parse(data, options) }));
|
|
1429
|
-
};
|
|
1430
|
-
HtmlContent.displayName = 'HtmlContent';
|
|
1431
|
-
|
|
1432
|
-
var PanelHero = function (_a) {
|
|
1433
|
-
var testID = _a.testID, title = _a.title, description = _a.description, image = _a.image, _b = _a.buttonData, buttonData = _b === void 0 ? {
|
|
1434
|
-
variant: BTN_VARIANTS.PRIMARY,
|
|
1435
|
-
size: BTN_SIZES.LARGE,
|
|
1436
|
-
} : _b, _c = _a.inversed, inversed = _c === void 0 ? false : _c, _d = _a.withBg, withBg = _d === void 0 ? true : _d, _e = _a.spacing, spacing = _e === void 0 ? SPACING.MODULE : _e, video = _a.video;
|
|
1437
|
-
var controls = useAnimation();
|
|
1438
|
-
var ref = useRef(null);
|
|
1439
|
-
var isInView = useInView(ref);
|
|
1440
|
-
var defaultAnimation = {
|
|
1441
|
-
damping: 30,
|
|
1442
|
-
delay: 0,
|
|
1443
|
-
mass: 1.2,
|
|
1444
|
-
stiffness: 200,
|
|
1445
|
-
type: 'spring',
|
|
1446
|
-
duration: 0.5,
|
|
1447
|
-
};
|
|
1448
|
-
useEffect(function () {
|
|
1449
|
-
if (isInView) {
|
|
1450
|
-
controls.start(function (i) { return ({
|
|
1451
|
-
transform: 'none',
|
|
1452
|
-
transition: __assign(__assign({}, defaultAnimation), { delay: i * 0.1 }),
|
|
1453
|
-
}); });
|
|
1454
|
-
}
|
|
1455
|
-
}, [controls, isInView]);
|
|
1456
|
-
var aspectRatioClass = useMemo(function () {
|
|
1457
|
-
switch (video === null || video === void 0 ? void 0 : video.aspectRatioValue) {
|
|
1458
|
-
case '4/3':
|
|
1459
|
-
return 'aspect-[4/3]';
|
|
1460
|
-
case '1/1':
|
|
1461
|
-
return 'aspect-[1/1]';
|
|
1462
|
-
case '3/4':
|
|
1463
|
-
return 'aspect-[3/4]';
|
|
1464
|
-
case '9/16':
|
|
1465
|
-
return 'aspect-[9/16]';
|
|
1466
|
-
case '16/7':
|
|
1467
|
-
return 'aspect-[16/7]';
|
|
1468
|
-
case '16/5':
|
|
1469
|
-
return 'aspect-[16/5]';
|
|
1470
|
-
default:
|
|
1471
|
-
return 'aspect-[16/9]';
|
|
1472
|
-
}
|
|
1473
|
-
}, [video]);
|
|
1474
|
-
var translateX = inversed ? 'translateX(100px)' : 'translateX(-100px)';
|
|
1475
|
-
return (jsxs("div", { "data-testid": testID || 'PanelHero', className: cx('relative m-auto w-full flex flex-none flex-nowrap', spacing), children: [withBg && (jsx("div", { className: cx('rounded-full blur-[200px] flex flex-none aspect-1 absolute w-[700px] opacity-20 bg-gradient-to-r from-primary-darker to-primary-lighter z-0', {
|
|
1476
|
-
'-bottom-24 right-0': !inversed,
|
|
1477
|
-
'-top-24 left-0': inversed,
|
|
1478
|
-
}) })), jsx(Container, { children: jsxs("div", { className: cx('relative flex sm:flex-col md:flex-row flex-nowrap w-full h-min justify-between overflow-visible p-0 items-center gap-16', {
|
|
1479
|
-
'md:flex-row-reverse': inversed,
|
|
1480
|
-
}), children: [jsx("div", { ref: ref, className: "w-1/2 flex flex-col items-start justify-center z-10", children: jsxs("div", { className: cx('relative flex flex-col gap-4 from-body-background p-4 rounded', {
|
|
1481
|
-
'text-right bg-gradient-to-l': !inversed,
|
|
1482
|
-
}, {
|
|
1483
|
-
'text-left bg-gradient-to-r': inversed,
|
|
1484
|
-
}), children: [jsx(motion.div, { initial: {
|
|
1485
|
-
transform: translateX,
|
|
1486
|
-
}, custom: 0, animate: controls, children: jsx(DisplayHeading, { text: title }) }), jsx(motion.div, { initial: {
|
|
1487
|
-
transform: translateX,
|
|
1488
|
-
}, custom: 1, animate: controls, children: jsx(HtmlContent, { className: "mb-0", align: inversed ? COPY_ALIGN.LEFT : COPY_ALIGN.RIGHT, data: description }) }), jsx(motion.div, { initial: {
|
|
1489
|
-
transform: translateX,
|
|
1490
|
-
}, custom: 2, animate: controls, children: jsx("div", { className: cx('flex items-center', {
|
|
1491
|
-
'justify-end': !inversed,
|
|
1492
|
-
'justify-start': inversed,
|
|
1493
|
-
}), children: jsx(Button, __assign({}, buttonData)) }) })] }) }), jsx("div", { className: "relative w-1/2 z-0", children: jsxs("div", { className: cx('relative scale-[1.35] rounded overflow-hidden shadow', aspectRatioClass), children: [image && jsx(Image, { src: image, alt: title, fill: true }), video && (jsx(Video, { sources: video.sources, options: {
|
|
1494
|
-
autoplay: true,
|
|
1495
|
-
muted: true,
|
|
1496
|
-
controls: false,
|
|
1497
|
-
}, aspectRatioValue: video.aspectRatioValue }))] }) })] }) })] }));
|
|
1498
|
-
};
|
|
1499
|
-
PanelHero.displayName = 'PanelHero';
|
|
1500
|
-
|
|
1501
|
-
var PanelProduct = function (_a) {
|
|
1502
|
-
var testID = _a.testID, title = _a.title, description = _a.description, image1 = _a.image1, image2 = _a.image2, _b = _a.iosLink, iosLink = _b === void 0 ? '#' : _b, _c = _a.androidLink, androidLink = _c === void 0 ? '#' : _c, _d = _a.inversed, inversed = _d === void 0 ? false : _d, _e = _a.withBg, withBg = _e === void 0 ? true : _e, _f = _a.spacing, spacing = _f === void 0 ? SPACING.MODULE : _f;
|
|
1503
|
-
return (jsxs("div", { "data-testid": testID || 'PanelFeature', className: cx('relative m-auto w-full flex flex-none flex-nowrap', spacing), children: [withBg && (jsx("div", { className: "rounded-full blur-[250px] flex flex-none aspect-1 absolute -bottom-24 -right-48 w-[500px] opacity-20 bg-gradient-to-r from-primary-darker to-primary-lighter" })), jsx(Container, { children: jsxs("div", { className: cx('relative flex flex-col md:flex-row flex-nowrap w-full h-full overflow-visible gap-16 border border-solid border-primary bg-primary bg-opacity-10 backdrop-blur-lg rounded border-opacityDark20 p-8', {
|
|
1504
|
-
'flex-row-reverse': inversed,
|
|
1505
|
-
}), children: [jsxs("div", { className: "w-full md:w-1/2 top-0 relative", children: [jsx("div", { className: "absolute aspect-[8/17] -rotate-12 w-[135px] left-1/3 top-4 md:w-[180px] md:left-1/3 md:top-4 lg:w-[210px] lg:left-1/2 lg:-top-1/3", children: jsx(Image, { src: image2, alt: title }) }), jsx("div", { className: "relative md:absolute aspect-[8/17] -rotate-0 w-[150px] left-0 top-0 md:w-[220px] md:left-0 md:-top-6 lg:w-[250px] lg:left-1/4 lg:-top-1/2", children: jsx(Image, { src: image1, alt: title }) })] }), jsxs("div", { className: "w-full md:w-1/2", children: [jsx("div", { children: jsx(DisplayHeading, { text: title }) }), jsx("div", { children: jsx(Copy, { children: description }) }), jsxs("div", { className: "flex items-center justify-start gap-4", children: [jsx("div", { className: "relative w-[150px] h-[50px]", children: jsx(Link, { href: iosLink, target: "_blank", hideExternalIcon: true, children: jsx(Image, { src: "https://apple-resources.s3.amazonaws.com/media-badges/download-on-the-app-store/black/en-us.svg", alt: "App Store" }) }) }), jsx("div", { className: "relative w-[190px] h-[75px]", children: jsx(Link, { href: androidLink, target: "_blank", hideExternalIcon: true, children: jsx(Image, { src: "https://play.google.com/intl/en_us/badges/static/images/badges/en_badge_web_generic.png", alt: "Google Play" }) }) })] })] })] }) })] }));
|
|
1506
|
-
};
|
|
1507
|
-
PanelProduct.displayName = 'PanelProduct';
|
|
1508
|
-
|
|
1509
|
-
var PanelVideo = function (_a) {
|
|
1510
|
-
var testID = _a.testID, className = _a.className, title = _a.title, description = _a.description, _b = _a.spacing, spacing = _b === void 0 ? SPACING.NONE : _b, videoProps = _a.videoProps;
|
|
1511
|
-
return (jsxs("div", { "data-testid": testID || '"PanelVideo"', className: cx('relative m-auto w-full flex flex-none flex-nowrap aspect-[16/6.6]', spacing, className), children: [jsx(Video, { rounded: false, options: __assign({ autoplay: true, muted: true, controls: false, loop: true }, videoProps === null || videoProps === void 0 ? void 0 : videoProps.options), sources: videoProps === null || videoProps === void 0 ? void 0 : videoProps.sources }), jsxs("div", { className: "absolute top-0 left-0 w-full h-full z-10", children: [jsx("div", { className: "absolute top-0 left-0 w-full h-full bg-gradient-to-r from-transparent to-black opacity-50" }), jsxs("div", { className: "absolute top-0 left-0 w-full h-full flex flex-col items-end justify-center pr-24 invert", children: [title && (jsx(motion.div, { initial: {
|
|
1512
|
-
transform: 'translateX(25px)',
|
|
1513
|
-
}, animate: {
|
|
1514
|
-
transform: 'none',
|
|
1515
|
-
transition: { damping: 60, delay: 0, mass: 1.2, stiffness: 300, type: 'spring' },
|
|
1516
|
-
}, transition: { duration: 0.5 }, children: jsx("div", { children: jsx(Heading, { tag: HEADING_TAGS.H2, children: title }) }) })), description && (jsx(motion.div, { initial: {
|
|
1517
|
-
transform: 'translateX(25px)',
|
|
1518
|
-
}, animate: {
|
|
1519
|
-
transform: 'none',
|
|
1520
|
-
transition: { damping: 60, delay: 0, mass: 1.2, stiffness: 300, type: 'spring' },
|
|
1521
|
-
}, transition: { duration: 0.5 }, children: jsx("div", { children: jsx(Copy, { children: description }) }) }))] })] })] }));
|
|
1522
|
-
};
|
|
1523
|
-
PanelVideo.displayName = 'PanelVideo';
|
|
1524
|
-
|
|
1525
|
-
var ButtonGroup = function (_a) {
|
|
1526
|
-
var testID = _a.testID, buttonData = _a.buttonData;
|
|
1527
|
-
return (jsx("div", { "data-testid": testID || 'ButtonGroup', className: "inline-flex rounded", role: "group", children: buttonData === null || buttonData === void 0 ? void 0 : buttonData.map(function (data, index) {
|
|
1528
|
-
var isNotFirstOrLast = index > 0 && index < buttonData.length - 1;
|
|
1529
|
-
var isFirst = index === 0;
|
|
1530
|
-
var isLast = index === buttonData.length - 1;
|
|
1531
|
-
var buttonClasses = cx({ 'rounded-none': isNotFirstOrLast }, {
|
|
1532
|
-
'rounded-r': isFirst,
|
|
1533
|
-
'rounded-l': isLast,
|
|
1534
|
-
});
|
|
1535
|
-
return (jsx("div", { children: jsx(Button, __assign({}, data, { className: buttonClasses, children: data.children })) }, data.id));
|
|
1536
|
-
}) }));
|
|
1537
|
-
};
|
|
1538
|
-
ButtonGroup.displayName = 'ButtonGroup';
|
|
1539
|
-
|
|
1540
|
-
var Share = function (_a) {
|
|
1541
|
-
var testID = _a.testID, url = _a.url, _b = _a.title, title = _b === void 0 ? 'Share' : _b, _c = _a.enabled, enabled = _c === void 0 ? { facebook: true, twitter: true } : _c;
|
|
1542
|
-
return (jsxs("div", { "data-testid": testID || 'Share', className: "flex gap-2 items-center ", children: [jsx("div", { children: jsxs(Copy, { as: COPY_TAG.P, className: "mb-0", children: [en.UI.SHARE, ":"] }) }), (enabled === null || enabled === void 0 ? void 0 : enabled.facebook) && (jsx(FacebookShareButton, { url: url, title: title, className: "", children: jsx(Icon, { name: "mdi:facebook" }) })), (enabled === null || enabled === void 0 ? void 0 : enabled.twitter) && (jsx(TwitterShareButton, { url: url, title: title, className: "", children: jsx(Icon, { name: "mdi:twitter" }) })), (enabled === null || enabled === void 0 ? void 0 : enabled.whatsapp) && (jsx(WhatsappShareButton, { url: url, title: title, className: "", children: jsx(Icon, { name: "mdi:whatsapp" }) })), (enabled === null || enabled === void 0 ? void 0 : enabled.email) && (jsx(EmailShareButton, { url: url, title: title, className: "", children: jsx(Icon, { name: "mdi:email" }) })), (enabled === null || enabled === void 0 ? void 0 : enabled.linkedin) && (jsx(LinkedinShareButton, { url: url, title: title, className: "", children: jsx(Icon, { name: "mdi:linkedin" }) }))] }));
|
|
1543
|
-
};
|
|
1544
|
-
Share.displayName = 'Share';
|
|
1545
|
-
|
|
1546
|
-
var VisitUs = function (_a) {
|
|
1547
|
-
var testID = _a.testID, facebook = _a.facebook, twitter = _a.twitter, instagram = _a.instagram, linkedin = _a.linkedin;
|
|
1548
|
-
return (jsxs("div", { "data-testid": testID || '"VisitUs"', className: "flex gap-2", children: [facebook && (jsx(Button, { variant: BTN_VARIANTS.PRIMARY, size: BTN_SIZES.MEDIUM, icon: "mdi:facebook", onClick: function () { return window.open(facebook.url); } })), twitter && (jsx(Button, { variant: BTN_VARIANTS.PRIMARY, size: BTN_SIZES.MEDIUM, icon: "mdi:twitter", onClick: function () { return window.open(twitter.url); } })), instagram && (jsx(Button, { variant: BTN_VARIANTS.PRIMARY, size: BTN_SIZES.MEDIUM, icon: "mdi:instagram", onClick: function () { return window.open(instagram.url); } })), linkedin && (jsx(Button, { variant: BTN_VARIANTS.PRIMARY, size: BTN_SIZES.MEDIUM, icon: "mdi:linkedin", onClick: function () { return window.open(linkedin.url); } }))] }));
|
|
1549
|
-
};
|
|
1550
|
-
VisitUs.displayName = 'VisitUs';
|
|
1551
|
-
|
|
1552
|
-
var Menu = function (_a) {
|
|
1553
|
-
var testID = _a.testID, title = _a.title, links = _a.links, _b = _a.inline, inline = _b === void 0 ? true : _b, _c = _a.separators, separators = _c === void 0 ? false : _c, className = _a.className;
|
|
1554
|
-
return (jsxs("div", { "data-testid": testID || '"Menu"', className: twMerge(cx('flex flex-col gap-2', className)), children: [title && (jsx("div", { children: jsx(Heading, { tag: HEADING_TAGS.H3, children: title }) })), jsx("div", { className: cx('flex gap-0 items-center md:items-start', { 'flex-row ': inline }, { 'flex-col ': !inline }), children: links === null || links === void 0 ? void 0 : links.map(function (link, index) {
|
|
1555
|
-
var key = "".concat(link.id, "--").concat(index);
|
|
1556
|
-
return (jsxs("div", { className: 'flex gap-0', children: [jsx("div", { className: "relative py-2", children: jsxs(Link, { href: link.url, className: "flex gap-1", children: [link.icon && jsx(Icon, { name: link.icon }), link.title && jsx("div", { children: link.title })] }) }), separators && index + 1 < links.length && (jsx("div", { className: "h-full flex self-center px-2", children: jsx(Icon, { name: "mdi:dot", className: "opacity-50" }) }))] }, key));
|
|
1557
|
-
}) })] }));
|
|
1558
|
-
};
|
|
1559
|
-
Menu.displayName = 'Menu';
|
|
1560
|
-
|
|
1561
|
-
var Hero = function (_a) {
|
|
1562
|
-
var testID = _a.testID, children = _a.children, _b = _a.withBg, withBg = _b === void 0 ? true : _b, _c = _a.inversed, inversed = _c === void 0 ? false : _c;
|
|
1563
|
-
return (jsxs("div", { "data-testid": testID || 'PanelHero', className: "relative py-8 m-auto w-full flex flex-none flex-nowrap", children: [withBg && (jsx("div", { className: cx('rounded-full blur-[200px] flex flex-none aspect-1 absolute w-[700px] opacity-20 bg-gradient-to-r from-primary-darker to-primary-lighter z-0', {
|
|
1564
|
-
'-bottom-24 right-0': !inversed,
|
|
1565
|
-
'-top-24 left-0': inversed,
|
|
1566
|
-
}) })), jsx(Container, { children: children })] }));
|
|
1567
|
-
};
|
|
1568
|
-
Hero.displayName = 'Hero';
|
|
1569
|
-
|
|
1570
|
-
var CPL_SPACING;
|
|
1571
|
-
(function (CPL_SPACING) {
|
|
1572
|
-
CPL_SPACING["NONE"] = "none";
|
|
1573
|
-
CPL_SPACING["ATOM"] = "atom";
|
|
1574
|
-
CPL_SPACING["DEFAULT"] = "default";
|
|
1575
|
-
CPL_SPACING["ELEMENT"] = "element";
|
|
1576
|
-
CPL_SPACING["COMPONENT"] = "component";
|
|
1577
|
-
CPL_SPACING["MODULE"] = "module";
|
|
1578
|
-
CPL_SPACING["FEATURE"] = "feature";
|
|
1579
|
-
})(CPL_SPACING || (CPL_SPACING = {}));
|
|
1580
|
-
|
|
1581
|
-
var ContentPageLayout = function (_a) {
|
|
1582
|
-
var _b = _a.spacing, spacing = _b === void 0 ? CPL_SPACING.DEFAULT : _b, children = _a.children, narrow = _a.narrow, flush = _a.flush, className = _a.className;
|
|
1583
|
-
var classes = cx('flex', 'flex-col', 'flex-1', 'relative', { 'py-40': spacing === 'feature' }, { 'py-24': spacing === 'component' }, { 'py-16': spacing === 'module' }, { 'py-10': spacing === 'element' }, { 'py-8': spacing === 'default' }, { 'py-4': spacing === 'atom' }, { 'py-0': spacing === 'none' }, { 'max-w-5xl': narrow }, { 'p-0': flush }, className);
|
|
1584
|
-
return (jsx("div", { "data-testid": "ContentPageLayout", className: classes, children: children }));
|
|
1585
|
-
};
|
|
1586
|
-
ContentPageLayout.displayName = 'ContentPageLayout';
|
|
1587
|
-
|
|
1588
|
-
var CRL_SIZE;
|
|
1589
|
-
(function (CRL_SIZE) {
|
|
1590
|
-
CRL_SIZE["NONE"] = "none";
|
|
1591
|
-
CRL_SIZE["ATOM"] = "atom";
|
|
1592
|
-
CRL_SIZE["DEFAULT"] = "default";
|
|
1593
|
-
CRL_SIZE["ELEMENT"] = "element";
|
|
1594
|
-
CRL_SIZE["COMPONENT"] = "component";
|
|
1595
|
-
CRL_SIZE["MODULE"] = "module";
|
|
1596
|
-
CRL_SIZE["FEATURE"] = "feature";
|
|
1597
|
-
})(CRL_SIZE || (CRL_SIZE = {}));
|
|
1598
|
-
|
|
1599
|
-
var ContentRowsLayout = function (_a) {
|
|
1600
|
-
var className = _a.className, children = _a.children, _b = _a.size, size = _b === void 0 ? CRL_SIZE.DEFAULT : _b;
|
|
1601
|
-
var classes = cx('grid', 'auto-rows-min', 'grid-cols-1', 'gap-x-4', { 'gap-y-0 mb-0': size === 'none' }, { 'gap-y-2 mb-2': size === 'atom' }, { 'gap-y-4 mb-4': size === 'default' }, { 'gap-y-8 mb-8': size === 'element' }, { 'gap-y-16 mb-16': size === 'module' }, { 'gap-y-24 mb-24': size === 'component' }, { 'gap-y-40 mb-40': size === 'feature' }, className);
|
|
1602
|
-
return (jsx("div", { "data-testid": "ContentRowsLayout", className: classes, children: children }));
|
|
1603
|
-
};
|
|
1604
|
-
ContentRowsLayout.displayName = 'ContentRowsLayout';
|
|
1605
|
-
|
|
1606
|
-
var AppContext = createContext({
|
|
1607
|
-
brand: undefined,
|
|
1608
|
-
header: undefined,
|
|
1609
|
-
footer: undefined,
|
|
1610
|
-
});
|
|
1611
|
-
var AppProvider = function (_a) {
|
|
1612
|
-
var children = _a.children, value = _a.value;
|
|
1613
|
-
return jsx(AppContext.Provider, { value: value, children: children });
|
|
1614
|
-
};
|
|
1615
|
-
|
|
1616
|
-
var Footer = function (_a) {
|
|
1617
|
-
var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
|
1618
|
-
var testID = _a.testID, className = _a.className, _q = _a.logoAspectRatio, logoAspectRatio = _q === void 0 ? 'aspect-[16/9]' : _q;
|
|
1619
|
-
var context = useContext(AppContext);
|
|
1620
|
-
return (jsxs("footer", { className: cx('w-full md:max-w-screen-lg lg:max-w-screen-xl m-auto pt-16 pb-8', className), children: [jsxs("div", { "data-testid": testID || '"Footer"', className: "footer flex flex-col md:flex-row py-8 gap-8", children: [jsxs("div", { className: "relative w-full md:w-1/3 flex flex-col gap-4 items-center md:items-start", children: [((_b = context === null || context === void 0 ? void 0 : context.brand) === null || _b === void 0 ? void 0 : _b.logo) && (jsx("div", { className: "relative w-24", children: jsx(Logo, { logo: (_c = context === null || context === void 0 ? void 0 : context.brand) === null || _c === void 0 ? void 0 : _c.logo, aspectRatioClass: logoAspectRatio }) })), ((_d = context.footer) === null || _d === void 0 ? void 0 : _d.about) && (jsx("div", { children: jsx(Copy, { children: context.footer.about }) })), jsx("div", { children: jsx(VisitUs, { facebook: (_f = (_e = context.footer) === null || _e === void 0 ? void 0 : _e.visitUs) === null || _f === void 0 ? void 0 : _f.facebook, twitter: (_h = (_g = context.footer) === null || _g === void 0 ? void 0 : _g.visitUs) === null || _h === void 0 ? void 0 : _h.twitter, instagram: (_k = (_j = context.footer) === null || _j === void 0 ? void 0 : _j.visitUs) === null || _k === void 0 ? void 0 : _k.instagram, linkedin: (_m = (_l = context.footer) === null || _l === void 0 ? void 0 : _l.visitUs) === null || _m === void 0 ? void 0 : _m.linkedin }) })] }), ((_o = context.footer) === null || _o === void 0 ? void 0 : _o.menus) && (jsx("div", { className: "flex gap-4 flex-1 flex-col md:flex-row items-center md:items-start", children: context.footer.menus.map(function (menu, index) { return (jsx("div", { className: "flex flex-1", children: jsx(Menu, { title: menu.title, links: menu.links, inline: false }) }, "".concat(menu.title, "--").concat(index))); }) }))] }), jsxs("div", { className: "flex items-center justify-center flex-col", children: [jsxs(Copy, { align: COPY_ALIGN.CENTER, as: COPY_TAG.SMALL, children: ["\u00A9 ", new Date().getFullYear(), " ", en.UI.COPYRIGHT, " ", (_p = context.brand) === null || _p === void 0 ? void 0 : _p.name] }), jsx(Copy, { align: COPY_ALIGN.CENTER, as: COPY_TAG.SMALL, children: en.UI.ALL_RIGHTS_RESERVED })] })] }));
|
|
1621
|
-
};
|
|
1622
|
-
Footer.displayName = 'Footer';
|
|
1623
|
-
|
|
1624
|
-
var Header = function (_a) {
|
|
1625
|
-
var _b, _c, _d, _e;
|
|
1626
|
-
var testID = _a.testID, menuLinks = _a.menuLinks, profileLinks = _a.profileLinks, loginCallback = _a.loginCallback, logoutCallback = _a.logoutCallback, _f = _a.isAuthenticated, isAuthenticated = _f === void 0 ? false : _f, _g = _a.hideMenu, hideMenu = _g === void 0 ? false : _g, _h = _a.logoAspectRatio, logoAspectRatio = _h === void 0 ? 'aspect-[16/9]' : _h, className = _a.className;
|
|
1627
|
-
var context = useContext(AppContext);
|
|
1628
|
-
var _j = useState('hidden'), mobileMenuClass = _j[0], mobileMenuIcon = _j[1];
|
|
1629
|
-
var _k = useState(false), showDropdown = _k[0], setShowDropdown = _k[1];
|
|
1630
|
-
var toggleMenuClass = function () {
|
|
1631
|
-
if (mobileMenuClass === 'hidden') {
|
|
1632
|
-
mobileMenuIcon('block');
|
|
1633
|
-
}
|
|
1634
|
-
else {
|
|
1635
|
-
mobileMenuIcon('hidden');
|
|
1636
|
-
}
|
|
1637
|
-
};
|
|
1638
|
-
return (jsxs("header", { "data-testid": testID || '"Header"', className: cx('w-full md:max-w-screen-lg lg:max-w-screen-xl m-auto py-4 px-4 md:px-2 lg:px-0', className), children: [jsxs("div", { className: "relative w-full flex", children: [((_b = context === null || context === void 0 ? void 0 : context.brand) === null || _b === void 0 ? void 0 : _b.logo) && (jsx("div", { className: "relative w-32", children: jsx(Link, { href: "/", children: jsx(Logo, { logo: (_c = context === null || context === void 0 ? void 0 : context.brand) === null || _c === void 0 ? void 0 : _c.logo, aspectRatioClass: logoAspectRatio }) }) })), jsx("div", { className: "flex-1 hidden md:flex items-center justify-center", children: jsx(Menu, { links: menuLinks, separators: true }) }), jsxs("div", { className: "hidden md:flex flex-col justify-center", children: [!isAuthenticated && jsx(Button, { onClick: loginCallback, children: en.UI.LOGIN }), isAuthenticated && (jsxs("div", { className: "relative", children: [jsx(Button, { onClick: function () { return setShowDropdown(!showDropdown); }, icon: !showDropdown ? 'mdi:user' : 'mdi:user-outline' }), jsx("div", { onClick: function () { return setShowDropdown(false); }, className: cx('absolute bg-body-background dark:bg-dark-body-background shadow rounded py-2 px-4 right-0 top-12 w-24 z-20', { hidden: !showDropdown }), children: jsx(Menu, { links: profileLinks, inline: false }) })] }))] }), jsx("div", { className: "flex md:hidden flex-col justify-center flex-1 items-end", children: jsx(Button, { variant: BTN_VARIANTS.PRIMARY, icon: "mdi:menu", onClick: toggleMenuClass }) })] }), jsxs("div", { className: cx('navbar-menu relative z-50', mobileMenuClass, { hidden: hideMenu }), children: [jsx("div", { className: "navbar-backdrop fixed inset-0 bg-black opacity-25" }), jsxs("nav", { className: "fixed top-0 left-0 bottom-0 flex flex-col w-5/6 max-w-sm py-4 px-4 bg-body-background dark:bg-dark-body-background border-r overflow-y-auto", children: [jsxs("div", { className: "flex justify-between", children: [jsx("div", { className: "relative w-32", children: ((_d = context === null || context === void 0 ? void 0 : context.brand) === null || _d === void 0 ? void 0 : _d.logo) && (jsx("div", { className: "relative w-32", children: jsx(Logo, { logo: (_e = context === null || context === void 0 ? void 0 : context.brand) === null || _e === void 0 ? void 0 : _e.logo, aspectRatioClass: "aspect-[16/9]" }) })) }), jsx("div", { children: jsx(Button, { variant: BTN_VARIANTS.PRIMARY, icon: "mdi:close", onClick: toggleMenuClass }) })] }), jsxs("div", { className: "flex flex-col flex-1 gap-4", children: [isAuthenticated && (jsx("div", { className: "md:hidden flex justify-center", children: jsx(Copy, { children: "User profile avatar and details here." }) })), jsx("div", { className: "flex flex-1 justify-center pt-4", children: jsx(Menu, { links: menuLinks, inline: false }) }), isAuthenticated && (jsx("div", { className: "md:hidden flex justify-center", children: jsx(Button, { onClick: logoutCallback, children: en.UI.LOGOUT }) })), !isAuthenticated && (jsx("div", { className: "md:hidden flex justify-center", children: jsx(Button, { onClick: function () {
|
|
1639
|
-
loginCallback();
|
|
1640
|
-
toggleMenuClass();
|
|
1641
|
-
}, children: en.UI.LOGIN }) }))] })] })] })] }));
|
|
1642
|
-
};
|
|
1643
|
-
Header.displayName = 'Header';
|
|
1644
|
-
|
|
1645
|
-
var OTPInput = function (_a) {
|
|
1646
|
-
var testID = _a.testID, inputCallback = _a.inputCallback, seperator = _a.seperator, _b = _a.numInputs, numInputs = _b === void 0 ? 4 : _b, _c = _a.shouldAutoFocus, shouldAutoFocus = _c === void 0 ? false : _c, _d = _a.size, size = _d === void 0 ? 'medium' : _d;
|
|
1647
|
-
var _e = useState(''), otp = _e[0], setOtp = _e[1];
|
|
1648
|
-
React.useEffect(function () {
|
|
1649
|
-
if (otp && otp.length === 4 && inputCallback !== undefined && typeof inputCallback === 'function') {
|
|
1650
|
-
inputCallback(otp);
|
|
1651
|
-
}
|
|
1652
|
-
}, [otp]);
|
|
1653
|
-
var sizeRatio = useMemo(function () {
|
|
1654
|
-
switch (size) {
|
|
1655
|
-
case 'small':
|
|
1656
|
-
return {
|
|
1657
|
-
width: '2.5rem',
|
|
1658
|
-
height: '3rem',
|
|
1659
|
-
};
|
|
1660
|
-
case 'medium':
|
|
1661
|
-
return {
|
|
1662
|
-
width: '3.5rem',
|
|
1663
|
-
height: '4rem',
|
|
1664
|
-
};
|
|
1665
|
-
case 'large':
|
|
1666
|
-
return {
|
|
1667
|
-
width: '4.5rem',
|
|
1668
|
-
height: '5rem',
|
|
1669
|
-
};
|
|
1670
|
-
default:
|
|
1671
|
-
return {
|
|
1672
|
-
width: '2.5rem',
|
|
1673
|
-
height: '2.5rem',
|
|
1674
|
-
};
|
|
1675
|
-
}
|
|
1676
|
-
}, [size]);
|
|
1677
|
-
return (jsx("div", { "data-testid": testID || '"OTPInput"', className: "foo-bar", children: jsx(ROtpInput, { value: otp, onChange: setOtp, inputType: "number", numInputs: numInputs, shouldAutoFocus: shouldAutoFocus, renderSeparator: seperator ? (function () { return (jsx("div", { className: "flex items-center justify-center", children: jsx(Icon, { name: "mdi:dot", className: "opacity-50" }) })); }) : (jsx("div", { className: "flex items-center justify-center w-4" })), renderInput: function (props) { return jsx("input", __assign({}, props, { className: cx('remove-arrow form-item text-input w-12') })); }, inputStyle: {
|
|
1678
|
-
width: sizeRatio.width,
|
|
1679
|
-
height: sizeRatio.height,
|
|
1680
|
-
} }) }));
|
|
1681
|
-
};
|
|
1682
|
-
OTPInput.displayName = 'OTPInput';
|
|
1683
|
-
|
|
1684
|
-
var CardVariant;
|
|
1685
|
-
(function (CardVariant) {
|
|
1686
|
-
CardVariant["BASIC"] = "basic";
|
|
1687
|
-
CardVariant["MEDIA"] = "media";
|
|
1688
|
-
CardVariant["VIDEO"] = "video";
|
|
1689
|
-
CardVariant["ICON"] = "icon";
|
|
1690
|
-
CardVariant["HORZ"] = "horz";
|
|
1691
|
-
CardVariant["DATA"] = "data";
|
|
1692
|
-
})(CardVariant || (CardVariant = {}));
|
|
1693
|
-
|
|
1694
|
-
var ResultAsTypes;
|
|
1695
|
-
(function (ResultAsTypes) {
|
|
1696
|
-
ResultAsTypes["cardBasic"] = "cardBasic";
|
|
1697
|
-
ResultAsTypes["cardMedia"] = "cardMedia";
|
|
1698
|
-
ResultAsTypes["cardVideo"] = "cardVideo";
|
|
1699
|
-
})(ResultAsTypes || (ResultAsTypes = {}));
|
|
1700
|
-
|
|
1701
|
-
function Sorting(_a) {
|
|
1702
|
-
var className = _a.className, label = _a.label, onChange = _a.onChange, options = _a.options;
|
|
1703
|
-
return (jsxs("div", { className: cx('m-0 p-0 mb-2 border-none', className), children: [jsx(Label, { className: "text-sm", transform: COPY_TRANSFORM.UPPERCASE, children: label }), jsx(FormSelect, { id: label || 'Sorting', options: options, onChange: function (o) { return onChange(o.target.value); } })] }));
|
|
1704
|
-
}
|
|
1705
|
-
Sorting.displayName = 'Sorting';
|
|
1706
|
-
|
|
1707
|
-
function Paging(_a) {
|
|
1708
|
-
var className = _a.className, current = _a.current, _b = _a.resultsPerPage, resultsPerPage = _b === void 0 ? 10 : _b, onChange = _a.onChange, totalPages = _a.totalPages, rest = __rest(_a, ["className", "current", "resultsPerPage", "onChange", "totalPages"]);
|
|
1709
|
-
return (jsx(RCPagination, __assign({ current: current, onChange: onChange, simple: true, pageSize: resultsPerPage, total: totalPages * resultsPerPage, className: cx('m-0 p-0 list-none text-body-text flex gap-2 text-center items-center [&>li>span]:px-2', className), locale: enUsLocale, prevIcon: jsx("div", { className: "text-body-text", children: jsx(Icon, { name: "mdi:chevron-left" }) }), nextIcon: jsx("div", { className: "text-body-text", children: jsx(Icon, { name: "mdi:chevron-right" }) }) }, rest)));
|
|
1710
|
-
}
|
|
1711
|
-
Paging.displayName = 'Paging';
|
|
1712
|
-
|
|
1713
|
-
function ResultsPerPage(_a) {
|
|
1714
|
-
var className = _a.className, onChange = _a.onChange, options = _a.options, label = _a.label;
|
|
1715
|
-
// Return nothing without options.
|
|
1716
|
-
if (!options) {
|
|
1717
|
-
return jsx(Fragment, {});
|
|
1718
|
-
}
|
|
1719
|
-
return (jsxs("div", { className: cx('m-0 p-0 border-none flex items-center justify-end', className), children: [jsx(Label, { className: "text-sm mr-2", transform: COPY_TRANSFORM.UPPERCASE, children: en.UI.SHOW }), jsx(FormSelect, { id: label || 'ResultsPerPage', options: options.map(function (option) { return ({ label: option.toString(), value: option }); }), onChange: function (o) { return onChange(o.target.value); }, className: "min-w-20" })] }));
|
|
1720
|
-
}
|
|
1721
|
-
ResultsPerPage.displayName = 'ResultsPerPage';
|
|
1722
|
-
|
|
1723
|
-
function PagingInfo(_a) {
|
|
1724
|
-
var className = _a.className, end = _a.end, searchTerm = _a.searchTerm, start = _a.start, totalResults = _a.totalResults, rest = __rest(_a, ["className", "end", "searchTerm", "start", "totalResults"]);
|
|
1725
|
-
return (jsxs("div", __assign({ className: cx("m-0 p-0", className) }, rest, { children: ["Showing", " ", jsxs("strong", { children: [start, " - ", end] }), " ", "out of ", jsx("strong", { children: totalResults }), searchTerm && (jsxs(Fragment, { children: [" ", "for: ", jsx("em", { children: searchTerm })] }))] })));
|
|
1726
|
-
}
|
|
1727
|
-
PagingInfo.displayName = 'PagingInfo';
|
|
1728
|
-
|
|
1729
|
-
function SearchBox(_a) {
|
|
1730
|
-
var className = _a.className, onChange = _a.onChange, onSubmit = _a.onSubmit, wasSearched = _a.wasSearched, placeholder = _a.placeholder;
|
|
1731
|
-
var searchContext = useContext(SearchContext);
|
|
1732
|
-
return (jsx("div", { className: cx('m-0 px-48', className), children: jsxs("form", { onSubmit: function (e) { return onSubmit(e); }, className: "flex items-center", children: [jsx("div", { className: "flex-1 bg-body-background dark:bg-dark-body-background bg-opacity-80", children: jsx(TextInput, { name: "SearchBoxInput", type: InputType.TEXT, placeholder: placeholder || 'Search now...', onChange: function (e) {
|
|
1733
|
-
var _a;
|
|
1734
|
-
onChange((_a = e === null || e === void 0 ? void 0 : e.target) === null || _a === void 0 ? void 0 : _a.value);
|
|
1735
|
-
} }) }), jsx("div", { className: "pl-4", children: jsxs("div", { className: "flex flex-row gap-2", children: [wasSearched && (jsx(Button, { type: BTN_TYPES.BUTTON, onClick: function () { return searchContext.driver.reset(); }, variant: BTN_VARIANTS.SECONDARY, children: "Reset" })), jsx(Button, { type: BTN_TYPES.SUBMIT, variant: BTN_VARIANTS.PRIMARY, children: "Search" })] }) })] }) }));
|
|
1736
|
-
}
|
|
1737
|
-
SearchBox.displayName = 'SearchBox';
|
|
1738
|
-
|
|
1739
|
-
// import Sidebar from "../Sidebar";
|
|
1740
|
-
function Layout(_a) {
|
|
1741
|
-
var className = _a.className, children = _a.children, header = _a.header, bodyContent = _a.bodyContent, bodyFooter = _a.bodyFooter, bodyHeader = _a.bodyHeader, sideContent = _a.sideContent;
|
|
1742
|
-
var sidebarClasses = cx('hidden md:block fixed md:relative w-full h-full left-0 md:left-auto top-0 md:top-auto px-2 pb-4 md:pt-6 md:px-6 md:pb-auto md:pl-0', { 'hidden md:hidden': !sideContent });
|
|
1743
|
-
return (jsxs("div", { className: cx('w-full flex flex-col', className), children: [jsx("div", { className: "m-auto md:py-0 w-full", children: header }), jsxs("div", { className: cx('md:grid m-auto md:py-0 w-full', {
|
|
1744
|
-
'md:grid-cols-search-layout': !sideContent,
|
|
1745
|
-
'md:grid-cols-search-layout-with-sidebar': sideContent,
|
|
1746
|
-
}), children: [jsx("div", { className: sidebarClasses, children: sideContent }), jsxs("div", { className: cx('p-0 pt-2 md:p-6 md:pr-0', {
|
|
1747
|
-
'md:pl-0': !sideContent,
|
|
1748
|
-
}), children: [jsx("div", { className: "flex items-center justify-between", children: bodyHeader }), jsx("div", { className: "relative", children: children || bodyContent }), jsx("div", { className: "flex items-center justify-around", children: bodyFooter })] })] })] }));
|
|
1749
|
-
}
|
|
1750
|
-
Layout.displayName = 'Layout';
|
|
1751
|
-
|
|
1752
|
-
function Results(_a) {
|
|
1753
|
-
var children = _a.children, className = _a.className, gridClasses = _a.gridClasses, rest = __rest(_a, ["children", "className", "gridClasses"]);
|
|
1754
|
-
var layoutClasses = gridClasses || 'grid-cols-1 md:grid-cols-2 lg:grid-cols-3';
|
|
1755
|
-
return (jsx("ul", __assign({ className: cx('relative grid gap-4 mb-4', layoutClasses, className) }, rest, { children: children })));
|
|
1756
|
-
}
|
|
1757
|
-
Results.displayName = 'Results';
|
|
1758
|
-
|
|
1759
|
-
/*
|
|
1760
|
-
Since Filter Values come in many different varieties, this helper
|
|
1761
|
-
encapsulates the logic for determining how to show the label of that
|
|
1762
|
-
filter in the UI.
|
|
1763
|
-
*/
|
|
1764
|
-
function getFilterValueDisplay(filterValue) {
|
|
1765
|
-
if (filterValue === undefined || filterValue === null)
|
|
1766
|
-
return '';
|
|
1767
|
-
if (Object.prototype.hasOwnProperty.call(filterValue, 'name'))
|
|
1768
|
-
return filterValue.name;
|
|
1769
|
-
return String(filterValue);
|
|
1770
|
-
}
|
|
1771
|
-
|
|
1772
|
-
function getFieldType(object, type) {
|
|
1773
|
-
if (object)
|
|
1774
|
-
return object[type];
|
|
1775
|
-
}
|
|
1776
|
-
function getRaw(object) {
|
|
1777
|
-
return getFieldType(object, 'raw');
|
|
1778
|
-
}
|
|
1779
|
-
function getSnippet(object) {
|
|
1780
|
-
return getFieldType(object, 'snippet');
|
|
1781
|
-
}
|
|
1782
|
-
function htmlEscape(str) {
|
|
1783
|
-
if (!str)
|
|
1784
|
-
return '';
|
|
1785
|
-
return String(str)
|
|
1786
|
-
.replace(/&/g, '&')
|
|
1787
|
-
.replace(/"/g, '"')
|
|
1788
|
-
.replace(/'/g, ''')
|
|
1789
|
-
.replace(/</g, '<')
|
|
1790
|
-
.replace(/>/g, '>');
|
|
1791
|
-
}
|
|
1792
|
-
function getEscapedField(maybeObject) {
|
|
1793
|
-
// Fallback to raw values here, because non-string fields
|
|
1794
|
-
// will not have a snippet fallback. Raw values MUST be html escaped.
|
|
1795
|
-
var safeField = getSnippet(maybeObject) || htmlEscape(getRaw(maybeObject));
|
|
1796
|
-
return Array.isArray(safeField) ? safeField.join(', ') : safeField;
|
|
1797
|
-
}
|
|
1798
|
-
|
|
1799
|
-
function Result(_a) {
|
|
1800
|
-
// Pass fields into the relevant Card.
|
|
1801
|
-
// const fields: any = formatResult(result);
|
|
1802
|
-
var className = _a.className, result = _a.result,
|
|
1803
|
-
// onClickLink,
|
|
1804
|
-
as = _a.as, _b = _a.cardMap, cardMap = _b === void 0 ? {
|
|
1805
|
-
idField: { fieldName: 'uuid' },
|
|
1806
|
-
titleField: { fieldName: 'title' },
|
|
1807
|
-
descriptionField: { fieldName: 'description' },
|
|
1808
|
-
imageField: { fieldName: 'image' },
|
|
1809
|
-
} : _b;
|
|
1810
|
-
var idField = cardMap.idField, titleField = cardMap.titleField, imageField = cardMap.imageField, videoField = cardMap.videoField, descriptionField = cardMap.descriptionField, metaDataFields = cardMap.metaDataFields, cardProps = cardMap.cardProps;
|
|
1811
|
-
var id = idField && getEscapedField(result[idField.fieldName]);
|
|
1812
|
-
var title = titleField && getEscapedField(result[titleField.fieldName]);
|
|
1813
|
-
var imageUrl = imageField && getEscapedField(result[imageField.fieldName]);
|
|
1814
|
-
var videoUrl = videoField && videoField.formatter
|
|
1815
|
-
? videoField.formatter(getEscapedField(result[videoField.fieldName]))
|
|
1816
|
-
: videoField && getEscapedField(result[videoField.fieldName]);
|
|
1817
|
-
var description = descriptionField && getEscapedField(result[descriptionField.fieldName]);
|
|
1818
|
-
var metaData = metaDataFields &&
|
|
1819
|
-
metaDataFields.map(function (field) {
|
|
1820
|
-
var value = getEscapedField(result[field.fieldName]);
|
|
1821
|
-
if (field.formatter && typeof field.formatter === 'function') {
|
|
1822
|
-
return field.formatter(value);
|
|
1823
|
-
}
|
|
1824
|
-
});
|
|
1825
|
-
var resultView = function () {
|
|
1826
|
-
var imageData = {
|
|
1827
|
-
src: imageUrl || '',
|
|
1828
|
-
alt: title || '',
|
|
1829
|
-
title: title || '',
|
|
1830
|
-
width: 500,
|
|
1831
|
-
height: 500,
|
|
1832
|
-
};
|
|
1833
|
-
var cardData = {
|
|
1834
|
-
id: id,
|
|
1835
|
-
title: title,
|
|
1836
|
-
image: imageData,
|
|
1837
|
-
video: videoUrl,
|
|
1838
|
-
description: description,
|
|
1839
|
-
metaData: metaData,
|
|
1840
|
-
actions: cardMap.actionsData,
|
|
1841
|
-
onClick: cardMap.onClickLink,
|
|
1842
|
-
};
|
|
1843
|
-
switch (as) {
|
|
1844
|
-
case ResultAsTypes.cardMedia:
|
|
1845
|
-
return jsx(Card, __assign({ variant: CardVariant.MEDIA, data: cardData }, cardProps));
|
|
1846
|
-
case ResultAsTypes.cardVideo:
|
|
1847
|
-
return jsx(Card, __assign({ variant: CardVariant.VIDEO, data: cardData }, cardProps, { isMuted: false }));
|
|
1848
|
-
default:
|
|
1849
|
-
return jsx(Card, __assign({ variant: CardVariant.BASIC, data: cardData }, cardProps));
|
|
1850
|
-
}
|
|
1851
|
-
};
|
|
1852
|
-
return jsx("li", { className: cx('relative', className), children: resultView() });
|
|
1853
|
-
}
|
|
1854
|
-
Result.displayName = 'Result';
|
|
1855
|
-
|
|
1856
|
-
function Search(_a) {
|
|
1857
|
-
var showOptions = _a.showOptions, sortOptions = _a.sortOptions, _b = _a.resultAs, resultAs = _b === void 0 ? ResultAsTypes.cardBasic : _b, ResultFieldMap = _a.ResultFieldMap, _c = _a.config, config = _c === void 0 ? {
|
|
1858
|
-
filters: [],
|
|
1859
|
-
facets: {},
|
|
1860
|
-
searchFields: {},
|
|
1861
|
-
resultsFields: {},
|
|
1862
|
-
alwaysSearchOnInitialLoad: true,
|
|
1863
|
-
initialPlaceholder: 'Search...',
|
|
1864
|
-
} : _c, _d = _a.facetDisplay, facetDisplay = _d === void 0 ? [] : _d, _e = _a.noSidebar, noSidebar = _e === void 0 ? false : _e, customConnector = _a.customConnector, showPagingInfo = _a.showPagingInfo, gridClasses = _a.gridClasses, _f = _a.initialState, initialState = _f === void 0 ? {} : _f, _g = _a.showTextSearch, showTextSearch = _g === void 0 ? true : _g;
|
|
1865
|
-
var connector = useMemo(function () {
|
|
1866
|
-
var defaultConnector = {
|
|
1867
|
-
host: process.env.REACT_APP_ELASTICSEARCH_HOST || 'http://localhost:9200',
|
|
1868
|
-
index: process.env.REACT_APP_ELASTICSEARCH_INDEX || '',
|
|
1869
|
-
apiKey: process.env.REACT_APP_ELASTICSEARCH_API_KEY,
|
|
1870
|
-
};
|
|
1871
|
-
return new ElasticSearchAPIConnector(customConnector || defaultConnector);
|
|
1872
|
-
}, []);
|
|
1873
|
-
var searchConfig = useMemo(function () {
|
|
1874
|
-
return {
|
|
1875
|
-
debug: process.env.NODE_ENV === 'development',
|
|
1876
|
-
alwaysSearchOnInitialLoad: config.alwaysSearchOnInitialLoad,
|
|
1877
|
-
apiConnector: connector,
|
|
1878
|
-
hasA11yNotifications: true,
|
|
1879
|
-
searchQuery: {
|
|
1880
|
-
filters: config.filters || [],
|
|
1881
|
-
search_fields: config.searchFields || {},
|
|
1882
|
-
result_fields: config.resultsFields || {},
|
|
1883
|
-
// disjunctiveFacets: ['created'], // Make certain Facets into OR instead of AND
|
|
1884
|
-
facets: config.facets,
|
|
1885
|
-
},
|
|
1886
|
-
autocompleteQuery: {
|
|
1887
|
-
results: {
|
|
1888
|
-
search_fields: {
|
|
1889
|
-
title: {},
|
|
1890
|
-
description: {},
|
|
1891
|
-
},
|
|
1892
|
-
resultsPerPage: 5,
|
|
1893
|
-
result_fields: {
|
|
1894
|
-
title: {
|
|
1895
|
-
snippet: {
|
|
1896
|
-
size: 100,
|
|
1897
|
-
fallback: true,
|
|
1898
|
-
},
|
|
1899
|
-
},
|
|
1900
|
-
},
|
|
1901
|
-
},
|
|
1902
|
-
// TODO: Implement suggestions
|
|
1903
|
-
// suggestions: {
|
|
1904
|
-
// types: {
|
|
1905
|
-
// documents: {
|
|
1906
|
-
// fields: ['title'],
|
|
1907
|
-
// },
|
|
1908
|
-
// },
|
|
1909
|
-
// size: 4,
|
|
1910
|
-
// },
|
|
1911
|
-
},
|
|
1912
|
-
initialState: __assign({ resultsPerPage: (showOptions === null || showOptions === void 0 ? void 0 : showOptions[0]) || 8 }, initialState),
|
|
1913
|
-
};
|
|
1914
|
-
}, [config]);
|
|
1915
|
-
return (jsx(SearchProvider, { config: searchConfig, children: jsx(WithSearch, { mapContextToProps: function (_a) {
|
|
1916
|
-
var wasSearched = _a.wasSearched;
|
|
1917
|
-
return ({
|
|
1918
|
-
wasSearched: wasSearched,
|
|
1919
|
-
});
|
|
1920
|
-
}, children: function (_a) {
|
|
1921
|
-
var wasSearched = _a.wasSearched;
|
|
1922
|
-
return (jsx("div", { className: "App", children: jsx(ErrorBoundary, { children: jsx(Layout, { header: showTextSearch && (jsx(SearchBox$1, { view: function (props) { return (jsx(SearchBox, __assign({}, props, { wasSearched: wasSearched, placeholder: config.initialPlaceholder }))); } })), sideContent: !noSidebar &&
|
|
1923
|
-
facetDisplay && (jsxs("div", { children: [wasSearched && jsx(Sorting$1, { label: 'Sort by', sortOptions: sortOptions, view: Sorting }), facetDisplay === null || facetDisplay === void 0 ? void 0 : facetDisplay.map(function (_a) {
|
|
1924
|
-
var field = _a.field, label = _a.label, view = _a.view;
|
|
1925
|
-
return (jsx(Facet, { field: field, label: label, view: view }, field));
|
|
1926
|
-
})] })), bodyContent: jsx(Results$1, { shouldTrackClickThrough: false, resultView: function (props) { return jsx(Result, __assign({}, props, { as: resultAs, cardMap: ResultFieldMap })); }, className: "list-none p-0 m-0", view: function (props) { return jsx(Results, __assign({}, props, { gridClasses: gridClasses })); } }), bodyHeader: jsxs(React.Fragment, { children: [wasSearched && showPagingInfo && jsx(PagingInfo$1, { view: PagingInfo }), wasSearched && showOptions && jsx(ResultsPerPage$1, { view: ResultsPerPage, options: showOptions })] }), bodyFooter: jsx(Paging$1, { view: Paging }), noSidebar: noSidebar }) }) }));
|
|
1927
|
-
} }) }));
|
|
1928
|
-
}
|
|
1929
|
-
|
|
1930
|
-
function SingleSelectFacet(_a) {
|
|
1931
|
-
var className = _a.className, label = _a.label, onChange = _a.onChange, options = _a.options;
|
|
1932
|
-
var selectBoxOptions = options.map(function (option) {
|
|
1933
|
-
return {
|
|
1934
|
-
value: option.value,
|
|
1935
|
-
label: "".concat(option.value, " (").concat(option.count, ")"),
|
|
1936
|
-
};
|
|
1937
|
-
});
|
|
1938
|
-
return (jsxs("fieldset", { className: cx('m-0 p-0 mt-4 mb-2 border-none', className), children: [jsx(Label, { className: "text-sm", transform: COPY_TRANSFORM.UPPERCASE, children: label }), jsx(FormSelect, { id: label, options: selectBoxOptions, onChange: function (o) { return onChange(o.target.value); } })] }));
|
|
1939
|
-
}
|
|
1940
|
-
SingleSelectFacet.displayName = 'SingleSelectFacet';
|
|
1941
|
-
|
|
1942
|
-
function SingleLinksFacet(_a) {
|
|
1943
|
-
var className = _a.className, label = _a.label, onRemove = _a.onRemove, onSelect = _a.onSelect, options = _a.options;
|
|
1944
|
-
var value = options.filter(function (o) { return o.selected; }).map(function (o) { return o.value; })[0];
|
|
1945
|
-
return (jsx("fieldset", { className: cx('m-0 p-0 mt-4 mb-2 border-none', className), children: jsxs("div", { children: [jsx(Label, { className: "text-sm", transform: COPY_TRANSFORM.UPPERCASE, children: label }), jsxs("ul", { className: "ul list-none p-0", children: [value && (jsxs("li", { className: "m-0 flex justify-between items-center flex-1", children: [getFilterValueDisplay(value), jsx("span", { className: "ml-1 px-1", children: jsx(Button, { onClick: function () { return onRemove(value); }, children: jsx(Icon, { name: "mdi:close" }) }) })] })), !value &&
|
|
1946
|
-
options.map(function (option) {
|
|
1947
|
-
var filterValue = getFilterValueDisplay(option.value);
|
|
1948
|
-
return (jsxs("li", { className: "m-0 flex justify-between", children: [jsx("a", { className: "no-underline text-sm visited:text-body-text", "data-transaction-name": "facet - ".concat(label), href: "/", onClick: function (e) {
|
|
1949
|
-
e.preventDefault();
|
|
1950
|
-
onSelect(option.value);
|
|
1951
|
-
}, children: jsx("label", { className: "label pl-0 leading-none text-sm", children: filterValue }) }), jsx(Copy, { as: COPY_TAG.SPAN, size: COPY_SIZE.SMALL, children: option.count.toLocaleString('en') })] }, filterValue));
|
|
1952
|
-
})] })] }) }));
|
|
1953
|
-
}
|
|
1954
|
-
SingleLinksFacet.displayName = 'SingleLinksFacet';
|
|
1955
|
-
|
|
1956
|
-
function MultiCheckboxFacet(_a) {
|
|
1957
|
-
var className = _a.className, label = _a.label, onMoreClick = _a.onMoreClick, onRemove = _a.onRemove, onSelect = _a.onSelect, options = _a.options, showMore = _a.showMore, showSearch = _a.showSearch, onSearch = _a.onSearch, searchPlaceholder = _a.searchPlaceholder;
|
|
1958
|
-
if (!options) {
|
|
1959
|
-
return jsx(Fragment, { children: "Options required" });
|
|
1960
|
-
}
|
|
1961
|
-
return (jsxs("fieldset", { className: cx('m-0 p-0 mt-4 mb-2 border-none', className), children: [jsx(Label, { className: "text-sm", transform: COPY_TRANSFORM.UPPERCASE, children: label }), showSearch && (jsx("div", { className: "mt-1", children: jsx(TextInput, { type: InputType.SEARCH, placeholder: searchPlaceholder || 'Search', onChange: function (e) {
|
|
1962
|
-
onSearch(e.target.value);
|
|
1963
|
-
} }) })), jsxs("div", { className: "my-4", children: [(options === null || options === void 0 ? void 0 : options.length) < 1 && jsx("div", { children: "No matching options" }), options === null || options === void 0 ? void 0 : options.map(function (option) {
|
|
1964
|
-
var checked = option.selected;
|
|
1965
|
-
var value = option.value;
|
|
1966
|
-
var filterDisplayValue = getFilterValueDisplay(value);
|
|
1967
|
-
return (jsxs("div", { className: "flex justify-between pb-2", children: [jsx(Checkbox, { id: "facet_".concat(label).concat(filterDisplayValue), "data-transaction-name": "facet - ".concat(label), checked: checked, onChange: function () { return (checked ? onRemove(value) : onSelect(value)); }, label: filterDisplayValue }), jsx(Copy, { as: COPY_TAG.SPAN, size: COPY_SIZE.SMALL, children: option.count.toLocaleString('en') })] }, filterDisplayValue));
|
|
1968
|
-
})] }), showMore && (jsx(Button, { size: BTN_SIZES.SMALL, variant: BTN_VARIANTS.TERTIARY, onClick: onMoreClick, "aria-label": "Show more options", children: "+ More" }))] }));
|
|
1969
|
-
}
|
|
1970
|
-
MultiCheckboxFacet.displayName = 'MultiCheckboxFacet';
|
|
1971
|
-
|
|
1972
|
-
var ResetPasswordForm = function (_a) {
|
|
1973
|
-
var handleSubmit = _a.handleSubmit;
|
|
1974
|
-
return (jsx("div", { "data-testid": "ResetPasswordForm", className: "form-wrapper", children: jsx(Form, { onSubmit: handleSubmit, submit: en.FORMS.RESET_PASSWORD_FORM.SUBMIT, disabledSubmitWithReturn: true, children: jsx(FormField, { name: "password", type: FIELD_TYPES.PASSWORD, label: en.FORMS.RESET_PASSWORD_FORM.PASSWORD, required: true, validations: validPassword }) }) }));
|
|
1975
|
-
};
|
|
1976
|
-
ResetPasswordForm.displayName = 'ResetPasswordForm';
|
|
1977
|
-
|
|
1978
|
-
var ProfileForm = function (_a) {
|
|
1979
|
-
var testID = _a.testID, initialValues = _a.initialValues, handleSubmit = _a.handleSubmit;
|
|
1980
|
-
return (jsx("div", { "data-testid": testID || '"ProfileForm"', className: "form-wrapper", children: jsxs(Form, { onSubmit: handleSubmit, submit: en.FORMS.PROFILE_FORM.SUBMIT, disabledSubmitWithReturn: true, initialValues: initialValues, children: [jsx("div", { className: "mb-4", children: jsx(Avatar, { name: "avatar", initValue: initialValues === null || initialValues === void 0 ? void 0 : initialValues.avatar }) }), jsx(FormField, { name: "firstName", type: FIELD_TYPES.TEXT, label: en.FORMS.PROFILE_FORM.FIRST_NAME, required: true }), jsx(FormField, { name: "lastName", type: FIELD_TYPES.TEXT, label: en.FORMS.PROFILE_FORM.LAST_NAME, required: true }), jsx(FormField, { name: "email", type: FIELD_TYPES.EMAIL, label: en.FORMS.PROFILE_FORM.EMAIL, required: true, validations: validEmail })] }) }));
|
|
1981
|
-
};
|
|
1982
|
-
ProfileForm.displayName = 'ProfileForm';
|
|
1983
|
-
|
|
1984
|
-
var defaultTheme = {
|
|
1985
|
-
isDarkTheme: false,
|
|
1986
|
-
toggleTheme: function () { return console.log('toggleTheme'); },
|
|
1987
|
-
};
|
|
1988
|
-
var ThemeContext = React.createContext(defaultTheme);
|
|
1989
|
-
var ThemeProvider = function (_a) {
|
|
1990
|
-
var children = _a.children, theme = _a.theme;
|
|
1991
|
-
return (jsx(ThemeContext.Provider, { value: theme, children: children }));
|
|
1992
|
-
};
|
|
1993
|
-
|
|
1994
|
-
export { AnimationCounter, AnimationSet1, AppContext, AppProvider, Authenticator, Avatar, BTN_SIZES, BTN_TYPES, BTN_VARIANTS, Blockquote, Button, ButtonGroup, COPY_ALIGN, COPY_CONTEXTUAL, COPY_SIZE, COPY_TAG, COPY_TRANSFORM, CPL_SPACING, CRL_SIZE, Card, CardVariant, Checkbox, Chip, Container, ContentPageLayout, ContentRowsLayout, Copy, DisplayHeading, FIELD_TYPES, FileUpload, Footer, ForgotPasswordForm, Form, FormField, FormSelect, HEADING_ALIGN, HEADING_TAGS, HEADING_TRANSFORM, Header, Heading, Hero, Hr, HtmlContent, Icon, Image, Label, Link, List, ListTag, Loader, LoginForm, Logo, Menu, MultiCheckboxFacet, Notice, OTPInput, PanelCards, PanelFeature, PanelHero, PanelProduct, PanelVideo, ProfileForm, Radio, RegisterForm, ResetPasswordForm, ResultAsTypes, Search, Share, SingleLinksFacet, SingleSelectFacet, Switch, Tabs, TextInput, ThemeContext, ThemeProvider, Variants, Video, VisitUs, defaultTheme };
|
|
1
|
+
import{jsx as e,jsxs as a,Fragment as t}from"react/jsx-runtime";import i,{createElement as r,useRef as n,useEffect as l,useState as o,useMemo as s,createContext as c,useContext as d}from"react";import m from"classnames";import{useInView as u,useIsomorphicLayoutEffect as h,animate as p,motion as f,motionValue as v,useAnimation as g}from"framer-motion";import{twMerge as b}from"tailwind-merge";import{Icon as y}from"@iconify/react";import{Tabs as N,TabList as x,Tab as w,TabPanel as k}from"react-tabs";import{useForm as C,FormProvider as E,useFormContext as A,Controller as R}from"react-hook-form";import S from"react-hover-video-player";import L from"react-player/youtube";import O from"video.js";import I,{attributesToProps as M,domToReact as T}from"html-react-parser";import{FacebookShareButton as P,TwitterShareButton as F,WhatsappShareButton as D,EmailShareButton as _,LinkedinShareButton as j}from"react-share";import B from"react-otp-input";import U from"@elastic/search-ui-elasticsearch-connector";import{SearchContext as z,SearchProvider as q,WithSearch as H,ErrorBoundary as G,SearchBox as W,Sorting as Y,Facet as $,Results as V,PagingInfo as X,ResultsPerPage as K,Paging as Z}from"@elastic/react-search-ui";import J from"rc-pagination";import Q from"rc-pagination/lib/locale/en_US";const ee=({testID:a,from:t,to:r,animationOptions:n,className:l,numDecimals:o=0})=>{const s=i.useRef(null),c=u(s,{once:!0});return h((()=>{const e=s.current;if(!e||!c)return;if(window.matchMedia("(prefers-reduced-motion: reduce)").matches)return void(e.textContent=r.toString());e.textContent=t.toString();const a=p(t,r,Object.assign(Object.assign({duration:1,ease:"easeOut"},n),{onUpdate:a=>{e.textContent=a.toFixed(o)}}));return()=>{a.stop()}}),[s,c,t,r,n]),e("span",{ref:s,"data-testid":a||"AnimationCounter",className:m("relative",l)})};ee.displayName="AnimationCounter";const ae=({text:t,citation:i,className:r,citationAttribute:n,showIcon:l=!0})=>{const o=m("text-xl italic font-bold",r);return a("blockquote",{"data-testid":"Blockquote",className:o,children:[l&&e("svg",{"aria-hidden":"true",className:"w-10 h-10",viewBox:"0 0 24 27",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e("path",{d:"M14.017 18L14.017 10.609C14.017 4.905 17.748 1.039 23 0L23.995 2.151C21.563 3.068 20 5.789 20 8H24V18H14.017ZM0 18V10.609C0 4.905 3.748 1.038 9 0L9.996 2.151C7.563 3.068 6 5.789 6 8H9.983L9.983 18L0 18Z",fill:"currentColor"})}),e("div",{children:t}),i&&e("figcaption",{className:"flex flex-start items-center mt-6 space-x-3",children:a("div",{className:"flex items-center divide-x-2",children:[e("cite",{className:"pr-3 font-medium",children:i}),n&&e("cite",{className:"pl-3 text-sm font-light",children:n})]})})]})};var te,ie,re;ae.displayName="Blockquote",function(e){e.SUBMIT="submit",e.RESET="reset",e.BUTTON="button"}(te||(te={})),function(e){e.PRIMARY="primary",e.SECONDARY="secondary",e.TERTIARY="tertiary",e.LINK="link"}(ie||(ie={})),function(e){e.SMALL="small",e.MEDIUM="medium",e.LARGE="large"}(re||(re={}));const ne=({name:a,size:t=24,color:i,id:r,className:n,testID:l})=>e(y,{"data-testid":l||r||"Icon",icon:a,width:t,height:t,color:i||"currentColor",className:n});ne.displayName="Icon";const le=({color:t,size:i=8,thickness:r=4})=>e("div",{"data-testid":"Loader",className:"flex items-center justify-center",children:a("div",{role:"status",className:"flex items-center",children:[a("svg",{className:`animate-spin ${i?`w-${i} h-${i}`:"w-8 h-8"} text-white`,xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[e("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:t||"currentColor",strokeWidth:r}),e("path",{className:"opacity-75",fill:t||"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),e("span",{className:"sr-only",children:"Loading..."})]})});le.displayName="Loader";const oe=({variant:i=ie.PRIMARY,size:r=re.MEDIUM,type:n=te.BUTTON,wide:l=!0,rounded:o=!0,raised:s=!0,uppercase:c,children:d,id:u,disabled:h,ariaLabel:p,onClick:f,icon:v,external:g,iconFirst:y,outline:N,testID:x,className:w,isLoading:k})=>{var C,E,A,R;const S={small:{x:d?l?"px-5":"px-3":"px-1",y:"py-1",space:"space-x-2",text:"text-sm",icon:"w-3 h-3"},medium:{x:d?l?"px-8":"px-4":"px-2",y:"py-2",space:"space-x-3",text:"text-base",icon:"w-5 h-5"},large:{x:d?l?"px-11":"px-5":"px-3",y:"py-3",space:"space-x-4",text:"text-lg",icon:"w-6 h-6"}},L=b(m("appearance-none font-body flex items-center transition-all duration-200 transform active:scale-95 justify-around border-solid border rounded cursor-pointer outline-none focus:outline-none focus-visible:outline-none",{"border-primary":N},{"border-primary300 dark:border-primary400 hover:border-primary400 dark:hover:border-primary500":N},{shadow:s},{uppercase:c},{"auto-cols-auto grid-cols-2 gap-4":k||v||g},{"rounded-full":o},{"flex-row-reverse":y},{"opacity-50 cursor-not-allowed":h},`${null===(C=null==S?void 0:S[r])||void 0===C?void 0:C.y} ${null===(E=null==S?void 0:S[r])||void 0===E?void 0:E.x} ${null===(A=null==S?void 0:S[r])||void 0===A?void 0:A.text}`,{"text-white border-primary bg-primary hover:bg-primary-darker":i===ie.PRIMARY},{"text-white border-secondary bg-secondary hover:bg-secondary-darker":i===ie.SECONDARY},{"text-black border-tertiary bg-tertiary hover:bg-tertiary-darker":i===ie.TERTIARY},{"px-0 text-primary border-transparent bg-transparent hover:bg-transparent shadow-none group-hover:invert":i===ie.LINK},w)),O=m(null===(R=null==S?void 0:S[r])||void 0===R?void 0:R.icon);return e("button",{id:u,"data-testid":x||u||"Button",onClick:f,className:L,type:n,disabled:h,"aria-label":p,role:"button",children:a(t,{children:[d,v&&!g&&e("span",{className:"flex items-center",children:e(ne,{name:v,className:O})}),g&&e("span",{className:"flex items-center",children:e(ne,{name:"carbon:launch",className:O})}),k&&e("div",{className:"flex items-center",children:e(le,{size:4})})]})})};function se(e,a){var t={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&a.indexOf(i)<0&&(t[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);r<i.length;r++)a.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(e,i[r])&&(t[i[r]]=e[i[r]])}return t}function ce(e,a,t,i){return new(t||(t=Promise))((function(r,n){function l(e){try{s(i.next(e))}catch(e){n(e)}}function o(e){try{s(i.throw(e))}catch(e){n(e)}}function s(e){var a;e.done?r(e.value):(a=e.value,a instanceof t?a:new t((function(e){e(a)}))).then(l,o)}s((i=i.apply(e,a||[])).next())}))}oe.displayName="Button","function"==typeof SuppressedError&&SuppressedError;const de=i.forwardRef((function(t,i){var{id:r,label:n,required:l,className:o,disabled:s}=t,c=se(t,["id","label","required","className","disabled"]);return a("div",{"data-testid":"Checkbox",className:m("flex items-center",o),children:[a("div",{className:"relative bg-none w-5 h-5 flex justify-center items-center",children:[e("input",Object.assign({id:r,ref:i,disabled:s,type:"checkbox",className:"form-item checkbox m-0 appearance-none peer h-full w-full shrink-0 focus:ring-2",required:l},c)),e("span",{className:"absolute transition-opacity opacity-0 pointer-events-none peer-checked:opacity-100 w-full h-full flex items-center justify-center top-0 left-0",children:e(ne,{name:"mdi:check-bold",size:12})})]}),n&&e("label",{className:"label pl-2 leading-none text-sm",htmlFor:r,children:n})]})}));de.displayName="Checkbox";const me=({href:t,children:r,onClick:n=(()=>console.log("Link clicked")),history:l,target:o,id:s,testID:c,className:d,prefetch:u,hideExternalIcon:h=!1})=>{const p=m("link cursor-pointer no-underline text-bodyText dark:text-darkBodyText",d);if(!h&&t&&t.startsWith("http"))return a("span",{children:[e("a",{"data-testid":c||s||"Link",className:m(p),href:t,target:"_blank",rel:"noopener noreferrer",children:r}),e(ne,{name:"mdi:external-link",className:"inline-block w-4 h-4 ml-1 mb-0"})]});try{const e=require("next/link").default;if(!e)throw new Error("Next.js Image not found");return i.createElement(e,{href:t,"data-testid":c||s||"Link",className:p,target:o||"_self",prefetch:u||!1},r)}catch(a){console.log("Not using Next Link.");return e("a",{"data-testid":c||s||"Link",className:p,href:t,onClick:e=>{n?n(e):!0!==e.defaultPrevented&&l&&t&&(e.preventDefault(),l.push(t))},target:o,children:r})}};me.displayName="Link";const ue=({testID:t,text:i,outline:r,rounded:n,variant:l,size:o="medium",icon:s,iconFirst:c,onClick:d})=>{const u=b(m("flex inline-flex items-center justify-center rounded select-none gap-2",{"border border-solid border-primary":r},{"rounded-full":n},{"flex-row-reverse":c},{"bg-primary text-white":"primary"===l},{"bg-secondary text-white":"secondary"===l},{"bg-info text-white":"info"===l},{"bg-success text-white":"success"===l},{"bg-warning text-white":"warning"===l},{"bg-error text-white":"error"===l},{"py-1 px-2":"small"===o},{"py-2 px-4":"medium"===o},{"py-3 px-6":"large"===o}));return d&&"function"==typeof d?a(me,{"data-testid":t||"Chip",className:u,onClick:d,children:[e("div",{children:i}),s&&e("div",{className:"flex items-center justify-center",children:e(ne,{name:s})})]}):a("div",{"data-testid":t||"Chip",className:u,children:[e("div",{children:i}),s&&e("div",{className:"flex items-center justify-center",children:e(ne,{name:s})})]})};var he,pe,fe,ve,ge;ue.displayName="Chip",function(e){e.LEFT="left",e.CENTER="center",e.RIGHT="right",e.JUSTIFY="justify",e.NOWRAP="nowrap"}(he||(he={})),function(e){e.LOWERCASE="lowercase",e.UPPERCASE="uppercase",e.CAPITALIZE="capitalize",e.NORMALCASE="normal-case"}(pe||(pe={})),function(e){e.INVERTED="inverted",e.MUTED="muted"}(fe||(fe={})),function(e){e.SMALL="small",e.LARGE="large",e.INTRO="intro"}(ve||(ve={})),function(e){e.P="p",e.SPAN="span",e.DIV="div",e.SMALL="small"}(ge||(ge={}));const be=({children:a,as:t=ge.P,size:i,align:r,transform:n,id:l,className:o,testID:s})=>{const c=m({[`text-${r}`]:r},{"text-sm":"small"===i},{"text-lg":"large"===i},{"text-2xl":"intro"===i},{"mb-3 leading-5 mt-0":"p"===t},{"text-sm":"small"===t},n,o);return e(t,{"data-testid":s||l||"Copy",className:b(c),children:a})};be.displayName="Copy";const ye=i.forwardRef((function(a,t){var{id:i,name:r,required:n,disabled:l,className:o,onChangeCallback:s,onChange:c}=a,d=se(a,["id","name","required","disabled","className","onChangeCallback","onChange"]);return e("div",{"data-testid":"FileUpload",className:o,children:e("input",Object.assign({ref:t,className:m("form-item text-input file-upload p-0 relative m-0 min-w-0 flex-auto appearance-none block box-border bg-clip-padding file:p-3 file:cursor-pointer file:mr-3 file:overflow-hidden cursor-pointer file:border-0 file:rounded-none file:border-solid file:border-inherit file:transition file:duration-150 file:ease-in-out file:[border-inline-end-width:1px] file:[margin-inline-end:0.75rem] "),"aria-describedby":r,type:"file",disabled:l,required:n,name:r,id:i,onChange:e=>{s&&"function"==typeof s&&s(e),c&&"function"==typeof c&&c({target:{value:e.target.value,name:r}})}},d))})}));var Ne,xe,we;ye.displayName="FileUpload",function(e){e.H1="h1",e.H2="h2",e.H3="h3",e.H4="h4",e.H5="h5"}(Ne||(Ne={})),function(e){e.LEFT="left",e.CENTER="center",e.RIGHT="right",e.JUSTIFY="justify",e.NOWRAP="nowrap"}(xe||(xe={})),function(e){e.LOWERCASE="lowercase",e.UPPERCASE="uppercase",e.CAPITALIZE="capitalize",e.NORMAL_CASE="normal-case"}(we||(we={}));const ke=({children:a,tag:t=Ne.H2,transform:i,align:r,id:n,testID:l,flush:o,className:s,singleLine:c})=>{const d=(()=>{switch(t){case"h1":return"text-5xl md:text-5xl lg:text-5xl";case"h2":return"text-4xl md:text-4xl lg:text-4xl";case"h3":return"text-3xl md:text-3xl lg:text-3xl";case"h4":default:return"text-2xl md:text-2xl lg:text-2xl";case"h5":return"text-lg md:text-lg lg:text-lg"}})(),u=t,h=m(`m-0 p-0 font-heading font-bold ${d}`,{[`text-${r}`]:r},{"mb-2":!o},{"m-0":o},{"whitespace-nowrap text-ellipsis overflow-hidden":c},i,s);return e(u,{"data-testid":l||n||"Heading",className:h,children:a})};ke.displayName="Heading";const Ce=({size:a="small"})=>e("hr",{className:m("border-0 border-b border-darkBodyText dark:border-darkBodyText",{"mt-4 mb-4":"small"===a,"mt-8 mb-8":"medium"===a,"mt-16 mb-16 ":"large"===a})});Ce.displayName="Hr";const Ee=t=>{var{src:i,alt:n,title:l,caption:o,figure:s=!1,onLoad:c,id:d,className:u,sizes:h="(max-width: 768px) 100vw, (max-width: 1200px) 50vw, 33vw",testID:p}=t,f=se(t,["src","alt","title","caption","figure","onLoad","id","className","sizes","testID"]);try{const e=require("next/image").default;if(!e)throw new Error("Next.js Image not found");const a=!f.width,t=a?{sizes:h}:{};return r(e,Object.assign(Object.assign({src:i,alt:n,title:l,fill:a,onLoad:c,className:u},t),f))}catch(t){const r=m("m-0"),h=m("w-full h-full",u);return s||o?a("figure",{"data-testid":p||d||"Image",className:r,children:[e("img",{onLoad:c,src:i,alt:n,title:l,className:h}),o&&e("figcaption",{children:o})]}):e("img",{"data-testid":p||d||"Image",onLoad:c,src:i,alt:n,title:l,className:h})}};Ee.displayName="Image";const Ae=({children:a,id:t,transform:i,className:r})=>e("label",{"data-testid":"Label",className:b(m("label mb-2",i,r)),htmlFor:t,children:a});var Re,Se;Ae.displayName="Label",function(e){e.UNSTYLED="unstyled",e.INLINE="inline",e.SMALL="small",e.LARGE="large"}(Re||(Re={})),function(e){e.OL="ol",e.UL="ul",e.DL="dl",e.DIV="div",e.DT="dt",e.DD="dd",e.LI="li"}(Se||(Se={}));const Le=({variants:a,children:t,as:i=Se.UL,id:r,testID:n,className:l})=>{const o=a?a.map((e=>`list--${e}`)):null;return e(i,{"data-testid":n||r||"List",className:m(o,l),children:t})};Le.displayName="List";const Oe=({testID:a,logo:t,className:i,aspectRatioClass:r="aspect-[1/1]"})=>e("div",{"data-testid":a||"Logo",className:m("relative w-full",r,i),children:e(Ee,{src:t,alt:"logo",fill:!0,sizes:"(max-width: 600px) 100px, 200px",priority:!0})});Oe.displayName="Logo";const Ie=({id:t,testID:i,title:r,text:n,icon:l,type:o,onCloseCallback:s,onClickCallback:c,actionText:d})=>{const u=m("p-4 rounded relative",{"bg-info text-white":"info"===o,"bg-success text-white":"success"===o,"bg-warning text-black":"warning"===o,"bg-error text-white":"error"===o});return e("div",{"data-testid":i||t||"Notice",className:u,children:a("div",{className:"flex gap-2",children:[l&&e("div",{className:"mr-2",children:e(ne,{name:l})}),a("div",{children:[r&&e(ke,{tag:Ne.H3,children:r}),e(be,{className:"mb-0",children:n})]}),c&&d&&e("div",{className:"ml-auto flex items-end",children:e(oe,{variant:ie.PRIMARY,onClick:c,"aria-label":"Action",size:re.SMALL,children:d})}),s&&e("div",{className:"absolute top-2 right-4",children:e(oe,{variant:ie.LINK,icon:"mdi:close",onClick:s,"aria-label":"Close"})})]})})};Ie.displayName="Notice";const Me=i.forwardRef((function(t,i){var{name:r,required:n,className:l,options:o}=t,s=se(t,["name","required","className","options"]);return e("div",{"data-testid":"Radio",className:m("flex items-center",l),children:e("div",{className:m("flex flex-col gap-2",l),children:null==o?void 0:o.map((t=>{var l;const o=(null===(l=null==t?void 0:t.value)||void 0===l?void 0:l.toString())||void 0;return a("div",{className:"flex items-center relative",children:[a("div",{className:"relative flex items-center",children:[e("input",Object.assign({ref:i,name:r,type:"radio",required:n,className:"form-item radio peer appearance-none m-0 p-0 w-4 h-4"},s,{id:o,value:o})),e("div",{className:"form-icon opacity-0 peer-checked:opacity-100 absolute w-4 h-4 flex items-center justify-center top-0 left-0 pointer-events-none",children:e(ne,{name:"mdi:circle",size:12})})]}),e("label",{className:"label pl-2 leading-none",htmlFor:o,children:t.label})]},o)}))})})}));Me.displayName="Radio";const Te=i.forwardRef((function(t,i){var{id:r,name:n,required:l,disabled:o,className:s}=t,c=se(t,["id","name","required","disabled","className"]);return a("label",{"data-testid":"Switch",className:m("inline-flex items-center cursor-pointer",s),children:[e("input",Object.assign({ref:i,id:r,name:n,type:"checkbox",value:"",className:"sr-only peer",disabled:o,required:l},c)),e("div",{className:"form-item switch peer-focus:ring-info dark:peer-focus:ring-info relative w-11 h-6 peer-checked:after:translate-x-full rtl:peer-checked:after:-translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[1px] after:start-[1px] after:bg-white after:border after:rounded-full after:h-5 after:w-5 after:transition-all transition-all"})]})}));var Pe;Te.displayName="Switch",function(e){e.TEXT="text",e.PASSWORD="password",e.EMAIL="email",e.NUMBER="number",e.TEL="tel",e.URL="url",e.SEARCH="search",e.DATE="date",e.TIME="time",e.DATETIME="datetime-local",e.MONTH="month",e.WEEK="week",e.FILE="file",e.TEXTAREA="textarea",e.HIDDEN="hidden"}(Pe||(Pe={}));const Fe=i.forwardRef((function(t,r){var{type:n=Pe.TEXT,required:l=!1,className:o,onChange:s,placeholder:c,icon:d,disabled:u=!1,name:h,autoComplete:p}=t,f=se(t,["type","required","className","onChange","placeholder","icon","disabled","name","autoComplete"]);i.useEffect((()=>{"undefined"!=typeof window&&require("date-input-polyfill")}),[]);const v="date"===n?"dd/mm/yyyy".toUpperCase():c;return n===Pe.TEXTAREA?e("div",{"data-testid":"TextInput",className:"relative",children:e("textarea",Object.assign({ref:r,id:h,autoComplete:h,required:l,"aria-required":l,disabled:u,placeholder:v,onChange:s,rows:4,className:m("form-item text-input resize-none",o)},f))}):a("div",{"data-testid":"TextInput",className:"relative",children:[d&&e("div",{className:"form-icon absolute inset-y-0 start-3 flex items-center ps-3.5 pointer-events-none",children:e(ne,{name:d})}),e("input",Object.assign({ref:r,id:h,type:n,autoComplete:p,required:l,"aria-required":l,disabled:u,placeholder:v,onChange:s,className:m("form-item text-input",{"pl-12":d},o)},f))]})}));Fe.displayName="TextInput";const De={GLOBAL:{},FORMS:{LOGIN_FORM:{TITLE:"Login",SUBMIT:"Login",FORGOT_PASSWORD:"Forgot password?",REGISTER:"Register",EMAIL:"Email",PASSWORD:"Password"},REGISTER_FORM:{TITLE:"Register",SUBMIT:"Register",EMAIL:"Email",PASSWORD:"Password",PASSWORD_DESCRIPTION:"Password must be at least 8 characters long and contain at least one number, one uppercase letter, one lowercase letter, and one special character."},FORGOT_PASSWORD_FORM:{TITLE:"Forgot Password",SUBMIT:"Send Reset Email",EMAIL:"Email"},RESET_PASSWORD_FORM:{TITLE:"Reset Password",SUBMIT:"Reset Password",PASSWORD:"Password",CONFIRM_PASSWORD:"Confirm Password"},PROFILE_FORM:{TITLE:"Profile",SUBMIT:"Save",FIRST_NAME:"First Name",LAST_NAME:"Last Name",AVATAR:"Avatar",EMAIL:"Email",PASSWORD:"Password",PASSWORD_DESCRIPTION:"Password must be at least 8 characters long and contain at least one number, one uppercase letter, one lowercase letter, and one special character."}},UI:{SHOW:"Show",NO_IMAGE:"No image",UPLOAD:"Upload",SAVE:"Save",CANCEL:"Cancel",DELETE:"Delete",LOGIN_WITH_GOOGLE:"Login with Google",LOGIN_WITH_APPLE:"Login with Apple",SIGNUP_WITH_GOOGLE:"Signup with Google",SIGNUP_WITH_APPLE:"Signup with Apple",BACK_TO_LOGIN:"Back to Login",FORGOT_PASSWORD:"Forgot Password?",SUBMIT:"Submit",LOGIN:"Login",LOGOUT:"Logout",REGISTER:"Register",SOCIAL:{GOOGLE:"Google",FACEBOOK:"Facebook",TWITTER:"Twitter",EMAIL:"Email"},READ_MORE:"Read more",READ_LESS:"Show less",CLOSE:"Close",BACK:"Back",SHARE:"Share",DOWNLOAD:"Download",FORMAT_HOUR:"{hour}hr",FORMAT_HOURS:"{hours}hrs",FORMAT_MINUTE:"{minute}min",FORMAT_MINUTES:"{minutes}mins",LOAD_MORE_LABEL:"Load more",NO_MORE_RESULTS:"That's all folks.",UNKNOWN_ERROR_TITLE:"Unknown error",UNKNOWN_ERROR_MESSAGE:"Sorry, something bad happened! Please try again.",CONTENT_SORT_TITLE:"Sort by",CONTENT_FILTERS_TITLE:"Filters",CONTENT_FILTERS_LABEL:"Filter",CLOSE_FILTERS_LABEL:"Done",CLEAR_ALL_FILTERS_LABEL:"Clear All",CLEAR_FILTERS_LABEL:"Clear",MORE_ITEMS_LABEL:"Next items",PREVIOUS_ITEMS_LABEL:"Previous items",CHOOSE_BTN_LABEL:"Choose",ADD_BTN_LABEL:"Add",SEND_BTN_LABEL:"Send",CANCEL_BTN_LABEL:"Cancel",DONE_BTN_LABEL:"Done",EDIT_BTN_LABEL:"Edit",CHANGE_BTN_LABEL:"Change",REMOVE_BTN_LABEL:"Remove",MESSAGE_PROMPT_BTN_LABEL:"Add one",SELECT_FILE_BTN_LABEL:"Select file",TOO_MANY_REQUESTS_MESSAGE:"Too many requests. Please try again later.",COPYRIGHT:"Copyright",ALL_RIGHTS_RESERVED:"All rights reserved"},ERRORS:{}},_e=({testID:r,name:n="avatar",isEditable:l=!0,initValue:o})=>{const[s,c]=i.useState(o);return a("div",{"data-testid":r||'"Avatar"',className:"foo-bar",children:[a("div",{className:"relative w-[200px] aspect-1 rounded-full border border-solid overflow-hidden flex items-center justify-center m-4",children:[s&&a(t,{children:[e(Ee,{src:s,alt:n,width:200,height:200}),l&&e("div",{className:"absolute w-full h-full flex items-center justify-center",children:e(oe,{onClick:()=>{c(void 0)},children:De.UI.REMOVE_BTN_LABEL})})]}),!s&&a(t,{children:[e("div",{className:"w-full h-full flex items-center justify-center"}),l&&e("div",{className:"absolute w-full h-full flex items-center justify-center",children:e(Ae,{id:n,className:"button cursor-pointer mb-0",children:e(be,{className:"mb-0",children:De.UI.UPLOAD})})})]})]}),e("input",{type:"file",id:n,name:n,className:"hidden",onChange:e=>{var a;const t=null===(a=e.target.files)||void 0===a?void 0:a[0];if(t){const e=URL.createObjectURL(t);c(e)}}})]})};_e.displayName="Avatar";const je=({testID:t,bgAsset:i,focalAsset1:r,focalAsset2:l,focalAsset3:o})=>{const s=n(null),c=u(s);console.log("isInView",c);const d={opacity:.001,rotate:0,scale:1,x:200,y:0},h={opacity:1,rotate:0,rotateX:0,rotateY:0,scale:1,transition:{damping:60,delay:0,mass:1.2,stiffness:300,type:"spring"},x:0,y:0};return a("div",{"data-testid":t||"AnimationSet1",className:m("relative w-full h-full"),children:[i&&e(f.div,{className:"absolute left-1/2 top-1/2 w-full h-full",initial:{opacity:.001,rotate:0,scale:.5,x:0,y:0,perspective:"1200px",translateX:"-50%",translateY:"-50%"},animate:{opacity:.5,rotate:0,rotateX:0,rotateY:0,scale:1.25,transition:{damping:60,delay:.7,mass:1.2,stiffness:300,type:"spring"},perspective:"1200px",translateX:"-50%",translateY:"-50%",x:0,y:0},transition:{duration:.5},children:e(Ee,{src:i.src,alt:i.alt,fill:!0})}),(r||l)&&a(f.div,{className:"absolute right-0 top-1/2 z-10 overflow-visible w-3/4 aspect-[0.78/1]",style:{transform:"translateY(-50%)"},children:[r&&e(f.div,{className:"absolute w-1/2 aspect-[0.35/1] right-16 top-0",initial:d,animate:h,children:e(Ee,{src:r.src,alt:r.alt,fill:!0})}),l&&e(f.div,{className:"absolute w-1/2 aspect-[0.5/1] left-0 top-20",initial:d,animate:Object.assign(Object.assign({},h),{transition:Object.assign(Object.assign({},h.transition),{delay:.3})}),children:e(Ee,{src:l.src,alt:l.alt,fill:!0})})]}),o&&e("div",{className:"absolute w-1/4 aspect-[0.5/1] flex flex-col flex-nowrap p-0 top-10 z-20 items-end justify-end left-10",children:e(f.div,{className:"relative w-full overflow-visible aspect-[1.2/1]",initial:{opacity:.001,rotate:0,scale:1,x:100,y:0},animate:{opacity:1,rotate:0,rotateX:0,rotateY:0,scale:1,transition:{damping:60,delay:.6,mass:1.2,stiffness:300,type:"spring"},x:0,y:0},children:e(Ee,{src:o.src,fill:!0,alt:o.alt})})})]})};je.displayName="AnimationSet1";const Be=({data:r})=>{const[n,l]=i.useState(0);return r?e("div",{"data-testid":"Tabs",children:a(N,{onSelect:e=>l(e),children:[e(x,{className:"mb-8 flex p-0",children:r.map(((a,t)=>e(w,{className:m("list-none rel ative cursor-pointer inline-block flex-1 items-center justify-center p-4",{"border-transparent border-solid border-0 border-b-2":n!==t,"border-primary border-solid border-0 border-b-2":n===t}),children:e(be,{className:"m-0 text-center",children:a.title})},t)))}),r.map(((a,t)=>e(k,{className:"",children:a.content},t)))]})}):e(t,{})};Be.displayName="Tabs";const Ue=`${process.env.AWS_COGNITO_USERPOOL_DOMAIN}/oauth2/authorize?client_id=${process.env.AWS_COGNITO_CLIENT_ID}&response_type=code&scope=aws.cognito.signin.user.admin+email+openid+profile&identity_provider=Google&redirect_uri=${process.env.AWS_COGNITO_REDIRECT_URI}`,ze=`${process.env.AWS_COGNITO_USERPOOL_DOMAIN}/oauth2/authorize?client_id=${process.env.AWS_COGNITO_CLIENT_ID}&response_type=CODE&scope=aws.cognito.signin.user.admin+email+openid+profile&identity_provider=SignInWithApple&redirect_uri=${process.env.AWS_COGNITO_REDIRECT_URI}`,qe={required:"Email required",pattern:{value:/^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,}$/i,message:"Invalid email address"}},He={required:"You must specify a password",minLength:{value:8,message:"Password must have at least 8 characters"},pattern:{value:/^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[a-zA-Z]).{8,}$/,message:"Password must contain contain at least one number, one uppercase letter, one lowercase letter, and one special character."}},Ge=({children:t,className:i,submit:r,onSubmit:n=(()=>{}),onChange:o,hideSubmit:s,ariaSubmitLabel:c,submitID:d,submitVariant:u=ie.PRIMARY,initialValues:h={},isBoxed:p=!1,submitType:f=te.SUBMIT,disabledSubmitWithReturn:v=!1,isDisabled:g=!1})=>{const b=C({defaultValues:h,mode:"onBlur",reValidateMode:"onChange"});l((()=>{if(o&&"function"==typeof o){const e=b.watch(((e,a)=>{o(e,a)}));return()=>e.unsubscribe()}}),[]);const y=m({"sr-only":s}),{formState:{isSubmitting:N,isDirty:x,isValid:w}}=b;return e(E,Object.assign({},b,{children:e("div",{"data-testid":"Form",className:m("w-full max-w-s @containers @form"),children:a("form",{onSubmit:b.handleSubmit(n),onKeyDown:e=>{v&&"Enter"===e.key&&e.preventDefault()},className:m("w-2xs relative",{"form px-8 pt-6 pb-8 ":p},{"opacity-50":N},i),children:[t,r&&e("div",{className:"flex items-center justify-end",children:e(oe,{id:d||r,className:y,ariaLabel:c||r||"Submit",type:f,outline:!0,isLoading:N,disabled:N||!w||!x||g,variant:u,children:r})})]})})}))};var We;Ge.displayName="Form",function(e){e.TEXT="text",e.TEXTAREA="textarea",e.SELECT="select",e.CHECKBOX="checkbox",e.RADIO="radio",e.SWITCH="switch",e.DATE="date",e.TIME="time",e.DATETIME="datetime",e.FILE="file",e.PASSWORD="password",e.EMAIL="email",e.NUMBER="number",e.TEL="tel",e.URL="url",e.SEARCH="search",e.HIDDEN="hidden"}(We||(We={}));const Ye=i.forwardRef((function(t,i){var{id:r,name:n,options:l,required:o,className:s,disabled:c}=t,d=se(t,["id","name","options","required","className","disabled"]);if(!l)throw new Error("FormSelect requires options prop");return e("div",{id:r,className:m("pb-2 min-w-20",s),children:a("div",{className:"relative",children:[e("select",Object.assign({ref:i,name:n,disabled:c,required:o,className:"form-item text-input"},d,{children:l.map(((a,t)=>{var i,r;return e("option",{value:null===(i=null==a?void 0:a.value)||void 0===i?void 0:i.toString(),disabled:a.disabled,className:"bg-bodyBackground dark:bg-darkBodyBackground",children:a.label},`${null===(r=null==a?void 0:a.value)||void 0===r?void 0:r.toString()}--${t}`)}))})),e("div",{className:"form-icon absolute inset-0 z-10 pointer-events-none h-full w-12 items-center justify-center top-0 right-0 left-auto flex",children:e(ne,{name:"mdi:chevron-down",size:24,className:"pointer-events-none"})})]})})}));Ye.displayName="FormSelect";const $e=({name:t,type:i,label:r,required:n,className:l,icon:s,options:c,disabled:d,description:u,showPasswordLabel:h,hidePasswordLabel:p,validations:f={},fileUploadCallback:v=(()=>{}),autoComplete:g})=>{var b,y;const[N,x]=o(!1),{control:w,formState:k}=A(),{errors:C}=k,E=r&&i!==We.CHECKBOX,S=n||Boolean(f.required)?`${r} *`:r;return e("div",{className:"relative",children:a("div",{"data-testid":"FormField",className:"mb-4",children:[E&&e("div",{className:"flex items-baseline justify-between",children:e(Ae,{id:t,children:S})}),e("div",{className:"mb-1",children:e(R,{defaultValue:"",name:t,control:w,rules:f,render:({field:o})=>((i,o)=>{switch(i){case We.HIDDEN:return e("input",Object.assign({type:Pe.HIDDEN,disabled:d},o));case We.TEXT:return e(Fe,Object.assign({type:Pe.TEXT,required:n||Boolean(f.required),icon:s,className:l,disabled:d,autoComplete:g},o));case We.PASSWORD:{const t=N?Pe.TEXT:Pe.PASSWORD,i="appearance-none border-none bg-transparent flex items-center";return a("div",{className:"relative",children:[e("span",{className:"absolute right-0 top-0 flex items-center justify-center h-full z-10 pr-2",onClick:()=>x((e=>!e)),role:"button",tabIndex:0,children:e("button",N?{type:"button","aria-label":p,className:m(i,"form-icon"),children:e(ne,{name:"mdi:eye-off",size:24})}:{type:"button","aria-label":h,className:m(i,"form-icon"),children:e(ne,{name:"mdi:eye",size:24})})}),e(Fe,Object.assign({type:t,required:n||Boolean(f.required),icon:s,className:l,disabled:d,autoComplete:g},o))]})}case We.TEXTAREA:return e(Fe,Object.assign({type:Pe.TEXTAREA,required:n||Boolean(f.required),icon:s,className:l,disabled:d},o));case We.EMAIL:return e(Fe,Object.assign({type:Pe.EMAIL,required:n||Boolean(f.required),icon:s,className:l,disabled:d,autoComplete:g},o));case We.DATE:return e(Fe,Object.assign({type:Pe.DATE,required:n||Boolean(f.required),icon:s,className:l,disabled:d},o));case We.DATETIME:return e(Fe,Object.assign({type:Pe.DATETIME,required:n||Boolean(f.required),icon:s,className:l,disabled:d},o));case We.NUMBER:return e(Fe,Object.assign({type:Pe.NUMBER,required:n||Boolean(f.required),icon:s,className:l,disabled:d},o));case We.CHECKBOX:return e(de,Object.assign({required:n||Boolean(f.required),id:t,className:l,label:r,disabled:d},o));case We.RADIO:return e(Me,Object.assign({required:n||Boolean(f.required),id:t,className:l,options:c,disabled:d},o));case We.SWITCH:return e(Te,Object.assign({id:t,required:n||Boolean(f.required),className:l,disabled:d},o));case We.SELECT:return e(Ye,Object.assign({required:n||Boolean(f.required),id:t,className:l,disabled:d,label:r,options:c},o));case We.FILE:return e(ye,Object.assign({required:n||Boolean(f.required),id:t,className:l,disabled:d,onChangeCallback:e=>{v(e)}},o));default:return e(Fe,Object.assign({type:Pe.TEXT,required:n||Boolean(f.required),disabled:d,icon:s,className:l},o))}})(i,o)})}),u&&e("div",{className:"formfield-description",children:e(be,{size:ve.SMALL,className:"mb-0",children:u})}),C[t]&&e("div",{className:"formfield-error text-error italic",children:e(be,{size:ve.SMALL,className:"mb-0",children:null===(y=null===(b=null==C?void 0:C[t])||void 0===b?void 0:b.message)||void 0===y?void 0:y.toString()})})]})})};$e.displayName="FormField";const Ve=({handleSubmit:i,initialValues:r,showSocialButtons:n=!1})=>a("div",{"data-testid":"LoginForm",className:"form-wrapper",children:[a(Ge,{onSubmit:i,submit:De.FORMS.LOGIN_FORM.SUBMIT,disabledSubmitWithReturn:!0,initialValues:r,children:[e($e,{name:"email",type:We.EMAIL,label:De.FORMS.LOGIN_FORM.EMAIL,required:!0,validations:qe,autoComplete:"email"}),e($e,{name:"password",type:We.PASSWORD,label:De.FORMS.LOGIN_FORM.PASSWORD,required:!0,autoComplete:"current-password"})]}),n&&a(t,{children:[e(Ce,{}),e("div",{className:"flex flex-col gap-4 items-center",children:a("div",{className:"flex flex-col gap-4 max-w-[250px]",children:[e(oe,{onClick:()=>window.location.assign(Ue),variant:ie.PRIMARY,iconFirst:!0,icon:"mdi:google",children:De.UI.LOGIN_WITH_GOOGLE}),e(oe,{onClick:()=>window.location.assign(ze),variant:ie.PRIMARY,iconFirst:!0,icon:"mdi:apple",children:De.UI.LOGIN_WITH_APPLE})]})})]})]});Ve.displayName="LoginForm";const Xe=({handleSubmit:i,showSocialButtons:r=!1})=>a("div",{"data-testid":"RegisterForm",className:"form-wrapper",children:[a(Ge,{onSubmit:i,submit:De.FORMS.REGISTER_FORM.SUBMIT,disabledSubmitWithReturn:!0,children:[e($e,{name:"email",type:We.EMAIL,label:De.FORMS.REGISTER_FORM.EMAIL,required:!0,validations:qe,autoComplete:"email"}),e($e,{name:"password",type:We.PASSWORD,label:De.FORMS.REGISTER_FORM.PASSWORD,required:!0,description:De.FORMS.REGISTER_FORM.PASSWORD_DESCRIPTION,validations:He,autoComplete:"new-password"})]}),r&&a(t,{children:[e(Ce,{}),e("div",{className:"flex flex-col gap-4 items-center",children:a("div",{className:"flex flex-col gap-4 max-w-[250px]",children:[e(oe,{onClick:()=>window.location.assign(Ue),variant:ie.PRIMARY,iconFirst:!0,icon:"mdi:google",children:De.UI.SIGNUP_WITH_GOOGLE}),e(oe,{onClick:()=>window.location.assign(ze),variant:ie.PRIMARY,iconFirst:!0,icon:"mdi:apple",children:De.UI.SIGNUP_WITH_APPLE})]})})]})]});Xe.displayName="RegisterForm";const Ke=({handleSubmit:a})=>e("div",{"data-testid":"ForgotPasswordForm",className:"form-wrapper",children:e(Ge,{onSubmit:a,submit:De.FORMS.FORGOT_PASSWORD_FORM.SUBMIT,disabledSubmitWithReturn:!0,children:e($e,{name:"email",type:We.EMAIL,label:De.FORMS.FORGOT_PASSWORD_FORM.EMAIL,required:!0,validations:qe})})});Ke.displayName="ForgotPasswordForm";const Ze=({loginSubmit:t,registerSubmit:r,passwordForgotSubmit:n,handleTokenCallback:o,showSocialLogin:s=!1})=>{const[c,d]=i.useState(!1);return l((()=>{console.log("Authenticator useEffect",process.env),function(){ce(this,void 0,void 0,(function*(){if(!process.env.AWS_COGNITO_USERPOOL_DOMAIN||!process.env.AWS_COGNITO_CLIENT_ID||!process.env.AWS_COGNITO_REDIRECT_URI)return;const e=new URLSearchParams(window.location.search).get("code");if(e){const a=`${process.env.AWS_COGNITO_USERPOOL_DOMAIN}/oauth2/token`,t=new URLSearchParams;t.append("grant_type","authorization_code"),t.append("client_id",process.env.AWS_COGNITO_CLIENT_ID),t.append("code",e),t.append("redirect_uri",process.env.AWS_COGNITO_REDIRECT_URI);const i=yield fetch(a,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:t}),r=yield i.json();r&&o&&"function"==typeof o&&o(r)}}))}()}),[]),a("div",{"data-testid":"Authenticator",className:"w-full",children:[!c&&e(Be,{data:[{title:"Login",content:a("div",{className:"flex flex-col gap-4",children:[e(Ve,{handleSubmit:t,showSocialButtons:s}),e("div",{className:"mt-4",children:e(oe,{variant:ie.LINK,onClick:()=>d(!c),children:c?"Back to Login":"Forgot Password?"})})]})},{title:"Register",content:e(Xe,{handleSubmit:r,showSocialButtons:s})}]}),c&&e(Be,{data:[{title:"Forgot Password",content:a("div",{className:"flex flex-col gap-4",children:[e(Ke,{handleSubmit:n}),e("div",{className:"mt-4",children:e(oe,{variant:ie.LINK,onClick:()=>d(!c),children:c?"Back to Login":"Forgot Password?"})})]})}]})]})};Ze.displayName="Authenticator";const Je="relative rounded-lg overflow-hidden transition duration-300 ease-in-out cursor-pointer hover:scale-105 shadow hover:shadow-lg bg-white text-black hover:bg-primary hover:text-bodyText-inverted",Qe=({id:t,title:i,description:r,image:n,className:l,metaData:o,actions:s,padded:c,scaleOnHover:d,onClick:u=(()=>{})})=>a("div",{id:t,"data-testid":"CardBasic",className:b(m(Je,{"p-8":c},{"hover:scale-100":!d},l)),onClick:u,children:[n&&e("div",{className:b(m("relative w-full overflow-hidden aspect-[16/9]",{rounded:c},n.aspectRatio)),children:e(Ee,{fill:!0,src:null==n?void 0:n.src,sizes:"100vh",alt:null==n?void 0:n.alt,className:"absolute inset-0 object-cover"})}),e("div",{className:"w-full flex flex-col gap-1",children:a("div",{className:m({"p-3":!c},{"pt-3":c}),children:[e("div",{children:i&&e(ke,{tag:Ne.H4,singleLine:!0,children:i})}),e("div",{children:r&&e(be,{className:"mb-0",children:r})}),a("div",{className:"flex items-center justify-between gap-2",children:[o&&e("div",{className:"flex shrink-0 mt-2",children:o.map(((e,t)=>0===t?a(be,{className:"text-xs",as:ge.SMALL,children:[e," ·"]},e):t===o.length-1?a(be,{className:"text-xs",as:ge.SMALL,children:[" ",e]},e):a(be,{className:"text-xs",as:ge.SMALL,children:[" ",e," ·"]},e)))}),s&&a("div",{className:"flex items-center gap-1 flex-wrap",children:[s.like&&e(oe,{variant:ie.PRIMARY,icon:s.like.isActive?"mdi:like":"mdi:like-outline",size:re.SMALL,onClick:e=>{var a;e.stopPropagation(),(null===(a=null==s?void 0:s.like)||void 0===a?void 0:a.onClick)&&"function"==typeof s.like.onClick&&s.like.onClick({id:t})}}),s.share&&e(oe,{variant:ie.PRIMARY,icon:s.share.isActive?"mdi:share":"mdi:share-outline",size:re.SMALL,onClick:e=>{var a;e.stopPropagation(),(null===(a=null==s?void 0:s.share)||void 0===a?void 0:a.onClick)&&"function"==typeof s.share.onClick&&s.share.onClick({id:t})}}),s.save&&e(oe,{variant:ie.PRIMARY,icon:s.save.isActive?"mdi:bookmark":"mdi:bookmark-outline",size:re.SMALL,onClick:e=>{var a;e.stopPropagation(),(null===(a=null==s?void 0:s.save)||void 0===a?void 0:a.onClick)&&"function"==typeof s.save.onClick&&s.save.onClick({id:t})}}),s.comment&&e(oe,{variant:ie.PRIMARY,icon:s.comment.isActive?"mdi:comment":"mdi:comment-outline",size:re.SMALL,onClick:e=>{var a;e.stopPropagation(),(null===(a=null==s?void 0:s.comment)||void 0===a?void 0:a.onClick)&&"function"==typeof s.comment.onClick&&s.comment.onClick({id:t})}}),s.bookmark&&e(oe,{variant:ie.PRIMARY,icon:s.bookmark.isActive?"mdi:bookmark":"mdi:bookmark-outline",size:re.SMALL,onClick:e=>{var a;e.stopPropagation(),(null===(a=null==s?void 0:s.bookmark)||void 0===a?void 0:a.onClick)&&"function"==typeof s.bookmark.onClick&&s.bookmark.onClick({id:t})}}),s.report&&e(oe,{variant:ie.PRIMARY,icon:s.report.isActive?"mdi:flag":"mdi:flag-outline",size:re.SMALL,onClick:e=>{var a;e.stopPropagation(),(null===(a=null==s?void 0:s.report)||void 0===a?void 0:a.onClick)&&"function"==typeof s.report.onClick&&s.report.onClick({id:t})}}),s.follow&&e(oe,{variant:ie.PRIMARY,icon:s.follow.isActive?"mdi:account-plus":"mdi:account-plus-outline",size:re.SMALL,onClick:e=>{var a;e.stopPropagation(),(null===(a=null==s?void 0:s.follow)||void 0===a?void 0:a.onClick)&&"function"==typeof s.follow.onClick&&s.follow.onClick({id:t})}}),s.download&&e(oe,{variant:ie.PRIMARY,icon:s.download.isActive?"mdi:download":"mdi:download-outline",size:re.SMALL,onClick:e=>{var a;e.stopPropagation(),(null===(a=null==s?void 0:s.download)||void 0===a?void 0:a.onClick)&&"function"==typeof s.download.onClick&&s.download.onClick({id:t})}}),s.edit&&e(oe,{variant:ie.PRIMARY,icon:s.edit.isActive?"mdi:pencil":"mdi:pencil-outline",size:re.SMALL,onClick:e=>{var a;e.stopPropagation(),(null===(a=null==s?void 0:s.edit)||void 0===a?void 0:a.onClick)&&"function"==typeof s.edit.onClick&&s.edit.onClick({id:t})}}),s.delete&&e(oe,{variant:ie.PRIMARY,icon:s.delete.isActive?"mdi:delete":"mdi:delete-outline",size:re.SMALL,onClick:e=>{var a;e.stopPropagation(),(null===(a=null==s?void 0:s.delete)||void 0===a?void 0:a.onClick)&&"function"==typeof s.delete.onClick&&s.delete.onClick({id:t})}})]})]})]})})]});Qe.displayName="CardBasic";const ea=({id:t,title:i,description:r,image:n,className:l,metaData:o,actions:s,onClick:c=(()=>{}),playCallback:d})=>a("div",{id:t,"data-testid":"CardBasic",className:m(Je,l),onClick:c,children:[n&&a("div",{className:m("relative w-full overflow-hidden aspect-[16/9]",n.aspectRatio),children:[e(Ee,{fill:!0,src:null==n?void 0:n.src,sizes:"100vh",alt:null==n?void 0:n.alt,className:"absolute inset-0 object-cover"}),d&&e("div",{className:"absolute inset-0 flex items-center justify-center",children:e(oe,{variant:ie.PRIMARY,icon:"mdi:play",size:re.LARGE,onClick:e=>{e.stopPropagation(),"function"==typeof d&&d(e)}})})]}),e("div",{className:"w-full flex flex-col gap-1",children:a("div",{className:"p-3",children:[e("div",{children:i&&e(ke,{tag:Ne.H5,singleLine:!0,flush:!0,children:i})}),e("div",{children:r&&e(be,{children:r})}),a("div",{className:"flex items-center justify-between gap-2",children:[o&&e("div",{className:"flex shrink-0",children:o.map(((e,t)=>0===t?a(be,{className:"text-xs",as:ge.SMALL,children:[e," ·"]},e):t===o.length-1?a(be,{className:"text-xs",as:ge.SMALL,children:[" ",e]},e):a(be,{className:"text-xs",as:ge.SMALL,children:[" ",e," ·"]},e)))}),s&&a("div",{className:"flex items-center gap-1 flex-wrap",children:[s.like&&e(oe,{variant:ie.PRIMARY,icon:s.like.isActive?"mdi:like":"mdi:like-outline",size:re.SMALL,onClick:e=>{var a;e.stopPropagation(),(null===(a=null==s?void 0:s.like)||void 0===a?void 0:a.onClick)&&"function"==typeof s.like.onClick&&s.like.onClick({id:t})}}),s.share&&e(oe,{variant:ie.PRIMARY,icon:s.share.isActive?"mdi:share":"mdi:share-outline",size:re.SMALL,onClick:e=>{var a;e.stopPropagation(),(null===(a=null==s?void 0:s.share)||void 0===a?void 0:a.onClick)&&"function"==typeof s.share.onClick&&s.share.onClick({id:t})}}),s.save&&e(oe,{variant:ie.PRIMARY,icon:s.save.isActive?"mdi:bookmark":"mdi:bookmark-outline",size:re.SMALL,onClick:e=>{var a;e.stopPropagation(),(null===(a=null==s?void 0:s.save)||void 0===a?void 0:a.onClick)&&"function"==typeof s.save.onClick&&s.save.onClick({id:t})}}),s.comment&&e(oe,{variant:ie.PRIMARY,icon:s.comment.isActive?"mdi:comment":"mdi:comment-outline",size:re.SMALL,onClick:e=>{var a;e.stopPropagation(),(null===(a=null==s?void 0:s.comment)||void 0===a?void 0:a.onClick)&&"function"==typeof s.comment.onClick&&s.comment.onClick({id:t})}}),s.bookmark&&e(oe,{variant:ie.PRIMARY,icon:s.bookmark.isActive?"mdi:bookmark":"mdi:bookmark-outline",size:re.SMALL,onClick:e=>{var a;e.stopPropagation(),(null===(a=null==s?void 0:s.bookmark)||void 0===a?void 0:a.onClick)&&"function"==typeof s.bookmark.onClick&&s.bookmark.onClick({id:t})}}),s.report&&e(oe,{variant:ie.PRIMARY,icon:s.report.isActive?"mdi:flag":"mdi:flag-outline",size:re.SMALL,onClick:e=>{var a;e.stopPropagation(),(null===(a=null==s?void 0:s.report)||void 0===a?void 0:a.onClick)&&"function"==typeof s.report.onClick&&s.report.onClick({id:t})}}),s.follow&&e(oe,{variant:ie.PRIMARY,icon:s.follow.isActive?"mdi:account-plus":"mdi:account-plus-outline",size:re.SMALL,onClick:e=>{var a;e.stopPropagation(),(null===(a=null==s?void 0:s.follow)||void 0===a?void 0:a.onClick)&&"function"==typeof s.follow.onClick&&s.follow.onClick({id:t})}}),s.download&&e(oe,{variant:ie.PRIMARY,icon:s.download.isActive?"mdi:download":"mdi:download-outline",size:re.SMALL,onClick:e=>{var a;e.stopPropagation(),(null===(a=null==s?void 0:s.download)||void 0===a?void 0:a.onClick)&&"function"==typeof s.download.onClick&&s.download.onClick({id:t})}}),s.edit&&e(oe,{variant:ie.PRIMARY,icon:s.edit.isActive?"mdi:pencil":"mdi:pencil-outline",size:re.SMALL,onClick:e=>{var a;e.stopPropagation(),(null===(a=null==s?void 0:s.edit)||void 0===a?void 0:a.onClick)&&"function"==typeof s.edit.onClick&&s.edit.onClick({id:t})}}),s.delete&&e(oe,{variant:ie.PRIMARY,icon:s.delete.isActive?"mdi:delete":"mdi:delete-outline",size:re.SMALL,onClick:e=>{var a;e.stopPropagation(),(null===(a=null==s?void 0:s.delete)||void 0===a?void 0:a.onClick)&&"function"==typeof s.delete.onClick&&s.delete.onClick({id:t})}})]})]})]})})]});ea.displayName="CardMedia";const aa=({video:t,isMuted:i=!0,id:r,title:n,description:l,image:o,className:s,metaData:c,actions:d,onClick:u=(()=>{})})=>a("div",{id:r,"data-testid":"CardVideo",className:m(Je,s),onClick:u,children:[o&&t&&e("div",{className:m("relative w-full h-full aspect-[16/9]",o.aspectRatio),children:e(S,{videoId:`video--${r}`,playbackStartDelay:1e3,videoSrc:e("source",{src:t,type:"video/mp4"}),videoClassName:m("hls-hover-video w-full aspect-[16/9]",o.aspectRatio),sizingMode:"overlay",preload:"none",loop:!1,muted:i,className:m("w-full overflow-hidden aspect-[16/9]",o.aspectRatio),pausedOverlay:e("div",{className:m("relative w-full overflow-hidden aspect-[16/9]",o.aspectRatio),children:e(Ee,{fill:!0,src:null==o?void 0:o.src,width:0,height:0,alt:null==o?void 0:o.alt,className:"absolute inset-0 object-cover"})}),loadingOverlay:e("div",{className:m("w-full flex items-center justify-center aspect-[16/9]",o.aspectRatio),children:e("div",{className:"",children:e(le,{})})})},`${r}--card`)}),e("div",{className:"w-full flex flex-col gap-1",children:a("div",{className:"p-3",children:[e("div",{children:n&&e(ke,{tag:Ne.H5,singleLine:!0,flush:!0,children:n})}),e("div",{children:l&&e(be,{children:l})}),a("div",{className:"flex items-center justify-between gap-2",children:[c&&e("div",{className:"flex shrink-0",children:c.map(((e,t)=>0===t?a(be,{className:"text-xs",as:ge.SMALL,children:[e," ·"]},e):t===c.length-1?a(be,{className:"text-xs",as:ge.SMALL,children:[" ",e]},e):a(be,{className:"text-xs",as:ge.SMALL,children:[" ",e," ·"]},e)))}),d&&a("div",{className:"flex items-center gap-1 flex-wrap",children:[d.like&&e(oe,{variant:ie.PRIMARY,icon:d.like.isActive?"mdi:like":"mdi:like-outline",size:re.SMALL,onClick:e=>{var a;e.stopPropagation(),(null===(a=null==d?void 0:d.like)||void 0===a?void 0:a.onClick)&&"function"==typeof d.like.onClick&&d.like.onClick({id:r})}}),d.share&&e(oe,{variant:ie.PRIMARY,icon:d.share.isActive?"mdi:share":"mdi:share-outline",size:re.SMALL,onClick:e=>{var a;e.stopPropagation(),(null===(a=null==d?void 0:d.share)||void 0===a?void 0:a.onClick)&&"function"==typeof d.share.onClick&&d.share.onClick({id:r})}}),d.save&&e(oe,{variant:ie.PRIMARY,icon:d.save.isActive?"mdi:bookmark":"mdi:bookmark-outline",size:re.SMALL,onClick:e=>{var a;e.stopPropagation(),(null===(a=null==d?void 0:d.save)||void 0===a?void 0:a.onClick)&&"function"==typeof d.save.onClick&&d.save.onClick({id:r})}}),d.comment&&e(oe,{variant:ie.PRIMARY,icon:d.comment.isActive?"mdi:comment":"mdi:comment-outline",size:re.SMALL,onClick:e=>{var a;e.stopPropagation(),(null===(a=null==d?void 0:d.comment)||void 0===a?void 0:a.onClick)&&"function"==typeof d.comment.onClick&&d.comment.onClick({id:r})}}),d.bookmark&&e(oe,{variant:ie.PRIMARY,icon:d.bookmark.isActive?"mdi:bookmark":"mdi:bookmark-outline",size:re.SMALL,onClick:e=>{var a;e.stopPropagation(),(null===(a=null==d?void 0:d.bookmark)||void 0===a?void 0:a.onClick)&&"function"==typeof d.bookmark.onClick&&d.bookmark.onClick({id:r})}}),d.report&&e(oe,{variant:ie.PRIMARY,icon:d.report.isActive?"mdi:flag":"mdi:flag-outline",size:re.SMALL,onClick:e=>{var a;e.stopPropagation(),(null===(a=null==d?void 0:d.report)||void 0===a?void 0:a.onClick)&&"function"==typeof d.report.onClick&&d.report.onClick({id:r})}}),d.follow&&e(oe,{variant:ie.PRIMARY,icon:d.follow.isActive?"mdi:account-plus":"mdi:account-plus-outline",size:re.SMALL,onClick:e=>{var a;e.stopPropagation(),(null===(a=null==d?void 0:d.follow)||void 0===a?void 0:a.onClick)&&"function"==typeof d.follow.onClick&&d.follow.onClick({id:r})}}),d.download&&e(oe,{variant:ie.PRIMARY,icon:d.download.isActive?"mdi:download":"mdi:download-outline",size:re.SMALL,onClick:e=>{var a;e.stopPropagation(),(null===(a=null==d?void 0:d.download)||void 0===a?void 0:a.onClick)&&"function"==typeof d.download.onClick&&d.download.onClick({id:r})}}),d.edit&&e(oe,{variant:ie.PRIMARY,icon:d.edit.isActive?"mdi:pencil":"mdi:pencil-outline",size:re.SMALL,onClick:e=>{var a;e.stopPropagation(),(null===(a=null==d?void 0:d.edit)||void 0===a?void 0:a.onClick)&&"function"==typeof d.edit.onClick&&d.edit.onClick({id:r})}}),d.delete&&e(oe,{variant:ie.PRIMARY,icon:d.delete.isActive?"mdi:delete":"mdi:delete-outline",size:re.SMALL,onClick:e=>{var a;e.stopPropagation(),(null===(a=null==d?void 0:d.delete)||void 0===a?void 0:a.onClick)&&"function"==typeof d.delete.onClick&&d.delete.onClick({id:r})}})]})]})]})})]});aa.displayName="CardVideo";const ta=({id:t,title:i,description:r,icon:n,className:l,onClick:o,moreTitle:s,align:c})=>a("div",{id:t,"data-testid":"CardIcon",className:b(m(o?Je:"","p-8 group gap-4 flex flex-col cursor-default",{"items-start":"left"===c},{"items-center":"center"===c},{"items-end":"right"===c},l)),children:[n&&e("div",{className:m("relative"),children:e(ne,{name:n,size:48})}),a("div",{className:m({"text-left":"left"===c},{"text-center":"center"===c},{"text-right":"right"===c}),children:[e("div",{children:i&&e(ke,{tag:Ne.H5,singleLine:!0,children:i})}),e("div",{children:r&&e(be,{align:c,children:r})})]}),o&&e("div",{className:"flex items-center justify-start gap-2",children:e(oe,{icon:"mdi:arrow-right",variant:ie.LINK,onClick:o,children:s})})]});ta.displayName="CardIcon";const ia=({testID:t,id:i,title:r,description:n,image:l,onClick:o,className:s,padded:c,icon:d})=>a("div",{id:i,"data-testid":t||"CardHorz",className:m("relative rounded-lg overflow-hidden flex gap-4 cursor-pointer shadow hover:shadow-lg",{"p-4":c},s),onClick:o,children:[l&&e("div",{className:"w-1/3 aspect-[1/1]",children:e("div",{className:b(m("relative w-full overflow-hidden h-full",l.aspectRatio)),children:e(Ee,{fill:!0,src:null==l?void 0:l.src,alt:null==l?void 0:l.alt,className:"absolute inset-0 object-cover"})})}),d&&e("div",{className:"py-2 pl-2",children:e(ne,{name:d,size:30})}),e("div",{className:"flex flex-1 overflow-hidden h-min",children:a("div",{className:"flex-col gap-2 py-2 pr-2 overflow-hidden",children:[r&&e("div",{className:"",children:e(ke,{tag:Ne.H4,children:r})}),n&&e("div",{children:e(be,{className:"mb-0",children:n})})]})})]});ia.displayName="CardHorz";const ra=({testID:i,className:r,data:n,padded:o,shadow:s=!0})=>{const c=v(0);return l((()=>{window.matchMedia("(prefers-reduced-motion: reduce)").matches||p(c,200,{duration:.5})}),[c]),n?a("div",{"data-testid":i||"CardData",className:m("relative rounded-lg overflow-hidden flex flex-col items-center gap-4",{"p-4":o},{shadow:s},r),children:[(null==n?void 0:n.animateNumber)&&a("div",{className:"font-heading text-4xl md:text-4xl lg:text-4xl font-bold",children:[e(ee,{from:n.numberData.from,to:n.numberData.to,numDecimals:n.numberData.numDecimals}),e("span",{children:null==n?void 0:n.item})]}),!(null==n?void 0:n.animateNumber)&&e("div",{className:"text-lg",children:e(ke,{tag:Ne.H2,flush:!0,children:null==n?void 0:n.item})}),e("div",{children:e(be,{children:null==n?void 0:n.label})})]}):e(t,{})};ra.displayName="CardData";const na=a=>{var{variant:t,className:i,data:r}=a,n=se(a,["variant","className","data"]);switch(t){case"basic":default:return e(Qe,Object.assign({className:i},r,n));case"media":return e(ea,Object.assign({className:i},r,n));case"video":return e(aa,Object.assign({className:i},r,n));case"icon":return e(ta,Object.assign({className:i},r,n));case"horz":return e(ia,Object.assign({className:i},r,n));case"data":return e(ra,Object.assign({className:i},r,n))}};na.displayName="Card";const la=({text:i})=>{const r=i.split(" ");return e("div",{"data-testid":"DisplayHeading",className:"relative",children:e(ke,{tag:Ne.H1,className:"",children:r.map(((i,n)=>{const l=n===r.length-1,o=`${i}-${n}`;return a("span",{children:[e("span",{className:m({"display-heading relative font-heading":!l},{"inline-block relative font-heading":l}),children:a(t,{children:[l&&a(t,{children:[e("div",{className:"display-heading--emphasis"}),e("span",{className:"display-heading--lastword",children:i})]}),!l&&e("span",{children:i})]})}),!l&&" "]},o)}))})})};var oa;la.displayName="DisplayHeading",function(e){e.NONE="py-0",e.ATOM="py-8",e.DEFAULT="py-16",e.ELEMENT="py-24",e.COMPONENT="py-32",e.MODULE="py-40",e.FEATURE="py-64"}(oa||(oa={}));const sa=({testID:t,cardData:i,title:r,description:l,withSeparators:o,spacing:s=oa.MODULE})=>{const c=n(null),d=u(c,{once:!0});return a("div",{ref:c,"data-testid":t||"PanelCards",className:s,children:[(r||l)&&a("div",{className:"relative text-center py-8",children:[r&&e(la,{text:r}),l&&e(be,{align:he.CENTER,children:l})]}),e("div",{className:"flex gap-8",children:null==i?void 0:i.map(((t,r)=>a("span",{className:"flex gap-8 justify-between",children:[e("div",{className:m("relative flex flex-1 items-center justify-center",{"":o}),style:{transform:d?"none":"translateY(200px)",opacity:d?1:0,transition:`all 0.9s cubic-bezier(0.17, 0.55, 0.55, 1) ${.1*r}s`},children:e(na,Object.assign({},t))}),o&&r<i.length-1&&e("div",{className:"w-1 h-10 border-0 border-r border-solid border-primary500"},`separator-${r}`)]},`card-${r}`)))})]})};sa.displayName="PanelCards";const ca=({children:a,className:t,spacing:i,padded:r,isNarrow:n,isCentered:l,isFlush:o})=>{const s=b(m("container mx-auto my-0",{"px-4":r},{"py-40":"feature"===i},{"py-24":"component"===i},{"py-16":"module"===i},{"py-10":"element"===i},{"py-4":"atom"===i},{"py-0":"none"===i},{"max-w-3xl":n},{"flex items-center justify-center flex-col":l},{"px-0 max-w-full mx-0":o})),c=m("mx-4 md:mx-0",{"w-full":!l},t);return e("div",{"data-testid":"Container",className:s,children:e("div",{className:c,children:a})})};ca.displayName="Container";const da=({testID:t,title:i,description:r,inversed:n,assets:l,buttonData:o,withBg:s=!0,spacing:c=oa.DEFAULT})=>a("div",{"data-testid":t||"PanelFeature",className:m("relative m-auto w-full flex flex-none flex-nowrap",c),children:[s&&e("div",{className:"rounded-full blur-[250px] flex flex-none aspect-1 absolute -top-24 -left-48 w-[500px] opacity-20 bg-gradient-to-r from-primary-darker to-primary-lighter"}),e(ca,{children:a("div",{className:m("relative flex sm:flex-col md:flex-row flex-nowrap w-full h-min justify-between overflow-visible p-0 items-center gap-16",{"flex-row-reverse":n}),children:[a("div",{className:"w-1/2 flex flex-col items-start justify-center",children:[a("div",{className:"relative text-left",children:[e(la,{text:i}),e(be,{className:"mb-0",children:r})]}),a("div",{className:"grid grid-cols-3 gap-2 my-8",children:[e(ue,{rounded:!0,text:"New",variant:"info"}),e(ue,{rounded:!0,text:"Trending",variant:"info"}),e(ue,{rounded:!0,text:"Popular",variant:"info"})]}),e("div",{className:"",children:e(oe,Object.assign({},o))})]}),e("div",{className:"w-1/2 flex items-center justify-center",children:e("div",{className:"w-full aspect-[1/1] flex items-center justify-center",children:e(je,{bgAsset:l.bgAsset,focalAsset1:l.focalAsset1,focalAsset2:l.focalAsset2,focalAsset3:l.focalAsset3})})})]})})]});da.displayName="PanelFeature";const ma=({url:a,sources:t,onReady:r,className:n,options:o={},isYoutube:c=!1,defaultAudioTrack:d="No Music",rounded:u=!0,aspectRatioValue:h})=>{const p=i.useRef(null),f=i.useRef(null),v=i.useRef(null),g=s((()=>{switch(h){case"4/3":return{aspectRatio:"4:3",className:"aspect-[4/3]"};case"1/1":return{aspectRatio:"1:1",className:"aspect-[1/1]"};case"3/4":return{aspectRatio:"3:4",className:"aspect-[3/4]"};case"9/16":return{aspectRatio:"9:16",className:"aspect-[9/16]"};case"16/7":return{aspectRatio:"16:7",className:"aspect-[16/7]"};case"16/5":return{aspectRatio:"16:5",className:"aspect-[16/5]"};default:return{aspectRatio:"16:9",className:"aspect-[16/9]"}}}),[h]);return l((()=>{var e;if(c)return;const a=Object.assign(Object.assign({autoplay:!0,controls:!0,muted:!1,responsive:!0,fill:!0,fluid:!0,aspectRatio:g.aspectRatio||"16:9",controlBar:{skipButtons:{forward:30,backward:30},volumePanel:{inline:!0}},html5:{hls:{enableLowInitialPlaylist:!0}}},o),{sources:t});if(!v.current){const t=document.createElement("video-js");t.classList.add("vjs-big-play-centered"),null===(e=null==f?void 0:f.current)||void 0===e||e.appendChild(t);const i=v.current=O(t,a,(()=>{O.log("player is ready",i),r&&r(i)}));i.on("loadedmetadata",(function(){const e=i.audioTracks();for(let a=0;a<e.length;a++)e[a].label===d&&(e[a].enabled=!0)}))}}),[o,f]),l((()=>{if(c)return;const e=v.current;return()=>{e&&!e.isDisposed()&&(e.dispose(),v.current=null)}}),[v]),e("div",c&&a?{"data-testid":"Video",className:m("relative w-full h-full aspect-[16/9]",n),children:e(L,{ref:p,className:"react-player",url:a,width:"100%",height:"100%",controls:!0,onReady:r})}:{className:b(m("relative w-full overflow-hidden h-full aspect-[16/9] bg-black object-cover",{rouded:u},g.className,n)),children:e("div",{"data-vjs-player":!0,children:e("div",{ref:f,className:"object-cover"})})})};ma.displayName="Video";const ua={replace(a){if("a"===a.name){const t=M(a.attribs);return e(me,Object.assign({},t,{children:T(a.children,ua)}))}if(a.attribs&&"p"===a.name){const t=M(a.attribs);return e(be,Object.assign({},t,{children:T(a.children,ua)}))}return a}},ha=({testID:a,data:t,align:i,className:r})=>e("span",{"data-testid":a||'"HtmlContent"',className:m("relative",{"text-right":"right"===i},{"text-center":"center"===i},{"text-left":"left"===i},r),children:I(t,ua)});ha.displayName="HtmlContent";const pa=({testID:t,title:i,description:r,image:o,buttonData:c={variant:ie.PRIMARY,size:re.LARGE},inversed:d=!1,withBg:h=!0,spacing:p=oa.MODULE,video:v})=>{const b=g(),y=n(null),N=u(y),x={damping:30,delay:0,mass:1.2,stiffness:200,type:"spring",duration:.5};l((()=>{N&&b.start((e=>({transform:"none",transition:Object.assign(Object.assign({},x),{delay:.1*e})})))}),[b,N]);const w=s((()=>{switch(null==v?void 0:v.aspectRatioValue){case"4/3":return"aspect-[4/3]";case"1/1":return"aspect-[1/1]";case"3/4":return"aspect-[3/4]";case"9/16":return"aspect-[9/16]";case"16/7":return"aspect-[16/7]";case"16/5":return"aspect-[16/5]";default:return"aspect-[16/9]"}}),[v]),k=d?"translateX(100px)":"translateX(-100px)";return a("div",{"data-testid":t||"PanelHero",className:m("relative m-auto w-full flex flex-none flex-nowrap",p),children:[h&&e("div",{className:m("rounded-full blur-[200px] flex flex-none aspect-1 absolute w-[700px] opacity-20 bg-gradient-to-r from-primary-darker to-primary-lighter z-0",{"-bottom-24 right-0":!d,"-top-24 left-0":d})}),e(ca,{children:a("div",{className:m("relative flex sm:flex-col md:flex-row flex-nowrap w-full h-min justify-between overflow-visible p-0 items-center gap-16",{"md:flex-row-reverse":d}),children:[e("div",{ref:y,className:"w-1/2 flex flex-col items-start justify-center z-10",children:a("div",{className:m("relative flex flex-col gap-4 from-bodyBackground p-4 rounded",{"text-right bg-gradient-to-l":!d},{"text-left bg-gradient-to-r":d}),children:[e(f.div,{initial:{transform:k},custom:0,animate:b,children:e(la,{text:i})}),e(f.div,{initial:{transform:k},custom:1,animate:b,children:e(ha,{className:"mb-0",align:d?he.LEFT:he.RIGHT,data:r})}),e(f.div,{initial:{transform:k},custom:2,animate:b,children:e("div",{className:m("flex items-center",{"justify-end":!d,"justify-start":d}),children:e(oe,Object.assign({},c))})})]})}),e("div",{className:"relative w-1/2 z-0",children:a("div",{className:m("relative scale-[1.35] rounded overflow-hidden shadow",w),children:[o&&e(Ee,{src:o,alt:i,fill:!0}),v&&e(ma,{sources:v.sources,options:{autoplay:!0,muted:!0,controls:!1},aspectRatioValue:v.aspectRatioValue})]})})]})})]})};pa.displayName="PanelHero";const fa=({testID:t,title:i,description:r,image1:n,image2:l,iosLink:o="#",androidLink:s="#",inversed:c=!1,withBg:d=!0,spacing:u=oa.MODULE})=>a("div",{"data-testid":t||"PanelFeature",className:m("relative m-auto w-full flex flex-none flex-nowrap",u),children:[d&&e("div",{className:"rounded-full blur-[250px] flex flex-none aspect-1 absolute -bottom-24 -right-48 w-[500px] opacity-20 bg-gradient-to-r from-primary-darker to-primary-lighter"}),e(ca,{children:a("div",{className:m("relative flex flex-col md:flex-row flex-nowrap w-full h-full overflow-visible gap-16 border border-solid border-primary bg-primary bg-opacity-10 backdrop-blur-lg rounded border-opacityDark20 p-8",{"flex-row-reverse":c}),children:[a("div",{className:"w-full md:w-1/2 top-0 relative",children:[e("div",{className:"absolute aspect-[8/17] -rotate-12 w-[135px] left-1/3 top-4 md:w-[180px] md:left-1/3 md:top-4 lg:w-[210px] lg:left-1/2 lg:-top-1/3",children:e(Ee,{src:l,alt:i})}),e("div",{className:"relative md:absolute aspect-[8/17] -rotate-0 w-[150px] left-0 top-0 md:w-[220px] md:left-0 md:-top-6 lg:w-[250px] lg:left-1/4 lg:-top-1/2",children:e(Ee,{src:n,alt:i})})]}),a("div",{className:"w-full md:w-1/2",children:[e("div",{children:e(la,{text:i})}),e("div",{children:e(be,{children:r})}),a("div",{className:"flex items-center justify-start gap-4",children:[e("div",{className:"relative w-[150px] h-[50px]",children:e(me,{href:o,target:"_blank",hideExternalIcon:!0,children:e(Ee,{src:"https://apple-resources.s3.amazonaws.com/media-badges/download-on-the-app-store/black/en-us.svg",alt:"App Store"})})}),e("div",{className:"relative w-[190px] h-[75px]",children:e(me,{href:s,target:"_blank",hideExternalIcon:!0,children:e(Ee,{src:"https://play.google.com/intl/en_us/badges/static/images/badges/en_badge_web_generic.png",alt:"Google Play"})})})]})]})]})})]});fa.displayName="PanelProduct";const va=({testID:t,className:i,title:r,description:n,spacing:l=oa.NONE,videoProps:o})=>a("div",{"data-testid":t||'"PanelVideo"',className:m("relative m-auto w-full flex flex-none flex-nowrap aspect-[16/6.6]",l,i),children:[e(ma,{rounded:!1,options:Object.assign({autoplay:!0,muted:!0,controls:!1,loop:!0},null==o?void 0:o.options),sources:null==o?void 0:o.sources}),a("div",{className:"absolute top-0 left-0 w-full h-full z-10",children:[e("div",{className:"absolute top-0 left-0 w-full h-full bg-gradient-to-r from-transparent to-black opacity-50"}),a("div",{className:"absolute top-0 left-0 w-full h-full flex flex-col items-end justify-center pr-24 invert",children:[r&&e(f.div,{initial:{transform:"translateX(25px)"},animate:{transform:"none",transition:{damping:60,delay:0,mass:1.2,stiffness:300,type:"spring"}},transition:{duration:.5},children:e("div",{children:e(ke,{tag:Ne.H2,children:r})})}),n&&e(f.div,{initial:{transform:"translateX(25px)"},animate:{transform:"none",transition:{damping:60,delay:0,mass:1.2,stiffness:300,type:"spring"}},transition:{duration:.5},children:e("div",{children:e(be,{children:n})})})]})]})]});va.displayName="PanelVideo";const ga=({testID:a,buttonData:t})=>e("div",{"data-testid":a||"ButtonGroup",className:"inline-flex rounded",role:"group",children:null==t?void 0:t.map(((a,i)=>{const r=i>0&&i<t.length-1,n=0===i,l=i===t.length-1,o=m({"rounded-none":r},{"rounded-r":n,"rounded-l":l});return e("div",{children:e(oe,Object.assign({},a,{className:o,children:a.children}))},a.id)}))});ga.displayName="ButtonGroup";const ba=({testID:t,url:i,title:r="Share",enabled:n={facebook:!0,twitter:!0}})=>a("div",{"data-testid":t||"Share",className:"flex gap-2 items-center ",children:[e("div",{children:a(be,{as:ge.P,className:"mb-0",children:[De.UI.SHARE,":"]})}),(null==n?void 0:n.facebook)&&e(P,{url:i,title:r,className:"",children:e(ne,{name:"mdi:facebook"})}),(null==n?void 0:n.twitter)&&e(F,{url:i,title:r,className:"",children:e(ne,{name:"mdi:twitter"})}),(null==n?void 0:n.whatsapp)&&e(D,{url:i,title:r,className:"",children:e(ne,{name:"mdi:whatsapp"})}),(null==n?void 0:n.email)&&e(_,{url:i,title:r,className:"",children:e(ne,{name:"mdi:email"})}),(null==n?void 0:n.linkedin)&&e(j,{url:i,title:r,className:"",children:e(ne,{name:"mdi:linkedin"})})]});ba.displayName="Share";const ya=({testID:t,facebook:i,twitter:r,instagram:n,linkedin:l})=>a("div",{"data-testid":t||'"VisitUs"',className:"flex gap-2",children:[i&&e(oe,{variant:ie.PRIMARY,size:re.MEDIUM,icon:"mdi:facebook",onClick:()=>window.open(i.url)}),r&&e(oe,{variant:ie.PRIMARY,size:re.MEDIUM,icon:"mdi:twitter",onClick:()=>window.open(r.url)}),n&&e(oe,{variant:ie.PRIMARY,size:re.MEDIUM,icon:"mdi:instagram",onClick:()=>window.open(n.url)}),l&&e(oe,{variant:ie.PRIMARY,size:re.MEDIUM,icon:"mdi:linkedin",onClick:()=>window.open(l.url)})]});ya.displayName="VisitUs";const Na=({testID:t,title:i,links:r,inline:n=!0,separators:l=!1,className:o})=>a("div",{"data-testid":t||'"Menu"',className:b(m("flex flex-col gap-2",o)),children:[i&&e("div",{children:e(ke,{tag:Ne.H3,children:i})}),e("div",{className:m("flex gap-0 items-center md:items-start",{"flex-row ":n},{"flex-col ":!n}),children:null==r?void 0:r.map(((t,i)=>{const n=`${t.id}--${i}`;return a("div",{className:"flex gap-0",children:[e("div",{className:"relative py-2",children:a(me,{href:t.url,className:"flex gap-1",children:[t.icon&&e(ne,{name:t.icon}),t.title&&e("div",{children:t.title})]})}),l&&i+1<r.length&&e("div",{className:"h-full flex self-center px-2",children:e(ne,{name:"mdi:dot",className:"opacity-50"})})]},n)}))})]});Na.displayName="Menu";const xa=({testID:t,children:i,withBg:r=!0,inversed:n=!1})=>a("div",{"data-testid":t||"PanelHero",className:"relative py-8 m-auto w-full flex flex-none flex-nowrap",children:[r&&e("div",{className:m("rounded-full blur-[200px] flex flex-none aspect-1 absolute w-[700px] opacity-20 bg-gradient-to-r from-primary-darker to-primary-lighter z-0",{"-bottom-24 right-0":!n,"-top-24 left-0":n})}),e(ca,{children:i})]});var wa;xa.displayName="Hero",function(e){e.NONE="none",e.ATOM="atom",e.DEFAULT="default",e.ELEMENT="element",e.COMPONENT="component",e.MODULE="module",e.FEATURE="feature"}(wa||(wa={}));const ka=({spacing:a=wa.DEFAULT,children:t,narrow:i,flush:r,className:n})=>{const l=m("flex","flex-col","flex-1","relative",{"py-40":"feature"===a},{"py-24":"component"===a},{"py-16":"module"===a},{"py-10":"element"===a},{"py-8":"default"===a},{"py-4":"atom"===a},{"py-0":"none"===a},{"max-w-5xl":i},{"p-0":r},n);return e("div",{"data-testid":"ContentPageLayout",className:l,children:t})};var Ca;ka.displayName="ContentPageLayout",function(e){e.NONE="none",e.ATOM="atom",e.DEFAULT="default",e.ELEMENT="element",e.COMPONENT="component",e.MODULE="module",e.FEATURE="feature"}(Ca||(Ca={}));const Ea=({className:a,children:t,size:i=Ca.DEFAULT})=>{const r=m("grid","auto-rows-min","grid-cols-1","gap-x-4",{"gap-y-0 mb-0":"none"===i},{"gap-y-2 mb-2":"atom"===i},{"gap-y-4 mb-4":"default"===i},{"gap-y-8 mb-8":"element"===i},{"gap-y-16 mb-16":"module"===i},{"gap-y-24 mb-24":"component"===i},{"gap-y-40 mb-40":"feature"===i},a);return e("div",{"data-testid":"ContentRowsLayout",className:r,children:t})};Ea.displayName="ContentRowsLayout";const Aa=c({brand:void 0,header:void 0,footer:void 0}),Ra=({children:a,value:t})=>e(Aa.Provider,{value:t,children:a}),Sa=({testID:t,className:i,logoAspectRatio:r="aspect-[16/9]"})=>{var n,l,o,s,c,u,h,p,f,v,g,b,y;const N=d(Aa);return a("footer",{className:m("w-full md:max-w-screen-lg lg:max-w-screen-xl m-auto pt-16 pb-8",i),children:[a("div",{"data-testid":t||'"Footer"',className:"footer flex flex-col md:flex-row py-8 gap-8",children:[a("div",{className:"relative w-full md:w-1/3 flex flex-col gap-4 items-center md:items-start",children:[(null===(n=null==N?void 0:N.brand)||void 0===n?void 0:n.logo)&&e("div",{className:"relative w-24",children:e(Oe,{logo:null===(l=null==N?void 0:N.brand)||void 0===l?void 0:l.logo,aspectRatioClass:r})}),(null===(o=N.footer)||void 0===o?void 0:o.about)&&e("div",{children:e(be,{children:N.footer.about})}),e("div",{children:e(ya,{facebook:null===(c=null===(s=N.footer)||void 0===s?void 0:s.visitUs)||void 0===c?void 0:c.facebook,twitter:null===(h=null===(u=N.footer)||void 0===u?void 0:u.visitUs)||void 0===h?void 0:h.twitter,instagram:null===(f=null===(p=N.footer)||void 0===p?void 0:p.visitUs)||void 0===f?void 0:f.instagram,linkedin:null===(g=null===(v=N.footer)||void 0===v?void 0:v.visitUs)||void 0===g?void 0:g.linkedin})})]}),(null===(b=N.footer)||void 0===b?void 0:b.menus)&&e("div",{className:"flex gap-4 flex-1 flex-col md:flex-row items-center md:items-start",children:N.footer.menus.map(((a,t)=>e("div",{className:"flex flex-1",children:e(Na,{title:a.title,links:a.links,inline:!1})},`${a.title}--${t}`)))})]}),a("div",{className:"flex items-center justify-center flex-col",children:[a(be,{align:he.CENTER,as:ge.SMALL,children:["© ",(new Date).getFullYear()," ",De.UI.COPYRIGHT," ",null===(y=N.brand)||void 0===y?void 0:y.name]}),e(be,{align:he.CENTER,as:ge.SMALL,children:De.UI.ALL_RIGHTS_RESERVED})]})]})};Sa.displayName="Footer";const La=({testID:t,menuLinks:i,profileLinks:r,loginCallback:n,logoutCallback:l,isAuthenticated:s=!1,hideMenu:c=!1,logoAspectRatio:u="aspect-[16/9]",className:h})=>{var p,f,v,g;const b=d(Aa),[y,N]=o("hidden"),[x,w]=o(!1),k=()=>{N("hidden"===y?"block":"hidden")};return a("header",{"data-testid":t||'"Header"',className:m("w-full md:max-w-screen-lg lg:max-w-screen-xl m-auto py-4 px-4 md:px-2 lg:px-0",h),children:[a("div",{className:"relative w-full flex",children:[(null===(p=null==b?void 0:b.brand)||void 0===p?void 0:p.logo)&&e("div",{className:"relative w-32",children:e(me,{href:"/",children:e(Oe,{logo:null===(f=null==b?void 0:b.brand)||void 0===f?void 0:f.logo,aspectRatioClass:u})})}),e("div",{className:"flex-1 hidden md:flex items-center justify-center",children:e(Na,{links:i,separators:!0})}),a("div",{className:"hidden md:flex flex-col justify-center",children:[!s&&e(oe,{onClick:n,children:De.UI.LOGIN}),s&&a("div",{className:"relative",children:[e(oe,{onClick:()=>w(!x),icon:x?"mdi:user-outline":"mdi:user"}),e("div",{onClick:()=>w(!1),className:m("absolute bg-bodyBackground dark:bg-darkBodyBackground shadow rounded py-2 px-4 right-0 top-12 w-24 z-20",{hidden:!x}),children:e(Na,{links:r,inline:!1})})]})]}),e("div",{className:"flex md:hidden flex-col justify-center flex-1 items-end",children:e(oe,{variant:ie.PRIMARY,icon:"mdi:menu",onClick:k})})]}),a("div",{className:m("navbar-menu relative z-50",y,{hidden:c}),children:[e("div",{className:"navbar-backdrop fixed inset-0 bg-black opacity-25"}),a("nav",{className:"fixed top-0 left-0 bottom-0 flex flex-col w-5/6 max-w-sm py-4 px-4 bg-bodyBackground dark:bg-darkBodyBackground border-r overflow-y-auto",children:[a("div",{className:"flex justify-between",children:[e("div",{className:"relative w-32",children:(null===(v=null==b?void 0:b.brand)||void 0===v?void 0:v.logo)&&e("div",{className:"relative w-32",children:e(Oe,{logo:null===(g=null==b?void 0:b.brand)||void 0===g?void 0:g.logo,aspectRatioClass:"aspect-[16/9]"})})}),e("div",{children:e(oe,{variant:ie.PRIMARY,icon:"mdi:close",onClick:k})})]}),a("div",{className:"flex flex-col flex-1 gap-4",children:[s&&e("div",{className:"md:hidden flex justify-center",children:e(be,{children:"User profile avatar and details here."})}),e("div",{className:"flex flex-1 justify-center pt-4",children:e(Na,{links:i,inline:!1})}),s&&e("div",{className:"md:hidden flex justify-center",children:e(oe,{onClick:l,children:De.UI.LOGOUT})}),!s&&e("div",{className:"md:hidden flex justify-center",children:e(oe,{onClick:()=>{n(),k()},children:De.UI.LOGIN})})]})]})]})]})};La.displayName="Header";const Oa=({testID:a,inputCallback:t,seperator:r,numInputs:n=4,shouldAutoFocus:l=!1,size:c="medium"})=>{const[d,u]=o("");i.useEffect((()=>{d&&4===d.length&&void 0!==t&&"function"==typeof t&&t(d)}),[d]);const h=s((()=>{switch(c){case"small":return{width:"2.5rem",height:"3rem"};case"medium":return{width:"3.5rem",height:"4rem"};case"large":return{width:"4.5rem",height:"5rem"};default:return{width:"2.5rem",height:"2.5rem"}}}),[c]);return e("div",{"data-testid":a||'"OTPInput"',className:"foo-bar",children:e(B,{value:d,onChange:u,inputType:"number",numInputs:n,shouldAutoFocus:l,renderSeparator:r?()=>e("div",{className:"flex items-center justify-center",children:e(ne,{name:"mdi:dot",className:"opacity-50"})}):e("div",{className:"flex items-center justify-center w-4"}),renderInput:a=>e("input",Object.assign({},a,{className:m("remove-arrow form-item text-input w-12")})),inputStyle:{width:h.width,height:h.height}})})};var Ia,Ma;function Ta({className:t,label:i,onChange:r,options:n}){return a("div",{className:m("m-0 p-0 mb-2 border-none",t),children:[e(Ae,{className:"text-sm",transform:pe.UPPERCASE,children:i}),e(Ye,{id:i||"Sorting",options:n,onChange:e=>r(e.target.value)})]})}function Pa(a){var{className:t,current:i,resultsPerPage:r=10,onChange:n,totalPages:l}=a,o=se(a,["className","current","resultsPerPage","onChange","totalPages"]);return e(J,Object.assign({current:i,onChange:n,simple:!0,pageSize:r,total:l*r,className:m("m-0 p-0 list-none text-bodyText flex gap-2 text-center items-center [&>li>span]:px-2",t),locale:Q,prevIcon:e("div",{className:"text-bodyText",children:e(ne,{name:"mdi:chevron-left"})}),nextIcon:e("div",{className:"text-bodyText",children:e(ne,{name:"mdi:chevron-right"})})},o))}function Fa({className:i,onChange:r,options:n,label:l}){return n?a("div",{className:m("m-0 p-0 border-none flex items-center justify-end",i),children:[e(Ae,{className:"text-sm mr-2",transform:pe.UPPERCASE,children:De.UI.SHOW}),e(Ye,{id:l||"ResultsPerPage",options:n.map((e=>({label:e.toString(),value:e}))),onChange:e=>r(e.target.value),className:"min-w-20"})]}):e(t,{})}function Da(i){var{className:r,end:n,searchTerm:l,start:o,totalResults:s}=i,c=se(i,["className","end","searchTerm","start","totalResults"]);return a("div",Object.assign({className:m("m-0 p-0",r)},c,{children:["Showing"," ",a("strong",{children:[o," - ",n]})," ","out of ",e("strong",{children:s}),l&&a(t,{children:[" ","for: ",e("em",{children:l})]})]}))}function _a({className:t,onChange:i,onSubmit:r,wasSearched:n,placeholder:l}){const o=d(z);return e("div",{className:m("m-0 px-48",t),children:a("form",{onSubmit:e=>r(e),className:"flex items-center",children:[e("div",{className:"flex-1 bg-bodyBackground dark:bg-darkBodyBackground bg-opacity-80",children:e(Fe,{name:"SearchBoxInput",type:Pe.TEXT,placeholder:l||"Search now...",onChange:e=>{var a;i(null===(a=null==e?void 0:e.target)||void 0===a?void 0:a.value)}})}),e("div",{className:"pl-4",children:a("div",{className:"flex flex-row gap-2",children:[n&&e(oe,{type:te.BUTTON,onClick:()=>o.driver.reset(),variant:ie.SECONDARY,children:"Reset"}),e(oe,{type:te.SUBMIT,variant:ie.PRIMARY,children:"Search"})]})})]})})}function ja({className:t,children:i,header:r,bodyContent:n,bodyFooter:l,bodyHeader:o,sideContent:s}){const c=m("hidden md:block fixed md:relative w-full h-full left-0 md:left-auto top-0 md:top-auto px-2 pb-4 md:pt-6 md:px-6 md:pb-auto md:pl-0",{"hidden md:hidden":!s});return a("div",{className:m("w-full flex flex-col",t),children:[e("div",{className:"m-auto md:py-0 w-full",children:r}),a("div",{className:m("md:grid m-auto md:py-0 w-full",{"md:grid-cols-searchLayout":!s,"md:grid-cols-searchayoutWithidebar":s}),children:[e("div",{className:c,children:s}),a("div",{className:m("p-0 pt-2 md:p-6 md:pr-0",{"md:pl-0":!s}),children:[e("div",{className:"flex items-center justify-between",children:o}),e("div",{className:"relative",children:i||n}),e("div",{className:"flex items-center justify-around",children:l})]})]})]})}function Ba(a){var{children:t,className:i,gridClasses:r}=a,n=se(a,["children","className","gridClasses"]);const l=r||"grid-cols-1 md:grid-cols-2 lg:grid-cols-3";return e("ul",Object.assign({className:m("relative grid gap-4 mb-4",l,i)},n,{children:t}))}function Ua(e){return null==e?"":Object.prototype.hasOwnProperty.call(e,"name")?e.name:String(e)}function za(e,a){if(e)return e[a]}function qa(e){const a=za(e,"snippet")||(t=function(e){return za(e,"raw")}(e),t?String(t).replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<").replace(/>/g,">"):"");var t;return Array.isArray(a)?a.join(", "):a}function Ha({className:a,result:t,as:i,cardMap:r={idField:{fieldName:"uuid"},titleField:{fieldName:"title"},descriptionField:{fieldName:"description"},imageField:{fieldName:"image"}}}){const{idField:n,titleField:l,imageField:o,videoField:s,descriptionField:c,metaDataFields:d,cardProps:u}=r,h=n&&qa(t[n.fieldName]),p=l&&qa(t[l.fieldName]),f=o&&qa(t[o.fieldName]),v=s&&s.formatter?s.formatter(qa(t[s.fieldName])):s&&qa(t[s.fieldName]),g=c&&qa(t[c.fieldName]),b=d&&d.map((e=>{const a=qa(t[e.fieldName]);if(e.formatter&&"function"==typeof e.formatter)return e.formatter(a)}));return e("li",{className:m("relative",a),children:(()=>{const a={id:h,title:p,image:{src:f||"",alt:p||"",title:p||"",width:500,height:500},video:v,description:g,metaData:b,actions:r.actionsData,onClick:r.onClickLink};switch(i){case Ma.cardMedia:return e(na,Object.assign({variant:Ia.MEDIA,data:a},u));case Ma.cardVideo:return e(na,Object.assign({variant:Ia.VIDEO,data:a},u,{isMuted:!1}));default:return e(na,Object.assign({variant:Ia.BASIC,data:a},u))}})()})}function Ga({showOptions:t,sortOptions:r,resultAs:n=Ma.cardBasic,ResultFieldMap:l,config:o={filters:[],facets:{},searchFields:{},resultsFields:{},alwaysSearchOnInitialLoad:!0,initialPlaceholder:"Search..."},facetDisplay:c=[],noSidebar:d=!1,customConnector:m,showPagingInfo:u,gridClasses:h,initialState:p={},showTextSearch:f=!0}){const v=s((()=>{const e={host:process.env.REACT_APP_ELASTICSEARCH_HOST||"http://localhost:9200",index:process.env.REACT_APP_ELASTICSEARCH_INDEX||"",apiKey:process.env.REACT_APP_ELASTICSEARCH_API_KEY};return new U(m||e)}),[]),g=s((()=>({debug:"development"===process.env.NODE_ENV,alwaysSearchOnInitialLoad:o.alwaysSearchOnInitialLoad,apiConnector:v,hasA11yNotifications:!0,searchQuery:{filters:o.filters||[],search_fields:o.searchFields||{},result_fields:o.resultsFields||{},facets:o.facets},autocompleteQuery:{results:{search_fields:{title:{},description:{}},resultsPerPage:5,result_fields:{title:{snippet:{size:100,fallback:!0}}}}},initialState:Object.assign({resultsPerPage:(null==t?void 0:t[0])||8},p)})),[o]);return e(q,{config:g,children:e(H,{mapContextToProps:({wasSearched:e})=>({wasSearched:e}),children:({wasSearched:s})=>e("div",{className:"App",children:e(G,{children:e(ja,{header:f&&e(W,{view:a=>e(_a,Object.assign({},a,{wasSearched:s,placeholder:o.initialPlaceholder}))}),sideContent:!d&&c&&a("div",{children:[s&&e(Y,{label:"Sort by",sortOptions:r,view:Ta}),null==c?void 0:c.map((({field:a,label:t,view:i})=>e($,{field:a,label:t,view:i},a)))]}),bodyContent:e(V,{shouldTrackClickThrough:!1,resultView:a=>e(Ha,Object.assign({},a,{as:n,cardMap:l})),className:"list-none p-0 m-0",view:a=>e(Ba,Object.assign({},a,{gridClasses:h}))}),bodyHeader:a(i.Fragment,{children:[s&&u&&e(X,{view:Da}),s&&t&&e(K,{view:Fa,options:t})]}),bodyFooter:e(Z,{view:Pa}),noSidebar:d})})})})})}function Wa({className:t,label:i,onChange:r,options:n}){const l=n.map((e=>({value:e.value,label:`${e.value} (${e.count})`})));return a("fieldset",{className:m("m-0 p-0 mt-4 mb-2 border-none",t),children:[e(Ae,{className:"text-sm",transform:pe.UPPERCASE,children:i}),e(Ye,{id:i,options:l,onChange:e=>r(e.target.value)})]})}function Ya({className:t,label:i,onRemove:r,onSelect:n,options:l}){const o=l.filter((e=>e.selected)).map((e=>e.value))[0];return e("fieldset",{className:m("m-0 p-0 mt-4 mb-2 border-none",t),children:a("div",{children:[e(Ae,{className:"text-sm",transform:pe.UPPERCASE,children:i}),a("ul",{className:"ul list-none p-0",children:[o&&a("li",{className:"m-0 flex justify-between items-center flex-1",children:[Ua(o),e("span",{className:"ml-1 px-1",children:e(oe,{onClick:()=>r(o),children:e(ne,{name:"mdi:close"})})})]}),!o&&l.map((t=>{const r=Ua(t.value);return a("li",{className:"m-0 flex justify-between",children:[e("a",{className:"no-underline text-sm visited:text-bodyText","data-transaction-name":`facet - ${i}`,href:"/",onClick:e=>{e.preventDefault(),n(t.value)},children:e("label",{className:"label pl-0 leading-none text-sm",children:r})}),e(be,{as:ge.SPAN,size:ve.SMALL,children:t.count.toLocaleString("en")})]},r)}))]})]})})}function $a({className:i,label:r,onMoreClick:n,onRemove:l,onSelect:o,options:s,showMore:c,showSearch:d,onSearch:u,searchPlaceholder:h}){return s?a("fieldset",{className:m("m-0 p-0 mt-4 mb-2 border-none",i),children:[e(Ae,{className:"text-sm",transform:pe.UPPERCASE,children:r}),d&&e("div",{className:"mt-1",children:e(Fe,{type:Pe.SEARCH,placeholder:h||"Search",onChange:e=>{u(e.target.value)}})}),a("div",{className:"my-4",children:[(null==s?void 0:s.length)<1&&e("div",{children:"No matching options"}),null==s?void 0:s.map((t=>{const i=t.selected,n=t.value,s=Ua(n);return a("div",{className:"flex justify-between pb-2",children:[e(de,{id:`facet_${r}${s}`,"data-transaction-name":`facet - ${r}`,checked:i,onChange:()=>i?l(n):o(n),label:s}),e(be,{as:ge.SPAN,size:ve.SMALL,children:t.count.toLocaleString("en")})]},s)}))]}),c&&e(oe,{size:re.SMALL,variant:ie.TERTIARY,onClick:n,"aria-label":"Show more options",children:"+ More"})]}):e(t,{children:"Options required"})}Oa.displayName="OTPInput",function(e){e.BASIC="basic",e.MEDIA="media",e.VIDEO="video",e.ICON="icon",e.HORZ="horz",e.DATA="data"}(Ia||(Ia={})),function(e){e.cardBasic="cardBasic",e.cardMedia="cardMedia",e.cardVideo="cardVideo"}(Ma||(Ma={})),Ta.displayName="Sorting",Pa.displayName="Paging",Fa.displayName="ResultsPerPage",Da.displayName="PagingInfo",_a.displayName="SearchBox",ja.displayName="Layout",Ba.displayName="Results",Ha.displayName="Result",Wa.displayName="SingleSelectFacet",Ya.displayName="SingleLinksFacet",$a.displayName="MultiCheckboxFacet";const Va=({handleSubmit:a})=>e("div",{"data-testid":"ResetPasswordForm",className:"form-wrapper",children:e(Ge,{onSubmit:a,submit:De.FORMS.RESET_PASSWORD_FORM.SUBMIT,disabledSubmitWithReturn:!0,children:e($e,{name:"password",type:We.PASSWORD,label:De.FORMS.RESET_PASSWORD_FORM.PASSWORD,required:!0,validations:He})})});Va.displayName="ResetPasswordForm";const Xa=({testID:t,initialValues:i,handleSubmit:r})=>e("div",{"data-testid":t||'"ProfileForm"',className:"form-wrapper",children:a(Ge,{onSubmit:r,submit:De.FORMS.PROFILE_FORM.SUBMIT,disabledSubmitWithReturn:!0,initialValues:i,children:[e("div",{className:"mb-4",children:e(_e,{name:"avatar",initValue:null==i?void 0:i.avatar})}),e($e,{name:"firstName",type:We.TEXT,label:De.FORMS.PROFILE_FORM.FIRST_NAME,required:!0}),e($e,{name:"lastName",type:We.TEXT,label:De.FORMS.PROFILE_FORM.LAST_NAME,required:!0}),e($e,{name:"email",type:We.EMAIL,label:De.FORMS.PROFILE_FORM.EMAIL,required:!0,validations:qe})]})});Xa.displayName="ProfileForm";const Ka={isDarkTheme:!1,toggleTheme:()=>console.log("toggleTheme")},Za=i.createContext(Ka),Ja=({children:a,theme:t})=>e(Za.Provider,{value:t,children:a}),Qa={colors:{white:"#FFF",black:"#000",primary:"#222",secondary:"#666",tertiary:"#EEE",accent:"#1FB2A6",neutral:"#191D24",info:"#3ABFF8",success:"#36D399",warning:"#FBBD23",error:"#F87272",opacityDark10:"rgba(0, 0, 0, 0.1)",opacityDark20:"rgba(0, 0, 0, 0.2)",opacityDark30:"rgba(0, 0, 0, 0.3)",opacityDark40:"rgba(0, 0, 0, 0.4)",opacityDark50:"rgba(0, 0, 0, 0.5)",opacityDark60:"rgba(0, 0, 0, 0.6)",opacityDark70:"rgba(0, 0, 0, 0.7)",opacityDark80:"rgba(0, 0, 0, 0.8)",opacityDark90:"rgba(0, 0, 0, 0.9)",opacityLight10:"rgba(255, 255, 255, 0.1)",opacityLight20:"rgba(255, 255, 255, 0.2)",opacityLight30:"rgba(255, 255, 255, 0.3)",opacityLight40:"rgba(255, 255, 255, 0.4)",opacityLight50:"rgba(255, 255, 255, 0.5)",opacityLight60:"rgba(255, 255, 255, 0.6)",opacityLight70:"rgba(255, 255, 255, 0.7)",opacityLight80:"rgba(255, 255, 255, 0.8)",opacityLight90:"rgba(255, 255, 255, 0.9)",primary50:"#F2F2F2",primary100:"#E6E6E6",primary200:"#CCCCCC",primary300:"#B3B3B3",primary400:"#999999",primary500:"#808080",primary600:"#666666",primary700:"#4D4D4D",primary800:"#333333",primary900:"#1A1A1A",secondary50:"#FDFDFD",secondary100:"#FBFBFB",secondary200:"#F8F8F8",secondary300:"#F5F5F5",secondary400:"#F2F2F2",secondary500:"#EFEFEF",secondary600:"#ECECEC",secondary700:"#E9E9E9",secondary800:"#E6E6E6",secondary900:"#E3E3E3",tertiary50:"#F8F8F8",tertiary100:"#F1F1F1",tertiary200:"#EAEAEA",tertiary300:"#E3E3E3",tertiary400:"#DCDCDC",tertiary500:"#D5D5D5",tertiary600:"#CECECE",tertiary700:"#C7C7C7",tertiary800:"#C0C0C0",tertiary900:"#B9B9B9",accent50:"#E5F8F6",accent100:"#CCEFF0",accent200:"#B2E6E6",accent300:"#99DDDD",accent400:"#7FD4D4",accent500:"#66CBCB",accent600:"#4DB2B2",accent700:"#339999",accent800:"#1A8080",accent900:"#006666",neutral50:"#F8F8F8",neutral100:"#F1F1F1",neutral200:"#EAEAEA",neutral300:"#E3E3E3",neutral400:"#DCDCDC",neutral500:"#D5D5D5",neutral600:"#CECECE",neutral700:"#C7C7C7",neutral800:"#C0C0C0",neutral900:"#B9B9B9",info50:"#E6F9FD",info100:"#CFF3FB",info200:"#B8EDF8",info300:"#A1E7F6",info400:"#8AE1F3",info500:"#73DBF1",info600:"#5CC5DA",info700:"#469EB3",info800:"#2F788C",info900:"#195165",success50:"#E6FDEE",success100:"#CFFBDD",success200:"#B8F8CC",success300:"#A1F6BB",success400:"#8AEDAA",success500:"#73E499",success600:"#5CC482",success700:"#469E6C",success800:"#2F784F",success900:"#195133",warning50:"#FEF9E6",warning100:"#FDF3CD",warning200:"#FCECB4",warning300:"#FBDF8B",warning400:"#FAD262",warning500:"#F9C639",warning600:"#E0AD32",warning700:"#B78C27",warning800:"#8E6B1D",warning900:"#654A13",error50:"#FCE6E6",error100:"#F9CDCD",error200:"#F6B4B4",error300:"#F29999",error400:"#EF8080",error500:"#EC6666",error600:"#D95252",error700:"#B34040",error800:"#8E2E2E",error900:"#6B1B1B",grey50:"#F8F8F8",grey100:"#F1F1F1",grey200:"#EAEAEA",grey300:"#E3E3E3",grey400:"#DCDCDC",grey500:"#C0C0C0",grey600:"#A9A9A9",grey700:"#8C8C8C",grey800:"#666666",grey900:"#404040",purple50:"#ede9f4",purple100:"#c8b9de",purple200:"#ae98ce",purple300:"#8968b7",purple400:"#724ba9",purple500:"#4f1e94",purple600:"#481b87",purple700:"#381569",purple800:"#2b1151",purple900:"#210d3e"},screens:{sm:"480px",md:"768px",lg:"976px",xl:"1440px"},spacing:{px:"1px",0:"0",1:"0.25rem",2:"0.5rem",3:"0.75rem",4:"1rem",5:"1.25rem",6:"1.5rem",8:"2rem",10:"2.5rem",11:"2.75rem",12:"3rem",16:"4rem",20:"5rem",24:"6rem",32:"8rem",40:"10rem",48:"12rem",56:"14rem",64:"16rem",128:"32rem"},borderRadius:{none:"0",sm:"0.125rem",DEFAULT:"0.25rem",md:"0.375rem",lg:"0.5rem",xl:"0.75rem","2xl":"1rem","3xl":"1.5rem",full:"9999px"},fontSize:{xs:["0.75rem",{lineHeight:"1rem"}],sm:["0.875rem",{lineHeight:"1.25rem"}],base:["1rem",{lineHeight:"1.5rem"}],lg:["1.125rem",{lineHeight:"1.75rem"}],xl:["1.25rem",{lineHeight:"1.75rem"}],"2xl":["1.5rem",{lineHeight:"2rem"}],"3xl":["1.875rem",{lineHeight:"2.25rem"}],"4xl":["2.25rem",{lineHeight:"2.5rem"}],"5xl":["3rem",{lineHeight:"3.25rem"}],"6xl":["3.75rem",{lineHeight:"4rem"}],"7xl":["4.5rem",{lineHeight:"5rem"}],"8xl":["6rem",{lineHeight:"7rem"}],"9xl":["8rem",{lineHeight:"9rem"}]},fontWeight:{thin:"100",extralight:"200",light:"300",normal:"400",medium:"500",semibold:"600",bold:"700",extrabold:"800",black:"900"},extend:{gridTemplateColumns:{headerMd:"200px auto 200px",headerSd:"125px auto 125px",headerXs:"auto 175px",searchLayout:"1fr",searchLayoutWithSidebar:"1fr 3fr"}}};function et(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var at={exports:{}},tt={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},it={exports:{}},rt=function(e){return!(!e||"string"==typeof e)&&(e instanceof Array||Array.isArray(e)||e.length>=0&&(e.splice instanceof Function||Object.getOwnPropertyDescriptor(e,e.length-1)&&"String"!==e.constructor.name))},nt=Array.prototype.concat,lt=Array.prototype.slice,ot=it.exports=function(e){for(var a=[],t=0,i=e.length;t<i;t++){var r=e[t];rt(r)?a=nt.call(a,lt.call(r)):a.push(r)}return a};ot.wrap=function(e){return function(){return e(ot(arguments))}};var st=it.exports,ct=tt,dt=st,mt=Object.hasOwnProperty,ut=Object.create(null);for(var ht in ct)mt.call(ct,ht)&&(ut[ct[ht]]=ht);var pt=at.exports={to:{},get:{}};function ft(e,a,t){return Math.min(Math.max(a,e),t)}function vt(e){var a=Math.round(e).toString(16).toUpperCase();return a.length<2?"0"+a:a}pt.get=function(e){var a,t;switch(e.substring(0,3).toLowerCase()){case"hsl":a=pt.get.hsl(e),t="hsl";break;case"hwb":a=pt.get.hwb(e),t="hwb";break;default:a=pt.get.rgb(e),t="rgb"}return a?{model:t,value:a}:null},pt.get.rgb=function(e){if(!e)return null;var a,t,i,r=[0,0,0,1];if(a=e.match(/^#([a-f0-9]{6})([a-f0-9]{2})?$/i)){for(i=a[2],a=a[1],t=0;t<3;t++){var n=2*t;r[t]=parseInt(a.slice(n,n+2),16)}i&&(r[3]=parseInt(i,16)/255)}else if(a=e.match(/^#([a-f0-9]{3,4})$/i)){for(i=(a=a[1])[3],t=0;t<3;t++)r[t]=parseInt(a[t]+a[t],16);i&&(r[3]=parseInt(i+i,16)/255)}else if(a=e.match(/^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/)){for(t=0;t<3;t++)r[t]=parseInt(a[t+1],0);a[4]&&(a[5]?r[3]=.01*parseFloat(a[4]):r[3]=parseFloat(a[4]))}else{if(!(a=e.match(/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/)))return(a=e.match(/^(\w+)$/))?"transparent"===a[1]?[0,0,0,0]:mt.call(ct,a[1])?((r=ct[a[1]])[3]=1,r):null:null;for(t=0;t<3;t++)r[t]=Math.round(2.55*parseFloat(a[t+1]));a[4]&&(a[5]?r[3]=.01*parseFloat(a[4]):r[3]=parseFloat(a[4]))}for(t=0;t<3;t++)r[t]=ft(r[t],0,255);return r[3]=ft(r[3],0,1),r},pt.get.hsl=function(e){if(!e)return null;var a=e.match(/^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d\.]+)%\s*,?\s*([+-]?[\d\.]+)%\s*(?:[,|\/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/);if(a){var t=parseFloat(a[4]);return[(parseFloat(a[1])%360+360)%360,ft(parseFloat(a[2]),0,100),ft(parseFloat(a[3]),0,100),ft(isNaN(t)?1:t,0,1)]}return null},pt.get.hwb=function(e){if(!e)return null;var a=e.match(/^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/);if(a){var t=parseFloat(a[4]);return[(parseFloat(a[1])%360+360)%360,ft(parseFloat(a[2]),0,100),ft(parseFloat(a[3]),0,100),ft(isNaN(t)?1:t,0,1)]}return null},pt.to.hex=function(){var e=dt(arguments);return"#"+vt(e[0])+vt(e[1])+vt(e[2])+(e[3]<1?vt(Math.round(255*e[3])):"")},pt.to.rgb=function(){var e=dt(arguments);return e.length<4||1===e[3]?"rgb("+Math.round(e[0])+", "+Math.round(e[1])+", "+Math.round(e[2])+")":"rgba("+Math.round(e[0])+", "+Math.round(e[1])+", "+Math.round(e[2])+", "+e[3]+")"},pt.to.rgb.percent=function(){var e=dt(arguments),a=Math.round(e[0]/255*100),t=Math.round(e[1]/255*100),i=Math.round(e[2]/255*100);return e.length<4||1===e[3]?"rgb("+a+"%, "+t+"%, "+i+"%)":"rgba("+a+"%, "+t+"%, "+i+"%, "+e[3]+")"},pt.to.hsl=function(){var e=dt(arguments);return e.length<4||1===e[3]?"hsl("+e[0]+", "+e[1]+"%, "+e[2]+"%)":"hsla("+e[0]+", "+e[1]+"%, "+e[2]+"%, "+e[3]+")"},pt.to.hwb=function(){var e=dt(arguments),a="";return e.length>=4&&1!==e[3]&&(a=", "+e[3]),"hwb("+e[0]+", "+e[1]+"%, "+e[2]+"%"+a+")"},pt.to.keyword=function(e){return ut[e.slice(0,3)]};var gt=at.exports;const bt=tt,yt={};for(const e of Object.keys(bt))yt[bt[e]]=e;const Nt={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};var xt=Nt;for(const e of Object.keys(Nt)){if(!("channels"in Nt[e]))throw new Error("missing channels property: "+e);if(!("labels"in Nt[e]))throw new Error("missing channel labels property: "+e);if(Nt[e].labels.length!==Nt[e].channels)throw new Error("channel and label counts mismatch: "+e);const{channels:a,labels:t}=Nt[e];delete Nt[e].channels,delete Nt[e].labels,Object.defineProperty(Nt[e],"channels",{value:a}),Object.defineProperty(Nt[e],"labels",{value:t})}Nt.rgb.hsl=function(e){const a=e[0]/255,t=e[1]/255,i=e[2]/255,r=Math.min(a,t,i),n=Math.max(a,t,i),l=n-r;let o,s;n===r?o=0:a===n?o=(t-i)/l:t===n?o=2+(i-a)/l:i===n&&(o=4+(a-t)/l),o=Math.min(60*o,360),o<0&&(o+=360);const c=(r+n)/2;return s=n===r?0:c<=.5?l/(n+r):l/(2-n-r),[o,100*s,100*c]},Nt.rgb.hsv=function(e){let a,t,i,r,n;const l=e[0]/255,o=e[1]/255,s=e[2]/255,c=Math.max(l,o,s),d=c-Math.min(l,o,s),m=function(e){return(c-e)/6/d+.5};return 0===d?(r=0,n=0):(n=d/c,a=m(l),t=m(o),i=m(s),l===c?r=i-t:o===c?r=1/3+a-i:s===c&&(r=2/3+t-a),r<0?r+=1:r>1&&(r-=1)),[360*r,100*n,100*c]},Nt.rgb.hwb=function(e){const a=e[0],t=e[1];let i=e[2];const r=Nt.rgb.hsl(e)[0],n=1/255*Math.min(a,Math.min(t,i));return i=1-1/255*Math.max(a,Math.max(t,i)),[r,100*n,100*i]},Nt.rgb.cmyk=function(e){const a=e[0]/255,t=e[1]/255,i=e[2]/255,r=Math.min(1-a,1-t,1-i);return[100*((1-a-r)/(1-r)||0),100*((1-t-r)/(1-r)||0),100*((1-i-r)/(1-r)||0),100*r]},Nt.rgb.keyword=function(e){const a=yt[e];if(a)return a;let t,i=1/0;for(const a of Object.keys(bt)){const l=(n=bt[a],((r=e)[0]-n[0])**2+(r[1]-n[1])**2+(r[2]-n[2])**2);l<i&&(i=l,t=a)}var r,n;return t},Nt.keyword.rgb=function(e){return bt[e]},Nt.rgb.xyz=function(e){let a=e[0]/255,t=e[1]/255,i=e[2]/255;a=a>.04045?((a+.055)/1.055)**2.4:a/12.92,t=t>.04045?((t+.055)/1.055)**2.4:t/12.92,i=i>.04045?((i+.055)/1.055)**2.4:i/12.92;return[100*(.4124*a+.3576*t+.1805*i),100*(.2126*a+.7152*t+.0722*i),100*(.0193*a+.1192*t+.9505*i)]},Nt.rgb.lab=function(e){const a=Nt.rgb.xyz(e);let t=a[0],i=a[1],r=a[2];t/=95.047,i/=100,r/=108.883,t=t>.008856?t**(1/3):7.787*t+16/116,i=i>.008856?i**(1/3):7.787*i+16/116,r=r>.008856?r**(1/3):7.787*r+16/116;return[116*i-16,500*(t-i),200*(i-r)]},Nt.hsl.rgb=function(e){const a=e[0]/360,t=e[1]/100,i=e[2]/100;let r,n,l;if(0===t)return l=255*i,[l,l,l];r=i<.5?i*(1+t):i+t-i*t;const o=2*i-r,s=[0,0,0];for(let e=0;e<3;e++)n=a+1/3*-(e-1),n<0&&n++,n>1&&n--,l=6*n<1?o+6*(r-o)*n:2*n<1?r:3*n<2?o+(r-o)*(2/3-n)*6:o,s[e]=255*l;return s},Nt.hsl.hsv=function(e){const a=e[0];let t=e[1]/100,i=e[2]/100,r=t;const n=Math.max(i,.01);i*=2,t*=i<=1?i:2-i,r*=n<=1?n:2-n;return[a,100*(0===i?2*r/(n+r):2*t/(i+t)),100*((i+t)/2)]},Nt.hsv.rgb=function(e){const a=e[0]/60,t=e[1]/100;let i=e[2]/100;const r=Math.floor(a)%6,n=a-Math.floor(a),l=255*i*(1-t),o=255*i*(1-t*n),s=255*i*(1-t*(1-n));switch(i*=255,r){case 0:return[i,s,l];case 1:return[o,i,l];case 2:return[l,i,s];case 3:return[l,o,i];case 4:return[s,l,i];case 5:return[i,l,o]}},Nt.hsv.hsl=function(e){const a=e[0],t=e[1]/100,i=e[2]/100,r=Math.max(i,.01);let n,l;l=(2-t)*i;const o=(2-t)*r;return n=t*r,n/=o<=1?o:2-o,n=n||0,l/=2,[a,100*n,100*l]},Nt.hwb.rgb=function(e){const a=e[0]/360;let t=e[1]/100,i=e[2]/100;const r=t+i;let n;r>1&&(t/=r,i/=r);const l=Math.floor(6*a),o=1-i;n=6*a-l,1&l&&(n=1-n);const s=t+n*(o-t);let c,d,m;switch(l){default:case 6:case 0:c=o,d=s,m=t;break;case 1:c=s,d=o,m=t;break;case 2:c=t,d=o,m=s;break;case 3:c=t,d=s,m=o;break;case 4:c=s,d=t,m=o;break;case 5:c=o,d=t,m=s}return[255*c,255*d,255*m]},Nt.cmyk.rgb=function(e){const a=e[0]/100,t=e[1]/100,i=e[2]/100,r=e[3]/100;return[255*(1-Math.min(1,a*(1-r)+r)),255*(1-Math.min(1,t*(1-r)+r)),255*(1-Math.min(1,i*(1-r)+r))]},Nt.xyz.rgb=function(e){const a=e[0]/100,t=e[1]/100,i=e[2]/100;let r,n,l;return r=3.2406*a+-1.5372*t+-.4986*i,n=-.9689*a+1.8758*t+.0415*i,l=.0557*a+-.204*t+1.057*i,r=r>.0031308?1.055*r**(1/2.4)-.055:12.92*r,n=n>.0031308?1.055*n**(1/2.4)-.055:12.92*n,l=l>.0031308?1.055*l**(1/2.4)-.055:12.92*l,r=Math.min(Math.max(0,r),1),n=Math.min(Math.max(0,n),1),l=Math.min(Math.max(0,l),1),[255*r,255*n,255*l]},Nt.xyz.lab=function(e){let a=e[0],t=e[1],i=e[2];a/=95.047,t/=100,i/=108.883,a=a>.008856?a**(1/3):7.787*a+16/116,t=t>.008856?t**(1/3):7.787*t+16/116,i=i>.008856?i**(1/3):7.787*i+16/116;return[116*t-16,500*(a-t),200*(t-i)]},Nt.lab.xyz=function(e){let a,t,i;t=(e[0]+16)/116,a=e[1]/500+t,i=t-e[2]/200;const r=t**3,n=a**3,l=i**3;return t=r>.008856?r:(t-16/116)/7.787,a=n>.008856?n:(a-16/116)/7.787,i=l>.008856?l:(i-16/116)/7.787,a*=95.047,t*=100,i*=108.883,[a,t,i]},Nt.lab.lch=function(e){const a=e[0],t=e[1],i=e[2];let r;r=360*Math.atan2(i,t)/2/Math.PI,r<0&&(r+=360);return[a,Math.sqrt(t*t+i*i),r]},Nt.lch.lab=function(e){const a=e[0],t=e[1],i=e[2]/360*2*Math.PI;return[a,t*Math.cos(i),t*Math.sin(i)]},Nt.rgb.ansi16=function(e,a=null){const[t,i,r]=e;let n=null===a?Nt.rgb.hsv(e)[2]:a;if(n=Math.round(n/50),0===n)return 30;let l=30+(Math.round(r/255)<<2|Math.round(i/255)<<1|Math.round(t/255));return 2===n&&(l+=60),l},Nt.hsv.ansi16=function(e){return Nt.rgb.ansi16(Nt.hsv.rgb(e),e[2])},Nt.rgb.ansi256=function(e){const a=e[0],t=e[1],i=e[2];if(a===t&&t===i)return a<8?16:a>248?231:Math.round((a-8)/247*24)+232;return 16+36*Math.round(a/255*5)+6*Math.round(t/255*5)+Math.round(i/255*5)},Nt.ansi16.rgb=function(e){let a=e%10;if(0===a||7===a)return e>50&&(a+=3.5),a=a/10.5*255,[a,a,a];const t=.5*(1+~~(e>50));return[(1&a)*t*255,(a>>1&1)*t*255,(a>>2&1)*t*255]},Nt.ansi256.rgb=function(e){if(e>=232){const a=10*(e-232)+8;return[a,a,a]}let a;e-=16;return[Math.floor(e/36)/5*255,Math.floor((a=e%36)/6)/5*255,a%6/5*255]},Nt.rgb.hex=function(e){const a=(((255&Math.round(e[0]))<<16)+((255&Math.round(e[1]))<<8)+(255&Math.round(e[2]))).toString(16).toUpperCase();return"000000".substring(a.length)+a},Nt.hex.rgb=function(e){const a=e.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!a)return[0,0,0];let t=a[0];3===a[0].length&&(t=t.split("").map((e=>e+e)).join(""));const i=parseInt(t,16);return[i>>16&255,i>>8&255,255&i]},Nt.rgb.hcg=function(e){const a=e[0]/255,t=e[1]/255,i=e[2]/255,r=Math.max(Math.max(a,t),i),n=Math.min(Math.min(a,t),i),l=r-n;let o,s;return o=l<1?n/(1-l):0,s=l<=0?0:r===a?(t-i)/l%6:r===t?2+(i-a)/l:4+(a-t)/l,s/=6,s%=1,[360*s,100*l,100*o]},Nt.hsl.hcg=function(e){const a=e[1]/100,t=e[2]/100,i=t<.5?2*a*t:2*a*(1-t);let r=0;return i<1&&(r=(t-.5*i)/(1-i)),[e[0],100*i,100*r]},Nt.hsv.hcg=function(e){const a=e[1]/100,t=e[2]/100,i=a*t;let r=0;return i<1&&(r=(t-i)/(1-i)),[e[0],100*i,100*r]},Nt.hcg.rgb=function(e){const a=e[0]/360,t=e[1]/100,i=e[2]/100;if(0===t)return[255*i,255*i,255*i];const r=[0,0,0],n=a%1*6,l=n%1,o=1-l;let s=0;switch(Math.floor(n)){case 0:r[0]=1,r[1]=l,r[2]=0;break;case 1:r[0]=o,r[1]=1,r[2]=0;break;case 2:r[0]=0,r[1]=1,r[2]=l;break;case 3:r[0]=0,r[1]=o,r[2]=1;break;case 4:r[0]=l,r[1]=0,r[2]=1;break;default:r[0]=1,r[1]=0,r[2]=o}return s=(1-t)*i,[255*(t*r[0]+s),255*(t*r[1]+s),255*(t*r[2]+s)]},Nt.hcg.hsv=function(e){const a=e[1]/100,t=a+e[2]/100*(1-a);let i=0;return t>0&&(i=a/t),[e[0],100*i,100*t]},Nt.hcg.hsl=function(e){const a=e[1]/100,t=e[2]/100*(1-a)+.5*a;let i=0;return t>0&&t<.5?i=a/(2*t):t>=.5&&t<1&&(i=a/(2*(1-t))),[e[0],100*i,100*t]},Nt.hcg.hwb=function(e){const a=e[1]/100,t=a+e[2]/100*(1-a);return[e[0],100*(t-a),100*(1-t)]},Nt.hwb.hcg=function(e){const a=e[1]/100,t=1-e[2]/100,i=t-a;let r=0;return i<1&&(r=(t-i)/(1-i)),[e[0],100*i,100*r]},Nt.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]},Nt.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]},Nt.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]},Nt.gray.hsl=function(e){return[0,0,e[0]]},Nt.gray.hsv=Nt.gray.hsl,Nt.gray.hwb=function(e){return[0,100,e[0]]},Nt.gray.cmyk=function(e){return[0,0,0,e[0]]},Nt.gray.lab=function(e){return[e[0],0,0]},Nt.gray.hex=function(e){const a=255&Math.round(e[0]/100*255),t=((a<<16)+(a<<8)+a).toString(16).toUpperCase();return"000000".substring(t.length)+t},Nt.rgb.gray=function(e){return[(e[0]+e[1]+e[2])/3/255*100]};const wt=xt;function kt(e){const a=function(){const e={},a=Object.keys(wt);for(let t=a.length,i=0;i<t;i++)e[a[i]]={distance:-1,parent:null};return e}(),t=[e];for(a[e].distance=0;t.length;){const e=t.pop(),i=Object.keys(wt[e]);for(let r=i.length,n=0;n<r;n++){const r=i[n],l=a[r];-1===l.distance&&(l.distance=a[e].distance+1,l.parent=e,t.unshift(r))}}return a}function Ct(e,a){return function(t){return a(e(t))}}function Et(e,a){const t=[a[e].parent,e];let i=wt[a[e].parent][e],r=a[e].parent;for(;a[r].parent;)t.unshift(a[r].parent),i=Ct(wt[a[r].parent][r],i),r=a[r].parent;return i.conversion=t,i}const At=xt,Rt=function(e){const a=kt(e),t={},i=Object.keys(a);for(let e=i.length,r=0;r<e;r++){const e=i[r];null!==a[e].parent&&(t[e]=Et(e,a))}return t},St={};Object.keys(At).forEach((e=>{St[e]={},Object.defineProperty(St[e],"channels",{value:At[e].channels}),Object.defineProperty(St[e],"labels",{value:At[e].labels});const a=Rt(e);Object.keys(a).forEach((t=>{const i=a[t];St[e][t]=function(e){const a=function(...a){const t=a[0];if(null==t)return t;t.length>1&&(a=t);const i=e(a);if("object"==typeof i)for(let e=i.length,a=0;a<e;a++)i[a]=Math.round(i[a]);return i};return"conversion"in e&&(a.conversion=e.conversion),a}(i),St[e][t].raw=function(e){const a=function(...a){const t=a[0];return null==t?t:(t.length>1&&(a=t),e(a))};return"conversion"in e&&(a.conversion=e.conversion),a}(i)}))}));const Lt=gt,Ot=St,It=["keyword","gray","hex"],Mt={};for(const e of Object.keys(Ot))Mt[[...Ot[e].labels].sort().join("")]=e;const Tt={};function Pt(e,a){if(!(this instanceof Pt))return new Pt(e,a);if(a&&a in It&&(a=null),a&&!(a in Ot))throw new Error("Unknown model: "+a);let t,i;if(null==e)this.model="rgb",this.color=[0,0,0],this.valpha=1;else if(e instanceof Pt)this.model=e.model,this.color=[...e.color],this.valpha=e.valpha;else if("string"==typeof e){const a=Lt.get(e);if(null===a)throw new Error("Unable to parse color from string: "+e);this.model=a.model,i=Ot[this.model].channels,this.color=a.value.slice(0,i),this.valpha="number"==typeof a.value[i]?a.value[i]:1}else if(e.length>0){this.model=a||"rgb",i=Ot[this.model].channels;const t=Array.prototype.slice.call(e,0,i);this.color=jt(t,i),this.valpha="number"==typeof e[i]?e[i]:1}else if("number"==typeof e)this.model="rgb",this.color=[e>>16&255,e>>8&255,255&e],this.valpha=1;else{this.valpha=1;const a=Object.keys(e);"alpha"in e&&(a.splice(a.indexOf("alpha"),1),this.valpha="number"==typeof e.alpha?e.alpha:0);const i=a.sort().join("");if(!(i in Mt))throw new Error("Unable to parse color from object: "+JSON.stringify(e));this.model=Mt[i];const{labels:r}=Ot[this.model],n=[];for(t=0;t<r.length;t++)n.push(e[r[t]]);this.color=jt(n)}if(Tt[this.model])for(i=Ot[this.model].channels,t=0;t<i;t++){const e=Tt[this.model][t];e&&(this.color[t]=e(this.color[t]))}this.valpha=Math.max(0,Math.min(1,this.valpha)),Object.freeze&&Object.freeze(this)}Pt.prototype={toString(){return this.string()},toJSON(){return this[this.model]()},string(e){let a=this.model in Lt.to?this:this.rgb();a=a.round("number"==typeof e?e:1);const t=1===a.valpha?a.color:[...a.color,this.valpha];return Lt.to[a.model](t)},percentString(e){const a=this.rgb().round("number"==typeof e?e:1),t=1===a.valpha?a.color:[...a.color,this.valpha];return Lt.to.rgb.percent(t)},array(){return 1===this.valpha?[...this.color]:[...this.color,this.valpha]},object(){const e={},{channels:a}=Ot[this.model],{labels:t}=Ot[this.model];for(let i=0;i<a;i++)e[t[i]]=this.color[i];return 1!==this.valpha&&(e.alpha=this.valpha),e},unitArray(){const e=this.rgb().color;return e[0]/=255,e[1]/=255,e[2]/=255,1!==this.valpha&&e.push(this.valpha),e},unitObject(){const e=this.rgb().object();return e.r/=255,e.g/=255,e.b/=255,1!==this.valpha&&(e.alpha=this.valpha),e},round(e){return e=Math.max(e||0,0),new Pt([...this.color.map(Ft(e)),this.valpha],this.model)},alpha(e){return void 0!==e?new Pt([...this.color,Math.max(0,Math.min(1,e))],this.model):this.valpha},red:Dt("rgb",0,_t(255)),green:Dt("rgb",1,_t(255)),blue:Dt("rgb",2,_t(255)),hue:Dt(["hsl","hsv","hsl","hwb","hcg"],0,(e=>(e%360+360)%360)),saturationl:Dt("hsl",1,_t(100)),lightness:Dt("hsl",2,_t(100)),saturationv:Dt("hsv",1,_t(100)),value:Dt("hsv",2,_t(100)),chroma:Dt("hcg",1,_t(100)),gray:Dt("hcg",2,_t(100)),white:Dt("hwb",1,_t(100)),wblack:Dt("hwb",2,_t(100)),cyan:Dt("cmyk",0,_t(100)),magenta:Dt("cmyk",1,_t(100)),yellow:Dt("cmyk",2,_t(100)),black:Dt("cmyk",3,_t(100)),x:Dt("xyz",0,_t(95.047)),y:Dt("xyz",1,_t(100)),z:Dt("xyz",2,_t(108.833)),l:Dt("lab",0,_t(100)),a:Dt("lab",1),b:Dt("lab",2),keyword(e){return void 0!==e?new Pt(e):Ot[this.model].keyword(this.color)},hex(e){return void 0!==e?new Pt(e):Lt.to.hex(this.rgb().round().color)},hexa(e){if(void 0!==e)return new Pt(e);const a=this.rgb().round().color;let t=Math.round(255*this.valpha).toString(16).toUpperCase();return 1===t.length&&(t="0"+t),Lt.to.hex(a)+t},rgbNumber(){const e=this.rgb().color;return(255&e[0])<<16|(255&e[1])<<8|255&e[2]},luminosity(){const e=this.rgb().color,a=[];for(const[t,i]of e.entries()){const e=i/255;a[t]=e<=.04045?e/12.92:((e+.055)/1.055)**2.4}return.2126*a[0]+.7152*a[1]+.0722*a[2]},contrast(e){const a=this.luminosity(),t=e.luminosity();return a>t?(a+.05)/(t+.05):(t+.05)/(a+.05)},level(e){const a=this.contrast(e);return a>=7?"AAA":a>=4.5?"AA":""},isDark(){const e=this.rgb().color;return(2126*e[0]+7152*e[1]+722*e[2])/1e4<128},isLight(){return!this.isDark()},negate(){const e=this.rgb();for(let a=0;a<3;a++)e.color[a]=255-e.color[a];return e},lighten(e){const a=this.hsl();return a.color[2]+=a.color[2]*e,a},darken(e){const a=this.hsl();return a.color[2]-=a.color[2]*e,a},saturate(e){const a=this.hsl();return a.color[1]+=a.color[1]*e,a},desaturate(e){const a=this.hsl();return a.color[1]-=a.color[1]*e,a},whiten(e){const a=this.hwb();return a.color[1]+=a.color[1]*e,a},blacken(e){const a=this.hwb();return a.color[2]+=a.color[2]*e,a},grayscale(){const e=this.rgb().color,a=.3*e[0]+.59*e[1]+.11*e[2];return Pt.rgb(a,a,a)},fade(e){return this.alpha(this.valpha-this.valpha*e)},opaquer(e){return this.alpha(this.valpha+this.valpha*e)},rotate(e){const a=this.hsl();let t=a.color[0];return t=(t+e)%360,t=t<0?360+t:t,a.color[0]=t,a},mix(e,a){if(!e||!e.rgb)throw new Error('Argument to "mix" was not a Color instance, but rather an instance of '+typeof e);const t=e.rgb(),i=this.rgb(),r=void 0===a?.5:a,n=2*r-1,l=t.alpha()-i.alpha(),o=((n*l==-1?n:(n+l)/(1+n*l))+1)/2,s=1-o;return Pt.rgb(o*t.red()+s*i.red(),o*t.green()+s*i.green(),o*t.blue()+s*i.blue(),t.alpha()*r+i.alpha()*(1-r))}};for(const e of Object.keys(Ot)){if(It.includes(e))continue;const{channels:a}=Ot[e];Pt.prototype[e]=function(...a){return this.model===e?new Pt(this):a.length>0?new Pt(a,e):new Pt([...(t=Ot[this.model][e].raw(this.color),Array.isArray(t)?t:[t]),this.valpha],e);var t},Pt[e]=function(...t){let i=t[0];return"number"==typeof i&&(i=jt(t,a)),new Pt(i,e)}}function Ft(e){return function(a){return function(e,a){return Number(e.toFixed(a))}(a,e)}}function Dt(e,a,t){e=Array.isArray(e)?e:[e];for(const i of e)(Tt[i]||(Tt[i]=[]))[a]=t;return e=e[0],function(i){let r;return void 0!==i?(t&&(i=t(i)),r=this[e](),r.color[a]=i,r):(r=this[e]().color[a],t&&(r=t(r)),r)}}function _t(e){return function(a){return Math.max(0,Math.min(e,a))}}function jt(e,a){for(let t=0;t<a;t++)"number"!=typeof e[t]&&(e[t]=0);return e}var Bt=et(Pt);const Ut=(e,a)=>Bt(e).darken(a).rgb().string(),zt=Object.assign({inherit:"inherit",transparent:"transparent",black:Qa.colors.black,white:Qa.colors.white,bodyBackground:Qa.colors.white,darkBodyBackground:Qa.colors.primary,bodyText:Qa.colors.primary,bodyTextInverted:Qa.colors.primary50,darkBodyText:Qa.colors.primary50,display:Qa.colors.black,darkDisplay:Qa.colors.white},Object.assign({},...Object.keys(Qa.colors).map((e=>{const a=Qa.colors[e];return{[e]:{DEFAULT:a,lighter:(t=a,i=.1,Bt(t).lighten(i).rgb().string()),darker:Ut(a,.1)}};var t,i})))),qt=Object.assign(Object.assign({},Qa),{colors:Object.assign(Object.assign({},Qa.colors),{primary:"#001e5a",secondary:"#fcb700",tertiary:"#a3b0ca",quaternary:"#0f71b1",primary50:"#e6e9ef",primary100:"#b0b9cc",primary200:"#8a98b3",primary300:"#546890",primary400:"#334b7b",primary500:"#001e5a",primary600:"#001b52",primary700:"#001540",primary800:"#001132",primary900:"#000d26",secondary50:"#fff8e6",secondary100:"#fee9b0",secondary200:"#fede8a",secondary300:"#fdcf54",secondary400:"#fdc533",secondary500:"#fcb700",secondary600:"#e5a700",secondary700:"#b38200",secondary800:"#8b6500",secondary900:"#6a4d00",tertiary50:"#f6f7fa",tertiary100:"#e2e7ef",tertiary200:"#d5dbe7",tertiary300:"#c1cadb",tertiary400:"#b5c0d5",tertiary500:"#a3b0ca",tertiary600:"#94a0b8",tertiary700:"#747d8f",tertiary800:"#5a616f",tertiary900:"#444a55",quaternary50:"#e7f1f7",quaternary100:"#b5d3e7",quaternary200:"#91bedb",quaternary300:"#5ea0cb",quaternary400:"#3f8dc1",quaternary500:"#0f71b1",quaternary600:"#0e67a1",quaternary700:"#0b507e",quaternary800:"#083e61",quaternary900:"#062f4a"}),borderRadius:Object.assign({},Qa.borderRadius),fontWeight:Object.assign(Object.assign({},Qa.fontWeight),{light:"300",normal:"400",bold:"700"})}),Ht=(e,a)=>Bt(e).darken(a).rgb().string(),Gt=Object.assign(Object.assign(Object.assign({},zt),{bodyBackground:qt.colors.primary700,darkBodyBackground:qt.colors.primary800,bodyText:"#FFF",darkBodyText:"#EEE"}),Object.assign({},...Object.keys(qt.colors).map((e=>{const a=qt.colors[e];return{[e]:{DEFAULT:a,lighter:(t=a,i=.1,Bt(t).lighten(i).rgb().string()),darker:Ht(a,.1)}};var t,i})))),Wt=Object.assign(Object.assign({},{sans:["sans-serif"],serif:["serif"],mono:["monospace"],body:["Roboto","sans-serif"],heading:["Roboto","sans-serif"],display:["monospace","sans-serif"]}),{body:["ProximaNova-Regular","sans-serif"],heading:["ProximaNova-Bold","sans-serif"]}),Yt=Object.assign(Object.assign({},{raised:!1}),{raised:!1}),$t={colors:Object.assign({},Gt),fontFamily:Object.assign({},Wt),fontSize:Object.assign({},null==qt?void 0:qt.fontSize),fontWeight:Object.assign({},null==qt?void 0:qt.fontWeight),buttons:Object.assign({},Yt),screens:Object.assign({},null==qt?void 0:qt.screens),borderRadius:Object.assign({},null==qt?void 0:qt.borderRadius),spacing:Object.assign({},null==qt?void 0:qt.spacing),extend:Object.assign({},null==qt?void 0:qt.extend)};export{ee as AnimationCounter,je as AnimationSet1,Ra as AppContext,Ra as AppProvider,Ze as Authenticator,_e as Avatar,re as BTN_SIZES,te as BTN_TYPES,ie as BTN_VARIANTS,ae as Blockquote,oe as Button,ga as ButtonGroup,he as COPY_ALIGN,fe as COPY_CONTEXTUAL,ve as COPY_SIZE,ge as COPY_TAG,pe as COPY_TRANSFORM,wa as CPL_SPACING,Ca as CRL_SIZE,na as Card,Ia as CardVariant,de as Checkbox,ue as Chip,ca as Container,ka as ContentPageLayout,Ea as ContentRowsLayout,be as Copy,la as DisplayHeading,We as FIELD_TYPES,ye as FileUpload,Sa as Footer,Ke as ForgotPasswordForm,Ge as Form,$e as FormField,Ye as FormSelect,xe as HEADING_ALIGN,Ne as HEADING_TAGS,we as HEADING_TRANSFORM,La as Header,ke as Heading,xa as Hero,Ce as Hr,ha as HtmlContent,ne as Icon,Ee as Image,Ae as Label,me as Link,Le as List,Se as ListTag,le as Loader,Ve as LoginForm,Oe as Logo,Na as Menu,$a as MultiCheckboxFacet,Ie as Notice,Oa as OTPInput,sa as PanelCards,da as PanelFeature,pa as PanelHero,fa as PanelProduct,va as PanelVideo,Xa as ProfileForm,Me as Radio,Xe as RegisterForm,Va as ResetPasswordForm,Ma as ResultAsTypes,Ga as Search,ba as Share,Ya as SingleLinksFacet,Wa as SingleSelectFacet,Te as Switch,Be as Tabs,Fe as TextInput,Za as ThemeContext,Ja as ThemeProvider,Re as Variants,ma as Video,ya as VisitUs,Ka as defaultTheme,$t as theme};
|