436 lines
14 KiB
JavaScript
436 lines
14 KiB
JavaScript
"use strict";
|
|
exports.id = 8715;
|
|
exports.ids = [8715];
|
|
exports.modules = {
|
|
|
|
/***/ 57182:
|
|
/***/ ((__unused_webpack_module, exports) => {
|
|
|
|
var __webpack_unused_export__;
|
|
/**
|
|
* Hoists a name from a module or promised module.
|
|
*
|
|
* @param module the module to hoist the name from
|
|
* @param name the name to hoist
|
|
* @returns the value on the module (or promised module)
|
|
*/
|
|
__webpack_unused_export__ = ({
|
|
value: true
|
|
});
|
|
Object.defineProperty(exports, "l", ({
|
|
enumerable: true,
|
|
get: function() {
|
|
return hoist;
|
|
}
|
|
}));
|
|
function hoist(module, name) {
|
|
// If the name is available in the module, return it.
|
|
if (name in module) {
|
|
return module[name];
|
|
}
|
|
// If a property called `then` exists, assume it's a promise and
|
|
// return a promise that resolves to the name.
|
|
if ("then" in module && typeof module.then === "function") {
|
|
return module.then((mod)=>hoist(mod, name));
|
|
}
|
|
// If we're trying to hoise the default export, and the module is a function,
|
|
// return the module itself.
|
|
if (typeof module === "function" && name === "default") {
|
|
return module;
|
|
}
|
|
// Otherwise, return undefined.
|
|
return undefined;
|
|
}
|
|
|
|
//# sourceMappingURL=helpers.js.map
|
|
|
|
/***/ }),
|
|
|
|
/***/ 83441:
|
|
/***/ ((module, exports, __webpack_require__) => {
|
|
|
|
|
|
Object.defineProperty(exports, "__esModule", ({
|
|
value: true
|
|
}));
|
|
Object.defineProperty(exports, "default", ({
|
|
enumerable: true,
|
|
get: function() {
|
|
return Error;
|
|
}
|
|
}));
|
|
const _interop_require_default = __webpack_require__(50167);
|
|
const _react = /*#__PURE__*/ _interop_require_default._(__webpack_require__(16689));
|
|
const _head = /*#__PURE__*/ _interop_require_default._(__webpack_require__(73902));
|
|
const statusCodes = {
|
|
400: "Bad Request",
|
|
404: "This page could not be found",
|
|
405: "Method Not Allowed",
|
|
500: "Internal Server Error"
|
|
};
|
|
function _getInitialProps(param) {
|
|
let { res, err } = param;
|
|
const statusCode = res && res.statusCode ? res.statusCode : err ? err.statusCode : 404;
|
|
return {
|
|
statusCode
|
|
};
|
|
}
|
|
const styles = {
|
|
error: {
|
|
// https://github.com/sindresorhus/modern-normalize/blob/main/modern-normalize.css#L38-L52
|
|
fontFamily: 'system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji"',
|
|
height: "100vh",
|
|
textAlign: "center",
|
|
display: "flex",
|
|
flexDirection: "column",
|
|
alignItems: "center",
|
|
justifyContent: "center"
|
|
},
|
|
desc: {
|
|
lineHeight: "48px"
|
|
},
|
|
h1: {
|
|
display: "inline-block",
|
|
margin: "0 20px 0 0",
|
|
paddingRight: 23,
|
|
fontSize: 24,
|
|
fontWeight: 500,
|
|
verticalAlign: "top"
|
|
},
|
|
h2: {
|
|
fontSize: 14,
|
|
fontWeight: 400,
|
|
lineHeight: "28px"
|
|
},
|
|
wrap: {
|
|
display: "inline-block"
|
|
}
|
|
};
|
|
class Error extends _react.default.Component {
|
|
render() {
|
|
const { statusCode, withDarkMode = true } = this.props;
|
|
const title = this.props.title || statusCodes[statusCode] || "An unexpected error has occurred";
|
|
return /*#__PURE__*/ _react.default.createElement("div", {
|
|
style: styles.error
|
|
}, /*#__PURE__*/ _react.default.createElement(_head.default, null, /*#__PURE__*/ _react.default.createElement("title", null, statusCode ? statusCode + ": " + title : "Application error: a client-side exception has occurred")), /*#__PURE__*/ _react.default.createElement("div", {
|
|
style: styles.desc
|
|
}, /*#__PURE__*/ _react.default.createElement("style", {
|
|
dangerouslySetInnerHTML: {
|
|
/* CSS minified from
|
|
body { margin: 0; color: #000; background: #fff; }
|
|
.next-error-h1 {
|
|
border-right: 1px solid rgba(0, 0, 0, .3);
|
|
}
|
|
|
|
${
|
|
withDarkMode
|
|
? `@media (prefers-color-scheme: dark) {
|
|
body { color: #fff; background: #000; }
|
|
.next-error-h1 {
|
|
border-right: 1px solid rgba(255, 255, 255, .3);
|
|
}
|
|
}`
|
|
: ''
|
|
}
|
|
*/ __html: "body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}" + (withDarkMode ? "@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}" : "")
|
|
}
|
|
}), statusCode ? /*#__PURE__*/ _react.default.createElement("h1", {
|
|
className: "next-error-h1",
|
|
style: styles.h1
|
|
}, statusCode) : null, /*#__PURE__*/ _react.default.createElement("div", {
|
|
style: styles.wrap
|
|
}, /*#__PURE__*/ _react.default.createElement("h2", {
|
|
style: styles.h2
|
|
}, this.props.title || statusCode ? title : /*#__PURE__*/ _react.default.createElement(_react.default.Fragment, null, "Application error: a client-side exception has occurred (see the browser console for more information)"), "."))));
|
|
}
|
|
}
|
|
(()=>{
|
|
Error.displayName = "ErrorPage";
|
|
})();
|
|
(()=>{
|
|
Error.getInitialProps = _getInitialProps;
|
|
})();
|
|
(()=>{
|
|
Error.origGetInitialProps = _getInitialProps;
|
|
})();
|
|
if ((typeof exports.default === "function" || typeof exports.default === "object" && exports.default !== null) && typeof exports.default.__esModule === "undefined") {
|
|
Object.defineProperty(exports.default, "__esModule", {
|
|
value: true
|
|
});
|
|
Object.assign(exports.default, exports);
|
|
module.exports = exports.default;
|
|
} //# sourceMappingURL=_error.js.map
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ 73902:
|
|
/***/ ((module, exports, __webpack_require__) => {
|
|
|
|
/* __next_internal_client_entry_do_not_use__ cjs */
|
|
Object.defineProperty(exports, "__esModule", ({
|
|
value: true
|
|
}));
|
|
0 && (0);
|
|
function _export(target, all) {
|
|
for(var name in all)Object.defineProperty(target, name, {
|
|
enumerable: true,
|
|
get: all[name]
|
|
});
|
|
}
|
|
_export(exports, {
|
|
defaultHead: function() {
|
|
return defaultHead;
|
|
},
|
|
default: function() {
|
|
return _default;
|
|
}
|
|
});
|
|
const _interop_require_default = __webpack_require__(50167);
|
|
const _interop_require_wildcard = __webpack_require__(28760);
|
|
const _react = /*#__PURE__*/ _interop_require_wildcard._(__webpack_require__(16689));
|
|
const _sideeffect = /*#__PURE__*/ _interop_require_default._(__webpack_require__(82470));
|
|
const _ampcontext = __webpack_require__(53918);
|
|
const _headmanagercontext = __webpack_require__(92796);
|
|
const _ampmode = __webpack_require__(45732);
|
|
const _warnonce = __webpack_require__(40618);
|
|
function defaultHead(inAmpMode) {
|
|
if (inAmpMode === void 0) inAmpMode = false;
|
|
const head = [
|
|
/*#__PURE__*/ _react.default.createElement("meta", {
|
|
charSet: "utf-8"
|
|
})
|
|
];
|
|
if (!inAmpMode) {
|
|
head.push(/*#__PURE__*/ _react.default.createElement("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.default.Fragment) {
|
|
return list.concat(_react.default.Children.toArray(child.props.children).reduce((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 ( true && !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.default.cloneElement(c, newProps);
|
|
}
|
|
}
|
|
if (false) {}
|
|
return /*#__PURE__*/ _react.default.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 = (0, _react.useContext)(_ampcontext.AmpStateContext);
|
|
const headManager = (0, _react.useContext)(_headmanagercontext.HeadManagerContext);
|
|
return /*#__PURE__*/ _react.default.createElement(_sideeffect.default, {
|
|
reduceComponentsToState: reduceComponents,
|
|
headManager: headManager,
|
|
inAmpMode: (0, _ampmode.isInAmpMode)(ampState)
|
|
}, children);
|
|
}
|
|
const _default = Head;
|
|
if ((typeof exports.default === "function" || typeof exports.default === "object" && exports.default !== null) && typeof exports.default.__esModule === "undefined") {
|
|
Object.defineProperty(exports.default, "__esModule", {
|
|
value: true
|
|
});
|
|
Object.assign(exports.default, exports);
|
|
module.exports = exports.default;
|
|
} //# sourceMappingURL=head.js.map
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ 23185:
|
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
|
|
|
|
Object.defineProperty(exports, "__esModule", ({
|
|
value: true
|
|
}));
|
|
0 && (0);
|
|
function _export(target, all) {
|
|
for(var name in all)Object.defineProperty(target, name, {
|
|
enumerable: true,
|
|
get: all[name]
|
|
});
|
|
}
|
|
_export(exports, {
|
|
PagesRouteModule: function() {
|
|
return PagesRouteModule;
|
|
},
|
|
default: function() {
|
|
return _default;
|
|
}
|
|
});
|
|
const _routemodule = __webpack_require__(43076);
|
|
const _render = __webpack_require__(33100);
|
|
class PagesRouteModule extends _routemodule.RouteModule {
|
|
constructor(options){
|
|
super(options);
|
|
this.components = options.components;
|
|
}
|
|
handle() {
|
|
throw new Error("Method not implemented.");
|
|
}
|
|
render(req, res, context) {
|
|
return (0, _render.renderToHTMLImpl)(req, res, context.page, context.query, context.renderOpts, {
|
|
App: this.components.App,
|
|
Document: this.components.Document
|
|
});
|
|
}
|
|
}
|
|
const _default = PagesRouteModule;
|
|
|
|
//# sourceMappingURL=module.js.map
|
|
|
|
/***/ }),
|
|
|
|
/***/ 28760:
|
|
/***/ ((__unused_webpack_module, exports) => {
|
|
|
|
|
|
|
|
function _getRequireWildcardCache(nodeInterop) {
|
|
if (typeof WeakMap !== "function") return null;
|
|
|
|
var cacheBabelInterop = new WeakMap();
|
|
var cacheNodeInterop = new WeakMap();
|
|
|
|
return (_getRequireWildcardCache = function(nodeInterop) {
|
|
return nodeInterop ? cacheNodeInterop : cacheBabelInterop;
|
|
})(nodeInterop);
|
|
}
|
|
exports._ = exports._interop_require_wildcard = _interop_require_wildcard;
|
|
function _interop_require_wildcard(obj, nodeInterop) {
|
|
if (!nodeInterop && obj && obj.__esModule) return obj;
|
|
if (obj === null || typeof obj !== "object" && typeof obj !== "function") return { default: obj };
|
|
|
|
var cache = _getRequireWildcardCache(nodeInterop);
|
|
|
|
if (cache && cache.has(obj)) return cache.get(obj);
|
|
|
|
var newObj = {};
|
|
var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
|
|
|
|
for (var key in obj) {
|
|
if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
|
|
if (desc && (desc.get || desc.set)) Object.defineProperty(newObj, key, desc);
|
|
else newObj[key] = obj[key];
|
|
}
|
|
}
|
|
|
|
newObj.default = obj;
|
|
|
|
if (cache) cache.set(obj, newObj);
|
|
|
|
return newObj;
|
|
}
|
|
|
|
|
|
/***/ })
|
|
|
|
};
|
|
; |