@jenesei-software/jenesei-kit-react 1.3.11 → 1.3.12

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.
Files changed (35) hide show
  1. package/build/area-CZkDIeGx.cjs +2 -0
  2. package/build/area-CZkDIeGx.cjs.map +1 -0
  3. package/build/{area-CT83tDk-.js → area-DEwj0-O3.js} +4 -6
  4. package/build/area-DEwj0-O3.js.map +1 -0
  5. package/build/area-preview.cjs.js +1 -1
  6. package/build/area-preview.es.js +1 -1
  7. package/build/build-info.txt +3 -3
  8. package/build/{component-BhPckvLk.cjs → component-DdJt3LEF.cjs} +2 -2
  9. package/build/{component-BhPckvLk.cjs.map → component-DdJt3LEF.cjs.map} +1 -1
  10. package/build/{component-G5QqAuDV.js → component-P-3bwi3_.js} +2 -2
  11. package/build/{component-G5QqAuDV.js.map → component-P-3bwi3_.js.map} +1 -1
  12. package/build/component-image-button.cjs.js +1 -1
  13. package/build/component-image-button.es.js +1 -1
  14. package/build/component-image-select.cjs.js +1 -1
  15. package/build/component-image-select.es.js +1 -1
  16. package/build/{component.styles-4ycgapiT.cjs → component.styles-C4xnWrvJ.cjs} +2 -2
  17. package/build/{component.styles-4ycgapiT.cjs.map → component.styles-C4xnWrvJ.cjs.map} +1 -1
  18. package/build/{component.styles-CZyAhUtW.js → component.styles-DwtZ7CY4.js} +2 -2
  19. package/build/{component.styles-CZyAhUtW.js.map → component.styles-DwtZ7CY4.js.map} +1 -1
  20. package/build/context-app.cjs.js +1 -1
  21. package/build/context-app.es.js +1 -1
  22. package/build/{context.hooks-CI5aQmpr.js → context.hooks-Cmgo0uqV.js} +2 -2
  23. package/build/{context.hooks-CI5aQmpr.js.map → context.hooks-Cmgo0uqV.js.map} +1 -1
  24. package/build/{context.hooks-Ci37RyLf.cjs → context.hooks-XBiTuVyt.cjs} +2 -2
  25. package/build/{context.hooks-Ci37RyLf.cjs.map → context.hooks-XBiTuVyt.cjs.map} +1 -1
  26. package/build/index.cjs.js +1 -1
  27. package/build/index.es.js +4 -4
  28. package/build/{use-DQDxWjzu.cjs → use-ClugPshj.cjs} +2 -2
  29. package/build/{use-DQDxWjzu.cjs.map → use-ClugPshj.cjs.map} +1 -1
  30. package/build/{use-Bp4KNVye.js → use-_V1SKE0-.js} +2 -2
  31. package/build/{use-Bp4KNVye.js.map → use-_V1SKE0-.js.map} +1 -1
  32. package/package.json +1 -1
  33. package/build/area-CT83tDk-.js.map +0 -1
  34. package/build/area-t259bohc.cjs +0 -2
  35. package/build/area-t259bohc.cjs.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"context.hooks-CI5aQmpr.js","sources":["../src/contexts/context-app/context.tsx","../src/contexts/context-app/context.styles.ts","../src/contexts/context-app/context.hooks.ts"],"sourcesContent":["import { Preview, PreviewAdditionalProps } from '@local/areas/preview';\nimport { IThemePaletteKeys, JeneseiPalette } from '@local/theme';\n\nimport { createContext, FC, useCallback, useEffect, useState } from 'react';\n\nimport { useScreenWidth } from '../context-screen-width';\nimport {\n AppContextProps,\n ProviderAppOutlet,\n ProviderAppOutletChildren,\n ProviderAppOutletFooter,\n ProviderAppOutletHeader,\n ProviderAppOutletLeftAside,\n ProviderAppOutletNav,\n ProviderAppOutletNotification,\n ProviderAppOutletRightAside,\n ProviderAppProps,\n ProviderAppWrapper,\n} from '.';\n\nexport const AppContext = createContext<AppContextProps | null>(null);\n\n/**\n * ProviderApp component is a context context that manages various application-level states\n * such as background color, status bar color, background image, title, and description.\n * It uses several custom hooks to handle these states and provides them via the AppContext.\n *\n * @component\n *\n * @param {ProviderAppProps} props - The properties passed to the ProviderApp component.\n * @param {string} props.defaultBgColor - The default background color.\n * @param {string} props.defaultStatusBarColor - The default status bar color.\n * @param {string} [props.defaultBgImage] - The default background image.\n * @param {string} [props.defaultTitle] - The default title.\n * @param {string} [props.defaultDescription] - The default description.\n * @param {boolean} [props.isScrollOutlet] - Determines if the outlet should be scrollable.\n * @param {object} [props.footer] - The footer component and its properties.\n * @param {object} [props.notification] - The notification component and its properties.\n * @param {object} [props.header] - The header component and its properties.\n * @param {object} [props.nav] - The navigation component and its properties.\n * @param {object} [props.leftAside] - The left aside component and its properties.\n * @param {object} [props.rightAside] - The right aside component and its properties.\n * @param {React.ReactNode} props.children - The children components to be rendered inside the ProviderApp.\n *\n * @returns {JSX.Element} The rendered ProviderApp component.\n */\nexport const ProviderApp: FC<ProviderAppProps> = (props) => {\n const { bgColor, changeBgColor, historyBgColor, setDefaultBgColor } = useBgColor(props.defaultBgColor);\n const { statusBarColor, changeStatusBarColor, historyStatusBarColor, setDefaultStatusBarColor } = useStatusBarColor(\n props.defaultStatusBarColor,\n );\n const { bgImage, changeBgImage, historyBgImage, setDefaultBgImage } = useBgImage(props.defaultBgImage || null);\n const { title, changeTitle, setHistoryTitle, setDefaultTitle } = useTitle(props.defaultTitle || null);\n const { description, changeDescription, historyDescription, setDefaultDescription } = useDescription(\n props.defaultDescription,\n );\n const { changePreview, previewProps } = usePreview(props.defaultPreview);\n const { screenActual } = useScreenWidth();\n\n return (\n <AppContext.Provider\n value={{\n changePreview,\n changeStatusBarColor,\n changeBgColor,\n changeBgImage,\n changeTitle,\n changeDescription,\n historyStatusBarColor,\n historyBgColor,\n historyBgImage,\n setHistoryTitle,\n historyDescription,\n setDefaultStatusBarColor,\n setDefaultBgColor,\n setDefaultBgImage,\n setDefaultTitle,\n setDefaultDescription,\n }}\n >\n <title>{title}</title>\n <meta name='description' content={description} />\n <meta name='theme-color' content={JeneseiPalette[statusBarColor]} />\n <meta name='apple-mobile-web-app-status-bar-style' content='default' />\n <meta name='mobile-web-app-capable' content='yes' />\n <Preview {...previewProps}>\n <ProviderAppWrapper $bgColor={bgColor} $bgImage={bgImage}>\n <ProviderAppOutlet\n $isScrollOutlet={props.isScrollOutlet}\n $footer={props.footer}\n $notification={props.notification}\n $header={props.header}\n $nav={props.nav}\n $leftAside={props.leftAside}\n $rightAside={props.rightAside}\n >\n {props.notification?.length && props.notification?.length?.[screenActual] ? (\n <ProviderAppOutletNotification $notification={props.notification}>\n {props.notification?.component || null}\n </ProviderAppOutletNotification>\n ) : null}\n\n {props.header?.length && props.header?.length?.[screenActual] ? (\n <ProviderAppOutletHeader $header={props.header}>\n {props.header?.component || null}\n </ProviderAppOutletHeader>\n ) : null}\n\n {props.nav?.length && props.nav?.length?.[screenActual] ? (\n <ProviderAppOutletNav $nav={props.nav}>{props.nav?.component || null}</ProviderAppOutletNav>\n ) : null}\n\n {props.leftAside?.length && props.leftAside?.length?.[screenActual] ? (\n <ProviderAppOutletLeftAside $leftAside={props.leftAside}>\n {props.leftAside?.component || null}\n </ProviderAppOutletLeftAside>\n ) : null}\n\n <ProviderAppOutletChildren $isScrollOutlet={props.isScrollOutlet} $main={props.main}>\n {props.children}\n </ProviderAppOutletChildren>\n\n {props.rightAside?.length && props.rightAside?.length?.[screenActual] ? (\n <ProviderAppOutletRightAside $rightAside={props.rightAside}>\n {props.rightAside?.component || null}\n </ProviderAppOutletRightAside>\n ) : null}\n\n {props.footer?.length && props.footer?.length?.[screenActual] ? (\n <ProviderAppOutletFooter $footer={props.footer}>\n {props.footer?.component || null}\n </ProviderAppOutletFooter>\n ) : null}\n </ProviderAppOutlet>\n </ProviderAppWrapper>\n </Preview>\n </AppContext.Provider>\n );\n};\n\n/**\n * Custom hook to manage preview properties.\n */\nconst usePreview = (defaultPreview: ProviderAppProps['defaultPreview']) => {\n const [previewProps, setPreviewProps] = useState(defaultPreview || { visible: true, defaultVisible: true });\n\n const changePreview = useCallback((newPreviewProps: PreviewAdditionalProps) => {\n setPreviewProps(newPreviewProps);\n }, []);\n\n useEffect(() => {\n if (defaultPreview) setPreviewProps(defaultPreview);\n }, [defaultPreview]);\n\n return { previewProps, changePreview };\n};\n\n/**\n * Custom hook to manage background color state with history tracking.\n */\ntype BgColorState = {\n bgColor: IThemePaletteKeys;\n bgColorHistory: IThemePaletteKeys[];\n bgColorIndex: number;\n};\n\nexport const useBgColor = (defaultColor: IThemePaletteKeys) => {\n const [state, setState] = useState<BgColorState>({\n bgColor: defaultColor,\n bgColorHistory: [defaultColor],\n bgColorIndex: 0,\n });\n\n const changeBgColor = useCallback((color: IThemePaletteKeys) => {\n setState((prev) => {\n const newHistory = [...prev.bgColorHistory.slice(0, prev.bgColorIndex + 1), color];\n return {\n bgColor: color,\n bgColorHistory: newHistory,\n bgColorIndex: newHistory.length - 1,\n };\n });\n }, []);\n\n const historyBgColor = useCallback((steps: number) => {\n setState((prev) => {\n const newIndex = prev.bgColorIndex + steps;\n if (newIndex >= 0 && newIndex < prev.bgColorHistory.length) {\n return {\n ...prev,\n bgColor: prev.bgColorHistory[newIndex],\n bgColorIndex: newIndex,\n };\n }\n return prev;\n });\n }, []);\n\n const setDefaultBgColor = useCallback(() => {\n setState({\n bgColor: defaultColor,\n bgColorHistory: [defaultColor],\n bgColorIndex: 0,\n });\n }, [defaultColor]);\n\n useEffect(() => {\n setState({\n bgColor: defaultColor,\n bgColorHistory: [defaultColor],\n bgColorIndex: 0,\n });\n }, [defaultColor]);\n\n return {\n bgColor: state.bgColor,\n changeBgColor,\n historyBgColor,\n setDefaultBgColor,\n bgColorIndex: state.bgColorIndex,\n };\n};\n\n/**\n * Custom hook to manage the status bar color with history tracking.\n */\ntype StatusBarColorState = {\n statusBarColor: IThemePaletteKeys;\n statusBarColorHistory: IThemePaletteKeys[];\n statusBarColorIndex: number;\n};\n\nexport const useStatusBarColor = (defaultColor: IThemePaletteKeys) => {\n const [state, setState] = useState<StatusBarColorState>({\n statusBarColor: defaultColor,\n statusBarColorHistory: [defaultColor],\n statusBarColorIndex: 0,\n });\n\n const changeStatusBarColor = useCallback((color: IThemePaletteKeys) => {\n setState((prev) => {\n const newHistory = [...prev.statusBarColorHistory.slice(0, prev.statusBarColorIndex + 1), color];\n return {\n statusBarColor: color,\n statusBarColorHistory: newHistory,\n statusBarColorIndex: newHistory.length - 1,\n };\n });\n }, []);\n\n const historyStatusBarColor = useCallback((steps: number) => {\n setState((prev) => {\n const newIndex = prev.statusBarColorIndex + steps;\n if (newIndex >= 0 && newIndex < prev.statusBarColorHistory.length) {\n return {\n ...prev,\n statusBarColor: prev.statusBarColorHistory[newIndex],\n statusBarColorIndex: newIndex,\n };\n }\n return prev;\n });\n }, []);\n\n const setDefaultStatusBarColor = useCallback(() => {\n setState({\n statusBarColor: defaultColor,\n statusBarColorHistory: [defaultColor],\n statusBarColorIndex: 0,\n });\n }, [defaultColor]);\n\n useEffect(() => {\n setState({\n statusBarColor: defaultColor,\n statusBarColorHistory: [defaultColor],\n statusBarColorIndex: 0,\n });\n }, [defaultColor]);\n\n return {\n statusBarColor: state.statusBarColor,\n changeStatusBarColor,\n historyStatusBarColor,\n setDefaultStatusBarColor,\n statusBarColorIndex: state.statusBarColorIndex,\n };\n};\n\n/**\n * Custom hook to manage background images with history.\n */\ntype BgImageState = {\n bgImage: string | null;\n bgImageHistory: (string | null)[];\n bgImageIndex: number;\n};\n\nexport const useBgImage = (defaultImage: string | null) => {\n const [state, setState] = useState<BgImageState>({\n bgImage: defaultImage,\n bgImageHistory: [defaultImage],\n bgImageIndex: 0,\n });\n\n const changeBgImage = useCallback((image: string | null) => {\n setState((prev) => {\n const newHistory = [...prev.bgImageHistory.slice(0, prev.bgImageIndex + 1), image];\n return {\n bgImage: image,\n bgImageHistory: newHistory,\n bgImageIndex: newHistory.length - 1,\n };\n });\n }, []);\n\n const historyBgImage = useCallback((steps: number) => {\n setState((prev) => {\n const newIndex = prev.bgImageIndex + steps;\n if (newIndex >= 0 && newIndex < prev.bgImageHistory.length) {\n return {\n ...prev,\n bgImage: prev.bgImageHistory[newIndex],\n bgImageIndex: newIndex,\n };\n }\n return prev;\n });\n }, []);\n\n const setDefaultBgImage = useCallback(() => {\n setState({\n bgImage: defaultImage,\n bgImageHistory: [defaultImage],\n bgImageIndex: 0,\n });\n }, [defaultImage]);\n\n useEffect(() => {\n setState({\n bgImage: defaultImage,\n bgImageHistory: [defaultImage],\n bgImageIndex: 0,\n });\n }, [defaultImage]);\n\n return {\n bgImage: state.bgImage,\n changeBgImage,\n historyBgImage,\n setDefaultBgImage,\n bgImageIndex: state.bgImageIndex,\n };\n};\n\ntype TitleState = {\n title: string | null;\n titleHistory: (string | null)[];\n titleIndex: number;\n};\n/**\n * Custom hook to manage the document title with history tracking.\n */\nconst useTitle = (defaultTitle: string | null) => {\n const [state, setState] = useState<TitleState>({\n title: defaultTitle,\n titleHistory: [defaultTitle],\n titleIndex: 0,\n });\n\n const changeTitle = useCallback((newTitle: string | null) => {\n setState((prev) => {\n const newHistory = [...prev.titleHistory.slice(0, prev.titleIndex + 1), newTitle];\n return {\n title: newTitle,\n titleHistory: newHistory,\n titleIndex: newHistory.length - 1,\n };\n });\n }, []);\n\n const setHistoryTitle = useCallback((steps: number) => {\n setState((prev) => {\n const newIndex = prev.titleIndex + steps;\n if (newIndex >= 0 && newIndex < prev.titleHistory.length) {\n return {\n ...prev,\n title: prev.titleHistory[newIndex],\n titleIndex: newIndex,\n };\n }\n return prev;\n });\n }, []);\n\n const setDefaultTitle = useCallback(() => {\n setState({\n title: defaultTitle,\n titleHistory: [defaultTitle],\n titleIndex: 0,\n });\n }, [defaultTitle]);\n\n useEffect(() => {\n setState({\n title: defaultTitle,\n titleHistory: [defaultTitle],\n titleIndex: 0,\n });\n }, [defaultTitle]);\n\n return {\n title: state.title,\n titleIndex: state.titleIndex,\n titleHistory: state.titleHistory,\n changeTitle,\n setHistoryTitle,\n setDefaultTitle,\n };\n};\n\n/**\n * Custom hook to manage a description with history tracking.\n */\ntype DescriptionState = {\n description: string;\n descriptionHistory: string[];\n descriptionIndex: number;\n};\n\nexport const useDescription = (defaultDescription: string) => {\n const [state, setState] = useState<DescriptionState>({\n description: defaultDescription,\n descriptionHistory: [defaultDescription],\n descriptionIndex: 0,\n });\n\n const changeDescription = useCallback((newDescription: string) => {\n setState((prev) => {\n const newHistory = [...prev.descriptionHistory.slice(0, prev.descriptionIndex + 1), newDescription];\n return {\n description: newDescription,\n descriptionHistory: newHistory,\n descriptionIndex: newHistory.length - 1,\n };\n });\n }, []);\n\n const historyDescription = useCallback((steps: number) => {\n setState((prev) => {\n const newIndex = prev.descriptionIndex + steps;\n if (newIndex >= 0 && newIndex < prev.descriptionHistory.length) {\n return {\n ...prev,\n description: prev.descriptionHistory[newIndex],\n descriptionIndex: newIndex,\n };\n }\n return prev;\n });\n }, []);\n\n const setDefaultDescription = useCallback(() => {\n setState({\n description: defaultDescription,\n descriptionHistory: [defaultDescription],\n descriptionIndex: 0,\n });\n }, [defaultDescription]);\n\n useEffect(() => {\n setState({\n description: defaultDescription,\n descriptionHistory: [defaultDescription],\n descriptionIndex: 0,\n });\n }, [defaultDescription]);\n\n return {\n description: state.description,\n changeDescription,\n historyDescription,\n setDefaultDescription,\n descriptionIndex: state.descriptionIndex,\n };\n};\n","import { addGridTransition } from '@local/styles/add';\nimport { JeneseiPalette } from '@local/theme';\n\nimport { css, styled } from 'styled-components';\n\nimport { ScreenWidthProps } from '../context-screen-width';\nimport { ProviderAppOutletChildrenProps, ProviderAppOutletProps, ProviderAppWrapperProps } from '.';\n\nexport const ProviderAppWrapper = styled.div<ProviderAppWrapperProps>`\n display: flex;\n flex-direction: column;\n max-width: 100dvw;\n min-height: 100dvh;\n width: 100%;\n overflow: hidden;\n position: relative;\n\n background-color: ${(props) => JeneseiPalette[props.$bgColor]};\n background-image: url(${(props) => props.$bgImage});\n`;\n\nconst generateGridTemplateAreas = (props: ProviderAppOutletProps) => {\n let templateAreas = `\n \"notification notification notification\"\n \"header header header\"\n \"nav nav nav\"\n \"leftAside children rightAside\"\n \"footer footer footer\"\n `;\n\n templateAreas = `\n \"notification notification notification\"\n \"${props.$leftAside?.isTopHeader ? 'leftAside' : 'header'} header ${props.$rightAside?.isTopHeader ? 'rightAside' : 'header'}\"\n \"${props.$leftAside?.isTopHeader ? 'leftAside' : props.$leftAside?.isTopNav ? 'leftAside' : 'nav'} nav ${props.$rightAside?.isTopHeader ? 'rightAside' : props.$rightAside?.isTopNav ? 'rightAside' : 'nav'}\"\n \"leftAside children rightAside\"\n \"${props.$leftAside?.isTopFooter ? 'leftAside' : 'footer'} footer ${props.$rightAside?.isTopFooter ? 'rightAside' : 'footer'}\"\n `;\n\n return templateAreas;\n};\n\nfunction toStyledAppOutletCSS(props: {\n leftAsideWidth: string;\n rightAsideWidth: string;\n notificationHeight: string;\n headerHeight: string;\n navHeight: string;\n footerHeight: string;\n}) {\n return css`\n grid-template-columns: ${() => `${props.leftAsideWidth} 1fr ${props.rightAsideWidth}`};\n grid-template-rows: ${() =>\n `${props.notificationHeight} ${props.headerHeight} ${props.navHeight} 1fr ${props.footerHeight}`};\n `;\n}\nconst addSXAppOutlet = css<ProviderAppOutletProps>`\n ${(props) => {\n const leftAsideWidth = props.$leftAside?.length?.default;\n const rightAsideWidth = props.$rightAside?.length?.default;\n const notificationHeight = props.$notification?.length?.default;\n const headerHeight = props.$header?.length?.default;\n const navHeight = props.$nav?.length?.default;\n const footerHeight = props.$footer?.length?.default;\n return toStyledAppOutletCSS({\n leftAsideWidth: leftAsideWidth ?? '0px',\n rightAsideWidth: rightAsideWidth ?? '0px',\n notificationHeight: notificationHeight ?? '0px',\n headerHeight: headerHeight ?? '0px',\n navHeight: navHeight ?? '0px',\n footerHeight: footerHeight ?? '0px',\n });\n }}\n ${(props) => {\n const leftAsideWidth = props.$leftAside?.length;\n const rightAsideWidth = props.$rightAside?.length;\n const notificationHeight = props.$notification?.length;\n const headerHeight = props.$header?.length;\n const navHeight = props.$nav?.length;\n const footerHeight = props.$footer?.length;\n\n return Object.entries(props.theme.screens)\n .filter(([key]) => key !== 'default')\n .map(([key]) => {\n const deviceKey = key as keyof ScreenWidthProps<string | null>;\n const screenWidth = props.theme.screens[deviceKey]?.width;\n if (!screenWidth) return null;\n return css`\n @media (max-width: ${screenWidth}px) {\n ${toStyledAppOutletCSS({\n leftAsideWidth: leftAsideWidth && leftAsideWidth[deviceKey] ? leftAsideWidth[deviceKey] : '0px',\n rightAsideWidth: rightAsideWidth && rightAsideWidth[deviceKey] ? rightAsideWidth[deviceKey] : '0px',\n notificationHeight:\n notificationHeight && notificationHeight[deviceKey] ? notificationHeight[deviceKey] : '0px',\n headerHeight: headerHeight && headerHeight[deviceKey] ? headerHeight[deviceKey] : '0px',\n navHeight: navHeight && navHeight[deviceKey] ? navHeight[deviceKey] : '0px',\n footerHeight: footerHeight && footerHeight[deviceKey] ? footerHeight[deviceKey] : '0px',\n })}\n }\n `;\n });\n }}\n`;\nexport const ProviderAppOutlet = styled.div<ProviderAppOutletProps>`\n display: grid;\n width: 100%;\n height: 100%;\n\n overflow-y: auto;\n overflow-x: hidden;\n scrollbar-gutter: stable;\n \n min-height: 100dvh;\n max-height: 100dvh;\n \n ${addGridTransition};\n\n ${(props) => `\n grid-template-areas: ${generateGridTemplateAreas(props)};\n `}\n\n ${addSXAppOutlet};\n`;\n\nexport const ProviderAppOutletChildren = styled.main<ProviderAppOutletChildrenProps>`\n z-index: ${(props) => props?.$main?.zIndex ?? 'auto'};\n display: flex;\n grid-area: children;\n max-width: 100%;\n max-height: 100%;\n overflow: ${(props) => (props.$isScrollOutlet ? 'auto' : 'visible')};\n scrollbar-gutter: stable;\n`;\n\nexport const ProviderAppOutletNotification = styled.section<ProviderAppOutletProps>`\n z-index: ${(props) => props?.$notification?.zIndex ?? 'auto'};\n grid-area: notification;\n display: flex;\n`;\n\nexport const ProviderAppOutletHeader = styled.header<ProviderAppOutletProps>`\n z-index: ${(props) => props?.$header?.zIndex ?? 'auto'};\n grid-area: header;\n display: flex;\n`;\n\nexport const ProviderAppOutletFooter = styled.footer<ProviderAppOutletProps>`\n z-index: ${(props) => props?.$footer?.zIndex ?? 'auto'};\n grid-area: footer;\n display: flex;\n`;\n\nexport const ProviderAppOutletNav = styled.nav<ProviderAppOutletProps>`\n z-index: ${(props) => props?.$nav?.zIndex ?? 'auto'};\n grid-area: nav;\n display: flex;\n`;\n\nexport const ProviderAppOutletLeftAside = styled.aside<ProviderAppOutletProps>`\n z-index: ${(props) => props?.$leftAside?.zIndex ?? 'auto'};\n grid-area: leftAside;\n display: flex;\n`;\n\nexport const ProviderAppOutletRightAside = styled.aside<ProviderAppOutletProps>`\n z-index: ${(props) => props?.$rightAside?.zIndex ?? 'auto'};\n grid-area: rightAside;\n display: flex;\n`;\n","import { useContext } from 'react';\n\nimport { AppContext } from '.';\n\n/**\n * Custom hook to access the AppContext.\n */\nexport const useApp = () => {\n const context = useContext(AppContext);\n if (!context) {\n throw new Error('useApp must be used within an ProviderApp');\n }\n return context;\n};\n"],"names":["jsxs","jsx","_a"],"mappings":";;;;;;;AAoBO,MAAM,aAAa,cAAsC,IAAI;AA0B7D,MAAM,cAAoC,CAAC,UAAU;;AAC1D,QAAM,EAAE,SAAS,eAAe,gBAAgB,sBAAsB,WAAW,MAAM,cAAc;AACrG,QAAM,EAAE,gBAAgB,sBAAsB,uBAAuB,6BAA6B;AAAA,IAChG,MAAM;AAAA,EAAA;AAER,QAAM,EAAE,SAAS,eAAe,gBAAgB,sBAAsB,WAAW,MAAM,kBAAkB,IAAI;AAC7G,QAAM,EAAE,OAAO,aAAa,iBAAiB,oBAAoB,SAAS,MAAM,gBAAgB,IAAI;AACpG,QAAM,EAAE,aAAa,mBAAmB,oBAAoB,0BAA0B;AAAA,IACpF,MAAM;AAAA,EAAA;AAER,QAAM,EAAE,eAAe,aAAA,IAAiB,WAAW,MAAM,cAAc;AACvE,QAAM,EAAE,aAAA,IAAiB,eAAA;AAEzB,SACEA,kCAAAA;AAAAA,IAAC,WAAW;AAAA,IAAX;AAAA,MACC,OAAO;AAAA,QACL;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,MAAA;AAAA,MAGF,UAAA;AAAA,QAAAC,kCAAAA,IAAC,WAAO,UAAA,MAAA,CAAM;AAAA,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AA0B,OAAO;AAAA,aACjC,CAAC,UAAA;;AAAU,+CAAO,YAAP,mBAAgB,WAAU;AAAA,CAAM;AAAA;AAAA;AAAA;AAKjD,MAAM,0BAA0B,OAAO;AAAA,aACjC,CAAC,UAAA;;AAAU,+CAAO,YAAP,mBAAgB,WAAU;AAAA,CAAM;AAAA;AAAA;AAAA;AAKjD,MAAM,uBAAuB,OAAO;AAAA,aAC9B,CAAC,UAAA;;AAAU,+CAAO,SAAP,mBAAa,WAAU;AAAA,CAAM;AAAA;AAAA;AAAA;AAK9C,MAAM,6BAA6B,OAAO;AAAA,aACpC,CAAC,UAAA;;AAAU,+CAAO,eAAP,mBAAmB,WAAU;AAAA,CAAM;AAAA;AAAA;AAAA;AAKpD,MAAM,8BAA8B,OAAO;AAAA,aACrC,CAAC,UAAA;;AAAU,+CAAO,gBAAP,mBAAoB,WAAU;AAAA,CAAM;AAAA;AAAA;AAAA;AC7JrD,MAAM,SAAS,MAAM;AAC1B,QAAM,UAAU,WAAW,UAAU;AACrC,MAAI,CAAC,SAAS;AACZ,UAAM,IAAI,MAAM,2CAA2C;AAAA,EAAA;AAE7D,SAAO;AACT;"}
