Rocky_Mountain_Vending/.pnpm-store/v10/files/cb/916ed4905c42a4f3b593325b0f4e9cec48f78e85051f4d45bcc3ec67f4a26b85879e675ce38e54febc182b48eec5a9cc6bd7e4d1c1925d7811c377c34ff166
DMleadgen 46d973904b
Initial commit: Rocky Mountain Vending website
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>
2026-02-12 16:22:15 -07:00

1 line
No EOL
5.8 KiB
Text

{"version":3,"sources":["../../../../src/client/components/router-reducer/create-initial-router-state.ts"],"sourcesContent":["import type {\n CacheNode,\n FlightDataPath,\n} from '../../../shared/lib/app-router-types'\n\nimport { createHrefFromUrl } from './create-href-from-url'\nimport { fillLazyItemsTillLeafWithHead } from './fill-lazy-items-till-leaf-with-head'\nimport { extractPathFromFlightRouterState } from './compute-changed-path'\n\nimport type { AppRouterState } from './router-reducer-types'\nimport { addRefreshMarkerToActiveParallelSegments } from './refetch-inactive-parallel-segments'\nimport { getFlightDataPartsFromPath } from '../../flight-data-helpers'\n\nexport interface InitialRouterStateParameters {\n navigatedAt: number\n initialCanonicalUrlParts: string[]\n initialRenderedSearch: string\n initialParallelRoutes: CacheNode['parallelRoutes']\n initialFlightData: FlightDataPath[]\n location: Location | null\n}\n\nexport function createInitialRouterState({\n navigatedAt,\n initialFlightData,\n initialCanonicalUrlParts,\n initialRenderedSearch,\n initialParallelRoutes,\n location,\n}: InitialRouterStateParameters): AppRouterState {\n // When initialized on the server, the canonical URL is provided as an array of parts.\n // This is to ensure that when the RSC payload streamed to the client, crawlers don't interpret it\n // as a URL that should be crawled.\n const initialCanonicalUrl = initialCanonicalUrlParts.join('/')\n\n const normalizedFlightData = getFlightDataPartsFromPath(initialFlightData[0])\n const {\n tree: initialTree,\n seedData: initialSeedData,\n head: initialHead,\n } = normalizedFlightData\n // For the SSR render, seed data should always be available (we only send back a `null` response\n // in the case of a `loading` segment, pre-PPR.)\n const rsc = initialSeedData?.[0]\n const loading = initialSeedData?.[2] ?? null\n\n const cache: CacheNode = {\n lazyData: null,\n rsc,\n prefetchRsc: null,\n head: null,\n prefetchHead: null,\n // The cache gets seeded during the first render. `initialParallelRoutes` ensures the cache from the first render is there during the second render.\n parallelRoutes: initialParallelRoutes,\n loading,\n navigatedAt,\n }\n\n const canonicalUrl =\n // location.href is read as the initial value for canonicalUrl in the browser\n // This is safe to do as canonicalUrl can't be rendered, it's only used to control the history updates in the useEffect further down in this file.\n location\n ? // window.location does not have the same type as URL but has all the fields createHrefFromUrl needs.\n createHrefFromUrl(location)\n : initialCanonicalUrl\n\n addRefreshMarkerToActiveParallelSegments(initialTree, canonicalUrl)\n\n // When the cache hasn't been seeded yet we fill the cache with the head.\n if (initialParallelRoutes === null || initialParallelRoutes.size === 0) {\n fillLazyItemsTillLeafWithHead(\n navigatedAt,\n cache,\n undefined,\n initialTree,\n initialSeedData,\n initialHead\n )\n }\n\n const initialState = {\n tree: initialTree,\n cache,\n pushRef: {\n pendingPush: false,\n mpaNavigation: false,\n // First render needs to preserve the previous window.history.state\n // to avoid it being overwritten on navigation back/forward with MPA Navigation.\n preserveCustomHistoryState: true,\n },\n focusAndScrollRef: {\n apply: false,\n onlyHashChange: false,\n hashFragment: null,\n segmentPaths: [],\n },\n canonicalUrl,\n renderedSearch: initialRenderedSearch,\n nextUrl:\n // the || operator is intentional, the pathname can be an empty string\n (extractPathFromFlightRouterState(initialTree) || location?.pathname) ??\n null,\n previousNextUrl: null,\n debugInfo: null,\n }\n\n return initialState\n}\n"],"names":["createHrefFromUrl","fillLazyItemsTillLeafWithHead","extractPathFromFlightRouterState","addRefreshMarkerToActiveParallelSegments","getFlightDataPartsFromPath","createInitialRouterState","navigatedAt","initialFlightData","initialCanonicalUrlParts","initialRenderedSearch","initialParallelRoutes","location","initialCanonicalUrl","join","normalizedFlightData","tree","initialTree","seedData","initialSeedData","head","initialHead","rsc","loading","cache","lazyData","prefetchRsc","prefetchHead","parallelRoutes","canonicalUrl","size","undefined","initialState","pushRef","pendingPush","mpaNavigation","preserveCustomHistoryState","focusAndScrollRef","apply","onlyHashChange","hashFragment","segmentPaths","renderedSearch","nextUrl","pathname","previousNextUrl","debugInfo"],"mappings":"AAKA,SAASA,iBAAiB,QAAQ,yBAAwB;AAC1D,SAASC,6BAA6B,QAAQ,wCAAuC;AACrF,SAASC,gCAAgC,QAAQ,yBAAwB;AAGzE,SAASC,wCAAwC,QAAQ,uCAAsC;AAC/F,SAASC,0BAA0B,QAAQ,4BAA2B;AAWtE,OAAO,SAASC,yBAAyB,EACvCC,WAAW,EACXC,iBAAiB,EACjBC,wBAAwB,EACxBC,qBAAqB,EACrBC,qBAAqB,EACrBC,QAAQ,EACqB;IAC7B,sFAAsF;IACtF,kGAAkG;IAClG,mCAAmC;IACnC,MAAMC,sBAAsBJ,yBAAyBK,IAAI,CAAC;IAE1D,MAAMC,uBAAuBV,2BAA2BG,iBAAiB,CAAC,EAAE;IAC5E,MAAM,EACJQ,MAAMC,WAAW,EACjBC,UAAUC,eAAe,EACzBC,MAAMC,WAAW,EAClB,GAAGN;IACJ,gGAAgG;IAChG,gDAAgD;IAChD,MAAMO,MAAMH,iBAAiB,CAAC,EAAE;IAChC,MAAMI,UAAUJ,iBAAiB,CAAC,EAAE,IAAI;IAExC,MAAMK,QAAmB;QACvBC,UAAU;QACVH;QACAI,aAAa;QACbN,MAAM;QACNO,cAAc;QACd,oJAAoJ;QACpJC,gBAAgBjB;QAChBY;QACAhB;IACF;IAEA,MAAMsB,eACJ,6EAA6E;IAC7E,kJAAkJ;IAClJjB,WAEIX,kBAAkBW,YAClBC;IAENT,yCAAyCa,aAAaY;IAEtD,yEAAyE;IACzE,IAAIlB,0BAA0B,QAAQA,sBAAsBmB,IAAI,KAAK,GAAG;QACtE5B,8BACEK,aACAiB,OACAO,WACAd,aACAE,iBACAE;IAEJ;IAEA,MAAMW,eAAe;QACnBhB,MAAMC;QACNO;QACAS,SAAS;YACPC,aAAa;YACbC,eAAe;YACf,mEAAmE;YACnE,gFAAgF;YAChFC,4BAA4B;QAC9B;QACAC,mBAAmB;YACjBC,OAAO;YACPC,gBAAgB;YAChBC,cAAc;YACdC,cAAc,EAAE;QAClB;QACAZ;QACAa,gBAAgBhC;QAChBiC,SAEE,AADA,sEAAsE;QACrExC,CAAAA,iCAAiCc,gBAAgBL,UAAUgC,QAAO,KACnE;QACFC,iBAAiB;QACjBC,WAAW;IACb;IAEA,OAAOd;AACT","ignoreList":[0]}