Second frontend, written in Next.JS + Typescript.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

1 lines
26 KiB

{"ast":null,"code":"\"use strict\";\n\nexports.__esModule = true;\nexports.middleware = middleware;\nexports.NextScript = exports.Main = exports.Head = exports.Html = exports.default = void 0;\n\nvar _propTypes = _interopRequireDefault(require(\"prop-types\"));\n\nvar _react = _interopRequireWildcard(require(\"react\"));\n\nvar _server = _interopRequireDefault(require(\"styled-jsx/server\"));\n\nvar _constants = require(\"../next-server/lib/constants\");\n\nvar _documentContext = require(\"../next-server/lib/document-context\");\n\nvar _utils = require(\"../next-server/lib/utils\");\n\nexports.DocumentContext = _utils.DocumentContext;\nexports.DocumentInitialProps = _utils.DocumentInitialProps;\nexports.DocumentProps = _utils.DocumentProps;\n\nvar _fid = _interopRequireDefault(require(\"../next-server/lib/fid\"));\n\nvar _utils2 = require(\"../next-server/server/utils\");\n\nvar _htmlescape = require(\"../server/htmlescape\");\n\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n default: obj\n };\n}\n\nfunction _getRequireWildcardCache() {\n if (typeof WeakMap !== \"function\") return null;\n var cache = new WeakMap();\n\n _getRequireWildcardCache = function () {\n return cache;\n };\n\n return cache;\n}\n\nfunction _interopRequireWildcard(obj) {\n if (obj && obj.__esModule) {\n return obj;\n }\n\n if (obj === null || typeof obj !== \"object\" && typeof obj !== \"function\") {\n return {\n default: obj\n };\n }\n\n var cache = _getRequireWildcardCache();\n\n if (cache && cache.has(obj)) {\n return cache.get(obj);\n }\n\n var newObj = {};\n var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;\n\n for (var key in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, key)) {\n var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;\n\n if (desc && (desc.get || desc.set)) {\n Object.defineProperty(newObj, key, desc);\n } else {\n newObj[key] = obj[key];\n }\n }\n }\n\n newObj.default = obj;\n\n if (cache) {\n cache.set(obj, newObj);\n }\n\n return newObj;\n}\n\nasync function middleware({\n req,\n res\n}) {}\n\nfunction dedupe(bundles) {\n const files = new Set();\n const kept = [];\n\n for (const bundle of bundles) {\n if (files.has(bundle.file)) continue;\n files.add(bundle.file);\n kept.push(bundle);\n }\n\n return kept;\n}\n\nfunction getOptionalModernScriptVariant(path) {\n if (process.env.__NEXT_MODERN_BUILD) {\n return path.replace(/\\.js$/, '.module.js');\n }\n\n return path;\n}\n/**\n* `Document` component handles the initial `document` markup and renders only on the server side.\n* Commonly used for implementing server side rendering for `css-in-js` libraries.\n*/\n\n\nclass Document extends _react.Component {\n /**\n * `getInitialProps` hook returns the context object with the addition of `renderPage`.\n * `renderPage` callback executes `React` rendering logic synchronously to support server-rendering wrappers\n */\n static async getInitialProps(ctx) {\n const enhancers = process.env.__NEXT_PLUGINS ? await Promise.resolve().then(() => _interopRequireWildcard(require('next-plugin-loader?middleware=unstable-enhance-app-server!'))).then(mod => mod.default(ctx)) : [];\n\n const enhanceApp = App => {\n for (const enhancer of enhancers) {\n App = enhancer(App);\n }\n\n return props => _react.default.createElement(App, props);\n };\n\n const {\n html,\n head\n } = await ctx.renderPage({\n enhanceApp\n });\n const styles = [...(0, _server.default)(), ...(process.env.__NEXT_PLUGINS ? await Promise.resolve().then(() => _interopRequireWildcard(require('next-plugin-loader?middleware=unstable-get-styles-server!'))).then(mod => mod.default(ctx)) : [])];\n return {\n html,\n head,\n styles\n };\n }\n\n static renderDocument(Document, props) {\n return _react.default.createElement(_documentContext.DocumentContext.Provider, {\n value: {\n _documentProps: props,\n // In dev we invalidate the cache by appending a timestamp to the resource URL.\n // This is a workaround to fix https://github.com/zeit/next.js/issues/5860\n // TODO: remove this workaround when https://bugs.webkit.org/show_bug.cgi?id=187726 is fixed.\n _devOnlyInvalidateCacheQueryString: false ? '?ts=' + Date.now() : ''\n }\n }, _react.default.createElement(Document, props));\n }\n\n render() {\n return _react.default.createElement(Html, null, _react.default.createElement(Head, null), _react.default.createElement(\"body\", null, _react.default.createElement(Main, null), _react.default.createElement(NextScript, null)));\n }\n\n}\n\nexports.default = Document;\nDocument.headTagsMiddleware = process.env.__NEXT_PLUGINS ? Promise.resolve().then(() => _interopRequireWildcard(require('next-plugin-loader?middleware=document-head-tags-server!'))) : () => [];\nDocument.bodyTagsMiddleware = process.env.__NEXT_PLUGINS ? Promise.resolve().then(() => _interopRequireWildcard(require('next-plugin-loader?middleware=document-body-tags-server!'))) : () => [];\nDocument.htmlPropsMiddleware = process.env.__NEXT_PLUGINS ? Promise.resolve().then(() => _interopRequireWildcard(require('next-plugin-loader?middleware=document-html-props-server!'))) : () => [];\n\nclass Html extends _react.Component {\n constructor(...args) {\n super(...args);\n this.context = void 0;\n }\n\n render() {\n const {\n inAmpMode,\n htmlProps\n } = this.context._documentProps;\n return _react.default.createElement(\"html\", Object.assign({}, htmlProps, this.props, {\n amp: inAmpMode ? '' : undefined,\n \"data-ampdevmode\": inAmpMode && false ? '' : undefined\n }));\n }\n\n}\n\nexports.Html = Html;\nHtml.contextType = _documentContext.DocumentContext;\nHtml.propTypes = {\n children: _propTypes.default.node.isRequired\n};\n\nclass Head extends _react.Component {\n constructor(...args) {\n super(...args);\n this.context = void 0;\n }\n\n getCssLinks() {\n const {\n assetPrefix,\n files\n } = this.context._documentProps;\n const {\n _devOnlyInvalidateCacheQueryString\n } = this.context;\n const cssFiles = files && files.length ? files.filter(f => /\\.css$/.test(f)) : [];\n const cssLinkElements = [];\n cssFiles.forEach(file => {\n cssLinkElements.push(_react.default.createElement(\"link\", {\n key: `${file}-preload`,\n nonce: this.props.nonce,\n rel: \"preload\",\n href: `${assetPrefix}/_next/${encodeURI(file)}${_devOnlyInvalidateCacheQueryString}`,\n as: \"style\",\n crossOrigin: this.props.crossOrigin || process.crossOrigin\n }), _react.default.createElement(\"link\", {\n key: file,\n nonce: this.props.nonce,\n rel: \"stylesheet\",\n href: `${assetPrefix}/_next/${encodeURI(file)}${_devOnlyInvalidateCacheQueryString}`,\n crossOrigin: this.props.crossOrigin || process.crossOrigin\n }));\n });\n return cssLinkElements.length === 0 ? null : cssLinkElements;\n }\n\n getPreloadDynamicChunks() {\n const {\n dynamicImports,\n assetPrefix\n } = this.context._documentProps;\n const {\n _devOnlyInvalidateCacheQueryString\n } = this.context;\n return dedupe(dynamicImports).map(bundle => {\n // `dynamicImports` will contain both `.js` and `.module.js` when the\n // feature is enabled. This clause will filter down to the modern\n // variants only.\n if (!bundle.file.endsWith(getOptionalModernScriptVariant('.js'))) {\n return null;\n }\n\n return _react.default.createElement(\"link\", {\n rel: \"preload\",\n key: bundle.file,\n href: `${assetPrefix}/_next/${encodeURI(bundle.file)}${_devOnlyInvalidateCacheQueryString}`,\n as: \"script\",\n nonce: this.props.nonce,\n crossOrigin: this.props.crossOrigin || process.crossOrigin\n });\n }) // Filter out nulled scripts\n .filter(Boolean);\n }\n\n getPreloadMainLinks() {\n const {\n assetPrefix,\n files\n } = this.context._documentProps;\n const {\n _devOnlyInvalidateCacheQueryString\n } = this.context;\n const preloadFiles = files && files.length ? files.filter(file => {\n // `dynamicImports` will contain both `.js` and `.module.js` when\n // the feature is enabled. This clause will filter down to the\n // modern variants only.\n return file.endsWith(getOptionalModernScriptVariant('.js'));\n }) : [];\n return preloadFiles.length === 0 ? null : preloadFiles.map(file => {\n return _react.default.createElement(\"link\", {\n key: file,\n nonce: this.props.nonce,\n rel: \"preload\",\n href: `${assetPrefix}/_next/${encodeURI(file)}${_devOnlyInvalidateCacheQueryString}`,\n as: \"script\",\n crossOrigin: this.props.crossOrigin || process.crossOrigin\n });\n });\n }\n\n getFidPolyfill() {\n if (!process.env.__NEXT_FID_POLYFILL) {\n return null;\n }\n\n return _react.default.createElement(\"script\", {\n dangerouslySetInnerHTML: {\n __html: `(${_fid.default})(addEventListener, removeEventListener)`\n }\n });\n }\n\n render() {\n const {\n styles,\n ampPath,\n inAmpMode,\n assetPrefix,\n hybridAmp,\n canonicalBase,\n __NEXT_DATA__,\n dangerousAsPath,\n headTags\n } = this.context._documentProps;\n const {\n _devOnlyInvalidateCacheQueryString\n } = this.context;\n const {\n page,\n buildId\n } = __NEXT_DATA__;\n let {\n head\n } = this.context._documentProps;\n let children = this.props.children; // show a warning if Head contains <title> (only in development)\n\n if (false) {\n children = _react.default.Children.map(children, child => {\n const isReactHelmet = child && child.props && child.props['data-react-helmet'];\n\n if (child && child.type === 'title' && !isReactHelmet) {\n console.warn(\"Warning: <title> should not be used in _document.js's <Head>. https://err.sh/next.js/no-document-title\");\n }\n\n return child;\n });\n if (this.props.crossOrigin) console.warn('Warning: `Head` attribute `crossOrigin` is deprecated. https://err.sh/next.js/doc-crossorigin-deprecated');\n }\n\n let hasAmphtmlRel = false;\n let hasCanonicalRel = false; // show warning and remove conflicting amp head tags\n\n head = _react.default.Children.map(head || [], child => {\n if (!child) return child;\n const {\n type,\n props\n } = child;\n\n if (inAmpMode) {\n let badProp = '';\n\n if (type === 'meta' && props.name === 'viewport') {\n badProp = 'name=\"viewport\"';\n } else if (type === 'link' && props.rel === 'canonical') {\n hasCanonicalRel = true;\n } else if (type === 'script') {\n // only block if\n // 1. it has a src and isn't pointing to ampproject's CDN\n // 2. it is using dangerouslySetInnerHTML without a type or\n // a type of text/javascript\n if (props.src && props.src.indexOf('ampproject') < -1 || props.dangerouslySetInnerHTML && (!props.type || props.type === 'text/javascript')) {\n badProp = '<script';\n Object.keys(props).forEach(prop => {\n badProp += ` ${prop}=\"${props[prop]}\"`;\n });\n badProp += '/>';\n }\n }\n\n if (badProp) {\n console.warn(`Found conflicting amp tag \"${child.type}\" with conflicting prop ${badProp} in ${__NEXT_DATA__.page}. https://err.sh/next.js/conflicting-amp-tag`);\n return null;\n }\n } else {\n // non-amp mode\n if (type === 'link' && props.rel === 'amphtml') {\n hasAmphtmlRel = true;\n }\n }\n\n return child;\n }); // try to parse styles from fragment for backwards compat\n\n const curStyles = Array.isArray(styles) ? styles : [];\n\n if (inAmpMode && styles && // @ts-ignore Property 'props' does not exist on type ReactElement\n styles.props && // @ts-ignore Property 'props' does not exist on type ReactElement\n Array.isArray(styles.props.children)) {\n const hasStyles = el => el && el.props && el.props.dangerouslySetInnerHTML && el.props.dangerouslySetInnerHTML.__html; // @ts-ignore Property 'props' does not exist on type ReactElement\n\n\n styles.props.children.forEach(child => {\n if (Array.isArray(child)) {\n child.map(el => hasStyles(el) && curStyles.push(el));\n } else if (hasStyles(child)) {\n curStyles.push(child);\n }\n });\n }\n\n return _react.default.createElement(\"head\", this.props, this.context._documentProps.isDevelopment && this.context._documentProps.hasCssMode && _react.default.createElement(_react.default.Fragment, null, _react.default.createElement(\"style\", {\n \"data-next-hide-fouc\": true,\n \"data-ampdevmode\": inAmpMode ? 'true' : undefined,\n dangerouslySetInnerHTML: {\n __html: `body{display:none}`\n }\n }), _react.default.createElement(\"noscript\", {\n \"data-next-hide-fouc\": true,\n \"data-ampdevmode\": inAmpMode ? 'true' : undefined\n }, _react.default.createElement(\"style\", {\n dangerouslySetInnerHTML: {\n __html: `body{display:block}`\n }\n }))), children, head, _react.default.createElement(\"meta\", {\n name: \"next-head-count\",\n content: _react.default.Children.count(head || []).toString()\n }), inAmpMode && _react.default.createElement(_react.default.Fragment, null, _react.default.createElement(\"meta\", {\n name: \"viewport\",\n content: \"width=device-width,minimum-scale=1,initial-scale=1\"\n }), !hasCanonicalRel && _react.default.createElement(\"link\", {\n rel: \"canonical\",\n href: canonicalBase + (0, _utils2.cleanAmpPath)(dangerousAsPath)\n }), _react.default.createElement(\"link\", {\n rel: \"preload\",\n as: \"script\",\n href: \"https://cdn.ampproject.org/v0.js\"\n }), styles && _react.default.createElement(\"style\", {\n \"amp-custom\": \"\",\n dangerouslySetInnerHTML: {\n __html: curStyles.map(style => style.props.dangerouslySetInnerHTML.__html).join('').replace(/\\/\\*# sourceMappingURL=.*\\*\\//g, '').replace(/\\/\\*@ sourceURL=.*?\\*\\//g, '')\n }\n }), _react.default.createElement(\"style\", {\n \"amp-boilerplate\": \"\",\n dangerouslySetInnerHTML: {\n __html: `body{-webkit-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-moz-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-ms-animation:-amp-start 8s steps(1,end) 0s 1 normal both;animation:-amp-start 8s steps(1,end) 0s 1 normal both}@-webkit-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-moz-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-ms-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-o-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}`\n }\n }), _react.default.createElement(\"noscript\", null, _react.default.createElement(\"style\", {\n \"amp-boilerplate\": \"\",\n dangerouslySetInnerHTML: {\n __html: `body{-webkit-animation:none;-moz-animation:none;-ms-animation:none;animation:none}`\n }\n })), _react.default.createElement(\"script\", {\n async: true,\n src: \"https://cdn.ampproject.org/v0.js\"\n })), !inAmpMode && _react.default.createElement(_react.default.Fragment, null, !hasAmphtmlRel && hybridAmp && _react.default.createElement(\"link\", {\n rel: \"amphtml\",\n href: canonicalBase + getAmpPath(ampPath, dangerousAsPath)\n }), this.getCssLinks(), page !== '/_error' && _react.default.createElement(\"link\", {\n rel: \"preload\",\n href: assetPrefix + getOptionalModernScriptVariant(encodeURI(`/_next/static/${buildId}/pages${getPageFile(page)}`)) + _devOnlyInvalidateCacheQueryString,\n as: \"script\",\n nonce: this.props.nonce,\n crossOrigin: this.props.crossOrigin || process.crossOrigin\n }), _react.default.createElement(\"link\", {\n rel: \"preload\",\n href: assetPrefix + getOptionalModernScriptVariant(encodeURI(`/_next/static/${buildId}/pages/_app.js`)) + _devOnlyInvalidateCacheQueryString,\n as: \"script\",\n nonce: this.props.nonce,\n crossOrigin: this.props.crossOrigin || process.crossOrigin\n }), this.getPreloadDynamicChunks(), this.getPreloadMainLinks(), this.context._documentProps.isDevelopment && this.context._documentProps.hasCssMode && // this element is used to mount development styles so the\n // ordering matches production\n // (by default, style-loader injects at the bottom of <head />)\n _react.default.createElement(\"noscript\", {\n id: \"__next_css__DO_NOT_USE__\"\n }), styles || null), this.getFidPolyfill(), _react.default.createElement(_react.default.Fragment, {}, ...(headTags || [])));\n }\n\n}\n\nexports.Head = Head;\nHead.contextType = _documentContext.DocumentContext;\nHead.propTypes = {\n nonce: _propTypes.default.string,\n crossOrigin: _propTypes.default.string\n};\n\nclass Main extends _react.Component {\n constructor(...args) {\n super(...args);\n this.context = void 0;\n }\n\n render() {\n const {\n inAmpMode,\n html\n } = this.context._documentProps;\n if (inAmpMode) return _constants.AMP_RENDER_TARGET;\n return _react.default.createElement(\"div\", {\n id: \"__next\",\n dangerouslySetInnerHTML: {\n __html: html\n }\n });\n }\n\n}\n\nexports.Main = Main;\nMain.contextType = _documentContext.DocumentContext;\n\nclass NextScript extends _react.Component {\n constructor(...args) {\n super(...args);\n this.context = void 0;\n }\n\n getDynamicChunks() {\n const {\n dynamicImports,\n assetPrefix,\n files\n } = this.context._documentProps;\n const {\n _devOnlyInvalidateCacheQueryString\n } = this.context;\n return dedupe(dynamicImports).map(bundle => {\n let modernProps = {};\n\n if (process.env.__NEXT_MODERN_BUILD) {\n modernProps = /\\.module\\.js$/.test(bundle.file) ? {\n type: 'module'\n } : {\n noModule: true\n };\n }\n\n if (!/\\.js$/.test(bundle.file) || files.includes(bundle.file)) return null;\n return _react.default.createElement(\"script\", Object.assign({\n async: true,\n key: bundle.file,\n src: `${assetPrefix}/_next/${encodeURI(bundle.file)}${_devOnlyInvalidateCacheQueryString}`,\n nonce: this.props.nonce,\n crossOrigin: this.props.crossOrigin || process.crossOrigin\n }, modernProps));\n });\n }\n\n getScripts() {\n const {\n assetPrefix,\n files,\n lowPriorityFiles\n } = this.context._documentProps;\n const {\n _devOnlyInvalidateCacheQueryString\n } = this.context;\n const normalScripts = files === null || files === void 0 ? void 0 : files.filter(file => file.endsWith('.js'));\n const lowPriorityScripts = lowPriorityFiles === null || lowPriorityFiles === void 0 ? void 0 : lowPriorityFiles.filter(file => file.endsWith('.js'));\n return [...normalScripts, ...lowPriorityScripts].map(file => {\n let modernProps = {};\n\n if (process.env.__NEXT_MODERN_BUILD) {\n modernProps = file.endsWith('.module.js') ? {\n type: 'module'\n } : {\n noModule: true\n };\n }\n\n return _react.default.createElement(\"script\", Object.assign({\n key: file,\n src: `${assetPrefix}/_next/${encodeURI(file)}${_devOnlyInvalidateCacheQueryString}`,\n nonce: this.props.nonce,\n async: true,\n crossOrigin: this.props.crossOrigin || process.crossOrigin\n }, modernProps));\n });\n }\n\n getPolyfillScripts() {\n // polyfills.js has to be rendered as nomodule without async\n // It also has to be the first script to load\n const {\n assetPrefix,\n polyfillFiles\n } = this.context._documentProps;\n const {\n _devOnlyInvalidateCacheQueryString\n } = this.context;\n return polyfillFiles.filter(polyfill => polyfill.endsWith('.js') && !/\\.module\\.js$/.test(polyfill)).map(polyfill => _react.default.createElement(\"script\", {\n key: polyfill,\n nonce: this.props.nonce,\n crossOrigin: this.props.crossOrigin || process.crossOrigin,\n noModule: true,\n src: `${assetPrefix}/_next/${polyfill}${_devOnlyInvalidateCacheQueryString}`\n }));\n }\n\n static getInlineScriptSource(documentProps) {\n const {\n __NEXT_DATA__\n } = documentProps;\n\n try {\n const data = JSON.stringify(__NEXT_DATA__);\n return (0, _htmlescape.htmlEscapeJsonString)(data);\n } catch (err) {\n if (err.message.indexOf('circular structure')) {\n throw new Error(`Circular structure in \"getInitialProps\" result of page \"${__NEXT_DATA__.page}\". https://err.sh/zeit/next.js/circular-structure`);\n }\n\n throw err;\n }\n }\n\n render() {\n const {\n staticMarkup,\n assetPrefix,\n inAmpMode,\n devFiles,\n __NEXT_DATA__,\n bodyTags\n } = this.context._documentProps;\n const {\n _devOnlyInvalidateCacheQueryString\n } = this.context;\n\n if (inAmpMode) {\n if (true) {\n return null;\n }\n\n const devFiles = [_constants.CLIENT_STATIC_FILES_RUNTIME_AMP, _constants.CLIENT_STATIC_FILES_RUNTIME_WEBPACK];\n return _react.default.createElement(_react.default.Fragment, null, staticMarkup ? null : _react.default.createElement(\"script\", {\n id: \"__NEXT_DATA__\",\n type: \"application/json\",\n nonce: this.props.nonce,\n crossOrigin: this.props.crossOrigin || process.crossOrigin,\n dangerouslySetInnerHTML: {\n __html: NextScript.getInlineScriptSource(this.context._documentProps)\n },\n \"data-ampdevmode\": true\n }), devFiles ? devFiles.map(file => _react.default.createElement(\"script\", {\n key: file,\n src: `${assetPrefix}/_next/${file}${_devOnlyInvalidateCacheQueryString}`,\n nonce: this.props.nonce,\n crossOrigin: this.props.crossOrigin || process.crossOrigin,\n \"data-ampdevmode\": true\n })) : null, _react.default.createElement(_react.default.Fragment, {}, ...(bodyTags || [])));\n }\n\n const {\n page,\n buildId\n } = __NEXT_DATA__;\n\n if (false) {\n if (this.props.crossOrigin) console.warn('Warning: `NextScript` attribute `crossOrigin` is deprecated. https://err.sh/next.js/doc-crossorigin-deprecated');\n }\n\n const pageScript = [_react.default.createElement(\"script\", Object.assign({\n async: true,\n \"data-next-page\": page,\n key: page,\n src: assetPrefix + encodeURI(`/_next/static/${buildId}/pages${getPageFile(page)}`) + _devOnlyInvalidateCacheQueryString,\n nonce: this.props.nonce,\n crossOrigin: this.props.crossOrigin || process.crossOrigin\n }, process.env.__NEXT_MODERN_BUILD ? {\n noModule: true\n } : {})), process.env.__NEXT_MODERN_BUILD && _react.default.createElement(\"script\", {\n async: true,\n \"data-next-page\": page,\n key: `${page}-modern`,\n src: assetPrefix + getOptionalModernScriptVariant(encodeURI(`/_next/static/${buildId}/pages${getPageFile(page)}`)) + _devOnlyInvalidateCacheQueryString,\n nonce: this.props.nonce,\n crossOrigin: this.props.crossOrigin || process.crossOrigin,\n type: \"module\"\n })];\n const appScript = [_react.default.createElement(\"script\", Object.assign({\n async: true,\n \"data-next-page\": \"/_app\",\n src: assetPrefix + `/_next/static/${buildId}/pages/_app.js` + _devOnlyInvalidateCacheQueryString,\n key: \"_app\",\n nonce: this.props.nonce,\n crossOrigin: this.props.crossOrigin || process.crossOrigin\n }, process.env.__NEXT_MODERN_BUILD ? {\n noModule: true\n } : {})), process.env.__NEXT_MODERN_BUILD && _react.default.createElement(\"script\", {\n async: true,\n \"data-next-page\": \"/_app\",\n src: assetPrefix + `/_next/static/${buildId}/pages/_app.module.js` + _devOnlyInvalidateCacheQueryString,\n key: \"_app-modern\",\n nonce: this.props.nonce,\n crossOrigin: this.props.crossOrigin || process.crossOrigin,\n type: \"module\"\n })];\n return _react.default.createElement(_react.default.Fragment, null, devFiles ? devFiles.map(file => !file.match(/\\.js\\.map/) && _react.default.createElement(\"script\", {\n key: file,\n src: `${assetPrefix}/_next/${encodeURI(file)}${_devOnlyInvalidateCacheQueryString}`,\n nonce: this.props.nonce,\n crossOrigin: this.props.crossOrigin || process.crossOrigin\n })) : null, staticMarkup ? null : _react.default.createElement(\"script\", {\n id: \"__NEXT_DATA__\",\n type: \"application/json\",\n nonce: this.props.nonce,\n crossOrigin: this.props.crossOrigin || process.crossOrigin,\n dangerouslySetInnerHTML: {\n __html: NextScript.getInlineScriptSource(this.context._documentProps)\n }\n }), process.env.__NEXT_MODERN_BUILD ? _react.default.createElement(\"script\", {\n nonce: this.props.nonce,\n crossOrigin: this.props.crossOrigin || process.crossOrigin,\n noModule: true,\n dangerouslySetInnerHTML: {\n __html: NextScript.safariNomoduleFix\n }\n }) : null, this.getPolyfillScripts(), page !== '/_error' && pageScript, appScript, staticMarkup ? null : this.getDynamicChunks(), staticMarkup ? null : this.getScripts(), _react.default.createElement(_react.default.Fragment, {}, ...(bodyTags || [])));\n }\n\n}\n\nexports.NextScript = NextScript;\nNextScript.contextType = _documentContext.DocumentContext;\nNextScript.propTypes = {\n nonce: _propTypes.default.string,\n crossOrigin: _propTypes.default.string\n};\nNextScript.safariNomoduleFix = '!function(){var e=document,t=e.createElement(\"script\");if(!(\"noModule\"in t)&&\"onbeforeload\"in t){var n=!1;e.addEventListener(\"beforeload\",function(e){if(e.target===t)n=!0;else if(!e.target.hasAttribute(\"nomodule\")||!n)return;e.preventDefault()},!0),t.type=\"module\",t.src=\".\",e.head.appendChild(t),t.remove()}}();';\n\nfunction getAmpPath(ampPath, asPath) {\n return ampPath ? ampPath : `${asPath}${asPath.includes('?') ? '&' : '?'}amp=1`;\n}\n\nfunction getPageFile(page, buildId) {\n if (page === '/') {\n return buildId ? `/index.${buildId}.js` : '/index.js';\n }\n\n return buildId ? `${page}.${buildId}.js` : `${page}.js`;\n}","map":null,"metadata":{},"sourceType":"script"}