/opt/canhelp/node_modules/next/dist/client/components/router-reducer/reducers
NameSizeModeActions
find-head-in-cache.d.ts3020644editdlrm
find-head-in-cache.js25970644editdlrm
find-head-in-cache.js.map37260644editdlrm
get-segment-value.d.ts1350644editdlrm
get-segment-value.js6850644editdlrm
get-segment-value.js.map5080644editdlrm
has-interception-route-in-current-tree.d.ts1930644editdlrm
has-interception-route-in-current-tree.js15310644editdlrm
has-interception-route-in-current-tree.js.map16820644editdlrm
hmr-refresh-reducer.d.ts2920644editdlrm
hmr-refresh-reducer.js47380644editdlrm
hmr-refresh-reducer.js.map70910644editdlrm
navigate-reducer.d.ts5770644editdlrm
navigate-reducer.js215140644editdlrm
navigate-reducer.js.map299280644editdlrm
prefetch-reducer.d.ts5080644editdlrm
prefetch-reducer.js20150644editdlrm
prefetch-reducer.js.map23380644editdlrm
refresh-reducer.d.ts2040644editdlrm
refresh-reducer.js55940644editdlrm
refresh-reducer.js.map82410644editdlrm
restore-reducer.d.ts2040644editdlrm
restore-reducer.js25890644editdlrm
restore-reducer.js.map32880644editdlrm
server-action-reducer.d.ts2290644editdlrm
server-action-reducer.js152440644editdlrm
server-action-reducer.js.map233690644editdlrm
server-patch-reducer.d.ts2160644editdlrm
server-patch-reducer.js34220644editdlrm
server-patch-reducer.js.map48020644editdlrm
Edit: /opt/canhelp/node_modules/next/dist/client/components/router-reducer/reducers/find-head-in-cache.js (2597B)
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "findHeadInCache", { enumerable: true, get: function() { return findHeadInCache; } }); const _segment = require("../../../../shared/lib/segment"); const _createroutercachekey = require("../create-router-cache-key"); function findHeadInCache(cache, parallelRoutes) { return findHeadInCacheImpl(cache, parallelRoutes, '', ''); } function findHeadInCacheImpl(cache, parallelRoutes, keyPrefix, keyPrefixWithoutSearchParams) { const isLastItem = Object.keys(parallelRoutes).length === 0; if (isLastItem) { // Returns the entire Cache Node of the segment whose head we will render. return [ cache, keyPrefix, keyPrefixWithoutSearchParams ]; } // First try the 'children' parallel route if it exists // when starting from the "root", this corresponds with the main page component const parallelRoutesKeys = Object.keys(parallelRoutes).filter((key)=>key !== 'children'); // if we are at the root, we need to check the children slot first if ('children' in parallelRoutes) { parallelRoutesKeys.unshift('children'); } for (const key of parallelRoutesKeys){ const [segment, childParallelRoutes] = parallelRoutes[key]; // If the parallel is not matched and using the default segment, // skip searching the head from it. if (segment === _segment.DEFAULT_SEGMENT_KEY) { continue; } const childSegmentMap = cache.parallelRoutes.get(key); if (!childSegmentMap) { continue; } const cacheKey = (0, _createroutercachekey.createRouterCacheKey)(segment); const cacheKeyWithoutSearchParams = (0, _createroutercachekey.createRouterCacheKey)(segment, true); const cacheNode = childSegmentMap.get(cacheKey); if (!cacheNode) { continue; } const item = findHeadInCacheImpl(cacheNode, childParallelRoutes, keyPrefix + '/' + cacheKey, keyPrefix + '/' + cacheKeyWithoutSearchParams); if (item) { return item; } } 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=find-head-in-cache.js.map