大活
This commit is contained in:
4
art-agent/frontend/node_modules/next/dist/client/components/app-router-announcer.d.ts
generated
vendored
Normal file
4
art-agent/frontend/node_modules/next/dist/client/components/app-router-announcer.d.ts
generated
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
import type { FlightRouterState } from '../../server/app-render/types';
|
||||
export declare function AppRouterAnnouncer({ tree }: {
|
||||
tree: FlightRouterState;
|
||||
}): import("react").ReactPortal | null;
|
||||
80
art-agent/frontend/node_modules/next/dist/client/components/app-router-announcer.js
generated
vendored
Normal file
80
art-agent/frontend/node_modules/next/dist/client/components/app-router-announcer.js
generated
vendored
Normal file
@@ -0,0 +1,80 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
Object.defineProperty(exports, "AppRouterAnnouncer", {
|
||||
enumerable: true,
|
||||
get: function() {
|
||||
return AppRouterAnnouncer;
|
||||
}
|
||||
});
|
||||
const _react = require("react");
|
||||
const _reactdom = require("react-dom");
|
||||
const ANNOUNCER_TYPE = 'next-route-announcer';
|
||||
const ANNOUNCER_ID = '__next-route-announcer__';
|
||||
function getAnnouncerNode() {
|
||||
var _existingAnnouncer_shadowRoot;
|
||||
const existingAnnouncer = document.getElementsByName(ANNOUNCER_TYPE)[0];
|
||||
if (existingAnnouncer == null ? void 0 : (_existingAnnouncer_shadowRoot = existingAnnouncer.shadowRoot) == null ? void 0 : _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;
|
||||
}
|
||||
}
|
||||
function AppRouterAnnouncer(param) {
|
||||
let { tree } = param;
|
||||
const [portalNode, setPortalNode] = (0, _react.useState)(null);
|
||||
(0, _react.useEffect)(()=>{
|
||||
const announcer = getAnnouncerNode();
|
||||
setPortalNode(announcer);
|
||||
return ()=>{
|
||||
const container = document.getElementsByTagName(ANNOUNCER_TYPE)[0];
|
||||
if (container == null ? void 0 : container.isConnected) {
|
||||
document.body.removeChild(container);
|
||||
}
|
||||
};
|
||||
}, []);
|
||||
const [routeAnnouncement, setRouteAnnouncement] = (0, _react.useState)('');
|
||||
const previousTitle = (0, _react.useRef)(undefined);
|
||||
(0, _react.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__*/ (0, _reactdom.createPortal)(routeAnnouncement, portalNode) : null;
|
||||
}
|
||||
|
||||
if ((typeof exports.default === 'function' || (typeof exports.default === 'object' && exports.default !== null)) && typeof exports.default.__esModule === 'undefined') {
|
||||
Object.defineProperty(exports.default, '__esModule', { value: true });
|
||||
Object.assign(exports.default, exports);
|
||||
module.exports = exports.default;
|
||||
}
|
||||
|
||||
//# sourceMappingURL=app-router-announcer.js.map
|
||||
1
art-agent/frontend/node_modules/next/dist/client/components/app-router-announcer.js.map
generated
vendored
Normal file
1
art-agent/frontend/node_modules/next/dist/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 '../../server/app-render/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":["AppRouterAnnouncer","ANNOUNCER_TYPE","ANNOUNCER_ID","getAnnouncerNode","existingAnnouncer","document","getElementsByName","shadowRoot","childNodes","container","createElement","style","cssText","announcer","ariaLive","id","role","shadow","attachShadow","mode","appendChild","body","tree","portalNode","setPortalNode","useState","useEffect","getElementsByTagName","isConnected","removeChild","routeAnnouncement","setRouteAnnouncement","previousTitle","useRef","undefined","currentTitle","title","pageHeader","querySelector","innerText","textContent","current","createPortal"],"mappings":";;;;+BA6BgBA;;;eAAAA;;;uBA7B4B;0BACf;AAG7B,MAAMC,iBAAiB;AACvB,MAAMC,eAAe;AAErB,SAASC;QAEHC;IADJ,MAAMA,oBAAoBC,SAASC,iBAAiB,CAACL,eAAe,CAAC,EAAE;IACvE,IAAIG,sCAAAA,gCAAAA,kBAAmBG,UAAU,qBAA7BH,8BAA+BI,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;AAEO,SAASb,mBAAmB,KAAqC;IAArC,IAAA,EAAEsB,IAAI,EAA+B,GAArC;IACjC,MAAM,CAACC,YAAYC,cAAc,GAAGC,IAAAA,eAAQ,EAAqB;IAEjEC,IAAAA,gBAAS,EAAC;QACR,MAAMb,YAAYV;QAClBqB,cAAcX;QACd,OAAO;YACL,MAAMJ,YAAYJ,SAASsB,oBAAoB,CAAC1B,eAAe,CAAC,EAAE;YAClE,IAAIQ,6BAAAA,UAAWmB,WAAW,EAAE;gBAC1BvB,SAASgB,IAAI,CAACQ,WAAW,CAACpB;YAC5B;QACF;IACF,GAAG,EAAE;IAEL,MAAM,CAACqB,mBAAmBC,qBAAqB,GAAGN,IAAAA,eAAQ,EAAC;IAC3D,MAAMO,gBAAgBC,IAAAA,aAAM,EAAqBC;IAEjDR,IAAAA,gBAAS,EAAC;QACR,IAAIS,eAAe;QACnB,IAAI9B,SAAS+B,KAAK,EAAE;YAClBD,eAAe9B,SAAS+B,KAAK;QAC/B,OAAO;YACL,MAAMC,aAAahC,SAASiC,aAAa,CAAC;YAC1C,IAAID,YAAY;gBACdF,eAAeE,WAAWE,SAAS,IAAIF,WAAWG,WAAW,IAAI;YACnE;QACF;QAEA,4EAA4E;QAC5E,iCAAiC;QACjC,IACER,cAAcS,OAAO,KAAKP,aAC1BF,cAAcS,OAAO,KAAKN,cAC1B;YACAJ,qBAAqBI;QACvB;QACAH,cAAcS,OAAO,GAAGN;IAC1B,GAAG;QAACb;KAAK;IAET,OAAOC,2BAAamB,IAAAA,sBAAY,EAACZ,mBAAmBP,cAAc;AACpE","ignoreList":[0]}
|
||||
17
art-agent/frontend/node_modules/next/dist/client/components/app-router-headers.d.ts
generated
vendored
Normal file
17
art-agent/frontend/node_modules/next/dist/client/components/app-router-headers.d.ts
generated
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
export declare const RSC_HEADER: "rsc";
|
||||
export declare const ACTION_HEADER: "next-action";
|
||||
export declare const NEXT_ROUTER_STATE_TREE_HEADER: "next-router-state-tree";
|
||||
export declare const NEXT_ROUTER_PREFETCH_HEADER: "next-router-prefetch";
|
||||
export declare const NEXT_ROUTER_SEGMENT_PREFETCH_HEADER: "next-router-segment-prefetch";
|
||||
export declare const NEXT_HMR_REFRESH_HEADER: "next-hmr-refresh";
|
||||
export declare const NEXT_HMR_REFRESH_HASH_COOKIE: "__next_hmr_refresh_hash__";
|
||||
export declare const NEXT_URL: "next-url";
|
||||
export declare const RSC_CONTENT_TYPE_HEADER: "text/x-component";
|
||||
export declare const FLIGHT_HEADERS: readonly ["rsc", "next-router-state-tree", "next-router-prefetch", "next-hmr-refresh", "next-router-segment-prefetch"];
|
||||
export declare const NEXT_RSC_UNION_QUERY: "_rsc";
|
||||
export declare const NEXT_ROUTER_STALE_TIME_HEADER: "x-nextjs-stale-time";
|
||||
export declare const NEXT_DID_POSTPONE_HEADER: "x-nextjs-postponed";
|
||||
export declare const NEXT_REWRITTEN_PATH_HEADER: "x-nextjs-rewritten-path";
|
||||
export declare const NEXT_REWRITTEN_QUERY_HEADER: "x-nextjs-rewritten-query";
|
||||
export declare const NEXT_IS_PRERENDER_HEADER: "x-nextjs-prerender";
|
||||
export declare const NEXT_ACTION_NOT_FOUND_HEADER: "x-nextjs-action-not-found";
|
||||
113
art-agent/frontend/node_modules/next/dist/client/components/app-router-headers.js
generated
vendored
Normal file
113
art-agent/frontend/node_modules/next/dist/client/components/app-router-headers.js
generated
vendored
Normal file
@@ -0,0 +1,113 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
0 && (module.exports = {
|
||||
ACTION_HEADER: null,
|
||||
FLIGHT_HEADERS: null,
|
||||
NEXT_ACTION_NOT_FOUND_HEADER: null,
|
||||
NEXT_DID_POSTPONE_HEADER: null,
|
||||
NEXT_HMR_REFRESH_HASH_COOKIE: null,
|
||||
NEXT_HMR_REFRESH_HEADER: null,
|
||||
NEXT_IS_PRERENDER_HEADER: null,
|
||||
NEXT_REWRITTEN_PATH_HEADER: null,
|
||||
NEXT_REWRITTEN_QUERY_HEADER: null,
|
||||
NEXT_ROUTER_PREFETCH_HEADER: null,
|
||||
NEXT_ROUTER_SEGMENT_PREFETCH_HEADER: null,
|
||||
NEXT_ROUTER_STALE_TIME_HEADER: null,
|
||||
NEXT_ROUTER_STATE_TREE_HEADER: null,
|
||||
NEXT_RSC_UNION_QUERY: null,
|
||||
NEXT_URL: null,
|
||||
RSC_CONTENT_TYPE_HEADER: null,
|
||||
RSC_HEADER: null
|
||||
});
|
||||
function _export(target, all) {
|
||||
for(var name in all)Object.defineProperty(target, name, {
|
||||
enumerable: true,
|
||||
get: all[name]
|
||||
});
|
||||
}
|
||||
_export(exports, {
|
||||
ACTION_HEADER: function() {
|
||||
return ACTION_HEADER;
|
||||
},
|
||||
FLIGHT_HEADERS: function() {
|
||||
return FLIGHT_HEADERS;
|
||||
},
|
||||
NEXT_ACTION_NOT_FOUND_HEADER: function() {
|
||||
return NEXT_ACTION_NOT_FOUND_HEADER;
|
||||
},
|
||||
NEXT_DID_POSTPONE_HEADER: function() {
|
||||
return NEXT_DID_POSTPONE_HEADER;
|
||||
},
|
||||
NEXT_HMR_REFRESH_HASH_COOKIE: function() {
|
||||
return NEXT_HMR_REFRESH_HASH_COOKIE;
|
||||
},
|
||||
NEXT_HMR_REFRESH_HEADER: function() {
|
||||
return NEXT_HMR_REFRESH_HEADER;
|
||||
},
|
||||
NEXT_IS_PRERENDER_HEADER: function() {
|
||||
return NEXT_IS_PRERENDER_HEADER;
|
||||
},
|
||||
NEXT_REWRITTEN_PATH_HEADER: function() {
|
||||
return NEXT_REWRITTEN_PATH_HEADER;
|
||||
},
|
||||
NEXT_REWRITTEN_QUERY_HEADER: function() {
|
||||
return NEXT_REWRITTEN_QUERY_HEADER;
|
||||
},
|
||||
NEXT_ROUTER_PREFETCH_HEADER: function() {
|
||||
return NEXT_ROUTER_PREFETCH_HEADER;
|
||||
},
|
||||
NEXT_ROUTER_SEGMENT_PREFETCH_HEADER: function() {
|
||||
return NEXT_ROUTER_SEGMENT_PREFETCH_HEADER;
|
||||
},
|
||||
NEXT_ROUTER_STALE_TIME_HEADER: function() {
|
||||
return NEXT_ROUTER_STALE_TIME_HEADER;
|
||||
},
|
||||
NEXT_ROUTER_STATE_TREE_HEADER: function() {
|
||||
return NEXT_ROUTER_STATE_TREE_HEADER;
|
||||
},
|
||||
NEXT_RSC_UNION_QUERY: function() {
|
||||
return NEXT_RSC_UNION_QUERY;
|
||||
},
|
||||
NEXT_URL: function() {
|
||||
return NEXT_URL;
|
||||
},
|
||||
RSC_CONTENT_TYPE_HEADER: function() {
|
||||
return RSC_CONTENT_TYPE_HEADER;
|
||||
},
|
||||
RSC_HEADER: function() {
|
||||
return RSC_HEADER;
|
||||
}
|
||||
});
|
||||
const RSC_HEADER = 'rsc';
|
||||
const ACTION_HEADER = 'next-action';
|
||||
const NEXT_ROUTER_STATE_TREE_HEADER = 'next-router-state-tree';
|
||||
const NEXT_ROUTER_PREFETCH_HEADER = 'next-router-prefetch';
|
||||
const NEXT_ROUTER_SEGMENT_PREFETCH_HEADER = 'next-router-segment-prefetch';
|
||||
const NEXT_HMR_REFRESH_HEADER = 'next-hmr-refresh';
|
||||
const NEXT_HMR_REFRESH_HASH_COOKIE = '__next_hmr_refresh_hash__';
|
||||
const NEXT_URL = 'next-url';
|
||||
const RSC_CONTENT_TYPE_HEADER = 'text/x-component';
|
||||
const FLIGHT_HEADERS = [
|
||||
RSC_HEADER,
|
||||
NEXT_ROUTER_STATE_TREE_HEADER,
|
||||
NEXT_ROUTER_PREFETCH_HEADER,
|
||||
NEXT_HMR_REFRESH_HEADER,
|
||||
NEXT_ROUTER_SEGMENT_PREFETCH_HEADER
|
||||
];
|
||||
const NEXT_RSC_UNION_QUERY = '_rsc';
|
||||
const NEXT_ROUTER_STALE_TIME_HEADER = 'x-nextjs-stale-time';
|
||||
const NEXT_DID_POSTPONE_HEADER = 'x-nextjs-postponed';
|
||||
const NEXT_REWRITTEN_PATH_HEADER = 'x-nextjs-rewritten-path';
|
||||
const NEXT_REWRITTEN_QUERY_HEADER = 'x-nextjs-rewritten-query';
|
||||
const NEXT_IS_PRERENDER_HEADER = 'x-nextjs-prerender';
|
||||
const NEXT_ACTION_NOT_FOUND_HEADER = 'x-nextjs-action-not-found';
|
||||
|
||||
if ((typeof exports.default === 'function' || (typeof exports.default === 'object' && exports.default !== null)) && typeof exports.default.__esModule === 'undefined') {
|
||||
Object.defineProperty(exports.default, '__esModule', { value: true });
|
||||
Object.assign(exports.default, exports);
|
||||
module.exports = exports.default;
|
||||
}
|
||||
|
||||
//# sourceMappingURL=app-router-headers.js.map
|
||||
1
art-agent/frontend/node_modules/next/dist/client/components/app-router-headers.js.map
generated
vendored
Normal file
1
art-agent/frontend/node_modules/next/dist/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\n"],"names":["ACTION_HEADER","FLIGHT_HEADERS","NEXT_ACTION_NOT_FOUND_HEADER","NEXT_DID_POSTPONE_HEADER","NEXT_HMR_REFRESH_HASH_COOKIE","NEXT_HMR_REFRESH_HEADER","NEXT_IS_PRERENDER_HEADER","NEXT_REWRITTEN_PATH_HEADER","NEXT_REWRITTEN_QUERY_HEADER","NEXT_ROUTER_PREFETCH_HEADER","NEXT_ROUTER_SEGMENT_PREFETCH_HEADER","NEXT_ROUTER_STALE_TIME_HEADER","NEXT_ROUTER_STATE_TREE_HEADER","NEXT_RSC_UNION_QUERY","NEXT_URL","RSC_CONTENT_TYPE_HEADER","RSC_HEADER"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IACaA,aAAa;eAAbA;;IAiBAC,cAAc;eAAdA;;IAeAC,4BAA4B;eAA5BA;;IAJAC,wBAAwB;eAAxBA;;IAfAC,4BAA4B;eAA5BA;;IADAC,uBAAuB;eAAvBA;;IAmBAC,wBAAwB;eAAxBA;;IAFAC,0BAA0B;eAA1BA;;IACAC,2BAA2B;eAA3BA;;IAzBAC,2BAA2B;eAA3BA;;IAKAC,mCAAmC;eAAnCA;;IAiBAC,6BAA6B;eAA7BA;;IAvBAC,6BAA6B;eAA7BA;;IAqBAC,oBAAoB;eAApBA;;IAXAC,QAAQ;eAARA;;IACAC,uBAAuB;eAAvBA;;IAhBAC,UAAU;eAAVA;;;AAAN,MAAMA,aAAa;AACnB,MAAMhB,gBAAgB;AAItB,MAAMY,gCAAgC;AACtC,MAAMH,8BAA8B;AAKpC,MAAMC,sCACX;AACK,MAAML,0BAA0B;AAChC,MAAMD,+BAA+B;AACrC,MAAMU,WAAW;AACjB,MAAMC,0BAA0B;AAEhC,MAAMd,iBAAiB;IAC5Be;IACAJ;IACAH;IACAJ;IACAK;CACD;AAEM,MAAMG,uBAAuB;AAE7B,MAAMF,gCAAgC;AACtC,MAAMR,2BAA2B;AACjC,MAAMI,6BAA6B;AACnC,MAAMC,8BAA8B;AACpC,MAAMF,2BAA2B;AACjC,MAAMJ,+BAA+B","ignoreList":[0]}
|
||||
37
art-agent/frontend/node_modules/next/dist/client/components/app-router-instance.d.ts
generated
vendored
Normal file
37
art-agent/frontend/node_modules/next/dist/client/components/app-router-instance.d.ts
generated
vendored
Normal file
@@ -0,0 +1,37 @@
|
||||
import { type AppRouterState, type ReducerActions, type ReducerState, type NavigateAction } from './router-reducer/router-reducer-types';
|
||||
import type { AppRouterInstance } from '../../shared/lib/app-router-context.shared-runtime';
|
||||
import { type LinkInstance } from './links';
|
||||
import type { FlightRouterState } from '../../server/app-render/types';
|
||||
import type { ClientInstrumentationHooks } from '../app-index';
|
||||
import type { GlobalErrorComponent } from './builtin/global-error';
|
||||
export type DispatchStatePromise = React.Dispatch<ReducerState>;
|
||||
export type AppRouterActionQueue = {
|
||||
state: AppRouterState;
|
||||
dispatch: (payload: ReducerActions, setState: DispatchStatePromise) => void;
|
||||
action: (state: AppRouterState, action: ReducerActions) => ReducerState;
|
||||
onRouterTransitionStart: ((url: string, type: 'push' | 'replace' | 'traverse') => void) | null;
|
||||
pending: ActionQueueNode | null;
|
||||
needsRefresh?: boolean;
|
||||
last: ActionQueueNode | null;
|
||||
};
|
||||
export type GlobalErrorState = [
|
||||
GlobalError: GlobalErrorComponent,
|
||||
styles: React.ReactNode
|
||||
];
|
||||
export type ActionQueueNode = {
|
||||
payload: ReducerActions;
|
||||
next: ActionQueueNode | null;
|
||||
resolve: (value: ReducerState) => void;
|
||||
reject: (err: Error) => void;
|
||||
discarded?: boolean;
|
||||
};
|
||||
export declare function createMutableActionQueue(initialState: AppRouterState, instrumentationHooks: ClientInstrumentationHooks | null): AppRouterActionQueue;
|
||||
export declare function getCurrentAppRouterState(): AppRouterState | null;
|
||||
export declare function dispatchNavigateAction(href: string, navigateType: NavigateAction['navigateType'], shouldScroll: boolean, linkInstanceRef: LinkInstance | null): void;
|
||||
export declare function dispatchTraverseAction(href: string, tree: FlightRouterState | undefined): void;
|
||||
/**
|
||||
* 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 declare const publicAppRouterInstance: AppRouterInstance;
|
||||
344
art-agent/frontend/node_modules/next/dist/client/components/app-router-instance.js
generated
vendored
Normal file
344
art-agent/frontend/node_modules/next/dist/client/components/app-router-instance.js
generated
vendored
Normal file
@@ -0,0 +1,344 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
0 && (module.exports = {
|
||||
createMutableActionQueue: null,
|
||||
dispatchNavigateAction: null,
|
||||
dispatchTraverseAction: null,
|
||||
getCurrentAppRouterState: null,
|
||||
publicAppRouterInstance: null
|
||||
});
|
||||
function _export(target, all) {
|
||||
for(var name in all)Object.defineProperty(target, name, {
|
||||
enumerable: true,
|
||||
get: all[name]
|
||||
});
|
||||
}
|
||||
_export(exports, {
|
||||
createMutableActionQueue: function() {
|
||||
return createMutableActionQueue;
|
||||
},
|
||||
dispatchNavigateAction: function() {
|
||||
return dispatchNavigateAction;
|
||||
},
|
||||
dispatchTraverseAction: function() {
|
||||
return dispatchTraverseAction;
|
||||
},
|
||||
getCurrentAppRouterState: function() {
|
||||
return getCurrentAppRouterState;
|
||||
},
|
||||
publicAppRouterInstance: function() {
|
||||
return publicAppRouterInstance;
|
||||
}
|
||||
});
|
||||
const _routerreducertypes = require("./router-reducer/router-reducer-types");
|
||||
const _routerreducer = require("./router-reducer/router-reducer");
|
||||
const _react = require("react");
|
||||
const _isthenable = require("../../shared/lib/is-thenable");
|
||||
const _segmentcache = require("./segment-cache");
|
||||
const _useactionqueue = require("./use-action-queue");
|
||||
const _addbasepath = require("../add-base-path");
|
||||
const _approuter = require("./app-router");
|
||||
const _prefetchreducer = require("./router-reducer/reducers/prefetch-reducer");
|
||||
const _links = require("./links");
|
||||
function runRemainingActions(actionQueue, setState) {
|
||||
if (actionQueue.pending !== null) {
|
||||
actionQueue.pending = actionQueue.pending.next;
|
||||
if (actionQueue.pending !== null) {
|
||||
// eslint-disable-next-line @typescript-eslint/no-use-before-define
|
||||
runAction({
|
||||
actionQueue,
|
||||
action: actionQueue.pending,
|
||||
setState
|
||||
});
|
||||
} else {
|
||||
// No more actions are pending, check if a refresh is needed
|
||||
if (actionQueue.needsRefresh) {
|
||||
actionQueue.needsRefresh = false;
|
||||
actionQueue.dispatch({
|
||||
type: _routerreducertypes.ACTION_REFRESH,
|
||||
origin: window.location.origin
|
||||
}, setState);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
async function runAction(param) {
|
||||
let { actionQueue, action, setState } = param;
|
||||
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) {
|
||||
return;
|
||||
}
|
||||
actionQueue.state = nextState;
|
||||
runRemainingActions(actionQueue, setState);
|
||||
action.resolve(nextState);
|
||||
}
|
||||
// if the action is a promise, set up a callback to resolve it
|
||||
if ((0, _isthenable.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 !== _routerreducertypes.ACTION_RESTORE) {
|
||||
// Create the promise and assign the resolvers to the object.
|
||||
const deferredPromise = new Promise((resolve, reject)=>{
|
||||
resolvers = {
|
||||
resolve,
|
||||
reject
|
||||
};
|
||||
});
|
||||
(0, _react.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 === _routerreducertypes.ACTION_NAVIGATE || payload.type === _routerreducertypes.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;
|
||||
// if the pending action was a server action, mark the queue as needing a refresh once events are processed
|
||||
if (actionQueue.pending.payload.type === _routerreducertypes.ACTION_SERVER_ACTION) {
|
||||
actionQueue.needsRefresh = true;
|
||||
}
|
||||
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;
|
||||
function createMutableActionQueue(initialState, instrumentationHooks) {
|
||||
const actionQueue = {
|
||||
state: initialState,
|
||||
dispatch: (payload, setState)=>dispatchAction(actionQueue, payload, setState),
|
||||
action: async (state, action)=>{
|
||||
const result = (0, _routerreducer.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;
|
||||
}
|
||||
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;
|
||||
}
|
||||
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((0, _addbasepath.addBasePath)(href), location.href);
|
||||
if (process.env.__NEXT_APP_NAV_FAIL_HANDLING) {
|
||||
window.next.__pendingUrl = url;
|
||||
}
|
||||
(0, _links.setLinkForCurrentNavigation)(linkInstanceRef);
|
||||
const onRouterTransitionStart = getProfilingHookForOnNavigationStart();
|
||||
if (onRouterTransitionStart !== null) {
|
||||
onRouterTransitionStart(href, navigateType);
|
||||
}
|
||||
(0, _useactionqueue.dispatchAppRouterAction)({
|
||||
type: _routerreducertypes.ACTION_NAVIGATE,
|
||||
url,
|
||||
isExternalUrl: (0, _approuter.isExternalURL)(url),
|
||||
locationSearch: location.search,
|
||||
shouldScroll,
|
||||
navigateType,
|
||||
allowAliasing: true
|
||||
});
|
||||
}
|
||||
function dispatchTraverseAction(href, tree) {
|
||||
const onRouterTransitionStart = getProfilingHookForOnNavigationStart();
|
||||
if (onRouterTransitionStart !== null) {
|
||||
onRouterTransitionStart(href, 'traverse');
|
||||
}
|
||||
(0, _useactionqueue.dispatchAppRouterAction)({
|
||||
type: _routerreducertypes.ACTION_RESTORE,
|
||||
url: new URL(href),
|
||||
tree
|
||||
});
|
||||
}
|
||||
const publicAppRouterInstance = {
|
||||
back: ()=>window.history.back(),
|
||||
forward: ()=>window.history.forward(),
|
||||
prefetch: process.env.__NEXT_CLIENT_SEGMENT_CACHE ? // 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();
|
||||
var _options_kind;
|
||||
const prefetchKind = (_options_kind = options == null ? void 0 : options.kind) != null ? _options_kind : _routerreducertypes.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 _routerreducertypes.PrefetchKind.AUTO:
|
||||
{
|
||||
// We default to PPR. We'll discover whether or not the route supports it with the initial prefetch.
|
||||
fetchStrategy = _segmentcache.FetchStrategy.PPR;
|
||||
break;
|
||||
}
|
||||
case _routerreducertypes.PrefetchKind.FULL:
|
||||
{
|
||||
fetchStrategy = _segmentcache.FetchStrategy.Full;
|
||||
break;
|
||||
}
|
||||
case _routerreducertypes.PrefetchKind.TEMPORARY:
|
||||
{
|
||||
// This concept doesn't exist in the segment cache implementation.
|
||||
return;
|
||||
}
|
||||
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 = _segmentcache.FetchStrategy.PPR;
|
||||
}
|
||||
}
|
||||
var _options_onInvalidate;
|
||||
(0, _segmentcache.prefetch)(href, actionQueue.state.nextUrl, actionQueue.state.tree, fetchStrategy, (_options_onInvalidate = options == null ? void 0 : options.onInvalidate) != null ? _options_onInvalidate : null);
|
||||
} : (href, options)=>{
|
||||
// Use the old prefetch implementation.
|
||||
const actionQueue = getAppRouterActionQueue();
|
||||
const url = (0, _approuter.createPrefetchURL)(href);
|
||||
if (url !== null) {
|
||||
var _options_kind;
|
||||
// The prefetch reducer doesn't actually update any state or
|
||||
// trigger a rerender. It just writes to a mutable cache. So we
|
||||
// shouldn't bother calling setState/dispatch; we can just re-run
|
||||
// the reducer directly using the current state.
|
||||
// TODO: Refactor this away from a "reducer" so it's
|
||||
// less confusing.
|
||||
(0, _prefetchreducer.prefetchReducer)(actionQueue.state, {
|
||||
type: _routerreducertypes.ACTION_PREFETCH,
|
||||
url,
|
||||
kind: (_options_kind = options == null ? void 0 : options.kind) != null ? _options_kind : _routerreducertypes.PrefetchKind.FULL
|
||||
});
|
||||
}
|
||||
},
|
||||
replace: (href, options)=>{
|
||||
(0, _react.startTransition)(()=>{
|
||||
var _options_scroll;
|
||||
dispatchNavigateAction(href, 'replace', (_options_scroll = options == null ? void 0 : options.scroll) != null ? _options_scroll : true, null);
|
||||
});
|
||||
},
|
||||
push: (href, options)=>{
|
||||
(0, _react.startTransition)(()=>{
|
||||
var _options_scroll;
|
||||
dispatchNavigateAction(href, 'push', (_options_scroll = options == null ? void 0 : options.scroll) != null ? _options_scroll : true, null);
|
||||
});
|
||||
},
|
||||
refresh: ()=>{
|
||||
(0, _react.startTransition)(()=>{
|
||||
(0, _useactionqueue.dispatchAppRouterAction)({
|
||||
type: _routerreducertypes.ACTION_REFRESH,
|
||||
origin: window.location.origin
|
||||
});
|
||||
});
|
||||
},
|
||||
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 {
|
||||
(0, _react.startTransition)(()=>{
|
||||
(0, _useactionqueue.dispatchAppRouterAction)({
|
||||
type: _routerreducertypes.ACTION_HMR_REFRESH,
|
||||
origin: window.location.origin
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
// Exists for debugging purposes. Don't use in application code.
|
||||
if (typeof window !== 'undefined' && window.next) {
|
||||
window.next.router = publicAppRouterInstance;
|
||||
}
|
||||
|
||||
if ((typeof exports.default === 'function' || (typeof exports.default === 'object' && exports.default !== null)) && typeof exports.default.__esModule === 'undefined') {
|
||||
Object.defineProperty(exports.default, '__esModule', { value: true });
|
||||
Object.assign(exports.default, exports);
|
||||
module.exports = exports.default;
|
||||
}
|
||||
|
||||
//# sourceMappingURL=app-router-instance.js.map
|
||||
1
art-agent/frontend/node_modules/next/dist/client/components/app-router-instance.js.map
generated
vendored
Normal file
1
art-agent/frontend/node_modules/next/dist/client/components/app-router-instance.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
17
art-agent/frontend/node_modules/next/dist/client/components/app-router.d.ts
generated
vendored
Normal file
17
art-agent/frontend/node_modules/next/dist/client/components/app-router.d.ts
generated
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
import type { CacheNode } from '../../shared/lib/app-router-context.shared-runtime';
|
||||
import { type AppRouterActionQueue, type GlobalErrorState } from './app-router-instance';
|
||||
export declare function isExternalURL(url: URL): boolean;
|
||||
/**
|
||||
* 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 declare function createPrefetchURL(href: string): URL | null;
|
||||
export declare function createEmptyCacheNode(): CacheNode;
|
||||
export default function AppRouter({ actionQueue, globalErrorState, assetPrefix, }: {
|
||||
actionQueue: AppRouterActionQueue;
|
||||
globalErrorState: GlobalErrorState;
|
||||
assetPrefix: string;
|
||||
}): import("react/jsx-runtime").JSX.Element;
|
||||
542
art-agent/frontend/node_modules/next/dist/client/components/app-router.js
generated
vendored
Normal file
542
art-agent/frontend/node_modules/next/dist/client/components/app-router.js
generated
vendored
Normal file
@@ -0,0 +1,542 @@
|
||||
'use client';
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
0 && (module.exports = {
|
||||
createEmptyCacheNode: null,
|
||||
createPrefetchURL: null,
|
||||
default: null,
|
||||
isExternalURL: null
|
||||
});
|
||||
function _export(target, all) {
|
||||
for(var name in all)Object.defineProperty(target, name, {
|
||||
enumerable: true,
|
||||
get: all[name]
|
||||
});
|
||||
}
|
||||
_export(exports, {
|
||||
createEmptyCacheNode: function() {
|
||||
return createEmptyCacheNode;
|
||||
},
|
||||
createPrefetchURL: function() {
|
||||
return createPrefetchURL;
|
||||
},
|
||||
default: function() {
|
||||
return AppRouter;
|
||||
},
|
||||
isExternalURL: function() {
|
||||
return isExternalURL;
|
||||
}
|
||||
});
|
||||
const _interop_require_default = require("@swc/helpers/_/_interop_require_default");
|
||||
const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
|
||||
const _jsxruntime = require("react/jsx-runtime");
|
||||
const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
|
||||
const _approutercontextsharedruntime = require("../../shared/lib/app-router-context.shared-runtime");
|
||||
const _routerreducertypes = require("./router-reducer/router-reducer-types");
|
||||
const _createhreffromurl = require("./router-reducer/create-href-from-url");
|
||||
const _hooksclientcontextsharedruntime = require("../../shared/lib/hooks-client-context.shared-runtime");
|
||||
const _useactionqueue = require("./use-action-queue");
|
||||
const _isbot = require("../../shared/lib/router/utils/is-bot");
|
||||
const _addbasepath = require("../add-base-path");
|
||||
const _approuterannouncer = require("./app-router-announcer");
|
||||
const _redirectboundary = require("./redirect-boundary");
|
||||
const _findheadincache = require("./router-reducer/reducers/find-head-in-cache");
|
||||
const _unresolvedthenable = require("./unresolved-thenable");
|
||||
const _removebasepath = require("../remove-base-path");
|
||||
const _hasbasepath = require("../has-base-path");
|
||||
const _computechangedpath = require("./router-reducer/compute-changed-path");
|
||||
const _navfailurehandler = require("./nav-failure-handler");
|
||||
const _approuterinstance = require("./app-router-instance");
|
||||
const _redirect = require("./redirect");
|
||||
const _redirecterror = require("./redirect-error");
|
||||
const _links = require("./links");
|
||||
const _rooterrorboundary = /*#__PURE__*/ _interop_require_default._(require("./errors/root-error-boundary"));
|
||||
const _globalerror = /*#__PURE__*/ _interop_require_default._(require("./builtin/global-error"));
|
||||
const _boundarycomponents = require("../../lib/framework/boundary-components");
|
||||
const globalMutable = {};
|
||||
function isExternalURL(url) {
|
||||
return url.origin !== window.location.origin;
|
||||
}
|
||||
function createPrefetchURL(href) {
|
||||
// Don't prefetch for bots as they don't navigate.
|
||||
if ((0, _isbot.isBot)(window.navigator.userAgent)) {
|
||||
return null;
|
||||
}
|
||||
let url;
|
||||
try {
|
||||
url = new URL((0, _addbasepath.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;
|
||||
}
|
||||
function HistoryUpdater(param) {
|
||||
let { appRouterState } = param;
|
||||
(0, _react.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 } = appRouterState;
|
||||
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: tree
|
||||
};
|
||||
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.
|
||||
(0, _createhreffromurl.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
|
||||
]);
|
||||
(0, _react.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.
|
||||
if (process.env.__NEXT_CLIENT_SEGMENT_CACHE) {
|
||||
(0, _links.pingVisibleLinks)(appRouterState.nextUrl, appRouterState.tree);
|
||||
}
|
||||
}, [
|
||||
appRouterState.nextUrl,
|
||||
appRouterState.tree
|
||||
]);
|
||||
return null;
|
||||
}
|
||||
function createEmptyCacheNode() {
|
||||
return {
|
||||
lazyData: null,
|
||||
rsc: null,
|
||||
prefetchRsc: null,
|
||||
head: null,
|
||||
prefetchHead: null,
|
||||
parallelRoutes: new Map(),
|
||||
loading: null,
|
||||
navigatedAt: -1
|
||||
};
|
||||
}
|
||||
function copyNextJsInternalHistoryState(data) {
|
||||
if (data == null) data = {};
|
||||
const currentState = window.history.state;
|
||||
const __NA = currentState == null ? void 0 : currentState.__NA;
|
||||
if (__NA) {
|
||||
data.__NA = __NA;
|
||||
}
|
||||
const __PRIVATE_NEXTJS_INTERNALS_TREE = currentState == null ? void 0 : currentState.__PRIVATE_NEXTJS_INTERNALS_TREE;
|
||||
if (__PRIVATE_NEXTJS_INTERNALS_TREE) {
|
||||
data.__PRIVATE_NEXTJS_INTERNALS_TREE = __PRIVATE_NEXTJS_INTERNALS_TREE;
|
||||
}
|
||||
return data;
|
||||
}
|
||||
function Head(param) {
|
||||
let { headCacheNode } = param;
|
||||
// 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 (0, _react.useDeferredValue)(head, resolvedPrefetchRsc);
|
||||
}
|
||||
/**
|
||||
* The global router that wraps the application components.
|
||||
*/ function Router(param) {
|
||||
let { actionQueue, assetPrefix, globalError } = param;
|
||||
const state = (0, _useactionqueue.useActionQueue)(actionQueue);
|
||||
const { canonicalUrl } = state;
|
||||
// Add memoized pathname/query for useSearchParams and usePathname.
|
||||
const { searchParams, pathname } = (0, _react.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: (0, _hasbasepath.hasBasePath)(url.pathname) ? (0, _removebasepath.removeBasePath)(url.pathname) : url.pathname
|
||||
};
|
||||
}, [
|
||||
canonicalUrl
|
||||
]);
|
||||
if (process.env.NODE_ENV !== 'production') {
|
||||
// eslint-disable-next-line react-hooks/rules-of-hooks
|
||||
const { cache, prefetchCache, 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
|
||||
(0, _react.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: _approuterinstance.publicAppRouterInstance,
|
||||
cache,
|
||||
prefetchCache,
|
||||
tree
|
||||
};
|
||||
}, [
|
||||
cache,
|
||||
prefetchCache,
|
||||
tree
|
||||
]);
|
||||
}
|
||||
(0, _react.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) {
|
||||
var _window_history_state;
|
||||
if (!event.persisted || !((_window_history_state = window.history.state) == null ? void 0 : _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;
|
||||
(0, _useactionqueue.dispatchAppRouterAction)({
|
||||
type: _routerreducertypes.ACTION_RESTORE,
|
||||
url: new URL(window.location.href),
|
||||
tree: window.history.state.__PRIVATE_NEXTJS_INTERNALS_TREE
|
||||
});
|
||||
}
|
||||
window.addEventListener('pageshow', handlePageShow);
|
||||
return ()=>{
|
||||
window.removeEventListener('pageshow', handlePageShow);
|
||||
};
|
||||
}, []);
|
||||
(0, _react.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 ((0, _redirecterror.isRedirectError)(error)) {
|
||||
event.preventDefault();
|
||||
const url = (0, _redirect.getURLFromRedirectError)(error);
|
||||
const redirectType = (0, _redirect.getRedirectTypeFromError)(error);
|
||||
// TODO: This should access the router methods directly, rather than
|
||||
// go through the public interface.
|
||||
if (redirectType === _redirecterror.RedirectType.push) {
|
||||
_approuterinstance.publicAppRouterInstance.push(url, {});
|
||||
} else {
|
||||
_approuterinstance.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.unresolvedThenable;
|
||||
}
|
||||
(0, _react.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)=>{
|
||||
var _window_history_state;
|
||||
const href = window.location.href;
|
||||
const tree = (_window_history_state = window.history.state) == null ? void 0 : _window_history_state.__PRIVATE_NEXTJS_INTERNALS_TREE;
|
||||
(0, _react.startTransition)(()=>{
|
||||
(0, _useactionqueue.dispatchAppRouterAction)({
|
||||
type: _routerreducertypes.ACTION_RESTORE,
|
||||
url: new URL(url != null ? url : href, href),
|
||||
tree
|
||||
});
|
||||
});
|
||||
};
|
||||
/**
|
||||
* 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) {
|
||||
// Avoid a loop when Next.js internals trigger pushState/replaceState
|
||||
if ((data == null ? void 0 : data.__NA) || (data == null ? void 0 : 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) {
|
||||
// Avoid a loop when Next.js internals trigger pushState/replaceState
|
||||
if ((data == null ? void 0 : data.__NA) || (data == null ? void 0 : 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
|
||||
(0, _react.startTransition)(()=>{
|
||||
(0, _approuterinstance.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 } = state;
|
||||
const matchingHead = (0, _react.useMemo)(()=>{
|
||||
return (0, _findheadincache.findHeadInCache)(cache, tree[1]);
|
||||
}, [
|
||||
cache,
|
||||
tree
|
||||
]);
|
||||
// Add memoized pathParams for useParams.
|
||||
const pathParams = (0, _react.useMemo)(()=>{
|
||||
return (0, _computechangedpath.getSelectedParams)(tree);
|
||||
}, [
|
||||
tree
|
||||
]);
|
||||
const layoutRouterContext = (0, _react.useMemo)(()=>{
|
||||
return {
|
||||
parentTree: tree,
|
||||
parentCacheNode: cache,
|
||||
parentSegmentPath: null,
|
||||
// Root node always has `url`
|
||||
// Provided in AppTreeContext to ensure it can be overwritten in layout-router
|
||||
url: canonicalUrl
|
||||
};
|
||||
}, [
|
||||
tree,
|
||||
cache,
|
||||
canonicalUrl
|
||||
]);
|
||||
const globalLayoutRouterContext = (0, _react.useMemo)(()=>{
|
||||
return {
|
||||
tree,
|
||||
focusAndScrollRef,
|
||||
nextUrl
|
||||
};
|
||||
}, [
|
||||
tree,
|
||||
focusAndScrollRef,
|
||||
nextUrl
|
||||
]);
|
||||
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__*/ (0, _jsxruntime.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__*/ (0, _jsxruntime.jsxs)(_redirectboundary.RedirectBoundary, {
|
||||
children: [
|
||||
head,
|
||||
/*#__PURE__*/ (0, _jsxruntime.jsx)(_boundarycomponents.RootLayoutBoundary, {
|
||||
children: cache.rsc
|
||||
}),
|
||||
/*#__PURE__*/ (0, _jsxruntime.jsx)(_approuterannouncer.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__*/ (0, _jsxruntime.jsx)(DevRootHTTPAccessFallbackBoundary, {
|
||||
children: content
|
||||
});
|
||||
}
|
||||
const HotReloader = require('../dev/hot-reloader/app/hot-reloader-app').default;
|
||||
content = /*#__PURE__*/ (0, _jsxruntime.jsx)(HotReloader, {
|
||||
assetPrefix: assetPrefix,
|
||||
globalError: globalError,
|
||||
children: content
|
||||
});
|
||||
} else {
|
||||
content = /*#__PURE__*/ (0, _jsxruntime.jsx)(_rooterrorboundary.default, {
|
||||
errorComponent: globalError[0],
|
||||
errorStyles: globalError[1],
|
||||
children: content
|
||||
});
|
||||
}
|
||||
return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_jsxruntime.Fragment, {
|
||||
children: [
|
||||
/*#__PURE__*/ (0, _jsxruntime.jsx)(HistoryUpdater, {
|
||||
appRouterState: state
|
||||
}),
|
||||
/*#__PURE__*/ (0, _jsxruntime.jsx)(RuntimeStyles, {}),
|
||||
/*#__PURE__*/ (0, _jsxruntime.jsx)(_hooksclientcontextsharedruntime.PathParamsContext.Provider, {
|
||||
value: pathParams,
|
||||
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_hooksclientcontextsharedruntime.PathnameContext.Provider, {
|
||||
value: pathname,
|
||||
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_hooksclientcontextsharedruntime.SearchParamsContext.Provider, {
|
||||
value: searchParams,
|
||||
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_approutercontextsharedruntime.GlobalLayoutRouterContext.Provider, {
|
||||
value: globalLayoutRouterContext,
|
||||
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_approutercontextsharedruntime.AppRouterContext.Provider, {
|
||||
value: _approuterinstance.publicAppRouterInstance,
|
||||
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_approutercontextsharedruntime.LayoutRouterContext.Provider, {
|
||||
value: layoutRouterContext,
|
||||
children: content
|
||||
})
|
||||
})
|
||||
})
|
||||
})
|
||||
})
|
||||
})
|
||||
]
|
||||
});
|
||||
}
|
||||
function AppRouter(param) {
|
||||
let { actionQueue, globalErrorState, assetPrefix } = param;
|
||||
(0, _navfailurehandler.useNavFailureHandler)();
|
||||
const router = /*#__PURE__*/ (0, _jsxruntime.jsx)(Router, {
|
||||
actionQueue: actionQueue,
|
||||
assetPrefix: assetPrefix,
|
||||
globalError: globalErrorState
|
||||
});
|
||||
// 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__*/ (0, _jsxruntime.jsx)(_rooterrorboundary.default, {
|
||||
errorComponent: _globalerror.default,
|
||||
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.default.useState(0);
|
||||
const renderedStylesSize = runtimeStyles.size;
|
||||
(0, _react.useEffect)(()=>{
|
||||
const changed = ()=>forceUpdate((c)=>c + 1);
|
||||
runtimeStyleChanged.add(changed);
|
||||
if (renderedStylesSize !== runtimeStyles.size) {
|
||||
changed();
|
||||
}
|
||||
return ()=>{
|
||||
runtimeStyleChanged.delete(changed);
|
||||
};
|
||||
}, [
|
||||
renderedStylesSize,
|
||||
forceUpdate
|
||||
]);
|
||||
const dplId = process.env.NEXT_DEPLOYMENT_ID ? "?dpl=" + process.env.NEXT_DEPLOYMENT_ID : '';
|
||||
return [
|
||||
...runtimeStyles
|
||||
].map((href, i)=>/*#__PURE__*/ (0, _jsxruntime.jsx)("link", {
|
||||
rel: "stylesheet",
|
||||
href: "" + href + dplId,
|
||||
// @ts-ignore
|
||||
precedence: "next"
|
||||
}, i));
|
||||
}
|
||||
|
||||
if ((typeof exports.default === 'function' || (typeof exports.default === 'object' && exports.default !== null)) && typeof exports.default.__esModule === 'undefined') {
|
||||
Object.defineProperty(exports.default, '__esModule', { value: true });
|
||||
Object.assign(exports.default, exports);
|
||||
module.exports = exports.default;
|
||||
}
|
||||
|
||||
//# sourceMappingURL=app-router.js.map
|
||||
1
art-agent/frontend/node_modules/next/dist/client/components/app-router.js.map
generated
vendored
Normal file
1
art-agent/frontend/node_modules/next/dist/client/components/app-router.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
1
art-agent/frontend/node_modules/next/dist/client/components/bailout-to-client-rendering.d.ts
generated
vendored
Normal file
1
art-agent/frontend/node_modules/next/dist/client/components/bailout-to-client-rendering.d.ts
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export declare function bailoutToClientRendering(reason: string): void | never;
|
||||
47
art-agent/frontend/node_modules/next/dist/client/components/bailout-to-client-rendering.js
generated
vendored
Normal file
47
art-agent/frontend/node_modules/next/dist/client/components/bailout-to-client-rendering.js
generated
vendored
Normal file
@@ -0,0 +1,47 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
Object.defineProperty(exports, "bailoutToClientRendering", {
|
||||
enumerable: true,
|
||||
get: function() {
|
||||
return bailoutToClientRendering;
|
||||
}
|
||||
});
|
||||
const _bailouttocsr = require("../../shared/lib/lazy-dynamic/bailout-to-csr");
|
||||
const _workasyncstorageexternal = require("../../server/app-render/work-async-storage.external");
|
||||
const _workunitasyncstorageexternal = require("../../server/app-render/work-unit-async-storage.external");
|
||||
function bailoutToClientRendering(reason) {
|
||||
const workStore = _workasyncstorageexternal.workAsyncStorage.getStore();
|
||||
if (workStore == null ? void 0 : workStore.forceStatic) return;
|
||||
const workUnitStore = _workunitasyncstorageexternal.workUnitAsyncStorage.getStore();
|
||||
if (workUnitStore) {
|
||||
switch(workUnitStore.type){
|
||||
case 'prerender':
|
||||
case 'prerender-runtime':
|
||||
case 'prerender-client':
|
||||
case 'prerender-ppr':
|
||||
case 'prerender-legacy':
|
||||
throw Object.defineProperty(new _bailouttocsr.BailoutToCSRError(reason), "__NEXT_ERROR_CODE", {
|
||||
value: "E394",
|
||||
enumerable: false,
|
||||
configurable: true
|
||||
});
|
||||
case 'request':
|
||||
case 'cache':
|
||||
case 'private-cache':
|
||||
case 'unstable-cache':
|
||||
break;
|
||||
default:
|
||||
workUnitStore;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ((typeof exports.default === 'function' || (typeof exports.default === 'object' && exports.default !== null)) && typeof exports.default.__esModule === 'undefined') {
|
||||
Object.defineProperty(exports.default, '__esModule', { value: true });
|
||||
Object.assign(exports.default, exports);
|
||||
module.exports = exports.default;
|
||||
}
|
||||
|
||||
//# sourceMappingURL=bailout-to-client-rendering.js.map
|
||||
1
art-agent/frontend/node_modules/next/dist/client/components/bailout-to-client-rendering.js.map
generated
vendored
Normal file
1
art-agent/frontend/node_modules/next/dist/client/components/bailout-to-client-rendering.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../src/client/components/bailout-to-client-rendering.ts"],"sourcesContent":["import { BailoutToCSRError } from '../../shared/lib/lazy-dynamic/bailout-to-csr'\nimport { workAsyncStorage } from '../../server/app-render/work-async-storage.external'\nimport { workUnitAsyncStorage } from '../../server/app-render/work-unit-async-storage.external'\n\nexport function bailoutToClientRendering(reason: string): void | never {\n const workStore = workAsyncStorage.getStore()\n\n if (workStore?.forceStatic) return\n\n const workUnitStore = workUnitAsyncStorage.getStore()\n\n if (workUnitStore) {\n switch (workUnitStore.type) {\n case 'prerender':\n case 'prerender-runtime':\n case 'prerender-client':\n case 'prerender-ppr':\n case 'prerender-legacy':\n throw new BailoutToCSRError(reason)\n case 'request':\n case 'cache':\n case 'private-cache':\n case 'unstable-cache':\n break\n default:\n workUnitStore satisfies never\n }\n }\n}\n"],"names":["bailoutToClientRendering","reason","workStore","workAsyncStorage","getStore","forceStatic","workUnitStore","workUnitAsyncStorage","type","BailoutToCSRError"],"mappings":";;;;+BAIgBA;;;eAAAA;;;8BAJkB;0CACD;8CACI;AAE9B,SAASA,yBAAyBC,MAAc;IACrD,MAAMC,YAAYC,0CAAgB,CAACC,QAAQ;IAE3C,IAAIF,6BAAAA,UAAWG,WAAW,EAAE;IAE5B,MAAMC,gBAAgBC,kDAAoB,CAACH,QAAQ;IAEnD,IAAIE,eAAe;QACjB,OAAQA,cAAcE,IAAI;YACxB,KAAK;YACL,KAAK;YACL,KAAK;YACL,KAAK;YACL,KAAK;gBACH,MAAM,qBAA6B,CAA7B,IAAIC,+BAAiB,CAACR,SAAtB,qBAAA;2BAAA;gCAAA;kCAAA;gBAA4B;YACpC,KAAK;YACL,KAAK;YACL,KAAK;YACL,KAAK;gBACH;YACF;gBACEK;QACJ;IACF;AACF","ignoreList":[0]}
|
||||
27
art-agent/frontend/node_modules/next/dist/client/components/bfcache.d.ts
generated
vendored
Normal file
27
art-agent/frontend/node_modules/next/dist/client/components/bfcache.d.ts
generated
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
import type { FlightRouterState } from '../../server/app-render/types';
|
||||
export type RouterBFCacheEntry = {
|
||||
tree: FlightRouterState;
|
||||
stateKey: string;
|
||||
next: RouterBFCacheEntry | null;
|
||||
};
|
||||
/**
|
||||
* 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 declare function useRouterBFCache(activeTree: FlightRouterState, activeStateKey: string): RouterBFCacheEntry;
|
||||
90
art-agent/frontend/node_modules/next/dist/client/components/bfcache.js
generated
vendored
Normal file
90
art-agent/frontend/node_modules/next/dist/client/components/bfcache.js
generated
vendored
Normal file
@@ -0,0 +1,90 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
Object.defineProperty(exports, "useRouterBFCache", {
|
||||
enumerable: true,
|
||||
get: function() {
|
||||
return useRouterBFCache;
|
||||
}
|
||||
});
|
||||
const _react = require("react");
|
||||
// When the flag is disabled, only track the currently active tree
|
||||
const MAX_BF_CACHE_ENTRIES = process.env.__NEXT_ROUTER_BF_CACHE ? 3 : 1;
|
||||
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] = (0, _react.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;
|
||||
}
|
||||
|
||||
if ((typeof exports.default === 'function' || (typeof exports.default === 'object' && exports.default !== null)) && typeof exports.default.__esModule === 'undefined') {
|
||||
Object.defineProperty(exports.default, '__esModule', { value: true });
|
||||
Object.assign(exports.default, exports);
|
||||
module.exports = exports.default;
|
||||
}
|
||||
|
||||
//# sourceMappingURL=bfcache.js.map
|
||||
1
art-agent/frontend/node_modules/next/dist/client/components/bfcache.js.map
generated
vendored
Normal file
1
art-agent/frontend/node_modules/next/dist/client/components/bfcache.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
2
art-agent/frontend/node_modules/next/dist/client/components/builtin/default.d.ts
generated
vendored
Normal file
2
art-agent/frontend/node_modules/next/dist/client/components/builtin/default.d.ts
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
export declare const PARALLEL_ROUTE_DEFAULT_PATH = "next/dist/client/components/builtin/default.js";
|
||||
export default function ParallelRouteDefault(): void;
|
||||
35
art-agent/frontend/node_modules/next/dist/client/components/builtin/default.js
generated
vendored
Normal file
35
art-agent/frontend/node_modules/next/dist/client/components/builtin/default.js
generated
vendored
Normal file
@@ -0,0 +1,35 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
0 && (module.exports = {
|
||||
PARALLEL_ROUTE_DEFAULT_PATH: null,
|
||||
default: null
|
||||
});
|
||||
function _export(target, all) {
|
||||
for(var name in all)Object.defineProperty(target, name, {
|
||||
enumerable: true,
|
||||
get: all[name]
|
||||
});
|
||||
}
|
||||
_export(exports, {
|
||||
PARALLEL_ROUTE_DEFAULT_PATH: function() {
|
||||
return PARALLEL_ROUTE_DEFAULT_PATH;
|
||||
},
|
||||
default: function() {
|
||||
return ParallelRouteDefault;
|
||||
}
|
||||
});
|
||||
const _notfound = require("../not-found");
|
||||
const PARALLEL_ROUTE_DEFAULT_PATH = 'next/dist/client/components/builtin/default.js';
|
||||
function ParallelRouteDefault() {
|
||||
(0, _notfound.notFound)();
|
||||
}
|
||||
|
||||
if ((typeof exports.default === 'function' || (typeof exports.default === 'object' && exports.default !== null)) && typeof exports.default.__esModule === 'undefined') {
|
||||
Object.defineProperty(exports.default, '__esModule', { value: true });
|
||||
Object.assign(exports.default, exports);
|
||||
module.exports = exports.default;
|
||||
}
|
||||
|
||||
//# sourceMappingURL=default.js.map
|
||||
1
art-agent/frontend/node_modules/next/dist/client/components/builtin/default.js.map
generated
vendored
Normal file
1
art-agent/frontend/node_modules/next/dist/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":["PARALLEL_ROUTE_DEFAULT_PATH","ParallelRouteDefault","notFound"],"mappings":";;;;;;;;;;;;;;;IAEaA,2BAA2B;eAA3BA;;IAGb,OAEC;eAFuBC;;;0BALC;AAElB,MAAMD,8BACX;AAEa,SAASC;IACtBC,IAAAA,kBAAQ;AACV","ignoreList":[0]}
|
||||
1
art-agent/frontend/node_modules/next/dist/client/components/builtin/forbidden.d.ts
generated
vendored
Normal file
1
art-agent/frontend/node_modules/next/dist/client/components/builtin/forbidden.d.ts
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export default function Forbidden(): import("react/jsx-runtime").JSX.Element;
|
||||
26
art-agent/frontend/node_modules/next/dist/client/components/builtin/forbidden.js
generated
vendored
Normal file
26
art-agent/frontend/node_modules/next/dist/client/components/builtin/forbidden.js
generated
vendored
Normal file
@@ -0,0 +1,26 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
Object.defineProperty(exports, "default", {
|
||||
enumerable: true,
|
||||
get: function() {
|
||||
return Forbidden;
|
||||
}
|
||||
});
|
||||
const _jsxruntime = require("react/jsx-runtime");
|
||||
const _errorfallback = require("../http-access-fallback/error-fallback");
|
||||
function Forbidden() {
|
||||
return /*#__PURE__*/ (0, _jsxruntime.jsx)(_errorfallback.HTTPAccessErrorFallback, {
|
||||
status: 403,
|
||||
message: "This page could not be accessed."
|
||||
});
|
||||
}
|
||||
|
||||
if ((typeof exports.default === 'function' || (typeof exports.default === 'object' && exports.default !== null)) && typeof exports.default.__esModule === 'undefined') {
|
||||
Object.defineProperty(exports.default, '__esModule', { value: true });
|
||||
Object.assign(exports.default, exports);
|
||||
module.exports = exports.default;
|
||||
}
|
||||
|
||||
//# sourceMappingURL=forbidden.js.map
|
||||
1
art-agent/frontend/node_modules/next/dist/client/components/builtin/forbidden.js.map
generated
vendored
Normal file
1
art-agent/frontend/node_modules/next/dist/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":["Forbidden","HTTPAccessErrorFallback","status","message"],"mappings":";;;;+BAEA;;;eAAwBA;;;;+BAFgB;AAEzB,SAASA;IACtB,qBACE,qBAACC,sCAAuB;QACtBC,QAAQ;QACRC,SAAQ;;AAGd","ignoreList":[0]}
|
||||
7
art-agent/frontend/node_modules/next/dist/client/components/builtin/global-error.d.ts
generated
vendored
Normal file
7
art-agent/frontend/node_modules/next/dist/client/components/builtin/global-error.d.ts
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
export type GlobalErrorComponent = React.ComponentType<{
|
||||
error: any;
|
||||
}>;
|
||||
declare function DefaultGlobalError({ error }: {
|
||||
error: any;
|
||||
}): import("react/jsx-runtime").JSX.Element;
|
||||
export default DefaultGlobalError;
|
||||
83
art-agent/frontend/node_modules/next/dist/client/components/builtin/global-error.js
generated
vendored
Normal file
83
art-agent/frontend/node_modules/next/dist/client/components/builtin/global-error.js
generated
vendored
Normal file
@@ -0,0 +1,83 @@
|
||||
'use client';
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
Object.defineProperty(exports, // Exported so that the import signature in the loaders can be identical to user
|
||||
// supplied custom global error signatures.
|
||||
"default", {
|
||||
enumerable: true,
|
||||
get: function() {
|
||||
return _default;
|
||||
}
|
||||
});
|
||||
const _jsxruntime = require("react/jsx-runtime");
|
||||
const _handleisrerror = require("../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(param) {
|
||||
let { error } = param;
|
||||
const digest = error == null ? void 0 : error.digest;
|
||||
return /*#__PURE__*/ (0, _jsxruntime.jsxs)("html", {
|
||||
id: "__next_error__",
|
||||
children: [
|
||||
/*#__PURE__*/ (0, _jsxruntime.jsx)("head", {}),
|
||||
/*#__PURE__*/ (0, _jsxruntime.jsxs)("body", {
|
||||
children: [
|
||||
/*#__PURE__*/ (0, _jsxruntime.jsx)(_handleisrerror.HandleISRError, {
|
||||
error: error
|
||||
}),
|
||||
/*#__PURE__*/ (0, _jsxruntime.jsx)("div", {
|
||||
style: styles.error,
|
||||
children: /*#__PURE__*/ (0, _jsxruntime.jsxs)("div", {
|
||||
children: [
|
||||
/*#__PURE__*/ (0, _jsxruntime.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__*/ (0, _jsxruntime.jsx)("p", {
|
||||
style: styles.text,
|
||||
children: "Digest: " + digest
|
||||
}) : null
|
||||
]
|
||||
})
|
||||
})
|
||||
]
|
||||
})
|
||||
]
|
||||
});
|
||||
}
|
||||
const _default = DefaultGlobalError;
|
||||
|
||||
if ((typeof exports.default === 'function' || (typeof exports.default === 'object' && exports.default !== null)) && typeof exports.default.__esModule === 'undefined') {
|
||||
Object.defineProperty(exports.default, '__esModule', { value: true });
|
||||
Object.assign(exports.default, exports);
|
||||
module.exports = exports.default;
|
||||
}
|
||||
|
||||
//# sourceMappingURL=global-error.js.map
|
||||
1
art-agent/frontend/node_modules/next/dist/client/components/builtin/global-error.js.map
generated
vendored
Normal file
1
art-agent/frontend/node_modules/next/dist/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":["styles","error","fontFamily","height","textAlign","display","flexDirection","alignItems","justifyContent","text","fontSize","fontWeight","lineHeight","margin","DefaultGlobalError","digest","html","id","head","body","HandleISRError","div","style","h2","window","location","hostname","p"],"mappings":"AAAA;;;;;+BAkDA,gFAAgF;AAChF,2CAA2C;AAC3C;;;eAAA;;;;gCAlD+B;AAE/B,MAAMA,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,KAAyB;IAAzB,IAAA,EAAEb,KAAK,EAAkB,GAAzB;IAC1B,MAAMc,SAA6Bd,yBAAAA,MAAOc,MAAM;IAChD,qBACE,sBAACC;QAAKC,IAAG;;0BACP,qBAACC;0BACD,sBAACC;;kCACC,qBAACC,8BAAc;wBAACnB,OAAOA;;kCACvB,qBAACoB;wBAAIC,OAAOtB,OAAOC,KAAK;kCACtB,cAAA,sBAACoB;;8CACC,sBAACE;oCAAGD,OAAOtB,OAAOS,IAAI;;wCAAE;wCACAM,SAAS,WAAW;wCAAS;wCACvBS,OAAOC,QAAQ,CAACC,QAAQ;wCAAC;wCAAU;wCAC9DX,SAAS,gBAAgB;wCAAkB;;;gCAG7CA,uBAAS,qBAACY;oCAAEL,OAAOtB,OAAOS,IAAI;8CAAG,AAAC,aAAUM;qCAAgB;;;;;;;;AAMzE;MAIA,WAAeD","ignoreList":[0]}
|
||||
2
art-agent/frontend/node_modules/next/dist/client/components/builtin/global-not-found.d.ts
generated
vendored
Normal file
2
art-agent/frontend/node_modules/next/dist/client/components/builtin/global-not-found.d.ts
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
declare function GlobalNotFound(): import("react/jsx-runtime").JSX.Element;
|
||||
export default GlobalNotFound;
|
||||
31
art-agent/frontend/node_modules/next/dist/client/components/builtin/global-not-found.js
generated
vendored
Normal file
31
art-agent/frontend/node_modules/next/dist/client/components/builtin/global-not-found.js
generated
vendored
Normal file
@@ -0,0 +1,31 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
Object.defineProperty(exports, "default", {
|
||||
enumerable: true,
|
||||
get: function() {
|
||||
return _default;
|
||||
}
|
||||
});
|
||||
const _jsxruntime = require("react/jsx-runtime");
|
||||
const _errorfallback = require("../http-access-fallback/error-fallback");
|
||||
function GlobalNotFound() {
|
||||
return /*#__PURE__*/ (0, _jsxruntime.jsx)("html", {
|
||||
children: /*#__PURE__*/ (0, _jsxruntime.jsx)("body", {
|
||||
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_errorfallback.HTTPAccessErrorFallback, {
|
||||
status: 404,
|
||||
message: 'This page could not be found.'
|
||||
})
|
||||
})
|
||||
});
|
||||
}
|
||||
const _default = GlobalNotFound;
|
||||
|
||||
if ((typeof exports.default === 'function' || (typeof exports.default === 'object' && exports.default !== null)) && typeof exports.default.__esModule === 'undefined') {
|
||||
Object.defineProperty(exports.default, '__esModule', { value: true });
|
||||
Object.assign(exports.default, exports);
|
||||
module.exports = exports.default;
|
||||
}
|
||||
|
||||
//# sourceMappingURL=global-not-found.js.map
|
||||
1
art-agent/frontend/node_modules/next/dist/client/components/builtin/global-not-found.js.map
generated
vendored
Normal file
1
art-agent/frontend/node_modules/next/dist/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":["GlobalNotFound","html","body","HTTPAccessErrorFallback","status","message"],"mappings":";;;;+BAeA;;;eAAA;;;;+BAfwC;AAExC,SAASA;IACP,qBACE,qBAACC;kBACC,cAAA,qBAACC;sBACC,cAAA,qBAACC,sCAAuB;gBACtBC,QAAQ;gBACRC,SAAS;;;;AAKnB;MAEA,WAAeL","ignoreList":[0]}
|
||||
4
art-agent/frontend/node_modules/next/dist/client/components/builtin/layout.d.ts
generated
vendored
Normal file
4
art-agent/frontend/node_modules/next/dist/client/components/builtin/layout.d.ts
generated
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
import React from 'react';
|
||||
export default function DefaultLayout({ children, }: {
|
||||
children: React.ReactNode;
|
||||
}): import("react/jsx-runtime").JSX.Element;
|
||||
29
art-agent/frontend/node_modules/next/dist/client/components/builtin/layout.js
generated
vendored
Normal file
29
art-agent/frontend/node_modules/next/dist/client/components/builtin/layout.js
generated
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
Object.defineProperty(exports, "default", {
|
||||
enumerable: true,
|
||||
get: function() {
|
||||
return DefaultLayout;
|
||||
}
|
||||
});
|
||||
const _interop_require_default = require("@swc/helpers/_/_interop_require_default");
|
||||
const _jsxruntime = require("react/jsx-runtime");
|
||||
const _react = /*#__PURE__*/ _interop_require_default._(require("react"));
|
||||
function DefaultLayout(param) {
|
||||
let { children } = param;
|
||||
return /*#__PURE__*/ (0, _jsxruntime.jsx)("html", {
|
||||
children: /*#__PURE__*/ (0, _jsxruntime.jsx)("body", {
|
||||
children: children
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
if ((typeof exports.default === 'function' || (typeof exports.default === 'object' && exports.default !== null)) && typeof exports.default.__esModule === 'undefined') {
|
||||
Object.defineProperty(exports.default, '__esModule', { value: true });
|
||||
Object.assign(exports.default, exports);
|
||||
module.exports = exports.default;
|
||||
}
|
||||
|
||||
//# sourceMappingURL=layout.js.map
|
||||
1
art-agent/frontend/node_modules/next/dist/client/components/builtin/layout.js.map
generated
vendored
Normal file
1
art-agent/frontend/node_modules/next/dist/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":["DefaultLayout","children","html","body"],"mappings":";;;;+BAEA;;;eAAwBA;;;;;gEAFN;AAEH,SAASA,cAAc,KAIrC;IAJqC,IAAA,EACpCC,QAAQ,EAGT,GAJqC;IAKpC,qBACE,qBAACC;kBACC,cAAA,qBAACC;sBAAMF;;;AAGb","ignoreList":[0]}
|
||||
1
art-agent/frontend/node_modules/next/dist/client/components/builtin/not-found.d.ts
generated
vendored
Normal file
1
art-agent/frontend/node_modules/next/dist/client/components/builtin/not-found.d.ts
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export default function NotFound(): import("react/jsx-runtime").JSX.Element;
|
||||
26
art-agent/frontend/node_modules/next/dist/client/components/builtin/not-found.js
generated
vendored
Normal file
26
art-agent/frontend/node_modules/next/dist/client/components/builtin/not-found.js
generated
vendored
Normal file
@@ -0,0 +1,26 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
Object.defineProperty(exports, "default", {
|
||||
enumerable: true,
|
||||
get: function() {
|
||||
return NotFound;
|
||||
}
|
||||
});
|
||||
const _jsxruntime = require("react/jsx-runtime");
|
||||
const _errorfallback = require("../http-access-fallback/error-fallback");
|
||||
function NotFound() {
|
||||
return /*#__PURE__*/ (0, _jsxruntime.jsx)(_errorfallback.HTTPAccessErrorFallback, {
|
||||
status: 404,
|
||||
message: "This page could not be found."
|
||||
});
|
||||
}
|
||||
|
||||
if ((typeof exports.default === 'function' || (typeof exports.default === 'object' && exports.default !== null)) && typeof exports.default.__esModule === 'undefined') {
|
||||
Object.defineProperty(exports.default, '__esModule', { value: true });
|
||||
Object.assign(exports.default, exports);
|
||||
module.exports = exports.default;
|
||||
}
|
||||
|
||||
//# sourceMappingURL=not-found.js.map
|
||||
1
art-agent/frontend/node_modules/next/dist/client/components/builtin/not-found.js.map
generated
vendored
Normal file
1
art-agent/frontend/node_modules/next/dist/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":["NotFound","HTTPAccessErrorFallback","status","message"],"mappings":";;;;+BAEA;;;eAAwBA;;;;+BAFgB;AAEzB,SAASA;IACtB,qBACE,qBAACC,sCAAuB;QACtBC,QAAQ;QACRC,SAAQ;;AAGd","ignoreList":[0]}
|
||||
1
art-agent/frontend/node_modules/next/dist/client/components/builtin/unauthorized.d.ts
generated
vendored
Normal file
1
art-agent/frontend/node_modules/next/dist/client/components/builtin/unauthorized.d.ts
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export default function Unauthorized(): import("react/jsx-runtime").JSX.Element;
|
||||
26
art-agent/frontend/node_modules/next/dist/client/components/builtin/unauthorized.js
generated
vendored
Normal file
26
art-agent/frontend/node_modules/next/dist/client/components/builtin/unauthorized.js
generated
vendored
Normal file
@@ -0,0 +1,26 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
Object.defineProperty(exports, "default", {
|
||||
enumerable: true,
|
||||
get: function() {
|
||||
return Unauthorized;
|
||||
}
|
||||
});
|
||||
const _jsxruntime = require("react/jsx-runtime");
|
||||
const _errorfallback = require("../http-access-fallback/error-fallback");
|
||||
function Unauthorized() {
|
||||
return /*#__PURE__*/ (0, _jsxruntime.jsx)(_errorfallback.HTTPAccessErrorFallback, {
|
||||
status: 401,
|
||||
message: "You're not authorized to access this page."
|
||||
});
|
||||
}
|
||||
|
||||
if ((typeof exports.default === 'function' || (typeof exports.default === 'object' && exports.default !== null)) && typeof exports.default.__esModule === 'undefined') {
|
||||
Object.defineProperty(exports.default, '__esModule', { value: true });
|
||||
Object.assign(exports.default, exports);
|
||||
module.exports = exports.default;
|
||||
}
|
||||
|
||||
//# sourceMappingURL=unauthorized.js.map
|
||||
1
art-agent/frontend/node_modules/next/dist/client/components/builtin/unauthorized.js.map
generated
vendored
Normal file
1
art-agent/frontend/node_modules/next/dist/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":["Unauthorized","HTTPAccessErrorFallback","status","message"],"mappings":";;;;+BAEA;;;eAAwBA;;;;+BAFgB;AAEzB,SAASA;IACtB,qBACE,qBAACC,sCAAuB;QACtBC,QAAQ;QACRC,SAAQ;;AAGd","ignoreList":[0]}
|
||||
16
art-agent/frontend/node_modules/next/dist/client/components/client-page.d.ts
generated
vendored
Normal file
16
art-agent/frontend/node_modules/next/dist/client/components/client-page.d.ts
generated
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
import type { ParsedUrlQuery } from 'querystring';
|
||||
import type { Params } from '../../server/request/params';
|
||||
/**
|
||||
* 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 declare function ClientPageRoot({ Component, searchParams, params, promises, }: {
|
||||
Component: React.ComponentType<any>;
|
||||
searchParams: ParsedUrlQuery;
|
||||
params: Params;
|
||||
promises?: Array<Promise<any>>;
|
||||
}): import("react/jsx-runtime").JSX.Element;
|
||||
57
art-agent/frontend/node_modules/next/dist/client/components/client-page.js
generated
vendored
Normal file
57
art-agent/frontend/node_modules/next/dist/client/components/client-page.js
generated
vendored
Normal file
@@ -0,0 +1,57 @@
|
||||
'use client';
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
Object.defineProperty(exports, "ClientPageRoot", {
|
||||
enumerable: true,
|
||||
get: function() {
|
||||
return ClientPageRoot;
|
||||
}
|
||||
});
|
||||
const _jsxruntime = require("react/jsx-runtime");
|
||||
const _invarianterror = require("../../shared/lib/invariant-error");
|
||||
function ClientPageRoot(param) {
|
||||
let { Component, searchParams, params, // eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
promises } = param;
|
||||
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.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__*/ (0, _jsxruntime.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__*/ (0, _jsxruntime.jsx)(Component, {
|
||||
params: clientParams,
|
||||
searchParams: clientSearchParams
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
if ((typeof exports.default === 'function' || (typeof exports.default === 'object' && exports.default !== null)) && typeof exports.default.__esModule === 'undefined') {
|
||||
Object.defineProperty(exports.default, '__esModule', { value: true });
|
||||
Object.assign(exports.default, exports);
|
||||
module.exports = exports.default;
|
||||
}
|
||||
|
||||
//# sourceMappingURL=client-page.js.map
|
||||
1
art-agent/frontend/node_modules/next/dist/client/components/client-page.js.map
generated
vendored
Normal file
1
art-agent/frontend/node_modules/next/dist/client/components/client-page.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../src/client/components/client-page.tsx"],"sourcesContent":["'use client'\n\nimport type { ParsedUrlQuery } from 'querystring'\nimport { InvariantError } from '../../shared/lib/invariant-error'\n\nimport type { Params } from '../../server/request/params'\n\n/**\n * When the Page is a client component we send the params and searchParams to this client wrapper\n * where they are turned into dynamically tracked values before being passed to the actual Page component.\n *\n * additionally we may send promises representing the params and searchParams. We don't ever use these passed\n * values but it can be necessary for the sender to send a Promise that doesn't resolve in certain situations.\n * It is up to the caller to decide if the promises are needed.\n */\nexport function ClientPageRoot({\n Component,\n searchParams,\n params,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n promises,\n}: {\n Component: React.ComponentType<any>\n searchParams: ParsedUrlQuery\n params: Params\n promises?: Array<Promise<any>>\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 clientSearchParams: Promise<ParsedUrlQuery>\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 searchParams in a client Page.'\n )\n }\n\n const { createSearchParamsFromClient } =\n require('../../server/request/search-params') as typeof import('../../server/request/search-params')\n clientSearchParams = createSearchParamsFromClient(searchParams, store)\n\n const { createParamsFromClient } =\n require('../../server/request/params') as typeof import('../../server/request/params')\n clientParams = createParamsFromClient(params, store)\n\n return <Component params={clientParams} searchParams={clientSearchParams} />\n } else {\n const { createRenderSearchParamsFromClient } =\n require('../request/search-params.browser') as typeof import('../request/search-params.browser')\n const clientSearchParams = createRenderSearchParamsFromClient(searchParams)\n const { createRenderParamsFromClient } =\n require('../request/params.browser') as typeof import('../request/params.browser')\n const clientParams = createRenderParamsFromClient(params)\n\n return <Component params={clientParams} searchParams={clientSearchParams} />\n }\n}\n"],"names":["ClientPageRoot","Component","searchParams","params","promises","window","workAsyncStorage","require","clientSearchParams","clientParams","store","getStore","InvariantError","createSearchParamsFromClient","createParamsFromClient","createRenderSearchParamsFromClient","createRenderParamsFromClient"],"mappings":"AAAA;;;;;+BAegBA;;;eAAAA;;;;gCAZe;AAYxB,SAASA,eAAe,KAW9B;IAX8B,IAAA,EAC7BC,SAAS,EACTC,YAAY,EACZC,MAAM,EACN,6DAA6D;IAC7DC,QAAQ,EAMT,GAX8B;IAY7B,IAAI,OAAOC,WAAW,aAAa;QACjC,MAAM,EAAEC,gBAAgB,EAAE,GACxBC,QAAQ;QAEV,IAAIC;QACJ,IAAIC;QACJ,yEAAyE;QACzE,wEAAwE;QACxE,MAAMC,QAAQJ,iBAAiBK,QAAQ;QACvC,IAAI,CAACD,OAAO;YACV,MAAM,qBAEL,CAFK,IAAIE,8BAAc,CACtB,6EADI,qBAAA;uBAAA;4BAAA;8BAAA;YAEN;QACF;QAEA,MAAM,EAAEC,4BAA4B,EAAE,GACpCN,QAAQ;QACVC,qBAAqBK,6BAA6BX,cAAcQ;QAEhE,MAAM,EAAEI,sBAAsB,EAAE,GAC9BP,QAAQ;QACVE,eAAeK,uBAAuBX,QAAQO;QAE9C,qBAAO,qBAACT;YAAUE,QAAQM;YAAcP,cAAcM;;IACxD,OAAO;QACL,MAAM,EAAEO,kCAAkC,EAAE,GAC1CR,QAAQ;QACV,MAAMC,qBAAqBO,mCAAmCb;QAC9D,MAAM,EAAEc,4BAA4B,EAAE,GACpCT,QAAQ;QACV,MAAME,eAAeO,6BAA6Bb;QAElD,qBAAO,qBAACF;YAAUE,QAAQM;YAAcP,cAAcM;;IACxD;AACF","ignoreList":[0]}
|
||||
17
art-agent/frontend/node_modules/next/dist/client/components/client-segment.d.ts
generated
vendored
Normal file
17
art-agent/frontend/node_modules/next/dist/client/components/client-segment.d.ts
generated
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
import type { Params } from '../../server/request/params';
|
||||
/**
|
||||
* 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 declare function ClientSegmentRoot({ Component, slots, params, promise, }: {
|
||||
Component: React.ComponentType<any>;
|
||||
slots: {
|
||||
[key: string]: React.ReactNode;
|
||||
};
|
||||
params: Params;
|
||||
promise?: Promise<any>;
|
||||
}): import("react/jsx-runtime").JSX.Element;
|
||||
52
art-agent/frontend/node_modules/next/dist/client/components/client-segment.js
generated
vendored
Normal file
52
art-agent/frontend/node_modules/next/dist/client/components/client-segment.js
generated
vendored
Normal file
@@ -0,0 +1,52 @@
|
||||
'use client';
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
Object.defineProperty(exports, "ClientSegmentRoot", {
|
||||
enumerable: true,
|
||||
get: function() {
|
||||
return ClientSegmentRoot;
|
||||
}
|
||||
});
|
||||
const _jsxruntime = require("react/jsx-runtime");
|
||||
const _invarianterror = require("../../shared/lib/invariant-error");
|
||||
function ClientSegmentRoot(param) {
|
||||
let { Component, slots, params, // eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
promise } = param;
|
||||
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.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__*/ (0, _jsxruntime.jsx)(Component, {
|
||||
...slots,
|
||||
params: clientParams
|
||||
});
|
||||
} else {
|
||||
const { createRenderParamsFromClient } = require('../request/params.browser');
|
||||
const clientParams = createRenderParamsFromClient(params);
|
||||
return /*#__PURE__*/ (0, _jsxruntime.jsx)(Component, {
|
||||
...slots,
|
||||
params: clientParams
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
if ((typeof exports.default === 'function' || (typeof exports.default === 'object' && exports.default !== null)) && typeof exports.default.__esModule === 'undefined') {
|
||||
Object.defineProperty(exports.default, '__esModule', { value: true });
|
||||
Object.assign(exports.default, exports);
|
||||
module.exports = exports.default;
|
||||
}
|
||||
|
||||
//# sourceMappingURL=client-segment.js.map
|
||||
1
art-agent/frontend/node_modules/next/dist/client/components/client-segment.js.map
generated
vendored
Normal file
1
art-agent/frontend/node_modules/next/dist/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'\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 params,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n promise,\n}: {\n Component: React.ComponentType<any>\n slots: { [key: string]: React.ReactNode }\n params: Params\n promise?: Promise<any>\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":["ClientSegmentRoot","Component","slots","params","promise","window","workAsyncStorage","require","clientParams","store","getStore","InvariantError","createParamsFromClient","createRenderParamsFromClient"],"mappings":"AAAA;;;;;+BAcgBA;;;eAAAA;;;;gCAZe;AAYxB,SAASA,kBAAkB,KAWjC;IAXiC,IAAA,EAChCC,SAAS,EACTC,KAAK,EACLC,MAAM,EACN,6DAA6D;IAC7DC,OAAO,EAMR,GAXiC;IAYhC,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,IAAIE,8BAAc,CACtB,uGADI,qBAAA;uBAAA;4BAAA;8BAAA;YAEN;QACF;QAEA,MAAM,EAAEC,sBAAsB,EAAE,GAC9BL,QAAQ;QACVC,eAAeI,uBAAuBT,QAAQM;QAE9C,qBAAO,qBAACR;YAAW,GAAGC,KAAK;YAAEC,QAAQK;;IACvC,OAAO;QACL,MAAM,EAAEK,4BAA4B,EAAE,GACpCN,QAAQ;QACV,MAAMC,eAAeK,6BAA6BV;QAClD,qBAAO,qBAACF;YAAW,GAAGC,KAAK;YAAEC,QAAQK;;IACvC;AACF","ignoreList":[0]}
|
||||
5
art-agent/frontend/node_modules/next/dist/client/components/dev-root-http-access-fallback-boundary.d.ts
generated
vendored
Normal file
5
art-agent/frontend/node_modules/next/dist/client/components/dev-root-http-access-fallback-boundary.d.ts
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
import React from 'react';
|
||||
export declare function bailOnRootNotFound(): void;
|
||||
export declare function DevRootHTTPAccessFallbackBoundary({ children, }: {
|
||||
children: React.ReactNode;
|
||||
}): import("react/jsx-runtime").JSX.Element;
|
||||
53
art-agent/frontend/node_modules/next/dist/client/components/dev-root-http-access-fallback-boundary.js
generated
vendored
Normal file
53
art-agent/frontend/node_modules/next/dist/client/components/dev-root-http-access-fallback-boundary.js
generated
vendored
Normal file
@@ -0,0 +1,53 @@
|
||||
'use client';
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
0 && (module.exports = {
|
||||
DevRootHTTPAccessFallbackBoundary: null,
|
||||
bailOnRootNotFound: null
|
||||
});
|
||||
function _export(target, all) {
|
||||
for(var name in all)Object.defineProperty(target, name, {
|
||||
enumerable: true,
|
||||
get: all[name]
|
||||
});
|
||||
}
|
||||
_export(exports, {
|
||||
DevRootHTTPAccessFallbackBoundary: function() {
|
||||
return DevRootHTTPAccessFallbackBoundary;
|
||||
},
|
||||
bailOnRootNotFound: function() {
|
||||
return bailOnRootNotFound;
|
||||
}
|
||||
});
|
||||
const _interop_require_default = require("@swc/helpers/_/_interop_require_default");
|
||||
const _jsxruntime = require("react/jsx-runtime");
|
||||
const _react = /*#__PURE__*/ _interop_require_default._(require("react"));
|
||||
const _errorboundary = require("./http-access-fallback/error-boundary");
|
||||
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;
|
||||
}
|
||||
function DevRootHTTPAccessFallbackBoundary(param) {
|
||||
let { children } = param;
|
||||
return /*#__PURE__*/ (0, _jsxruntime.jsx)(_errorboundary.HTTPAccessFallbackBoundary, {
|
||||
notFound: /*#__PURE__*/ (0, _jsxruntime.jsx)(NotAllowedRootHTTPFallbackError, {}),
|
||||
children: children
|
||||
});
|
||||
}
|
||||
|
||||
if ((typeof exports.default === 'function' || (typeof exports.default === 'object' && exports.default !== null)) && typeof exports.default.__esModule === 'undefined') {
|
||||
Object.defineProperty(exports.default, '__esModule', { value: true });
|
||||
Object.assign(exports.default, exports);
|
||||
module.exports = exports.default;
|
||||
}
|
||||
|
||||
//# sourceMappingURL=dev-root-http-access-fallback-boundary.js.map
|
||||
1
art-agent/frontend/node_modules/next/dist/client/components/dev-root-http-access-fallback-boundary.js.map
generated
vendored
Normal file
1
art-agent/frontend/node_modules/next/dist/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":["DevRootHTTPAccessFallbackBoundary","bailOnRootNotFound","Error","NotAllowedRootHTTPFallbackError","children","HTTPAccessFallbackBoundary","notFound"],"mappings":"AAAA;;;;;;;;;;;;;;;;IAegBA,iCAAiC;eAAjCA;;IATAC,kBAAkB;eAAlBA;;;;;gEAJE;+BACyB;AAGpC,SAASA;IACd,MAAM,qBAA4D,CAA5D,IAAIC,MAAM,oDAAV,qBAAA;eAAA;oBAAA;sBAAA;IAA2D;AACnE;AAEA,SAASC;IACPF;IACA,OAAO;AACT;AAEO,SAASD,kCAAkC,KAIjD;IAJiD,IAAA,EAChDI,QAAQ,EAGT,GAJiD;IAKhD,qBACE,qBAACC,yCAA0B;QAACC,wBAAU,qBAACH;kBACpCC;;AAGP","ignoreList":[0]}
|
||||
40
art-agent/frontend/node_modules/next/dist/client/components/error-boundary.d.ts
generated
vendored
Normal file
40
art-agent/frontend/node_modules/next/dist/client/components/error-boundary.d.ts
generated
vendored
Normal file
@@ -0,0 +1,40 @@
|
||||
import React, { type JSX } from 'react';
|
||||
export type ErrorComponent = React.ComponentType<{
|
||||
error: Error;
|
||||
reset?: () => void;
|
||||
}>;
|
||||
export interface ErrorBoundaryProps {
|
||||
children?: React.ReactNode;
|
||||
errorComponent: ErrorComponent | undefined;
|
||||
errorStyles?: React.ReactNode | undefined;
|
||||
errorScripts?: React.ReactNode | undefined;
|
||||
}
|
||||
interface ErrorBoundaryHandlerProps extends ErrorBoundaryProps {
|
||||
pathname: string | null;
|
||||
errorComponent: ErrorComponent;
|
||||
}
|
||||
interface ErrorBoundaryHandlerState {
|
||||
error: Error | null;
|
||||
previousPathname: string | null;
|
||||
}
|
||||
export declare class ErrorBoundaryHandler extends React.Component<ErrorBoundaryHandlerProps, ErrorBoundaryHandlerState> {
|
||||
constructor(props: ErrorBoundaryHandlerProps);
|
||||
static getDerivedStateFromError(error: Error): {
|
||||
error: Error;
|
||||
};
|
||||
static getDerivedStateFromProps(props: ErrorBoundaryHandlerProps, state: ErrorBoundaryHandlerState): ErrorBoundaryHandlerState | null;
|
||||
reset: () => void;
|
||||
render(): React.ReactNode;
|
||||
}
|
||||
/**
|
||||
* 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 declare function ErrorBoundary({ errorComponent, errorStyles, errorScripts, children, }: ErrorBoundaryProps & {
|
||||
children: React.ReactNode;
|
||||
}): JSX.Element;
|
||||
export {};
|
||||
135
art-agent/frontend/node_modules/next/dist/client/components/error-boundary.js
generated
vendored
Normal file
135
art-agent/frontend/node_modules/next/dist/client/components/error-boundary.js
generated
vendored
Normal file
@@ -0,0 +1,135 @@
|
||||
'use client';
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
0 && (module.exports = {
|
||||
ErrorBoundary: null,
|
||||
ErrorBoundaryHandler: null
|
||||
});
|
||||
function _export(target, all) {
|
||||
for(var name in all)Object.defineProperty(target, name, {
|
||||
enumerable: true,
|
||||
get: all[name]
|
||||
});
|
||||
}
|
||||
_export(exports, {
|
||||
ErrorBoundary: function() {
|
||||
return ErrorBoundary;
|
||||
},
|
||||
ErrorBoundaryHandler: function() {
|
||||
return ErrorBoundaryHandler;
|
||||
}
|
||||
});
|
||||
const _interop_require_default = require("@swc/helpers/_/_interop_require_default");
|
||||
const _jsxruntime = require("react/jsx-runtime");
|
||||
const _react = /*#__PURE__*/ _interop_require_default._(require("react"));
|
||||
const _navigationuntracked = require("./navigation-untracked");
|
||||
const _isnextroutererror = require("./is-next-router-error");
|
||||
const _navfailurehandler = require("./nav-failure-handler");
|
||||
const _handleisrerror = require("./handle-isr-error");
|
||||
const _isbot = require("../../shared/lib/router/utils/is-bot");
|
||||
const isBotUserAgent = typeof window !== 'undefined' && (0, _isbot.isBot)(window.navigator.userAgent);
|
||||
class ErrorBoundaryHandler extends _react.default.Component {
|
||||
static getDerivedStateFromError(error) {
|
||||
if ((0, _isnextroutererror.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 && (0, _navfailurehandler.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__*/ (0, _jsxruntime.jsxs)(_jsxruntime.Fragment, {
|
||||
children: [
|
||||
/*#__PURE__*/ (0, _jsxruntime.jsx)(_handleisrerror.HandleISRError, {
|
||||
error: this.state.error
|
||||
}),
|
||||
this.props.errorStyles,
|
||||
this.props.errorScripts,
|
||||
/*#__PURE__*/ (0, _jsxruntime.jsx)(this.props.errorComponent, {
|
||||
error: this.state.error,
|
||||
reset: this.reset
|
||||
})
|
||||
]
|
||||
});
|
||||
}
|
||||
return this.props.children;
|
||||
}
|
||||
constructor(props){
|
||||
super(props), this.reset = ()=>{
|
||||
this.setState({
|
||||
error: null
|
||||
});
|
||||
};
|
||||
this.state = {
|
||||
error: null,
|
||||
previousPathname: this.props.pathname
|
||||
};
|
||||
}
|
||||
}
|
||||
function ErrorBoundary(param) {
|
||||
let { errorComponent, errorStyles, errorScripts, children } = param;
|
||||
// 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 = (0, _navigationuntracked.useUntrackedPathname)();
|
||||
if (errorComponent) {
|
||||
return /*#__PURE__*/ (0, _jsxruntime.jsx)(ErrorBoundaryHandler, {
|
||||
pathname: pathname,
|
||||
errorComponent: errorComponent,
|
||||
errorStyles: errorStyles,
|
||||
errorScripts: errorScripts,
|
||||
children: children
|
||||
});
|
||||
}
|
||||
return /*#__PURE__*/ (0, _jsxruntime.jsx)(_jsxruntime.Fragment, {
|
||||
children: children
|
||||
});
|
||||
}
|
||||
|
||||
if ((typeof exports.default === 'function' || (typeof exports.default === 'object' && exports.default !== null)) && typeof exports.default.__esModule === 'undefined') {
|
||||
Object.defineProperty(exports.default, '__esModule', { value: true });
|
||||
Object.assign(exports.default, exports);
|
||||
module.exports = exports.default;
|
||||
}
|
||||
|
||||
//# sourceMappingURL=error-boundary.js.map
|
||||
1
art-agent/frontend/node_modules/next/dist/client/components/error-boundary.js.map
generated
vendored
Normal file
1
art-agent/frontend/node_modules/next/dist/client/components/error-boundary.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
17
art-agent/frontend/node_modules/next/dist/client/components/errors/graceful-degrade-boundary.d.ts
generated
vendored
Normal file
17
art-agent/frontend/node_modules/next/dist/client/components/errors/graceful-degrade-boundary.d.ts
generated
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
import { Component, type ReactNode } from 'react';
|
||||
interface ErrorBoundaryProps {
|
||||
children: ReactNode;
|
||||
}
|
||||
interface ErrorBoundaryState {
|
||||
hasError: boolean;
|
||||
}
|
||||
export declare class GracefulDegradeBoundary extends Component<ErrorBoundaryProps, ErrorBoundaryState> {
|
||||
private rootHtml;
|
||||
private htmlAttributes;
|
||||
private htmlRef;
|
||||
constructor(props: ErrorBoundaryProps);
|
||||
static getDerivedStateFromError(_: unknown): ErrorBoundaryState;
|
||||
componentDidMount(): void;
|
||||
render(): string | number | bigint | boolean | Iterable<ReactNode> | Promise<string | number | bigint | boolean | import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | import("react").ReactPortal | Iterable<ReactNode> | null | undefined> | import("react/jsx-runtime").JSX.Element | null | undefined;
|
||||
}
|
||||
export default GracefulDegradeBoundary;
|
||||
87
art-agent/frontend/node_modules/next/dist/client/components/errors/graceful-degrade-boundary.js
generated
vendored
Normal file
87
art-agent/frontend/node_modules/next/dist/client/components/errors/graceful-degrade-boundary.js
generated
vendored
Normal file
@@ -0,0 +1,87 @@
|
||||
'use client';
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
0 && (module.exports = {
|
||||
GracefulDegradeBoundary: null,
|
||||
default: null
|
||||
});
|
||||
function _export(target, all) {
|
||||
for(var name in all)Object.defineProperty(target, name, {
|
||||
enumerable: true,
|
||||
get: all[name]
|
||||
});
|
||||
}
|
||||
_export(exports, {
|
||||
GracefulDegradeBoundary: function() {
|
||||
return GracefulDegradeBoundary;
|
||||
},
|
||||
default: function() {
|
||||
return _default;
|
||||
}
|
||||
});
|
||||
const _jsxruntime = require("react/jsx-runtime");
|
||||
const _react = require("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;
|
||||
}
|
||||
class GracefulDegradeBoundary extends _react.Component {
|
||||
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((param)=>{
|
||||
let [key, value] = param;
|
||||
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__*/ (0, _jsxruntime.jsx)("html", {
|
||||
ref: this.htmlRef,
|
||||
suppressHydrationWarning: true,
|
||||
dangerouslySetInnerHTML: {
|
||||
__html: this.rootHtml
|
||||
}
|
||||
});
|
||||
}
|
||||
return this.props.children;
|
||||
}
|
||||
constructor(props){
|
||||
super(props);
|
||||
this.state = {
|
||||
hasError: false
|
||||
};
|
||||
this.rootHtml = '';
|
||||
this.htmlAttributes = {};
|
||||
this.htmlRef = /*#__PURE__*/ (0, _react.createRef)();
|
||||
}
|
||||
}
|
||||
const _default = GracefulDegradeBoundary;
|
||||
|
||||
if ((typeof exports.default === 'function' || (typeof exports.default === 'object' && exports.default !== null)) && typeof exports.default.__esModule === 'undefined') {
|
||||
Object.defineProperty(exports.default, '__esModule', { value: true });
|
||||
Object.assign(exports.default, exports);
|
||||
module.exports = exports.default;
|
||||
}
|
||||
|
||||
//# sourceMappingURL=graceful-degrade-boundary.js.map
|
||||
1
art-agent/frontend/node_modules/next/dist/client/components/errors/graceful-degrade-boundary.js.map
generated
vendored
Normal file
1
art-agent/frontend/node_modules/next/dist/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":["GracefulDegradeBoundary","getDomNodeAttributes","node","result","i","attributes","length","attr","name","value","Component","getDerivedStateFromError","_","hasError","componentDidMount","htmlNode","htmlRef","current","state","Object","entries","htmlAttributes","forEach","key","setAttribute","render","window","rootHtml","document","documentElement","innerHTML","html","ref","suppressHydrationWarning","dangerouslySetInnerHTML","__html","props","children","constructor","createRef"],"mappings":"AAAA;;;;;;;;;;;;;;;;IAqBaA,uBAAuB;eAAvBA;;IAuDb,OAAsC;eAAtC;;;;uBA1EqD;AAUrD,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;AAEO,MAAMH,gCAAgCU,gBAAS;IAgBpD,OAAOC,yBAAyBC,CAAU,EAAsB;QAC9D,OAAO;YAAEC,UAAU;QAAK;IAC1B;IAEAC,oBAAoB;QAClB,MAAMC,WAAW,IAAI,CAACC,OAAO,CAACC,OAAO;QACrC,IAAI,IAAI,CAACC,KAAK,CAACL,QAAQ,IAAIE,UAAU;YACnC,yDAAyD;YACzDI,OAAOC,OAAO,CAAC,IAAI,CAACC,cAAc,EAAEC,OAAO,CAAC;oBAAC,CAACC,KAAKd,MAAM;gBACvDM,SAASS,YAAY,CAACD,KAAKd;YAC7B;QACF;IACF;IAEAgB,SAAS;QACP,MAAM,EAAEZ,QAAQ,EAAE,GAAG,IAAI,CAACK,KAAK;QAC/B,kDAAkD;QAClD,IAAI,OAAOQ,WAAW,eAAe,CAAC,IAAI,CAACC,QAAQ,EAAE;YACnD,IAAI,CAACA,QAAQ,GAAGC,SAASC,eAAe,CAACC,SAAS;YAClD,IAAI,CAACT,cAAc,GAAGpB,qBAAqB2B,SAASC,eAAe;QACrE;QAEA,IAAIhB,UAAU;YACZ,oDAAoD;YACpD,qBACE,qBAACkB;gBACCC,KAAK,IAAI,CAAChB,OAAO;gBACjBiB,wBAAwB;gBACxBC,yBAAyB;oBACvBC,QAAQ,IAAI,CAACR,QAAQ;gBACvB;;QAGN;QAEA,OAAO,IAAI,CAACS,KAAK,CAACC,QAAQ;IAC5B;IA5CAC,YAAYF,KAAyB,CAAE;QACrC,KAAK,CAACA;QACN,IAAI,CAAClB,KAAK,GAAG;YAAEL,UAAU;QAAM;QAC/B,IAAI,CAACc,QAAQ,GAAG;QAChB,IAAI,CAACN,cAAc,GAAG,CAAC;QACvB,IAAI,CAACL,OAAO,iBAAGuB,IAAAA,gBAAS;IAC1B;AAuCF;MAEA,WAAevC","ignoreList":[0]}
|
||||
5
art-agent/frontend/node_modules/next/dist/client/components/errors/root-error-boundary.d.ts
generated
vendored
Normal file
5
art-agent/frontend/node_modules/next/dist/client/components/errors/root-error-boundary.d.ts
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
import React, { type JSX } from 'react';
|
||||
import { type ErrorBoundaryProps } from '../error-boundary';
|
||||
export default function RootErrorBoundary({ children, errorComponent, errorStyles, errorScripts, }: ErrorBoundaryProps & {
|
||||
children: React.ReactNode;
|
||||
}): JSX.Element;
|
||||
42
art-agent/frontend/node_modules/next/dist/client/components/errors/root-error-boundary.js
generated
vendored
Normal file
42
art-agent/frontend/node_modules/next/dist/client/components/errors/root-error-boundary.js
generated
vendored
Normal file
@@ -0,0 +1,42 @@
|
||||
'use client';
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
Object.defineProperty(exports, "default", {
|
||||
enumerable: true,
|
||||
get: function() {
|
||||
return RootErrorBoundary;
|
||||
}
|
||||
});
|
||||
const _interop_require_default = require("@swc/helpers/_/_interop_require_default");
|
||||
const _jsxruntime = require("react/jsx-runtime");
|
||||
const _react = /*#__PURE__*/ _interop_require_default._(require("react"));
|
||||
const _gracefuldegradeboundary = /*#__PURE__*/ _interop_require_default._(require("./graceful-degrade-boundary"));
|
||||
const _errorboundary = require("../error-boundary");
|
||||
const _isbot = require("../../../shared/lib/router/utils/is-bot");
|
||||
const isBotUserAgent = typeof window !== 'undefined' && (0, _isbot.isBot)(window.navigator.userAgent);
|
||||
function RootErrorBoundary(param) {
|
||||
let { children, errorComponent, errorStyles, errorScripts } = param;
|
||||
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__*/ (0, _jsxruntime.jsx)(_gracefuldegradeboundary.default, {
|
||||
children: children
|
||||
});
|
||||
}
|
||||
return /*#__PURE__*/ (0, _jsxruntime.jsx)(_errorboundary.ErrorBoundary, {
|
||||
errorComponent: errorComponent,
|
||||
errorStyles: errorStyles,
|
||||
errorScripts: errorScripts,
|
||||
children: children
|
||||
});
|
||||
}
|
||||
|
||||
if ((typeof exports.default === 'function' || (typeof exports.default === 'object' && exports.default !== null)) && typeof exports.default.__esModule === 'undefined') {
|
||||
Object.defineProperty(exports.default, '__esModule', { value: true });
|
||||
Object.assign(exports.default, exports);
|
||||
module.exports = exports.default;
|
||||
}
|
||||
|
||||
//# sourceMappingURL=root-error-boundary.js.map
|
||||
1
art-agent/frontend/node_modules/next/dist/client/components/errors/root-error-boundary.js.map
generated
vendored
Normal file
1
art-agent/frontend/node_modules/next/dist/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":["RootErrorBoundary","isBotUserAgent","window","isBot","navigator","userAgent","children","errorComponent","errorStyles","errorScripts","GracefulDegradeBoundary","ErrorBoundary"],"mappings":"AAAA;;;;;+BAUA;;;eAAwBA;;;;;gEARQ;kFACI;+BACmB;uBACjC;AAEtB,MAAMC,iBACJ,OAAOC,WAAW,eAAeC,IAAAA,YAAK,EAACD,OAAOE,SAAS,CAACC,SAAS;AAEpD,SAASL,kBAAkB,KAKW;IALX,IAAA,EACxCM,QAAQ,EACRC,cAAc,EACdC,WAAW,EACXC,YAAY,EACuC,GALX;IAMxC,IAAIR,gBAAgB;QAClB,kFAAkF;QAClF,8CAA8C;QAC9C,qBAAO,qBAACS,gCAAuB;sBAAEJ;;IACnC;IAEA,qBACE,qBAACK,4BAAa;QACZJ,gBAAgBA;QAChBC,aAAaA;QACbC,cAAcA;kBAEbH;;AAGP","ignoreList":[0]}
|
||||
1
art-agent/frontend/node_modules/next/dist/client/components/forbidden.d.ts
generated
vendored
Normal file
1
art-agent/frontend/node_modules/next/dist/client/components/forbidden.d.ts
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export declare function forbidden(): never;
|
||||
49
art-agent/frontend/node_modules/next/dist/client/components/forbidden.js
generated
vendored
Normal file
49
art-agent/frontend/node_modules/next/dist/client/components/forbidden.js
generated
vendored
Normal file
@@ -0,0 +1,49 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
Object.defineProperty(exports, "forbidden", {
|
||||
enumerable: true,
|
||||
get: function() {
|
||||
return forbidden;
|
||||
}
|
||||
});
|
||||
const _httpaccessfallback = require("./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 = "" + _httpaccessfallback.HTTP_ERROR_FALLBACK_ERROR_CODE + ";403";
|
||||
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
|
||||
});
|
||||
}
|
||||
// eslint-disable-next-line no-throw-literal
|
||||
const error = Object.defineProperty(new Error(DIGEST), "__NEXT_ERROR_CODE", {
|
||||
value: "E394",
|
||||
enumerable: false,
|
||||
configurable: true
|
||||
});
|
||||
error.digest = DIGEST;
|
||||
throw error;
|
||||
}
|
||||
|
||||
if ((typeof exports.default === 'function' || (typeof exports.default === 'object' && exports.default !== null)) && typeof exports.default.__esModule === 'undefined') {
|
||||
Object.defineProperty(exports.default, '__esModule', { value: true });
|
||||
Object.assign(exports.default, exports);
|
||||
module.exports = exports.default;
|
||||
}
|
||||
|
||||
//# sourceMappingURL=forbidden.js.map
|
||||
1
art-agent/frontend/node_modules/next/dist/client/components/forbidden.js.map
generated
vendored
Normal file
1
art-agent/frontend/node_modules/next/dist/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 // eslint-disable-next-line no-throw-literal\n const error = new Error(DIGEST) as HTTPAccessFallbackError\n ;(error as HTTPAccessFallbackError).digest = DIGEST\n throw error\n}\n"],"names":["forbidden","DIGEST","HTTP_ERROR_FALLBACK_ERROR_CODE","process","env","__NEXT_EXPERIMENTAL_AUTH_INTERRUPTS","Error","error","digest"],"mappings":";;;;+BAqBgBA;;;eAAAA;;;oCAlBT;AAEP,6BAA6B;AAC7B;;;;;;;;;;;CAWC,GAED,MAAMC,SAAS,AAAC,KAAEC,kDAA8B,GAAC;AAE1C,SAASF;IACd,IAAI,CAACG,QAAQC,GAAG,CAACC,mCAAmC,EAAE;QACpD,MAAM,qBAEL,CAFK,IAAIC,MACP,gHADG,qBAAA;mBAAA;wBAAA;0BAAA;QAEN;IACF;IAEA,4CAA4C;IAC5C,MAAMC,QAAQ,qBAAiB,CAAjB,IAAID,MAAML,SAAV,qBAAA;eAAA;oBAAA;sBAAA;IAAgB;IAC5BM,MAAkCC,MAAM,GAAGP;IAC7C,MAAMM;AACR","ignoreList":[0]}
|
||||
3
art-agent/frontend/node_modules/next/dist/client/components/handle-isr-error.d.ts
generated
vendored
Normal file
3
art-agent/frontend/node_modules/next/dist/client/components/handle-isr-error.d.ts
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
export declare function HandleISRError({ error }: {
|
||||
error: any;
|
||||
}): null;
|
||||
30
art-agent/frontend/node_modules/next/dist/client/components/handle-isr-error.js
generated
vendored
Normal file
30
art-agent/frontend/node_modules/next/dist/client/components/handle-isr-error.js
generated
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
Object.defineProperty(exports, "HandleISRError", {
|
||||
enumerable: true,
|
||||
get: function() {
|
||||
return HandleISRError;
|
||||
}
|
||||
});
|
||||
const workAsyncStorage = typeof window === 'undefined' ? require('../../server/app-render/work-async-storage.external').workAsyncStorage : undefined;
|
||||
function HandleISRError(param) {
|
||||
let { error } = param;
|
||||
if (workAsyncStorage) {
|
||||
const store = workAsyncStorage.getStore();
|
||||
if ((store == null ? void 0 : store.isRevalidate) || (store == null ? void 0 : store.isStaticGeneration)) {
|
||||
console.error(error);
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
if ((typeof exports.default === 'function' || (typeof exports.default === 'object' && exports.default !== null)) && typeof exports.default.__esModule === 'undefined') {
|
||||
Object.defineProperty(exports.default, '__esModule', { value: true });
|
||||
Object.assign(exports.default, exports);
|
||||
module.exports = exports.default;
|
||||
}
|
||||
|
||||
//# sourceMappingURL=handle-isr-error.js.map
|
||||
1
art-agent/frontend/node_modules/next/dist/client/components/handle-isr-error.js.map
generated
vendored
Normal file
1
art-agent/frontend/node_modules/next/dist/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?.isRevalidate || store?.isStaticGeneration) {\n console.error(error)\n throw error\n }\n }\n\n return null\n}\n"],"names":["HandleISRError","workAsyncStorage","window","require","undefined","error","store","getStore","isRevalidate","isStaticGeneration","console"],"mappings":";;;;+BAUgBA;;;eAAAA;;;AAVhB,MAAMC,mBACJ,OAAOC,WAAW,cACd,AACEC,QAAQ,uDACRF,gBAAgB,GAClBG;AAKC,SAASJ,eAAe,KAAyB;IAAzB,IAAA,EAAEK,KAAK,EAAkB,GAAzB;IAC7B,IAAIJ,kBAAkB;QACpB,MAAMK,QAAQL,iBAAiBM,QAAQ;QACvC,IAAID,CAAAA,yBAAAA,MAAOE,YAAY,MAAIF,yBAAAA,MAAOG,kBAAkB,GAAE;YACpDC,QAAQL,KAAK,CAACA;YACd,MAAMA;QACR;IACF;IAEA,OAAO;AACT","ignoreList":[0]}
|
||||
8
art-agent/frontend/node_modules/next/dist/client/components/hooks-server-context.d.ts
generated
vendored
Normal file
8
art-agent/frontend/node_modules/next/dist/client/components/hooks-server-context.d.ts
generated
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
declare const DYNAMIC_ERROR_CODE = "DYNAMIC_SERVER_USAGE";
|
||||
export declare class DynamicServerError extends Error {
|
||||
readonly description: string;
|
||||
digest: typeof DYNAMIC_ERROR_CODE;
|
||||
constructor(description: string);
|
||||
}
|
||||
export declare function isDynamicServerError(err: unknown): err is DynamicServerError;
|
||||
export {};
|
||||
42
art-agent/frontend/node_modules/next/dist/client/components/hooks-server-context.js
generated
vendored
Normal file
42
art-agent/frontend/node_modules/next/dist/client/components/hooks-server-context.js
generated
vendored
Normal file
@@ -0,0 +1,42 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
0 && (module.exports = {
|
||||
DynamicServerError: null,
|
||||
isDynamicServerError: null
|
||||
});
|
||||
function _export(target, all) {
|
||||
for(var name in all)Object.defineProperty(target, name, {
|
||||
enumerable: true,
|
||||
get: all[name]
|
||||
});
|
||||
}
|
||||
_export(exports, {
|
||||
DynamicServerError: function() {
|
||||
return DynamicServerError;
|
||||
},
|
||||
isDynamicServerError: function() {
|
||||
return isDynamicServerError;
|
||||
}
|
||||
});
|
||||
const DYNAMIC_ERROR_CODE = 'DYNAMIC_SERVER_USAGE';
|
||||
class DynamicServerError extends Error {
|
||||
constructor(description){
|
||||
super("Dynamic server usage: " + description), this.description = description, this.digest = DYNAMIC_ERROR_CODE;
|
||||
}
|
||||
}
|
||||
function isDynamicServerError(err) {
|
||||
if (typeof err !== 'object' || err === null || !('digest' in err) || typeof err.digest !== 'string') {
|
||||
return false;
|
||||
}
|
||||
return err.digest === DYNAMIC_ERROR_CODE;
|
||||
}
|
||||
|
||||
if ((typeof exports.default === 'function' || (typeof exports.default === 'object' && exports.default !== null)) && typeof exports.default.__esModule === 'undefined') {
|
||||
Object.defineProperty(exports.default, '__esModule', { value: true });
|
||||
Object.assign(exports.default, exports);
|
||||
module.exports = exports.default;
|
||||
}
|
||||
|
||||
//# sourceMappingURL=hooks-server-context.js.map
|
||||
1
art-agent/frontend/node_modules/next/dist/client/components/hooks-server-context.js.map
generated
vendored
Normal file
1
art-agent/frontend/node_modules/next/dist/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":["DynamicServerError","isDynamicServerError","DYNAMIC_ERROR_CODE","Error","constructor","description","digest","err"],"mappings":";;;;;;;;;;;;;;;IAEaA,kBAAkB;eAAlBA;;IAQGC,oBAAoB;eAApBA;;;AAVhB,MAAMC,qBAAqB;AAEpB,MAAMF,2BAA2BG;IAGtCC,YAAY,AAAgBC,WAAmB,CAAE;QAC/C,KAAK,CAAC,AAAC,2BAAwBA,mBADLA,cAAAA,kBAF5BC,SAAoCJ;IAIpC;AACF;AAEO,SAASD,qBAAqBM,GAAY;IAC/C,IACE,OAAOA,QAAQ,YACfA,QAAQ,QACR,CAAE,CAAA,YAAYA,GAAE,KAChB,OAAOA,IAAID,MAAM,KAAK,UACtB;QACA,OAAO;IACT;IAEA,OAAOC,IAAID,MAAM,KAAKJ;AACxB","ignoreList":[0]}
|
||||
20
art-agent/frontend/node_modules/next/dist/client/components/http-access-fallback/error-boundary.d.ts
generated
vendored
Normal file
20
art-agent/frontend/node_modules/next/dist/client/components/http-access-fallback/error-boundary.d.ts
generated
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
/**
|
||||
* 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 from 'react';
|
||||
interface HTTPAccessFallbackBoundaryProps {
|
||||
notFound?: React.ReactNode;
|
||||
forbidden?: React.ReactNode;
|
||||
unauthorized?: React.ReactNode;
|
||||
children: React.ReactNode;
|
||||
missingSlots?: Set<string>;
|
||||
}
|
||||
export declare function HTTPAccessFallbackBoundary({ notFound, forbidden, unauthorized, children, }: HTTPAccessFallbackBoundaryProps): import("react/jsx-runtime").JSX.Element;
|
||||
export {};
|
||||
126
art-agent/frontend/node_modules/next/dist/client/components/http-access-fallback/error-boundary.js
generated
vendored
Normal file
126
art-agent/frontend/node_modules/next/dist/client/components/http-access-fallback/error-boundary.js
generated
vendored
Normal file
@@ -0,0 +1,126 @@
|
||||
'use client';
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
Object.defineProperty(exports, "HTTPAccessFallbackBoundary", {
|
||||
enumerable: true,
|
||||
get: function() {
|
||||
return HTTPAccessFallbackBoundary;
|
||||
}
|
||||
});
|
||||
const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
|
||||
const _jsxruntime = require("react/jsx-runtime");
|
||||
const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
|
||||
const _navigationuntracked = require("../navigation-untracked");
|
||||
const _httpaccessfallback = require("./http-access-fallback");
|
||||
const _warnonce = require("../../../shared/lib/utils/warn-once");
|
||||
const _approutercontextsharedruntime = require("../../../shared/lib/app-router-context.shared-runtime");
|
||||
class HTTPAccessFallbackErrorBoundary extends _react.default.Component {
|
||||
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;
|
||||
(0, _warnonce.warnOnce)(warningMessage);
|
||||
}
|
||||
}
|
||||
static getDerivedStateFromError(error) {
|
||||
if ((0, _httpaccessfallback.isHTTPAccessFallbackError)(error)) {
|
||||
const httpStatus = (0, _httpaccessfallback.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 = {
|
||||
[_httpaccessfallback.HTTPAccessErrorStatus.NOT_FOUND]: notFound,
|
||||
[_httpaccessfallback.HTTPAccessErrorStatus.FORBIDDEN]: forbidden,
|
||||
[_httpaccessfallback.HTTPAccessErrorStatus.UNAUTHORIZED]: unauthorized
|
||||
};
|
||||
if (triggeredStatus) {
|
||||
const isNotFound = triggeredStatus === _httpaccessfallback.HTTPAccessErrorStatus.NOT_FOUND && notFound;
|
||||
const isForbidden = triggeredStatus === _httpaccessfallback.HTTPAccessErrorStatus.FORBIDDEN && forbidden;
|
||||
const isUnauthorized = triggeredStatus === _httpaccessfallback.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__*/ (0, _jsxruntime.jsxs)(_jsxruntime.Fragment, {
|
||||
children: [
|
||||
/*#__PURE__*/ (0, _jsxruntime.jsx)("meta", {
|
||||
name: "robots",
|
||||
content: "noindex"
|
||||
}),
|
||||
process.env.NODE_ENV === 'development' && /*#__PURE__*/ (0, _jsxruntime.jsx)("meta", {
|
||||
name: "boundary-next-error",
|
||||
content: (0, _httpaccessfallback.getAccessFallbackErrorTypeByStatus)(triggeredStatus)
|
||||
}),
|
||||
errorComponents[triggeredStatus]
|
||||
]
|
||||
});
|
||||
}
|
||||
return children;
|
||||
}
|
||||
constructor(props){
|
||||
super(props);
|
||||
this.state = {
|
||||
triggeredStatus: undefined,
|
||||
previousPathname: props.pathname
|
||||
};
|
||||
}
|
||||
}
|
||||
function HTTPAccessFallbackBoundary(param) {
|
||||
let { notFound, forbidden, unauthorized, children } = param;
|
||||
// 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 = (0, _navigationuntracked.useUntrackedPathname)();
|
||||
const missingSlots = (0, _react.useContext)(_approutercontextsharedruntime.MissingSlotContext);
|
||||
const hasErrorFallback = !!(notFound || forbidden || unauthorized);
|
||||
if (hasErrorFallback) {
|
||||
return /*#__PURE__*/ (0, _jsxruntime.jsx)(HTTPAccessFallbackErrorBoundary, {
|
||||
pathname: pathname,
|
||||
notFound: notFound,
|
||||
forbidden: forbidden,
|
||||
unauthorized: unauthorized,
|
||||
missingSlots: missingSlots,
|
||||
children: children
|
||||
});
|
||||
}
|
||||
return /*#__PURE__*/ (0, _jsxruntime.jsx)(_jsxruntime.Fragment, {
|
||||
children: children
|
||||
});
|
||||
}
|
||||
|
||||
if ((typeof exports.default === 'function' || (typeof exports.default === 'object' && exports.default !== null)) && typeof exports.default.__esModule === 'undefined') {
|
||||
Object.defineProperty(exports.default, '__esModule', { value: true });
|
||||
Object.assign(exports.default, exports);
|
||||
module.exports = exports.default;
|
||||
}
|
||||
|
||||
//# sourceMappingURL=error-boundary.js.map
|
||||
1
art-agent/frontend/node_modules/next/dist/client/components/http-access-fallback/error-boundary.js.map
generated
vendored
Normal file
1
art-agent/frontend/node_modules/next/dist/client/components/http-access-fallback/error-boundary.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
4
art-agent/frontend/node_modules/next/dist/client/components/http-access-fallback/error-fallback.d.ts
generated
vendored
Normal file
4
art-agent/frontend/node_modules/next/dist/client/components/http-access-fallback/error-fallback.d.ts
generated
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
export declare function HTTPAccessErrorFallback({ status, message, }: {
|
||||
status: number;
|
||||
message: string;
|
||||
}): import("react/jsx-runtime").JSX.Element;
|
||||
66
art-agent/frontend/node_modules/next/dist/client/components/http-access-fallback/error-fallback.js
generated
vendored
Normal file
66
art-agent/frontend/node_modules/next/dist/client/components/http-access-fallback/error-fallback.js
generated
vendored
Normal file
@@ -0,0 +1,66 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
Object.defineProperty(exports, "HTTPAccessErrorFallback", {
|
||||
enumerable: true,
|
||||
get: function() {
|
||||
return HTTPAccessErrorFallback;
|
||||
}
|
||||
});
|
||||
const _jsxruntime = require("react/jsx-runtime");
|
||||
const _accesserrorstyles = require("../styles/access-error-styles");
|
||||
function HTTPAccessErrorFallback(param) {
|
||||
let { status, message } = param;
|
||||
return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_jsxruntime.Fragment, {
|
||||
children: [
|
||||
/*#__PURE__*/ (0, _jsxruntime.jsx)("title", {
|
||||
children: status + ": " + message
|
||||
}),
|
||||
/*#__PURE__*/ (0, _jsxruntime.jsx)("div", {
|
||||
style: _accesserrorstyles.styles.error,
|
||||
children: /*#__PURE__*/ (0, _jsxruntime.jsxs)("div", {
|
||||
children: [
|
||||
/*#__PURE__*/ (0, _jsxruntime.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__*/ (0, _jsxruntime.jsx)("h1", {
|
||||
className: "next-error-h1",
|
||||
style: _accesserrorstyles.styles.h1,
|
||||
children: status
|
||||
}),
|
||||
/*#__PURE__*/ (0, _jsxruntime.jsx)("div", {
|
||||
style: _accesserrorstyles.styles.desc,
|
||||
children: /*#__PURE__*/ (0, _jsxruntime.jsx)("h2", {
|
||||
style: _accesserrorstyles.styles.h2,
|
||||
children: message
|
||||
})
|
||||
})
|
||||
]
|
||||
})
|
||||
})
|
||||
]
|
||||
});
|
||||
}
|
||||
|
||||
if ((typeof exports.default === 'function' || (typeof exports.default === 'object' && exports.default !== null)) && typeof exports.default.__esModule === 'undefined') {
|
||||
Object.defineProperty(exports.default, '__esModule', { value: true });
|
||||
Object.assign(exports.default, exports);
|
||||
module.exports = exports.default;
|
||||
}
|
||||
|
||||
//# sourceMappingURL=error-fallback.js.map
|
||||
1
art-agent/frontend/node_modules/next/dist/client/components/http-access-fallback/error-fallback.js.map
generated
vendored
Normal file
1
art-agent/frontend/node_modules/next/dist/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":["HTTPAccessErrorFallback","status","message","title","div","style","styles","error","dangerouslySetInnerHTML","__html","h1","className","desc","h2"],"mappings":";;;;+BAEgBA;;;eAAAA;;;;mCAFO;AAEhB,SAASA,wBAAwB,KAMvC;IANuC,IAAA,EACtCC,MAAM,EACNC,OAAO,EAIR,GANuC;IAOtC,qBACE;;0BAEE,qBAACC;0BAAO,AAAGF,SAAO,OAAIC;;0BAEtB,qBAACE;gBAAIC,OAAOC,yBAAM,CAACC,KAAK;0BACtB,cAAA,sBAACH;;sCACC,qBAACC;4BACCG,yBAAyB;gCACvB;;;;;;;;;;;;cAYA,GACAC,QAAS;4BACX;;sCAEF,qBAACC;4BAAGC,WAAU;4BAAgBN,OAAOC,yBAAM,CAACI,EAAE;sCAC3CT;;sCAEH,qBAACG;4BAAIC,OAAOC,yBAAM,CAACM,IAAI;sCACrB,cAAA,qBAACC;gCAAGR,OAAOC,yBAAM,CAACO,EAAE;0CAAGX;;;;;;;;AAMnC","ignoreList":[0]}
|
||||
19
art-agent/frontend/node_modules/next/dist/client/components/http-access-fallback/http-access-fallback.d.ts
generated
vendored
Normal file
19
art-agent/frontend/node_modules/next/dist/client/components/http-access-fallback/http-access-fallback.d.ts
generated
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
export declare const HTTPAccessErrorStatus: {
|
||||
NOT_FOUND: number;
|
||||
FORBIDDEN: number;
|
||||
UNAUTHORIZED: number;
|
||||
};
|
||||
export declare const HTTP_ERROR_FALLBACK_ERROR_CODE = "NEXT_HTTP_ERROR_FALLBACK";
|
||||
export type HTTPAccessFallbackError = Error & {
|
||||
digest: `${typeof HTTP_ERROR_FALLBACK_ERROR_CODE};${string}`;
|
||||
};
|
||||
/**
|
||||
* 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 declare function isHTTPAccessFallbackError(error: unknown): error is HTTPAccessFallbackError;
|
||||
export declare function getAccessFallbackHTTPStatus(error: HTTPAccessFallbackError): number;
|
||||
export declare function getAccessFallbackErrorTypeByStatus(status: number): 'not-found' | 'forbidden' | 'unauthorized' | undefined;
|
||||
72
art-agent/frontend/node_modules/next/dist/client/components/http-access-fallback/http-access-fallback.js
generated
vendored
Normal file
72
art-agent/frontend/node_modules/next/dist/client/components/http-access-fallback/http-access-fallback.js
generated
vendored
Normal file
@@ -0,0 +1,72 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
0 && (module.exports = {
|
||||
HTTPAccessErrorStatus: null,
|
||||
HTTP_ERROR_FALLBACK_ERROR_CODE: null,
|
||||
getAccessFallbackErrorTypeByStatus: null,
|
||||
getAccessFallbackHTTPStatus: null,
|
||||
isHTTPAccessFallbackError: null
|
||||
});
|
||||
function _export(target, all) {
|
||||
for(var name in all)Object.defineProperty(target, name, {
|
||||
enumerable: true,
|
||||
get: all[name]
|
||||
});
|
||||
}
|
||||
_export(exports, {
|
||||
HTTPAccessErrorStatus: function() {
|
||||
return HTTPAccessErrorStatus;
|
||||
},
|
||||
HTTP_ERROR_FALLBACK_ERROR_CODE: function() {
|
||||
return HTTP_ERROR_FALLBACK_ERROR_CODE;
|
||||
},
|
||||
getAccessFallbackErrorTypeByStatus: function() {
|
||||
return getAccessFallbackErrorTypeByStatus;
|
||||
},
|
||||
getAccessFallbackHTTPStatus: function() {
|
||||
return getAccessFallbackHTTPStatus;
|
||||
},
|
||||
isHTTPAccessFallbackError: function() {
|
||||
return isHTTPAccessFallbackError;
|
||||
}
|
||||
});
|
||||
const HTTPAccessErrorStatus = {
|
||||
NOT_FOUND: 404,
|
||||
FORBIDDEN: 403,
|
||||
UNAUTHORIZED: 401
|
||||
};
|
||||
const ALLOWED_CODES = new Set(Object.values(HTTPAccessErrorStatus));
|
||||
const HTTP_ERROR_FALLBACK_ERROR_CODE = 'NEXT_HTTP_ERROR_FALLBACK';
|
||||
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));
|
||||
}
|
||||
function getAccessFallbackHTTPStatus(error) {
|
||||
const httpStatus = error.digest.split(';')[1];
|
||||
return Number(httpStatus);
|
||||
}
|
||||
function getAccessFallbackErrorTypeByStatus(status) {
|
||||
switch(status){
|
||||
case 401:
|
||||
return 'unauthorized';
|
||||
case 403:
|
||||
return 'forbidden';
|
||||
case 404:
|
||||
return 'not-found';
|
||||
default:
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if ((typeof exports.default === 'function' || (typeof exports.default === 'object' && exports.default !== null)) && typeof exports.default.__esModule === 'undefined') {
|
||||
Object.defineProperty(exports.default, '__esModule', { value: true });
|
||||
Object.assign(exports.default, exports);
|
||||
module.exports = exports.default;
|
||||
}
|
||||
|
||||
//# sourceMappingURL=http-access-fallback.js.map
|
||||
1
art-agent/frontend/node_modules/next/dist/client/components/http-access-fallback/http-access-fallback.js.map
generated
vendored
Normal file
1
art-agent/frontend/node_modules/next/dist/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","HTTP_ERROR_FALLBACK_ERROR_CODE","getAccessFallbackErrorTypeByStatus","getAccessFallbackHTTPStatus","isHTTPAccessFallbackError","NOT_FOUND","FORBIDDEN","UNAUTHORIZED","ALLOWED_CODES","Set","Object","values","error","digest","prefix","httpStatus","split","has","Number","status"],"mappings":";;;;;;;;;;;;;;;;;;IAAaA,qBAAqB;eAArBA;;IAQAC,8BAA8B;eAA9BA;;IAuCGC,kCAAkC;eAAlCA;;IAPAC,2BAA2B;eAA3BA;;IAnBAC,yBAAyB;eAAzBA;;;AArBT,MAAMJ,wBAAwB;IACnCK,WAAW;IACXC,WAAW;IACXC,cAAc;AAChB;AAEA,MAAMC,gBAAgB,IAAIC,IAAIC,OAAOC,MAAM,CAACX;AAErC,MAAMC,iCAAiC;AAavC,SAASG,0BACdQ,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,WAAWb,kCACXO,cAAcS,GAAG,CAACC,OAAOH;AAE7B;AAEO,SAASZ,4BACdS,KAA8B;IAE9B,MAAMG,aAAaH,MAAMC,MAAM,CAACG,KAAK,CAAC,IAAI,CAAC,EAAE;IAC7C,OAAOE,OAAOH;AAChB;AAEO,SAASb,mCACdiB,MAAc;IAEd,OAAQA;QACN,KAAK;YACH,OAAO;QACT,KAAK;YACH,OAAO;QACT,KAAK;YACH,OAAO;QACT;YACE;IACJ;AACF","ignoreList":[0]}
|
||||
8
art-agent/frontend/node_modules/next/dist/client/components/is-next-router-error.d.ts
generated
vendored
Normal file
8
art-agent/frontend/node_modules/next/dist/client/components/is-next-router-error.d.ts
generated
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
import { type HTTPAccessFallbackError } from './http-access-fallback/http-access-fallback';
|
||||
import { type RedirectError } 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 declare function isNextRouterError(error: unknown): error is RedirectError | HTTPAccessFallbackError;
|
||||
23
art-agent/frontend/node_modules/next/dist/client/components/is-next-router-error.js
generated
vendored
Normal file
23
art-agent/frontend/node_modules/next/dist/client/components/is-next-router-error.js
generated
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
Object.defineProperty(exports, "isNextRouterError", {
|
||||
enumerable: true,
|
||||
get: function() {
|
||||
return isNextRouterError;
|
||||
}
|
||||
});
|
||||
const _httpaccessfallback = require("./http-access-fallback/http-access-fallback");
|
||||
const _redirecterror = require("./redirect-error");
|
||||
function isNextRouterError(error) {
|
||||
return (0, _redirecterror.isRedirectError)(error) || (0, _httpaccessfallback.isHTTPAccessFallbackError)(error);
|
||||
}
|
||||
|
||||
if ((typeof exports.default === 'function' || (typeof exports.default === 'object' && exports.default !== null)) && typeof exports.default.__esModule === 'undefined') {
|
||||
Object.defineProperty(exports.default, '__esModule', { value: true });
|
||||
Object.assign(exports.default, exports);
|
||||
module.exports = exports.default;
|
||||
}
|
||||
|
||||
//# sourceMappingURL=is-next-router-error.js.map
|
||||
1
art-agent/frontend/node_modules/next/dist/client/components/is-next-router-error.js.map
generated
vendored
Normal file
1
art-agent/frontend/node_modules/next/dist/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":["isNextRouterError","error","isRedirectError","isHTTPAccessFallbackError"],"mappings":";;;;+BAWgBA;;;eAAAA;;;oCART;+BAC6C;AAO7C,SAASA,kBACdC,KAAc;IAEd,OAAOC,IAAAA,8BAAe,EAACD,UAAUE,IAAAA,6CAAyB,EAACF;AAC7D","ignoreList":[0]}
|
||||
19
art-agent/frontend/node_modules/next/dist/client/components/layout-router.d.ts
generated
vendored
Normal file
19
art-agent/frontend/node_modules/next/dist/client/components/layout-router.d.ts
generated
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
import type { ErrorComponent } from './error-boundary';
|
||||
import React from 'react';
|
||||
/**
|
||||
* 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, }: {
|
||||
parallelRouterKey: string;
|
||||
error: ErrorComponent | undefined;
|
||||
errorStyles: React.ReactNode | undefined;
|
||||
errorScripts: React.ReactNode | undefined;
|
||||
templateStyles: React.ReactNode | undefined;
|
||||
templateScripts: React.ReactNode | undefined;
|
||||
template: React.ReactNode;
|
||||
notFound: React.ReactNode | undefined;
|
||||
forbidden: React.ReactNode | undefined;
|
||||
unauthorized: React.ReactNode | undefined;
|
||||
segmentViewBoundaries?: React.ReactNode;
|
||||
}): React.ReactNode[];
|
||||
538
art-agent/frontend/node_modules/next/dist/client/components/layout-router.js
generated
vendored
Normal file
538
art-agent/frontend/node_modules/next/dist/client/components/layout-router.js
generated
vendored
Normal file
@@ -0,0 +1,538 @@
|
||||
'use client';
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
Object.defineProperty(exports, /**
|
||||
* 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.
|
||||
*/ "default", {
|
||||
enumerable: true,
|
||||
get: function() {
|
||||
return OuterLayoutRouter;
|
||||
}
|
||||
});
|
||||
const _interop_require_default = require("@swc/helpers/_/_interop_require_default");
|
||||
const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
|
||||
const _jsxruntime = require("react/jsx-runtime");
|
||||
const _routerreducertypes = require("./router-reducer/router-reducer-types");
|
||||
const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
|
||||
const _reactdom = /*#__PURE__*/ _interop_require_default._(require("react-dom"));
|
||||
const _approutercontextsharedruntime = require("../../shared/lib/app-router-context.shared-runtime");
|
||||
const _fetchserverresponse = require("./router-reducer/fetch-server-response");
|
||||
const _unresolvedthenable = require("./unresolved-thenable");
|
||||
const _errorboundary = require("./error-boundary");
|
||||
const _matchsegments = require("./match-segments");
|
||||
const _disablesmoothscroll = require("../../shared/lib/router/utils/disable-smooth-scroll");
|
||||
const _redirectboundary = require("./redirect-boundary");
|
||||
const _errorboundary1 = require("./http-access-fallback/error-boundary");
|
||||
const _createroutercachekey = require("./router-reducer/create-router-cache-key");
|
||||
const _hasinterceptionrouteincurrenttree = require("./router-reducer/reducers/has-interception-route-in-current-tree");
|
||||
const _useactionqueue = require("./use-action-queue");
|
||||
const _bfcache = require("./bfcache");
|
||||
const _apppaths = require("../../shared/lib/router/utils/app-paths");
|
||||
const Activity = process.env.__NEXT_ROUTER_BF_CACHE ? require('react').unstable_Activity : null;
|
||||
/**
|
||||
* Add refetch marker to router state at the point of the current layout segment.
|
||||
* This ensures the response returned is not further down than the current layout segment.
|
||||
*/ function walkAddRefetch(segmentPathToWalk, treeToRecreate) {
|
||||
if (segmentPathToWalk) {
|
||||
const [segment, parallelRouteKey] = segmentPathToWalk;
|
||||
const isLast = segmentPathToWalk.length === 2;
|
||||
if ((0, _matchsegments.matchSegment)(treeToRecreate[0], segment)) {
|
||||
if (treeToRecreate[1].hasOwnProperty(parallelRouteKey)) {
|
||||
if (isLast) {
|
||||
const subTree = walkAddRefetch(undefined, treeToRecreate[1][parallelRouteKey]);
|
||||
return [
|
||||
treeToRecreate[0],
|
||||
{
|
||||
...treeToRecreate[1],
|
||||
[parallelRouteKey]: [
|
||||
subTree[0],
|
||||
subTree[1],
|
||||
subTree[2],
|
||||
'refetch'
|
||||
]
|
||||
}
|
||||
];
|
||||
}
|
||||
return [
|
||||
treeToRecreate[0],
|
||||
{
|
||||
...treeToRecreate[1],
|
||||
[parallelRouteKey]: walkAddRefetch(segmentPathToWalk.slice(2), treeToRecreate[1][parallelRouteKey])
|
||||
}
|
||||
];
|
||||
}
|
||||
}
|
||||
}
|
||||
return treeToRecreate;
|
||||
}
|
||||
const __DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE = _reactdom.default.__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)) {
|
||||
if (process.env.NODE_ENV === 'development') {
|
||||
console.warn('Skipping auto-scroll behavior due to `position: sticky` or `position: fixed` on element:', element);
|
||||
}
|
||||
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;
|
||||
}
|
||||
var _document_getElementById;
|
||||
// If the hash fragment is an id, the page has to scroll to the element with that id.
|
||||
return (_document_getElementById = document.getElementById(hashFragment)) != null ? _document_getElementById : // 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.default.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)=>(0, _matchsegments.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') {
|
||||
var _domNode_parentElement;
|
||||
if (((_domNode_parentElement = domNode.parentElement) == null ? void 0 : _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 = [];
|
||||
(0, _disablesmoothscroll.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(param) {
|
||||
let { segmentPath, children } = param;
|
||||
const context = (0, _react.useContext)(_approutercontextsharedruntime.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__*/ (0, _jsxruntime.jsx)(InnerScrollAndFocusHandler, {
|
||||
segmentPath: segmentPath,
|
||||
focusAndScrollRef: context.focusAndScrollRef,
|
||||
children: children
|
||||
});
|
||||
}
|
||||
/**
|
||||
* InnerLayoutRouter handles rendering the provided segment based on the cache.
|
||||
*/ function InnerLayoutRouter(param) {
|
||||
let { tree, segmentPath, cacheNode, url } = param;
|
||||
const context = (0, _react.useContext)(_approutercontextsharedruntime.GlobalLayoutRouterContext);
|
||||
if (!context) {
|
||||
throw Object.defineProperty(new Error('invariant global layout router not mounted'), "__NEXT_ERROR_CODE", {
|
||||
value: "E473",
|
||||
enumerable: false,
|
||||
configurable: true
|
||||
});
|
||||
}
|
||||
const { tree: fullTree } = context;
|
||||
// `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 = (0, _react.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.
|
||||
const resolvedRsc = typeof rsc === 'object' && rsc !== null && typeof rsc.then === 'function' ? (0, _react.use)(rsc) : rsc;
|
||||
if (!resolvedRsc) {
|
||||
// The data for this segment is not available, and there's no pending
|
||||
// navigation that will be able to fulfill it. We need to fetch more from
|
||||
// the server and patch the cache.
|
||||
// Check if there's already a pending request.
|
||||
let lazyData = cacheNode.lazyData;
|
||||
if (lazyData === null) {
|
||||
/**
|
||||
* Router state with refetch marker added
|
||||
*/ // TODO-APP: remove ''
|
||||
const refetchTree = walkAddRefetch([
|
||||
'',
|
||||
...segmentPath
|
||||
], fullTree);
|
||||
const includeNextUrl = (0, _hasinterceptionrouteincurrenttree.hasInterceptionRouteInCurrentTree)(fullTree);
|
||||
const navigatedAt = Date.now();
|
||||
cacheNode.lazyData = lazyData = (0, _fetchserverresponse.fetchServerResponse)(new URL(url, location.origin), {
|
||||
flightRouterState: refetchTree,
|
||||
nextUrl: includeNextUrl ? context.nextUrl : null
|
||||
}).then((serverResponse)=>{
|
||||
(0, _react.startTransition)(()=>{
|
||||
(0, _useactionqueue.dispatchAppRouterAction)({
|
||||
type: _routerreducertypes.ACTION_SERVER_PATCH,
|
||||
previousTree: fullTree,
|
||||
serverResponse,
|
||||
navigatedAt
|
||||
});
|
||||
});
|
||||
return serverResponse;
|
||||
});
|
||||
// Suspend while waiting for lazyData to resolve
|
||||
(0, _react.use)(lazyData);
|
||||
}
|
||||
// Suspend infinitely as `changeByServerResponse` will cause a different part of the tree to be rendered.
|
||||
// A falsey `resolvedRsc` indicates missing data -- we should not commit that branch, and we need to wait for the data to arrive.
|
||||
(0, _react.use)(_unresolvedthenable.unresolvedThenable);
|
||||
}
|
||||
// If we get to this point, then we know we have something we can render.
|
||||
const subtree = // The layout router context narrows down tree and childNodes at each level.
|
||||
/*#__PURE__*/ (0, _jsxruntime.jsx)(_approutercontextsharedruntime.LayoutRouterContext.Provider, {
|
||||
value: {
|
||||
parentTree: tree,
|
||||
parentCacheNode: cacheNode,
|
||||
parentSegmentPath: segmentPath,
|
||||
// TODO-APP: overriding of url for parallel routes
|
||||
url: url
|
||||
},
|
||||
children: resolvedRsc
|
||||
});
|
||||
// Ensure root layout is not wrapped in a div as the root layout renders `<html>`
|
||||
return subtree;
|
||||
}
|
||||
/**
|
||||
* 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(param) {
|
||||
let { loading, children } = param;
|
||||
// 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 = (0, _react.use)(promiseForLoading);
|
||||
} else {
|
||||
loadingModuleData = loading;
|
||||
}
|
||||
if (loadingModuleData) {
|
||||
const loadingRsc = loadingModuleData[0];
|
||||
const loadingStyles = loadingModuleData[1];
|
||||
const loadingScripts = loadingModuleData[2];
|
||||
return /*#__PURE__*/ (0, _jsxruntime.jsx)(_react.Suspense, {
|
||||
fallback: /*#__PURE__*/ (0, _jsxruntime.jsxs)(_jsxruntime.Fragment, {
|
||||
children: [
|
||||
loadingStyles,
|
||||
loadingScripts,
|
||||
loadingRsc
|
||||
]
|
||||
}),
|
||||
children: children
|
||||
});
|
||||
}
|
||||
return /*#__PURE__*/ (0, _jsxruntime.jsx)(_jsxruntime.Fragment, {
|
||||
children: children
|
||||
});
|
||||
}
|
||||
function OuterLayoutRouter(param) {
|
||||
let { parallelRouterKey, error, errorStyles, errorScripts, templateStyles, templateScripts, template, notFound, forbidden, unauthorized, segmentViewBoundaries } = param;
|
||||
const context = (0, _react.useContext)(_approutercontextsharedruntime.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, url } = 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];
|
||||
const activeSegment = activeTree[0];
|
||||
const activeStateKey = (0, _createroutercachekey.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 = (0, _bfcache.useRouterBFCache)(activeTree, activeStateKey);
|
||||
let children = [];
|
||||
do {
|
||||
const tree = bfcacheEntry.tree;
|
||||
const stateKey = bfcacheEntry.stateKey;
|
||||
const segment = tree[0];
|
||||
const cacheKey = (0, _createroutercachekey.createRouterCacheKey)(segment);
|
||||
// Read segment path from the parallel router cache node.
|
||||
let cacheNode = segmentMap.get(cacheKey);
|
||||
if (cacheNode === undefined) {
|
||||
// When data is not available during rendering client-side we need to fetch
|
||||
// it from the server.
|
||||
const newLazyCacheNode = {
|
||||
lazyData: null,
|
||||
rsc: null,
|
||||
prefetchRsc: null,
|
||||
head: null,
|
||||
prefetchHead: null,
|
||||
parallelRoutes: new Map(),
|
||||
loading: null,
|
||||
navigatedAt: -1
|
||||
};
|
||||
// Flight data fetch kicked off during render and put into the cache.
|
||||
cacheNode = newLazyCacheNode;
|
||||
segmentMap.set(cacheKey, newLazyCacheNode);
|
||||
}
|
||||
/*
|
||||
- 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' && process.env.__NEXT_DEVTOOL_SEGMENT_EXPLORER) {
|
||||
const { SegmentBoundaryTriggerNode, SegmentViewStateNode } = require('../../next-devtools/userspace/app/segment-explorer-node');
|
||||
const pagePrefix = (0, _apppaths.normalizeAppPath)(url);
|
||||
segmentViewStateNode = /*#__PURE__*/ (0, _jsxruntime.jsx)(SegmentViewStateNode, {
|
||||
page: pagePrefix
|
||||
}, pagePrefix);
|
||||
segmentBoundaryTriggerNode = /*#__PURE__*/ (0, _jsxruntime.jsx)(_jsxruntime.Fragment, {
|
||||
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(SegmentBoundaryTriggerNode, {})
|
||||
});
|
||||
}
|
||||
// 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__*/ (0, _jsxruntime.jsxs)(_approutercontextsharedruntime.TemplateContext.Provider, {
|
||||
value: /*#__PURE__*/ (0, _jsxruntime.jsxs)(ScrollAndFocusHandler, {
|
||||
segmentPath: segmentPath,
|
||||
children: [
|
||||
/*#__PURE__*/ (0, _jsxruntime.jsx)(_errorboundary.ErrorBoundary, {
|
||||
errorComponent: error,
|
||||
errorStyles: errorStyles,
|
||||
errorScripts: errorScripts,
|
||||
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(LoadingBoundary, {
|
||||
loading: loadingModuleData,
|
||||
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_errorboundary1.HTTPAccessFallbackBoundary, {
|
||||
notFound: notFound,
|
||||
forbidden: forbidden,
|
||||
unauthorized: unauthorized,
|
||||
children: /*#__PURE__*/ (0, _jsxruntime.jsxs)(_redirectboundary.RedirectBoundary, {
|
||||
children: [
|
||||
/*#__PURE__*/ (0, _jsxruntime.jsx)(InnerLayoutRouter, {
|
||||
url: url,
|
||||
tree: tree,
|
||||
cacheNode: cacheNode,
|
||||
segmentPath: segmentPath
|
||||
}),
|
||||
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__*/ (0, _jsxruntime.jsxs)(SegmentStateProvider, {
|
||||
children: [
|
||||
child,
|
||||
segmentViewBoundaries
|
||||
]
|
||||
}, stateKey);
|
||||
}
|
||||
if (process.env.__NEXT_ROUTER_BF_CACHE) {
|
||||
child = /*#__PURE__*/ (0, _jsxruntime.jsx)(Activity, {
|
||||
mode: stateKey === activeStateKey ? 'visible' : 'hidden',
|
||||
children: child
|
||||
}, stateKey);
|
||||
}
|
||||
children.push(child);
|
||||
bfcacheEntry = bfcacheEntry.next;
|
||||
}while (bfcacheEntry !== null);
|
||||
return children;
|
||||
}
|
||||
|
||||
if ((typeof exports.default === 'function' || (typeof exports.default === 'object' && exports.default !== null)) && typeof exports.default.__esModule === 'undefined') {
|
||||
Object.defineProperty(exports.default, '__esModule', { value: true });
|
||||
Object.assign(exports.default, exports);
|
||||
module.exports = exports.default;
|
||||
}
|
||||
|
||||
//# sourceMappingURL=layout-router.js.map
|
||||
1
art-agent/frontend/node_modules/next/dist/client/components/layout-router.js.map
generated
vendored
Normal file
1
art-agent/frontend/node_modules/next/dist/client/components/layout-router.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
46
art-agent/frontend/node_modules/next/dist/client/components/links.d.ts
generated
vendored
Normal file
46
art-agent/frontend/node_modules/next/dist/client/components/links.d.ts
generated
vendored
Normal file
@@ -0,0 +1,46 @@
|
||||
import type { FlightRouterState } from '../../server/app-render/types';
|
||||
import type { AppRouterInstance } from '../../shared/lib/app-router-context.shared-runtime';
|
||||
import { type PrefetchTaskFetchStrategy } from './segment-cache';
|
||||
import { type PrefetchTask } from './segment-cache';
|
||||
type LinkElement = HTMLAnchorElement | SVGAElement;
|
||||
type Element = LinkElement | HTMLFormElement;
|
||||
type LinkOrFormInstanceShared = {
|
||||
router: AppRouterInstance;
|
||||
fetchStrategy: PrefetchTaskFetchStrategy;
|
||||
isVisible: boolean;
|
||||
prefetchTask: PrefetchTask | null;
|
||||
};
|
||||
export type FormInstance = LinkOrFormInstanceShared & {
|
||||
prefetchHref: string;
|
||||
setOptimisticLinkStatus: null;
|
||||
};
|
||||
type PrefetchableLinkInstance = LinkOrFormInstanceShared & {
|
||||
prefetchHref: string;
|
||||
setOptimisticLinkStatus: (status: {
|
||||
pending: boolean;
|
||||
}) => void;
|
||||
};
|
||||
type NonPrefetchableLinkInstance = LinkOrFormInstanceShared & {
|
||||
prefetchHref: null;
|
||||
setOptimisticLinkStatus: (status: {
|
||||
pending: boolean;
|
||||
}) => void;
|
||||
};
|
||||
export type LinkInstance = PrefetchableLinkInstance | NonPrefetchableLinkInstance;
|
||||
export declare const PENDING_LINK_STATUS: {
|
||||
pending: boolean;
|
||||
};
|
||||
export declare const IDLE_LINK_STATUS: {
|
||||
pending: boolean;
|
||||
};
|
||||
export declare function setLinkForCurrentNavigation(link: LinkInstance | null): void;
|
||||
export declare function unmountLinkForCurrentNavigation(link: LinkInstance): void;
|
||||
export declare function mountLinkInstance(element: LinkElement, href: string, router: AppRouterInstance, fetchStrategy: PrefetchTaskFetchStrategy, prefetchEnabled: boolean, setOptimisticLinkStatus: (status: {
|
||||
pending: boolean;
|
||||
}) => void): LinkInstance;
|
||||
export declare function mountFormInstance(element: HTMLFormElement, href: string, router: AppRouterInstance, fetchStrategy: PrefetchTaskFetchStrategy): void;
|
||||
export declare function unmountPrefetchableInstance(element: Element): void;
|
||||
export declare function onLinkVisibilityChanged(element: Element, isVisible: boolean): void;
|
||||
export declare function onNavigationIntent(element: HTMLAnchorElement | SVGAElement, unstable_upgradeToDynamicPrefetch: boolean): void;
|
||||
export declare function pingVisibleLinks(nextUrl: string | null, tree: FlightRouterState): void;
|
||||
export {};
|
||||
343
art-agent/frontend/node_modules/next/dist/client/components/links.js
generated
vendored
Normal file
343
art-agent/frontend/node_modules/next/dist/client/components/links.js
generated
vendored
Normal file
@@ -0,0 +1,343 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
0 && (module.exports = {
|
||||
IDLE_LINK_STATUS: null,
|
||||
PENDING_LINK_STATUS: null,
|
||||
mountFormInstance: null,
|
||||
mountLinkInstance: null,
|
||||
onLinkVisibilityChanged: null,
|
||||
onNavigationIntent: null,
|
||||
pingVisibleLinks: null,
|
||||
setLinkForCurrentNavigation: null,
|
||||
unmountLinkForCurrentNavigation: null,
|
||||
unmountPrefetchableInstance: null
|
||||
});
|
||||
function _export(target, all) {
|
||||
for(var name in all)Object.defineProperty(target, name, {
|
||||
enumerable: true,
|
||||
get: all[name]
|
||||
});
|
||||
}
|
||||
_export(exports, {
|
||||
IDLE_LINK_STATUS: function() {
|
||||
return IDLE_LINK_STATUS;
|
||||
},
|
||||
PENDING_LINK_STATUS: function() {
|
||||
return PENDING_LINK_STATUS;
|
||||
},
|
||||
mountFormInstance: function() {
|
||||
return mountFormInstance;
|
||||
},
|
||||
mountLinkInstance: function() {
|
||||
return mountLinkInstance;
|
||||
},
|
||||
onLinkVisibilityChanged: function() {
|
||||
return onLinkVisibilityChanged;
|
||||
},
|
||||
onNavigationIntent: function() {
|
||||
return onNavigationIntent;
|
||||
},
|
||||
pingVisibleLinks: function() {
|
||||
return pingVisibleLinks;
|
||||
},
|
||||
setLinkForCurrentNavigation: function() {
|
||||
return setLinkForCurrentNavigation;
|
||||
},
|
||||
unmountLinkForCurrentNavigation: function() {
|
||||
return unmountLinkForCurrentNavigation;
|
||||
},
|
||||
unmountPrefetchableInstance: function() {
|
||||
return unmountPrefetchableInstance;
|
||||
}
|
||||
});
|
||||
const _approuterinstance = require("./app-router-instance");
|
||||
const _approuter = require("./app-router");
|
||||
const _segmentcache = require("./segment-cache");
|
||||
const _react = require("react");
|
||||
const _routerreducertypes = require("./router-reducer/router-reducer-types");
|
||||
const _invarianterror = require("../../shared/lib/invariant-error");
|
||||
// Tracks the most recently navigated link instance. When null, indicates
|
||||
// the current navigation was not initiated by a link click.
|
||||
let linkForMostRecentNavigation = null;
|
||||
const PENDING_LINK_STATUS = {
|
||||
pending: true
|
||||
};
|
||||
const IDLE_LINK_STATUS = {
|
||||
pending: false
|
||||
};
|
||||
function setLinkForCurrentNavigation(link) {
|
||||
(0, _react.startTransition)(()=>{
|
||||
linkForMostRecentNavigation == null ? void 0 : linkForMostRecentNavigation.setOptimisticLinkStatus(IDLE_LINK_STATUS);
|
||||
link == null ? void 0 : link.setOptimisticLinkStatus(PENDING_LINK_STATUS);
|
||||
linkForMostRecentNavigation = link;
|
||||
});
|
||||
}
|
||||
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) {
|
||||
try {
|
||||
return (0, _approuter.createPrefetchURL)(href);
|
||||
} catch (e) {
|
||||
// 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;
|
||||
}
|
||||
}
|
||||
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;
|
||||
}
|
||||
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);
|
||||
}
|
||||
function unmountPrefetchableInstance(element) {
|
||||
const instance = prefetchable.get(element);
|
||||
if (instance !== undefined) {
|
||||
prefetchable.delete(element);
|
||||
prefetchableAndVisible.delete(instance);
|
||||
const prefetchTask = instance.prefetchTask;
|
||||
if (prefetchTask !== null) {
|
||||
(0, _segmentcache.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);
|
||||
}
|
||||
}
|
||||
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, _segmentcache.PrefetchPriority.Default);
|
||||
}
|
||||
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 = _segmentcache.FetchStrategy.Full;
|
||||
}
|
||||
rescheduleLinkPrefetch(instance, _segmentcache.PrefetchPriority.Intent);
|
||||
}
|
||||
}
|
||||
function rescheduleLinkPrefetch(instance, priority) {
|
||||
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) {
|
||||
(0, _segmentcache.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;
|
||||
}
|
||||
if (!process.env.__NEXT_CLIENT_SEGMENT_CACHE) {
|
||||
// The old prefetch implementation does not have different priority levels.
|
||||
// Just schedule a new prefetch task.
|
||||
prefetchWithOldCacheImplementation(instance);
|
||||
return;
|
||||
}
|
||||
const appRouterState = (0, _approuterinstance.getCurrentAppRouterState)();
|
||||
if (appRouterState !== null) {
|
||||
const treeAtTimeOfPrefetch = appRouterState.tree;
|
||||
if (existingPrefetchTask === null) {
|
||||
// Initiate a prefetch task.
|
||||
const nextUrl = appRouterState.nextUrl;
|
||||
const cacheKey = (0, _segmentcache.createCacheKey)(instance.prefetchHref, nextUrl);
|
||||
instance.prefetchTask = (0, _segmentcache.schedulePrefetchTask)(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.
|
||||
(0, _segmentcache.reschedulePrefetchTask)(existingPrefetchTask, treeAtTimeOfPrefetch, instance.fetchStrategy, priority);
|
||||
}
|
||||
}
|
||||
}
|
||||
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 && !(0, _segmentcache.isPrefetchTaskDirty)(task, nextUrl, tree)) {
|
||||
continue;
|
||||
}
|
||||
// Something changed. Cancel the existing prefetch task and schedule a
|
||||
// new one.
|
||||
if (task !== null) {
|
||||
(0, _segmentcache.cancelPrefetchTask)(task);
|
||||
}
|
||||
const cacheKey = (0, _segmentcache.createCacheKey)(instance.prefetchHref, nextUrl);
|
||||
instance.prefetchTask = (0, _segmentcache.schedulePrefetchTask)(cacheKey, tree, instance.fetchStrategy, _segmentcache.PrefetchPriority.Default, null);
|
||||
}
|
||||
}
|
||||
function prefetchWithOldCacheImplementation(instance) {
|
||||
// This is the path used when the Segment Cache is not enabled.
|
||||
if (typeof window === 'undefined') {
|
||||
return;
|
||||
}
|
||||
const doPrefetch = async ()=>{
|
||||
// note that `appRouter.prefetch()` is currently sync,
|
||||
// so we have to wrap this call in an async function to be able to catch() errors below.
|
||||
let prefetchKind;
|
||||
switch(instance.fetchStrategy){
|
||||
case _segmentcache.FetchStrategy.PPR:
|
||||
{
|
||||
prefetchKind = _routerreducertypes.PrefetchKind.AUTO;
|
||||
break;
|
||||
}
|
||||
case _segmentcache.FetchStrategy.Full:
|
||||
{
|
||||
prefetchKind = _routerreducertypes.PrefetchKind.FULL;
|
||||
break;
|
||||
}
|
||||
case _segmentcache.FetchStrategy.PPRRuntime:
|
||||
{
|
||||
// We can only get here if Client Segment Cache is off, and in that case
|
||||
// it shouldn't be possible for a link to request a runtime prefetch.
|
||||
throw Object.defineProperty(new _invarianterror.InvariantError('FetchStrategy.PPRRuntime should never be used when `experimental.clientSegmentCache` is disabled'), "__NEXT_ERROR_CODE", {
|
||||
value: "E772",
|
||||
enumerable: false,
|
||||
configurable: true
|
||||
});
|
||||
}
|
||||
default:
|
||||
{
|
||||
instance.fetchStrategy;
|
||||
// Unreachable, but otherwise typescript will consider the variable unassigned
|
||||
prefetchKind = undefined;
|
||||
}
|
||||
}
|
||||
return instance.router.prefetch(instance.prefetchHref, {
|
||||
kind: prefetchKind
|
||||
});
|
||||
};
|
||||
// Prefetch the page if asked (only in the client)
|
||||
// We need to handle a prefetch error here since we may be
|
||||
// loading with priority which can reject but we don't
|
||||
// want to force navigation since this is only a prefetch
|
||||
doPrefetch().catch((err)=>{
|
||||
if (process.env.NODE_ENV !== 'production') {
|
||||
// rethrow to show invalid URL errors
|
||||
throw err;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
if ((typeof exports.default === 'function' || (typeof exports.default === 'object' && exports.default !== null)) && typeof exports.default.__esModule === 'undefined') {
|
||||
Object.defineProperty(exports.default, '__esModule', { value: true });
|
||||
Object.assign(exports.default, exports);
|
||||
module.exports = exports.default;
|
||||
}
|
||||
|
||||
//# sourceMappingURL=links.js.map
|
||||
1
art-agent/frontend/node_modules/next/dist/client/components/links.js.map
generated
vendored
Normal file
1
art-agent/frontend/node_modules/next/dist/client/components/links.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
2
art-agent/frontend/node_modules/next/dist/client/components/match-segments.d.ts
generated
vendored
Normal file
2
art-agent/frontend/node_modules/next/dist/client/components/match-segments.d.ts
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
import type { Segment } from '../../server/app-render/types';
|
||||
export declare const matchSegment: (existingSegment: Segment, segment: Segment) => boolean;
|
||||
32
art-agent/frontend/node_modules/next/dist/client/components/match-segments.js
generated
vendored
Normal file
32
art-agent/frontend/node_modules/next/dist/client/components/match-segments.js
generated
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
Object.defineProperty(exports, "matchSegment", {
|
||||
enumerable: true,
|
||||
get: function() {
|
||||
return matchSegment;
|
||||
}
|
||||
});
|
||||
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];
|
||||
};
|
||||
|
||||
if ((typeof exports.default === 'function' || (typeof exports.default === 'object' && exports.default !== null)) && typeof exports.default.__esModule === 'undefined') {
|
||||
Object.defineProperty(exports.default, '__esModule', { value: true });
|
||||
Object.assign(exports.default, exports);
|
||||
module.exports = exports.default;
|
||||
}
|
||||
|
||||
//# sourceMappingURL=match-segments.js.map
|
||||
1
art-agent/frontend/node_modules/next/dist/client/components/match-segments.js.map
generated
vendored
Normal file
1
art-agent/frontend/node_modules/next/dist/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 '../../server/app-render/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":";;;;+BAEaA;;;eAAAA;;;AAAN,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","ignoreList":[0]}
|
||||
4
art-agent/frontend/node_modules/next/dist/client/components/metadata/async-metadata.d.ts
generated
vendored
Normal file
4
art-agent/frontend/node_modules/next/dist/client/components/metadata/async-metadata.d.ts
generated
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
import type { StreamingMetadataResolvedState } from './types';
|
||||
export declare function AsyncMetadataOutlet({ promise, }: {
|
||||
promise: Promise<StreamingMetadataResolvedState>;
|
||||
}): import("react/jsx-runtime").JSX.Element;
|
||||
44
art-agent/frontend/node_modules/next/dist/client/components/metadata/async-metadata.js
generated
vendored
Normal file
44
art-agent/frontend/node_modules/next/dist/client/components/metadata/async-metadata.js
generated
vendored
Normal file
@@ -0,0 +1,44 @@
|
||||
'use client';
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
Object.defineProperty(exports, "AsyncMetadataOutlet", {
|
||||
enumerable: true,
|
||||
get: function() {
|
||||
return AsyncMetadataOutlet;
|
||||
}
|
||||
});
|
||||
const _jsxruntime = require("react/jsx-runtime");
|
||||
const _react = require("react");
|
||||
function MetadataOutlet(param) {
|
||||
let { promise } = param;
|
||||
const { error, digest } = (0, _react.use)(promise);
|
||||
if (error) {
|
||||
if (digest) {
|
||||
// The error will lose its original digest after passing from server layer to client layer;
|
||||
// We recover the digest property here to override the React created one if original digest exists.
|
||||
;
|
||||
error.digest = digest;
|
||||
}
|
||||
throw error;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
function AsyncMetadataOutlet(param) {
|
||||
let { promise } = param;
|
||||
return /*#__PURE__*/ (0, _jsxruntime.jsx)(_react.Suspense, {
|
||||
fallback: null,
|
||||
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(MetadataOutlet, {
|
||||
promise: promise
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
if ((typeof exports.default === 'function' || (typeof exports.default === 'object' && exports.default !== null)) && typeof exports.default.__esModule === 'undefined') {
|
||||
Object.defineProperty(exports.default, '__esModule', { value: true });
|
||||
Object.assign(exports.default, exports);
|
||||
module.exports = exports.default;
|
||||
}
|
||||
|
||||
//# sourceMappingURL=async-metadata.js.map
|
||||
1
art-agent/frontend/node_modules/next/dist/client/components/metadata/async-metadata.js.map
generated
vendored
Normal file
1
art-agent/frontend/node_modules/next/dist/client/components/metadata/async-metadata.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../../src/client/components/metadata/async-metadata.tsx"],"sourcesContent":["'use client'\n\nimport { Suspense, use } from 'react'\nimport type { StreamingMetadataResolvedState } from './types'\n\nfunction MetadataOutlet({\n promise,\n}: {\n promise: Promise<StreamingMetadataResolvedState>\n}) {\n const { error, digest } = use(promise)\n if (error) {\n if (digest) {\n // The error will lose its original digest after passing from server layer to client layer;\n // We recover the digest property here to override the React created one if original digest exists.\n ;(error as any).digest = digest\n }\n throw error\n }\n return null\n}\n\nexport function AsyncMetadataOutlet({\n promise,\n}: {\n promise: Promise<StreamingMetadataResolvedState>\n}) {\n return (\n <Suspense fallback={null}>\n <MetadataOutlet promise={promise} />\n </Suspense>\n )\n}\n"],"names":["AsyncMetadataOutlet","MetadataOutlet","promise","error","digest","use","Suspense","fallback"],"mappings":"AAAA;;;;;+BAsBgBA;;;eAAAA;;;;uBApBc;AAG9B,SAASC,eAAe,KAIvB;IAJuB,IAAA,EACtBC,OAAO,EAGR,GAJuB;IAKtB,MAAM,EAAEC,KAAK,EAAEC,MAAM,EAAE,GAAGC,IAAAA,UAAG,EAACH;IAC9B,IAAIC,OAAO;QACT,IAAIC,QAAQ;YACV,2FAA2F;YAC3F,mGAAmG;;YACjGD,MAAcC,MAAM,GAAGA;QAC3B;QACA,MAAMD;IACR;IACA,OAAO;AACT;AAEO,SAASH,oBAAoB,KAInC;IAJmC,IAAA,EAClCE,OAAO,EAGR,GAJmC;IAKlC,qBACE,qBAACI,eAAQ;QAACC,UAAU;kBAClB,cAAA,qBAACN;YAAeC,SAASA;;;AAG/B","ignoreList":[0]}
|
||||
5
art-agent/frontend/node_modules/next/dist/client/components/metadata/types.d.ts
generated
vendored
Normal file
5
art-agent/frontend/node_modules/next/dist/client/components/metadata/types.d.ts
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
export type StreamingMetadataResolvedState = {
|
||||
metadata: React.ReactNode;
|
||||
error: unknown | null;
|
||||
digest: string | undefined;
|
||||
};
|
||||
12
art-agent/frontend/node_modules/next/dist/client/components/metadata/types.js
generated
vendored
Normal file
12
art-agent/frontend/node_modules/next/dist/client/components/metadata/types.js
generated
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
|
||||
if ((typeof exports.default === 'function' || (typeof exports.default === 'object' && exports.default !== null)) && typeof exports.default.__esModule === 'undefined') {
|
||||
Object.defineProperty(exports.default, '__esModule', { value: true });
|
||||
Object.assign(exports.default, exports);
|
||||
module.exports = exports.default;
|
||||
}
|
||||
|
||||
//# sourceMappingURL=types.js.map
|
||||
1
art-agent/frontend/node_modules/next/dist/client/components/metadata/types.js.map
generated
vendored
Normal file
1
art-agent/frontend/node_modules/next/dist/client/components/metadata/types.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":[],"names":[],"mappings":"","ignoreList":[]}
|
||||
2
art-agent/frontend/node_modules/next/dist/client/components/nav-failure-handler.d.ts
generated
vendored
Normal file
2
art-agent/frontend/node_modules/next/dist/client/components/nav-failure-handler.d.ts
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
export declare function handleHardNavError(error: unknown): boolean;
|
||||
export declare function useNavFailureHandler(): void;
|
||||
61
art-agent/frontend/node_modules/next/dist/client/components/nav-failure-handler.js
generated
vendored
Normal file
61
art-agent/frontend/node_modules/next/dist/client/components/nav-failure-handler.js
generated
vendored
Normal file
@@ -0,0 +1,61 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
0 && (module.exports = {
|
||||
handleHardNavError: null,
|
||||
useNavFailureHandler: null
|
||||
});
|
||||
function _export(target, all) {
|
||||
for(var name in all)Object.defineProperty(target, name, {
|
||||
enumerable: true,
|
||||
get: all[name]
|
||||
});
|
||||
}
|
||||
_export(exports, {
|
||||
handleHardNavError: function() {
|
||||
return handleHardNavError;
|
||||
},
|
||||
useNavFailureHandler: function() {
|
||||
return useNavFailureHandler;
|
||||
}
|
||||
});
|
||||
const _react = require("react");
|
||||
const _createhreffromurl = require("./router-reducer/create-href-from-url");
|
||||
function handleHardNavError(error) {
|
||||
if (error && typeof window !== 'undefined' && window.next.__pendingUrl && (0, _createhreffromurl.createHrefFromUrl)(new URL(window.location.href)) !== (0, _createhreffromurl.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;
|
||||
}
|
||||
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
|
||||
(0, _react.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);
|
||||
};
|
||||
}, []);
|
||||
}
|
||||
}
|
||||
|
||||
if ((typeof exports.default === 'function' || (typeof exports.default === 'object' && exports.default !== null)) && typeof exports.default.__esModule === 'undefined') {
|
||||
Object.defineProperty(exports.default, '__esModule', { value: true });
|
||||
Object.assign(exports.default, exports);
|
||||
module.exports = exports.default;
|
||||
}
|
||||
|
||||
//# sourceMappingURL=nav-failure-handler.js.map
|
||||
1
art-agent/frontend/node_modules/next/dist/client/components/nav-failure-handler.js.map
generated
vendored
Normal file
1
art-agent/frontend/node_modules/next/dist/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":["handleHardNavError","useNavFailureHandler","error","window","next","__pendingUrl","createHrefFromUrl","URL","location","href","console","toString","process","env","__NEXT_APP_NAV_FAIL_HANDLING","useEffect","uncaughtExceptionHandler","evt","reason","addEventListener","removeEventListener"],"mappings":";;;;;;;;;;;;;;;IAGgBA,kBAAkB;eAAlBA;;IAkBAC,oBAAoB;eAApBA;;;uBArBU;mCACQ;AAE3B,SAASD,mBAAmBE,KAAc;IAC/C,IACEA,SACA,OAAOC,WAAW,eAClBA,OAAOC,IAAI,CAACC,YAAY,IACxBC,IAAAA,oCAAiB,EAAC,IAAIC,IAAIJ,OAAOK,QAAQ,CAACC,IAAI,OAC5CH,IAAAA,oCAAiB,EAACH,OAAOC,IAAI,CAACC,YAAY,GAC5C;QACAK,QAAQR,KAAK,CACV,qEACDA;QAEFC,OAAOK,QAAQ,CAACC,IAAI,GAAGN,OAAOC,IAAI,CAACC,YAAY,CAACM,QAAQ;QACxD,OAAO;IACT;IACA,OAAO;AACT;AAEO,SAASV;IACd,IAAIW,QAAQC,GAAG,CAACC,4BAA4B,EAAE;QAC5C,8DAA8D;QAC9D,sDAAsD;QACtDC,IAAAA,gBAAS,EAAC;YACR,MAAMC,2BAA2B,CAC/BC;gBAEA,MAAMf,QAAQ,YAAYe,MAAMA,IAAIC,MAAM,GAAGD,IAAIf,KAAK;gBACtD,qDAAqD;gBACrD,oDAAoD;gBACpD,qCAAqC;gBACrCF,mBAAmBE;YACrB;YACAC,OAAOgB,gBAAgB,CAAC,sBAAsBH;YAC9Cb,OAAOgB,gBAAgB,CAAC,SAASH;YACjC,OAAO;gBACLb,OAAOiB,mBAAmB,CAAC,SAASJ;gBACpCb,OAAOiB,mBAAmB,CACxB,sBACAJ;YAEJ;QACF,GAAG,EAAE;IACP;AACF","ignoreList":[0]}
|
||||
1
art-agent/frontend/node_modules/next/dist/client/components/navigation-untracked.d.ts
generated
vendored
Normal file
1
art-agent/frontend/node_modules/next/dist/client/components/navigation-untracked.d.ts
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export {};
|
||||
64
art-agent/frontend/node_modules/next/dist/client/components/navigation-untracked.js
generated
vendored
Normal file
64
art-agent/frontend/node_modules/next/dist/client/components/navigation-untracked.js
generated
vendored
Normal file
@@ -0,0 +1,64 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
Object.defineProperty(exports, "useUntrackedPathname", {
|
||||
enumerable: true,
|
||||
get: function() {
|
||||
return useUntrackedPathname;
|
||||
}
|
||||
});
|
||||
const _react = require("react");
|
||||
const _hooksclientcontextsharedruntime = require("../../shared/lib/hooks-client-context.shared-runtime");
|
||||
/**
|
||||
* This checks to see if the current render has any unknown route parameters.
|
||||
* 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;
|
||||
}
|
||||
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 (0, _react.useContext)(_hooksclientcontextsharedruntime.PathnameContext);
|
||||
}
|
||||
|
||||
if ((typeof exports.default === 'function' || (typeof exports.default === 'object' && exports.default !== null)) && typeof exports.default.__esModule === 'undefined') {
|
||||
Object.defineProperty(exports.default, '__esModule', { value: true });
|
||||
Object.assign(exports.default, exports);
|
||||
module.exports = exports.default;
|
||||
}
|
||||
|
||||
//# sourceMappingURL=navigation-untracked.js.map
|
||||
1
art-agent/frontend/node_modules/next/dist/client/components/navigation-untracked.js.map
generated
vendored
Normal file
1
art-agent/frontend/node_modules/next/dist/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.\n * It's used to trigger a different 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":["useUntrackedPathname","hasFallbackRouteParams","window","workUnitAsyncStorage","require","workUnitStore","getStore","type","fallbackParams","fallbackRouteParams","size","useContext","PathnameContext"],"mappings":";;;;+BAoDgBA;;;eAAAA;;;uBApDW;iDACK;AAEhC;;;;;CAKC,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;AAaO,SAASL;IACd,qEAAqE;IACrE,8EAA8E;IAC9E,8EAA8E;IAC9E,uBAAuB;IACvB,IAAIC,0BAA0B;QAC5B,OAAO;IACT;IAEA,2EAA2E;IAC3E,qDAAqD;IACrD,sDAAsD;IACtD,OAAOU,IAAAA,iBAAU,EAACC,gDAAe;AACnC","ignoreList":[0]}
|
||||
127
art-agent/frontend/node_modules/next/dist/client/components/navigation.d.ts
generated
vendored
Normal file
127
art-agent/frontend/node_modules/next/dist/client/components/navigation.d.ts
generated
vendored
Normal file
@@ -0,0 +1,127 @@
|
||||
import type { Params } from '../../server/request/params';
|
||||
import { type AppRouterInstance } from '../../shared/lib/app-router-context.shared-runtime';
|
||||
import { ReadonlyURLSearchParams } from './navigation.react-server';
|
||||
/**
|
||||
* 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)
|
||||
*/
|
||||
export declare function useSearchParams(): ReadonlyURLSearchParams;
|
||||
/**
|
||||
* 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)
|
||||
*/
|
||||
export declare function usePathname(): string;
|
||||
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)
|
||||
*/
|
||||
export declare function useRouter(): AppRouterInstance;
|
||||
/**
|
||||
* 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)
|
||||
*/
|
||||
export declare function useParams<T extends Params = Params>(): T;
|
||||
/**
|
||||
* 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)
|
||||
*/
|
||||
export declare function useSelectedLayoutSegments(parallelRouteKey?: string): string[];
|
||||
/**
|
||||
* 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)
|
||||
*/
|
||||
export declare function useSelectedLayoutSegment(parallelRouteKey?: string): string | null;
|
||||
export { unstable_isUnrecognizedActionError } from './unrecognized-action-error';
|
||||
export { notFound, forbidden, unauthorized, redirect, permanentRedirect, RedirectType, ReadonlyURLSearchParams, unstable_rethrow, } from './navigation.react-server';
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user