Next.js website for Rocky Mountain Vending company featuring: - Product catalog with Stripe integration - Service areas and parts pages - Admin dashboard with Clerk authentication - SEO optimized pages with JSON-LD structured data Co-authored-by: Cursor <cursoragent@cursor.com>
1 line
No EOL
4.8 KiB
Text
1 line
No EOL
4.8 KiB
Text
{"version":3,"sources":["../../../src/client/dev/hot-middleware-client.ts"],"sourcesContent":["import { HMR_MESSAGE_SENT_TO_BROWSER } from '../../server/dev/hot-reloader-types'\nimport type {\n NextRouter,\n PrivateRouteInfo,\n} from '../../shared/lib/router/router'\nimport connect from './hot-reloader/pages/hot-reloader-pages'\nimport { sendMessage } from './hot-reloader/pages/websocket'\n\n// Define a local type for the window.next object\ninterface NextWindow {\n next?: {\n router?: NextRouter & {\n components: { [pathname: string]: PrivateRouteInfo }\n }\n }\n __nextDevClientId?: string\n location: Location\n}\n\ndeclare const window: NextWindow\n\nlet reloading = false\n\nexport default () => {\n const devClient = connect()\n\n devClient.subscribeToHmrEvent((message) => {\n if (reloading) return\n\n // Retrieve the router if it's available\n const router = window.next?.router\n\n // Determine if we're on an error page or the router is not initialized\n const isOnErrorPage =\n !router || router.pathname === '/404' || router.pathname === '/_error'\n\n switch (message.type) {\n case HMR_MESSAGE_SENT_TO_BROWSER.RELOAD_PAGE: {\n sendMessage(\n JSON.stringify({\n event: 'client-reload-page',\n clientId: window.__nextDevClientId,\n })\n )\n reloading = true\n return window.location.reload()\n }\n case HMR_MESSAGE_SENT_TO_BROWSER.REMOVED_PAGE: {\n const [page] = message.data\n\n // Check if the removed page is the current page\n const isCurrentPage = page === router?.pathname\n\n // We enter here if the removed page is currently being viewed\n // or if we happen to be on an error page.\n if (isCurrentPage || isOnErrorPage) {\n sendMessage(\n JSON.stringify({\n event: 'client-removed-page',\n clientId: window.__nextDevClientId,\n page,\n })\n )\n return window.location.reload()\n }\n return\n }\n case HMR_MESSAGE_SENT_TO_BROWSER.ADDED_PAGE: {\n const [page] = message.data\n\n // Check if the added page is the current page\n const isCurrentPage = page === router?.pathname\n\n // Check if the page component is not yet loaded\n const isPageNotLoaded =\n page !== null && typeof router?.components?.[page] === 'undefined'\n\n // We enter this block if the newly added page is the one currently being viewed\n // but hasn't been loaded yet, or if we're on an error page.\n if ((isCurrentPage && isPageNotLoaded) || isOnErrorPage) {\n sendMessage(\n JSON.stringify({\n event: 'client-added-page',\n clientId: window.__nextDevClientId,\n page,\n })\n )\n return window.location.reload()\n }\n return\n }\n case HMR_MESSAGE_SENT_TO_BROWSER.DEV_PAGES_MANIFEST_UPDATE: {\n return\n }\n default: {\n message satisfies never\n }\n }\n })\n\n return devClient\n}\n"],"names":["HMR_MESSAGE_SENT_TO_BROWSER","connect","sendMessage","reloading","devClient","subscribeToHmrEvent","message","router","window","next","isOnErrorPage","pathname","type","RELOAD_PAGE","JSON","stringify","event","clientId","__nextDevClientId","location","reload","REMOVED_PAGE","page","data","isCurrentPage","ADDED_PAGE","isPageNotLoaded","components","DEV_PAGES_MANIFEST_UPDATE"],"mappings":"AAAA,SAASA,2BAA2B,QAAQ,sCAAqC;AAKjF,OAAOC,aAAa,0CAAyC;AAC7D,SAASC,WAAW,QAAQ,iCAAgC;AAe5D,IAAIC,YAAY;AAEhB,eAAe,CAAA;IACb,MAAMC,YAAYH;IAElBG,UAAUC,mBAAmB,CAAC,CAACC;QAC7B,IAAIH,WAAW;QAEf,wCAAwC;QACxC,MAAMI,SAASC,OAAOC,IAAI,EAAEF;QAE5B,uEAAuE;QACvE,MAAMG,gBACJ,CAACH,UAAUA,OAAOI,QAAQ,KAAK,UAAUJ,OAAOI,QAAQ,KAAK;QAE/D,OAAQL,QAAQM,IAAI;YAClB,KAAKZ,4BAA4Ba,WAAW;gBAAE;oBAC5CX,YACEY,KAAKC,SAAS,CAAC;wBACbC,OAAO;wBACPC,UAAUT,OAAOU,iBAAiB;oBACpC;oBAEFf,YAAY;oBACZ,OAAOK,OAAOW,QAAQ,CAACC,MAAM;gBAC/B;YACA,KAAKpB,4BAA4BqB,YAAY;gBAAE;oBAC7C,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