@epic-web/workshop-app 5.7.1 → 5.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/client/assets/{_-CjjFMNGC.js → _-Dn1a0zwA.js} +2 -2
- package/build/client/assets/{_-CjjFMNGC.js.map → _-Dn1a0zwA.js.map} +1 -1
- package/build/client/assets/_exerciseNumber-BVCFK83o.js +2 -0
- package/build/client/assets/{_exerciseNumber-CqkGzsgV.js.map → _exerciseNumber-BVCFK83o.js.map} +1 -1
- package/build/client/assets/{_exerciseNumber_._stepNumber-BNWGPi9m.js → _exerciseNumber_._stepNumber-CAxJdIJe.js} +2 -2
- package/build/client/assets/{_exerciseNumber_._stepNumber-BNWGPi9m.js.map → _exerciseNumber_._stepNumber-CAxJdIJe.js.map} +1 -1
- package/build/client/assets/_exerciseNumber_.finished-DYebDhaK.js +2 -0
- package/build/client/assets/_exerciseNumber_.finished-DYebDhaK.js.map +1 -0
- package/build/client/assets/_layout-CyDc9BN3.js +6 -0
- package/build/client/assets/_layout-CyDc9BN3.js.map +1 -0
- package/build/client/assets/_layout-cu1Of_4G.js +2 -0
- package/build/client/assets/_layout-cu1Of_4G.js.map +1 -0
- package/build/client/assets/{accordion-C-sW--in.js → accordion-e-d1HozW.js} +2 -2
- package/build/client/assets/{accordion-C-sW--in.js.map → accordion-e-d1HozW.js.map} +1 -1
- package/build/client/assets/{account-Cc968svU.js → account-HU5gUm5Q.js} +2 -2
- package/build/client/assets/{account-Cc968svU.js.map → account-HU5gUm5Q.js.map} +1 -1
- package/build/client/assets/app-CWEUg7hY.js +2 -0
- package/build/client/assets/{app-BOqXK9hi.js.map → app-CWEUg7hY.js.map} +1 -1
- package/build/client/assets/{button-BS845Tjo.js → button-Hft_V1bH.js} +2 -2
- package/build/client/assets/{button-BS845Tjo.js.map → button-Hft_V1bH.js.map} +1 -1
- package/build/client/assets/diff-B_FrL8Cl.js +2 -0
- package/build/client/assets/diff-B_FrL8Cl.js.map +1 -0
- package/build/client/assets/diff-DmVm_N6W.js +2 -0
- package/build/client/assets/{diff-D0e_PrB7.js.map → diff-DmVm_N6W.js.map} +1 -1
- package/build/client/assets/{discord-BfP_Rny5.js → discord-C0ZkL9cR.js} +2 -2
- package/build/client/assets/{discord-BfP_Rny5.js.map → discord-C0ZkL9cR.js.map} +1 -1
- package/build/client/assets/discord-D6ZwxiZG.js +2 -0
- package/build/client/assets/discord-D6ZwxiZG.js.map +1 -0
- package/build/client/assets/{epic-video-qHKPWPt1.js → epic-video-75U1kyqf.js} +121 -121
- package/build/client/assets/{epic-video-qHKPWPt1.js.map → epic-video-75U1kyqf.js.map} +1 -1
- package/build/client/assets/{error-boundary-Beul7lrT.js → error-boundary-IvG0vuiP.js} +2 -2
- package/build/client/assets/{error-boundary-Beul7lrT.js.map → error-boundary-IvG0vuiP.js.map} +1 -1
- package/build/client/assets/finished-DDnBGcs8.js +2 -0
- package/build/client/assets/finished-DDnBGcs8.js.map +1 -0
- package/build/client/assets/{index-BOQWfIQC.js → index-9OWT3nC-.js} +3 -3
- package/build/client/assets/{index-BOQWfIQC.js.map → index-9OWT3nC-.js.map} +1 -1
- package/build/client/assets/{index-cZQeGrqL.js → index-BzN2y10J.js} +2 -2
- package/build/client/assets/{index-cZQeGrqL.js.map → index-BzN2y10J.js.map} +1 -1
- package/build/client/assets/index-CQEwwWTS.js +2 -0
- package/build/client/assets/{index-oED4uZLa.js.map → index-CQEwwWTS.js.map} +1 -1
- package/build/client/assets/index-DJhl_Q5J.js +2 -0
- package/build/client/assets/index-DJhl_Q5J.js.map +1 -0
- package/build/client/assets/{index-BHwOR8R1.js → index-c1IJ5ZX5.js} +2 -2
- package/build/client/assets/{index-BHwOR8R1.js.map → index-c1IJ5ZX5.js.map} +1 -1
- package/build/client/assets/{index-BPegC-d3.js → index-t6AA12_S.js} +2 -2
- package/build/client/assets/{index-BPegC-d3.js.map → index-t6AA12_S.js.map} +1 -1
- package/build/client/assets/{loading-C2wPVvQw.js → loading-DsHhjqzj.js} +2 -2
- package/build/client/assets/{loading-C2wPVvQw.js.map → loading-DsHhjqzj.js.map} +1 -1
- package/build/client/assets/{login-DoU7gifi.js → login-DJlKIofe.js} +2 -2
- package/build/client/assets/{login-DoU7gifi.js.map → login-DJlKIofe.js.map} +1 -1
- package/build/client/assets/manifest-3da21166.js +1 -0
- package/build/client/assets/{mdx-CsS30JUo.js → mdx-CsRMuEw9.js} +2 -2
- package/build/client/assets/{mdx-CsS30JUo.js.map → mdx-CsRMuEw9.js.map} +1 -1
- package/build/client/assets/{misc-BtjCSy-T.js → misc-DoGPlBur.js} +2 -2
- package/build/client/assets/{misc-BtjCSy-T.js.map → misc-DoGPlBur.js.map} +1 -1
- package/build/client/assets/{nav-chevrons-2hLTwAZb.js → nav-chevrons-CxWSSbTo.js} +2 -2
- package/build/client/assets/{nav-chevrons-2hLTwAZb.js.map → nav-chevrons-CxWSSbTo.js.map} +1 -1
- package/build/client/assets/onboarding-DssP5iXB.js +2 -0
- package/build/client/assets/{onboarding-Cu6eD7KS.js.map → onboarding-DssP5iXB.js.map} +1 -1
- package/build/client/assets/online-D33oijLr.js +2 -0
- package/build/client/assets/online-D33oijLr.js.map +1 -0
- package/build/client/assets/{preferences-br0VSK51.js → preferences-BIt5-Lgy.js} +2 -2
- package/build/client/assets/{preferences-br0VSK51.js.map → preferences-BIt5-Lgy.js.map} +1 -1
- package/build/client/assets/{presence-CrYBA3ta.js → presence-BsqTpSt4.js} +5 -5
- package/build/client/assets/{presence-CrYBA3ta.js.map → presence-BsqTpSt4.js.map} +1 -1
- package/build/client/assets/{preview-C2y4Z0qO.js → preview-CZwnFQrx.js} +2 -2
- package/build/client/assets/{preview-C2y4Z0qO.js.map → preview-CZwnFQrx.js.map} +1 -1
- package/build/client/assets/{product-gqq_YQBW.js → product-CVL4Z9c0.js} +2 -2
- package/build/client/assets/{product-gqq_YQBW.js.map → product-CVL4Z9c0.js.map} +1 -1
- package/build/client/assets/{progress-D-HsH4j3.js → progress-Dj5cyA_v.js} +2 -2
- package/build/client/assets/{progress-D-HsH4j3.js.map → progress-Dj5cyA_v.js.map} +1 -1
- package/build/client/assets/{progress-bar-CTPCfvDi.js → progress-bar-Dln7epYZ.js} +2 -2
- package/build/client/assets/{progress-bar-CTPCfvDi.js.map → progress-bar-Dln7epYZ.js.map} +1 -1
- package/build/client/assets/{revalidation-ws-DYaJNyw1.js → revalidation-ws-Bes2l3ma.js} +2 -2
- package/build/client/assets/{revalidation-ws-DYaJNyw1.js.map → revalidation-ws-Bes2l3ma.js.map} +1 -1
- package/build/client/assets/{root-C1pLsthM.js → root-Bb8fIt2z.js} +3 -3
- package/build/client/assets/{root-C1pLsthM.js.map → root-Bb8fIt2z.js.map} +1 -1
- package/build/client/assets/{set-playground-DQzAhC0t.js → set-playground-DOFTHWzE.js} +2 -2
- package/build/client/assets/{set-playground-DQzAhC0t.js.map → set-playground-DOFTHWzE.js.map} +1 -1
- package/build/client/assets/tailwind-4klXLdJc.css +1 -0
- package/build/client/assets/test-BwM0E8Mk.js +2 -0
- package/build/client/assets/{test-CDWRwwO-.js.map → test-BwM0E8Mk.js.map} +1 -1
- package/build/client/assets/{tests-LWW8wCYZ.js → tests-CDgBzBBo.js} +3 -3
- package/build/client/assets/tests-CDgBzBBo.js.map +1 -0
- package/build/client/assets/{tooltip-Bp9KHnLy.js → tooltip-DT9kZxPw.js} +2 -2
- package/build/client/assets/{tooltip-Bp9KHnLy.js.map → tooltip-DT9kZxPw.js.map} +1 -1
- package/build/server/index.js +161 -54
- package/build/server/index.js.map +1 -1
- package/dist/server/index.js +2 -0
- package/package.json +3 -3
- package/build/client/assets/_exerciseNumber-CqkGzsgV.js +0 -2
- package/build/client/assets/_exerciseNumber_.finished-CdNhLhKg.js +0 -2
- package/build/client/assets/_exerciseNumber_.finished-CdNhLhKg.js.map +0 -1
- package/build/client/assets/_layout-BMa5nZcJ.js +0 -2
- package/build/client/assets/_layout-BMa5nZcJ.js.map +0 -1
- package/build/client/assets/_layout-Muw3ERYT.js +0 -6
- package/build/client/assets/_layout-Muw3ERYT.js.map +0 -1
- package/build/client/assets/app-BOqXK9hi.js +0 -2
- package/build/client/assets/diff-D0e_PrB7.js +0 -2
- package/build/client/assets/diff-DtvfyjPI.js +0 -2
- package/build/client/assets/diff-DtvfyjPI.js.map +0 -1
- package/build/client/assets/discord-DILzAZN8.js +0 -2
- package/build/client/assets/discord-DILzAZN8.js.map +0 -1
- package/build/client/assets/finished-DUKfL220.js +0 -2
- package/build/client/assets/finished-DUKfL220.js.map +0 -1
- package/build/client/assets/index-DbCT6N5p.js +0 -2
- package/build/client/assets/index-DbCT6N5p.js.map +0 -1
- package/build/client/assets/index-oED4uZLa.js +0 -2
- package/build/client/assets/manifest-3096dc61.js +0 -1
- package/build/client/assets/onboarding-Cu6eD7KS.js +0 -2
- package/build/client/assets/tailwind-CRGTilRc.css +0 -1
- package/build/client/assets/test-CDWRwwO-.js +0 -2
- package/build/client/assets/tests-LWW8wCYZ.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"login-DoU7gifi.js","sources":["../../../app/utils/auth-events.ts","../../../app/routes/login-sse.tsx","../../../app/routes/_app+/login.tsx"],"sourcesContent":["export const EVENTS = {\n\tUSER_CODE_RECEIVED: 'USER_CODE_RECEIVED',\n\tAUTH_RESOLVED: 'AUTH_RESOLVED',\n\tAUTH_REJECTED: 'AUTH_REJECTED',\n} as const\nexport type EventTypes = keyof typeof EVENTS\n","import { type LoaderFunctionArgs } from '@remix-run/node'\nimport { eventStream } from 'remix-utils/sse/server'\nimport { z } from 'zod'\nimport { EVENTS } from '#app/utils/auth-events.ts'\nimport { authEmitter } from '#app/utils/auth.server.ts'\nimport { ensureUndeployed } from '#app/utils/misc.tsx'\n\nconst CodeReceivedEventSchema = z.object({\n\ttype: z.literal(EVENTS.USER_CODE_RECEIVED),\n\tcode: z.string(),\n\turl: z.string(),\n})\nconst AuthResolvedEventSchema = z.object({\n\ttype: z.literal(EVENTS.AUTH_RESOLVED),\n})\nconst AuthRejectedEventSchema = z.object({\n\ttype: z.literal(EVENTS.AUTH_REJECTED),\n\terror: z.string().optional().default('Unknown error'),\n})\nexport const EventSchema = z.union([\n\tCodeReceivedEventSchema,\n\tAuthResolvedEventSchema,\n\tAuthRejectedEventSchema,\n])\n\nexport async function loader({ request }: LoaderFunctionArgs) {\n\tensureUndeployed()\n\treturn eventStream(request.signal, function setup(send) {\n\t\tfunction handleCodeReceived(data: any) {\n\t\t\tsend({\n\t\t\t\tdata: JSON.stringify(\n\t\t\t\t\tCodeReceivedEventSchema.parse({\n\t\t\t\t\t\ttype: EVENTS.USER_CODE_RECEIVED,\n\t\t\t\t\t\t...data,\n\t\t\t\t\t}),\n\t\t\t\t),\n\t\t\t})\n\t\t}\n\t\tfunction handleAuthResolved() {\n\t\t\tsend({ data: JSON.stringify({ type: EVENTS.AUTH_RESOLVED }) })\n\t\t}\n\t\tfunction handleAuthRejected(data: any) {\n\t\t\tconst result = AuthRejectedEventSchema.safeParse(data)\n\t\t\tif (result.success) {\n\t\t\t\tsend({ data: JSON.stringify(result.data) })\n\t\t\t} else {\n\t\t\t\tconsole.error('Error parsing auth rejected event', result.error, data)\n\t\t\t}\n\t\t}\n\t\tauthEmitter.on(EVENTS.USER_CODE_RECEIVED, handleCodeReceived)\n\t\tauthEmitter.on(EVENTS.AUTH_RESOLVED, handleAuthResolved)\n\t\tauthEmitter.on(EVENTS.AUTH_REJECTED, handleAuthRejected)\n\t\treturn () => {\n\t\t\tauthEmitter.off(EVENTS.USER_CODE_RECEIVED, handleCodeReceived)\n\t\t\tauthEmitter.off(EVENTS.AUTH_RESOLVED, handleAuthResolved)\n\t\t\tauthEmitter.off(EVENTS.AUTH_REJECTED, handleAuthRejected)\n\t\t}\n\t})\n}\n","import { getAuthInfo } from '@epic-web/workshop-utils/db.server'\nimport { type SEOHandle } from '@nasa-gcn/remix-seo'\nimport { redirect } from '@remix-run/node'\nimport { useFetcher, useNavigate, useRevalidator } from '@remix-run/react'\nimport { useEffect, useState } from 'react'\nimport { useEventSource } from 'remix-utils/sse/react'\nimport { Button, ButtonLink } from '#app/components/button.tsx'\nimport { Loading } from '#app/components/loading.tsx'\nimport { Logo } from '#app/components/product.tsx'\nimport { useWorkshopConfig } from '#app/components/workshop-config.js'\nimport { EVENTS } from '#app/utils/auth-events.ts'\nimport { registerDevice } from '#app/utils/auth.server.ts'\nimport { ensureUndeployed } from '#app/utils/misc.tsx'\nimport { EventSchema } from '../login-sse.tsx'\n\nexport const handle: SEOHandle = {\n\tgetSitemapEntries: () => null,\n}\n\nexport async function loader() {\n\tensureUndeployed()\n\tconst isAuthenticated = Boolean(await getAuthInfo())\n\tif (isAuthenticated) throw redirect('/account')\n\treturn {}\n}\n\nexport async function action() {\n\tensureUndeployed()\n\tvoid registerDevice()\n\treturn { status: 'pending' } as const\n}\n\nexport default function Login() {\n\tconst {\n\t\tproduct: { displayName },\n\t} = useWorkshopConfig()\n\tconst loginFetcher = useFetcher<typeof action>()\n\tconst [clickedVerificationLink, setClickedVerificationLink] = useState(false)\n\tconst [authError, setAuthError] = useState<null | string>(null)\n\tconst [userCodeInfo, setUserCodeInfo] = useState<null | {\n\t\tcode: string\n\t\turl: string\n\t}>(null)\n\tconst navigate = useNavigate()\n\tconst revalidator = useRevalidator()\n\tconst lastMessage = useEventSource(`/login-sse`)\n\tuseEffect(() => {\n\t\tif (!lastMessage) return\n\n\t\tconst parsed = JSON.parse(lastMessage)\n\t\tconst result = EventSchema.safeParse(parsed)\n\t\tif (!result.success) {\n\t\t\tconsole.error(result.error.flatten())\n\t\t\treturn\n\t\t}\n\t\tswitch (result.data.type) {\n\t\t\tcase EVENTS.USER_CODE_RECEIVED: {\n\t\t\t\tsetUserCodeInfo(result.data)\n\t\t\t\tbreak\n\t\t\t}\n\t\t\tcase EVENTS.AUTH_RESOLVED: {\n\t\t\t\trevalidator.revalidate()\n\t\t\t\tnavigate('/')\n\t\t\t\tbreak\n\t\t\t}\n\t\t\tcase EVENTS.AUTH_REJECTED: {\n\t\t\t\tsetAuthError(result.data.error)\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\t}, [lastMessage, navigate, revalidator])\n\n\treturn (\n\t\t<main className=\"flex h-full w-full flex-grow flex-col items-center justify-center p-10\">\n\t\t\t<div className=\"flex flex-col items-center\">\n\t\t\t\t<Logo className=\"h-16 w-16\" />\n\t\t\t\t<h1 className=\"pt-5 text-2xl font-semibold md:text-3xl\">\n\t\t\t\t\tLogin to {displayName}\n\t\t\t\t</h1>\n\t\t\t\t<div className=\"flex w-full flex-col items-center pt-5\">\n\t\t\t\t\t{userCodeInfo ? (\n\t\t\t\t\t\t<div className=\"flex w-full max-w-md flex-col items-center gap-3\">\n\t\t\t\t\t\t\t<div className=\"my-2 flex w-full flex-col items-center gap-2\">\n\t\t\t\t\t\t\t\t<p className=\"text-lg\">Your verification code is: </p>\n\t\t\t\t\t\t\t\t<div className=\"mb-3 w-full bg-gray-100 px-5 py-3 text-center text-lg font-bold dark:bg-black/40\">\n\t\t\t\t\t\t\t\t\t<code>{userCodeInfo.code}</code>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<p className=\"text-base\">\n\t\t\t\t\t\t\t\t\tYou'll use this to verify your device on {displayName}. Click\n\t\t\t\t\t\t\t\t\tverify code below to open the verification page.\n\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<ButtonLink\n\t\t\t\t\t\t\t\tvarient=\"primary\"\n\t\t\t\t\t\t\t\tto={userCodeInfo.url}\n\t\t\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t\t\t\trel=\"noreferrer\"\n\t\t\t\t\t\t\t\tonClick={() => setClickedVerificationLink(true)}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\tVerify Auth Code\n\t\t\t\t\t\t\t</ButtonLink>\n\t\t\t\t\t\t\t{clickedVerificationLink ? (\n\t\t\t\t\t\t\t\t<div className=\"justify-center pt-5 text-center opacity-60\">\n\t\t\t\t\t\t\t\t\t<Loading className=\"justify-center\">\n\t\t\t\t\t\t\t\t\t\tWaiting for confirmation\n\t\t\t\t\t\t\t\t\t</Loading>\n\t\t\t\t\t\t\t\t\t<p className=\"pt-2\">\n\t\t\t\t\t\t\t\t\t\tPlease open{' '}\n\t\t\t\t\t\t\t\t\t\t<a\n\t\t\t\t\t\t\t\t\t\t\thref={userCodeInfo.url}\n\t\t\t\t\t\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t\t\t\t\t\t\tclassName=\"underline\"\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\tyour auth page\n\t\t\t\t\t\t\t\t\t\t</a>{' '}\n\t\t\t\t\t\t\t\t\t\tin a new tab to continue.\n\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t) : null}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t) : (\n\t\t\t\t\t\t<div className=\"flex flex-col items-center gap-8\">\n\t\t\t\t\t\t\t<div className=\"flex max-w-lg flex-col gap-2 gap-3 pt-3 text-base text-gray-700 dark:text-gray-300\">\n\t\t\t\t\t\t\t\t<p>\n\t\t\t\t\t\t\t\t\tIf you have access to this workshop on {displayName}, you'll\n\t\t\t\t\t\t\t\t\tbe able to watch videos, track progress, run tests, view the\n\t\t\t\t\t\t\t\t\tdiffs, and more!\n\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t<p>\n\t\t\t\t\t\t\t\t\tFirst you need to authenticate your device by requesting an\n\t\t\t\t\t\t\t\t\taccess code and verifying on {displayName}.\n\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<loginFetcher.Form method=\"POST\">\n\t\t\t\t\t\t\t\t<Button varient=\"primary\" type=\"submit\">\n\t\t\t\t\t\t\t\t\t{loginFetcher.state === 'idle' &&\n\t\t\t\t\t\t\t\t\tloginFetcher.data?.status !== 'pending'\n\t\t\t\t\t\t\t\t\t\t? `Retrieve Auth Code`\n\t\t\t\t\t\t\t\t\t\t: `Retrieving Auth Code...`}\n\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t</loginFetcher.Form>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t)}\n\t\t\t\t\t{authError ? (\n\t\t\t\t\t\t<div className=\"mt-4 text-red-500\">\n\t\t\t\t\t\t\tThere was an error: <pre>{authError}</pre>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t) : null}\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</main>\n\t)\n}\n"],"names":["EVENTS","CodeReceivedEventSchema","z","object","type","literal","USER_CODE_RECEIVED","code","string","url","AuthResolvedEventSchema","AUTH_RESOLVED","AuthRejectedEventSchema","AUTH_REJECTED","error","optional","default","EventSchema","union","handle","getSitemapEntries","Login","product","displayName","useWorkshopConfig","loginFetcher","useFetcher","clickedVerificationLink","setClickedVerificationLink","useState","authError","setAuthError","userCodeInfo","setUserCodeInfo","navigate","useNavigate","revalidator","useRevalidator","lastMessage","useEventSource","useEffect","parsed","JSON","parse","result","safeParse","success","console","flatten","data","revalidate","className","children","jsxs","jsx","Logo","ButtonLink","varient","to","target","rel","onClick","Loading","href","Form","method","Button","state","status"],"mappings":"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"}
|
|
1
|
+
{"version":3,"file":"login-DJlKIofe.js","sources":["../../../app/utils/auth-events.ts","../../../app/routes/login-sse.tsx","../../../app/routes/_app+/login.tsx"],"sourcesContent":["export const EVENTS = {\n\tUSER_CODE_RECEIVED: 'USER_CODE_RECEIVED',\n\tAUTH_RESOLVED: 'AUTH_RESOLVED',\n\tAUTH_REJECTED: 'AUTH_REJECTED',\n} as const\nexport type EventTypes = keyof typeof EVENTS\n","import { type LoaderFunctionArgs } from '@remix-run/node'\nimport { eventStream } from 'remix-utils/sse/server'\nimport { z } from 'zod'\nimport { EVENTS } from '#app/utils/auth-events.ts'\nimport { authEmitter } from '#app/utils/auth.server.ts'\nimport { ensureUndeployed } from '#app/utils/misc.tsx'\n\nconst CodeReceivedEventSchema = z.object({\n\ttype: z.literal(EVENTS.USER_CODE_RECEIVED),\n\tcode: z.string(),\n\turl: z.string(),\n})\nconst AuthResolvedEventSchema = z.object({\n\ttype: z.literal(EVENTS.AUTH_RESOLVED),\n})\nconst AuthRejectedEventSchema = z.object({\n\ttype: z.literal(EVENTS.AUTH_REJECTED),\n\terror: z.string().optional().default('Unknown error'),\n})\nexport const EventSchema = z.union([\n\tCodeReceivedEventSchema,\n\tAuthResolvedEventSchema,\n\tAuthRejectedEventSchema,\n])\n\nexport async function loader({ request }: LoaderFunctionArgs) {\n\tensureUndeployed()\n\treturn eventStream(request.signal, function setup(send) {\n\t\tfunction handleCodeReceived(data: any) {\n\t\t\tsend({\n\t\t\t\tdata: JSON.stringify(\n\t\t\t\t\tCodeReceivedEventSchema.parse({\n\t\t\t\t\t\ttype: EVENTS.USER_CODE_RECEIVED,\n\t\t\t\t\t\t...data,\n\t\t\t\t\t}),\n\t\t\t\t),\n\t\t\t})\n\t\t}\n\t\tfunction handleAuthResolved() {\n\t\t\tsend({ data: JSON.stringify({ type: EVENTS.AUTH_RESOLVED }) })\n\t\t}\n\t\tfunction handleAuthRejected(data: any) {\n\t\t\tconst result = AuthRejectedEventSchema.safeParse(data)\n\t\t\tif (result.success) {\n\t\t\t\tsend({ data: JSON.stringify(result.data) })\n\t\t\t} else {\n\t\t\t\tconsole.error('Error parsing auth rejected event', result.error, data)\n\t\t\t}\n\t\t}\n\t\tauthEmitter.on(EVENTS.USER_CODE_RECEIVED, handleCodeReceived)\n\t\tauthEmitter.on(EVENTS.AUTH_RESOLVED, handleAuthResolved)\n\t\tauthEmitter.on(EVENTS.AUTH_REJECTED, handleAuthRejected)\n\t\treturn () => {\n\t\t\tauthEmitter.off(EVENTS.USER_CODE_RECEIVED, handleCodeReceived)\n\t\t\tauthEmitter.off(EVENTS.AUTH_RESOLVED, handleAuthResolved)\n\t\t\tauthEmitter.off(EVENTS.AUTH_REJECTED, handleAuthRejected)\n\t\t}\n\t})\n}\n","import { getAuthInfo } from '@epic-web/workshop-utils/db.server'\nimport { type SEOHandle } from '@nasa-gcn/remix-seo'\nimport { redirect } from '@remix-run/node'\nimport { useFetcher, useNavigate, useRevalidator } from '@remix-run/react'\nimport { useEffect, useState } from 'react'\nimport { useEventSource } from 'remix-utils/sse/react'\nimport { Button, ButtonLink } from '#app/components/button.tsx'\nimport { Loading } from '#app/components/loading.tsx'\nimport { Logo } from '#app/components/product.tsx'\nimport { useWorkshopConfig } from '#app/components/workshop-config.js'\nimport { EVENTS } from '#app/utils/auth-events.ts'\nimport { registerDevice } from '#app/utils/auth.server.ts'\nimport { ensureUndeployed } from '#app/utils/misc.tsx'\nimport { EventSchema } from '../login-sse.tsx'\n\nexport const handle: SEOHandle = {\n\tgetSitemapEntries: () => null,\n}\n\nexport async function loader() {\n\tensureUndeployed()\n\tconst isAuthenticated = Boolean(await getAuthInfo())\n\tif (isAuthenticated) throw redirect('/account')\n\treturn {}\n}\n\nexport async function action() {\n\tensureUndeployed()\n\tvoid registerDevice()\n\treturn { status: 'pending' } as const\n}\n\nexport default function Login() {\n\tconst {\n\t\tproduct: { displayName },\n\t} = useWorkshopConfig()\n\tconst loginFetcher = useFetcher<typeof action>()\n\tconst [clickedVerificationLink, setClickedVerificationLink] = useState(false)\n\tconst [authError, setAuthError] = useState<null | string>(null)\n\tconst [userCodeInfo, setUserCodeInfo] = useState<null | {\n\t\tcode: string\n\t\turl: string\n\t}>(null)\n\tconst navigate = useNavigate()\n\tconst revalidator = useRevalidator()\n\tconst lastMessage = useEventSource(`/login-sse`)\n\tuseEffect(() => {\n\t\tif (!lastMessage) return\n\n\t\tconst parsed = JSON.parse(lastMessage)\n\t\tconst result = EventSchema.safeParse(parsed)\n\t\tif (!result.success) {\n\t\t\tconsole.error(result.error.flatten())\n\t\t\treturn\n\t\t}\n\t\tswitch (result.data.type) {\n\t\t\tcase EVENTS.USER_CODE_RECEIVED: {\n\t\t\t\tsetUserCodeInfo(result.data)\n\t\t\t\tbreak\n\t\t\t}\n\t\t\tcase EVENTS.AUTH_RESOLVED: {\n\t\t\t\trevalidator.revalidate()\n\t\t\t\tnavigate('/')\n\t\t\t\tbreak\n\t\t\t}\n\t\t\tcase EVENTS.AUTH_REJECTED: {\n\t\t\t\tsetAuthError(result.data.error)\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\t}, [lastMessage, navigate, revalidator])\n\n\treturn (\n\t\t<main className=\"flex h-full w-full flex-grow flex-col items-center justify-center p-10\">\n\t\t\t<div className=\"flex flex-col items-center\">\n\t\t\t\t<Logo className=\"h-16 w-16\" />\n\t\t\t\t<h1 className=\"pt-5 text-2xl font-semibold md:text-3xl\">\n\t\t\t\t\tLogin to {displayName}\n\t\t\t\t</h1>\n\t\t\t\t<div className=\"flex w-full flex-col items-center pt-5\">\n\t\t\t\t\t{userCodeInfo ? (\n\t\t\t\t\t\t<div className=\"flex w-full max-w-md flex-col items-center gap-3\">\n\t\t\t\t\t\t\t<div className=\"my-2 flex w-full flex-col items-center gap-2\">\n\t\t\t\t\t\t\t\t<p className=\"text-lg\">Your verification code is: </p>\n\t\t\t\t\t\t\t\t<div className=\"mb-3 w-full bg-gray-100 px-5 py-3 text-center text-lg font-bold dark:bg-black/40\">\n\t\t\t\t\t\t\t\t\t<code>{userCodeInfo.code}</code>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<p className=\"text-base\">\n\t\t\t\t\t\t\t\t\tYou'll use this to verify your device on {displayName}. Click\n\t\t\t\t\t\t\t\t\tverify code below to open the verification page.\n\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<ButtonLink\n\t\t\t\t\t\t\t\tvarient=\"primary\"\n\t\t\t\t\t\t\t\tto={userCodeInfo.url}\n\t\t\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t\t\t\trel=\"noreferrer\"\n\t\t\t\t\t\t\t\tonClick={() => setClickedVerificationLink(true)}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\tVerify Auth Code\n\t\t\t\t\t\t\t</ButtonLink>\n\t\t\t\t\t\t\t{clickedVerificationLink ? (\n\t\t\t\t\t\t\t\t<div className=\"justify-center pt-5 text-center opacity-60\">\n\t\t\t\t\t\t\t\t\t<Loading className=\"justify-center\">\n\t\t\t\t\t\t\t\t\t\tWaiting for confirmation\n\t\t\t\t\t\t\t\t\t</Loading>\n\t\t\t\t\t\t\t\t\t<p className=\"pt-2\">\n\t\t\t\t\t\t\t\t\t\tPlease open{' '}\n\t\t\t\t\t\t\t\t\t\t<a\n\t\t\t\t\t\t\t\t\t\t\thref={userCodeInfo.url}\n\t\t\t\t\t\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t\t\t\t\t\t\tclassName=\"underline\"\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\tyour auth page\n\t\t\t\t\t\t\t\t\t\t</a>{' '}\n\t\t\t\t\t\t\t\t\t\tin a new tab to continue.\n\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t) : null}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t) : (\n\t\t\t\t\t\t<div className=\"flex flex-col items-center gap-8\">\n\t\t\t\t\t\t\t<div className=\"flex max-w-lg flex-col gap-2 gap-3 pt-3 text-base text-gray-700 dark:text-gray-300\">\n\t\t\t\t\t\t\t\t<p>\n\t\t\t\t\t\t\t\t\tIf you have access to this workshop on {displayName}, you'll\n\t\t\t\t\t\t\t\t\tbe able to watch videos, track progress, run tests, view the\n\t\t\t\t\t\t\t\t\tdiffs, and more!\n\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t<p>\n\t\t\t\t\t\t\t\t\tFirst you need to authenticate your device by requesting an\n\t\t\t\t\t\t\t\t\taccess code and verifying on {displayName}.\n\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<loginFetcher.Form method=\"POST\">\n\t\t\t\t\t\t\t\t<Button varient=\"primary\" type=\"submit\">\n\t\t\t\t\t\t\t\t\t{loginFetcher.state === 'idle' &&\n\t\t\t\t\t\t\t\t\tloginFetcher.data?.status !== 'pending'\n\t\t\t\t\t\t\t\t\t\t? `Retrieve Auth Code`\n\t\t\t\t\t\t\t\t\t\t: `Retrieving Auth Code...`}\n\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t</loginFetcher.Form>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t)}\n\t\t\t\t\t{authError ? (\n\t\t\t\t\t\t<div className=\"mt-4 text-red-500\">\n\t\t\t\t\t\t\tThere was an error: <pre>{authError}</pre>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t) : null}\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</main>\n\t)\n}\n"],"names":["EVENTS","CodeReceivedEventSchema","z","object","type","literal","USER_CODE_RECEIVED","code","string","url","AuthResolvedEventSchema","AUTH_RESOLVED","AuthRejectedEventSchema","AUTH_REJECTED","error","optional","default","EventSchema","union","handle","getSitemapEntries","Login","product","displayName","useWorkshopConfig","loginFetcher","useFetcher","clickedVerificationLink","setClickedVerificationLink","useState","authError","setAuthError","userCodeInfo","setUserCodeInfo","navigate","useNavigate","revalidator","useRevalidator","lastMessage","useEventSource","useEffect","parsed","JSON","parse","result","safeParse","success","console","flatten","data","revalidate","className","children","jsxs","jsx","Logo","ButtonLink","varient","to","target","rel","onClick","Loading","href","Form","method","Button","state","status"],"mappings":"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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
window.__remixManifest={"entry":{"module":"/assets/entry.client-CQusg5Iz.js","imports":["/assets/index-CGzylDPY.js","/assets/components-DrvY4pal.js"],"css":[]},"routes":{"root":{"id":"root","path":"","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasErrorBoundary":true,"module":"/assets/root-Bb8fIt2z.js","imports":["/assets/index-CGzylDPY.js","/assets/components-DrvY4pal.js","/assets/misc-DoGPlBur.js","/assets/pe-DXT2FOp1.js","/assets/error-boundary-IvG0vuiP.js","/assets/progress-bar-Dln7epYZ.js","/assets/index-CB8bjE90.js","/assets/tooltip-DT9kZxPw.js","/assets/index-9OWT3nC-.js","/assets/presence-BsqTpSt4.js","/assets/seo-pBpFCWsy.js","/assets/online-D33oijLr.js"],"css":[]},"routes/$":{"id":"routes/$","parentId":"root","path":"*","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasErrorBoundary":true,"module":"/assets/_-Dn1a0zwA.js","imports":["/assets/index-CGzylDPY.js","/assets/error-boundary-IvG0vuiP.js","/assets/misc-DoGPlBur.js","/assets/components-DrvY4pal.js"],"css":[]},"routes/_app+/_layout":{"id":"routes/_app+/_layout","parentId":"root","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasErrorBoundary":false,"module":"/assets/_layout-CyDc9BN3.js","imports":["/assets/index-CGzylDPY.js","/assets/misc-DoGPlBur.js","/assets/pe-DXT2FOp1.js","/assets/product-CVL4Z9c0.js","/assets/revalidation-ws-Bes2l3ma.js","/assets/tooltip-DT9kZxPw.js","/assets/index-c1IJ5ZX5.js","/assets/user-C0j04V55.js","/assets/workshop-config-oL_FWDKq.js","/assets/online-D33oijLr.js","/assets/presence-BsqTpSt4.js","/assets/progress-Dj5cyA_v.js","/assets/index-9OWT3nC-.js","/assets/components-DrvY4pal.js"],"css":[]},"routes/_app+/account":{"id":"routes/_app+/account","parentId":"routes/_app+/_layout","path":"account","hasAction":true,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasErrorBoundary":false,"module":"/assets/account-HU5gUm5Q.js","imports":["/assets/index-CGzylDPY.js","/assets/button-Hft_V1bH.js","/assets/misc-DoGPlBur.js","/assets/tooltip-DT9kZxPw.js","/assets/user-C0j04V55.js","/assets/workshop-config-oL_FWDKq.js","/assets/components-DrvY4pal.js"],"css":[]},"routes/_app+/app.$appName+/$":{"id":"routes/_app+/app.$appName+/$","parentId":"routes/_app+/_layout","path":"app/:appName/*","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasErrorBoundary":false,"module":"/assets/_-l0sNRNKZ.js","imports":[],"css":[]},"routes/_app+/app.$appName+/api.$":{"id":"routes/_app+/app.$appName+/api.$","parentId":"routes/_app+/_layout","path":"app/:appName/api/*","hasAction":true,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasErrorBoundary":false,"module":"/assets/api._-l0sNRNKZ.js","imports":[],"css":[]},"routes/_app+/app.$appName+/epic_ws[.js]":{"id":"routes/_app+/app.$appName+/epic_ws[.js]","parentId":"routes/_app+/_layout","path":"app/:appName/epic_ws.js","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasErrorBoundary":false,"module":"/assets/epic_ws_.js_-l0sNRNKZ.js","imports":[],"css":[]},"routes/_app+/app.$appName+/index":{"id":"routes/_app+/app.$appName+/index","parentId":"routes/_app+/_layout","path":"app/:appName/","index":true,"hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasErrorBoundary":false,"module":"/assets/index-l0sNRNKZ.js","imports":[],"css":[]},"routes/_app+/app.$appName+/test.$testName":{"id":"routes/_app+/app.$appName+/test.$testName","parentId":"routes/_app+/_layout","path":"app/:appName/test/:testName","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasErrorBoundary":false,"module":"/assets/test._testName-l0sNRNKZ.js","imports":[],"css":[]},"routes/_app+/app.$appName+/test.epic_ws[.js]":{"id":"routes/_app+/app.$appName+/test.epic_ws[.js]","parentId":"routes/_app+/_layout","path":"app/:appName/test/epic_ws.js","hasAction":false,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasErrorBoundary":false,"module":"/assets/test.epic_ws_.js_-l0sNRNKZ.js","imports":[],"css":[]},"routes/_app+/app.epic_ws[.js]":{"id":"routes/_app+/app.epic_ws[.js]","parentId":"routes/_app+/_layout","path":"app/epic_ws.js","hasAction":false,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasErrorBoundary":false,"module":"/assets/app.epic_ws_.js_-l0sNRNKZ.js","imports":[],"css":[]},"routes/_app+/discord":{"id":"routes/_app+/discord","parentId":"routes/_app+/_layout","path":"discord","hasAction":false,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasErrorBoundary":false,"module":"/assets/discord-D6ZwxiZG.js","imports":["/assets/discord-C0ZkL9cR.js","/assets/index-CGzylDPY.js","/assets/misc-DoGPlBur.js","/assets/components-DrvY4pal.js","/assets/user-C0j04V55.js","/assets/workshop-config-oL_FWDKq.js"],"css":[]},"routes/_app+/exercise+/_layout":{"id":"routes/_app+/exercise+/_layout","parentId":"routes/_app+/_layout","path":"exercise","hasAction":false,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasErrorBoundary":false,"module":"/assets/_layout-CwTidn3v.js","imports":["/assets/index-CGzylDPY.js"],"css":[]},"routes/_app+/exercise+/$exerciseNumber":{"id":"routes/_app+/exercise+/$exerciseNumber","parentId":"routes/_app+/exercise+/_layout","path":":exerciseNumber","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasErrorBoundary":true,"module":"/assets/_exerciseNumber-BVCFK83o.js","imports":["/assets/index-CGzylDPY.js","/assets/index-egcHQOpF.js","/assets/epic-video-75U1kyqf.js","/assets/revalidation-ws-Bes2l3ma.js","/assets/mdx-CsRMuEw9.js","/assets/progress-Dj5cyA_v.js","/assets/misc-DoGPlBur.js","/assets/seo-pBpFCWsy.js","/assets/components-DrvY4pal.js","/assets/index-9OWT3nC-.js","/assets/tooltip-DT9kZxPw.js","/assets/pe-DXT2FOp1.js","/assets/online-D33oijLr.js","/assets/loading-DsHhjqzj.js","/assets/user-C0j04V55.js","/assets/workshop-config-oL_FWDKq.js","/assets/progress-bar-Dln7epYZ.js"],"css":["/assets/epic-video-DUnRvy1A.css"]},"routes/_app+/exercise+/$exerciseNumber_.$stepNumber":{"id":"routes/_app+/exercise+/$exerciseNumber_.$stepNumber","parentId":"routes/_app+/exercise+/_layout","path":":exerciseNumber/:stepNumber","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasErrorBoundary":true,"module":"/assets/_exerciseNumber_._stepNumber-CAxJdIJe.js","imports":["/assets/index-CGzylDPY.js","/assets/misc-DoGPlBur.js","/assets/components-DrvY4pal.js"],"css":[]},"routes/_app+/exercise+/$exerciseNumber_.$stepNumber.$type+/_layout":{"id":"routes/_app+/exercise+/$exerciseNumber_.$stepNumber.$type+/_layout","parentId":"routes/_app+/exercise+/$exerciseNumber_.$stepNumber","path":":type","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasErrorBoundary":true,"module":"/assets/_layout-cu1Of_4G.js","imports":["/assets/index-CGzylDPY.js","/assets/index-egcHQOpF.js","/assets/error-boundary-IvG0vuiP.js","/assets/nav-chevrons-CxWSSbTo.js","/assets/revalidation-ws-Bes2l3ma.js","/assets/mdx-CsRMuEw9.js","/assets/progress-Dj5cyA_v.js","/assets/set-playground-DOFTHWzE.js","/assets/seo-pBpFCWsy.js","/assets/misc-DoGPlBur.js","/assets/epic-video-75U1kyqf.js","/assets/tooltip-DT9kZxPw.js","/assets/index-9OWT3nC-.js","/assets/components-DrvY4pal.js","/assets/index-c1IJ5ZX5.js","/assets/progress-bar-Dln7epYZ.js","/assets/pe-DXT2FOp1.js","/assets/index-t6AA12_S.js","/assets/online-D33oijLr.js","/assets/loading-DsHhjqzj.js","/assets/user-C0j04V55.js","/assets/workshop-config-oL_FWDKq.js"],"css":["/assets/epic-video-DUnRvy1A.css"]},"routes/_app+/exercise+/$exerciseNumber_.$stepNumber.$type+/app":{"id":"routes/_app+/exercise+/$exerciseNumber_.$stepNumber.$type+/app","parentId":"routes/_app+/exercise+/$exerciseNumber_.$stepNumber.$type+/_layout","path":"app","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasErrorBoundary":false,"module":"/assets/app-CWEUg7hY.js","imports":["/assets/index-CGzylDPY.js","/assets/preview-CZwnFQrx.js","/assets/components-DrvY4pal.js","/assets/misc-DoGPlBur.js","/assets/index-9OWT3nC-.js","/assets/tooltip-DT9kZxPw.js","/assets/pe-DXT2FOp1.js","/assets/button-Hft_V1bH.js","/assets/loading-DsHhjqzj.js","/assets/progress-bar-Dln7epYZ.js"],"css":[]},"routes/_app+/exercise+/$exerciseNumber_.$stepNumber.$type+/index":{"id":"routes/_app+/exercise+/$exerciseNumber_.$stepNumber.$type+/index","parentId":"routes/_app+/exercise+/$exerciseNumber_.$stepNumber.$type+/_layout","index":true,"hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasErrorBoundary":true,"module":"/assets/index-DJhl_Q5J.js","imports":["/assets/index-CGzylDPY.js","/assets/tooltip-DT9kZxPw.js","/assets/index-t6AA12_S.js","/assets/misc-DoGPlBur.js","/assets/diff-B_FrL8Cl.js","/assets/error-boundary-IvG0vuiP.js","/assets/loading-DsHhjqzj.js","/assets/discord-C0ZkL9cR.js","/assets/online-D33oijLr.js","/assets/components-DrvY4pal.js","/assets/index-CB8bjE90.js","/assets/set-playground-DOFTHWzE.js","/assets/tests-CDgBzBBo.js","/assets/preview-CZwnFQrx.js","/assets/index-c1IJ5ZX5.js","/assets/accordion-e-d1HozW.js","/assets/mdx-CsRMuEw9.js","/assets/epic-video-75U1kyqf.js","/assets/index-9OWT3nC-.js","/assets/pe-DXT2FOp1.js","/assets/user-C0j04V55.js","/assets/workshop-config-oL_FWDKq.js","/assets/progress-bar-Dln7epYZ.js","/assets/revalidation-ws-Bes2l3ma.js","/assets/use-event-source-AZJtQsFX.js","/assets/button-Hft_V1bH.js"],"css":["/assets/epic-video-DUnRvy1A.css"]},"routes/_app+/exercise+/$exerciseNumber_.$stepNumber.$type+/test":{"id":"routes/_app+/exercise+/$exerciseNumber_.$stepNumber.$type+/test","parentId":"routes/_app+/exercise+/$exerciseNumber_.$stepNumber.$type+/_layout","path":"test","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasErrorBoundary":false,"module":"/assets/test-BwM0E8Mk.js","imports":["/assets/index-CGzylDPY.js","/assets/tests-CDgBzBBo.js","/assets/components-DrvY4pal.js","/assets/epic-video-75U1kyqf.js","/assets/index-9OWT3nC-.js","/assets/misc-DoGPlBur.js","/assets/tooltip-DT9kZxPw.js","/assets/pe-DXT2FOp1.js","/assets/online-D33oijLr.js","/assets/loading-DsHhjqzj.js","/assets/user-C0j04V55.js","/assets/workshop-config-oL_FWDKq.js","/assets/accordion-e-d1HozW.js","/assets/index-t6AA12_S.js","/assets/index-c1IJ5ZX5.js","/assets/use-event-source-AZJtQsFX.js","/assets/set-playground-DOFTHWzE.js","/assets/progress-bar-Dln7epYZ.js"],"css":["/assets/epic-video-DUnRvy1A.css"]},"routes/_app+/exercise+/$exerciseNumber_.$stepNumber.index":{"id":"routes/_app+/exercise+/$exerciseNumber_.$stepNumber.index","parentId":"routes/_app+/exercise+/$exerciseNumber_.$stepNumber","index":true,"hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasErrorBoundary":false,"module":"/assets/_exerciseNumber_._stepNumber.index-l0sNRNKZ.js","imports":[],"css":[]},"routes/_app+/exercise+/$exerciseNumber_.finished":{"id":"routes/_app+/exercise+/$exerciseNumber_.finished","parentId":"routes/_app+/exercise+/_layout","path":":exerciseNumber/finished","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasErrorBoundary":false,"module":"/assets/_exerciseNumber_.finished-DYebDhaK.js","imports":["/assets/index-CGzylDPY.js","/assets/index-egcHQOpF.js","/assets/epic-video-75U1kyqf.js","/assets/misc-DoGPlBur.js","/assets/loading-DsHhjqzj.js","/assets/nav-chevrons-CxWSSbTo.js","/assets/revalidation-ws-Bes2l3ma.js","/assets/mdx-CsRMuEw9.js","/assets/progress-Dj5cyA_v.js","/assets/online-D33oijLr.js","/assets/seo-pBpFCWsy.js","/assets/components-DrvY4pal.js","/assets/index-9OWT3nC-.js","/assets/tooltip-DT9kZxPw.js","/assets/pe-DXT2FOp1.js","/assets/user-C0j04V55.js","/assets/workshop-config-oL_FWDKq.js","/assets/progress-bar-Dln7epYZ.js"],"css":["/assets/epic-video-DUnRvy1A.css"]},"routes/_app+/finished":{"id":"routes/_app+/finished","parentId":"routes/_app+/_layout","path":"finished","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasErrorBoundary":false,"module":"/assets/finished-DDnBGcs8.js","imports":["/assets/index-CGzylDPY.js","/assets/index-egcHQOpF.js","/assets/epic-video-75U1kyqf.js","/assets/misc-DoGPlBur.js","/assets/loading-DsHhjqzj.js","/assets/nav-chevrons-CxWSSbTo.js","/assets/revalidation-ws-Bes2l3ma.js","/assets/mdx-CsRMuEw9.js","/assets/online-D33oijLr.js","/assets/seo-pBpFCWsy.js","/assets/progress-Dj5cyA_v.js","/assets/components-DrvY4pal.js","/assets/index-9OWT3nC-.js","/assets/tooltip-DT9kZxPw.js","/assets/pe-DXT2FOp1.js","/assets/user-C0j04V55.js","/assets/workshop-config-oL_FWDKq.js","/assets/progress-bar-Dln7epYZ.js"],"css":["/assets/epic-video-DUnRvy1A.css"]},"routes/_app+/index":{"id":"routes/_app+/index","parentId":"routes/_app+/_layout","index":true,"hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasErrorBoundary":true,"module":"/assets/index-CQEwwWTS.js","imports":["/assets/index-CGzylDPY.js","/assets/index-egcHQOpF.js","/assets/epic-video-75U1kyqf.js","/assets/error-boundary-IvG0vuiP.js","/assets/mdx-CsRMuEw9.js","/assets/misc-DoGPlBur.js","/assets/progress-Dj5cyA_v.js","/assets/components-DrvY4pal.js","/assets/index-9OWT3nC-.js","/assets/tooltip-DT9kZxPw.js","/assets/pe-DXT2FOp1.js","/assets/online-D33oijLr.js","/assets/loading-DsHhjqzj.js","/assets/user-C0j04V55.js","/assets/workshop-config-oL_FWDKq.js","/assets/progress-bar-Dln7epYZ.js"],"css":["/assets/epic-video-DUnRvy1A.css"]},"routes/_app+/login":{"id":"routes/_app+/login","parentId":"routes/_app+/_layout","path":"login","hasAction":true,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasErrorBoundary":false,"module":"/assets/login-DJlKIofe.js","imports":["/assets/index-CGzylDPY.js","/assets/use-event-source-AZJtQsFX.js","/assets/button-Hft_V1bH.js","/assets/loading-DsHhjqzj.js","/assets/product-CVL4Z9c0.js","/assets/workshop-config-oL_FWDKq.js","/assets/index-9OWT3nC-.js","/assets/components-DrvY4pal.js","/assets/misc-DoGPlBur.js","/assets/tooltip-DT9kZxPw.js","/assets/pe-DXT2FOp1.js"],"css":[]},"routes/_app+/preferences":{"id":"routes/_app+/preferences","parentId":"routes/_app+/_layout","path":"preferences","hasAction":true,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasErrorBoundary":false,"module":"/assets/preferences-BIt5-Lgy.js","imports":["/assets/index-CGzylDPY.js","/assets/button-Hft_V1bH.js","/assets/misc-DoGPlBur.js","/assets/tooltip-DT9kZxPw.js","/assets/components-DrvY4pal.js"],"css":[]},"routes/_app+/support":{"id":"routes/_app+/support","parentId":"routes/_app+/_layout","path":"support","hasAction":false,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasErrorBoundary":false,"module":"/assets/support-lgEG2piy.js","imports":["/assets/index-CGzylDPY.js","/assets/components-DrvY4pal.js"],"css":[]},"routes/admin+/_layout":{"id":"routes/admin+/_layout","parentId":"root","path":"admin","hasAction":false,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasErrorBoundary":false,"module":"/assets/_layout-DV29dlKr.js","imports":["/assets/index-CGzylDPY.js","/assets/components-DrvY4pal.js"],"css":[]},"routes/admin+/apps":{"id":"routes/admin+/apps","parentId":"routes/admin+/_layout","path":"apps","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasErrorBoundary":false,"module":"/assets/apps-l0sNRNKZ.js","imports":[],"css":[]},"routes/admin+/cache":{"id":"routes/admin+/cache","parentId":"routes/admin+/_layout","path":"cache","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasErrorBoundary":false,"module":"/assets/cache-l0sNRNKZ.js","imports":[],"css":[]},"routes/admin+/index":{"id":"routes/admin+/index","parentId":"routes/admin+/_layout","index":true,"hasAction":true,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasErrorBoundary":false,"module":"/assets/index-BzN2y10J.js","imports":["/assets/index-CGzylDPY.js","/assets/misc-DoGPlBur.js","/assets/tooltip-DT9kZxPw.js","/assets/progress-Dj5cyA_v.js","/assets/components-DrvY4pal.js","/assets/pe-DXT2FOp1.js"],"css":[]},"routes/admin+/version":{"id":"routes/admin+/version","parentId":"routes/admin+/_layout","path":"version","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasErrorBoundary":false,"module":"/assets/version-D61Qvt0X.js","imports":["/assets/index-CGzylDPY.js","/assets/workshop-config-oL_FWDKq.js","/assets/components-DrvY4pal.js"],"css":[]},"routes/apps":{"id":"routes/apps","parentId":"root","path":"apps","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasErrorBoundary":false,"module":"/assets/apps-DP2rzg_V.js","imports":[],"css":[]},"routes/diff":{"id":"routes/diff","parentId":"root","path":"diff","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasErrorBoundary":false,"module":"/assets/diff-DmVm_N6W.js","imports":["/assets/index-CGzylDPY.js","/assets/misc-DoGPlBur.js","/assets/diff-B_FrL8Cl.js","/assets/nav-chevrons-CxWSSbTo.js","/assets/components-DrvY4pal.js","/assets/accordion-e-d1HozW.js","/assets/tooltip-DT9kZxPw.js","/assets/index-t6AA12_S.js","/assets/index-c1IJ5ZX5.js","/assets/mdx-CsRMuEw9.js","/assets/epic-video-75U1kyqf.js","/assets/index-9OWT3nC-.js","/assets/pe-DXT2FOp1.js","/assets/online-D33oijLr.js","/assets/loading-DsHhjqzj.js","/assets/user-C0j04V55.js","/assets/workshop-config-oL_FWDKq.js","/assets/progress-bar-Dln7epYZ.js","/assets/revalidation-ws-Bes2l3ma.js"],"css":["/assets/epic-video-DUnRvy1A.css"]},"routes/exercises":{"id":"routes/exercises","parentId":"root","path":"exercises","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasErrorBoundary":false,"module":"/assets/exercises-l0sNRNKZ.js","imports":[],"css":[]},"routes/launch-editor":{"id":"routes/launch-editor","parentId":"root","path":"launch-editor","hasAction":true,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasErrorBoundary":false,"module":"/assets/launch-editor-l0sNRNKZ.js","imports":[],"css":[]},"routes/login-sse":{"id":"routes/login-sse","parentId":"root","path":"login-sse","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasErrorBoundary":false,"module":"/assets/login-sse-l0sNRNKZ.js","imports":[],"css":[]},"routes/og":{"id":"routes/og","parentId":"root","path":"og","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasErrorBoundary":false,"module":"/assets/og-l0sNRNKZ.js","imports":[],"css":[]},"routes/onboarding":{"id":"routes/onboarding","parentId":"root","path":"onboarding","hasAction":true,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasErrorBoundary":false,"module":"/assets/onboarding-DssP5iXB.js","imports":["/assets/index-CGzylDPY.js","/assets/button-Hft_V1bH.js","/assets/epic-video-75U1kyqf.js","/assets/components-DrvY4pal.js","/assets/misc-DoGPlBur.js","/assets/index-9OWT3nC-.js","/assets/tooltip-DT9kZxPw.js","/assets/pe-DXT2FOp1.js","/assets/online-D33oijLr.js","/assets/loading-DsHhjqzj.js","/assets/user-C0j04V55.js","/assets/workshop-config-oL_FWDKq.js"],"css":["/assets/epic-video-DUnRvy1A.css"]},"routes/processes":{"id":"routes/processes","parentId":"root","path":"processes","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasErrorBoundary":false,"module":"/assets/processes-l0sNRNKZ.js","imports":[],"css":[]},"routes/progress":{"id":"routes/progress","parentId":"root","path":"progress","hasAction":true,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasErrorBoundary":false,"module":"/assets/progress-l0sNRNKZ.js","imports":[],"css":[]},"routes/robots[.]txt":{"id":"routes/robots[.]txt","parentId":"root","path":"robots.txt","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasErrorBoundary":false,"module":"/assets/robots_._txt-l0sNRNKZ.js","imports":[],"css":[]},"routes/set-playground":{"id":"routes/set-playground","parentId":"root","path":"set-playground","hasAction":true,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasErrorBoundary":false,"module":"/assets/set-playground-l0sNRNKZ.js","imports":[],"css":[]},"routes/sitemap[.]xml":{"id":"routes/sitemap[.]xml","parentId":"root","path":"sitemap.xml","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasErrorBoundary":false,"module":"/assets/sitemap_._xml-l0sNRNKZ.js","imports":[],"css":[]},"routes/start":{"id":"routes/start","parentId":"root","path":"start","hasAction":true,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasErrorBoundary":false,"module":"/assets/start-l0sNRNKZ.js","imports":[],"css":[]},"routes/test":{"id":"routes/test","parentId":"root","path":"test","hasAction":true,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasErrorBoundary":false,"module":"/assets/test-l0sNRNKZ.js","imports":[],"css":[]},"routes/theme/index":{"id":"routes/theme/index","parentId":"root","path":"theme","hasAction":true,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasErrorBoundary":false,"module":"/assets/index-DP2rzg_V.js","imports":[],"css":[]},"routes/video-player/index":{"id":"routes/video-player/index","parentId":"root","path":"video-player","hasAction":true,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasErrorBoundary":false,"module":"/assets/index-K6Dvbx-E.js","imports":[],"css":[]}},"url":"/assets/manifest-3da21166.js","version":"3da21166"};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var ie=Object.defineProperty;var Ht=n=>{throw TypeError(n)};var se=(n,e,i)=>e in n?ie(n,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):n[e]=i;var v=(n,e,i)=>se(n,typeof e!="symbol"?e+"":e,i),Ft=(n,e,i)=>e.has(n)||Ht("Cannot "+i);var t=(n,e,i)=>(Ft(n,e,"read from private field"),i?i.call(n):e.get(n)),b=(n,e,i)=>e.has(n)?Ht("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(n):e.set(n,i),f=(n,e,i,s)=>(Ft(n,e,"write to private field"),s?s.call(n,i):e.set(n,i),i),c=(n,e,i)=>(Ft(n,e,"access private method"),i);var _t=(n,e,i,s)=>({set _(a){f(n,e,a,i)},get _(){return t(n,e,s)}});import{j as m,r as at}from"./index-CGzylDPY.js";import{c as vt,I as ne,a as re,H as ht,A as oe}from"./misc-BtjCSy-T.js";import{b as ae,L as $t,a as he,r as le,u as ce}from"./components-DrvY4pal.js";import{V as ue,D as fe}from"./epic-video-qHKPWPt1.js";import{s as de}from"./progress-bar-CTPCfvDi.js";import{u as pe}from"./pe-DXT2FOp1.js";import{a as me}from"./index-BOQWfIQC.js";function ge(){const n=ae("root");if(!n)throw new Error("useApps requires a data object from the root loader");return n.apps}function qt(n){const e=he();return at.useEffect(()=>{e.state==="idle"&&e.data!=null&&(n==null||n("fetcher-done"))},[e,n]),e}function be({file:n,appFile:e,appName:i,syncTo:s,line:a,column:r,children:o,onUpdate:u}){var _;const h=qt(u),g=pe(),O=typeof e=="string"?[e]:e,w=n?"file":e?"appFile":"",L=s!=null&&s.file?"file":s!=null&&s.appFile?"appFile":"";return m.jsxs(h.Form,{action:"/launch-editor",method:"POST",className:"flex items-center",children:[g,de,m.jsx("input",{type:"hidden",name:"line",value:a}),m.jsx("input",{type:"hidden",name:"column",value:r}),m.jsx("input",{type:"hidden",name:"type",value:w}),m.jsx("input",{type:"hidden",name:"file",value:n}),m.jsx("input",{type:"hidden",name:"appName",value:i}),O==null?void 0:O.map(j=>m.jsx("input",{type:"hidden",name:"appFile",value:j},j)),s?m.jsxs(m.Fragment,{children:[m.jsx("input",{type:"hidden",name:"syncTo.type",value:L}),m.jsx("input",{type:"hidden",name:"syncTo.file",value:s.file}),m.jsx("input",{type:"hidden",name:"syncTo.appName",value:s.appName}),m.jsx("input",{type:"hidden",name:"syncTo.appFile",value:s.appFile})]}):null,m.jsx("button",{type:"submit",className:vt("launch_button",h.state==="idle"?null:"cursor-progress",((_=h.data)==null?void 0:_.status)==="error"?"cursor-not-allowed":null),children:o})]})}function we({file:n,appFile:e,appName:i,line:s,children:a}){const r=ge(),o=me();if(Array.isArray(e))return m.jsx("div",{children:"Cannot open more than one file"});if(n){const g=O=>O.replace(/\\/g,"/");return m.jsx("a",{className:"launch_button !no-underline",href:g(n).replace(g(ENV.EPICSHOP_CONTEXT_CWD),ENV.EPICSHOP_GITHUB_ROOT)+(s?`#L${s}`:""),rel:"noreferrer",target:"_blank",children:a})}const u=r.find(g=>g.name===i),h=[...(u==null?void 0:u.relativePath.split(o.separator))??[],e+(s?`#L${s}`:"")].join("/");return m.jsx("a",{className:"launch_button !no-underline",href:`${ENV.EPICSHOP_GITHUB_ROOT}/${h}`,rel:"noreferrer",target:"_blank",children:a})}function Ie({appFile:n="README.mdx",appName:e,file:i,relativePath:s}){const a=qt(),r=u=>{if(!u.altKey||ENV.EPICSHOP_DEPLOYED)return;u.preventDefault();const h=new FormData,g=i?"file":"appFile";h.append(g,i??n),h.append("type",g),e&&h.append("appName",e),a.submit(h,{method:"POST",action:"/launch-editor"})},o=ENV.EPICSHOP_GITHUB_ROOT.replace(/\/tree\/|\/blob\//,"/edit/");return m.jsxs($t,{className:"self-center font-mono text-sm",onClick:r,target:"_blank",to:`${o}/${s}/${n}`.replace(/\\/g,"/"),children:[m.jsx("span",{className:"block md:hidden",children:"Edit on GitHub"}),m.jsx("span",{className:"hidden md:block",children:"Edit this page on GitHub"})]})}const Xt=ENV.EPICSHOP_DEPLOYED?we:be,lt=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,Yt=new Set,Tt=typeof process=="object"&&process?process:{},Kt=(n,e,i,s)=>{typeof Tt.emitWarning=="function"?Tt.emitWarning(n,e,i,s):console.error(`[${i}] ${e}: ${n}`)};let xt=globalThis.AbortController,kt=globalThis.AbortSignal;var Ut;if(typeof xt>"u"){kt=class{constructor(){v(this,"onabort");v(this,"_onabort",[]);v(this,"reason");v(this,"aborted",!1)}addEventListener(s,a){this._onabort.push(a)}},xt=class{constructor(){v(this,"signal",new kt);e()}abort(s){var a,r;if(!this.signal.aborted){this.signal.reason=s,this.signal.aborted=!0;for(const o of this.signal._onabort)o(s);(r=(a=this.signal).onabort)==null||r.call(a,s)}}};let n=((Ut=Tt.env)==null?void 0:Ut.LRU_CACHE_IGNORE_AC_WARNING)!=="1";const e=()=>{n&&(n=!1,Kt("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.","NO_ABORT_CONTROLLER","ENOTSUP",e))}}const _e=n=>!Yt.has(n),Q=n=>n&&n===Math.floor(n)&&n>0&&isFinite(n),Zt=n=>Q(n)?n<=Math.pow(2,8)?Uint8Array:n<=Math.pow(2,16)?Uint16Array:n<=Math.pow(2,32)?Uint32Array:n<=Number.MAX_SAFE_INTEGER?yt:null:null;class yt extends Array{constructor(e){super(e),this.fill(0)}}var ct;const nt=class nt{constructor(e,i){v(this,"heap");v(this,"length");if(!t(nt,ct))throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new i(e),this.length=0}static create(e){const i=Zt(e);if(!i)return[];f(nt,ct,!0);const s=new nt(e,i);return f(nt,ct,!1),s}push(e){this.heap[this.length++]=e}pop(){return this.heap[--this.length]}};ct=new WeakMap,b(nt,ct,!1);let Dt=nt;var Vt,Bt,U,M,V,B,ut,ft,F,$,A,E,p,R,I,P,T,q,D,X,Y,G,K,st,N,l,Pt,rt,Z,gt,H,Jt,ot,dt,bt,tt,et,Rt,St,Et,S,Nt,mt,it,Wt;const It=class It{constructor(e){b(this,l);b(this,U);b(this,M);b(this,V);b(this,B);b(this,ut);b(this,ft);v(this,"ttl");v(this,"ttlResolution");v(this,"ttlAutopurge");v(this,"updateAgeOnGet");v(this,"updateAgeOnHas");v(this,"allowStale");v(this,"noDisposeOnSet");v(this,"noUpdateTTL");v(this,"maxEntrySize");v(this,"sizeCalculation");v(this,"noDeleteOnFetchRejection");v(this,"noDeleteOnStaleGet");v(this,"allowStaleOnFetchAbort");v(this,"allowStaleOnFetchRejection");v(this,"ignoreFetchAbort");b(this,F);b(this,$);b(this,A);b(this,E);b(this,p);b(this,R);b(this,I);b(this,P);b(this,T);b(this,q);b(this,D);b(this,X);b(this,Y);b(this,G);b(this,K);b(this,st);b(this,N);b(this,rt,()=>{});b(this,Z,()=>{});b(this,gt,()=>{});b(this,H,()=>!1);b(this,ot,e=>{});b(this,dt,(e,i,s)=>{});b(this,bt,(e,i,s,a)=>{if(s||a)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0});v(this,Vt,"LRUCache");const{max:i=0,ttl:s,ttlResolution:a=1,ttlAutopurge:r,updateAgeOnGet:o,updateAgeOnHas:u,allowStale:h,dispose:g,disposeAfter:O,noDisposeOnSet:w,noUpdateTTL:L,maxSize:_=0,maxEntrySize:j=0,sizeCalculation:x,fetchMethod:C,memoMethod:d,noDeleteOnFetchRejection:y,noDeleteOnStaleGet:W,allowStaleOnFetchRejection:z,allowStaleOnFetchAbort:k,ignoreFetchAbort:pt}=e;if(i!==0&&!Q(i))throw new TypeError("max option must be a nonnegative integer");const J=i?Zt(i):Array;if(!J)throw new Error("invalid max value: "+i);if(f(this,U,i),f(this,M,_),this.maxEntrySize=j||t(this,M),this.sizeCalculation=x,this.sizeCalculation){if(!t(this,M)&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if(typeof this.sizeCalculation!="function")throw new TypeError("sizeCalculation set to non-function")}if(d!==void 0&&typeof d!="function")throw new TypeError("memoMethod must be a function if defined");if(f(this,ft,d),C!==void 0&&typeof C!="function")throw new TypeError("fetchMethod must be a function if specified");if(f(this,ut,C),f(this,st,!!C),f(this,A,new Map),f(this,E,new Array(i).fill(void 0)),f(this,p,new Array(i).fill(void 0)),f(this,R,new J(i)),f(this,I,new J(i)),f(this,P,0),f(this,T,0),f(this,q,Dt.create(i)),f(this,F,0),f(this,$,0),typeof g=="function"&&f(this,V,g),typeof O=="function"?(f(this,B,O),f(this,D,[])):(f(this,B,void 0),f(this,D,void 0)),f(this,K,!!t(this,V)),f(this,N,!!t(this,B)),this.noDisposeOnSet=!!w,this.noUpdateTTL=!!L,this.noDeleteOnFetchRejection=!!y,this.allowStaleOnFetchRejection=!!z,this.allowStaleOnFetchAbort=!!k,this.ignoreFetchAbort=!!pt,this.maxEntrySize!==0){if(t(this,M)!==0&&!Q(t(this,M)))throw new TypeError("maxSize must be a positive integer if specified");if(!Q(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");c(this,l,Jt).call(this)}if(this.allowStale=!!h,this.noDeleteOnStaleGet=!!W,this.updateAgeOnGet=!!o,this.updateAgeOnHas=!!u,this.ttlResolution=Q(a)||a===0?a:1,this.ttlAutopurge=!!r,this.ttl=s||0,this.ttl){if(!Q(this.ttl))throw new TypeError("ttl must be a positive integer if specified");c(this,l,Pt).call(this)}if(t(this,U)===0&&this.ttl===0&&t(this,M)===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!t(this,U)&&!t(this,M)){const wt="LRU_CACHE_UNBOUNDED";_e(wt)&&(Yt.add(wt),Kt("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",wt,It))}}static unsafeExposeInternals(e){return{starts:t(e,Y),ttls:t(e,G),sizes:t(e,X),keyMap:t(e,A),keyList:t(e,E),valList:t(e,p),next:t(e,R),prev:t(e,I),get head(){return t(e,P)},get tail(){return t(e,T)},free:t(e,q),isBackgroundFetch:i=>{var s;return c(s=e,l,S).call(s,i)},backgroundFetch:(i,s,a,r)=>{var o;return c(o=e,l,Et).call(o,i,s,a,r)},moveToTail:i=>{var s;return c(s=e,l,mt).call(s,i)},indexes:i=>{var s;return c(s=e,l,tt).call(s,i)},rindexes:i=>{var s;return c(s=e,l,et).call(s,i)},isStale:i=>{var s;return t(s=e,H).call(s,i)}}}get max(){return t(this,U)}get maxSize(){return t(this,M)}get calculatedSize(){return t(this,$)}get size(){return t(this,F)}get fetchMethod(){return t(this,ut)}get memoMethod(){return t(this,ft)}get dispose(){return t(this,V)}get disposeAfter(){return t(this,B)}getRemainingTTL(e){return t(this,A).has(e)?1/0:0}*entries(){for(const e of c(this,l,tt).call(this))t(this,p)[e]!==void 0&&t(this,E)[e]!==void 0&&!c(this,l,S).call(this,t(this,p)[e])&&(yield[t(this,E)[e],t(this,p)[e]])}*rentries(){for(const e of c(this,l,et).call(this))t(this,p)[e]!==void 0&&t(this,E)[e]!==void 0&&!c(this,l,S).call(this,t(this,p)[e])&&(yield[t(this,E)[e],t(this,p)[e]])}*keys(){for(const e of c(this,l,tt).call(this)){const i=t(this,E)[e];i!==void 0&&!c(this,l,S).call(this,t(this,p)[e])&&(yield i)}}*rkeys(){for(const e of c(this,l,et).call(this)){const i=t(this,E)[e];i!==void 0&&!c(this,l,S).call(this,t(this,p)[e])&&(yield i)}}*values(){for(const e of c(this,l,tt).call(this))t(this,p)[e]!==void 0&&!c(this,l,S).call(this,t(this,p)[e])&&(yield t(this,p)[e])}*rvalues(){for(const e of c(this,l,et).call(this))t(this,p)[e]!==void 0&&!c(this,l,S).call(this,t(this,p)[e])&&(yield t(this,p)[e])}[(Bt=Symbol.iterator,Vt=Symbol.toStringTag,Bt)](){return this.entries()}find(e,i={}){for(const s of c(this,l,tt).call(this)){const a=t(this,p)[s],r=c(this,l,S).call(this,a)?a.__staleWhileFetching:a;if(r!==void 0&&e(r,t(this,E)[s],this))return this.get(t(this,E)[s],i)}}forEach(e,i=this){for(const s of c(this,l,tt).call(this)){const a=t(this,p)[s],r=c(this,l,S).call(this,a)?a.__staleWhileFetching:a;r!==void 0&&e.call(i,r,t(this,E)[s],this)}}rforEach(e,i=this){for(const s of c(this,l,et).call(this)){const a=t(this,p)[s],r=c(this,l,S).call(this,a)?a.__staleWhileFetching:a;r!==void 0&&e.call(i,r,t(this,E)[s],this)}}purgeStale(){let e=!1;for(const i of c(this,l,et).call(this,{allowStale:!0}))t(this,H).call(this,i)&&(c(this,l,it).call(this,t(this,E)[i],"expire"),e=!0);return e}info(e){const i=t(this,A).get(e);if(i===void 0)return;const s=t(this,p)[i],a=c(this,l,S).call(this,s)?s.__staleWhileFetching:s;if(a===void 0)return;const r={value:a};if(t(this,G)&&t(this,Y)){const o=t(this,G)[i],u=t(this,Y)[i];if(o&&u){const h=o-(lt.now()-u);r.ttl=h,r.start=Date.now()}}return t(this,X)&&(r.size=t(this,X)[i]),r}dump(){const e=[];for(const i of c(this,l,tt).call(this,{allowStale:!0})){const s=t(this,E)[i],a=t(this,p)[i],r=c(this,l,S).call(this,a)?a.__staleWhileFetching:a;if(r===void 0||s===void 0)continue;const o={value:r};if(t(this,G)&&t(this,Y)){o.ttl=t(this,G)[i];const u=lt.now()-t(this,Y)[i];o.start=Math.floor(Date.now()-u)}t(this,X)&&(o.size=t(this,X)[i]),e.unshift([s,o])}return e}load(e){this.clear();for(const[i,s]of e){if(s.start){const a=Date.now()-s.start;s.start=lt.now()-a}this.set(i,s.value,s)}}set(e,i,s={}){var L,_,j,x,C;if(i===void 0)return this.delete(e),this;const{ttl:a=this.ttl,start:r,noDisposeOnSet:o=this.noDisposeOnSet,sizeCalculation:u=this.sizeCalculation,status:h}=s;let{noUpdateTTL:g=this.noUpdateTTL}=s;const O=t(this,bt).call(this,e,i,s.size||0,u);if(this.maxEntrySize&&O>this.maxEntrySize)return h&&(h.set="miss",h.maxEntrySizeExceeded=!0),c(this,l,it).call(this,e,"set"),this;let w=t(this,F)===0?void 0:t(this,A).get(e);if(w===void 0)w=t(this,F)===0?t(this,T):t(this,q).length!==0?t(this,q).pop():t(this,F)===t(this,U)?c(this,l,St).call(this,!1):t(this,F),t(this,E)[w]=e,t(this,p)[w]=i,t(this,A).set(e,w),t(this,R)[t(this,T)]=w,t(this,I)[w]=t(this,T),f(this,T,w),_t(this,F)._++,t(this,dt).call(this,w,O,h),h&&(h.set="add"),g=!1;else{c(this,l,mt).call(this,w);const d=t(this,p)[w];if(i!==d){if(t(this,st)&&c(this,l,S).call(this,d)){d.__abortController.abort(new Error("replaced"));const{__staleWhileFetching:y}=d;y!==void 0&&!o&&(t(this,K)&&((L=t(this,V))==null||L.call(this,y,e,"set")),t(this,N)&&((_=t(this,D))==null||_.push([y,e,"set"])))}else o||(t(this,K)&&((j=t(this,V))==null||j.call(this,d,e,"set")),t(this,N)&&((x=t(this,D))==null||x.push([d,e,"set"])));if(t(this,ot).call(this,w),t(this,dt).call(this,w,O,h),t(this,p)[w]=i,h){h.set="replace";const y=d&&c(this,l,S).call(this,d)?d.__staleWhileFetching:d;y!==void 0&&(h.oldValue=y)}}else h&&(h.set="update")}if(a!==0&&!t(this,G)&&c(this,l,Pt).call(this),t(this,G)&&(g||t(this,gt).call(this,w,a,r),h&&t(this,Z).call(this,h,w)),!o&&t(this,N)&&t(this,D)){const d=t(this,D);let y;for(;y=d==null?void 0:d.shift();)(C=t(this,B))==null||C.call(this,...y)}return this}pop(){var e;try{for(;t(this,F);){const i=t(this,p)[t(this,P)];if(c(this,l,St).call(this,!0),c(this,l,S).call(this,i)){if(i.__staleWhileFetching)return i.__staleWhileFetching}else if(i!==void 0)return i}}finally{if(t(this,N)&&t(this,D)){const i=t(this,D);let s;for(;s=i==null?void 0:i.shift();)(e=t(this,B))==null||e.call(this,...s)}}}has(e,i={}){const{updateAgeOnHas:s=this.updateAgeOnHas,status:a}=i,r=t(this,A).get(e);if(r!==void 0){const o=t(this,p)[r];if(c(this,l,S).call(this,o)&&o.__staleWhileFetching===void 0)return!1;if(t(this,H).call(this,r))a&&(a.has="stale",t(this,Z).call(this,a,r));else return s&&t(this,rt).call(this,r),a&&(a.has="hit",t(this,Z).call(this,a,r)),!0}else a&&(a.has="miss");return!1}peek(e,i={}){const{allowStale:s=this.allowStale}=i,a=t(this,A).get(e);if(a===void 0||!s&&t(this,H).call(this,a))return;const r=t(this,p)[a];return c(this,l,S).call(this,r)?r.__staleWhileFetching:r}async fetch(e,i={}){const{allowStale:s=this.allowStale,updateAgeOnGet:a=this.updateAgeOnGet,noDeleteOnStaleGet:r=this.noDeleteOnStaleGet,ttl:o=this.ttl,noDisposeOnSet:u=this.noDisposeOnSet,size:h=0,sizeCalculation:g=this.sizeCalculation,noUpdateTTL:O=this.noUpdateTTL,noDeleteOnFetchRejection:w=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:L=this.allowStaleOnFetchRejection,ignoreFetchAbort:_=this.ignoreFetchAbort,allowStaleOnFetchAbort:j=this.allowStaleOnFetchAbort,context:x,forceRefresh:C=!1,status:d,signal:y}=i;if(!t(this,st))return d&&(d.fetch="get"),this.get(e,{allowStale:s,updateAgeOnGet:a,noDeleteOnStaleGet:r,status:d});const W={allowStale:s,updateAgeOnGet:a,noDeleteOnStaleGet:r,ttl:o,noDisposeOnSet:u,size:h,sizeCalculation:g,noUpdateTTL:O,noDeleteOnFetchRejection:w,allowStaleOnFetchRejection:L,allowStaleOnFetchAbort:j,ignoreFetchAbort:_,status:d,signal:y};let z=t(this,A).get(e);if(z===void 0){d&&(d.fetch="miss");const k=c(this,l,Et).call(this,e,z,W,x);return k.__returned=k}else{const k=t(this,p)[z];if(c(this,l,S).call(this,k)){const Gt=s&&k.__staleWhileFetching!==void 0;return d&&(d.fetch="inflight",Gt&&(d.returnedStale=!0)),Gt?k.__staleWhileFetching:k.__returned=k}const pt=t(this,H).call(this,z);if(!C&&!pt)return d&&(d.fetch="hit"),c(this,l,mt).call(this,z),a&&t(this,rt).call(this,z),d&&t(this,Z).call(this,d,z),k;const J=c(this,l,Et).call(this,e,z,W,x),At=J.__staleWhileFetching!==void 0&&s;return d&&(d.fetch=pt?"stale":"refresh",At&&pt&&(d.returnedStale=!0)),At?J.__staleWhileFetching:J.__returned=J}}async forceFetch(e,i={}){const s=await this.fetch(e,i);if(s===void 0)throw new Error("fetch() returned undefined");return s}memo(e,i={}){const s=t(this,ft);if(!s)throw new Error("no memoMethod provided to constructor");const{context:a,forceRefresh:r,...o}=i,u=this.get(e,o);if(!r&&u!==void 0)return u;const h=s(e,u,{options:o,context:a});return this.set(e,h,o),h}get(e,i={}){const{allowStale:s=this.allowStale,updateAgeOnGet:a=this.updateAgeOnGet,noDeleteOnStaleGet:r=this.noDeleteOnStaleGet,status:o}=i,u=t(this,A).get(e);if(u!==void 0){const h=t(this,p)[u],g=c(this,l,S).call(this,h);return o&&t(this,Z).call(this,o,u),t(this,H).call(this,u)?(o&&(o.get="stale"),g?(o&&s&&h.__staleWhileFetching!==void 0&&(o.returnedStale=!0),s?h.__staleWhileFetching:void 0):(r||c(this,l,it).call(this,e,"expire"),o&&s&&(o.returnedStale=!0),s?h:void 0)):(o&&(o.get="hit"),g?h.__staleWhileFetching:(c(this,l,mt).call(this,u),a&&t(this,rt).call(this,u),h))}else o&&(o.get="miss")}delete(e){return c(this,l,it).call(this,e,"delete")}clear(){return c(this,l,Wt).call(this,"delete")}};U=new WeakMap,M=new WeakMap,V=new WeakMap,B=new WeakMap,ut=new WeakMap,ft=new WeakMap,F=new WeakMap,$=new WeakMap,A=new WeakMap,E=new WeakMap,p=new WeakMap,R=new WeakMap,I=new WeakMap,P=new WeakMap,T=new WeakMap,q=new WeakMap,D=new WeakMap,X=new WeakMap,Y=new WeakMap,G=new WeakMap,K=new WeakMap,st=new WeakMap,N=new WeakMap,l=new WeakSet,Pt=function(){const e=new yt(t(this,U)),i=new yt(t(this,U));f(this,G,e),f(this,Y,i),f(this,gt,(r,o,u=lt.now())=>{if(i[r]=o!==0?u:0,e[r]=o,o!==0&&this.ttlAutopurge){const h=setTimeout(()=>{t(this,H).call(this,r)&&c(this,l,it).call(this,t(this,E)[r],"expire")},o+1);h.unref&&h.unref()}}),f(this,rt,r=>{i[r]=e[r]!==0?lt.now():0}),f(this,Z,(r,o)=>{if(e[o]){const u=e[o],h=i[o];if(!u||!h)return;r.ttl=u,r.start=h,r.now=s||a();const g=r.now-h;r.remainingTTL=u-g}});let s=0;const a=()=>{const r=lt.now();if(this.ttlResolution>0){s=r;const o=setTimeout(()=>s=0,this.ttlResolution);o.unref&&o.unref()}return r};this.getRemainingTTL=r=>{const o=t(this,A).get(r);if(o===void 0)return 0;const u=e[o],h=i[o];if(!u||!h)return 1/0;const g=(s||a())-h;return u-g},f(this,H,r=>{const o=i[r],u=e[r];return!!u&&!!o&&(s||a())-o>u})},rt=new WeakMap,Z=new WeakMap,gt=new WeakMap,H=new WeakMap,Jt=function(){const e=new yt(t(this,U));f(this,$,0),f(this,X,e),f(this,ot,i=>{f(this,$,t(this,$)-e[i]),e[i]=0}),f(this,bt,(i,s,a,r)=>{if(c(this,l,S).call(this,s))return 0;if(!Q(a))if(r){if(typeof r!="function")throw new TypeError("sizeCalculation must be a function");if(a=r(s,i),!Q(a))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}else throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");return a}),f(this,dt,(i,s,a)=>{if(e[i]=s,t(this,M)){const r=t(this,M)-e[i];for(;t(this,$)>r;)c(this,l,St).call(this,!0)}f(this,$,t(this,$)+e[i]),a&&(a.entrySize=s,a.totalCalculatedSize=t(this,$))})},ot=new WeakMap,dt=new WeakMap,bt=new WeakMap,tt=function*({allowStale:e=this.allowStale}={}){if(t(this,F))for(let i=t(this,T);!(!c(this,l,Rt).call(this,i)||((e||!t(this,H).call(this,i))&&(yield i),i===t(this,P)));)i=t(this,I)[i]},et=function*({allowStale:e=this.allowStale}={}){if(t(this,F))for(let i=t(this,P);!(!c(this,l,Rt).call(this,i)||((e||!t(this,H).call(this,i))&&(yield i),i===t(this,T)));)i=t(this,R)[i]},Rt=function(e){return e!==void 0&&t(this,A).get(t(this,E)[e])===e},St=function(e){var r,o;const i=t(this,P),s=t(this,E)[i],a=t(this,p)[i];return t(this,st)&&c(this,l,S).call(this,a)?a.__abortController.abort(new Error("evicted")):(t(this,K)||t(this,N))&&(t(this,K)&&((r=t(this,V))==null||r.call(this,a,s,"evict")),t(this,N)&&((o=t(this,D))==null||o.push([a,s,"evict"]))),t(this,ot).call(this,i),e&&(t(this,E)[i]=void 0,t(this,p)[i]=void 0,t(this,q).push(i)),t(this,F)===1?(f(this,P,f(this,T,0)),t(this,q).length=0):f(this,P,t(this,R)[i]),t(this,A).delete(s),_t(this,F)._--,i},Et=function(e,i,s,a){const r=i===void 0?void 0:t(this,p)[i];if(c(this,l,S).call(this,r))return r;const o=new xt,{signal:u}=s;u==null||u.addEventListener("abort",()=>o.abort(u.reason),{signal:o.signal});const h={signal:o.signal,options:s,context:a},g=(x,C=!1)=>{const{aborted:d}=o.signal,y=s.ignoreFetchAbort&&x!==void 0;if(s.status&&(d&&!C?(s.status.fetchAborted=!0,s.status.fetchError=o.signal.reason,y&&(s.status.fetchAbortIgnored=!0)):s.status.fetchResolved=!0),d&&!y&&!C)return w(o.signal.reason);const W=_;return t(this,p)[i]===_&&(x===void 0?W.__staleWhileFetching?t(this,p)[i]=W.__staleWhileFetching:c(this,l,it).call(this,e,"fetch"):(s.status&&(s.status.fetchUpdated=!0),this.set(e,x,h.options))),x},O=x=>(s.status&&(s.status.fetchRejected=!0,s.status.fetchError=x),w(x)),w=x=>{const{aborted:C}=o.signal,d=C&&s.allowStaleOnFetchAbort,y=d||s.allowStaleOnFetchRejection,W=y||s.noDeleteOnFetchRejection,z=_;if(t(this,p)[i]===_&&(!W||z.__staleWhileFetching===void 0?c(this,l,it).call(this,e,"fetch"):d||(t(this,p)[i]=z.__staleWhileFetching)),y)return s.status&&z.__staleWhileFetching!==void 0&&(s.status.returnedStale=!0),z.__staleWhileFetching;if(z.__returned===z)throw x},L=(x,C)=>{var y;const d=(y=t(this,ut))==null?void 0:y.call(this,e,r,h);d&&d instanceof Promise&&d.then(W=>x(W===void 0?void 0:W),C),o.signal.addEventListener("abort",()=>{(!s.ignoreFetchAbort||s.allowStaleOnFetchAbort)&&(x(void 0),s.allowStaleOnFetchAbort&&(x=W=>g(W,!0)))})};s.status&&(s.status.fetchDispatched=!0);const _=new Promise(L).then(g,O),j=Object.assign(_,{__abortController:o,__staleWhileFetching:r,__returned:void 0});return i===void 0?(this.set(e,j,{...h.options,status:void 0}),i=t(this,A).get(e)):t(this,p)[i]=j,j},S=function(e){if(!t(this,st))return!1;const i=e;return!!i&&i instanceof Promise&&i.hasOwnProperty("__staleWhileFetching")&&i.__abortController instanceof xt},Nt=function(e,i){t(this,I)[i]=e,t(this,R)[e]=i},mt=function(e){e!==t(this,T)&&(e===t(this,P)?f(this,P,t(this,R)[e]):c(this,l,Nt).call(this,t(this,I)[e],t(this,R)[e]),c(this,l,Nt).call(this,t(this,T),e),f(this,T,e))},it=function(e,i){var a,r,o,u;let s=!1;if(t(this,F)!==0){const h=t(this,A).get(e);if(h!==void 0)if(s=!0,t(this,F)===1)c(this,l,Wt).call(this,i);else{t(this,ot).call(this,h);const g=t(this,p)[h];if(c(this,l,S).call(this,g)?g.__abortController.abort(new Error("deleted")):(t(this,K)||t(this,N))&&(t(this,K)&&((a=t(this,V))==null||a.call(this,g,e,i)),t(this,N)&&((r=t(this,D))==null||r.push([g,e,i]))),t(this,A).delete(e),t(this,E)[h]=void 0,t(this,p)[h]=void 0,h===t(this,T))f(this,T,t(this,I)[h]);else if(h===t(this,P))f(this,P,t(this,R)[h]);else{const O=t(this,I)[h];t(this,R)[O]=t(this,R)[h];const w=t(this,R)[h];t(this,I)[w]=t(this,I)[h]}_t(this,F)._--,t(this,q).push(h)}}if(t(this,N)&&((o=t(this,D))!=null&&o.length)){const h=t(this,D);let g;for(;g=h==null?void 0:h.shift();)(u=t(this,B))==null||u.call(this,...g)}return s},Wt=function(e){var i,s,a;for(const r of c(this,l,et).call(this,{allowStale:!0})){const o=t(this,p)[r];if(c(this,l,S).call(this,o))o.__abortController.abort(new Error("deleted"));else{const u=t(this,E)[r];t(this,K)&&((i=t(this,V))==null||i.call(this,o,u,e)),t(this,N)&&((s=t(this,D))==null||s.push([o,u,e]))}}if(t(this,A).clear(),t(this,p).fill(void 0),t(this,E).fill(void 0),t(this,G)&&t(this,Y)&&(t(this,G).fill(0),t(this,Y).fill(0)),t(this,X)&&t(this,X).fill(0),f(this,P,0),f(this,T,0),t(this,q).length=0,f(this,$,0),f(this,F,0),t(this,N)&&t(this,D)){const r=t(this,D);let o;for(;o=r==null?void 0:r.shift();)(a=t(this,B))==null||a.call(this,...o)}};let zt=It;var Ot={};Object.defineProperty(Ot,"__esModule",{value:!0});Ot.getMDXComponent=xe;Ot.getMDXExport=te;var ye=Mt(at),Se=Mt(m),Ee=Mt(le);function Qt(n){if(typeof WeakMap!="function")return null;var e=new WeakMap,i=new WeakMap;return(Qt=function(s){return s?i:e})(n)}function Mt(n,e){if(n&&n.__esModule)return n;if(n===null||typeof n!="object"&&typeof n!="function")return{default:n};var i=Qt(e);if(i&&i.has(n))return i.get(n);var s={__proto__:null},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in n)if(r!=="default"&&{}.hasOwnProperty.call(n,r)){var o=a?Object.getOwnPropertyDescriptor(n,r):null;o&&(o.get||o.set)?Object.defineProperty(s,r,o):s[r]=n[r]}return s.default=n,i&&i.set(n,s),s}function xe(n,e){return te(n,e).default}function te(n,e){const i={React:ye,ReactDOM:Ee,_jsx_runtime:Se,...e};return new Function(...Object.keys(i),n)(...Object.values(i))}var ve=Ot;const jt=n=>n.replace(/\\/g,"/");function ee(n,e,i){const[,s]=n.replace(/\\|\//g,e).split(`${i==="playground"?"example":"exercises"}${e}`);return s}const Lt="border-border bg-[var(--shiki-background)] hover:bg-foreground/20 active:bg-foreground/30 box-content block rounded border-2 px-2 py-0.5 font-mono text-xs font-semibold outline-none transition duration-300 ease-in-out";function Oe({"data-buttons":n,"data-filename":e,"data-fullpath":i,"data-sep":s="/","data-start":a,"data-type":r}){var L;const o=ce();if(r==="other"||!n||!e||!i)return null;const u=jt(((L=o[o.type])==null?void 0:L.fullPath)??""),h=!i.startsWith(u),g=ENV.EPICSHOP_DEPLOYED?["problem","solution"]:["problem","solution","playground"],O=n.split(","),w=g.filter(_=>O.includes(_));return m.jsx(m.Fragment,{children:w.map(_=>{var d;const j=o[_];if(_==="playground"){const y=o.playground&&o.playground.appName!==((d=o.problem)==null?void 0:d.name);if(!j||y||h)return m.jsxs("button",{className:vt(Lt,"cursor-not-allowed"),title:y?"Playground is not set to the right app":h?"This file is from different app":"You must 'Set to Playground' before opening a file",children:[m.jsx("span",{className:"uppercase",children:"Open"})," in ",_]},_)}if(!j||!j.fullPath)return null;const x=[jt(j.fullPath),jt(e)].join(s),C=ee(x,s,_);return m.jsx(Xt,{file:x,line:Number(a??1),children:m.jsxs("span",{title:C,className:Lt,children:[m.jsx("span",{className:"uppercase",children:"Open"})," in ",_]})},_)})})}function Ae(){const[n,e]=at.useState(!1);return at.useEffect(()=>{if(n){const i=setTimeout(()=>e(!1),1500);return()=>clearTimeout(i)}},[n]),m.jsx("button",{className:re(Lt,"w-12 uppercase"),onClick:i=>{var r,o,u;e(!0);const a=((u=(o=(r=i.currentTarget.parentElement)==null?void 0:r.parentElement)==null?void 0:o.querySelector("pre"))==null?void 0:u.textContent)||"";navigator.clipboard.writeText(a)},children:n?"copied":"copy"})}function Fe({children:n,...e}){const{"data-buttons":i,"data-filename":s,"data-fullpath":a,"data-nocopy":r,"data-sep":o}=e,u=r===void 0;function h(){if(a&&o)return!s||s.includes("..")?{"data-filename":ee(a,o)}:{"data-filename":s.replace(/\//g,o)}}return m.jsxs("div",{className:"group relative",children:[m.jsxs("div",{className:"absolute right-0 top-0 z-50 m-2 flex items-baseline justify-end gap-4 opacity-0 transition duration-300 ease-in-out focus-within:opacity-100 group-hover:opacity-100",children:[i?m.jsx(Oe,{...e}):null,u?m.jsx(Ae,{}):null]}),m.jsx("pre",{...e,className:vt("scrollbar-thin scrollbar-thumb-scrollbar",e.className??""),...h(),children:n})]})}const je={h1:n=>m.jsx(ht,{...n,as:"h1"}),h2:n=>m.jsx(ht,{...n,as:"h2"}),h3:n=>m.jsx(ht,{...n,as:"h3"}),h4:n=>m.jsx(ht,{...n,as:"h4"}),h5:n=>m.jsx(ht,{...n,as:"h5"}),h6:n=>m.jsx(ht,{...n,as:"h6"}),a:oe,p:n=>m.jsx("div",{...n}),pre:n=>m.jsx("pre",{...n,className:vt("scrollbar-thin scrollbar-thumb-scrollbar",n.className??"")}),LaunchEditor:Xt,VideoEmbed:ue,EpicVideo:fe};function Ce(n){const e=ve.getMDXComponent(n);function i({components:s,...a}){const r=at.useMemo(()=>({...je,...s}),[s]);return m.jsx(e,{components:r,...a})}return i}const Ct=new zt({max:1e3});function Te(n){return at.useMemo(()=>{if(Ct.has(n))return Ct.get(n);const e=Ce(n);return Ct.set(n,e),e},[n])}function ke({code:n,components:e}){const i=Te(n),s=at.useMemo(()=>({Icon:ne,pre:Fe,Link:$t,...e}),[e]);return m.jsx(i,{components:s})}export{Ie as E,Xt as L,ke as M,ge as u};
|
|
2
|
-
//# sourceMappingURL=mdx-
|
|
1
|
+
var ie=Object.defineProperty;var Ht=n=>{throw TypeError(n)};var se=(n,e,i)=>e in n?ie(n,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):n[e]=i;var v=(n,e,i)=>se(n,typeof e!="symbol"?e+"":e,i),Ft=(n,e,i)=>e.has(n)||Ht("Cannot "+i);var t=(n,e,i)=>(Ft(n,e,"read from private field"),i?i.call(n):e.get(n)),b=(n,e,i)=>e.has(n)?Ht("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(n):e.set(n,i),f=(n,e,i,s)=>(Ft(n,e,"write to private field"),s?s.call(n,i):e.set(n,i),i),c=(n,e,i)=>(Ft(n,e,"access private method"),i);var _t=(n,e,i,s)=>({set _(a){f(n,e,a,i)},get _(){return t(n,e,s)}});import{j as m,r as at}from"./index-CGzylDPY.js";import{c as vt,I as ne,a as re,H as ht,A as oe}from"./misc-DoGPlBur.js";import{b as ae,L as $t,a as he,r as le,u as ce}from"./components-DrvY4pal.js";import{V as ue,D as fe}from"./epic-video-75U1kyqf.js";import{s as de}from"./progress-bar-Dln7epYZ.js";import{u as pe}from"./pe-DXT2FOp1.js";import{a as me}from"./index-9OWT3nC-.js";function ge(){const n=ae("root");if(!n)throw new Error("useApps requires a data object from the root loader");return n.apps}function qt(n){const e=he();return at.useEffect(()=>{e.state==="idle"&&e.data!=null&&(n==null||n("fetcher-done"))},[e,n]),e}function be({file:n,appFile:e,appName:i,syncTo:s,line:a,column:r,children:o,onUpdate:u}){var _;const h=qt(u),g=pe(),O=typeof e=="string"?[e]:e,w=n?"file":e?"appFile":"",L=s!=null&&s.file?"file":s!=null&&s.appFile?"appFile":"";return m.jsxs(h.Form,{action:"/launch-editor",method:"POST",className:"flex items-center",children:[g,de,m.jsx("input",{type:"hidden",name:"line",value:a}),m.jsx("input",{type:"hidden",name:"column",value:r}),m.jsx("input",{type:"hidden",name:"type",value:w}),m.jsx("input",{type:"hidden",name:"file",value:n}),m.jsx("input",{type:"hidden",name:"appName",value:i}),O==null?void 0:O.map(j=>m.jsx("input",{type:"hidden",name:"appFile",value:j},j)),s?m.jsxs(m.Fragment,{children:[m.jsx("input",{type:"hidden",name:"syncTo.type",value:L}),m.jsx("input",{type:"hidden",name:"syncTo.file",value:s.file}),m.jsx("input",{type:"hidden",name:"syncTo.appName",value:s.appName}),m.jsx("input",{type:"hidden",name:"syncTo.appFile",value:s.appFile})]}):null,m.jsx("button",{type:"submit",className:vt("launch_button",h.state==="idle"?null:"cursor-progress",((_=h.data)==null?void 0:_.status)==="error"?"cursor-not-allowed":null),children:o})]})}function we({file:n,appFile:e,appName:i,line:s,children:a}){const r=ge(),o=me();if(Array.isArray(e))return m.jsx("div",{children:"Cannot open more than one file"});if(n){const g=O=>O.replace(/\\/g,"/");return m.jsx("a",{className:"launch_button !no-underline",href:g(n).replace(g(ENV.EPICSHOP_CONTEXT_CWD),ENV.EPICSHOP_GITHUB_ROOT)+(s?`#L${s}`:""),rel:"noreferrer",target:"_blank",children:a})}const u=r.find(g=>g.name===i),h=[...(u==null?void 0:u.relativePath.split(o.separator))??[],e+(s?`#L${s}`:"")].join("/");return m.jsx("a",{className:"launch_button !no-underline",href:`${ENV.EPICSHOP_GITHUB_ROOT}/${h}`,rel:"noreferrer",target:"_blank",children:a})}function Ie({appFile:n="README.mdx",appName:e,file:i,relativePath:s}){const a=qt(),r=u=>{if(!u.altKey||ENV.EPICSHOP_DEPLOYED)return;u.preventDefault();const h=new FormData,g=i?"file":"appFile";h.append(g,i??n),h.append("type",g),e&&h.append("appName",e),a.submit(h,{method:"POST",action:"/launch-editor"})},o=ENV.EPICSHOP_GITHUB_ROOT.replace(/\/tree\/|\/blob\//,"/edit/");return m.jsxs($t,{className:"self-center font-mono text-sm",onClick:r,target:"_blank",to:`${o}/${s}/${n}`.replace(/\\/g,"/"),children:[m.jsx("span",{className:"block md:hidden",children:"Edit on GitHub"}),m.jsx("span",{className:"hidden md:block",children:"Edit this page on GitHub"})]})}const Xt=ENV.EPICSHOP_DEPLOYED?we:be,lt=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,Yt=new Set,Tt=typeof process=="object"&&process?process:{},Kt=(n,e,i,s)=>{typeof Tt.emitWarning=="function"?Tt.emitWarning(n,e,i,s):console.error(`[${i}] ${e}: ${n}`)};let xt=globalThis.AbortController,kt=globalThis.AbortSignal;var Ut;if(typeof xt>"u"){kt=class{constructor(){v(this,"onabort");v(this,"_onabort",[]);v(this,"reason");v(this,"aborted",!1)}addEventListener(s,a){this._onabort.push(a)}},xt=class{constructor(){v(this,"signal",new kt);e()}abort(s){var a,r;if(!this.signal.aborted){this.signal.reason=s,this.signal.aborted=!0;for(const o of this.signal._onabort)o(s);(r=(a=this.signal).onabort)==null||r.call(a,s)}}};let n=((Ut=Tt.env)==null?void 0:Ut.LRU_CACHE_IGNORE_AC_WARNING)!=="1";const e=()=>{n&&(n=!1,Kt("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.","NO_ABORT_CONTROLLER","ENOTSUP",e))}}const _e=n=>!Yt.has(n),Q=n=>n&&n===Math.floor(n)&&n>0&&isFinite(n),Zt=n=>Q(n)?n<=Math.pow(2,8)?Uint8Array:n<=Math.pow(2,16)?Uint16Array:n<=Math.pow(2,32)?Uint32Array:n<=Number.MAX_SAFE_INTEGER?yt:null:null;class yt extends Array{constructor(e){super(e),this.fill(0)}}var ct;const nt=class nt{constructor(e,i){v(this,"heap");v(this,"length");if(!t(nt,ct))throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new i(e),this.length=0}static create(e){const i=Zt(e);if(!i)return[];f(nt,ct,!0);const s=new nt(e,i);return f(nt,ct,!1),s}push(e){this.heap[this.length++]=e}pop(){return this.heap[--this.length]}};ct=new WeakMap,b(nt,ct,!1);let Dt=nt;var Vt,Bt,U,M,V,B,ut,ft,F,$,A,E,p,R,I,P,T,q,D,X,Y,G,K,st,N,l,Pt,rt,Z,gt,H,Jt,ot,dt,bt,tt,et,Rt,St,Et,S,Nt,mt,it,Wt;const It=class It{constructor(e){b(this,l);b(this,U);b(this,M);b(this,V);b(this,B);b(this,ut);b(this,ft);v(this,"ttl");v(this,"ttlResolution");v(this,"ttlAutopurge");v(this,"updateAgeOnGet");v(this,"updateAgeOnHas");v(this,"allowStale");v(this,"noDisposeOnSet");v(this,"noUpdateTTL");v(this,"maxEntrySize");v(this,"sizeCalculation");v(this,"noDeleteOnFetchRejection");v(this,"noDeleteOnStaleGet");v(this,"allowStaleOnFetchAbort");v(this,"allowStaleOnFetchRejection");v(this,"ignoreFetchAbort");b(this,F);b(this,$);b(this,A);b(this,E);b(this,p);b(this,R);b(this,I);b(this,P);b(this,T);b(this,q);b(this,D);b(this,X);b(this,Y);b(this,G);b(this,K);b(this,st);b(this,N);b(this,rt,()=>{});b(this,Z,()=>{});b(this,gt,()=>{});b(this,H,()=>!1);b(this,ot,e=>{});b(this,dt,(e,i,s)=>{});b(this,bt,(e,i,s,a)=>{if(s||a)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0});v(this,Vt,"LRUCache");const{max:i=0,ttl:s,ttlResolution:a=1,ttlAutopurge:r,updateAgeOnGet:o,updateAgeOnHas:u,allowStale:h,dispose:g,disposeAfter:O,noDisposeOnSet:w,noUpdateTTL:L,maxSize:_=0,maxEntrySize:j=0,sizeCalculation:x,fetchMethod:C,memoMethod:d,noDeleteOnFetchRejection:y,noDeleteOnStaleGet:W,allowStaleOnFetchRejection:z,allowStaleOnFetchAbort:k,ignoreFetchAbort:pt}=e;if(i!==0&&!Q(i))throw new TypeError("max option must be a nonnegative integer");const J=i?Zt(i):Array;if(!J)throw new Error("invalid max value: "+i);if(f(this,U,i),f(this,M,_),this.maxEntrySize=j||t(this,M),this.sizeCalculation=x,this.sizeCalculation){if(!t(this,M)&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if(typeof this.sizeCalculation!="function")throw new TypeError("sizeCalculation set to non-function")}if(d!==void 0&&typeof d!="function")throw new TypeError("memoMethod must be a function if defined");if(f(this,ft,d),C!==void 0&&typeof C!="function")throw new TypeError("fetchMethod must be a function if specified");if(f(this,ut,C),f(this,st,!!C),f(this,A,new Map),f(this,E,new Array(i).fill(void 0)),f(this,p,new Array(i).fill(void 0)),f(this,R,new J(i)),f(this,I,new J(i)),f(this,P,0),f(this,T,0),f(this,q,Dt.create(i)),f(this,F,0),f(this,$,0),typeof g=="function"&&f(this,V,g),typeof O=="function"?(f(this,B,O),f(this,D,[])):(f(this,B,void 0),f(this,D,void 0)),f(this,K,!!t(this,V)),f(this,N,!!t(this,B)),this.noDisposeOnSet=!!w,this.noUpdateTTL=!!L,this.noDeleteOnFetchRejection=!!y,this.allowStaleOnFetchRejection=!!z,this.allowStaleOnFetchAbort=!!k,this.ignoreFetchAbort=!!pt,this.maxEntrySize!==0){if(t(this,M)!==0&&!Q(t(this,M)))throw new TypeError("maxSize must be a positive integer if specified");if(!Q(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");c(this,l,Jt).call(this)}if(this.allowStale=!!h,this.noDeleteOnStaleGet=!!W,this.updateAgeOnGet=!!o,this.updateAgeOnHas=!!u,this.ttlResolution=Q(a)||a===0?a:1,this.ttlAutopurge=!!r,this.ttl=s||0,this.ttl){if(!Q(this.ttl))throw new TypeError("ttl must be a positive integer if specified");c(this,l,Pt).call(this)}if(t(this,U)===0&&this.ttl===0&&t(this,M)===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!t(this,U)&&!t(this,M)){const wt="LRU_CACHE_UNBOUNDED";_e(wt)&&(Yt.add(wt),Kt("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",wt,It))}}static unsafeExposeInternals(e){return{starts:t(e,Y),ttls:t(e,G),sizes:t(e,X),keyMap:t(e,A),keyList:t(e,E),valList:t(e,p),next:t(e,R),prev:t(e,I),get head(){return t(e,P)},get tail(){return t(e,T)},free:t(e,q),isBackgroundFetch:i=>{var s;return c(s=e,l,S).call(s,i)},backgroundFetch:(i,s,a,r)=>{var o;return c(o=e,l,Et).call(o,i,s,a,r)},moveToTail:i=>{var s;return c(s=e,l,mt).call(s,i)},indexes:i=>{var s;return c(s=e,l,tt).call(s,i)},rindexes:i=>{var s;return c(s=e,l,et).call(s,i)},isStale:i=>{var s;return t(s=e,H).call(s,i)}}}get max(){return t(this,U)}get maxSize(){return t(this,M)}get calculatedSize(){return t(this,$)}get size(){return t(this,F)}get fetchMethod(){return t(this,ut)}get memoMethod(){return t(this,ft)}get dispose(){return t(this,V)}get disposeAfter(){return t(this,B)}getRemainingTTL(e){return t(this,A).has(e)?1/0:0}*entries(){for(const e of c(this,l,tt).call(this))t(this,p)[e]!==void 0&&t(this,E)[e]!==void 0&&!c(this,l,S).call(this,t(this,p)[e])&&(yield[t(this,E)[e],t(this,p)[e]])}*rentries(){for(const e of c(this,l,et).call(this))t(this,p)[e]!==void 0&&t(this,E)[e]!==void 0&&!c(this,l,S).call(this,t(this,p)[e])&&(yield[t(this,E)[e],t(this,p)[e]])}*keys(){for(const e of c(this,l,tt).call(this)){const i=t(this,E)[e];i!==void 0&&!c(this,l,S).call(this,t(this,p)[e])&&(yield i)}}*rkeys(){for(const e of c(this,l,et).call(this)){const i=t(this,E)[e];i!==void 0&&!c(this,l,S).call(this,t(this,p)[e])&&(yield i)}}*values(){for(const e of c(this,l,tt).call(this))t(this,p)[e]!==void 0&&!c(this,l,S).call(this,t(this,p)[e])&&(yield t(this,p)[e])}*rvalues(){for(const e of c(this,l,et).call(this))t(this,p)[e]!==void 0&&!c(this,l,S).call(this,t(this,p)[e])&&(yield t(this,p)[e])}[(Bt=Symbol.iterator,Vt=Symbol.toStringTag,Bt)](){return this.entries()}find(e,i={}){for(const s of c(this,l,tt).call(this)){const a=t(this,p)[s],r=c(this,l,S).call(this,a)?a.__staleWhileFetching:a;if(r!==void 0&&e(r,t(this,E)[s],this))return this.get(t(this,E)[s],i)}}forEach(e,i=this){for(const s of c(this,l,tt).call(this)){const a=t(this,p)[s],r=c(this,l,S).call(this,a)?a.__staleWhileFetching:a;r!==void 0&&e.call(i,r,t(this,E)[s],this)}}rforEach(e,i=this){for(const s of c(this,l,et).call(this)){const a=t(this,p)[s],r=c(this,l,S).call(this,a)?a.__staleWhileFetching:a;r!==void 0&&e.call(i,r,t(this,E)[s],this)}}purgeStale(){let e=!1;for(const i of c(this,l,et).call(this,{allowStale:!0}))t(this,H).call(this,i)&&(c(this,l,it).call(this,t(this,E)[i],"expire"),e=!0);return e}info(e){const i=t(this,A).get(e);if(i===void 0)return;const s=t(this,p)[i],a=c(this,l,S).call(this,s)?s.__staleWhileFetching:s;if(a===void 0)return;const r={value:a};if(t(this,G)&&t(this,Y)){const o=t(this,G)[i],u=t(this,Y)[i];if(o&&u){const h=o-(lt.now()-u);r.ttl=h,r.start=Date.now()}}return t(this,X)&&(r.size=t(this,X)[i]),r}dump(){const e=[];for(const i of c(this,l,tt).call(this,{allowStale:!0})){const s=t(this,E)[i],a=t(this,p)[i],r=c(this,l,S).call(this,a)?a.__staleWhileFetching:a;if(r===void 0||s===void 0)continue;const o={value:r};if(t(this,G)&&t(this,Y)){o.ttl=t(this,G)[i];const u=lt.now()-t(this,Y)[i];o.start=Math.floor(Date.now()-u)}t(this,X)&&(o.size=t(this,X)[i]),e.unshift([s,o])}return e}load(e){this.clear();for(const[i,s]of e){if(s.start){const a=Date.now()-s.start;s.start=lt.now()-a}this.set(i,s.value,s)}}set(e,i,s={}){var L,_,j,x,C;if(i===void 0)return this.delete(e),this;const{ttl:a=this.ttl,start:r,noDisposeOnSet:o=this.noDisposeOnSet,sizeCalculation:u=this.sizeCalculation,status:h}=s;let{noUpdateTTL:g=this.noUpdateTTL}=s;const O=t(this,bt).call(this,e,i,s.size||0,u);if(this.maxEntrySize&&O>this.maxEntrySize)return h&&(h.set="miss",h.maxEntrySizeExceeded=!0),c(this,l,it).call(this,e,"set"),this;let w=t(this,F)===0?void 0:t(this,A).get(e);if(w===void 0)w=t(this,F)===0?t(this,T):t(this,q).length!==0?t(this,q).pop():t(this,F)===t(this,U)?c(this,l,St).call(this,!1):t(this,F),t(this,E)[w]=e,t(this,p)[w]=i,t(this,A).set(e,w),t(this,R)[t(this,T)]=w,t(this,I)[w]=t(this,T),f(this,T,w),_t(this,F)._++,t(this,dt).call(this,w,O,h),h&&(h.set="add"),g=!1;else{c(this,l,mt).call(this,w);const d=t(this,p)[w];if(i!==d){if(t(this,st)&&c(this,l,S).call(this,d)){d.__abortController.abort(new Error("replaced"));const{__staleWhileFetching:y}=d;y!==void 0&&!o&&(t(this,K)&&((L=t(this,V))==null||L.call(this,y,e,"set")),t(this,N)&&((_=t(this,D))==null||_.push([y,e,"set"])))}else o||(t(this,K)&&((j=t(this,V))==null||j.call(this,d,e,"set")),t(this,N)&&((x=t(this,D))==null||x.push([d,e,"set"])));if(t(this,ot).call(this,w),t(this,dt).call(this,w,O,h),t(this,p)[w]=i,h){h.set="replace";const y=d&&c(this,l,S).call(this,d)?d.__staleWhileFetching:d;y!==void 0&&(h.oldValue=y)}}else h&&(h.set="update")}if(a!==0&&!t(this,G)&&c(this,l,Pt).call(this),t(this,G)&&(g||t(this,gt).call(this,w,a,r),h&&t(this,Z).call(this,h,w)),!o&&t(this,N)&&t(this,D)){const d=t(this,D);let y;for(;y=d==null?void 0:d.shift();)(C=t(this,B))==null||C.call(this,...y)}return this}pop(){var e;try{for(;t(this,F);){const i=t(this,p)[t(this,P)];if(c(this,l,St).call(this,!0),c(this,l,S).call(this,i)){if(i.__staleWhileFetching)return i.__staleWhileFetching}else if(i!==void 0)return i}}finally{if(t(this,N)&&t(this,D)){const i=t(this,D);let s;for(;s=i==null?void 0:i.shift();)(e=t(this,B))==null||e.call(this,...s)}}}has(e,i={}){const{updateAgeOnHas:s=this.updateAgeOnHas,status:a}=i,r=t(this,A).get(e);if(r!==void 0){const o=t(this,p)[r];if(c(this,l,S).call(this,o)&&o.__staleWhileFetching===void 0)return!1;if(t(this,H).call(this,r))a&&(a.has="stale",t(this,Z).call(this,a,r));else return s&&t(this,rt).call(this,r),a&&(a.has="hit",t(this,Z).call(this,a,r)),!0}else a&&(a.has="miss");return!1}peek(e,i={}){const{allowStale:s=this.allowStale}=i,a=t(this,A).get(e);if(a===void 0||!s&&t(this,H).call(this,a))return;const r=t(this,p)[a];return c(this,l,S).call(this,r)?r.__staleWhileFetching:r}async fetch(e,i={}){const{allowStale:s=this.allowStale,updateAgeOnGet:a=this.updateAgeOnGet,noDeleteOnStaleGet:r=this.noDeleteOnStaleGet,ttl:o=this.ttl,noDisposeOnSet:u=this.noDisposeOnSet,size:h=0,sizeCalculation:g=this.sizeCalculation,noUpdateTTL:O=this.noUpdateTTL,noDeleteOnFetchRejection:w=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:L=this.allowStaleOnFetchRejection,ignoreFetchAbort:_=this.ignoreFetchAbort,allowStaleOnFetchAbort:j=this.allowStaleOnFetchAbort,context:x,forceRefresh:C=!1,status:d,signal:y}=i;if(!t(this,st))return d&&(d.fetch="get"),this.get(e,{allowStale:s,updateAgeOnGet:a,noDeleteOnStaleGet:r,status:d});const W={allowStale:s,updateAgeOnGet:a,noDeleteOnStaleGet:r,ttl:o,noDisposeOnSet:u,size:h,sizeCalculation:g,noUpdateTTL:O,noDeleteOnFetchRejection:w,allowStaleOnFetchRejection:L,allowStaleOnFetchAbort:j,ignoreFetchAbort:_,status:d,signal:y};let z=t(this,A).get(e);if(z===void 0){d&&(d.fetch="miss");const k=c(this,l,Et).call(this,e,z,W,x);return k.__returned=k}else{const k=t(this,p)[z];if(c(this,l,S).call(this,k)){const Gt=s&&k.__staleWhileFetching!==void 0;return d&&(d.fetch="inflight",Gt&&(d.returnedStale=!0)),Gt?k.__staleWhileFetching:k.__returned=k}const pt=t(this,H).call(this,z);if(!C&&!pt)return d&&(d.fetch="hit"),c(this,l,mt).call(this,z),a&&t(this,rt).call(this,z),d&&t(this,Z).call(this,d,z),k;const J=c(this,l,Et).call(this,e,z,W,x),At=J.__staleWhileFetching!==void 0&&s;return d&&(d.fetch=pt?"stale":"refresh",At&&pt&&(d.returnedStale=!0)),At?J.__staleWhileFetching:J.__returned=J}}async forceFetch(e,i={}){const s=await this.fetch(e,i);if(s===void 0)throw new Error("fetch() returned undefined");return s}memo(e,i={}){const s=t(this,ft);if(!s)throw new Error("no memoMethod provided to constructor");const{context:a,forceRefresh:r,...o}=i,u=this.get(e,o);if(!r&&u!==void 0)return u;const h=s(e,u,{options:o,context:a});return this.set(e,h,o),h}get(e,i={}){const{allowStale:s=this.allowStale,updateAgeOnGet:a=this.updateAgeOnGet,noDeleteOnStaleGet:r=this.noDeleteOnStaleGet,status:o}=i,u=t(this,A).get(e);if(u!==void 0){const h=t(this,p)[u],g=c(this,l,S).call(this,h);return o&&t(this,Z).call(this,o,u),t(this,H).call(this,u)?(o&&(o.get="stale"),g?(o&&s&&h.__staleWhileFetching!==void 0&&(o.returnedStale=!0),s?h.__staleWhileFetching:void 0):(r||c(this,l,it).call(this,e,"expire"),o&&s&&(o.returnedStale=!0),s?h:void 0)):(o&&(o.get="hit"),g?h.__staleWhileFetching:(c(this,l,mt).call(this,u),a&&t(this,rt).call(this,u),h))}else o&&(o.get="miss")}delete(e){return c(this,l,it).call(this,e,"delete")}clear(){return c(this,l,Wt).call(this,"delete")}};U=new WeakMap,M=new WeakMap,V=new WeakMap,B=new WeakMap,ut=new WeakMap,ft=new WeakMap,F=new WeakMap,$=new WeakMap,A=new WeakMap,E=new WeakMap,p=new WeakMap,R=new WeakMap,I=new WeakMap,P=new WeakMap,T=new WeakMap,q=new WeakMap,D=new WeakMap,X=new WeakMap,Y=new WeakMap,G=new WeakMap,K=new WeakMap,st=new WeakMap,N=new WeakMap,l=new WeakSet,Pt=function(){const e=new yt(t(this,U)),i=new yt(t(this,U));f(this,G,e),f(this,Y,i),f(this,gt,(r,o,u=lt.now())=>{if(i[r]=o!==0?u:0,e[r]=o,o!==0&&this.ttlAutopurge){const h=setTimeout(()=>{t(this,H).call(this,r)&&c(this,l,it).call(this,t(this,E)[r],"expire")},o+1);h.unref&&h.unref()}}),f(this,rt,r=>{i[r]=e[r]!==0?lt.now():0}),f(this,Z,(r,o)=>{if(e[o]){const u=e[o],h=i[o];if(!u||!h)return;r.ttl=u,r.start=h,r.now=s||a();const g=r.now-h;r.remainingTTL=u-g}});let s=0;const a=()=>{const r=lt.now();if(this.ttlResolution>0){s=r;const o=setTimeout(()=>s=0,this.ttlResolution);o.unref&&o.unref()}return r};this.getRemainingTTL=r=>{const o=t(this,A).get(r);if(o===void 0)return 0;const u=e[o],h=i[o];if(!u||!h)return 1/0;const g=(s||a())-h;return u-g},f(this,H,r=>{const o=i[r],u=e[r];return!!u&&!!o&&(s||a())-o>u})},rt=new WeakMap,Z=new WeakMap,gt=new WeakMap,H=new WeakMap,Jt=function(){const e=new yt(t(this,U));f(this,$,0),f(this,X,e),f(this,ot,i=>{f(this,$,t(this,$)-e[i]),e[i]=0}),f(this,bt,(i,s,a,r)=>{if(c(this,l,S).call(this,s))return 0;if(!Q(a))if(r){if(typeof r!="function")throw new TypeError("sizeCalculation must be a function");if(a=r(s,i),!Q(a))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}else throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");return a}),f(this,dt,(i,s,a)=>{if(e[i]=s,t(this,M)){const r=t(this,M)-e[i];for(;t(this,$)>r;)c(this,l,St).call(this,!0)}f(this,$,t(this,$)+e[i]),a&&(a.entrySize=s,a.totalCalculatedSize=t(this,$))})},ot=new WeakMap,dt=new WeakMap,bt=new WeakMap,tt=function*({allowStale:e=this.allowStale}={}){if(t(this,F))for(let i=t(this,T);!(!c(this,l,Rt).call(this,i)||((e||!t(this,H).call(this,i))&&(yield i),i===t(this,P)));)i=t(this,I)[i]},et=function*({allowStale:e=this.allowStale}={}){if(t(this,F))for(let i=t(this,P);!(!c(this,l,Rt).call(this,i)||((e||!t(this,H).call(this,i))&&(yield i),i===t(this,T)));)i=t(this,R)[i]},Rt=function(e){return e!==void 0&&t(this,A).get(t(this,E)[e])===e},St=function(e){var r,o;const i=t(this,P),s=t(this,E)[i],a=t(this,p)[i];return t(this,st)&&c(this,l,S).call(this,a)?a.__abortController.abort(new Error("evicted")):(t(this,K)||t(this,N))&&(t(this,K)&&((r=t(this,V))==null||r.call(this,a,s,"evict")),t(this,N)&&((o=t(this,D))==null||o.push([a,s,"evict"]))),t(this,ot).call(this,i),e&&(t(this,E)[i]=void 0,t(this,p)[i]=void 0,t(this,q).push(i)),t(this,F)===1?(f(this,P,f(this,T,0)),t(this,q).length=0):f(this,P,t(this,R)[i]),t(this,A).delete(s),_t(this,F)._--,i},Et=function(e,i,s,a){const r=i===void 0?void 0:t(this,p)[i];if(c(this,l,S).call(this,r))return r;const o=new xt,{signal:u}=s;u==null||u.addEventListener("abort",()=>o.abort(u.reason),{signal:o.signal});const h={signal:o.signal,options:s,context:a},g=(x,C=!1)=>{const{aborted:d}=o.signal,y=s.ignoreFetchAbort&&x!==void 0;if(s.status&&(d&&!C?(s.status.fetchAborted=!0,s.status.fetchError=o.signal.reason,y&&(s.status.fetchAbortIgnored=!0)):s.status.fetchResolved=!0),d&&!y&&!C)return w(o.signal.reason);const W=_;return t(this,p)[i]===_&&(x===void 0?W.__staleWhileFetching?t(this,p)[i]=W.__staleWhileFetching:c(this,l,it).call(this,e,"fetch"):(s.status&&(s.status.fetchUpdated=!0),this.set(e,x,h.options))),x},O=x=>(s.status&&(s.status.fetchRejected=!0,s.status.fetchError=x),w(x)),w=x=>{const{aborted:C}=o.signal,d=C&&s.allowStaleOnFetchAbort,y=d||s.allowStaleOnFetchRejection,W=y||s.noDeleteOnFetchRejection,z=_;if(t(this,p)[i]===_&&(!W||z.__staleWhileFetching===void 0?c(this,l,it).call(this,e,"fetch"):d||(t(this,p)[i]=z.__staleWhileFetching)),y)return s.status&&z.__staleWhileFetching!==void 0&&(s.status.returnedStale=!0),z.__staleWhileFetching;if(z.__returned===z)throw x},L=(x,C)=>{var y;const d=(y=t(this,ut))==null?void 0:y.call(this,e,r,h);d&&d instanceof Promise&&d.then(W=>x(W===void 0?void 0:W),C),o.signal.addEventListener("abort",()=>{(!s.ignoreFetchAbort||s.allowStaleOnFetchAbort)&&(x(void 0),s.allowStaleOnFetchAbort&&(x=W=>g(W,!0)))})};s.status&&(s.status.fetchDispatched=!0);const _=new Promise(L).then(g,O),j=Object.assign(_,{__abortController:o,__staleWhileFetching:r,__returned:void 0});return i===void 0?(this.set(e,j,{...h.options,status:void 0}),i=t(this,A).get(e)):t(this,p)[i]=j,j},S=function(e){if(!t(this,st))return!1;const i=e;return!!i&&i instanceof Promise&&i.hasOwnProperty("__staleWhileFetching")&&i.__abortController instanceof xt},Nt=function(e,i){t(this,I)[i]=e,t(this,R)[e]=i},mt=function(e){e!==t(this,T)&&(e===t(this,P)?f(this,P,t(this,R)[e]):c(this,l,Nt).call(this,t(this,I)[e],t(this,R)[e]),c(this,l,Nt).call(this,t(this,T),e),f(this,T,e))},it=function(e,i){var a,r,o,u;let s=!1;if(t(this,F)!==0){const h=t(this,A).get(e);if(h!==void 0)if(s=!0,t(this,F)===1)c(this,l,Wt).call(this,i);else{t(this,ot).call(this,h);const g=t(this,p)[h];if(c(this,l,S).call(this,g)?g.__abortController.abort(new Error("deleted")):(t(this,K)||t(this,N))&&(t(this,K)&&((a=t(this,V))==null||a.call(this,g,e,i)),t(this,N)&&((r=t(this,D))==null||r.push([g,e,i]))),t(this,A).delete(e),t(this,E)[h]=void 0,t(this,p)[h]=void 0,h===t(this,T))f(this,T,t(this,I)[h]);else if(h===t(this,P))f(this,P,t(this,R)[h]);else{const O=t(this,I)[h];t(this,R)[O]=t(this,R)[h];const w=t(this,R)[h];t(this,I)[w]=t(this,I)[h]}_t(this,F)._--,t(this,q).push(h)}}if(t(this,N)&&((o=t(this,D))!=null&&o.length)){const h=t(this,D);let g;for(;g=h==null?void 0:h.shift();)(u=t(this,B))==null||u.call(this,...g)}return s},Wt=function(e){var i,s,a;for(const r of c(this,l,et).call(this,{allowStale:!0})){const o=t(this,p)[r];if(c(this,l,S).call(this,o))o.__abortController.abort(new Error("deleted"));else{const u=t(this,E)[r];t(this,K)&&((i=t(this,V))==null||i.call(this,o,u,e)),t(this,N)&&((s=t(this,D))==null||s.push([o,u,e]))}}if(t(this,A).clear(),t(this,p).fill(void 0),t(this,E).fill(void 0),t(this,G)&&t(this,Y)&&(t(this,G).fill(0),t(this,Y).fill(0)),t(this,X)&&t(this,X).fill(0),f(this,P,0),f(this,T,0),t(this,q).length=0,f(this,$,0),f(this,F,0),t(this,N)&&t(this,D)){const r=t(this,D);let o;for(;o=r==null?void 0:r.shift();)(a=t(this,B))==null||a.call(this,...o)}};let zt=It;var Ot={};Object.defineProperty(Ot,"__esModule",{value:!0});Ot.getMDXComponent=xe;Ot.getMDXExport=te;var ye=Mt(at),Se=Mt(m),Ee=Mt(le);function Qt(n){if(typeof WeakMap!="function")return null;var e=new WeakMap,i=new WeakMap;return(Qt=function(s){return s?i:e})(n)}function Mt(n,e){if(n&&n.__esModule)return n;if(n===null||typeof n!="object"&&typeof n!="function")return{default:n};var i=Qt(e);if(i&&i.has(n))return i.get(n);var s={__proto__:null},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in n)if(r!=="default"&&{}.hasOwnProperty.call(n,r)){var o=a?Object.getOwnPropertyDescriptor(n,r):null;o&&(o.get||o.set)?Object.defineProperty(s,r,o):s[r]=n[r]}return s.default=n,i&&i.set(n,s),s}function xe(n,e){return te(n,e).default}function te(n,e){const i={React:ye,ReactDOM:Ee,_jsx_runtime:Se,...e};return new Function(...Object.keys(i),n)(...Object.values(i))}var ve=Ot;const jt=n=>n.replace(/\\/g,"/");function ee(n,e,i){const[,s]=n.replace(/\\|\//g,e).split(`${i==="playground"?"example":"exercises"}${e}`);return s}const Lt="border-border bg-[var(--shiki-background)] hover:bg-foreground/20 active:bg-foreground/30 box-content block rounded border-2 px-2 py-0.5 font-mono text-xs font-semibold outline-none transition duration-300 ease-in-out";function Oe({"data-buttons":n,"data-filename":e,"data-fullpath":i,"data-sep":s="/","data-start":a,"data-type":r}){var L;const o=ce();if(r==="other"||!n||!e||!i)return null;const u=jt(((L=o[o.type])==null?void 0:L.fullPath)??""),h=!i.startsWith(u),g=ENV.EPICSHOP_DEPLOYED?["problem","solution"]:["problem","solution","playground"],O=n.split(","),w=g.filter(_=>O.includes(_));return m.jsx(m.Fragment,{children:w.map(_=>{var d;const j=o[_];if(_==="playground"){const y=o.playground&&o.playground.appName!==((d=o.problem)==null?void 0:d.name);if(!j||y||h)return m.jsxs("button",{className:vt(Lt,"cursor-not-allowed"),title:y?"Playground is not set to the right app":h?"This file is from different app":"You must 'Set to Playground' before opening a file",children:[m.jsx("span",{className:"uppercase",children:"Open"})," in ",_]},_)}if(!j||!j.fullPath)return null;const x=[jt(j.fullPath),jt(e)].join(s),C=ee(x,s,_);return m.jsx(Xt,{file:x,line:Number(a??1),children:m.jsxs("span",{title:C,className:Lt,children:[m.jsx("span",{className:"uppercase",children:"Open"})," in ",_]})},_)})})}function Ae(){const[n,e]=at.useState(!1);return at.useEffect(()=>{if(n){const i=setTimeout(()=>e(!1),1500);return()=>clearTimeout(i)}},[n]),m.jsx("button",{className:re(Lt,"w-12 uppercase"),onClick:i=>{var r,o,u;e(!0);const a=((u=(o=(r=i.currentTarget.parentElement)==null?void 0:r.parentElement)==null?void 0:o.querySelector("pre"))==null?void 0:u.textContent)||"";navigator.clipboard.writeText(a)},children:n?"copied":"copy"})}function Fe({children:n,...e}){const{"data-buttons":i,"data-filename":s,"data-fullpath":a,"data-nocopy":r,"data-sep":o}=e,u=r===void 0;function h(){if(a&&o)return!s||s.includes("..")?{"data-filename":ee(a,o)}:{"data-filename":s.replace(/\//g,o)}}return m.jsxs("div",{className:"group relative",children:[m.jsxs("div",{className:"absolute right-0 top-0 z-50 m-2 flex items-baseline justify-end gap-4 opacity-0 transition duration-300 ease-in-out focus-within:opacity-100 group-hover:opacity-100",children:[i?m.jsx(Oe,{...e}):null,u?m.jsx(Ae,{}):null]}),m.jsx("pre",{...e,className:vt("scrollbar-thin scrollbar-thumb-scrollbar",e.className??""),...h(),children:n})]})}const je={h1:n=>m.jsx(ht,{...n,as:"h1"}),h2:n=>m.jsx(ht,{...n,as:"h2"}),h3:n=>m.jsx(ht,{...n,as:"h3"}),h4:n=>m.jsx(ht,{...n,as:"h4"}),h5:n=>m.jsx(ht,{...n,as:"h5"}),h6:n=>m.jsx(ht,{...n,as:"h6"}),a:oe,p:n=>m.jsx("div",{...n}),pre:n=>m.jsx("pre",{...n,className:vt("scrollbar-thin scrollbar-thumb-scrollbar",n.className??"")}),LaunchEditor:Xt,VideoEmbed:ue,EpicVideo:fe};function Ce(n){const e=ve.getMDXComponent(n);function i({components:s,...a}){const r=at.useMemo(()=>({...je,...s}),[s]);return m.jsx(e,{components:r,...a})}return i}const Ct=new zt({max:1e3});function Te(n){return at.useMemo(()=>{if(Ct.has(n))return Ct.get(n);const e=Ce(n);return Ct.set(n,e),e},[n])}function ke({code:n,components:e}){const i=Te(n),s=at.useMemo(()=>({Icon:ne,pre:Fe,Link:$t,...e}),[e]);return m.jsx(i,{components:s})}export{Ie as E,Xt as L,ke as M,ge as u};
|
|
2
|
+
//# sourceMappingURL=mdx-CsRMuEw9.js.map
|