diff --git a/dist/App-3VkR-ZEZ.js b/dist/App-3VkR-ZEZ.js new file mode 100644 index 00000000..e128b90b --- /dev/null +++ b/dist/App-3VkR-ZEZ.js @@ -0,0 +1,27 @@ +import { j as r } from "./jsx-runtime-lzYHhGH3.js"; +import { ThemeProvider as i, CssBaseline as t } from "@mui/material"; +import { CacheProvider as p } from "@emotion/react"; +import "react"; +import { Provider as x } from "react-redux"; +const h = ({ + children: o, + emotionCache: e, + theme: s, + store: m, + // @ts-expect-error TODO + // eslint-disable-next-line @typescript-eslint/no-unused-vars + maxIdleSeconds: a = 3600, + // @ts-expect-error TODO + // eslint-disable-next-line @typescript-eslint/no-unused-vars + maxTotalSeconds: d = 3600 +}) => ( + // https://mui.com/material-ui/guides/server-rendering/ + /* @__PURE__ */ r.jsx(p, { value: e, children: /* @__PURE__ */ r.jsxs(i, { theme: s, children: [ + /* @__PURE__ */ r.jsx(t, {}), + /* @__PURE__ */ r.jsx(x, { store: m, children: o }) + ] }) }) +); +export { + h as A +}; +//# sourceMappingURL=App-3VkR-ZEZ.js.map diff --git a/dist/App-3VkR-ZEZ.js.map b/dist/App-3VkR-ZEZ.js.map new file mode 100644 index 00000000..13e8935a --- /dev/null +++ b/dist/App-3VkR-ZEZ.js.map @@ -0,0 +1 @@ +{"version":3,"file":"App-3VkR-ZEZ.js","sources":["../src/server/App.tsx"],"sourcesContent":["import { CssBaseline, ThemeProvider } from \"@mui/material\"\nimport {\n type EmotionCache,\n CacheProvider as EmotionCacheProvider,\n} from \"@emotion/react\"\nimport { type JSX, type ReactNode } from \"react\"\nimport {\n Provider as StoreProvider,\n type ProviderProps as StoreProviderProps,\n} from \"react-redux\"\nimport { type Action } from \"redux\"\nimport { type ThemeProviderProps } from \"@mui/material\"\n\nimport \"./App.css\"\n// import { InactiveDialog, ScreenTimeDialog } from \"../features\"\n// import { useCountdown, useEventListener } from \"../hooks\"\n// import \"../scripts\"\n// import {\n// configureFreshworksWidget,\n// toggleOneTrustInfoDisplay,\n// } from \"../utils/window\"\n\nexport interface AppProps {\n children: ReactNode\n emotionCache: EmotionCache\n theme: ThemeProviderProps[\"theme\"]\n store: StoreProviderProps[\"store\"]\n maxIdleSeconds?: number\n maxTotalSeconds?: number\n}\n\nconst App = ({\n children,\n emotionCache,\n theme,\n store,\n // @ts-expect-error TODO\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n maxIdleSeconds = 60 * 60,\n // @ts-expect-error TODO\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n maxTotalSeconds = 60 * 60,\n}: AppProps): JSX.Element => {\n // TODO: cannot use document during SSR\n // const root = document.getElementById(\"root\") as HTMLElement\n\n // const [idleSeconds, setIdleSeconds] = useCountdown(maxIdleSeconds)\n // const [totalSeconds, setTotalSeconds] = useCountdown(maxTotalSeconds)\n // const resetIdleSeconds = useCallback(() => {\n // setIdleSeconds(maxIdleSeconds)\n // }, [setIdleSeconds, maxIdleSeconds])\n\n // const isIdle = idleSeconds === 0\n // const tooMuchScreenTime = totalSeconds === 0\n\n // useEventListener(root, \"mousemove\", resetIdleSeconds)\n // useEventListener(root, \"keypress\", resetIdleSeconds)\n\n // React.useEffect(() => {\n // configureFreshworksWidget(\"hide\")\n // }, [])\n\n // if (import.meta.env.PROD) {\n // toggleOneTrustInfoDisplay()\n // }\n\n return (\n // https://mui.com/material-ui/guides/server-rendering/\n \n \n \n \n {/* \n {\n setTotalSeconds(maxTotalSeconds)\n }}\n /> */}\n {children}\n \n \n \n )\n}\n\nexport default App\n\n// TODO: figure out what to do with this\n// function useOneTrustScripts(): void {\n// const oneTrustEventTypes = [\n// useExternalScript({\n// props: {\n// src: \"https://cdn-ukwest.onetrust.com/consent/5da42396-cb12-4493-8d04-5179033cfbad/OtAutoBlock.js\",\n// type: \"text/javascript\",\n// },\n// eventTypes: [\"load\", \"error\"],\n// }),\n// useExternalScript({\n// props: {\n// src: \"https://cdn-ukwest.onetrust.com/scripttemplates/otSDKStub.js\",\n// type: \"text/javascript\",\n// charset: \"UTF-8\",\n// },\n// attrs: {\n// \"data-domain-script\": \"5da42396-cb12-4493-8d04-5179033cfbad\",\n// },\n// eventTypes: [\"load\", \"error\"],\n// }),\n// useExternalScript({\n// props: {\n// src: \"https://cdn-ukwest.onetrust.com/scripttemplates/202302.1.0/otBannerSdk.js\",\n// async: true,\n// type: \"text/javascript\",\n// },\n// eventTypes: [\"load\", \"error\"],\n// }),\n// ]\n// if (oneTrustEventTypes.some(t => t === \"error\")) {\n// alert(\"OneTrust failed to load!\")\n// }\n// }\n"],"names":["App","children","emotionCache","theme","store","maxIdleSeconds","maxTotalSeconds","EmotionCacheProvider","jsxs","ThemeProvider","jsx","CssBaseline","StoreProvider"],"mappings":";;;;;AA+BA,MAAMA,IAAM,CAAyC;AAAA,EACnD,UAAAC;AAAA,EACA,cAAAC;AAAA,EACA,OAAAC;AAAA,EACA,OAAAC;AAAA;AAAA;AAAA,EAGA,gBAAAC,IAAiB;AAAA;AAAA;AAAA,EAGjB,iBAAAC,IAAkB;AACpB;AAAA;AAAA,wBA0BKC,GAAA,EAAqB,OAAOL,GAC3B,UAAAM,gBAAAA,EAAAA,KAACC,KAAc,OAAAN,GACb,UAAA;AAAA,IAAAO,gBAAAA,EAAAA,IAACC,GAAA,EAAY;AAAA,IACbD,gBAAAA,EAAAA,IAACE,GAAA,EAAc,OAAAR,GAQZ,UAAAH,EAAA,CACH;AAAA,EAAA,EAAA,CACF,EAAA,CACF;AAAA;"} \ No newline at end of file diff --git a/dist/App-UfeajXtp.cjs b/dist/App-UfeajXtp.cjs new file mode 100644 index 00000000..1e1c757f --- /dev/null +++ b/dist/App-UfeajXtp.cjs @@ -0,0 +1,2 @@ +"use strict";const e=require("./jsx-runtime-B2pbW5Fp.cjs"),r=require("@mui/material"),x=require("@emotion/react");require("react");const o=require("react-redux"),u=({children:s,emotionCache:t,theme:i,store:n,maxIdleSeconds:c=3600,maxTotalSeconds:a=3600})=>e.jsxRuntimeExports.jsx(x.CacheProvider,{value:t,children:e.jsxRuntimeExports.jsxs(r.ThemeProvider,{theme:i,children:[e.jsxRuntimeExports.jsx(r.CssBaseline,{}),e.jsxRuntimeExports.jsx(o.Provider,{store:n,children:s})]})});exports.App=u; +//# sourceMappingURL=App-UfeajXtp.cjs.map diff --git a/dist/App-UfeajXtp.cjs.map b/dist/App-UfeajXtp.cjs.map new file mode 100644 index 00000000..1c189b78 --- /dev/null +++ b/dist/App-UfeajXtp.cjs.map @@ -0,0 +1 @@ +{"version":3,"file":"App-UfeajXtp.cjs","sources":["../src/server/App.tsx"],"sourcesContent":["import { CssBaseline, ThemeProvider } from \"@mui/material\"\nimport {\n type EmotionCache,\n CacheProvider as EmotionCacheProvider,\n} from \"@emotion/react\"\nimport { type JSX, type ReactNode } from \"react\"\nimport {\n Provider as StoreProvider,\n type ProviderProps as StoreProviderProps,\n} from \"react-redux\"\nimport { type Action } from \"redux\"\nimport { type ThemeProviderProps } from \"@mui/material\"\n\nimport \"./App.css\"\n// import { InactiveDialog, ScreenTimeDialog } from \"../features\"\n// import { useCountdown, useEventListener } from \"../hooks\"\n// import \"../scripts\"\n// import {\n// configureFreshworksWidget,\n// toggleOneTrustInfoDisplay,\n// } from \"../utils/window\"\n\nexport interface AppProps {\n children: ReactNode\n emotionCache: EmotionCache\n theme: ThemeProviderProps[\"theme\"]\n store: StoreProviderProps[\"store\"]\n maxIdleSeconds?: number\n maxTotalSeconds?: number\n}\n\nconst App = ({\n children,\n emotionCache,\n theme,\n store,\n // @ts-expect-error TODO\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n maxIdleSeconds = 60 * 60,\n // @ts-expect-error TODO\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n maxTotalSeconds = 60 * 60,\n}: AppProps): JSX.Element => {\n // TODO: cannot use document during SSR\n // const root = document.getElementById(\"root\") as HTMLElement\n\n // const [idleSeconds, setIdleSeconds] = useCountdown(maxIdleSeconds)\n // const [totalSeconds, setTotalSeconds] = useCountdown(maxTotalSeconds)\n // const resetIdleSeconds = useCallback(() => {\n // setIdleSeconds(maxIdleSeconds)\n // }, [setIdleSeconds, maxIdleSeconds])\n\n // const isIdle = idleSeconds === 0\n // const tooMuchScreenTime = totalSeconds === 0\n\n // useEventListener(root, \"mousemove\", resetIdleSeconds)\n // useEventListener(root, \"keypress\", resetIdleSeconds)\n\n // React.useEffect(() => {\n // configureFreshworksWidget(\"hide\")\n // }, [])\n\n // if (import.meta.env.PROD) {\n // toggleOneTrustInfoDisplay()\n // }\n\n return (\n // https://mui.com/material-ui/guides/server-rendering/\n \n \n \n \n {/* \n {\n setTotalSeconds(maxTotalSeconds)\n }}\n /> */}\n {children}\n \n \n \n )\n}\n\nexport default App\n\n// TODO: figure out what to do with this\n// function useOneTrustScripts(): void {\n// const oneTrustEventTypes = [\n// useExternalScript({\n// props: {\n// src: \"https://cdn-ukwest.onetrust.com/consent/5da42396-cb12-4493-8d04-5179033cfbad/OtAutoBlock.js\",\n// type: \"text/javascript\",\n// },\n// eventTypes: [\"load\", \"error\"],\n// }),\n// useExternalScript({\n// props: {\n// src: \"https://cdn-ukwest.onetrust.com/scripttemplates/otSDKStub.js\",\n// type: \"text/javascript\",\n// charset: \"UTF-8\",\n// },\n// attrs: {\n// \"data-domain-script\": \"5da42396-cb12-4493-8d04-5179033cfbad\",\n// },\n// eventTypes: [\"load\", \"error\"],\n// }),\n// useExternalScript({\n// props: {\n// src: \"https://cdn-ukwest.onetrust.com/scripttemplates/202302.1.0/otBannerSdk.js\",\n// async: true,\n// type: \"text/javascript\",\n// },\n// eventTypes: [\"load\", \"error\"],\n// }),\n// ]\n// if (oneTrustEventTypes.some(t => t === \"error\")) {\n// alert(\"OneTrust failed to load!\")\n// }\n// }\n"],"names":["App","children","emotionCache","theme","store","maxIdleSeconds","maxTotalSeconds","EmotionCacheProvider","jsxs","ThemeProvider","jsx","CssBaseline","StoreProvider"],"mappings":"kKA+BMA,EAAM,CAAyC,CACnD,SAAAC,EACA,aAAAC,EACA,MAAAC,EACA,MAAAC,EAGA,eAAAC,EAAiB,KAGjB,gBAAAC,EAAkB,IACpB,4BA0BKC,EAAAA,cAAA,CAAqB,MAAOL,EAC3B,SAAAM,EAAAA,kBAAAA,KAACC,EAAAA,eAAc,MAAAN,EACb,SAAA,CAAAO,EAAAA,kBAAAA,IAACC,EAAAA,YAAA,EAAY,EACbD,EAAAA,kBAAAA,IAACE,EAAAA,SAAA,CAAc,MAAAR,EAQZ,SAAAH,CAAA,CACH,CAAA,CAAA,CACF,CAAA,CACF"} \ No newline at end of file diff --git a/dist/Countdown-BtUbr1J_.cjs b/dist/Countdown-BtUbr1J_.cjs new file mode 100644 index 00000000..0fc11ed8 --- /dev/null +++ b/dist/Countdown-BtUbr1J_.cjs @@ -0,0 +1,2 @@ +"use strict";const u=require("./jsx-runtime-B2pbW5Fp.cjs"),a=require("react"),m=require("@mui/material");require("./auth-BwpsrTko.cjs");const x=require("./general-Bo6JGvKB.cjs");require("react-router");require("yup");require("@mui/icons-material");require("./palette-BnIdHKDE.cjs");const c=({seconds:e,start:n=!0,onEnd:i,...o})=>{e=Math.floor(e);const r=x.useCountdown(e)[0],[s,q]=a.useState(!n);r===0&&!s&&(q(!0),i()),e=Math.floor(r%60);const t=Math.floor(r/60);return u.jsxRuntimeExports.jsx(u.jsxRuntimeExports.Fragment,{children:r>0&&u.jsxRuntimeExports.jsxs(m.Typography,{...o,children:[t>0&&`${t} ${t>1?"mins":"min"} `,e>0&&`${e} ${e>1?"secs":"sec"}`]})})};exports.Countdown=c; +//# sourceMappingURL=Countdown-BtUbr1J_.cjs.map diff --git a/dist/Countdown-CyJ-01oU.cjs.map b/dist/Countdown-BtUbr1J_.cjs.map similarity index 96% rename from dist/Countdown-CyJ-01oU.cjs.map rename to dist/Countdown-BtUbr1J_.cjs.map index c0115b4d..996b03f8 100644 --- a/dist/Countdown-CyJ-01oU.cjs.map +++ b/dist/Countdown-BtUbr1J_.cjs.map @@ -1 +1 @@ -{"version":3,"file":"Countdown-CyJ-01oU.cjs","sources":["../src/components/Countdown.tsx"],"sourcesContent":["import { type FC, useState } from \"react\"\nimport { Typography, type TypographyProps } from \"@mui/material\"\n\nimport { useCountdown } from \"../hooks\"\n\nexport interface CountdownProps extends Omit {\n seconds: number\n start?: boolean\n onEnd: () => void\n}\n\nconst Countdown: FC = ({\n seconds,\n start = true,\n onEnd,\n ...typographyProps\n}) => {\n seconds = Math.floor(seconds)\n const _seconds = useCountdown(seconds)[0]\n const [end, setEnd] = useState(!start)\n\n if (_seconds === 0 && !end) {\n setEnd(true)\n onEnd()\n }\n\n seconds = Math.floor(_seconds % 60)\n const minutes = Math.floor(_seconds / 60)\n\n return (\n <>\n {_seconds > 0 && (\n \n {minutes > 0 && `${minutes} ${minutes > 1 ? \"mins\" : \"min\"} `}\n {seconds > 0 && `${seconds} ${seconds > 1 ? \"secs\" : \"sec\"}`}\n \n )}\n \n )\n}\n\nexport default Countdown\n"],"names":["Countdown","seconds","start","onEnd","typographyProps","_seconds","useCountdown","end","setEnd","useState","minutes","jsxs","Typography"],"mappings":"0RAWA,MAAMA,EAAgC,CAAC,CACrC,QAAAC,EACA,MAAAC,EAAQ,GACR,MAAAC,EACA,GAAGC,CACL,IAAM,CACJH,EAAU,KAAK,MAAMA,CAAO,EAC5B,MAAMI,EAAWC,EAAAA,aAAaL,CAAO,EAAE,CAAC,EAClC,CAACM,EAAKC,CAAM,EAAIC,EAAAA,SAAS,CAACP,CAAK,EAEjCG,IAAa,GAAK,CAACE,IACrBC,EAAO,EAAI,EACXL,EAAA,GAGFF,EAAU,KAAK,MAAMI,EAAW,EAAE,EAClC,MAAMK,EAAU,KAAK,MAAML,EAAW,EAAE,EAExC,6DAEK,SAAAA,EAAW,GACVM,EAAAA,kBAAAA,KAACC,EAAAA,WAAA,CAAY,GAAGR,EACb,SAAA,CAAAM,EAAU,GAAK,GAAGA,CAAO,IAAIA,EAAU,EAAI,OAAS,KAAK,IACzDT,EAAU,GAAK,GAAGA,CAAO,IAAIA,EAAU,EAAI,OAAS,KAAK,EAAA,CAAA,CAC5D,CAAA,CAEJ,CAEJ"} \ No newline at end of file +{"version":3,"file":"Countdown-BtUbr1J_.cjs","sources":["../src/components/Countdown.tsx"],"sourcesContent":["import { type FC, useState } from \"react\"\nimport { Typography, type TypographyProps } from \"@mui/material\"\n\nimport { useCountdown } from \"../hooks\"\n\nexport interface CountdownProps extends Omit {\n seconds: number\n start?: boolean\n onEnd: () => void\n}\n\nconst Countdown: FC = ({\n seconds,\n start = true,\n onEnd,\n ...typographyProps\n}) => {\n seconds = Math.floor(seconds)\n const _seconds = useCountdown(seconds)[0]\n const [end, setEnd] = useState(!start)\n\n if (_seconds === 0 && !end) {\n setEnd(true)\n onEnd()\n }\n\n seconds = Math.floor(_seconds % 60)\n const minutes = Math.floor(_seconds / 60)\n\n return (\n <>\n {_seconds > 0 && (\n \n {minutes > 0 && `${minutes} ${minutes > 1 ? \"mins\" : \"min\"} `}\n {seconds > 0 && `${seconds} ${seconds > 1 ? \"secs\" : \"sec\"}`}\n \n )}\n \n )\n}\n\nexport default Countdown\n"],"names":["Countdown","seconds","start","onEnd","typographyProps","_seconds","useCountdown","end","setEnd","useState","minutes","jsxs","Typography"],"mappings":"0RAWA,MAAMA,EAAgC,CAAC,CACrC,QAAAC,EACA,MAAAC,EAAQ,GACR,MAAAC,EACA,GAAGC,CACL,IAAM,CACJH,EAAU,KAAK,MAAMA,CAAO,EAC5B,MAAMI,EAAWC,EAAAA,aAAaL,CAAO,EAAE,CAAC,EAClC,CAACM,EAAKC,CAAM,EAAIC,EAAAA,SAAS,CAACP,CAAK,EAEjCG,IAAa,GAAK,CAACE,IACrBC,EAAO,EAAI,EACXL,EAAA,GAGFF,EAAU,KAAK,MAAMI,EAAW,EAAE,EAClC,MAAMK,EAAU,KAAK,MAAML,EAAW,EAAE,EAExC,6DAEK,SAAAA,EAAW,GACVM,EAAAA,kBAAAA,KAACC,EAAAA,WAAA,CAAY,GAAGR,EACb,SAAA,CAAAM,EAAU,GAAK,GAAGA,CAAO,IAAIA,EAAU,EAAI,OAAS,KAAK,IACzDT,EAAU,GAAK,GAAGA,CAAO,IAAIA,EAAU,EAAI,OAAS,KAAK,EAAA,CAAA,CAC5D,CAAA,CAEJ,CAEJ"} \ No newline at end of file diff --git a/dist/Countdown-CyJ-01oU.cjs b/dist/Countdown-CyJ-01oU.cjs deleted file mode 100644 index b548c5d5..00000000 --- a/dist/Countdown-CyJ-01oU.cjs +++ /dev/null @@ -1,2 +0,0 @@ -"use strict";const n=require("./jsx-runtime-Dszzpdy0.cjs"),c=require("react"),m=require("@mui/material");require("./auth-B7Vdot4N.cjs");const q=require("./general-BPbbmkeX.cjs");require("react-router");require("yup");require("@mui/icons-material");require("./palette-BnIdHKDE.cjs");const x=({seconds:e,start:u=!0,onEnd:i,...o})=>{e=Math.floor(e);const r=q.useCountdown(e)[0],[s,a]=c.useState(!u);r===0&&!s&&(a(!0),i()),e=Math.floor(r%60);const t=Math.floor(r/60);return n.jsxRuntimeExports.jsx(n.jsxRuntimeExports.Fragment,{children:r>0&&n.jsxRuntimeExports.jsxs(m.Typography,{...o,children:[t>0&&`${t} ${t>1?"mins":"min"} `,e>0&&`${e} ${e>1?"secs":"sec"}`]})})};exports.Countdown=x; -//# sourceMappingURL=Countdown-CyJ-01oU.cjs.map diff --git a/dist/Countdown-BTyB1rrK.js b/dist/Countdown-DhjAmB0u.js similarity index 50% rename from dist/Countdown-BTyB1rrK.js rename to dist/Countdown-DhjAmB0u.js index 5c333e62..bf79e45f 100644 --- a/dist/Countdown-BTyB1rrK.js +++ b/dist/Countdown-DhjAmB0u.js @@ -1,8 +1,8 @@ -import { j as m } from "./jsx-runtime-C7wFtzyj.js"; -import { useState as s } from "react"; -import { Typography as u } from "@mui/material"; -import "./auth-CQ1InCxP.js"; -import { a as f } from "./general-CtTJPCJn.js"; +import { j as m } from "./jsx-runtime-lzYHhGH3.js"; +import { useState as u } from "react"; +import { Typography as a } from "@mui/material"; +import "./auth-Bb8WkZGN.js"; +import { u as f } from "./general-D7Hqi3gj.js"; import "react-router"; import "yup"; import "@mui/icons-material"; @@ -14,10 +14,10 @@ const w = ({ ...p }) => { t = Math.floor(t); - const r = f(t)[0], [e, a] = s(!i); - r === 0 && !e && (a(!0), n()), t = Math.floor(r % 60); + const r = f(t)[0], [e, s] = u(!i); + r === 0 && !e && (s(!0), n()), t = Math.floor(r % 60); const o = Math.floor(r / 60); - return /* @__PURE__ */ m.jsx(m.Fragment, { children: r > 0 && /* @__PURE__ */ m.jsxs(u, { ...p, children: [ + return /* @__PURE__ */ m.jsx(m.Fragment, { children: r > 0 && /* @__PURE__ */ m.jsxs(a, { ...p, children: [ o > 0 && `${o} ${o > 1 ? "mins" : "min"} `, t > 0 && `${t} ${t > 1 ? "secs" : "sec"}` ] }) }); @@ -25,4 +25,4 @@ const w = ({ export { w as C }; -//# sourceMappingURL=Countdown-BTyB1rrK.js.map +//# sourceMappingURL=Countdown-DhjAmB0u.js.map diff --git a/dist/Countdown-BTyB1rrK.js.map b/dist/Countdown-DhjAmB0u.js.map similarity index 96% rename from dist/Countdown-BTyB1rrK.js.map rename to dist/Countdown-DhjAmB0u.js.map index cc6bdab6..79e8ec77 100644 --- a/dist/Countdown-BTyB1rrK.js.map +++ b/dist/Countdown-DhjAmB0u.js.map @@ -1 +1 @@ -{"version":3,"file":"Countdown-BTyB1rrK.js","sources":["../src/components/Countdown.tsx"],"sourcesContent":["import { type FC, useState } from \"react\"\nimport { Typography, type TypographyProps } from \"@mui/material\"\n\nimport { useCountdown } from \"../hooks\"\n\nexport interface CountdownProps extends Omit {\n seconds: number\n start?: boolean\n onEnd: () => void\n}\n\nconst Countdown: FC = ({\n seconds,\n start = true,\n onEnd,\n ...typographyProps\n}) => {\n seconds = Math.floor(seconds)\n const _seconds = useCountdown(seconds)[0]\n const [end, setEnd] = useState(!start)\n\n if (_seconds === 0 && !end) {\n setEnd(true)\n onEnd()\n }\n\n seconds = Math.floor(_seconds % 60)\n const minutes = Math.floor(_seconds / 60)\n\n return (\n <>\n {_seconds > 0 && (\n \n {minutes > 0 && `${minutes} ${minutes > 1 ? \"mins\" : \"min\"} `}\n {seconds > 0 && `${seconds} ${seconds > 1 ? \"secs\" : \"sec\"}`}\n \n )}\n \n )\n}\n\nexport default Countdown\n"],"names":["Countdown","seconds","start","onEnd","typographyProps","_seconds","useCountdown","end","setEnd","useState","minutes","jsxs","Typography"],"mappings":";;;;;;;;;AAWA,MAAMA,IAAgC,CAAC;AAAA,EACrC,SAAAC;AAAA,EACA,OAAAC,IAAQ;AAAA,EACR,OAAAC;AAAA,EACA,GAAGC;AACL,MAAM;AACJ,EAAAH,IAAU,KAAK,MAAMA,CAAO;AAC5B,QAAMI,IAAWC,EAAaL,CAAO,EAAE,CAAC,GAClC,CAACM,GAAKC,CAAM,IAAIC,EAAS,CAACP,CAAK;AAErC,EAAIG,MAAa,KAAK,CAACE,MACrBC,EAAO,EAAI,GACXL,EAAA,IAGFF,IAAU,KAAK,MAAMI,IAAW,EAAE;AAClC,QAAMK,IAAU,KAAK,MAAML,IAAW,EAAE;AAExC,6CAEK,UAAAA,IAAW,KACVM,gBAAAA,EAAAA,KAACC,GAAA,EAAY,GAAGR,GACb,UAAA;AAAA,IAAAM,IAAU,KAAK,GAAGA,CAAO,IAAIA,IAAU,IAAI,SAAS,KAAK;AAAA,IACzDT,IAAU,KAAK,GAAGA,CAAO,IAAIA,IAAU,IAAI,SAAS,KAAK;AAAA,EAAA,EAAA,CAC5D,EAAA,CAEJ;AAEJ;"} \ No newline at end of file +{"version":3,"file":"Countdown-DhjAmB0u.js","sources":["../src/components/Countdown.tsx"],"sourcesContent":["import { type FC, useState } from \"react\"\nimport { Typography, type TypographyProps } from \"@mui/material\"\n\nimport { useCountdown } from \"../hooks\"\n\nexport interface CountdownProps extends Omit {\n seconds: number\n start?: boolean\n onEnd: () => void\n}\n\nconst Countdown: FC = ({\n seconds,\n start = true,\n onEnd,\n ...typographyProps\n}) => {\n seconds = Math.floor(seconds)\n const _seconds = useCountdown(seconds)[0]\n const [end, setEnd] = useState(!start)\n\n if (_seconds === 0 && !end) {\n setEnd(true)\n onEnd()\n }\n\n seconds = Math.floor(_seconds % 60)\n const minutes = Math.floor(_seconds / 60)\n\n return (\n <>\n {_seconds > 0 && (\n \n {minutes > 0 && `${minutes} ${minutes > 1 ? \"mins\" : \"min\"} `}\n {seconds > 0 && `${seconds} ${seconds > 1 ? \"secs\" : \"sec\"}`}\n \n )}\n \n )\n}\n\nexport default Countdown\n"],"names":["Countdown","seconds","start","onEnd","typographyProps","_seconds","useCountdown","end","setEnd","useState","minutes","jsxs","Typography"],"mappings":";;;;;;;;;AAWA,MAAMA,IAAgC,CAAC;AAAA,EACrC,SAAAC;AAAA,EACA,OAAAC,IAAQ;AAAA,EACR,OAAAC;AAAA,EACA,GAAGC;AACL,MAAM;AACJ,EAAAH,IAAU,KAAK,MAAMA,CAAO;AAC5B,QAAMI,IAAWC,EAAaL,CAAO,EAAE,CAAC,GAClC,CAACM,GAAKC,CAAM,IAAIC,EAAS,CAACP,CAAK;AAErC,EAAIG,MAAa,KAAK,CAACE,MACrBC,EAAO,EAAI,GACXL,EAAA,IAGFF,IAAU,KAAK,MAAMI,IAAW,EAAE;AAClC,QAAMK,IAAU,KAAK,MAAML,IAAW,EAAE;AAExC,6CAEK,UAAAA,IAAW,KACVM,gBAAAA,EAAAA,KAACC,GAAA,EAAY,GAAGR,GACb,UAAA;AAAA,IAAAM,IAAU,KAAK,GAAGA,CAAO,IAAIA,IAAU,IAAI,SAAS,KAAK;AAAA,IACzDT,IAAU,KAAK,GAAGA,CAAO,IAAIA,IAAU,IAAI,SAAS,KAAK;AAAA,EAAA,EAAA,CAC5D,EAAA,CAEJ;AAEJ;"} \ No newline at end of file diff --git a/dist/Image-CgYjq-tA.cjs b/dist/Image-CgRVUblT.cjs similarity index 78% rename from dist/Image-CgYjq-tA.cjs rename to dist/Image-CgRVUblT.cjs index 8e07d64f..b912d946 100644 --- a/dist/Image-CgYjq-tA.cjs +++ b/dist/Image-CgRVUblT.cjs @@ -1,2 +1,2 @@ -"use strict";const s=require("./jsx-runtime-Dszzpdy0.cjs"),c=require("@mui/material");require("react");const l=require("./utils/general.cjs.js"),u=({href:i,hrefInNewTab:o=!1,...r})=>{let{onClick:t,style:e={},...n}=r;return e.width===void 0&&(e.width="100%"),i!==void 0&&(e={...e,cursor:"pointer"},o?t=()=>{l.openInNewTab(i)}:t=()=>{window.location.replace(i)}),s.jsxRuntimeExports.jsx(c.Box,{component:"img",onClick:t,style:e,...n})};exports.Image=u; -//# sourceMappingURL=Image-CgYjq-tA.cjs.map +"use strict";const s=require("./jsx-runtime-B2pbW5Fp.cjs"),c=require("@mui/material");require("react");const l=require("./utils/general.cjs.js"),u=({href:i,hrefInNewTab:o=!1,...r})=>{let{onClick:t,style:e={},...n}=r;return e.width===void 0&&(e.width="100%"),i!==void 0&&(e={...e,cursor:"pointer"},o?t=()=>{l.openInNewTab(i)}:t=()=>{window.location.replace(i)}),s.jsxRuntimeExports.jsx(c.Box,{component:"img",onClick:t,style:e,...n})};exports.Image=u; +//# sourceMappingURL=Image-CgRVUblT.cjs.map diff --git a/dist/Image-CgYjq-tA.cjs.map b/dist/Image-CgRVUblT.cjs.map similarity index 95% rename from dist/Image-CgYjq-tA.cjs.map rename to dist/Image-CgRVUblT.cjs.map index 2c5559b3..e2ca8058 100644 --- a/dist/Image-CgYjq-tA.cjs.map +++ b/dist/Image-CgRVUblT.cjs.map @@ -1 +1 @@ -{"version":3,"file":"Image-CgYjq-tA.cjs","sources":["../src/components/Image.tsx"],"sourcesContent":["import { Box, type BoxProps } from \"@mui/material\"\nimport { type FC } from \"react\"\n\nimport { openInNewTab } from \"../utils/general\"\n\nexport interface ImageProps extends Omit {\n alt: string\n src: string\n href?: string\n hrefInNewTab?: boolean\n}\n\nconst Image: FC = ({ href, hrefInNewTab = false, ...props }) => {\n let {\n onClick,\n style = {},\n ...otherProps // eslint-disable-line prefer-const\n } = props\n\n if (style.width === undefined) {\n style.width = \"100%\"\n }\n\n // Override onClick if href provided.\n if (href !== undefined) {\n style = { ...style, cursor: \"pointer\" }\n if (hrefInNewTab) {\n onClick = () => {\n openInNewTab(href)\n }\n } else {\n onClick = () => {\n window.location.replace(href)\n }\n }\n }\n\n return \n}\n\nexport default Image\n"],"names":["Image","href","hrefInNewTab","props","onClick","style","otherProps","openInNewTab","Box"],"mappings":"iJAYMA,EAAwB,CAAC,CAAE,KAAAC,EAAM,aAAAC,EAAe,GAAO,GAAGC,KAAY,CAC1E,GAAI,CACF,QAAAC,EACA,MAAAC,EAAQ,CAAA,EACR,GAAGC,CAAA,EACDH,EAEJ,OAAIE,EAAM,QAAU,SAClBA,EAAM,MAAQ,QAIZJ,IAAS,SACXI,EAAQ,CAAE,GAAGA,EAAO,OAAQ,SAAA,EACxBH,EACFE,EAAU,IAAM,CACdG,EAAAA,aAAaN,CAAI,CACnB,EAEAG,EAAU,IAAM,CACd,OAAO,SAAS,QAAQH,CAAI,CAC9B,2BAIIO,EAAAA,IAAA,CAAI,UAAU,MAAM,QAAAJ,EAAkB,MAAAC,EAAe,GAAGC,EAAY,CAC9E"} \ No newline at end of file +{"version":3,"file":"Image-CgRVUblT.cjs","sources":["../src/components/Image.tsx"],"sourcesContent":["import { Box, type BoxProps } from \"@mui/material\"\nimport { type FC } from \"react\"\n\nimport { openInNewTab } from \"../utils/general\"\n\nexport interface ImageProps extends Omit {\n alt: string\n src: string\n href?: string\n hrefInNewTab?: boolean\n}\n\nconst Image: FC = ({ href, hrefInNewTab = false, ...props }) => {\n let {\n onClick,\n style = {},\n ...otherProps // eslint-disable-line prefer-const\n } = props\n\n if (style.width === undefined) {\n style.width = \"100%\"\n }\n\n // Override onClick if href provided.\n if (href !== undefined) {\n style = { ...style, cursor: \"pointer\" }\n if (hrefInNewTab) {\n onClick = () => {\n openInNewTab(href)\n }\n } else {\n onClick = () => {\n window.location.replace(href)\n }\n }\n }\n\n return \n}\n\nexport default Image\n"],"names":["Image","href","hrefInNewTab","props","onClick","style","otherProps","openInNewTab","Box"],"mappings":"iJAYMA,EAAwB,CAAC,CAAE,KAAAC,EAAM,aAAAC,EAAe,GAAO,GAAGC,KAAY,CAC1E,GAAI,CACF,QAAAC,EACA,MAAAC,EAAQ,CAAA,EACR,GAAGC,CAAA,EACDH,EAEJ,OAAIE,EAAM,QAAU,SAClBA,EAAM,MAAQ,QAIZJ,IAAS,SACXI,EAAQ,CAAE,GAAGA,EAAO,OAAQ,SAAA,EACxBH,EACFE,EAAU,IAAM,CACdG,EAAAA,aAAaN,CAAI,CACnB,EAEAG,EAAU,IAAM,CACd,OAAO,SAAS,QAAQH,CAAI,CAC9B,2BAIIO,EAAAA,IAAA,CAAI,UAAU,MAAM,QAAAJ,EAAkB,MAAAC,EAAe,GAAGC,EAAY,CAC9E"} \ No newline at end of file diff --git a/dist/Image-C-f2ChBh.js b/dist/Image-DTOu0h-V.js similarity index 85% rename from dist/Image-C-f2ChBh.js rename to dist/Image-DTOu0h-V.js index b239fae9..0af1758a 100644 --- a/dist/Image-C-f2ChBh.js +++ b/dist/Image-DTOu0h-V.js @@ -1,4 +1,4 @@ -import { j as n } from "./jsx-runtime-C7wFtzyj.js"; +import { j as n } from "./jsx-runtime-lzYHhGH3.js"; import { Box as p } from "@mui/material"; import "react"; import { openInNewTab as s } from "./utils/general.es.js"; @@ -18,4 +18,4 @@ const f = ({ href: i, hrefInNewTab: r = !1, ...e }) => { export { f as I }; -//# sourceMappingURL=Image-C-f2ChBh.js.map +//# sourceMappingURL=Image-DTOu0h-V.js.map diff --git a/dist/Image-C-f2ChBh.js.map b/dist/Image-DTOu0h-V.js.map similarity index 96% rename from dist/Image-C-f2ChBh.js.map rename to dist/Image-DTOu0h-V.js.map index 70b5a020..1fe29cb6 100644 --- a/dist/Image-C-f2ChBh.js.map +++ b/dist/Image-DTOu0h-V.js.map @@ -1 +1 @@ -{"version":3,"file":"Image-C-f2ChBh.js","sources":["../src/components/Image.tsx"],"sourcesContent":["import { Box, type BoxProps } from \"@mui/material\"\nimport { type FC } from \"react\"\n\nimport { openInNewTab } from \"../utils/general\"\n\nexport interface ImageProps extends Omit {\n alt: string\n src: string\n href?: string\n hrefInNewTab?: boolean\n}\n\nconst Image: FC = ({ href, hrefInNewTab = false, ...props }) => {\n let {\n onClick,\n style = {},\n ...otherProps // eslint-disable-line prefer-const\n } = props\n\n if (style.width === undefined) {\n style.width = \"100%\"\n }\n\n // Override onClick if href provided.\n if (href !== undefined) {\n style = { ...style, cursor: \"pointer\" }\n if (hrefInNewTab) {\n onClick = () => {\n openInNewTab(href)\n }\n } else {\n onClick = () => {\n window.location.replace(href)\n }\n }\n }\n\n return \n}\n\nexport default Image\n"],"names":["Image","href","hrefInNewTab","props","onClick","style","otherProps","openInNewTab","Box"],"mappings":";;;;AAYA,MAAMA,IAAwB,CAAC,EAAE,MAAAC,GAAM,cAAAC,IAAe,IAAO,GAAGC,QAAY;AAC1E,MAAI;AAAA,IACF,SAAAC;AAAA,IACA,OAAAC,IAAQ,CAAA;AAAA,IACR,GAAGC;AAAA;AAAA,EAAA,IACDH;AAEJ,SAAIE,EAAM,UAAU,WAClBA,EAAM,QAAQ,SAIZJ,MAAS,WACXI,IAAQ,EAAE,GAAGA,GAAO,QAAQ,UAAA,GACxBH,IACFE,IAAU,MAAM;AACd,IAAAG,EAAaN,CAAI;AAAA,EACnB,IAEAG,IAAU,MAAM;AACd,WAAO,SAAS,QAAQH,CAAI;AAAA,EAC9B,0BAIIO,GAAA,EAAI,WAAU,OAAM,SAAAJ,GAAkB,OAAAC,GAAe,GAAGC,GAAY;AAC9E;"} \ No newline at end of file +{"version":3,"file":"Image-DTOu0h-V.js","sources":["../src/components/Image.tsx"],"sourcesContent":["import { Box, type BoxProps } from \"@mui/material\"\nimport { type FC } from \"react\"\n\nimport { openInNewTab } from \"../utils/general\"\n\nexport interface ImageProps extends Omit {\n alt: string\n src: string\n href?: string\n hrefInNewTab?: boolean\n}\n\nconst Image: FC = ({ href, hrefInNewTab = false, ...props }) => {\n let {\n onClick,\n style = {},\n ...otherProps // eslint-disable-line prefer-const\n } = props\n\n if (style.width === undefined) {\n style.width = \"100%\"\n }\n\n // Override onClick if href provided.\n if (href !== undefined) {\n style = { ...style, cursor: \"pointer\" }\n if (hrefInNewTab) {\n onClick = () => {\n openInNewTab(href)\n }\n } else {\n onClick = () => {\n window.location.replace(href)\n }\n }\n }\n\n return \n}\n\nexport default Image\n"],"names":["Image","href","hrefInNewTab","props","onClick","style","otherProps","openInNewTab","Box"],"mappings":";;;;AAYA,MAAMA,IAAwB,CAAC,EAAE,MAAAC,GAAM,cAAAC,IAAe,IAAO,GAAGC,QAAY;AAC1E,MAAI;AAAA,IACF,SAAAC;AAAA,IACA,OAAAC,IAAQ,CAAA;AAAA,IACR,GAAGC;AAAA;AAAA,EAAA,IACDH;AAEJ,SAAIE,EAAM,UAAU,WAClBA,EAAM,QAAQ,SAIZJ,MAAS,WACXI,IAAQ,EAAE,GAAGA,GAAO,QAAQ,UAAA,GACxBH,IACFE,IAAU,MAAM;AACd,IAAAG,EAAaN,CAAI;AAAA,EACnB,IAEAG,IAAU,MAAM;AACd,WAAO,SAAS,QAAQH,CAAI;AAAA,EAC9B,0BAIIO,GAAA,EAAI,WAAU,OAAM,SAAAJ,GAAkB,OAAAC,GAAe,GAAGC,GAAY;AAC9E;"} \ No newline at end of file diff --git a/dist/LinkButton-BOPjG7_2.cjs b/dist/LinkButton-Kw2brLTK.cjs similarity index 52% rename from dist/LinkButton-BOPjG7_2.cjs rename to dist/LinkButton-Kw2brLTK.cjs index 9da0bfcc..3bad4f69 100644 --- a/dist/LinkButton-BOPjG7_2.cjs +++ b/dist/LinkButton-Kw2brLTK.cjs @@ -1,2 +1,2 @@ -"use strict";const r=require("./jsx-runtime-Dszzpdy0.cjs"),t=require("@mui/material");require("react");const n=require("react-router");require("@mui/icons-material");require("./palette-BnIdHKDE.cjs");require("./auth-B7Vdot4N.cjs");const u=e=>r.jsxRuntimeExports.jsx(t.Button,{...e,component:n.Link});exports.LinkButton=u; -//# sourceMappingURL=LinkButton-BOPjG7_2.cjs.map +"use strict";const r=require("./jsx-runtime-B2pbW5Fp.cjs"),t=require("@mui/material");require("react");const n=require("react-router");require("@mui/icons-material");require("./palette-BnIdHKDE.cjs");require("./auth-BwpsrTko.cjs");const u=e=>r.jsxRuntimeExports.jsx(t.Button,{...e,component:n.Link});exports.LinkButton=u; +//# sourceMappingURL=LinkButton-Kw2brLTK.cjs.map diff --git a/dist/LinkButton-BOPjG7_2.cjs.map b/dist/LinkButton-Kw2brLTK.cjs.map similarity index 94% rename from dist/LinkButton-BOPjG7_2.cjs.map rename to dist/LinkButton-Kw2brLTK.cjs.map index e0b509c8..fe504ebf 100644 --- a/dist/LinkButton-BOPjG7_2.cjs.map +++ b/dist/LinkButton-Kw2brLTK.cjs.map @@ -1 +1 @@ -{"version":3,"file":"LinkButton-BOPjG7_2.cjs","sources":["../src/components/router/LinkButton.tsx"],"sourcesContent":["import { Button, type ButtonProps } from \"@mui/material\"\nimport { type JSX } from \"react\"\nimport { Link } from \"react-router\"\n\nimport { type LinkProps } from \"../../utils/router\"\n\nexport type LinkButtonProps<\n Override extends \"delta\" | \"to\",\n State extends Record = Record,\n> = Omit & LinkProps\n\n// https://mui.com/material-ui/integrations/routing/#button\nconst LinkButton: {\n (props: LinkButtonProps<\"delta\">): JSX.Element\n = Record>(\n props: LinkButtonProps<\"to\", State>,\n ): JSX.Element\n} = (props: LinkButtonProps<\"delta\"> | LinkButtonProps<\"to\">) => {\n return