feat(blog): add file-based blog with dynamic slugs, MDX content and layout shell
- Introduced blog routing using Next.js App Router - Implemented dynamic [slug] pages for blog posts - Added MDX-based content loading via lib/posts - Integrated shared TopBar layout with navigation - Established clear content, lib and component separation
This commit is contained in:
62
apps/public-web/node_modules/next/dist/esm/client/components/app-router-announcer.js
generated
vendored
Normal file
62
apps/public-web/node_modules/next/dist/esm/client/components/app-router-announcer.js
generated
vendored
Normal file
@@ -0,0 +1,62 @@
|
||||
import { useEffect, useRef, useState } from 'react';
|
||||
import { createPortal } from 'react-dom';
|
||||
const ANNOUNCER_TYPE = 'next-route-announcer';
|
||||
const ANNOUNCER_ID = '__next-route-announcer__';
|
||||
function getAnnouncerNode() {
|
||||
const existingAnnouncer = document.getElementsByName(ANNOUNCER_TYPE)[0];
|
||||
if (existingAnnouncer?.shadowRoot?.childNodes[0]) {
|
||||
return existingAnnouncer.shadowRoot.childNodes[0];
|
||||
} else {
|
||||
const container = document.createElement(ANNOUNCER_TYPE);
|
||||
container.style.cssText = 'position:absolute';
|
||||
const announcer = document.createElement('div');
|
||||
announcer.ariaLive = 'assertive';
|
||||
announcer.id = ANNOUNCER_ID;
|
||||
announcer.role = 'alert';
|
||||
announcer.style.cssText = 'position:absolute;border:0;height:1px;margin:-1px;padding:0;width:1px;clip:rect(0 0 0 0);overflow:hidden;white-space:nowrap;word-wrap:normal';
|
||||
// Use shadow DOM here to avoid any potential CSS bleed
|
||||
const shadow = container.attachShadow({
|
||||
mode: 'open'
|
||||
});
|
||||
shadow.appendChild(announcer);
|
||||
document.body.appendChild(container);
|
||||
return announcer;
|
||||
}
|
||||
}
|
||||
export function AppRouterAnnouncer({ tree }) {
|
||||
const [portalNode, setPortalNode] = useState(null);
|
||||
useEffect(()=>{
|
||||
const announcer = getAnnouncerNode();
|
||||
setPortalNode(announcer);
|
||||
return ()=>{
|
||||
const container = document.getElementsByTagName(ANNOUNCER_TYPE)[0];
|
||||
if (container?.isConnected) {
|
||||
document.body.removeChild(container);
|
||||
}
|
||||
};
|
||||
}, []);
|
||||
const [routeAnnouncement, setRouteAnnouncement] = useState('');
|
||||
const previousTitle = useRef(undefined);
|
||||
useEffect(()=>{
|
||||
let currentTitle = '';
|
||||
if (document.title) {
|
||||
currentTitle = document.title;
|
||||
} else {
|
||||
const pageHeader = document.querySelector('h1');
|
||||
if (pageHeader) {
|
||||
currentTitle = pageHeader.innerText || pageHeader.textContent || '';
|
||||
}
|
||||
}
|
||||
// Only announce the title change, but not for the first load because screen
|
||||
// readers do that automatically.
|
||||
if (previousTitle.current !== undefined && previousTitle.current !== currentTitle) {
|
||||
setRouteAnnouncement(currentTitle);
|
||||
}
|
||||
previousTitle.current = currentTitle;
|
||||
}, [
|
||||
tree
|
||||
]);
|
||||
return portalNode ? /*#__PURE__*/ createPortal(routeAnnouncement, portalNode) : null;
|
||||
}
|
||||
|
||||
//# sourceMappingURL=app-router-announcer.js.map
|
||||
1
apps/public-web/node_modules/next/dist/esm/client/components/app-router-announcer.js.map
generated
vendored
Normal file
1
apps/public-web/node_modules/next/dist/esm/client/components/app-router-announcer.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../../src/client/components/app-router-announcer.tsx"],"sourcesContent":["import { useEffect, useRef, useState } from 'react'\nimport { createPortal } from 'react-dom'\nimport type { FlightRouterState } from '../../shared/lib/app-router-types'\n\nconst ANNOUNCER_TYPE = 'next-route-announcer'\nconst ANNOUNCER_ID = '__next-route-announcer__'\n\nfunction getAnnouncerNode() {\n const existingAnnouncer = document.getElementsByName(ANNOUNCER_TYPE)[0]\n if (existingAnnouncer?.shadowRoot?.childNodes[0]) {\n return existingAnnouncer.shadowRoot.childNodes[0] as HTMLElement\n } else {\n const container = document.createElement(ANNOUNCER_TYPE)\n container.style.cssText = 'position:absolute'\n const announcer = document.createElement('div')\n announcer.ariaLive = 'assertive'\n announcer.id = ANNOUNCER_ID\n announcer.role = 'alert'\n announcer.style.cssText =\n 'position:absolute;border:0;height:1px;margin:-1px;padding:0;width:1px;clip:rect(0 0 0 0);overflow:hidden;white-space:nowrap;word-wrap:normal'\n\n // Use shadow DOM here to avoid any potential CSS bleed\n const shadow = container.attachShadow({ mode: 'open' })\n shadow.appendChild(announcer)\n document.body.appendChild(container)\n return announcer\n }\n}\n\nexport function AppRouterAnnouncer({ tree }: { tree: FlightRouterState }) {\n const [portalNode, setPortalNode] = useState<HTMLElement | null>(null)\n\n useEffect(() => {\n const announcer = getAnnouncerNode()\n setPortalNode(announcer)\n return () => {\n const container = document.getElementsByTagName(ANNOUNCER_TYPE)[0]\n if (container?.isConnected) {\n document.body.removeChild(container)\n }\n }\n }, [])\n\n const [routeAnnouncement, setRouteAnnouncement] = useState('')\n const previousTitle = useRef<string | undefined>(undefined)\n\n useEffect(() => {\n let currentTitle = ''\n if (document.title) {\n currentTitle = document.title\n } else {\n const pageHeader = document.querySelector('h1')\n if (pageHeader) {\n currentTitle = pageHeader.innerText || pageHeader.textContent || ''\n }\n }\n\n // Only announce the title change, but not for the first load because screen\n // readers do that automatically.\n if (\n previousTitle.current !== undefined &&\n previousTitle.current !== currentTitle\n ) {\n setRouteAnnouncement(currentTitle)\n }\n previousTitle.current = currentTitle\n }, [tree])\n\n return portalNode ? createPortal(routeAnnouncement, portalNode) : null\n}\n"],"names":["useEffect","useRef","useState","createPortal","ANNOUNCER_TYPE","ANNOUNCER_ID","getAnnouncerNode","existingAnnouncer","document","getElementsByName","shadowRoot","childNodes","container","createElement","style","cssText","announcer","ariaLive","id","role","shadow","attachShadow","mode","appendChild","body","AppRouterAnnouncer","tree","portalNode","setPortalNode","getElementsByTagName","isConnected","removeChild","routeAnnouncement","setRouteAnnouncement","previousTitle","undefined","currentTitle","title","pageHeader","querySelector","innerText","textContent","current"],"mappings":"AAAA,SAASA,SAAS,EAAEC,MAAM,EAAEC,QAAQ,QAAQ,QAAO;AACnD,SAASC,YAAY,QAAQ,YAAW;AAGxC,MAAMC,iBAAiB;AACvB,MAAMC,eAAe;AAErB,SAASC;IACP,MAAMC,oBAAoBC,SAASC,iBAAiB,CAACL,eAAe,CAAC,EAAE;IACvE,IAAIG,mBAAmBG,YAAYC,UAAU,CAAC,EAAE,EAAE;QAChD,OAAOJ,kBAAkBG,UAAU,CAACC,UAAU,CAAC,EAAE;IACnD,OAAO;QACL,MAAMC,YAAYJ,SAASK,aAAa,CAACT;QACzCQ,UAAUE,KAAK,CAACC,OAAO,GAAG;QAC1B,MAAMC,YAAYR,SAASK,aAAa,CAAC;QACzCG,UAAUC,QAAQ,GAAG;QACrBD,UAAUE,EAAE,GAAGb;QACfW,UAAUG,IAAI,GAAG;QACjBH,UAAUF,KAAK,CAACC,OAAO,GACrB;QAEF,uDAAuD;QACvD,MAAMK,SAASR,UAAUS,YAAY,CAAC;YAAEC,MAAM;QAAO;QACrDF,OAAOG,WAAW,CAACP;QACnBR,SAASgB,IAAI,CAACD,WAAW,CAACX;QAC1B,OAAOI;IACT;AACF;AAEA,OAAO,SAASS,mBAAmB,EAAEC,IAAI,EAA+B;IACtE,MAAM,CAACC,YAAYC,cAAc,GAAG1B,SAA6B;IAEjEF,UAAU;QACR,MAAMgB,YAAYV;QAClBsB,cAAcZ;QACd,OAAO;YACL,MAAMJ,YAAYJ,SAASqB,oBAAoB,CAACzB,eAAe,CAAC,EAAE;YAClE,IAAIQ,WAAWkB,aAAa;gBAC1BtB,SAASgB,IAAI,CAACO,WAAW,CAACnB;YAC5B;QACF;IACF,GAAG,EAAE;IAEL,MAAM,CAACoB,mBAAmBC,qBAAqB,GAAG/B,SAAS;IAC3D,MAAMgC,gBAAgBjC,OAA2BkC;IAEjDnC,UAAU;QACR,IAAIoC,eAAe;QACnB,IAAI5B,SAAS6B,KAAK,EAAE;YAClBD,eAAe5B,SAAS6B,KAAK;QAC/B,OAAO;YACL,MAAMC,aAAa9B,SAAS+B,aAAa,CAAC;YAC1C,IAAID,YAAY;gBACdF,eAAeE,WAAWE,SAAS,IAAIF,WAAWG,WAAW,IAAI;YACnE;QACF;QAEA,4EAA4E;QAC5E,iCAAiC;QACjC,IACEP,cAAcQ,OAAO,KAAKP,aAC1BD,cAAcQ,OAAO,KAAKN,cAC1B;YACAH,qBAAqBG;QACvB;QACAF,cAAcQ,OAAO,GAAGN;IAC1B,GAAG;QAACV;KAAK;IAET,OAAOC,2BAAaxB,aAAa6B,mBAAmBL,cAAc;AACpE","ignoreList":[0]}
|
||||
36
apps/public-web/node_modules/next/dist/esm/client/components/app-router-headers.js
generated
vendored
Normal file
36
apps/public-web/node_modules/next/dist/esm/client/components/app-router-headers.js
generated
vendored
Normal file
@@ -0,0 +1,36 @@
|
||||
export const RSC_HEADER = 'rsc';
|
||||
export const ACTION_HEADER = 'next-action';
|
||||
// TODO: Instead of sending the full router state, we only need to send the
|
||||
// segment path. Saves bytes. Then we could also use this field for segment
|
||||
// prefetches, which also need to specify a particular segment.
|
||||
export const NEXT_ROUTER_STATE_TREE_HEADER = 'next-router-state-tree';
|
||||
export const NEXT_ROUTER_PREFETCH_HEADER = 'next-router-prefetch';
|
||||
// This contains the path to the segment being prefetched.
|
||||
// TODO: If we change next-router-state-tree to be a segment path, we can use
|
||||
// that instead. Then next-router-prefetch and next-router-segment-prefetch can
|
||||
// be merged into a single enum.
|
||||
export const NEXT_ROUTER_SEGMENT_PREFETCH_HEADER = 'next-router-segment-prefetch';
|
||||
export const NEXT_HMR_REFRESH_HEADER = 'next-hmr-refresh';
|
||||
export const NEXT_HMR_REFRESH_HASH_COOKIE = '__next_hmr_refresh_hash__';
|
||||
export const NEXT_URL = 'next-url';
|
||||
export const RSC_CONTENT_TYPE_HEADER = 'text/x-component';
|
||||
export const FLIGHT_HEADERS = [
|
||||
RSC_HEADER,
|
||||
NEXT_ROUTER_STATE_TREE_HEADER,
|
||||
NEXT_ROUTER_PREFETCH_HEADER,
|
||||
NEXT_HMR_REFRESH_HEADER,
|
||||
NEXT_ROUTER_SEGMENT_PREFETCH_HEADER
|
||||
];
|
||||
export const NEXT_RSC_UNION_QUERY = '_rsc';
|
||||
export const NEXT_ROUTER_STALE_TIME_HEADER = 'x-nextjs-stale-time';
|
||||
export const NEXT_DID_POSTPONE_HEADER = 'x-nextjs-postponed';
|
||||
export const NEXT_REWRITTEN_PATH_HEADER = 'x-nextjs-rewritten-path';
|
||||
export const NEXT_REWRITTEN_QUERY_HEADER = 'x-nextjs-rewritten-query';
|
||||
export const NEXT_IS_PRERENDER_HEADER = 'x-nextjs-prerender';
|
||||
export const NEXT_ACTION_NOT_FOUND_HEADER = 'x-nextjs-action-not-found';
|
||||
export const NEXT_REQUEST_ID_HEADER = 'x-nextjs-request-id';
|
||||
export const NEXT_HTML_REQUEST_ID_HEADER = 'x-nextjs-html-request-id';
|
||||
// TODO: Should this include nextjs in the name, like the others?
|
||||
export const NEXT_ACTION_REVALIDATED_HEADER = 'x-action-revalidated';
|
||||
|
||||
//# sourceMappingURL=app-router-headers.js.map
|
||||
1
apps/public-web/node_modules/next/dist/esm/client/components/app-router-headers.js.map
generated
vendored
Normal file
1
apps/public-web/node_modules/next/dist/esm/client/components/app-router-headers.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../../src/client/components/app-router-headers.ts"],"sourcesContent":["export const RSC_HEADER = 'rsc' as const\nexport const ACTION_HEADER = 'next-action' as const\n// TODO: Instead of sending the full router state, we only need to send the\n// segment path. Saves bytes. Then we could also use this field for segment\n// prefetches, which also need to specify a particular segment.\nexport const NEXT_ROUTER_STATE_TREE_HEADER = 'next-router-state-tree' as const\nexport const NEXT_ROUTER_PREFETCH_HEADER = 'next-router-prefetch' as const\n// This contains the path to the segment being prefetched.\n// TODO: If we change next-router-state-tree to be a segment path, we can use\n// that instead. Then next-router-prefetch and next-router-segment-prefetch can\n// be merged into a single enum.\nexport const NEXT_ROUTER_SEGMENT_PREFETCH_HEADER =\n 'next-router-segment-prefetch' as const\nexport const NEXT_HMR_REFRESH_HEADER = 'next-hmr-refresh' as const\nexport const NEXT_HMR_REFRESH_HASH_COOKIE = '__next_hmr_refresh_hash__' as const\nexport const NEXT_URL = 'next-url' as const\nexport const RSC_CONTENT_TYPE_HEADER = 'text/x-component' as const\n\nexport const FLIGHT_HEADERS = [\n RSC_HEADER,\n NEXT_ROUTER_STATE_TREE_HEADER,\n NEXT_ROUTER_PREFETCH_HEADER,\n NEXT_HMR_REFRESH_HEADER,\n NEXT_ROUTER_SEGMENT_PREFETCH_HEADER,\n] as const\n\nexport const NEXT_RSC_UNION_QUERY = '_rsc' as const\n\nexport const NEXT_ROUTER_STALE_TIME_HEADER = 'x-nextjs-stale-time' as const\nexport const NEXT_DID_POSTPONE_HEADER = 'x-nextjs-postponed' as const\nexport const NEXT_REWRITTEN_PATH_HEADER = 'x-nextjs-rewritten-path' as const\nexport const NEXT_REWRITTEN_QUERY_HEADER = 'x-nextjs-rewritten-query' as const\nexport const NEXT_IS_PRERENDER_HEADER = 'x-nextjs-prerender' as const\nexport const NEXT_ACTION_NOT_FOUND_HEADER = 'x-nextjs-action-not-found' as const\nexport const NEXT_REQUEST_ID_HEADER = 'x-nextjs-request-id' as const\nexport const NEXT_HTML_REQUEST_ID_HEADER = 'x-nextjs-html-request-id' as const\n\n// TODO: Should this include nextjs in the name, like the others?\nexport const NEXT_ACTION_REVALIDATED_HEADER = 'x-action-revalidated' as const\n"],"names":["RSC_HEADER","ACTION_HEADER","NEXT_ROUTER_STATE_TREE_HEADER","NEXT_ROUTER_PREFETCH_HEADER","NEXT_ROUTER_SEGMENT_PREFETCH_HEADER","NEXT_HMR_REFRESH_HEADER","NEXT_HMR_REFRESH_HASH_COOKIE","NEXT_URL","RSC_CONTENT_TYPE_HEADER","FLIGHT_HEADERS","NEXT_RSC_UNION_QUERY","NEXT_ROUTER_STALE_TIME_HEADER","NEXT_DID_POSTPONE_HEADER","NEXT_REWRITTEN_PATH_HEADER","NEXT_REWRITTEN_QUERY_HEADER","NEXT_IS_PRERENDER_HEADER","NEXT_ACTION_NOT_FOUND_HEADER","NEXT_REQUEST_ID_HEADER","NEXT_HTML_REQUEST_ID_HEADER","NEXT_ACTION_REVALIDATED_HEADER"],"mappings":"AAAA,OAAO,MAAMA,aAAa,MAAc;AACxC,OAAO,MAAMC,gBAAgB,cAAsB;AACnD,2EAA2E;AAC3E,2EAA2E;AAC3E,+DAA+D;AAC/D,OAAO,MAAMC,gCAAgC,yBAAiC;AAC9E,OAAO,MAAMC,8BAA8B,uBAA+B;AAC1E,0DAA0D;AAC1D,6EAA6E;AAC7E,+EAA+E;AAC/E,gCAAgC;AAChC,OAAO,MAAMC,sCACX,+BAAuC;AACzC,OAAO,MAAMC,0BAA0B,mBAA2B;AAClE,OAAO,MAAMC,+BAA+B,4BAAoC;AAChF,OAAO,MAAMC,WAAW,WAAmB;AAC3C,OAAO,MAAMC,0BAA0B,mBAA2B;AAElE,OAAO,MAAMC,iBAAiB;IAC5BT;IACAE;IACAC;IACAE;IACAD;CACD,CAAS;AAEV,OAAO,MAAMM,uBAAuB,OAAe;AAEnD,OAAO,MAAMC,gCAAgC,sBAA8B;AAC3E,OAAO,MAAMC,2BAA2B,qBAA6B;AACrE,OAAO,MAAMC,6BAA6B,0BAAkC;AAC5E,OAAO,MAAMC,8BAA8B,2BAAmC;AAC9E,OAAO,MAAMC,2BAA2B,qBAA6B;AACrE,OAAO,MAAMC,+BAA+B,4BAAoC;AAChF,OAAO,MAAMC,yBAAyB,sBAA8B;AACpE,OAAO,MAAMC,8BAA8B,2BAAmC;AAE9E,iEAAiE;AACjE,OAAO,MAAMC,iCAAiC,uBAA+B","ignoreList":[0]}
|
||||
283
apps/public-web/node_modules/next/dist/esm/client/components/app-router-instance.js
generated
vendored
Normal file
283
apps/public-web/node_modules/next/dist/esm/client/components/app-router-instance.js
generated
vendored
Normal file
@@ -0,0 +1,283 @@
|
||||
import { ACTION_REFRESH, ACTION_SERVER_ACTION, ACTION_NAVIGATE, ACTION_RESTORE, ACTION_HMR_REFRESH, PrefetchKind } from './router-reducer/router-reducer-types';
|
||||
import { reducer } from './router-reducer/router-reducer';
|
||||
import { startTransition } from 'react';
|
||||
import { isThenable } from '../../shared/lib/is-thenable';
|
||||
import { FetchStrategy } from './segment-cache/types';
|
||||
import { prefetch as prefetchWithSegmentCache } from './segment-cache/prefetch';
|
||||
import { dispatchAppRouterAction } from './use-action-queue';
|
||||
import { addBasePath } from '../add-base-path';
|
||||
import { isExternalURL } from './app-router-utils';
|
||||
import { setLinkForCurrentNavigation } from './links';
|
||||
function runRemainingActions(actionQueue, setState) {
|
||||
if (actionQueue.pending !== null) {
|
||||
actionQueue.pending = actionQueue.pending.next;
|
||||
if (actionQueue.pending !== null) {
|
||||
runAction({
|
||||
actionQueue,
|
||||
action: actionQueue.pending,
|
||||
setState
|
||||
});
|
||||
}
|
||||
} else {
|
||||
// Check for refresh when pending is already null
|
||||
// This handles the case where a discarded server action completes
|
||||
// after the navigation has already finished and the queue is empty
|
||||
if (actionQueue.needsRefresh) {
|
||||
actionQueue.needsRefresh = false;
|
||||
actionQueue.dispatch({
|
||||
type: ACTION_REFRESH
|
||||
}, setState);
|
||||
}
|
||||
}
|
||||
}
|
||||
async function runAction({ actionQueue, action, setState }) {
|
||||
const prevState = actionQueue.state;
|
||||
actionQueue.pending = action;
|
||||
const payload = action.payload;
|
||||
const actionResult = actionQueue.action(prevState, payload);
|
||||
function handleResult(nextState) {
|
||||
// if we discarded this action, the state should also be discarded
|
||||
if (action.discarded) {
|
||||
// Check if the discarded server action revalidated data
|
||||
if (action.payload.type === ACTION_SERVER_ACTION && action.payload.didRevalidate) {
|
||||
// The server action was discarded but it revalidated data,
|
||||
// mark that we need to refresh after all actions complete
|
||||
actionQueue.needsRefresh = true;
|
||||
}
|
||||
// Still need to run remaining actions even for discarded actions
|
||||
// to potentially trigger the refresh
|
||||
runRemainingActions(actionQueue, setState);
|
||||
return;
|
||||
}
|
||||
actionQueue.state = nextState;
|
||||
runRemainingActions(actionQueue, setState);
|
||||
action.resolve(nextState);
|
||||
}
|
||||
// if the action is a promise, set up a callback to resolve it
|
||||
if (isThenable(actionResult)) {
|
||||
actionResult.then(handleResult, (err)=>{
|
||||
runRemainingActions(actionQueue, setState);
|
||||
action.reject(err);
|
||||
});
|
||||
} else {
|
||||
handleResult(actionResult);
|
||||
}
|
||||
}
|
||||
function dispatchAction(actionQueue, payload, setState) {
|
||||
let resolvers = {
|
||||
resolve: setState,
|
||||
reject: ()=>{}
|
||||
};
|
||||
// most of the action types are async with the exception of restore
|
||||
// it's important that restore is handled quickly since it's fired on the popstate event
|
||||
// and we don't want to add any delay on a back/forward nav
|
||||
// this only creates a promise for the async actions
|
||||
if (payload.type !== ACTION_RESTORE) {
|
||||
// Create the promise and assign the resolvers to the object.
|
||||
const deferredPromise = new Promise((resolve, reject)=>{
|
||||
resolvers = {
|
||||
resolve,
|
||||
reject
|
||||
};
|
||||
});
|
||||
startTransition(()=>{
|
||||
// we immediately notify React of the pending promise -- the resolver is attached to the action node
|
||||
// and will be called when the associated action promise resolves
|
||||
setState(deferredPromise);
|
||||
});
|
||||
}
|
||||
const newAction = {
|
||||
payload,
|
||||
next: null,
|
||||
resolve: resolvers.resolve,
|
||||
reject: resolvers.reject
|
||||
};
|
||||
// Check if the queue is empty
|
||||
if (actionQueue.pending === null) {
|
||||
// The queue is empty, so add the action and start it immediately
|
||||
// Mark this action as the last in the queue
|
||||
actionQueue.last = newAction;
|
||||
runAction({
|
||||
actionQueue,
|
||||
action: newAction,
|
||||
setState
|
||||
});
|
||||
} else if (payload.type === ACTION_NAVIGATE || payload.type === ACTION_RESTORE) {
|
||||
// Navigations (including back/forward) take priority over any pending actions.
|
||||
// Mark the pending action as discarded (so the state is never applied) and start the navigation action immediately.
|
||||
actionQueue.pending.discarded = true;
|
||||
// The rest of the current queue should still execute after this navigation.
|
||||
// (Note that it can't contain any earlier navigations, because we always put those into `actionQueue.pending` by calling `runAction`)
|
||||
newAction.next = actionQueue.pending.next;
|
||||
runAction({
|
||||
actionQueue,
|
||||
action: newAction,
|
||||
setState
|
||||
});
|
||||
} else {
|
||||
// The queue is not empty, so add the action to the end of the queue
|
||||
// It will be started by runRemainingActions after the previous action finishes
|
||||
if (actionQueue.last !== null) {
|
||||
actionQueue.last.next = newAction;
|
||||
}
|
||||
actionQueue.last = newAction;
|
||||
}
|
||||
}
|
||||
let globalActionQueue = null;
|
||||
export function createMutableActionQueue(initialState, instrumentationHooks) {
|
||||
const actionQueue = {
|
||||
state: initialState,
|
||||
dispatch: (payload, setState)=>dispatchAction(actionQueue, payload, setState),
|
||||
action: async (state, action)=>{
|
||||
const result = reducer(state, action);
|
||||
return result;
|
||||
},
|
||||
pending: null,
|
||||
last: null,
|
||||
onRouterTransitionStart: instrumentationHooks !== null && typeof instrumentationHooks.onRouterTransitionStart === 'function' ? instrumentationHooks.onRouterTransitionStart : null
|
||||
};
|
||||
if (typeof window !== 'undefined') {
|
||||
// The action queue is lazily created on hydration, but after that point
|
||||
// it doesn't change. So we can store it in a global rather than pass
|
||||
// it around everywhere via props/context.
|
||||
if (globalActionQueue !== null) {
|
||||
throw Object.defineProperty(new Error('Internal Next.js Error: createMutableActionQueue was called more ' + 'than once'), "__NEXT_ERROR_CODE", {
|
||||
value: "E624",
|
||||
enumerable: false,
|
||||
configurable: true
|
||||
});
|
||||
}
|
||||
globalActionQueue = actionQueue;
|
||||
}
|
||||
return actionQueue;
|
||||
}
|
||||
export function getCurrentAppRouterState() {
|
||||
return globalActionQueue !== null ? globalActionQueue.state : null;
|
||||
}
|
||||
function getAppRouterActionQueue() {
|
||||
if (globalActionQueue === null) {
|
||||
throw Object.defineProperty(new Error('Internal Next.js error: Router action dispatched before initialization.'), "__NEXT_ERROR_CODE", {
|
||||
value: "E668",
|
||||
enumerable: false,
|
||||
configurable: true
|
||||
});
|
||||
}
|
||||
return globalActionQueue;
|
||||
}
|
||||
function getProfilingHookForOnNavigationStart() {
|
||||
if (globalActionQueue !== null) {
|
||||
return globalActionQueue.onRouterTransitionStart;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
export function dispatchNavigateAction(href, navigateType, shouldScroll, linkInstanceRef) {
|
||||
// TODO: This stuff could just go into the reducer. Leaving as-is for now
|
||||
// since we're about to rewrite all the router reducer stuff anyway.
|
||||
const url = new URL(addBasePath(href), location.href);
|
||||
if (process.env.__NEXT_APP_NAV_FAIL_HANDLING) {
|
||||
window.next.__pendingUrl = url;
|
||||
}
|
||||
setLinkForCurrentNavigation(linkInstanceRef);
|
||||
const onRouterTransitionStart = getProfilingHookForOnNavigationStart();
|
||||
if (onRouterTransitionStart !== null) {
|
||||
onRouterTransitionStart(href, navigateType);
|
||||
}
|
||||
dispatchAppRouterAction({
|
||||
type: ACTION_NAVIGATE,
|
||||
url,
|
||||
isExternalUrl: isExternalURL(url),
|
||||
locationSearch: location.search,
|
||||
shouldScroll,
|
||||
navigateType
|
||||
});
|
||||
}
|
||||
export function dispatchTraverseAction(href, historyState) {
|
||||
const onRouterTransitionStart = getProfilingHookForOnNavigationStart();
|
||||
if (onRouterTransitionStart !== null) {
|
||||
onRouterTransitionStart(href, 'traverse');
|
||||
}
|
||||
dispatchAppRouterAction({
|
||||
type: ACTION_RESTORE,
|
||||
url: new URL(href),
|
||||
historyState
|
||||
});
|
||||
}
|
||||
/**
|
||||
* The app router that is exposed through `useRouter`. These are public API
|
||||
* methods. Internal Next.js code should call the lower level methods directly
|
||||
* (although there's lots of existing code that doesn't do that).
|
||||
*/ export const publicAppRouterInstance = {
|
||||
back: ()=>window.history.back(),
|
||||
forward: ()=>window.history.forward(),
|
||||
prefetch: // Unlike the old implementation, the Segment Cache doesn't store its
|
||||
// data in the router reducer state; it writes into a global mutable
|
||||
// cache. So we don't need to dispatch an action.
|
||||
(href, options)=>{
|
||||
const actionQueue = getAppRouterActionQueue();
|
||||
const prefetchKind = options?.kind ?? PrefetchKind.AUTO;
|
||||
// We don't currently offer a way to issue a runtime prefetch via `router.prefetch()`.
|
||||
// This will be possible when we update its API to not take a PrefetchKind.
|
||||
let fetchStrategy;
|
||||
switch(prefetchKind){
|
||||
case PrefetchKind.AUTO:
|
||||
{
|
||||
// We default to PPR. We'll discover whether or not the route supports it with the initial prefetch.
|
||||
fetchStrategy = FetchStrategy.PPR;
|
||||
break;
|
||||
}
|
||||
case PrefetchKind.FULL:
|
||||
{
|
||||
fetchStrategy = FetchStrategy.Full;
|
||||
break;
|
||||
}
|
||||
default:
|
||||
{
|
||||
prefetchKind;
|
||||
// Despite typescript thinking that this can't happen,
|
||||
// we might get an unexpected value from user code.
|
||||
// We don't know what they want, but we know they want a prefetch,
|
||||
// so use the default.
|
||||
fetchStrategy = FetchStrategy.PPR;
|
||||
}
|
||||
}
|
||||
prefetchWithSegmentCache(href, actionQueue.state.nextUrl, actionQueue.state.tree, fetchStrategy, options?.onInvalidate ?? null);
|
||||
},
|
||||
replace: (href, options)=>{
|
||||
startTransition(()=>{
|
||||
dispatchNavigateAction(href, 'replace', options?.scroll ?? true, null);
|
||||
});
|
||||
},
|
||||
push: (href, options)=>{
|
||||
startTransition(()=>{
|
||||
dispatchNavigateAction(href, 'push', options?.scroll ?? true, null);
|
||||
});
|
||||
},
|
||||
refresh: ()=>{
|
||||
startTransition(()=>{
|
||||
dispatchAppRouterAction({
|
||||
type: ACTION_REFRESH
|
||||
});
|
||||
});
|
||||
},
|
||||
hmrRefresh: ()=>{
|
||||
if (process.env.NODE_ENV !== 'development') {
|
||||
throw Object.defineProperty(new Error('hmrRefresh can only be used in development mode. Please use refresh instead.'), "__NEXT_ERROR_CODE", {
|
||||
value: "E485",
|
||||
enumerable: false,
|
||||
configurable: true
|
||||
});
|
||||
} else {
|
||||
startTransition(()=>{
|
||||
dispatchAppRouterAction({
|
||||
type: ACTION_HMR_REFRESH
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
// Exists for debugging purposes. Don't use in application code.
|
||||
if (typeof window !== 'undefined' && window.next) {
|
||||
window.next.router = publicAppRouterInstance;
|
||||
}
|
||||
|
||||
//# sourceMappingURL=app-router-instance.js.map
|
||||
1
apps/public-web/node_modules/next/dist/esm/client/components/app-router-instance.js.map
generated
vendored
Normal file
1
apps/public-web/node_modules/next/dist/esm/client/components/app-router-instance.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
40
apps/public-web/node_modules/next/dist/esm/client/components/app-router-utils.js
generated
vendored
Normal file
40
apps/public-web/node_modules/next/dist/esm/client/components/app-router-utils.js
generated
vendored
Normal file
@@ -0,0 +1,40 @@
|
||||
import { isBot } from '../../shared/lib/router/utils/is-bot';
|
||||
import { addBasePath } from '../add-base-path';
|
||||
export function isExternalURL(url) {
|
||||
return url.origin !== window.location.origin;
|
||||
}
|
||||
/**
|
||||
* Given a link href, constructs the URL that should be prefetched. Returns null
|
||||
* in cases where prefetching should be disabled, like external URLs, or
|
||||
* during development.
|
||||
* @param href The href passed to <Link>, router.prefetch(), or similar
|
||||
* @returns A URL object to prefetch, or null if prefetching should be disabled
|
||||
*/ export function createPrefetchURL(href) {
|
||||
// Don't prefetch for bots as they don't navigate.
|
||||
if (isBot(window.navigator.userAgent)) {
|
||||
return null;
|
||||
}
|
||||
let url;
|
||||
try {
|
||||
url = new URL(addBasePath(href), window.location.href);
|
||||
} catch (_) {
|
||||
// TODO: Does this need to throw or can we just console.error instead? Does
|
||||
// anyone rely on this throwing? (Seems unlikely.)
|
||||
throw Object.defineProperty(new Error(`Cannot prefetch '${href}' because it cannot be converted to a URL.`), "__NEXT_ERROR_CODE", {
|
||||
value: "E234",
|
||||
enumerable: false,
|
||||
configurable: true
|
||||
});
|
||||
}
|
||||
// Don't prefetch during development (improves compilation performance)
|
||||
if (process.env.NODE_ENV === 'development') {
|
||||
return null;
|
||||
}
|
||||
// External urls can't be prefetched in the same way.
|
||||
if (isExternalURL(url)) {
|
||||
return null;
|
||||
}
|
||||
return url;
|
||||
}
|
||||
|
||||
//# sourceMappingURL=app-router-utils.js.map
|
||||
1
apps/public-web/node_modules/next/dist/esm/client/components/app-router-utils.js.map
generated
vendored
Normal file
1
apps/public-web/node_modules/next/dist/esm/client/components/app-router-utils.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../../src/client/components/app-router-utils.ts"],"sourcesContent":["import { isBot } from '../../shared/lib/router/utils/is-bot'\nimport { addBasePath } from '../add-base-path'\n\nexport function isExternalURL(url: URL) {\n return url.origin !== window.location.origin\n}\n\n/**\n * Given a link href, constructs the URL that should be prefetched. Returns null\n * in cases where prefetching should be disabled, like external URLs, or\n * during development.\n * @param href The href passed to <Link>, router.prefetch(), or similar\n * @returns A URL object to prefetch, or null if prefetching should be disabled\n */\nexport function createPrefetchURL(href: string): URL | null {\n // Don't prefetch for bots as they don't navigate.\n if (isBot(window.navigator.userAgent)) {\n return null\n }\n\n let url: URL\n try {\n url = new URL(addBasePath(href), window.location.href)\n } catch (_) {\n // TODO: Does this need to throw or can we just console.error instead? Does\n // anyone rely on this throwing? (Seems unlikely.)\n throw new Error(\n `Cannot prefetch '${href}' because it cannot be converted to a URL.`\n )\n }\n\n // Don't prefetch during development (improves compilation performance)\n if (process.env.NODE_ENV === 'development') {\n return null\n }\n\n // External urls can't be prefetched in the same way.\n if (isExternalURL(url)) {\n return null\n }\n\n return url\n}\n"],"names":["isBot","addBasePath","isExternalURL","url","origin","window","location","createPrefetchURL","href","navigator","userAgent","URL","_","Error","process","env","NODE_ENV"],"mappings":"AAAA,SAASA,KAAK,QAAQ,uCAAsC;AAC5D,SAASC,WAAW,QAAQ,mBAAkB;AAE9C,OAAO,SAASC,cAAcC,GAAQ;IACpC,OAAOA,IAAIC,MAAM,KAAKC,OAAOC,QAAQ,CAACF,MAAM;AAC9C;AAEA;;;;;;CAMC,GACD,OAAO,SAASG,kBAAkBC,IAAY;IAC5C,kDAAkD;IAClD,IAAIR,MAAMK,OAAOI,SAAS,CAACC,SAAS,GAAG;QACrC,OAAO;IACT;IAEA,IAAIP;IACJ,IAAI;QACFA,MAAM,IAAIQ,IAAIV,YAAYO,OAAOH,OAAOC,QAAQ,CAACE,IAAI;IACvD,EAAE,OAAOI,GAAG;QACV,2EAA2E;QAC3E,kDAAkD;QAClD,MAAM,qBAEL,CAFK,IAAIC,MACR,CAAC,iBAAiB,EAAEL,KAAK,0CAA0C,CAAC,GADhE,qBAAA;mBAAA;wBAAA;0BAAA;QAEN;IACF;IAEA,uEAAuE;IACvE,IAAIM,QAAQC,GAAG,CAACC,QAAQ,KAAK,eAAe;QAC1C,OAAO;IACT;IAEA,qDAAqD;IACrD,IAAId,cAAcC,MAAM;QACtB,OAAO;IACT;IAEA,OAAOA;AACT","ignoreList":[0]}
|
||||
477
apps/public-web/node_modules/next/dist/esm/client/components/app-router.js
generated
vendored
Normal file
477
apps/public-web/node_modules/next/dist/esm/client/components/app-router.js
generated
vendored
Normal file
@@ -0,0 +1,477 @@
|
||||
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
||||
import React, { useEffect, useMemo, startTransition, useInsertionEffect, useDeferredValue } from 'react';
|
||||
import { AppRouterContext, LayoutRouterContext, GlobalLayoutRouterContext } from '../../shared/lib/app-router-context.shared-runtime';
|
||||
import { ACTION_RESTORE } from './router-reducer/router-reducer-types';
|
||||
import { createHrefFromUrl } from './router-reducer/create-href-from-url';
|
||||
import { SearchParamsContext, PathnameContext, PathParamsContext, NavigationPromisesContext } from '../../shared/lib/hooks-client-context.shared-runtime';
|
||||
import { dispatchAppRouterAction, useActionQueue } from './use-action-queue';
|
||||
import { AppRouterAnnouncer } from './app-router-announcer';
|
||||
import { RedirectBoundary } from './redirect-boundary';
|
||||
import { findHeadInCache } from './router-reducer/reducers/find-head-in-cache';
|
||||
import { unresolvedThenable } from './unresolved-thenable';
|
||||
import { removeBasePath } from '../remove-base-path';
|
||||
import { hasBasePath } from '../has-base-path';
|
||||
import { getSelectedParams } from './router-reducer/compute-changed-path';
|
||||
import { useNavFailureHandler } from './nav-failure-handler';
|
||||
import { dispatchTraverseAction, publicAppRouterInstance } from './app-router-instance';
|
||||
import { getRedirectTypeFromError, getURLFromRedirectError } from './redirect';
|
||||
import { isRedirectError, RedirectType } from './redirect-error';
|
||||
import { pingVisibleLinks } from './links';
|
||||
import RootErrorBoundary from './errors/root-error-boundary';
|
||||
import DefaultGlobalError from './builtin/global-error';
|
||||
import { RootLayoutBoundary } from '../../lib/framework/boundary-components';
|
||||
import { getDeploymentIdQueryOrEmptyString } from '../../shared/lib/deployment-id';
|
||||
const globalMutable = {};
|
||||
function HistoryUpdater({ appRouterState }) {
|
||||
useInsertionEffect(()=>{
|
||||
if (process.env.__NEXT_APP_NAV_FAIL_HANDLING) {
|
||||
// clear pending URL as navigation is no longer
|
||||
// in flight
|
||||
window.next.__pendingUrl = undefined;
|
||||
}
|
||||
const { tree, pushRef, canonicalUrl, renderedSearch } = appRouterState;
|
||||
const appHistoryState = {
|
||||
tree,
|
||||
renderedSearch
|
||||
};
|
||||
// TODO: Use Navigation API if available
|
||||
const historyState = {
|
||||
...pushRef.preserveCustomHistoryState ? window.history.state : {},
|
||||
// Identifier is shortened intentionally.
|
||||
// __NA is used to identify if the history entry can be handled by the app-router.
|
||||
// __N is used to identify if the history entry can be handled by the old router.
|
||||
__NA: true,
|
||||
__PRIVATE_NEXTJS_INTERNALS_TREE: appHistoryState
|
||||
};
|
||||
if (pushRef.pendingPush && // Skip pushing an additional history entry if the canonicalUrl is the same as the current url.
|
||||
// This mirrors the browser behavior for normal navigation.
|
||||
createHrefFromUrl(new URL(window.location.href)) !== canonicalUrl) {
|
||||
// This intentionally mutates React state, pushRef is overwritten to ensure additional push/replace calls do not trigger an additional history entry.
|
||||
pushRef.pendingPush = false;
|
||||
window.history.pushState(historyState, '', canonicalUrl);
|
||||
} else {
|
||||
window.history.replaceState(historyState, '', canonicalUrl);
|
||||
}
|
||||
}, [
|
||||
appRouterState
|
||||
]);
|
||||
useEffect(()=>{
|
||||
// The Next-Url and the base tree may affect the result of a prefetch
|
||||
// task. Re-prefetch all visible links with the updated values. In most
|
||||
// cases, this will not result in any new network requests, only if
|
||||
// the prefetch result actually varies on one of these inputs.
|
||||
pingVisibleLinks(appRouterState.nextUrl, appRouterState.tree);
|
||||
}, [
|
||||
appRouterState.nextUrl,
|
||||
appRouterState.tree
|
||||
]);
|
||||
return null;
|
||||
}
|
||||
function copyNextJsInternalHistoryState(data) {
|
||||
if (data == null) data = {};
|
||||
const currentState = window.history.state;
|
||||
const __NA = currentState?.__NA;
|
||||
if (__NA) {
|
||||
data.__NA = __NA;
|
||||
}
|
||||
const __PRIVATE_NEXTJS_INTERNALS_TREE = currentState?.__PRIVATE_NEXTJS_INTERNALS_TREE;
|
||||
if (__PRIVATE_NEXTJS_INTERNALS_TREE) {
|
||||
data.__PRIVATE_NEXTJS_INTERNALS_TREE = __PRIVATE_NEXTJS_INTERNALS_TREE;
|
||||
}
|
||||
return data;
|
||||
}
|
||||
function Head({ headCacheNode }) {
|
||||
// If this segment has a `prefetchHead`, it's the statically prefetched data.
|
||||
// We should use that on initial render instead of `head`. Then we'll switch
|
||||
// to `head` when the dynamic response streams in.
|
||||
const head = headCacheNode !== null ? headCacheNode.head : null;
|
||||
const prefetchHead = headCacheNode !== null ? headCacheNode.prefetchHead : null;
|
||||
// If no prefetch data is available, then we go straight to rendering `head`.
|
||||
const resolvedPrefetchRsc = prefetchHead !== null ? prefetchHead : head;
|
||||
// We use `useDeferredValue` to handle switching between the prefetched and
|
||||
// final values. The second argument is returned on initial render, then it
|
||||
// re-renders with the first argument.
|
||||
return useDeferredValue(head, resolvedPrefetchRsc);
|
||||
}
|
||||
/**
|
||||
* The global router that wraps the application components.
|
||||
*/ function Router({ actionQueue, globalError, webSocket, staticIndicatorState }) {
|
||||
const state = useActionQueue(actionQueue);
|
||||
const { canonicalUrl } = state;
|
||||
// Add memoized pathname/query for useSearchParams and usePathname.
|
||||
const { searchParams, pathname } = useMemo(()=>{
|
||||
const url = new URL(canonicalUrl, typeof window === 'undefined' ? 'http://n' : window.location.href);
|
||||
return {
|
||||
// This is turned into a readonly class in `useSearchParams`
|
||||
searchParams: url.searchParams,
|
||||
pathname: hasBasePath(url.pathname) ? removeBasePath(url.pathname) : url.pathname
|
||||
};
|
||||
}, [
|
||||
canonicalUrl
|
||||
]);
|
||||
if (process.env.NODE_ENV !== 'production') {
|
||||
const { cache, tree } = state;
|
||||
// This hook is in a conditional but that is ok because `process.env.NODE_ENV` never changes
|
||||
// eslint-disable-next-line react-hooks/rules-of-hooks
|
||||
useEffect(()=>{
|
||||
// Add `window.nd` for debugging purposes.
|
||||
// This is not meant for use in applications as concurrent rendering will affect the cache/tree/router.
|
||||
// @ts-ignore this is for debugging
|
||||
window.nd = {
|
||||
router: publicAppRouterInstance,
|
||||
cache,
|
||||
tree
|
||||
};
|
||||
}, [
|
||||
cache,
|
||||
tree
|
||||
]);
|
||||
}
|
||||
useEffect(()=>{
|
||||
// If the app is restored from bfcache, it's possible that
|
||||
// pushRef.mpaNavigation is true, which would mean that any re-render of this component
|
||||
// would trigger the mpa navigation logic again from the lines below.
|
||||
// This will restore the router to the initial state in the event that the app is restored from bfcache.
|
||||
function handlePageShow(event) {
|
||||
if (!event.persisted || !window.history.state?.__PRIVATE_NEXTJS_INTERNALS_TREE) {
|
||||
return;
|
||||
}
|
||||
// Clear the pendingMpaPath value so that a subsequent MPA navigation to the same URL can be triggered.
|
||||
// This is necessary because if the browser restored from bfcache, the pendingMpaPath would still be set to the value
|
||||
// of the last MPA navigation.
|
||||
globalMutable.pendingMpaPath = undefined;
|
||||
dispatchAppRouterAction({
|
||||
type: ACTION_RESTORE,
|
||||
url: new URL(window.location.href),
|
||||
historyState: window.history.state.__PRIVATE_NEXTJS_INTERNALS_TREE
|
||||
});
|
||||
}
|
||||
window.addEventListener('pageshow', handlePageShow);
|
||||
return ()=>{
|
||||
window.removeEventListener('pageshow', handlePageShow);
|
||||
};
|
||||
}, []);
|
||||
useEffect(()=>{
|
||||
// Ensure that any redirect errors that bubble up outside of the RedirectBoundary
|
||||
// are caught and handled by the router.
|
||||
function handleUnhandledRedirect(event) {
|
||||
const error = 'reason' in event ? event.reason : event.error;
|
||||
if (isRedirectError(error)) {
|
||||
event.preventDefault();
|
||||
const url = getURLFromRedirectError(error);
|
||||
const redirectType = getRedirectTypeFromError(error);
|
||||
// TODO: This should access the router methods directly, rather than
|
||||
// go through the public interface.
|
||||
if (redirectType === RedirectType.push) {
|
||||
publicAppRouterInstance.push(url, {});
|
||||
} else {
|
||||
publicAppRouterInstance.replace(url, {});
|
||||
}
|
||||
}
|
||||
}
|
||||
window.addEventListener('error', handleUnhandledRedirect);
|
||||
window.addEventListener('unhandledrejection', handleUnhandledRedirect);
|
||||
return ()=>{
|
||||
window.removeEventListener('error', handleUnhandledRedirect);
|
||||
window.removeEventListener('unhandledrejection', handleUnhandledRedirect);
|
||||
};
|
||||
}, []);
|
||||
// When mpaNavigation flag is set do a hard navigation to the new url.
|
||||
// Infinitely suspend because we don't actually want to rerender any child
|
||||
// components with the new URL and any entangled state updates shouldn't
|
||||
// commit either (eg: useTransition isPending should stay true until the page
|
||||
// unloads).
|
||||
//
|
||||
// This is a side effect in render. Don't try this at home, kids. It's
|
||||
// probably safe because we know this is a singleton component and it's never
|
||||
// in <Offscreen>. At least I hope so. (It will run twice in dev strict mode,
|
||||
// but that's... fine?)
|
||||
const { pushRef } = state;
|
||||
if (pushRef.mpaNavigation) {
|
||||
// if there's a re-render, we don't want to trigger another redirect if one is already in flight to the same URL
|
||||
if (globalMutable.pendingMpaPath !== canonicalUrl) {
|
||||
const location = window.location;
|
||||
if (pushRef.pendingPush) {
|
||||
location.assign(canonicalUrl);
|
||||
} else {
|
||||
location.replace(canonicalUrl);
|
||||
}
|
||||
globalMutable.pendingMpaPath = canonicalUrl;
|
||||
}
|
||||
// TODO-APP: Should we listen to navigateerror here to catch failed
|
||||
// navigations somehow? And should we call window.stop() if a SPA navigation
|
||||
// should interrupt an MPA one?
|
||||
// NOTE: This is intentionally using `throw` instead of `use` because we're
|
||||
// inside an externally mutable condition (pushRef.mpaNavigation), which
|
||||
// violates the rules of hooks.
|
||||
throw unresolvedThenable;
|
||||
}
|
||||
useEffect(()=>{
|
||||
const originalPushState = window.history.pushState.bind(window.history);
|
||||
const originalReplaceState = window.history.replaceState.bind(window.history);
|
||||
// Ensure the canonical URL in the Next.js Router is updated when the URL is changed so that `usePathname` and `useSearchParams` hold the pushed values.
|
||||
const applyUrlFromHistoryPushReplace = (url)=>{
|
||||
const href = window.location.href;
|
||||
const appHistoryState = window.history.state?.__PRIVATE_NEXTJS_INTERNALS_TREE;
|
||||
startTransition(()=>{
|
||||
dispatchAppRouterAction({
|
||||
type: ACTION_RESTORE,
|
||||
url: new URL(url ?? href, href),
|
||||
historyState: appHistoryState
|
||||
});
|
||||
});
|
||||
};
|
||||
/**
|
||||
* Patch pushState to ensure external changes to the history are reflected in the Next.js Router.
|
||||
* Ensures Next.js internal history state is copied to the new history entry.
|
||||
* Ensures usePathname and useSearchParams hold the newly provided url.
|
||||
*/ window.history.pushState = function pushState(data, _unused, url) {
|
||||
// TODO: Warn when Navigation API is available (navigation.navigate() should be used)
|
||||
// Avoid a loop when Next.js internals trigger pushState/replaceState
|
||||
if (data?.__NA || data?._N) {
|
||||
return originalPushState(data, _unused, url);
|
||||
}
|
||||
data = copyNextJsInternalHistoryState(data);
|
||||
if (url) {
|
||||
applyUrlFromHistoryPushReplace(url);
|
||||
}
|
||||
return originalPushState(data, _unused, url);
|
||||
};
|
||||
/**
|
||||
* Patch replaceState to ensure external changes to the history are reflected in the Next.js Router.
|
||||
* Ensures Next.js internal history state is copied to the new history entry.
|
||||
* Ensures usePathname and useSearchParams hold the newly provided url.
|
||||
*/ window.history.replaceState = function replaceState(data, _unused, url) {
|
||||
// TODO: Warn when Navigation API is available (navigation.navigate() should be used)
|
||||
// Avoid a loop when Next.js internals trigger pushState/replaceState
|
||||
if (data?.__NA || data?._N) {
|
||||
return originalReplaceState(data, _unused, url);
|
||||
}
|
||||
data = copyNextJsInternalHistoryState(data);
|
||||
if (url) {
|
||||
applyUrlFromHistoryPushReplace(url);
|
||||
}
|
||||
return originalReplaceState(data, _unused, url);
|
||||
};
|
||||
/**
|
||||
* Handle popstate event, this is used to handle back/forward in the browser.
|
||||
* By default dispatches ACTION_RESTORE, however if the history entry was not pushed/replaced by app-router it will reload the page.
|
||||
* That case can happen when the old router injected the history entry.
|
||||
*/ const onPopState = (event)=>{
|
||||
if (!event.state) {
|
||||
// TODO-APP: this case only happens when pushState/replaceState was called outside of Next.js. It should probably reload the page in this case.
|
||||
return;
|
||||
}
|
||||
// This case happens when the history entry was pushed by the `pages` router.
|
||||
if (!event.state.__NA) {
|
||||
window.location.reload();
|
||||
return;
|
||||
}
|
||||
// TODO-APP: Ideally the back button should not use startTransition as it should apply the updates synchronously
|
||||
// Without startTransition works if the cache is there for this path
|
||||
startTransition(()=>{
|
||||
dispatchTraverseAction(window.location.href, event.state.__PRIVATE_NEXTJS_INTERNALS_TREE);
|
||||
});
|
||||
};
|
||||
// Register popstate event to call onPopstate.
|
||||
window.addEventListener('popstate', onPopState);
|
||||
return ()=>{
|
||||
window.history.pushState = originalPushState;
|
||||
window.history.replaceState = originalReplaceState;
|
||||
window.removeEventListener('popstate', onPopState);
|
||||
};
|
||||
}, []);
|
||||
const { cache, tree, nextUrl, focusAndScrollRef, previousNextUrl } = state;
|
||||
const matchingHead = useMemo(()=>{
|
||||
return findHeadInCache(cache, tree[1]);
|
||||
}, [
|
||||
cache,
|
||||
tree
|
||||
]);
|
||||
// Add memoized pathParams for useParams.
|
||||
const pathParams = useMemo(()=>{
|
||||
return getSelectedParams(tree);
|
||||
}, [
|
||||
tree
|
||||
]);
|
||||
// Create instrumented promises for navigation hooks (dev-only)
|
||||
// These are specially instrumented promises to show in the Suspense DevTools
|
||||
// Promises are cached outside of render to survive suspense retries.
|
||||
let instrumentedNavigationPromises = null;
|
||||
if (process.env.NODE_ENV !== 'production') {
|
||||
const { createRootNavigationPromises } = require('./navigation-devtools');
|
||||
instrumentedNavigationPromises = createRootNavigationPromises(tree, pathname, searchParams, pathParams);
|
||||
}
|
||||
const layoutRouterContext = useMemo(()=>{
|
||||
return {
|
||||
parentTree: tree,
|
||||
parentCacheNode: cache,
|
||||
parentSegmentPath: null,
|
||||
parentParams: {},
|
||||
// This is the <Activity> "name" that shows up in the Suspense DevTools.
|
||||
// It represents the root of the app.
|
||||
debugNameContext: '/',
|
||||
// Root node always has `url`
|
||||
// Provided in AppTreeContext to ensure it can be overwritten in layout-router
|
||||
url: canonicalUrl,
|
||||
// Root segment is always active
|
||||
isActive: true
|
||||
};
|
||||
}, [
|
||||
tree,
|
||||
cache,
|
||||
canonicalUrl
|
||||
]);
|
||||
const globalLayoutRouterContext = useMemo(()=>{
|
||||
return {
|
||||
tree,
|
||||
focusAndScrollRef,
|
||||
nextUrl,
|
||||
previousNextUrl
|
||||
};
|
||||
}, [
|
||||
tree,
|
||||
focusAndScrollRef,
|
||||
nextUrl,
|
||||
previousNextUrl
|
||||
]);
|
||||
let head;
|
||||
if (matchingHead !== null) {
|
||||
// The head is wrapped in an extra component so we can use
|
||||
// `useDeferredValue` to swap between the prefetched and final versions of
|
||||
// the head. (This is what LayoutRouter does for segment data, too.)
|
||||
//
|
||||
// The `key` is used to remount the component whenever the head moves to
|
||||
// a different segment.
|
||||
const [headCacheNode, headKey, headKeyWithoutSearchParams] = matchingHead;
|
||||
head = /*#__PURE__*/ _jsx(Head, {
|
||||
headCacheNode: headCacheNode
|
||||
}, // Necessary for PPR: omit search params from the key to match prerendered keys
|
||||
typeof window === 'undefined' ? headKeyWithoutSearchParams : headKey);
|
||||
} else {
|
||||
head = null;
|
||||
}
|
||||
let content = /*#__PURE__*/ _jsxs(RedirectBoundary, {
|
||||
children: [
|
||||
head,
|
||||
/*#__PURE__*/ _jsx(RootLayoutBoundary, {
|
||||
children: cache.rsc
|
||||
}),
|
||||
/*#__PURE__*/ _jsx(AppRouterAnnouncer, {
|
||||
tree: tree
|
||||
})
|
||||
]
|
||||
});
|
||||
if (process.env.NODE_ENV !== 'production') {
|
||||
// In development, we apply few error boundaries and hot-reloader:
|
||||
// - DevRootHTTPAccessFallbackBoundary: avoid using navigation API like notFound() in root layout
|
||||
// - HotReloader:
|
||||
// - hot-reload the app when the code changes
|
||||
// - render dev overlay
|
||||
// - catch runtime errors and display global-error when necessary
|
||||
if (typeof window !== 'undefined') {
|
||||
const { DevRootHTTPAccessFallbackBoundary } = require('./dev-root-http-access-fallback-boundary');
|
||||
content = /*#__PURE__*/ _jsx(DevRootHTTPAccessFallbackBoundary, {
|
||||
children: content
|
||||
});
|
||||
}
|
||||
const HotReloader = require('../dev/hot-reloader/app/hot-reloader-app').default;
|
||||
content = /*#__PURE__*/ _jsx(HotReloader, {
|
||||
globalError: globalError,
|
||||
webSocket: webSocket,
|
||||
staticIndicatorState: staticIndicatorState,
|
||||
children: content
|
||||
});
|
||||
} else {
|
||||
content = /*#__PURE__*/ _jsx(RootErrorBoundary, {
|
||||
errorComponent: globalError[0],
|
||||
errorStyles: globalError[1],
|
||||
children: content
|
||||
});
|
||||
}
|
||||
return /*#__PURE__*/ _jsxs(_Fragment, {
|
||||
children: [
|
||||
/*#__PURE__*/ _jsx(HistoryUpdater, {
|
||||
appRouterState: state
|
||||
}),
|
||||
/*#__PURE__*/ _jsx(RuntimeStyles, {}),
|
||||
/*#__PURE__*/ _jsx(NavigationPromisesContext.Provider, {
|
||||
value: instrumentedNavigationPromises,
|
||||
children: /*#__PURE__*/ _jsx(PathParamsContext.Provider, {
|
||||
value: pathParams,
|
||||
children: /*#__PURE__*/ _jsx(PathnameContext.Provider, {
|
||||
value: pathname,
|
||||
children: /*#__PURE__*/ _jsx(SearchParamsContext.Provider, {
|
||||
value: searchParams,
|
||||
children: /*#__PURE__*/ _jsx(GlobalLayoutRouterContext.Provider, {
|
||||
value: globalLayoutRouterContext,
|
||||
children: /*#__PURE__*/ _jsx(AppRouterContext.Provider, {
|
||||
value: publicAppRouterInstance,
|
||||
children: /*#__PURE__*/ _jsx(LayoutRouterContext.Provider, {
|
||||
value: layoutRouterContext,
|
||||
children: content
|
||||
})
|
||||
})
|
||||
})
|
||||
})
|
||||
})
|
||||
})
|
||||
})
|
||||
]
|
||||
});
|
||||
}
|
||||
export default function AppRouter({ actionQueue, globalErrorState, webSocket, staticIndicatorState }) {
|
||||
useNavFailureHandler();
|
||||
const router = /*#__PURE__*/ _jsx(Router, {
|
||||
actionQueue: actionQueue,
|
||||
globalError: globalErrorState,
|
||||
webSocket: webSocket,
|
||||
staticIndicatorState: staticIndicatorState
|
||||
});
|
||||
// At the very top level, use the default GlobalError component as the final fallback.
|
||||
// When the app router itself fails, which means the framework itself fails, we show the default error.
|
||||
return /*#__PURE__*/ _jsx(RootErrorBoundary, {
|
||||
errorComponent: DefaultGlobalError,
|
||||
children: router
|
||||
});
|
||||
}
|
||||
const runtimeStyles = new Set();
|
||||
let runtimeStyleChanged = new Set();
|
||||
globalThis._N_E_STYLE_LOAD = function(href) {
|
||||
let len = runtimeStyles.size;
|
||||
runtimeStyles.add(href);
|
||||
if (runtimeStyles.size !== len) {
|
||||
runtimeStyleChanged.forEach((cb)=>cb());
|
||||
}
|
||||
// TODO figure out how to get a promise here
|
||||
// But maybe it's not necessary as react would block rendering until it's loaded
|
||||
return Promise.resolve();
|
||||
};
|
||||
function RuntimeStyles() {
|
||||
const [, forceUpdate] = React.useState(0);
|
||||
const renderedStylesSize = runtimeStyles.size;
|
||||
useEffect(()=>{
|
||||
const changed = ()=>forceUpdate((c)=>c + 1);
|
||||
runtimeStyleChanged.add(changed);
|
||||
if (renderedStylesSize !== runtimeStyles.size) {
|
||||
changed();
|
||||
}
|
||||
return ()=>{
|
||||
runtimeStyleChanged.delete(changed);
|
||||
};
|
||||
}, [
|
||||
renderedStylesSize,
|
||||
forceUpdate
|
||||
]);
|
||||
const dplId = getDeploymentIdQueryOrEmptyString();
|
||||
return [
|
||||
...runtimeStyles
|
||||
].map((href, i)=>/*#__PURE__*/ _jsx("link", {
|
||||
rel: "stylesheet",
|
||||
href: `${href}${dplId}`,
|
||||
// @ts-ignore
|
||||
precedence: "next"
|
||||
}, i));
|
||||
}
|
||||
|
||||
//# sourceMappingURL=app-router.js.map
|
||||
1
apps/public-web/node_modules/next/dist/esm/client/components/app-router.js.map
generated
vendored
Normal file
1
apps/public-web/node_modules/next/dist/esm/client/components/app-router.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
93
apps/public-web/node_modules/next/dist/esm/client/components/bfcache.js
generated
vendored
Normal file
93
apps/public-web/node_modules/next/dist/esm/client/components/bfcache.js
generated
vendored
Normal file
@@ -0,0 +1,93 @@
|
||||
import { useState } from 'react';
|
||||
// When the flag is disabled, only track the currently active tree
|
||||
const MAX_BF_CACHE_ENTRIES = process.env.__NEXT_CACHE_COMPONENTS ? 3 : 1;
|
||||
/**
|
||||
* Keeps track of the most recent N trees (FlightRouterStates) that were active
|
||||
* at a certain segment level. E.g. for a segment "/a/b/[param]", this hook
|
||||
* tracks the last N param values that the router rendered for N.
|
||||
*
|
||||
* The result of this hook precisely determines the number and order of
|
||||
* trees that are rendered in parallel at their segment level.
|
||||
*
|
||||
* The purpose of this cache is to we can preserve the React and DOM state of
|
||||
* some number of inactive trees, by rendering them in an <Activity> boundary.
|
||||
* That means it would not make sense for the the lifetime of the cache to be
|
||||
* any longer than the lifetime of the React tree; e.g. if the hook were
|
||||
* unmounted, then the React tree would be, too. So, we use React state to
|
||||
* manage it.
|
||||
*
|
||||
* Note that we don't store the RSC data for the cache entries in this hook —
|
||||
* the data for inactive segments is stored in the parent CacheNode, which
|
||||
* *does* have a longer lifetime than the React tree. This hook only determines
|
||||
* which of those trees should have their *state* preserved, by <Activity>.
|
||||
*/ export function useRouterBFCache(activeTree, activeStateKey) {
|
||||
// The currently active entry. The entries form a linked list, sorted in
|
||||
// order of most recently active. This allows us to reuse parts of the list
|
||||
// without cloning, unless there's a reordering or removal.
|
||||
// TODO: Once we start tracking back/forward history at each route level,
|
||||
// we should use the history order instead. In other words, when traversing
|
||||
// to an existing entry as a result of a popstate event, we should maintain
|
||||
// the existing order instead of moving it to the front of the list. I think
|
||||
// an initial implementation of this could be to pass an incrementing id
|
||||
// to history.pushState/replaceState, then use that here for ordering.
|
||||
const [prevActiveEntry, setPrevActiveEntry] = useState(()=>{
|
||||
const initialEntry = {
|
||||
tree: activeTree,
|
||||
stateKey: activeStateKey,
|
||||
next: null
|
||||
};
|
||||
return initialEntry;
|
||||
});
|
||||
if (prevActiveEntry.tree === activeTree) {
|
||||
// Fast path. The active tree hasn't changed, so we can reuse the
|
||||
// existing state.
|
||||
return prevActiveEntry;
|
||||
}
|
||||
// The route tree changed. Note that this doesn't mean that the tree changed
|
||||
// *at this level* — the change may be due to a child route. Either way, we
|
||||
// need to either add or update the router tree in the bfcache.
|
||||
//
|
||||
// The rest of the code looks more complicated than it actually is because we
|
||||
// can't mutate the state in place; we have to copy-on-write.
|
||||
// Create a new entry for the active cache key. This is the head of the new
|
||||
// linked list.
|
||||
const newActiveEntry = {
|
||||
tree: activeTree,
|
||||
stateKey: activeStateKey,
|
||||
next: null
|
||||
};
|
||||
// We need to append the old list onto the new list. If the head of the new
|
||||
// list was already present in the cache, then we'll need to clone everything
|
||||
// that came before it. Then we can reuse the rest.
|
||||
let n = 1;
|
||||
let oldEntry = prevActiveEntry;
|
||||
let clonedEntry = newActiveEntry;
|
||||
while(oldEntry !== null && n < MAX_BF_CACHE_ENTRIES){
|
||||
if (oldEntry.stateKey === activeStateKey) {
|
||||
// Fast path. This entry in the old list that corresponds to the key that
|
||||
// is now active. We've already placed a clone of this entry at the front
|
||||
// of the new list. We can reuse the rest of the old list without cloning.
|
||||
// NOTE: We don't need to worry about eviction in this case because we
|
||||
// haven't increased the size of the cache, and we assume the max size
|
||||
// is constant across renders. If we were to change it to a dynamic limit,
|
||||
// then the implementation would need to account for that.
|
||||
clonedEntry.next = oldEntry.next;
|
||||
break;
|
||||
} else {
|
||||
// Clone the entry and append it to the list.
|
||||
n++;
|
||||
const entry = {
|
||||
tree: oldEntry.tree,
|
||||
stateKey: oldEntry.stateKey,
|
||||
next: null
|
||||
};
|
||||
clonedEntry.next = entry;
|
||||
clonedEntry = entry;
|
||||
}
|
||||
oldEntry = oldEntry.next;
|
||||
}
|
||||
setPrevActiveEntry(newActiveEntry);
|
||||
return newActiveEntry;
|
||||
}
|
||||
|
||||
//# sourceMappingURL=bfcache.js.map
|
||||
1
apps/public-web/node_modules/next/dist/esm/client/components/bfcache.js.map
generated
vendored
Normal file
1
apps/public-web/node_modules/next/dist/esm/client/components/bfcache.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
90
apps/public-web/node_modules/next/dist/esm/client/components/builtin/app-error.js
generated
vendored
Normal file
90
apps/public-web/node_modules/next/dist/esm/client/components/builtin/app-error.js
generated
vendored
Normal file
@@ -0,0 +1,90 @@
|
||||
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
||||
import React from 'react';
|
||||
const styles = {
|
||||
error: {
|
||||
// https://github.com/sindresorhus/modern-normalize/blob/main/modern-normalize.css#L38-L52
|
||||
fontFamily: 'system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji"',
|
||||
height: '100vh',
|
||||
textAlign: 'center',
|
||||
display: 'flex',
|
||||
flexDirection: 'column',
|
||||
alignItems: 'center',
|
||||
justifyContent: 'center'
|
||||
},
|
||||
desc: {
|
||||
lineHeight: '48px'
|
||||
},
|
||||
h1: {
|
||||
display: 'inline-block',
|
||||
margin: '0 20px 0 0',
|
||||
paddingRight: 23,
|
||||
fontSize: 24,
|
||||
fontWeight: 500,
|
||||
verticalAlign: 'top'
|
||||
},
|
||||
h2: {
|
||||
fontSize: 14,
|
||||
fontWeight: 400,
|
||||
lineHeight: '28px'
|
||||
},
|
||||
wrap: {
|
||||
display: 'inline-block'
|
||||
}
|
||||
};
|
||||
/* CSS minified from
|
||||
body { margin: 0; color: #000; background: #fff; }
|
||||
.next-error-h1 {
|
||||
border-right: 1px solid rgba(0, 0, 0, .3);
|
||||
}
|
||||
@media (prefers-color-scheme: dark) {
|
||||
body { color: #fff; background: #000; }
|
||||
.next-error-h1 {
|
||||
border-right: 1px solid rgba(255, 255, 255, .3);
|
||||
}
|
||||
}
|
||||
*/ const themeCss = `body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}
|
||||
@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}`;
|
||||
function AppError() {
|
||||
const errorMessage = 'Internal Server Error.';
|
||||
const title = `500: ${errorMessage}`;
|
||||
return /*#__PURE__*/ _jsxs("html", {
|
||||
id: "__next_error__",
|
||||
children: [
|
||||
/*#__PURE__*/ _jsx("head", {
|
||||
children: /*#__PURE__*/ _jsx("title", {
|
||||
children: title
|
||||
})
|
||||
}),
|
||||
/*#__PURE__*/ _jsx("body", {
|
||||
children: /*#__PURE__*/ _jsx("div", {
|
||||
style: styles.error,
|
||||
children: /*#__PURE__*/ _jsxs("div", {
|
||||
style: styles.desc,
|
||||
children: [
|
||||
/*#__PURE__*/ _jsx("style", {
|
||||
dangerouslySetInnerHTML: {
|
||||
__html: themeCss
|
||||
}
|
||||
}),
|
||||
/*#__PURE__*/ _jsx("h1", {
|
||||
className: "next-error-h1",
|
||||
style: styles.h1,
|
||||
children: "500"
|
||||
}),
|
||||
/*#__PURE__*/ _jsx("div", {
|
||||
style: styles.wrap,
|
||||
children: /*#__PURE__*/ _jsx("h2", {
|
||||
style: styles.h2,
|
||||
children: errorMessage
|
||||
})
|
||||
})
|
||||
]
|
||||
})
|
||||
})
|
||||
})
|
||||
]
|
||||
});
|
||||
}
|
||||
export default AppError;
|
||||
|
||||
//# sourceMappingURL=app-error.js.map
|
||||
1
apps/public-web/node_modules/next/dist/esm/client/components/builtin/app-error.js.map
generated
vendored
Normal file
1
apps/public-web/node_modules/next/dist/esm/client/components/builtin/app-error.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../../../src/client/components/builtin/app-error.tsx"],"sourcesContent":["import React from 'react'\n\nconst styles: Record<string, React.CSSProperties> = {\n error: {\n // https://github.com/sindresorhus/modern-normalize/blob/main/modern-normalize.css#L38-L52\n fontFamily:\n 'system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"',\n height: '100vh',\n textAlign: 'center',\n display: 'flex',\n flexDirection: 'column',\n alignItems: 'center',\n justifyContent: 'center',\n },\n desc: {\n lineHeight: '48px',\n },\n h1: {\n display: 'inline-block',\n margin: '0 20px 0 0',\n paddingRight: 23,\n fontSize: 24,\n fontWeight: 500,\n verticalAlign: 'top',\n },\n h2: {\n fontSize: 14,\n fontWeight: 400,\n lineHeight: '28px',\n },\n wrap: {\n display: 'inline-block',\n },\n} as const\n\n/* CSS minified from\nbody { margin: 0; color: #000; background: #fff; }\n.next-error-h1 {\n border-right: 1px solid rgba(0, 0, 0, .3);\n}\n@media (prefers-color-scheme: dark) {\n body { color: #fff; background: #000; }\n .next-error-h1 {\n border-right: 1px solid rgba(255, 255, 255, .3);\n }\n}\n*/\nconst themeCss = `body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}\n@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}`\n\nfunction AppError() {\n const errorMessage = 'Internal Server Error.'\n const title = `500: ${errorMessage}`\n return (\n <html id=\"__next_error__\">\n <head>\n <title>{title}</title>\n </head>\n <body>\n <div style={styles.error}>\n <div style={styles.desc}>\n <style\n dangerouslySetInnerHTML={{\n __html: themeCss,\n }}\n />\n <h1 className=\"next-error-h1\" style={styles.h1}>\n 500\n </h1>\n <div style={styles.wrap}>\n <h2 style={styles.h2}>{errorMessage}</h2>\n </div>\n </div>\n </div>\n </body>\n </html>\n )\n}\n\nexport default AppError\n"],"names":["React","styles","error","fontFamily","height","textAlign","display","flexDirection","alignItems","justifyContent","desc","lineHeight","h1","margin","paddingRight","fontSize","fontWeight","verticalAlign","h2","wrap","themeCss","AppError","errorMessage","title","html","id","head","body","div","style","dangerouslySetInnerHTML","__html","className"],"mappings":";AAAA,OAAOA,WAAW,QAAO;AAEzB,MAAMC,SAA8C;IAClDC,OAAO;QACL,0FAA0F;QAC1FC,YACE;QACFC,QAAQ;QACRC,WAAW;QACXC,SAAS;QACTC,eAAe;QACfC,YAAY;QACZC,gBAAgB;IAClB;IACAC,MAAM;QACJC,YAAY;IACd;IACAC,IAAI;QACFN,SAAS;QACTO,QAAQ;QACRC,cAAc;QACdC,UAAU;QACVC,YAAY;QACZC,eAAe;IACjB;IACAC,IAAI;QACFH,UAAU;QACVC,YAAY;QACZL,YAAY;IACd;IACAQ,MAAM;QACJb,SAAS;IACX;AACF;AAEA;;;;;;;;;;;AAWA,GACA,MAAMc,WAAW,CAAC;+HAC6G,CAAC;AAEhI,SAASC;IACP,MAAMC,eAAe;IACrB,MAAMC,QAAQ,CAAC,KAAK,EAAED,cAAc;IACpC,qBACE,MAACE;QAAKC,IAAG;;0BACP,KAACC;0BACC,cAAA,KAACH;8BAAOA;;;0BAEV,KAACI;0BACC,cAAA,KAACC;oBAAIC,OAAO5B,OAAOC,KAAK;8BACtB,cAAA,MAAC0B;wBAAIC,OAAO5B,OAAOS,IAAI;;0CACrB,KAACmB;gCACCC,yBAAyB;oCACvBC,QAAQX;gCACV;;0CAEF,KAACR;gCAAGoB,WAAU;gCAAgBH,OAAO5B,OAAOW,EAAE;0CAAE;;0CAGhD,KAACgB;gCAAIC,OAAO5B,OAAOkB,IAAI;0CACrB,cAAA,KAACD;oCAAGW,OAAO5B,OAAOiB,EAAE;8CAAGI;;;;;;;;;AAOrC;AAEA,eAAeD,SAAQ","ignoreList":[0]}
|
||||
6
apps/public-web/node_modules/next/dist/esm/client/components/builtin/default-null.js
generated
vendored
Normal file
6
apps/public-web/node_modules/next/dist/esm/client/components/builtin/default-null.js
generated
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
export const PARALLEL_ROUTE_DEFAULT_NULL_PATH = 'next/dist/client/components/builtin/default-null.js';
|
||||
export default function ParallelRouteDefaultNull() {
|
||||
return null;
|
||||
}
|
||||
|
||||
//# sourceMappingURL=default-null.js.map
|
||||
1
apps/public-web/node_modules/next/dist/esm/client/components/builtin/default-null.js.map
generated
vendored
Normal file
1
apps/public-web/node_modules/next/dist/esm/client/components/builtin/default-null.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../../../src/client/components/builtin/default-null.tsx"],"sourcesContent":["export const PARALLEL_ROUTE_DEFAULT_NULL_PATH =\n 'next/dist/client/components/builtin/default-null.js'\n\nexport default function ParallelRouteDefaultNull() {\n return null\n}\n"],"names":["PARALLEL_ROUTE_DEFAULT_NULL_PATH","ParallelRouteDefaultNull"],"mappings":"AAAA,OAAO,MAAMA,mCACX,sDAAqD;AAEvD,eAAe,SAASC;IACtB,OAAO;AACT","ignoreList":[0]}
|
||||
7
apps/public-web/node_modules/next/dist/esm/client/components/builtin/default.js
generated
vendored
Normal file
7
apps/public-web/node_modules/next/dist/esm/client/components/builtin/default.js
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
import { notFound } from '../not-found';
|
||||
export const PARALLEL_ROUTE_DEFAULT_PATH = 'next/dist/client/components/builtin/default.js';
|
||||
export default function ParallelRouteDefault() {
|
||||
notFound();
|
||||
}
|
||||
|
||||
//# sourceMappingURL=default.js.map
|
||||
1
apps/public-web/node_modules/next/dist/esm/client/components/builtin/default.js.map
generated
vendored
Normal file
1
apps/public-web/node_modules/next/dist/esm/client/components/builtin/default.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../../../src/client/components/builtin/default.tsx"],"sourcesContent":["import { notFound } from '../not-found'\n\nexport const PARALLEL_ROUTE_DEFAULT_PATH =\n 'next/dist/client/components/builtin/default.js'\n\nexport default function ParallelRouteDefault() {\n notFound()\n}\n"],"names":["notFound","PARALLEL_ROUTE_DEFAULT_PATH","ParallelRouteDefault"],"mappings":"AAAA,SAASA,QAAQ,QAAQ,eAAc;AAEvC,OAAO,MAAMC,8BACX,iDAAgD;AAElD,eAAe,SAASC;IACtBF;AACF","ignoreList":[0]}
|
||||
5
apps/public-web/node_modules/next/dist/esm/client/components/builtin/empty-stub.js
generated
vendored
Normal file
5
apps/public-web/node_modules/next/dist/esm/client/components/builtin/empty-stub.js
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
export default function Empty() {
|
||||
return null;
|
||||
}
|
||||
|
||||
//# sourceMappingURL=empty-stub.js.map
|
||||
1
apps/public-web/node_modules/next/dist/esm/client/components/builtin/empty-stub.js.map
generated
vendored
Normal file
1
apps/public-web/node_modules/next/dist/esm/client/components/builtin/empty-stub.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../../../src/client/components/builtin/empty-stub.tsx"],"sourcesContent":["export default function Empty() {\n return null\n}\n"],"names":["Empty"],"mappings":"AAAA,eAAe,SAASA;IACtB,OAAO;AACT","ignoreList":[0]}
|
||||
10
apps/public-web/node_modules/next/dist/esm/client/components/builtin/forbidden.js
generated
vendored
Normal file
10
apps/public-web/node_modules/next/dist/esm/client/components/builtin/forbidden.js
generated
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
import { jsx as _jsx } from "react/jsx-runtime";
|
||||
import { HTTPAccessErrorFallback } from '../http-access-fallback/error-fallback';
|
||||
export default function Forbidden() {
|
||||
return /*#__PURE__*/ _jsx(HTTPAccessErrorFallback, {
|
||||
status: 403,
|
||||
message: "This page could not be accessed."
|
||||
});
|
||||
}
|
||||
|
||||
//# sourceMappingURL=forbidden.js.map
|
||||
1
apps/public-web/node_modules/next/dist/esm/client/components/builtin/forbidden.js.map
generated
vendored
Normal file
1
apps/public-web/node_modules/next/dist/esm/client/components/builtin/forbidden.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../../../src/client/components/builtin/forbidden.tsx"],"sourcesContent":["import { HTTPAccessErrorFallback } from '../http-access-fallback/error-fallback'\n\nexport default function Forbidden() {\n return (\n <HTTPAccessErrorFallback\n status={403}\n message=\"This page could not be accessed.\"\n />\n )\n}\n"],"names":["HTTPAccessErrorFallback","Forbidden","status","message"],"mappings":";AAAA,SAASA,uBAAuB,QAAQ,yCAAwC;AAEhF,eAAe,SAASC;IACtB,qBACE,KAACD;QACCE,QAAQ;QACRC,SAAQ;;AAGd","ignoreList":[0]}
|
||||
66
apps/public-web/node_modules/next/dist/esm/client/components/builtin/global-error.js
generated
vendored
Normal file
66
apps/public-web/node_modules/next/dist/esm/client/components/builtin/global-error.js
generated
vendored
Normal file
@@ -0,0 +1,66 @@
|
||||
'use client';
|
||||
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
||||
import { HandleISRError } from '../handle-isr-error';
|
||||
const styles = {
|
||||
error: {
|
||||
// https://github.com/sindresorhus/modern-normalize/blob/main/modern-normalize.css#L38-L52
|
||||
fontFamily: 'system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji"',
|
||||
height: '100vh',
|
||||
textAlign: 'center',
|
||||
display: 'flex',
|
||||
flexDirection: 'column',
|
||||
alignItems: 'center',
|
||||
justifyContent: 'center'
|
||||
},
|
||||
text: {
|
||||
fontSize: '14px',
|
||||
fontWeight: 400,
|
||||
lineHeight: '28px',
|
||||
margin: '0 8px'
|
||||
}
|
||||
};
|
||||
function DefaultGlobalError({ error }) {
|
||||
const digest = error?.digest;
|
||||
return /*#__PURE__*/ _jsxs("html", {
|
||||
id: "__next_error__",
|
||||
children: [
|
||||
/*#__PURE__*/ _jsx("head", {}),
|
||||
/*#__PURE__*/ _jsxs("body", {
|
||||
children: [
|
||||
/*#__PURE__*/ _jsx(HandleISRError, {
|
||||
error: error
|
||||
}),
|
||||
/*#__PURE__*/ _jsx("div", {
|
||||
style: styles.error,
|
||||
children: /*#__PURE__*/ _jsxs("div", {
|
||||
children: [
|
||||
/*#__PURE__*/ _jsxs("h2", {
|
||||
style: styles.text,
|
||||
children: [
|
||||
"Application error: a ",
|
||||
digest ? 'server' : 'client',
|
||||
"-side exception has occurred while loading ",
|
||||
window.location.hostname,
|
||||
" (see the",
|
||||
' ',
|
||||
digest ? 'server logs' : 'browser console',
|
||||
" for more information)."
|
||||
]
|
||||
}),
|
||||
digest ? /*#__PURE__*/ _jsx("p", {
|
||||
style: styles.text,
|
||||
children: `Digest: ${digest}`
|
||||
}) : null
|
||||
]
|
||||
})
|
||||
})
|
||||
]
|
||||
})
|
||||
]
|
||||
});
|
||||
}
|
||||
// Exported so that the import signature in the loaders can be identical to user
|
||||
// supplied custom global error signatures.
|
||||
export default DefaultGlobalError;
|
||||
|
||||
//# sourceMappingURL=global-error.js.map
|
||||
1
apps/public-web/node_modules/next/dist/esm/client/components/builtin/global-error.js.map
generated
vendored
Normal file
1
apps/public-web/node_modules/next/dist/esm/client/components/builtin/global-error.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../../../src/client/components/builtin/global-error.tsx"],"sourcesContent":["'use client'\n\nimport { HandleISRError } from '../handle-isr-error'\n\nconst styles = {\n error: {\n // https://github.com/sindresorhus/modern-normalize/blob/main/modern-normalize.css#L38-L52\n fontFamily:\n 'system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"',\n height: '100vh',\n textAlign: 'center',\n display: 'flex',\n flexDirection: 'column',\n alignItems: 'center',\n justifyContent: 'center',\n },\n text: {\n fontSize: '14px',\n fontWeight: 400,\n lineHeight: '28px',\n margin: '0 8px',\n },\n} as const\n\nexport type GlobalErrorComponent = React.ComponentType<{\n error: any\n}>\nfunction DefaultGlobalError({ error }: { error: any }) {\n const digest: string | undefined = error?.digest\n return (\n <html id=\"__next_error__\">\n <head></head>\n <body>\n <HandleISRError error={error} />\n <div style={styles.error}>\n <div>\n <h2 style={styles.text}>\n Application error: a {digest ? 'server' : 'client'}-side exception\n has occurred while loading {window.location.hostname} (see the{' '}\n {digest ? 'server logs' : 'browser console'} for more\n information).\n </h2>\n {digest ? <p style={styles.text}>{`Digest: ${digest}`}</p> : null}\n </div>\n </div>\n </body>\n </html>\n )\n}\n\n// Exported so that the import signature in the loaders can be identical to user\n// supplied custom global error signatures.\nexport default DefaultGlobalError\n"],"names":["HandleISRError","styles","error","fontFamily","height","textAlign","display","flexDirection","alignItems","justifyContent","text","fontSize","fontWeight","lineHeight","margin","DefaultGlobalError","digest","html","id","head","body","div","style","h2","window","location","hostname","p"],"mappings":"AAAA;;AAEA,SAASA,cAAc,QAAQ,sBAAqB;AAEpD,MAAMC,SAAS;IACbC,OAAO;QACL,0FAA0F;QAC1FC,YACE;QACFC,QAAQ;QACRC,WAAW;QACXC,SAAS;QACTC,eAAe;QACfC,YAAY;QACZC,gBAAgB;IAClB;IACAC,MAAM;QACJC,UAAU;QACVC,YAAY;QACZC,YAAY;QACZC,QAAQ;IACV;AACF;AAKA,SAASC,mBAAmB,EAAEb,KAAK,EAAkB;IACnD,MAAMc,SAA6Bd,OAAOc;IAC1C,qBACE,MAACC;QAAKC,IAAG;;0BACP,KAACC;0BACD,MAACC;;kCACC,KAACpB;wBAAeE,OAAOA;;kCACvB,KAACmB;wBAAIC,OAAOrB,OAAOC,KAAK;kCACtB,cAAA,MAACmB;;8CACC,MAACE;oCAAGD,OAAOrB,OAAOS,IAAI;;wCAAE;wCACAM,SAAS,WAAW;wCAAS;wCACvBQ,OAAOC,QAAQ,CAACC,QAAQ;wCAAC;wCAAU;wCAC9DV,SAAS,gBAAgB;wCAAkB;;;gCAG7CA,uBAAS,KAACW;oCAAEL,OAAOrB,OAAOS,IAAI;8CAAG,CAAC,QAAQ,EAAEM,QAAQ;qCAAQ;;;;;;;;AAMzE;AAEA,gFAAgF;AAChF,2CAA2C;AAC3C,eAAeD,mBAAkB","ignoreList":[0]}
|
||||
15
apps/public-web/node_modules/next/dist/esm/client/components/builtin/global-not-found.js
generated
vendored
Normal file
15
apps/public-web/node_modules/next/dist/esm/client/components/builtin/global-not-found.js
generated
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
import { jsx as _jsx } from "react/jsx-runtime";
|
||||
import { HTTPAccessErrorFallback } from '../http-access-fallback/error-fallback';
|
||||
function GlobalNotFound() {
|
||||
return /*#__PURE__*/ _jsx("html", {
|
||||
children: /*#__PURE__*/ _jsx("body", {
|
||||
children: /*#__PURE__*/ _jsx(HTTPAccessErrorFallback, {
|
||||
status: 404,
|
||||
message: 'This page could not be found.'
|
||||
})
|
||||
})
|
||||
});
|
||||
}
|
||||
export default GlobalNotFound;
|
||||
|
||||
//# sourceMappingURL=global-not-found.js.map
|
||||
1
apps/public-web/node_modules/next/dist/esm/client/components/builtin/global-not-found.js.map
generated
vendored
Normal file
1
apps/public-web/node_modules/next/dist/esm/client/components/builtin/global-not-found.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../../../src/client/components/builtin/global-not-found.tsx"],"sourcesContent":["import { HTTPAccessErrorFallback } from '../http-access-fallback/error-fallback'\n\nfunction GlobalNotFound() {\n return (\n <html>\n <body>\n <HTTPAccessErrorFallback\n status={404}\n message={'This page could not be found.'}\n />\n </body>\n </html>\n )\n}\n\nexport default GlobalNotFound\n"],"names":["HTTPAccessErrorFallback","GlobalNotFound","html","body","status","message"],"mappings":";AAAA,SAASA,uBAAuB,QAAQ,yCAAwC;AAEhF,SAASC;IACP,qBACE,KAACC;kBACC,cAAA,KAACC;sBACC,cAAA,KAACH;gBACCI,QAAQ;gBACRC,SAAS;;;;AAKnB;AAEA,eAAeJ,eAAc","ignoreList":[0]}
|
||||
11
apps/public-web/node_modules/next/dist/esm/client/components/builtin/layout.js
generated
vendored
Normal file
11
apps/public-web/node_modules/next/dist/esm/client/components/builtin/layout.js
generated
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
import { jsx as _jsx } from "react/jsx-runtime";
|
||||
import React from 'react';
|
||||
export default function DefaultLayout({ children }) {
|
||||
return /*#__PURE__*/ _jsx("html", {
|
||||
children: /*#__PURE__*/ _jsx("body", {
|
||||
children: children
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
//# sourceMappingURL=layout.js.map
|
||||
1
apps/public-web/node_modules/next/dist/esm/client/components/builtin/layout.js.map
generated
vendored
Normal file
1
apps/public-web/node_modules/next/dist/esm/client/components/builtin/layout.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../../../src/client/components/builtin/layout.tsx"],"sourcesContent":["import React from 'react'\n\nexport default function DefaultLayout({\n children,\n}: {\n children: React.ReactNode\n}) {\n return (\n <html>\n <body>{children}</body>\n </html>\n )\n}\n"],"names":["React","DefaultLayout","children","html","body"],"mappings":";AAAA,OAAOA,WAAW,QAAO;AAEzB,eAAe,SAASC,cAAc,EACpCC,QAAQ,EAGT;IACC,qBACE,KAACC;kBACC,cAAA,KAACC;sBAAMF;;;AAGb","ignoreList":[0]}
|
||||
10
apps/public-web/node_modules/next/dist/esm/client/components/builtin/not-found.js
generated
vendored
Normal file
10
apps/public-web/node_modules/next/dist/esm/client/components/builtin/not-found.js
generated
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
import { jsx as _jsx } from "react/jsx-runtime";
|
||||
import { HTTPAccessErrorFallback } from '../http-access-fallback/error-fallback';
|
||||
export default function NotFound() {
|
||||
return /*#__PURE__*/ _jsx(HTTPAccessErrorFallback, {
|
||||
status: 404,
|
||||
message: "This page could not be found."
|
||||
});
|
||||
}
|
||||
|
||||
//# sourceMappingURL=not-found.js.map
|
||||
1
apps/public-web/node_modules/next/dist/esm/client/components/builtin/not-found.js.map
generated
vendored
Normal file
1
apps/public-web/node_modules/next/dist/esm/client/components/builtin/not-found.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../../../src/client/components/builtin/not-found.tsx"],"sourcesContent":["import { HTTPAccessErrorFallback } from '../http-access-fallback/error-fallback'\n\nexport default function NotFound() {\n return (\n <HTTPAccessErrorFallback\n status={404}\n message=\"This page could not be found.\"\n />\n )\n}\n"],"names":["HTTPAccessErrorFallback","NotFound","status","message"],"mappings":";AAAA,SAASA,uBAAuB,QAAQ,yCAAwC;AAEhF,eAAe,SAASC;IACtB,qBACE,KAACD;QACCE,QAAQ;QACRC,SAAQ;;AAGd","ignoreList":[0]}
|
||||
10
apps/public-web/node_modules/next/dist/esm/client/components/builtin/unauthorized.js
generated
vendored
Normal file
10
apps/public-web/node_modules/next/dist/esm/client/components/builtin/unauthorized.js
generated
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
import { jsx as _jsx } from "react/jsx-runtime";
|
||||
import { HTTPAccessErrorFallback } from '../http-access-fallback/error-fallback';
|
||||
export default function Unauthorized() {
|
||||
return /*#__PURE__*/ _jsx(HTTPAccessErrorFallback, {
|
||||
status: 401,
|
||||
message: "You're not authorized to access this page."
|
||||
});
|
||||
}
|
||||
|
||||
//# sourceMappingURL=unauthorized.js.map
|
||||
1
apps/public-web/node_modules/next/dist/esm/client/components/builtin/unauthorized.js.map
generated
vendored
Normal file
1
apps/public-web/node_modules/next/dist/esm/client/components/builtin/unauthorized.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../../../src/client/components/builtin/unauthorized.tsx"],"sourcesContent":["import { HTTPAccessErrorFallback } from '../http-access-fallback/error-fallback'\n\nexport default function Unauthorized() {\n return (\n <HTTPAccessErrorFallback\n status={401}\n message=\"You're not authorized to access this page.\"\n />\n )\n}\n"],"names":["HTTPAccessErrorFallback","Unauthorized","status","message"],"mappings":";AAAA,SAASA,uBAAuB,QAAQ,yCAAwC;AAEhF,eAAe,SAASC;IACtB,qBACE,KAACD;QACCE,QAAQ;QACRC,SAAQ;;AAGd","ignoreList":[0]}
|
||||
67
apps/public-web/node_modules/next/dist/esm/client/components/client-page.js
generated
vendored
Normal file
67
apps/public-web/node_modules/next/dist/esm/client/components/client-page.js
generated
vendored
Normal file
@@ -0,0 +1,67 @@
|
||||
'use client';
|
||||
import { jsx as _jsx } from "react/jsx-runtime";
|
||||
import { InvariantError } from '../../shared/lib/invariant-error';
|
||||
import { LayoutRouterContext } from '../../shared/lib/app-router-context.shared-runtime';
|
||||
import { use } from 'react';
|
||||
import { urlSearchParamsToParsedUrlQuery } from '../route-params';
|
||||
import { SearchParamsContext } from '../../shared/lib/hooks-client-context.shared-runtime';
|
||||
/**
|
||||
* When the Page is a client component we send the params and searchParams to this client wrapper
|
||||
* where they are turned into dynamically tracked values before being passed to the actual Page component.
|
||||
*
|
||||
* additionally we may send promises representing the params and searchParams. We don't ever use these passed
|
||||
* values but it can be necessary for the sender to send a Promise that doesn't resolve in certain situations.
|
||||
* It is up to the caller to decide if the promises are needed.
|
||||
*/ export function ClientPageRoot({ Component, serverProvidedParams }) {
|
||||
let searchParams;
|
||||
let params;
|
||||
if (serverProvidedParams !== null) {
|
||||
searchParams = serverProvidedParams.searchParams;
|
||||
params = serverProvidedParams.params;
|
||||
} else {
|
||||
// When Cache Components is enabled, the server does not pass the params as
|
||||
// props; they are parsed on the client and passed via context.
|
||||
const layoutRouterContext = use(LayoutRouterContext);
|
||||
params = layoutRouterContext !== null ? layoutRouterContext.parentParams : {};
|
||||
// This is an intentional behavior change: when Cache Components is enabled,
|
||||
// client segments receive the "canonical" search params, not the
|
||||
// rewritten ones. Users should either call useSearchParams directly or pass
|
||||
// the rewritten ones in from a Server Component.
|
||||
// TODO: Log a deprecation error when this object is accessed
|
||||
searchParams = urlSearchParamsToParsedUrlQuery(use(SearchParamsContext));
|
||||
}
|
||||
if (typeof window === 'undefined') {
|
||||
const { workAsyncStorage } = require('../../server/app-render/work-async-storage.external');
|
||||
let clientSearchParams;
|
||||
let clientParams;
|
||||
// We are going to instrument the searchParams prop with tracking for the
|
||||
// appropriate context. We wrap differently in prerendering vs rendering
|
||||
const store = workAsyncStorage.getStore();
|
||||
if (!store) {
|
||||
throw Object.defineProperty(new InvariantError('Expected workStore to exist when handling searchParams in a client Page.'), "__NEXT_ERROR_CODE", {
|
||||
value: "E564",
|
||||
enumerable: false,
|
||||
configurable: true
|
||||
});
|
||||
}
|
||||
const { createSearchParamsFromClient } = require('../../server/request/search-params');
|
||||
clientSearchParams = createSearchParamsFromClient(searchParams, store);
|
||||
const { createParamsFromClient } = require('../../server/request/params');
|
||||
clientParams = createParamsFromClient(params, store);
|
||||
return /*#__PURE__*/ _jsx(Component, {
|
||||
params: clientParams,
|
||||
searchParams: clientSearchParams
|
||||
});
|
||||
} else {
|
||||
const { createRenderSearchParamsFromClient } = require('../request/search-params.browser');
|
||||
const clientSearchParams = createRenderSearchParamsFromClient(searchParams);
|
||||
const { createRenderParamsFromClient } = require('../request/params.browser');
|
||||
const clientParams = createRenderParamsFromClient(params);
|
||||
return /*#__PURE__*/ _jsx(Component, {
|
||||
params: clientParams,
|
||||
searchParams: clientSearchParams
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
//# sourceMappingURL=client-page.js.map
|
||||
1
apps/public-web/node_modules/next/dist/esm/client/components/client-page.js.map
generated
vendored
Normal file
1
apps/public-web/node_modules/next/dist/esm/client/components/client-page.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
52
apps/public-web/node_modules/next/dist/esm/client/components/client-segment.js
generated
vendored
Normal file
52
apps/public-web/node_modules/next/dist/esm/client/components/client-segment.js
generated
vendored
Normal file
@@ -0,0 +1,52 @@
|
||||
'use client';
|
||||
import { jsx as _jsx } from "react/jsx-runtime";
|
||||
import { InvariantError } from '../../shared/lib/invariant-error';
|
||||
import { LayoutRouterContext } from '../../shared/lib/app-router-context.shared-runtime';
|
||||
import { use } from 'react';
|
||||
/**
|
||||
* When the Page is a client component we send the params to this client wrapper
|
||||
* where they are turned into dynamically tracked values before being passed to the actual Segment component.
|
||||
*
|
||||
* additionally we may send a promise representing params. We don't ever use this passed
|
||||
* value but it can be necessary for the sender to send a Promise that doesn't resolve in certain situations
|
||||
* such as when cacheComponents is enabled. It is up to the caller to decide if the promises are needed.
|
||||
*/ export function ClientSegmentRoot({ Component, slots, serverProvidedParams }) {
|
||||
let params;
|
||||
if (serverProvidedParams !== null) {
|
||||
params = serverProvidedParams.params;
|
||||
} else {
|
||||
// When Cache Components is enabled, the server does not pass the params
|
||||
// as props; they are parsed on the client and passed via context.
|
||||
const layoutRouterContext = use(LayoutRouterContext);
|
||||
params = layoutRouterContext !== null ? layoutRouterContext.parentParams : {};
|
||||
}
|
||||
if (typeof window === 'undefined') {
|
||||
const { workAsyncStorage } = require('../../server/app-render/work-async-storage.external');
|
||||
let clientParams;
|
||||
// We are going to instrument the searchParams prop with tracking for the
|
||||
// appropriate context. We wrap differently in prerendering vs rendering
|
||||
const store = workAsyncStorage.getStore();
|
||||
if (!store) {
|
||||
throw Object.defineProperty(new InvariantError('Expected workStore to exist when handling params in a client segment such as a Layout or Template.'), "__NEXT_ERROR_CODE", {
|
||||
value: "E600",
|
||||
enumerable: false,
|
||||
configurable: true
|
||||
});
|
||||
}
|
||||
const { createParamsFromClient } = require('../../server/request/params');
|
||||
clientParams = createParamsFromClient(params, store);
|
||||
return /*#__PURE__*/ _jsx(Component, {
|
||||
...slots,
|
||||
params: clientParams
|
||||
});
|
||||
} else {
|
||||
const { createRenderParamsFromClient } = require('../request/params.browser');
|
||||
const clientParams = createRenderParamsFromClient(params);
|
||||
return /*#__PURE__*/ _jsx(Component, {
|
||||
...slots,
|
||||
params: clientParams
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
//# sourceMappingURL=client-segment.js.map
|
||||
1
apps/public-web/node_modules/next/dist/esm/client/components/client-segment.js.map
generated
vendored
Normal file
1
apps/public-web/node_modules/next/dist/esm/client/components/client-segment.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../../src/client/components/client-segment.tsx"],"sourcesContent":["'use client'\n\nimport { InvariantError } from '../../shared/lib/invariant-error'\n\nimport type { Params } from '../../server/request/params'\nimport { LayoutRouterContext } from '../../shared/lib/app-router-context.shared-runtime'\nimport { use } from 'react'\n\n/**\n * When the Page is a client component we send the params to this client wrapper\n * where they are turned into dynamically tracked values before being passed to the actual Segment component.\n *\n * additionally we may send a promise representing params. We don't ever use this passed\n * value but it can be necessary for the sender to send a Promise that doesn't resolve in certain situations\n * such as when cacheComponents is enabled. It is up to the caller to decide if the promises are needed.\n */\nexport function ClientSegmentRoot({\n Component,\n slots,\n serverProvidedParams,\n}: {\n Component: React.ComponentType<any>\n slots: { [key: string]: React.ReactNode }\n serverProvidedParams: null | {\n params: Params\n promises: Array<Promise<any>> | null\n }\n}) {\n let params: Params\n if (serverProvidedParams !== null) {\n params = serverProvidedParams.params\n } else {\n // When Cache Components is enabled, the server does not pass the params\n // as props; they are parsed on the client and passed via context.\n const layoutRouterContext = use(LayoutRouterContext)\n params =\n layoutRouterContext !== null ? layoutRouterContext.parentParams : {}\n }\n\n if (typeof window === 'undefined') {\n const { workAsyncStorage } =\n require('../../server/app-render/work-async-storage.external') as typeof import('../../server/app-render/work-async-storage.external')\n\n let clientParams: Promise<Params>\n // We are going to instrument the searchParams prop with tracking for the\n // appropriate context. We wrap differently in prerendering vs rendering\n const store = workAsyncStorage.getStore()\n if (!store) {\n throw new InvariantError(\n 'Expected workStore to exist when handling params in a client segment such as a Layout or Template.'\n )\n }\n\n const { createParamsFromClient } =\n require('../../server/request/params') as typeof import('../../server/request/params')\n clientParams = createParamsFromClient(params, store)\n\n return <Component {...slots} params={clientParams} />\n } else {\n const { createRenderParamsFromClient } =\n require('../request/params.browser') as typeof import('../request/params.browser')\n const clientParams = createRenderParamsFromClient(params)\n return <Component {...slots} params={clientParams} />\n }\n}\n"],"names":["InvariantError","LayoutRouterContext","use","ClientSegmentRoot","Component","slots","serverProvidedParams","params","layoutRouterContext","parentParams","window","workAsyncStorage","require","clientParams","store","getStore","createParamsFromClient","createRenderParamsFromClient"],"mappings":"AAAA;;AAEA,SAASA,cAAc,QAAQ,mCAAkC;AAGjE,SAASC,mBAAmB,QAAQ,qDAAoD;AACxF,SAASC,GAAG,QAAQ,QAAO;AAE3B;;;;;;;CAOC,GACD,OAAO,SAASC,kBAAkB,EAChCC,SAAS,EACTC,KAAK,EACLC,oBAAoB,EAQrB;IACC,IAAIC;IACJ,IAAID,yBAAyB,MAAM;QACjCC,SAASD,qBAAqBC,MAAM;IACtC,OAAO;QACL,wEAAwE;QACxE,kEAAkE;QAClE,MAAMC,sBAAsBN,IAAID;QAChCM,SACEC,wBAAwB,OAAOA,oBAAoBC,YAAY,GAAG,CAAC;IACvE;IAEA,IAAI,OAAOC,WAAW,aAAa;QACjC,MAAM,EAAEC,gBAAgB,EAAE,GACxBC,QAAQ;QAEV,IAAIC;QACJ,yEAAyE;QACzE,wEAAwE;QACxE,MAAMC,QAAQH,iBAAiBI,QAAQ;QACvC,IAAI,CAACD,OAAO;YACV,MAAM,qBAEL,CAFK,IAAId,eACR,uGADI,qBAAA;uBAAA;4BAAA;8BAAA;YAEN;QACF;QAEA,MAAM,EAAEgB,sBAAsB,EAAE,GAC9BJ,QAAQ;QACVC,eAAeG,uBAAuBT,QAAQO;QAE9C,qBAAO,KAACV;YAAW,GAAGC,KAAK;YAAEE,QAAQM;;IACvC,OAAO;QACL,MAAM,EAAEI,4BAA4B,EAAE,GACpCL,QAAQ;QACV,MAAMC,eAAeI,6BAA6BV;QAClD,qBAAO,KAACH;YAAW,GAAGC,KAAK;YAAEE,QAAQM;;IACvC;AACF","ignoreList":[0]}
|
||||
24
apps/public-web/node_modules/next/dist/esm/client/components/dev-root-http-access-fallback-boundary.js
generated
vendored
Normal file
24
apps/public-web/node_modules/next/dist/esm/client/components/dev-root-http-access-fallback-boundary.js
generated
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
'use client';
|
||||
import { jsx as _jsx } from "react/jsx-runtime";
|
||||
import React from 'react';
|
||||
import { HTTPAccessFallbackBoundary } from './http-access-fallback/error-boundary';
|
||||
// TODO: error on using forbidden and unauthorized in root layout
|
||||
export function bailOnRootNotFound() {
|
||||
throw Object.defineProperty(new Error('notFound() is not allowed to use in root layout'), "__NEXT_ERROR_CODE", {
|
||||
value: "E192",
|
||||
enumerable: false,
|
||||
configurable: true
|
||||
});
|
||||
}
|
||||
function NotAllowedRootHTTPFallbackError() {
|
||||
bailOnRootNotFound();
|
||||
return null;
|
||||
}
|
||||
export function DevRootHTTPAccessFallbackBoundary({ children }) {
|
||||
return /*#__PURE__*/ _jsx(HTTPAccessFallbackBoundary, {
|
||||
notFound: /*#__PURE__*/ _jsx(NotAllowedRootHTTPFallbackError, {}),
|
||||
children: children
|
||||
});
|
||||
}
|
||||
|
||||
//# sourceMappingURL=dev-root-http-access-fallback-boundary.js.map
|
||||
1
apps/public-web/node_modules/next/dist/esm/client/components/dev-root-http-access-fallback-boundary.js.map
generated
vendored
Normal file
1
apps/public-web/node_modules/next/dist/esm/client/components/dev-root-http-access-fallback-boundary.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../../src/client/components/dev-root-http-access-fallback-boundary.tsx"],"sourcesContent":["'use client'\n\nimport React from 'react'\nimport { HTTPAccessFallbackBoundary } from './http-access-fallback/error-boundary'\n\n// TODO: error on using forbidden and unauthorized in root layout\nexport function bailOnRootNotFound() {\n throw new Error('notFound() is not allowed to use in root layout')\n}\n\nfunction NotAllowedRootHTTPFallbackError() {\n bailOnRootNotFound()\n return null\n}\n\nexport function DevRootHTTPAccessFallbackBoundary({\n children,\n}: {\n children: React.ReactNode\n}) {\n return (\n <HTTPAccessFallbackBoundary notFound={<NotAllowedRootHTTPFallbackError />}>\n {children}\n </HTTPAccessFallbackBoundary>\n )\n}\n"],"names":["React","HTTPAccessFallbackBoundary","bailOnRootNotFound","Error","NotAllowedRootHTTPFallbackError","DevRootHTTPAccessFallbackBoundary","children","notFound"],"mappings":"AAAA;;AAEA,OAAOA,WAAW,QAAO;AACzB,SAASC,0BAA0B,QAAQ,wCAAuC;AAElF,iEAAiE;AACjE,OAAO,SAASC;IACd,MAAM,qBAA4D,CAA5D,IAAIC,MAAM,oDAAV,qBAAA;eAAA;oBAAA;sBAAA;IAA2D;AACnE;AAEA,SAASC;IACPF;IACA,OAAO;AACT;AAEA,OAAO,SAASG,kCAAkC,EAChDC,QAAQ,EAGT;IACC,qBACE,KAACL;QAA2BM,wBAAU,KAACH;kBACpCE;;AAGP","ignoreList":[0]}
|
||||
111
apps/public-web/node_modules/next/dist/esm/client/components/error-boundary.js
generated
vendored
Normal file
111
apps/public-web/node_modules/next/dist/esm/client/components/error-boundary.js
generated
vendored
Normal file
@@ -0,0 +1,111 @@
|
||||
'use client';
|
||||
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
||||
import React from 'react';
|
||||
import { useUntrackedPathname } from './navigation-untracked';
|
||||
import { isNextRouterError } from './is-next-router-error';
|
||||
import { handleHardNavError } from './nav-failure-handler';
|
||||
import { HandleISRError } from './handle-isr-error';
|
||||
import { isBot } from '../../shared/lib/router/utils/is-bot';
|
||||
const isBotUserAgent = typeof window !== 'undefined' && isBot(window.navigator.userAgent);
|
||||
export class ErrorBoundaryHandler extends React.Component {
|
||||
constructor(props){
|
||||
super(props), this.reset = ()=>{
|
||||
this.setState({
|
||||
error: null
|
||||
});
|
||||
};
|
||||
this.state = {
|
||||
error: null,
|
||||
previousPathname: this.props.pathname
|
||||
};
|
||||
}
|
||||
static getDerivedStateFromError(error) {
|
||||
if (isNextRouterError(error)) {
|
||||
// Re-throw if an expected internal Next.js router error occurs
|
||||
// this means it should be handled by a different boundary (such as a NotFound boundary in a parent segment)
|
||||
throw error;
|
||||
}
|
||||
return {
|
||||
error
|
||||
};
|
||||
}
|
||||
static getDerivedStateFromProps(props, state) {
|
||||
const { error } = state;
|
||||
// if we encounter an error while
|
||||
// a navigation is pending we shouldn't render
|
||||
// the error boundary and instead should fallback
|
||||
// to a hard navigation to attempt recovering
|
||||
if (process.env.__NEXT_APP_NAV_FAIL_HANDLING) {
|
||||
if (error && handleHardNavError(error)) {
|
||||
// clear error so we don't render anything
|
||||
return {
|
||||
error: null,
|
||||
previousPathname: props.pathname
|
||||
};
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Handles reset of the error boundary when a navigation happens.
|
||||
* Ensures the error boundary does not stay enabled when navigating to a new page.
|
||||
* Approach of setState in render is safe as it checks the previous pathname and then overrides
|
||||
* it as outlined in https://react.dev/reference/react/useState#storing-information-from-previous-renders
|
||||
*/ if (props.pathname !== state.previousPathname && state.error) {
|
||||
return {
|
||||
error: null,
|
||||
previousPathname: props.pathname
|
||||
};
|
||||
}
|
||||
return {
|
||||
error: state.error,
|
||||
previousPathname: props.pathname
|
||||
};
|
||||
}
|
||||
// Explicit type is needed to avoid the generated `.d.ts` having a wide return type that could be specific to the `@types/react` version.
|
||||
render() {
|
||||
//When it's bot request, segment level error boundary will keep rendering the children,
|
||||
// the final error will be caught by the root error boundary and determine wether need to apply graceful degrade.
|
||||
if (this.state.error && !isBotUserAgent) {
|
||||
return /*#__PURE__*/ _jsxs(_Fragment, {
|
||||
children: [
|
||||
/*#__PURE__*/ _jsx(HandleISRError, {
|
||||
error: this.state.error
|
||||
}),
|
||||
this.props.errorStyles,
|
||||
this.props.errorScripts,
|
||||
/*#__PURE__*/ _jsx(this.props.errorComponent, {
|
||||
error: this.state.error,
|
||||
reset: this.reset
|
||||
})
|
||||
]
|
||||
});
|
||||
}
|
||||
return this.props.children;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Handles errors through `getDerivedStateFromError`.
|
||||
* Renders the provided error component and provides a way to `reset` the error boundary state.
|
||||
*/ /**
|
||||
* Renders error boundary with the provided "errorComponent" property as the fallback.
|
||||
* If no "errorComponent" property is provided it renders the children without an error boundary.
|
||||
*/ export function ErrorBoundary({ errorComponent, errorStyles, errorScripts, children }) {
|
||||
// When we're rendering the missing params shell, this will return null. This
|
||||
// is because we won't be rendering any not found boundaries or error
|
||||
// boundaries for the missing params shell. When this runs on the client
|
||||
// (where these errors can occur), we will get the correct pathname.
|
||||
const pathname = useUntrackedPathname();
|
||||
if (errorComponent) {
|
||||
return /*#__PURE__*/ _jsx(ErrorBoundaryHandler, {
|
||||
pathname: pathname,
|
||||
errorComponent: errorComponent,
|
||||
errorStyles: errorStyles,
|
||||
errorScripts: errorScripts,
|
||||
children: children
|
||||
});
|
||||
}
|
||||
return /*#__PURE__*/ _jsx(_Fragment, {
|
||||
children: children
|
||||
});
|
||||
}
|
||||
|
||||
//# sourceMappingURL=error-boundary.js.map
|
||||
1
apps/public-web/node_modules/next/dist/esm/client/components/error-boundary.js.map
generated
vendored
Normal file
1
apps/public-web/node_modules/next/dist/esm/client/components/error-boundary.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
58
apps/public-web/node_modules/next/dist/esm/client/components/errors/graceful-degrade-boundary.js
generated
vendored
Normal file
58
apps/public-web/node_modules/next/dist/esm/client/components/errors/graceful-degrade-boundary.js
generated
vendored
Normal file
@@ -0,0 +1,58 @@
|
||||
'use client';
|
||||
import { jsx as _jsx } from "react/jsx-runtime";
|
||||
import { Component, createRef } from 'react';
|
||||
function getDomNodeAttributes(node) {
|
||||
const result = {};
|
||||
for(let i = 0; i < node.attributes.length; i++){
|
||||
const attr = node.attributes[i];
|
||||
result[attr.name] = attr.value;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
export class GracefulDegradeBoundary extends Component {
|
||||
constructor(props){
|
||||
super(props);
|
||||
this.state = {
|
||||
hasError: false
|
||||
};
|
||||
this.rootHtml = '';
|
||||
this.htmlAttributes = {};
|
||||
this.htmlRef = /*#__PURE__*/ createRef();
|
||||
}
|
||||
static getDerivedStateFromError(_) {
|
||||
return {
|
||||
hasError: true
|
||||
};
|
||||
}
|
||||
componentDidMount() {
|
||||
const htmlNode = this.htmlRef.current;
|
||||
if (this.state.hasError && htmlNode) {
|
||||
// Reapply the cached HTML attributes to the root element
|
||||
Object.entries(this.htmlAttributes).forEach(([key, value])=>{
|
||||
htmlNode.setAttribute(key, value);
|
||||
});
|
||||
}
|
||||
}
|
||||
render() {
|
||||
const { hasError } = this.state;
|
||||
// Cache the root HTML content on the first render
|
||||
if (typeof window !== 'undefined' && !this.rootHtml) {
|
||||
this.rootHtml = document.documentElement.innerHTML;
|
||||
this.htmlAttributes = getDomNodeAttributes(document.documentElement);
|
||||
}
|
||||
if (hasError) {
|
||||
// Render the current HTML content without hydration
|
||||
return /*#__PURE__*/ _jsx("html", {
|
||||
ref: this.htmlRef,
|
||||
suppressHydrationWarning: true,
|
||||
dangerouslySetInnerHTML: {
|
||||
__html: this.rootHtml
|
||||
}
|
||||
});
|
||||
}
|
||||
return this.props.children;
|
||||
}
|
||||
}
|
||||
export default GracefulDegradeBoundary;
|
||||
|
||||
//# sourceMappingURL=graceful-degrade-boundary.js.map
|
||||
1
apps/public-web/node_modules/next/dist/esm/client/components/errors/graceful-degrade-boundary.js.map
generated
vendored
Normal file
1
apps/public-web/node_modules/next/dist/esm/client/components/errors/graceful-degrade-boundary.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../../../src/client/components/errors/graceful-degrade-boundary.tsx"],"sourcesContent":["'use client'\n\nimport { Component, createRef, type ReactNode } from 'react'\n\ninterface ErrorBoundaryProps {\n children: ReactNode\n}\n\ninterface ErrorBoundaryState {\n hasError: boolean\n}\n\nfunction getDomNodeAttributes(node: HTMLElement): Record<string, string> {\n const result: Record<string, string> = {}\n for (let i = 0; i < node.attributes.length; i++) {\n const attr = node.attributes[i]\n result[attr.name] = attr.value\n }\n return result\n}\n\nexport class GracefulDegradeBoundary extends Component<\n ErrorBoundaryProps,\n ErrorBoundaryState\n> {\n private rootHtml: string\n private htmlAttributes: Record<string, string>\n private htmlRef: React.RefObject<HTMLHtmlElement | null>\n\n constructor(props: ErrorBoundaryProps) {\n super(props)\n this.state = { hasError: false }\n this.rootHtml = ''\n this.htmlAttributes = {}\n this.htmlRef = createRef<HTMLHtmlElement>()\n }\n\n static getDerivedStateFromError(_: unknown): ErrorBoundaryState {\n return { hasError: true }\n }\n\n componentDidMount() {\n const htmlNode = this.htmlRef.current\n if (this.state.hasError && htmlNode) {\n // Reapply the cached HTML attributes to the root element\n Object.entries(this.htmlAttributes).forEach(([key, value]) => {\n htmlNode.setAttribute(key, value)\n })\n }\n }\n\n render() {\n const { hasError } = this.state\n // Cache the root HTML content on the first render\n if (typeof window !== 'undefined' && !this.rootHtml) {\n this.rootHtml = document.documentElement.innerHTML\n this.htmlAttributes = getDomNodeAttributes(document.documentElement)\n }\n\n if (hasError) {\n // Render the current HTML content without hydration\n return (\n <html\n ref={this.htmlRef}\n suppressHydrationWarning\n dangerouslySetInnerHTML={{\n __html: this.rootHtml,\n }}\n />\n )\n }\n\n return this.props.children\n }\n}\n\nexport default GracefulDegradeBoundary\n"],"names":["Component","createRef","getDomNodeAttributes","node","result","i","attributes","length","attr","name","value","GracefulDegradeBoundary","constructor","props","state","hasError","rootHtml","htmlAttributes","htmlRef","getDerivedStateFromError","_","componentDidMount","htmlNode","current","Object","entries","forEach","key","setAttribute","render","window","document","documentElement","innerHTML","html","ref","suppressHydrationWarning","dangerouslySetInnerHTML","__html","children"],"mappings":"AAAA;;AAEA,SAASA,SAAS,EAAEC,SAAS,QAAwB,QAAO;AAU5D,SAASC,qBAAqBC,IAAiB;IAC7C,MAAMC,SAAiC,CAAC;IACxC,IAAK,IAAIC,IAAI,GAAGA,IAAIF,KAAKG,UAAU,CAACC,MAAM,EAAEF,IAAK;QAC/C,MAAMG,OAAOL,KAAKG,UAAU,CAACD,EAAE;QAC/BD,MAAM,CAACI,KAAKC,IAAI,CAAC,GAAGD,KAAKE,KAAK;IAChC;IACA,OAAON;AACT;AAEA,OAAO,MAAMO,gCAAgCX;IAQ3CY,YAAYC,KAAyB,CAAE;QACrC,KAAK,CAACA;QACN,IAAI,CAACC,KAAK,GAAG;YAAEC,UAAU;QAAM;QAC/B,IAAI,CAACC,QAAQ,GAAG;QAChB,IAAI,CAACC,cAAc,GAAG,CAAC;QACvB,IAAI,CAACC,OAAO,iBAAGjB;IACjB;IAEA,OAAOkB,yBAAyBC,CAAU,EAAsB;QAC9D,OAAO;YAAEL,UAAU;QAAK;IAC1B;IAEAM,oBAAoB;QAClB,MAAMC,WAAW,IAAI,CAACJ,OAAO,CAACK,OAAO;QACrC,IAAI,IAAI,CAACT,KAAK,CAACC,QAAQ,IAAIO,UAAU;YACnC,yDAAyD;YACzDE,OAAOC,OAAO,CAAC,IAAI,CAACR,cAAc,EAAES,OAAO,CAAC,CAAC,CAACC,KAAKjB,MAAM;gBACvDY,SAASM,YAAY,CAACD,KAAKjB;YAC7B;QACF;IACF;IAEAmB,SAAS;QACP,MAAM,EAAEd,QAAQ,EAAE,GAAG,IAAI,CAACD,KAAK;QAC/B,kDAAkD;QAClD,IAAI,OAAOgB,WAAW,eAAe,CAAC,IAAI,CAACd,QAAQ,EAAE;YACnD,IAAI,CAACA,QAAQ,GAAGe,SAASC,eAAe,CAACC,SAAS;YAClD,IAAI,CAAChB,cAAc,GAAGf,qBAAqB6B,SAASC,eAAe;QACrE;QAEA,IAAIjB,UAAU;YACZ,oDAAoD;YACpD,qBACE,KAACmB;gBACCC,KAAK,IAAI,CAACjB,OAAO;gBACjBkB,wBAAwB;gBACxBC,yBAAyB;oBACvBC,QAAQ,IAAI,CAACtB,QAAQ;gBACvB;;QAGN;QAEA,OAAO,IAAI,CAACH,KAAK,CAAC0B,QAAQ;IAC5B;AACF;AAEA,eAAe5B,wBAAuB","ignoreList":[0]}
|
||||
24
apps/public-web/node_modules/next/dist/esm/client/components/errors/root-error-boundary.js
generated
vendored
Normal file
24
apps/public-web/node_modules/next/dist/esm/client/components/errors/root-error-boundary.js
generated
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
'use client';
|
||||
import { jsx as _jsx } from "react/jsx-runtime";
|
||||
import React from 'react';
|
||||
import GracefulDegradeBoundary from './graceful-degrade-boundary';
|
||||
import { ErrorBoundary } from '../error-boundary';
|
||||
import { isBot } from '../../../shared/lib/router/utils/is-bot';
|
||||
const isBotUserAgent = typeof window !== 'undefined' && isBot(window.navigator.userAgent);
|
||||
export default function RootErrorBoundary({ children, errorComponent, errorStyles, errorScripts }) {
|
||||
if (isBotUserAgent) {
|
||||
// Preserve existing DOM/HTML for bots to avoid replacing content with an error UI
|
||||
// and to keep the original SSR output intact.
|
||||
return /*#__PURE__*/ _jsx(GracefulDegradeBoundary, {
|
||||
children: children
|
||||
});
|
||||
}
|
||||
return /*#__PURE__*/ _jsx(ErrorBoundary, {
|
||||
errorComponent: errorComponent,
|
||||
errorStyles: errorStyles,
|
||||
errorScripts: errorScripts,
|
||||
children: children
|
||||
});
|
||||
}
|
||||
|
||||
//# sourceMappingURL=root-error-boundary.js.map
|
||||
1
apps/public-web/node_modules/next/dist/esm/client/components/errors/root-error-boundary.js.map
generated
vendored
Normal file
1
apps/public-web/node_modules/next/dist/esm/client/components/errors/root-error-boundary.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../../../src/client/components/errors/root-error-boundary.tsx"],"sourcesContent":["'use client'\n\nimport React, { type JSX } from 'react'\nimport GracefulDegradeBoundary from './graceful-degrade-boundary'\nimport { ErrorBoundary, type ErrorBoundaryProps } from '../error-boundary'\nimport { isBot } from '../../../shared/lib/router/utils/is-bot'\n\nconst isBotUserAgent =\n typeof window !== 'undefined' && isBot(window.navigator.userAgent)\n\nexport default function RootErrorBoundary({\n children,\n errorComponent,\n errorStyles,\n errorScripts,\n}: ErrorBoundaryProps & { children: React.ReactNode }): JSX.Element {\n if (isBotUserAgent) {\n // Preserve existing DOM/HTML for bots to avoid replacing content with an error UI\n // and to keep the original SSR output intact.\n return <GracefulDegradeBoundary>{children}</GracefulDegradeBoundary>\n }\n\n return (\n <ErrorBoundary\n errorComponent={errorComponent}\n errorStyles={errorStyles}\n errorScripts={errorScripts}\n >\n {children}\n </ErrorBoundary>\n )\n}\n"],"names":["React","GracefulDegradeBoundary","ErrorBoundary","isBot","isBotUserAgent","window","navigator","userAgent","RootErrorBoundary","children","errorComponent","errorStyles","errorScripts"],"mappings":"AAAA;;AAEA,OAAOA,WAAyB,QAAO;AACvC,OAAOC,6BAA6B,8BAA6B;AACjE,SAASC,aAAa,QAAiC,oBAAmB;AAC1E,SAASC,KAAK,QAAQ,0CAAyC;AAE/D,MAAMC,iBACJ,OAAOC,WAAW,eAAeF,MAAME,OAAOC,SAAS,CAACC,SAAS;AAEnE,eAAe,SAASC,kBAAkB,EACxCC,QAAQ,EACRC,cAAc,EACdC,WAAW,EACXC,YAAY,EACuC;IACnD,IAAIR,gBAAgB;QAClB,kFAAkF;QAClF,8CAA8C;QAC9C,qBAAO,KAACH;sBAAyBQ;;IACnC;IAEA,qBACE,KAACP;QACCQ,gBAAgBA;QAChBC,aAAaA;QACbC,cAAcA;kBAEbH;;AAGP","ignoreList":[0]}
|
||||
32
apps/public-web/node_modules/next/dist/esm/client/components/forbidden.js
generated
vendored
Normal file
32
apps/public-web/node_modules/next/dist/esm/client/components/forbidden.js
generated
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
import { HTTP_ERROR_FALLBACK_ERROR_CODE } from './http-access-fallback/http-access-fallback';
|
||||
// TODO: Add `forbidden` docs
|
||||
/**
|
||||
* @experimental
|
||||
* This function allows you to render the [forbidden.js file](https://nextjs.org/docs/app/api-reference/file-conventions/forbidden)
|
||||
* within a route segment as well as inject a tag.
|
||||
*
|
||||
* `forbidden()` can be used in
|
||||
* [Server Components](https://nextjs.org/docs/app/building-your-application/rendering/server-components),
|
||||
* [Route Handlers](https://nextjs.org/docs/app/building-your-application/routing/route-handlers), and
|
||||
* [Server Actions](https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions-and-mutations).
|
||||
*
|
||||
* Read more: [Next.js Docs: `forbidden`](https://nextjs.org/docs/app/api-reference/functions/forbidden)
|
||||
*/ const DIGEST = `${HTTP_ERROR_FALLBACK_ERROR_CODE};403`;
|
||||
export function forbidden() {
|
||||
if (!process.env.__NEXT_EXPERIMENTAL_AUTH_INTERRUPTS) {
|
||||
throw Object.defineProperty(new Error(`\`forbidden()\` is experimental and only allowed to be enabled when \`experimental.authInterrupts\` is enabled.`), "__NEXT_ERROR_CODE", {
|
||||
value: "E488",
|
||||
enumerable: false,
|
||||
configurable: true
|
||||
});
|
||||
}
|
||||
const error = Object.defineProperty(new Error(DIGEST), "__NEXT_ERROR_CODE", {
|
||||
value: "E394",
|
||||
enumerable: false,
|
||||
configurable: true
|
||||
});
|
||||
error.digest = DIGEST;
|
||||
throw error;
|
||||
}
|
||||
|
||||
//# sourceMappingURL=forbidden.js.map
|
||||
1
apps/public-web/node_modules/next/dist/esm/client/components/forbidden.js.map
generated
vendored
Normal file
1
apps/public-web/node_modules/next/dist/esm/client/components/forbidden.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../../src/client/components/forbidden.ts"],"sourcesContent":["import {\n HTTP_ERROR_FALLBACK_ERROR_CODE,\n type HTTPAccessFallbackError,\n} from './http-access-fallback/http-access-fallback'\n\n// TODO: Add `forbidden` docs\n/**\n * @experimental\n * This function allows you to render the [forbidden.js file](https://nextjs.org/docs/app/api-reference/file-conventions/forbidden)\n * within a route segment as well as inject a tag.\n *\n * `forbidden()` can be used in\n * [Server Components](https://nextjs.org/docs/app/building-your-application/rendering/server-components),\n * [Route Handlers](https://nextjs.org/docs/app/building-your-application/routing/route-handlers), and\n * [Server Actions](https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions-and-mutations).\n *\n * Read more: [Next.js Docs: `forbidden`](https://nextjs.org/docs/app/api-reference/functions/forbidden)\n */\n\nconst DIGEST = `${HTTP_ERROR_FALLBACK_ERROR_CODE};403`\n\nexport function forbidden(): never {\n if (!process.env.__NEXT_EXPERIMENTAL_AUTH_INTERRUPTS) {\n throw new Error(\n `\\`forbidden()\\` is experimental and only allowed to be enabled when \\`experimental.authInterrupts\\` is enabled.`\n )\n }\n\n const error = new Error(DIGEST) as HTTPAccessFallbackError\n ;(error as HTTPAccessFallbackError).digest = DIGEST\n throw error\n}\n"],"names":["HTTP_ERROR_FALLBACK_ERROR_CODE","DIGEST","forbidden","process","env","__NEXT_EXPERIMENTAL_AUTH_INTERRUPTS","Error","error","digest"],"mappings":"AAAA,SACEA,8BAA8B,QAEzB,8CAA6C;AAEpD,6BAA6B;AAC7B;;;;;;;;;;;CAWC,GAED,MAAMC,SAAS,GAAGD,+BAA+B,IAAI,CAAC;AAEtD,OAAO,SAASE;IACd,IAAI,CAACC,QAAQC,GAAG,CAACC,mCAAmC,EAAE;QACpD,MAAM,qBAEL,CAFK,IAAIC,MACR,CAAC,+GAA+G,CAAC,GAD7G,qBAAA;mBAAA;wBAAA;0BAAA;QAEN;IACF;IAEA,MAAMC,QAAQ,qBAAiB,CAAjB,IAAID,MAAML,SAAV,qBAAA;eAAA;oBAAA;sBAAA;IAAgB;IAC5BM,MAAkCC,MAAM,GAAGP;IAC7C,MAAMM;AACR","ignoreList":[0]}
|
||||
18
apps/public-web/node_modules/next/dist/esm/client/components/handle-isr-error.js
generated
vendored
Normal file
18
apps/public-web/node_modules/next/dist/esm/client/components/handle-isr-error.js
generated
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
const workAsyncStorage = typeof window === 'undefined' ? require('../../server/app-render/work-async-storage.external').workAsyncStorage : undefined;
|
||||
// if we are revalidating we want to re-throw the error so the
|
||||
// function crashes so we can maintain our previous cache
|
||||
// instead of caching the error page
|
||||
export function HandleISRError({ error }) {
|
||||
if (workAsyncStorage) {
|
||||
const store = workAsyncStorage.getStore();
|
||||
if (store?.isStaticGeneration) {
|
||||
if (error) {
|
||||
console.error(error);
|
||||
}
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
//# sourceMappingURL=handle-isr-error.js.map
|
||||
1
apps/public-web/node_modules/next/dist/esm/client/components/handle-isr-error.js.map
generated
vendored
Normal file
1
apps/public-web/node_modules/next/dist/esm/client/components/handle-isr-error.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../../src/client/components/handle-isr-error.tsx"],"sourcesContent":["const workAsyncStorage =\n typeof window === 'undefined'\n ? (\n require('../../server/app-render/work-async-storage.external') as typeof import('../../server/app-render/work-async-storage.external')\n ).workAsyncStorage\n : undefined\n\n// if we are revalidating we want to re-throw the error so the\n// function crashes so we can maintain our previous cache\n// instead of caching the error page\nexport function HandleISRError({ error }: { error: any }) {\n if (workAsyncStorage) {\n const store = workAsyncStorage.getStore()\n if (store?.isStaticGeneration) {\n if (error) {\n console.error(error)\n }\n throw error\n }\n }\n\n return null\n}\n"],"names":["workAsyncStorage","window","require","undefined","HandleISRError","error","store","getStore","isStaticGeneration","console"],"mappings":"AAAA,MAAMA,mBACJ,OAAOC,WAAW,cACd,AACEC,QAAQ,uDACRF,gBAAgB,GAClBG;AAEN,8DAA8D;AAC9D,yDAAyD;AACzD,oCAAoC;AACpC,OAAO,SAASC,eAAe,EAAEC,KAAK,EAAkB;IACtD,IAAIL,kBAAkB;QACpB,MAAMM,QAAQN,iBAAiBO,QAAQ;QACvC,IAAID,OAAOE,oBAAoB;YAC7B,IAAIH,OAAO;gBACTI,QAAQJ,KAAK,CAACA;YAChB;YACA,MAAMA;QACR;IACF;IAEA,OAAO;AACT","ignoreList":[0]}
|
||||
14
apps/public-web/node_modules/next/dist/esm/client/components/hooks-server-context.js
generated
vendored
Normal file
14
apps/public-web/node_modules/next/dist/esm/client/components/hooks-server-context.js
generated
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
const DYNAMIC_ERROR_CODE = 'DYNAMIC_SERVER_USAGE';
|
||||
export class DynamicServerError extends Error {
|
||||
constructor(description){
|
||||
super(`Dynamic server usage: ${description}`), this.description = description, this.digest = DYNAMIC_ERROR_CODE;
|
||||
}
|
||||
}
|
||||
export function isDynamicServerError(err) {
|
||||
if (typeof err !== 'object' || err === null || !('digest' in err) || typeof err.digest !== 'string') {
|
||||
return false;
|
||||
}
|
||||
return err.digest === DYNAMIC_ERROR_CODE;
|
||||
}
|
||||
|
||||
//# sourceMappingURL=hooks-server-context.js.map
|
||||
1
apps/public-web/node_modules/next/dist/esm/client/components/hooks-server-context.js.map
generated
vendored
Normal file
1
apps/public-web/node_modules/next/dist/esm/client/components/hooks-server-context.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../../src/client/components/hooks-server-context.ts"],"sourcesContent":["const DYNAMIC_ERROR_CODE = 'DYNAMIC_SERVER_USAGE'\n\nexport class DynamicServerError extends Error {\n digest: typeof DYNAMIC_ERROR_CODE = DYNAMIC_ERROR_CODE\n\n constructor(public readonly description: string) {\n super(`Dynamic server usage: ${description}`)\n }\n}\n\nexport function isDynamicServerError(err: unknown): err is DynamicServerError {\n if (\n typeof err !== 'object' ||\n err === null ||\n !('digest' in err) ||\n typeof err.digest !== 'string'\n ) {\n return false\n }\n\n return err.digest === DYNAMIC_ERROR_CODE\n}\n"],"names":["DYNAMIC_ERROR_CODE","DynamicServerError","Error","constructor","description","digest","isDynamicServerError","err"],"mappings":"AAAA,MAAMA,qBAAqB;AAE3B,OAAO,MAAMC,2BAA2BC;IAGtCC,YAAY,AAAgBC,WAAmB,CAAE;QAC/C,KAAK,CAAC,CAAC,sBAAsB,EAAEA,aAAa,QADlBA,cAAAA,kBAF5BC,SAAoCL;IAIpC;AACF;AAEA,OAAO,SAASM,qBAAqBC,GAAY;IAC/C,IACE,OAAOA,QAAQ,YACfA,QAAQ,QACR,CAAE,CAAA,YAAYA,GAAE,KAChB,OAAOA,IAAIF,MAAM,KAAK,UACtB;QACA,OAAO;IACT;IAEA,OAAOE,IAAIF,MAAM,KAAKL;AACxB","ignoreList":[0]}
|
||||
117
apps/public-web/node_modules/next/dist/esm/client/components/http-access-fallback/error-boundary.js
generated
vendored
Normal file
117
apps/public-web/node_modules/next/dist/esm/client/components/http-access-fallback/error-boundary.js
generated
vendored
Normal file
@@ -0,0 +1,117 @@
|
||||
'use client';
|
||||
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
||||
/**
|
||||
* HTTPAccessFallbackBoundary is a boundary that catches errors and renders a
|
||||
* fallback component for HTTP errors.
|
||||
*
|
||||
* It receives the status code, and determine if it should render fallbacks for few HTTP 4xx errors.
|
||||
*
|
||||
* e.g. 404
|
||||
* 404 represents not found, and the fallback component pair contains the component and its styles.
|
||||
*
|
||||
*/ import React, { useContext } from 'react';
|
||||
import { useUntrackedPathname } from '../navigation-untracked';
|
||||
import { HTTPAccessErrorStatus, getAccessFallbackHTTPStatus, getAccessFallbackErrorTypeByStatus, isHTTPAccessFallbackError } from './http-access-fallback';
|
||||
import { warnOnce } from '../../../shared/lib/utils/warn-once';
|
||||
import { MissingSlotContext } from '../../../shared/lib/app-router-context.shared-runtime';
|
||||
class HTTPAccessFallbackErrorBoundary extends React.Component {
|
||||
constructor(props){
|
||||
super(props);
|
||||
this.state = {
|
||||
triggeredStatus: undefined,
|
||||
previousPathname: props.pathname
|
||||
};
|
||||
}
|
||||
componentDidCatch() {
|
||||
if (process.env.NODE_ENV === 'development' && this.props.missingSlots && this.props.missingSlots.size > 0 && // A missing children slot is the typical not-found case, so no need to warn
|
||||
!this.props.missingSlots.has('children')) {
|
||||
let warningMessage = 'No default component was found for a parallel route rendered on this page. Falling back to nearest NotFound boundary.\n' + 'Learn more: https://nextjs.org/docs/app/building-your-application/routing/parallel-routes#defaultjs\n\n';
|
||||
const formattedSlots = Array.from(this.props.missingSlots).sort((a, b)=>a.localeCompare(b)).map((slot)=>`@${slot}`).join(', ');
|
||||
warningMessage += 'Missing slots: ' + formattedSlots;
|
||||
warnOnce(warningMessage);
|
||||
}
|
||||
}
|
||||
static getDerivedStateFromError(error) {
|
||||
if (isHTTPAccessFallbackError(error)) {
|
||||
const httpStatus = getAccessFallbackHTTPStatus(error);
|
||||
return {
|
||||
triggeredStatus: httpStatus
|
||||
};
|
||||
}
|
||||
// Re-throw if error is not for 404
|
||||
throw error;
|
||||
}
|
||||
static getDerivedStateFromProps(props, state) {
|
||||
/**
|
||||
* Handles reset of the error boundary when a navigation happens.
|
||||
* Ensures the error boundary does not stay enabled when navigating to a new page.
|
||||
* Approach of setState in render is safe as it checks the previous pathname and then overrides
|
||||
* it as outlined in https://react.dev/reference/react/useState#storing-information-from-previous-renders
|
||||
*/ if (props.pathname !== state.previousPathname && state.triggeredStatus) {
|
||||
return {
|
||||
triggeredStatus: undefined,
|
||||
previousPathname: props.pathname
|
||||
};
|
||||
}
|
||||
return {
|
||||
triggeredStatus: state.triggeredStatus,
|
||||
previousPathname: props.pathname
|
||||
};
|
||||
}
|
||||
render() {
|
||||
const { notFound, forbidden, unauthorized, children } = this.props;
|
||||
const { triggeredStatus } = this.state;
|
||||
const errorComponents = {
|
||||
[HTTPAccessErrorStatus.NOT_FOUND]: notFound,
|
||||
[HTTPAccessErrorStatus.FORBIDDEN]: forbidden,
|
||||
[HTTPAccessErrorStatus.UNAUTHORIZED]: unauthorized
|
||||
};
|
||||
if (triggeredStatus) {
|
||||
const isNotFound = triggeredStatus === HTTPAccessErrorStatus.NOT_FOUND && notFound;
|
||||
const isForbidden = triggeredStatus === HTTPAccessErrorStatus.FORBIDDEN && forbidden;
|
||||
const isUnauthorized = triggeredStatus === HTTPAccessErrorStatus.UNAUTHORIZED && unauthorized;
|
||||
// If there's no matched boundary in this layer, keep throwing the error by rendering the children
|
||||
if (!(isNotFound || isForbidden || isUnauthorized)) {
|
||||
return children;
|
||||
}
|
||||
return /*#__PURE__*/ _jsxs(_Fragment, {
|
||||
children: [
|
||||
/*#__PURE__*/ _jsx("meta", {
|
||||
name: "robots",
|
||||
content: "noindex"
|
||||
}),
|
||||
process.env.NODE_ENV === 'development' && /*#__PURE__*/ _jsx("meta", {
|
||||
name: "boundary-next-error",
|
||||
content: getAccessFallbackErrorTypeByStatus(triggeredStatus)
|
||||
}),
|
||||
errorComponents[triggeredStatus]
|
||||
]
|
||||
});
|
||||
}
|
||||
return children;
|
||||
}
|
||||
}
|
||||
export function HTTPAccessFallbackBoundary({ notFound, forbidden, unauthorized, children }) {
|
||||
// When we're rendering the missing params shell, this will return null. This
|
||||
// is because we won't be rendering any not found boundaries or error
|
||||
// boundaries for the missing params shell. When this runs on the client
|
||||
// (where these error can occur), we will get the correct pathname.
|
||||
const pathname = useUntrackedPathname();
|
||||
const missingSlots = useContext(MissingSlotContext);
|
||||
const hasErrorFallback = !!(notFound || forbidden || unauthorized);
|
||||
if (hasErrorFallback) {
|
||||
return /*#__PURE__*/ _jsx(HTTPAccessFallbackErrorBoundary, {
|
||||
pathname: pathname,
|
||||
notFound: notFound,
|
||||
forbidden: forbidden,
|
||||
unauthorized: unauthorized,
|
||||
missingSlots: missingSlots,
|
||||
children: children
|
||||
});
|
||||
}
|
||||
return /*#__PURE__*/ _jsx(_Fragment, {
|
||||
children: children
|
||||
});
|
||||
}
|
||||
|
||||
//# sourceMappingURL=error-boundary.js.map
|
||||
1
apps/public-web/node_modules/next/dist/esm/client/components/http-access-fallback/error-boundary.js.map
generated
vendored
Normal file
1
apps/public-web/node_modules/next/dist/esm/client/components/http-access-fallback/error-boundary.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
49
apps/public-web/node_modules/next/dist/esm/client/components/http-access-fallback/error-fallback.js
generated
vendored
Normal file
49
apps/public-web/node_modules/next/dist/esm/client/components/http-access-fallback/error-fallback.js
generated
vendored
Normal file
@@ -0,0 +1,49 @@
|
||||
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
||||
import { styles } from '../styles/access-error-styles';
|
||||
export function HTTPAccessErrorFallback({ status, message }) {
|
||||
return /*#__PURE__*/ _jsxs(_Fragment, {
|
||||
children: [
|
||||
/*#__PURE__*/ _jsx("title", {
|
||||
children: `${status}: ${message}`
|
||||
}),
|
||||
/*#__PURE__*/ _jsx("div", {
|
||||
style: styles.error,
|
||||
children: /*#__PURE__*/ _jsxs("div", {
|
||||
children: [
|
||||
/*#__PURE__*/ _jsx("style", {
|
||||
dangerouslySetInnerHTML: {
|
||||
/* Minified CSS from
|
||||
body { margin: 0; color: #000; background: #fff; }
|
||||
.next-error-h1 {
|
||||
border-right: 1px solid rgba(0, 0, 0, .3);
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
body { color: #fff; background: #000; }
|
||||
.next-error-h1 {
|
||||
border-right: 1px solid rgba(255, 255, 255, .3);
|
||||
}
|
||||
}
|
||||
*/ __html: `body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}`
|
||||
}
|
||||
}),
|
||||
/*#__PURE__*/ _jsx("h1", {
|
||||
className: "next-error-h1",
|
||||
style: styles.h1,
|
||||
children: status
|
||||
}),
|
||||
/*#__PURE__*/ _jsx("div", {
|
||||
style: styles.desc,
|
||||
children: /*#__PURE__*/ _jsx("h2", {
|
||||
style: styles.h2,
|
||||
children: message
|
||||
})
|
||||
})
|
||||
]
|
||||
})
|
||||
})
|
||||
]
|
||||
});
|
||||
}
|
||||
|
||||
//# sourceMappingURL=error-fallback.js.map
|
||||
1
apps/public-web/node_modules/next/dist/esm/client/components/http-access-fallback/error-fallback.js.map
generated
vendored
Normal file
1
apps/public-web/node_modules/next/dist/esm/client/components/http-access-fallback/error-fallback.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../../../src/client/components/http-access-fallback/error-fallback.tsx"],"sourcesContent":["import { styles } from '../styles/access-error-styles'\n\nexport function HTTPAccessErrorFallback({\n status,\n message,\n}: {\n status: number\n message: string\n}) {\n return (\n <>\n {/* <head> */}\n <title>{`${status}: ${message}`}</title>\n {/* </head> */}\n <div style={styles.error}>\n <div>\n <style\n dangerouslySetInnerHTML={{\n /* Minified CSS from\n body { margin: 0; color: #000; background: #fff; }\n .next-error-h1 {\n border-right: 1px solid rgba(0, 0, 0, .3);\n }\n\n @media (prefers-color-scheme: dark) {\n body { color: #fff; background: #000; }\n .next-error-h1 {\n border-right: 1px solid rgba(255, 255, 255, .3);\n }\n }\n */\n __html: `body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}`,\n }}\n />\n <h1 className=\"next-error-h1\" style={styles.h1}>\n {status}\n </h1>\n <div style={styles.desc}>\n <h2 style={styles.h2}>{message}</h2>\n </div>\n </div>\n </div>\n </>\n )\n}\n"],"names":["styles","HTTPAccessErrorFallback","status","message","title","div","style","error","dangerouslySetInnerHTML","__html","h1","className","desc","h2"],"mappings":";AAAA,SAASA,MAAM,QAAQ,gCAA+B;AAEtD,OAAO,SAASC,wBAAwB,EACtCC,MAAM,EACNC,OAAO,EAIR;IACC,qBACE;;0BAEE,KAACC;0BAAO,GAAGF,OAAO,EAAE,EAAEC,SAAS;;0BAE/B,KAACE;gBAAIC,OAAON,OAAOO,KAAK;0BACtB,cAAA,MAACF;;sCACC,KAACC;4BACCE,yBAAyB;gCACvB;;;;;;;;;;;;cAYA,GACAC,QAAQ,CAAC,6NAA6N,CAAC;4BACzO;;sCAEF,KAACC;4BAAGC,WAAU;4BAAgBL,OAAON,OAAOU,EAAE;sCAC3CR;;sCAEH,KAACG;4BAAIC,OAAON,OAAOY,IAAI;sCACrB,cAAA,KAACC;gCAAGP,OAAON,OAAOa,EAAE;0CAAGV;;;;;;;;AAMnC","ignoreList":[0]}
|
||||
38
apps/public-web/node_modules/next/dist/esm/client/components/http-access-fallback/http-access-fallback.js
generated
vendored
Normal file
38
apps/public-web/node_modules/next/dist/esm/client/components/http-access-fallback/http-access-fallback.js
generated
vendored
Normal file
@@ -0,0 +1,38 @@
|
||||
export const HTTPAccessErrorStatus = {
|
||||
NOT_FOUND: 404,
|
||||
FORBIDDEN: 403,
|
||||
UNAUTHORIZED: 401
|
||||
};
|
||||
const ALLOWED_CODES = new Set(Object.values(HTTPAccessErrorStatus));
|
||||
export const HTTP_ERROR_FALLBACK_ERROR_CODE = 'NEXT_HTTP_ERROR_FALLBACK';
|
||||
/**
|
||||
* Checks an error to determine if it's an error generated by
|
||||
* the HTTP navigation APIs `notFound()`, `forbidden()` or `unauthorized()`.
|
||||
*
|
||||
* @param error the error that may reference a HTTP access error
|
||||
* @returns true if the error is a HTTP access error
|
||||
*/ export function isHTTPAccessFallbackError(error) {
|
||||
if (typeof error !== 'object' || error === null || !('digest' in error) || typeof error.digest !== 'string') {
|
||||
return false;
|
||||
}
|
||||
const [prefix, httpStatus] = error.digest.split(';');
|
||||
return prefix === HTTP_ERROR_FALLBACK_ERROR_CODE && ALLOWED_CODES.has(Number(httpStatus));
|
||||
}
|
||||
export function getAccessFallbackHTTPStatus(error) {
|
||||
const httpStatus = error.digest.split(';')[1];
|
||||
return Number(httpStatus);
|
||||
}
|
||||
export function getAccessFallbackErrorTypeByStatus(status) {
|
||||
switch(status){
|
||||
case 401:
|
||||
return 'unauthorized';
|
||||
case 403:
|
||||
return 'forbidden';
|
||||
case 404:
|
||||
return 'not-found';
|
||||
default:
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
//# sourceMappingURL=http-access-fallback.js.map
|
||||
1
apps/public-web/node_modules/next/dist/esm/client/components/http-access-fallback/http-access-fallback.js.map
generated
vendored
Normal file
1
apps/public-web/node_modules/next/dist/esm/client/components/http-access-fallback/http-access-fallback.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../../../src/client/components/http-access-fallback/http-access-fallback.ts"],"sourcesContent":["export const HTTPAccessErrorStatus = {\n NOT_FOUND: 404,\n FORBIDDEN: 403,\n UNAUTHORIZED: 401,\n}\n\nconst ALLOWED_CODES = new Set(Object.values(HTTPAccessErrorStatus))\n\nexport const HTTP_ERROR_FALLBACK_ERROR_CODE = 'NEXT_HTTP_ERROR_FALLBACK'\n\nexport type HTTPAccessFallbackError = Error & {\n digest: `${typeof HTTP_ERROR_FALLBACK_ERROR_CODE};${string}`\n}\n\n/**\n * Checks an error to determine if it's an error generated by\n * the HTTP navigation APIs `notFound()`, `forbidden()` or `unauthorized()`.\n *\n * @param error the error that may reference a HTTP access error\n * @returns true if the error is a HTTP access error\n */\nexport function isHTTPAccessFallbackError(\n error: unknown\n): error is HTTPAccessFallbackError {\n if (\n typeof error !== 'object' ||\n error === null ||\n !('digest' in error) ||\n typeof error.digest !== 'string'\n ) {\n return false\n }\n const [prefix, httpStatus] = error.digest.split(';')\n\n return (\n prefix === HTTP_ERROR_FALLBACK_ERROR_CODE &&\n ALLOWED_CODES.has(Number(httpStatus))\n )\n}\n\nexport function getAccessFallbackHTTPStatus(\n error: HTTPAccessFallbackError\n): number {\n const httpStatus = error.digest.split(';')[1]\n return Number(httpStatus)\n}\n\nexport function getAccessFallbackErrorTypeByStatus(\n status: number\n): 'not-found' | 'forbidden' | 'unauthorized' | undefined {\n switch (status) {\n case 401:\n return 'unauthorized'\n case 403:\n return 'forbidden'\n case 404:\n return 'not-found'\n default:\n return\n }\n}\n"],"names":["HTTPAccessErrorStatus","NOT_FOUND","FORBIDDEN","UNAUTHORIZED","ALLOWED_CODES","Set","Object","values","HTTP_ERROR_FALLBACK_ERROR_CODE","isHTTPAccessFallbackError","error","digest","prefix","httpStatus","split","has","Number","getAccessFallbackHTTPStatus","getAccessFallbackErrorTypeByStatus","status"],"mappings":"AAAA,OAAO,MAAMA,wBAAwB;IACnCC,WAAW;IACXC,WAAW;IACXC,cAAc;AAChB,EAAC;AAED,MAAMC,gBAAgB,IAAIC,IAAIC,OAAOC,MAAM,CAACP;AAE5C,OAAO,MAAMQ,iCAAiC,2BAA0B;AAMxE;;;;;;CAMC,GACD,OAAO,SAASC,0BACdC,KAAc;IAEd,IACE,OAAOA,UAAU,YACjBA,UAAU,QACV,CAAE,CAAA,YAAYA,KAAI,KAClB,OAAOA,MAAMC,MAAM,KAAK,UACxB;QACA,OAAO;IACT;IACA,MAAM,CAACC,QAAQC,WAAW,GAAGH,MAAMC,MAAM,CAACG,KAAK,CAAC;IAEhD,OACEF,WAAWJ,kCACXJ,cAAcW,GAAG,CAACC,OAAOH;AAE7B;AAEA,OAAO,SAASI,4BACdP,KAA8B;IAE9B,MAAMG,aAAaH,MAAMC,MAAM,CAACG,KAAK,CAAC,IAAI,CAAC,EAAE;IAC7C,OAAOE,OAAOH;AAChB;AAEA,OAAO,SAASK,mCACdC,MAAc;IAEd,OAAQA;QACN,KAAK;YACH,OAAO;QACT,KAAK;YACH,OAAO;QACT,KAAK;YACH,OAAO;QACT;YACE;IACJ;AACF","ignoreList":[0]}
|
||||
11
apps/public-web/node_modules/next/dist/esm/client/components/is-next-router-error.js
generated
vendored
Normal file
11
apps/public-web/node_modules/next/dist/esm/client/components/is-next-router-error.js
generated
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
import { isHTTPAccessFallbackError } from './http-access-fallback/http-access-fallback';
|
||||
import { isRedirectError } from './redirect-error';
|
||||
/**
|
||||
* Returns true if the error is a navigation signal error. These errors are
|
||||
* thrown by user code to perform navigation operations and interrupt the React
|
||||
* render.
|
||||
*/ export function isNextRouterError(error) {
|
||||
return isRedirectError(error) || isHTTPAccessFallbackError(error);
|
||||
}
|
||||
|
||||
//# sourceMappingURL=is-next-router-error.js.map
|
||||
1
apps/public-web/node_modules/next/dist/esm/client/components/is-next-router-error.js.map
generated
vendored
Normal file
1
apps/public-web/node_modules/next/dist/esm/client/components/is-next-router-error.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../../src/client/components/is-next-router-error.ts"],"sourcesContent":["import {\n isHTTPAccessFallbackError,\n type HTTPAccessFallbackError,\n} from './http-access-fallback/http-access-fallback'\nimport { isRedirectError, type RedirectError } from './redirect-error'\n\n/**\n * Returns true if the error is a navigation signal error. These errors are\n * thrown by user code to perform navigation operations and interrupt the React\n * render.\n */\nexport function isNextRouterError(\n error: unknown\n): error is RedirectError | HTTPAccessFallbackError {\n return isRedirectError(error) || isHTTPAccessFallbackError(error)\n}\n"],"names":["isHTTPAccessFallbackError","isRedirectError","isNextRouterError","error"],"mappings":"AAAA,SACEA,yBAAyB,QAEpB,8CAA6C;AACpD,SAASC,eAAe,QAA4B,mBAAkB;AAEtE;;;;CAIC,GACD,OAAO,SAASC,kBACdC,KAAc;IAEd,OAAOF,gBAAgBE,UAAUH,0BAA0BG;AAC7D","ignoreList":[0]}
|
||||
524
apps/public-web/node_modules/next/dist/esm/client/components/layout-router.js
generated
vendored
Normal file
524
apps/public-web/node_modules/next/dist/esm/client/components/layout-router.js
generated
vendored
Normal file
@@ -0,0 +1,524 @@
|
||||
'use client';
|
||||
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
||||
import React, { Activity, useContext, use, Suspense, useDeferredValue } from 'react';
|
||||
import ReactDOM from 'react-dom';
|
||||
import { LayoutRouterContext, GlobalLayoutRouterContext, TemplateContext } from '../../shared/lib/app-router-context.shared-runtime';
|
||||
import { unresolvedThenable } from './unresolved-thenable';
|
||||
import { ErrorBoundary } from './error-boundary';
|
||||
import { matchSegment } from './match-segments';
|
||||
import { disableSmoothScrollDuringRouteTransition } from '../../shared/lib/router/utils/disable-smooth-scroll';
|
||||
import { RedirectBoundary } from './redirect-boundary';
|
||||
import { HTTPAccessFallbackBoundary } from './http-access-fallback/error-boundary';
|
||||
import { createRouterCacheKey } from './router-reducer/create-router-cache-key';
|
||||
import { useRouterBFCache } from './bfcache';
|
||||
import { normalizeAppPath } from '../../shared/lib/router/utils/app-paths';
|
||||
import { NavigationPromisesContext } from '../../shared/lib/hooks-client-context.shared-runtime';
|
||||
import { getParamValueFromCacheKey } from '../route-params';
|
||||
import { isDeferredRsc } from './router-reducer/ppr-navigations';
|
||||
const __DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE = ReactDOM.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
|
||||
// TODO-APP: Replace with new React API for finding dom nodes without a `ref` when available
|
||||
/**
|
||||
* Wraps ReactDOM.findDOMNode with additional logic to hide React Strict Mode warning
|
||||
*/ function findDOMNode(instance) {
|
||||
// Tree-shake for server bundle
|
||||
if (typeof window === 'undefined') return null;
|
||||
// __DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE.findDOMNode is null during module init.
|
||||
// We need to lazily reference it.
|
||||
const internal_reactDOMfindDOMNode = __DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE.findDOMNode;
|
||||
return internal_reactDOMfindDOMNode(instance);
|
||||
}
|
||||
const rectProperties = [
|
||||
'bottom',
|
||||
'height',
|
||||
'left',
|
||||
'right',
|
||||
'top',
|
||||
'width',
|
||||
'x',
|
||||
'y'
|
||||
];
|
||||
/**
|
||||
* Check if a HTMLElement is hidden or fixed/sticky position
|
||||
*/ function shouldSkipElement(element) {
|
||||
// we ignore fixed or sticky positioned elements since they'll likely pass the "in-viewport" check
|
||||
// and will result in a situation we bail on scroll because of something like a fixed nav,
|
||||
// even though the actual page content is offscreen
|
||||
if ([
|
||||
'sticky',
|
||||
'fixed'
|
||||
].includes(getComputedStyle(element).position)) {
|
||||
return true;
|
||||
}
|
||||
// Uses `getBoundingClientRect` to check if the element is hidden instead of `offsetParent`
|
||||
// because `offsetParent` doesn't consider document/body
|
||||
const rect = element.getBoundingClientRect();
|
||||
return rectProperties.every((item)=>rect[item] === 0);
|
||||
}
|
||||
/**
|
||||
* Check if the top corner of the HTMLElement is in the viewport.
|
||||
*/ function topOfElementInViewport(element, viewportHeight) {
|
||||
const rect = element.getBoundingClientRect();
|
||||
return rect.top >= 0 && rect.top <= viewportHeight;
|
||||
}
|
||||
/**
|
||||
* Find the DOM node for a hash fragment.
|
||||
* If `top` the page has to scroll to the top of the page. This mirrors the browser's behavior.
|
||||
* If the hash fragment is an id, the page has to scroll to the element with that id.
|
||||
* If the hash fragment is a name, the page has to scroll to the first element with that name.
|
||||
*/ function getHashFragmentDomNode(hashFragment) {
|
||||
// If the hash fragment is `top` the page has to scroll to the top of the page.
|
||||
if (hashFragment === 'top') {
|
||||
return document.body;
|
||||
}
|
||||
// If the hash fragment is an id, the page has to scroll to the element with that id.
|
||||
return document.getElementById(hashFragment) ?? // If the hash fragment is a name, the page has to scroll to the first element with that name.
|
||||
document.getElementsByName(hashFragment)[0];
|
||||
}
|
||||
class InnerScrollAndFocusHandler extends React.Component {
|
||||
componentDidMount() {
|
||||
this.handlePotentialScroll();
|
||||
}
|
||||
componentDidUpdate() {
|
||||
// Because this property is overwritten in handlePotentialScroll it's fine to always run it when true as it'll be set to false for subsequent renders.
|
||||
if (this.props.focusAndScrollRef.apply) {
|
||||
this.handlePotentialScroll();
|
||||
}
|
||||
}
|
||||
render() {
|
||||
return this.props.children;
|
||||
}
|
||||
constructor(...args){
|
||||
super(...args), this.handlePotentialScroll = ()=>{
|
||||
// Handle scroll and focus, it's only applied once in the first useEffect that triggers that changed.
|
||||
const { focusAndScrollRef, segmentPath } = this.props;
|
||||
if (focusAndScrollRef.apply) {
|
||||
// segmentPaths is an array of segment paths that should be scrolled to
|
||||
// if the current segment path is not in the array, the scroll is not applied
|
||||
// unless the array is empty, in which case the scroll is always applied
|
||||
if (focusAndScrollRef.segmentPaths.length !== 0 && !focusAndScrollRef.segmentPaths.some((scrollRefSegmentPath)=>segmentPath.every((segment, index)=>matchSegment(segment, scrollRefSegmentPath[index])))) {
|
||||
return;
|
||||
}
|
||||
let domNode = null;
|
||||
const hashFragment = focusAndScrollRef.hashFragment;
|
||||
if (hashFragment) {
|
||||
domNode = getHashFragmentDomNode(hashFragment);
|
||||
}
|
||||
// `findDOMNode` is tricky because it returns just the first child if the component is a fragment.
|
||||
// This already caused a bug where the first child was a <link/> in head.
|
||||
if (!domNode) {
|
||||
domNode = findDOMNode(this);
|
||||
}
|
||||
// If there is no DOM node this layout-router level is skipped. It'll be handled higher-up in the tree.
|
||||
if (!(domNode instanceof Element)) {
|
||||
return;
|
||||
}
|
||||
// Verify if the element is a HTMLElement and if we want to consider it for scroll behavior.
|
||||
// If the element is skipped, try to select the next sibling and try again.
|
||||
while(!(domNode instanceof HTMLElement) || shouldSkipElement(domNode)){
|
||||
if (process.env.NODE_ENV !== 'production') {
|
||||
if (domNode.parentElement?.localName === 'head') {
|
||||
// TODO: We enter this state when metadata was rendered as part of the page or via Next.js.
|
||||
// This is always a bug in Next.js and caused by React hoisting metadata.
|
||||
// We need to replace `findDOMNode` in favor of Fragment Refs (when available) so that we can skip over metadata.
|
||||
}
|
||||
}
|
||||
// No siblings found that match the criteria are found, so handle scroll higher up in the tree instead.
|
||||
if (domNode.nextElementSibling === null) {
|
||||
return;
|
||||
}
|
||||
domNode = domNode.nextElementSibling;
|
||||
}
|
||||
// State is mutated to ensure that the focus and scroll is applied only once.
|
||||
focusAndScrollRef.apply = false;
|
||||
focusAndScrollRef.hashFragment = null;
|
||||
focusAndScrollRef.segmentPaths = [];
|
||||
disableSmoothScrollDuringRouteTransition(()=>{
|
||||
// In case of hash scroll, we only need to scroll the element into view
|
||||
if (hashFragment) {
|
||||
;
|
||||
domNode.scrollIntoView();
|
||||
return;
|
||||
}
|
||||
// Store the current viewport height because reading `clientHeight` causes a reflow,
|
||||
// and it won't change during this function.
|
||||
const htmlElement = document.documentElement;
|
||||
const viewportHeight = htmlElement.clientHeight;
|
||||
// If the element's top edge is already in the viewport, exit early.
|
||||
if (topOfElementInViewport(domNode, viewportHeight)) {
|
||||
return;
|
||||
}
|
||||
// Otherwise, try scrolling go the top of the document to be backward compatible with pages
|
||||
// scrollIntoView() called on `<html/>` element scrolls horizontally on chrome and firefox (that shouldn't happen)
|
||||
// We could use it to scroll horizontally following RTL but that also seems to be broken - it will always scroll left
|
||||
// scrollLeft = 0 also seems to ignore RTL and manually checking for RTL is too much hassle so we will scroll just vertically
|
||||
htmlElement.scrollTop = 0;
|
||||
// Scroll to domNode if domNode is not in viewport when scrolled to top of document
|
||||
if (!topOfElementInViewport(domNode, viewportHeight)) {
|
||||
// Scroll into view doesn't scroll horizontally by default when not needed
|
||||
;
|
||||
domNode.scrollIntoView();
|
||||
}
|
||||
}, {
|
||||
// We will force layout by querying domNode position
|
||||
dontForceLayout: true,
|
||||
onlyHashChange: focusAndScrollRef.onlyHashChange
|
||||
});
|
||||
// Mutate after scrolling so that it can be read by `disableSmoothScrollDuringRouteTransition`
|
||||
focusAndScrollRef.onlyHashChange = false;
|
||||
// Set focus on the element
|
||||
domNode.focus();
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
function ScrollAndFocusHandler({ segmentPath, children }) {
|
||||
const context = useContext(GlobalLayoutRouterContext);
|
||||
if (!context) {
|
||||
throw Object.defineProperty(new Error('invariant global layout router not mounted'), "__NEXT_ERROR_CODE", {
|
||||
value: "E473",
|
||||
enumerable: false,
|
||||
configurable: true
|
||||
});
|
||||
}
|
||||
return /*#__PURE__*/ _jsx(InnerScrollAndFocusHandler, {
|
||||
segmentPath: segmentPath,
|
||||
focusAndScrollRef: context.focusAndScrollRef,
|
||||
children: children
|
||||
});
|
||||
}
|
||||
/**
|
||||
* InnerLayoutRouter handles rendering the provided segment based on the cache.
|
||||
*/ function InnerLayoutRouter({ tree, segmentPath, debugNameContext, cacheNode: maybeCacheNode, params, url, isActive }) {
|
||||
const context = useContext(GlobalLayoutRouterContext);
|
||||
const parentNavPromises = useContext(NavigationPromisesContext);
|
||||
if (!context) {
|
||||
throw Object.defineProperty(new Error('invariant global layout router not mounted'), "__NEXT_ERROR_CODE", {
|
||||
value: "E473",
|
||||
enumerable: false,
|
||||
configurable: true
|
||||
});
|
||||
}
|
||||
const cacheNode = maybeCacheNode !== null ? maybeCacheNode : //
|
||||
// This should only be reachable for inactive/hidden segments, during
|
||||
// prerendering The active segment should always be consistent with the
|
||||
// CacheNode tree. Regardless, if we don't have a matching CacheNode, we
|
||||
// must suspend rather than render nothing, to prevent showing an
|
||||
// inconsistent route.
|
||||
use(unresolvedThenable);
|
||||
// `rsc` represents the renderable node for this segment.
|
||||
// If this segment has a `prefetchRsc`, it's the statically prefetched data.
|
||||
// We should use that on initial render instead of `rsc`. Then we'll switch
|
||||
// to `rsc` when the dynamic response streams in.
|
||||
//
|
||||
// If no prefetch data is available, then we go straight to rendering `rsc`.
|
||||
const resolvedPrefetchRsc = cacheNode.prefetchRsc !== null ? cacheNode.prefetchRsc : cacheNode.rsc;
|
||||
// We use `useDeferredValue` to handle switching between the prefetched and
|
||||
// final values. The second argument is returned on initial render, then it
|
||||
// re-renders with the first argument.
|
||||
const rsc = useDeferredValue(cacheNode.rsc, resolvedPrefetchRsc);
|
||||
// `rsc` is either a React node or a promise for a React node, except we
|
||||
// special case `null` to represent that this segment's data is missing. If
|
||||
// it's a promise, we need to unwrap it so we can determine whether or not the
|
||||
// data is missing.
|
||||
let resolvedRsc;
|
||||
if (isDeferredRsc(rsc)) {
|
||||
const unwrappedRsc = use(rsc);
|
||||
if (unwrappedRsc === null) {
|
||||
// If the promise was resolved to `null`, it means the data for this
|
||||
// segment was not returned by the server. Suspend indefinitely. When this
|
||||
// happens, the router is responsible for triggering a new state update to
|
||||
// un-suspend this segment.
|
||||
use(unresolvedThenable);
|
||||
}
|
||||
resolvedRsc = unwrappedRsc;
|
||||
} else {
|
||||
// This is not a deferred RSC promise. Don't need to unwrap it.
|
||||
if (rsc === null) {
|
||||
use(unresolvedThenable);
|
||||
}
|
||||
resolvedRsc = rsc;
|
||||
}
|
||||
// In dev, we create a NavigationPromisesContext containing the instrumented promises that provide
|
||||
// `useSelectedLayoutSegment` and `useSelectedLayoutSegments`.
|
||||
// Promises are cached outside of render to survive suspense retries.
|
||||
let navigationPromises = null;
|
||||
if (process.env.NODE_ENV !== 'production') {
|
||||
const { createNestedLayoutNavigationPromises } = require('./navigation-devtools');
|
||||
navigationPromises = createNestedLayoutNavigationPromises(tree, parentNavPromises);
|
||||
}
|
||||
let children = resolvedRsc;
|
||||
if (navigationPromises) {
|
||||
children = /*#__PURE__*/ _jsx(NavigationPromisesContext.Provider, {
|
||||
value: navigationPromises,
|
||||
children: resolvedRsc
|
||||
});
|
||||
}
|
||||
children = // The layout router context narrows down tree and childNodes at each level.
|
||||
/*#__PURE__*/ _jsx(LayoutRouterContext.Provider, {
|
||||
value: {
|
||||
parentTree: tree,
|
||||
parentCacheNode: cacheNode,
|
||||
parentSegmentPath: segmentPath,
|
||||
parentParams: params,
|
||||
debugNameContext: debugNameContext,
|
||||
// TODO-APP: overriding of url for parallel routes
|
||||
url: url,
|
||||
isActive: isActive
|
||||
},
|
||||
children: children
|
||||
});
|
||||
return children;
|
||||
}
|
||||
/**
|
||||
* Renders suspense boundary with the provided "loading" property as the fallback.
|
||||
* If no loading property is provided it renders the children without a suspense boundary.
|
||||
*/ function LoadingBoundary({ name, loading, children }) {
|
||||
// If loading is a promise, unwrap it. This happens in cases where we haven't
|
||||
// yet received the loading data from the server — which includes whether or
|
||||
// not this layout has a loading component at all.
|
||||
//
|
||||
// It's OK to suspend here instead of inside the fallback because this
|
||||
// promise will resolve simultaneously with the data for the segment itself.
|
||||
// So it will never suspend for longer than it would have if we didn't use
|
||||
// a Suspense fallback at all.
|
||||
let loadingModuleData;
|
||||
if (typeof loading === 'object' && loading !== null && typeof loading.then === 'function') {
|
||||
const promiseForLoading = loading;
|
||||
loadingModuleData = use(promiseForLoading);
|
||||
} else {
|
||||
loadingModuleData = loading;
|
||||
}
|
||||
if (loadingModuleData) {
|
||||
const loadingRsc = loadingModuleData[0];
|
||||
const loadingStyles = loadingModuleData[1];
|
||||
const loadingScripts = loadingModuleData[2];
|
||||
return /*#__PURE__*/ _jsx(Suspense, {
|
||||
name: name,
|
||||
fallback: /*#__PURE__*/ _jsxs(_Fragment, {
|
||||
children: [
|
||||
loadingStyles,
|
||||
loadingScripts,
|
||||
loadingRsc
|
||||
]
|
||||
}),
|
||||
children: children
|
||||
});
|
||||
}
|
||||
return /*#__PURE__*/ _jsx(_Fragment, {
|
||||
children: children
|
||||
});
|
||||
}
|
||||
/**
|
||||
* OuterLayoutRouter handles the current segment as well as <Offscreen> rendering of other segments.
|
||||
* It can be rendered next to each other with a different `parallelRouterKey`, allowing for Parallel routes.
|
||||
*/ export default function OuterLayoutRouter({ parallelRouterKey, error, errorStyles, errorScripts, templateStyles, templateScripts, template, notFound, forbidden, unauthorized, segmentViewBoundaries }) {
|
||||
const context = useContext(LayoutRouterContext);
|
||||
if (!context) {
|
||||
throw Object.defineProperty(new Error('invariant expected layout router to be mounted'), "__NEXT_ERROR_CODE", {
|
||||
value: "E56",
|
||||
enumerable: false,
|
||||
configurable: true
|
||||
});
|
||||
}
|
||||
const { parentTree, parentCacheNode, parentSegmentPath, parentParams, url, isActive, debugNameContext } = context;
|
||||
// Get the CacheNode for this segment by reading it from the parent segment's
|
||||
// child map.
|
||||
const parentParallelRoutes = parentCacheNode.parallelRoutes;
|
||||
let segmentMap = parentParallelRoutes.get(parallelRouterKey);
|
||||
// If the parallel router cache node does not exist yet, create it.
|
||||
// This writes to the cache when there is no item in the cache yet. It never *overwrites* existing cache items which is why it's safe in concurrent mode.
|
||||
if (!segmentMap) {
|
||||
segmentMap = new Map();
|
||||
parentParallelRoutes.set(parallelRouterKey, segmentMap);
|
||||
}
|
||||
const parentTreeSegment = parentTree[0];
|
||||
const segmentPath = parentSegmentPath === null ? // path. This has led to a bunch of special cases scattered throughout
|
||||
// the code. We should clean this up.
|
||||
[
|
||||
parallelRouterKey
|
||||
] : parentSegmentPath.concat([
|
||||
parentTreeSegment,
|
||||
parallelRouterKey
|
||||
]);
|
||||
// The "state" key of a segment is the one passed to React — it represents the
|
||||
// identity of the UI tree. Whenever the state key changes, the tree is
|
||||
// recreated and the state is reset. In the App Router model, search params do
|
||||
// not cause state to be lost, so two segments with the same segment path but
|
||||
// different search params should have the same state key.
|
||||
//
|
||||
// The "cache" key of a segment, however, *does* include the search params, if
|
||||
// it's possible that the segment accessed the search params on the server.
|
||||
// (This only applies to page segments; layout segments cannot access search
|
||||
// params on the server.)
|
||||
const activeTree = parentTree[1][parallelRouterKey];
|
||||
if (activeTree === undefined) {
|
||||
// Could not find a matching segment. The client tree is inconsistent with
|
||||
// the server tree. Suspend indefinitely; the router will have already
|
||||
// detected the inconsistency when handling the server response, and
|
||||
// triggered a refresh of the page to recover.
|
||||
use(unresolvedThenable);
|
||||
}
|
||||
const activeSegment = activeTree[0];
|
||||
const activeStateKey = createRouterCacheKey(activeSegment, true) // no search params
|
||||
;
|
||||
// At each level of the route tree, not only do we render the currently
|
||||
// active segment — we also render the last N segments that were active at
|
||||
// this level inside a hidden <Activity> boundary, to preserve their state
|
||||
// if or when the user navigates to them again.
|
||||
//
|
||||
// bfcacheEntry is a linked list of FlightRouterStates.
|
||||
let bfcacheEntry = useRouterBFCache(activeTree, activeStateKey);
|
||||
let children = [];
|
||||
do {
|
||||
const tree = bfcacheEntry.tree;
|
||||
const stateKey = bfcacheEntry.stateKey;
|
||||
const segment = tree[0];
|
||||
const cacheKey = createRouterCacheKey(segment);
|
||||
// Read segment path from the parallel router cache node.
|
||||
const cacheNode = segmentMap.get(cacheKey) ?? null;
|
||||
/*
|
||||
- Error boundary
|
||||
- Only renders error boundary if error component is provided.
|
||||
- Rendered for each segment to ensure they have their own error state.
|
||||
- When gracefully degrade for bots, skip rendering error boundary.
|
||||
- Loading boundary
|
||||
- Only renders suspense boundary if loading components is provided.
|
||||
- Rendered for each segment to ensure they have their own loading state.
|
||||
- Passed to the router during rendering to ensure it can be immediately rendered when suspending on a Flight fetch.
|
||||
*/ let segmentBoundaryTriggerNode = null;
|
||||
let segmentViewStateNode = null;
|
||||
if (process.env.NODE_ENV !== 'production') {
|
||||
const { SegmentBoundaryTriggerNode, SegmentViewStateNode } = require('../../next-devtools/userspace/app/segment-explorer-node');
|
||||
const pagePrefix = normalizeAppPath(url);
|
||||
segmentViewStateNode = /*#__PURE__*/ _jsx(SegmentViewStateNode, {
|
||||
page: pagePrefix
|
||||
}, pagePrefix);
|
||||
segmentBoundaryTriggerNode = /*#__PURE__*/ _jsx(_Fragment, {
|
||||
children: /*#__PURE__*/ _jsx(SegmentBoundaryTriggerNode, {})
|
||||
});
|
||||
}
|
||||
let params = parentParams;
|
||||
if (Array.isArray(segment)) {
|
||||
// This segment contains a route param. Accumulate these as we traverse
|
||||
// down the router tree. The result represents the set of params that
|
||||
// the layout/page components are permitted to access below this point.
|
||||
const paramName = segment[0];
|
||||
const paramCacheKey = segment[1];
|
||||
const paramType = segment[2];
|
||||
const paramValue = getParamValueFromCacheKey(paramCacheKey, paramType);
|
||||
if (paramValue !== null) {
|
||||
params = {
|
||||
...parentParams,
|
||||
[paramName]: paramValue
|
||||
};
|
||||
}
|
||||
}
|
||||
const debugName = getBoundaryDebugNameFromSegment(segment);
|
||||
// `debugNameContext` represents the nearest non-"virtual" parent segment.
|
||||
// `getBoundaryDebugNameFromSegment` returns undefined for virtual segments.
|
||||
// So if `debugName` is undefined, the context is passed through unchanged.
|
||||
const childDebugNameContext = debugName ?? debugNameContext;
|
||||
// In practical terms, clicking this name in the Suspense DevTools
|
||||
// should select the child slots of that layout.
|
||||
//
|
||||
// So the name we apply to the Activity boundary is actually based on
|
||||
// the nearest parent segments.
|
||||
//
|
||||
// We skip over "virtual" parents, i.e. ones inserted by Next.js that
|
||||
// don't correspond to application-defined code.
|
||||
const isVirtual = debugName === undefined;
|
||||
const debugNameToDisplay = isVirtual ? undefined : debugNameContext;
|
||||
// TODO: The loading module data for a segment is stored on the parent, then
|
||||
// applied to each of that parent segment's parallel route slots. In the
|
||||
// simple case where there's only one parallel route (the `children` slot),
|
||||
// this is no different from if the loading module data where stored on the
|
||||
// child directly. But I'm not sure this actually makes sense when there are
|
||||
// multiple parallel routes. It's not a huge issue because you always have
|
||||
// the option to define a narrower loading boundary for a particular slot. But
|
||||
// this sort of smells like an implementation accident to me.
|
||||
const loadingModuleData = parentCacheNode.loading;
|
||||
let child = /*#__PURE__*/ _jsxs(TemplateContext.Provider, {
|
||||
value: /*#__PURE__*/ _jsxs(ScrollAndFocusHandler, {
|
||||
segmentPath: segmentPath,
|
||||
children: [
|
||||
/*#__PURE__*/ _jsx(ErrorBoundary, {
|
||||
errorComponent: error,
|
||||
errorStyles: errorStyles,
|
||||
errorScripts: errorScripts,
|
||||
children: /*#__PURE__*/ _jsx(LoadingBoundary, {
|
||||
name: debugNameToDisplay,
|
||||
loading: loadingModuleData,
|
||||
children: /*#__PURE__*/ _jsx(HTTPAccessFallbackBoundary, {
|
||||
notFound: notFound,
|
||||
forbidden: forbidden,
|
||||
unauthorized: unauthorized,
|
||||
children: /*#__PURE__*/ _jsxs(RedirectBoundary, {
|
||||
children: [
|
||||
/*#__PURE__*/ _jsx(InnerLayoutRouter, {
|
||||
url: url,
|
||||
tree: tree,
|
||||
params: params,
|
||||
cacheNode: cacheNode,
|
||||
segmentPath: segmentPath,
|
||||
debugNameContext: childDebugNameContext,
|
||||
isActive: isActive && stateKey === activeStateKey
|
||||
}),
|
||||
segmentBoundaryTriggerNode
|
||||
]
|
||||
})
|
||||
})
|
||||
})
|
||||
}),
|
||||
segmentViewStateNode
|
||||
]
|
||||
}),
|
||||
children: [
|
||||
templateStyles,
|
||||
templateScripts,
|
||||
template
|
||||
]
|
||||
}, stateKey);
|
||||
if (process.env.NODE_ENV !== 'production') {
|
||||
const { SegmentStateProvider } = require('../../next-devtools/userspace/app/segment-explorer-node');
|
||||
child = /*#__PURE__*/ _jsxs(SegmentStateProvider, {
|
||||
children: [
|
||||
child,
|
||||
segmentViewBoundaries
|
||||
]
|
||||
}, stateKey);
|
||||
}
|
||||
if (process.env.__NEXT_CACHE_COMPONENTS) {
|
||||
child = /*#__PURE__*/ _jsx(Activity, {
|
||||
name: debugNameToDisplay,
|
||||
mode: stateKey === activeStateKey ? 'visible' : 'hidden',
|
||||
children: child
|
||||
}, stateKey);
|
||||
}
|
||||
children.push(child);
|
||||
bfcacheEntry = bfcacheEntry.next;
|
||||
}while (bfcacheEntry !== null);
|
||||
return children;
|
||||
}
|
||||
function getBoundaryDebugNameFromSegment(segment) {
|
||||
if (segment === '/') {
|
||||
// Reached the root
|
||||
return '/';
|
||||
}
|
||||
if (typeof segment === 'string') {
|
||||
if (isVirtualLayout(segment)) {
|
||||
return undefined;
|
||||
} else {
|
||||
return segment + '/';
|
||||
}
|
||||
}
|
||||
const paramCacheKey = segment[1];
|
||||
return paramCacheKey + '/';
|
||||
}
|
||||
function isVirtualLayout(segment) {
|
||||
return(// This is inserted by the loader. We should consider encoding these
|
||||
// in a more special way instead of checking the name, to distinguish them
|
||||
// from app-defined groups.
|
||||
segment === '(slot)');
|
||||
}
|
||||
|
||||
//# sourceMappingURL=layout-router.js.map
|
||||
1
apps/public-web/node_modules/next/dist/esm/client/components/layout-router.js.map
generated
vendored
Normal file
1
apps/public-web/node_modules/next/dist/esm/client/components/layout-router.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
239
apps/public-web/node_modules/next/dist/esm/client/components/links.js
generated
vendored
Normal file
239
apps/public-web/node_modules/next/dist/esm/client/components/links.js
generated
vendored
Normal file
@@ -0,0 +1,239 @@
|
||||
import { FetchStrategy, PrefetchPriority } from './segment-cache/types';
|
||||
import { createCacheKey } from './segment-cache/cache-key';
|
||||
import { schedulePrefetchTask as scheduleSegmentPrefetchTask, cancelPrefetchTask, reschedulePrefetchTask, isPrefetchTaskDirty } from './segment-cache/scheduler';
|
||||
import { startTransition } from 'react';
|
||||
// Tracks the most recently navigated link instance. When null, indicates
|
||||
// the current navigation was not initiated by a link click.
|
||||
let linkForMostRecentNavigation = null;
|
||||
// Status object indicating link is pending
|
||||
export const PENDING_LINK_STATUS = {
|
||||
pending: true
|
||||
};
|
||||
// Status object indicating link is idle
|
||||
export const IDLE_LINK_STATUS = {
|
||||
pending: false
|
||||
};
|
||||
// Updates the loading state when navigating between links
|
||||
// - Resets the previous link's loading state
|
||||
// - Sets the new link's loading state
|
||||
// - Updates tracking of current navigation
|
||||
export function setLinkForCurrentNavigation(link) {
|
||||
startTransition(()=>{
|
||||
linkForMostRecentNavigation?.setOptimisticLinkStatus(IDLE_LINK_STATUS);
|
||||
link?.setOptimisticLinkStatus(PENDING_LINK_STATUS);
|
||||
linkForMostRecentNavigation = link;
|
||||
});
|
||||
}
|
||||
// Unmounts the current link instance from navigation tracking
|
||||
export function unmountLinkForCurrentNavigation(link) {
|
||||
if (linkForMostRecentNavigation === link) {
|
||||
linkForMostRecentNavigation = null;
|
||||
}
|
||||
}
|
||||
// Use a WeakMap to associate a Link instance with its DOM element. This is
|
||||
// used by the IntersectionObserver to track the link's visibility.
|
||||
const prefetchable = typeof WeakMap === 'function' ? new WeakMap() : new Map();
|
||||
// A Set of the currently visible links. We re-prefetch visible links after a
|
||||
// cache invalidation, or when the current URL changes. It's a separate data
|
||||
// structure from the WeakMap above because only the visible links need to
|
||||
// be enumerated.
|
||||
const prefetchableAndVisible = new Set();
|
||||
// A single IntersectionObserver instance shared by all <Link> components.
|
||||
const observer = typeof IntersectionObserver === 'function' ? new IntersectionObserver(handleIntersect, {
|
||||
rootMargin: '200px'
|
||||
}) : null;
|
||||
function observeVisibility(element, instance) {
|
||||
const existingInstance = prefetchable.get(element);
|
||||
if (existingInstance !== undefined) {
|
||||
// This shouldn't happen because each <Link> component should have its own
|
||||
// anchor tag instance, but it's defensive coding to avoid a memory leak in
|
||||
// case there's a logical error somewhere else.
|
||||
unmountPrefetchableInstance(element);
|
||||
}
|
||||
// Only track prefetchable links that have a valid prefetch URL
|
||||
prefetchable.set(element, instance);
|
||||
if (observer !== null) {
|
||||
observer.observe(element);
|
||||
}
|
||||
}
|
||||
function coercePrefetchableUrl(href) {
|
||||
if (typeof window !== 'undefined') {
|
||||
const { createPrefetchURL } = require('./app-router-utils');
|
||||
try {
|
||||
return createPrefetchURL(href);
|
||||
} catch {
|
||||
// createPrefetchURL sometimes throws an error if an invalid URL is
|
||||
// provided, though I'm not sure if it's actually necessary.
|
||||
// TODO: Consider removing the throw from the inner function, or change it
|
||||
// to reportError. Or maybe the error isn't even necessary for automatic
|
||||
// prefetches, just navigations.
|
||||
const reportErrorFn = typeof reportError === 'function' ? reportError : console.error;
|
||||
reportErrorFn(`Cannot prefetch '${href}' because it cannot be converted to a URL.`);
|
||||
return null;
|
||||
}
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
export function mountLinkInstance(element, href, router, fetchStrategy, prefetchEnabled, setOptimisticLinkStatus) {
|
||||
if (prefetchEnabled) {
|
||||
const prefetchURL = coercePrefetchableUrl(href);
|
||||
if (prefetchURL !== null) {
|
||||
const instance = {
|
||||
router,
|
||||
fetchStrategy,
|
||||
isVisible: false,
|
||||
prefetchTask: null,
|
||||
prefetchHref: prefetchURL.href,
|
||||
setOptimisticLinkStatus
|
||||
};
|
||||
// We only observe the link's visibility if it's prefetchable. For
|
||||
// example, this excludes links to external URLs.
|
||||
observeVisibility(element, instance);
|
||||
return instance;
|
||||
}
|
||||
}
|
||||
// If the link is not prefetchable, we still create an instance so we can
|
||||
// track its optimistic state (i.e. useLinkStatus).
|
||||
const instance = {
|
||||
router,
|
||||
fetchStrategy,
|
||||
isVisible: false,
|
||||
prefetchTask: null,
|
||||
prefetchHref: null,
|
||||
setOptimisticLinkStatus
|
||||
};
|
||||
return instance;
|
||||
}
|
||||
export function mountFormInstance(element, href, router, fetchStrategy) {
|
||||
const prefetchURL = coercePrefetchableUrl(href);
|
||||
if (prefetchURL === null) {
|
||||
// This href is not prefetchable, so we don't track it.
|
||||
// TODO: We currently observe/unobserve a form every time its href changes.
|
||||
// For Links, this isn't a big deal because the href doesn't usually change,
|
||||
// but for forms it's extremely common. We should optimize this.
|
||||
return;
|
||||
}
|
||||
const instance = {
|
||||
router,
|
||||
fetchStrategy,
|
||||
isVisible: false,
|
||||
prefetchTask: null,
|
||||
prefetchHref: prefetchURL.href,
|
||||
setOptimisticLinkStatus: null
|
||||
};
|
||||
observeVisibility(element, instance);
|
||||
}
|
||||
export function unmountPrefetchableInstance(element) {
|
||||
const instance = prefetchable.get(element);
|
||||
if (instance !== undefined) {
|
||||
prefetchable.delete(element);
|
||||
prefetchableAndVisible.delete(instance);
|
||||
const prefetchTask = instance.prefetchTask;
|
||||
if (prefetchTask !== null) {
|
||||
cancelPrefetchTask(prefetchTask);
|
||||
}
|
||||
}
|
||||
if (observer !== null) {
|
||||
observer.unobserve(element);
|
||||
}
|
||||
}
|
||||
function handleIntersect(entries) {
|
||||
for (const entry of entries){
|
||||
// Some extremely old browsers or polyfills don't reliably support
|
||||
// isIntersecting so we check intersectionRatio instead. (Do we care? Not
|
||||
// really. But whatever this is fine.)
|
||||
const isVisible = entry.intersectionRatio > 0;
|
||||
onLinkVisibilityChanged(entry.target, isVisible);
|
||||
}
|
||||
}
|
||||
export function onLinkVisibilityChanged(element, isVisible) {
|
||||
if (process.env.NODE_ENV !== 'production') {
|
||||
// Prefetching on viewport is disabled in development for performance
|
||||
// reasons, because it requires compiling the target page.
|
||||
// TODO: Investigate re-enabling this.
|
||||
return;
|
||||
}
|
||||
const instance = prefetchable.get(element);
|
||||
if (instance === undefined) {
|
||||
return;
|
||||
}
|
||||
instance.isVisible = isVisible;
|
||||
if (isVisible) {
|
||||
prefetchableAndVisible.add(instance);
|
||||
} else {
|
||||
prefetchableAndVisible.delete(instance);
|
||||
}
|
||||
rescheduleLinkPrefetch(instance, PrefetchPriority.Default);
|
||||
}
|
||||
export function onNavigationIntent(element, unstable_upgradeToDynamicPrefetch) {
|
||||
const instance = prefetchable.get(element);
|
||||
if (instance === undefined) {
|
||||
return;
|
||||
}
|
||||
// Prefetch the link on hover/touchstart.
|
||||
if (instance !== undefined) {
|
||||
if (process.env.__NEXT_DYNAMIC_ON_HOVER && unstable_upgradeToDynamicPrefetch) {
|
||||
// Switch to a full prefetch
|
||||
instance.fetchStrategy = FetchStrategy.Full;
|
||||
}
|
||||
rescheduleLinkPrefetch(instance, PrefetchPriority.Intent);
|
||||
}
|
||||
}
|
||||
function rescheduleLinkPrefetch(instance, priority) {
|
||||
// Ensures that app-router-instance is not compiled in the server bundle
|
||||
if (typeof window !== 'undefined') {
|
||||
const existingPrefetchTask = instance.prefetchTask;
|
||||
if (!instance.isVisible) {
|
||||
// Cancel any in-progress prefetch task. (If it already finished then this
|
||||
// is a no-op.)
|
||||
if (existingPrefetchTask !== null) {
|
||||
cancelPrefetchTask(existingPrefetchTask);
|
||||
}
|
||||
// We don't need to reset the prefetchTask to null upon cancellation; an
|
||||
// old task object can be rescheduled with reschedulePrefetchTask. This is a
|
||||
// micro-optimization but also makes the code simpler (don't need to
|
||||
// worry about whether an old task object is stale).
|
||||
return;
|
||||
}
|
||||
const { getCurrentAppRouterState } = require('./app-router-instance');
|
||||
const appRouterState = getCurrentAppRouterState();
|
||||
if (appRouterState !== null) {
|
||||
const treeAtTimeOfPrefetch = appRouterState.tree;
|
||||
if (existingPrefetchTask === null) {
|
||||
// Initiate a prefetch task.
|
||||
const nextUrl = appRouterState.nextUrl;
|
||||
const cacheKey = createCacheKey(instance.prefetchHref, nextUrl);
|
||||
instance.prefetchTask = scheduleSegmentPrefetchTask(cacheKey, treeAtTimeOfPrefetch, instance.fetchStrategy, priority, null);
|
||||
} else {
|
||||
// We already have an old task object that we can reschedule. This is
|
||||
// effectively the same as canceling the old task and creating a new one.
|
||||
reschedulePrefetchTask(existingPrefetchTask, treeAtTimeOfPrefetch, instance.fetchStrategy, priority);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
export function pingVisibleLinks(nextUrl, tree) {
|
||||
// For each currently visible link, cancel the existing prefetch task (if it
|
||||
// exists) and schedule a new one. This is effectively the same as if all the
|
||||
// visible links left and then re-entered the viewport.
|
||||
//
|
||||
// This is called when the Next-Url or the base tree changes, since those
|
||||
// may affect the result of a prefetch task. It's also called after a
|
||||
// cache invalidation.
|
||||
for (const instance of prefetchableAndVisible){
|
||||
const task = instance.prefetchTask;
|
||||
if (task !== null && !isPrefetchTaskDirty(task, nextUrl, tree)) {
|
||||
continue;
|
||||
}
|
||||
// Something changed. Cancel the existing prefetch task and schedule a
|
||||
// new one.
|
||||
if (task !== null) {
|
||||
cancelPrefetchTask(task);
|
||||
}
|
||||
const cacheKey = createCacheKey(instance.prefetchHref, nextUrl);
|
||||
instance.prefetchTask = scheduleSegmentPrefetchTask(cacheKey, tree, instance.fetchStrategy, PrefetchPriority.Default, null);
|
||||
}
|
||||
}
|
||||
|
||||
//# sourceMappingURL=links.js.map
|
||||
1
apps/public-web/node_modules/next/dist/esm/client/components/links.js.map
generated
vendored
Normal file
1
apps/public-web/node_modules/next/dist/esm/client/components/links.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
16
apps/public-web/node_modules/next/dist/esm/client/components/match-segments.js
generated
vendored
Normal file
16
apps/public-web/node_modules/next/dist/esm/client/components/match-segments.js
generated
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
export const matchSegment = (existingSegment, segment)=>{
|
||||
// segment is either Array or string
|
||||
if (typeof existingSegment === 'string') {
|
||||
if (typeof segment === 'string') {
|
||||
// Common case: segment is just a string
|
||||
return existingSegment === segment;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
if (typeof segment === 'string') {
|
||||
return false;
|
||||
}
|
||||
return existingSegment[0] === segment[0] && existingSegment[1] === segment[1];
|
||||
};
|
||||
|
||||
//# sourceMappingURL=match-segments.js.map
|
||||
1
apps/public-web/node_modules/next/dist/esm/client/components/match-segments.js.map
generated
vendored
Normal file
1
apps/public-web/node_modules/next/dist/esm/client/components/match-segments.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../../src/client/components/match-segments.ts"],"sourcesContent":["import type { Segment } from '../../shared/lib/app-router-types'\n\nexport const matchSegment = (\n existingSegment: Segment,\n segment: Segment\n): boolean => {\n // segment is either Array or string\n if (typeof existingSegment === 'string') {\n if (typeof segment === 'string') {\n // Common case: segment is just a string\n return existingSegment === segment\n }\n return false\n }\n\n if (typeof segment === 'string') {\n return false\n }\n return existingSegment[0] === segment[0] && existingSegment[1] === segment[1]\n}\n"],"names":["matchSegment","existingSegment","segment"],"mappings":"AAEA,OAAO,MAAMA,eAAe,CAC1BC,iBACAC;IAEA,oCAAoC;IACpC,IAAI,OAAOD,oBAAoB,UAAU;QACvC,IAAI,OAAOC,YAAY,UAAU;YAC/B,wCAAwC;YACxC,OAAOD,oBAAoBC;QAC7B;QACA,OAAO;IACT;IAEA,IAAI,OAAOA,YAAY,UAAU;QAC/B,OAAO;IACT;IACA,OAAOD,eAAe,CAAC,EAAE,KAAKC,OAAO,CAAC,EAAE,IAAID,eAAe,CAAC,EAAE,KAAKC,OAAO,CAAC,EAAE;AAC/E,EAAC","ignoreList":[0]}
|
||||
33
apps/public-web/node_modules/next/dist/esm/client/components/nav-failure-handler.js
generated
vendored
Normal file
33
apps/public-web/node_modules/next/dist/esm/client/components/nav-failure-handler.js
generated
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
import { useEffect } from 'react';
|
||||
import { createHrefFromUrl } from './router-reducer/create-href-from-url';
|
||||
export function handleHardNavError(error) {
|
||||
if (error && typeof window !== 'undefined' && window.next.__pendingUrl && createHrefFromUrl(new URL(window.location.href)) !== createHrefFromUrl(window.next.__pendingUrl)) {
|
||||
console.error(`Error occurred during navigation, falling back to hard navigation`, error);
|
||||
window.location.href = window.next.__pendingUrl.toString();
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
export function useNavFailureHandler() {
|
||||
if (process.env.__NEXT_APP_NAV_FAIL_HANDLING) {
|
||||
// this if is only for DCE of the feature flag not conditional
|
||||
// eslint-disable-next-line react-hooks/rules-of-hooks
|
||||
useEffect(()=>{
|
||||
const uncaughtExceptionHandler = (evt)=>{
|
||||
const error = 'reason' in evt ? evt.reason : evt.error;
|
||||
// if we have an unhandled exception/rejection during
|
||||
// a navigation we fall back to a hard navigation to
|
||||
// attempt recovering to a good state
|
||||
handleHardNavError(error);
|
||||
};
|
||||
window.addEventListener('unhandledrejection', uncaughtExceptionHandler);
|
||||
window.addEventListener('error', uncaughtExceptionHandler);
|
||||
return ()=>{
|
||||
window.removeEventListener('error', uncaughtExceptionHandler);
|
||||
window.removeEventListener('unhandledrejection', uncaughtExceptionHandler);
|
||||
};
|
||||
}, []);
|
||||
}
|
||||
}
|
||||
|
||||
//# sourceMappingURL=nav-failure-handler.js.map
|
||||
1
apps/public-web/node_modules/next/dist/esm/client/components/nav-failure-handler.js.map
generated
vendored
Normal file
1
apps/public-web/node_modules/next/dist/esm/client/components/nav-failure-handler.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../../src/client/components/nav-failure-handler.ts"],"sourcesContent":["import { useEffect } from 'react'\nimport { createHrefFromUrl } from './router-reducer/create-href-from-url'\n\nexport function handleHardNavError(error: unknown): boolean {\n if (\n error &&\n typeof window !== 'undefined' &&\n window.next.__pendingUrl &&\n createHrefFromUrl(new URL(window.location.href)) !==\n createHrefFromUrl(window.next.__pendingUrl)\n ) {\n console.error(\n `Error occurred during navigation, falling back to hard navigation`,\n error\n )\n window.location.href = window.next.__pendingUrl.toString()\n return true\n }\n return false\n}\n\nexport function useNavFailureHandler() {\n if (process.env.__NEXT_APP_NAV_FAIL_HANDLING) {\n // this if is only for DCE of the feature flag not conditional\n // eslint-disable-next-line react-hooks/rules-of-hooks\n useEffect(() => {\n const uncaughtExceptionHandler = (\n evt: ErrorEvent | PromiseRejectionEvent\n ) => {\n const error = 'reason' in evt ? evt.reason : evt.error\n // if we have an unhandled exception/rejection during\n // a navigation we fall back to a hard navigation to\n // attempt recovering to a good state\n handleHardNavError(error)\n }\n window.addEventListener('unhandledrejection', uncaughtExceptionHandler)\n window.addEventListener('error', uncaughtExceptionHandler)\n return () => {\n window.removeEventListener('error', uncaughtExceptionHandler)\n window.removeEventListener(\n 'unhandledrejection',\n uncaughtExceptionHandler\n )\n }\n }, [])\n }\n}\n"],"names":["useEffect","createHrefFromUrl","handleHardNavError","error","window","next","__pendingUrl","URL","location","href","console","toString","useNavFailureHandler","process","env","__NEXT_APP_NAV_FAIL_HANDLING","uncaughtExceptionHandler","evt","reason","addEventListener","removeEventListener"],"mappings":"AAAA,SAASA,SAAS,QAAQ,QAAO;AACjC,SAASC,iBAAiB,QAAQ,wCAAuC;AAEzE,OAAO,SAASC,mBAAmBC,KAAc;IAC/C,IACEA,SACA,OAAOC,WAAW,eAClBA,OAAOC,IAAI,CAACC,YAAY,IACxBL,kBAAkB,IAAIM,IAAIH,OAAOI,QAAQ,CAACC,IAAI,OAC5CR,kBAAkBG,OAAOC,IAAI,CAACC,YAAY,GAC5C;QACAI,QAAQP,KAAK,CACX,CAAC,iEAAiE,CAAC,EACnEA;QAEFC,OAAOI,QAAQ,CAACC,IAAI,GAAGL,OAAOC,IAAI,CAACC,YAAY,CAACK,QAAQ;QACxD,OAAO;IACT;IACA,OAAO;AACT;AAEA,OAAO,SAASC;IACd,IAAIC,QAAQC,GAAG,CAACC,4BAA4B,EAAE;QAC5C,8DAA8D;QAC9D,sDAAsD;QACtDf,UAAU;YACR,MAAMgB,2BAA2B,CAC/BC;gBAEA,MAAMd,QAAQ,YAAYc,MAAMA,IAAIC,MAAM,GAAGD,IAAId,KAAK;gBACtD,qDAAqD;gBACrD,oDAAoD;gBACpD,qCAAqC;gBACrCD,mBAAmBC;YACrB;YACAC,OAAOe,gBAAgB,CAAC,sBAAsBH;YAC9CZ,OAAOe,gBAAgB,CAAC,SAASH;YACjC,OAAO;gBACLZ,OAAOgB,mBAAmB,CAAC,SAASJ;gBACpCZ,OAAOgB,mBAAmB,CACxB,sBACAJ;YAEJ;QACF,GAAG,EAAE;IACP;AACF","ignoreList":[0]}
|
||||
103
apps/public-web/node_modules/next/dist/esm/client/components/navigation-devtools.js
generated
vendored
Normal file
103
apps/public-web/node_modules/next/dist/esm/client/components/navigation-devtools.js
generated
vendored
Normal file
@@ -0,0 +1,103 @@
|
||||
import { createDevToolsInstrumentedPromise, ReadonlyURLSearchParams } from '../../shared/lib/hooks-client-context.shared-runtime';
|
||||
import { computeSelectedLayoutSegment, getSelectedLayoutSegmentPath } from '../../shared/lib/segment';
|
||||
const layoutSegmentPromisesCache = new WeakMap();
|
||||
/**
|
||||
* Creates instrumented promises for layout segment hooks at a given tree level.
|
||||
* This is dev-only code for React Suspense DevTools instrumentation.
|
||||
*/ function createLayoutSegmentPromises(tree) {
|
||||
if (process.env.NODE_ENV === 'production') {
|
||||
return null;
|
||||
}
|
||||
// Check if we already have cached promises for this tree
|
||||
const cached = layoutSegmentPromisesCache.get(tree);
|
||||
if (cached) {
|
||||
return cached;
|
||||
}
|
||||
// Create new promises and cache them
|
||||
const segmentPromises = new Map();
|
||||
const segmentsPromises = new Map();
|
||||
const parallelRoutes = tree[1];
|
||||
for (const parallelRouteKey of Object.keys(parallelRoutes)){
|
||||
const segments = getSelectedLayoutSegmentPath(tree, parallelRouteKey);
|
||||
// Use the shared logic to compute the segment value
|
||||
const segment = computeSelectedLayoutSegment(segments, parallelRouteKey);
|
||||
segmentPromises.set(parallelRouteKey, createDevToolsInstrumentedPromise('useSelectedLayoutSegment', segment));
|
||||
segmentsPromises.set(parallelRouteKey, createDevToolsInstrumentedPromise('useSelectedLayoutSegments', segments));
|
||||
}
|
||||
const result = {
|
||||
selectedLayoutSegmentPromises: segmentPromises,
|
||||
selectedLayoutSegmentsPromises: segmentsPromises
|
||||
};
|
||||
// Cache the result for future renders
|
||||
layoutSegmentPromisesCache.set(tree, result);
|
||||
return result;
|
||||
}
|
||||
const rootNavigationPromisesCache = new WeakMap();
|
||||
/**
|
||||
* Creates instrumented navigation promises for the root app-router.
|
||||
*/ export function createRootNavigationPromises(tree, pathname, searchParams, pathParams) {
|
||||
if (process.env.NODE_ENV === 'production') {
|
||||
return null;
|
||||
}
|
||||
// Create stable cache keys from the values
|
||||
const searchParamsString = searchParams.toString();
|
||||
const pathParamsString = JSON.stringify(pathParams);
|
||||
const cacheKey = `${pathname}:${searchParamsString}:${pathParamsString}`;
|
||||
// Get or create the cache for this tree
|
||||
let treeCache = rootNavigationPromisesCache.get(tree);
|
||||
if (!treeCache) {
|
||||
treeCache = new Map();
|
||||
rootNavigationPromisesCache.set(tree, treeCache);
|
||||
}
|
||||
// Check if we have cached promises for this combination
|
||||
const cached = treeCache.get(cacheKey);
|
||||
if (cached) {
|
||||
return cached;
|
||||
}
|
||||
const readonlySearchParams = new ReadonlyURLSearchParams(searchParams);
|
||||
const layoutSegmentPromises = createLayoutSegmentPromises(tree);
|
||||
const promises = {
|
||||
pathname: createDevToolsInstrumentedPromise('usePathname', pathname),
|
||||
searchParams: createDevToolsInstrumentedPromise('useSearchParams', readonlySearchParams),
|
||||
params: createDevToolsInstrumentedPromise('useParams', pathParams),
|
||||
...layoutSegmentPromises
|
||||
};
|
||||
treeCache.set(cacheKey, promises);
|
||||
return promises;
|
||||
}
|
||||
const nestedLayoutPromisesCache = new WeakMap();
|
||||
/**
|
||||
* Creates merged navigation promises for nested layouts.
|
||||
* Merges parent promises with layout-specific segment promises.
|
||||
*/ export function createNestedLayoutNavigationPromises(tree, parentNavPromises) {
|
||||
if (process.env.NODE_ENV === 'production') {
|
||||
return null;
|
||||
}
|
||||
const parallelRoutes = tree[1];
|
||||
const parallelRouteKeys = Object.keys(parallelRoutes);
|
||||
// Only create promises if there are parallel routes at this level
|
||||
if (parallelRouteKeys.length === 0) {
|
||||
return null;
|
||||
}
|
||||
// Get or create the cache for this tree
|
||||
let treeCache = nestedLayoutPromisesCache.get(tree);
|
||||
if (!treeCache) {
|
||||
treeCache = new Map();
|
||||
nestedLayoutPromisesCache.set(tree, treeCache);
|
||||
}
|
||||
// Check if we have cached promises for this parent combination
|
||||
const cached = treeCache.get(parentNavPromises);
|
||||
if (cached) {
|
||||
return cached;
|
||||
}
|
||||
// Create merged promises
|
||||
const layoutSegmentPromises = createLayoutSegmentPromises(tree);
|
||||
const promises = {
|
||||
...parentNavPromises,
|
||||
...layoutSegmentPromises
|
||||
};
|
||||
treeCache.set(parentNavPromises, promises);
|
||||
return promises;
|
||||
}
|
||||
|
||||
//# sourceMappingURL=navigation-devtools.js.map
|
||||
1
apps/public-web/node_modules/next/dist/esm/client/components/navigation-devtools.js.map
generated
vendored
Normal file
1
apps/public-web/node_modules/next/dist/esm/client/components/navigation-devtools.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
59
apps/public-web/node_modules/next/dist/esm/client/components/navigation-untracked.js
generated
vendored
Normal file
59
apps/public-web/node_modules/next/dist/esm/client/components/navigation-untracked.js
generated
vendored
Normal file
@@ -0,0 +1,59 @@
|
||||
import { useContext } from 'react';
|
||||
import { PathnameContext } from '../../shared/lib/hooks-client-context.shared-runtime';
|
||||
/**
|
||||
* This checks to see if the current render has any unknown route parameters that
|
||||
* would cause the pathname to be dynamic. It's used to trigger a different
|
||||
* render path in the error boundary.
|
||||
*
|
||||
* @returns true if there are any unknown route parameters, false otherwise
|
||||
*/ function hasFallbackRouteParams() {
|
||||
if (typeof window === 'undefined') {
|
||||
// AsyncLocalStorage should not be included in the client bundle.
|
||||
const { workUnitAsyncStorage } = require('../../server/app-render/work-unit-async-storage.external');
|
||||
const workUnitStore = workUnitAsyncStorage.getStore();
|
||||
if (!workUnitStore) return false;
|
||||
switch(workUnitStore.type){
|
||||
case 'prerender':
|
||||
case 'prerender-client':
|
||||
case 'prerender-ppr':
|
||||
const fallbackParams = workUnitStore.fallbackRouteParams;
|
||||
return fallbackParams ? fallbackParams.size > 0 : false;
|
||||
case 'prerender-legacy':
|
||||
case 'request':
|
||||
case 'prerender-runtime':
|
||||
case 'cache':
|
||||
case 'private-cache':
|
||||
case 'unstable-cache':
|
||||
break;
|
||||
default:
|
||||
workUnitStore;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
/**
|
||||
* This returns a `null` value if there are any unknown route parameters, and
|
||||
* otherwise returns the pathname from the context. This is an alternative to
|
||||
* `usePathname` that is used in the error boundary to avoid rendering the
|
||||
* error boundary when there are unknown route parameters. This doesn't throw
|
||||
* when accessed with unknown route parameters.
|
||||
*
|
||||
* @returns
|
||||
*
|
||||
* @internal
|
||||
*/ export function useUntrackedPathname() {
|
||||
// If there are any unknown route parameters we would typically throw
|
||||
// an error, but this internal method allows us to return a null value instead
|
||||
// for components that do not propagate the pathname to the static shell (like
|
||||
// the error boundary).
|
||||
if (hasFallbackRouteParams()) {
|
||||
return null;
|
||||
}
|
||||
// This shouldn't cause any issues related to conditional rendering because
|
||||
// the environment will be consistent for the render.
|
||||
// eslint-disable-next-line react-hooks/rules-of-hooks
|
||||
return useContext(PathnameContext);
|
||||
}
|
||||
|
||||
//# sourceMappingURL=navigation-untracked.js.map
|
||||
1
apps/public-web/node_modules/next/dist/esm/client/components/navigation-untracked.js.map
generated
vendored
Normal file
1
apps/public-web/node_modules/next/dist/esm/client/components/navigation-untracked.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../../src/client/components/navigation-untracked.ts"],"sourcesContent":["import { useContext } from 'react'\nimport { PathnameContext } from '../../shared/lib/hooks-client-context.shared-runtime'\n\n/**\n * This checks to see if the current render has any unknown route parameters that\n * would cause the pathname to be dynamic. It's used to trigger a different\n * render path in the error boundary.\n *\n * @returns true if there are any unknown route parameters, false otherwise\n */\nfunction hasFallbackRouteParams(): boolean {\n if (typeof window === 'undefined') {\n // AsyncLocalStorage should not be included in the client bundle.\n const { workUnitAsyncStorage } =\n require('../../server/app-render/work-unit-async-storage.external') as typeof import('../../server/app-render/work-unit-async-storage.external')\n\n const workUnitStore = workUnitAsyncStorage.getStore()\n if (!workUnitStore) return false\n\n switch (workUnitStore.type) {\n case 'prerender':\n case 'prerender-client':\n case 'prerender-ppr':\n const fallbackParams = workUnitStore.fallbackRouteParams\n return fallbackParams ? fallbackParams.size > 0 : false\n case 'prerender-legacy':\n case 'request':\n case 'prerender-runtime':\n case 'cache':\n case 'private-cache':\n case 'unstable-cache':\n break\n default:\n workUnitStore satisfies never\n }\n\n return false\n }\n\n return false\n}\n\n/**\n * This returns a `null` value if there are any unknown route parameters, and\n * otherwise returns the pathname from the context. This is an alternative to\n * `usePathname` that is used in the error boundary to avoid rendering the\n * error boundary when there are unknown route parameters. This doesn't throw\n * when accessed with unknown route parameters.\n *\n * @returns\n *\n * @internal\n */\nexport function useUntrackedPathname(): string | null {\n // If there are any unknown route parameters we would typically throw\n // an error, but this internal method allows us to return a null value instead\n // for components that do not propagate the pathname to the static shell (like\n // the error boundary).\n if (hasFallbackRouteParams()) {\n return null\n }\n\n // This shouldn't cause any issues related to conditional rendering because\n // the environment will be consistent for the render.\n // eslint-disable-next-line react-hooks/rules-of-hooks\n return useContext(PathnameContext)\n}\n"],"names":["useContext","PathnameContext","hasFallbackRouteParams","window","workUnitAsyncStorage","require","workUnitStore","getStore","type","fallbackParams","fallbackRouteParams","size","useUntrackedPathname"],"mappings":"AAAA,SAASA,UAAU,QAAQ,QAAO;AAClC,SAASC,eAAe,QAAQ,uDAAsD;AAEtF;;;;;;CAMC,GACD,SAASC;IACP,IAAI,OAAOC,WAAW,aAAa;QACjC,iEAAiE;QACjE,MAAM,EAAEC,oBAAoB,EAAE,GAC5BC,QAAQ;QAEV,MAAMC,gBAAgBF,qBAAqBG,QAAQ;QACnD,IAAI,CAACD,eAAe,OAAO;QAE3B,OAAQA,cAAcE,IAAI;YACxB,KAAK;YACL,KAAK;YACL,KAAK;gBACH,MAAMC,iBAAiBH,cAAcI,mBAAmB;gBACxD,OAAOD,iBAAiBA,eAAeE,IAAI,GAAG,IAAI;YACpD,KAAK;YACL,KAAK;YACL,KAAK;YACL,KAAK;YACL,KAAK;YACL,KAAK;gBACH;YACF;gBACEL;QACJ;QAEA,OAAO;IACT;IAEA,OAAO;AACT;AAEA;;;;;;;;;;CAUC,GACD,OAAO,SAASM;IACd,qEAAqE;IACrE,8EAA8E;IAC9E,8EAA8E;IAC9E,uBAAuB;IACvB,IAAIV,0BAA0B;QAC5B,OAAO;IACT;IAEA,2EAA2E;IAC3E,qDAAqD;IACrD,sDAAsD;IACtD,OAAOF,WAAWC;AACpB","ignoreList":[0]}
|
||||
227
apps/public-web/node_modules/next/dist/esm/client/components/navigation.js
generated
vendored
Normal file
227
apps/public-web/node_modules/next/dist/esm/client/components/navigation.js
generated
vendored
Normal file
@@ -0,0 +1,227 @@
|
||||
import React, { useContext, useMemo, use } from 'react';
|
||||
import { AppRouterContext, LayoutRouterContext } from '../../shared/lib/app-router-context.shared-runtime';
|
||||
import { SearchParamsContext, PathnameContext, PathParamsContext, NavigationPromisesContext, ReadonlyURLSearchParams } from '../../shared/lib/hooks-client-context.shared-runtime';
|
||||
import { computeSelectedLayoutSegment, getSelectedLayoutSegmentPath } from '../../shared/lib/segment';
|
||||
const useDynamicRouteParams = typeof window === 'undefined' ? require('../../server/app-render/dynamic-rendering').useDynamicRouteParams : undefined;
|
||||
const useDynamicSearchParams = typeof window === 'undefined' ? require('../../server/app-render/dynamic-rendering').useDynamicSearchParams : undefined;
|
||||
/**
|
||||
* A [Client Component](https://nextjs.org/docs/app/building-your-application/rendering/client-components) hook
|
||||
* that lets you *read* the current URL's search parameters.
|
||||
*
|
||||
* Learn more about [`URLSearchParams` on MDN](https://developer.mozilla.org/docs/Web/API/URLSearchParams)
|
||||
*
|
||||
* @example
|
||||
* ```ts
|
||||
* "use client"
|
||||
* import { useSearchParams } from 'next/navigation'
|
||||
*
|
||||
* export default function Page() {
|
||||
* const searchParams = useSearchParams()
|
||||
* searchParams.get('foo') // returns 'bar' when ?foo=bar
|
||||
* // ...
|
||||
* }
|
||||
* ```
|
||||
*
|
||||
* Read more: [Next.js Docs: `useSearchParams`](https://nextjs.org/docs/app/api-reference/functions/use-search-params)
|
||||
*/ // Client components API
|
||||
export function useSearchParams() {
|
||||
useDynamicSearchParams?.('useSearchParams()');
|
||||
const searchParams = useContext(SearchParamsContext);
|
||||
// In the case where this is `null`, the compat types added in
|
||||
// `next-env.d.ts` will add a new overload that changes the return type to
|
||||
// include `null`.
|
||||
const readonlySearchParams = useMemo(()=>{
|
||||
if (!searchParams) {
|
||||
// When the router is not ready in pages, we won't have the search params
|
||||
// available.
|
||||
return null;
|
||||
}
|
||||
return new ReadonlyURLSearchParams(searchParams);
|
||||
}, [
|
||||
searchParams
|
||||
]);
|
||||
// Instrument with Suspense DevTools (dev-only)
|
||||
if (process.env.NODE_ENV !== 'production' && 'use' in React) {
|
||||
const navigationPromises = use(NavigationPromisesContext);
|
||||
if (navigationPromises) {
|
||||
return use(navigationPromises.searchParams);
|
||||
}
|
||||
}
|
||||
return readonlySearchParams;
|
||||
}
|
||||
/**
|
||||
* A [Client Component](https://nextjs.org/docs/app/building-your-application/rendering/client-components) hook
|
||||
* that lets you read the current URL's pathname.
|
||||
*
|
||||
* @example
|
||||
* ```ts
|
||||
* "use client"
|
||||
* import { usePathname } from 'next/navigation'
|
||||
*
|
||||
* export default function Page() {
|
||||
* const pathname = usePathname() // returns "/dashboard" on /dashboard?foo=bar
|
||||
* // ...
|
||||
* }
|
||||
* ```
|
||||
*
|
||||
* Read more: [Next.js Docs: `usePathname`](https://nextjs.org/docs/app/api-reference/functions/use-pathname)
|
||||
*/ // Client components API
|
||||
export function usePathname() {
|
||||
useDynamicRouteParams?.('usePathname()');
|
||||
// In the case where this is `null`, the compat types added in `next-env.d.ts`
|
||||
// will add a new overload that changes the return type to include `null`.
|
||||
const pathname = useContext(PathnameContext);
|
||||
// Instrument with Suspense DevTools (dev-only)
|
||||
if (process.env.NODE_ENV !== 'production' && 'use' in React) {
|
||||
const navigationPromises = use(NavigationPromisesContext);
|
||||
if (navigationPromises) {
|
||||
return use(navigationPromises.pathname);
|
||||
}
|
||||
}
|
||||
return pathname;
|
||||
}
|
||||
// Client components API
|
||||
export { ServerInsertedHTMLContext, useServerInsertedHTML } from '../../shared/lib/server-inserted-html.shared-runtime';
|
||||
/**
|
||||
*
|
||||
* This hook allows you to programmatically change routes inside [Client Component](https://nextjs.org/docs/app/building-your-application/rendering/client-components).
|
||||
*
|
||||
* @example
|
||||
* ```ts
|
||||
* "use client"
|
||||
* import { useRouter } from 'next/navigation'
|
||||
*
|
||||
* export default function Page() {
|
||||
* const router = useRouter()
|
||||
* // ...
|
||||
* router.push('/dashboard') // Navigate to /dashboard
|
||||
* }
|
||||
* ```
|
||||
*
|
||||
* Read more: [Next.js Docs: `useRouter`](https://nextjs.org/docs/app/api-reference/functions/use-router)
|
||||
*/ // Client components API
|
||||
export function useRouter() {
|
||||
const router = useContext(AppRouterContext);
|
||||
if (router === null) {
|
||||
throw Object.defineProperty(new Error('invariant expected app router to be mounted'), "__NEXT_ERROR_CODE", {
|
||||
value: "E238",
|
||||
enumerable: false,
|
||||
configurable: true
|
||||
});
|
||||
}
|
||||
return router;
|
||||
}
|
||||
/**
|
||||
* A [Client Component](https://nextjs.org/docs/app/building-your-application/rendering/client-components) hook
|
||||
* that lets you read a route's dynamic params filled in by the current URL.
|
||||
*
|
||||
* @example
|
||||
* ```ts
|
||||
* "use client"
|
||||
* import { useParams } from 'next/navigation'
|
||||
*
|
||||
* export default function Page() {
|
||||
* // on /dashboard/[team] where pathname is /dashboard/nextjs
|
||||
* const { team } = useParams() // team === "nextjs"
|
||||
* }
|
||||
* ```
|
||||
*
|
||||
* Read more: [Next.js Docs: `useParams`](https://nextjs.org/docs/app/api-reference/functions/use-params)
|
||||
*/ // Client components API
|
||||
export function useParams() {
|
||||
useDynamicRouteParams?.('useParams()');
|
||||
const params = useContext(PathParamsContext);
|
||||
// Instrument with Suspense DevTools (dev-only)
|
||||
if (process.env.NODE_ENV !== 'production' && 'use' in React) {
|
||||
const navigationPromises = use(NavigationPromisesContext);
|
||||
if (navigationPromises) {
|
||||
return use(navigationPromises.params);
|
||||
}
|
||||
}
|
||||
return params;
|
||||
}
|
||||
/**
|
||||
* A [Client Component](https://nextjs.org/docs/app/building-your-application/rendering/client-components) hook
|
||||
* that lets you read the active route segments **below** the Layout it is called from.
|
||||
*
|
||||
* @example
|
||||
* ```ts
|
||||
* 'use client'
|
||||
*
|
||||
* import { useSelectedLayoutSegments } from 'next/navigation'
|
||||
*
|
||||
* export default function ExampleClientComponent() {
|
||||
* const segments = useSelectedLayoutSegments()
|
||||
*
|
||||
* return (
|
||||
* <ul>
|
||||
* {segments.map((segment, index) => (
|
||||
* <li key={index}>{segment}</li>
|
||||
* ))}
|
||||
* </ul>
|
||||
* )
|
||||
* }
|
||||
* ```
|
||||
*
|
||||
* Read more: [Next.js Docs: `useSelectedLayoutSegments`](https://nextjs.org/docs/app/api-reference/functions/use-selected-layout-segments)
|
||||
*/ // Client components API
|
||||
export function useSelectedLayoutSegments(parallelRouteKey = 'children') {
|
||||
useDynamicRouteParams?.('useSelectedLayoutSegments()');
|
||||
const context = useContext(LayoutRouterContext);
|
||||
// @ts-expect-error This only happens in `pages`. Type is overwritten in navigation.d.ts
|
||||
if (!context) return null;
|
||||
// Instrument with Suspense DevTools (dev-only)
|
||||
if (process.env.NODE_ENV !== 'production' && 'use' in React) {
|
||||
const navigationPromises = use(NavigationPromisesContext);
|
||||
if (navigationPromises) {
|
||||
const promise = navigationPromises.selectedLayoutSegmentsPromises?.get(parallelRouteKey);
|
||||
if (promise) {
|
||||
// We should always have a promise here, but if we don't, it's not worth erroring over.
|
||||
// We just won't be able to instrument it, but can still provide the value.
|
||||
return use(promise);
|
||||
}
|
||||
}
|
||||
}
|
||||
return getSelectedLayoutSegmentPath(context.parentTree, parallelRouteKey);
|
||||
}
|
||||
/**
|
||||
* A [Client Component](https://nextjs.org/docs/app/building-your-application/rendering/client-components) hook
|
||||
* that lets you read the active route segment **one level below** the Layout it is called from.
|
||||
*
|
||||
* @example
|
||||
* ```ts
|
||||
* 'use client'
|
||||
* import { useSelectedLayoutSegment } from 'next/navigation'
|
||||
*
|
||||
* export default function ExampleClientComponent() {
|
||||
* const segment = useSelectedLayoutSegment()
|
||||
*
|
||||
* return <p>Active segment: {segment}</p>
|
||||
* }
|
||||
* ```
|
||||
*
|
||||
* Read more: [Next.js Docs: `useSelectedLayoutSegment`](https://nextjs.org/docs/app/api-reference/functions/use-selected-layout-segment)
|
||||
*/ // Client components API
|
||||
export function useSelectedLayoutSegment(parallelRouteKey = 'children') {
|
||||
useDynamicRouteParams?.('useSelectedLayoutSegment()');
|
||||
const navigationPromises = useContext(NavigationPromisesContext);
|
||||
const selectedLayoutSegments = useSelectedLayoutSegments(parallelRouteKey);
|
||||
// Instrument with Suspense DevTools (dev-only)
|
||||
if (process.env.NODE_ENV !== 'production' && navigationPromises && 'use' in React) {
|
||||
const promise = navigationPromises.selectedLayoutSegmentPromises?.get(parallelRouteKey);
|
||||
if (promise) {
|
||||
// We should always have a promise here, but if we don't, it's not worth erroring over.
|
||||
// We just won't be able to instrument it, but can still provide the value.
|
||||
return use(promise);
|
||||
}
|
||||
}
|
||||
return computeSelectedLayoutSegment(selectedLayoutSegments, parallelRouteKey);
|
||||
}
|
||||
export { unstable_isUnrecognizedActionError } from './unrecognized-action-error';
|
||||
// Shared components APIs
|
||||
export { // We need the same class that was used to instantiate the context value
|
||||
// Otherwise instanceof checks will fail in usercode
|
||||
ReadonlyURLSearchParams, };
|
||||
export { notFound, forbidden, unauthorized, redirect, permanentRedirect, RedirectType, unstable_rethrow } from './navigation.react-server';
|
||||
|
||||
//# sourceMappingURL=navigation.js.map
|
||||
1
apps/public-web/node_modules/next/dist/esm/client/components/navigation.js.map
generated
vendored
Normal file
1
apps/public-web/node_modules/next/dist/esm/client/components/navigation.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
17
apps/public-web/node_modules/next/dist/esm/client/components/navigation.react-server.js
generated
vendored
Normal file
17
apps/public-web/node_modules/next/dist/esm/client/components/navigation.react-server.js
generated
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
import { ReadonlyURLSearchParams } from './readonly-url-search-params';
|
||||
export function unstable_isUnrecognizedActionError() {
|
||||
throw Object.defineProperty(new Error('`unstable_isUnrecognizedActionError` can only be used on the client.'), "__NEXT_ERROR_CODE", {
|
||||
value: "E776",
|
||||
enumerable: false,
|
||||
configurable: true
|
||||
});
|
||||
}
|
||||
export { redirect, permanentRedirect } from './redirect';
|
||||
export { RedirectType } from './redirect-error';
|
||||
export { notFound } from './not-found';
|
||||
export { forbidden } from './forbidden';
|
||||
export { unauthorized } from './unauthorized';
|
||||
export { unstable_rethrow } from './unstable-rethrow';
|
||||
export { ReadonlyURLSearchParams };
|
||||
|
||||
//# sourceMappingURL=navigation.react-server.js.map
|
||||
1
apps/public-web/node_modules/next/dist/esm/client/components/navigation.react-server.js.map
generated
vendored
Normal file
1
apps/public-web/node_modules/next/dist/esm/client/components/navigation.react-server.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../../src/client/components/navigation.react-server.ts"],"sourcesContent":["import { ReadonlyURLSearchParams } from './readonly-url-search-params'\n\nexport function unstable_isUnrecognizedActionError(): boolean {\n throw new Error(\n '`unstable_isUnrecognizedActionError` can only be used on the client.'\n )\n}\n\nexport { redirect, permanentRedirect } from './redirect'\nexport { RedirectType } from './redirect-error'\nexport { notFound } from './not-found'\nexport { forbidden } from './forbidden'\nexport { unauthorized } from './unauthorized'\nexport { unstable_rethrow } from './unstable-rethrow'\nexport { ReadonlyURLSearchParams }\n"],"names":["ReadonlyURLSearchParams","unstable_isUnrecognizedActionError","Error","redirect","permanentRedirect","RedirectType","notFound","forbidden","unauthorized","unstable_rethrow"],"mappings":"AAAA,SAASA,uBAAuB,QAAQ,+BAA8B;AAEtE,OAAO,SAASC;IACd,MAAM,qBAEL,CAFK,IAAIC,MACR,yEADI,qBAAA;eAAA;oBAAA;sBAAA;IAEN;AACF;AAEA,SAASC,QAAQ,EAAEC,iBAAiB,QAAQ,aAAY;AACxD,SAASC,YAAY,QAAQ,mBAAkB;AAC/C,SAASC,QAAQ,QAAQ,cAAa;AACtC,SAASC,SAAS,QAAQ,cAAa;AACvC,SAASC,YAAY,QAAQ,iBAAgB;AAC7C,SAASC,gBAAgB,QAAQ,qBAAoB;AACrD,SAAST,uBAAuB,GAAE","ignoreList":[0]}
|
||||
5
apps/public-web/node_modules/next/dist/esm/client/components/noop-head.js
generated
vendored
Normal file
5
apps/public-web/node_modules/next/dist/esm/client/components/noop-head.js
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
export default function NoopHead() {
|
||||
return null;
|
||||
}
|
||||
|
||||
//# sourceMappingURL=noop-head.js.map
|
||||
1
apps/public-web/node_modules/next/dist/esm/client/components/noop-head.js.map
generated
vendored
Normal file
1
apps/public-web/node_modules/next/dist/esm/client/components/noop-head.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../../src/client/components/noop-head.tsx"],"sourcesContent":["export default function NoopHead() {\n return null\n}\n"],"names":["NoopHead"],"mappings":"AAAA,eAAe,SAASA;IACtB,OAAO;AACT","ignoreList":[0]}
|
||||
26
apps/public-web/node_modules/next/dist/esm/client/components/not-found.js
generated
vendored
Normal file
26
apps/public-web/node_modules/next/dist/esm/client/components/not-found.js
generated
vendored
Normal file
@@ -0,0 +1,26 @@
|
||||
import { HTTP_ERROR_FALLBACK_ERROR_CODE } from './http-access-fallback/http-access-fallback';
|
||||
/**
|
||||
* This function allows you to render the [not-found.js file](https://nextjs.org/docs/app/api-reference/file-conventions/not-found)
|
||||
* within a route segment as well as inject a tag.
|
||||
*
|
||||
* `notFound()` can be used in
|
||||
* [Server Components](https://nextjs.org/docs/app/building-your-application/rendering/server-components),
|
||||
* [Route Handlers](https://nextjs.org/docs/app/building-your-application/routing/route-handlers), and
|
||||
* [Server Actions](https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions-and-mutations).
|
||||
*
|
||||
* - In a Server Component, this will insert a `<meta name="robots" content="noindex" />` meta tag and set the status code to 404.
|
||||
* - In a Route Handler or Server Action, it will serve a 404 to the caller.
|
||||
*
|
||||
* Read more: [Next.js Docs: `notFound`](https://nextjs.org/docs/app/api-reference/functions/not-found)
|
||||
*/ const DIGEST = `${HTTP_ERROR_FALLBACK_ERROR_CODE};404`;
|
||||
export function notFound() {
|
||||
const error = Object.defineProperty(new Error(DIGEST), "__NEXT_ERROR_CODE", {
|
||||
value: "E394",
|
||||
enumerable: false,
|
||||
configurable: true
|
||||
});
|
||||
error.digest = DIGEST;
|
||||
throw error;
|
||||
}
|
||||
|
||||
//# sourceMappingURL=not-found.js.map
|
||||
1
apps/public-web/node_modules/next/dist/esm/client/components/not-found.js.map
generated
vendored
Normal file
1
apps/public-web/node_modules/next/dist/esm/client/components/not-found.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../../src/client/components/not-found.ts"],"sourcesContent":["import {\n HTTP_ERROR_FALLBACK_ERROR_CODE,\n type HTTPAccessFallbackError,\n} from './http-access-fallback/http-access-fallback'\n\n/**\n * This function allows you to render the [not-found.js file](https://nextjs.org/docs/app/api-reference/file-conventions/not-found)\n * within a route segment as well as inject a tag.\n *\n * `notFound()` can be used in\n * [Server Components](https://nextjs.org/docs/app/building-your-application/rendering/server-components),\n * [Route Handlers](https://nextjs.org/docs/app/building-your-application/routing/route-handlers), and\n * [Server Actions](https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions-and-mutations).\n *\n * - In a Server Component, this will insert a `<meta name=\"robots\" content=\"noindex\" />` meta tag and set the status code to 404.\n * - In a Route Handler or Server Action, it will serve a 404 to the caller.\n *\n * Read more: [Next.js Docs: `notFound`](https://nextjs.org/docs/app/api-reference/functions/not-found)\n */\n\nconst DIGEST = `${HTTP_ERROR_FALLBACK_ERROR_CODE};404`\n\nexport function notFound(): never {\n const error = new Error(DIGEST) as HTTPAccessFallbackError\n ;(error as HTTPAccessFallbackError).digest = DIGEST\n\n throw error\n}\n"],"names":["HTTP_ERROR_FALLBACK_ERROR_CODE","DIGEST","notFound","error","Error","digest"],"mappings":"AAAA,SACEA,8BAA8B,QAEzB,8CAA6C;AAEpD;;;;;;;;;;;;;CAaC,GAED,MAAMC,SAAS,GAAGD,+BAA+B,IAAI,CAAC;AAEtD,OAAO,SAASE;IACd,MAAMC,QAAQ,qBAAiB,CAAjB,IAAIC,MAAMH,SAAV,qBAAA;eAAA;oBAAA;sBAAA;IAAgB;IAC5BE,MAAkCE,MAAM,GAAGJ;IAE7C,MAAME;AACR","ignoreList":[0]}
|
||||
58
apps/public-web/node_modules/next/dist/esm/client/components/promise-queue.js
generated
vendored
Normal file
58
apps/public-web/node_modules/next/dist/esm/client/components/promise-queue.js
generated
vendored
Normal file
@@ -0,0 +1,58 @@
|
||||
/*
|
||||
This is a simple promise queue that allows you to limit the number of concurrent promises
|
||||
that are running at any given time. It's used to limit the number of concurrent
|
||||
prefetch requests that are being made to the server but could be used for other
|
||||
things as well.
|
||||
*/ export class PromiseQueue {
|
||||
#maxConcurrency;
|
||||
#runningCount;
|
||||
#queue;
|
||||
constructor(maxConcurrency = 5){
|
||||
this.#maxConcurrency = maxConcurrency;
|
||||
this.#runningCount = 0;
|
||||
this.#queue = [];
|
||||
}
|
||||
enqueue(promiseFn) {
|
||||
let taskResolve;
|
||||
let taskReject;
|
||||
const taskPromise = new Promise((resolve, reject)=>{
|
||||
taskResolve = resolve;
|
||||
taskReject = reject;
|
||||
});
|
||||
const task = async ()=>{
|
||||
try {
|
||||
this.#runningCount++;
|
||||
const result = await promiseFn();
|
||||
taskResolve(result);
|
||||
} catch (error) {
|
||||
taskReject(error);
|
||||
} finally{
|
||||
this.#runningCount--;
|
||||
this.#processNext();
|
||||
}
|
||||
};
|
||||
const enqueueResult = {
|
||||
promiseFn: taskPromise,
|
||||
task
|
||||
};
|
||||
// wonder if we should take a LIFO approach here
|
||||
this.#queue.push(enqueueResult);
|
||||
this.#processNext();
|
||||
return taskPromise;
|
||||
}
|
||||
bump(promiseFn) {
|
||||
const index = this.#queue.findIndex((item)=>item.promiseFn === promiseFn);
|
||||
if (index > -1) {
|
||||
const bumpedItem = this.#queue.splice(index, 1)[0];
|
||||
this.#queue.unshift(bumpedItem);
|
||||
this.#processNext(true);
|
||||
}
|
||||
}
|
||||
#processNext(forced = false) {
|
||||
if ((this.#runningCount < this.#maxConcurrency || forced) && this.#queue.length > 0) {
|
||||
this.#queue.shift()?.task();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//# sourceMappingURL=promise-queue.js.map
|
||||
1
apps/public-web/node_modules/next/dist/esm/client/components/promise-queue.js.map
generated
vendored
Normal file
1
apps/public-web/node_modules/next/dist/esm/client/components/promise-queue.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../../src/client/components/promise-queue.ts"],"sourcesContent":["/*\n This is a simple promise queue that allows you to limit the number of concurrent promises\n that are running at any given time. It's used to limit the number of concurrent\n prefetch requests that are being made to the server but could be used for other\n things as well.\n*/\nexport class PromiseQueue {\n #maxConcurrency: number\n #runningCount: number\n #queue: Array<{\n promiseFn: Promise<any>\n task: () => void\n }>\n\n constructor(maxConcurrency = 5) {\n this.#maxConcurrency = maxConcurrency\n this.#runningCount = 0\n this.#queue = []\n }\n\n enqueue<T>(promiseFn: () => Promise<T>): Promise<T> {\n let taskResolve: (value: T | PromiseLike<T>) => void\n let taskReject: (reason?: any) => void\n\n const taskPromise = new Promise((resolve, reject) => {\n taskResolve = resolve\n taskReject = reject\n }) as Promise<T>\n\n const task = async () => {\n try {\n this.#runningCount++\n const result = await promiseFn()\n taskResolve(result)\n } catch (error) {\n taskReject(error)\n } finally {\n this.#runningCount--\n this.#processNext()\n }\n }\n\n const enqueueResult = { promiseFn: taskPromise, task }\n // wonder if we should take a LIFO approach here\n this.#queue.push(enqueueResult)\n this.#processNext()\n\n return taskPromise\n }\n\n bump(promiseFn: Promise<any>) {\n const index = this.#queue.findIndex((item) => item.promiseFn === promiseFn)\n\n if (index > -1) {\n const bumpedItem = this.#queue.splice(index, 1)[0]\n this.#queue.unshift(bumpedItem)\n this.#processNext(true)\n }\n }\n\n #processNext(forced = false) {\n if (\n (this.#runningCount < this.#maxConcurrency || forced) &&\n this.#queue.length > 0\n ) {\n this.#queue.shift()?.task()\n }\n }\n}\n"],"names":["PromiseQueue","constructor","maxConcurrency","enqueue","promiseFn","taskResolve","taskReject","taskPromise","Promise","resolve","reject","task","result","error","enqueueResult","push","bump","index","findIndex","item","bumpedItem","splice","unshift","forced","length","shift"],"mappings":"AAAA;;;;;AAKA,GACA,OAAO,MAAMA;IACX,CAAA,cAAe,CAAQ;IACvB,CAAA,YAAa,CAAQ;IACrB,CAAA,KAAM,CAGJ;IAEFC,YAAYC,iBAAiB,CAAC,CAAE;QAC9B,IAAI,CAAC,CAAA,cAAe,GAAGA;QACvB,IAAI,CAAC,CAAA,YAAa,GAAG;QACrB,IAAI,CAAC,CAAA,KAAM,GAAG,EAAE;IAClB;IAEAC,QAAWC,SAA2B,EAAc;QAClD,IAAIC;QACJ,IAAIC;QAEJ,MAAMC,cAAc,IAAIC,QAAQ,CAACC,SAASC;YACxCL,cAAcI;YACdH,aAAaI;QACf;QAEA,MAAMC,OAAO;YACX,IAAI;gBACF,IAAI,CAAC,CAAA,YAAa;gBAClB,MAAMC,SAAS,MAAMR;gBACrBC,YAAYO;YACd,EAAE,OAAOC,OAAO;gBACdP,WAAWO;YACb,SAAU;gBACR,IAAI,CAAC,CAAA,YAAa;gBAClB,IAAI,CAAC,CAAA,WAAY;YACnB;QACF;QAEA,MAAMC,gBAAgB;YAAEV,WAAWG;YAAaI;QAAK;QACrD,gDAAgD;QAChD,IAAI,CAAC,CAAA,KAAM,CAACI,IAAI,CAACD;QACjB,IAAI,CAAC,CAAA,WAAY;QAEjB,OAAOP;IACT;IAEAS,KAAKZ,SAAuB,EAAE;QAC5B,MAAMa,QAAQ,IAAI,CAAC,CAAA,KAAM,CAACC,SAAS,CAAC,CAACC,OAASA,KAAKf,SAAS,KAAKA;QAEjE,IAAIa,QAAQ,CAAC,GAAG;YACd,MAAMG,aAAa,IAAI,CAAC,CAAA,KAAM,CAACC,MAAM,CAACJ,OAAO,EAAE,CAAC,EAAE;YAClD,IAAI,CAAC,CAAA,KAAM,CAACK,OAAO,CAACF;YACpB,IAAI,CAAC,CAAA,WAAY,CAAC;QACpB;IACF;IAEA,CAAA,WAAY,CAACG,SAAS,KAAK;QACzB,IACE,AAAC,CAAA,IAAI,CAAC,CAAA,YAAa,GAAG,IAAI,CAAC,CAAA,cAAe,IAAIA,MAAK,KACnD,IAAI,CAAC,CAAA,KAAM,CAACC,MAAM,GAAG,GACrB;YACA,IAAI,CAAC,CAAA,KAAM,CAACC,KAAK,IAAId;QACvB;IACF;AACF","ignoreList":[0]}
|
||||
28
apps/public-web/node_modules/next/dist/esm/client/components/readonly-url-search-params.js
generated
vendored
Normal file
28
apps/public-web/node_modules/next/dist/esm/client/components/readonly-url-search-params.js
generated
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
/**
|
||||
* ReadonlyURLSearchParams implementation shared between client and server.
|
||||
* This file is intentionally not marked as 'use client' or 'use server'
|
||||
* so it can be imported by both environments.
|
||||
*/ /** @internal */ class ReadonlyURLSearchParamsError extends Error {
|
||||
constructor(){
|
||||
super('Method unavailable on `ReadonlyURLSearchParams`. Read more: https://nextjs.org/docs/app/api-reference/functions/use-search-params#updating-searchparams');
|
||||
}
|
||||
}
|
||||
/**
|
||||
* A read-only version of URLSearchParams that throws errors when mutation methods are called.
|
||||
* This ensures that the URLSearchParams returned by useSearchParams() cannot be mutated.
|
||||
*/ export class ReadonlyURLSearchParams extends URLSearchParams {
|
||||
/** @deprecated Method unavailable on `ReadonlyURLSearchParams`. Read more: https://nextjs.org/docs/app/api-reference/functions/use-search-params#updating-searchparams */ append() {
|
||||
throw new ReadonlyURLSearchParamsError();
|
||||
}
|
||||
/** @deprecated Method unavailable on `ReadonlyURLSearchParams`. Read more: https://nextjs.org/docs/app/api-reference/functions/use-search-params#updating-searchparams */ delete() {
|
||||
throw new ReadonlyURLSearchParamsError();
|
||||
}
|
||||
/** @deprecated Method unavailable on `ReadonlyURLSearchParams`. Read more: https://nextjs.org/docs/app/api-reference/functions/use-search-params#updating-searchparams */ set() {
|
||||
throw new ReadonlyURLSearchParamsError();
|
||||
}
|
||||
/** @deprecated Method unavailable on `ReadonlyURLSearchParams`. Read more: https://nextjs.org/docs/app/api-reference/functions/use-search-params#updating-searchparams */ sort() {
|
||||
throw new ReadonlyURLSearchParamsError();
|
||||
}
|
||||
}
|
||||
|
||||
//# sourceMappingURL=readonly-url-search-params.js.map
|
||||
1
apps/public-web/node_modules/next/dist/esm/client/components/readonly-url-search-params.js.map
generated
vendored
Normal file
1
apps/public-web/node_modules/next/dist/esm/client/components/readonly-url-search-params.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../../src/client/components/readonly-url-search-params.ts"],"sourcesContent":["/**\n * ReadonlyURLSearchParams implementation shared between client and server.\n * This file is intentionally not marked as 'use client' or 'use server'\n * so it can be imported by both environments.\n */\n\n/** @internal */\nclass ReadonlyURLSearchParamsError extends Error {\n constructor() {\n super(\n 'Method unavailable on `ReadonlyURLSearchParams`. Read more: https://nextjs.org/docs/app/api-reference/functions/use-search-params#updating-searchparams'\n )\n }\n}\n\n/**\n * A read-only version of URLSearchParams that throws errors when mutation methods are called.\n * This ensures that the URLSearchParams returned by useSearchParams() cannot be mutated.\n */\nexport class ReadonlyURLSearchParams extends URLSearchParams {\n /** @deprecated Method unavailable on `ReadonlyURLSearchParams`. Read more: https://nextjs.org/docs/app/api-reference/functions/use-search-params#updating-searchparams */\n append() {\n throw new ReadonlyURLSearchParamsError()\n }\n /** @deprecated Method unavailable on `ReadonlyURLSearchParams`. Read more: https://nextjs.org/docs/app/api-reference/functions/use-search-params#updating-searchparams */\n delete() {\n throw new ReadonlyURLSearchParamsError()\n }\n /** @deprecated Method unavailable on `ReadonlyURLSearchParams`. Read more: https://nextjs.org/docs/app/api-reference/functions/use-search-params#updating-searchparams */\n set() {\n throw new ReadonlyURLSearchParamsError()\n }\n /** @deprecated Method unavailable on `ReadonlyURLSearchParams`. Read more: https://nextjs.org/docs/app/api-reference/functions/use-search-params#updating-searchparams */\n sort() {\n throw new ReadonlyURLSearchParamsError()\n }\n}\n"],"names":["ReadonlyURLSearchParamsError","Error","constructor","ReadonlyURLSearchParams","URLSearchParams","append","delete","set","sort"],"mappings":"AAAA;;;;CAIC,GAED,cAAc,GACd,MAAMA,qCAAqCC;IACzCC,aAAc;QACZ,KAAK,CACH;IAEJ;AACF;AAEA;;;CAGC,GACD,OAAO,MAAMC,gCAAgCC;IAC3C,wKAAwK,GACxKC,SAAS;QACP,MAAM,IAAIL;IACZ;IACA,wKAAwK,GACxKM,SAAS;QACP,MAAM,IAAIN;IACZ;IACA,wKAAwK,GACxKO,MAAM;QACJ,MAAM,IAAIP;IACZ;IACA,wKAAwK,GACxKQ,OAAO;QACL,MAAM,IAAIR;IACZ;AACF","ignoreList":[0]}
|
||||
78
apps/public-web/node_modules/next/dist/esm/client/components/redirect-boundary.js
generated
vendored
Normal file
78
apps/public-web/node_modules/next/dist/esm/client/components/redirect-boundary.js
generated
vendored
Normal file
@@ -0,0 +1,78 @@
|
||||
'use client';
|
||||
import { jsx as _jsx } from "react/jsx-runtime";
|
||||
import React, { useEffect } from 'react';
|
||||
import { useRouter } from './navigation';
|
||||
import { getRedirectTypeFromError, getURLFromRedirectError } from './redirect';
|
||||
import { RedirectType, isRedirectError } from './redirect-error';
|
||||
function HandleRedirect({ redirect, reset, redirectType }) {
|
||||
const router = useRouter();
|
||||
useEffect(()=>{
|
||||
React.startTransition(()=>{
|
||||
if (redirectType === RedirectType.push) {
|
||||
router.push(redirect, {});
|
||||
} else {
|
||||
router.replace(redirect, {});
|
||||
}
|
||||
reset();
|
||||
});
|
||||
}, [
|
||||
redirect,
|
||||
redirectType,
|
||||
reset,
|
||||
router
|
||||
]);
|
||||
return null;
|
||||
}
|
||||
export class RedirectErrorBoundary extends React.Component {
|
||||
constructor(props){
|
||||
super(props);
|
||||
this.state = {
|
||||
redirect: null,
|
||||
redirectType: null
|
||||
};
|
||||
}
|
||||
static getDerivedStateFromError(error) {
|
||||
if (isRedirectError(error)) {
|
||||
const url = getURLFromRedirectError(error);
|
||||
const redirectType = getRedirectTypeFromError(error);
|
||||
if ('handled' in error) {
|
||||
// The redirect was already handled. We'll still catch the redirect error
|
||||
// so that we can remount the subtree, but we don't actually need to trigger the
|
||||
// router.push.
|
||||
return {
|
||||
redirect: null,
|
||||
redirectType: null
|
||||
};
|
||||
}
|
||||
return {
|
||||
redirect: url,
|
||||
redirectType
|
||||
};
|
||||
}
|
||||
// Re-throw if error is not for redirect
|
||||
throw error;
|
||||
}
|
||||
// Explicit type is needed to avoid the generated `.d.ts` having a wide return type that could be specific to the `@types/react` version.
|
||||
render() {
|
||||
const { redirect, redirectType } = this.state;
|
||||
if (redirect !== null && redirectType !== null) {
|
||||
return /*#__PURE__*/ _jsx(HandleRedirect, {
|
||||
redirect: redirect,
|
||||
redirectType: redirectType,
|
||||
reset: ()=>this.setState({
|
||||
redirect: null
|
||||
})
|
||||
});
|
||||
}
|
||||
return this.props.children;
|
||||
}
|
||||
}
|
||||
export function RedirectBoundary({ children }) {
|
||||
const router = useRouter();
|
||||
return /*#__PURE__*/ _jsx(RedirectErrorBoundary, {
|
||||
router: router,
|
||||
children: children
|
||||
});
|
||||
}
|
||||
|
||||
//# sourceMappingURL=redirect-boundary.js.map
|
||||
1
apps/public-web/node_modules/next/dist/esm/client/components/redirect-boundary.js.map
generated
vendored
Normal file
1
apps/public-web/node_modules/next/dist/esm/client/components/redirect-boundary.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../../src/client/components/redirect-boundary.tsx"],"sourcesContent":["'use client'\nimport React, { useEffect } from 'react'\nimport type { AppRouterInstance } from '../../shared/lib/app-router-context.shared-runtime'\nimport { useRouter } from './navigation'\nimport { getRedirectTypeFromError, getURLFromRedirectError } from './redirect'\nimport { RedirectType, isRedirectError } from './redirect-error'\n\ninterface RedirectBoundaryProps {\n router: AppRouterInstance\n children: React.ReactNode\n}\n\nfunction HandleRedirect({\n redirect,\n reset,\n redirectType,\n}: {\n redirect: string\n redirectType: RedirectType\n reset: () => void\n}) {\n const router = useRouter()\n\n useEffect(() => {\n React.startTransition(() => {\n if (redirectType === RedirectType.push) {\n router.push(redirect, {})\n } else {\n router.replace(redirect, {})\n }\n reset()\n })\n }, [redirect, redirectType, reset, router])\n\n return null\n}\n\nexport class RedirectErrorBoundary extends React.Component<\n RedirectBoundaryProps,\n { redirect: string | null; redirectType: RedirectType | null }\n> {\n constructor(props: RedirectBoundaryProps) {\n super(props)\n this.state = { redirect: null, redirectType: null }\n }\n\n static getDerivedStateFromError(error: any) {\n if (isRedirectError(error)) {\n const url = getURLFromRedirectError(error)\n const redirectType = getRedirectTypeFromError(error)\n if ('handled' in error) {\n // The redirect was already handled. We'll still catch the redirect error\n // so that we can remount the subtree, but we don't actually need to trigger the\n // router.push.\n return { redirect: null, redirectType: null }\n }\n\n return { redirect: url, redirectType }\n }\n // Re-throw if error is not for redirect\n throw error\n }\n\n // Explicit type is needed to avoid the generated `.d.ts` having a wide return type that could be specific to the `@types/react` version.\n render(): React.ReactNode {\n const { redirect, redirectType } = this.state\n if (redirect !== null && redirectType !== null) {\n return (\n <HandleRedirect\n redirect={redirect}\n redirectType={redirectType}\n reset={() => this.setState({ redirect: null })}\n />\n )\n }\n\n return this.props.children\n }\n}\n\nexport function RedirectBoundary({ children }: { children: React.ReactNode }) {\n const router = useRouter()\n return (\n <RedirectErrorBoundary router={router}>{children}</RedirectErrorBoundary>\n )\n}\n"],"names":["React","useEffect","useRouter","getRedirectTypeFromError","getURLFromRedirectError","RedirectType","isRedirectError","HandleRedirect","redirect","reset","redirectType","router","startTransition","push","replace","RedirectErrorBoundary","Component","constructor","props","state","getDerivedStateFromError","error","url","render","setState","children","RedirectBoundary"],"mappings":"AAAA;;AACA,OAAOA,SAASC,SAAS,QAAQ,QAAO;AAExC,SAASC,SAAS,QAAQ,eAAc;AACxC,SAASC,wBAAwB,EAAEC,uBAAuB,QAAQ,aAAY;AAC9E,SAASC,YAAY,EAAEC,eAAe,QAAQ,mBAAkB;AAOhE,SAASC,eAAe,EACtBC,QAAQ,EACRC,KAAK,EACLC,YAAY,EAKb;IACC,MAAMC,SAAST;IAEfD,UAAU;QACRD,MAAMY,eAAe,CAAC;YACpB,IAAIF,iBAAiBL,aAAaQ,IAAI,EAAE;gBACtCF,OAAOE,IAAI,CAACL,UAAU,CAAC;YACzB,OAAO;gBACLG,OAAOG,OAAO,CAACN,UAAU,CAAC;YAC5B;YACAC;QACF;IACF,GAAG;QAACD;QAAUE;QAAcD;QAAOE;KAAO;IAE1C,OAAO;AACT;AAEA,OAAO,MAAMI,8BAA8Bf,MAAMgB,SAAS;IAIxDC,YAAYC,KAA4B,CAAE;QACxC,KAAK,CAACA;QACN,IAAI,CAACC,KAAK,GAAG;YAAEX,UAAU;YAAME,cAAc;QAAK;IACpD;IAEA,OAAOU,yBAAyBC,KAAU,EAAE;QAC1C,IAAIf,gBAAgBe,QAAQ;YAC1B,MAAMC,MAAMlB,wBAAwBiB;YACpC,MAAMX,eAAeP,yBAAyBkB;YAC9C,IAAI,aAAaA,OAAO;gBACtB,yEAAyE;gBACzE,gFAAgF;gBAChF,eAAe;gBACf,OAAO;oBAAEb,UAAU;oBAAME,cAAc;gBAAK;YAC9C;YAEA,OAAO;gBAAEF,UAAUc;gBAAKZ;YAAa;QACvC;QACA,wCAAwC;QACxC,MAAMW;IACR;IAEA,yIAAyI;IACzIE,SAA0B;QACxB,MAAM,EAAEf,QAAQ,EAAEE,YAAY,EAAE,GAAG,IAAI,CAACS,KAAK;QAC7C,IAAIX,aAAa,QAAQE,iBAAiB,MAAM;YAC9C,qBACE,KAACH;gBACCC,UAAUA;gBACVE,cAAcA;gBACdD,OAAO,IAAM,IAAI,CAACe,QAAQ,CAAC;wBAAEhB,UAAU;oBAAK;;QAGlD;QAEA,OAAO,IAAI,CAACU,KAAK,CAACO,QAAQ;IAC5B;AACF;AAEA,OAAO,SAASC,iBAAiB,EAAED,QAAQ,EAAiC;IAC1E,MAAMd,SAAST;IACf,qBACE,KAACa;QAAsBJ,QAAQA;kBAASc;;AAE5C","ignoreList":[0]}
|
||||
26
apps/public-web/node_modules/next/dist/esm/client/components/redirect-error.js
generated
vendored
Normal file
26
apps/public-web/node_modules/next/dist/esm/client/components/redirect-error.js
generated
vendored
Normal file
@@ -0,0 +1,26 @@
|
||||
import { RedirectStatusCode } from './redirect-status-code';
|
||||
export const REDIRECT_ERROR_CODE = 'NEXT_REDIRECT';
|
||||
export var RedirectType = /*#__PURE__*/ function(RedirectType) {
|
||||
RedirectType["push"] = "push";
|
||||
RedirectType["replace"] = "replace";
|
||||
return RedirectType;
|
||||
}({});
|
||||
/**
|
||||
* Checks an error to determine if it's an error generated by the
|
||||
* `redirect(url)` helper.
|
||||
*
|
||||
* @param error the error that may reference a redirect error
|
||||
* @returns true if the error is a redirect error
|
||||
*/ export function isRedirectError(error) {
|
||||
if (typeof error !== 'object' || error === null || !('digest' in error) || typeof error.digest !== 'string') {
|
||||
return false;
|
||||
}
|
||||
const digest = error.digest.split(';');
|
||||
const [errorCode, type] = digest;
|
||||
const destination = digest.slice(2, -2).join(';');
|
||||
const status = digest.at(-2);
|
||||
const statusCode = Number(status);
|
||||
return errorCode === REDIRECT_ERROR_CODE && (type === 'replace' || type === 'push') && typeof destination === 'string' && !isNaN(statusCode) && statusCode in RedirectStatusCode;
|
||||
}
|
||||
|
||||
//# sourceMappingURL=redirect-error.js.map
|
||||
1
apps/public-web/node_modules/next/dist/esm/client/components/redirect-error.js.map
generated
vendored
Normal file
1
apps/public-web/node_modules/next/dist/esm/client/components/redirect-error.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../../src/client/components/redirect-error.ts"],"sourcesContent":["import { RedirectStatusCode } from './redirect-status-code'\n\nexport const REDIRECT_ERROR_CODE = 'NEXT_REDIRECT'\n\nexport enum RedirectType {\n push = 'push',\n replace = 'replace',\n}\n\nexport type RedirectError = Error & {\n digest: `${typeof REDIRECT_ERROR_CODE};${RedirectType};${string};${RedirectStatusCode};`\n}\n\n/**\n * Checks an error to determine if it's an error generated by the\n * `redirect(url)` helper.\n *\n * @param error the error that may reference a redirect error\n * @returns true if the error is a redirect error\n */\nexport function isRedirectError(error: unknown): error is RedirectError {\n if (\n typeof error !== 'object' ||\n error === null ||\n !('digest' in error) ||\n typeof error.digest !== 'string'\n ) {\n return false\n }\n\n const digest = error.digest.split(';')\n const [errorCode, type] = digest\n const destination = digest.slice(2, -2).join(';')\n const status = digest.at(-2)\n\n const statusCode = Number(status)\n\n return (\n errorCode === REDIRECT_ERROR_CODE &&\n (type === 'replace' || type === 'push') &&\n typeof destination === 'string' &&\n !isNaN(statusCode) &&\n statusCode in RedirectStatusCode\n )\n}\n"],"names":["RedirectStatusCode","REDIRECT_ERROR_CODE","RedirectType","isRedirectError","error","digest","split","errorCode","type","destination","slice","join","status","at","statusCode","Number","isNaN"],"mappings":"AAAA,SAASA,kBAAkB,QAAQ,yBAAwB;AAE3D,OAAO,MAAMC,sBAAsB,gBAAe;AAElD,OAAO,IAAA,AAAKC,sCAAAA;;;WAAAA;MAGX;AAMD;;;;;;CAMC,GACD,OAAO,SAASC,gBAAgBC,KAAc;IAC5C,IACE,OAAOA,UAAU,YACjBA,UAAU,QACV,CAAE,CAAA,YAAYA,KAAI,KAClB,OAAOA,MAAMC,MAAM,KAAK,UACxB;QACA,OAAO;IACT;IAEA,MAAMA,SAASD,MAAMC,MAAM,CAACC,KAAK,CAAC;IAClC,MAAM,CAACC,WAAWC,KAAK,GAAGH;IAC1B,MAAMI,cAAcJ,OAAOK,KAAK,CAAC,GAAG,CAAC,GAAGC,IAAI,CAAC;IAC7C,MAAMC,SAASP,OAAOQ,EAAE,CAAC,CAAC;IAE1B,MAAMC,aAAaC,OAAOH;IAE1B,OACEL,cAAcN,uBACbO,CAAAA,SAAS,aAAaA,SAAS,MAAK,KACrC,OAAOC,gBAAgB,YACvB,CAACO,MAAMF,eACPA,cAAcd;AAElB","ignoreList":[0]}
|
||||
8
apps/public-web/node_modules/next/dist/esm/client/components/redirect-status-code.js
generated
vendored
Normal file
8
apps/public-web/node_modules/next/dist/esm/client/components/redirect-status-code.js
generated
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
export var RedirectStatusCode = /*#__PURE__*/ function(RedirectStatusCode) {
|
||||
RedirectStatusCode[RedirectStatusCode["SeeOther"] = 303] = "SeeOther";
|
||||
RedirectStatusCode[RedirectStatusCode["TemporaryRedirect"] = 307] = "TemporaryRedirect";
|
||||
RedirectStatusCode[RedirectStatusCode["PermanentRedirect"] = 308] = "PermanentRedirect";
|
||||
return RedirectStatusCode;
|
||||
}({});
|
||||
|
||||
//# sourceMappingURL=redirect-status-code.js.map
|
||||
1
apps/public-web/node_modules/next/dist/esm/client/components/redirect-status-code.js.map
generated
vendored
Normal file
1
apps/public-web/node_modules/next/dist/esm/client/components/redirect-status-code.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../../src/client/components/redirect-status-code.ts"],"sourcesContent":["export enum RedirectStatusCode {\n SeeOther = 303,\n TemporaryRedirect = 307,\n PermanentRedirect = 308,\n}\n"],"names":["RedirectStatusCode"],"mappings":"AAAA,OAAO,IAAA,AAAKA,4CAAAA;;;;WAAAA;MAIX","ignoreList":[0]}
|
||||
68
apps/public-web/node_modules/next/dist/esm/client/components/redirect.js
generated
vendored
Normal file
68
apps/public-web/node_modules/next/dist/esm/client/components/redirect.js
generated
vendored
Normal file
@@ -0,0 +1,68 @@
|
||||
import { RedirectStatusCode } from './redirect-status-code';
|
||||
import { RedirectType, isRedirectError, REDIRECT_ERROR_CODE } from './redirect-error';
|
||||
const actionAsyncStorage = typeof window === 'undefined' ? require('../../server/app-render/action-async-storage.external').actionAsyncStorage : undefined;
|
||||
export function getRedirectError(url, type, statusCode = RedirectStatusCode.TemporaryRedirect) {
|
||||
const error = Object.defineProperty(new Error(REDIRECT_ERROR_CODE), "__NEXT_ERROR_CODE", {
|
||||
value: "E394",
|
||||
enumerable: false,
|
||||
configurable: true
|
||||
});
|
||||
error.digest = `${REDIRECT_ERROR_CODE};${type};${url};${statusCode};`;
|
||||
return error;
|
||||
}
|
||||
/**
|
||||
* This function allows you to redirect the user to another URL. It can be used in
|
||||
* [Server Components](https://nextjs.org/docs/app/building-your-application/rendering/server-components),
|
||||
* [Route Handlers](https://nextjs.org/docs/app/building-your-application/routing/route-handlers), and
|
||||
* [Server Actions](https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions-and-mutations).
|
||||
*
|
||||
* - In a Server Component, this will insert a meta tag to redirect the user to the target page.
|
||||
* - In a Route Handler or Server Action, it will serve a 307/303 to the caller.
|
||||
* - In a Server Action, type defaults to 'push' and 'replace' elsewhere.
|
||||
*
|
||||
* Read more: [Next.js Docs: `redirect`](https://nextjs.org/docs/app/api-reference/functions/redirect)
|
||||
*/ export function redirect(/** The URL to redirect to */ url, type) {
|
||||
type ??= actionAsyncStorage?.getStore()?.isAction ? RedirectType.push : RedirectType.replace;
|
||||
throw getRedirectError(url, type, RedirectStatusCode.TemporaryRedirect);
|
||||
}
|
||||
/**
|
||||
* This function allows you to redirect the user to another URL. It can be used in
|
||||
* [Server Components](https://nextjs.org/docs/app/building-your-application/rendering/server-components),
|
||||
* [Route Handlers](https://nextjs.org/docs/app/building-your-application/routing/route-handlers), and
|
||||
* [Server Actions](https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions-and-mutations).
|
||||
*
|
||||
* - In a Server Component, this will insert a meta tag to redirect the user to the target page.
|
||||
* - In a Route Handler or Server Action, it will serve a 308/303 to the caller.
|
||||
*
|
||||
* Read more: [Next.js Docs: `redirect`](https://nextjs.org/docs/app/api-reference/functions/redirect)
|
||||
*/ export function permanentRedirect(/** The URL to redirect to */ url, type = RedirectType.replace) {
|
||||
throw getRedirectError(url, type, RedirectStatusCode.PermanentRedirect);
|
||||
}
|
||||
export function getURLFromRedirectError(error) {
|
||||
if (!isRedirectError(error)) return null;
|
||||
// Slices off the beginning of the digest that contains the code and the
|
||||
// separating ';'.
|
||||
return error.digest.split(';').slice(2, -2).join(';');
|
||||
}
|
||||
export function getRedirectTypeFromError(error) {
|
||||
if (!isRedirectError(error)) {
|
||||
throw Object.defineProperty(new Error('Not a redirect error'), "__NEXT_ERROR_CODE", {
|
||||
value: "E260",
|
||||
enumerable: false,
|
||||
configurable: true
|
||||
});
|
||||
}
|
||||
return error.digest.split(';', 2)[1];
|
||||
}
|
||||
export function getRedirectStatusCodeFromError(error) {
|
||||
if (!isRedirectError(error)) {
|
||||
throw Object.defineProperty(new Error('Not a redirect error'), "__NEXT_ERROR_CODE", {
|
||||
value: "E260",
|
||||
enumerable: false,
|
||||
configurable: true
|
||||
});
|
||||
}
|
||||
return Number(error.digest.split(';').at(-2));
|
||||
}
|
||||
|
||||
//# sourceMappingURL=redirect.js.map
|
||||
1
apps/public-web/node_modules/next/dist/esm/client/components/redirect.js.map
generated
vendored
Normal file
1
apps/public-web/node_modules/next/dist/esm/client/components/redirect.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
12
apps/public-web/node_modules/next/dist/esm/client/components/render-from-template-context.js
generated
vendored
Normal file
12
apps/public-web/node_modules/next/dist/esm/client/components/render-from-template-context.js
generated
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
'use client';
|
||||
import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
|
||||
import React, { useContext } from 'react';
|
||||
import { TemplateContext } from '../../shared/lib/app-router-context.shared-runtime';
|
||||
export default function RenderFromTemplateContext() {
|
||||
const children = useContext(TemplateContext);
|
||||
return /*#__PURE__*/ _jsx(_Fragment, {
|
||||
children: children
|
||||
});
|
||||
}
|
||||
|
||||
//# sourceMappingURL=render-from-template-context.js.map
|
||||
1
apps/public-web/node_modules/next/dist/esm/client/components/render-from-template-context.js.map
generated
vendored
Normal file
1
apps/public-web/node_modules/next/dist/esm/client/components/render-from-template-context.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../../src/client/components/render-from-template-context.tsx"],"sourcesContent":["'use client'\n\nimport React, { useContext, type JSX } from 'react'\nimport { TemplateContext } from '../../shared/lib/app-router-context.shared-runtime'\n\nexport default function RenderFromTemplateContext(): JSX.Element {\n const children = useContext(TemplateContext)\n return <>{children}</>\n}\n"],"names":["React","useContext","TemplateContext","RenderFromTemplateContext","children"],"mappings":"AAAA;;AAEA,OAAOA,SAASC,UAAU,QAAkB,QAAO;AACnD,SAASC,eAAe,QAAQ,qDAAoD;AAEpF,eAAe,SAASC;IACtB,MAAMC,WAAWH,WAAWC;IAC5B,qBAAO;kBAAGE;;AACZ","ignoreList":[0]}
|
||||
98
apps/public-web/node_modules/next/dist/esm/client/components/router-reducer/compute-changed-path.js
generated
vendored
Normal file
98
apps/public-web/node_modules/next/dist/esm/client/components/router-reducer/compute-changed-path.js
generated
vendored
Normal file
@@ -0,0 +1,98 @@
|
||||
import { INTERCEPTION_ROUTE_MARKERS } from '../../../shared/lib/router/utils/interception-routes';
|
||||
import { isGroupSegment, DEFAULT_SEGMENT_KEY, PAGE_SEGMENT_KEY } from '../../../shared/lib/segment';
|
||||
import { matchSegment } from '../match-segments';
|
||||
const removeLeadingSlash = (segment)=>{
|
||||
return segment[0] === '/' ? segment.slice(1) : segment;
|
||||
};
|
||||
const segmentToPathname = (segment)=>{
|
||||
if (typeof segment === 'string') {
|
||||
// 'children' is not a valid path -- it's technically a parallel route that corresponds with the current segment's page
|
||||
// if we don't skip it, then the computed pathname might be something like `/children` which doesn't make sense.
|
||||
if (segment === 'children') return '';
|
||||
return segment;
|
||||
}
|
||||
return segment[1];
|
||||
};
|
||||
function normalizeSegments(segments) {
|
||||
return segments.reduce((acc, segment)=>{
|
||||
segment = removeLeadingSlash(segment);
|
||||
if (segment === '' || isGroupSegment(segment)) {
|
||||
return acc;
|
||||
}
|
||||
return `${acc}/${segment}`;
|
||||
}, '') || '/';
|
||||
}
|
||||
export function extractPathFromFlightRouterState(flightRouterState) {
|
||||
const segment = Array.isArray(flightRouterState[0]) ? flightRouterState[0][1] : flightRouterState[0];
|
||||
if (segment === DEFAULT_SEGMENT_KEY || INTERCEPTION_ROUTE_MARKERS.some((m)=>segment.startsWith(m))) return undefined;
|
||||
if (segment.startsWith(PAGE_SEGMENT_KEY)) return '';
|
||||
const segments = [
|
||||
segmentToPathname(segment)
|
||||
];
|
||||
const parallelRoutes = flightRouterState[1] ?? {};
|
||||
const childrenPath = parallelRoutes.children ? extractPathFromFlightRouterState(parallelRoutes.children) : undefined;
|
||||
if (childrenPath !== undefined) {
|
||||
segments.push(childrenPath);
|
||||
} else {
|
||||
for (const [key, value] of Object.entries(parallelRoutes)){
|
||||
if (key === 'children') continue;
|
||||
const childPath = extractPathFromFlightRouterState(value);
|
||||
if (childPath !== undefined) {
|
||||
segments.push(childPath);
|
||||
}
|
||||
}
|
||||
}
|
||||
return normalizeSegments(segments);
|
||||
}
|
||||
function computeChangedPathImpl(treeA, treeB) {
|
||||
const [segmentA, parallelRoutesA] = treeA;
|
||||
const [segmentB, parallelRoutesB] = treeB;
|
||||
const normalizedSegmentA = segmentToPathname(segmentA);
|
||||
const normalizedSegmentB = segmentToPathname(segmentB);
|
||||
if (INTERCEPTION_ROUTE_MARKERS.some((m)=>normalizedSegmentA.startsWith(m) || normalizedSegmentB.startsWith(m))) {
|
||||
return '';
|
||||
}
|
||||
if (!matchSegment(segmentA, segmentB)) {
|
||||
// once we find where the tree changed, we compute the rest of the path by traversing the tree
|
||||
return extractPathFromFlightRouterState(treeB) ?? '';
|
||||
}
|
||||
for(const parallelRouterKey in parallelRoutesA){
|
||||
if (parallelRoutesB[parallelRouterKey]) {
|
||||
const changedPath = computeChangedPathImpl(parallelRoutesA[parallelRouterKey], parallelRoutesB[parallelRouterKey]);
|
||||
if (changedPath !== null) {
|
||||
return `${segmentToPathname(segmentB)}/${changedPath}`;
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
export function computeChangedPath(treeA, treeB) {
|
||||
const changedPath = computeChangedPathImpl(treeA, treeB);
|
||||
if (changedPath == null || changedPath === '/') {
|
||||
return changedPath;
|
||||
}
|
||||
// lightweight normalization to remove route groups
|
||||
return normalizeSegments(changedPath.split('/'));
|
||||
}
|
||||
/**
|
||||
* Recursively extracts dynamic parameters from FlightRouterState.
|
||||
*/ export function getSelectedParams(currentTree, params = {}) {
|
||||
const parallelRoutes = currentTree[1];
|
||||
for (const parallelRoute of Object.values(parallelRoutes)){
|
||||
const segment = parallelRoute[0];
|
||||
const isDynamicParameter = Array.isArray(segment);
|
||||
const segmentValue = isDynamicParameter ? segment[1] : segment;
|
||||
if (!segmentValue || segmentValue.startsWith(PAGE_SEGMENT_KEY)) continue;
|
||||
// Ensure catchAll and optional catchall are turned into an array
|
||||
const isCatchAll = isDynamicParameter && (segment[2] === 'c' || segment[2] === 'oc');
|
||||
if (isCatchAll) {
|
||||
params[segment[0]] = segment[1].split('/');
|
||||
} else if (isDynamicParameter) {
|
||||
params[segment[0]] = segment[1];
|
||||
}
|
||||
params = getSelectedParams(parallelRoute, params);
|
||||
}
|
||||
return params;
|
||||
}
|
||||
|
||||
//# sourceMappingURL=compute-changed-path.js.map
|
||||
1
apps/public-web/node_modules/next/dist/esm/client/components/router-reducer/compute-changed-path.js.map
generated
vendored
Normal file
1
apps/public-web/node_modules/next/dist/esm/client/components/router-reducer/compute-changed-path.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
5
apps/public-web/node_modules/next/dist/esm/client/components/router-reducer/create-href-from-url.js
generated
vendored
Normal file
5
apps/public-web/node_modules/next/dist/esm/client/components/router-reducer/create-href-from-url.js
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
export function createHrefFromUrl(url, includeHash = true) {
|
||||
return url.pathname + url.search + (includeHash ? url.hash : '');
|
||||
}
|
||||
|
||||
//# sourceMappingURL=create-href-from-url.js.map
|
||||
1
apps/public-web/node_modules/next/dist/esm/client/components/router-reducer/create-href-from-url.js.map
generated
vendored
Normal file
1
apps/public-web/node_modules/next/dist/esm/client/components/router-reducer/create-href-from-url.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../../../src/client/components/router-reducer/create-href-from-url.ts"],"sourcesContent":["export function createHrefFromUrl(\n url: Pick<URL, 'pathname' | 'search' | 'hash'>,\n includeHash: boolean = true\n): string {\n return url.pathname + url.search + (includeHash ? url.hash : '')\n}\n"],"names":["createHrefFromUrl","url","includeHash","pathname","search","hash"],"mappings":"AAAA,OAAO,SAASA,kBACdC,GAA8C,EAC9CC,cAAuB,IAAI;IAE3B,OAAOD,IAAIE,QAAQ,GAAGF,IAAIG,MAAM,GAAIF,CAAAA,cAAcD,IAAII,IAAI,GAAG,EAAC;AAChE","ignoreList":[0]}
|
||||
43
apps/public-web/node_modules/next/dist/esm/client/components/router-reducer/create-initial-router-state.js
generated
vendored
Normal file
43
apps/public-web/node_modules/next/dist/esm/client/components/router-reducer/create-initial-router-state.js
generated
vendored
Normal file
@@ -0,0 +1,43 @@
|
||||
import { createHrefFromUrl } from './create-href-from-url';
|
||||
import { extractPathFromFlightRouterState } from './compute-changed-path';
|
||||
import { getFlightDataPartsFromPath } from '../../flight-data-helpers';
|
||||
import { createInitialCacheNodeForHydration } from './ppr-navigations';
|
||||
export function createInitialRouterState({ navigatedAt, initialFlightData, initialCanonicalUrlParts, initialRenderedSearch, location }) {
|
||||
// When initialized on the server, the canonical URL is provided as an array of parts.
|
||||
// This is to ensure that when the RSC payload streamed to the client, crawlers don't interpret it
|
||||
// as a URL that should be crawled.
|
||||
const initialCanonicalUrl = initialCanonicalUrlParts.join('/');
|
||||
const normalizedFlightData = getFlightDataPartsFromPath(initialFlightData[0]);
|
||||
const { tree: initialTree, seedData: initialSeedData, head: initialHead } = normalizedFlightData;
|
||||
// For the SSR render, seed data should always be available (we only send back a `null` response
|
||||
// in the case of a `loading` segment, pre-PPR.)
|
||||
const canonicalUrl = // location.href is read as the initial value for canonicalUrl in the browser
|
||||
// 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.
|
||||
location ? createHrefFromUrl(location) : initialCanonicalUrl;
|
||||
const initialState = {
|
||||
tree: initialTree,
|
||||
cache: createInitialCacheNodeForHydration(navigatedAt, initialTree, initialSeedData, initialHead),
|
||||
pushRef: {
|
||||
pendingPush: false,
|
||||
mpaNavigation: false,
|
||||
// First render needs to preserve the previous window.history.state
|
||||
// to avoid it being overwritten on navigation back/forward with MPA Navigation.
|
||||
preserveCustomHistoryState: true
|
||||
},
|
||||
focusAndScrollRef: {
|
||||
apply: false,
|
||||
onlyHashChange: false,
|
||||
hashFragment: null,
|
||||
segmentPaths: []
|
||||
},
|
||||
canonicalUrl,
|
||||
renderedSearch: initialRenderedSearch,
|
||||
nextUrl: // the || operator is intentional, the pathname can be an empty string
|
||||
(extractPathFromFlightRouterState(initialTree) || location?.pathname) ?? null,
|
||||
previousNextUrl: null,
|
||||
debugInfo: null
|
||||
};
|
||||
return initialState;
|
||||
}
|
||||
|
||||
//# sourceMappingURL=create-initial-router-state.js.map
|
||||
1
apps/public-web/node_modules/next/dist/esm/client/components/router-reducer/create-initial-router-state.js.map
generated
vendored
Normal file
1
apps/public-web/node_modules/next/dist/esm/client/components/router-reducer/create-initial-router-state.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../../../src/client/components/router-reducer/create-initial-router-state.ts"],"sourcesContent":["import type { FlightDataPath } from '../../../shared/lib/app-router-types'\n\nimport { createHrefFromUrl } from './create-href-from-url'\nimport { extractPathFromFlightRouterState } from './compute-changed-path'\n\nimport type { AppRouterState } from './router-reducer-types'\nimport { getFlightDataPartsFromPath } from '../../flight-data-helpers'\nimport { createInitialCacheNodeForHydration } from './ppr-navigations'\n\nexport interface InitialRouterStateParameters {\n navigatedAt: number\n initialCanonicalUrlParts: string[]\n initialRenderedSearch: string\n initialFlightData: FlightDataPath[]\n location: Location | null\n}\n\nexport function createInitialRouterState({\n navigatedAt,\n initialFlightData,\n initialCanonicalUrlParts,\n initialRenderedSearch,\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\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 const initialState = {\n tree: initialTree,\n cache: createInitialCacheNodeForHydration(\n navigatedAt,\n initialTree,\n initialSeedData,\n initialHead\n ),\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","extractPathFromFlightRouterState","getFlightDataPartsFromPath","createInitialCacheNodeForHydration","createInitialRouterState","navigatedAt","initialFlightData","initialCanonicalUrlParts","initialRenderedSearch","location","initialCanonicalUrl","join","normalizedFlightData","tree","initialTree","seedData","initialSeedData","head","initialHead","canonicalUrl","initialState","cache","pushRef","pendingPush","mpaNavigation","preserveCustomHistoryState","focusAndScrollRef","apply","onlyHashChange","hashFragment","segmentPaths","renderedSearch","nextUrl","pathname","previousNextUrl","debugInfo"],"mappings":"AAEA,SAASA,iBAAiB,QAAQ,yBAAwB;AAC1D,SAASC,gCAAgC,QAAQ,yBAAwB;AAGzE,SAASC,0BAA0B,QAAQ,4BAA2B;AACtE,SAASC,kCAAkC,QAAQ,oBAAmB;AAUtE,OAAO,SAASC,yBAAyB,EACvCC,WAAW,EACXC,iBAAiB,EACjBC,wBAAwB,EACxBC,qBAAqB,EACrBC,QAAQ,EACqB;IAC7B,sFAAsF;IACtF,kGAAkG;IAClG,mCAAmC;IACnC,MAAMC,sBAAsBH,yBAAyBI,IAAI,CAAC;IAE1D,MAAMC,uBAAuBV,2BAA2BI,iBAAiB,CAAC,EAAE;IAC5E,MAAM,EACJO,MAAMC,WAAW,EACjBC,UAAUC,eAAe,EACzBC,MAAMC,WAAW,EAClB,GAAGN;IACJ,gGAAgG;IAChG,gDAAgD;IAEhD,MAAMO,eACJ,6EAA6E;IAC7E,kJAAkJ;IAClJV,WAEIT,kBAAkBS,YAClBC;IAEN,MAAMU,eAAe;QACnBP,MAAMC;QACNO,OAAOlB,mCACLE,aACAS,aACAE,iBACAE;QAEFI,SAAS;YACPC,aAAa;YACbC,eAAe;YACf,mEAAmE;YACnE,gFAAgF;YAChFC,4BAA4B;QAC9B;QACAC,mBAAmB;YACjBC,OAAO;YACPC,gBAAgB;YAChBC,cAAc;YACdC,cAAc,EAAE;QAClB;QACAX;QACAY,gBAAgBvB;QAChBwB,SAEE,AADA,sEAAsE;QACrE/B,CAAAA,iCAAiCa,gBAAgBL,UAAUwB,QAAO,KACnE;QACFC,iBAAiB;QACjBC,WAAW;IACb;IAEA,OAAOf;AACT","ignoreList":[0]}
|
||||
16
apps/public-web/node_modules/next/dist/esm/client/components/router-reducer/create-router-cache-key.js
generated
vendored
Normal file
16
apps/public-web/node_modules/next/dist/esm/client/components/router-reducer/create-router-cache-key.js
generated
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
import { PAGE_SEGMENT_KEY } from '../../../shared/lib/segment';
|
||||
export function createRouterCacheKey(segment, withoutSearchParameters = false) {
|
||||
// if the segment is an array, it means it's a dynamic segment
|
||||
// for example, ['lang', 'en', 'd']. We need to convert it to a string to store it as a cache node key.
|
||||
if (Array.isArray(segment)) {
|
||||
return `${segment[0]}|${segment[1]}|${segment[2]}`;
|
||||
}
|
||||
// Page segments might have search parameters, ie __PAGE__?foo=bar
|
||||
// When `withoutSearchParameters` is true, we only want to return the page segment
|
||||
if (withoutSearchParameters && segment.startsWith(PAGE_SEGMENT_KEY)) {
|
||||
return PAGE_SEGMENT_KEY;
|
||||
}
|
||||
return segment;
|
||||
}
|
||||
|
||||
//# sourceMappingURL=create-router-cache-key.js.map
|
||||
1
apps/public-web/node_modules/next/dist/esm/client/components/router-reducer/create-router-cache-key.js.map
generated
vendored
Normal file
1
apps/public-web/node_modules/next/dist/esm/client/components/router-reducer/create-router-cache-key.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../../../src/client/components/router-reducer/create-router-cache-key.ts"],"sourcesContent":["import type { Segment } from '../../../shared/lib/app-router-types'\nimport { PAGE_SEGMENT_KEY } from '../../../shared/lib/segment'\n\nexport function createRouterCacheKey(\n segment: Segment,\n withoutSearchParameters: boolean = false\n) {\n // if the segment is an array, it means it's a dynamic segment\n // for example, ['lang', 'en', 'd']. We need to convert it to a string to store it as a cache node key.\n if (Array.isArray(segment)) {\n return `${segment[0]}|${segment[1]}|${segment[2]}`\n }\n\n // Page segments might have search parameters, ie __PAGE__?foo=bar\n // When `withoutSearchParameters` is true, we only want to return the page segment\n if (withoutSearchParameters && segment.startsWith(PAGE_SEGMENT_KEY)) {\n return PAGE_SEGMENT_KEY\n }\n\n return segment\n}\n"],"names":["PAGE_SEGMENT_KEY","createRouterCacheKey","segment","withoutSearchParameters","Array","isArray","startsWith"],"mappings":"AACA,SAASA,gBAAgB,QAAQ,8BAA6B;AAE9D,OAAO,SAASC,qBACdC,OAAgB,EAChBC,0BAAmC,KAAK;IAExC,8DAA8D;IAC9D,uGAAuG;IACvG,IAAIC,MAAMC,OAAO,CAACH,UAAU;QAC1B,OAAO,GAAGA,OAAO,CAAC,EAAE,CAAC,CAAC,EAAEA,OAAO,CAAC,EAAE,CAAC,CAAC,EAAEA,OAAO,CAAC,EAAE,EAAE;IACpD;IAEA,kEAAkE;IAClE,kFAAkF;IAClF,IAAIC,2BAA2BD,QAAQI,UAAU,CAACN,mBAAmB;QACnE,OAAOA;IACT;IAEA,OAAOE;AACT","ignoreList":[0]}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user