/home/techb158/balavpn.abdallabala.com/node_modules/next/dist/esm/client/components
NameSizeModeActions
builtin/-0777rm
errors/-0777rm
http-access-fallback/-0777rm
metadata/-0777rm
router-reducer/-0777rm
segment-cache-impl/-0777rm
styles/-0777rm
app-router-announcer.js27570666editdlrm
app-router-announcer.js.map46600666editdlrm
app-router-headers.js16750666editdlrm
app-router-headers.js.map30140666editdlrm
app-router-instance.js130370666editdlrm
app-router-instance.js.map211310666editdlrm
app-router.js230670666editdlrm
app-router.js.map350120666editdlrm
bailout-to-client-rendering.js12360666editdlrm
bailout-to-client-rendering.js.map17060666editdlrm
bfcache.js45680666editdlrm
bfcache.js.map63940666editdlrm
client-page.js25190666editdlrm
client-page.js.map39190666editdlrm
client-segment.js21060666editdlrm
client-segment.js.map30990666editdlrm
dev-root-http-access-fallback-boundary.js9010666editdlrm
dev-root-http-access-fallback-boundary.js.map12920666editdlrm
error-boundary.js47300666editdlrm
error-boundary.js.map74540666editdlrm
forbidden.js15430666editdlrm
forbidden.js.map19880666editdlrm
handle-isr-error.js7090666editdlrm
handle-isr-error.js.map13160666editdlrm
hooks-server-context.js5340666editdlrm
hooks-server-context.js.map11330666editdlrm
is-next-router-error.js4810666editdlrm
is-next-router-error.js.map9220666editdlrm
layout-router.js264060666editdlrm
layout-router.js.map378500666editdlrm
links.js125330666editdlrm
links.js.map210600666editdlrm
match-segments.js5240666editdlrm
match-segments.js.map10340666editdlrm
nav-failure-handler.js16140666editdlrm
nav-failure-handler.js.map28270666editdlrm
navigation-untracked.js23970666editdlrm
navigation-untracked.js.map33740666editdlrm
navigation.js91180666editdlrm
navigation.js.map128070666editdlrm
navigation.react-server.js19440666editdlrm
navigation.react-server.js.map27680666editdlrm
noop-head.js940666editdlrm
noop-head.js.map2330666editdlrm
not-found.js13560666editdlrm
not-found.js.map17520666editdlrm
promise-queue.js37120666editdlrm
promise-queue.js.map35910666editdlrm
redirect-boundary.js22220666editdlrm
redirect-boundary.js.map39400666editdlrm
redirect-error.js11230666editdlrm
redirect-error.js.map21030666editdlrm
redirect-status-code.js4250666editdlrm
redirect-status-code.js.map3190666editdlrm
redirect.js38220666editdlrm
redirect.js.map58370666editdlrm
render-from-template-context.js4560666editdlrm
render-from-template-context.js.map6670666editdlrm
segment-cache.js60040666editdlrm
segment-cache.js.map88230666editdlrm
static-generation-bailout.js4660666editdlrm
static-generation-bailout.js.map8770666editdlrm
unauthorized.js15700666editdlrm
unauthorized.js.map20200666editdlrm
unrecognized-action-error.js9230666editdlrm
unrecognized-action-error.js.map14780666editdlrm
unresolved-thenable.js2270666editdlrm
unresolved-thenable.js.map4410666editdlrm
unstable-rethrow.browser.js4330666editdlrm
unstable-rethrow.browser.js.map8410666editdlrm
unstable-rethrow.js7120666editdlrm
unstable-rethrow.js.map11120666editdlrm
unstable-rethrow.server.js8540666editdlrm
unstable-rethrow.server.js.map15660666editdlrm
use-action-queue.js19210666editdlrm
use-action-queue.js.map32730666editdlrm
Edit: /home/techb158/balavpn.abdallabala.com/node_modules/next/dist/esm/client/components/bfcache.js.map (6394B)
{"version":3,"sources":["../../../src/client/components/bfcache.ts"],"sourcesContent":["import type { FlightRouterState } from '../../server/app-render/types'\nimport { useState } from 'react'\n\n// When the flag is disabled, only track the currently active tree\nconst MAX_BF_CACHE_ENTRIES = process.env.__NEXT_ROUTER_BF_CACHE ? 3 : 1\n\nexport type RouterBFCacheEntry = {\n tree: FlightRouterState\n stateKey: string\n // The entries form a linked list, sorted in order of most recently active.\n next: RouterBFCacheEntry | null\n}\n\n/**\n * Keeps track of the most recent N trees (FlightRouterStates) that were active\n * at a certain segment level. E.g. for a segment \"/a/b/[param]\", this hook\n * tracks the last N param values that the router rendered for N.\n *\n * The result of this hook precisely determines the number and order of\n * trees that are rendered in parallel at their segment level.\n *\n * The purpose of this cache is to we can preserve the React and DOM state of\n * some number of inactive trees, by rendering them in an boundary.\n * That means it would not make sense for the the lifetime of the cache to be\n * any longer than the lifetime of the React tree; e.g. if the hook were\n * unmounted, then the React tree would be, too. So, we use React state to\n * manage it.\n *\n * Note that we don't store the RSC data for the cache entries in this hook —\n * the data for inactive segments is stored in the parent CacheNode, which\n * *does* have a longer lifetime than the React tree. This hook only determines\n * which of those trees should have their *state* preserved, by .\n */\nexport function useRouterBFCache(\n activeTree: FlightRouterState,\n activeStateKey: string\n): RouterBFCacheEntry {\n // The currently active entry. The entries form a linked list, sorted in\n // order of most recently active. This allows us to reuse parts of the list\n // without cloning, unless there's a reordering or removal.\n // TODO: Once we start tracking back/forward history at each route level,\n // we should use the history order instead. In other words, when traversing\n // to an existing entry as a result of a popstate event, we should maintain\n // the existing order instead of moving it to the front of the list. I think\n // an initial implementation of this could be to pass an incrementing id\n // to history.pushState/replaceState, then use that here for ordering.\n const [prevActiveEntry, setPrevActiveEntry] = useState(\n () => {\n const initialEntry: RouterBFCacheEntry = {\n tree: activeTree,\n stateKey: activeStateKey,\n next: null,\n }\n return initialEntry\n }\n )\n\n if (prevActiveEntry.tree === activeTree) {\n // Fast path. The active tree hasn't changed, so we can reuse the\n // existing state.\n return prevActiveEntry\n }\n\n // The route tree changed. Note that this doesn't mean that the tree changed\n // *at this level* — the change may be due to a child route. Either way, we\n // need to either add or update the router tree in the bfcache.\n //\n // The rest of the code looks more complicated than it actually is because we\n // can't mutate the state in place; we have to copy-on-write.\n\n // Create a new entry for the active cache key. This is the head of the new\n // linked list.\n const newActiveEntry: RouterBFCacheEntry = {\n tree: activeTree,\n stateKey: activeStateKey,\n next: null,\n }\n\n // We need to append the old list onto the new list. If the head of the new\n // list was already present in the cache, then we'll need to clone everything\n // that came before it. Then we can reuse the rest.\n let n = 1\n let oldEntry: RouterBFCacheEntry | null = prevActiveEntry\n let clonedEntry: RouterBFCacheEntry = newActiveEntry\n while (oldEntry !== null && n < MAX_BF_CACHE_ENTRIES) {\n if (oldEntry.stateKey === activeStateKey) {\n // Fast path. This entry in the old list that corresponds to the key that\n // is now active. We've already placed a clone of this entry at the front\n // of the new list. We can reuse the rest of the old list without cloning.\n // NOTE: We don't need to worry about eviction in this case because we\n // haven't increased the size of the cache, and we assume the max size\n // is constant across renders. If we were to change it to a dynamic limit,\n // then the implementation would need to account for that.\n clonedEntry.next = oldEntry.next\n break\n } else {\n // Clone the entry and append it to the list.\n n++\n const entry: RouterBFCacheEntry = {\n tree: oldEntry.tree,\n stateKey: oldEntry.stateKey,\n next: null,\n }\n clonedEntry.next = entry\n clonedEntry = entry\n }\n oldEntry = oldEntry.next\n }\n\n setPrevActiveEntry(newActiveEntry)\n return newActiveEntry\n}\n"],"names":["useState","MAX_BF_CACHE_ENTRIES","process","env","__NEXT_ROUTER_BF_CACHE","useRouterBFCache","activeTree","activeStateKey","prevActiveEntry","setPrevActiveEntry","initialEntry","tree","stateKey","next","newActiveEntry","n","oldEntry","clonedEntry","entry"],"mappings":"AACA,SAASA,QAAQ,QAAQ,QAAO;AAEhC,kEAAkE;AAClE,MAAMC,uBAAuBC,QAAQC,GAAG,CAACC,sBAAsB,GAAG,IAAI;AAStE;;;;;;;;;;;;;;;;;;;CAmBC,GACD,OAAO,SAASC,iBACdC,UAA6B,EAC7BC,cAAsB;IAEtB,wEAAwE;IACxE,2EAA2E;IAC3E,2DAA2D;IAC3D,yEAAyE;IACzE,2EAA2E;IAC3E,2EAA2E;IAC3E,4EAA4E;IAC5E,wEAAwE;IACxE,sEAAsE;IACtE,MAAM,CAACC,iBAAiBC,mBAAmB,GAAGT,SAC5C;QACE,MAAMU,eAAmC;YACvCC,MAAML;YACNM,UAAUL;YACVM,MAAM;QACR;QACA,OAAOH;IACT;IAGF,IAAIF,gBAAgBG,IAAI,KAAKL,YAAY;QACvC,iEAAiE;QACjE,kBAAkB;QAClB,OAAOE;IACT;IAEA,4EAA4E;IAC5E,2EAA2E;IAC3E,+DAA+D;IAC/D,EAAE;IACF,6EAA6E;IAC7E,6DAA6D;IAE7D,2EAA2E;IAC3E,eAAe;IACf,MAAMM,iBAAqC;QACzCH,MAAML;QACNM,UAAUL;QACVM,MAAM;IACR;IAEA,2EAA2E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