1
+ {"version":3,"file":"context.hooks-Cmgo0uqV.js","sources":["../src/contexts/context-app/context.tsx","../src/contexts/context-app/context.styles.ts","../src/contexts/context-app/context.hooks.ts"],"sourcesContent":["import { Preview, PreviewAdditionalProps } from '@local/areas/preview';\nimport { IThemePaletteKeys, JeneseiPalette } from '@local/theme';\n\nimport { createContext, FC, useCallback, useEffect, useState } from 'react';\n\nimport { useScreenWidth } from '../context-screen-width';\nimport {\n AppContextProps,\n ProviderAppOutlet,\n ProviderAppOutletChildren,\n ProviderAppOutletFooter,\n ProviderAppOutletHeader,\n ProviderAppOutletLeftAside,\n ProviderAppOutletNav,\n ProviderAppOutletNotification,\n ProviderAppOutletRightAside,\n ProviderAppProps,\n ProviderAppWrapper,\n} from '.';\n\nexport const AppContext = createContext<AppContextProps | null>(null);\n\n/**\n * ProviderApp component is a context context that manages various application-level states\n * such as background color, status bar color, background image, title, and description.\n * It uses several custom hooks to handle these states and provides them via the AppContext.\n *\n * @component\n *\n * @param {ProviderAppProps} props - The properties passed to the ProviderApp component.\n * @param {string} props.defaultBgColor - The default background color.\n * @param {string} props.defaultStatusBarColor - The default status bar color.\n * @param {string} [props.defaultBgImage] - The default background image.\n * @param {string} [props.defaultTitle] - The default title.\n * @param {string} [props.defaultDescription] - The default description.\n * @param {boolean} [props.isScrollOutlet] - Determines if the outlet should be scrollable.\n * @param {object} [props.footer] - The footer component and its properties.\n * @param {object} [props.notification] - The notification component and its properties.\n * @param {object} [props.header] - The header component and its properties.\n * @param {object} [props.nav] - The navigation component and its properties.\n * @param {object} [props.leftAside] - The left aside component and its properties.\n * @param {object} [props.rightAside] - The right aside component and its properties.\n * @param {React.ReactNode} props.children - The children components to be rendered inside the ProviderApp.\n *\n * @returns {JSX.Element} The rendered ProviderApp component.\n */\nexport const ProviderApp: FC<ProviderAppProps> = (props) => {\n const { bgColor, changeBgColor, historyBgColor, setDefaultBgColor } = useBgColor(props.defaultBgColor);\n const { statusBarColor, changeStatusBarColor, historyStatusBarColor, setDefaultStatusBarColor } = useStatusBarColor(\n props.defaultStatusBarColor,\n );\n const { bgImage, changeBgImage, historyBgImage, setDefaultBgImage } = useBgImage(props.defaultBgImage || null);\n const { title, changeTitle, setHistoryTitle, setDefaultTitle } = useTitle(props.defaultTitle || null);\n const { description, changeDescription, historyDescription, setDefaultDescription } = useDescription(\n props.defaultDescription,\n );\n const { changePreview, previewProps } = usePreview(props.defaultPreview);\n const { screenActual } = useScreenWidth();\n\n return (\n <AppContext.Provider\n value={{\n changePreview,\n changeStatusBarColor,\n changeBgColor,\n changeBgImage,\n changeTitle,\n changeDescription,\n historyStatusBarColor,\n historyBgColor,\n historyBgImage,\n setHistoryTitle,\n historyDescription,\n setDefaultStatusBarColor,\n setDefaultBgColor,\n setDefaultBgImage,\n setDefaultTitle,\n setDefaultDescription,\n }}\n >\n <title>{title}</title>\n <meta name='description' content={description} />\n <meta name='theme-color' content={JeneseiPalette[statusBarColor]} />\n <meta name='apple-mobile-web-app-status-bar-style' content='default' />\n <meta name='mobile-web-app-capable' content='yes' />\n <Preview {...previewProps}>\n <ProviderAppWrapper $bgColor={bgColor} $bgImage={bgImage}>\n <ProviderAppOutlet\n $isScrollOutlet={props.isScrollOutlet}\n $footer={props.footer}\n $notification={props.notification}\n $header={props.header}\n $nav={props.nav}\n $leftAside={props.leftAside}\n $rightAside={props.rightAside}\n >\n {props.notification?.length && props.notification?.length?.[screenActual] ? (\n <ProviderAppOutletNotification $notification={props.notification}>\n {props.notification?.component || null}\n </ProviderAppOutletNotification>\n ) : null}\n\n {props.header?.length && props.header?.length?.[screenActual] ? (\n <ProviderAppOutletHeader $header={props.header}>\n {props.header?.component || null}\n </ProviderAppOutletHeader>\n ) : null}\n\n {props.nav?.length && props.nav?.length?.[screenActual] ? (\n <ProviderAppOutletNav $nav={props.nav}>{props.nav?.component || null}</ProviderAppOutletNav>\n ) : null}\n\n {props.leftAside?.length && props.leftAside?.length?.[screenActual] ? (\n <ProviderAppOutletLeftAside $leftAside={props.leftAside}>\n {props.leftAside?.component || null}\n </ProviderAppOutletLeftAside>\n ) : null}\n\n <ProviderAppOutletChildren $isScrollOutlet={props.isScrollOutlet} $main={props.main}>\n {props.children}\n </ProviderAppOutletChildren>\n\n {props.rightAside?.length && props.rightAside?.length?.[screenActual] ? (\n <ProviderAppOutletRightAside $rightAside={props.rightAside}>\n {props.rightAside?.component || null}\n </ProviderAppOutletRightAside>\n ) : null}\n\n {props.footer?.length && props.footer?.length?.[screenActual] ? (\n <ProviderAppOutletFooter $footer={props.footer}>\n {props.footer?.component || null}\n </ProviderAppOutletFooter>\n ) : null}\n </ProviderAppOutlet>\n </ProviderAppWrapper>\n </Preview>\n </AppContext.Provider>\n );\n};\n\n/**\n * Custom hook to manage preview properties.\n */\nconst usePreview = (defaultPreview: ProviderAppProps['defaultPreview']) => {\n const [previewProps, setPreviewProps] = useState(defaultPreview || { visible: true, defaultVisible: true });\n\n const changePreview = useCallback((newPreviewProps: PreviewAdditionalProps) => {\n setPreviewProps(newPreviewProps);\n }, []);\n\n useEffect(() => {\n if (defaultPreview) setPreviewProps(defaultPreview);\n }, [defaultPreview]);\n\n return { previewProps, changePreview };\n};\n\n/**\n * Custom hook to manage background color state with history tracking.\n */\ntype BgColorState = {\n bgColor: IThemePaletteKeys;\n bgColorHistory: IThemePaletteKeys[];\n bgColorIndex: number;\n};\n\nexport const useBgColor = (defaultColor: IThemePaletteKeys) => {\n const [state, setState] = useState<BgColorState>({\n bgColor: defaultColor,\n bgColorHistory: [defaultColor],\n bgColorIndex: 0,\n });\n\n const changeBgColor = useCallback((color: IThemePaletteKeys) => {\n setState((prev) => {\n const newHistory = [...prev.bgColorHistory.slice(0, prev.bgColorIndex + 1), color];\n return {\n bgColor: color,\n bgColorHistory: newHistory,\n bgColorIndex: newHistory.length - 1,\n };\n });\n }, []);\n\n const historyBgColor = useCallback((steps: number) => {\n setState((prev) => {\n const newIndex = prev.bgColorIndex + steps;\n if (newIndex >= 0 && newIndex < prev.bgColorHistory.length) {\n return {\n ...prev,\n bgColor: prev.bgColorHistory[newIndex],\n bgColorIndex: newIndex,\n };\n }\n return prev;\n });\n }, []);\n\n const setDefaultBgColor = useCallback(() => {\n setState({\n bgColor: defaultColor,\n bgColorHistory: [defaultColor],\n bgColorIndex: 0,\n });\n }, [defaultColor]);\n\n useEffect(() => {\n setState({\n bgColor: defaultColor,\n bgColorHistory: [defaultColor],\n bgColorIndex: 0,\n });\n }, [defaultColor]);\n\n return {\n bgColor: state.bgColor,\n changeBgColor,\n historyBgColor,\n setDefaultBgColor,\n bgColorIndex: state.bgColorIndex,\n };\n};\n\n/**\n * Custom hook to manage the status bar color with history tracking.\n */\ntype StatusBarColorState = {\n statusBarColor: IThemePaletteKeys;\n statusBarColorHistory: IThemePaletteKeys[];\n statusBarColorIndex: number;\n};\n\nexport const useStatusBarColor = (defaultColor: IThemePaletteKeys) => {\n const [state, setState] = useState<StatusBarColorState>({\n statusBarColor: defaultColor,\n statusBarColorHistory: [defaultColor],\n statusBarColorIndex: 0,\n });\n\n const changeStatusBarColor = useCallback((color: IThemePaletteKeys) => {\n setState((prev) => {\n const newHistory = [...prev.statusBarColorHistory.slice(0, prev.statusBarColorIndex + 1), color];\n return {\n statusBarColor: color,\n statusBarColorHistory: newHistory,\n statusBarColorIndex: newHistory.length - 1,\n };\n });\n }, []);\n\n const historyStatusBarColor = useCallback((steps: number) => {\n setState((prev) => {\n const newIndex = prev.statusBarColorIndex + steps;\n if (newIndex >= 0 && newIndex < prev.statusBarColorHistory.length) {\n return {\n ...prev,\n statusBarColor: prev.statusBarColorHistory[newIndex],\n statusBarColorIndex: newIndex,\n };\n }\n return prev;\n });\n }, []);\n\n const setDefaultStatusBarColor = useCallback(() => {\n setState({\n statusBarColor: defaultColor,\n statusBarColorHistory: [defaultColor],\n statusBarColorIndex: 0,\n });\n }, [defaultColor]);\n\n useEffect(() => {\n setState({\n statusBarColor: defaultColor,\n statusBarColorHistory: [defaultColor],\n statusBarColorIndex: 0,\n });\n }, [defaultColor]);\n\n return {\n statusBarColor: state.statusBarColor,\n changeStatusBarColor,\n historyStatusBarColor,\n setDefaultStatusBarColor,\n statusBarColorIndex: state.statusBarColorIndex,\n };\n};\n\n/**\n * Custom hook to manage background images with history.\n */\ntype BgImageState = {\n bgImage: string | null;\n bgImageHistory: (string | null)[];\n bgImageIndex: number;\n};\n\nexport const useBgImage = (defaultImage: string | null) => {\n const [state, setState] = useState<BgImageState>({\n bgImage: defaultImage,\n bgImageHistory: [defaultImage],\n bgImageIndex: 0,\n });\n\n const changeBgImage = useCallback((image: string | null) => {\n setState((prev) => {\n const newHistory = [...prev.bgImageHistory.slice(0, prev.bgImageIndex + 1), image];\n return {\n bgImage: image,\n bgImageHistory: newHistory,\n bgImageIndex: newHistory.length - 1,\n };\n });\n }, []);\n\n const historyBgImage = useCallback((steps: number) => {\n setState((prev) => {\n const newIndex = prev.bgImageIndex + steps;\n if (newIndex >= 0 && newIndex < prev.bgImageHistory.length) {\n return {\n ...prev,\n bgImage: prev.bgImageHistory[newIndex],\n bgImageIndex: newIndex,\n };\n }\n return prev;\n });\n }, []);\n\n const setDefaultBgImage = useCallback(() => {\n setState({\n bgImage: defaultImage,\n bgImageHistory: [defaultImage],\n bgImageIndex: 0,\n });\n }, [defaultImage]);\n\n useEffect(() => {\n setState({\n bgImage: defaultImage,\n bgImageHistory: [defaultImage],\n bgImageIndex: 0,\n });\n }, [defaultImage]);\n\n return {\n bgImage: state.bgImage,\n changeBgImage,\n historyBgImage,\n setDefaultBgImage,\n bgImageIndex: state.bgImageIndex,\n };\n};\n\ntype TitleState = {\n title: string | null;\n titleHistory: (string | null)[];\n titleIndex: number;\n};\n/**\n * Custom hook to manage the document title with history tracking.\n */\nconst useTitle = (defaultTitle: string | null) => {\n const [state, setState] = useState<TitleState>({\n title: defaultTitle,\n titleHistory: [defaultTitle],\n titleIndex: 0,\n });\n\n const changeTitle = useCallback((newTitle: string | null) => {\n setState((prev) => {\n const newHistory = [...prev.titleHistory.slice(0, prev.titleIndex + 1), newTitle];\n return {\n title: newTitle,\n titleHistory: newHistory,\n titleIndex: newHistory.length - 1,\n };\n });\n }, []);\n\n const setHistoryTitle = useCallback((steps: number) => {\n setState((prev) => {\n const newIndex = prev.titleIndex + steps;\n if (newIndex >= 0 && newIndex < prev.titleHistory.length) {\n return {\n ...prev,\n title: prev.titleHistory[newIndex],\n titleIndex: newIndex,\n };\n }\n return prev;\n });\n }, []);\n\n const setDefaultTitle = useCallback(() => {\n setState({\n title: defaultTitle,\n titleHistory: [defaultTitle],\n titleIndex: 0,\n });\n }, [defaultTitle]);\n\n useEffect(() => {\n setState({\n title: defaultTitle,\n titleHistory: [defaultTitle],\n titleIndex: 0,\n });\n }, [defaultTitle]);\n\n return {\n title: state.title,\n titleIndex: state.titleIndex,\n titleHistory: state.titleHistory,\n changeTitle,\n setHistoryTitle,\n setDefaultTitle,\n };\n};\n\n/**\n * Custom hook to manage a description with history tracking.\n */\ntype DescriptionState = {\n description: string;\n descriptionHistory: string[];\n descriptionIndex: number;\n};\n\nexport const useDescription = (defaultDescription: string) => {\n const [state, setState] = useState<DescriptionState>({\n description: defaultDescription,\n descriptionHistory: [defaultDescription],\n descriptionIndex: 0,\n });\n\n const changeDescription = useCallback((newDescription: string) => {\n setState((prev) => {\n const newHistory = [...prev.descriptionHistory.slice(0, prev.descriptionIndex + 1), newDescription];\n return {\n description: newDescription,\n descriptionHistory: newHistory,\n descriptionIndex: newHistory.length - 1,\n };\n });\n }, []);\n\n const historyDescription = useCallback((steps: number) => {\n setState((prev) => {\n const newIndex = prev.descriptionIndex + steps;\n if (newIndex >= 0 && newIndex < prev.descriptionHistory.length) {\n return {\n ...prev,\n description: prev.descriptionHistory[newIndex],\n descriptionIndex: newIndex,\n };\n }\n return prev;\n });\n }, []);\n\n const setDefaultDescription = useCallback(() => {\n setState({\n description: defaultDescription,\n descriptionHistory: [defaultDescription],\n descriptionIndex: 0,\n });\n }, [defaultDescription]);\n\n useEffect(() => {\n setState({\n description: defaultDescription,\n descriptionHistory: [defaultDescription],\n descriptionIndex: 0,\n });\n }, [defaultDescription]);\n\n return {\n description: state.description,\n changeDescription,\n historyDescription,\n setDefaultDescription,\n descriptionIndex: state.descriptionIndex,\n };\n};\n","import { addGridTransition } from '@local/styles/add';\nimport { JeneseiPalette } from '@local/theme';\n\nimport { css, styled } from 'styled-components';\n\nimport { ScreenWidthProps } from '../context-screen-width';\nimport { ProviderAppOutletChildrenProps, ProviderAppOutletProps, ProviderAppWrapperProps } from '.';\n\nexport const ProviderAppWrapper = styled.div<ProviderAppWrapperProps>`\n display: flex;\n flex-direction: column;\n max-width: 100dvw;\n min-height: 100dvh;\n width: 100%;\n overflow: hidden;\n position: relative;\n\n background-color: ${(props) => JeneseiPalette[props.$bgColor]};\n background-image: url(${(props) => props.$bgImage});\n`;\n\nconst generateGridTemplateAreas = (props: ProviderAppOutletProps) => {\n let templateAreas = `\n \"notification notification notification\"\n \"header header header\"\n \"nav nav nav\"\n \"leftAside children rightAside\"\n \"footer footer footer\"\n `;\n\n templateAreas = `\n \"notification notification notification\"\n \"${props.$leftAside?.isTopHeader ? 'leftAside' : 'header'} header ${props.$rightAside?.isTopHeader ? 'rightAside' : 'header'}\"\n \"${props.$leftAside?.isTopHeader ? 'leftAside' : props.$leftAside?.isTopNav ? 'leftAside' : 'nav'} nav ${props.$rightAside?.isTopHeader ? 'rightAside' : props.$rightAside?.isTopNav ? 'rightAside' : 'nav'}\"\n \"leftAside children rightAside\"\n \"${props.$leftAside?.isTopFooter ? 'leftAside' : 'footer'} footer ${props.$rightAside?.isTopFooter ? 'rightAside' : 'footer'}\"\n `;\n\n return templateAreas;\n};\n\nfunction toStyledAppOutletCSS(props: {\n leftAsideWidth: string;\n rightAsideWidth: string;\n notificationHeight: string;\n headerHeight: string;\n navHeight: string;\n footerHeight: string;\n}) {\n return css`\n grid-template-columns: ${() => `${props.leftAsideWidth} 1fr ${props.rightAsideWidth}`};\n grid-template-rows: ${() =>\n `${props.notificationHeight} ${props.headerHeight} ${props.navHeight} 1fr ${props.footerHeight}`};\n `;\n}\nconst addSXAppOutlet = css<ProviderAppOutletProps>`\n ${(props) => {\n const leftAsideWidth = props.$leftAside?.length?.default;\n const rightAsideWidth = props.$rightAside?.length?.default;\n const notificationHeight = props.$notification?.length?.default;\n const headerHeight = props.$header?.length?.default;\n const navHeight = props.$nav?.length?.default;\n const footerHeight = props.$footer?.length?.default;\n return toStyledAppOutletCSS({\n leftAsideWidth: leftAsideWidth ?? '0px',\n rightAsideWidth: rightAsideWidth ?? '0px',\n notificationHeight: notificationHeight ?? '0px',\n headerHeight: headerHeight ?? '0px',\n navHeight: navHeight ?? '0px',\n footerHeight: footerHeight ?? '0px',\n });\n }}\n ${(props) => {\n const leftAsideWidth = props.$leftAside?.length;\n const rightAsideWidth = props.$rightAside?.length;\n const notificationHeight = props.$notification?.length;\n const headerHeight = props.$header?.length;\n const navHeight = props.$nav?.length;\n const footerHeight = props.$footer?.length;\n\n return Object.entries(props.theme.screens)\n .filter(([key]) => key !== 'default')\n .map(([key]) => {\n const deviceKey = key as keyof ScreenWidthProps<string | null>;\n const screenWidth = props.theme.screens[deviceKey]?.width;\n if (!screenWidth) return null;\n return css`\n @media (max-width: ${screenWidth}px) {\n ${toStyledAppOutletCSS({\n leftAsideWidth: leftAsideWidth && leftAsideWidth[deviceKey] ? leftAsideWidth[deviceKey] : '0px',\n rightAsideWidth: rightAsideWidth && rightAsideWidth[deviceKey] ? rightAsideWidth[deviceKey] : '0px',\n notificationHeight:\n notificationHeight && notificationHeight[deviceKey] ? notificationHeight[deviceKey] : '0px',\n headerHeight: headerHeight && headerHeight[deviceKey] ? headerHeight[deviceKey] : '0px',\n navHeight: navHeight && navHeight[deviceKey] ? navHeight[deviceKey] : '0px',\n footerHeight: footerHeight && footerHeight[deviceKey] ? footerHeight[deviceKey] : '0px',\n })}\n }\n `;\n });\n }}\n`;\nexport const ProviderAppOutlet = styled.div<ProviderAppOutletProps>`\n display: grid;\n width: 100%;\n height: 100%;\n\n overflow-y: auto;\n overflow-x: hidden;\n scrollbar-gutter: stable;\n \n min-height: 100dvh;\n max-height: 100dvh;\n \n ${addGridTransition};\n\n ${(props) => `\n grid-template-areas: ${generateGridTemplateAreas(props)};\n `}\n\n ${addSXAppOutlet};\n`;\n\nexport const ProviderAppOutletChildren = styled.main<ProviderAppOutletChildrenProps>`\n z-index: ${(props) => props?.$main?.zIndex ?? 'auto'};\n display: flex;\n grid-area: children;\n max-width: 100%;\n max-height: 100%;\n overflow: ${(props) => (props.$isScrollOutlet ? 'auto' : 'visible')};\n scrollbar-gutter: stable;\n`;\n\nexport const ProviderAppOutletNotification = styled.section<ProviderAppOutletProps>`\n z-index: ${(props) => props?.$notification?.zIndex ?? 'auto'};\n grid-area: notification;\n display: flex;\n`;\n\nexport const ProviderAppOutletHeader = styled.header<ProviderAppOutletProps>`\n z-index: ${(props) => props?.$header?.zIndex ?? 'auto'};\n grid-area: header;\n display: flex;\n`;\n\nexport const ProviderAppOutletFooter = styled.footer<ProviderAppOutletProps>`\n z-index: ${(props) => props?.$footer?.zIndex ?? 'auto'};\n grid-area: footer;\n display: flex;\n`;\n\nexport const ProviderAppOutletNav = styled.nav<ProviderAppOutletProps>`\n z-index: ${(props) => props?.$nav?.zIndex ?? 'auto'};\n grid-area: nav;\n display: flex;\n`;\n\nexport const ProviderAppOutletLeftAside = styled.aside<ProviderAppOutletProps>`\n z-index: ${(props) => props?.$leftAside?.zIndex ?? 'auto'};\n grid-area: leftAside;\n display: flex;\n`;\n\nexport const ProviderAppOutletRightAside = styled.aside<ProviderAppOutletProps>`\n z-index: ${(props) => props?.$rightAside?.zIndex ?? 'auto'};\n grid-area: rightAside;\n display: flex;\n`;\n","import { useContext } from 'react';\n\nimport { AppContext } from '.';\n\n/**\n * Custom hook to access the AppContext.\n */\nexport const useApp = () => {\n const context = useContext(AppContext);\n if (!context) {\n throw new Error('useApp must be used within an ProviderApp');\n }\n return context;\n};\n"],"names":["jsxs","jsx","_a"],"mappings":";;;;;;;AAoBO,MAAM,aAAa,cAAsC,IAAI;AA0B7D,MAAM,cAAoC,CAAC,UAAU;;AAC1D,QAAM,EAAE,SAAS,eAAe,gBAAgB,sBAAsB,WAAW,MAAM,cAAc;AACrG,QAAM,EAAE,gBAAgB,sBAAsB,uBAAuB,6BAA6B;AAAA,IAChG,MAAM;AAAA,EAAA;AAER,QAAM,EAAE,SAAS,eAAe,gBAAgB,sBAAsB,WAAW,MAAM,kBAAkB,IAAI;AAC7G,QAAM,EAAE,OAAO,aAAa,iBAAiB,oBAAoB,SAAS,MAAM,gBAAgB,IAAI;AACpG,QAAM,EAAE,aAAa,mBAAmB,oBAAoB,0BAA0B;AAAA,IACpF,MAAM;AAAA,EAAA;AAER,QAAM,EAAE,eAAe,aAAA,IAAiB,WAAW,MAAM,cAAc;AACvE,QAAM,EAA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ACxD;AAAA;AAAA,IAEC,cAAc;AAAA;AAGX,MAAM,4BAA4B,OAAO;AAAA,aACnC,CAAC,UAAA;;AAAU,+CAAO,UAAP,mBAAc,WAAU;AAAA,CAAM;AAAA;AAAA;AAAA;AAAA;AAAA,cAKxC,CAAC,UAAW,MAAM,kBAAkB,SAAS,SAAU;AAAA;AAAA;AAI9D,MAAM,gCAAgC,OAAO;AAAA,aACvC,CAAC,UAAA;;AAAU,+CAAO,kBAAP,mBAAsB,WAAU;AAAA,CAAM;AAAA;AAAA;AAAA;AAKvD,MAAM,0BAA0B,OAAO;AAAA,aACjC,CAAC,UAAA;;AAAU,+CAAO,YAAP,mBAAgB,WAAU;AAAA,CAAM;AAAA;AAAA;AAAA;AAKjD,MAAM,0BAA0B,OAAO;AAAA,aACjC,CAAC,UAAA;;AAAU,+CAAO,YAAP,mBAAgB,WAAU;AAAA,CAAM;AAAA;AAAA;AAAA;AAKjD,MAAM,uBAAuB,OAAO;AAAA,aAC9B,CAAC,UAAA;;AAAU,+CAAO,SAAP,mBAAa,WAAU;AAAA,CAAM;AAAA;AAAA;AAAA;AAK9C,MAAM,6BAA6B,OAAO;AAAA,aACpC,CAAC,UAAA;;AAAU,+CAAO,eAAP,mBAAmB,WAAU;AAAA,CAAM;AAAA;AAAA;AAAA;AAKpD,MAAM,8BAA8B,OAAO;AAAA,aACrC,CAAC,UAAA;;AAAU,+CAAO,gBAAP,mBAAoB,WAAU;AAAA,CAAM;AAAA;AAAA;AAAA;AC7JrD,MAAM,SAAS,MAAM;AAC1B,QAAM,UAAU,WAAW,UAAU;AACrC,MAAI,CAAC,SAAS;AACZ,UAAM,IAAI,MAAM,2CAA2C;AAAA,EAAA;AAE7D,SAAO;AACT;"}
@@ -1,4 +1,4 @@
1
- "use strict";const e=require("react"),t=require("./jsx-runtime-BcGej2Kr.cjs"),i=require("./area-t259bohc.cjs"),o=require("./theme.global-CcoD5bPP.cjs"),r=require("./context.hooks-BIsapq-0.cjs"),l=require("./style-Df37KnoJ.cjs"),n=require("styled-components"),s=e.createContext(null),a=t=>{const[i,o]=e.useState(t||{visible:!0,defaultVisible:!0}),r=e.useCallback(e=>{o(e)},[]);return e.useEffect(()=>{t&&o(t)},[t]),{previewProps:i,changePreview:r}},d=t=>{const[i,o]=e.useState({bgColor:t,bgColorHistory:[t],bgColorIndex:0}),r=e.useCallback(e=>{o(t=>{const i=[...t.bgColorHistory.slice(0,t.bgColorIndex+1),e];return{bgColor:e,bgColorHistory:i,bgColorIndex:i.length-1}})},[]),l=e.useCallback(e=>{o(t=>{const i=t.bgColorIndex+e;return i>=0&&i<t.bgColorHistory.length?{...t,bgColor:t.bgColorHistory[i],bgColorIndex:i}:t})},[]),n=e.useCallback(()=>{o({bgColor:t,bgColorHistory:[t],bgColorIndex:0})},[t]);return e.useEffect(()=>{o({bgColor:t,bgColorHistory:[t],bgColorIndex:0})},[t]),{bgColor:i.bgColor,changeBgColor:r,historyBgColor:l,setDefaultBgColor:n,bgColorIndex:i.bgColorIndex}},u=t=>{const[i,o]=e.useState({statusBarColor:t,statusBarColorHistory:[t],statusBarColorIndex:0}),r=e.useCallback(e=>{o(t=>{const i=[...t.statusBarColorHistory.slice(0,t.statusBarColorIndex+1),e];return{statusBarColor:e,statusBarColorHistory:i,statusBarColorIndex:i.length-1}})},[]),l=e.useCallback(e=>{o(t=>{const i=t.statusBarColorIndex+e;return i>=0&&i<t.statusBarColorHistory.length?{...t,statusBarColor:t.statusBarColorHistory[i],statusBarColorIndex:i}:t})},[]),n=e.useCallback(()=>{o({statusBarColor:t,statusBarColorHistory:[t],statusBarColorIndex:0})},[t]);return e.useEffect(()=>{o({statusBarColor:t,statusBarColorHistory:[t],statusBarColorIndex:0})},[t]),{statusBarColor:i.statusBarColor,changeStatusBarColor:r,historyStatusBarColor:l,setDefaultStatusBarColor:n,statusBarColorIndex:i.statusBarColorIndex}},g=t=>{const[i,o]=e.useState({bgImage:t,bgImageHistory:[t],bgImageIndex:0}),r=e.useCallback(e=>{o(t=>{const i=[...t.bgImageHistory.slice(0,t.bgImageIndex+1),e];return{bgImage:e,bgImageHistory:i,bgImageIndex:i.length-1}})},[]),l=e.useCallback(e=>{o(t=>{const i=t.bgImageIndex+e;return i>=0&&i<t.bgImageHistory.length?{...t,bgImage:t.bgImageHistory[i],bgImageIndex:i}:t})},[]),n=e.useCallback(()=>{o({bgImage:t,bgImageHistory:[t],bgImageIndex:0})},[t]);return e.useEffect(()=>{o({bgImage:t,bgImageHistory:[t],bgImageIndex:0})},[t]),{bgImage:i.bgImage,changeBgImage:r,historyBgImage:l,setDefaultBgImage:n,bgImageIndex:i.bgImageIndex}},c=t=>{const[i,o]=e.useState({title:t,titleHistory:[t],titleIndex:0}),r=e.useCallback(e=>{o(t=>{const i=[...t.titleHistory.slice(0,t.titleIndex+1),e];return{title:e,titleHistory:i,titleIndex:i.length-1}})},[]),l=e.useCallback(e=>{o(t=>{const i=t.titleIndex+e;return i>=0&&i<t.titleHistory.length?{...t,title:t.titleHistory[i],titleIndex:i}:t})},[]),n=e.useCallback(()=>{o({title:t,titleHistory:[t],titleIndex:0})},[t]);return e.useEffect(()=>{o({title:t,titleHistory:[t],titleIndex:0})},[t]),{title:i.title,titleIndex:i.titleIndex,titleHistory:i.titleHistory,changeTitle:r,setHistoryTitle:l,setDefaultTitle:n}},h=t=>{const[i,o]=e.useState({description:t,descriptionHistory:[t],descriptionIndex:0}),r=e.useCallback(e=>{o(t=>{const i=[...t.descriptionHistory.slice(0,t.descriptionIndex+1),e];return{description:e,descriptionHistory:i,descriptionIndex:i.length-1}})},[]),l=e.useCallback(e=>{o(t=>{const i=t.descriptionIndex+e;return i>=0&&i<t.descriptionHistory.length?{...t,description:t.descriptionHistory[i],descriptionIndex:i}:t})},[]),n=e.useCallback(()=>{o({description:t,descriptionHistory:[t],descriptionIndex:0})},[t]);return e.useEffect(()=>{o({description:t,descriptionHistory:[t],descriptionIndex:0})},[t]),{description:i.description,changeDescription:r,historyDescription:l,setDefaultDescription:n,descriptionIndex:i.descriptionIndex}},x=n.styled.div`
1
+ "use strict";const e=require("react"),t=require("./jsx-runtime-BcGej2Kr.cjs"),i=require("./area-CZkDIeGx.cjs"),o=require("./theme.global-CcoD5bPP.cjs"),r=require("./context.hooks-BIsapq-0.cjs"),l=require("./style-Df37KnoJ.cjs"),n=require("styled-components"),s=e.createContext(null),a=t=>{const[i,o]=e.useState(t||{visible:!0,defaultVisible:!0}),r=e.useCallback(e=>{o(e)},[]);return e.useEffect(()=>{t&&o(t)},[t]),{previewProps:i,changePreview:r}},d=t=>{const[i,o]=e.useState({bgColor:t,bgColorHistory:[t],bgColorIndex:0}),r=e.useCallback(e=>{o(t=>{const i=[...t.bgColorHistory.slice(0,t.bgColorIndex+1),e];return{bgColor:e,bgColorHistory:i,bgColorIndex:i.length-1}})},[]),l=e.useCallback(e=>{o(t=>{const i=t.bgColorIndex+e;return i>=0&&i<t.bgColorHistory.length?{...t,bgColor:t.bgColorHistory[i],bgColorIndex:i}:t})},[]),n=e.useCallback(()=>{o({bgColor:t,bgColorHistory:[t],bgColorIndex:0})},[t]);return e.useEffect(()=>{o({bgColor:t,bgColorHistory:[t],bgColorIndex:0})},[t]),{bgColor:i.bgColor,changeBgColor:r,historyBgColor:l,setDefaultBgColor:n,bgColorIndex:i.bgColorIndex}},u=t=>{const[i,o]=e.useState({statusBarColor:t,statusBarColorHistory:[t],statusBarColorIndex:0}),r=e.useCallback(e=>{o(t=>{const i=[...t.statusBarColorHistory.slice(0,t.statusBarColorIndex+1),e];return{statusBarColor:e,statusBarColorHistory:i,statusBarColorIndex:i.length-1}})},[]),l=e.useCallback(e=>{o(t=>{const i=t.statusBarColorIndex+e;return i>=0&&i<t.statusBarColorHistory.length?{...t,statusBarColor:t.statusBarColorHistory[i],statusBarColorIndex:i}:t})},[]),n=e.useCallback(()=>{o({statusBarColor:t,statusBarColorHistory:[t],statusBarColorIndex:0})},[t]);return e.useEffect(()=>{o({statusBarColor:t,statusBarColorHistory:[t],statusBarColorIndex:0})},[t]),{statusBarColor:i.statusBarColor,changeStatusBarColor:r,historyStatusBarColor:l,setDefaultStatusBarColor:n,statusBarColorIndex:i.statusBarColorIndex}},g=t=>{const[i,o]=e.useState({bgImage:t,bgImageHistory:[t],bgImageIndex:0}),r=e.useCallback(e=>{o(t=>{const i=[...t.bgImageHistory.slice(0,t.bgImageIndex+1),e];return{bgImage:e,bgImageHistory:i,bgImageIndex:i.length-1}})},[]),l=e.useCallback(e=>{o(t=>{const i=t.bgImageIndex+e;return i>=0&&i<t.bgImageHistory.length?{...t,bgImage:t.bgImageHistory[i],bgImageIndex:i}:t})},[]),n=e.useCallback(()=>{o({bgImage:t,bgImageHistory:[t],bgImageIndex:0})},[t]);return e.useEffect(()=>{o({bgImage:t,bgImageHistory:[t],bgImageIndex:0})},[t]),{bgImage:i.bgImage,changeBgImage:r,historyBgImage:l,setDefaultBgImage:n,bgImageIndex:i.bgImageIndex}},c=t=>{const[i,o]=e.useState({title:t,titleHistory:[t],titleIndex:0}),r=e.useCallback(e=>{o(t=>{const i=[...t.titleHistory.slice(0,t.titleIndex+1),e];return{title:e,titleHistory:i,titleIndex:i.length-1}})},[]),l=e.useCallback(e=>{o(t=>{const i=t.titleIndex+e;return i>=0&&i<t.titleHistory.length?{...t,title:t.titleHistory[i],titleIndex:i}:t})},[]),n=e.useCallback(()=>{o({title:t,titleHistory:[t],titleIndex:0})},[t]);return e.useEffect(()=>{o({title:t,titleHistory:[t],titleIndex:0})},[t]),{title:i.title,titleIndex:i.titleIndex,titleHistory:i.titleHistory,changeTitle:r,setHistoryTitle:l,setDefaultTitle:n}},h=t=>{const[i,o]=e.useState({description:t,descriptionHistory:[t],descriptionIndex:0}),r=e.useCallback(e=>{o(t=>{const i=[...t.descriptionHistory.slice(0,t.descriptionIndex+1),e];return{description:e,descriptionHistory:i,descriptionIndex:i.length-1}})},[]),l=e.useCallback(e=>{o(t=>{const i=t.descriptionIndex+e;return i>=0&&i<t.descriptionHistory.length?{...t,description:t.descriptionHistory[i],descriptionIndex:i}:t})},[]),n=e.useCallback(()=>{o({description:t,descriptionHistory:[t],descriptionIndex:0})},[t]);return e.useEffect(()=>{o({description:t,descriptionHistory:[t],descriptionIndex:0})},[t]),{description:i.description,changeDescription:r,historyDescription:l,setDefaultDescription:n,descriptionIndex:i.descriptionIndex}},x=n.styled.div`
2
2
  display: flex;
