Initial boiler plate project
This commit is contained in:
7
node_modules/next/dist/esm/shared/lib/amp-context.shared-runtime.js
generated
vendored
Normal file
7
node_modules/next/dist/esm/shared/lib/amp-context.shared-runtime.js
generated
vendored
Normal file
@ -0,0 +1,7 @@
|
||||
import React from "react";
|
||||
export const AmpStateContext = React.createContext({});
|
||||
if (process.env.NODE_ENV !== "production") {
|
||||
AmpStateContext.displayName = "AmpStateContext";
|
||||
}
|
||||
|
||||
//# sourceMappingURL=amp-context.shared-runtime.js.map
|
||||
1
node_modules/next/dist/esm/shared/lib/amp-context.shared-runtime.js.map
generated
vendored
Normal file
1
node_modules/next/dist/esm/shared/lib/amp-context.shared-runtime.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../src/shared/lib/amp-context.shared-runtime.ts"],"names":["React","AmpStateContext","createContext","process","env","NODE_ENV","displayName"],"mappings":"AAAA,OAAOA,WAAW,QAAO;AAEzB,OAAO,MAAMC,kBAAsCD,MAAME,aAAa,CAAC,CAAC,GAAE;AAE1E,IAAIC,QAAQC,GAAG,CAACC,QAAQ,KAAK,cAAc;IACzCJ,gBAAgBK,WAAW,GAAG;AAChC"}
|
||||
6
node_modules/next/dist/esm/shared/lib/amp-mode.js
generated
vendored
Normal file
6
node_modules/next/dist/esm/shared/lib/amp-mode.js
generated
vendored
Normal file
@ -0,0 +1,6 @@
|
||||
export function isInAmpMode(param) {
|
||||
let { ampFirst = false, hybrid = false, hasQuery = false } = param === void 0 ? {} : param;
|
||||
return ampFirst || hybrid && hasQuery;
|
||||
}
|
||||
|
||||
//# sourceMappingURL=amp-mode.js.map
|
||||
1
node_modules/next/dist/esm/shared/lib/amp-mode.js.map
generated
vendored
Normal file
1
node_modules/next/dist/esm/shared/lib/amp-mode.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../src/shared/lib/amp-mode.ts"],"names":["isInAmpMode","ampFirst","hybrid","hasQuery"],"mappings":"AAAA,OAAO,SAASA,YAAY;IAAA,IAAA,EAC1BC,WAAW,KAAK,EAChBC,SAAS,KAAK,EACdC,WAAW,KAAK,EACjB,GAJ2B,mBAIxB,CAAC,IAJuB;IAK1B,OAAOF,YAAaC,UAAUC;AAChC"}
|
||||
9
node_modules/next/dist/esm/shared/lib/amp.js
generated
vendored
Normal file
9
node_modules/next/dist/esm/shared/lib/amp.js
generated
vendored
Normal file
@ -0,0 +1,9 @@
|
||||
import React from "react";
|
||||
import { AmpStateContext } from "./amp-context.shared-runtime";
|
||||
import { isInAmpMode } from "./amp-mode";
|
||||
export function useAmp() {
|
||||
// Don't assign the context value to a variable to save bytes
|
||||
return isInAmpMode(React.useContext(AmpStateContext));
|
||||
}
|
||||
|
||||
//# sourceMappingURL=amp.js.map
|
||||
1
node_modules/next/dist/esm/shared/lib/amp.js.map
generated
vendored
Normal file
1
node_modules/next/dist/esm/shared/lib/amp.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../src/shared/lib/amp.ts"],"names":["React","AmpStateContext","isInAmpMode","useAmp","useContext"],"mappings":"AAAA,OAAOA,WAAW,QAAO;AACzB,SAASC,eAAe,QAAQ,+BAA8B;AAC9D,SAASC,WAAW,QAAQ,aAAY;AAExC,OAAO,SAASC;IACd,6DAA6D;IAC7D,OAAOD,YAAYF,MAAMI,UAAU,CAACH;AACtC"}
|
||||
41
node_modules/next/dist/esm/shared/lib/app-dynamic.js
generated
vendored
Normal file
41
node_modules/next/dist/esm/shared/lib/app-dynamic.js
generated
vendored
Normal file
@ -0,0 +1,41 @@
|
||||
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
||||
import React from "react";
|
||||
import Loadable from "./lazy-dynamic/loadable";
|
||||
export default function dynamic(dynamicOptions, options) {
|
||||
var _mergedOptions_loadableGenerated;
|
||||
let loadableOptions = {
|
||||
// A loading component is not required, so we default it
|
||||
loading: (param)=>{
|
||||
let { error, isLoading, pastDelay } = param;
|
||||
if (!pastDelay) return null;
|
||||
if (process.env.NODE_ENV !== "production") {
|
||||
if (isLoading) {
|
||||
return null;
|
||||
}
|
||||
if (error) {
|
||||
return /*#__PURE__*/ _jsxs("p", {
|
||||
children: [
|
||||
error.message,
|
||||
/*#__PURE__*/ _jsx("br", {}),
|
||||
error.stack
|
||||
]
|
||||
});
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
};
|
||||
if (typeof dynamicOptions === "function") {
|
||||
loadableOptions.loader = dynamicOptions;
|
||||
}
|
||||
const mergedOptions = {
|
||||
...loadableOptions,
|
||||
...options
|
||||
};
|
||||
return Loadable({
|
||||
...mergedOptions,
|
||||
modules: (_mergedOptions_loadableGenerated = mergedOptions.loadableGenerated) == null ? void 0 : _mergedOptions_loadableGenerated.modules
|
||||
});
|
||||
}
|
||||
|
||||
//# sourceMappingURL=app-dynamic.js.map
|
||||
1
node_modules/next/dist/esm/shared/lib/app-dynamic.js.map
generated
vendored
Normal file
1
node_modules/next/dist/esm/shared/lib/app-dynamic.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../src/shared/lib/app-dynamic.tsx"],"names":["React","Loadable","dynamic","dynamicOptions","options","mergedOptions","loadableOptions","loading","error","isLoading","pastDelay","process","env","NODE_ENV","p","message","br","stack","loader","modules","loadableGenerated"],"mappings":";AAAA,OAAOA,WAAW,QAAO;AACzB,OAAOC,cAAc,0BAAyB;AAgC9C,eAAe,SAASC,QACtBC,cAA6C,EAC7CC,OAA2B;QAmChBC;IAjCX,IAAIC,kBAAsC;QACxC,wDAAwD;QACxDC,SAAS;gBAAC,EAAEC,KAAK,EAAEC,SAAS,EAAEC,SAAS,EAAE;YACvC,IAAI,CAACA,WAAW,OAAO;YACvB,IAAIC,QAAQC,GAAG,CAACC,QAAQ,KAAK,cAAc;gBACzC,IAAIJ,WAAW;oBACb,OAAO;gBACT;gBACA,IAAID,OAAO;oBACT,qBACE,MAACM;;4BACEN,MAAMO,OAAO;0CACd,KAACC;4BACAR,MAAMS,KAAK;;;gBAGlB;YACF;YACA,OAAO;QACT;IACF;IAEA,IAAI,OAAOd,mBAAmB,YAAY;QACxCG,gBAAgBY,MAAM,GAAGf;IAC3B;IAEA,MAAME,gBAAgB;QACpB,GAAGC,eAAe;QAClB,GAAGF,OAAO;IACZ;IAEA,OAAOH,SAAS;QACd,GAAGI,aAAa;QAChBc,OAAO,GAAEd,mCAAAA,cAAce,iBAAiB,qBAA/Bf,iCAAiCc,OAAO;IACnD;AACF"}
|
||||
16
node_modules/next/dist/esm/shared/lib/app-router-context.shared-runtime.js
generated
vendored
Normal file
16
node_modules/next/dist/esm/shared/lib/app-router-context.shared-runtime.js
generated
vendored
Normal file
@ -0,0 +1,16 @@
|
||||
"use client";
|
||||
|
||||
import React from "react";
|
||||
export const AppRouterContext = React.createContext(null);
|
||||
export const LayoutRouterContext = React.createContext(null);
|
||||
export const GlobalLayoutRouterContext = React.createContext(null);
|
||||
export const TemplateContext = React.createContext(null);
|
||||
if (process.env.NODE_ENV !== "production") {
|
||||
AppRouterContext.displayName = "AppRouterContext";
|
||||
LayoutRouterContext.displayName = "LayoutRouterContext";
|
||||
GlobalLayoutRouterContext.displayName = "GlobalLayoutRouterContext";
|
||||
TemplateContext.displayName = "TemplateContext";
|
||||
}
|
||||
export const MissingSlotContext = React.createContext(new Set());
|
||||
|
||||
//# sourceMappingURL=app-router-context.shared-runtime.js.map
|
||||
1
node_modules/next/dist/esm/shared/lib/app-router-context.shared-runtime.js.map
generated
vendored
Normal file
1
node_modules/next/dist/esm/shared/lib/app-router-context.shared-runtime.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../src/shared/lib/app-router-context.shared-runtime.ts"],"names":["React","AppRouterContext","createContext","LayoutRouterContext","GlobalLayoutRouterContext","TemplateContext","process","env","NODE_ENV","displayName","MissingSlotContext","Set"],"mappings":"AAAA;AASA,OAAOA,WAAW,QAAO;AAiJzB,OAAO,MAAMC,mBAAmBD,MAAME,aAAa,CACjD,MACD;AACD,OAAO,MAAMC,sBAAsBH,MAAME,aAAa,CAK5C,MAAK;AAEf,OAAO,MAAME,4BAA4BJ,MAAME,aAAa,CAMzD,MAAY;AAEf,OAAO,MAAMG,kBAAkBL,MAAME,aAAa,CAAkB,MAAY;AAEhF,IAAII,QAAQC,GAAG,CAACC,QAAQ,KAAK,cAAc;IACzCP,iBAAiBQ,WAAW,GAAG;IAC/BN,oBAAoBM,WAAW,GAAG;IAClCL,0BAA0BK,WAAW,GAAG;IACxCJ,gBAAgBI,WAAW,GAAG;AAChC;AAEA,OAAO,MAAMC,qBAAqBV,MAAME,aAAa,CAAc,IAAIS,OAAM"}
|
||||
76
node_modules/next/dist/esm/shared/lib/bloom-filter.js
generated
vendored
Normal file
76
node_modules/next/dist/esm/shared/lib/bloom-filter.js
generated
vendored
Normal file
@ -0,0 +1,76 @@
|
||||
// minimal implementation MurmurHash2 hash function
|
||||
function murmurhash2(str) {
|
||||
let h = 0;
|
||||
for(let i = 0; i < str.length; i++){
|
||||
const c = str.charCodeAt(i);
|
||||
h = Math.imul(h ^ c, 0x5bd1e995);
|
||||
h ^= h >>> 13;
|
||||
h = Math.imul(h, 0x5bd1e995);
|
||||
}
|
||||
return h >>> 0;
|
||||
}
|
||||
// default to 0.01% error rate as the filter compresses very well
|
||||
const DEFAULT_ERROR_RATE = 0.0001;
|
||||
export class BloomFilter {
|
||||
static from(items, errorRate) {
|
||||
if (errorRate === void 0) errorRate = DEFAULT_ERROR_RATE;
|
||||
const filter = new BloomFilter(items.length, errorRate);
|
||||
for (const item of items){
|
||||
filter.add(item);
|
||||
}
|
||||
return filter;
|
||||
}
|
||||
export() {
|
||||
const data = {
|
||||
numItems: this.numItems,
|
||||
errorRate: this.errorRate,
|
||||
numBits: this.numBits,
|
||||
numHashes: this.numHashes,
|
||||
bitArray: this.bitArray
|
||||
};
|
||||
if (process.env.NEXT_RUNTIME === "nodejs") {
|
||||
if (this.errorRate < DEFAULT_ERROR_RATE) {
|
||||
const filterData = JSON.stringify(data);
|
||||
const gzipSize = require("next/dist/compiled/gzip-size").sync(filterData);
|
||||
if (gzipSize > 1024) {
|
||||
console.warn("Creating filter with error rate less than 0.1% (0.001) can increase the size dramatically proceed with caution. Received error rate " + this.errorRate + " resulted in size " + filterData.length + " bytes, " + gzipSize + " bytes (gzip)");
|
||||
}
|
||||
}
|
||||
}
|
||||
return data;
|
||||
}
|
||||
import(data) {
|
||||
this.numItems = data.numItems;
|
||||
this.errorRate = data.errorRate;
|
||||
this.numBits = data.numBits;
|
||||
this.numHashes = data.numHashes;
|
||||
this.bitArray = data.bitArray;
|
||||
}
|
||||
add(item) {
|
||||
const hashValues = this.getHashValues(item);
|
||||
hashValues.forEach((hash)=>{
|
||||
this.bitArray[hash] = 1;
|
||||
});
|
||||
}
|
||||
contains(item) {
|
||||
const hashValues = this.getHashValues(item);
|
||||
return hashValues.every((hash)=>this.bitArray[hash]);
|
||||
}
|
||||
getHashValues(item) {
|
||||
const hashValues = [];
|
||||
for(let i = 1; i <= this.numHashes; i++){
|
||||
const hash = murmurhash2("" + item + i) % this.numBits;
|
||||
hashValues.push(hash);
|
||||
}
|
||||
return hashValues;
|
||||
}
|
||||
constructor(numItems, errorRate = DEFAULT_ERROR_RATE){
|
||||
this.numItems = numItems;
|
||||
this.errorRate = errorRate;
|
||||
this.numBits = Math.ceil(-(numItems * Math.log(errorRate)) / (Math.log(2) * Math.log(2)));
|
||||
this.numHashes = Math.ceil(this.numBits / numItems * Math.log(2));
|
||||
this.bitArray = new Array(this.numBits).fill(0);
|
||||
}
|
||||
}
|
||||
|
||||
//# sourceMappingURL=bloom-filter.js.map
|
||||
1
node_modules/next/dist/esm/shared/lib/bloom-filter.js.map
generated
vendored
Normal file
1
node_modules/next/dist/esm/shared/lib/bloom-filter.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../src/shared/lib/bloom-filter.ts"],"names":["murmurhash2","str","h","i","length","c","charCodeAt","Math","imul","DEFAULT_ERROR_RATE","BloomFilter","from","items","errorRate","filter","item","add","export","data","numItems","numBits","numHashes","bitArray","process","env","NEXT_RUNTIME","filterData","JSON","stringify","gzipSize","require","sync","console","warn","import","hashValues","getHashValues","forEach","hash","contains","every","push","constructor","ceil","log","Array","fill"],"mappings":"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"}
|
||||
146
node_modules/next/dist/esm/shared/lib/constants.js
generated
vendored
Normal file
146
node_modules/next/dist/esm/shared/lib/constants.js
generated
vendored
Normal file
@ -0,0 +1,146 @@
|
||||
import MODERN_BROWSERSLIST_TARGET from "./modern-browserslist-target";
|
||||
export { MODERN_BROWSERSLIST_TARGET };
|
||||
export const COMPILER_NAMES = {
|
||||
client: "client",
|
||||
server: "server",
|
||||
edgeServer: "edge-server"
|
||||
};
|
||||
export const COMPILER_INDEXES = {
|
||||
[COMPILER_NAMES.client]: 0,
|
||||
[COMPILER_NAMES.server]: 1,
|
||||
[COMPILER_NAMES.edgeServer]: 2
|
||||
};
|
||||
export const UNDERSCORE_NOT_FOUND_ROUTE = "/_not-found";
|
||||
export const UNDERSCORE_NOT_FOUND_ROUTE_ENTRY = "" + UNDERSCORE_NOT_FOUND_ROUTE + "/page";
|
||||
export const PHASE_EXPORT = "phase-export";
|
||||
export const PHASE_PRODUCTION_BUILD = "phase-production-build";
|
||||
export const PHASE_PRODUCTION_SERVER = "phase-production-server";
|
||||
export const PHASE_DEVELOPMENT_SERVER = "phase-development-server";
|
||||
export const PHASE_TEST = "phase-test";
|
||||
export const PHASE_INFO = "phase-info";
|
||||
export const PAGES_MANIFEST = "pages-manifest.json";
|
||||
export const APP_PATHS_MANIFEST = "app-paths-manifest.json";
|
||||
export const APP_PATH_ROUTES_MANIFEST = "app-path-routes-manifest.json";
|
||||
export const BUILD_MANIFEST = "build-manifest.json";
|
||||
export const APP_BUILD_MANIFEST = "app-build-manifest.json";
|
||||
export const FUNCTIONS_CONFIG_MANIFEST = "functions-config-manifest.json";
|
||||
export const SUBRESOURCE_INTEGRITY_MANIFEST = "subresource-integrity-manifest";
|
||||
export const NEXT_FONT_MANIFEST = "next-font-manifest";
|
||||
export const EXPORT_MARKER = "export-marker.json";
|
||||
export const EXPORT_DETAIL = "export-detail.json";
|
||||
export const PRERENDER_MANIFEST = "prerender-manifest.json";
|
||||
export const ROUTES_MANIFEST = "routes-manifest.json";
|
||||
export const IMAGES_MANIFEST = "images-manifest.json";
|
||||
export const SERVER_FILES_MANIFEST = "required-server-files.json";
|
||||
export const DEV_CLIENT_PAGES_MANIFEST = "_devPagesManifest.json";
|
||||
export const MIDDLEWARE_MANIFEST = "middleware-manifest.json";
|
||||
export const DEV_MIDDLEWARE_MANIFEST = "_devMiddlewareManifest.json";
|
||||
export const REACT_LOADABLE_MANIFEST = "react-loadable-manifest.json";
|
||||
export const AUTOMATIC_FONT_OPTIMIZATION_MANIFEST = "font-manifest.json";
|
||||
export const SERVER_DIRECTORY = "server";
|
||||
export const CONFIG_FILES = [
|
||||
"next.config.js",
|
||||
"next.config.mjs"
|
||||
];
|
||||
export const BUILD_ID_FILE = "BUILD_ID";
|
||||
export const BLOCKED_PAGES = [
|
||||
"/_document",
|
||||
"/_app",
|
||||
"/_error"
|
||||
];
|
||||
export const CLIENT_PUBLIC_FILES_PATH = "public";
|
||||
export const CLIENT_STATIC_FILES_PATH = "static";
|
||||
export const STRING_LITERAL_DROP_BUNDLE = "__NEXT_DROP_CLIENT_FILE__";
|
||||
export const NEXT_BUILTIN_DOCUMENT = "__NEXT_BUILTIN_DOCUMENT__";
|
||||
export const BARREL_OPTIMIZATION_PREFIX = "__barrel_optimize__";
|
||||
// server/[entry]/page_client-reference-manifest.js
|
||||
export const CLIENT_REFERENCE_MANIFEST = "client-reference-manifest";
|
||||
// server/server-reference-manifest
|
||||
export const SERVER_REFERENCE_MANIFEST = "server-reference-manifest";
|
||||
// server/middleware-build-manifest.js
|
||||
export const MIDDLEWARE_BUILD_MANIFEST = "middleware-build-manifest";
|
||||
// server/middleware-react-loadable-manifest.js
|
||||
export const MIDDLEWARE_REACT_LOADABLE_MANIFEST = "middleware-react-loadable-manifest";
|
||||
// server/interception-route-rewrite-manifest.js
|
||||
export const INTERCEPTION_ROUTE_REWRITE_MANIFEST = "interception-route-rewrite-manifest";
|
||||
// static/runtime/main.js
|
||||
export const CLIENT_STATIC_FILES_RUNTIME_MAIN = "main";
|
||||
export const CLIENT_STATIC_FILES_RUNTIME_MAIN_APP = "" + CLIENT_STATIC_FILES_RUNTIME_MAIN + "-app";
|
||||
// next internal client components chunk for layouts
|
||||
export const APP_CLIENT_INTERNALS = "app-pages-internals";
|
||||
// static/runtime/react-refresh.js
|
||||
export const CLIENT_STATIC_FILES_RUNTIME_REACT_REFRESH = "react-refresh";
|
||||
// static/runtime/amp.js
|
||||
export const CLIENT_STATIC_FILES_RUNTIME_AMP = "amp";
|
||||
// static/runtime/webpack.js
|
||||
export const CLIENT_STATIC_FILES_RUNTIME_WEBPACK = "webpack";
|
||||
// static/runtime/polyfills.js
|
||||
export const CLIENT_STATIC_FILES_RUNTIME_POLYFILLS = "polyfills";
|
||||
export const CLIENT_STATIC_FILES_RUNTIME_POLYFILLS_SYMBOL = Symbol(CLIENT_STATIC_FILES_RUNTIME_POLYFILLS);
|
||||
export const DEFAULT_RUNTIME_WEBPACK = "webpack-runtime";
|
||||
export const EDGE_RUNTIME_WEBPACK = "edge-runtime-webpack";
|
||||
export const STATIC_PROPS_ID = "__N_SSG";
|
||||
export const SERVER_PROPS_ID = "__N_SSP";
|
||||
export const GOOGLE_FONT_PROVIDER = "https://fonts.googleapis.com/";
|
||||
export const OPTIMIZED_FONT_PROVIDERS = [
|
||||
{
|
||||
url: GOOGLE_FONT_PROVIDER,
|
||||
preconnect: "https://fonts.gstatic.com"
|
||||
},
|
||||
{
|
||||
url: "https://use.typekit.net",
|
||||
preconnect: "https://use.typekit.net"
|
||||
}
|
||||
];
|
||||
export const DEFAULT_SERIF_FONT = {
|
||||
name: "Times New Roman",
|
||||
xAvgCharWidth: 821,
|
||||
azAvgWidth: 854.3953488372093,
|
||||
unitsPerEm: 2048
|
||||
};
|
||||
export const DEFAULT_SANS_SERIF_FONT = {
|
||||
name: "Arial",
|
||||
xAvgCharWidth: 904,
|
||||
azAvgWidth: 934.5116279069767,
|
||||
unitsPerEm: 2048
|
||||
};
|
||||
export const STATIC_STATUS_PAGES = [
|
||||
"/500"
|
||||
];
|
||||
export const TRACE_OUTPUT_VERSION = 1;
|
||||
// in `MB`
|
||||
export const TURBO_TRACE_DEFAULT_MEMORY_LIMIT = 6000;
|
||||
export const RSC_MODULE_TYPES = {
|
||||
client: "client",
|
||||
server: "server"
|
||||
};
|
||||
// comparing
|
||||
// https://nextjs.org/docs/api-reference/edge-runtime
|
||||
// with
|
||||
// https://nodejs.org/docs/latest/api/globals.html
|
||||
export const EDGE_UNSUPPORTED_NODE_APIS = [
|
||||
"clearImmediate",
|
||||
"setImmediate",
|
||||
"BroadcastChannel",
|
||||
"ByteLengthQueuingStrategy",
|
||||
"CompressionStream",
|
||||
"CountQueuingStrategy",
|
||||
"DecompressionStream",
|
||||
"DomException",
|
||||
"MessageChannel",
|
||||
"MessageEvent",
|
||||
"MessagePort",
|
||||
"ReadableByteStreamController",
|
||||
"ReadableStreamBYOBRequest",
|
||||
"ReadableStreamDefaultController",
|
||||
"TransformStreamDefaultController",
|
||||
"WritableStreamDefaultController"
|
||||
];
|
||||
export const SYSTEM_ENTRYPOINTS = new Set([
|
||||
CLIENT_STATIC_FILES_RUNTIME_MAIN,
|
||||
CLIENT_STATIC_FILES_RUNTIME_REACT_REFRESH,
|
||||
CLIENT_STATIC_FILES_RUNTIME_AMP,
|
||||
CLIENT_STATIC_FILES_RUNTIME_MAIN_APP
|
||||
]);
|
||||
|
||||
//# sourceMappingURL=constants.js.map
|
||||
1
node_modules/next/dist/esm/shared/lib/constants.js.map
generated
vendored
Normal file
1
node_modules/next/dist/esm/shared/lib/constants.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../src/shared/lib/constants.ts"],"names":["MODERN_BROWSERSLIST_TARGET","COMPILER_NAMES","client","server","edgeServer","COMPILER_INDEXES","UNDERSCORE_NOT_FOUND_ROUTE","UNDERSCORE_NOT_FOUND_ROUTE_ENTRY","PHASE_EXPORT","PHASE_PRODUCTION_BUILD","PHASE_PRODUCTION_SERVER","PHASE_DEVELOPMENT_SERVER","PHASE_TEST","PHASE_INFO","PAGES_MANIFEST","APP_PATHS_MANIFEST","APP_PATH_ROUTES_MANIFEST","BUILD_MANIFEST","APP_BUILD_MANIFEST","FUNCTIONS_CONFIG_MANIFEST","SUBRESOURCE_INTEGRITY_MANIFEST","NEXT_FONT_MANIFEST","EXPORT_MARKER","EXPORT_DETAIL","PRERENDER_MANIFEST","ROUTES_MANIFEST","IMAGES_MANIFEST","SERVER_FILES_MANIFEST","DEV_CLIENT_PAGES_MANIFEST","MIDDLEWARE_MANIFEST","DEV_MIDDLEWARE_MANIFEST","REACT_LOADABLE_MANIFEST","AUTOMATIC_FONT_OPTIMIZATION_MANIFEST","SERVER_DIRECTORY","CONFIG_FILES","BUILD_ID_FILE","BLOCKED_PAGES","CLIENT_PUBLIC_FILES_PATH","CLIENT_STATIC_FILES_PATH","STRING_LITERAL_DROP_BUNDLE","NEXT_BUILTIN_DOCUMENT","BARREL_OPTIMIZATION_PREFIX","CLIENT_REFERENCE_MANIFEST","SERVER_REFERENCE_MANIFEST","MIDDLEWARE_BUILD_MANIFEST","MIDDLEWARE_REACT_LOADABLE_MANIFEST","INTERCEPTION_ROUTE_REWRITE_MANIFEST","CLIENT_STATIC_FILES_RUNTIME_MAIN","CLIENT_STATIC_FILES_RUNTIME_MAIN_APP","APP_CLIENT_INTERNALS","CLIENT_STATIC_FILES_RUNTIME_REACT_REFRESH","CLIENT_STATIC_FILES_RUNTIME_AMP","CLIENT_STATIC_FILES_RUNTIME_WEBPACK","CLIENT_STATIC_FILES_RUNTIME_POLYFILLS","CLIENT_STATIC_FILES_RUNTIME_POLYFILLS_SYMBOL","Symbol","DEFAULT_RUNTIME_WEBPACK","EDGE_RUNTIME_WEBPACK","STATIC_PROPS_ID","SERVER_PROPS_ID","GOOGLE_FONT_PROVIDER","OPTIMIZED_FONT_PROVIDERS","url","preconnect","DEFAULT_SERIF_FONT","name","xAvgCharWidth","azAvgWidth","unitsPerEm","DEFAULT_SANS_SERIF_FONT","STATIC_STATUS_PAGES","TRACE_OUTPUT_VERSION","TURBO_TRACE_DEFAULT_MEMORY_LIMIT","RSC_MODULE_TYPES","EDGE_UNSUPPORTED_NODE_APIS","SYSTEM_ENTRYPOINTS","Set"],"mappings":"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"}
|
||||
27
node_modules/next/dist/esm/shared/lib/deep-freeze.js
generated
vendored
Normal file
27
node_modules/next/dist/esm/shared/lib/deep-freeze.js
generated
vendored
Normal file
@ -0,0 +1,27 @@
|
||||
/**
|
||||
* Recursively freezes an object and all of its properties. This prevents the
|
||||
* object from being modified at runtime. When the JS runtime is running in
|
||||
* strict mode, any attempts to modify a frozen object will throw an error.
|
||||
*
|
||||
* @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/freeze
|
||||
* @param obj The object to freeze.
|
||||
*/ export function deepFreeze(obj) {
|
||||
// If the object is already frozen, there's no need to freeze it again.
|
||||
if (Object.isFrozen(obj)) return obj;
|
||||
// An array is an object, but we also want to freeze each element in the array
|
||||
// as well.
|
||||
if (Array.isArray(obj)) {
|
||||
for (const item of obj){
|
||||
if (!item || typeof item !== "object") continue;
|
||||
deepFreeze(item);
|
||||
}
|
||||
return Object.freeze(obj);
|
||||
}
|
||||
for (const value of Object.values(obj)){
|
||||
if (!value || typeof value !== "object") continue;
|
||||
deepFreeze(value);
|
||||
}
|
||||
return Object.freeze(obj);
|
||||
}
|
||||
|
||||
//# sourceMappingURL=deep-freeze.js.map
|
||||
1
node_modules/next/dist/esm/shared/lib/deep-freeze.js.map
generated
vendored
Normal file
1
node_modules/next/dist/esm/shared/lib/deep-freeze.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../src/shared/lib/deep-freeze.ts"],"names":["deepFreeze","obj","Object","isFrozen","Array","isArray","item","freeze","value","values"],"mappings":"AAEA;;;;;;;CAOC,GACD,OAAO,SAASA,WAA6BC,GAAM;IACjD,uEAAuE;IACvE,IAAIC,OAAOC,QAAQ,CAACF,MAAM,OAAOA;IAEjC,8EAA8E;IAC9E,WAAW;IACX,IAAIG,MAAMC,OAAO,CAACJ,MAAM;QACtB,KAAK,MAAMK,QAAQL,IAAK;YACtB,IAAI,CAACK,QAAQ,OAAOA,SAAS,UAAU;YACvCN,WAAWM;QACb;QAEA,OAAOJ,OAAOK,MAAM,CAACN;IACvB;IAEA,KAAK,MAAMO,SAASN,OAAOO,MAAM,CAACR,KAAM;QACtC,IAAI,CAACO,SAAS,OAAOA,UAAU,UAAU;QACzCR,WAAWQ;IACb;IAEA,OAAON,OAAOK,MAAM,CAACN;AACvB"}
|
||||
7
node_modules/next/dist/esm/shared/lib/deep-readonly.js
generated
vendored
Normal file
7
node_modules/next/dist/esm/shared/lib/deep-readonly.js
generated
vendored
Normal file
@ -0,0 +1,7 @@
|
||||
/**
|
||||
* A type that represents a deeply readonly object. This is similar to
|
||||
* TypeScript's `Readonly` type, but it recursively applies the `readonly`
|
||||
* modifier to all properties of an object and all elements of arrays.
|
||||
*/ export { };
|
||||
|
||||
//# sourceMappingURL=deep-readonly.js.map
|
||||
1
node_modules/next/dist/esm/shared/lib/deep-readonly.js.map
generated
vendored
Normal file
1
node_modules/next/dist/esm/shared/lib/deep-readonly.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../src/shared/lib/deep-readonly.ts"],"names":[],"mappings":"AAAA;;;;CAIC,GACD,WAMK"}
|
||||
102
node_modules/next/dist/esm/shared/lib/dynamic.js
generated
vendored
Normal file
102
node_modules/next/dist/esm/shared/lib/dynamic.js
generated
vendored
Normal file
@ -0,0 +1,102 @@
|
||||
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
||||
import React from "react";
|
||||
import Loadable from "./loadable.shared-runtime";
|
||||
const isServerSide = typeof window === "undefined";
|
||||
// Normalize loader to return the module as form { default: Component } for `React.lazy`.
|
||||
// Also for backward compatible since next/dynamic allows to resolve a component directly with loader
|
||||
// Client component reference proxy need to be converted to a module.
|
||||
function convertModule(mod) {
|
||||
return {
|
||||
default: (mod == null ? void 0 : mod.default) || mod
|
||||
};
|
||||
}
|
||||
export function noSSR(LoadableInitializer, loadableOptions) {
|
||||
// Removing webpack and modules means react-loadable won't try preloading
|
||||
delete loadableOptions.webpack;
|
||||
delete loadableOptions.modules;
|
||||
// This check is necessary to prevent react-loadable from initializing on the server
|
||||
if (!isServerSide) {
|
||||
return LoadableInitializer(loadableOptions);
|
||||
}
|
||||
const Loading = loadableOptions.loading;
|
||||
// This will only be rendered on the server side
|
||||
return ()=>/*#__PURE__*/ _jsx(Loading, {
|
||||
error: null,
|
||||
isLoading: true,
|
||||
pastDelay: false,
|
||||
timedOut: false
|
||||
});
|
||||
}
|
||||
/**
|
||||
* This function lets you dynamically import a component.
|
||||
* It uses [React.lazy()](https://react.dev/reference/react/lazy) with [Suspense](https://react.dev/reference/react/Suspense) under the hood.
|
||||
*
|
||||
* Read more: [Next.js Docs: `next/dynamic`](https://nextjs.org/docs/app/building-your-application/optimizing/lazy-loading#nextdynamic)
|
||||
*/ export default function dynamic(dynamicOptions, options) {
|
||||
let loadableFn = Loadable;
|
||||
let loadableOptions = {
|
||||
// A loading component is not required, so we default it
|
||||
loading: (param)=>{
|
||||
let { error, isLoading, pastDelay } = param;
|
||||
if (!pastDelay) return null;
|
||||
if (process.env.NODE_ENV !== "production") {
|
||||
if (isLoading) {
|
||||
return null;
|
||||
}
|
||||
if (error) {
|
||||
return /*#__PURE__*/ _jsxs("p", {
|
||||
children: [
|
||||
error.message,
|
||||
/*#__PURE__*/ _jsx("br", {}),
|
||||
error.stack
|
||||
]
|
||||
});
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
};
|
||||
// Support for direct import(), eg: dynamic(import('../hello-world'))
|
||||
// Note that this is only kept for the edge case where someone is passing in a promise as first argument
|
||||
// The react-loadable babel plugin will turn dynamic(import('../hello-world')) into dynamic(() => import('../hello-world'))
|
||||
// To make sure we don't execute the import without rendering first
|
||||
if (dynamicOptions instanceof Promise) {
|
||||
loadableOptions.loader = ()=>dynamicOptions;
|
||||
// Support for having import as a function, eg: dynamic(() => import('../hello-world'))
|
||||
} else if (typeof dynamicOptions === "function") {
|
||||
loadableOptions.loader = dynamicOptions;
|
||||
// Support for having first argument being options, eg: dynamic({loader: import('../hello-world')})
|
||||
} else if (typeof dynamicOptions === "object") {
|
||||
loadableOptions = {
|
||||
...loadableOptions,
|
||||
...dynamicOptions
|
||||
};
|
||||
}
|
||||
// Support for passing options, eg: dynamic(import('../hello-world'), {loading: () => <p>Loading something</p>})
|
||||
loadableOptions = {
|
||||
...loadableOptions,
|
||||
...options
|
||||
};
|
||||
const loaderFn = loadableOptions.loader;
|
||||
const loader = ()=>loaderFn != null ? loaderFn().then(convertModule) : Promise.resolve(convertModule(()=>null));
|
||||
// coming from build/babel/plugins/react-loadable-plugin.js
|
||||
if (loadableOptions.loadableGenerated) {
|
||||
loadableOptions = {
|
||||
...loadableOptions,
|
||||
...loadableOptions.loadableGenerated
|
||||
};
|
||||
delete loadableOptions.loadableGenerated;
|
||||
}
|
||||
// support for disabling server side rendering, eg: dynamic(() => import('../hello-world'), {ssr: false}).
|
||||
if (typeof loadableOptions.ssr === "boolean" && !loadableOptions.ssr) {
|
||||
delete loadableOptions.webpack;
|
||||
delete loadableOptions.modules;
|
||||
return noSSR(loadableFn, loadableOptions);
|
||||
}
|
||||
return loadableFn({
|
||||
...loadableOptions,
|
||||
loader: loader
|
||||
});
|
||||
}
|
||||
|
||||
//# sourceMappingURL=dynamic.js.map
|
||||
1
node_modules/next/dist/esm/shared/lib/dynamic.js.map
generated
vendored
Normal file
1
node_modules/next/dist/esm/shared/lib/dynamic.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../src/shared/lib/dynamic.tsx"],"names":["React","Loadable","isServerSide","window","convertModule","mod","default","noSSR","LoadableInitializer","loadableOptions","webpack","modules","Loading","loading","error","isLoading","pastDelay","timedOut","dynamic","dynamicOptions","options","loadableFn","process","env","NODE_ENV","p","message","br","stack","Promise","loader","loaderFn","then","resolve","loadableGenerated","ssr"],"mappings":";AAAA,OAAOA,WAAW,QAAO;AACzB,OAAOC,cAAc,4BAA2B;AAEhD,MAAMC,eAAe,OAAOC,WAAW;AA2BvC,yFAAyF;AACzF,qGAAqG;AACrG,qEAAqE;AACrE,SAASC,cAAiBC,GAAgD;IACxE,OAAO;QAAEC,SAAS,CAACD,uBAAD,AAACA,IAA4BC,OAAO,KAAID;IAAI;AAChE;AAqBA,OAAO,SAASE,MACdC,mBAAkC,EAClCC,eAAkC;IAElC,yEAAyE;IACzE,OAAOA,gBAAgBC,OAAO;IAC9B,OAAOD,gBAAgBE,OAAO;IAE9B,oFAAoF;IACpF,IAAI,CAACT,cAAc;QACjB,OAAOM,oBAAoBC;IAC7B;IAEA,MAAMG,UAAUH,gBAAgBI,OAAO;IACvC,gDAAgD;IAChD,OAAO,kBACL,KAACD;YAAQE,OAAO;YAAMC,SAAS;YAACC,WAAW;YAAOC,UAAU;;AAEhE;AAEA;;;;;CAKC,GACD,eAAe,SAASC,QACtBC,cAA6C,EAC7CC,OAA2B;IAE3B,IAAIC,aAAapB;IAEjB,IAAIQ,kBAAsC;QACxC,wDAAwD;QACxDI,SAAS;gBAAC,EAAEC,KAAK,EAAEC,SAAS,EAAEC,SAAS,EAAE;YACvC,IAAI,CAACA,WAAW,OAAO;YACvB,IAAIM,QAAQC,GAAG,CAACC,QAAQ,KAAK,cAAc;gBACzC,IAAIT,WAAW;oBACb,OAAO;gBACT;gBACA,IAAID,OAAO;oBACT,qBACE,MAACW;;4BACEX,MAAMY,OAAO;0CACd,KAACC;4BACAb,MAAMc,KAAK;;;gBAGlB;YACF;YACA,OAAO;QACT;IACF;IAEA,qEAAqE;IACrE,wGAAwG;IACxG,2HAA2H;IAC3H,mEAAmE;IACnE,IAAIT,0BAA0BU,SAAS;QACrCpB,gBAAgBqB,MAAM,GAAG,IAAMX;IAC/B,uFAAuF;IACzF,OAAO,IAAI,OAAOA,mBAAmB,YAAY;QAC/CV,gBAAgBqB,MAAM,GAAGX;IACzB,mGAAmG;IACrG,OAAO,IAAI,OAAOA,mBAAmB,UAAU;QAC7CV,kBAAkB;YAAE,GAAGA,eAAe;YAAE,GAAGU,cAAc;QAAC;IAC5D;IAEA,gHAAgH;IAChHV,kBAAkB;QAAE,GAAGA,eAAe;QAAE,GAAGW,OAAO;IAAC;IAEnD,MAAMW,WAAWtB,gBAAgBqB,MAAM;IACvC,MAAMA,SAAS,IACbC,YAAY,OACRA,WAAWC,IAAI,CAAC5B,iBAChByB,QAAQI,OAAO,CAAC7B,cAAc,IAAM;IAE1C,2DAA2D;IAC3D,IAAIK,gBAAgByB,iBAAiB,EAAE;QACrCzB,kBAAkB;YAChB,GAAGA,eAAe;YAClB,GAAGA,gBAAgByB,iBAAiB;QACtC;QACA,OAAOzB,gBAAgByB,iBAAiB;IAC1C;IAEA,0GAA0G;IAC1G,IAAI,OAAOzB,gBAAgB0B,GAAG,KAAK,aAAa,CAAC1B,gBAAgB0B,GAAG,EAAE;QACpE,OAAO1B,gBAAgBC,OAAO;QAC9B,OAAOD,gBAAgBE,OAAO;QAE9B,OAAOJ,MAAMc,YAAYZ;IAC3B;IAEA,OAAOY,WAAW;QAAE,GAAGZ,eAAe;QAAEqB,QAAQA;IAAoB;AACtE"}
|
||||
5
node_modules/next/dist/esm/shared/lib/encode-uri-path.js
generated
vendored
Normal file
5
node_modules/next/dist/esm/shared/lib/encode-uri-path.js
generated
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
export function encodeURIPath(file) {
|
||||
return file.split("/").map((p)=>encodeURIComponent(p)).join("/");
|
||||
}
|
||||
|
||||
//# sourceMappingURL=encode-uri-path.js.map
|
||||
1
node_modules/next/dist/esm/shared/lib/encode-uri-path.js.map
generated
vendored
Normal file
1
node_modules/next/dist/esm/shared/lib/encode-uri-path.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../src/shared/lib/encode-uri-path.ts"],"names":["encodeURIPath","file","split","map","p","encodeURIComponent","join"],"mappings":"AAAA,OAAO,SAASA,cAAcC,IAAY;IACxC,OAAOA,KACJC,KAAK,CAAC,KACNC,GAAG,CAAC,CAACC,IAAMC,mBAAmBD,IAC9BE,IAAI,CAAC;AACV"}
|
||||
14
node_modules/next/dist/esm/shared/lib/error-source.js
generated
vendored
Normal file
14
node_modules/next/dist/esm/shared/lib/error-source.js
generated
vendored
Normal file
@ -0,0 +1,14 @@
|
||||
const symbolError = Symbol.for("NextjsError");
|
||||
export function getErrorSource(error) {
|
||||
return error[symbolError] || null;
|
||||
}
|
||||
export function decorateServerError(error, type) {
|
||||
Object.defineProperty(error, symbolError, {
|
||||
writable: false,
|
||||
enumerable: false,
|
||||
configurable: false,
|
||||
value: type
|
||||
});
|
||||
}
|
||||
|
||||
//# sourceMappingURL=error-source.js.map
|
||||
1
node_modules/next/dist/esm/shared/lib/error-source.js.map
generated
vendored
Normal file
1
node_modules/next/dist/esm/shared/lib/error-source.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../src/shared/lib/error-source.ts"],"names":["symbolError","Symbol","for","getErrorSource","error","decorateServerError","type","Object","defineProperty","writable","enumerable","configurable","value"],"mappings":"AAAA,MAAMA,cAAcC,OAAOC,GAAG,CAAC;AAE/B,OAAO,SAASC,eAAeC,KAAY;IACzC,OAAO,AAACA,KAAa,CAACJ,YAAY,IAAI;AACxC;AAIA,OAAO,SAASK,oBAAoBD,KAAY,EAAEE,IAAqB;IACrEC,OAAOC,cAAc,CAACJ,OAAOJ,aAAa;QACxCS,UAAU;QACVC,YAAY;QACZC,cAAc;QACdC,OAAON;IACT;AACF"}
|
||||
12
node_modules/next/dist/esm/shared/lib/escape-regexp.js
generated
vendored
Normal file
12
node_modules/next/dist/esm/shared/lib/escape-regexp.js
generated
vendored
Normal file
@ -0,0 +1,12 @@
|
||||
// regexp is based on https://github.com/sindresorhus/escape-string-regexp
|
||||
const reHasRegExp = /[|\\{}()[\]^$+*?.-]/;
|
||||
const reReplaceRegExp = /[|\\{}()[\]^$+*?.-]/g;
|
||||
export function escapeStringRegexp(str) {
|
||||
// see also: https://github.com/lodash/lodash/blob/2da024c3b4f9947a48517639de7560457cd4ec6c/escapeRegExp.js#L23
|
||||
if (reHasRegExp.test(str)) {
|
||||
return str.replace(reReplaceRegExp, "\\$&");
|
||||
}
|
||||
return str;
|
||||
}
|
||||
|
||||
//# sourceMappingURL=escape-regexp.js.map
|
||||
1
node_modules/next/dist/esm/shared/lib/escape-regexp.js.map
generated
vendored
Normal file
1
node_modules/next/dist/esm/shared/lib/escape-regexp.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../src/shared/lib/escape-regexp.ts"],"names":["reHasRegExp","reReplaceRegExp","escapeStringRegexp","str","test","replace"],"mappings":"AAAA,0EAA0E;AAC1E,MAAMA,cAAc;AACpB,MAAMC,kBAAkB;AAExB,OAAO,SAASC,mBAAmBC,GAAW;IAC5C,+GAA+G;IAC/G,IAAIH,YAAYI,IAAI,CAACD,MAAM;QACzB,OAAOA,IAAIE,OAAO,CAACJ,iBAAiB;IACtC;IACA,OAAOE;AACT"}
|
||||
43
node_modules/next/dist/esm/shared/lib/fnv1a.js
generated
vendored
Normal file
43
node_modules/next/dist/esm/shared/lib/fnv1a.js
generated
vendored
Normal file
@ -0,0 +1,43 @@
|
||||
// source: https://github.com/sindresorhus/fnv1a
|
||||
// FNV_PRIMES and FNV_OFFSETS from
|
||||
// http://www.isthe.com/chongo/tech/comp/fnv/index.html#FNV-param
|
||||
/* eslint-disable @typescript-eslint/no-loss-of-precision */ const FNV_PRIMES = {
|
||||
32: BigInt(16777619),
|
||||
64: BigInt(1099511628211),
|
||||
128: BigInt(309485009821345068724781371),
|
||||
256: BigInt(374144419156711147060143317175368453031918731002211),
|
||||
512: BigInt(35835915874844867368919076489095108449946327955754392558399825615420669938882575126094039892345713852759),
|
||||
1024: BigInt(5016456510113118655434598811035278955030765345404790744303017523831112055108147451509157692220295382716162651878526895249385292291816524375083746691371804094271873160484737966720260389217684476157468082573)
|
||||
};
|
||||
const FNV_OFFSETS = {
|
||||
32: BigInt(2166136261),
|
||||
64: BigInt(14695981039346656037),
|
||||
128: BigInt(144066263297769815596495629667062367629),
|
||||
256: BigInt(100029257958052580907070968620625704837092796014241193945225284501741471925557),
|
||||
512: BigInt(9659303129496669498009435400716310466090418745672637896108374329434462657994582932197716438449813051892206539805784495328239340083876191928701583869517785),
|
||||
1024: BigInt(14197795064947621068722070641403218320880622795441933960878474914617582723252296732303717722150864096521202355549365628174669108571814760471015076148029755969804077320157692458563003215304957150157403644460363550505412711285966361610267868082893823963790439336411086884584107735010676915)
|
||||
};
|
||||
export default function fnv1a(inputString, param) {
|
||||
let { size = 32, seed = 0 } = param === void 0 ? {} : param;
|
||||
if (!FNV_PRIMES[size]) {
|
||||
throw new Error("The `size` option must be one of 32, 64, 128, 256, 512, or 1024");
|
||||
}
|
||||
let hash = FNV_OFFSETS[size] ^ BigInt(seed);
|
||||
const fnvPrime = FNV_PRIMES[size];
|
||||
// Handle Unicode code points > 0x7f
|
||||
let isUnicoded = false;
|
||||
for(let index = 0; index < inputString.length; index++){
|
||||
let characterCode = inputString.charCodeAt(index);
|
||||
// Non-ASCII characters trigger the Unicode escape logic
|
||||
if (characterCode > 0x7f && !isUnicoded) {
|
||||
inputString = unescape(encodeURIComponent(inputString));
|
||||
characterCode = inputString.charCodeAt(index);
|
||||
isUnicoded = true;
|
||||
}
|
||||
hash ^= BigInt(characterCode);
|
||||
hash = BigInt.asUintN(size, hash * fnvPrime);
|
||||
}
|
||||
return hash;
|
||||
}
|
||||
|
||||
//# sourceMappingURL=fnv1a.js.map
|
||||
1
node_modules/next/dist/esm/shared/lib/fnv1a.js.map
generated
vendored
Normal file
1
node_modules/next/dist/esm/shared/lib/fnv1a.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../src/shared/lib/fnv1a.ts"],"names":["FNV_PRIMES","BigInt","FNV_OFFSETS","fnv1a","inputString","size","seed","Error","hash","fnvPrime","isUnicoded","index","length","characterCode","charCodeAt","unescape","encodeURIComponent","asUintN"],"mappings":"AAAA,gDAAgD;AAChD,kCAAkC;AAClC,iEAAiE;AACjE,0DAA0D,GAE1D,MAAMA,aAAa;IACjB,IAAIC,OAAO;IACX,IAAIA,OAAO;IACX,KAAKA,OAAO;IACZ,KAAKA,OACH;IAEF,KAAKA,OACH;IAEF,MAAMA,OACJ;AAEJ;AAEA,MAAMC,cAAc;IAClB,IAAID,OAAO;IACX,IAAIA,OAAO;IACX,KAAKA,OAAO;IACZ,KAAKA,OACH;IAEF,KAAKA,OACH;IAEF,MAAMA,OACJ;AAEJ;AAEA,eAAe,SAASE,MACtBC,WAAmB,EACnB;IAAA,IAAA,EACEC,OAAO,EAAE,EACTC,OAAO,CAAC,EAIT,GAND,mBAMI,CAAC,IANL;IAQA,IAAI,CAACN,UAAU,CAACK,KAAK,EAAE;QACrB,MAAM,IAAIE,MACR;IAEJ;IAEA,IAAIC,OAAeN,WAAW,CAACG,KAAK,GAAGJ,OAAOK;IAC9C,MAAMG,WAAWT,UAAU,CAACK,KAAK;IAEjC,oCAAoC;IACpC,IAAIK,aAAa;IAEjB,IAAK,IAAIC,QAAQ,GAAGA,QAAQP,YAAYQ,MAAM,EAAED,QAAS;QACvD,IAAIE,gBAAgBT,YAAYU,UAAU,CAACH;QAE3C,wDAAwD;QACxD,IAAIE,gBAAgB,QAAQ,CAACH,YAAY;YACvCN,cAAcW,SAASC,mBAAmBZ;YAC1CS,gBAAgBT,YAAYU,UAAU,CAACH;YACvCD,aAAa;QACf;QAEAF,QAAQP,OAAOY;QACfL,OAAOP,OAAOgB,OAAO,CAACZ,MAAMG,OAAOC;IACrC;IAEA,OAAOD;AACT"}
|
||||
18
node_modules/next/dist/esm/shared/lib/get-hostname.js
generated
vendored
Normal file
18
node_modules/next/dist/esm/shared/lib/get-hostname.js
generated
vendored
Normal file
@ -0,0 +1,18 @@
|
||||
/**
|
||||
* Takes an object with a hostname property (like a parsed URL) and some
|
||||
* headers that may contain Host and returns the preferred hostname.
|
||||
* @param parsed An object containing a hostname property.
|
||||
* @param headers A dictionary with headers containing a `host`.
|
||||
*/ export function getHostname(parsed, headers) {
|
||||
// Get the hostname from the headers if it exists, otherwise use the parsed
|
||||
// hostname.
|
||||
let hostname;
|
||||
if ((headers == null ? void 0 : headers.host) && !Array.isArray(headers.host)) {
|
||||
hostname = headers.host.toString().split(":", 1)[0];
|
||||
} else if (parsed.hostname) {
|
||||
hostname = parsed.hostname;
|
||||
} else return;
|
||||
return hostname.toLowerCase();
|
||||
}
|
||||
|
||||
//# sourceMappingURL=get-hostname.js.map
|
||||
1
node_modules/next/dist/esm/shared/lib/get-hostname.js.map
generated
vendored
Normal file
1
node_modules/next/dist/esm/shared/lib/get-hostname.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../src/shared/lib/get-hostname.ts"],"names":["getHostname","parsed","headers","hostname","host","Array","isArray","toString","split","toLowerCase"],"mappings":"AAEA;;;;;CAKC,GACD,OAAO,SAASA,YACdC,MAAoC,EACpCC,OAA6B;IAE7B,2EAA2E;IAC3E,YAAY;IACZ,IAAIC;IACJ,IAAID,CAAAA,2BAAAA,QAASE,IAAI,KAAI,CAACC,MAAMC,OAAO,CAACJ,QAAQE,IAAI,GAAG;QACjDD,WAAWD,QAAQE,IAAI,CAACG,QAAQ,GAAGC,KAAK,CAAC,KAAK,EAAE,CAAC,EAAE;IACrD,OAAO,IAAIP,OAAOE,QAAQ,EAAE;QAC1BA,WAAWF,OAAOE,QAAQ;IAC5B,OAAO;IAEP,OAAOA,SAASM,WAAW;AAC7B"}
|
||||
442
node_modules/next/dist/esm/shared/lib/get-img-props.js
generated
vendored
Normal file
442
node_modules/next/dist/esm/shared/lib/get-img-props.js
generated
vendored
Normal file
@ -0,0 +1,442 @@
|
||||
import { warnOnce } from "./utils/warn-once";
|
||||
import { getImageBlurSvg } from "./image-blur-svg";
|
||||
import { imageConfigDefault } from "./image-config";
|
||||
const VALID_LOADING_VALUES = [
|
||||
"lazy",
|
||||
"eager",
|
||||
undefined
|
||||
];
|
||||
function isStaticRequire(src) {
|
||||
return src.default !== undefined;
|
||||
}
|
||||
function isStaticImageData(src) {
|
||||
return src.src !== undefined;
|
||||
}
|
||||
function isStaticImport(src) {
|
||||
return typeof src === "object" && (isStaticRequire(src) || isStaticImageData(src));
|
||||
}
|
||||
const allImgs = new Map();
|
||||
let perfObserver;
|
||||
function getInt(x) {
|
||||
if (typeof x === "undefined") {
|
||||
return x;
|
||||
}
|
||||
if (typeof x === "number") {
|
||||
return Number.isFinite(x) ? x : NaN;
|
||||
}
|
||||
if (typeof x === "string" && /^[0-9]+$/.test(x)) {
|
||||
return parseInt(x, 10);
|
||||
}
|
||||
return NaN;
|
||||
}
|
||||
function getWidths(param, width, sizes) {
|
||||
let { deviceSizes, allSizes } = param;
|
||||
if (sizes) {
|
||||
// Find all the "vw" percent sizes used in the sizes prop
|
||||
const viewportWidthRe = /(^|\s)(1?\d?\d)vw/g;
|
||||
const percentSizes = [];
|
||||
for(let match; match = viewportWidthRe.exec(sizes); match){
|
||||
percentSizes.push(parseInt(match[2]));
|
||||
}
|
||||
if (percentSizes.length) {
|
||||
const smallestRatio = Math.min(...percentSizes) * 0.01;
|
||||
return {
|
||||
widths: allSizes.filter((s)=>s >= deviceSizes[0] * smallestRatio),
|
||||
kind: "w"
|
||||
};
|
||||
}
|
||||
return {
|
||||
widths: allSizes,
|
||||
kind: "w"
|
||||
};
|
||||
}
|
||||
if (typeof width !== "number") {
|
||||
return {
|
||||
widths: deviceSizes,
|
||||
kind: "w"
|
||||
};
|
||||
}
|
||||
const widths = [
|
||||
...new Set(// > This means that most OLED screens that say they are 3x resolution,
|
||||
// > are actually 3x in the green color, but only 1.5x in the red and
|
||||
// > blue colors. Showing a 3x resolution image in the app vs a 2x
|
||||
// > resolution image will be visually the same, though the 3x image
|
||||
// > takes significantly more data. Even true 3x resolution screens are
|
||||
// > wasteful as the human eye cannot see that level of detail without
|
||||
// > something like a magnifying glass.
|
||||
// https://blog.twitter.com/engineering/en_us/topics/infrastructure/2019/capping-image-fidelity-on-ultra-high-resolution-devices.html
|
||||
[
|
||||
width,
|
||||
width * 2 /*, width * 3*/
|
||||
].map((w)=>allSizes.find((p)=>p >= w) || allSizes[allSizes.length - 1]))
|
||||
];
|
||||
return {
|
||||
widths,
|
||||
kind: "x"
|
||||
};
|
||||
}
|
||||
function generateImgAttrs(param) {
|
||||
let { config, src, unoptimized, width, quality, sizes, loader } = param;
|
||||
if (unoptimized) {
|
||||
return {
|
||||
src,
|
||||
srcSet: undefined,
|
||||
sizes: undefined
|
||||
};
|
||||
}
|
||||
const { widths, kind } = getWidths(config, width, sizes);
|
||||
const last = widths.length - 1;
|
||||
return {
|
||||
sizes: !sizes && kind === "w" ? "100vw" : sizes,
|
||||
srcSet: widths.map((w, i)=>loader({
|
||||
config,
|
||||
src,
|
||||
quality,
|
||||
width: w
|
||||
}) + " " + (kind === "w" ? w : i + 1) + kind).join(", "),
|
||||
// It's intended to keep `src` the last attribute because React updates
|
||||
// attributes in order. If we keep `src` the first one, Safari will
|
||||
// immediately start to fetch `src`, before `sizes` and `srcSet` are even
|
||||
// updated by React. That causes multiple unnecessary requests if `srcSet`
|
||||
// and `sizes` are defined.
|
||||
// This bug cannot be reproduced in Chrome or Firefox.
|
||||
src: loader({
|
||||
config,
|
||||
src,
|
||||
quality,
|
||||
width: widths[last]
|
||||
})
|
||||
};
|
||||
}
|
||||
/**
|
||||
* A shared function, used on both client and server, to generate the props for <img>.
|
||||
*/ export function getImgProps(param, _state) {
|
||||
let { src, sizes, unoptimized = false, priority = false, loading, className, quality, width, height, fill = false, style, overrideSrc, onLoad, onLoadingComplete, placeholder = "empty", blurDataURL, fetchPriority, layout, objectFit, objectPosition, lazyBoundary, lazyRoot, ...rest } = param;
|
||||
const { imgConf, showAltText, blurComplete, defaultLoader } = _state;
|
||||
let config;
|
||||
let c = imgConf || imageConfigDefault;
|
||||
if ("allSizes" in c) {
|
||||
config = c;
|
||||
} else {
|
||||
const allSizes = [
|
||||
...c.deviceSizes,
|
||||
...c.imageSizes
|
||||
].sort((a, b)=>a - b);
|
||||
const deviceSizes = c.deviceSizes.sort((a, b)=>a - b);
|
||||
config = {
|
||||
...c,
|
||||
allSizes,
|
||||
deviceSizes
|
||||
};
|
||||
}
|
||||
if (typeof defaultLoader === "undefined") {
|
||||
throw new Error("images.loaderFile detected but the file is missing default export.\nRead more: https://nextjs.org/docs/messages/invalid-images-config");
|
||||
}
|
||||
let loader = rest.loader || defaultLoader;
|
||||
// Remove property so it's not spread on <img> element
|
||||
delete rest.loader;
|
||||
delete rest.srcSet;
|
||||
// This special value indicates that the user
|
||||
// didn't define a "loader" prop or "loader" config.
|
||||
const isDefaultLoader = "__next_img_default" in loader;
|
||||
if (isDefaultLoader) {
|
||||
if (config.loader === "custom") {
|
||||
throw new Error('Image with src "' + src + '" is missing "loader" prop.' + "\nRead more: https://nextjs.org/docs/messages/next-image-missing-loader");
|
||||
}
|
||||
} else {
|
||||
// The user defined a "loader" prop or config.
|
||||
// Since the config object is internal only, we
|
||||
// must not pass it to the user-defined "loader".
|
||||
const customImageLoader = loader;
|
||||
loader = (obj)=>{
|
||||
const { config: _, ...opts } = obj;
|
||||
return customImageLoader(opts);
|
||||
};
|
||||
}
|
||||
if (layout) {
|
||||
if (layout === "fill") {
|
||||
fill = true;
|
||||
}
|
||||
const layoutToStyle = {
|
||||
intrinsic: {
|
||||
maxWidth: "100%",
|
||||
height: "auto"
|
||||
},
|
||||
responsive: {
|
||||
width: "100%",
|
||||
height: "auto"
|
||||
}
|
||||
};
|
||||
const layoutToSizes = {
|
||||
responsive: "100vw",
|
||||
fill: "100vw"
|
||||
};
|
||||
const layoutStyle = layoutToStyle[layout];
|
||||
if (layoutStyle) {
|
||||
style = {
|
||||
...style,
|
||||
...layoutStyle
|
||||
};
|
||||
}
|
||||
const layoutSizes = layoutToSizes[layout];
|
||||
if (layoutSizes && !sizes) {
|
||||
sizes = layoutSizes;
|
||||
}
|
||||
}
|
||||
let staticSrc = "";
|
||||
let widthInt = getInt(width);
|
||||
let heightInt = getInt(height);
|
||||
let blurWidth;
|
||||
let blurHeight;
|
||||
if (isStaticImport(src)) {
|
||||
const staticImageData = isStaticRequire(src) ? src.default : src;
|
||||
if (!staticImageData.src) {
|
||||
throw new Error("An object should only be passed to the image component src parameter if it comes from a static image import. It must include src. Received " + JSON.stringify(staticImageData));
|
||||
}
|
||||
if (!staticImageData.height || !staticImageData.width) {
|
||||
throw new Error("An object should only be passed to the image component src parameter if it comes from a static image import. It must include height and width. Received " + JSON.stringify(staticImageData));
|
||||
}
|
||||
blurWidth = staticImageData.blurWidth;
|
||||
blurHeight = staticImageData.blurHeight;
|
||||
blurDataURL = blurDataURL || staticImageData.blurDataURL;
|
||||
staticSrc = staticImageData.src;
|
||||
if (!fill) {
|
||||
if (!widthInt && !heightInt) {
|
||||
widthInt = staticImageData.width;
|
||||
heightInt = staticImageData.height;
|
||||
} else if (widthInt && !heightInt) {
|
||||
const ratio = widthInt / staticImageData.width;
|
||||
heightInt = Math.round(staticImageData.height * ratio);
|
||||
} else if (!widthInt && heightInt) {
|
||||
const ratio = heightInt / staticImageData.height;
|
||||
widthInt = Math.round(staticImageData.width * ratio);
|
||||
}
|
||||
}
|
||||
}
|
||||
src = typeof src === "string" ? src : staticSrc;
|
||||
let isLazy = !priority && (loading === "lazy" || typeof loading === "undefined");
|
||||
if (!src || src.startsWith("data:") || src.startsWith("blob:")) {
|
||||
// https://developer.mozilla.org/docs/Web/HTTP/Basics_of_HTTP/Data_URIs
|
||||
unoptimized = true;
|
||||
isLazy = false;
|
||||
}
|
||||
if (config.unoptimized) {
|
||||
unoptimized = true;
|
||||
}
|
||||
if (isDefaultLoader && src.endsWith(".svg") && !config.dangerouslyAllowSVG) {
|
||||
// Special case to make svg serve as-is to avoid proxying
|
||||
// through the built-in Image Optimization API.
|
||||
unoptimized = true;
|
||||
}
|
||||
if (priority) {
|
||||
fetchPriority = "high";
|
||||
}
|
||||
const qualityInt = getInt(quality);
|
||||
if (process.env.NODE_ENV !== "production") {
|
||||
if (config.output === "export" && isDefaultLoader && !unoptimized) {
|
||||
throw new Error("Image Optimization using the default loader is not compatible with `{ output: 'export' }`.\n Possible solutions:\n - Remove `{ output: 'export' }` and run \"next start\" to run server mode including the Image Optimization API.\n - Configure `{ images: { unoptimized: true } }` in `next.config.js` to disable the Image Optimization API.\n Read more: https://nextjs.org/docs/messages/export-image-api");
|
||||
}
|
||||
if (!src) {
|
||||
// React doesn't show the stack trace and there's
|
||||
// no `src` to help identify which image, so we
|
||||
// instead console.error(ref) during mount.
|
||||
unoptimized = true;
|
||||
} else {
|
||||
if (fill) {
|
||||
if (width) {
|
||||
throw new Error('Image with src "' + src + '" has both "width" and "fill" properties. Only one should be used.');
|
||||
}
|
||||
if (height) {
|
||||
throw new Error('Image with src "' + src + '" has both "height" and "fill" properties. Only one should be used.');
|
||||
}
|
||||
if ((style == null ? void 0 : style.position) && style.position !== "absolute") {
|
||||
throw new Error('Image with src "' + src + '" has both "fill" and "style.position" properties. Images with "fill" always use position absolute - it cannot be modified.');
|
||||
}
|
||||
if ((style == null ? void 0 : style.width) && style.width !== "100%") {
|
||||
throw new Error('Image with src "' + src + '" has both "fill" and "style.width" properties. Images with "fill" always use width 100% - it cannot be modified.');
|
||||
}
|
||||
if ((style == null ? void 0 : style.height) && style.height !== "100%") {
|
||||
throw new Error('Image with src "' + src + '" has both "fill" and "style.height" properties. Images with "fill" always use height 100% - it cannot be modified.');
|
||||
}
|
||||
} else {
|
||||
if (typeof widthInt === "undefined") {
|
||||
throw new Error('Image with src "' + src + '" is missing required "width" property.');
|
||||
} else if (isNaN(widthInt)) {
|
||||
throw new Error('Image with src "' + src + '" has invalid "width" property. Expected a numeric value in pixels but received "' + width + '".');
|
||||
}
|
||||
if (typeof heightInt === "undefined") {
|
||||
throw new Error('Image with src "' + src + '" is missing required "height" property.');
|
||||
} else if (isNaN(heightInt)) {
|
||||
throw new Error('Image with src "' + src + '" has invalid "height" property. Expected a numeric value in pixels but received "' + height + '".');
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!VALID_LOADING_VALUES.includes(loading)) {
|
||||
throw new Error('Image with src "' + src + '" has invalid "loading" property. Provided "' + loading + '" should be one of ' + VALID_LOADING_VALUES.map(String).join(",") + ".");
|
||||
}
|
||||
if (priority && loading === "lazy") {
|
||||
throw new Error('Image with src "' + src + '" has both "priority" and "loading=\'lazy\'" properties. Only one should be used.');
|
||||
}
|
||||
if (placeholder !== "empty" && placeholder !== "blur" && !placeholder.startsWith("data:image/")) {
|
||||
throw new Error('Image with src "' + src + '" has invalid "placeholder" property "' + placeholder + '".');
|
||||
}
|
||||
if (placeholder !== "empty") {
|
||||
if (widthInt && heightInt && widthInt * heightInt < 1600) {
|
||||
warnOnce('Image with src "' + src + '" is smaller than 40x40. Consider removing the "placeholder" property to improve performance.');
|
||||
}
|
||||
}
|
||||
if (placeholder === "blur" && !blurDataURL) {
|
||||
const VALID_BLUR_EXT = [
|
||||
"jpeg",
|
||||
"png",
|
||||
"webp",
|
||||
"avif"
|
||||
] // should match next-image-loader
|
||||
;
|
||||
throw new Error('Image with src "' + src + '" has "placeholder=\'blur\'" property but is missing the "blurDataURL" property.\n Possible solutions:\n - Add a "blurDataURL" property, the contents should be a small Data URL to represent the image\n - Change the "src" property to a static import with one of the supported file types: ' + VALID_BLUR_EXT.join(",") + ' (animated images not supported)\n - Remove the "placeholder" property, effectively no blur effect\n Read more: https://nextjs.org/docs/messages/placeholder-blur-data-url');
|
||||
}
|
||||
if ("ref" in rest) {
|
||||
warnOnce('Image with src "' + src + '" is using unsupported "ref" property. Consider using the "onLoad" property instead.');
|
||||
}
|
||||
if (!unoptimized && !isDefaultLoader) {
|
||||
const urlStr = loader({
|
||||
config,
|
||||
src,
|
||||
width: widthInt || 400,
|
||||
quality: qualityInt || 75
|
||||
});
|
||||
let url;
|
||||
try {
|
||||
url = new URL(urlStr);
|
||||
} catch (err) {}
|
||||
if (urlStr === src || url && url.pathname === src && !url.search) {
|
||||
warnOnce('Image with src "' + src + '" has a "loader" property that does not implement width. Please implement it or use the "unoptimized" property instead.' + "\nRead more: https://nextjs.org/docs/messages/next-image-missing-loader-width");
|
||||
}
|
||||
}
|
||||
if (onLoadingComplete) {
|
||||
warnOnce('Image with src "' + src + '" is using deprecated "onLoadingComplete" property. Please use the "onLoad" property instead.');
|
||||
}
|
||||
for (const [legacyKey, legacyValue] of Object.entries({
|
||||
layout,
|
||||
objectFit,
|
||||
objectPosition,
|
||||
lazyBoundary,
|
||||
lazyRoot
|
||||
})){
|
||||
if (legacyValue) {
|
||||
warnOnce('Image with src "' + src + '" has legacy prop "' + legacyKey + '". Did you forget to run the codemod?' + "\nRead more: https://nextjs.org/docs/messages/next-image-upgrade-to-13");
|
||||
}
|
||||
}
|
||||
if (typeof window !== "undefined" && !perfObserver && window.PerformanceObserver) {
|
||||
perfObserver = new PerformanceObserver((entryList)=>{
|
||||
for (const entry of entryList.getEntries()){
|
||||
var _entry_element;
|
||||
// @ts-ignore - missing "LargestContentfulPaint" class with "element" prop
|
||||
const imgSrc = (entry == null ? void 0 : (_entry_element = entry.element) == null ? void 0 : _entry_element.src) || "";
|
||||
const lcpImage = allImgs.get(imgSrc);
|
||||
if (lcpImage && !lcpImage.priority && lcpImage.placeholder === "empty" && !lcpImage.src.startsWith("data:") && !lcpImage.src.startsWith("blob:")) {
|
||||
// https://web.dev/lcp/#measure-lcp-in-javascript
|
||||
warnOnce('Image with src "' + lcpImage.src + '" was detected as the Largest Contentful Paint (LCP). Please add the "priority" property if this image is above the fold.' + "\nRead more: https://nextjs.org/docs/api-reference/next/image#priority");
|
||||
}
|
||||
}
|
||||
});
|
||||
try {
|
||||
perfObserver.observe({
|
||||
type: "largest-contentful-paint",
|
||||
buffered: true
|
||||
});
|
||||
} catch (err) {
|
||||
// Log error but don't crash the app
|
||||
console.error(err);
|
||||
}
|
||||
}
|
||||
}
|
||||
const imgStyle = Object.assign(fill ? {
|
||||
position: "absolute",
|
||||
height: "100%",
|
||||
width: "100%",
|
||||
left: 0,
|
||||
top: 0,
|
||||
right: 0,
|
||||
bottom: 0,
|
||||
objectFit,
|
||||
objectPosition
|
||||
} : {}, showAltText ? {} : {
|
||||
color: "transparent"
|
||||
}, style);
|
||||
const backgroundImage = !blurComplete && placeholder !== "empty" ? placeholder === "blur" ? 'url("data:image/svg+xml;charset=utf-8,' + getImageBlurSvg({
|
||||
widthInt,
|
||||
heightInt,
|
||||
blurWidth,
|
||||
blurHeight,
|
||||
blurDataURL: blurDataURL || "",
|
||||
objectFit: imgStyle.objectFit
|
||||
}) + '")' : 'url("' + placeholder + '")' // assume `data:image/`
|
||||
: null;
|
||||
let placeholderStyle = backgroundImage ? {
|
||||
backgroundSize: imgStyle.objectFit || "cover",
|
||||
backgroundPosition: imgStyle.objectPosition || "50% 50%",
|
||||
backgroundRepeat: "no-repeat",
|
||||
backgroundImage
|
||||
} : {};
|
||||
if (process.env.NODE_ENV === "development") {
|
||||
if (placeholderStyle.backgroundImage && placeholder === "blur" && (blurDataURL == null ? void 0 : blurDataURL.startsWith("/"))) {
|
||||
// During `next dev`, we don't want to generate blur placeholders with webpack
|
||||
// because it can delay starting the dev server. Instead, `next-image-loader.js`
|
||||
// will inline a special url to lazily generate the blur placeholder at request time.
|
||||
placeholderStyle.backgroundImage = 'url("' + blurDataURL + '")';
|
||||
}
|
||||
}
|
||||
const imgAttributes = generateImgAttrs({
|
||||
config,
|
||||
src,
|
||||
unoptimized,
|
||||
width: widthInt,
|
||||
quality: qualityInt,
|
||||
sizes,
|
||||
loader
|
||||
});
|
||||
if (process.env.NODE_ENV !== "production") {
|
||||
if (typeof window !== "undefined") {
|
||||
let fullUrl;
|
||||
try {
|
||||
fullUrl = new URL(imgAttributes.src);
|
||||
} catch (e) {
|
||||
fullUrl = new URL(imgAttributes.src, window.location.href);
|
||||
}
|
||||
allImgs.set(fullUrl.href, {
|
||||
src,
|
||||
priority,
|
||||
placeholder
|
||||
});
|
||||
}
|
||||
}
|
||||
const props = {
|
||||
...rest,
|
||||
loading: isLazy ? "lazy" : loading,
|
||||
fetchPriority,
|
||||
width: widthInt,
|
||||
height: heightInt,
|
||||
decoding: "async",
|
||||
className,
|
||||
style: {
|
||||
...imgStyle,
|
||||
...placeholderStyle
|
||||
},
|
||||
sizes: imgAttributes.sizes,
|
||||
srcSet: imgAttributes.srcSet,
|
||||
src: overrideSrc || imgAttributes.src
|
||||
};
|
||||
const meta = {
|
||||
unoptimized,
|
||||
priority,
|
||||
placeholder,
|
||||
fill
|
||||
};
|
||||
return {
|
||||
props,
|
||||
meta
|
||||
};
|
||||
}
|
||||
|
||||
//# sourceMappingURL=get-img-props.js.map
|
||||
1
node_modules/next/dist/esm/shared/lib/get-img-props.js.map
generated
vendored
Normal file
1
node_modules/next/dist/esm/shared/lib/get-img-props.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
20
node_modules/next/dist/esm/shared/lib/hash.js
generated
vendored
Normal file
20
node_modules/next/dist/esm/shared/lib/hash.js
generated
vendored
Normal file
@ -0,0 +1,20 @@
|
||||
// http://www.cse.yorku.ca/~oz/hash.html
|
||||
// More specifically, 32-bit hash via djbxor
|
||||
// (ref: https://gist.github.com/eplawless/52813b1d8ad9af510d85?permalink_comment_id=3367765#gistcomment-3367765)
|
||||
// This is due to number type differences between rust for turbopack to js number types,
|
||||
// where rust does not have easy way to repreesnt js's 53-bit float number type for the matching
|
||||
// overflow behavior. This is more `correct` in terms of having canonical hash across different runtime / implementation
|
||||
// as can gaurantee determinstic output from 32bit hash.
|
||||
export function djb2Hash(str) {
|
||||
let hash = 5381;
|
||||
for(let i = 0; i < str.length; i++){
|
||||
const char = str.charCodeAt(i);
|
||||
hash = (hash << 5) + hash + char & 0xffffffff;
|
||||
}
|
||||
return hash >>> 0;
|
||||
}
|
||||
export function hexHash(str) {
|
||||
return djb2Hash(str).toString(36).slice(0, 5);
|
||||
}
|
||||
|
||||
//# sourceMappingURL=hash.js.map
|
||||
1
node_modules/next/dist/esm/shared/lib/hash.js.map
generated
vendored
Normal file
1
node_modules/next/dist/esm/shared/lib/hash.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../src/shared/lib/hash.ts"],"names":["djb2Hash","str","hash","i","length","char","charCodeAt","hexHash","toString","slice"],"mappings":"AAAA,wCAAwC;AACxC,4CAA4C;AAC5C,iHAAiH;AACjH,wFAAwF;AACxF,gGAAgG;AAChG,wHAAwH;AACxH,wDAAwD;AACxD,OAAO,SAASA,SAASC,GAAW;IAClC,IAAIC,OAAO;IACX,IAAK,IAAIC,IAAI,GAAGA,IAAIF,IAAIG,MAAM,EAAED,IAAK;QACnC,MAAME,OAAOJ,IAAIK,UAAU,CAACH;QAC5BD,OAAO,AAAEA,CAAAA,QAAQ,CAAA,IAAKA,OAAOG,OAAQ;IACvC;IACA,OAAOH,SAAS;AAClB;AAEA,OAAO,SAASK,QAAQN,GAAW;IACjC,OAAOD,SAASC,KAAKO,QAAQ,CAAC,IAAIC,KAAK,CAAC,GAAG;AAC7C"}
|
||||
7
node_modules/next/dist/esm/shared/lib/head-manager-context.shared-runtime.js
generated
vendored
Normal file
7
node_modules/next/dist/esm/shared/lib/head-manager-context.shared-runtime.js
generated
vendored
Normal file
@ -0,0 +1,7 @@
|
||||
import React from "react";
|
||||
export const HeadManagerContext = React.createContext({});
|
||||
if (process.env.NODE_ENV !== "production") {
|
||||
HeadManagerContext.displayName = "HeadManagerContext";
|
||||
}
|
||||
|
||||
//# sourceMappingURL=head-manager-context.shared-runtime.js.map
|
||||
1
node_modules/next/dist/esm/shared/lib/head-manager-context.shared-runtime.js.map
generated
vendored
Normal file
1
node_modules/next/dist/esm/shared/lib/head-manager-context.shared-runtime.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../src/shared/lib/head-manager-context.shared-runtime.ts"],"names":["React","HeadManagerContext","createContext","process","env","NODE_ENV","displayName"],"mappings":"AAAA,OAAOA,WAAW,QAAO;AAEzB,OAAO,MAAMC,qBAURD,MAAME,aAAa,CAAC,CAAC,GAAE;AAE5B,IAAIC,QAAQC,GAAG,CAACC,QAAQ,KAAK,cAAc;IACzCJ,mBAAmBK,WAAW,GAAG;AACnC"}
|
||||
159
node_modules/next/dist/esm/shared/lib/head.js
generated
vendored
Normal file
159
node_modules/next/dist/esm/shared/lib/head.js
generated
vendored
Normal file
@ -0,0 +1,159 @@
|
||||
"use client";
|
||||
|
||||
import { jsx as _jsx } from "react/jsx-runtime";
|
||||
import React, { useContext } from "react";
|
||||
import Effect from "./side-effect";
|
||||
import { AmpStateContext } from "./amp-context.shared-runtime";
|
||||
import { HeadManagerContext } from "./head-manager-context.shared-runtime";
|
||||
import { isInAmpMode } from "./amp-mode";
|
||||
import { warnOnce } from "./utils/warn-once";
|
||||
export function defaultHead(inAmpMode) {
|
||||
if (inAmpMode === void 0) inAmpMode = false;
|
||||
const head = [
|
||||
/*#__PURE__*/ _jsx("meta", {
|
||||
charSet: "utf-8"
|
||||
})
|
||||
];
|
||||
if (!inAmpMode) {
|
||||
head.push(/*#__PURE__*/ _jsx("meta", {
|
||||
name: "viewport",
|
||||
content: "width=device-width"
|
||||
}));
|
||||
}
|
||||
return head;
|
||||
}
|
||||
function onlyReactElement(list, child) {
|
||||
// React children can be "string" or "number" in this case we ignore them for backwards compat
|
||||
if (typeof child === "string" || typeof child === "number") {
|
||||
return list;
|
||||
}
|
||||
// Adds support for React.Fragment
|
||||
if (child.type === React.Fragment) {
|
||||
return list.concat(// @ts-expect-error @types/react does not remove fragments but this could also return ReactPortal[]
|
||||
React.Children.toArray(child.props.children).reduce(// @ts-expect-error @types/react does not remove fragments but this could also return ReactPortal[]
|
||||
(fragmentList, fragmentChild)=>{
|
||||
if (typeof fragmentChild === "string" || typeof fragmentChild === "number") {
|
||||
return fragmentList;
|
||||
}
|
||||
return fragmentList.concat(fragmentChild);
|
||||
}, []));
|
||||
}
|
||||
return list.concat(child);
|
||||
}
|
||||
const METATYPES = [
|
||||
"name",
|
||||
"httpEquiv",
|
||||
"charSet",
|
||||
"itemProp"
|
||||
];
|
||||
/*
|
||||
returns a function for filtering head child elements
|
||||
which shouldn't be duplicated, like <title/>
|
||||
Also adds support for deduplicated `key` properties
|
||||
*/ function unique() {
|
||||
const keys = new Set();
|
||||
const tags = new Set();
|
||||
const metaTypes = new Set();
|
||||
const metaCategories = {};
|
||||
return (h)=>{
|
||||
let isUnique = true;
|
||||
let hasKey = false;
|
||||
if (h.key && typeof h.key !== "number" && h.key.indexOf("$") > 0) {
|
||||
hasKey = true;
|
||||
const key = h.key.slice(h.key.indexOf("$") + 1);
|
||||
if (keys.has(key)) {
|
||||
isUnique = false;
|
||||
} else {
|
||||
keys.add(key);
|
||||
}
|
||||
}
|
||||
// eslint-disable-next-line default-case
|
||||
switch(h.type){
|
||||
case "title":
|
||||
case "base":
|
||||
if (tags.has(h.type)) {
|
||||
isUnique = false;
|
||||
} else {
|
||||
tags.add(h.type);
|
||||
}
|
||||
break;
|
||||
case "meta":
|
||||
for(let i = 0, len = METATYPES.length; i < len; i++){
|
||||
const metatype = METATYPES[i];
|
||||
if (!h.props.hasOwnProperty(metatype)) continue;
|
||||
if (metatype === "charSet") {
|
||||
if (metaTypes.has(metatype)) {
|
||||
isUnique = false;
|
||||
} else {
|
||||
metaTypes.add(metatype);
|
||||
}
|
||||
} else {
|
||||
const category = h.props[metatype];
|
||||
const categories = metaCategories[metatype] || new Set();
|
||||
if ((metatype !== "name" || !hasKey) && categories.has(category)) {
|
||||
isUnique = false;
|
||||
} else {
|
||||
categories.add(category);
|
||||
metaCategories[metatype] = categories;
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
return isUnique;
|
||||
};
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @param headChildrenElements List of children of <Head>
|
||||
*/ function reduceComponents(headChildrenElements, props) {
|
||||
const { inAmpMode } = props;
|
||||
return headChildrenElements.reduce(onlyReactElement, []).reverse().concat(defaultHead(inAmpMode).reverse()).filter(unique()).reverse().map((c, i)=>{
|
||||
const key = c.key || i;
|
||||
if (process.env.NODE_ENV !== "development" && process.env.__NEXT_OPTIMIZE_FONTS && !inAmpMode) {
|
||||
if (c.type === "link" && c.props["href"] && // TODO(prateekbh@): Replace this with const from `constants` when the tree shaking works.
|
||||
[
|
||||
"https://fonts.googleapis.com/css",
|
||||
"https://use.typekit.net/"
|
||||
].some((url)=>c.props["href"].startsWith(url))) {
|
||||
const newProps = {
|
||||
...c.props || {}
|
||||
};
|
||||
newProps["data-href"] = newProps["href"];
|
||||
newProps["href"] = undefined;
|
||||
// Add this attribute to make it easy to identify optimized tags
|
||||
newProps["data-optimized-fonts"] = true;
|
||||
return /*#__PURE__*/ React.cloneElement(c, newProps);
|
||||
}
|
||||
}
|
||||
if (process.env.NODE_ENV === "development") {
|
||||
// omit JSON-LD structured data snippets from the warning
|
||||
if (c.type === "script" && c.props["type"] !== "application/ld+json") {
|
||||
const srcMessage = c.props["src"] ? '<script> tag with src="' + c.props["src"] + '"' : "inline <script>";
|
||||
warnOnce("Do not add <script> tags using next/head (see " + srcMessage + "). Use next/script instead. \nSee more info here: https://nextjs.org/docs/messages/no-script-tags-in-head-component");
|
||||
} else if (c.type === "link" && c.props["rel"] === "stylesheet") {
|
||||
warnOnce('Do not add stylesheets using next/head (see <link rel="stylesheet"> tag with href="' + c.props["href"] + '"). Use Document instead. \nSee more info here: https://nextjs.org/docs/messages/no-stylesheets-in-head-component');
|
||||
}
|
||||
}
|
||||
return /*#__PURE__*/ React.cloneElement(c, {
|
||||
key
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
* This component injects elements to `<head>` of your page.
|
||||
* To avoid duplicated `tags` in `<head>` you can use the `key` property, which will make sure every tag is only rendered once.
|
||||
*/ function Head(param) {
|
||||
let { children } = param;
|
||||
const ampState = useContext(AmpStateContext);
|
||||
const headManager = useContext(HeadManagerContext);
|
||||
return /*#__PURE__*/ _jsx(Effect, {
|
||||
reduceComponentsToState: reduceComponents,
|
||||
headManager: headManager,
|
||||
inAmpMode: isInAmpMode(ampState),
|
||||
children: children
|
||||
});
|
||||
}
|
||||
export default Head;
|
||||
|
||||
//# sourceMappingURL=head.js.map
|
||||
1
node_modules/next/dist/esm/shared/lib/head.js.map
generated
vendored
Normal file
1
node_modules/next/dist/esm/shared/lib/head.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../src/shared/lib/head.tsx"],"names":["React","useContext","Effect","AmpStateContext","HeadManagerContext","isInAmpMode","warnOnce","defaultHead","inAmpMode","head","meta","charSet","push","name","content","onlyReactElement","list","child","type","Fragment","concat","Children","toArray","props","children","reduce","fragmentList","fragmentChild","METATYPES","unique","keys","Set","tags","metaTypes","metaCategories","h","isUnique","hasKey","key","indexOf","slice","has","add","i","len","length","metatype","hasOwnProperty","category","categories","reduceComponents","headChildrenElements","reverse","filter","map","c","process","env","NODE_ENV","__NEXT_OPTIMIZE_FONTS","some","url","startsWith","newProps","undefined","cloneElement","srcMessage","Head","ampState","headManager","reduceComponentsToState"],"mappings":"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"}
|
||||
13
node_modules/next/dist/esm/shared/lib/hooks-client-context.shared-runtime.js
generated
vendored
Normal file
13
node_modules/next/dist/esm/shared/lib/hooks-client-context.shared-runtime.js
generated
vendored
Normal file
@ -0,0 +1,13 @@
|
||||
"use client";
|
||||
|
||||
import { createContext } from "react";
|
||||
export const SearchParamsContext = createContext(null);
|
||||
export const PathnameContext = createContext(null);
|
||||
export const PathParamsContext = createContext(null);
|
||||
if (process.env.NODE_ENV !== "production") {
|
||||
SearchParamsContext.displayName = "SearchParamsContext";
|
||||
PathnameContext.displayName = "PathnameContext";
|
||||
PathParamsContext.displayName = "PathParamsContext";
|
||||
}
|
||||
|
||||
//# sourceMappingURL=hooks-client-context.shared-runtime.js.map
|
||||
1
node_modules/next/dist/esm/shared/lib/hooks-client-context.shared-runtime.js.map
generated
vendored
Normal file
1
node_modules/next/dist/esm/shared/lib/hooks-client-context.shared-runtime.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../src/shared/lib/hooks-client-context.shared-runtime.ts"],"names":["createContext","SearchParamsContext","PathnameContext","PathParamsContext","process","env","NODE_ENV","displayName"],"mappings":"AAAA;AAEA,SAASA,aAAa,QAAQ,QAAO;AAGrC,OAAO,MAAMC,sBAAsBD,cAAsC,MAAK;AAC9E,OAAO,MAAME,kBAAkBF,cAA6B,MAAK;AACjE,OAAO,MAAMG,oBAAoBH,cAA6B,MAAK;AAEnE,IAAII,QAAQC,GAAG,CAACC,QAAQ,KAAK,cAAc;IACzCL,oBAAoBM,WAAW,GAAG;IAClCL,gBAAgBK,WAAW,GAAG;IAC9BJ,kBAAkBI,WAAW,GAAG;AAClC"}
|
||||
14
node_modules/next/dist/esm/shared/lib/html-context.shared-runtime.js
generated
vendored
Normal file
14
node_modules/next/dist/esm/shared/lib/html-context.shared-runtime.js
generated
vendored
Normal file
@ -0,0 +1,14 @@
|
||||
import { createContext, useContext } from "react";
|
||||
export const HtmlContext = createContext(undefined);
|
||||
if (process.env.NODE_ENV !== "production") {
|
||||
HtmlContext.displayName = "HtmlContext";
|
||||
}
|
||||
export function useHtmlContext() {
|
||||
const context = useContext(HtmlContext);
|
||||
if (!context) {
|
||||
throw new Error("<Html> should not be imported outside of pages/_document.\n" + "Read more: https://nextjs.org/docs/messages/no-document-import-in-page");
|
||||
}
|
||||
return context;
|
||||
}
|
||||
|
||||
//# sourceMappingURL=html-context.shared-runtime.js.map
|
||||
1
node_modules/next/dist/esm/shared/lib/html-context.shared-runtime.js.map
generated
vendored
Normal file
1
node_modules/next/dist/esm/shared/lib/html-context.shared-runtime.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../src/shared/lib/html-context.shared-runtime.ts"],"names":["createContext","useContext","HtmlContext","undefined","process","env","NODE_ENV","displayName","useHtmlContext","context","Error"],"mappings":"AAOA,SAASA,aAAa,EAAEC,UAAU,QAAQ,QAAO;AA4CjD,OAAO,MAAMC,cAAcF,cAAqCG,WAAU;AAC1E,IAAIC,QAAQC,GAAG,CAACC,QAAQ,KAAK,cAAc;IACzCJ,YAAYK,WAAW,GAAG;AAC5B;AAEA,OAAO,SAASC;IACd,MAAMC,UAAUR,WAAWC;IAE3B,IAAI,CAACO,SAAS;QACZ,MAAM,IAAIC,MACR,AAAC,gEACC;IAEN;IAEA,OAAOD;AACT"}
|
||||
16
node_modules/next/dist/esm/shared/lib/i18n/detect-domain-locale.js
generated
vendored
Normal file
16
node_modules/next/dist/esm/shared/lib/i18n/detect-domain-locale.js
generated
vendored
Normal file
@ -0,0 +1,16 @@
|
||||
export function detectDomainLocale(domainItems, hostname, detectedLocale) {
|
||||
if (!domainItems) return;
|
||||
if (detectedLocale) {
|
||||
detectedLocale = detectedLocale.toLowerCase();
|
||||
}
|
||||
for (const item of domainItems){
|
||||
var _item_domain, _item_locales;
|
||||
// remove port if present
|
||||
const domainHostname = (_item_domain = item.domain) == null ? void 0 : _item_domain.split(":", 1)[0].toLowerCase();
|
||||
if (hostname === domainHostname || detectedLocale === item.defaultLocale.toLowerCase() || ((_item_locales = item.locales) == null ? void 0 : _item_locales.some((locale)=>locale.toLowerCase() === detectedLocale))) {
|
||||
return item;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//# sourceMappingURL=detect-domain-locale.js.map
|
||||
1
node_modules/next/dist/esm/shared/lib/i18n/detect-domain-locale.js.map
generated
vendored
Normal file
1
node_modules/next/dist/esm/shared/lib/i18n/detect-domain-locale.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../../src/shared/lib/i18n/detect-domain-locale.ts"],"names":["detectDomainLocale","domainItems","hostname","detectedLocale","toLowerCase","item","domainHostname","domain","split","defaultLocale","locales","some","locale"],"mappings":"AAEA,OAAO,SAASA,mBACdC,WAA4B,EAC5BC,QAAiB,EACjBC,cAAuB;IAEvB,IAAI,CAACF,aAAa;IAElB,IAAIE,gBAAgB;QAClBA,iBAAiBA,eAAeC,WAAW;IAC7C;IAEA,KAAK,MAAMC,QAAQJ,YAAa;YAEPI,cAIrBA;QALF,yBAAyB;QACzB,MAAMC,kBAAiBD,eAAAA,KAAKE,MAAM,qBAAXF,aAAaG,KAAK,CAAC,KAAK,EAAE,CAAC,EAAE,CAACJ,WAAW;QAChE,IACEF,aAAaI,kBACbH,mBAAmBE,KAAKI,aAAa,CAACL,WAAW,QACjDC,gBAAAA,KAAKK,OAAO,qBAAZL,cAAcM,IAAI,CAAC,CAACC,SAAWA,OAAOR,WAAW,OAAOD,kBACxD;YACA,OAAOE;QACT;IACF;AACF"}
|
||||
53
node_modules/next/dist/esm/shared/lib/i18n/get-locale-redirect.js
generated
vendored
Normal file
53
node_modules/next/dist/esm/shared/lib/i18n/get-locale-redirect.js
generated
vendored
Normal file
@ -0,0 +1,53 @@
|
||||
import { acceptLanguage } from "../../../server/accept-header";
|
||||
import { denormalizePagePath } from "../page-path/denormalize-page-path";
|
||||
import { detectDomainLocale } from "./detect-domain-locale";
|
||||
import { formatUrl } from "../router/utils/format-url";
|
||||
import { getCookieParser } from "../../../server/api-utils/get-cookie-parser";
|
||||
function getLocaleFromCookie(i18n, headers) {
|
||||
if (headers === void 0) headers = {};
|
||||
var _getCookieParser_NEXT_LOCALE, _getCookieParser;
|
||||
const nextLocale = (_getCookieParser = getCookieParser(headers || {})()) == null ? void 0 : (_getCookieParser_NEXT_LOCALE = _getCookieParser.NEXT_LOCALE) == null ? void 0 : _getCookieParser_NEXT_LOCALE.toLowerCase();
|
||||
return nextLocale ? i18n.locales.find((locale)=>nextLocale === locale.toLowerCase()) : undefined;
|
||||
}
|
||||
function detectLocale(param) {
|
||||
let { i18n, headers, domainLocale, preferredLocale, pathLocale } = param;
|
||||
return pathLocale || (domainLocale == null ? void 0 : domainLocale.defaultLocale) || getLocaleFromCookie(i18n, headers) || preferredLocale || i18n.defaultLocale;
|
||||
}
|
||||
function getAcceptPreferredLocale(i18n, headers) {
|
||||
if ((headers == null ? void 0 : headers["accept-language"]) && !Array.isArray(headers["accept-language"])) {
|
||||
try {
|
||||
return acceptLanguage(headers["accept-language"], i18n.locales);
|
||||
} catch (err) {}
|
||||
}
|
||||
}
|
||||
export function getLocaleRedirect(param) {
|
||||
let { defaultLocale, domainLocale, pathLocale, headers, nextConfig, urlParsed } = param;
|
||||
if (nextConfig.i18n && nextConfig.i18n.localeDetection !== false && denormalizePagePath(urlParsed.pathname) === "/") {
|
||||
const preferredLocale = getAcceptPreferredLocale(nextConfig.i18n, headers);
|
||||
const detectedLocale = detectLocale({
|
||||
i18n: nextConfig.i18n,
|
||||
preferredLocale,
|
||||
headers,
|
||||
pathLocale,
|
||||
domainLocale
|
||||
});
|
||||
const preferredDomain = detectDomainLocale(nextConfig.i18n.domains, undefined, preferredLocale);
|
||||
if (domainLocale && preferredDomain) {
|
||||
const isPDomain = preferredDomain.domain === domainLocale.domain;
|
||||
const isPLocale = preferredDomain.defaultLocale === preferredLocale;
|
||||
if (!isPDomain || !isPLocale) {
|
||||
const scheme = "http" + (preferredDomain.http ? "" : "s");
|
||||
const rlocale = isPLocale ? "" : preferredLocale;
|
||||
return scheme + "://" + preferredDomain.domain + "/" + rlocale;
|
||||
}
|
||||
}
|
||||
if (detectedLocale.toLowerCase() !== defaultLocale.toLowerCase()) {
|
||||
return formatUrl({
|
||||
...urlParsed,
|
||||
pathname: (nextConfig.basePath || "") + "/" + detectedLocale + (nextConfig.trailingSlash ? "/" : "")
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//# sourceMappingURL=get-locale-redirect.js.map
|
||||
1
node_modules/next/dist/esm/shared/lib/i18n/get-locale-redirect.js.map
generated
vendored
Normal file
1
node_modules/next/dist/esm/shared/lib/i18n/get-locale-redirect.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../../src/shared/lib/i18n/get-locale-redirect.ts"],"names":["acceptLanguage","denormalizePagePath","detectDomainLocale","formatUrl","getCookieParser","getLocaleFromCookie","i18n","headers","nextLocale","NEXT_LOCALE","toLowerCase","locales","find","locale","undefined","detectLocale","domainLocale","preferredLocale","pathLocale","defaultLocale","getAcceptPreferredLocale","Array","isArray","err","getLocaleRedirect","nextConfig","urlParsed","localeDetection","pathname","detectedLocale","preferredDomain","domains","isPDomain","domain","isPLocale","scheme","http","rlocale","basePath","trailingSlash"],"mappings":"AAEA,SAASA,cAAc,QAAQ,gCAA+B;AAC9D,SAASC,mBAAmB,QAAQ,qCAAoC;AACxE,SAASC,kBAAkB,QAAQ,yBAAwB;AAC3D,SAASC,SAAS,QAAQ,6BAA4B;AACtD,SAASC,eAAe,QAAQ,8CAA6C;AAe7E,SAASC,oBACPC,IAAgB,EAChBC,OAA8D;IAA9DA,IAAAA,oBAAAA,UAA4D,CAAC;QAE1CH,8BAAAA;IAAnB,MAAMI,cAAaJ,mBAAAA,gBACjBG,WAAW,CAAC,0BADKH,+BAAAA,iBAEdK,WAAW,qBAFGL,6BAEDM,WAAW;IAC7B,OAAOF,aACHF,KAAKK,OAAO,CAACC,IAAI,CAAC,CAACC,SAAWL,eAAeK,OAAOH,WAAW,MAC/DI;AACN;AAEA,SAASC,aAAa,KAYrB;IAZqB,IAAA,EACpBT,IAAI,EACJC,OAAO,EACPS,YAAY,EACZC,eAAe,EACfC,UAAU,EAOX,GAZqB;IAapB,OACEA,eACAF,gCAAAA,aAAcG,aAAa,KAC3Bd,oBAAoBC,MAAMC,YAC1BU,mBACAX,KAAKa,aAAa;AAEtB;AAEA,SAASC,yBACPd,IAAgB,EAChBC,OAA0D;IAE1D,IACEA,CAAAA,2BAAAA,OAAS,CAAC,kBAAkB,KAC5B,CAACc,MAAMC,OAAO,CAACf,OAAO,CAAC,kBAAkB,GACzC;QACA,IAAI;YACF,OAAOP,eAAeO,OAAO,CAAC,kBAAkB,EAAED,KAAKK,OAAO;QAChE,EAAE,OAAOY,KAAK,CAAC;IACjB;AACF;AAEA,OAAO,SAASC,kBAAkB,KAOxB;IAPwB,IAAA,EAChCL,aAAa,EACbH,YAAY,EACZE,UAAU,EACVX,OAAO,EACPkB,UAAU,EACVC,SAAS,EACD,GAPwB;IAQhC,IACED,WAAWnB,IAAI,IACfmB,WAAWnB,IAAI,CAACqB,eAAe,KAAK,SACpC1B,oBAAoByB,UAAUE,QAAQ,MAAM,KAC5C;QACA,MAAMX,kBAAkBG,yBAAyBK,WAAWnB,IAAI,EAAEC;QAClE,MAAMsB,iBAAiBd,aAAa;YAClCT,MAAMmB,WAAWnB,IAAI;YACrBW;YACAV;YACAW;YACAF;QACF;QAEA,MAAMc,kBAAkB5B,mBACtBuB,WAAWnB,IAAI,CAACyB,OAAO,EACvBjB,WACAG;QAGF,IAAID,gBAAgBc,iBAAiB;YACnC,MAAME,YAAYF,gBAAgBG,MAAM,KAAKjB,aAAaiB,MAAM;YAChE,MAAMC,YAAYJ,gBAAgBX,aAAa,KAAKF;YACpD,IAAI,CAACe,aAAa,CAACE,WAAW;gBAC5B,MAAMC,SAAS,AAAC,SAAML,CAAAA,gBAAgBM,IAAI,GAAG,KAAK,GAAE;gBACpD,MAAMC,UAAUH,YAAY,KAAKjB;gBACjC,OAAO,AAAGkB,SAAO,QAAKL,gBAAgBG,MAAM,GAAC,MAAGI;YAClD;QACF;QAEA,IAAIR,eAAenB,WAAW,OAAOS,cAAcT,WAAW,IAAI;YAChE,OAAOP,UAAU;gBACf,GAAGuB,SAAS;gBACZE,UAAU,AAAGH,CAAAA,WAAWa,QAAQ,IAAI,EAAC,IAAE,MAAGT,iBACxCJ,CAAAA,WAAWc,aAAa,GAAG,MAAM,EAAC;YAEtC;QACF;IACF;AACF"}
|
||||
28
node_modules/next/dist/esm/shared/lib/i18n/normalize-locale-path.js
generated
vendored
Normal file
28
node_modules/next/dist/esm/shared/lib/i18n/normalize-locale-path.js
generated
vendored
Normal file
@ -0,0 +1,28 @@
|
||||
/**
|
||||
* For a pathname that may include a locale from a list of locales, it
|
||||
* removes the locale from the pathname returning it alongside with the
|
||||
* detected locale.
|
||||
*
|
||||
* @param pathname A pathname that may include a locale.
|
||||
* @param locales A list of locales.
|
||||
* @returns The detected locale and pathname without locale
|
||||
*/ export function normalizeLocalePath(pathname, locales) {
|
||||
let detectedLocale;
|
||||
// first item will be empty string from splitting at first char
|
||||
const pathnameParts = pathname.split("/");
|
||||
(locales || []).some((locale)=>{
|
||||
if (pathnameParts[1] && pathnameParts[1].toLowerCase() === locale.toLowerCase()) {
|
||||
detectedLocale = locale;
|
||||
pathnameParts.splice(1, 1);
|
||||
pathname = pathnameParts.join("/") || "/";
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
});
|
||||
return {
|
||||
pathname,
|
||||
detectedLocale
|
||||
};
|
||||
}
|
||||
|
||||
//# sourceMappingURL=normalize-locale-path.js.map
|
||||
1
node_modules/next/dist/esm/shared/lib/i18n/normalize-locale-path.js.map
generated
vendored
Normal file
1
node_modules/next/dist/esm/shared/lib/i18n/normalize-locale-path.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../../src/shared/lib/i18n/normalize-locale-path.ts"],"names":["normalizeLocalePath","pathname","locales","detectedLocale","pathnameParts","split","some","locale","toLowerCase","splice","join"],"mappings":"AAKA;;;;;;;;CAQC,GACD,OAAO,SAASA,oBACdC,QAAgB,EAChBC,OAAkB;IAElB,IAAIC;IACJ,+DAA+D;IAC/D,MAAMC,gBAAgBH,SAASI,KAAK,CAAC;IAEnCH,CAAAA,WAAW,EAAE,AAAD,EAAGI,IAAI,CAAC,CAACC;QACrB,IACEH,aAAa,CAAC,EAAE,IAChBA,aAAa,CAAC,EAAE,CAACI,WAAW,OAAOD,OAAOC,WAAW,IACrD;YACAL,iBAAiBI;YACjBH,cAAcK,MAAM,CAAC,GAAG;YACxBR,WAAWG,cAAcM,IAAI,CAAC,QAAQ;YACtC,OAAO;QACT;QACA,OAAO;IACT;IAEA,OAAO;QACLT;QACAE;IACF;AACF"}
|
||||
13
node_modules/next/dist/esm/shared/lib/image-blur-svg.js
generated
vendored
Normal file
13
node_modules/next/dist/esm/shared/lib/image-blur-svg.js
generated
vendored
Normal file
@ -0,0 +1,13 @@
|
||||
/**
|
||||
* A shared function, used on both client and server, to generate a SVG blur placeholder.
|
||||
*/ export function getImageBlurSvg(param) {
|
||||
let { widthInt, heightInt, blurWidth, blurHeight, blurDataURL, objectFit } = param;
|
||||
const std = 20;
|
||||
const svgWidth = blurWidth ? blurWidth * 40 : widthInt;
|
||||
const svgHeight = blurHeight ? blurHeight * 40 : heightInt;
|
||||
const viewBox = svgWidth && svgHeight ? "viewBox='0 0 " + svgWidth + " " + svgHeight + "'" : "";
|
||||
const preserveAspectRatio = viewBox ? "none" : objectFit === "contain" ? "xMidYMid" : objectFit === "cover" ? "xMidYMid slice" : "none";
|
||||
return "%3Csvg xmlns='http://www.w3.org/2000/svg' " + viewBox + "%3E%3Cfilter id='b' color-interpolation-filters='sRGB'%3E%3CfeGaussianBlur stdDeviation='" + std + "'/%3E%3CfeColorMatrix values='1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 100 -1' result='s'/%3E%3CfeFlood x='0' y='0' width='100%25' height='100%25'/%3E%3CfeComposite operator='out' in='s'/%3E%3CfeComposite in2='SourceGraphic'/%3E%3CfeGaussianBlur stdDeviation='" + std + "'/%3E%3C/filter%3E%3Cimage width='100%25' height='100%25' x='0' y='0' preserveAspectRatio='" + preserveAspectRatio + "' style='filter: url(%23b);' href='" + blurDataURL + "'/%3E%3C/svg%3E";
|
||||
}
|
||||
|
||||
//# sourceMappingURL=image-blur-svg.js.map
|
||||
1
node_modules/next/dist/esm/shared/lib/image-blur-svg.js.map
generated
vendored
Normal file
1
node_modules/next/dist/esm/shared/lib/image-blur-svg.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../src/shared/lib/image-blur-svg.ts"],"names":["getImageBlurSvg","widthInt","heightInt","blurWidth","blurHeight","blurDataURL","objectFit","std","svgWidth","svgHeight","viewBox","preserveAspectRatio"],"mappings":"AAAA;;CAEC,GACD,OAAO,SAASA,gBAAgB,KAc/B;IAd+B,IAAA,EAC9BC,QAAQ,EACRC,SAAS,EACTC,SAAS,EACTC,UAAU,EACVC,WAAW,EACXC,SAAS,EAQV,GAd+B;IAe9B,MAAMC,MAAM;IACZ,MAAMC,WAAWL,YAAYA,YAAY,KAAKF;IAC9C,MAAMQ,YAAYL,aAAaA,aAAa,KAAKF;IAEjD,MAAMQ,UACJF,YAAYC,YAAY,AAAC,kBAAeD,WAAS,MAAGC,YAAU,MAAK;IACrE,MAAME,sBAAsBD,UACxB,SACAJ,cAAc,YACd,aACAA,cAAc,UACd,mBACA;IAEJ,OAAO,AAAC,+CAA4CI,UAAQ,8FAA2FH,MAAI,oQAAiQA,MAAI,gGAA6FI,sBAAoB,wCAAqCN,cAAY;AACpkB"}
|
||||
8
node_modules/next/dist/esm/shared/lib/image-config-context.shared-runtime.js
generated
vendored
Normal file
8
node_modules/next/dist/esm/shared/lib/image-config-context.shared-runtime.js
generated
vendored
Normal file
@ -0,0 +1,8 @@
|
||||
import React from "react";
|
||||
import { imageConfigDefault } from "./image-config";
|
||||
export const ImageConfigContext = React.createContext(imageConfigDefault);
|
||||
if (process.env.NODE_ENV !== "production") {
|
||||
ImageConfigContext.displayName = "ImageConfigContext";
|
||||
}
|
||||
|
||||
//# sourceMappingURL=image-config-context.shared-runtime.js.map
|
||||
1
node_modules/next/dist/esm/shared/lib/image-config-context.shared-runtime.js.map
generated
vendored
Normal file
1
node_modules/next/dist/esm/shared/lib/image-config-context.shared-runtime.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../src/shared/lib/image-config-context.shared-runtime.ts"],"names":["React","imageConfigDefault","ImageConfigContext","createContext","process","env","NODE_ENV","displayName"],"mappings":"AAAA,OAAOA,WAAW,QAAO;AAEzB,SAASC,kBAAkB,QAAQ,iBAAgB;AAEnD,OAAO,MAAMC,qBACXF,MAAMG,aAAa,CAAsBF,oBAAmB;AAE9D,IAAIG,QAAQC,GAAG,CAACC,QAAQ,KAAK,cAAc;IACzCJ,mBAAmBK,WAAW,GAAG;AACnC"}
|
||||
45
node_modules/next/dist/esm/shared/lib/image-config.js
generated
vendored
Normal file
45
node_modules/next/dist/esm/shared/lib/image-config.js
generated
vendored
Normal file
@ -0,0 +1,45 @@
|
||||
export const VALID_LOADERS = [
|
||||
"default",
|
||||
"imgix",
|
||||
"cloudinary",
|
||||
"akamai",
|
||||
"custom"
|
||||
];
|
||||
export const imageConfigDefault = {
|
||||
deviceSizes: [
|
||||
640,
|
||||
750,
|
||||
828,
|
||||
1080,
|
||||
1200,
|
||||
1920,
|
||||
2048,
|
||||
3840
|
||||
],
|
||||
imageSizes: [
|
||||
16,
|
||||
32,
|
||||
48,
|
||||
64,
|
||||
96,
|
||||
128,
|
||||
256,
|
||||
384
|
||||
],
|
||||
path: "/_next/image",
|
||||
loader: "default",
|
||||
loaderFile: "",
|
||||
domains: [],
|
||||
disableStaticImages: false,
|
||||
minimumCacheTTL: 60,
|
||||
formats: [
|
||||
"image/webp"
|
||||
],
|
||||
dangerouslyAllowSVG: false,
|
||||
contentSecurityPolicy: "script-src 'none'; frame-src 'none'; sandbox;",
|
||||
contentDispositionType: "inline",
|
||||
remotePatterns: [],
|
||||
unoptimized: false
|
||||
};
|
||||
|
||||
//# sourceMappingURL=image-config.js.map
|
||||
1
node_modules/next/dist/esm/shared/lib/image-config.js.map
generated
vendored
Normal file
1
node_modules/next/dist/esm/shared/lib/image-config.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../src/shared/lib/image-config.ts"],"names":["VALID_LOADERS","imageConfigDefault","deviceSizes","imageSizes","path","loader","loaderFile","domains","disableStaticImages","minimumCacheTTL","formats","dangerouslyAllowSVG","contentSecurityPolicy","contentDispositionType","remotePatterns","unoptimized"],"mappings":"AAAA,OAAO,MAAMA,gBAAgB;IAC3B;IACA;IACA;IACA;IACA;CACD,CAAS;AAgGV,OAAO,MAAMC,qBAA0C;IACrDC,aAAa;QAAC;QAAK;QAAK;QAAK;QAAM;QAAM;QAAM;QAAM;KAAK;IAC1DC,YAAY;QAAC;QAAI;QAAI;QAAI;QAAI;QAAI;QAAK;QAAK;KAAI;IAC/CC,MAAM;IACNC,QAAQ;IACRC,YAAY;IACZC,SAAS,EAAE;IACXC,qBAAqB;IACrBC,iBAAiB;IACjBC,SAAS;QAAC;KAAa;IACvBC,qBAAqB;IACrBC,uBAAwB;IACxBC,wBAAwB;IACxBC,gBAAgB,EAAE;IAClBC,aAAa;AACf,EAAC"}
|
||||
31
node_modules/next/dist/esm/shared/lib/image-external.js
generated
vendored
Normal file
31
node_modules/next/dist/esm/shared/lib/image-external.js
generated
vendored
Normal file
@ -0,0 +1,31 @@
|
||||
import { getImgProps } from "./get-img-props";
|
||||
import { Image } from "../../client/image-component";
|
||||
// @ts-ignore - This is replaced by webpack alias
|
||||
import defaultLoader from "next/dist/shared/lib/image-loader";
|
||||
/**
|
||||
* For more advanced use cases, you can call `getImageProps()`
|
||||
* to get the props that would be passed to the underlying `<img>` element,
|
||||
* and instead pass to them to another component, style, canvas, etc.
|
||||
*
|
||||
* Read more: [Next.js docs: `getImageProps`](https://nextjs.org/docs/app/api-reference/components/image#getimageprops)
|
||||
*/ export function getImageProps(imgProps) {
|
||||
const { props } = getImgProps(imgProps, {
|
||||
defaultLoader,
|
||||
// This is replaced by webpack define plugin
|
||||
imgConf: process.env.__NEXT_IMAGE_OPTS
|
||||
});
|
||||
// Normally we don't care about undefined props because we pass to JSX,
|
||||
// but this exported function could be used by the end user for anything
|
||||
// so we delete undefined props to clean it up a little.
|
||||
for (const [key, value] of Object.entries(props)){
|
||||
if (value === undefined) {
|
||||
delete props[key];
|
||||
}
|
||||
}
|
||||
return {
|
||||
props
|
||||
};
|
||||
}
|
||||
export default Image;
|
||||
|
||||
//# sourceMappingURL=image-external.js.map
|
||||
1
node_modules/next/dist/esm/shared/lib/image-external.js.map
generated
vendored
Normal file
1
node_modules/next/dist/esm/shared/lib/image-external.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../src/shared/lib/image-external.tsx"],"names":["getImgProps","Image","defaultLoader","getImageProps","imgProps","props","imgConf","process","env","__NEXT_IMAGE_OPTS","key","value","Object","entries","undefined"],"mappings":"AAGA,SAASA,WAAW,QAAQ,kBAAiB;AAC7C,SAASC,KAAK,QAAQ,+BAA8B;AAEpD,iDAAiD;AACjD,OAAOC,mBAAmB,oCAAmC;AAE7D;;;;;;CAMC,GACD,OAAO,SAASC,cAAcC,QAAoB;IAChD,MAAM,EAAEC,KAAK,EAAE,GAAGL,YAAYI,UAAU;QACtCF;QACA,4CAA4C;QAC5CI,SAASC,QAAQC,GAAG,CAACC,iBAAiB;IACxC;IACA,uEAAuE;IACvE,wEAAwE;IACxE,wDAAwD;IACxD,KAAK,MAAM,CAACC,KAAKC,MAAM,IAAIC,OAAOC,OAAO,CAACR,OAAQ;QAChD,IAAIM,UAAUG,WAAW;YACvB,OAAOT,KAAK,CAACK,IAA0B;QACzC;IACF;IACA,OAAO;QAAEL;IAAM;AACjB;AAEA,eAAeJ,MAAK"}
|
||||
43
node_modules/next/dist/esm/shared/lib/image-loader.js
generated
vendored
Normal file
43
node_modules/next/dist/esm/shared/lib/image-loader.js
generated
vendored
Normal file
@ -0,0 +1,43 @@
|
||||
function defaultLoader(param) {
|
||||
let { config, src, width, quality } = param;
|
||||
if (process.env.NODE_ENV !== "production") {
|
||||
const missingValues = [];
|
||||
// these should always be provided but make sure they are
|
||||
if (!src) missingValues.push("src");
|
||||
if (!width) missingValues.push("width");
|
||||
if (missingValues.length > 0) {
|
||||
throw new Error("Next Image Optimization requires " + missingValues.join(", ") + " to be provided. Make sure you pass them as props to the `next/image` component. Received: " + JSON.stringify({
|
||||
src,
|
||||
width,
|
||||
quality
|
||||
}));
|
||||
}
|
||||
if (src.startsWith("//")) {
|
||||
throw new Error('Failed to parse src "' + src + '" on `next/image`, protocol-relative URL (//) must be changed to an absolute URL (http:// or https://)');
|
||||
}
|
||||
if (!src.startsWith("/") && (config.domains || config.remotePatterns)) {
|
||||
let parsedSrc;
|
||||
try {
|
||||
parsedSrc = new URL(src);
|
||||
} catch (err) {
|
||||
console.error(err);
|
||||
throw new Error('Failed to parse src "' + src + '" on `next/image`, if using relative image it must start with a leading slash "/" or be an absolute URL (http:// or https://)');
|
||||
}
|
||||
if (process.env.NODE_ENV !== "test" && // micromatch isn't compatible with edge runtime
|
||||
process.env.NEXT_RUNTIME !== "edge") {
|
||||
// We use dynamic require because this should only error in development
|
||||
const { hasMatch } = require("./match-remote-pattern");
|
||||
if (!hasMatch(config.domains, config.remotePatterns, parsedSrc)) {
|
||||
throw new Error("Invalid src prop (" + src + ') on `next/image`, hostname "' + parsedSrc.hostname + '" is not configured under images in your `next.config.js`\n' + "See more info: https://nextjs.org/docs/messages/next-image-unconfigured-host");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return config.path + "?url=" + encodeURIComponent(src) + "&w=" + width + "&q=" + (quality || 75) + (process.env.NEXT_DEPLOYMENT_ID ? "&dpl=" + process.env.NEXT_DEPLOYMENT_ID : "");
|
||||
}
|
||||
// We use this to determine if the import is the default loader
|
||||
// or a custom loader defined by the user in next.config.js
|
||||
defaultLoader.__next_img_default = true;
|
||||
export default defaultLoader;
|
||||
|
||||
//# sourceMappingURL=image-loader.js.map
|
||||
1
node_modules/next/dist/esm/shared/lib/image-loader.js.map
generated
vendored
Normal file
1
node_modules/next/dist/esm/shared/lib/image-loader.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../src/shared/lib/image-loader.ts"],"names":["defaultLoader","config","src","width","quality","process","env","NODE_ENV","missingValues","push","length","Error","join","JSON","stringify","startsWith","domains","remotePatterns","parsedSrc","URL","err","console","error","NEXT_RUNTIME","hasMatch","require","hostname","path","encodeURIComponent","NEXT_DEPLOYMENT_ID","__next_img_default"],"mappings":"AAEA,SAASA,cAAc,KAKM;IALN,IAAA,EACrBC,MAAM,EACNC,GAAG,EACHC,KAAK,EACLC,OAAO,EACoB,GALN;IAMrB,IAAIC,QAAQC,GAAG,CAACC,QAAQ,KAAK,cAAc;QACzC,MAAMC,gBAAgB,EAAE;QAExB,yDAAyD;QACzD,IAAI,CAACN,KAAKM,cAAcC,IAAI,CAAC;QAC7B,IAAI,CAACN,OAAOK,cAAcC,IAAI,CAAC;QAE/B,IAAID,cAAcE,MAAM,GAAG,GAAG;YAC5B,MAAM,IAAIC,MACR,AAAC,sCAAmCH,cAAcI,IAAI,CACpD,QACA,gGAA+FC,KAAKC,SAAS,CAC7G;gBAAEZ;gBAAKC;gBAAOC;YAAQ;QAG5B;QAEA,IAAIF,IAAIa,UAAU,CAAC,OAAO;YACxB,MAAM,IAAIJ,MACR,AAAC,0BAAuBT,MAAI;QAEhC;QAEA,IAAI,CAACA,IAAIa,UAAU,CAAC,QAASd,CAAAA,OAAOe,OAAO,IAAIf,OAAOgB,cAAc,AAAD,GAAI;YACrE,IAAIC;YACJ,IAAI;gBACFA,YAAY,IAAIC,IAAIjB;YACtB,EAAE,OAAOkB,KAAK;gBACZC,QAAQC,KAAK,CAACF;gBACd,MAAM,IAAIT,MACR,AAAC,0BAAuBT,MAAI;YAEhC;YAEA,IACEG,QAAQC,GAAG,CAACC,QAAQ,KAAK,UACzB,gDAAgD;YAChDF,QAAQC,GAAG,CAACiB,YAAY,KAAK,QAC7B;gBACA,uEAAuE;gBACvE,MAAM,EAAEC,QAAQ,EAAE,GAAGC,QAAQ;gBAC7B,IAAI,CAACD,SAASvB,OAAOe,OAAO,EAAEf,OAAOgB,cAAc,EAAEC,YAAY;oBAC/D,MAAM,IAAIP,MACR,AAAC,uBAAoBT,MAAI,kCAAiCgB,UAAUQ,QAAQ,GAAC,gEAC1E;gBAEP;YACF;QACF;IACF;IAEA,OAAO,AAAGzB,OAAO0B,IAAI,GAAC,UAAOC,mBAAmB1B,OAAK,QAAKC,QAAM,QAC9DC,CAAAA,WAAW,EAAC,IAEZC,CAAAA,QAAQC,GAAG,CAACuB,kBAAkB,GAC1B,AAAC,UAAOxB,QAAQC,GAAG,CAACuB,kBAAkB,GACtC,EAAC;AAET;AAEA,+DAA+D;AAC/D,2DAA2D;AAC3D7B,cAAc8B,kBAAkB,GAAG;AAEnC,eAAe9B,cAAa"}
|
||||
20
node_modules/next/dist/esm/shared/lib/is-plain-object.js
generated
vendored
Normal file
20
node_modules/next/dist/esm/shared/lib/is-plain-object.js
generated
vendored
Normal file
@ -0,0 +1,20 @@
|
||||
export function getObjectClassLabel(value) {
|
||||
return Object.prototype.toString.call(value);
|
||||
}
|
||||
export function isPlainObject(value) {
|
||||
if (getObjectClassLabel(value) !== "[object Object]") {
|
||||
return false;
|
||||
}
|
||||
const prototype = Object.getPrototypeOf(value);
|
||||
/**
|
||||
* this used to be previously:
|
||||
*
|
||||
* `return prototype === null || prototype === Object.prototype`
|
||||
*
|
||||
* but Edge Runtime expose Object from vm, being that kind of type-checking wrongly fail.
|
||||
*
|
||||
* It was changed to the current implementation since it's resilient to serialization.
|
||||
*/ return prototype === null || prototype.hasOwnProperty("isPrototypeOf");
|
||||
}
|
||||
|
||||
//# sourceMappingURL=is-plain-object.js.map
|
||||
1
node_modules/next/dist/esm/shared/lib/is-plain-object.js.map
generated
vendored
Normal file
1
node_modules/next/dist/esm/shared/lib/is-plain-object.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../src/shared/lib/is-plain-object.ts"],"names":["getObjectClassLabel","value","Object","prototype","toString","call","isPlainObject","getPrototypeOf","hasOwnProperty"],"mappings":"AAAA,OAAO,SAASA,oBAAoBC,KAAU;IAC5C,OAAOC,OAAOC,SAAS,CAACC,QAAQ,CAACC,IAAI,CAACJ;AACxC;AAEA,OAAO,SAASK,cAAcL,KAAU;IACtC,IAAID,oBAAoBC,WAAW,mBAAmB;QACpD,OAAO;IACT;IAEA,MAAME,YAAYD,OAAOK,cAAc,CAACN;IAExC;;;;;;;;GAQC,GACD,OAAOE,cAAc,QAAQA,UAAUK,cAAc,CAAC;AACxD"}
|
||||
1
node_modules/next/dist/esm/shared/lib/isomorphic/path.d.ts
generated
vendored
Normal file
1
node_modules/next/dist/esm/shared/lib/isomorphic/path.d.ts
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
export { default } from 'path'
|
||||
13
node_modules/next/dist/esm/shared/lib/isomorphic/path.js
generated
vendored
Normal file
13
node_modules/next/dist/esm/shared/lib/isomorphic/path.js
generated
vendored
Normal file
@ -0,0 +1,13 @@
|
||||
/**
|
||||
* This module is for next.js server internal usage of path module.
|
||||
* It will use native path module for nodejs runtime.
|
||||
* It will use path-browserify polyfill for edge runtime.
|
||||
*/ let path;
|
||||
if (process.env.NEXT_RUNTIME === "edge") {
|
||||
path = require("next/dist/compiled/path-browserify");
|
||||
} else {
|
||||
path = require("path");
|
||||
}
|
||||
module.exports = path;
|
||||
|
||||
//# sourceMappingURL=path.js.map
|
||||
1
node_modules/next/dist/esm/shared/lib/isomorphic/path.js.map
generated
vendored
Normal file
1
node_modules/next/dist/esm/shared/lib/isomorphic/path.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../../src/shared/lib/isomorphic/path.js"],"names":["path","process","env","NEXT_RUNTIME","require","module","exports"],"mappings":"AAAA;;;;CAIC,GACD,IAAIA;AAEJ,IAAIC,QAAQC,GAAG,CAACC,YAAY,KAAK,QAAQ;IACvCH,OAAOI,QAAQ;AACjB,OAAO;IACLJ,OAAOI,QAAQ;AACjB;AAEAC,OAAOC,OAAO,GAAGN"}
|
||||
17
node_modules/next/dist/esm/shared/lib/lazy-dynamic/bailout-to-csr.js
generated
vendored
Normal file
17
node_modules/next/dist/esm/shared/lib/lazy-dynamic/bailout-to-csr.js
generated
vendored
Normal file
@ -0,0 +1,17 @@
|
||||
// This has to be a shared module which is shared between client component error boundary and dynamic component
|
||||
const BAILOUT_TO_CSR = "BAILOUT_TO_CLIENT_SIDE_RENDERING";
|
||||
/** An error that should be thrown when we want to bail out to client-side rendering. */ export class BailoutToCSRError extends Error {
|
||||
constructor(reason){
|
||||
super("Bail out to client-side rendering: " + reason);
|
||||
this.reason = reason;
|
||||
this.digest = BAILOUT_TO_CSR;
|
||||
}
|
||||
}
|
||||
/** Checks if a passed argument is an error that is thrown if we want to bail out to client-side rendering. */ export function isBailoutToCSRError(err) {
|
||||
if (typeof err !== "object" || err === null || !("digest" in err)) {
|
||||
return false;
|
||||
}
|
||||
return err.digest === BAILOUT_TO_CSR;
|
||||
}
|
||||
|
||||
//# sourceMappingURL=bailout-to-csr.js.map
|
||||
1
node_modules/next/dist/esm/shared/lib/lazy-dynamic/bailout-to-csr.js.map
generated
vendored
Normal file
1
node_modules/next/dist/esm/shared/lib/lazy-dynamic/bailout-to-csr.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../../src/shared/lib/lazy-dynamic/bailout-to-csr.ts"],"names":["BAILOUT_TO_CSR","BailoutToCSRError","Error","constructor","reason","digest","isBailoutToCSRError","err"],"mappings":"AAAA,+GAA+G;AAC/G,MAAMA,iBAAiB;AAEvB,sFAAsF,GACtF,OAAO,MAAMC,0BAA0BC;IAGrCC,YAAY,AAAgBC,MAAc,CAAE;QAC1C,KAAK,CAAC,AAAC,wCAAqCA;aADlBA,SAAAA;aAFZC,SAASL;IAIzB;AACF;AAEA,4GAA4G,GAC5G,OAAO,SAASM,oBAAoBC,GAAY;IAC9C,IAAI,OAAOA,QAAQ,YAAYA,QAAQ,QAAQ,CAAE,CAAA,YAAYA,GAAE,GAAI;QACjE,OAAO;IACT;IAEA,OAAOA,IAAIF,MAAM,KAAKL;AACxB"}
|
||||
15
node_modules/next/dist/esm/shared/lib/lazy-dynamic/dynamic-bailout-to-csr.js
generated
vendored
Normal file
15
node_modules/next/dist/esm/shared/lib/lazy-dynamic/dynamic-bailout-to-csr.js
generated
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
"use client";
|
||||
|
||||
import { BailoutToCSRError } from "./bailout-to-csr";
|
||||
/**
|
||||
* If rendered on the server, this component throws an error
|
||||
* to signal Next.js that it should bail out to client-side rendering instead.
|
||||
*/ export function BailoutToCSR(param) {
|
||||
let { reason, children } = param;
|
||||
if (typeof window === "undefined") {
|
||||
throw new BailoutToCSRError(reason);
|
||||
}
|
||||
return children;
|
||||
}
|
||||
|
||||
//# sourceMappingURL=dynamic-bailout-to-csr.js.map
|
||||
1
node_modules/next/dist/esm/shared/lib/lazy-dynamic/dynamic-bailout-to-csr.js.map
generated
vendored
Normal file
1
node_modules/next/dist/esm/shared/lib/lazy-dynamic/dynamic-bailout-to-csr.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../../src/shared/lib/lazy-dynamic/dynamic-bailout-to-csr.tsx"],"names":["BailoutToCSRError","BailoutToCSR","reason","children","window"],"mappings":"AAAA;AAGA,SAASA,iBAAiB,QAAQ,mBAAkB;AAOpD;;;CAGC,GACD,OAAO,SAASC,aAAa,KAAuC;IAAvC,IAAA,EAAEC,MAAM,EAAEC,QAAQ,EAAqB,GAAvC;IAC3B,IAAI,OAAOC,WAAW,aAAa;QACjC,MAAM,IAAIJ,kBAAkBE;IAC9B;IAEA,OAAOC;AACT"}
|
||||
63
node_modules/next/dist/esm/shared/lib/lazy-dynamic/loadable.js
generated
vendored
Normal file
63
node_modules/next/dist/esm/shared/lib/lazy-dynamic/loadable.js
generated
vendored
Normal file
@ -0,0 +1,63 @@
|
||||
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
||||
import { Suspense, lazy } from "react";
|
||||
import { BailoutToCSR } from "./dynamic-bailout-to-csr";
|
||||
import { PreloadCss } from "./preload-css";
|
||||
// Normalize loader to return the module as form { default: Component } for `React.lazy`.
|
||||
// Also for backward compatible since next/dynamic allows to resolve a component directly with loader
|
||||
// Client component reference proxy need to be converted to a module.
|
||||
function convertModule(mod) {
|
||||
// Check "default" prop before accessing it, as it could be client reference proxy that could break it reference.
|
||||
// Cases:
|
||||
// mod: { default: Component }
|
||||
// mod: Component
|
||||
// mod: { $$typeof, default: proxy(Component) }
|
||||
// mod: proxy(Component)
|
||||
const hasDefault = mod && "default" in mod;
|
||||
return {
|
||||
default: hasDefault ? mod.default : mod
|
||||
};
|
||||
}
|
||||
const defaultOptions = {
|
||||
loader: ()=>Promise.resolve(convertModule(()=>null)),
|
||||
loading: null,
|
||||
ssr: true
|
||||
};
|
||||
function Loadable(options) {
|
||||
const opts = {
|
||||
...defaultOptions,
|
||||
...options
|
||||
};
|
||||
const Lazy = /*#__PURE__*/ lazy(()=>opts.loader().then(convertModule));
|
||||
const Loading = opts.loading;
|
||||
function LoadableComponent(props) {
|
||||
const fallbackElement = Loading ? /*#__PURE__*/ _jsx(Loading, {
|
||||
isLoading: true,
|
||||
pastDelay: true,
|
||||
error: null
|
||||
}) : null;
|
||||
const children = opts.ssr ? /*#__PURE__*/ _jsxs(_Fragment, {
|
||||
children: [
|
||||
typeof window === "undefined" ? /*#__PURE__*/ _jsx(PreloadCss, {
|
||||
moduleIds: opts.modules
|
||||
}) : null,
|
||||
/*#__PURE__*/ _jsx(Lazy, {
|
||||
...props
|
||||
})
|
||||
]
|
||||
}) : /*#__PURE__*/ _jsx(BailoutToCSR, {
|
||||
reason: "next/dynamic",
|
||||
children: /*#__PURE__*/ _jsx(Lazy, {
|
||||
...props
|
||||
})
|
||||
});
|
||||
return /*#__PURE__*/ _jsx(Suspense, {
|
||||
fallback: fallbackElement,
|
||||
children: children
|
||||
});
|
||||
}
|
||||
LoadableComponent.displayName = "LoadableComponent";
|
||||
return LoadableComponent;
|
||||
}
|
||||
export default Loadable;
|
||||
|
||||
//# sourceMappingURL=loadable.js.map
|
||||
1
node_modules/next/dist/esm/shared/lib/lazy-dynamic/loadable.js.map
generated
vendored
Normal file
1
node_modules/next/dist/esm/shared/lib/lazy-dynamic/loadable.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../../src/shared/lib/lazy-dynamic/loadable.tsx"],"names":["Suspense","lazy","BailoutToCSR","PreloadCss","convertModule","mod","hasDefault","default","defaultOptions","loader","Promise","resolve","loading","ssr","Loadable","options","opts","Lazy","then","Loading","LoadableComponent","props","fallbackElement","isLoading","pastDelay","error","children","window","moduleIds","modules","reason","fallback","displayName"],"mappings":";AAAA,SAASA,QAAQ,EAAEC,IAAI,QAAQ,QAAO;AACtC,SAASC,YAAY,QAAQ,2BAA0B;AAEvD,SAASC,UAAU,QAAQ,gBAAe;AAE1C,yFAAyF;AACzF,qGAAqG;AACrG,qEAAqE;AACrE,SAASC,cACPC,GAA4D;IAI5D,iHAAiH;IACjH,SAAS;IACT,8BAA8B;IAC9B,iBAAiB;IACjB,+CAA+C;IAC/C,wBAAwB;IACxB,MAAMC,aAAaD,OAAO,aAAaA;IACvC,OAAO;QACLE,SAASD,aACL,AAACD,IAA2BE,OAAO,GAClCF;IACP;AACF;AAEA,MAAMG,iBAAiB;IACrBC,QAAQ,IAAMC,QAAQC,OAAO,CAACP,cAAc,IAAM;IAClDQ,SAAS;IACTC,KAAK;AACP;AASA,SAASC,SAASC,OAAwB;IACxC,MAAMC,OAAO;QAAE,GAAGR,cAAc;QAAE,GAAGO,OAAO;IAAC;IAC7C,MAAME,qBAAOhB,KAAK,IAAMe,KAAKP,MAAM,GAAGS,IAAI,CAACd;IAC3C,MAAMe,UAAUH,KAAKJ,OAAO;IAE5B,SAASQ,kBAAkBC,KAAU;QACnC,MAAMC,kBAAkBH,wBACtB,KAACA;YAAQI,WAAW;YAAMC,WAAW;YAAMC,OAAO;aAChD;QAEJ,MAAMC,WAAWV,KAAKH,GAAG,iBACvB;;gBAEG,OAAOc,WAAW,4BACjB,KAACxB;oBAAWyB,WAAWZ,KAAKa,OAAO;qBACjC;8BACJ,KAACZ;oBAAM,GAAGI,KAAK;;;2BAGjB,KAACnB;YAAa4B,QAAO;sBACnB,cAAA,KAACb;gBAAM,GAAGI,KAAK;;;QAInB,qBAAO,KAACrB;YAAS+B,UAAUT;sBAAkBI;;IAC/C;IAEAN,kBAAkBY,WAAW,GAAG;IAEhC,OAAOZ;AACT;AAEA,eAAeN,SAAQ"}
|
||||
39
node_modules/next/dist/esm/shared/lib/lazy-dynamic/preload-css.js
generated
vendored
Normal file
39
node_modules/next/dist/esm/shared/lib/lazy-dynamic/preload-css.js
generated
vendored
Normal file
@ -0,0 +1,39 @@
|
||||
"use client";
|
||||
|
||||
import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
|
||||
import { getExpectedRequestStore } from "../../../client/components/request-async-storage.external";
|
||||
export function PreloadCss(param) {
|
||||
let { moduleIds } = param;
|
||||
// Early return in client compilation and only load requestStore on server side
|
||||
if (typeof window !== "undefined") {
|
||||
return null;
|
||||
}
|
||||
const requestStore = getExpectedRequestStore("next/dynamic css");
|
||||
const allFiles = [];
|
||||
// Search the current dynamic call unique key id in react loadable manifest,
|
||||
// and find the corresponding CSS files to preload
|
||||
if (requestStore.reactLoadableManifest && moduleIds) {
|
||||
const manifest = requestStore.reactLoadableManifest;
|
||||
for (const key of moduleIds){
|
||||
if (!manifest[key]) continue;
|
||||
const cssFiles = manifest[key].files.filter((file)=>file.endsWith(".css"));
|
||||
allFiles.push(...cssFiles);
|
||||
}
|
||||
}
|
||||
if (allFiles.length === 0) {
|
||||
return null;
|
||||
}
|
||||
return /*#__PURE__*/ _jsx(_Fragment, {
|
||||
children: allFiles.map((file)=>{
|
||||
return /*#__PURE__*/ _jsx("link", {
|
||||
// @ts-ignore
|
||||
precedence: "dynamic",
|
||||
rel: "stylesheet",
|
||||
href: requestStore.assetPrefix + "/_next/" + encodeURI(file),
|
||||
as: "style"
|
||||
}, file);
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
//# sourceMappingURL=preload-css.js.map
|
||||
1
node_modules/next/dist/esm/shared/lib/lazy-dynamic/preload-css.js.map
generated
vendored
Normal file
1
node_modules/next/dist/esm/shared/lib/lazy-dynamic/preload-css.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../../src/shared/lib/lazy-dynamic/preload-css.tsx"],"names":["getExpectedRequestStore","PreloadCss","moduleIds","window","requestStore","allFiles","reactLoadableManifest","manifest","key","cssFiles","files","filter","file","endsWith","push","length","map","link","precedence","rel","href","assetPrefix","encodeURI","as"],"mappings":"AAAA;;AAEA,SAASA,uBAAuB,QAAQ,4DAA2D;AAEnG,OAAO,SAASC,WAAW,KAAkD;IAAlD,IAAA,EAAEC,SAAS,EAAuC,GAAlD;IACzB,+EAA+E;IAC/E,IAAI,OAAOC,WAAW,aAAa;QACjC,OAAO;IACT;IAEA,MAAMC,eAAeJ,wBAAwB;IAC7C,MAAMK,WAAW,EAAE;IAEnB,4EAA4E;IAC5E,kDAAkD;IAClD,IAAID,aAAaE,qBAAqB,IAAIJ,WAAW;QACnD,MAAMK,WAAWH,aAAaE,qBAAqB;QACnD,KAAK,MAAME,OAAON,UAAW;YAC3B,IAAI,CAACK,QAAQ,CAACC,IAAI,EAAE;YACpB,MAAMC,WAAWF,QAAQ,CAACC,IAAI,CAACE,KAAK,CAACC,MAAM,CAAC,CAACC,OAC3CA,KAAKC,QAAQ,CAAC;YAEhBR,SAASS,IAAI,IAAIL;QACnB;IACF;IAEA,IAAIJ,SAASU,MAAM,KAAK,GAAG;QACzB,OAAO;IACT;IAEA,qBACE;kBACGV,SAASW,GAAG,CAAC,CAACJ;YACb,qBACE,KAACK;gBAEC,aAAa;gBACbC,YAAY;gBACZC,KAAI;gBACJC,MAAM,AAAGhB,aAAaiB,WAAW,GAAC,YAASC,UAAUV;gBACrDW,IAAG;eALEX;QAQX;;AAGN"}
|
||||
3
node_modules/next/dist/esm/shared/lib/lazy-dynamic/types.js
generated
vendored
Normal file
3
node_modules/next/dist/esm/shared/lib/lazy-dynamic/types.js
generated
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
export { };
|
||||
|
||||
//# sourceMappingURL=types.js.map
|
||||
1
node_modules/next/dist/esm/shared/lib/lazy-dynamic/types.js.map
generated
vendored
Normal file
1
node_modules/next/dist/esm/shared/lib/lazy-dynamic/types.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../../src/shared/lib/lazy-dynamic/types.ts"],"names":[],"mappings":"AAaA,WAMC"}
|
||||
9
node_modules/next/dist/esm/shared/lib/loadable-context.shared-runtime.js
generated
vendored
Normal file
9
node_modules/next/dist/esm/shared/lib/loadable-context.shared-runtime.js
generated
vendored
Normal file
@ -0,0 +1,9 @@
|
||||
"use client";
|
||||
|
||||
import React from "react";
|
||||
export const LoadableContext = React.createContext(null);
|
||||
if (process.env.NODE_ENV !== "production") {
|
||||
LoadableContext.displayName = "LoadableContext";
|
||||
}
|
||||
|
||||
//# sourceMappingURL=loadable-context.shared-runtime.js.map
|
||||
1
node_modules/next/dist/esm/shared/lib/loadable-context.shared-runtime.js.map
generated
vendored
Normal file
1
node_modules/next/dist/esm/shared/lib/loadable-context.shared-runtime.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../src/shared/lib/loadable-context.shared-runtime.ts"],"names":["React","LoadableContext","createContext","process","env","NODE_ENV","displayName"],"mappings":"AAAA;AAEA,OAAOA,WAAW,QAAO;AAIzB,OAAO,MAAMC,kBAAkBD,MAAME,aAAa,CAAmB,MAAK;AAE1E,IAAIC,QAAQC,GAAG,CAACC,QAAQ,KAAK,cAAc;IACzCJ,gBAAgBK,WAAW,GAAG;AAChC"}
|
||||
237
node_modules/next/dist/esm/shared/lib/loadable.shared-runtime.js
generated
vendored
Normal file
237
node_modules/next/dist/esm/shared/lib/loadable.shared-runtime.js
generated
vendored
Normal file
@ -0,0 +1,237 @@
|
||||
// TODO: Remove use of `any` type.
|
||||
/**
|
||||
@copyright (c) 2017-present James Kyle <me@thejameskyle.com>
|
||||
MIT License
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
"Software"), to deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish,
|
||||
distribute, sublicense, and/or sell copies of the Software, and to
|
||||
permit persons to whom the Software is furnished to do so, subject to
|
||||
the following conditions:
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE
|
||||
*/ // https://github.com/jamiebuilds/react-loadable/blob/v5.5.0/src/index.js
|
||||
// Modified to be compatible with webpack 4 / Next.js
|
||||
import React from "react";
|
||||
import { LoadableContext } from "./loadable-context.shared-runtime";
|
||||
function resolve(obj) {
|
||||
return obj && obj.default ? obj.default : obj;
|
||||
}
|
||||
const ALL_INITIALIZERS = [];
|
||||
const READY_INITIALIZERS = [];
|
||||
let initialized = false;
|
||||
function load(loader) {
|
||||
let promise = loader();
|
||||
let state = {
|
||||
loading: true,
|
||||
loaded: null,
|
||||
error: null
|
||||
};
|
||||
state.promise = promise.then((loaded)=>{
|
||||
state.loading = false;
|
||||
state.loaded = loaded;
|
||||
return loaded;
|
||||
}).catch((err)=>{
|
||||
state.loading = false;
|
||||
state.error = err;
|
||||
throw err;
|
||||
});
|
||||
return state;
|
||||
}
|
||||
function createLoadableComponent(loadFn, options) {
|
||||
let opts = Object.assign({
|
||||
loader: null,
|
||||
loading: null,
|
||||
delay: 200,
|
||||
timeout: null,
|
||||
webpack: null,
|
||||
modules: null
|
||||
}, options);
|
||||
/** @type LoadableSubscription */ let subscription = null;
|
||||
function init() {
|
||||
if (!subscription) {
|
||||
// eslint-disable-next-line @typescript-eslint/no-use-before-define
|
||||
const sub = new LoadableSubscription(loadFn, opts);
|
||||
subscription = {
|
||||
getCurrentValue: sub.getCurrentValue.bind(sub),
|
||||
subscribe: sub.subscribe.bind(sub),
|
||||
retry: sub.retry.bind(sub),
|
||||
promise: sub.promise.bind(sub)
|
||||
};
|
||||
}
|
||||
return subscription.promise();
|
||||
}
|
||||
// Server only
|
||||
if (typeof window === "undefined") {
|
||||
ALL_INITIALIZERS.push(init);
|
||||
}
|
||||
// Client only
|
||||
if (!initialized && typeof window !== "undefined") {
|
||||
// require.resolveWeak check is needed for environments that don't have it available like Jest
|
||||
const moduleIds = opts.webpack && typeof require.resolveWeak === "function" ? opts.webpack() : opts.modules;
|
||||
if (moduleIds) {
|
||||
READY_INITIALIZERS.push((ids)=>{
|
||||
for (const moduleId of moduleIds){
|
||||
if (ids.includes(moduleId)) {
|
||||
return init();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
function useLoadableModule() {
|
||||
init();
|
||||
const context = React.useContext(LoadableContext);
|
||||
if (context && Array.isArray(opts.modules)) {
|
||||
opts.modules.forEach((moduleName)=>{
|
||||
context(moduleName);
|
||||
});
|
||||
}
|
||||
}
|
||||
function LoadableComponent(props, ref) {
|
||||
useLoadableModule();
|
||||
const state = React.useSyncExternalStore(subscription.subscribe, subscription.getCurrentValue, subscription.getCurrentValue);
|
||||
React.useImperativeHandle(ref, ()=>({
|
||||
retry: subscription.retry
|
||||
}), []);
|
||||
return React.useMemo(()=>{
|
||||
if (state.loading || state.error) {
|
||||
return /*#__PURE__*/ React.createElement(opts.loading, {
|
||||
isLoading: state.loading,
|
||||
pastDelay: state.pastDelay,
|
||||
timedOut: state.timedOut,
|
||||
error: state.error,
|
||||
retry: subscription.retry
|
||||
});
|
||||
} else if (state.loaded) {
|
||||
return /*#__PURE__*/ React.createElement(resolve(state.loaded), props);
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}, [
|
||||
props,
|
||||
state
|
||||
]);
|
||||
}
|
||||
LoadableComponent.preload = ()=>init();
|
||||
LoadableComponent.displayName = "LoadableComponent";
|
||||
return /*#__PURE__*/ React.forwardRef(LoadableComponent);
|
||||
}
|
||||
class LoadableSubscription {
|
||||
promise() {
|
||||
return this._res.promise;
|
||||
}
|
||||
retry() {
|
||||
this._clearTimeouts();
|
||||
this._res = this._loadFn(this._opts.loader);
|
||||
this._state = {
|
||||
pastDelay: false,
|
||||
timedOut: false
|
||||
};
|
||||
const { _res: res, _opts: opts } = this;
|
||||
if (res.loading) {
|
||||
if (typeof opts.delay === "number") {
|
||||
if (opts.delay === 0) {
|
||||
this._state.pastDelay = true;
|
||||
} else {
|
||||
this._delay = setTimeout(()=>{
|
||||
this._update({
|
||||
pastDelay: true
|
||||
});
|
||||
}, opts.delay);
|
||||
}
|
||||
}
|
||||
if (typeof opts.timeout === "number") {
|
||||
this._timeout = setTimeout(()=>{
|
||||
this._update({
|
||||
timedOut: true
|
||||
});
|
||||
}, opts.timeout);
|
||||
}
|
||||
}
|
||||
this._res.promise.then(()=>{
|
||||
this._update({});
|
||||
this._clearTimeouts();
|
||||
}).catch((_err)=>{
|
||||
this._update({});
|
||||
this._clearTimeouts();
|
||||
});
|
||||
this._update({});
|
||||
}
|
||||
_update(partial) {
|
||||
this._state = {
|
||||
...this._state,
|
||||
error: this._res.error,
|
||||
loaded: this._res.loaded,
|
||||
loading: this._res.loading,
|
||||
...partial
|
||||
};
|
||||
this._callbacks.forEach((callback)=>callback());
|
||||
}
|
||||
_clearTimeouts() {
|
||||
clearTimeout(this._delay);
|
||||
clearTimeout(this._timeout);
|
||||
}
|
||||
getCurrentValue() {
|
||||
return this._state;
|
||||
}
|
||||
subscribe(callback) {
|
||||
this._callbacks.add(callback);
|
||||
return ()=>{
|
||||
this._callbacks.delete(callback);
|
||||
};
|
||||
}
|
||||
constructor(loadFn, opts){
|
||||
this._loadFn = loadFn;
|
||||
this._opts = opts;
|
||||
this._callbacks = new Set();
|
||||
this._delay = null;
|
||||
this._timeout = null;
|
||||
this.retry();
|
||||
}
|
||||
}
|
||||
function Loadable(opts) {
|
||||
return createLoadableComponent(load, opts);
|
||||
}
|
||||
function flushInitializers(initializers, ids) {
|
||||
let promises = [];
|
||||
while(initializers.length){
|
||||
let init = initializers.pop();
|
||||
promises.push(init(ids));
|
||||
}
|
||||
return Promise.all(promises).then(()=>{
|
||||
if (initializers.length) {
|
||||
return flushInitializers(initializers, ids);
|
||||
}
|
||||
});
|
||||
}
|
||||
Loadable.preloadAll = ()=>{
|
||||
return new Promise((resolveInitializers, reject)=>{
|
||||
flushInitializers(ALL_INITIALIZERS).then(resolveInitializers, reject);
|
||||
});
|
||||
};
|
||||
Loadable.preloadReady = (ids)=>{
|
||||
if (ids === void 0) ids = [];
|
||||
return new Promise((resolvePreload)=>{
|
||||
const res = ()=>{
|
||||
initialized = true;
|
||||
return resolvePreload();
|
||||
};
|
||||
// We always will resolve, errors should be handled within loading UIs.
|
||||
flushInitializers(READY_INITIALIZERS, ids).then(res, res);
|
||||
});
|
||||
};
|
||||
if (typeof window !== "undefined") {
|
||||
window.__NEXT_PRELOADREADY = Loadable.preloadReady;
|
||||
}
|
||||
export default Loadable;
|
||||
|
||||
//# sourceMappingURL=loadable.shared-runtime.js.map
|
||||
1
node_modules/next/dist/esm/shared/lib/loadable.shared-runtime.js.map
generated
vendored
Normal file
1
node_modules/next/dist/esm/shared/lib/loadable.shared-runtime.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
77
node_modules/next/dist/esm/shared/lib/magic-identifier.js
generated
vendored
Normal file
77
node_modules/next/dist/esm/shared/lib/magic-identifier.js
generated
vendored
Normal file
@ -0,0 +1,77 @@
|
||||
function decodeHex(hexStr) {
|
||||
if (hexStr.trim() === "") {
|
||||
throw new Error("can't decode empty hex");
|
||||
}
|
||||
const num = parseInt(hexStr, 16);
|
||||
if (isNaN(num)) {
|
||||
throw new Error("invalid hex: `" + hexStr + "`");
|
||||
}
|
||||
return String.fromCodePoint(num);
|
||||
}
|
||||
var Mode;
|
||||
const DECODE_REGEX = /^__TURBOPACK__([a-zA-Z0-9_$]+)__$/;
|
||||
export function decodeMagicIdentifier(identifier) {
|
||||
const matches = identifier.match(DECODE_REGEX);
|
||||
if (!matches) {
|
||||
return identifier;
|
||||
}
|
||||
const inner = matches[1];
|
||||
let output = "";
|
||||
let mode = 0;
|
||||
let buffer = "";
|
||||
for(let i = 0; i < inner.length; i++){
|
||||
const char = inner[i];
|
||||
if (mode === 0) {
|
||||
if (char === "_") {
|
||||
mode = 1;
|
||||
} else if (char === "$") {
|
||||
mode = 2;
|
||||
} else {
|
||||
output += char;
|
||||
}
|
||||
} else if (mode === 1) {
|
||||
if (char === "_") {
|
||||
output += " ";
|
||||
mode = 0;
|
||||
} else if (char === "$") {
|
||||
output += "_";
|
||||
mode = 2;
|
||||
} else {
|
||||
output += char;
|
||||
mode = 0;
|
||||
}
|
||||
} else if (mode === 2) {
|
||||
if (buffer.length === 2) {
|
||||
output += decodeHex(buffer);
|
||||
buffer = "";
|
||||
}
|
||||
if (char === "_") {
|
||||
if (buffer !== "") {
|
||||
throw new Error("invalid hex: `" + buffer + "`");
|
||||
}
|
||||
mode = 3;
|
||||
} else if (char === "$") {
|
||||
if (buffer !== "") {
|
||||
throw new Error("invalid hex: `" + buffer + "`");
|
||||
}
|
||||
mode = 0;
|
||||
} else {
|
||||
buffer += char;
|
||||
}
|
||||
} else if (mode === 3) {
|
||||
if (char === "_") {
|
||||
throw new Error("invalid hex: `" + (buffer + char) + "`");
|
||||
} else if (char === "$") {
|
||||
output += decodeHex(buffer);
|
||||
buffer = "";
|
||||
mode = 0;
|
||||
} else {
|
||||
buffer += char;
|
||||
}
|
||||
}
|
||||
}
|
||||
return output;
|
||||
}
|
||||
export const MAGIC_IDENTIFIER_REGEX = /__TURBOPACK__[a-zA-Z0-9_$]+__/g;
|
||||
|
||||
//# sourceMappingURL=magic-identifier.js.map
|
||||
1
node_modules/next/dist/esm/shared/lib/magic-identifier.js.map
generated
vendored
Normal file
1
node_modules/next/dist/esm/shared/lib/magic-identifier.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../src/shared/lib/magic-identifier.ts"],"names":["decodeHex","hexStr","trim","Error","num","parseInt","isNaN","String","fromCodePoint","DECODE_REGEX","decodeMagicIdentifier","identifier","matches","match","inner","output","mode","buffer","i","length","char","MAGIC_IDENTIFIER_REGEX"],"mappings":"AAAA,SAASA,UAAUC,MAAc;IAC/B,IAAIA,OAAOC,IAAI,OAAO,IAAI;QACxB,MAAM,IAAIC,MAAM;IAClB;IAEA,MAAMC,MAAMC,SAASJ,QAAQ;IAC7B,IAAIK,MAAMF,MAAM;QACd,MAAM,IAAID,MAAM,AAAC,mBAAiBF,SAAO;IAC3C;IAEA,OAAOM,OAAOC,aAAa,CAACJ;AAC9B;;AASA,MAAMK,eAAe;AAErB,OAAO,SAASC,sBAAsBC,UAAkB;IACtD,MAAMC,UAAUD,WAAWE,KAAK,CAACJ;IACjC,IAAI,CAACG,SAAS;QACZ,OAAOD;IACT;IAEA,MAAMG,QAAQF,OAAO,CAAC,EAAE;IAExB,IAAIG,SAAS;IAEb,IAAIC;IACJ,IAAIC,SAAS;IACb,IAAK,IAAIC,IAAI,GAAGA,IAAIJ,MAAMK,MAAM,EAAED,IAAK;QACrC,MAAME,OAAON,KAAK,CAACI,EAAE;QAErB,IAAIF,YAAoB;YACtB,IAAII,SAAS,KAAK;gBAChBJ;YACF,OAAO,IAAII,SAAS,KAAK;gBACvBJ;YACF,OAAO;gBACLD,UAAUK;YACZ;QACF,OAAO,IAAIJ,YAA0B;YACnC,IAAII,SAAS,KAAK;gBAChBL,UAAU;gBACVC;YACF,OAAO,IAAII,SAAS,KAAK;gBACvBL,UAAU;gBACVC;YACF,OAAO;gBACLD,UAAUK;gBACVJ;YACF;QACF,OAAO,IAAIA,YAAmB;YAC5B,IAAIC,OAAOE,MAAM,KAAK,GAAG;gBACvBJ,UAAUf,UAAUiB;gBACpBA,SAAS;YACX;YAEA,IAAIG,SAAS,KAAK;gBAChB,IAAIH,WAAW,IAAI;oBACjB,MAAM,IAAId,MAAM,AAAC,mBAAiBc,SAAO;gBAC3C;gBAEAD;YACF,OAAO,IAAII,SAAS,KAAK;gBACvB,IAAIH,WAAW,IAAI;oBACjB,MAAM,IAAId,MAAM,AAAC,mBAAiBc,SAAO;gBAC3C;gBAEAD;YACF,OAAO;gBACLC,UAAUG;YACZ;QACF,OAAO,IAAIJ,YAAuB;YAChC,IAAII,SAAS,KAAK;gBAChB,MAAM,IAAIjB,MAAM,AAAC,mBAAiBc,CAAAA,SAASG,IAAG,IAAE;YAClD,OAAO,IAAIA,SAAS,KAAK;gBACvBL,UAAUf,UAAUiB;gBACpBA,SAAS;gBAETD;YACF,OAAO;gBACLC,UAAUG;YACZ;QACF;IACF;IAEA,OAAOL;AACT;AAEA,OAAO,MAAMM,yBAAyB,iCAAgC"}
|
||||
33
node_modules/next/dist/esm/shared/lib/match-remote-pattern.js
generated
vendored
Normal file
33
node_modules/next/dist/esm/shared/lib/match-remote-pattern.js
generated
vendored
Normal file
@ -0,0 +1,33 @@
|
||||
import { makeRe } from "next/dist/compiled/picomatch";
|
||||
export function matchRemotePattern(pattern, url) {
|
||||
if (pattern.protocol !== undefined) {
|
||||
const actualProto = url.protocol.slice(0, -1);
|
||||
if (pattern.protocol !== actualProto) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
if (pattern.port !== undefined) {
|
||||
if (pattern.port !== url.port) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
if (pattern.hostname === undefined) {
|
||||
throw new Error("Pattern should define hostname but found\n" + JSON.stringify(pattern));
|
||||
} else {
|
||||
if (!makeRe(pattern.hostname).test(url.hostname)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
var _pattern_pathname;
|
||||
if (!makeRe((_pattern_pathname = pattern.pathname) != null ? _pattern_pathname : "**", {
|
||||
dot: true
|
||||
}).test(url.pathname)) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
export function hasMatch(domains, remotePatterns, url) {
|
||||
return domains.some((domain)=>url.hostname === domain) || remotePatterns.some((p)=>matchRemotePattern(p, url));
|
||||
}
|
||||
|
||||
//# sourceMappingURL=match-remote-pattern.js.map
|
||||
1
node_modules/next/dist/esm/shared/lib/match-remote-pattern.js.map
generated
vendored
Normal file
1
node_modules/next/dist/esm/shared/lib/match-remote-pattern.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../src/shared/lib/match-remote-pattern.ts"],"names":["makeRe","matchRemotePattern","pattern","url","protocol","undefined","actualProto","slice","port","hostname","Error","JSON","stringify","test","pathname","dot","hasMatch","domains","remotePatterns","some","domain","p"],"mappings":"AACA,SAASA,MAAM,QAAQ,+BAA8B;AAErD,OAAO,SAASC,mBAAmBC,OAAsB,EAAEC,GAAQ;IACjE,IAAID,QAAQE,QAAQ,KAAKC,WAAW;QAClC,MAAMC,cAAcH,IAAIC,QAAQ,CAACG,KAAK,CAAC,GAAG,CAAC;QAC3C,IAAIL,QAAQE,QAAQ,KAAKE,aAAa;YACpC,OAAO;QACT;IACF;IACA,IAAIJ,QAAQM,IAAI,KAAKH,WAAW;QAC9B,IAAIH,QAAQM,IAAI,KAAKL,IAAIK,IAAI,EAAE;YAC7B,OAAO;QACT;IACF;IAEA,IAAIN,QAAQO,QAAQ,KAAKJ,WAAW;QAClC,MAAM,IAAIK,MACR,AAAC,+CAA4CC,KAAKC,SAAS,CAACV;IAEhE,OAAO;QACL,IAAI,CAACF,OAAOE,QAAQO,QAAQ,EAAEI,IAAI,CAACV,IAAIM,QAAQ,GAAG;YAChD,OAAO;QACT;IACF;QAEYP;IAAZ,IAAI,CAACF,OAAOE,CAAAA,oBAAAA,QAAQY,QAAQ,YAAhBZ,oBAAoB,MAAM;QAAEa,KAAK;IAAK,GAAGF,IAAI,CAACV,IAAIW,QAAQ,GAAG;QACvE,OAAO;IACT;IAEA,OAAO;AACT;AAEA,OAAO,SAASE,SACdC,OAAiB,EACjBC,cAA+B,EAC/Bf,GAAQ;IAER,OACEc,QAAQE,IAAI,CAAC,CAACC,SAAWjB,IAAIM,QAAQ,KAAKW,WAC1CF,eAAeC,IAAI,CAAC,CAACE,IAAMpB,mBAAmBoB,GAAGlB;AAErD"}
|
||||
36
node_modules/next/dist/esm/shared/lib/mitt.js
generated
vendored
Normal file
36
node_modules/next/dist/esm/shared/lib/mitt.js
generated
vendored
Normal file
@ -0,0 +1,36 @@
|
||||
/*
|
||||
MIT License
|
||||
|
||||
Copyright (c) Jason Miller (https://jasonformat.com/)
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/ // This file is based on https://github.com/developit/mitt/blob/v1.1.3/src/index.js
|
||||
// It's been edited for the needs of this script
|
||||
// See the LICENSE at the top of the file
|
||||
export default function mitt() {
|
||||
const all = Object.create(null);
|
||||
return {
|
||||
on (type, handler) {
|
||||
(all[type] || (all[type] = [])).push(handler);
|
||||
},
|
||||
off (type, handler) {
|
||||
if (all[type]) {
|
||||
all[type].splice(all[type].indexOf(handler) >>> 0, 1);
|
||||
}
|
||||
},
|
||||
emit (type) {
|
||||
for(var _len = arguments.length, evts = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++){
|
||||
evts[_key - 1] = arguments[_key];
|
||||
}
|
||||
(all[type] || []).slice().map((handler)=>{
|
||||
handler(...evts);
|
||||
});
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
//# sourceMappingURL=mitt.js.map
|
||||
1
node_modules/next/dist/esm/shared/lib/mitt.js.map
generated
vendored
Normal file
1
node_modules/next/dist/esm/shared/lib/mitt.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../src/shared/lib/mitt.ts"],"names":["mitt","all","Object","create","on","type","handler","push","off","splice","indexOf","emit","evts","slice","map"],"mappings":"AAAA;;;;;;;;;;AAUA,GAEA,mFAAmF;AACnF,gDAAgD;AAChD,yCAAyC;AAUzC,eAAe,SAASA;IACtB,MAAMC,MAAkCC,OAAOC,MAAM,CAAC;IAEtD,OAAO;QACLC,IAAGC,IAAY,EAAEC,OAAgB;YAC7BL,CAAAA,GAAG,CAACI,KAAK,IAAKJ,CAAAA,GAAG,CAACI,KAAK,GAAG,EAAE,AAAD,CAAC,EAAGE,IAAI,CAACD;QACxC;QAEAE,KAAIH,IAAY,EAAEC,OAAgB;YAChC,IAAIL,GAAG,CAACI,KAAK,EAAE;gBACbJ,GAAG,CAACI,KAAK,CAACI,MAAM,CAACR,GAAG,CAACI,KAAK,CAACK,OAAO,CAACJ,aAAa,GAAG;YACrD;QACF;QAEAK,MAAKN,IAAY;YAAE,IAAA,IAAA,OAAA,UAAA,QAAA,AAAGO,OAAH,UAAA,OAAA,IAAA,OAAA,QAAA,OAAA,GAAA,OAAA,MAAA;gBAAGA,KAAH,OAAA,KAAA,SAAA,CAAA,KAAc;;YAE7BX,CAAAA,GAAG,CAACI,KAAK,IAAI,EAAE,AAAD,EAAGQ,KAAK,GAAGC,GAAG,CAAC,CAACR;gBAC9BA,WAAWM;YACb;QACF;IACF;AACF"}
|
||||
10
node_modules/next/dist/esm/shared/lib/modern-browserslist-target.d.ts
generated
vendored
Normal file
10
node_modules/next/dist/esm/shared/lib/modern-browserslist-target.d.ts
generated
vendored
Normal file
@ -0,0 +1,10 @@
|
||||
// Keep in sync with the `.js` file.
|
||||
declare const MODERN_BROWSERSLIST_TARGET: [
|
||||
'chrome 64',
|
||||
'edge 79',
|
||||
'firefox 67',
|
||||
'opera 51',
|
||||
'safari 12'
|
||||
]
|
||||
|
||||
export default MODERN_BROWSERSLIST_TARGET
|
||||
17
node_modules/next/dist/esm/shared/lib/modern-browserslist-target.js
generated
vendored
Normal file
17
node_modules/next/dist/esm/shared/lib/modern-browserslist-target.js
generated
vendored
Normal file
@ -0,0 +1,17 @@
|
||||
// Note: This file is JS because it's used by the taskfile-swc.js file, which is JS.
|
||||
// Keep file changes in sync with the corresponding `.d.ts` files.
|
||||
/**
|
||||
* These are the browser versions that support all of the following:
|
||||
* static import: https://caniuse.com/es6-module
|
||||
* dynamic import: https://caniuse.com/es6-module-dynamic-import
|
||||
* import.meta: https://caniuse.com/mdn-javascript_operators_import_meta
|
||||
*/ const MODERN_BROWSERSLIST_TARGET = [
|
||||
"chrome 64",
|
||||
"edge 79",
|
||||
"firefox 67",
|
||||
"opera 51",
|
||||
"safari 12"
|
||||
];
|
||||
module.exports = MODERN_BROWSERSLIST_TARGET;
|
||||
|
||||
//# sourceMappingURL=modern-browserslist-target.js.map
|
||||
1
node_modules/next/dist/esm/shared/lib/modern-browserslist-target.js.map
generated
vendored
Normal file
1
node_modules/next/dist/esm/shared/lib/modern-browserslist-target.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../src/shared/lib/modern-browserslist-target.js"],"names":["MODERN_BROWSERSLIST_TARGET","module","exports"],"mappings":"AAAA,oFAAoF;AACpF,kEAAkE;AAClE;;;;;CAKC,GACD,MAAMA,6BAA6B;IACjC;IACA;IACA;IACA;IACA;CACD;AAEDC,OAAOC,OAAO,GAAGF"}
|
||||
18
node_modules/next/dist/esm/shared/lib/normalized-asset-prefix.js
generated
vendored
Normal file
18
node_modules/next/dist/esm/shared/lib/normalized-asset-prefix.js
generated
vendored
Normal file
@ -0,0 +1,18 @@
|
||||
export function normalizedAssetPrefix(assetPrefix) {
|
||||
// remove all leading slashes and trailing slashes
|
||||
const escapedAssetPrefix = (assetPrefix == null ? void 0 : assetPrefix.replace(/^\/+|\/+$/g, "")) || false;
|
||||
// if an assetPrefix was '/', we return empty string
|
||||
// because it could be an unnecessary trailing slash
|
||||
if (!escapedAssetPrefix) {
|
||||
return "";
|
||||
}
|
||||
if (URL.canParse(escapedAssetPrefix)) {
|
||||
const url = new URL(escapedAssetPrefix).toString();
|
||||
return url.endsWith("/") ? url.slice(0, -1) : url;
|
||||
}
|
||||
// assuming assetPrefix here is a pathname-style,
|
||||
// restore the leading slash
|
||||
return "/" + escapedAssetPrefix;
|
||||
}
|
||||
|
||||
//# sourceMappingURL=normalized-asset-prefix.js.map
|
||||
1
node_modules/next/dist/esm/shared/lib/normalized-asset-prefix.js.map
generated
vendored
Normal file
1
node_modules/next/dist/esm/shared/lib/normalized-asset-prefix.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../src/shared/lib/normalized-asset-prefix.ts"],"names":["normalizedAssetPrefix","assetPrefix","escapedAssetPrefix","replace","URL","canParse","url","toString","endsWith","slice"],"mappings":"AAAA,OAAO,SAASA,sBAAsBC,WAA+B;IACnE,kDAAkD;IAClD,MAAMC,qBAAqBD,CAAAA,+BAAAA,YAAaE,OAAO,CAAC,cAAc,QAAO;IAErE,oDAAoD;IACpD,oDAAoD;IACpD,IAAI,CAACD,oBAAoB;QACvB,OAAO;IACT;IAEA,IAAIE,IAAIC,QAAQ,CAACH,qBAAqB;QACpC,MAAMI,MAAM,IAAIF,IAAIF,oBAAoBK,QAAQ;QAChD,OAAOD,IAAIE,QAAQ,CAAC,OAAOF,IAAIG,KAAK,CAAC,GAAG,CAAC,KAAKH;IAChD;IAEA,iDAAiD;IACjD,4BAA4B;IAC5B,OAAO,AAAC,MAAGJ;AACb"}
|
||||
29
node_modules/next/dist/esm/shared/lib/page-path/absolute-path-to-page.js
generated
vendored
Normal file
29
node_modules/next/dist/esm/shared/lib/page-path/absolute-path-to-page.js
generated
vendored
Normal file
@ -0,0 +1,29 @@
|
||||
import { ensureLeadingSlash } from "./ensure-leading-slash";
|
||||
import { normalizePathSep } from "./normalize-path-sep";
|
||||
import path from "../isomorphic/path";
|
||||
import { removePagePathTail } from "./remove-page-path-tail";
|
||||
import { normalizeMetadataRoute } from "../../../lib/metadata/get-metadata-route";
|
||||
/**
|
||||
* Given the absolute path to the pages folder, an absolute file path for a
|
||||
* page and the page extensions, this function will return the page path
|
||||
* relative to the pages folder. It doesn't consider index tail. Example:
|
||||
* - `/Users/rick/my-project/pages/foo/bar/baz.js` -> `/foo/bar/baz`
|
||||
*
|
||||
* It also handles special metadata routes mapping. Example:
|
||||
* - `/Users/rick/my-project/app/sitemap.js` -> `/sitemap/route`
|
||||
*
|
||||
* @param filepath Absolute path to the page.
|
||||
* @param opts.dir Absolute path to the pages/app folder.
|
||||
* @param opts.extensions Extensions allowed for the page.
|
||||
* @param opts.keepIndex When true the trailing `index` kept in the path.
|
||||
* @param opts.pagesType Whether the page is in the pages or app directory.
|
||||
*/ export function absolutePathToPage(pagePath, options) {
|
||||
const isAppDir = options.pagesType === "app";
|
||||
const page = removePagePathTail(normalizePathSep(ensureLeadingSlash(path.relative(options.dir, pagePath))), {
|
||||
extensions: options.extensions,
|
||||
keepIndex: options.keepIndex
|
||||
});
|
||||
return isAppDir ? normalizeMetadataRoute(page) : page;
|
||||
}
|
||||
|
||||
//# sourceMappingURL=absolute-path-to-page.js.map
|
||||
1
node_modules/next/dist/esm/shared/lib/page-path/absolute-path-to-page.js.map
generated
vendored
Normal file
1
node_modules/next/dist/esm/shared/lib/page-path/absolute-path-to-page.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../../src/shared/lib/page-path/absolute-path-to-page.ts"],"names":["ensureLeadingSlash","normalizePathSep","path","removePagePathTail","normalizeMetadataRoute","absolutePathToPage","pagePath","options","isAppDir","pagesType","page","relative","dir","extensions","keepIndex"],"mappings":"AAAA,SAASA,kBAAkB,QAAQ,yBAAwB;AAC3D,SAASC,gBAAgB,QAAQ,uBAAsB;AACvD,OAAOC,UAAU,qBAAoB;AACrC,SAASC,kBAAkB,QAAQ,0BAAyB;AAC5D,SAASC,sBAAsB,QAAQ,2CAA0C;AAGjF;;;;;;;;;;;;;;CAcC,GACD,OAAO,SAASC,mBACdC,QAAgB,EAChBC,OAKC;IAED,MAAMC,WAAWD,QAAQE,SAAS,KAAK;IACvC,MAAMC,OAAOP,mBACXF,iBAAiBD,mBAAmBE,KAAKS,QAAQ,CAACJ,QAAQK,GAAG,EAAEN,aAC/D;QACEO,YAAYN,QAAQM,UAAU;QAC9BC,WAAWP,QAAQO,SAAS;IAC9B;IAEF,OAAON,WAAWJ,uBAAuBM,QAAQA;AACnD"}
|
||||
9
node_modules/next/dist/esm/shared/lib/page-path/denormalize-app-path.js
generated
vendored
Normal file
9
node_modules/next/dist/esm/shared/lib/page-path/denormalize-app-path.js
generated
vendored
Normal file
@ -0,0 +1,9 @@
|
||||
export function denormalizeAppPagePath(page) {
|
||||
// `/` is normalized to `/index`
|
||||
if (page === "/index") {
|
||||
return "/";
|
||||
}
|
||||
return page;
|
||||
}
|
||||
|
||||
//# sourceMappingURL=denormalize-app-path.js.map
|
||||
1
node_modules/next/dist/esm/shared/lib/page-path/denormalize-app-path.js.map
generated
vendored
Normal file
1
node_modules/next/dist/esm/shared/lib/page-path/denormalize-app-path.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../../src/shared/lib/page-path/denormalize-app-path.ts"],"names":["denormalizeAppPagePath","page"],"mappings":"AAAA,OAAO,SAASA,uBAAuBC,IAAY;IACjD,gCAAgC;IAChC,IAAIA,SAAS,UAAU;QACrB,OAAO;IACT;IAEA,OAAOA;AACT"}
|
||||
15
node_modules/next/dist/esm/shared/lib/page-path/denormalize-page-path.js
generated
vendored
Normal file
15
node_modules/next/dist/esm/shared/lib/page-path/denormalize-page-path.js
generated
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
import { isDynamicRoute } from "../router/utils";
|
||||
import { normalizePathSep } from "./normalize-path-sep";
|
||||
/**
|
||||
* Performs the opposite transformation of `normalizePagePath`. Note that
|
||||
* this function is not idempotent either in cases where there are multiple
|
||||
* leading `/index` for the page. Examples:
|
||||
* - `/index` -> `/`
|
||||
* - `/index/foo` -> `/foo`
|
||||
* - `/index/index` -> `/index`
|
||||
*/ export function denormalizePagePath(page) {
|
||||
let _page = normalizePathSep(page);
|
||||
return _page.startsWith("/index/") && !isDynamicRoute(_page) ? _page.slice(6) : _page !== "/index" ? _page : "/";
|
||||
}
|
||||
|
||||
//# sourceMappingURL=denormalize-page-path.js.map
|
||||
1
node_modules/next/dist/esm/shared/lib/page-path/denormalize-page-path.js.map
generated
vendored
Normal file
1
node_modules/next/dist/esm/shared/lib/page-path/denormalize-page-path.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../../src/shared/lib/page-path/denormalize-page-path.ts"],"names":["isDynamicRoute","normalizePathSep","denormalizePagePath","page","_page","startsWith","slice"],"mappings":"AAAA,SAASA,cAAc,QAAQ,kBAAiB;AAChD,SAASC,gBAAgB,QAAQ,uBAAsB;AAEvD;;;;;;;CAOC,GACD,OAAO,SAASC,oBAAoBC,IAAY;IAC9C,IAAIC,QAAQH,iBAAiBE;IAC7B,OAAOC,MAAMC,UAAU,CAAC,cAAc,CAACL,eAAeI,SAClDA,MAAME,KAAK,CAAC,KACZF,UAAU,WACVA,QACA;AACN"}
|
||||
8
node_modules/next/dist/esm/shared/lib/page-path/ensure-leading-slash.js
generated
vendored
Normal file
8
node_modules/next/dist/esm/shared/lib/page-path/ensure-leading-slash.js
generated
vendored
Normal file
@ -0,0 +1,8 @@
|
||||
/**
|
||||
* For a given page path, this function ensures that there is a leading slash.
|
||||
* If there is not a leading slash, one is added, otherwise it is noop.
|
||||
*/ export function ensureLeadingSlash(path) {
|
||||
return path.startsWith("/") ? path : "/" + path;
|
||||
}
|
||||
|
||||
//# sourceMappingURL=ensure-leading-slash.js.map
|
||||
1
node_modules/next/dist/esm/shared/lib/page-path/ensure-leading-slash.js.map
generated
vendored
Normal file
1
node_modules/next/dist/esm/shared/lib/page-path/ensure-leading-slash.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../../src/shared/lib/page-path/ensure-leading-slash.ts"],"names":["ensureLeadingSlash","path","startsWith"],"mappings":"AAAA;;;CAGC,GACD,OAAO,SAASA,mBAAmBC,IAAY;IAC7C,OAAOA,KAAKC,UAAU,CAAC,OAAOD,OAAO,AAAC,MAAGA;AAC3C"}
|
||||
40
node_modules/next/dist/esm/shared/lib/page-path/get-page-paths.js
generated
vendored
Normal file
40
node_modules/next/dist/esm/shared/lib/page-path/get-page-paths.js
generated
vendored
Normal file
@ -0,0 +1,40 @@
|
||||
import { denormalizePagePath } from "./denormalize-page-path";
|
||||
import path from "../isomorphic/path";
|
||||
/**
|
||||
* Calculate all possible pagePaths for a given normalized pagePath along with
|
||||
* allowed extensions. This can be used to check which one of the files exists
|
||||
* and to debug inspected locations.
|
||||
*
|
||||
* For pages, map `/route` to [`/route.[ext]`, `/route/index.[ext]`]
|
||||
* For app paths, map `/route/page` to [`/route/page.[ext]`] or `/route/route`
|
||||
* to [`/route/route.[ext]`]
|
||||
*
|
||||
* @param normalizedPagePath Normalized page path (it will denormalize).
|
||||
* @param extensions Allowed extensions.
|
||||
*/ export function getPagePaths(normalizedPagePath, extensions, isAppDir) {
|
||||
const page = denormalizePagePath(normalizedPagePath);
|
||||
let prefixes;
|
||||
if (isAppDir) {
|
||||
prefixes = [
|
||||
page
|
||||
];
|
||||
} else if (normalizedPagePath.endsWith("/index")) {
|
||||
prefixes = [
|
||||
path.join(page, "index")
|
||||
];
|
||||
} else {
|
||||
prefixes = [
|
||||
page,
|
||||
path.join(page, "index")
|
||||
];
|
||||
}
|
||||
const paths = [];
|
||||
for (const extension of extensions){
|
||||
for (const prefix of prefixes){
|
||||
paths.push(prefix + "." + extension);
|
||||
}
|
||||
}
|
||||
return paths;
|
||||
}
|
||||
|
||||
//# sourceMappingURL=get-page-paths.js.map
|
||||
1
node_modules/next/dist/esm/shared/lib/page-path/get-page-paths.js.map
generated
vendored
Normal file
1
node_modules/next/dist/esm/shared/lib/page-path/get-page-paths.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../../src/shared/lib/page-path/get-page-paths.ts"],"names":["denormalizePagePath","path","getPagePaths","normalizedPagePath","extensions","isAppDir","page","prefixes","endsWith","join","paths","extension","prefix","push"],"mappings":"AAAA,SAASA,mBAAmB,QAAQ,0BAAyB;AAC7D,OAAOC,UAAU,qBAAoB;AAErC;;;;;;;;;;;CAWC,GACD,OAAO,SAASC,aACdC,kBAA0B,EAC1BC,UAAoB,EACpBC,QAAiB;IAEjB,MAAMC,OAAON,oBAAoBG;IAEjC,IAAII;IACJ,IAAIF,UAAU;QACZE,WAAW;YAACD;SAAK;IACnB,OAAO,IAAIH,mBAAmBK,QAAQ,CAAC,WAAW;QAChDD,WAAW;YAACN,KAAKQ,IAAI,CAACH,MAAM;SAAS;IACvC,OAAO;QACLC,WAAW;YAACD;YAAML,KAAKQ,IAAI,CAACH,MAAM;SAAS;IAC7C;IAEA,MAAMI,QAAkB,EAAE;IAC1B,KAAK,MAAMC,aAAaP,WAAY;QAClC,KAAK,MAAMQ,UAAUL,SAAU;YAC7BG,MAAMG,IAAI,CAAC,AAAGD,SAAO,MAAGD;QAC1B;IACF;IAEA,OAAOD;AACT"}
|
||||
24
node_modules/next/dist/esm/shared/lib/page-path/normalize-page-path.js
generated
vendored
Normal file
24
node_modules/next/dist/esm/shared/lib/page-path/normalize-page-path.js
generated
vendored
Normal file
@ -0,0 +1,24 @@
|
||||
import { ensureLeadingSlash } from "./ensure-leading-slash";
|
||||
import { isDynamicRoute } from "../router/utils";
|
||||
import { NormalizeError } from "../utils";
|
||||
/**
|
||||
* Takes a page and transforms it into its file counterpart ensuring that the
|
||||
* output is normalized. Note this function is not idempotent because a page
|
||||
* `/index` can be referencing `/index/index.js` and `/index/index` could be
|
||||
* referencing `/index/index/index.js`. Examples:
|
||||
* - `/` -> `/index`
|
||||
* - `/index/foo` -> `/index/index/foo`
|
||||
* - `/index` -> `/index/index`
|
||||
*/ export function normalizePagePath(page) {
|
||||
const normalized = /^\/index(\/|$)/.test(page) && !isDynamicRoute(page) ? "/index" + page : page === "/" ? "/index" : ensureLeadingSlash(page);
|
||||
if (process.env.NEXT_RUNTIME !== "edge") {
|
||||
const { posix } = require("path");
|
||||
const resolvedPage = posix.normalize(normalized);
|
||||
if (resolvedPage !== normalized) {
|
||||
throw new NormalizeError("Requested and resolved page mismatch: " + normalized + " " + resolvedPage);
|
||||
}
|
||||
}
|
||||
return normalized;
|
||||
}
|
||||
|
||||
//# sourceMappingURL=normalize-page-path.js.map
|
||||
1
node_modules/next/dist/esm/shared/lib/page-path/normalize-page-path.js.map
generated
vendored
Normal file
1
node_modules/next/dist/esm/shared/lib/page-path/normalize-page-path.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../../src/shared/lib/page-path/normalize-page-path.ts"],"names":["ensureLeadingSlash","isDynamicRoute","NormalizeError","normalizePagePath","page","normalized","test","process","env","NEXT_RUNTIME","posix","require","resolvedPage","normalize"],"mappings":"AAAA,SAASA,kBAAkB,QAAQ,yBAAwB;AAC3D,SAASC,cAAc,QAAQ,kBAAiB;AAChD,SAASC,cAAc,QAAQ,WAAU;AAEzC;;;;;;;;CAQC,GACD,OAAO,SAASC,kBAAkBC,IAAY;IAC5C,MAAMC,aACJ,iBAAiBC,IAAI,CAACF,SAAS,CAACH,eAAeG,QAC3C,AAAC,WAAQA,OACTA,SAAS,MACT,WACAJ,mBAAmBI;IAEzB,IAAIG,QAAQC,GAAG,CAACC,YAAY,KAAK,QAAQ;QACvC,MAAM,EAAEC,KAAK,EAAE,GAAGC,QAAQ;QAC1B,MAAMC,eAAeF,MAAMG,SAAS,CAACR;QACrC,IAAIO,iBAAiBP,YAAY;YAC/B,MAAM,IAAIH,eACR,AAAC,2CAAwCG,aAAW,MAAGO;QAE3D;IACF;IAEA,OAAOP;AACT"}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user