3
3
  flex-direction: column;
4
4
  max-width: 100dvw;
@@ -69,4 +69,4 @@
69
69
  grid-area: rightAside;
70
70
  display: flex;
71
71
  `;exports.AppContext=s,exports.ProviderApp=e=>{var l,n,p,v,B,H,j,D,w,E,S,P,k,T,R,O,z,W,q,N,F,J,G,L;const{bgColor:V,changeBgColor:K,historyBgColor:M,setDefaultBgColor:Q}=d(e.defaultBgColor),{statusBarColor:U,changeStatusBarColor:X,historyStatusBarColor:Y,setDefaultStatusBarColor:Z}=u(e.defaultStatusBarColor),{bgImage:_,changeBgImage:ee,historyBgImage:te,setDefaultBgImage:ie}=g(e.defaultBgImage||null),{title:oe,changeTitle:re,setHistoryTitle:le,setDefaultTitle:ne}=c(e.defaultTitle||null),{description:se,changeDescription:ae,historyDescription:de,setDefaultDescription:ue}=h(e.defaultDescription),{changePreview:ge,previewProps:ce}=a(e.defaultPreview),{screenActual:he}=r.useScreenWidth();return t.jsxRuntimeExports.jsxs(s.Provider,{value:{changePreview:ge,changeStatusBarColor:X,changeBgColor:K,changeBgImage:ee,changeTitle:re,changeDescription:ae,historyStatusBarColor:Y,historyBgColor:M,historyBgImage:te,setHistoryTitle:le,historyDescription:de,setDefaultStatusBarColor:Z,setDefaultBgColor:Q,setDefaultBgImage:ie,setDefaultTitle:ne,setDefaultDescription:ue},children:[t.jsxRuntimeExports.jsx("title",{children:oe}),t.jsxRuntimeExports.jsx("meta",{name:"description",content:se}),t.jsxRuntimeExports.jsx("meta",{name:"theme-color",content:o.JeneseiPalette[U]}),t.jsxRuntimeExports.jsx("meta",{name:"apple-mobile-web-app-status-bar-style",content:"default"}),t.jsxRuntimeExports.jsx("meta",{name:"mobile-web-app-capable",content:"yes"}),t.jsxRuntimeExports.jsx(i.Preview,{...ce,children:t.jsxRuntimeExports.jsx(x,{$bgColor:V,$bgImage:_,children:t.jsxRuntimeExports.jsxs(f,{$isScrollOutlet:e.isScrollOutlet,$footer:e.footer,$notification:e.notification,$header:e.header,$nav:e.nav,$leftAside:e.leftAside,$rightAside:e.rightAside,children:[(null==(l=e.notification)?void 0:l.length)&&(null==(p=null==(n=e.notification)?void 0:n.length)?void 0:p[he])?t.jsxRuntimeExports.jsx(C,{$notification:e.notification,children:(null==(v=e.notification)?void 0:v.component)||null}):null,(null==(B=e.header)?void 0:B.length)&&(null==(j=null==(H=e.header)?void 0:H.length)?void 0:j[he])?t.jsxRuntimeExports.jsx(I,{$header:e.header,children:(null==(D=e.header)?void 0:D.component)||null}):null,(null==(w=e.nav)?void 0:w.length)&&(null==(S=null==(E=e.nav)?void 0:E.length)?void 0:S[he])?t.jsxRuntimeExports.jsx($,{$nav:e.nav,children:(null==(P=e.nav)?void 0:P.component)||null}):null,(null==(k=e.leftAside)?void 0:k.length)&&(null==(R=null==(T=e.leftAside)?void 0:T.length)?void 0:R[he])?t.jsxRuntimeExports.jsx(y,{$leftAside:e.leftAside,children:(null==(O=e.leftAside)?void 0:O.component)||null}):null,t.jsxRuntimeExports.jsx(m,{$isScrollOutlet:e.isScrollOutlet,$main:e.main,children:e.children}),(null==(z=e.rightAside)?void 0:z.length)&&(null==(q=null==(W=e.rightAside)?void 0:W.length)?void 0:q[he])?t.jsxRuntimeExports.jsx(A,{$rightAside:e.rightAside,children:(null==(N=e.rightAside)?void 0:N.component)||null}):null,(null==(F=e.footer)?void 0:F.length)&&(null==(G=null==(J=e.footer)?void 0:J.length)?void 0:G[he])?t.jsxRuntimeExports.jsx(b,{$footer:e.footer,children:(null==(L=e.footer)?void 0:L.component)||null}):null]})})})]})},exports.ProviderAppOutlet=f,exports.ProviderAppOutletChildren=m,exports.ProviderAppOutletFooter=b,exports.ProviderAppOutletHeader=I,exports.ProviderAppOutletLeftAside=y,exports.ProviderAppOutletNav=$,exports.ProviderAppOutletNotification=C,exports.ProviderAppOutletRightAside=A,exports.ProviderAppWrapper=x,exports.useApp=()=>{const t=e.useContext(s);if(!t)throw new Error("useApp must be used within an ProviderApp");return t},exports.useBgColor=d,exports.useBgImage=g,exports.useDescription=h,exports.useStatusBarColor=u;
72
- //# sourceMappingURL=context.hooks-Ci37RyLf.cjs.map
72
+ //# sourceMappingURL=context.hooks-XBiTuVyt.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"context.hooks-Ci37RyLf.cjs","sources":["../src/contexts/context-app/context.tsx","../src/contexts/context-app/context.styles.ts","../src/contexts/context-app/context.hooks.ts"],"sourcesContent":["import { Preview, PreviewAdditionalProps } from '@local/areas/preview';\nimport { IThemePaletteKeys, JeneseiPalette } from '@local/theme';\n\nimport { createContext, FC, useCallback, useEffect, useState } from 'react';\n\nimport { useScreenWidth } from '../context-screen-width';\nimport {\n AppContextProps,\n ProviderAppOutlet,\n ProviderAppOutletChildren,\n ProviderAppOutletFooter,\n ProviderAppOutletHeader,\n ProviderAppOutletLeftAside,\n ProviderAppOutletNav,\n ProviderAppOutletNotification,\n ProviderAppOutletRightAside,\n ProviderAppProps,\n ProviderAppWrapper,\n} from '.';\n\nexport const AppContext = createContext<AppContextProps | null>(null);\n\n/**\n * ProviderApp component is a context context that manages various application-level states\n * such as background color, status bar color, background image, title, and description.\n * It uses several custom hooks to handle these states and provides them via the AppContext.\n *\n * @component\n *\n * @param {ProviderAppProps} props - The properties passed to the ProviderApp component.\n * @param {string} props.defaultBgColor - The default background color.\n * @param {string} props.defaultStatusBarColor - The default status bar color.\n * @param {string} [props.defaultBgImage] - The default background image.\n * @param {string} [props.defaultTitle] - The default title.\n * @param {string} [props.defaultDescription] - The default description.\n * @param {boolean} [props.isScrollOutlet] - Determines if the outlet should be scrollable.\n * @param {object} [props.footer] - The footer component and its properties.\n * @param {object} [props.notification] - The notification component and its properties.\n * @param {object} [props.header] - The header component and its properties.\n * @param {object} [props.nav] - The navigation component and its properties.\n * @param {object} [props.leftAside] - The left aside component and its properties.\n * @param {object} [props.rightAside] - The right aside component and its properties.\n * @param {React.ReactNode} props.children - The children components to be rendered inside the ProviderApp.\n *\n * @returns {JSX.Element} The rendered ProviderApp component.\n */\nexport const ProviderApp: FC<ProviderAppProps> = (props) => {\n const { bgColor, changeBgColor, historyBgColor, setDefaultBgColor } = useBgColor(props.defaultBgColor);\n const { statusBarColor, changeStatusBarColor, historyStatusBarColor, setDefaultStatusBarColor } = useStatusBarColor(\n props.defaultStatusBarColor,\n );\n const { bgImage, changeBgImage, historyBgImage, setDefaultBgImage } = useBgImage(props.defaultBgImage || null);\n const { title, changeTitle, setHistoryTitle, setDefaultTitle } = useTitle(props.defaultTitle || null);\n const { description, changeDescription, historyDescription, setDefaultDescription } = useDescription(\n props.defaultDescription,\n );\n const { changePreview, previewProps } = usePreview(props.defaultPreview);\n const { screenActual } = useScreenWidth();\n\n return (\n <AppContext.Provider\n value={{\n changePreview,\n changeStatusBarColor,\n changeBgColor,\n changeBgImage,\n changeTitle,\n changeDescription,\n historyStatusBarColor,\n historyBgColor,\n historyBgImage,\n setHistoryTitle,\n historyDescription,\n setDefaultStatusBarColor,\n setDefaultBgColor,\n setDefaultBgImage,\n setDefaultTitle,\n setDefaultDescription,\n }}\n >\n <title>{title}</title>\n <meta name='description' content={description} />\n <meta name='theme-color' content={JeneseiPalette[statusBarColor]} />\n <meta name='apple-mobile-web-app-status-bar-style' content='default' />\n <meta name='mobile-web-app-capable' content='yes' />\n <Preview {...previewProps}>\n <ProviderAppWrapper $bgColor={bgColor} $bgImage={bgImage}>\n <ProviderAppOutlet\n $isScrollOutlet={props.isScrollOutlet}\n $footer={props.footer}\n $notification={props.notification}\n $header={props.header}\n $nav={props.nav}\n $leftAside={props.leftAside}\n $rightAside={props.rightAside}\n >\n {props.notification?.length && props.notification?.length?.[screenActual] ? (\n <ProviderAppOutletNotification $notification={props.notification}>\n {props.notification?.component || null}\n </ProviderAppOutletNotification>\n ) : null}\n\n {props.header?.length && props.header?.length?.[screenActual] ? (\n <ProviderAppOutletHeader $header={props.header}>\n {props.header?.component || null}\n </ProviderAppOutletHeader>\n ) : null}\n\n {props.nav?.length && props.nav?.length?.[screenActual] ? (\n <ProviderAppOutletNav $nav={props.nav}>{props.nav?.component || null}</ProviderAppOutletNav>\n ) : null}\n\n {props.leftAside?.length && props.leftAside?.length?.[screenActual] ? (\n <ProviderAppOutletLeftAside $leftAside={props.leftAside}>\n {props.leftAside?.component || null}\n </ProviderAppOutletLeftAside>\n ) : null}\n\n <ProviderAppOutletChildren $isScrollOutlet={props.isScrollOutlet} $main={props.main}>\n {props.children}\n </ProviderAppOutletChildren>\n\n {props.rightAside?.length && props.rightAside?.length?.[screenActual] ? (\n <ProviderAppOutletRightAside $rightAside={props.rightAside}>\n {props.rightAside?.component || null}\n </ProviderAppOutletRightAside>\n ) : null}\n\n {props.footer?.length && props.footer?.length?.[screenActual] ? (\n <ProviderAppOutletFooter $footer={props.footer}>\n {props.footer?.component || null}\n </ProviderAppOutletFooter>\n ) : null}\n </ProviderAppOutlet>\n </ProviderAppWrapper>\n </Preview>\n </AppContext.Provider>\n );\n};\n\n/**\n * Custom hook to manage preview properties.\n */\nconst usePreview = (defaultPreview: ProviderAppProps['defaultPreview']) => {\n const [previewProps, setPreviewProps] = useState(defaultPreview || { visible: true, defaultVisible: true });\n\n const changePreview = useCallback((newPreviewProps: PreviewAdditionalProps) => {\n setPreviewProps(newPreviewProps);\n }, []);\n\n useEffect(() => {\n if (defaultPreview) setPreviewProps(defaultPreview);\n }, [defaultPreview]);\n\n return { previewProps, changePreview };\n};\n\n/**\n * Custom hook to manage background color state with history tracking.\n */\ntype BgColorState = {\n bgColor: IThemePaletteKeys;\n bgColorHistory: IThemePaletteKeys[];\n bgColorIndex: number;\n};\n\nexport const useBgColor = (defaultColor: IThemePaletteKeys) => {\n const [state, setState] = useState<BgColorState>({\n bgColor: defaultColor,\n bgColorHistory: [defaultColor],\n bgColorIndex: 0,\n });\n\n const changeBgColor = useCallback((color: IThemePaletteKeys) => {\n setState((prev) => {\n const newHistory = [...prev.bgColorHistory.slice(0, prev.bgColorIndex + 1), color];\n return {\n bgColor: color,\n bgColorHistory: newHistory,\n bgColorIndex: newHistory.length - 1,\n };\n });\n }, []);\n\n const historyBgColor = useCallback((steps: number) => {\n setState((prev) => {\n const newIndex = prev.bgColorIndex + steps;\n if (newIndex >= 0 && newIndex < prev.bgColorHistory.length) {\n return {\n ...prev,\n bgColor: prev.bgColorHistory[newIndex],\n bgColorIndex: newIndex,\n };\n }\n return prev;\n });\n }, []);\n\n const setDefaultBgColor = useCallback(() => {\n setState({\n bgColor: defaultColor,\n bgColorHistory: [defaultColor],\n bgColorIndex: 0,\n });\n }, [defaultColor]);\n\n useEffect(() => {\n setState({\n bgColor: defaultColor,\n bgColorHistory: [defaultColor],\n bgColorIndex: 0,\n });\n }, [defaultColor]);\n\n return {\n bgColor: state.bgColor,\n changeBgColor,\n historyBgColor,\n setDefaultBgColor,\n bgColorIndex: state.bgColorIndex,\n };\n};\n\n/**\n * Custom hook to manage the status bar color with history tracking.\n */\ntype StatusBarColorState = {\n statusBarColor: IThemePaletteKeys;\n statusBarColorHistory: IThemePaletteKeys[];\n statusBarColorIndex: number;\n};\n\nexport const useStatusBarColor = (defaultColor: IThemePaletteKeys) => {\n const [state, setState] = useState<StatusBarColorState>({\n statusBarColor: defaultColor,\n statusBarColorHistory: [defaultColor],\n statusBarColorIndex: 0,\n });\n\n const changeStatusBarColor = useCallback((color: IThemePaletteKeys) => {\n setState((prev) => {\n const newHistory = [...prev.statusBarColorHistory.slice(0, prev.statusBarColorIndex + 1), color];\n return {\n statusBarColor: color,\n statusBarColorHistory: newHistory,\n statusBarColorIndex: newHistory.length - 1,\n };\n });\n }, []);\n\n const historyStatusBarColor = useCallback((steps: number) => {\n setState((prev) => {\n const newIndex = prev.statusBarColorIndex + steps;\n if (newIndex >= 0 && newIndex < prev.statusBarColorHistory.length) {\n return {\n ...prev,\n statusBarColor: prev.statusBarColorHistory[newIndex],\n statusBarColorIndex: newIndex,\n };\n }\n return prev;\n });\n }, []);\n\n const setDefaultStatusBarColor = useCallback(() => {\n setState({\n statusBarColor: defaultColor,\n statusBarColorHistory: [defaultColor],\n statusBarColorIndex: 0,\n });\n }, [defaultColor]);\n\n useEffect(() => {\n setState({\n statusBarColor: defaultColor,\n statusBarColorHistory: [defaultColor],\n statusBarColorIndex: 0,\n });\n }, [defaultColor]);\n\n return {\n statusBarColor: state.statusBarColor,\n changeStatusBarColor,\n historyStatusBarColor,\n setDefaultStatusBarColor,\n statusBarColorIndex: state.statusBarColorIndex,\n };\n};\n\n/**\n * Custom hook to manage background images with history.\n */\ntype BgImageState = {\n bgImage: string | null;\n bgImageHistory: (string | null)[];\n bgImageIndex: number;\n};\n\nexport const useBgImage = (defaultImage: string | null) => {\n const [state, setState] = useState<BgImageState>({\n bgImage: defaultImage,\n bgImageHistory: [defaultImage],\n bgImageIndex: 0,\n });\n\n const changeBgImage = useCallback((image: string | null) => {\n setState((prev) => {\n const newHistory = [...prev.bgImageHistory.slice(0, prev.bgImageIndex + 1), image];\n return {\n bgImage: image,\n bgImageHistory: newHistory,\n bgImageIndex: newHistory.length - 1,\n };\n });\n }, []);\n\n const historyBgImage = useCallback((steps: number) => {\n setState((prev) => {\n const newIndex = prev.bgImageIndex + steps;\n if (newIndex >= 0 && newIndex < prev.bgImageHistory.length) {\n return {\n ...prev,\n bgImage: prev.bgImageHistory[newIndex],\n bgImageIndex: newIndex,\n };\n }\n return prev;\n });\n }, []);\n\n const setDefaultBgImage = useCallback(() => {\n setState({\n bgImage: defaultImage,\n bgImageHistory: [defaultImage],\n bgImageIndex: 0,\n });\n }, [defaultImage]);\n\n useEffect(() => {\n setState({\n bgImage: defaultImage,\n bgImageHistory: [defaultImage],\n bgImageIndex: 0,\n });\n }, [defaultImage]);\n\n return {\n bgImage: state.bgImage,\n changeBgImage,\n historyBgImage,\n setDefaultBgImage,\n bgImageIndex: state.bgImageIndex,\n };\n};\n\ntype TitleState = {\n title: string | null;\n titleHistory: (string | null)[];\n titleIndex: number;\n};\n/**\n * Custom hook to manage the document title with history tracking.\n */\nconst useTitle = (defaultTitle: string | null) => {\n const [state, setState] = useState<TitleState>({\n title: defaultTitle,\n titleHistory: [defaultTitle],\n titleIndex: 0,\n });\n\n const changeTitle = useCallback((newTitle: string | null) => {\n setState((prev) => {\n const newHistory = [...prev.titleHistory.slice(0, prev.titleIndex + 1), newTitle];\n return {\n title: newTitle,\n titleHistory: newHistory,\n titleIndex: newHistory.length - 1,\n };\n });\n }, []);\n\n const setHistoryTitle = useCallback((steps: number) => {\n setState((prev) => {\n const newIndex = prev.titleIndex + steps;\n if (newIndex >= 0 && newIndex < prev.titleHistory.length) {\n return {\n ...prev,\n title: prev.titleHistory[newIndex],\n titleIndex: newIndex,\n };\n }\n return prev;\n });\n }, []);\n\n const setDefaultTitle = useCallback(() => {\n setState({\n title: defaultTitle,\n titleHistory: [defaultTitle],\n titleIndex: 0,\n });\n }, [defaultTitle]);\n\n useEffect(() => {\n setState({\n title: defaultTitle,\n titleHistory: [defaultTitle],\n titleIndex: 0,\n });\n }, [defaultTitle]);\n\n return {\n title: state.title,\n titleIndex: state.titleIndex,\n titleHistory: state.titleHistory,\n changeTitle,\n setHistoryTitle,\n setDefaultTitle,\n };\n};\n\n/**\n * Custom hook to manage a description with history tracking.\n */\ntype DescriptionState = {\n description: string;\n descriptionHistory: string[];\n descriptionIndex: number;\n};\n\nexport const useDescription = (defaultDescription: string) => {\n const [state, setState] = useState<DescriptionState>({\n description: defaultDescription,\n descriptionHistory: [defaultDescription],\n descriptionIndex: 0,\n });\n\n const changeDescription = useCallback((newDescription: string) => {\n setState((prev) => {\n const newHistory = [...prev.descriptionHistory.slice(0, prev.descriptionIndex + 1), newDescription];\n return {\n description: newDescription,\n descriptionHistory: newHistory,\n descriptionIndex: newHistory.length - 1,\n };\n });\n }, []);\n\n const historyDescription = useCallback((steps: number) => {\n setState((prev) => {\n const newIndex = prev.descriptionIndex + steps;\n if (newIndex >= 0 && newIndex < prev.descriptionHistory.length) {\n return {\n ...prev,\n description: prev.descriptionHistory[newIndex],\n descriptionIndex: newIndex,\n };\n }\n return prev;\n });\n }, []);\n\n const setDefaultDescription = useCallback(() => {\n setState({\n description: defaultDescription,\n descriptionHistory: [defaultDescription],\n descriptionIndex: 0,\n });\n }, [defaultDescription]);\n\n useEffect(() => {\n setState({\n description: defaultDescription,\n descriptionHistory: [defaultDescription],\n descriptionIndex: 0,\n });\n }, [defaultDescription]);\n\n return {\n description: state.description,\n changeDescription,\n historyDescription,\n setDefaultDescription,\n descriptionIndex: state.descriptionIndex,\n };\n};\n","import { addGridTransition } from '@local/styles/add';\nimport { JeneseiPalette } from '@local/theme';\n\nimport { css, styled } from 'styled-components';\n\nimport { ScreenWidthProps } from '../context-screen-width';\nimport { ProviderAppOutletChildrenProps, ProviderAppOutletProps, ProviderAppWrapperProps } from '.';\n\nexport const ProviderAppWrapper = styled.div<ProviderAppWrapperProps>`\n display: flex;\n flex-direction: column;\n max-width: 100dvw;\n min-height: 100dvh;\n width: 100%;\n overflow: hidden;\n position: relative;\n\n background-color: ${(props) => JeneseiPalette[props.$bgColor]};\n background-image: url(${(props) => props.$bgImage});\n`;\n\nconst generateGridTemplateAreas = (props: ProviderAppOutletProps) => {\n let templateAreas = `\n \"notification notification notification\"\n \"header header header\"\n \"nav nav nav\"\n \"leftAside children rightAside\"\n \"footer footer footer\"\n `;\n\n templateAreas = `\n \"notification notification notification\"\n \"${props.$leftAside?.isTopHeader ? 'leftAside' : 'header'} header ${props.$rightAside?.isTopHeader ? 'rightAside' : 'header'}\"\n \"${props.$leftAside?.isTopHeader ? 'leftAside' : props.$leftAside?.isTopNav ? 'leftAside' : 'nav'} nav ${props.$rightAside?.isTopHeader ? 'rightAside' : props.$rightAside?.isTopNav ? 'rightAside' : 'nav'}\"\n \"leftAside children rightAside\"\n \"${props.$leftAside?.isTopFooter ? 'leftAside' : 'footer'} footer ${props.$rightAside?.isTopFooter ? 'rightAside' : 'footer'}\"\n `;\n\n return templateAreas;\n};\n\nfunction toStyledAppOutletCSS(props: {\n leftAsideWidth: string;\n rightAsideWidth: string;\n notificationHeight: string;\n headerHeight: string;\n navHeight: string;\n footerHeight: string;\n}) {\n return css`\n grid-template-columns: ${() => `${props.leftAsideWidth} 1fr ${props.rightAsideWidth}`};\n grid-template-rows: ${() =>\n `${props.notificationHeight} ${props.headerHeight} ${props.navHeight} 1fr ${props.footerHeight}`};\n `;\n}\nconst addSXAppOutlet = css<ProviderAppOutletProps>`\n ${(props) => {\n const leftAsideWidth = props.$leftAside?.length?.default;\n const rightAsideWidth = props.$rightAside?.length?.default;\n const notificationHeight = props.$notification?.length?.default;\n const headerHeight = props.$header?.length?.default;\n const navHeight = props.$nav?.length?.default;\n const footerHeight = props.$footer?.length?.default;\n return toStyledAppOutletCSS({\n leftAsideWidth: leftAsideWidth ?? '0px',\n rightAsideWidth: rightAsideWidth ?? '0px',\n notificationHeight: notificationHeight ?? '0px',\n headerHeight: headerHeight ?? '0px',\n navHeight: navHeight ?? '0px',\n footerHeight: footerHeight ?? '0px',\n });\n }}\n ${(props) => {\n const leftAsideWidth = props.$leftAside?.length;\n const rightAsideWidth = props.$rightAside?.length;\n const notificationHeight = props.$notification?.length;\n const headerHeight = props.$header?.length;\n const navHeight = props.$nav?.length;\n const footerHeight = props.$footer?.length;\n\n return Object.entries(props.theme.screens)\n .filter(([key]) => key !== 'default')\n .map(([key]) => {\n const deviceKey = key as keyof ScreenWidthProps<string | null>;\n const screenWidth = props.theme.screens[deviceKey]?.width;\n if (!screenWidth) return null;\n return css`\n @media (max-width: ${screenWidth}px) {\n ${toStyledAppOutletCSS({\n leftAsideWidth: leftAsideWidth && leftAsideWidth[deviceKey] ? leftAsideWidth[deviceKey] : '0px',\n rightAsideWidth: rightAsideWidth && rightAsideWidth[deviceKey] ? rightAsideWidth[deviceKey] : '0px',\n notificationHeight:\n notificationHeight && notificationHeight[deviceKey] ? notificationHeight[deviceKey] : '0px',\n headerHeight: headerHeight && headerHeight[deviceKey] ? headerHeight[deviceKey] : '0px',\n navHeight: navHeight && navHeight[deviceKey] ? navHeight[deviceKey] : '0px',\n footerHeight: footerHeight && footerHeight[deviceKey] ? footerHeight[deviceKey] : '0px',\n })}\n }\n `;\n });\n }}\n`;\nexport const ProviderAppOutlet = styled.div<ProviderAppOutletProps>`\n display: grid;\n width: 100%;\n height: 100%;\n\n overflow-y: auto;\n overflow-x: hidden;\n scrollbar-gutter: stable;\n \n min-height: 100dvh;\n max-height: 100dvh;\n \n ${addGridTransition};\n\n ${(props) => `\n grid-template-areas: ${generateGridTemplateAreas(props)};\n `}\n\n ${addSXAppOutlet};\n`;\n\nexport const ProviderAppOutletChildren = styled.main<ProviderAppOutletChildrenProps>`\n z-index: ${(props) => props?.$main?.zIndex ?? 'auto'};\n display: flex;\n grid-area: children;\n max-width: 100%;\n max-height: 100%;\n overflow: ${(props) => (props.$isScrollOutlet ? 'auto' : 'visible')};\n scrollbar-gutter: stable;\n`;\n\nexport const ProviderAppOutletNotification = styled.section<ProviderAppOutletProps>`\n z-index: ${(props) => props?.$notification?.zIndex ?? 'auto'};\n grid-area: notification;\n display: flex;\n`;\n\nexport const ProviderAppOutletHeader = styled.header<ProviderAppOutletProps>`\n z-index: ${(props) => props?.$header?.zIndex ?? 'auto'};\n grid-area: header;\n display: flex;\n`;\n\nexport const ProviderAppOutletFooter = styled.footer<ProviderAppOutletProps>`\n z-index: ${(props) => props?.$footer?.zIndex ?? 'auto'};\n grid-area: footer;\n display: flex;\n`;\n\nexport const ProviderAppOutletNav = styled.nav<ProviderAppOutletProps>`\n z-index: ${(props) => props?.$nav?.zIndex ?? 'auto'};\n grid-area: nav;\n display: flex;\n`;\n\nexport const ProviderAppOutletLeftAside = styled.aside<ProviderAppOutletProps>`\n z-index: ${(props) => props?.$leftAside?.zIndex ?? 'auto'};\n grid-area: leftAside;\n display: flex;\n`;\n\nexport const ProviderAppOutletRightAside = styled.aside<ProviderAppOutletProps>`\n z-index: ${(props) => props?.$rightAside?.zIndex ?? 'auto'};\n grid-area: rightAside;\n display: flex;\n`;\n","import { useContext } from 'react';\n\nimport { AppContext } from '.';\n\n/**\n * Custom hook to access the AppContext.\n */\nexport const useApp = () => {\n const context = useContext(AppContext);\n if (!context) {\n throw new Error('useApp must be used within an ProviderApp');\n }\n return context;\n};\n"],"names":["AppContext","createContext","usePreview","defaultPreview","previewProps","setPreviewProps","useState","visible","defaultVisible","changePreview","useCallback","newPreviewProps","useEffect","useBgColor","defaultColor","state","setState","bgColor","bgColorHistory","bgColorIndex","changeBgColor","color","prev","newHistory","slice","length","historyBgColor","steps","newIndex","setDefaultBgColor","useStatusBarColor","statusBarColor","statusBarColorHistory","statusBarColorIndex","changeStatusBarColor","historyStatusBarColor","setDefaultStatusBarColor","useBgImage","defaultImage","bgImage","bgImageHistory","bgImageIndex","changeBgImage","image","historyBgImage","setDefaultBgImage","useTitle","defaultTitle","title","titleHistory","titleIndex","changeTitle","newTitle","setHistoryTitle","setDefaultTitle","useDescription","defaultDescription","description","descriptionHistory","descriptionIndex","changeDescription","newDescription","historyDescription","setDefaultDescription","ProviderAppWrapper","styled","div","props","JeneseiPalette","$bgColor","$bgImage","toStyledAppOutletCSS","css","leftAsideWidth","rightAsideWidth","notificationHeight","headerHeight","navHeight","footerHeight","addSXAppOutlet","_b","_a","$leftAside","default","_d","_c","$rightAside","_f","_e","$notification","_h","_g","$header","_j","_i","$nav","_l","_k","$footer","Object","entries","theme","screens","filter","key","map","deviceKey","screenWidth","width","ProviderAppOutlet","addGridTransition","templateAreas","isTopHeader","isTopNav","isTopFooter","generateGridTemplateAreas","ProviderAppOutletChildren","main","$main","zIndex","$isScrollOutlet","ProviderAppOutletNotification","section","ProviderAppOutletHeader","header","ProviderAppOutletFooter","footer","ProviderAppOutletNav","nav","ProviderAppOutletLeftAside","aside","ProviderAppOutletRightAside","defaultBgColor","defaultStatusBarColor","defaultBgImage","screenActual","useScreenWidth","jsxs","Provider","value","children","jsx","name","content","Preview","isScrollOutlet","notification","leftAside","rightAside","component","_m","_o","_n","_q","_s","_r","_u","_w","_v","context","useContext","Error"],"mappings":"mQAoBaA,EAAaC,EAAAA,cAAsC,MA2H1DC,EAAcC,IAClB,MAAOC,EAAcC,GAAmBC,WAASH,GAAkB,CAAEI,SAAS,EAAMC,gBAAgB,IAE9FC,EAAgBC,cAAaC,IACjCN,EAAgBM,IACf,IAMH,OAJAC,EAAAA,UAAU,KACJT,KAAgCA,IACnC,CAACA,IAEG,CAAEC,eAAcK,kBAYZI,EAAcC,IACzB,MAAOC,EAAOC,GAAYV,WAAuB,CAC/CW,QAASH,EACTI,eAAgB,CAACJ,GACjBK,aAAc,IAGVC,EAAgBV,cAAaW,IACjCL,EAAUM,IACR,MAAMC,EAAa,IAAID,EAAKJ,eAAeM,MAAM,EAAGF,EAAKH,aAAe,GAAIE,GAC5E,MAAO,CACLJ,QAASI,EACTH,eAAgBK,EAChBJ,aAAcI,EAAWE,OAAS,MAGrC,IAEGC,EAAiBhB,cAAaiB,IAClCX,EAAUM,IACR,MAAMM,EAAWN,EAAKH,aAAeQ,EACrC,OAAIC,GAAY,GAAKA,EAAWN,EAAKJ,eAAeO,OAC3C,IACFH,EACHL,QAASK,EAAKJ,eAAeU,GAC7BT,aAAcS,GAGXN,KAER,IAEGO,EAAoBnB,EAAAA,YAAY,KACpCM,EAAS,CACPC,QAASH,EACTI,eAAgB,CAACJ,GACjBK,aAAc,KAEf,CAACL,IAUJ,OARAF,EAAAA,UAAU,KACRI,EAAS,CACPC,QAASH,EACTI,eAAgB,CAACJ,GACjBK,aAAc,KAEf,CAACL,IAEG,CACLG,QAASF,EAAME,QACfG,gBACAM,iBACAG,oBACAV,aAAcJ,EAAMI,eAaXW,EAAqBhB,IAChC,MAAOC,EAAOC,GAAYV,WAA8B,CACtDyB,eAAgBjB,EAChBkB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AAX,EAAAwE,EAAoBsC,KACxCM,EAAAA,kBAAAA,IAACd,EAAA,CAAqBhC,KAAM5B,EAAM6D,IAAMY,qBAAMZ,cAAKqB,YAAa,OAC9D,MAEH,OAAAC,EAAAnF,EAAMgF,gBAAN,EAAAG,EAAiB7H,UAAU,OAAA8H,EAAA,OAAAC,EAAArF,EAAMgF,gBAAN,EAAAK,EAAiB/H,aAAjB,EAAA8H,EAA0BhB,KACpDM,EAAAA,kBAAAA,IAACZ,EAAA,CAA2B/C,WAAYf,EAAMgF,UAC3CP,qBAAMO,oBAAWE,YAAa,OAE/B,KAEJR,EAAAA,kBAAAA,IAACzB,GAA0BI,gBAAiBrD,EAAM8E,eAAgB3B,MAAOnD,EAAMkD,KAC5EuB,SAAAzE,EAAMyE,YAGR,OAAAa,EAAAtF,EAAMiF,iBAAN,EAAAK,EAAkBhI,UAAU,OAAAiI,EAAA,OAAAC,EAAAxF,EAAMiF,iBAAN,EAAAO,EAAkBlI,aAAlB,EAAAiI,EAA2BnB,KACtDM,EAAAA,kBAAAA,IAACV,EAAA,CAA4B7C,YAAanB,EAAMiF,WAC7CR,qBAAMQ,qBAAYC,YAAa,OAEhC,MAEH,OAAAO,EAAAzF,EAAM2D,aAAN,EAAA8B,EAAcnI,UAAU,OAAAoI,EAAA,OAAAC,EAAA3F,EAAM2D,aAAN,EAAAgC,EAAcrI,aAAd,EAAAoI,EAAuBtB,KAC9CM,wBAAChB,EAAA,CAAwB3B,QAAS/B,EAAM2D,OACrCc,qBAAMd,iBAAQuB,YAAa,OAE5B,kVE7HM,KACpB,MAAMU,EAAUC,EAAAA,WAAWhK,GAC3B,IAAK+J,EACH,MAAM,IAAIE,MAAM,6CAElB,OAAOF"}
1
+ {"version":3,"file":"context.hooks-XBiTuVyt.cjs","sources":["../src/contexts/context-app/context.tsx","../src/contexts/context-app/context.styles.ts","../src/contexts/context-app/context.hooks.ts"],"sourcesContent":["import { Preview, PreviewAdditionalProps } from '@local/areas/preview';\nimport { IThemePaletteKeys, JeneseiPalette } from '@local/theme';\n\nimport { createContext, FC, useCallback, useEffect, useState } from 'react';\n\nimport { useScreenWidth } from '../context-screen-width';\nimport {\n AppContextProps,\n ProviderAppOutlet,\n ProviderAppOutletChildren,\n ProviderAppOutletFooter,\n ProviderAppOutletHeader,\n ProviderAppOutletLeftAside,\n ProviderAppOutletNav,\n ProviderAppOutletNotification,\n ProviderAppOutletRightAside,\n ProviderAppProps,\n ProviderAppWrapper,\n} from '.';\n\nexport const AppContext = createContext<AppContextProps | null>(null);\n\n/**\n * ProviderApp component is a context context that manages various application-level states\n * such as background color, status bar color, background image, title, and description.\n * It uses several custom hooks to handle these states and provides them via the AppContext.\n *\n * @component\n *\n * @param {ProviderAppProps} props - The properties passed to the ProviderApp component.\n * @param {string} props.defaultBgColor - The default background color.\n * @param {string} props.defaultStatusBarColor - The default status bar color.\n * @param {string} [props.defaultBgImage] - The default background image.\n * @param {string} [props.defaultTitle] - The default title.\n * @param {string} [props.defaultDescription] - The default description.\n * @param {boolean} [props.isScrollOutlet] - Determines if the outlet should be scrollable.\n * @param {object} [props.footer] - The footer component and its properties.\n * @param {object} [props.notification] - The notification component and its properties.\n * @param {object} [props.header] - The header component and its properties.\n * @param {object} [props.nav] - The navigation component and its properties.\n * @param {object} [props.leftAside] - The left aside component and its properties.\n * @param {object} [props.rightAside] - The right aside component and its properties.\n * @param {React.ReactNode} props.children - The children components to be rendered inside the ProviderApp.\n *\n * @returns {JSX.Element} The rendered ProviderApp component.\n */\nexport const ProviderApp: FC<ProviderAppProps> = (props) => {\n const { bgColor, changeBgColor, historyBgColor, setDefaultBgColor } = useBgColor(props.defaultBgColor);\n const { statusBarColor, changeStatusBarColor, historyStatusBarColor, setDefaultStatusBarColor } = useStatusBarColor(\n props.defaultStatusBarColor,\n );\n const { bgImage, changeBgImage, historyBgImage, setDefaultBgImage } = useBgImage(props.defaultBgImage || null);\n const { title, changeTitle, setHistoryTitle, setDefaultTitle } = useTitle(props.defaultTitle || null);\n const { description, changeDescription, historyDescription, setDefaultDescription } = useDescription(\n props.defaultDescription,\n );\n const { changePreview, previewProps } = usePreview(props.defaultPreview);\n const { screenActual } = useScreenWidth();\n\n return (\n <AppContext.Provider\n value={{\n changePreview,\n changeStatusBarColor,\n changeBgColor,\n changeBgImage,\n changeTitle,\n changeDescription,\n historyStatusBarColor,\n historyBgColor,\n historyBgImage,\n setHistoryTitle,\n historyDescription,\n setDefaultStatusBarColor,\n setDefaultBgColor,\n setDefaultBgImage,\n setDefaultTitle,\n setDefaultDescription,\n }}\n >\n <title>{title}</title>\n <meta name='description' content={description} />\n <meta name='theme-color' content={JeneseiPalette[statusBarColor]} />\n <meta name='apple-mobile-web-app-status-bar-style' content='default' />\n <meta name='mobile-web-app-capable' content='yes' />\n <Preview {...previewProps}>\n <ProviderAppWrapper $bgColor={bgColor} $bgImage={bgImage}>\n <ProviderAppOutlet\n $isScrollOutlet={props.isScrollOutlet}\n $footer={props.footer}\n $notification={props.notification}\n $header={props.header}\n $nav={props.nav}\n $leftAside={props.leftAside}\n $rightAside={props.rightAside}\n >\n {props.notification?.length && props.notification?.length?.[screenActual] ? (\n <ProviderAppOutletNotification $notification={props.notification}>\n {props.notification?.component || null}\n </ProviderAppOutletNotification>\n ) : null}\n\n {props.header?.length && props.header?.length?.[screenActual] ? (\n <ProviderAppOutletHeader $header={props.header}>\n {props.header?.component || null}\n </ProviderAppOutletHeader>\n ) : null}\n\n {props.nav?.length && props.nav?.length?.[screenActual] ? (\n <ProviderAppOutletNav $nav={props.nav}>{props.nav?.component || null}</ProviderAppOutletNav>\n ) : null}\n\n {props.leftAside?.length && props.leftAside?.length?.[screenActual] ? (\n <ProviderAppOutletLeftAside $leftAside={props.leftAside}>\n {props.leftAside?.component || null}\n </ProviderAppOutletLeftAside>\n ) : null}\n\n <ProviderAppOutletChildren $isScrollOutlet={props.isScrollOutlet} $main={props.main}>\n {props.children}\n </ProviderAppOutletChildren>\n\n {props.rightAside?.length && props.rightAside?.length?.[screenActual] ? (\n <ProviderAppOutletRightAside $rightAside={props.rightAside}>\n {props.rightAside?.component || null}\n </ProviderAppOutletRightAside>\n ) : null}\n\n {props.footer?.length && props.footer?.length?.[screenActual] ? (\n <ProviderAppOutletFooter $footer={props.footer}>\n {props.footer?.component || null}\n </ProviderAppOutletFooter>\n ) : null}\n </ProviderAppOutlet>\n </ProviderAppWrapper>\n </Preview>\n </AppContext.Provider>\n );\n};\n\n/**\n * Custom hook to manage preview properties.\n */\nconst usePreview = (defaultPreview: ProviderAppProps['defaultPreview']) => {\n const [previewProps, setPreviewProps] = useState(defaultPreview || { visible: true, defaultVisible: true });\n\n const changePreview = useCallback((newPreviewProps: PreviewAdditionalProps) => {\n setPreviewProps(newPreviewProps);\n }, []);\n\n useEffect(() => {\n if (defaultPreview) setPreviewProps(defaultPreview);\n }, [defaultPreview]);\n\n return { previewProps, changePreview };\n};\n\n/**\n * Custom hook to manage background color state with history tracking.\n */\ntype BgColorState = {\n bgColor: IThemePaletteKeys;\n bgColorHistory: IThemePaletteKeys[];\n bgColorIndex: number;\n};\n\nexport const useBgColor = (defaultColor: IThemePaletteKeys) => {\n const [state, setState] = useState<BgColorState>({\n bgColor: defaultColor,\n bgColorHistory: [defaultColor],\n bgColorIndex: 0,\n });\n\n const changeBgColor = useCallback((color: IThemePaletteKeys) => {\n setState((prev) => {\n const newHistory = [...prev.bgColorHistory.slice(0, prev.bgColorIndex + 1), color];\n return {\n bgColor: color,\n bgColorHistory: newHistory,\n bgColorIndex: newHistory.length - 1,\n };\n });\n }, []);\n\n const historyBgColor = useCallback((steps: number) => {\n setState((prev) => {\n const newIndex = prev.bgColorIndex + steps;\n if (newIndex >= 0 && newIndex < prev.bgColorHistory.length) {\n return {\n ...prev,\n bgColor: prev.bgColorHistory[newIndex],\n bgColorIndex: newIndex,\n };\n }\n return prev;\n });\n }, []);\n\n const setDefaultBgColor = useCallback(() => {\n setState({\n bgColor: defaultColor,\n bgColorHistory: [defaultColor],\n bgColorIndex: 0,\n });\n }, [defaultColor]);\n\n useEffect(() => {\n setState({\n bgColor: defaultColor,\n bgColorHistory: [defaultColor],\n bgColorIndex: 0,\n });\n }, [defaultColor]);\n\n return {\n bgColor: state.bgColor,\n changeBgColor,\n historyBgColor,\n setDefaultBgColor,\n bgColorIndex: state.bgColorIndex,\n };\n};\n\n/**\n * Custom hook to manage the status bar color with history tracking.\n */\ntype StatusBarColorState = {\n statusBarColor: IThemePaletteKeys;\n statusBarColorHistory: IThemePaletteKeys[];\n statusBarColorIndex: number;\n};\n\nexport const useStatusBarColor = (defaultColor: IThemePaletteKeys) => {\n const [state, setState] = useState<StatusBarColorState>({\n statusBarColor: defaultColor,\n statusBarColorHistory: [defaultColor],\n statusBarColorIndex: 0,\n });\n\n const changeStatusBarColor = useCallback((color: IThemePaletteKeys) => {\n setState((prev) => {\n const newHistory = [...prev.statusBarColorHistory.slice(0, prev.statusBarColorIndex + 1), color];\n return {\n statusBarColor: color,\n statusBarColorHistory: newHistory,\n statusBarColorIndex: newHistory.length - 1,\n };\n });\n }, []);\n\n const historyStatusBarColor = useCallback((steps: number) => {\n setState((prev) => {\n const newIndex = prev.statusBarColorIndex + steps;\n if (newIndex >= 0 && newIndex < prev.statusBarColorHistory.length) {\n return {\n ...prev,\n statusBarColor: prev.statusBarColorHistory[newIndex],\n statusBarColorIndex: newIndex,\n };\n }\n return prev;\n });\n }, []);\n\n const setDefaultStatusBarColor = useCallback(() => {\n setState({\n statusBarColor: defaultColor,\n statusBarColorHistory: [defaultColor],\n statusBarColorIndex: 0,\n });\n }, [defaultColor]);\n\n useEffect(() => {\n setState({\n statusBarColor: defaultColor,\n statusBarColorHistory: [defaultColor],\n statusBarColorIndex: 0,\n });\n }, [defaultColor]);\n\n return {\n statusBarColor: state.statusBarColor,\n changeStatusBarColor,\n historyStatusBarColor,\n setDefaultStatusBarColor,\n statusBarColorIndex: state.statusBarColorIndex,\n };\n};\n\n/**\n * Custom hook to manage background images with history.\n */\ntype BgImageState = {\n bgImage: string | null;\n bgImageHistory: (string | null)[];\n bgImageIndex: number;\n};\n\nexport const useBgImage = (defaultImage: string | null) => {\n const [state, setState] = useState<BgImageState>({\n bgImage: defaultImage,\n bgImageHistory: [defaultImage],\n bgImageIndex: 0,\n });\n\n const changeBgImage = useCallback((image: string | null) => {\n setState((prev) => {\n const newHistory = [...prev.bgImageHistory.slice(0, prev.bgImageIndex + 1), image];\n return {\n bgImage: image,\n bgImageHistory: newHistory,\n bgImageIndex: newHistory.length - 1,\n };\n });\n }, []);\n\n const historyBgImage = useCallback((steps: number) => {\n setState((prev) => {\n const newIndex = prev.bgImageIndex + steps;\n if (newIndex >= 0 && newIndex < prev.bgImageHistory.length) {\n return {\n ...prev,\n bgImage: prev.bgImageHistory[newIndex],\n bgImageIndex: newIndex,\n };\n }\n return prev;\n });\n }, []);\n\n const setDefaultBgImage = useCallback(() => {\n setState({\n bgImage: defaultImage,\n bgImageHistory: [defaultImage],\n bgImageIndex: 0,\n });\n }, [defaultImage]);\n\n useEffect(() => {\n setState({\n bgImage: defaultImage,\n bgImageHistory: [defaultImage],\n bgImageIndex: 0,\n });\n }, [defaultImage]);\n\n return {\n bgImage: state.bgImage,\n changeBgImage,\n historyBgImage,\n setDefaultBgImage,\n bgImageIndex: state.bgImageIndex,\n };\n};\n\ntype TitleState = {\n title: string | null;\n titleHistory: (string | null)[];\n titleIndex: number;\n};\n/**\n * Custom hook to manage the document title with history tracking.\n */\nconst useTitle = (defaultTitle: string | null) => {\n const [state, setState] = useState<TitleState>({\n title: defaultTitle,\n titleHistory: [defaultTitle],\n titleIndex: 0,\n });\n\n const changeTitle = useCallback((newTitle: string | null) => {\n setState((prev) => {\n const newHistory = [...prev.titleHistory.slice(0, prev.titleIndex + 1), newTitle];\n return {\n title: newTitle,\n titleHistory: newHistory,\n titleIndex: newHistory.length - 1,\n };\n });\n }, []);\n\n const setHistoryTitle = useCallback((steps: number) => {\n setState((prev) => {\n const newIndex = prev.titleIndex + steps;\n if (newIndex >= 0 && newIndex < prev.titleHistory.length) {\n return {\n ...prev,\n title: prev.titleHistory[newIndex],\n titleIndex: newIndex,\n };\n }\n return prev;\n });\n }, []);\n\n const setDefaultTitle = useCallback(() => {\n setState({\n title: defaultTitle,\n titleHistory: [defaultTitle],\n titleIndex: 0,\n });\n }, [defaultTitle]);\n\n useEffect(() => {\n setState({\n title: defaultTitle,\n titleHistory: [defaultTitle],\n titleIndex: 0,\n });\n }, [defaultTitle]);\n\n return {\n title: state.title,\n titleIndex: state.titleIndex,\n titleHistory: state.titleHistory,\n changeTitle,\n setHistoryTitle,\n setDefaultTitle,\n };\n};\n\n/**\n * Custom hook to manage a description with history tracking.\n */\ntype DescriptionState = {\n description: string;\n descriptionHistory: string[];\n descriptionIndex: number;\n};\n\nexport const useDescription = (defaultDescription: string) => {\n const [state, setState] = useState<DescriptionState>({\n description: defaultDescription,\n descriptionHistory: [defaultDescription],\n descriptionIndex: 0,\n });\n\n const changeDescription = useCallback((newDescription: string) => {\n setState((prev) => {\n const newHistory = [...prev.descriptionHistory.slice(0, prev.descriptionIndex + 1), newDescription];\n return {\n description: newDescription,\n descriptionHistory: newHistory,\n descriptionIndex: newHistory.length - 1,\n };\n });\n }, []);\n\n const historyDescription = useCallback((steps: number) => {\n setState((prev) => {\n const newIndex = prev.descriptionIndex + steps;\n if (newIndex >= 0 && newIndex < prev.descriptionHistory.length) {\n return {\n ...prev,\n description: prev.descriptionHistory[newIndex],\n descriptionIndex: newIndex,\n };\n }\n return prev;\n });\n }, []);\n\n const setDefaultDescription = useCallback(() => {\n setState({\n description: defaultDescription,\n descriptionHistory: [defaultDescription],\n descriptionIndex: 0,\n });\n }, [defaultDescription]);\n\n useEffect(() => {\n setState({\n description: defaultDescription,\n descriptionHistory: [defaultDescription],\n descriptionIndex: 0,\n });\n }, [defaultDescription]);\n\n return {\n description: state.description,\n changeDescription,\n historyDescription,\n setDefaultDescription,\n descriptionIndex: state.descriptionIndex,\n };\n};\n","import { addGridTransition } from '@local/styles/add';\nimport { JeneseiPalette } from '@local/theme';\n\nimport { css, styled } from 'styled-components';\n\nimport { ScreenWidthProps } from '../context-screen-width';\nimport { ProviderAppOutletChildrenProps, ProviderAppOutletProps, ProviderAppWrapperProps } from '.';\n\nexport const ProviderAppWrapper = styled.div<ProviderAppWrapperProps>`\n display: flex;\n flex-direction: column;\n max-width: 100dvw;\n min-height: 100dvh;\n width: 100%;\n overflow: hidden;\n position: relative;\n\n background-color: ${(props) => JeneseiPalette[props.$bgColor]};\n background-image: url(${(props) => props.$bgImage});\n`;\n\nconst generateGridTemplateAreas = (props: ProviderAppOutletProps) => {\n let templateAreas = `\n \"notification notification notification\"\n \"header header header\"\n \"nav nav nav\"\n \"leftAside children rightAside\"\n \"footer footer footer\"\n `;\n\n templateAreas = `\n \"notification notification notification\"\n \"${props.$leftAside?.isTopHeader ? 'leftAside' : 'header'} header ${props.$rightAside?.isTopHeader ? 'rightAside' : 'header'}\"\n \"${props.$leftAside?.isTopHeader ? 'leftAside' : props.$leftAside?.isTopNav ? 'leftAside' : 'nav'} nav ${props.$rightAside?.isTopHeader ? 'rightAside' : props.$rightAside?.isTopNav ? 'rightAside' : 'nav'}\"\n \"leftAside children rightAside\"\n \"${props.$leftAside?.isTopFooter ? 'leftAside' : 'footer'} footer ${props.$rightAside?.isTopFooter ? 'rightAside' : 'footer'}\"\n `;\n\n return templateAreas;\n};\n\nfunction toStyledAppOutletCSS(props: {\n leftAsideWidth: string;\n rightAsideWidth: string;\n notificationHeight: string;\n headerHeight: string;\n navHeight: string;\n footerHeight: string;\n}) {\n return css`\n grid-template-columns: ${() => `${props.leftAsideWidth} 1fr ${props.rightAsideWidth}`};\n grid-template-rows: ${() =>\n `${props.notificationHeight} ${props.headerHeight} ${props.navHeight} 1fr ${props.footerHeight}`};\n `;\n}\nconst addSXAppOutlet = css<ProviderAppOutletProps>`\n ${(props) => {\n const leftAsideWidth = props.$leftAside?.length?.default;\n const rightAsideWidth = props.$rightAside?.length?.default;\n const notificationHeight = props.$notification?.length?.default;\n const headerHeight = props.$header?.length?.default;\n const navHeight = props.$nav?.length?.default;\n const footerHeight = props.$footer?.length?.default;\n return toStyledAppOutletCSS({\n leftAsideWidth: leftAsideWidth ?? '0px',\n rightAsideWidth: rightAsideWidth ?? '0px',\n notificationHeight: notificationHeight ?? '0px',\n headerHeight: headerHeight ?? '0px',\n navHeight: navHeight ?? '0px',\n footerHeight: footerHeight ?? '0px',\n });\n }}\n ${(props) => {\n const leftAsideWidth = props.$leftAside?.length;\n const rightAsideWidth = props.$rightAside?.length;\n const notificationHeight = props.$notification?.length;\n const headerHeight = props.$header?.length;\n const navHeight = props.$nav?.length;\n const footerHeight = props.$footer?.length;\n\n return Object.entries(props.theme.screens)\n .filter(([key]) => key !== 'default')\n .map(([key]) => {\n const deviceKey = key as keyof ScreenWidthProps<string | null>;\n const screenWidth = props.theme.screens[deviceKey]?.width;\n if (!screenWidth) return null;\n return css`\n @media (max-width: ${screenWidth}px) {\n ${toStyledAppOutletCSS({\n leftAsideWidth: leftAsideWidth && leftAsideWidth[deviceKey] ? leftAsideWidth[deviceKey] : '0px',\n rightAsideWidth: rightAsideWidth && rightAsideWidth[deviceKey] ? rightAsideWidth[deviceKey] : '0px',\n notificationHeight:\n notificationHeight && notificationHeight[deviceKey] ? notificationHeight[deviceKey] : '0px',\n headerHeight: headerHeight && headerHeight[deviceKey] ? headerHeight[deviceKey] : '0px',\n navHeight: navHeight && navHeight[deviceKey] ? navHeight[deviceKey] : '0px',\n footerHeight: footerHeight && footerHeight[deviceKey] ? footerHeight[deviceKey] : '0px',\n })}\n }\n `;\n });\n }}\n`;\nexport const ProviderAppOutlet = styled.div<ProviderAppOutletProps>`\n display: grid;\n width: 100%;\n height: 100%;\n\n overflow-y: auto;\n overflow-x: hidden;\n scrollbar-gutter: stable;\n \n min-height: 100dvh;\n max-height: 100dvh;\n \n ${addGridTransition};\n\n ${(props) => `\n grid-template-areas: ${generateGridTemplateAreas(props)};\n `}\n\n ${addSXAppOutlet};\n`;\n\nexport const ProviderAppOutletChildren = styled.main<ProviderAppOutletChildrenProps>`\n z-index: ${(props) => props?.$main?.zIndex ?? 'auto'};\n display: flex;\n grid-area: children;\n max-width: 100%;\n max-height: 100%;\n overflow: ${(props) => (props.$isScrollOutlet ? 'auto' : 'visible')};\n scrollbar-gutter: stable;\n`;\n\nexport const ProviderAppOutletNotification = styled.section<ProviderAppOutletProps>`\n z-index: ${(props) => props?.$notification?.zIndex ?? 'auto'};\n grid-area: notification;\n display: flex;\n`;\n\nexport const ProviderAppOutletHeader = styled.header<ProviderAppOutletProps>`\n z-index: ${(props) => props?.$header?.zIndex ?? 'auto'};\n grid-area: header;\n display: flex;\n`;\n\nexport const ProviderAppOutletFooter = styled.footer<ProviderAppOutletProps>`\n z-index: ${(props) => props?.$footer?.zIndex ?? 'auto'};\n grid-area: footer;\n display: flex;\n`;\n\nexport const ProviderAppOutletNav = styled.nav<ProviderAppOutletProps>`\n z-index: ${(props) => props?.$nav?.zIndex ?? 'auto'};\n grid-area: nav;\n display: flex;\n`;\n\nexport const ProviderAppOutletLeftAside = styled.aside<ProviderAppOutletProps>`\n z-index: ${(props) => props?.$leftAside?.zIndex ?? 'auto'};\n grid-area: leftAside;\n display: flex;\n`;\n\nexport const ProviderAppOutletRightAside = styled.aside<ProviderAppOutletProps>`\n z-index: ${(props) => props?.$rightAside?.zIndex ?? 'auto'};\n grid-area: rightAside;\n display: flex;\n`;\n","import { useContext } from 'react';\n\nimport { AppContext } from '.';\n\n/**\n * Custom hook to access the AppContext.\n */\nexport const useApp = () => {\n const context = useContext(AppContext);\n if (!context) {\n throw new Error('useApp must be used within an ProviderApp');\n }\n return context;\n};\n"],"names":["AppContext","createContext","usePreview","defaultPreview","previewProps","setPreviewProps","useState","visible","defaultVisible","changePreview","useCallback","newPreviewProps","useEffect","useBgColor","defaultColor","state","setState","bgColor","bgColorHistory","bgColorIndex","changeBgColor","color","prev","newHistory","slice","length","historyBgColor","steps","newIndex","setDefaultBgColor","useStatusBarColor","statusBarColor","statusBarColorHistory","statusBarColorIndex","changeStatusBarColor","historyStatusBarColor","setDefaultStatusBarColor","useBgImage","defaultImage","bgImage","bgImageHistory","bgImageIndex","changeBgImage","image","historyBgImage","setDefaultBgImage","useTitle","defaultTitle","title","titleHistory","titleIndex","changeTitle","newTitle","setHistoryTitle","setDefaultTitle","useDescription","defaultDescription","description","descriptionHistory","descriptionIndex","changeDescription","newDescription","historyDescription","setDefaultDescription","ProviderAppWrapper","styled","div","props","JeneseiPalette","$bgColor","$bgImage","toStyledAppOutletCSS","css","leftAsideWidth","rightAsideWidth","notificationHeight","headerHeight","navHeight","footerHeight","addSXAppOutlet","_b","_a","$leftAside","default","_d","_c","$rightAside","_f","_e","$notification","_h","_g","$header","_j","_i","$nav","_l","_k","$footer","Object","entries","theme","screens","filter","key","map","deviceKey","screenWidth","width","ProviderAppOutlet","addGridTransition","templateAreas","isTopHeader","isTopNav","isTopFooter","generateGridTemplateAreas","ProviderAppOutletChildren","main","$main","zIndex","$isScrollOutlet","ProviderAppOutletNotification","section","ProviderAppOutletHeader","header","ProviderAppOutletFooter","footer","ProviderAppOutletNav","nav","ProviderAppOutletLeftAside","aside","ProviderAppOutletRightAside","defaultBgColor","defaultStatusBarColor","defaultBgImage","screenActual","useScreenWidth","jsxs","Provider","value","children","jsx","name","content","Preview","isScrollOutlet","notification","leftAside","rightAside","component","_m","_o","_n","_q","_s","_r","_u","_w","_v","context","useContext","Error"],"mappings":"mQAoBaA,EAAaC,EAAAA,cAAsC,MA2H1DC,EAAcC,IAClB,MAAOC,EAAcC,GAAmBC,WAASH,GAAkB,CAAEI,SAAS,EAAMC,gBAAgB,IAE9FC,EAAgBC,cAAaC,IACjCN,EAAgBM,IACf,IAMH,OAJAC,EAAAA,UAAU,KACJT,KAAgCA,IACnC,CAACA,IAEG,CAAEC,eAAcK,kBAYZI,EAAcC,IACzB,MAAOC,EAAOC,GAAYV,WAAuB,CAC/CW,QAASH,EACTI,eAAgB,CAACJ,GACjBK,a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MiF,iBAAN,EAAAK,EAAkBhI,UAAU,OAAAiI,EAAA,OAAAC,EAAAxF,EAAMiF,iBAAN,EAAAO,EAAkBlI,aAAlB,EAAAiI,EAA2BnB,KACtDM,EAAAA,kBAAAA,IAACV,EAAA,CAA4B7C,YAAanB,EAAMiF,WAC7CR,qBAAMQ,qBAAYC,YAAa,OAEhC,MAEH,OAAAO,EAAAzF,EAAM2D,aAAN,EAAA8B,EAAcnI,UAAU,OAAAoI,EAAA,OAAAC,EAAA3F,EAAM2D,aAAN,EAAAgC,EAAcrI,aAAd,EAAAoI,EAAuBtB,KAC9CM,wBAAChB,EAAA,CAAwB3B,QAAS/B,EAAM2D,OACrCc,qBAAMd,iBAAQuB,YAAa,OAE5B,kVE7HM,KACpB,MAAMU,EAAUC,EAAAA,WAAWhK,GAC3B,IAAK+J,EACH,MAAM,IAAIE,MAAM,6CAElB,OAAOF"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./area-Dup_lUb9.cjs"),t=require("./area.hooks-C_UKZzcb.cjs"),o=require("./area-t259bohc.cjs"),r=require("./area-CmCMHnRA.cjs"),p=require("./area-DRsIULcw.cjs"),s=require("./component-8NOxwZJO.cjs"),n=require("./component.styles-Py-IeQ2q.cjs"),a=require("./component-DnJo66DS.cjs"),i=require("./component-cRmWWDr_.cjs"),x=require("./component.styles-Bb7_KygZ.cjs"),c=require("./component.styles-DbWj2stq.cjs"),u=require("./component.types-CfR3RBsV.cjs"),l=require("./component.styles-BKnUDWqO.cjs"),d=require("./component.types-DraGq1j_.cjs"),S=require("./component.styles-B-bndnRM.cjs"),D=require("./component-BhPckvLk.cjs"),I=require("./component.styles-4ycgapiT.cjs"),E=require("./component.constants-CpRgeAIu.cjs"),T=require("./component--jGdo2yq.cjs"),_=require("./component.styles-BeRVOt5T.cjs"),A=require("./component.styles-gZHy-64x.cjs"),O=require("./component.components-CC3IeZon.cjs"),L=require("./component.constants-D6AJ1xmO.cjs"),C=require("./component.styles-ZU_GyVub.cjs"),m=require("./component.styles-Dpg-__rn.cjs"),P=require("./component-CLqcB5mM.cjs"),g=require("./component.styles-PNgt36ZD.cjs"),R=require("./component.styles-CLn52hJD.cjs"),N=require("./component-GKvpOWlO.cjs"),y=require("./component.styles-CsB9986a.cjs"),M=require("./component.styles-BELwxHxh.cjs"),h=require("./component-BVnHSTJd.cjs"),U=require("./component.functions-D9ffjEok.cjs"),F=require("./consts.cjs.js"),G=require("./context.hooks-Ci37RyLf.cjs"),k=require("./context.functions-80N-5MqM.cjs"),j=require("./context.constants-BLQ_1jZI.cjs"),W=require("./context.hooks-u408Pxw8.cjs"),B=require("./context.functions-ohI9H54j.cjs"),b=require("./context.functions-ar41xFVo.cjs"),v=require("./context.hooks-D13tbrva.cjs"),q=require("./context.hooks-BIsapq-0.cjs"),z=require("./context.constants-cm50ZUiS.cjs"),f=require("./functions.cjs.js"),V=require("./use-IhzeVumv.cjs"),w=require("./use-C1l0O0Qo.cjs"),K=require("./style-Df37KnoJ.cjs"),X=require("./style-D3Lbn1EL.cjs"),Z=require("./motion-DgB7M2Hn.cjs"),H=require("./style-fRZ6xrVp.cjs"),Y=require("./theme.global-CcoD5bPP.cjs");exports.Outside=e.Outside,exports.useRemovePreviewLoader=t.useRemovePreviewLoader,exports.Preview=o.Preview,exports.Scroll=r.Scroll,exports.StyledScroll=r.StyledScroll,exports.Skeleton=p.Skeleton,exports.StyledSkeleton=p.StyledSkeleton,exports.Smooth=s.Smooth,exports.Accordion=n.Accordion,exports.AccordionDetails=n.AccordionDetails,exports.AccordionStyledIcon=n.AccordionStyledIcon,exports.AccordionSummary=n.AccordionSummary,exports.AccordionSummaryContent=n.AccordionSummaryContent,exports.AccordionWrapper=n.AccordionWrapper,exports.Button=a.Button,exports.ButtonSize=a.ButtonSize,exports.ButtonSizeConstructor=a.ButtonSizeConstructor,exports.StyledButton=a.StyledButton,exports.StyledButtonIconsWrapper=a.StyledButtonIconsWrapper,exports.ButtonGroup=i.ButtonGroup,exports.ButtonGroupWrapper=i.ButtonGroupWrapper,exports.Checkbox=x.Checkbox,exports.CheckboxGenre=x.CheckboxGenre,exports.CheckboxSize=x.CheckboxSize,exports.CheckboxSizeConstructor=x.CheckboxSizeConstructor,exports.CheckboxWrapper=x.CheckboxWrapper,exports.StyledIcon=x.StyledIcon,exports.CheckboxChildren=c.CheckboxChildren,exports.CheckboxGroup=c.CheckboxGroup,exports.CheckboxGroupItem=c.CheckboxGroupItem,exports.CheckboxGroupLabel=c.CheckboxGroupLabel,exports.CheckboxGroupSize=c.CheckboxGroupSize,exports.CheckboxGroupSizeConstructor=c.CheckboxGroupSizeConstructor,exports.CheckboxGroupWrapper=c.CheckboxGroupWrapper,exports.DateDropdownDay=u.DateDropdownDay,exports.DateDropdownDayOfWeek=u.DateDropdownDayOfWeek,exports.DateDropdownDays=u.DateDropdownDays,exports.DateDropdownList=u.DateDropdownList,exports.DateDropdownListParent=u.DateDropdownListParent,exports.DateInput=u.DateInput,exports.DateInputButton=u.DateInputButton,exports.DateInputWrapper=u.DateInputWrapper,exports.DatePicker=u.DatePicker,exports.DatePickerVariant=u.DatePickerVariant,exports.DateWrapper=u.DateWrapper,exports.addDateDropdownDaySize=u.addDateDropdownDaySize,exports.addDateInputButtonSize=u.addDateInputButtonSize,exports.addDateInputWrapperSize=u.addDateInputWrapperSize,exports.Icon=l.Icon,exports.StyledSVG=l.StyledSVG,exports.ENUM_ICON_BUSTMARKET=d.ENUM_ICON_BUSTMARKET,exports.ENUM_ICON_CHECKBOX=d.ENUM_ICON_CHECKBOX,exports.ENUM_ICON_ID=d.ENUM_ICON_ID,exports.ENUM_ICON_LOADING=d.ENUM_ICON_LOADING,exports.ENUM_ICON_LOGO=d.ENUM_ICON_LOGO,exports.ENUM_ICON_REALEBAIL=d.ENUM_ICON_REALEBAIL,exports.Image=S.Image,exports.ImageIMG=S.ImageIMG,exports.ImageButton=D.ImageButton,exports.ImageSelect=I.ImageSelect,exports.ImageSelectListSize=I.ImageSelectListSize,exports.ImageSelectListSizeConstructor=I.ImageSelectListSizeConstructor,exports.ImageSelectListWrapper=I.ImageSelectListWrapper,exports.ImageSelectSize=I.ImageSelectSize,exports.ImageSelectSizeConstructor=I.ImageSelectSizeConstructor,exports.ImageSelectWrapper=I.ImageSelectWrapper,exports.IMAGES=E.IMAGES,exports.ImageSlider=E.ImageSlider,exports.SliderDot=E.SliderDot,exports.SliderImage=E.SliderImage,exports.Input=T.Input,exports.formatPhoneNumber=T.formatPhoneNumber,exports.InputPostfixChildren=_.InputPostfixChildren,exports.InputPrefixChildren=_.InputPrefixChildren,exports.InputSize=_.InputSize,exports.InputSizeConstructor=_.InputSizeConstructor,exports.StyledInput=_.StyledInput,exports.StyledInputCSS=_.StyledInputCSS,exports.StyledInputNumeric=_.StyledInputNumeric,exports.StyledInputPattern=_.StyledInputPattern,exports.StyledInputWrapper=_.StyledInputWrapper,exports.StyledMotionInput=_.StyledMotionInput,exports.addInputIsInputEffect=_.addInputIsInputEffect,exports.addInputPlaceholder=_.addInputPlaceholder,exports.addInputPlaceholderNiceNumber=_.addInputPlaceholderNiceNumber,exports.InputOTP=A.InputOTP,exports.InputOTPSize=A.InputOTPSize,exports.InputOTPSizeConstructor=A.InputOTPSizeConstructor,exports.InputOTPWrapper=A.InputOTPWrapper,exports.CustomZoomControl=O.CustomZoomControl,exports.DEFAULT_MAP_CENTER=O.DEFAULT_MAP_CENTER,exports.DEFAULT_MAP_MAX_ZOOM=O.DEFAULT_MAP_MAX_ZOOM,exports.DEFAULT_MAP_MIN_ZOOM=O.DEFAULT_MAP_MIN_ZOOM,exports.DEFAULT_MAP_THEME=O.DEFAULT_MAP_THEME,exports.DEFAULT_MAP_ZOOM=O.DEFAULT_MAP_ZOOM,exports.MapCluster=O.MapCluster,exports.MapDot=O.MapDot,exports.MapWrapper=O.MapWrapper,exports.MarkerCluster=O.MarkerCluster,exports.UpdateMapSettings=O.UpdateMapSettings,exports.createClusterIcon=O.createClusterIcon,exports.customDefaultIcon=O.customDefaultIcon,exports.customTextIcon=O.customTextIcon,exports.DEFAULT_COMPONENT_PAGINATION_GAP=L.DEFAULT_COMPONENT_PAGINATION_GAP,exports.Pagination=L.Pagination,exports.Range=C.Range,exports.RangeThumb=C.RangeThumb,exports.RangeTrack=C.RangeTrack,exports.RangeWrapper=C.RangeWrapper,exports.DEFAULT_RIPPLE_DURATION=m.DEFAULT_RIPPLE_DURATION,exports.DEFAULT_RIPPLE_ID=m.DEFAULT_RIPPLE_ID,exports.RippleContainer=m.RippleContainer,exports.RippleSpan=m.RippleSpan,exports.addRipple=m.addRipple,exports.addRippleDefault=m.addRippleDefault,exports.Ripple=P.Ripple,exports.ButtonList=g.ButtonList,exports.ContainerDropdownListOption=g.ContainerDropdownListOption,exports.ContainerSelectListOption=g.ContainerSelectListOption,exports.DropdownList=g.DropdownList,exports.DropdownListOption=g.DropdownListOption,exports.DropdownListOptionIcon=g.DropdownListOptionIcon,exports.DropdownListParent=g.DropdownListParent,exports.Select=g.Select,exports.SelectLanguage=g.SelectLanguage,exports.SelectList=g.SelectList,exports.SelectListOption=g.SelectListOption,exports.SelectMapTheme=g.SelectMapTheme,exports.SelectMonth=g.SelectMonth,exports.SelectMonths=g.SelectMonths,exports.SelectTextArea=g.SelectTextArea,exports.SelectWrapper=g.SelectWrapper,exports.SelectYear=g.SelectYear,exports.Separator=R.Separator,exports.SeparatorWrapper=R.SeparatorWrapper,exports.Stack=N.Stack,exports.StackMotion=N.StackMotion,exports.StyledStack=N.StyledStack,exports.StyledStackMotion=N.StyledStackMotion,exports.StyledTextArea=y.StyledTextArea,exports.TextArea=y.TextArea,exports.TextAreaWrapper=y.TextAreaWrapper,exports.addTextArea=y.addTextArea,exports.Toggle=M.Toggle,exports.ToggleCenter=M.ToggleCenter,exports.ToggleWrapper=M.ToggleWrapper,exports.DEFAULT_TOOLTIP_OFFSET_FALLBACK=h.DEFAULT_TOOLTIP_OFFSET_FALLBACK,exports.DEFAULT_TOOLTIP_PLACEMENT_FALLBACK=h.DEFAULT_TOOLTIP_PLACEMENT_FALLBACK,exports.Title=h.Title,exports.Tooltip=h.Tooltip,exports.TooltipBox=h.TooltipBox,exports.TooltipContainer=h.TooltipContainer,exports.TooltipContent=h.TooltipContent,exports.Typography=h.Typography,exports.TypographyLink=h.TypographyLink,exports.TypographyTooltip=h.TypographyTooltip,exports.addSXTypography=h.addSXTypography,exports.addTooltipBoxSize=h.addTooltipBoxSize,exports.addTooltipBoxSizeConstructor=h.addTooltipBoxSizeConstructor,exports.getFontSizeStyles=U.getFontSizeStyles,exports.ImageSupportedFormats=F.ImageSupportedFormats,exports.ImageSupportedFormatsForInput=F.ImageSupportedFormatsForInput,exports.KeysLanguage=F.KeysLanguage,exports.KeysService=F.KeysService,exports.ListLanguage=F.ListLanguage,exports.ListService=F.ListService,exports.LoremIpsumText=F.LoremIpsumText,exports.MapThemeList=F.MapThemeList,exports.ObjectLanguage=F.ObjectLanguage,exports.ObjectService=F.ObjectService,exports.localeInput=F.localeInput,exports.localeMonths=F.localeMonths,exports.localeWeeks=F.localeWeeks,exports.AppContext=G.AppContext,exports.ProviderApp=G.ProviderApp,exports.ProviderAppOutlet=G.ProviderAppOutlet,exports.ProviderAppOutletChildren=G.ProviderAppOutletChildren,exports.ProviderAppOutletFooter=G.ProviderAppOutletFooter,exports.ProviderAppOutletHeader=G.ProviderAppOutletHeader,exports.ProviderAppOutletLeftAside=G.ProviderAppOutletLeftAside,exports.ProviderAppOutletNav=G.ProviderAppOutletNav,exports.ProviderAppOutletNotification=G.ProviderAppOutletNotification,exports.ProviderAppOutletRightAside=G.ProviderAppOutletRightAside,exports.ProviderAppWrapper=G.ProviderAppWrapper,exports.useApp=G.useApp,exports.useBgColor=G.useBgColor,exports.useBgImage=G.useBgImage,exports.useDescription=G.useDescription,exports.useStatusBarColor=G.useStatusBarColor,exports.CookieContext=k.CookieContext,exports.ProviderCookie=k.ProviderCookie,exports.getFromCookie=k.getFromCookie,exports.setToCookie=k.setToCookie,exports.useCookie=k.useCookie,exports.DEFAULT_PROVIDER_DIALOG_DURATION_ELEMENT=j.DEFAULT_PROVIDER_DIALOG_DURATION_ELEMENT,exports.DEFAULT_PROVIDER_DIALOG_DURATION_LAYOUT=j.DEFAULT_PROVIDER_DIALOG_DURATION_LAYOUT,exports.DEFAULT_PROVIDER_DIALOG_ELEMENT_BACKGROUND=j.DEFAULT_PROVIDER_DIALOG_ELEMENT_BACKGROUND,exports.DEFAULT_PROVIDER_DIALOG_ELEMENT_BORDER_RADIUS=j.DEFAULT_PROVIDER_DIALOG_ELEMENT_BORDER_RADIUS,exports.DEFAULT_PROVIDER_DIALOG_ELEMENT_MAX_HEIGHT=j.DEFAULT_PROVIDER_DIALOG_ELEMENT_MAX_HEIGHT,exports.DEFAULT_PROVIDER_DIALOG_ELEMENT_MAX_WIDTH=j.DEFAULT_PROVIDER_DIALOG_ELEMENT_MAX_WIDTH,exports.DEFAULT_PROVIDER_DIALOG_ELEMENT_PADDING=j.DEFAULT_PROVIDER_DIALOG_ELEMENT_PADDING,exports.DialogContent=j.DialogContent,exports.DialogContext=j.DialogContext,exports.DialogElementWrapper=j.DialogElementWrapper,exports.DialogLayout=j.DialogLayout,exports.ProviderDialog=j.ProviderDialog,exports.useDialog=j.useDialog,exports.useDialogs=j.useDialogs,exports.GeolocationContext=W.GeolocationContext,exports.ProviderGeolocation=W.ProviderGeolocation,exports.useGeolocation=W.useGeolocation,exports.LocalStorageContext=B.LocalStorageContext,exports.ProviderLocalStorage=B.ProviderLocalStorage,exports.getFromLocalStorage=B.getFromLocalStorage,exports.setToLocalStorage=B.setToLocalStorage,exports.useLocalStorage=B.useLocalStorage,exports.urlBase64ToUint8Array=b.urlBase64ToUint8Array,exports.PermissionContext=v.PermissionContext,exports.ProviderPermission=v.ProviderPermission,exports.usePermission=v.usePermission,exports.ProviderScreenWidth=q.ProviderScreenWidth,exports.ScreenWidthContext=q.ScreenWidthContext,exports.useScreenWidth=q.useScreenWidth,exports.DEFAULT_PROVIDER_SONNER_BUTTON=z.DEFAULT_PROVIDER_SONNER_BUTTON,exports.DEFAULT_PROVIDER_SONNER_DURATION=z.DEFAULT_PROVIDER_SONNER_DURATION,exports.DEFAULT_PROVIDER_SONNER_GENRE=z.DEFAULT_PROVIDER_SONNER_GENRE,exports.DEFAULT_PROVIDER_SONNER_MARGIN_BOTTOM=z.DEFAULT_PROVIDER_SONNER_MARGIN_BOTTOM,exports.DEFAULT_PROVIDER_SONNER_SCALE=z.DEFAULT_PROVIDER_SONNER_SCALE,exports.DEFAULT_PROVIDER_SONNER_Y=z.DEFAULT_PROVIDER_SONNER_Y,exports.DEFAULT_PROVIDER_SONNER_Z_INDEX=z.DEFAULT_PROVIDER_SONNER_Z_INDEX,exports.ProviderSonner=z.ProviderSonner,exports.SonnerButtonWrapper=z.SonnerButtonWrapper,exports.SonnerContent=z.SonnerContent,exports.SonnerContentDescription=z.SonnerContentDescription,exports.SonnerContentTitle=z.SonnerContentTitle,exports.SonnerContext=z.SonnerContext,exports.SonnerElementWrapper=z.SonnerElementWrapper,exports.SonnerIcon=z.SonnerIcon,exports.SonnerLayout=z.SonnerLayout,exports.useSonner=z.useSonner,exports.getContrastYIQ=f.getContrastYIQ,exports.getScrollbarWidth=f.getScrollbarWidth,exports.transformEnumToOptions=f.transformEnumToOptions,exports.transformObjectToArray=f.transformObjectToArray,exports.transformObjectValuesToKeys=f.transformObjectValuesToKeys,exports.useDebouncedCallback=V.useDebouncedCallback,exports.useDeepCompareMemoize=w.useDeepCompareMemoize,exports.addAlwaysOutline=K.addAlwaysOutline,exports.addColorTransition=K.addColorTransition,exports.addDisabled=K.addDisabled,exports.addFont=K.addFont,exports.addGridTransition=K.addGridTransition,exports.addNiceNumber=K.addNiceNumber,exports.addOutline=K.addOutline,exports.addOutlineChildren=K.addOutlineChildren,exports.addRemoveOutline=K.addRemoveOutline,exports.addRemoveScrollbar=K.addRemoveScrollbar,exports.addTransition=K.addTransition,exports.addTransitionWithoutSize=K.addTransitionWithoutSize,exports.ErrorMessage=X.ErrorMessage,exports.ErrorMessageComponent=X.ErrorMessageComponent,exports.addError=X.addError,exports.BlurIn=Z.BlurIn,exports.GradualSpacing=Z.GradualSpacing,exports.TypingEffect=Z.TypingEffect,exports.WordsPullUp=Z.WordsPullUp,exports.addSX=H.addSX,exports.JeneseiGlobalStyles=Y.JeneseiGlobalStyles,exports.JeneseiPalette=Y.JeneseiPalette,exports.KEY_SIZE_DATA=Y.KEY_SIZE_DATA,exports.KEY_SIZE_DATA_TOGGLE=Y.KEY_SIZE_DATA_TOGGLE,exports.ThemeBlack=Y.ThemeBlack,exports.ThemeLight=Y.ThemeLight;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./area-Dup_lUb9.cjs"),t=require("./area.hooks-C_UKZzcb.cjs"),o=require("./area-CZkDIeGx.cjs"),r=require("./area-CmCMHnRA.cjs"),p=require("./area-DRsIULcw.cjs"),s=require("./component-8NOxwZJO.cjs"),n=require("./component.styles-Py-IeQ2q.cjs"),a=require("./component-DnJo66DS.cjs"),i=require("./component-cRmWWDr_.cjs"),x=require("./component.styles-Bb7_KygZ.cjs"),c=require("./component.styles-DbWj2stq.cjs"),u=require("./component.types-CfR3RBsV.cjs"),l=require("./component.styles-BKnUDWqO.cjs"),d=require("./component.types-DraGq1j_.cjs"),S=require("./component.styles-B-bndnRM.cjs"),D=require("./component-DdJt3LEF.cjs"),I=require("./component.styles-C4xnWrvJ.cjs"),E=require("./component.constants-CpRgeAIu.cjs"),T=require("./component--jGdo2yq.cjs"),_=require("./component.styles-BeRVOt5T.cjs"),A=require("./component.styles-gZHy-64x.cjs"),O=require("./component.components-CC3IeZon.cjs"),L=require("./component.constants-D6AJ1xmO.cjs"),C=require("./component.styles-ZU_GyVub.cjs"),m=require("./component.styles-Dpg-__rn.cjs"),P=require("./component-CLqcB5mM.cjs"),g=require("./component.styles-PNgt36ZD.cjs"),R=require("./component.styles-CLn52hJD.cjs"),N=require("./component-GKvpOWlO.cjs"),y=require("./component.styles-CsB9986a.cjs"),M=require("./component.styles-BELwxHxh.cjs"),h=require("./component-BVnHSTJd.cjs"),U=require("./component.functions-D9ffjEok.cjs"),F=require("./consts.cjs.js"),G=require("./context.hooks-XBiTuVyt.cjs"),k=require("./context.functions-80N-5MqM.cjs"),j=require("./context.constants-BLQ_1jZI.cjs"),W=require("./context.hooks-u408Pxw8.cjs"),B=require("./context.functions-ohI9H54j.cjs"),b=require("./context.functions-ar41xFVo.cjs"),v=require("./context.hooks-D13tbrva.cjs"),q=require("./context.hooks-BIsapq-0.cjs"),z=require("./context.constants-cm50ZUiS.cjs"),f=require("./functions.cjs.js"),V=require("./use-IhzeVumv.cjs"),w=require("./use-C1l0O0Qo.cjs"),K=require("./style-Df37KnoJ.cjs"),X=require("./style-D3Lbn1EL.cjs"),Z=require("./motion-DgB7M2Hn.cjs"),H=require("./style-fRZ6xrVp.cjs"),Y=require("./theme.global-CcoD5bPP.cjs");exports.Outside=e.Outside,exports.useRemovePreviewLoader=t.useRemovePreviewLoader,exports.Preview=o.Preview,exports.Scroll=r.Scroll,exports.StyledScroll=r.StyledScroll,exports.Skeleton=p.Skeleton,exports.StyledSkeleton=p.StyledSkeleton,exports.Smooth=s.Smooth,exports.Accordion=n.Accordion,exports.AccordionDetails=n.AccordionDetails,exports.AccordionStyledIcon=n.AccordionStyledIcon,exports.AccordionSummary=n.AccordionSummary,exports.AccordionSummaryContent=n.AccordionSummaryContent,exports.AccordionWrapper=n.AccordionWrapper,exports.Button=a.Button,exports.ButtonSize=a.ButtonSize,exports.ButtonSizeConstructor=a.ButtonSizeConstructor,exports.StyledButton=a.StyledButton,exports.StyledButtonIconsWrapper=a.StyledButtonIconsWrapper,exports.ButtonGroup=i.ButtonGroup,exports.ButtonGroupWrapper=i.ButtonGroupWrapper,exports.Checkbox=x.Checkbox,exports.CheckboxGenre=x.CheckboxGenre,exports.CheckboxSize=x.CheckboxSize,exports.CheckboxSizeConstructor=x.CheckboxSizeConstructor,exports.CheckboxWrapper=x.CheckboxWrapper,exports.StyledIcon=x.StyledIcon,exports.CheckboxChildren=c.CheckboxChildren,exports.CheckboxGroup=c.CheckboxGroup,exports.CheckboxGroupItem=c.CheckboxGroupItem,exports.CheckboxGroupLabel=c.CheckboxGroupLabel,exports.CheckboxGroupSize=c.CheckboxGroupSize,exports.CheckboxGroupSizeConstructor=c.CheckboxGroupSizeConstructor,exports.CheckboxGroupWrapper=c.CheckboxGroupWrapper,exports.DateDropdownDay=u.DateDropdownDay,exports.DateDropdownDayOfWeek=u.DateDropdownDayOfWeek,exports.DateDropdownDays=u.DateDropdownDays,exports.DateDropdownList=u.DateDropdownList,exports.DateDropdownListParent=u.DateDropdownListParent,exports.DateInput=u.DateInput,exports.DateInputButton=u.DateInputButton,exports.DateInputWrapper=u.DateInputWrapper,exports.DatePicker=u.DatePicker,exports.DatePickerVariant=u.DatePickerVariant,exports.DateWrapper=u.DateWrapper,exports.addDateDropdownDaySize=u.addDateDropdownDaySize,exports.addDateInputButtonSize=u.addDateInputButtonSize,exports.addDateInputWrapperSize=u.addDateInputWrapperSize,exports.Icon=l.Icon,exports.StyledSVG=l.StyledSVG,exports.ENUM_ICON_BUSTMARKET=d.ENUM_ICON_BUSTMARKET,exports.ENUM_ICON_CHECKBOX=d.ENUM_ICON_CHECKBOX,exports.ENUM_ICON_ID=d.ENUM_ICON_ID,exports.ENUM_ICON_LOADING=d.ENUM_ICON_LOADING,exports.ENUM_ICON_LOGO=d.ENUM_ICON_LOGO,exports.ENUM_ICON_REALEBAIL=d.ENUM_ICON_REALEBAIL,exports.Image=S.Image,exports.ImageIMG=S.ImageIMG,exports.ImageButton=D.ImageButton,exports.ImageSelect=I.ImageSelect,exports.ImageSelectListSize=I.ImageSelectListSize,exports.ImageSelectListSizeConstructor=I.ImageSelectListSizeConstructor,exports.ImageSelectListWrapper=I.ImageSelectListWrapper,exports.ImageSelectSize=I.ImageSelectSize,exports.ImageSelectSizeConstructor=I.ImageSelectSizeConstructor,exports.ImageSelectWrapper=I.ImageSelectWrapper,exports.IMAGES=E.IMAGES,exports.ImageSlider=E.ImageSlider,exports.SliderDot=E.SliderDot,exports.SliderImage=E.SliderImage,exports.Input=T.Input,exports.formatPhoneNumber=T.formatPhoneNumber,exports.InputPostfixChildren=_.InputPostfixChildren,exports.InputPrefixChildren=_.InputPrefixChildren,exports.InputSize=_.InputSize,exports.InputSizeConstructor=_.InputSizeConstructor,exports.StyledInput=_.StyledInput,exports.StyledInputCSS=_.StyledInputCSS,exports.StyledInputNumeric=_.StyledInputNumeric,exports.StyledInputPattern=_.StyledInputPattern,exports.StyledInputWrapper=_.StyledInputWrapper,exports.StyledMotionInput=_.StyledMotionInput,exports.addInputIsInputEffect=_.addInputIsInputEffect,exports.addInputPlaceholder=_.addInputPlaceholder,exports.addInputPlaceholderNiceNumber=_.addInputPlaceholderNiceNumber,exports.InputOTP=A.InputOTP,exports.InputOTPSize=A.InputOTPSize,exports.InputOTPSizeConstructor=A.InputOTPSizeConstructor,exports.InputOTPWrapper=A.InputOTPWrapper,exports.CustomZoomControl=O.CustomZoomControl,exports.DEFAULT_MAP_CENTER=O.DEFAULT_MAP_CENTER,exports.DEFAULT_MAP_MAX_ZOOM=O.DEFAULT_MAP_MAX_ZOOM,exports.DEFAULT_MAP_MIN_ZOOM=O.DEFAULT_MAP_MIN_ZOOM,exports.DEFAULT_MAP_THEME=O.DEFAULT_MAP_THEME,exports.DEFAULT_MAP_ZOOM=O.DEFAULT_MAP_ZOOM,exports.MapCluster=O.MapCluster,exports.MapDot=O.MapDot,exports.MapWrapper=O.MapWrapper,exports.MarkerCluster=O.MarkerCluster,exports.UpdateMapSettings=O.UpdateMapSettings,exports.createClusterIcon=O.createClusterIcon,exports.customDefaultIcon=O.customDefaultIcon,exports.customTextIcon=O.customTextIcon,exports.DEFAULT_COMPONENT_PAGINATION_GAP=L.DEFAULT_COMPONENT_PAGINATION_GAP,exports.Pagination=L.Pagination,exports.Range=C.Range,exports.RangeThumb=C.RangeThumb,exports.RangeTrack=C.RangeTrack,exports.RangeWrapper=C.RangeWrapper,exports.DEFAULT_RIPPLE_DURATION=m.DEFAULT_RIPPLE_DURATION,exports.DEFAULT_RIPPLE_ID=m.DEFAULT_RIPPLE_ID,exports.RippleContainer=m.RippleContainer,exports.RippleSpan=m.RippleSpan,exports.addRipple=m.addRipple,exports.addRippleDefault=m.addRippleDefault,exports.Ripple=P.Ripple,exports.ButtonList=g.ButtonList,exports.ContainerDropdownListOption=g.ContainerDropdownListOption,exports.ContainerSelectListOption=g.ContainerSelectListOption,exports.DropdownList=g.DropdownList,exports.DropdownListOption=g.DropdownListOption,exports.DropdownListOptionIcon=g.DropdownListOptionIcon,exports.DropdownListParent=g.DropdownListParent,exports.Select=g.Select,exports.SelectLanguage=g.SelectLanguage,exports.SelectList=g.SelectList,exports.SelectListOption=g.SelectListOption,exports.SelectMapTheme=g.SelectMapTheme,exports.SelectMonth=g.SelectMonth,exports.SelectMonths=g.SelectMonths,exports.SelectTextArea=g.SelectTextArea,exports.SelectWrapper=g.SelectWrapper,exports.SelectYear=g.SelectYear,exports.Separator=R.Separator,exports.SeparatorWrapper=R.SeparatorWrapper,exports.Stack=N.Stack,exports.StackMotion=N.StackMotion,exports.StyledStack=N.StyledStack,exports.StyledStackMotion=N.StyledStackMotion,exports.StyledTextArea=y.StyledTextArea,exports.TextArea=y.TextArea,exports.TextAreaWrapper=y.TextAreaWrapper,exports.addTextArea=y.addTextArea,exports.Toggle=M.Toggle,exports.ToggleCenter=M.ToggleCenter,exports.ToggleWrapper=M.ToggleWrapper,exports.DEFAULT_TOOLTIP_OFFSET_FALLBACK=h.DEFAULT_TOOLTIP_OFFSET_FALLBACK,exports.DEFAULT_TOOLTIP_PLACEMENT_FALLBACK=h.DEFAULT_TOOLTIP_PLACEMENT_FALLBACK,exports.Title=h.Title,exports.Tooltip=h.Tooltip,exports.TooltipBox=h.TooltipBox,exports.TooltipContainer=h.TooltipContainer,exports.TooltipContent=h.TooltipContent,exports.Typography=h.Typography,exports.TypographyLink=h.TypographyLink,exports.TypographyTooltip=h.TypographyTooltip,exports.addSXTypography=h.addSXTypography,exports.addTooltipBoxSize=h.addTooltipBoxSize,exports.addTooltipBoxSizeConstructor=h.addTooltipBoxSizeConstructor,exports.getFontSizeStyles=U.getFontSizeStyles,exports.ImageSupportedFormats=F.ImageSupportedFormats,exports.ImageSupportedFormatsForInput=F.ImageSupportedFormatsForInput,exports.KeysLanguage=F.KeysLanguage,exports.KeysService=F.KeysService,exports.ListLanguage=F.ListLanguage,exports.ListService=F.ListService,exports.LoremIpsumText=F.LoremIpsumText,exports.MapThemeList=F.MapThemeList,exports.ObjectLanguage=F.ObjectLanguage,exports.ObjectService=F.ObjectService,exports.localeInput=F.localeInput,exports.localeMonths=F.localeMonths,exports.localeWeeks=F.localeWeeks,exports.AppContext=G.AppContext,exports.ProviderApp=G.ProviderApp,exports.ProviderAppOutlet=G.ProviderAppOutlet,exports.ProviderAppOutletChildren=G.ProviderAppOutletChildren,exports.ProviderAppOutletFooter=G.ProviderAppOutletFooter,exports.ProviderAppOutletHeader=G.ProviderAppOutletHeader,exports.ProviderAppOutletLeftAside=G.ProviderAppOutletLeftAside,exports.ProviderAppOutletNav=G.ProviderAppOutletNav,exports.ProviderAppOutletNotification=G.ProviderAppOutletNotification,exports.ProviderAppOutletRightAside=G.ProviderAppOutletRightAside,exports.ProviderAppWrapper=G.ProviderAppWrapper,exports.useApp=G.useApp,exports.useBgColor=G.useBgColor,exports.useBgImage=G.useBgImage,exports.useDescription=G.useDescription,exports.useStatusBarColor=G.useStatusBarColor,exports.CookieContext=k.CookieContext,exports.ProviderCookie=k.ProviderCookie,exports.getFromCookie=k.getFromCookie,exports.setToCookie=k.setToCookie,exports.useCookie=k.useCookie,exports.DEFAULT_PROVIDER_DIALOG_DURATION_ELEMENT=j.DEFAULT_PROVIDER_DIALOG_DURATION_ELEMENT,exports.DEFAULT_PROVIDER_DIALOG_DURATION_LAYOUT=j.DEFAULT_PROVIDER_DIALOG_DURATION_LAYOUT,exports.DEFAULT_PROVIDER_DIALOG_ELEMENT_BACKGROUND=j.DEFAULT_PROVIDER_DIALOG_ELEMENT_BACKGROUND,exports.DEFAULT_PROVIDER_DIALOG_ELEMENT_BORDER_RADIUS=j.DEFAULT_PROVIDER_DIALOG_ELEMENT_BORDER_RADIUS,exports.DEFAULT_PROVIDER_DIALOG_ELEMENT_MAX_HEIGHT=j.DEFAULT_PROVIDER_DIALOG_ELEMENT_MAX_HEIGHT,exports.DEFAULT_PROVIDER_DIALOG_ELEMENT_MAX_WIDTH=j.DEFAULT_PROVIDER_DIALOG_ELEMENT_MAX_WIDTH,exports.DEFAULT_PROVIDER_DIALOG_ELEMENT_PADDING=j.DEFAULT_PROVIDER_DIALOG_ELEMENT_PADDING,exports.DialogContent=j.DialogContent,exports.DialogContext=j.DialogContext,exports.DialogElementWrapper=j.DialogElementWrapper,exports.DialogLayout=j.DialogLayout,exports.ProviderDialog=j.ProviderDialog,exports.useDialog=j.useDialog,exports.useDialogs=j.useDialogs,exports.GeolocationContext=W.GeolocationContext,exports.ProviderGeolocation=W.ProviderGeolocation,exports.useGeolocation=W.useGeolocation,exports.LocalStorageContext=B.LocalStorageContext,exports.ProviderLocalStorage=B.ProviderLocalStorage,exports.getFromLocalStorage=B.getFromLocalStorage,exports.setToLocalStorage=B.setToLocalStorage,exports.useLocalStorage=B.useLocalStorage,exports.urlBase64ToUint8Array=b.urlBase64ToUint8Array,exports.PermissionContext=v.PermissionContext,exports.ProviderPermission=v.ProviderPermission,exports.usePermission=v.usePermission,exports.ProviderScreenWidth=q.ProviderScreenWidth,exports.ScreenWidthContext=q.ScreenWidthContext,exports.useScreenWidth=q.useScreenWidth,exports.DEFAULT_PROVIDER_SONNER_BUTTON=z.DEFAULT_PROVIDER_SONNER_BUTTON,exports.DEFAULT_PROVIDER_SONNER_DURATION=z.DEFAULT_PROVIDER_SONNER_DURATION,exports.DEFAULT_PROVIDER_SONNER_GENRE=z.DEFAULT_PROVIDER_SONNER_GENRE,exports.DEFAULT_PROVIDER_SONNER_MARGIN_BOTTOM=z.DEFAULT_PROVIDER_SONNER_MARGIN_BOTTOM,exports.DEFAULT_PROVIDER_SONNER_SCALE=z.DEFAULT_PROVIDER_SONNER_SCALE,exports.DEFAULT_PROVIDER_SONNER_Y=z.DEFAULT_PROVIDER_SONNER_Y,exports.DEFAULT_PROVIDER_SONNER_Z_INDEX=z.DEFAULT_PROVIDER_SONNER_Z_INDEX,exports.ProviderSonner=z.ProviderSonner,exports.SonnerButtonWrapper=z.SonnerButtonWrapper,exports.SonnerContent=z.SonnerContent,exports.SonnerContentDescription=z.SonnerContentDescription,exports.SonnerContentTitle=z.SonnerContentTitle,exports.SonnerContext=z.SonnerContext,exports.SonnerElementWrapper=z.SonnerElementWrapper,exports.SonnerIcon=z.SonnerIcon,exports.SonnerLayout=z.SonnerLayout,exports.useSonner=z.useSonner,exports.getContrastYIQ=f.getContrastYIQ,exports.getScrollbarWidth=f.getScrollbarWidth,exports.transformEnumToOptions=f.transformEnumToOptions,exports.transformObjectToArray=f.transformObjectToArray,exports.transformObjectValuesToKeys=f.transformObjectValuesToKeys,exports.useDebouncedCallback=V.useDebouncedCallback,exports.useDeepCompareMemoize=w.useDeepCompareMemoize,exports.addAlwaysOutline=K.addAlwaysOutline,exports.addColorTransition=K.addColorTransition,exports.addDisabled=K.addDisabled,exports.addFont=K.addFont,exports.addGridTransition=K.addGridTransition,exports.addNiceNumber=K.addNiceNumber,exports.addOutline=K.addOutline,exports.addOutlineChildren=K.addOutlineChildren,exports.addRemoveOutline=K.addRemoveOutline,exports.addRemoveScrollbar=K.addRemoveScrollbar,exports.addTransition=K.addTransition,exports.addTransitionWithoutSize=K.addTransitionWithoutSize,exports.ErrorMessage=X.ErrorMessage,exports.ErrorMessageComponent=X.ErrorMessageComponent,exports.addError=X.addError,exports.BlurIn=Z.BlurIn,exports.GradualSpacing=Z.GradualSpacing,exports.TypingEffect=Z.TypingEffect,exports.WordsPullUp=Z.WordsPullUp,exports.addSX=H.addSX,exports.JeneseiGlobalStyles=Y.JeneseiGlobalStyles,exports.JeneseiPalette=Y.JeneseiPalette,exports.KEY_SIZE_DATA=Y.KEY_SIZE_DATA,exports.KEY_SIZE_DATA_TOGGLE=Y.KEY_SIZE_DATA_TOGGLE,exports.ThemeBlack=Y.ThemeBlack,exports.ThemeLight=Y.ThemeLight;
2
2
  //# sourceMappingURL=index.cjs.js.map
package/build/index.es.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { O } from "./area-CD8KKIM0.js";
2
2
  import { u } from "./area.hooks-Bk04M7mk.js";
3
- import { P } from "./area-CT83tDk-.js";
3
+ import { P } from "./area-DEwj0-O3.js";
4
4
  import { a, S } from "./area-BWxBop5m.js";
5
5
  import { a as a2, S as S2 } from "./area-sDVSuS3G.js";
6
6
  import { S as S3 } from "./component-DpVp9dB1.js";
@@ -13,8 +13,8 @@ import { f as f2, g, d as d4, c as c5, b as b5, h, l, j, D, m, a as a8, e as e3,
13
13
  import { I, S as S6 } from "./component.styles-DS0ofW1Y.js";
14
14
  import { e as e4, a as a9, E, b as b6, d as d5, c as c6 } from "./component.types-BBQ18Npa.js";
15
15
  import { I as I2, a as a10 } from "./component.styles-BEaqQuF_.js";
16
- import { I as I3 } from "./component-G5QqAuDV.js";
17
- import { I as I4, a as a11, b as b7, f as f3, c as c7, d as d6, e as e5 } from "./component.styles-CZyAhUtW.js";
16
+ import { I as I3 } from "./component-P-3bwi3_.js";
17
+ import { I as I4, a as a11, b as b7, f as f3, c as c7, d as d6, e as e5 } from "./component.styles-DwtZ7CY4.js";
18
18
  import { b as b8, I as I5, a as a12, S as S7 } from "./component.constants-BxnfHAYp.js";
19
19
  import { I as I6, f as f4 } from "./component-DaXKDHnc.js";
20
20
  import { k as k2, j as j2, I as I7, c as c8, f as f5, e as e6, i as i2, h as h2, S as S8, g as g2, d as d7, a as a13, b as b9 } from "./component.styles-BbwS_Ekx.js";
@@ -32,7 +32,7 @@ import { T as T2, b as b17, a as a22 } from "./component.styles-B0FFHGeN.js";
32
32
  import { f as f8, D as D6, h as h5, d as d11, c as c15, T as T3, e as e9, i as i5, j as j5, k as k4, g as g5, a as a23, b as b18 } from "./component-GtWqnaqk.js";
33
33
  import { g as g6 } from "./component.functions-DNW6h8kk.js";
34
34
  import { ImageSupportedFormats, ImageSupportedFormatsForInput, KeysLanguage, KeysService, ListLanguage, ListService, LoremIpsumText, MapThemeList, ObjectLanguage, ObjectService, localeInput, localeMonths, localeWeeks } from "./consts.es.js";
35
- import { A as A2, P as P3, e as e10, f as f9, i as i6, h as h6, k as k5, j as j6, g as g7, l as l3, d as d12, m as m3, u as u2, b as b19, c as c16, a as a24 } from "./context.hooks-CI5aQmpr.js";
35
+ import { A as A2, P as P3, e as e10, f as f9, i as i6, h as h6, k as k5, j as j6, g as g7, l as l3, d as d12, m as m3, u as u2, b as b19, c as c16, a as a24 } from "./context.hooks-Cmgo0uqV.js";
36
36
  import { C as C5, P as P4, g as g8, s, u as u3 } from "./context.functions-BD15C8_y.js";
37
37
  import { e as e11, f as f10, k as k6, i as i7, g as g9, h as h7, j as j7, d as d13, D as D7, c as c17, b as b20, P as P5, a as a25, u as u4 } from "./context.constants-BCpaUfFz.js";
38
38
  import { G, P as P6, u as u5 } from "./context.hooks-BzMTkJNv.js";
@@ -1,4 +1,4 @@
1
- "use strict";const e=require("./jsx-runtime-BcGej2Kr.cjs"),t=require("react"),o=require("styled-components"),n=require("./area-t259bohc.cjs"),i=require("./component-DnJo66DS.cjs"),r=require("./component.constants-D6AJ1xmO.cjs"),a=require("./component-GKvpOWlO.cjs"),s=require("./consts.cjs.js"),c=require("./context.constants-BLQ_1jZI.cjs"),p=require("./theme.global-CcoD5bPP.cjs");function u(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e)for(const o in e)if("default"!==o){const n=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(t,o,n.get?n:{enumerable:!0,get:()=>e[o]})}return t.default=e,Object.freeze(t)}const d=u(t);function l(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var h=function(e,t){return(h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])})(e,t)};var m=function(){return m=Object.assign||function(e){for(var t,o=1,n=arguments.length;o<n;o++)for(var i in t=arguments[o])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},m.apply(this,arguments)};"function"==typeof SuppressedError&&SuppressedError;var g,v,f,w,x,C,y,S,b,R,z,D,E,P,M,j=!1;function A(){if(!j){j=!0;var e=navigator.userAgent,t=/(?:MSIE.(\d+\.\d+))|(?:(?:Firefox|GranParadiso|Iceweasel).(\d+\.\d+))|(?:Opera(?:.+Version.|.)(\d+\.\d+))|(?:AppleWebKit.(\d+(?:\.\d+)?))|(?:Trident\/\d+\.\d+.*rv:(\d+\.\d+))/.exec(e),o=/(Mac OS X)|(Windows)|(Linux)/.exec(e);if(D=/\b(iPhone|iP[ao]d)/.exec(e),E=/\b(iP[ao]d)/.exec(e),R=/Android/i.exec(e),P=/FBAN\/\w+;/i.exec(e),M=/Mobile/i.exec(e),z=!!/Win64/.exec(e),t){(g=t[1]?parseFloat(t[1]):t[5]?parseFloat(t[5]):NaN)&&document&&document.documentMode&&(g=document.documentMode);var n=/(?:Trident\/(\d+.\d+))/.exec(e);C=n?parseFloat(n[1])+4:g,v=t[2]?parseFloat(t[2]):NaN,f=t[3]?parseFloat(t[3]):NaN,(w=t[4]?parseFloat(t[4]):NaN)?(t=/(?:Chrome\/(\d+\.\d+))/.exec(e),x=t&&t[1]?parseFloat(t[1]):NaN):x=NaN}else g=v=f=x=w=NaN;if(o){if(o[1]){var i=/(?:Mac OS X (\d+(?:[._]\d+)?))/.exec(e);y=!i||parseFloat(i[1].replace("_","."))}else y=!1;S=!!o[2],b=!!o[3]}else y=S=b=!1}}var O,T={ie:function(){return A()||g},ieCompatibilityMode:function(){return A()||C>g},ie64:function(){return T.ie()&&z},firefox:function(){return A()||v},opera:function(){return A()||f},webkit:function(){return A()||w},safari:function(){return T.webkit()},chrome:function(){return A()||x},windows:function(){return A()||S},osx:function(){return A()||y},linux:function(){return A()||b},iphone:function(){return A()||D},mobile:function(){return A()||D||E||R||M},nativeApp:function(){return A()||P},android:function(){return A()||R},ipad:function(){return A()||E}},W=T,_={canUseDOM:!("undefined"==typeof window||!window.document||!window.document.createElement)};_.canUseDOM&&(O=document.implementation&&document.implementation.hasFeature&&!0!==document.implementation.hasFeature("",""))
1
+ "use strict";const e=require("./jsx-runtime-BcGej2Kr.cjs"),t=require("react"),o=require("styled-components"),n=require("./area-CZkDIeGx.cjs"),i=require("./component-DnJo66DS.cjs"),r=require("./component.constants-D6AJ1xmO.cjs"),a=require("./component-GKvpOWlO.cjs"),s=require("./consts.cjs.js"),c=require("./context.constants-BLQ_1jZI.cjs"),p=require("./theme.global-CcoD5bPP.cjs");function u(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e)for(const o in e)if("default"!==o){const n=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(t,o,n.get?n:{enumerable:!0,get:()=>e[o]})}return t.default=e,Object.freeze(t)}const d=u(t);function l(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var h=function(e,t){return(h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])})(e,t)};var m=function(){return m=Object.assign||function(e){for(var t,o=1,n=arguments.length;o<n;o++)for(var i in t=arguments[o])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},m.apply(this,arguments)};"function"==typeof SuppressedError&&SuppressedError;var g,v,f,w,x,C,y,S,b,R,z,D,E,P,M,j=!1;function A(){if(!j){j=!0;var e=navigator.userAgent,t=/(?:MSIE.(\d+\.\d+))|(?:(?:Firefox|GranParadiso|Iceweasel).(\d+\.\d+))|(?:Opera(?:.+Version.|.)(\d+\.\d+))|(?:AppleWebKit.(\d+(?:\.\d+)?))|(?:Trident\/\d+\.\d+.*rv:(\d+\.\d+))/.exec(e),o=/(Mac OS X)|(Windows)|(Linux)/.exec(e);if(D=/\b(iPhone|iP[ao]d)/.exec(e),E=/\b(iP[ao]d)/.exec(e),R=/Android/i.exec(e),P=/FBAN\/\w+;/i.exec(e),M=/Mobile/i.exec(e),z=!!/Win64/.exec(e),t){(g=t[1]?parseFloat(t[1]):t[5]?parseFloat(t[5]):NaN)&&document&&document.documentMode&&(g=document.documentMode);var n=/(?:Trident\/(\d+.\d+))/.exec(e);C=n?parseFloat(n[1])+4:g,v=t[2]?parseFloat(t[2]):NaN,f=t[3]?parseFloat(t[3]):NaN,(w=t[4]?parseFloat(t[4]):NaN)?(t=/(?:Chrome\/(\d+\.\d+))/.exec(e),x=t&&t[1]?parseFloat(t[1]):NaN):x=NaN}else g=v=f=x=w=NaN;if(o){if(o[1]){var i=/(?:Mac OS X (\d+(?:[._]\d+)?))/.exec(e);y=!i||parseFloat(i[1].replace("_","."))}else y=!1;S=!!o[2],b=!!o[3]}else y=S=b=!1}}var O,T={ie:function(){return A()||g},ieCompatibilityMode:function(){return A()||C>g},ie64:function(){return T.ie()&&z},firefox:function(){return A()||v},opera:function(){return A()||f},webkit:function(){return A()||w},safari:function(){return T.webkit()},chrome:function(){return A()||x},windows:function(){return A()||S},osx:function(){return A()||y},linux:function(){return A()||b},iphone:function(){return A()||D},mobile:function(){return A()||D||E||R||M},nativeApp:function(){return A()||P},android:function(){return A()||R},ipad:function(){return A()||E}},W=T,_={canUseDOM:!("undefined"==typeof window||!window.document||!window.document.createElement)};_.canUseDOM&&(O=document.implementation&&document.implementation.hasFeature&&!0!==document.implementation.hasFeature("",""))
2
2
  /**
3
3
  * Checks if an event is supported in the current execution environment.
4
4
  *
@@ -13,4 +13,4 @@
13
13
  * @internal
14
14
  * @license Modernizr 3.0.0pre (Custom Build) | MIT
15
15
  */;var L=W,N=function(e,t){if(!_.canUseDOM||t&&!("addEventListener"in document))return!1;var o="on"+e,n=o in document;if(!n){var i=document.createElement("div");i.setAttribute(o,"return;"),n="function"==typeof i[o]}return!n&&O&&"wheel"===e&&(n=document.implementation.hasFeature("Events.wheel","3.0")),n};function I(e){var t=0,o=0,n=0,i=0;return"detail"in e&&(o=e.detail),"wheelDelta"in e&&(o=-e.wheelDelta/120),"wheelDeltaY"in e&&(o=-e.wheelDeltaY/120),"wheelDeltaX"in e&&(t=-e.wheelDeltaX/120),"axis"in e&&e.axis===e.HORIZONTAL_AXIS&&(t=o,o=0),n=10*t,i=10*o,"deltaY"in e&&(i=e.deltaY),"deltaX"in e&&(n=e.deltaX),(n||i)&&e.deltaMode&&(1==e.deltaMode?(n*=40,i*=40):(n*=800,i*=800)),n&&!t&&(t=n<1?-1:1),i&&!o&&(o=i<1?-1:1),{spinX:t,spinY:o,pixelX:n,pixelY:i}}I.getEventType=function(){return L.firefox()?"DOMMouseScroll":N("wheel")?"wheel":"mousewheel"};const F=l(I);function k(e,t,o,n,i){void 0===i&&(i=0);var r=X(t.width,t.height,i),a=r.width,s=r.height;return{x:Z(e.x,a,o.width,n),y:Z(e.y,s,o.height,n)}}function Z(e,t,o,n){var i=t*n/2-o/2;return V(e,-i,i)}function H(e,t){return Math.sqrt(Math.pow(e.y-t.y,2)+Math.pow(e.x-t.x,2))}function U(e,t){return 180*Math.atan2(t.y-e.y,t.x-e.x)/Math.PI}function q(e,t){return Math.min(e,Math.max(0,t))}function B(e,t){return t}function G(e,t){return{x:(t.x+e.x)/2,y:(t.y+e.y)/2}}function X(e,t,o){var n=o*Math.PI/180;return{width:Math.abs(Math.cos(n)*e)+Math.abs(Math.sin(n)*t),height:Math.abs(Math.sin(n)*e)+Math.abs(Math.cos(n)*t)}}function V(e,t,o){return Math.min(Math.max(e,t),o)}function Y(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.filter(function(e){return"string"==typeof e&&e.length>0}).join(" ").trim()}var K=function(e){function t(){var o=null!==e&&e.apply(this,arguments)||this;return o.cropperRef=d.createRef(),o.imageRef=d.createRef(),o.videoRef=d.createRef(),o.containerPosition={x:0,y:0},o.containerRef=null,o.styleRef=null,o.containerRect=null,o.mediaSize={width:0,height:0,naturalWidth:0,naturalHeight:0},o.dragStartPosition={x:0,y:0},o.dragStartCrop={x:0,y:0},o.gestureZoomStart=0,o.gestureRotationStart=0,o.isTouching=!1,o.lastPinchDistance=0,o.lastPinchRotation=0,o.rafDragTimeout=null,o.rafPinchTimeout=null,o.wheelTimer=null,o.currentDoc="undefined"!=typeof document?document:null,o.currentWindow="undefined"!=typeof window?window:null,o.resizeObserver=null,o.state={cropSize:null,hasWheelJustStarted:!1,mediaObjectFit:void 0},o.initResizeObserver=function(){if(void 0!==window.ResizeObserver&&o.containerRef){var e=!0;o.resizeObserver=new window.ResizeObserver(function(t){e?e=!1:o.computeSizes()}),o.resizeObserver.observe(o.containerRef)}},o.preventZoomSafari=function(e){return e.preventDefault()},o.cleanEvents=function(){o.currentDoc&&(o.currentDoc.removeEventListener("mousemove",o.onMouseMove),o.currentDoc.removeEventListener("mouseup",o.onDragStopped),o.currentDoc.removeEventListener("touchmove",o.onTouchMove),o.currentDoc.removeEventListener("touchend",o.onDragStopped),o.currentDoc.removeEventListener("gesturechange",o.onGestureChange),o.currentDoc.removeEventListener("gestureend",o.onGestureEnd),o.currentDoc.removeEventListener("scroll",o.onScroll))},o.clearScrollEvent=function(){o.containerRef&&o.containerRef.removeEventListener("wheel",o.onWheel),o.wheelTimer&&clearTimeout(o.wheelTimer)},o.onMediaLoad=function(){var e=o.computeSizes();e&&(o.emitCropData(),o.setInitialCrop(e)),o.props.onMediaLoaded&&o.props.onMediaLoaded(o.mediaSize)},o.setInitialCrop=function(e){if(o.props.initialCroppedAreaPercentages){var t=function(e,t,o,n,i,r){var a=X(t.width,t.height,o),s=V(n.width/a.width*(100/e.width),i,r);return{crop:{x:s*a.width/2-n.width/2-a.width*s*(e.x/100),y:s*a.height/2-n.height/2-a.height*s*(e.y/100)},zoom:s}}(o.props.initialCroppedAreaPercentages,o.mediaSize,o.props.rotation,e,o.props.minZoom,o.props.maxZoom),n=t.crop,i=t.zoom;o.props.onCropChange(n),o.props.onZoomChange&&o.props.onZoomChange(i)}else if(o.props.initialCroppedAreaPixels){var r=function(e,t,o,n,i,r){void 0===o&&(o=0);var a=X(t.naturalWidth,t.naturalHeight,o),s=V(function(e,t,o){var n=function(e){return e.width>e.height?e.width/e.naturalWidth:e.height/e.naturalHeight}(t);return o.height>o.width?o.height/(e.height*n):o.width/(e.width*n)}(e,t,n),i,r),c=n.height>n.width?n.height/e.height:n.width/e.width;return{crop:{x:((a.width-e.width)/2-e.x)*c,y:((a.height-e.height)/2-e.y)*c},zoom:s}}(o.props.initialCroppedAreaPixels,o.mediaSize,o.props.rotation,e,o.props.minZoom,o.props.maxZoom);n=r.crop,i=r.zoom;o.props.onCropChange(n),o.props.onZoomChange&&o.props.onZoomChange(i)}},o.computeSizes=function(){var e,t,n,i,r,a,s=o.imageRef.current||o.videoRef.current;if(s&&o.containerRef){o.containerRect=o.containerRef.getBoundingClientRect(),o.saveContainerPosition();var c=o.containerRect.width/o.containerRect.height,p=(null===(e=o.imageRef.current)||void 0===e?void 0:e.naturalWidth)||(null===(t=o.videoRef.current)||void 0===t?void 0:t.videoWidth)||0,u=(null===(n=o.imageRef.current)||void 0===n?void 0:n.naturalHeight)||(null===(i=o.videoRef.current)||void 0===i?void 0:i.videoHeight)||0,d=p/u,l=void 0;if(s.offsetWidth<p||s.offsetHeight<u)switch(o.state.mediaObjectFit){default:case"contain":l=c>d?{width:o.containerRect.height*d,height:o.containerRect.height}:{width:o.containerRect.width,height:o.containerRect.width/d};break;case"horizontal-cover":l={width:o.containerRect.width,height:o.containerRect.width/d};break;case"vertical-cover":l={width:o.containerRect.height*d,height:o.containerRect.height}}else l={width:s.offsetWidth,height:s.offsetHeight};o.mediaSize=m(m({},l),{naturalWidth:p,naturalHeight:u}),o.props.setMediaSize&&o.props.setMediaSize(o.mediaSize);var h=o.props.cropSize?o.props.cropSize:function(e,t,o,n,i,r){void 0===r&&(r=0);var a=X(e,t,r),s=a.width,c=a.height,p=Math.min(s,o),u=Math.min(c,n);return p>u*i?{width:u*i,height:u}:{width:p,height:p/i}}(o.mediaSize.width,o.mediaSize.height,o.containerRect.width,o.containerRect.height,o.props.aspect,o.props.rotation);return(null===(r=o.state.cropSize)||void 0===r?void 0:r.height)===h.height&&(null===(a=o.state.cropSize)||void 0===a?void 0:a.width)===h.width||o.props.onCropSizeChange&&o.props.onCropSizeChange(h),o.setState({cropSize:h},o.recomputeCropPosition),o.props.setCropSize&&o.props.setCropSize(h),h}},o.saveContainerPosition=function(){if(o.containerRef){var e=o.containerRef.getBoundingClientRect();o.containerPosition={x:e.left,y:e.top}}},o.onMouseDown=function(e){o.currentDoc&&(e.preventDefault(),o.currentDoc.addEventListener("mousemove",o.onMouseMove),o.currentDoc.addEventListener("mouseup",o.onDragStopped),o.saveContainerPosition(),o.onDragStart(t.getMousePoint(e)))},o.onMouseMove=function(e){return o.onDrag(t.getMousePoint(e))},o.onScroll=function(e){o.currentDoc&&(e.preventDefault(),o.saveContainerPosition())},o.onTouchStart=function(e){o.currentDoc&&(o.isTouching=!0,o.props.onTouchRequest&&!o.props.onTouchRequest(e)||(o.currentDoc.addEventListener("touchmove",o.onTouchMove,{passive:!1}),o.currentDoc.addEventListener("touchend",o.onDragStopped),o.saveContainerPosition(),2===e.touches.length?o.onPinchStart(e):1===e.touches.length&&o.onDragStart(t.getTouchPoint(e.touches[0]))))},o.onTouchMove=function(e){e.preventDefault(),2===e.touches.length?o.onPinchMove(e):1===e.touches.length&&o.onDrag(t.getTouchPoint(e.touches[0]))},o.onGestureStart=function(e){o.currentDoc&&(e.preventDefault(),o.currentDoc.addEventListener("gesturechange",o.onGestureChange),o.currentDoc.addEventListener("gestureend",o.onGestureEnd),o.gestureZoomStart=o.props.zoom,o.gestureRotationStart=o.props.rotation)},o.onGestureChange=function(e){if(e.preventDefault(),!o.isTouching){var n=t.getMousePoint(e),i=o.gestureZoomStart-1+e.scale;if(o.setNewZoom(i,n,{shouldUpdatePosition:!0}),o.props.onRotationChange){var r=o.gestureRotationStart+e.rotation;o.props.onRotationChange(r)}}},o.onGestureEnd=function(e){o.cleanEvents()},o.onDragStart=function(e){var t,n,i=e.x,r=e.y;o.dragStartPosition={x:i,y:r},o.dragStartCrop=m({},o.props.crop),null===(n=(t=o.props).onInteractionStart)||void 0===n||n.call(t)},o.onDrag=function(e){var t=e.x,n=e.y;o.currentWindow&&(o.rafDragTimeout&&o.currentWindow.cancelAnimationFrame(o.rafDragTimeout),o.rafDragTimeout=o.currentWindow.requestAnimationFrame(function(){if(o.state.cropSize&&void 0!==t&&void 0!==n){var e=t-o.dragStartPosition.x,i=n-o.dragStartPosition.y,r={x:o.dragStartCrop.x+e,y:o.dragStartCrop.y+i},a=o.props.restrictPosition?k(r,o.mediaSize,o.state.cropSize,o.props.zoom,o.props.rotation):r;o.props.onCropChange(a)}}))},o.onDragStopped=function(){var e,t;o.isTouching=!1,o.cleanEvents(),o.emitCropData(),null===(t=(e=o.props).onInteractionEnd)||void 0===t||t.call(e)},o.onWheel=function(e){if(o.currentWindow&&(!o.props.onWheelRequest||o.props.onWheelRequest(e))){e.preventDefault();var n=t.getMousePoint(e),i=F(e).pixelY,r=o.props.zoom-i*o.props.zoomSpeed/200;o.setNewZoom(r,n,{shouldUpdatePosition:!0}),o.state.hasWheelJustStarted||o.setState({hasWheelJustStarted:!0},function(){var e,t;return null===(t=(e=o.props).onInteractionStart)||void 0===t?void 0:t.call(e)}),o.wheelTimer&&clearTimeout(o.wheelTimer),o.wheelTimer=o.currentWindow.setTimeout(function(){return o.setState({hasWheelJustStarted:!1},function(){var e,t;return null===(t=(e=o.props).onInteractionEnd)||void 0===t?void 0:t.call(e)})},250)}},o.getPointOnContainer=function(e,t){var n=e.x,i=e.y;if(!o.containerRect)throw new Error("The Cropper is not mounted");return{x:o.containerRect.width/2-(n-t.x),y:o.containerRect.height/2-(i-t.y)}},o.getPointOnMedia=function(e){var t=e.x,n=e.y,i=o.props,r=i.crop,a=i.zoom;return{x:(t+r.x)/a,y:(n+r.y)/a}},o.setNewZoom=function(e,t,n){var i=(void 0===n?{}:n).shouldUpdatePosition,r=void 0===i||i;if(o.state.cropSize&&o.props.onZoomChange){var a=V(e,o.props.minZoom,o.props.maxZoom);if(r){var s=o.getPointOnContainer(t,o.containerPosition),c=o.getPointOnMedia(s),p={x:c.x*a-s.x,y:c.y*a-s.y},u=o.props.restrictPosition?k(p,o.mediaSize,o.state.cropSize,a,o.props.rotation):p;o.props.onCropChange(u)}o.props.onZoomChange(a)}},o.getCropData=function(){return o.state.cropSize?function(e,t,o,n,i,r,a){void 0===r&&(r=0),void 0===a&&(a=!0);var s=a?q:B,c=X(t.width,t.height,r),p=X(t.naturalWidth,t.naturalHeight,r),u={x:s(100,((c.width-o.width/i)/2-e.x/i)/c.width*100),y:s(100,((c.height-o.height/i)/2-e.y/i)/c.height*100),width:s(100,o.width/c.width*100/i),height:s(100,o.height/c.height*100/i)},d=Math.round(s(p.width,u.width*p.width/100)),l=Math.round(s(p.height,u.height*p.height/100)),h=p.width>=p.height*n?{width:Math.round(l*n),height:l}:{width:d,height:Math.round(d/n)};return{croppedAreaPercentages:u,croppedAreaPixels:m(m({},h),{x:Math.round(s(p.width-h.width,u.x*p.width/100)),y:Math.round(s(p.height-h.height,u.y*p.height/100))})}}(o.props.restrictPosition?k(o.props.crop,o.mediaSize,o.state.cropSize,o.props.zoom,o.props.rotation):o.props.crop,o.mediaSize,o.state.cropSize,o.getAspect(),o.props.zoom,o.props.rotation,o.props.restrictPosition):null},o.emitCropData=function(){var e=o.getCropData();if(e){var t=e.croppedAreaPercentages,n=e.croppedAreaPixels;o.props.onCropComplete&&o.props.onCropComplete(t,n),o.props.onCropAreaChange&&o.props.onCropAreaChange(t,n)}},o.emitCropAreaChange=function(){var e=o.getCropData();if(e){var t=e.croppedAreaPercentages,n=e.croppedAreaPixels;o.props.onCropAreaChange&&o.props.onCropAreaChange(t,n)}},o.recomputeCropPosition=function(){if(o.state.cropSize){var e=o.props.restrictPosition?k(o.props.crop,o.mediaSize,o.state.cropSize,o.props.zoom,o.props.rotation):o.props.crop;o.props.onCropChange(e),o.emitCropData()}},o.onKeyDown=function(e){var t,n,i=o.props,r=i.crop,a=i.onCropChange,s=i.keyboardStep,c=i.zoom,p=i.rotation,u=s;if(o.state.cropSize){e.shiftKey&&(u*=.2);var d=m({},r);switch(e.key){case"ArrowUp":d.y-=u,e.preventDefault();break;case"ArrowDown":d.y+=u,e.preventDefault();break;case"ArrowLeft":d.x-=u,e.preventDefault();break;case"ArrowRight":d.x+=u,e.preventDefault();break;default:return}o.props.restrictPosition&&(d=k(d,o.mediaSize,o.state.cropSize,c,p)),e.repeat||null===(n=(t=o.props).onInteractionStart)||void 0===n||n.call(t),a(d)}},o.onKeyUp=function(e){var t,n;switch(e.key){case"ArrowUp":case"ArrowDown":case"ArrowLeft":case"ArrowRight":e.preventDefault();break;default:return}o.emitCropData(),null===(n=(t=o.props).onInteractionEnd)||void 0===n||n.call(t)},o}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function o(){this.constructor=e}h(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}(t,e),t.prototype.componentDidMount=function(){this.currentDoc&&this.currentWindow&&(this.containerRef&&(this.containerRef.ownerDocument&&(this.currentDoc=this.containerRef.ownerDocument),this.currentDoc.defaultView&&(this.currentWindow=this.currentDoc.defaultView),this.initResizeObserver(),void 0===window.ResizeObserver&&this.currentWindow.addEventListener("resize",this.computeSizes),this.props.zoomWithScroll&&this.containerRef.addEventListener("wheel",this.onWheel,{passive:!1}),this.containerRef.addEventListener("gesturestart",this.onGestureStart)),this.currentDoc.addEventListener("scroll",this.onScroll),this.props.disableAutomaticStylesInjection||(this.styleRef=this.currentDoc.createElement("style"),this.styleRef.setAttribute("type","text/css"),this.props.nonce&&this.styleRef.setAttribute("nonce",this.props.nonce),this.styleRef.innerHTML=".reactEasyCrop_Container {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n overflow: hidden;\n user-select: none;\n touch-action: none;\n cursor: move;\n display: flex;\n justify-content: center;\n align-items: center;\n}\n\n.reactEasyCrop_Image,\n.reactEasyCrop_Video {\n will-change: transform; /* this improves performances and prevent painting issues on iOS Chrome */\n}\n\n.reactEasyCrop_Contain {\n max-width: 100%;\n max-height: 100%;\n margin: auto;\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n}\n.reactEasyCrop_Cover_Horizontal {\n width: 100%;\n height: auto;\n}\n.reactEasyCrop_Cover_Vertical {\n width: auto;\n height: 100%;\n}\n\n.reactEasyCrop_CropArea {\n position: absolute;\n left: 50%;\n top: 50%;\n transform: translate(-50%, -50%);\n border: 1px solid rgba(255, 255, 255, 0.5);\n box-sizing: border-box;\n box-shadow: 0 0 0 9999em;\n color: rgba(0, 0, 0, 0.5);\n overflow: hidden;\n}\n\n.reactEasyCrop_CropAreaRound {\n border-radius: 50%;\n}\n\n.reactEasyCrop_CropAreaGrid::before {\n content: ' ';\n box-sizing: border-box;\n position: absolute;\n border: 1px solid rgba(255, 255, 255, 0.5);\n top: 0;\n bottom: 0;\n left: 33.33%;\n right: 33.33%;\n border-top: 0;\n border-bottom: 0;\n}\n\n.reactEasyCrop_CropAreaGrid::after {\n content: ' ';\n box-sizing: border-box;\n position: absolute;\n border: 1px solid rgba(255, 255, 255, 0.5);\n top: 33.33%;\n bottom: 33.33%;\n left: 0;\n right: 0;\n border-left: 0;\n border-right: 0;\n}\n",this.currentDoc.head.appendChild(this.styleRef)),this.imageRef.current&&this.imageRef.current.complete&&this.onMediaLoad(),this.props.setImageRef&&this.props.setImageRef(this.imageRef),this.props.setVideoRef&&this.props.setVideoRef(this.videoRef),this.props.setCropperRef&&this.props.setCropperRef(this.cropperRef))},t.prototype.componentWillUnmount=function(){var e,t;this.currentDoc&&this.currentWindow&&(void 0===window.ResizeObserver&&this.currentWindow.removeEventListener("resize",this.computeSizes),null===(e=this.resizeObserver)||void 0===e||e.disconnect(),this.containerRef&&this.containerRef.removeEventListener("gesturestart",this.preventZoomSafari),this.styleRef&&(null===(t=this.styleRef.parentNode)||void 0===t||t.removeChild(this.styleRef)),this.cleanEvents(),this.props.zoomWithScroll&&this.clearScrollEvent())},t.prototype.componentDidUpdate=function(e){var t,o,n,i,r,a,s,c,p;e.rotation!==this.props.rotation?(this.computeSizes(),this.recomputeCropPosition()):e.aspect!==this.props.aspect||e.objectFit!==this.props.objectFit?this.computeSizes():e.zoom!==this.props.zoom?this.recomputeCropPosition():(null===(t=e.cropSize)||void 0===t?void 0:t.height)!==(null===(o=this.props.cropSize)||void 0===o?void 0:o.height)||(null===(n=e.cropSize)||void 0===n?void 0:n.width)!==(null===(i=this.props.cropSize)||void 0===i?void 0:i.width)?this.computeSizes():(null===(r=e.crop)||void 0===r?void 0:r.x)===(null===(a=this.props.crop)||void 0===a?void 0:a.x)&&(null===(s=e.crop)||void 0===s?void 0:s.y)===(null===(c=this.props.crop)||void 0===c?void 0:c.y)||this.emitCropAreaChange(),e.zoomWithScroll!==this.props.zoomWithScroll&&this.containerRef&&(this.props.zoomWithScroll?this.containerRef.addEventListener("wheel",this.onWheel,{passive:!1}):this.clearScrollEvent()),e.video!==this.props.video&&(null===(p=this.videoRef.current)||void 0===p||p.load());var u=this.getObjectFit();u!==this.state.mediaObjectFit&&this.setState({mediaObjectFit:u},this.computeSizes)},t.prototype.getAspect=function(){var e=this.props,t=e.cropSize,o=e.aspect;return t?t.width/t.height:o},t.prototype.getObjectFit=function(){var e,t,o,n;if("cover"===this.props.objectFit){if((this.imageRef.current||this.videoRef.current)&&this.containerRef){this.containerRect=this.containerRef.getBoundingClientRect();var i=this.containerRect.width/this.containerRect.height;return((null===(e=this.imageRef.current)||void 0===e?void 0:e.naturalWidth)||(null===(t=this.videoRef.current)||void 0===t?void 0:t.videoWidth)||0)/((null===(o=this.imageRef.current)||void 0===o?void 0:o.naturalHeight)||(null===(n=this.videoRef.current)||void 0===n?void 0:n.videoHeight)||0)<i?"horizontal-cover":"vertical-cover"}return"horizontal-cover"}return this.props.objectFit},t.prototype.onPinchStart=function(e){var o=t.getTouchPoint(e.touches[0]),n=t.getTouchPoint(e.touches[1]);this.lastPinchDistance=H(o,n),this.lastPinchRotation=U(o,n),this.onDragStart(G(o,n))},t.prototype.onPinchMove=function(e){var o=this;if(this.currentDoc&&this.currentWindow){var n=t.getTouchPoint(e.touches[0]),i=t.getTouchPoint(e.touches[1]),r=G(n,i);this.onDrag(r),this.rafPinchTimeout&&this.currentWindow.cancelAnimationFrame(this.rafPinchTimeout),this.rafPinchTimeout=this.currentWindow.requestAnimationFrame(function(){var e=H(n,i),t=o.props.zoom*(e/o.lastPinchDistance);o.setNewZoom(t,r,{shouldUpdatePosition:!1}),o.lastPinchDistance=e;var a=U(n,i),s=o.props.rotation+(a-o.lastPinchRotation);o.props.onRotationChange&&o.props.onRotationChange(s),o.lastPinchRotation=a})}},t.prototype.render=function(){var e,t=this,o=this.props,n=o.image,i=o.video,r=o.mediaProps,a=o.cropperProps,s=o.transform,c=o.crop,p=c.x,u=c.y,l=o.rotation,h=o.zoom,g=o.cropShape,v=o.showGrid,f=o.style,w=f.containerStyle,x=f.cropAreaStyle,C=f.mediaStyle,y=o.classes,S=y.containerClassName,b=y.cropAreaClassName,R=y.mediaClassName,z=null!==(e=this.state.mediaObjectFit)&&void 0!==e?e:this.getObjectFit();return d.createElement("div",{onMouseDown:this.onMouseDown,onTouchStart:this.onTouchStart,ref:function(e){return t.containerRef=e},"data-testid":"container",style:w,className:Y("reactEasyCrop_Container",S)},n?d.createElement("img",m({alt:"",className:Y("reactEasyCrop_Image","contain"===z&&"reactEasyCrop_Contain","horizontal-cover"===z&&"reactEasyCrop_Cover_Horizontal","vertical-cover"===z&&"reactEasyCrop_Cover_Vertical",R)},r,{src:n,ref:this.imageRef,style:m(m({},C),{transform:s||"translate(".concat(p,"px, ").concat(u,"px) rotate(").concat(l,"deg) scale(").concat(h,")")}),onLoad:this.onMediaLoad})):i&&d.createElement("video",m({autoPlay:!0,playsInline:!0,loop:!0,muted:!0,className:Y("reactEasyCrop_Video","contain"===z&&"reactEasyCrop_Contain","horizontal-cover"===z&&"reactEasyCrop_Cover_Horizontal","vertical-cover"===z&&"reactEasyCrop_Cover_Vertical",R)},r,{ref:this.videoRef,onLoadedMetadata:this.onMediaLoad,style:m(m({},C),{transform:s||"translate(".concat(p,"px, ").concat(u,"px) rotate(").concat(l,"deg) scale(").concat(h,")")}),controls:!1}),(Array.isArray(i)?i:[{src:i}]).map(function(e){return d.createElement("source",m({key:e.src},e))})),this.state.cropSize&&d.createElement("div",m({ref:this.cropperRef,style:m(m({},x),{width:this.state.cropSize.width,height:this.state.cropSize.height}),tabIndex:0,onKeyDown:this.onKeyDown,onKeyUp:this.onKeyUp,"data-testid":"cropper",className:Y("reactEasyCrop_CropArea","round"===g&&"reactEasyCrop_CropAreaRound",v&&"reactEasyCrop_CropAreaGrid",b)},a)))},t.defaultProps={zoom:1,rotation:0,aspect:4/3,maxZoom:3,minZoom:1,cropShape:"rect",objectFit:"contain",showGrid:!0,style:{},classes:{},mediaProps:{},cropperProps:{},zoomSpeed:1,restrictPosition:!0,zoomWithScroll:!0,keyboardStep:1},t.getMousePoint=function(e){return{x:Number(e.clientX),y:Number(e.clientY)}},t.getTouchPoint=function(e){return{x:Number(e.clientX),y:Number(e.clientY)}},t}(d.Component);const J=c=>{var p,u,d,l,h,m,g,v,f,w;const[x,C]=t.useState(0),[y,S]=t.useState([]),[b,R]=t.useState([]),z=o.useTheme(),D=t.useMemo(()=>c.images.length>1,[c.images.length]),E=t.useMemo(()=>null==y?void 0:y[x],[y,x]),P=t.useCallback(async e=>{var t,o,n;const i=await Promise.all(e.map(async e=>{const t=b[e.index]??null;if(e.isDeleted||!e.isCropped||!e.url||!e.name||!t)return null;const o=await function(e,t,o="image/png"){const n=s.ImageSupportedFormats.includes(o)?o:"image/png";return new Promise((o,i)=>{const r=new Image;r.src=e,r.crossOrigin="anonymous",r.onload=()=>{const e=document.createElement("canvas"),a=e.getContext("2d");e.width=t.width,e.height=t.height,a.drawImage(r,t.x,t.y,t.width,t.height,0,0,t.width,t.height),e.toBlob(e=>{e?o(e):i(new Error("Canvas is empty"))},n)},r.onerror=()=>i(new Error("Failed to load image"))})}(e.url,t,e.format),n=new File([o],e.name,{type:e.format});return{...e,file:n,url:URL.createObjectURL(n)}}));null==(o=null==(t=c.params)?void 0:t.onSave)||o.call(t,i.filter(Boolean)),null==(n=c.remove)||n.call(c)},[b,c]),M=t.useCallback(async e=>{var t;const o=null==(t=c.images)?void 0:t[e.index];if(o){const t={...o,id:Date.now()+e.index,index:e.index,croppedArea:e.croppedArea??o.croppedArea,zoom:e.zoom??o.zoom,crop:e.crop??o.crop,isNew:!0,isCropped:e.isCropped??o.isCropped,isDeleted:e.isDeleted??o.isDeleted};if(S(o=>{const n=[...o];return n[e.index]=t,n}),e.isNext){const t=e.index+1>=c.images.length?0:e.index+1;C(t)}e.isSave&&P([t])}},[P,c.images]);t.useEffect(()=>{S(c.images),R(c.images.map(e=>e.croppedArea??null))},[c.images]),t.useEffect(()=>()=>{C(0),S([]),R([])},[]);const j=t.useMemo(()=>y.reduce((e,t)=>(e&&void 0!==(null==t?void 0:t.index)&&(e[t.index]={genre:t.isDeleted?"redTransparent":t.isCropped?"greenTransparent":"white",icons:t.isDeleted?[{type:"id",name:"CloseMini"}]:t.isCropped?[{type:"id",name:"TickMini"}]:[]}),e),{}),[y]),A=t.useMemo(()=>y.every(e=>(null==e?void 0:e.isDeleted)||!(null==e?void 0:e.isCropped)),[y]),O=t.useMemo(()=>{var e;return(null==(e=c.params)?void 0:e.dialog.button.genre)||"product"},[null==(p=c.params)?void 0:p.dialog.button.genre]),T=t.useMemo(()=>{var e;return(null==(e=c.params)?void 0:e.dialog.button.size)||"medium"},[null==(u=c.params)?void 0:u.dialog.button.size]),W=t.useMemo(()=>{var e;return(null==(e=c.params)?void 0:e.dialog.buttonDelete.genre)||"product"},[null==(d=c.params)?void 0:d.dialog.buttonDelete.genre]),_=t.useMemo(()=>{var e;return(null==(e=c.params)?void 0:e.dialog.button.size)||"medium"},[null==(l=c.params)?void 0:l.dialog.button.size]);return e.jsxRuntimeExports.jsxs(a.Stack,{sx:e=>{var t,o,n;return{default:{position:"relative",overflow:"hidden",aspectRatio:(null==(t=c.params)?void 0:t.imageSettings.aspect)?2*(null==(o=c.params)?void 0:o.imageSettings.aspect)+" / 2":void 0,width:"auto",maxWidth:"70dvw",height:"85dvh",borderRadius:null==(n=c.params)?void 0:n.br,backgroundColor:e.palette.whiteStandard},tablet:{maxWidth:"95dvw"}}},children:[e.jsxRuntimeExports.jsxs(n.Preview,{visible:!c.isAnimating,minTime:500,children:[e.jsxRuntimeExports.jsx(a.Stack,{sx:{default:{position:"absolute",top:0,left:0,right:0,bottom:0}},children:E&&e.jsxRuntimeExports.jsx(K,{style:{containerStyle:{backgroundColor:z.palette.black80}},image:E.url,crop:(null==E?void 0:E.crop)??{x:0,y:0},zoom:(null==E?void 0:E.zoom)??1,aspect:null==(h=c.params)?void 0:h.imageSettings.aspect,onCropChange:e=>{M({...E,crop:e})},onZoomChange:e=>{M({...E,zoom:e})},onCropComplete:(e,t)=>{R(e=>{const o=[...e];return o[x]=t,o})}})}),e.jsxRuntimeExports.jsxs(a.Stack,{sx:{default:{position:"absolute",top:15,right:15,gap:"10px"}},children:[e.jsxRuntimeExports.jsx(i.Button,{genre:W,size:_,isHiddenBorder:!0,isRadius:!0,onClick:()=>{var e;return null==(e=c.remove)?void 0:e.call(c)},children:null==(m=c.params)?void 0:m.locale.dialogCancel}),D&&e.jsxRuntimeExports.jsx(i.Button,{genre:O,size:T,isHiddenBorder:!0,isRadius:!0,onClick:()=>P(y),isHidden:A,isDisabled:A,children:null==(g=c.params)?void 0:g.locale.dialogSave})]})]}),D&&x!==c.images.length&&e.jsxRuntimeExports.jsx(i.Button,{sx:{default:{position:"absolute",top:15,left:15}},genre:O,size:T,isHiddenBorder:!0,isWidthAsHeight:!0,isRadius:!0,isDisabled:!0,children:x+1}),e.jsxRuntimeExports.jsxs(a.Stack,{sx:e=>({default:{position:"absolute",bottom:D?5:15,left:D?5:void 0,right:D?void 0:15,width:D?"calc(100% - 10px)":"fit-content",backgroundColor:D?e.palette.whiteStandard:e.palette.transparent,padding:"10px",borderRadius:"50px",flexDirection:"row",justifyContent:"space-between",alignItems:"center",gap:"10px"},mobile:{borderRadius:"24px",flexDirection:"column",alignItems:"stretch",gap:"10px"}}),children:[D&&e.jsxRuntimeExports.jsx(r.Pagination,{sx:{default:{},mobile:{justifyContent:"space-between"}},lengthData:j,length:c.images.length,index:x,changeIndex:e=>{C(e)},isInfinity:!0,viewQuantity:4,buttonControl:{genre:O,size:T,isRadius:!0,isWidthAsHeight:!0},buttonCount:{active:{genre:O,size:T,isRadius:!0,isPlaystationEffect:!0},inactive:{genre:"white",size:T,isRadius:!0}},locale:{next:"Next",prev:"Prev"}}),e.jsxRuntimeExports.jsxs(a.Stack,{sx:{default:{gap:"10px"},mobile:{justifyContent:"center"}},children:[D&&e.jsxRuntimeExports.jsx(i.Button,{genre:W,size:_,isHiddenBorder:!0,isRadius:!0,onClick:()=>{M({...E,isDeleted:!0,isNext:D})},children:null==(v=c.params)?void 0:v.locale.dialogDeleteImage}),e.jsxRuntimeExports.jsx(i.Button,{genre:O,size:T,isHiddenBorder:!0,isRadius:!0,onClick:()=>{M({...E,isDeleted:!1,isCropped:!0,isNext:D,isSave:!D})},children:D?null==(f=c.params)?void 0:f.locale.dialogAddImage:null==(w=c.params)?void 0:w.locale.dialogSave})]})]})]})};exports.useImageCrop=o=>{const n=t.useMemo(()=>p.KEY_SIZE_DATA[o.dialog.button.size],[o.dialog.button.size]),i=t.useMemo(()=>`${n.radius}px`,[n.radius]),{add:r}=c.useDialog({br:i,imageSettings:o.imageSettings,onSave:o.onSave,dialog:o.dialog,locale:o.locale,propsDialog:{borderRadius:i,padding:"0",background:"transparent"}}),a=t.useCallback(t=>{r({content:(o,n,i)=>e.jsxRuntimeExports.jsx(J,{images:t,params:o,remove:n,isAnimating:i})})},[r]),s=t.useCallback(e=>{const t=Array.from(e).filter(e=>!(e.size>o.imageSettings.maxSize)||(console.warn(`File ${e.name} exceeds the allowed size of ${o.imageSettings.maxSize} bytes`),!1)).map((e,t)=>({id:Date.now()+t,file:e,url:URL.createObjectURL(e),index:t,isNew:!0,name:e.name,format:e.type}));o.refInput&&"current"in o.refInput&&o.refInput.current&&(o.refInput.current.value=""),t.length&&a(t)},[a,o.imageSettings.maxSize,o.refInput]);return{handleAdd:a,handleAddFiles:s}};
16
- //# sourceMappingURL=use-DQDxWjzu.cjs.map
16
+ //# sourceMappingURL=use-ClugPshj.cjs.map