From a36798968f0537fa77ad8debd78d6ba57498d8e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bal=C3=A1zs=20Orb=C3=A1n?= Date: Tue, 18 Oct 2022 15:13:42 +0200 Subject: [PATCH 01/13] fix(ts): `Cookies` -> `NextCookies` (#41491) --- packages/next/client/components/headers.ts | 2 +- packages/next/client/components/request-async-storage.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/next/client/components/headers.ts b/packages/next/client/components/headers.ts index 63a906e03f5e54..2674f83270f78c 100644 --- a/packages/next/client/components/headers.ts +++ b/packages/next/client/components/headers.ts @@ -17,7 +17,7 @@ function staticGenerationBailout(reason: string) { } } -export function headers(): Headers { +export function headers() { staticGenerationBailout('headers') const requestStore = requestAsyncStorage && 'getStore' in requestAsyncStorage diff --git a/packages/next/client/components/request-async-storage.ts b/packages/next/client/components/request-async-storage.ts index fc1fff6841c9e4..426ce78434ac76 100644 --- a/packages/next/client/components/request-async-storage.ts +++ b/packages/next/client/components/request-async-storage.ts @@ -1,9 +1,9 @@ import type { AsyncLocalStorage } from 'async_hooks' -import { Cookies } from '../../server/web/spec-extension/cookies' +import type { NextCookies } from '../../server/web/spec-extension/cookies' export interface RequestStore { headers: Headers - cookies: Cookies + cookies: NextCookies previewData: any } From 9775111ab67a5ba591a6ef20d9b9caa4729d05fd Mon Sep 17 00:00:00 2001 From: Steven Date: Tue, 18 Oct 2022 09:29:08 -0400 Subject: [PATCH 02/13] Add `swcMinify` to the Upgrade Guide (#41521) Follow up to: - #41506 --- docs/upgrading.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/upgrading.md b/docs/upgrading.md index 7c087383990b28..98a56c09bd33b4 100644 --- a/docs/upgrading.md +++ b/docs/upgrading.md @@ -8,6 +8,8 @@ description: Learn how to upgrade Next.js. The minimum Node.js version has been bumped from 12.22.0 to 14.0.0, since 12.x has reached end-of-life. +The `swcMinify` configuration property was changed from `false` to `true`. See [Next.js Compiler](/docs/advanced-features/compiler.md) for more info. + The `next/image` import was renamed to `next/legacy/image`. The `next/future/image` import was renamed to `next/image`. A [codemod is available](/docs/advanced-features/codemods.md#next-image-to-legacy-image) to safely and automatically rename your imports. From ebae05eeedde21cced6dfb325a184da74e739e20 Mon Sep 17 00:00:00 2001 From: Kiko Beats Date: Tue, 18 Oct 2022 15:57:11 +0200 Subject: [PATCH 03/13] Update edge runtime to 1.1.0-beta.40 (#41513) changes: https://github.com/vercel/edge-runtime/compare/edge-runtime@1.1.0-beta.39...edge-runtime@1.1.0-beta.40 --- package.json | 2 +- .../@edge-runtime/primitives/console.js | 14 ++++++-- .../@edge-runtime/primitives/package.json | 2 +- packages/next/compiled/edge-runtime/index.js | 2 +- packages/next/package.json | 4 +-- pnpm-lock.yaml | 34 +++++++++---------- 6 files changed, 33 insertions(+), 25 deletions(-) diff --git a/package.json b/package.json index adf927caa3be32..6af2281f0e9bb7 100644 --- a/package.json +++ b/package.json @@ -57,7 +57,7 @@ "@babel/plugin-proposal-object-rest-spread": "7.14.7", "@babel/preset-flow": "7.14.5", "@babel/preset-react": "7.14.5", - "@edge-runtime/jest-environment": "1.1.0-beta.35", + "@edge-runtime/jest-environment": "1.1.0-beta.36", "@fullhuman/postcss-purgecss": "1.3.0", "@mdx-js/loader": "0.18.0", "@next/bundle-analyzer": "workspace:*", diff --git a/packages/next/compiled/@edge-runtime/primitives/console.js b/packages/next/compiled/@edge-runtime/primitives/console.js index 61b4c3d5a60916..7d3b69419a9c41 100644 --- a/packages/next/compiled/@edge-runtime/primitives/console.js +++ b/packages/next/compiled/@edge-runtime/primitives/console.js @@ -121,8 +121,11 @@ var require_dist = __commonJS({ return typeof value === type; } __name(kind, "kind"); - var getConstructorName = /* @__PURE__ */ __name((object) => object.constructor.name, "getConstructorName"); - var getPrefix = /* @__PURE__ */ __name((constructor, size = "") => `${constructor}${size} `, "getPrefix"); + var getConstructorName = /* @__PURE__ */ __name((object) => { + var _a; + return (_a = object.constructor) == null ? void 0 : _a.name; + }, "getConstructorName"); + var getPrefix = /* @__PURE__ */ __name((constructor = "", size = "") => `${constructor}${size} `, "getPrefix"); function createFormat2(opts = {}) { if (opts.customInspectSymbol === void 0) { opts.customInspectSymbol = Symbol.for("edge-runtime.inspect.custom"); @@ -275,7 +278,11 @@ var require_dist = __commonJS({ if (noIterator) { keys = getKeys(value, ctx.showHidden); braces = ["{", "}"]; - if (constructor === "Object") { + if (constructor === void 0) { + if (keys.length === 0) { + return `[Object: null prototype] {}`; + } + } else if (constructor === "Object") { if (keys.length === 0) { return `{}`; } @@ -572,6 +579,7 @@ var log = /* @__PURE__ */ __name((...args) => bareLog(format(...args)), "log"); var konsole = { assert: (assertion, ...args) => assert(assertion, format(...args)), count: console.count.bind(console), + debug: log, dir: console.dir.bind(console), error, info: log, diff --git a/packages/next/compiled/@edge-runtime/primitives/package.json b/packages/next/compiled/@edge-runtime/primitives/package.json index 41b12ae3930fc8..980ed9b27b6b16 100644 --- a/packages/next/compiled/@edge-runtime/primitives/package.json +++ b/packages/next/compiled/@edge-runtime/primitives/package.json @@ -1 +1 @@ -{"name":"@edge-runtime/primitives","version":"1.1.0-beta.36","main":"./index.js","license":"MPLv2"} +{"name":"@edge-runtime/primitives","version":"1.1.0-beta.37","main":"./index.js","license":"MPLv2"} diff --git a/packages/next/compiled/edge-runtime/index.js b/packages/next/compiled/edge-runtime/index.js index 4e1c3c180672b5..3349b2de577a48 100644 --- a/packages/next/compiled/edge-runtime/index.js +++ b/packages/next/compiled/edge-runtime/index.js @@ -1 +1 @@ -(()=>{var __webpack_modules__={543:(__unused_webpack_module,exports,__nccwpck_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.EdgeVM=void 0;const buffer_1=__nccwpck_require__(300);const require_1=__nccwpck_require__(246);const vm_1=__nccwpck_require__(256);const vm_2=__nccwpck_require__(144);class EdgeVM extends vm_1.VM{constructor(e={}){super({...e,extend:t=>e.extend?e.extend(addPrimitives(t)):addPrimitives(t)})}}exports.EdgeVM=EdgeVM;function addPrimitives(context){defineProperty(context,"self",{enumerable:true,value:context});defineProperty(context,"globalThis",{value:context});defineProperty(context,"Symbol",{value:Symbol});defineProperty(context,"clearInterval",{value:clearInterval});defineProperty(context,"clearTimeout",{value:clearTimeout});defineProperty(context,"setInterval",{value:setInterval});defineProperty(context,"setTimeout",{value:setTimeout});defineProperty(context,"EdgeRuntime",{value:"edge-runtime"});defineProperties(context,{exports:(0,require_1.requireWithCache)({context:context,path:require.resolve("next/dist/compiled/@edge-runtime/primitives/console"),scopedContext:{console:console}}),nonenumerable:["console"]});const encodings=(0,require_1.requireWithCache)({context:context,path:require.resolve("next/dist/compiled/@edge-runtime/primitives/encoding"),scopedContext:{Buffer:buffer_1.Buffer,global:{}}});defineProperties(context,{exports:encodings,nonenumerable:["atob","btoa","TextEncoder","TextDecoder"]});const streams=(0,require_1.requireWithCache)({path:require.resolve("next/dist/compiled/@edge-runtime/primitives/streams"),context:context});defineProperties(context,{exports:streams,nonenumerable:["ReadableStream","ReadableStreamBYOBReader","ReadableStreamDefaultReader","TransformStream","WritableStream","WritableStreamDefaultWriter"]});const abort=(0,require_1.requireWithCache)({context:context,path:require.resolve("next/dist/compiled/@edge-runtime/primitives/abort-controller")});defineProperties(context,{exports:abort,nonenumerable:["AbortController","AbortSignal","DOMException"]});defineProperties(context,{exports:(0,require_1.requireWithCache)({cache:new Map([["punycode",{exports:__nccwpck_require__(477)}]]),context:context,path:require.resolve("next/dist/compiled/@edge-runtime/primitives/url"),scopedContext:{TextEncoder:encodings.TextEncoder,TextDecoder:encodings.TextDecoder}}),nonenumerable:["URL","URLSearchParams","URLPattern"]});const blob=(0,require_1.requireWithCache)({context:context,path:require.resolve("next/dist/compiled/@edge-runtime/primitives/blob")});defineProperties(context,{exports:blob,nonenumerable:["Blob"]});const webFetch=(0,require_1.requireWithCache)({context:context,cache:new Map([["abort-controller",{exports:abort}],["assert",{exports:__nccwpck_require__(491)}],["buffer",{exports:__nccwpck_require__(300)}],["events",{exports:__nccwpck_require__(361)}],["http",{exports:__nccwpck_require__(685)}],["net",{exports:__nccwpck_require__(808)}],["perf_hooks",{exports:__nccwpck_require__(74)}],["querystring",{exports:__nccwpck_require__(788)}],["stream",{exports:__nccwpck_require__(781)}],["tls",{exports:__nccwpck_require__(404)}],["util",{exports:__nccwpck_require__(837)}],["zlib",{exports:__nccwpck_require__(796)}],[require.resolve("next/dist/compiled/@edge-runtime/primitives/streams"),{exports:streams}],[require.resolve("next/dist/compiled/@edge-runtime/primitives/blob"),{exports:blob}]]),path:require.resolve("next/dist/compiled/@edge-runtime/primitives/fetch"),scopedContext:{Uint8Array:createUint8ArrayForContext(context),Buffer:buffer_1.Buffer,global:{},queueMicrotask:queueMicrotask,setImmediate:setImmediate,clearImmediate:clearImmediate}});defineProperties(context,{exports:webFetch,nonenumerable:["fetch","File","FormData","Headers","Request","Response"]});defineProperties(context,{exports:(0,require_1.requireWithCache)({cache:new Map([[require.resolve("next/dist/compiled/@edge-runtime/primitives/fetch"),{exports:webFetch}]]),context:context,path:require.resolve("next/dist/compiled/@edge-runtime/primitives/cache"),scopedContext:{global:{}}}),enumerable:["caches"],nonenumerable:["Cache","CacheStorage"]});defineProperties(context,{exports:(0,require_1.requireWithCache)({context:context,cache:new Map([["crypto",{exports:__nccwpck_require__(113)}],["process",{exports:__nccwpck_require__(282)}]]),path:require.resolve("next/dist/compiled/@edge-runtime/primitives/crypto"),scopedContext:{Buffer:buffer_1.Buffer,Uint8Array:createUint8ArrayForContext(context)}}),enumerable:["crypto"],nonenumerable:["Crypto","CryptoKey","SubtleCrypto"]});defineProperties(context,{exports:(0,require_1.requireWithCache)({context:context,path:require.resolve("next/dist/compiled/@edge-runtime/primitives/events")}),nonenumerable:["Event","EventTarget","FetchEvent","PromiseRejectionEvent"]});defineProperties(context,{exports:(0,require_1.requireWithCache)({context:context,path:require.resolve("next/dist/compiled/@edge-runtime/primitives/structured-clone")}),nonenumerable:["structuredClone"]});return context}function defineProperty(e,t,r){var n,o,s;Object.defineProperty(e,t,{configurable:(n=r.configurable)!==null&&n!==void 0?n:false,enumerable:(o=r.enumerable)!==null&&o!==void 0?o:false,value:r.value,writable:(s=r.writable)!==null&&s!==void 0?s:true})}function defineProperties(e,t){var r,n;for(const n of(r=t.enumerable)!==null&&r!==void 0?r:[]){if(!t.exports[n]){throw new Error(`Attempt to export a nullable value for "${n}"`)}defineProperty(e,n,{enumerable:true,value:t.exports[n]})}for(const r of(n=t.nonenumerable)!==null&&n!==void 0?n:[]){if(!t.exports[r]){throw new Error(`Attempt to export a nullable value for "${r}"`)}defineProperty(e,r,{value:t.exports[r]})}}function createUint8ArrayForContext(e){return new Proxy((0,vm_2.runInContext)("Uint8Array",e),{construct(e,t){const r=new e(...t);if(!(t[0]instanceof buffer_1.Buffer)){return r}return new e([...r])}})}},668:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.VM=t.EdgeVM=void 0;var n=r(543);Object.defineProperty(t,"EdgeVM",{enumerable:true,get:function(){return n.EdgeVM}});var o=r(256);Object.defineProperty(t,"VM",{enumerable:true,get:function(){return o.VM}})},246:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.requireWithCache=t.createRequire=t.requireDependencies=void 0;const n=r(147);const o=r(144);const s=r(17);function requireDependencies(e){const{context:t,requireCache:r,dependencies:n}=e;const o=createRequire(t,r);for(const{path:e,mapExports:r}of n){const n=o(e,e);for(const e of Object.keys(r)){t[r[e]]=n[e]}}}t.requireDependencies=requireDependencies;function createRequire(e,t,r,i={}){return function requireFn(a,c){const E=require.resolve(c,{paths:[(0,s.dirname)(a)]});const u=t.get(c)||t.get(E);if(u!==undefined&&u!==null){return u.exports}const d={exports:{},loaded:false,id:E};t.set(E,d);r===null||r===void 0?void 0:r.add(E);const _=(0,o.runInContext)(`(function(module,exports,require,__dirname,__filename,${Object.keys(i).join(",")}) {${(0,n.readFileSync)(E,"utf-8")}\n})`,e);try{_(d,d.exports,requireFn.bind(null,E),(0,s.dirname)(E),E,...Object.values(i))}catch(e){t.delete(E);throw e}d.loaded=true;return d.exports}}t.createRequire=createRequire;function requireWithCache(e){var t;return createRequire(e.context,(t=e.cache)!==null&&t!==void 0?t:new Map,e.references,e.scopedContext).call(null,e.path,e.path)}t.requireWithCache=requireWithCache},208:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.tempFile=void 0;const o=r(277);const s=n(r(17));const i=n(r(147));const a=n(r(37));function tempFile(e){const t=s.default.join(a.default.tmpdir(),o.crypto.randomUUID());i.default.writeFileSync(t,e);return{path:t,remove:()=>i.default.unlinkSync(t)}}t.tempFile=tempFile},256:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.VM=void 0;const n=r(144);const o=r(246);const s=r(208);class VM{constructor(e={}){var t,r,s,i;const a=(0,n.createContext)({},{name:"Edge Runtime",codeGeneration:(t=e.codeGeneration)!==null&&t!==void 0?t:{strings:false,wasm:true}});this.requireCache=(r=e.requireCache)!==null&&r!==void 0?r:new Map;this.context=(i=(s=e.extend)===null||s===void 0?void 0:s.call(e,a))!==null&&i!==void 0?i:a;this.requireFn=(0,o.createRequire)(this.context,this.requireCache)}evaluate(e){return(0,n.runInContext)(e,this.context)}require(e){return this.requireFn(e,e)}requireInContext(e){const t=this.require(e);for(const[e,r]of Object.entries(t)){this.context[e]=r}}requireInlineInContext(e){const t=(0,s.tempFile)(e);this.requireInContext(t.path);t.remove()}}t.VM=VM},162:e=>{"use strict";e.exports=e=>{const t=e[0]*1e9+e[1];const r=t/1e6;const n=t/1e9;return{seconds:n,milliseconds:r,nanoseconds:t}}},200:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.EdgeRuntime=void 0;const n=r(668);let o;let s;class EdgeRuntime extends n.EdgeVM{constructor(e){super({...e,extend:t=>{var r,n;return(n=(r=e===null||e===void 0?void 0:e.extend)===null||r===void 0?void 0:r.call(e,t))!==null&&n!==void 0?n:t}});defineHandlerProps({object:this,setterName:"__onUnhandledRejectionHandler",setter:e=>o=e,getterName:"__rejectionHandlers",getter:()=>o});defineHandlerProps({object:this,setterName:"__onErrorHandler",setter:e=>s=e,getterName:"__errorHandlers",getter:()=>s});this.evaluate(getDefineEventListenersCode());this.dispatchFetch=this.evaluate(getDispatchFetchCode());if(e===null||e===void 0?void 0:e.initialCode){this.evaluate(e.initialCode)}}}t.EdgeRuntime=EdgeRuntime;process.on("unhandledRejection",(function invokeRejectionHandlers(e,t){o===null||o===void 0?void 0:o.forEach((r=>r({reason:e,promise:t})))}));process.on("uncaughtException",(function invokeErrorHandlers(e){s===null||s===void 0?void 0:s.forEach((t=>t(e)))}));function getDefineEventListenersCode(){return`\n Object.defineProperty(self, '__listeners', {\n configurable: false,\n enumerable: false,\n value: {},\n writable: true,\n })\n\n function __conditionallyUpdatesHandlerList(eventType) {\n if (eventType === 'unhandledrejection') {\n self.__onUnhandledRejectionHandler = self.__listeners[eventType];\n } else if (eventType === 'error') {\n self.__onErrorHandler = self.__listeners[eventType];\n }\n }\n\n function addEventListener(type, handler) {\n const eventType = type.toLowerCase();\n if (eventType === 'fetch' && self.__listeners.fetch) {\n throw new TypeError('You can register just one "fetch" event listener');\n }\n\n self.__listeners[eventType] = self.__listeners[eventType] || [];\n self.__listeners[eventType].push(handler);\n __conditionallyUpdatesHandlerList(eventType);\n }\n\n function removeEventListener(type, handler) {\n const eventType = type.toLowerCase();\n if (self.__listeners[eventType]) {\n self.__listeners[eventType] = self.__listeners[eventType].filter(item => {\n return item !== handler;\n });\n\n if (self.__listeners[eventType].length === 0) {\n delete self.__listeners[eventType];\n }\n }\n __conditionallyUpdatesHandlerList(eventType);\n }\n `}function getDispatchFetchCode(){return`(async function dispatchFetch(input, init) {\n const request = new Request(input, init);\n const event = new FetchEvent(request);\n if (!self.__listeners.fetch) {\n throw new Error("No fetch event listeners found");\n }\n\n const getResponse = ({ response, error }) => {\n if (error || !response || !(response instanceof Response)) {\n console.error(error ? error.toString() : 'The event listener did not respond')\n response = new Response(null, {\n statusText: 'Internal Server Error',\n status: 500\n })\n }\n\n response.waitUntil = () => Promise.all(event.awaiting);\n\n if (response.status < 300 || response.status >= 400 ) {\n response.headers.delete('content-encoding');\n response.headers.delete('transform-encoding');\n response.headers.delete('content-length');\n }\n\n return response;\n }\n\n try {\n await self.__listeners.fetch[0].call(event, event)\n } catch (error) {\n return getResponse({ error })\n }\n\n return Promise.resolve(event.response)\n .then(response => getResponse({ response }))\n .catch(error => getResponse({ error }))\n })`}function defineHandlerProps({object:e,setterName:t,setter:r,getterName:n,getter:o}){Object.defineProperty(e.context,t,{set:r,configurable:false,enumerable:false});Object.defineProperty(e,n,{get:o,configurable:false,enumerable:false})}},627:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.consumeUint8ArrayReadableStream=t.getClonableBodyStream=void 0;const n=r(781);function getClonableBodyStream(e,t,r){let n=null;return{finalize(){if(n){replaceRequestBody(e,bodyStreamToNodeStream(n))}},cloneBodyStream(){const o=n!==null&&n!==void 0?n:requestToBodyStream(e,t,r);const[s,i]=o.tee();n=s;return i}}}t.getClonableBodyStream=getClonableBodyStream;function requestToBodyStream(e,t,r){const n=new r({start(r){e.on("data",(e=>r.enqueue(new t([...new Uint8Array(e)]))));e.on("end",(()=>r.terminate()));e.on("error",(e=>r.error(e)))}});return n.readable}function bodyStreamToNodeStream(e){const t=e.getReader();return n.Readable.from(async function*(){while(true){const{done:e,value:r}=await t.read();if(e){return}yield r}}())}function replaceRequestBody(e,t){for(const r in t){let n=t[r];if(typeof n==="function"){n=n.bind(t)}e[r]=n}return e}async function*consumeUint8ArrayReadableStream(e){var t;const r=e===null||e===void 0?void 0:e.getReader();if(r){while(true){const{done:e,value:n}=await r.read();if(e){return}if(((t=n===null||n===void 0?void 0:n.constructor)===null||t===void 0?void 0:t.name)!=="Uint8Array"){throw new TypeError("This ReadableStream did not return bytes.")}yield n}}}t.consumeUint8ArrayReadableStream=consumeUint8ArrayReadableStream},417:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.createHandler=void 0;const o=r(627);const s=r(627);const i=n(r(606));const a=n(r(632));const c=n(r(943));function createHandler(e){const t=new Set;return{handler:async(r,n)=>{var E,u;try{const d=(0,c.default)();const _=r.method!=="GET"&&r.method!=="HEAD"?(0,s.getClonableBodyStream)(r,e.runtime.evaluate("Uint8Array"),e.runtime.context.TransformStream):undefined;const l=await e.runtime.dispatchFetch(String(getURL(r)),{headers:toRequestInitHeaders(r),method:r.method,body:_===null||_===void 0?void 0:_.cloneBodyStream()});const S=l.waitUntil();t.add(S);S.finally((()=>t.delete(S)));n.statusCode=l.status;n.statusMessage=l.statusText;for(const[e,t]of Object.entries(toNodeHeaders(l.headers))){if(t!==undefined){n.setHeader(e,t)}}if(l.body){for await(const e of(0,o.consumeUint8ArrayReadableStream)(l.body)){n.write(e)}}const R=`${r.socket.remoteAddress} ${r.method} ${r.url}`;const h=`${(E=(0,i.default)(d()).match(/[a-zA-Z]+|[0-9]+/g))===null||E===void 0?void 0:E.join(" ")}`;const p=`${n.statusCode} ${a.default[n.statusCode]}`;(u=e.logger)===null||u===void 0?void 0:u.debug(`${R} โ†’ ${p} in ${h}`);n.end()}finally{if(!n.finished){n.end()}}},waitUntil:()=>Promise.all(t)}}t.createHandler=createHandler;function getURL(e){var t;const r=((t=e.socket)===null||t===void 0?void 0:t.encrypted)?"https":"http";return new URL(String(e.url),`${r}://${String(e.headers.host)}`)}function toRequestInitHeaders(e){return Object.keys(e.headers).map((t=>{const r=e.headers[t];return[t,Array.isArray(r)?r.join(", "):r!==null&&r!==void 0?r:""]}))}function toNodeHeaders(e){const t={};if(e){for(const[r,n]of e.entries()){t[r]=r.toLowerCase()==="set-cookie"?e.getAll("set-cookie"):n}}return t}},684:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.runServer=t.createHandler=t.consumeUint8ArrayReadableStream=void 0;var n=r(627);Object.defineProperty(t,"consumeUint8ArrayReadableStream",{enumerable:true,get:function(){return n.consumeUint8ArrayReadableStream}});var o=r(417);Object.defineProperty(t,"createHandler",{enumerable:true,get:function(){return o.createHandler}});var s=r(881);Object.defineProperty(t,"runServer",{enumerable:true,get:function(){return s.runServer}})},881:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.runServer=void 0;const o=r(417);const s=r(361);const i=n(r(685));async function runServer(e){const{handler:t,waitUntil:r}=(0,o.createHandler)(e);const n=i.default.createServer(t);n.listen(e.port);try{await(0,s.once)(n,"listening")}catch(t){if((t===null||t===void 0?void 0:t.code)==="EADDRINUSE"){return runServer({...e,port:undefined})}throw t}const a=n.address();const c=typeof a==="string"||a==null?String(a):`http://localhost:${a.port}`;return{url:c,close:async()=>{await r();await new Promise(((e,t)=>n.close((r=>{if(r)t(r);e()}))))},waitUntil:r}}t.runServer=runServer},632:e=>{var t;t={"1xx":"Informational","1xx_NAME":"INFORMATIONAL","1xx_MESSAGE":"Indicates an interim response for communicating connection status or request progress prior to completing the requested action and sending a final response.",INFORMATIONAL:"1xx","2xx":"Successful","2xx_NAME":"SUCCESSFUL","2xx_MESSAGE":"Indicates that the client's request was successfully received, understood, and accepted.",SUCCESSFUL:"2xx","3xx":"Redirection","3xx_NAME":"REDIRECTION","3xx_MESSAGE":"Indicates that further action needs to be taken by the user agent in order to fulfill the request.",REDIRECTION:"3xx","4xx":"Client Error","4xx_NAME":"CLIENT_ERROR","4xx_MESSAGE":"Indicates that the client seems to have erred.",CLIENT_ERROR:"4xx","5xx":"Server Error","5xx_NAME":"SERVER_ERROR","5xx_MESSAGE":"Indicates that the server is aware that it has erred or is incapable of performing the requested method.",SERVER_ERROR:"5xx"};e.exports={classes:t,100:"Continue","100_NAME":"CONTINUE","100_MESSAGE":"The server has received the request headers and the client should proceed to send the request body.","100_CLASS":t.INFORMATIONAL,CONTINUE:100,101:"Switching Protocols","101_NAME":"SWITCHING_PROTOCOLS","101_MESSAGE":"The requester has asked the server to switch protocols and the server has agreed to do so.","101_CLASS":t.INFORMATIONAL,SWITCHING_PROTOCOLS:101,102:"Processing","102_NAME":"PROCESSING","102_MESSAGE":"A WebDAV request may contain many sub-requests involving file operations, requiring a long time to complete the request. This code indicates that the server has received and is processing the request, but no response is available yet.[7] This prevents the client from timing out and assuming the request was lost.","102_CLASS":t.INFORMATIONAL,PROCESSING:102,103:"Early Hints","103_NAME":"EARLY_HINTS","103_MESSAGE":"Used to return some response headers before final HTTP message.","103_CLASS":t.INFORMATIONAL,EARLY_HINTS:103,200:"OK","200_NAME":"OK","200_MESSAGE":"Standard response for successful HTTP requests.","200_CLASS":t.SUCCESSFUL,OK:200,201:"Created","201_NAME":"CREATED","201_MESSAGE":"The request has been fulfilled, resulting in the creation of a new resource.","201_CLASS":t.SUCCESSFUL,CREATED:201,202:"Accepted","202_NAME":"ACCEPTED","202_MESSAGE":"The request has been accepted for processing, but the processing has not been completed.","202_CLASS":t.SUCCESSFUL,ACCEPTED:202,203:"Non-Authoritative Information","203_NAME":"NON_AUTHORITATIVE_INFORMATION","203_MESSAGE":"The server is a transforming proxy (e.g. a Web accelerator) that received a 200 OK from its origin, but is returning a modified version of the origin's response.","203_CLASS":t.SUCCESSFUL,NON_AUTHORITATIVE_INFORMATION:203,204:"No Content","204_NAME":"NO_CONTENT","204_MESSAGE":"The server successfully processed the request and is not returning any content.","204_CLASS":t.SUCCESSFUL,NO_CONTENT:204,205:"Reset Content","205_NAME":"RESET_CONTENT","205_MESSAGE":"The server successfully processed the request, but is not returning any content. Unlike a 204 response, this response requires that the requester reset the document view.","205_CLASS":t.SUCCESSFUL,RESET_CONTENT:205,206:"Partial Content","206_NAME":"PARTIAL_CONTENT","206_MESSAGE":"The server is delivering only part of the resource (byte serving) due to a range header sent by the client.","206_CLASS":t.SUCCESSFUL,PARTIAL_CONTENT:206,207:"Multi Status","207_NAME":"MULTI_STATUS","207_MESSAGE":"The message body that follows is by default an XML message and can contain a number of separate response codes, depending on how many sub-requests were made.","207_CLASS":t.SUCCESSFUL,MULTI_STATUS:207,208:"Already Reported","208_NAME":"ALREADY_REPORTED","208_MESSAGE":"The members of a DAV binding have already been enumerated in a preceding part of the (multistatus) response, and are not being included again.","208_CLASS":t.SUCCESSFUL,ALREADY_REPORTED:208,226:"IM Used","226_NAME":"IM_USED","226_MESSAGE":"The server has fulfilled a request for the resource, and the response is a representation of the result of one or more instance-manipulations applied to the current instance.","226_CLASS":t.SUCCESSFUL,IM_USED:226,300:"Multiple Choices","300_NAME":"MULTIPLE_CHOICES","300_MESSAGE":"Indicates multiple options for the resource from which the client may choose.","300_CLASS":t.REDIRECTION,MULTIPLE_CHOICES:300,301:"Moved Permanently","301_NAME":"MOVED_PERMANENTLY","301_MESSAGE":"This and all future requests should be directed to the given URI.","301_CLASS":t.REDIRECTION,MOVED_PERMANENTLY:301,302:"Found","302_NAME":"FOUND","302_MESSAGE":'This is an example of industry practice contradicting the standard. The HTTP/1.0 specification (RFC 1945) required the client to perform a temporary redirect (the original describing phrase was "Moved Temporarily"), but popular browsers implemented 302 with the functionality of a 303 See Other. Therefore, HTTP/1.1 added status codes 303 and 307 to distinguish between the two behaviours.',"302_CLASS":t.REDIRECTION,FOUND:302,303:"See Other","303_NAME":"SEE_OTHER","303_MESSAGE":"The response to the request can be found under another URI using the GET method.","303_CLASS":t.REDIRECTION,SEE_OTHER:303,304:"Not Modified","304_NAME":"NOT_MODIFIED","304_MESSAGE":"Indicates that the resource has not been modified since the version specified by the request headers If-Modified-Since or If-None-Match.","304_CLASS":t.REDIRECTION,NOT_MODIFIED:304,305:"Use Proxy","305_NAME":"USE_PROXY","305_MESSAGE":"The requested resource is available only through a proxy, the address for which is provided in the response.","305_CLASS":t.REDIRECTION,USE_PROXY:305,306:"Switch Proxy","306_NAME":"SWITCH_PROXY","306_MESSAGE":'No longer used. Originally meant "Subsequent requests should use the specified proxy.',"306_CLASS":t.REDIRECTION,SWITCH_PROXY:306,307:"Temporary Redirect","307_NAME":"TEMPORARY_REDIRECT","307_MESSAGE":"In this case, the request should be repeated with another URI; however, future requests should still use the original URI.","307_CLASS":t.REDIRECTION,TEMPORARY_REDIRECT:307,308:"Permanent Redirect","308_NAME":"PERMANENT_REDIRECT","308_MESSAGE":"The request and all future requests should be repeated using another URI.","308_CLASS":t.REDIRECTION,PERMANENT_REDIRECT:308,400:"Bad Request","400_NAME":"BAD_REQUEST","400_MESSAGE":"The server cannot or will not process the request due to an apparent client error.","400_CLASS":t.CLIENT_ERROR,BAD_REQUEST:400,401:"Unauthorized","401_NAME":"UNAUTHORIZED","401_MESSAGE":"Similar to 403 Forbidden, but specifically for use when authentication is required and has failed or has not yet been provided.","401_CLASS":t.CLIENT_ERROR,UNAUTHORIZED:401,402:"Payment Required","402_NAME":"PAYMENT_REQUIRED","402_MESSAGE":"Reserved for future use. The original intention was that this code might be used as part of some form of digital cash or micropayment scheme, as proposed for example by GNU Taler, but that has not yet happened, and this code is not usually used.","402_CLASS":t.CLIENT_ERROR,PAYMENT_REQUIRED:402,403:"Forbidden","403_NAME":"FORBIDDEN","403_MESSAGE":"The request was valid, but the server is refusing action.","403_CLASS":t.CLIENT_ERROR,FORBIDDEN:403,404:"Not Found","404_NAME":"NOT_FOUND","404_MESSAGE":"The requested resource could not be found but may be available in the future. Subsequent requests by the client are permissible.","404_CLASS":t.CLIENT_ERROR,NOT_FOUND:404,405:"Method Not Allowed","405_NAME":"METHOD_NOT_ALLOWED","405_MESSAGE":"A request method is not supported for the requested resource.","405_CLASS":t.CLIENT_ERROR,METHOD_NOT_ALLOWED:405,406:"Not Acceptable","406_NAME":"NOT_ACCEPTABLE","406_MESSAGE":"The requested resource is capable of generating only content not acceptable according to the Accept headers sent in the request.","406_CLASS":t.CLIENT_ERROR,NOT_ACCEPTABLE:406,407:"Proxy Authentication Required","407_NAME":"PROXY_AUTHENTICATION_REQUIRED","407_MESSAGE":"The client must first authenticate itself with the proxy.","407_CLASS":t.CLIENT_ERROR,PROXY_AUTHENTICATION_REQUIRED:407,408:"Request Time-out","408_NAME":"REQUEST_TIMEOUT","408_MESSAGE":"The server timed out waiting for the request.","408_CLASS":t.CLIENT_ERROR,REQUEST_TIMEOUT:408,409:"Conflict","409_NAME":"CONFLICT","409_MESSAGE":"Indicates that the request could not be processed because of conflict in the request, such as an edit conflict between multiple simultaneous updates.","409_CLASS":t.CLIENT_ERROR,CONFLICT:409,410:"Gone","410_NAME":"GONE","410_MESSAGE":"Indicates that the resource requested is no longer available and will not be available again.","410_CLASS":t.CLIENT_ERROR,GONE:410,411:"Length Required","411_NAME":"LENGTH_REQUIRED","411_MESSAGE":"The request did not specify the length of its content, which is required by the requested resource.","411_CLASS":t.CLIENT_ERROR,LENGTH_REQUIRED:411,412:"Precondition Failed","412_NAME":"PRECONDITION_FAILED","412_MESSAGE":"The server does not meet one of the preconditions that the requester put on the request.","412_CLASS":t.CLIENT_ERROR,PRECONDITION_FAILED:412,413:"Request Entity Too Large","413_NAME":"REQUEST_ENTITY_TOO_LARGE","413_MESSAGE":'The request is larger than the server is willing or able to process. Previously called "Request Entity Too Large".',"413_CLASS":t.CLIENT_ERROR,REQUEST_ENTITY_TOO_LARGE:413,414:"Request-URI Too Large","414_NAME":"REQUEST_URI_TOO_LONG","414_MESSAGE":"The URI provided was too long for the server to process.","414_CLASS":t.CLIENT_ERROR,REQUEST_URI_TOO_LONG:414,415:"Unsupported Media Type","415_NAME":"UNSUPPORTED_MEDIA_TYPE","415_MESSAGE":"The request entity has a media type which the server or resource does not support.","415_CLASS":t.CLIENT_ERROR,UNSUPPORTED_MEDIA_TYPE:415,416:"Requested Range not Satisfiable","416_NAME":"REQUESTED_RANGE_NOT_SATISFIABLE","416_MESSAGE":"The client has asked for a portion of the file (byte serving), but the server cannot supply that portion.","416_CLASS":t.CLIENT_ERROR,REQUESTED_RANGE_NOT_SATISFIABLE:416,417:"Expectation Failed","417_NAME":"EXPECTATION_FAILED","417_MESSAGE":"The server cannot meet the requirements of the Expect request-header field.","417_CLASS":t.CLIENT_ERROR,EXPECTATION_FAILED:417,418:"I'm a teapot","418_NAME":"IM_A_TEAPOT","418_MESSAGE":'Any attempt to brew coffee with a teapot should result in the error code "418 I\'m a teapot". The resulting entity body MAY be short and stout.',"418_CLASS":t.CLIENT_ERROR,IM_A_TEAPOT:418,421:"Misdirected Request","421_NAME":"MISDIRECTED_REQUEST","421_MESSAGE":"The request was directed at a server that is not able to produce a response.","421_CLASS":t.CLIENT_ERROR,MISDIRECTED_REQUEST:421,422:"Unprocessable Entity","422_NAME":"UNPROCESSABLE_ENTITY","422_MESSAGE":"The request was well-formed but was unable to be followed due to semantic errors.","422_CLASS":t.CLIENT_ERROR,UNPROCESSABLE_ENTITY:422,423:"Locked","423_NAME":"LOCKED","423_MESSAGE":"The resource that is being accessed is locked.","423_CLASS":t.CLIENT_ERROR,LOCKED:423,424:"Failed Dependency","424_NAME":"FAILED_DEPENDENCY","424_MESSAGE":"The request failed because it depended on another request and that request failed.","424_CLASS":t.CLIENT_ERROR,FAILED_DEPENDENCY:424,426:"Upgrade Required","426_NAME":"UPGRADE_REQUIRED","426_MESSAGE":"The client should switch to a different protocol such as TLS/1.0, given in the Upgrade header field.","426_CLASS":t.CLIENT_ERROR,UPGRADE_REQUIRED:426,428:"Precondition Required","428_NAME":"PRECONDITION_REQUIRED","428_MESSAGE":"The origin server requires the request to be conditional.","428_CLASS":t.CLIENT_ERROR,PRECONDITION_REQUIRED:428,429:"Too Many Requests","429_NAME":"TOO_MANY_REQUESTS","429_MESSAGE":"The user has sent too many requests in a given amount of time.","429_CLASS":t.CLIENT_ERROR,TOO_MANY_REQUESTS:429,431:"Request Header Fields Too Large","431_NAME":"REQUEST_HEADER_FIELDS_TOO_LARGE","431_MESSAGE":"The server is unwilling to process the request because either an individual header field, or all the header fields collectively, are too large.","431_CLASS":t.CLIENT_ERROR,REQUEST_HEADER_FIELDS_TOO_LARGE:431,451:"Unavailable For Legal Reasons","451_NAME":"UNAVAILABLE_FOR_LEGAL_REASONS","451_MESSAGE":"A server operator has received a legal demand to deny access to a resource or to a set of resources that includes the requested resource.","451_CLASS":t.CLIENT_ERROR,UNAVAILABLE_FOR_LEGAL_REASONS:451,500:"Internal Server Error","500_NAME":"INTERNAL_SERVER_ERROR","500_MESSAGE":"A generic error message, given when an unexpected condition was encountered and no more specific message is suitable.","500_CLASS":t.SERVER_ERROR,INTERNAL_SERVER_ERROR:500,501:"Not Implemented","501_NAME":"NOT_IMPLEMENTED","501_MESSAGE":"The server either does not recognize the request method, or it lacks the ability to fulfil the request. Usually this implies future availability.","501_CLASS":t.SERVER_ERROR,NOT_IMPLEMENTED:501,502:"Bad Gateway","502_NAME":"BAD_GATEWAY","502_MESSAGE":"The server was acting as a gateway or proxy and received an invalid response from the upstream server.","502_CLASS":t.SERVER_ERROR,BAD_GATEWAY:502,503:"Service Unavailable","503_NAME":"SERVICE_UNAVAILABLE","503_MESSAGE":"The server is currently unavailable (because it is overloaded or down for maintenance). Generally, this is a temporary state.","503_CLASS":t.SERVER_ERROR,SERVICE_UNAVAILABLE:503,504:"Gateway Time-out","504_NAME":"GATEWAY_TIMEOUT","504_MESSAGE":"The server was acting as a gateway or proxy and did not receive a timely response from the upstream server.","504_CLASS":t.SERVER_ERROR,GATEWAY_TIMEOUT:504,505:"HTTP Version not Supported","505_NAME":"HTTP_VERSION_NOT_SUPPORTED","505_MESSAGE":"The server does not support the HTTP protocol version used in the request.","505_CLASS":t.SERVER_ERROR,HTTP_VERSION_NOT_SUPPORTED:505,506:"Variant Also Negotiates","506_NAME":"VARIANT_ALSO_NEGOTIATES","506_MESSAGE":"Transparent content negotiation for the request results in a circular reference.","506_CLASS":t.SERVER_ERROR,VARIANT_ALSO_NEGOTIATES:506,507:"Insufficient Storage","507_NAME":"INSUFFICIENT_STORAGE","507_MESSAGE":"The server is unable to store the representation needed to complete the request.","507_CLASS":t.SERVER_ERROR,INSUFFICIENT_STORAGE:507,508:"Loop Detected","508_NAME":"LOOP_DETECTED","508_MESSAGE":"The server detected an infinite loop while processing the request.","508_CLASS":t.SERVER_ERROR,LOOP_DETECTED:508,510:"Not Extended","510_NAME":"NOT_EXTENDED","510_MESSAGE":"Further extensions to the request are required for the server to fulfil it.","510_CLASS":t.SERVER_ERROR,NOT_EXTENDED:510,511:"Network Authentication Required","511_NAME":"NETWORK_AUTHENTICATION_REQUIRED","511_MESSAGE":"The client needs to authenticate to gain network access. Intended for use by intercepting proxies used to control access to the network.","511_CLASS":t.SERVER_ERROR,NETWORK_AUTHENTICATION_REQUIRED:511,extra:{unofficial:{103:"Checkpoint","103_NAME":"CHECKPOINT","103_MESSAGE":"Used in the resumable requests proposal to resume aborted PUT or POST requests.","103_CLASS":t.INFORMATIONAL,CHECKPOINT:103,419:"Page Expired","419_NAME":"PAGE_EXPIRED","419_MESSAGE":"Used by the Laravel Framework when a CSRF Token is missing or expired.","419_CLASS":t.CLIENT_ERROR,PAGE_EXPIRED:419,218:"This is fine","218_NAME":"THIS_IS_FINE","218_MESSAGE":"Used as a catch-all error condition for allowing response bodies to flow through Apache when ProxyErrorOverride is enabled. When ProxyErrorOverride is enabled in Apache, response bodies that contain a status code of 4xx or 5xx are automatically discarded by Apache in favor of a generic response or a custom response specified by the ErrorDocument directive.","218_CLASS":t.SUCCESSFUL,THIS_IS_FINE:218,420:"Enhance Your Calm","420_NAME":"ENHANCE_YOUR_CALM","420_MESSAGE":"Returned by version 1 of the Twitter Search and Trends API when the client is being rate limited; versions 1.1 and later use the 429 Too Many Requests response code instead.","420_CLASS":t.CLIENT_ERROR,ENHANCE_YOUR_CALM:420,450:"Blocked by Windows Parental Controls","450_NAME":"BLOCKED_BY_WINDOWS_PARENTAL_CONTROLS","450_MESSAGE":"The Microsoft extension code indicated when Windows Parental Controls are turned on and are blocking access to the requested webpage.","450_CLASS":t.CLIENT_ERROR,BLOCKED_BY_WINDOWS_PARENTAL_CONTROLS:450,498:"Invalid Token","498_NAME":"INVALID_TOKEN","498_MESSAGE":"Returned by ArcGIS for Server. Code 498 indicates an expired or otherwise invalid token.","498_CLASS":t.CLIENT_ERROR,INVALID_TOKEN:498,499:"Token Required","499_NAME":"TOKEN_REQUIRED","499_MESSAGE":"Returned by ArcGIS for Server. Code 499 indicates that a token is required but was not submitted.","499_CLASS":t.CLIENT_ERROR,TOKEN_REQUIRED:499,509:"Bandwidth Limit Exceeded","509_NAME":"BANDWIDTH_LIMIT_EXCEEDED","509_MESSAGE":"The server has exceeded the bandwidth specified by the server administrator.","509_CLASS":t.SERVER_ERROR,BANDWIDTH_LIMIT_EXCEEDED:509,530:"Site is frozen","530_NAME":"SITE_IS_FROZEN","530_MESSAGE":"Used by the Pantheon web platform to indicate a site that has been frozen due to inactivity.","530_CLASS":t.SERVER_ERROR,SITE_IS_FROZEN:530,598:"Network read timeout error","598_NAME":"NETWORK_READ_TIMEOUT_ERROR","598_MESSAGE":"Used by some HTTP proxies to signal a network read timeout behind the proxy to a client in front of the proxy.","598_CLASS":t.SERVER_ERROR,NETWORK_READ_TIMEOUT_ERROR:598},iis:{440:"Login Time-out","440_NAME":"LOGIN_TIME_OUT","440_MESSAGE":"The client's session has expired and must log in again.","440_CLASS":t.CLIENT_ERROR,LOGIN_TIME_OUT:440,449:"Retry With","449_NAME":"RETRY_WITH","449_MESSAGE":"The server cannot honour the request because the user has not provided the required information.","449_CLASS":t.CLIENT_ERROR,RETRY_WITH:449,451:"Redirect","451_NAME":"REDIRECT","451_MESSAGE":"Used in Exchange ActiveSync when either a more efficient server is available or the server cannot access the users' mailbox.","451_CLASS":t.CLIENT_ERROR,REDIRECT:451},nginx:{444:"No Response","444_NAME":"NO_RESPONSE","444_MESSAGE":"Used internally to instruct the server to return no information to the client and close the connection immediately.","444_CLASS":t.CLIENT_ERROR,NO_RESPONSE:444,494:"Request header too large","494_NAME":"REQUEST_HEADER_TOO_LARGE","494_MESSAGE":"Client sent too large request or too long header line.","494_CLASS":t.CLIENT_ERROR,REQUEST_HEADER_TOO_LARGE:494,495:"SSL Certificate Error","495_NAME":"SSL_CERTIFICATE_ERROR","495_MESSAGE":"An expansion of the 400 Bad Request response code, used when the client has provided an invalid client certificate.","495_CLASS":t.CLIENT_ERROR,SSL_CERTIFICATE_ERROR:495,496:"SSL Certificate Required","496_NAME":"SSL_CERTIFICATE_REQUIRED","496_MESSAGE":"An expansion of the 400 Bad Request response code, used when a client certificate is required but not provided.","496_CLASS":t.CLIENT_ERROR,SSL_CERTIFICATE_REQUIRED:496,497:"HTTP Request Sent to HTTPS Port","497_NAME":"HTTP_REQUEST_SENT_TO_HTTPS_PORT","497_MESSAGE":"An expansion of the 400 Bad Request response code, used when the client has made a HTTP request to a port listening for HTTPS requests.","497_CLASS":t.CLIENT_ERROR,HTTP_REQUEST_SENT_TO_HTTPS_PORT:497,499:"Client Closed Request","499_NAME":"CLIENT_CLOSED_REQUEST","499_MESSAGE":"Used when the client has closed the request before the server could send a response.","499_CLASS":t.CLIENT_ERROR,CLIENT_CLOSED_REQUEST:499},cloudflare:{520:"Unknown Error","520_NAME":"UNKNOWN_ERROR","520_MESSAGE":'The 520 error is used as a "catch-all response for when the origin server returns something unexpected", listing connection resets, large headers, and empty or invalid responses as common triggers.',"520_CLASS":t.SERVER_ERROR,UNKNOWN_ERROR:520,521:"Web Server Is Down","521_NAME":"WEB_SERVER_IS_DOWN","521_MESSAGE":"The origin server has refused the connection from Cloudflare.","521_CLASS":t.SERVER_ERROR,WEB_SERVER_IS_DOWN:521,522:"Connection Timed Out","522_NAME":"CONNECTION_TIMED_OUT","522_MESSAGE":"Cloudflare could not negotiate a TCP handshake with the origin server.","522_CLASS":t.SERVER_ERROR,CONNECTION_TIMED_OUT:522,523:"Origin Is Unreachable","523_NAME":"ORIGIN_IS_UNREACHABLE","523_MESSAGE":"Cloudflare could not reach the origin server.","523_CLASS":t.SERVER_ERROR,ORIGIN_IS_UNREACHABLE:523,524:"A Timeout Occurred","524_NAME":"A_TIMEOUT_OCCURRED","524_MESSAGE":"Cloudflare was able to complete a TCP connection to the origin server, but did not receive a timely HTTP response.","524_CLASS":t.SERVER_ERROR,A_TIMEOUT_OCCURRED:524,525:"SSL Handshake Failed","525_NAME":"SSL_HANDSHAKE_FAILED","525_MESSAGE":"Cloudflare could not negotiate a SSL/TLS handshake with the origin server.","525_CLASS":t.SERVER_ERROR,SSL_HANDSHAKE_FAILED:525,526:"Invalid SSL Certificate","526_NAME":"INVALID_SSL_CERTIFICATE","526_MESSAGE":"Cloudflare could not validate the SSL/TLS certificate that the origin server presented.","526_CLASS":t.SERVER_ERROR,INVALID_SSL_CERTIFICATE:526,527:"Railgun Error","527_NAME":"RAILGUN_ERROR","527_MESSAGE":"Error 527 indicates that the request timed out or failed after the WAN connection had been established.","527_CLASS":t.SERVER_ERROR,RAILGUN_ERROR:527}}}},523:e=>{"use strict";e.exports=e=>{if(typeof e!=="number"){throw new TypeError("Expected a number")}const t=e>0?Math.floor:Math.ceil;return{days:t(e/864e5),hours:t(e/36e5)%24,minutes:t(e/6e4)%60,seconds:t(e/1e3)%60,milliseconds:t(e)%1e3,microseconds:t(e*1e3)%1e3,nanoseconds:t(e*1e6)%1e3}}},606:(e,t,r)=>{"use strict";const n=r(523);const pluralize=(e,t)=>t===1?e:`${e}s`;const o=1e-7;e.exports=(e,t={})=>{if(!Number.isFinite(e)){throw new TypeError("Expected a finite number")}if(t.colonNotation){t.compact=false;t.formatSubMilliseconds=false;t.separateMilliseconds=false;t.verbose=false}if(t.compact){t.secondsDecimalDigits=0;t.millisecondsDecimalDigits=0}const r=[];const floorDecimals=(e,t)=>{const r=Math.floor(e*10**t+o);const n=Math.round(r)/10**t;return n.toFixed(t)};const add=(e,n,o,s)=>{if((r.length===0||!t.colonNotation)&&e===0&&!(t.colonNotation&&o==="m")){return}s=(s||e||"0").toString();let i;let a;if(t.colonNotation){i=r.length>0?":":"";a="";const e=s.includes(".")?s.split(".")[0].length:s.length;const t=r.length>0?2:1;s="0".repeat(Math.max(0,t-e))+s}else{i="";a=t.verbose?" "+pluralize(n,e):o}r.push(i+s+a)};const s=n(e);add(Math.trunc(s.days/365),"year","y");add(s.days%365,"day","d");add(s.hours,"hour","h");add(s.minutes,"minute","m");if(t.separateMilliseconds||t.formatSubMilliseconds||!t.colonNotation&&e<1e3){add(s.seconds,"second","s");if(t.formatSubMilliseconds){add(s.milliseconds,"millisecond","ms");add(s.microseconds,"microsecond","ยตs");add(s.nanoseconds,"nanosecond","ns")}else{const e=s.milliseconds+s.microseconds/1e3+s.nanoseconds/1e6;const r=typeof t.millisecondsDecimalDigits==="number"?t.millisecondsDecimalDigits:0;const n=e>=1?Math.round(e):Math.ceil(e);const o=r?e.toFixed(r):n;add(Number.parseFloat(o,10),"millisecond","ms",o)}}else{const r=e/1e3%60;const n=typeof t.secondsDecimalDigits==="number"?t.secondsDecimalDigits:1;const o=floorDecimals(r,n);const s=t.keepDecimalsOnWholeSeconds?o:o.replace(/\.0+$/,"");add(Number.parseFloat(s,10),"second","s",s)}if(r.length===0){return"0"+(t.verbose?" milliseconds":"ms")}if(t.compact){return r[0]}if(typeof t.unitCount==="number"){const e=t.colonNotation?"":" ";return r.slice(0,Math.max(t.unitCount,1)).join(e)}return t.colonNotation?r.join(""):r.join(" ")}},943:(e,t,r)=>{"use strict";const n=r(162);e.exports=()=>{const e=process.hrtime();const end=t=>n(process.hrtime(e))[t];const returnValue=()=>end("milliseconds");returnValue.rounded=()=>Math.round(end("milliseconds"));returnValue.seconds=()=>end("seconds");returnValue.nanoseconds=()=>end("nanoseconds");return returnValue}},491:e=>{"use strict";e.exports=require("assert")},300:e=>{"use strict";e.exports=require("buffer")},113:e=>{"use strict";e.exports=require("crypto")},361:e=>{"use strict";e.exports=require("events")},147:e=>{"use strict";e.exports=require("fs")},685:e=>{"use strict";e.exports=require("http")},808:e=>{"use strict";e.exports=require("net")},277:e=>{"use strict";e.exports=require("next/dist/compiled/@edge-runtime/primitives/crypto")},37:e=>{"use strict";e.exports=require("os")},17:e=>{"use strict";e.exports=require("path")},74:e=>{"use strict";e.exports=require("perf_hooks")},282:e=>{"use strict";e.exports=require("process")},477:e=>{"use strict";e.exports=require("punycode")},788:e=>{"use strict";e.exports=require("querystring")},781:e=>{"use strict";e.exports=require("stream")},404:e=>{"use strict";e.exports=require("tls")},837:e=>{"use strict";e.exports=require("util")},144:e=>{"use strict";e.exports=require("vm")},796:e=>{"use strict";e.exports=require("zlib")}};var __webpack_module_cache__={};function __nccwpck_require__(e){var t=__webpack_module_cache__[e];if(t!==undefined){return t.exports}var r=__webpack_module_cache__[e]={exports:{}};var n=true;try{__webpack_modules__[e].call(r.exports,r,r.exports,__nccwpck_require__);n=false}finally{if(n)delete __webpack_module_cache__[e]}return r.exports}if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var __webpack_exports__={};(()=>{"use strict";var e=__webpack_exports__;Object.defineProperty(e,"__esModule",{value:true});e.EdgeRuntime=e.runServer=e.createHandler=e.consumeUint8ArrayReadableStream=void 0;var t=__nccwpck_require__(684);Object.defineProperty(e,"consumeUint8ArrayReadableStream",{enumerable:true,get:function(){return t.consumeUint8ArrayReadableStream}});Object.defineProperty(e,"createHandler",{enumerable:true,get:function(){return t.createHandler}});Object.defineProperty(e,"runServer",{enumerable:true,get:function(){return t.runServer}});var r=__nccwpck_require__(200);Object.defineProperty(e,"EdgeRuntime",{enumerable:true,get:function(){return r.EdgeRuntime}})})();module.exports=__webpack_exports__})(); \ No newline at end of file +(()=>{var __webpack_modules__={466:(__unused_webpack_module,exports,__nccwpck_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.EdgeVM=void 0;const buffer_1=__nccwpck_require__(300);const require_1=__nccwpck_require__(65);const vm_1=__nccwpck_require__(378);const vm_2=__nccwpck_require__(144);class EdgeVM extends vm_1.VM{constructor(e={}){super({...e,extend:t=>e.extend?e.extend(addPrimitives(t)):addPrimitives(t)})}}exports.EdgeVM=EdgeVM;function addPrimitives(context){defineProperty(context,"self",{enumerable:true,value:context});defineProperty(context,"globalThis",{value:context});defineProperty(context,"Symbol",{value:Symbol});defineProperty(context,"clearInterval",{value:clearInterval});defineProperty(context,"clearTimeout",{value:clearTimeout});defineProperty(context,"setInterval",{value:setInterval});defineProperty(context,"setTimeout",{value:setTimeout});defineProperty(context,"EdgeRuntime",{value:"edge-runtime"});defineProperties(context,{exports:(0,require_1.requireWithCache)({context:context,path:require.resolve("next/dist/compiled/@edge-runtime/primitives/console"),scopedContext:{console:console}}),nonenumerable:["console"]});const encodings=(0,require_1.requireWithCache)({context:context,path:require.resolve("next/dist/compiled/@edge-runtime/primitives/encoding"),scopedContext:{Buffer:buffer_1.Buffer,global:{}}});defineProperties(context,{exports:encodings,nonenumerable:["atob","btoa","TextEncoder","TextDecoder"]});const streams=(0,require_1.requireWithCache)({path:require.resolve("next/dist/compiled/@edge-runtime/primitives/streams"),context:context});defineProperties(context,{exports:streams,nonenumerable:["ReadableStream","ReadableStreamBYOBReader","ReadableStreamDefaultReader","TransformStream","WritableStream","WritableStreamDefaultWriter"]});const abort=(0,require_1.requireWithCache)({context:context,path:require.resolve("next/dist/compiled/@edge-runtime/primitives/abort-controller")});defineProperties(context,{exports:abort,nonenumerable:["AbortController","AbortSignal","DOMException"]});defineProperties(context,{exports:(0,require_1.requireWithCache)({cache:new Map([["punycode",{exports:__nccwpck_require__(477)}]]),context:context,path:require.resolve("next/dist/compiled/@edge-runtime/primitives/url"),scopedContext:{TextEncoder:encodings.TextEncoder,TextDecoder:encodings.TextDecoder}}),nonenumerable:["URL","URLSearchParams","URLPattern"]});const blob=(0,require_1.requireWithCache)({context:context,path:require.resolve("next/dist/compiled/@edge-runtime/primitives/blob")});defineProperties(context,{exports:blob,nonenumerable:["Blob"]});const webFetch=(0,require_1.requireWithCache)({context:context,cache:new Map([["abort-controller",{exports:abort}],["assert",{exports:__nccwpck_require__(491)}],["buffer",{exports:__nccwpck_require__(300)}],["events",{exports:__nccwpck_require__(361)}],["http",{exports:__nccwpck_require__(685)}],["net",{exports:__nccwpck_require__(808)}],["perf_hooks",{exports:__nccwpck_require__(74)}],["querystring",{exports:__nccwpck_require__(788)}],["stream",{exports:__nccwpck_require__(781)}],["tls",{exports:__nccwpck_require__(404)}],["util",{exports:__nccwpck_require__(837)}],["zlib",{exports:__nccwpck_require__(796)}],[require.resolve("next/dist/compiled/@edge-runtime/primitives/streams"),{exports:streams}],[require.resolve("next/dist/compiled/@edge-runtime/primitives/blob"),{exports:blob}]]),path:require.resolve("next/dist/compiled/@edge-runtime/primitives/fetch"),scopedContext:{Uint8Array:createUint8ArrayForContext(context),Buffer:buffer_1.Buffer,global:{},queueMicrotask:queueMicrotask,setImmediate:setImmediate,clearImmediate:clearImmediate}});defineProperties(context,{exports:webFetch,nonenumerable:["fetch","File","FormData","Headers","Request","Response"]});defineProperties(context,{exports:(0,require_1.requireWithCache)({cache:new Map([[require.resolve("next/dist/compiled/@edge-runtime/primitives/fetch"),{exports:webFetch}]]),context:context,path:require.resolve("next/dist/compiled/@edge-runtime/primitives/cache"),scopedContext:{global:{}}}),enumerable:["caches"],nonenumerable:["Cache","CacheStorage"]});defineProperties(context,{exports:(0,require_1.requireWithCache)({context:context,cache:new Map([["crypto",{exports:__nccwpck_require__(113)}],["process",{exports:__nccwpck_require__(282)}]]),path:require.resolve("next/dist/compiled/@edge-runtime/primitives/crypto"),scopedContext:{Buffer:buffer_1.Buffer,Uint8Array:createUint8ArrayForContext(context)}}),enumerable:["crypto"],nonenumerable:["Crypto","CryptoKey","SubtleCrypto"]});defineProperties(context,{exports:(0,require_1.requireWithCache)({context:context,path:require.resolve("next/dist/compiled/@edge-runtime/primitives/events")}),nonenumerable:["Event","EventTarget","FetchEvent","PromiseRejectionEvent"]});defineProperties(context,{exports:(0,require_1.requireWithCache)({context:context,path:require.resolve("next/dist/compiled/@edge-runtime/primitives/structured-clone")}),nonenumerable:["structuredClone"]});return context}function defineProperty(e,t,r){var n,o,s;Object.defineProperty(e,t,{configurable:(n=r.configurable)!==null&&n!==void 0?n:false,enumerable:(o=r.enumerable)!==null&&o!==void 0?o:false,value:r.value,writable:(s=r.writable)!==null&&s!==void 0?s:true})}function defineProperties(e,t){var r,n;for(const n of(r=t.enumerable)!==null&&r!==void 0?r:[]){if(!t.exports[n]){throw new Error(`Attempt to export a nullable value for "${n}"`)}defineProperty(e,n,{enumerable:true,value:t.exports[n]})}for(const r of(n=t.nonenumerable)!==null&&n!==void 0?n:[]){if(!t.exports[r]){throw new Error(`Attempt to export a nullable value for "${r}"`)}defineProperty(e,r,{value:t.exports[r]})}}function createUint8ArrayForContext(e){return new Proxy((0,vm_2.runInContext)("Uint8Array",e),{construct(e,t){const r=new e(...t);if(!(t[0]instanceof buffer_1.Buffer)){return r}return new e([...r])}})}},930:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.VM=t.EdgeVM=void 0;var n=r(466);Object.defineProperty(t,"EdgeVM",{enumerable:true,get:function(){return n.EdgeVM}});var o=r(378);Object.defineProperty(t,"VM",{enumerable:true,get:function(){return o.VM}})},65:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.requireWithCache=t.createRequire=t.requireDependencies=void 0;const n=r(147);const o=r(144);const s=r(17);function requireDependencies(e){const{context:t,requireCache:r,dependencies:n}=e;const o=createRequire(t,r);for(const{path:e,mapExports:r}of n){const n=o(e,e);for(const e of Object.keys(r)){t[r[e]]=n[e]}}}t.requireDependencies=requireDependencies;function createRequire(e,t,r,i={}){return function requireFn(a,c){const E=require.resolve(c,{paths:[(0,s.dirname)(a)]});const u=t.get(c)||t.get(E);if(u!==undefined&&u!==null){return u.exports}const d={exports:{},loaded:false,id:E};t.set(E,d);r===null||r===void 0?void 0:r.add(E);const _=(0,o.runInContext)(`(function(module,exports,require,__dirname,__filename,${Object.keys(i).join(",")}) {${(0,n.readFileSync)(E,"utf-8")}\n})`,e);try{_(d,d.exports,requireFn.bind(null,E),(0,s.dirname)(E),E,...Object.values(i))}catch(e){t.delete(E);throw e}d.loaded=true;return d.exports}}t.createRequire=createRequire;function requireWithCache(e){var t;return createRequire(e.context,(t=e.cache)!==null&&t!==void 0?t:new Map,e.references,e.scopedContext).call(null,e.path,e.path)}t.requireWithCache=requireWithCache},184:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.tempFile=void 0;const o=r(277);const s=n(r(17));const i=n(r(147));const a=n(r(37));function tempFile(e){const t=s.default.join(a.default.tmpdir(),o.crypto.randomUUID());i.default.writeFileSync(t,e);return{path:t,remove:()=>i.default.unlinkSync(t)}}t.tempFile=tempFile},378:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.VM=void 0;const n=r(144);const o=r(65);const s=r(184);class VM{constructor(e={}){var t,r,s,i;const a=(0,n.createContext)({},{name:"Edge Runtime",codeGeneration:(t=e.codeGeneration)!==null&&t!==void 0?t:{strings:false,wasm:true}});this.requireCache=(r=e.requireCache)!==null&&r!==void 0?r:new Map;this.context=(i=(s=e.extend)===null||s===void 0?void 0:s.call(e,a))!==null&&i!==void 0?i:a;this.requireFn=(0,o.createRequire)(this.context,this.requireCache)}evaluate(e){return(0,n.runInContext)(e,this.context)}require(e){return this.requireFn(e,e)}requireInContext(e){const t=this.require(e);for(const[e,r]of Object.entries(t)){this.context[e]=r}}requireInlineInContext(e){const t=(0,s.tempFile)(e);this.requireInContext(t.path);t.remove()}}t.VM=VM},162:e=>{"use strict";e.exports=e=>{const t=e[0]*1e9+e[1];const r=t/1e6;const n=t/1e9;return{seconds:n,milliseconds:r,nanoseconds:t}}},51:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.EdgeRuntime=void 0;const n=r(930);let o;let s;class EdgeRuntime extends n.EdgeVM{constructor(e){super({...e,extend:t=>{var r,n;return(n=(r=e===null||e===void 0?void 0:e.extend)===null||r===void 0?void 0:r.call(e,t))!==null&&n!==void 0?n:t}});defineHandlerProps({object:this,setterName:"__onUnhandledRejectionHandler",setter:e=>o=e,getterName:"__rejectionHandlers",getter:()=>o});defineHandlerProps({object:this,setterName:"__onErrorHandler",setter:e=>s=e,getterName:"__errorHandlers",getter:()=>s});this.evaluate(getDefineEventListenersCode());this.dispatchFetch=this.evaluate(getDispatchFetchCode());if(e===null||e===void 0?void 0:e.initialCode){this.evaluate(e.initialCode)}}}t.EdgeRuntime=EdgeRuntime;process.on("unhandledRejection",(function invokeRejectionHandlers(e,t){o===null||o===void 0?void 0:o.forEach((r=>r({reason:e,promise:t})))}));process.on("uncaughtException",(function invokeErrorHandlers(e){s===null||s===void 0?void 0:s.forEach((t=>t(e)))}));function getDefineEventListenersCode(){return`\n Object.defineProperty(self, '__listeners', {\n configurable: false,\n enumerable: false,\n value: {},\n writable: true,\n })\n\n function __conditionallyUpdatesHandlerList(eventType) {\n if (eventType === 'unhandledrejection') {\n self.__onUnhandledRejectionHandler = self.__listeners[eventType];\n } else if (eventType === 'error') {\n self.__onErrorHandler = self.__listeners[eventType];\n }\n }\n\n function addEventListener(type, handler) {\n const eventType = type.toLowerCase();\n if (eventType === 'fetch' && self.__listeners.fetch) {\n throw new TypeError('You can register just one "fetch" event listener');\n }\n\n self.__listeners[eventType] = self.__listeners[eventType] || [];\n self.__listeners[eventType].push(handler);\n __conditionallyUpdatesHandlerList(eventType);\n }\n\n function removeEventListener(type, handler) {\n const eventType = type.toLowerCase();\n if (self.__listeners[eventType]) {\n self.__listeners[eventType] = self.__listeners[eventType].filter(item => {\n return item !== handler;\n });\n\n if (self.__listeners[eventType].length === 0) {\n delete self.__listeners[eventType];\n }\n }\n __conditionallyUpdatesHandlerList(eventType);\n }\n `}function getDispatchFetchCode(){return`(async function dispatchFetch(input, init) {\n const request = new Request(input, init);\n const event = new FetchEvent(request);\n if (!self.__listeners.fetch) {\n throw new Error("No fetch event listeners found");\n }\n\n const getResponse = ({ response, error }) => {\n if (error || !response || !(response instanceof Response)) {\n console.error(error ? error.toString() : 'The event listener did not respond')\n response = new Response(null, {\n statusText: 'Internal Server Error',\n status: 500\n })\n }\n\n response.waitUntil = () => Promise.all(event.awaiting);\n\n if (response.status < 300 || response.status >= 400 ) {\n response.headers.delete('content-encoding');\n response.headers.delete('transform-encoding');\n response.headers.delete('content-length');\n }\n\n return response;\n }\n\n try {\n await self.__listeners.fetch[0].call(event, event)\n } catch (error) {\n return getResponse({ error })\n }\n\n return Promise.resolve(event.response)\n .then(response => getResponse({ response }))\n .catch(error => getResponse({ error }))\n })`}function defineHandlerProps({object:e,setterName:t,setter:r,getterName:n,getter:o}){Object.defineProperty(e.context,t,{set:r,configurable:false,enumerable:false});Object.defineProperty(e,n,{get:o,configurable:false,enumerable:false})}},392:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.consumeUint8ArrayReadableStream=t.getClonableBodyStream=void 0;const n=r(781);function getClonableBodyStream(e,t,r){let n=null;return{finalize(){if(n){replaceRequestBody(e,bodyStreamToNodeStream(n))}},cloneBodyStream(){const o=n!==null&&n!==void 0?n:requestToBodyStream(e,t,r);const[s,i]=o.tee();n=s;return i}}}t.getClonableBodyStream=getClonableBodyStream;function requestToBodyStream(e,t,r){const n=new r({start(r){e.on("data",(e=>r.enqueue(new t([...new Uint8Array(e)]))));e.on("end",(()=>r.terminate()));e.on("error",(e=>r.error(e)))}});return n.readable}function bodyStreamToNodeStream(e){const t=e.getReader();return n.Readable.from(async function*(){while(true){const{done:e,value:r}=await t.read();if(e){return}yield r}}())}function replaceRequestBody(e,t){for(const r in t){let n=t[r];if(typeof n==="function"){n=n.bind(t)}e[r]=n}return e}async function*consumeUint8ArrayReadableStream(e){var t;const r=e===null||e===void 0?void 0:e.getReader();if(r){while(true){const{done:e,value:n}=await r.read();if(e){return}if(((t=n===null||n===void 0?void 0:n.constructor)===null||t===void 0?void 0:t.name)!=="Uint8Array"){throw new TypeError("This ReadableStream did not return bytes.")}yield n}}}t.consumeUint8ArrayReadableStream=consumeUint8ArrayReadableStream},673:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.createHandler=void 0;const o=r(392);const s=r(392);const i=n(r(606));const a=n(r(632));const c=n(r(943));function createHandler(e){const t=new Set;return{handler:async(r,n)=>{var E,u;try{const d=(0,c.default)();const _=r.method!=="GET"&&r.method!=="HEAD"?(0,s.getClonableBodyStream)(r,e.runtime.evaluate("Uint8Array"),e.runtime.context.TransformStream):undefined;const l=await e.runtime.dispatchFetch(String(getURL(r)),{headers:toRequestInitHeaders(r),method:r.method,body:_===null||_===void 0?void 0:_.cloneBodyStream()});const S=l.waitUntil();t.add(S);S.finally((()=>t.delete(S)));n.statusCode=l.status;n.statusMessage=l.statusText;for(const[e,t]of Object.entries(toNodeHeaders(l.headers))){if(t!==undefined){n.setHeader(e,t)}}if(l.body){for await(const e of(0,o.consumeUint8ArrayReadableStream)(l.body)){n.write(e)}}const R=`${r.socket.remoteAddress} ${r.method} ${r.url}`;const h=`${(E=(0,i.default)(d()).match(/[a-zA-Z]+|[0-9]+/g))===null||E===void 0?void 0:E.join(" ")}`;const p=`${n.statusCode} ${a.default[n.statusCode]}`;(u=e.logger)===null||u===void 0?void 0:u.debug(`${R} โ†’ ${p} in ${h}`);n.end()}finally{if(!n.finished){n.end()}}},waitUntil:()=>Promise.all(t)}}t.createHandler=createHandler;function getURL(e){var t;const r=((t=e.socket)===null||t===void 0?void 0:t.encrypted)?"https":"http";return new URL(String(e.url),`${r}://${String(e.headers.host)}`)}function toRequestInitHeaders(e){return Object.keys(e.headers).map((t=>{const r=e.headers[t];return[t,Array.isArray(r)?r.join(", "):r!==null&&r!==void 0?r:""]}))}function toNodeHeaders(e){const t={};if(e){for(const[r,n]of e.entries()){t[r]=r.toLowerCase()==="set-cookie"?e.getAll("set-cookie"):n}}return t}},539:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.runServer=t.createHandler=t.consumeUint8ArrayReadableStream=void 0;var n=r(392);Object.defineProperty(t,"consumeUint8ArrayReadableStream",{enumerable:true,get:function(){return n.consumeUint8ArrayReadableStream}});var o=r(673);Object.defineProperty(t,"createHandler",{enumerable:true,get:function(){return o.createHandler}});var s=r(387);Object.defineProperty(t,"runServer",{enumerable:true,get:function(){return s.runServer}})},387:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.runServer=void 0;const o=r(673);const s=r(361);const i=n(r(685));async function runServer(e){const{handler:t,waitUntil:r}=(0,o.createHandler)(e);const n=i.default.createServer(t);n.listen(e.port);try{await(0,s.once)(n,"listening")}catch(t){if((t===null||t===void 0?void 0:t.code)==="EADDRINUSE"){return runServer({...e,port:undefined})}throw t}const a=n.address();const c=typeof a==="string"||a==null?String(a):`http://localhost:${a.port}`;return{url:c,close:async()=>{await r();await new Promise(((e,t)=>n.close((r=>{if(r)t(r);e()}))))},waitUntil:r}}t.runServer=runServer},632:e=>{var t;t={"1xx":"Informational","1xx_NAME":"INFORMATIONAL","1xx_MESSAGE":"Indicates an interim response for communicating connection status or request progress prior to completing the requested action and sending a final response.",INFORMATIONAL:"1xx","2xx":"Successful","2xx_NAME":"SUCCESSFUL","2xx_MESSAGE":"Indicates that the client's request was successfully received, understood, and accepted.",SUCCESSFUL:"2xx","3xx":"Redirection","3xx_NAME":"REDIRECTION","3xx_MESSAGE":"Indicates that further action needs to be taken by the user agent in order to fulfill the request.",REDIRECTION:"3xx","4xx":"Client Error","4xx_NAME":"CLIENT_ERROR","4xx_MESSAGE":"Indicates that the client seems to have erred.",CLIENT_ERROR:"4xx","5xx":"Server Error","5xx_NAME":"SERVER_ERROR","5xx_MESSAGE":"Indicates that the server is aware that it has erred or is incapable of performing the requested method.",SERVER_ERROR:"5xx"};e.exports={classes:t,100:"Continue","100_NAME":"CONTINUE","100_MESSAGE":"The server has received the request headers and the client should proceed to send the request body.","100_CLASS":t.INFORMATIONAL,CONTINUE:100,101:"Switching Protocols","101_NAME":"SWITCHING_PROTOCOLS","101_MESSAGE":"The requester has asked the server to switch protocols and the server has agreed to do so.","101_CLASS":t.INFORMATIONAL,SWITCHING_PROTOCOLS:101,102:"Processing","102_NAME":"PROCESSING","102_MESSAGE":"A WebDAV request may contain many sub-requests involving file operations, requiring a long time to complete the request. This code indicates that the server has received and is processing the request, but no response is available yet.[7] This prevents the client from timing out and assuming the request was lost.","102_CLASS":t.INFORMATIONAL,PROCESSING:102,103:"Early Hints","103_NAME":"EARLY_HINTS","103_MESSAGE":"Used to return some response headers before final HTTP message.","103_CLASS":t.INFORMATIONAL,EARLY_HINTS:103,200:"OK","200_NAME":"OK","200_MESSAGE":"Standard response for successful HTTP requests.","200_CLASS":t.SUCCESSFUL,OK:200,201:"Created","201_NAME":"CREATED","201_MESSAGE":"The request has been fulfilled, resulting in the creation of a new resource.","201_CLASS":t.SUCCESSFUL,CREATED:201,202:"Accepted","202_NAME":"ACCEPTED","202_MESSAGE":"The request has been accepted for processing, but the processing has not been completed.","202_CLASS":t.SUCCESSFUL,ACCEPTED:202,203:"Non-Authoritative Information","203_NAME":"NON_AUTHORITATIVE_INFORMATION","203_MESSAGE":"The server is a transforming proxy (e.g. a Web accelerator) that received a 200 OK from its origin, but is returning a modified version of the origin's response.","203_CLASS":t.SUCCESSFUL,NON_AUTHORITATIVE_INFORMATION:203,204:"No Content","204_NAME":"NO_CONTENT","204_MESSAGE":"The server successfully processed the request and is not returning any content.","204_CLASS":t.SUCCESSFUL,NO_CONTENT:204,205:"Reset Content","205_NAME":"RESET_CONTENT","205_MESSAGE":"The server successfully processed the request, but is not returning any content. Unlike a 204 response, this response requires that the requester reset the document view.","205_CLASS":t.SUCCESSFUL,RESET_CONTENT:205,206:"Partial Content","206_NAME":"PARTIAL_CONTENT","206_MESSAGE":"The server is delivering only part of the resource (byte serving) due to a range header sent by the client.","206_CLASS":t.SUCCESSFUL,PARTIAL_CONTENT:206,207:"Multi Status","207_NAME":"MULTI_STATUS","207_MESSAGE":"The message body that follows is by default an XML message and can contain a number of separate response codes, depending on how many sub-requests were made.","207_CLASS":t.SUCCESSFUL,MULTI_STATUS:207,208:"Already Reported","208_NAME":"ALREADY_REPORTED","208_MESSAGE":"The members of a DAV binding have already been enumerated in a preceding part of the (multistatus) response, and are not being included again.","208_CLASS":t.SUCCESSFUL,ALREADY_REPORTED:208,226:"IM Used","226_NAME":"IM_USED","226_MESSAGE":"The server has fulfilled a request for the resource, and the response is a representation of the result of one or more instance-manipulations applied to the current instance.","226_CLASS":t.SUCCESSFUL,IM_USED:226,300:"Multiple Choices","300_NAME":"MULTIPLE_CHOICES","300_MESSAGE":"Indicates multiple options for the resource from which the client may choose.","300_CLASS":t.REDIRECTION,MULTIPLE_CHOICES:300,301:"Moved Permanently","301_NAME":"MOVED_PERMANENTLY","301_MESSAGE":"This and all future requests should be directed to the given URI.","301_CLASS":t.REDIRECTION,MOVED_PERMANENTLY:301,302:"Found","302_NAME":"FOUND","302_MESSAGE":'This is an example of industry practice contradicting the standard. The HTTP/1.0 specification (RFC 1945) required the client to perform a temporary redirect (the original describing phrase was "Moved Temporarily"), but popular browsers implemented 302 with the functionality of a 303 See Other. Therefore, HTTP/1.1 added status codes 303 and 307 to distinguish between the two behaviours.',"302_CLASS":t.REDIRECTION,FOUND:302,303:"See Other","303_NAME":"SEE_OTHER","303_MESSAGE":"The response to the request can be found under another URI using the GET method.","303_CLASS":t.REDIRECTION,SEE_OTHER:303,304:"Not Modified","304_NAME":"NOT_MODIFIED","304_MESSAGE":"Indicates that the resource has not been modified since the version specified by the request headers If-Modified-Since or If-None-Match.","304_CLASS":t.REDIRECTION,NOT_MODIFIED:304,305:"Use Proxy","305_NAME":"USE_PROXY","305_MESSAGE":"The requested resource is available only through a proxy, the address for which is provided in the response.","305_CLASS":t.REDIRECTION,USE_PROXY:305,306:"Switch Proxy","306_NAME":"SWITCH_PROXY","306_MESSAGE":'No longer used. Originally meant "Subsequent requests should use the specified proxy.',"306_CLASS":t.REDIRECTION,SWITCH_PROXY:306,307:"Temporary Redirect","307_NAME":"TEMPORARY_REDIRECT","307_MESSAGE":"In this case, the request should be repeated with another URI; however, future requests should still use the original URI.","307_CLASS":t.REDIRECTION,TEMPORARY_REDIRECT:307,308:"Permanent Redirect","308_NAME":"PERMANENT_REDIRECT","308_MESSAGE":"The request and all future requests should be repeated using another URI.","308_CLASS":t.REDIRECTION,PERMANENT_REDIRECT:308,400:"Bad Request","400_NAME":"BAD_REQUEST","400_MESSAGE":"The server cannot or will not process the request due to an apparent client error.","400_CLASS":t.CLIENT_ERROR,BAD_REQUEST:400,401:"Unauthorized","401_NAME":"UNAUTHORIZED","401_MESSAGE":"Similar to 403 Forbidden, but specifically for use when authentication is required and has failed or has not yet been provided.","401_CLASS":t.CLIENT_ERROR,UNAUTHORIZED:401,402:"Payment Required","402_NAME":"PAYMENT_REQUIRED","402_MESSAGE":"Reserved for future use. The original intention was that this code might be used as part of some form of digital cash or micropayment scheme, as proposed for example by GNU Taler, but that has not yet happened, and this code is not usually used.","402_CLASS":t.CLIENT_ERROR,PAYMENT_REQUIRED:402,403:"Forbidden","403_NAME":"FORBIDDEN","403_MESSAGE":"The request was valid, but the server is refusing action.","403_CLASS":t.CLIENT_ERROR,FORBIDDEN:403,404:"Not Found","404_NAME":"NOT_FOUND","404_MESSAGE":"The requested resource could not be found but may be available in the future. Subsequent requests by the client are permissible.","404_CLASS":t.CLIENT_ERROR,NOT_FOUND:404,405:"Method Not Allowed","405_NAME":"METHOD_NOT_ALLOWED","405_MESSAGE":"A request method is not supported for the requested resource.","405_CLASS":t.CLIENT_ERROR,METHOD_NOT_ALLOWED:405,406:"Not Acceptable","406_NAME":"NOT_ACCEPTABLE","406_MESSAGE":"The requested resource is capable of generating only content not acceptable according to the Accept headers sent in the request.","406_CLASS":t.CLIENT_ERROR,NOT_ACCEPTABLE:406,407:"Proxy Authentication Required","407_NAME":"PROXY_AUTHENTICATION_REQUIRED","407_MESSAGE":"The client must first authenticate itself with the proxy.","407_CLASS":t.CLIENT_ERROR,PROXY_AUTHENTICATION_REQUIRED:407,408:"Request Time-out","408_NAME":"REQUEST_TIMEOUT","408_MESSAGE":"The server timed out waiting for the request.","408_CLASS":t.CLIENT_ERROR,REQUEST_TIMEOUT:408,409:"Conflict","409_NAME":"CONFLICT","409_MESSAGE":"Indicates that the request could not be processed because of conflict in the request, such as an edit conflict between multiple simultaneous updates.","409_CLASS":t.CLIENT_ERROR,CONFLICT:409,410:"Gone","410_NAME":"GONE","410_MESSAGE":"Indicates that the resource requested is no longer available and will not be available again.","410_CLASS":t.CLIENT_ERROR,GONE:410,411:"Length Required","411_NAME":"LENGTH_REQUIRED","411_MESSAGE":"The request did not specify the length of its content, which is required by the requested resource.","411_CLASS":t.CLIENT_ERROR,LENGTH_REQUIRED:411,412:"Precondition Failed","412_NAME":"PRECONDITION_FAILED","412_MESSAGE":"The server does not meet one of the preconditions that the requester put on the request.","412_CLASS":t.CLIENT_ERROR,PRECONDITION_FAILED:412,413:"Request Entity Too Large","413_NAME":"REQUEST_ENTITY_TOO_LARGE","413_MESSAGE":'The request is larger than the server is willing or able to process. Previously called "Request Entity Too Large".',"413_CLASS":t.CLIENT_ERROR,REQUEST_ENTITY_TOO_LARGE:413,414:"Request-URI Too Large","414_NAME":"REQUEST_URI_TOO_LONG","414_MESSAGE":"The URI provided was too long for the server to process.","414_CLASS":t.CLIENT_ERROR,REQUEST_URI_TOO_LONG:414,415:"Unsupported Media Type","415_NAME":"UNSUPPORTED_MEDIA_TYPE","415_MESSAGE":"The request entity has a media type which the server or resource does not support.","415_CLASS":t.CLIENT_ERROR,UNSUPPORTED_MEDIA_TYPE:415,416:"Requested Range not Satisfiable","416_NAME":"REQUESTED_RANGE_NOT_SATISFIABLE","416_MESSAGE":"The client has asked for a portion of the file (byte serving), but the server cannot supply that portion.","416_CLASS":t.CLIENT_ERROR,REQUESTED_RANGE_NOT_SATISFIABLE:416,417:"Expectation Failed","417_NAME":"EXPECTATION_FAILED","417_MESSAGE":"The server cannot meet the requirements of the Expect request-header field.","417_CLASS":t.CLIENT_ERROR,EXPECTATION_FAILED:417,418:"I'm a teapot","418_NAME":"IM_A_TEAPOT","418_MESSAGE":'Any attempt to brew coffee with a teapot should result in the error code "418 I\'m a teapot". The resulting entity body MAY be short and stout.',"418_CLASS":t.CLIENT_ERROR,IM_A_TEAPOT:418,421:"Misdirected Request","421_NAME":"MISDIRECTED_REQUEST","421_MESSAGE":"The request was directed at a server that is not able to produce a response.","421_CLASS":t.CLIENT_ERROR,MISDIRECTED_REQUEST:421,422:"Unprocessable Entity","422_NAME":"UNPROCESSABLE_ENTITY","422_MESSAGE":"The request was well-formed but was unable to be followed due to semantic errors.","422_CLASS":t.CLIENT_ERROR,UNPROCESSABLE_ENTITY:422,423:"Locked","423_NAME":"LOCKED","423_MESSAGE":"The resource that is being accessed is locked.","423_CLASS":t.CLIENT_ERROR,LOCKED:423,424:"Failed Dependency","424_NAME":"FAILED_DEPENDENCY","424_MESSAGE":"The request failed because it depended on another request and that request failed.","424_CLASS":t.CLIENT_ERROR,FAILED_DEPENDENCY:424,426:"Upgrade Required","426_NAME":"UPGRADE_REQUIRED","426_MESSAGE":"The client should switch to a different protocol such as TLS/1.0, given in the Upgrade header field.","426_CLASS":t.CLIENT_ERROR,UPGRADE_REQUIRED:426,428:"Precondition Required","428_NAME":"PRECONDITION_REQUIRED","428_MESSAGE":"The origin server requires the request to be conditional.","428_CLASS":t.CLIENT_ERROR,PRECONDITION_REQUIRED:428,429:"Too Many Requests","429_NAME":"TOO_MANY_REQUESTS","429_MESSAGE":"The user has sent too many requests in a given amount of time.","429_CLASS":t.CLIENT_ERROR,TOO_MANY_REQUESTS:429,431:"Request Header Fields Too Large","431_NAME":"REQUEST_HEADER_FIELDS_TOO_LARGE","431_MESSAGE":"The server is unwilling to process the request because either an individual header field, or all the header fields collectively, are too large.","431_CLASS":t.CLIENT_ERROR,REQUEST_HEADER_FIELDS_TOO_LARGE:431,451:"Unavailable For Legal Reasons","451_NAME":"UNAVAILABLE_FOR_LEGAL_REASONS","451_MESSAGE":"A server operator has received a legal demand to deny access to a resource or to a set of resources that includes the requested resource.","451_CLASS":t.CLIENT_ERROR,UNAVAILABLE_FOR_LEGAL_REASONS:451,500:"Internal Server Error","500_NAME":"INTERNAL_SERVER_ERROR","500_MESSAGE":"A generic error message, given when an unexpected condition was encountered and no more specific message is suitable.","500_CLASS":t.SERVER_ERROR,INTERNAL_SERVER_ERROR:500,501:"Not Implemented","501_NAME":"NOT_IMPLEMENTED","501_MESSAGE":"The server either does not recognize the request method, or it lacks the ability to fulfil the request. Usually this implies future availability.","501_CLASS":t.SERVER_ERROR,NOT_IMPLEMENTED:501,502:"Bad Gateway","502_NAME":"BAD_GATEWAY","502_MESSAGE":"The server was acting as a gateway or proxy and received an invalid response from the upstream server.","502_CLASS":t.SERVER_ERROR,BAD_GATEWAY:502,503:"Service Unavailable","503_NAME":"SERVICE_UNAVAILABLE","503_MESSAGE":"The server is currently unavailable (because it is overloaded or down for maintenance). Generally, this is a temporary state.","503_CLASS":t.SERVER_ERROR,SERVICE_UNAVAILABLE:503,504:"Gateway Time-out","504_NAME":"GATEWAY_TIMEOUT","504_MESSAGE":"The server was acting as a gateway or proxy and did not receive a timely response from the upstream server.","504_CLASS":t.SERVER_ERROR,GATEWAY_TIMEOUT:504,505:"HTTP Version not Supported","505_NAME":"HTTP_VERSION_NOT_SUPPORTED","505_MESSAGE":"The server does not support the HTTP protocol version used in the request.","505_CLASS":t.SERVER_ERROR,HTTP_VERSION_NOT_SUPPORTED:505,506:"Variant Also Negotiates","506_NAME":"VARIANT_ALSO_NEGOTIATES","506_MESSAGE":"Transparent content negotiation for the request results in a circular reference.","506_CLASS":t.SERVER_ERROR,VARIANT_ALSO_NEGOTIATES:506,507:"Insufficient Storage","507_NAME":"INSUFFICIENT_STORAGE","507_MESSAGE":"The server is unable to store the representation needed to complete the request.","507_CLASS":t.SERVER_ERROR,INSUFFICIENT_STORAGE:507,508:"Loop Detected","508_NAME":"LOOP_DETECTED","508_MESSAGE":"The server detected an infinite loop while processing the request.","508_CLASS":t.SERVER_ERROR,LOOP_DETECTED:508,510:"Not Extended","510_NAME":"NOT_EXTENDED","510_MESSAGE":"Further extensions to the request are required for the server to fulfil it.","510_CLASS":t.SERVER_ERROR,NOT_EXTENDED:510,511:"Network Authentication Required","511_NAME":"NETWORK_AUTHENTICATION_REQUIRED","511_MESSAGE":"The client needs to authenticate to gain network access. Intended for use by intercepting proxies used to control access to the network.","511_CLASS":t.SERVER_ERROR,NETWORK_AUTHENTICATION_REQUIRED:511,extra:{unofficial:{103:"Checkpoint","103_NAME":"CHECKPOINT","103_MESSAGE":"Used in the resumable requests proposal to resume aborted PUT or POST requests.","103_CLASS":t.INFORMATIONAL,CHECKPOINT:103,419:"Page Expired","419_NAME":"PAGE_EXPIRED","419_MESSAGE":"Used by the Laravel Framework when a CSRF Token is missing or expired.","419_CLASS":t.CLIENT_ERROR,PAGE_EXPIRED:419,218:"This is fine","218_NAME":"THIS_IS_FINE","218_MESSAGE":"Used as a catch-all error condition for allowing response bodies to flow through Apache when ProxyErrorOverride is enabled. When ProxyErrorOverride is enabled in Apache, response bodies that contain a status code of 4xx or 5xx are automatically discarded by Apache in favor of a generic response or a custom response specified by the ErrorDocument directive.","218_CLASS":t.SUCCESSFUL,THIS_IS_FINE:218,420:"Enhance Your Calm","420_NAME":"ENHANCE_YOUR_CALM","420_MESSAGE":"Returned by version 1 of the Twitter Search and Trends API when the client is being rate limited; versions 1.1 and later use the 429 Too Many Requests response code instead.","420_CLASS":t.CLIENT_ERROR,ENHANCE_YOUR_CALM:420,450:"Blocked by Windows Parental Controls","450_NAME":"BLOCKED_BY_WINDOWS_PARENTAL_CONTROLS","450_MESSAGE":"The Microsoft extension code indicated when Windows Parental Controls are turned on and are blocking access to the requested webpage.","450_CLASS":t.CLIENT_ERROR,BLOCKED_BY_WINDOWS_PARENTAL_CONTROLS:450,498:"Invalid Token","498_NAME":"INVALID_TOKEN","498_MESSAGE":"Returned by ArcGIS for Server. Code 498 indicates an expired or otherwise invalid token.","498_CLASS":t.CLIENT_ERROR,INVALID_TOKEN:498,499:"Token Required","499_NAME":"TOKEN_REQUIRED","499_MESSAGE":"Returned by ArcGIS for Server. Code 499 indicates that a token is required but was not submitted.","499_CLASS":t.CLIENT_ERROR,TOKEN_REQUIRED:499,509:"Bandwidth Limit Exceeded","509_NAME":"BANDWIDTH_LIMIT_EXCEEDED","509_MESSAGE":"The server has exceeded the bandwidth specified by the server administrator.","509_CLASS":t.SERVER_ERROR,BANDWIDTH_LIMIT_EXCEEDED:509,530:"Site is frozen","530_NAME":"SITE_IS_FROZEN","530_MESSAGE":"Used by the Pantheon web platform to indicate a site that has been frozen due to inactivity.","530_CLASS":t.SERVER_ERROR,SITE_IS_FROZEN:530,598:"Network read timeout error","598_NAME":"NETWORK_READ_TIMEOUT_ERROR","598_MESSAGE":"Used by some HTTP proxies to signal a network read timeout behind the proxy to a client in front of the proxy.","598_CLASS":t.SERVER_ERROR,NETWORK_READ_TIMEOUT_ERROR:598},iis:{440:"Login Time-out","440_NAME":"LOGIN_TIME_OUT","440_MESSAGE":"The client's session has expired and must log in again.","440_CLASS":t.CLIENT_ERROR,LOGIN_TIME_OUT:440,449:"Retry With","449_NAME":"RETRY_WITH","449_MESSAGE":"The server cannot honour the request because the user has not provided the required information.","449_CLASS":t.CLIENT_ERROR,RETRY_WITH:449,451:"Redirect","451_NAME":"REDIRECT","451_MESSAGE":"Used in Exchange ActiveSync when either a more efficient server is available or the server cannot access the users' mailbox.","451_CLASS":t.CLIENT_ERROR,REDIRECT:451},nginx:{444:"No Response","444_NAME":"NO_RESPONSE","444_MESSAGE":"Used internally to instruct the server to return no information to the client and close the connection immediately.","444_CLASS":t.CLIENT_ERROR,NO_RESPONSE:444,494:"Request header too large","494_NAME":"REQUEST_HEADER_TOO_LARGE","494_MESSAGE":"Client sent too large request or too long header line.","494_CLASS":t.CLIENT_ERROR,REQUEST_HEADER_TOO_LARGE:494,495:"SSL Certificate Error","495_NAME":"SSL_CERTIFICATE_ERROR","495_MESSAGE":"An expansion of the 400 Bad Request response code, used when the client has provided an invalid client certificate.","495_CLASS":t.CLIENT_ERROR,SSL_CERTIFICATE_ERROR:495,496:"SSL Certificate Required","496_NAME":"SSL_CERTIFICATE_REQUIRED","496_MESSAGE":"An expansion of the 400 Bad Request response code, used when a client certificate is required but not provided.","496_CLASS":t.CLIENT_ERROR,SSL_CERTIFICATE_REQUIRED:496,497:"HTTP Request Sent to HTTPS Port","497_NAME":"HTTP_REQUEST_SENT_TO_HTTPS_PORT","497_MESSAGE":"An expansion of the 400 Bad Request response code, used when the client has made a HTTP request to a port listening for HTTPS requests.","497_CLASS":t.CLIENT_ERROR,HTTP_REQUEST_SENT_TO_HTTPS_PORT:497,499:"Client Closed Request","499_NAME":"CLIENT_CLOSED_REQUEST","499_MESSAGE":"Used when the client has closed the request before the server could send a response.","499_CLASS":t.CLIENT_ERROR,CLIENT_CLOSED_REQUEST:499},cloudflare:{520:"Unknown Error","520_NAME":"UNKNOWN_ERROR","520_MESSAGE":'The 520 error is used as a "catch-all response for when the origin server returns something unexpected", listing connection resets, large headers, and empty or invalid responses as common triggers.',"520_CLASS":t.SERVER_ERROR,UNKNOWN_ERROR:520,521:"Web Server Is Down","521_NAME":"WEB_SERVER_IS_DOWN","521_MESSAGE":"The origin server has refused the connection from Cloudflare.","521_CLASS":t.SERVER_ERROR,WEB_SERVER_IS_DOWN:521,522:"Connection Timed Out","522_NAME":"CONNECTION_TIMED_OUT","522_MESSAGE":"Cloudflare could not negotiate a TCP handshake with the origin server.","522_CLASS":t.SERVER_ERROR,CONNECTION_TIMED_OUT:522,523:"Origin Is Unreachable","523_NAME":"ORIGIN_IS_UNREACHABLE","523_MESSAGE":"Cloudflare could not reach the origin server.","523_CLASS":t.SERVER_ERROR,ORIGIN_IS_UNREACHABLE:523,524:"A Timeout Occurred","524_NAME":"A_TIMEOUT_OCCURRED","524_MESSAGE":"Cloudflare was able to complete a TCP connection to the origin server, but did not receive a timely HTTP response.","524_CLASS":t.SERVER_ERROR,A_TIMEOUT_OCCURRED:524,525:"SSL Handshake Failed","525_NAME":"SSL_HANDSHAKE_FAILED","525_MESSAGE":"Cloudflare could not negotiate a SSL/TLS handshake with the origin server.","525_CLASS":t.SERVER_ERROR,SSL_HANDSHAKE_FAILED:525,526:"Invalid SSL Certificate","526_NAME":"INVALID_SSL_CERTIFICATE","526_MESSAGE":"Cloudflare could not validate the SSL/TLS certificate that the origin server presented.","526_CLASS":t.SERVER_ERROR,INVALID_SSL_CERTIFICATE:526,527:"Railgun Error","527_NAME":"RAILGUN_ERROR","527_MESSAGE":"Error 527 indicates that the request timed out or failed after the WAN connection had been established.","527_CLASS":t.SERVER_ERROR,RAILGUN_ERROR:527}}}},523:e=>{"use strict";e.exports=e=>{if(typeof e!=="number"){throw new TypeError("Expected a number")}const t=e>0?Math.floor:Math.ceil;return{days:t(e/864e5),hours:t(e/36e5)%24,minutes:t(e/6e4)%60,seconds:t(e/1e3)%60,milliseconds:t(e)%1e3,microseconds:t(e*1e3)%1e3,nanoseconds:t(e*1e6)%1e3}}},606:(e,t,r)=>{"use strict";const n=r(523);const pluralize=(e,t)=>t===1?e:`${e}s`;const o=1e-7;e.exports=(e,t={})=>{if(!Number.isFinite(e)){throw new TypeError("Expected a finite number")}if(t.colonNotation){t.compact=false;t.formatSubMilliseconds=false;t.separateMilliseconds=false;t.verbose=false}if(t.compact){t.secondsDecimalDigits=0;t.millisecondsDecimalDigits=0}const r=[];const floorDecimals=(e,t)=>{const r=Math.floor(e*10**t+o);const n=Math.round(r)/10**t;return n.toFixed(t)};const add=(e,n,o,s)=>{if((r.length===0||!t.colonNotation)&&e===0&&!(t.colonNotation&&o==="m")){return}s=(s||e||"0").toString();let i;let a;if(t.colonNotation){i=r.length>0?":":"";a="";const e=s.includes(".")?s.split(".")[0].length:s.length;const t=r.length>0?2:1;s="0".repeat(Math.max(0,t-e))+s}else{i="";a=t.verbose?" "+pluralize(n,e):o}r.push(i+s+a)};const s=n(e);add(Math.trunc(s.days/365),"year","y");add(s.days%365,"day","d");add(s.hours,"hour","h");add(s.minutes,"minute","m");if(t.separateMilliseconds||t.formatSubMilliseconds||!t.colonNotation&&e<1e3){add(s.seconds,"second","s");if(t.formatSubMilliseconds){add(s.milliseconds,"millisecond","ms");add(s.microseconds,"microsecond","ยตs");add(s.nanoseconds,"nanosecond","ns")}else{const e=s.milliseconds+s.microseconds/1e3+s.nanoseconds/1e6;const r=typeof t.millisecondsDecimalDigits==="number"?t.millisecondsDecimalDigits:0;const n=e>=1?Math.round(e):Math.ceil(e);const o=r?e.toFixed(r):n;add(Number.parseFloat(o,10),"millisecond","ms",o)}}else{const r=e/1e3%60;const n=typeof t.secondsDecimalDigits==="number"?t.secondsDecimalDigits:1;const o=floorDecimals(r,n);const s=t.keepDecimalsOnWholeSeconds?o:o.replace(/\.0+$/,"");add(Number.parseFloat(s,10),"second","s",s)}if(r.length===0){return"0"+(t.verbose?" milliseconds":"ms")}if(t.compact){return r[0]}if(typeof t.unitCount==="number"){const e=t.colonNotation?"":" ";return r.slice(0,Math.max(t.unitCount,1)).join(e)}return t.colonNotation?r.join(""):r.join(" ")}},943:(e,t,r)=>{"use strict";const n=r(162);e.exports=()=>{const e=process.hrtime();const end=t=>n(process.hrtime(e))[t];const returnValue=()=>end("milliseconds");returnValue.rounded=()=>Math.round(end("milliseconds"));returnValue.seconds=()=>end("seconds");returnValue.nanoseconds=()=>end("nanoseconds");return returnValue}},491:e=>{"use strict";e.exports=require("assert")},300:e=>{"use strict";e.exports=require("buffer")},113:e=>{"use strict";e.exports=require("crypto")},361:e=>{"use strict";e.exports=require("events")},147:e=>{"use strict";e.exports=require("fs")},685:e=>{"use strict";e.exports=require("http")},808:e=>{"use strict";e.exports=require("net")},277:e=>{"use strict";e.exports=require("next/dist/compiled/@edge-runtime/primitives/crypto")},37:e=>{"use strict";e.exports=require("os")},17:e=>{"use strict";e.exports=require("path")},74:e=>{"use strict";e.exports=require("perf_hooks")},282:e=>{"use strict";e.exports=require("process")},477:e=>{"use strict";e.exports=require("punycode")},788:e=>{"use strict";e.exports=require("querystring")},781:e=>{"use strict";e.exports=require("stream")},404:e=>{"use strict";e.exports=require("tls")},837:e=>{"use strict";e.exports=require("util")},144:e=>{"use strict";e.exports=require("vm")},796:e=>{"use strict";e.exports=require("zlib")}};var __webpack_module_cache__={};function __nccwpck_require__(e){var t=__webpack_module_cache__[e];if(t!==undefined){return t.exports}var r=__webpack_module_cache__[e]={exports:{}};var n=true;try{__webpack_modules__[e].call(r.exports,r,r.exports,__nccwpck_require__);n=false}finally{if(n)delete __webpack_module_cache__[e]}return r.exports}if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var __webpack_exports__={};(()=>{"use strict";var e=__webpack_exports__;Object.defineProperty(e,"__esModule",{value:true});e.EdgeRuntime=e.runServer=e.createHandler=e.consumeUint8ArrayReadableStream=void 0;var t=__nccwpck_require__(539);Object.defineProperty(e,"consumeUint8ArrayReadableStream",{enumerable:true,get:function(){return t.consumeUint8ArrayReadableStream}});Object.defineProperty(e,"createHandler",{enumerable:true,get:function(){return t.createHandler}});Object.defineProperty(e,"runServer",{enumerable:true,get:function(){return t.runServer}});var r=__nccwpck_require__(51);Object.defineProperty(e,"EdgeRuntime",{enumerable:true,get:function(){return r.EdgeRuntime}})})();module.exports=__webpack_exports__})(); \ No newline at end of file diff --git a/packages/next/package.json b/packages/next/package.json index 15910d5aca457a..ae4105dbb2f5f0 100644 --- a/packages/next/package.json +++ b/packages/next/package.json @@ -121,7 +121,7 @@ "@babel/runtime": "7.15.4", "@babel/traverse": "7.18.0", "@babel/types": "7.18.0", - "@edge-runtime/primitives": "1.1.0-beta.36", + "@edge-runtime/primitives": "1.1.0-beta.37", "@hapi/accept": "5.0.2", "@napi-rs/cli": "2.12.0", "@napi-rs/triples": "1.1.0", @@ -204,7 +204,7 @@ "debug": "4.1.1", "devalue": "2.0.1", "domain-browser": "4.19.0", - "edge-runtime": "1.1.0-beta.39", + "edge-runtime": "1.1.0-beta.40", "events": "3.3.0", "find-cache-dir": "3.3.1", "find-up": "4.1.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index c4bfceeadd1b6d..4a3b5a304dae16 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -18,7 +18,7 @@ importers: '@babel/plugin-proposal-object-rest-spread': 7.14.7 '@babel/preset-flow': 7.14.5 '@babel/preset-react': 7.14.5 - '@edge-runtime/jest-environment': 1.1.0-beta.35 + '@edge-runtime/jest-environment': 1.1.0-beta.36 '@fullhuman/postcss-purgecss': 1.3.0 '@mdx-js/loader': 0.18.0 '@next/bundle-analyzer': workspace:* @@ -177,7 +177,7 @@ importers: '@babel/plugin-proposal-object-rest-spread': 7.14.7_@babel+core@7.18.0 '@babel/preset-flow': 7.14.5_@babel+core@7.18.0 '@babel/preset-react': 7.14.5_@babel+core@7.18.0 - '@edge-runtime/jest-environment': 1.1.0-beta.35 + '@edge-runtime/jest-environment': 1.1.0-beta.36 '@fullhuman/postcss-purgecss': 1.3.0 '@mdx-js/loader': 0.18.0_uuaxwgga6hqycsez5ok7v2wg4i '@next/bundle-analyzer': link:packages/next-bundle-analyzer @@ -461,7 +461,7 @@ importers: '@babel/runtime': 7.15.4 '@babel/traverse': 7.18.0 '@babel/types': 7.18.0 - '@edge-runtime/primitives': 1.1.0-beta.36 + '@edge-runtime/primitives': 1.1.0-beta.37 '@hapi/accept': 5.0.2 '@napi-rs/cli': 2.12.0 '@napi-rs/triples': 1.1.0 @@ -547,7 +547,7 @@ importers: debug: 4.1.1 devalue: 2.0.1 domain-browser: 4.19.0 - edge-runtime: 1.1.0-beta.39 + edge-runtime: 1.1.0-beta.40 events: 3.3.0 find-cache-dir: 3.3.1 find-up: 4.1.0 @@ -663,7 +663,7 @@ importers: '@babel/runtime': 7.15.4 '@babel/traverse': 7.18.0 '@babel/types': 7.18.0 - '@edge-runtime/primitives': 1.1.0-beta.36 + '@edge-runtime/primitives': 1.1.0-beta.37 '@hapi/accept': 5.0.2 '@napi-rs/cli': 2.12.0 '@napi-rs/triples': 1.1.0 @@ -746,7 +746,7 @@ importers: debug: 4.1.1 devalue: 2.0.1 domain-browser: 4.19.0 - edge-runtime: 1.1.0-beta.39 + edge-runtime: 1.1.0-beta.40 events: 3.3.0 find-cache-dir: 3.3.1 find-up: 4.1.0 @@ -4007,13 +4007,13 @@ packages: } dev: true - /@edge-runtime/jest-environment/1.1.0-beta.35: + /@edge-runtime/jest-environment/1.1.0-beta.36: resolution: { - integrity: sha512-CBMGtry4W/BLtmWpyHcbOwY+nn96YOEUVUWhob1SPQURGsxGnFU5r2fxrd99TDy/oTujw5jAbK4syOyUbna4KQ==, + integrity: sha512-A4geGu+6i61CBlOGd5eqwNGiREatm7aWO3wJ4gUGcA2BH23v4SgVIJUdt0cpNQku69nMshb0AGk3XhHnqUC5rg==, } dependencies: - '@edge-runtime/vm': 1.1.0-beta.36 + '@edge-runtime/vm': 1.1.0-beta.37 '@jest/environment': 28.1.3 '@jest/fake-timers': 28.1.3 '@jest/types': 28.1.3 @@ -4021,20 +4021,20 @@ packages: jest-util: 28.1.3 dev: true - /@edge-runtime/primitives/1.1.0-beta.36: + /@edge-runtime/primitives/1.1.0-beta.37: resolution: { - integrity: sha512-Tji7SGWmn1+JGSnzFtWUoS7+kODIFprTyIAw0EBOVWEQKWfs7r0aTEm1XkJR0+d1jP9f0GB5LBKG/Z7KFyhx7g==, + integrity: sha512-S3aN8X6wXhM7CJI3FRF480CMNkw4mH6grMV/enQz8VWGrvD1U5njQNRh/Zymoe0RHzEI/aIDjSk3V49h+ULt9g==, } dev: true - /@edge-runtime/vm/1.1.0-beta.36: + /@edge-runtime/vm/1.1.0-beta.37: resolution: { - integrity: sha512-uPZmL7X+lKBFJsTg8nC0qPDBx4JGgpRqlgJi2s77g2NOtqitQOI90BfIKHZSSoMQEwTqfvAkpu2ui8nazOwHxA==, + integrity: sha512-1OrFifIxDFpwb1VyrFD8kwWVppc6D1uN7xh5jQzW7jHaVJ0Dw4C2nSAbLe6YKPYj67o09vW72WLzfUcryeD0Pg==, } dependencies: - '@edge-runtime/primitives': 1.1.0-beta.36 + '@edge-runtime/primitives': 1.1.0-beta.37 dev: true /@emotion/is-prop-valid/0.8.8: @@ -13463,15 +13463,15 @@ packages: safe-buffer: 5.2.0 dev: true - /edge-runtime/1.1.0-beta.39: + /edge-runtime/1.1.0-beta.40: resolution: { - integrity: sha512-PNIxASuGT/46ZsFKSGXfUOcTomvTj+U5VgRSIPUjGu3piTDjE1cxQwTJLXPJkQa/OrZLebJUuszNXM/1AG2lHg==, + integrity: sha512-KuoSRsQZUMyec6gtD9YOFA5ohmWtquTXKco+pLv1/1zcHmD0/rXU1QkTkE40BKwq+O02Esk9iPlx9LkHaQr3vg==, } hasBin: true dependencies: '@edge-runtime/format': 1.1.0-beta.34 - '@edge-runtime/vm': 1.1.0-beta.36 + '@edge-runtime/vm': 1.1.0-beta.37 exit-hook: 2.2.1 http-status: 1.5.3 mri: 1.2.0 From 9c5bb5bfe9935a5953333bcefd456ac94b1b4f8b Mon Sep 17 00:00:00 2001 From: Steven Date: Tue, 18 Oct 2022 12:47:13 -0400 Subject: [PATCH 04/13] BREAKING CHANGE: Remove `target: serverless` (#41495) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The `target: serverless` config was deprecated a year ago starting in [Next.js 12](https://nextjs.org/blog/next-12). Tests were disabled in #41252 so we can now remove `target: serverless` and all usage of `target` in `next.config.js`. Co-authored-by: Balรกzs Orbรกn Co-authored-by: JJ Kasper --- docs/upgrading.md | 2 + errors/deprecated-target-config.md | 4 +- errors/gssp-export.md | 2 +- packages/next/build/entries.ts | 60 --- packages/next/build/index.ts | 109 ++---- packages/next/build/utils.ts | 20 +- packages/next/build/webpack-config.ts | 29 +- .../font-stylesheet-gathering-plugin.ts | 23 -- .../webpack/plugins/pages-manifest-plugin.ts | 4 - .../webpack/plugins/serverless-plugin.ts | 37 -- .../next/compiled/node-html-parser/index.js | 2 +- packages/next/export/index.ts | 8 +- packages/next/export/worker.ts | 334 ++++++----------- packages/next/server/base-server.ts | 155 +++----- packages/next/server/config.ts | 19 +- packages/next/server/dev/hot-reloader.ts | 2 - packages/next/server/dev/next-dev-server.ts | 1 - .../next/server/dev/static-paths-worker.ts | 3 - packages/next/server/load-components.ts | 45 +-- packages/next/server/next-server.ts | 42 +-- packages/next/server/require.ts | 25 +- packages/next/server/utils.ts | 6 - packages/next/shared/lib/constants.ts | 1 - packages/next/taskfile.js | 22 -- packages/next/telemetry/events/version.ts | 2 +- .../404-page-custom-error/test/index.test.js | 28 -- .../404-page-ssg/test/index.test.js | 47 --- test/integration/404-page/test/index.test.js | 25 -- test/integration/500-page/test/index.test.js | 26 -- .../amphtml-ssg/test/index.test.js | 22 -- .../api-catch-all/test/index.test.js | 20 - .../api-support/test/index.test.js | 20 - test/integration/app-tree/test/index.test.js | 19 - test/integration/async-modules/next.config.js | 1 - .../async-modules/test/index.test.js | 17 - .../auto-export-error-bail/test/index.test.js | 18 - .../auto-export-query-error/next.config.js | 1 - .../test/index.test.js | 23 -- .../next.config.js | 3 - .../pages/index.js | 2 - .../test/index.test.js | 21 -- .../auto-export-serverless/next.config.js | 3 - .../auto-export-serverless/pages/[post].js | 7 - .../auto-export-serverless/test/index.test.js | 25 -- .../basepath-root-catch-all/next.config.js | 1 - .../test/index.test.js | 17 - test/integration/bigint/test/index.test.js | 18 - .../test/index.test.js | 17 - .../clean-distdir/test/index.test.js | 19 - .../test/index.test.js | 6 +- .../critical-css/test/index.test.js | 18 - .../custom-error/test/index.test.js | 19 - .../custom-page-extension/next.config.js | 1 - .../custom-page-extension/test/index.test.js | 16 - test/integration/custom-routes/next.config.js | 1 - .../custom-routes/test/index.test.js | 91 ----- .../test/index.test.js | 25 -- .../test/index.test.js | 23 -- .../test/index.test.js | 130 ------- .../dynamic-routing/test/index.test.js | 72 ++-- .../integration/env-config/test/index.test.js | 56 --- .../next.config.js | 3 - .../pages/docs/index.js | 5 - .../pages/index.js | 2 - .../pages/info.js | 5 - .../pages/just-amp/index.js | 2 - .../pages/some.js | 3 - .../pages/v1.12/docs.js | 3 - .../pages/v1.12/index.js | 3 - .../test/index.test.js | 65 ---- .../next.config.js | 8 - .../pages/regression/[slug].js | 13 - .../test/index.test.js | 49 --- test/integration/export-serverless/.gitignore | 1 - .../export-serverless/components/hello.js | 1 - .../export-serverless/next.config.js | 38 -- .../export-serverless/pages/about.js | 16 - .../export-serverless/pages/api/data.js | 3 - .../pages/blog/[post]/comment/[id].js | 16 - .../export-serverless/pages/button-link.js | 12 - .../export-serverless/pages/counter.js | 27 -- .../pages/dynamic-imports.js | 13 - .../export-serverless/pages/dynamic.js | 31 -- .../pages/get-initial-props-with-no-query.js | 7 - .../export-serverless/pages/index.js | 65 ---- .../export-serverless/pages/level1/about.js | 10 - .../export-serverless/pages/level1/index.js | 10 - .../export-serverless/pages/query-update.js | 7 - .../export-serverless/pages/query.js | 12 - .../export-serverless/public/about/data.txt | 1 - .../export-serverless/static/data/item.txt | 1 - .../export-serverless/test/api-routes.js | 28 -- .../export-serverless/test/browser.js | 224 ------------ .../integration/export-serverless/test/dev.js | 46 --- .../export-serverless/test/dynamic.js | 27 -- .../export-serverless/test/index.test.js | 96 ----- .../integration/export-serverless/test/ssr.js | 88 ----- .../next.config.js | 3 - .../pages/about.js | 1 - .../pages/index.js | 1 - .../pages/posts/index.js | 1 - .../pages/posts/single.js | 1 - .../test/index.test.js | 36 -- .../external-assets/next.config.js | 6 - .../external-assets/pages/about/history.js | 19 - .../external-assets/test/index.test.js | 28 -- .../fallback-route-params/test/index.test.js | 22 -- .../serverless-server.js | 44 --- .../test/index.test.js | 40 -- .../fetch-polyfill/serverless-server.js | 58 --- .../fetch-polyfill/test/index.test.js | 40 -- .../font-optimization/test/index.test.js | 60 --- .../getinitialprops/next.config.js | 1 - .../getinitialprops/test/index.test.js | 17 - .../test/index.test.js | 13 - .../test/index.test.js | 49 --- .../gssp-pageProps-merge/test/index.test.js | 24 -- .../test/index.test.js | 129 ------- .../gssp-redirect/test/index.test.js | 116 ------ .../handle-non-page-in-pages/next.config.js | 1 - .../pages/invalid.tsx | 2 - .../handle-non-page-in-pages/pages/valid.tsx | 1 - .../test/index.test.js | 17 - .../handle-non-page-in-pages/tsconfig.json | 20 - .../i18n-support-base-path/next.config.js | 1 - .../i18n-support-base-path/test/index.test.js | 117 ------ .../i18n-support-catchall/next.config.js | 1 - .../i18n-support-catchall/test/index.test.js | 130 ------- test/integration/i18n-support/next.config.js | 1 - test/integration/i18n-support/server.js | 14 - .../i18n-support/test/index.test.js | 117 ------ .../index-index/test/index.test.js | 22 -- .../legacy-pkg-gently/next.config.js | 1 - .../legacy-pkg-gently/pages/api/hello.js | 7 - .../legacy-pkg-gently/test/index.test.js | 37 -- .../test/index.test.js | 23 +- .../base-path/test/index.test.ts | 28 -- .../default/test/index.test.ts | 13 - .../test/index.test.js | 21 -- .../prerender-fallback-aspath/next.config.js | 3 - .../pages/blog/[post]/[comment].js | 30 -- .../pages/blog/[post]/index.js | 30 -- .../prerender-fallback-aspath/server.js | 31 -- .../test/index.test.js | 119 ------ .../prerender-legacy/test/index.test.js | 15 - .../test/index.test.js | 36 +- .../prerender-preview/test/index.test.js | 49 --- .../prerender-revalidate/test/index.test.js | 2 +- .../preview-fallback/test/index.test.js | 54 +-- .../serverless-server.js | 58 --- .../test/index.test.js | 23 -- test/integration/profiling/next.config.js | 10 - test/integration/profiling/pages/index.js | 8 - test/integration/profiling/test/index.test.js | 26 -- .../next.config.js | 2 - .../revalidate-as-path/test/index.test.js | 49 +-- .../test/index.test.js | 42 +-- .../route-load-cancel-css/next.config.js | 1 - .../route-load-cancel-css/pages/page1.js | 7 +- .../route-load-cancel-css/server.js | 120 ------ .../route-load-cancel-css/test/index.test.js | 40 +- .../server-asset-modules/next.config.js | 1 - .../server-asset-modules/test/index.test.js | 30 -- .../serverless-runtime-configs/pages/_app.js | 12 - .../pages/_document.js | 26 -- .../pages/api/config.js | 7 - .../pages/config.js | 9 - .../serverless-runtime-configs/pages/index.js | 1 - .../serverless-runtime-configs/server.js | 31 -- .../test/index.test.js | 180 --------- .../next.config.js | 5 - .../pages/revalidate.js | 16 - .../serverless-trace-revalidate/server.js | 21 -- .../test/index.test.js | 57 --- .../serverless-trace/components/hello.js | 1 - .../serverless-trace/next.config.js | 9 - .../integration/serverless-trace/pages/abc.js | 1 - .../pages/api/dynamic/[path]/index.js | 3 - .../serverless-trace/pages/api/hello.js | 3 - .../serverless-trace/pages/api/posts/[id].js | 3 - .../serverless-trace/pages/dynamic-two.js | 9 - .../serverless-trace/pages/dynamic.js | 9 - .../serverless-trace/pages/fetch.js | 29 -- .../serverless-trace/pages/index.js | 11 - .../serverless-trace/pages/some-amp.js | 2 - .../serverless-trace/public/hello.txt | 1 - .../serverless-trace/test/index.test.js | 202 ---------- .../serverless/components/hello.js | 1 - test/integration/serverless/next.config.js | 9 - test/integration/serverless/pages/abc.js | 1 - .../pages/api/dynamic/[path]/index.js | 3 - .../integration/serverless/pages/api/hello.js | 3 - .../serverless/pages/api/posts/[id].js | 3 - .../serverless/pages/api/top-level-error.js | 6 - .../serverless/pages/catchall/[...slug].js | 5 - .../integration/serverless/pages/dr/[slug].js | 5 - .../serverless/pages/dynamic-two.js | 9 - test/integration/serverless/pages/dynamic.js | 9 - .../integration/serverless/pages/fetch-cjs.js | 29 -- test/integration/serverless/pages/fetch.js | 29 -- test/integration/serverless/pages/index.js | 14 - test/integration/serverless/pages/some-amp.js | 2 - test/integration/serverless/public/hello.txt | 1 - .../serverless/public/static/legacy.txt | 1 - .../integration/serverless/test/index.test.js | 346 ------------------ .../src-dir-support-double-dir/next.config.js | 1 - .../test/index.test.js | 24 -- .../src-dir-support/next.config.js | 1 - .../src-dir-support/test/index.test.js | 23 -- .../test/index.test.js | 29 -- test/integration/ssr-prepass/next.config.js | 3 - test/integration/ssr-prepass/pages/index.js | 3 - .../ssr-prepass/test/index.test.js | 28 -- .../integration/static-404/test/index.test.js | 17 - .../static-page-name/test/index.test.js | 19 - test/integration/telemetry/next.config.target | 10 - test/integration/telemetry/test/index.test.js | 26 -- .../app/middleware.js | 3 - .../app/next.config.js | 3 - .../app/pages/index.js | 3 - .../index.test.ts | 14 - .../_resolvedata/valid-target/next.config.js | 3 - test/unit/isolated/config.test.ts | 10 +- test/unit/isolated/require-page.test.ts | 6 +- 224 files changed, 300 insertions(+), 5875 deletions(-) delete mode 100644 packages/next/build/webpack/plugins/serverless-plugin.ts delete mode 100644 test/integration/auto-export-serverless-error/next.config.js delete mode 100644 test/integration/auto-export-serverless-error/pages/index.js delete mode 100644 test/integration/auto-export-serverless-error/test/index.test.js delete mode 100644 test/integration/auto-export-serverless/next.config.js delete mode 100644 test/integration/auto-export-serverless/pages/[post].js delete mode 100644 test/integration/auto-export-serverless/test/index.test.js delete mode 100644 test/integration/export-default-map-serverless/next.config.js delete mode 100644 test/integration/export-default-map-serverless/pages/docs/index.js delete mode 100644 test/integration/export-default-map-serverless/pages/index.js delete mode 100644 test/integration/export-default-map-serverless/pages/info.js delete mode 100644 test/integration/export-default-map-serverless/pages/just-amp/index.js delete mode 100644 test/integration/export-default-map-serverless/pages/some.js delete mode 100644 test/integration/export-default-map-serverless/pages/v1.12/docs.js delete mode 100644 test/integration/export-default-map-serverless/pages/v1.12/index.js delete mode 100644 test/integration/export-default-map-serverless/test/index.test.js delete mode 100644 test/integration/export-dynamic-pages-serverless/next.config.js delete mode 100644 test/integration/export-dynamic-pages-serverless/pages/regression/[slug].js delete mode 100644 test/integration/export-dynamic-pages-serverless/test/index.test.js delete mode 100644 test/integration/export-serverless/.gitignore delete mode 100644 test/integration/export-serverless/components/hello.js delete mode 100644 test/integration/export-serverless/next.config.js delete mode 100644 test/integration/export-serverless/pages/about.js delete mode 100644 test/integration/export-serverless/pages/api/data.js delete mode 100644 test/integration/export-serverless/pages/blog/[post]/comment/[id].js delete mode 100644 test/integration/export-serverless/pages/button-link.js delete mode 100644 test/integration/export-serverless/pages/counter.js delete mode 100644 test/integration/export-serverless/pages/dynamic-imports.js delete mode 100644 test/integration/export-serverless/pages/dynamic.js delete mode 100644 test/integration/export-serverless/pages/get-initial-props-with-no-query.js delete mode 100644 test/integration/export-serverless/pages/index.js delete mode 100644 test/integration/export-serverless/pages/level1/about.js delete mode 100644 test/integration/export-serverless/pages/level1/index.js delete mode 100644 test/integration/export-serverless/pages/query-update.js delete mode 100644 test/integration/export-serverless/pages/query.js delete mode 100644 test/integration/export-serverless/public/about/data.txt delete mode 100644 test/integration/export-serverless/static/data/item.txt delete mode 100644 test/integration/export-serverless/test/api-routes.js delete mode 100644 test/integration/export-serverless/test/browser.js delete mode 100644 test/integration/export-serverless/test/dev.js delete mode 100644 test/integration/export-serverless/test/dynamic.js delete mode 100644 test/integration/export-serverless/test/index.test.js delete mode 100644 test/integration/export-serverless/test/ssr.js delete mode 100644 test/integration/export-subfolders-serverless/next.config.js delete mode 100644 test/integration/export-subfolders-serverless/pages/about.js delete mode 100644 test/integration/export-subfolders-serverless/pages/index.js delete mode 100644 test/integration/export-subfolders-serverless/pages/posts/index.js delete mode 100644 test/integration/export-subfolders-serverless/pages/posts/single.js delete mode 100644 test/integration/export-subfolders-serverless/test/index.test.js delete mode 100644 test/integration/external-assets/next.config.js delete mode 100644 test/integration/external-assets/pages/about/history.js delete mode 100644 test/integration/external-assets/test/index.test.js delete mode 100644 test/integration/fetch-polyfill-ky-universal/serverless-server.js delete mode 100644 test/integration/fetch-polyfill/serverless-server.js delete mode 100644 test/integration/handle-non-page-in-pages/next.config.js delete mode 100644 test/integration/handle-non-page-in-pages/pages/invalid.tsx delete mode 100644 test/integration/handle-non-page-in-pages/pages/valid.tsx delete mode 100644 test/integration/handle-non-page-in-pages/test/index.test.js delete mode 100644 test/integration/handle-non-page-in-pages/tsconfig.json delete mode 100644 test/integration/i18n-support/server.js delete mode 100644 test/integration/legacy-pkg-gently/next.config.js delete mode 100644 test/integration/legacy-pkg-gently/pages/api/hello.js delete mode 100644 test/integration/legacy-pkg-gently/test/index.test.js delete mode 100644 test/integration/prerender-fallback-aspath/next.config.js delete mode 100644 test/integration/prerender-fallback-aspath/pages/blog/[post]/[comment].js delete mode 100644 test/integration/prerender-fallback-aspath/pages/blog/[post]/index.js delete mode 100644 test/integration/prerender-fallback-aspath/server.js delete mode 100644 test/integration/prerender-fallback-aspath/test/index.test.js delete mode 100644 test/integration/production-browser-sourcemaps/serverless-server.js delete mode 100644 test/integration/profiling/next.config.js delete mode 100644 test/integration/profiling/pages/index.js delete mode 100644 test/integration/profiling/test/index.test.js delete mode 100644 test/integration/route-load-cancel-css/next.config.js delete mode 100644 test/integration/route-load-cancel-css/server.js delete mode 100644 test/integration/server-asset-modules/next.config.js delete mode 100644 test/integration/serverless-runtime-configs/pages/_app.js delete mode 100644 test/integration/serverless-runtime-configs/pages/_document.js delete mode 100644 test/integration/serverless-runtime-configs/pages/api/config.js delete mode 100644 test/integration/serverless-runtime-configs/pages/config.js delete mode 100644 test/integration/serverless-runtime-configs/pages/index.js delete mode 100644 test/integration/serverless-runtime-configs/server.js delete mode 100644 test/integration/serverless-runtime-configs/test/index.test.js delete mode 100644 test/integration/serverless-trace-revalidate/next.config.js delete mode 100644 test/integration/serverless-trace-revalidate/pages/revalidate.js delete mode 100644 test/integration/serverless-trace-revalidate/server.js delete mode 100644 test/integration/serverless-trace-revalidate/test/index.test.js delete mode 100644 test/integration/serverless-trace/components/hello.js delete mode 100644 test/integration/serverless-trace/next.config.js delete mode 100644 test/integration/serverless-trace/pages/abc.js delete mode 100644 test/integration/serverless-trace/pages/api/dynamic/[path]/index.js delete mode 100644 test/integration/serverless-trace/pages/api/hello.js delete mode 100644 test/integration/serverless-trace/pages/api/posts/[id].js delete mode 100644 test/integration/serverless-trace/pages/dynamic-two.js delete mode 100644 test/integration/serverless-trace/pages/dynamic.js delete mode 100644 test/integration/serverless-trace/pages/fetch.js delete mode 100644 test/integration/serverless-trace/pages/index.js delete mode 100644 test/integration/serverless-trace/pages/some-amp.js delete mode 100644 test/integration/serverless-trace/public/hello.txt delete mode 100644 test/integration/serverless-trace/test/index.test.js delete mode 100644 test/integration/serverless/components/hello.js delete mode 100644 test/integration/serverless/next.config.js delete mode 100644 test/integration/serverless/pages/abc.js delete mode 100644 test/integration/serverless/pages/api/dynamic/[path]/index.js delete mode 100644 test/integration/serverless/pages/api/hello.js delete mode 100644 test/integration/serverless/pages/api/posts/[id].js delete mode 100644 test/integration/serverless/pages/api/top-level-error.js delete mode 100644 test/integration/serverless/pages/catchall/[...slug].js delete mode 100644 test/integration/serverless/pages/dr/[slug].js delete mode 100644 test/integration/serverless/pages/dynamic-two.js delete mode 100644 test/integration/serverless/pages/dynamic.js delete mode 100644 test/integration/serverless/pages/fetch-cjs.js delete mode 100644 test/integration/serverless/pages/fetch.js delete mode 100644 test/integration/serverless/pages/index.js delete mode 100644 test/integration/serverless/pages/some-amp.js delete mode 100644 test/integration/serverless/public/hello.txt delete mode 100644 test/integration/serverless/public/static/legacy.txt delete mode 100644 test/integration/serverless/test/index.test.js delete mode 100644 test/integration/src-dir-support-double-dir/next.config.js delete mode 100644 test/integration/src-dir-support/next.config.js delete mode 100644 test/integration/ssr-prepass/next.config.js delete mode 100644 test/integration/ssr-prepass/pages/index.js delete mode 100644 test/integration/ssr-prepass/test/index.test.js delete mode 100644 test/integration/telemetry/next.config.target delete mode 100644 test/production/middleware-is-not-allowed-when-using-serverless-target/app/middleware.js delete mode 100644 test/production/middleware-is-not-allowed-when-using-serverless-target/app/next.config.js delete mode 100644 test/production/middleware-is-not-allowed-when-using-serverless-target/app/pages/index.js delete mode 100644 test/production/middleware-is-not-allowed-when-using-serverless-target/index.test.ts delete mode 100644 test/unit/isolated/_resolvedata/valid-target/next.config.js diff --git a/docs/upgrading.md b/docs/upgrading.md index 98a56c09bd33b4..e397ed623bfa20 100644 --- a/docs/upgrading.md +++ b/docs/upgrading.md @@ -15,6 +15,8 @@ A [codemod is available](/docs/advanced-features/codemods.md#next-image-to-legac The `next/link` child can no longer be ``. Add the `legacyBehavior` prop to use the legacy behavior or remove the `` to upgrade. A [codemod is available](/docs/advanced-features/codemods.md#new-link) to automatically upgrade your code. +The `target` configuration option has been removed and superseded by [Output File Tracing](https://nextjs.org/docs/advanced-features/output-file-tracing). + ## Upgrading to 12.2 If you were using Middleware prior to `12.2`, please see the [upgrade guide](https://nextjs.org/docs/messages/middleware-upgrade-guide) for more information. diff --git a/errors/deprecated-target-config.md b/errors/deprecated-target-config.md index d43a944536117a..7de4711481daef 100644 --- a/errors/deprecated-target-config.md +++ b/errors/deprecated-target-config.md @@ -2,11 +2,11 @@ #### Why This Error Occurred -The `target` property in `next.config.js` has been deprecated. Please migrate to leverage the default target instead. +Starting in Next.js 13, the `target` property in `next.config.js` has been removed. #### Possible Ways to Fix It -For serverless cases, leverage the new output file traces or deploy your application somewhere where they are leveraged automatically like [Vercel](https://vercel.com). +For serverless targets, please use the Output File Tracing or deploy your application somewhere where it can be leveraged automatically, like [Vercel](https://vercel.com). ### Useful Links diff --git a/errors/gssp-export.md b/errors/gssp-export.md index e34189ac1761e2..1ab9301864c2a2 100644 --- a/errors/gssp-export.md +++ b/errors/gssp-export.md @@ -4,7 +4,7 @@ You attempted to statically export your application via `next export`, however, one or more of your pages uses `getServerSideProps`. -The `getServerSideProps` lifecycle is not compatible with `next export`, so you'll need to use `next start` or a [serverless deployment](https://vercel.com). +The `getServerSideProps` lifecycle is not compatible with `next export`, so you'll need to use `next start` when self hosting or deploy to a provider like [Vercel](https://vercel.com). #### Possible Ways to Fix It diff --git a/packages/next/build/entries.ts b/packages/next/build/entries.ts index 601f4f85b40be8..ca99f1eb8d1648 100644 --- a/packages/next/build/entries.ts +++ b/packages/next/build/entries.ts @@ -2,7 +2,6 @@ import type { ClientPagesLoaderOptions } from './webpack/loaders/next-client-pag import type { MiddlewareLoaderOptions } from './webpack/loaders/next-middleware-loader' import type { EdgeSSRLoaderQuery } from './webpack/loaders/next-edge-ssr-loader' import type { NextConfigComplete } from '../server/config-shared' -import type { ServerlessLoaderQuery } from './webpack/loaders/next-serverless-loader' import type { webpack } from 'next/dist/compiled/webpack/webpack' import type { MiddlewareConfig, @@ -14,7 +13,6 @@ import { posix, join } from 'path' import { stringify } from 'querystring' import { API_ROUTE, - DOT_NEXT_ALIAS, PAGES_DIR_ALIAS, ROOT_DIR_ALIAS, APP_DIR_ALIAS, @@ -33,13 +31,11 @@ import { EDGE_RUNTIME_WEBPACK, } from '../shared/lib/constants' import { __ApiPreviewProps } from '../server/api-utils' -import { isTargetLikeServerless } from '../server/utils' import { warn } from './output/log' import { isMiddlewareFile, isMiddlewareFilename, NestedMiddlewareError, - MiddlewareInServerlessTargetError, } from './utils' import { getPageStaticInfo } from './analysis/get-page-static-info' import { normalizePathSep } from '../shared/lib/page-path/normalize-path-sep' @@ -147,7 +143,6 @@ interface CreateEntrypointsParams { previewMode: __ApiPreviewProps rootDir: string rootPaths?: Record - target: 'server' | 'serverless' | 'experimental-serverless-trace' appDir?: string appPaths?: Record pageExtensions: string[] @@ -229,48 +224,6 @@ export function getAppEntry(opts: { } } -export function getServerlessEntry(opts: { - absolutePagePath: string - buildId: string - config: NextConfigComplete - envFiles: LoadedEnvFiles - page: string - previewMode: __ApiPreviewProps - pages: { [page: string]: string } -}): ObjectValue { - const loaderParams: ServerlessLoaderQuery = { - absolute404Path: opts.pages['/404'] || '', - absoluteAppPath: opts.pages['/_app'], - absoluteDocumentPath: opts.pages['/_document'], - absoluteErrorPath: opts.pages['/_error'], - absolutePagePath: opts.absolutePagePath, - assetPrefix: opts.config.assetPrefix, - basePath: opts.config.basePath, - buildId: opts.buildId, - canonicalBase: opts.config.amp.canonicalBase || '', - distDir: DOT_NEXT_ALIAS, - generateEtags: opts.config.generateEtags ? 'true' : '', - i18n: opts.config.i18n ? JSON.stringify(opts.config.i18n) : '', - // base64 encode to make sure contents don't break webpack URL loading - loadedEnvFiles: Buffer.from(JSON.stringify(opts.envFiles)).toString( - 'base64' - ), - page: opts.page, - poweredByHeader: opts.config.poweredByHeader ? 'true' : '', - previewProps: JSON.stringify(opts.previewMode), - runtimeConfig: - Object.keys(opts.config.publicRuntimeConfig).length > 0 || - Object.keys(opts.config.serverRuntimeConfig).length > 0 - ? JSON.stringify({ - publicRuntimeConfig: opts.config.publicRuntimeConfig, - serverRuntimeConfig: opts.config.serverRuntimeConfig, - }) - : '', - } - - return `next-serverless-loader?${stringify(loaderParams)}!` -} - export function getClientEntry(opts: { absolutePagePath: string page: string @@ -340,7 +293,6 @@ export async function createEntrypoints(params: CreateEntrypointsParams) { isDev, rootDir, rootPaths, - target, appDir, appPaths, pageExtensions, @@ -428,10 +380,6 @@ export async function createEntrypoints(params: CreateEntrypointsParams) { middlewareMatchers = staticInfo.middleware?.matchers ?? [ { regexp: '.*' }, ] - - if (target === 'serverless') { - throw new MiddlewareInServerlessTargetError() - } } await runDependingOnPageType({ @@ -459,14 +407,6 @@ export async function createEntrypoints(params: CreateEntrypointsParams) { appPaths: matchedAppPaths, pageExtensions, }) - } else if (isTargetLikeServerless(target)) { - if (page !== '/_app' && page !== '/_document') { - server[serverBundlePath] = getServerlessEntry({ - ...params, - absolutePagePath: mappings[page], - page, - }) - } } else { server[serverBundlePath] = [mappings[page]] } diff --git a/packages/next/build/index.ts b/packages/next/build/index.ts index fa66f489f6cff7..b4f4e122cc9ef1 100644 --- a/packages/next/build/index.ts +++ b/packages/next/build/index.ts @@ -48,7 +48,6 @@ import { FLIGHT_MANIFEST, REACT_LOADABLE_MANIFEST, ROUTES_MANIFEST, - SERVERLESS_DIRECTORY, SERVER_DIRECTORY, SERVER_FILES_MANIFEST, STATIC_STATUS_PAGES, @@ -64,7 +63,6 @@ import { import { getSortedRoutes, isDynamicRoute } from '../shared/lib/router/utils' import { __ApiPreviewProps } from '../server/api-utils' import loadConfig from '../server/config' -import { isTargetLikeServerless } from '../server/utils' import { BuildManifest } from '../server/get-page-files' import { normalizePagePath } from '../shared/lib/page-path/normalize-page-path' import { getPagePath } from '../server/require' @@ -433,8 +431,6 @@ export default async function build( prefixText: `${Log.prefixes.info} Creating an optimized production build`, }) - const isLikeServerless = isTargetLikeServerless(target) - const pagesPaths = pagesDir ? await nextBuildSpan .traceChild('collect-pages') @@ -531,7 +527,6 @@ export default async function build( pages: mappedPages, pagesDir, previewMode: previewProps, - target, rootDir: dir, rootPaths: mappedRootPaths, appDir, @@ -807,10 +802,7 @@ export default async function build( ) ) - const serverDir = isLikeServerless - ? SERVERLESS_DIRECTORY - : SERVER_DIRECTORY - const manifestPath = path.join(distDir, serverDir, PAGES_MANIFEST) + const manifestPath = path.join(distDir, SERVER_DIRECTORY, PAGES_MANIFEST) const requiredServerFiles = nextBuildSpan .traceChild('generate-required-server-files') @@ -846,9 +838,11 @@ export default async function build( ] : []), REACT_LOADABLE_MANIFEST, - config.optimizeFonts ? path.join(serverDir, FONT_MANIFEST) : null, + config.optimizeFonts + ? path.join(SERVER_DIRECTORY, FONT_MANIFEST) + : null, BUILD_ID_FILE, - appDir ? path.join(serverDir, APP_PATHS_MANIFEST) : null, + appDir ? path.join(SERVER_DIRECTORY, APP_PATHS_MANIFEST) : null, ...(config.experimental.fontLoaders ? [ path.join(SERVER_DIRECTORY, FONT_LOADER_MANIFEST + '.js'), @@ -924,60 +918,30 @@ export default async function build( // We run client and server compilation separately to optimize for memory usage await runWebpackSpan.traceAsyncFn(async () => { - // If we are under the serverless build, we will have to run the client - // compiler first because the server compiler depends on the manifest - // files that are created by the client compiler. - // Otherwise, we run the server compilers first and then the client + // Run the server compilers first and then the client // compiler to track the boundary of server/client components. - let clientResult: SingleCompilerResult | null = null - let serverResult: SingleCompilerResult | null = null - let edgeServerResult: SingleCompilerResult | null = null - if (isLikeServerless) { - if (appDir) { - throw new Error('`appDir` is not supported in serverless mode.') - } + // During the server compilations, entries of client components will be + // injected to this set and then will be consumed by the client compiler. + injectedClientEntries.clear() - // Build client first - clientResult = await runCompiler(clientConfig, { - runWebpackSpan, + const serverResult = await runCompiler(configs[1], { + runWebpackSpan, + }) + const edgeServerResult = configs[2] + ? await runCompiler(configs[2], { runWebpackSpan }) + : null + + // Only continue if there were no errors + if (!serverResult.errors.length && !edgeServerResult?.errors.length) { + injectedClientEntries.forEach((value, key) => { + ;(clientConfig.entry as webpack.EntryObject)[key] = value }) - // Only continue if there were no errors - if (!clientResult.errors.length) { - serverResult = await runCompiler(configs[1], { - runWebpackSpan, - }) - edgeServerResult = configs[2] - ? await runCompiler(configs[2], { runWebpackSpan }) - : null - } - } else { - // During the server compilations, entries of client components will be - // injected to this set and then will be consumed by the client compiler. - injectedClientEntries.clear() - - serverResult = await runCompiler(configs[1], { + clientResult = await runCompiler(clientConfig, { runWebpackSpan, }) - edgeServerResult = configs[2] - ? await runCompiler(configs[2], { runWebpackSpan }) - : null - - // Only continue if there were no errors - if ( - !serverResult.errors.length && - !edgeServerResult?.errors.length - ) { - injectedClientEntries.forEach((value, key) => { - ;(clientConfig.entry as webpack.EntryObject)[key] = value - }) - - clientResult = await runCompiler(clientConfig, { - runWebpackSpan, - }) - } } result = { @@ -1120,7 +1084,7 @@ export default async function build( if (appDir) { appPathsManifest = JSON.parse( await promises.readFile( - path.join(distDir, serverDir, APP_PATHS_MANIFEST), + path.join(distDir, SERVER_DIRECTORY, APP_PATHS_MANIFEST), 'utf8' ) ) @@ -1209,7 +1173,6 @@ export default async function build( (await staticWorkers.hasCustomGetInitialProps( '/_error', distDir, - isLikeServerless, runtimeEnvConfig, false )) @@ -1221,7 +1184,6 @@ export default async function build( staticWorkers.isPageStatic({ page: '/_error', distDir, - serverless: isLikeServerless, configFileName, runtimeEnvConfig, httpAgentOptions: config.httpAgentOptions, @@ -1232,15 +1194,12 @@ export default async function build( }) ) - // we don't output _app in serverless mode so use _app export - // from _error instead - const appPageToCheck = isLikeServerless ? '/_error' : '/_app' + const appPageToCheck = '/_app' const customAppGetInitialPropsPromise = staticWorkers.hasCustomGetInitialProps( appPageToCheck, distDir, - isLikeServerless, runtimeEnvConfig, true ) @@ -1248,7 +1207,6 @@ export default async function build( const namedExportsPromise = staticWorkers.getNamedExports( appPageToCheck, distDir, - isLikeServerless, runtimeEnvConfig ) @@ -1352,7 +1310,7 @@ export default async function build( if (pageRuntime === SERVER_RUNTIME.edge) { const manifest = require(join( distDir, - serverDir, + SERVER_DIRECTORY, MIDDLEWARE_MANIFEST )) const manifestKey = @@ -1369,7 +1327,6 @@ export default async function build( page, originalAppPath, distDir, - serverless: isLikeServerless, configFileName, runtimeEnvConfig, httpAgentOptions: config.httpAgentOptions, @@ -1931,7 +1888,7 @@ export default async function build( const middlewareManifest: MiddlewareManifest = JSON.parse( await promises.readFile( - path.join(distDir, serverDir, MIDDLEWARE_MANIFEST), + path.join(distDir, SERVER_DIRECTORY, MIDDLEWARE_MANIFEST), 'utf8' ) ) @@ -2145,7 +2102,7 @@ export default async function build( // remove server bundles that were exported for (const page of staticPages) { - const serverBundle = getPagePath(page, distDir, isLikeServerless) + const serverBundle = getPagePath(page, distDir) await promises.unlink(serverBundle) } @@ -2214,15 +2171,11 @@ export default async function build( .traceAsyncFn(async () => { file = `${file}.${ext}` const orig = path.join(exportOptions.outdir, file) - const pagePath = getPagePath( - originPage, - distDir, - isLikeServerless - ) + const pagePath = getPagePath(originPage, distDir) const relativeDest = path .relative( - path.join(distDir, serverDir), + path.join(distDir, SERVER_DIRECTORY), path.join( path.join( pagePath, @@ -2253,7 +2206,7 @@ export default async function build( pagesManifest[page] = relativeDest } - const dest = path.join(distDir, serverDir, relativeDest) + const dest = path.join(distDir, SERVER_DIRECTORY, relativeDest) const isNotFound = ssgNotFoundPaths.includes(page) // for SSG files with i18n the non-prerendered variants are @@ -2299,7 +2252,7 @@ export default async function build( ) const updatedDest = path.join( distDir, - serverDir, + SERVER_DIRECTORY, updatedRelativeDest ) @@ -2651,7 +2604,7 @@ export default async function build( }) await nextBuildSpan.traceChild('print-tree-view').traceAsyncFn(() => - printTreeView(pageKeys, allPageInfos, isLikeServerless, { + printTreeView(pageKeys, allPageInfos, { distPath: distDir, buildId: buildId, pagesDir, diff --git a/packages/next/build/utils.ts b/packages/next/build/utils.ts index 9114cef2e2e0f2..0b50d10708f08f 100644 --- a/packages/next/build/utils.ts +++ b/packages/next/build/utils.ts @@ -293,7 +293,6 @@ export async function printTreeView( app?: ReadonlyArray }, pageInfos: Map, - serverless: boolean, { distPath, buildId, @@ -627,7 +626,7 @@ export async function printTreeView( ], usedSymbols.has('ฮป') && [ 'ฮป', - serverless ? '(Lambda)' : '(Server)', + '(Server)', `server-side renders at runtime (uses ${chalk.cyan( 'getInitialProps' )} or ${chalk.cyan('getServerSideProps')})`, @@ -1165,7 +1164,6 @@ export async function buildAppStaticPaths({ export async function isPageStatic({ page, distDir, - serverless, configFileName, runtimeEnvConfig, httpAgentOptions, @@ -1181,7 +1179,6 @@ export async function isPageStatic({ }: { page: string distDir: string - serverless: boolean configFileName: string runtimeEnvConfig: any httpAgentOptions: NextConfigComplete['httpAgentOptions'] @@ -1250,7 +1247,6 @@ export async function isPageStatic({ componentsResult = await loadComponents({ distDir, pathname: originalAppPath || page, - serverless, hasServerComponents: !!hasServerComponents, isAppPath: pageType === 'app', }) @@ -1430,7 +1426,6 @@ export async function isPageStatic({ export async function hasCustomGetInitialProps( page: string, distDir: string, - isLikeServerless: boolean, runtimeEnvConfig: any, checkingApp: boolean ): Promise { @@ -1439,7 +1434,6 @@ export async function hasCustomGetInitialProps( const components = await loadComponents({ distDir, pathname: page, - serverless: isLikeServerless, hasServerComponents: false, isAppPath: false, }) @@ -1457,14 +1451,12 @@ export async function hasCustomGetInitialProps( export async function getNamedExports( page: string, distDir: string, - isLikeServerless: boolean, runtimeEnvConfig: any ): Promise> { require('../shared/lib/runtime-config').setConfig(runtimeEnvConfig) const components = await loadComponents({ distDir, pathname: page, - serverless: isLikeServerless, hasServerComponents: false, isAppPath: false, }) @@ -1726,16 +1718,6 @@ export function getPossibleMiddlewareFilenames( ) } -export class MiddlewareInServerlessTargetError extends Error { - constructor() { - super( - 'Next.js Middleware is not supported in the deprecated serverless target.\n' + - 'Please remove `target: "serverless" from your next.config.js to use Middleware.' - ) - this.name = 'MiddlewareInServerlessTargetError' - } -} - export class NestedMiddlewareError extends Error { constructor(nestedFileNames: string[], mainDir: string, pagesDir: string) { super( diff --git a/packages/next/build/webpack-config.ts b/packages/next/build/webpack-config.ts index ca0cf84f8f13cf..412634c037759a 100644 --- a/packages/next/build/webpack-config.ts +++ b/packages/next/build/webpack-config.ts @@ -24,7 +24,6 @@ import { CLIENT_STATIC_FILES_RUNTIME_WEBPACK, MIDDLEWARE_REACT_LOADABLE_MANIFEST, REACT_LOADABLE_MANIFEST, - SERVERLESS_DIRECTORY, SERVER_DIRECTORY, COMPILER_NAMES, CompilerNameValues, @@ -43,7 +42,6 @@ import { DropClientPage } from './webpack/plugins/next-drop-client-page-plugin' import PagesManifestPlugin from './webpack/plugins/pages-manifest-plugin' import { ProfilingPlugin } from './webpack/plugins/profiling-plugin' import { ReactLoadablePlugin } from './webpack/plugins/react-loadable-plugin' -import { ServerlessPlugin } from './webpack/plugins/serverless-plugin' import { WellKnownErrorsPlugin } from './webpack/plugins/wellknown-errors-plugin' import { regexLikeCss } from './webpack/config/blocks/css' import { CopyFilePlugin } from './webpack/plugins/copy-file-plugin' @@ -719,16 +717,9 @@ export default async function getBaseWebpackConfig( const pageExtensions = config.pageExtensions - // Intentionally not using isTargetLikeServerless helper - const isLikeServerless = - target === 'serverless' || target === 'experimental-serverless-trace' - const outputPath = isNodeServer || isEdgeServer - ? path.join( - distDir, - isLikeServerless ? SERVERLESS_DIRECTORY : SERVER_DIRECTORY - ) + ? path.join(distDir, SERVER_DIRECTORY) : distDir const clientEntries = isClient @@ -1242,8 +1233,7 @@ export default async function getBaseWebpackConfig( ] : []), ] - : target !== 'serverless' - ? [ + : [ ({ context, request, @@ -1296,15 +1286,6 @@ export default async function getBaseWebpackConfig( }) } ), - ] - : [ - // When the 'serverless' target is used all node_modules will be compiled into the output bundles - // So that the 'serverless' bundles have 0 runtime dependencies - 'next/dist/compiled/@ampproject/toolbox-optimizer', // except this one - - // Mark this as external if not enabled so it doesn't cause a - // webpack error from being missing - ...(config.experimental.optimizeCss ? [] : ['critters']), ], optimization: { emitOnErrors: !dev, @@ -1848,7 +1829,6 @@ export default async function getBaseWebpackConfig( }), (isClient || isEdgeServer) && new DropClientPage(), config.outputFileTracing && - !isLikeServerless && (isNodeServer || isEdgeServer) && !dev && new (require('./webpack/plugins/next-trace-entrypoints-plugin').TraceEntryPointsPlugin)( @@ -1893,12 +1873,8 @@ export default async function getBaseWebpackConfig( resourceRegExp: /react-is/, contextRegExp: /next[\\/]dist[\\/]/, }), - target === 'serverless' && - (isNodeServer || isEdgeServer) && - new ServerlessPlugin(), (isNodeServer || isEdgeServer) && new PagesManifestPlugin({ - serverless: isLikeServerless, dev, isEdgeRuntime: isEdgeServer, appDirEnabled: hasAppDir, @@ -1931,7 +1907,6 @@ export default async function getBaseWebpackConfig( FontStylesheetGatheringPlugin: typeof import('./webpack/plugins/font-stylesheet-gathering-plugin').FontStylesheetGatheringPlugin } return new FontStylesheetGatheringPlugin({ - isLikeServerless, adjustFontFallbacks: config.experimental.adjustFontFallbacks, adjustFontFallbacksWithSizeAdjust: config.experimental.adjustFontFallbacksWithSizeAdjust, diff --git a/packages/next/build/webpack/plugins/font-stylesheet-gathering-plugin.ts b/packages/next/build/webpack/plugins/font-stylesheet-gathering-plugin.ts index bd9d2bbea0befc..ea5eedfb28fd95 100644 --- a/packages/next/build/webpack/plugins/font-stylesheet-gathering-plugin.ts +++ b/packages/next/build/webpack/plugins/font-stylesheet-gathering-plugin.ts @@ -52,20 +52,16 @@ export class FontStylesheetGatheringPlugin { compiler?: webpack.Compiler gatheredStylesheets: Array = [] manifestContent: FontManifest = [] - isLikeServerless: boolean adjustFontFallbacks?: boolean adjustFontFallbacksWithSizeAdjust?: boolean constructor({ - isLikeServerless, adjustFontFallbacks, adjustFontFallbacksWithSizeAdjust, }: { - isLikeServerless: boolean adjustFontFallbacks?: boolean adjustFontFallbacksWithSizeAdjust?: boolean }) { - this.isLikeServerless = isLikeServerless this.adjustFontFallbacks = adjustFontFallbacks this.adjustFontFallbacksWithSizeAdjust = adjustFontFallbacksWithSizeAdjust } @@ -184,25 +180,6 @@ export class FontStylesheetGatheringPlugin { this.parserHandler ) compiler.hooks.make.tapAsync(this.constructor.name, (compilation, cb) => { - if (this.isLikeServerless) { - /** - * Inline font manifest for serverless case only. - * For target: server drive the manifest through physical file and less of webpack magic. - */ - const mainTemplate = compilation.mainTemplate - mainTemplate.hooks.requireExtensions.tap( - this.constructor.name, - (source: string) => { - return `${source} - // Font manifest declaration - __webpack_require__.__NEXT_FONT_MANIFEST__ = ${JSON.stringify( - this.manifestContent - )}; - // Enable feature: - process.env.__NEXT_OPTIMIZE_FONTS = JSON.stringify(true);` - } - ) - } compilation.hooks.finishModules.tapAsync( this.constructor.name, async (modules: any, modulesFinished: Function) => { diff --git a/packages/next/build/webpack/plugins/pages-manifest-plugin.ts b/packages/next/build/webpack/plugins/pages-manifest-plugin.ts index 1a9aa15ea9cdb8..571d1d973faec5 100644 --- a/packages/next/build/webpack/plugins/pages-manifest-plugin.ts +++ b/packages/next/build/webpack/plugins/pages-manifest-plugin.ts @@ -19,23 +19,19 @@ let nodeServerAppPaths = {} export default class PagesManifestPlugin implements webpack.WebpackPluginInstance { - serverless: boolean dev: boolean isEdgeRuntime: boolean appDirEnabled: boolean constructor({ - serverless, dev, isEdgeRuntime, appDirEnabled, }: { - serverless: boolean dev: boolean isEdgeRuntime: boolean appDirEnabled: boolean }) { - this.serverless = serverless this.dev = dev this.isEdgeRuntime = isEdgeRuntime this.appDirEnabled = appDirEnabled diff --git a/packages/next/build/webpack/plugins/serverless-plugin.ts b/packages/next/build/webpack/plugins/serverless-plugin.ts deleted file mode 100644 index 7f8215c127baae..00000000000000 --- a/packages/next/build/webpack/plugins/serverless-plugin.ts +++ /dev/null @@ -1,37 +0,0 @@ -import { webpack } from 'next/dist/compiled/webpack/webpack' - -/** - * Makes sure there are no dynamic chunks when the target is serverless - * The dynamic chunks are integrated back into their parent chunk - * This is to make sure there is a single render bundle instead of that bundle importing dynamic chunks - */ - -export class ServerlessPlugin { - apply(compiler: webpack.Compiler) { - compiler.hooks.compilation.tap('ServerlessPlugin', (compilation) => { - const hook = compilation.hooks.optimizeChunks - - hook.tap('ServerlessPlugin', (chunks) => { - for (const chunk of chunks) { - // If chunk is not an entry point skip them - if (compilation.chunkGraph.getNumberOfEntryModules(chunk) === 0) { - continue - } - - // Async chunks are usages of import() for example - const dynamicChunks = chunk.getAllAsyncChunks() - for (const dynamicChunk of dynamicChunks) { - for (const module of compilation.chunkGraph.getChunkModulesIterable( - dynamicChunk - )) { - // Add module back into the entry chunk - if (!compilation.chunkGraph.isModuleInChunk(module, chunk)) { - compilation.chunkGraph.connectChunkAndModule(chunk, module) - } - } - } - } - }) - }) - } -} diff --git a/packages/next/compiled/node-html-parser/index.js b/packages/next/compiled/node-html-parser/index.js index c98905c61585aa..2039eaeda2107f 100644 --- a/packages/next/compiled/node-html-parser/index.js +++ b/packages/next/compiled/node-html-parser/index.js @@ -1,2 +1,2 @@ (function(){var e={2947:function(e){e.exports={trueFunc:function trueFunc(){return true},falseFunc:function falseFunc(){return false}}},3387:function(e,r,t){"use strict";Object.defineProperty(r,"__esModule",{value:true});r.attributeRules=void 0;var a=t(2947);var n=/[-[\]{}()*+?.,\\^$|#\s]/g;function escapeRegex(e){return e.replace(n,"\\$&")}var i=new Set(["accept","accept-charset","align","alink","axis","bgcolor","charset","checked","clear","codetype","color","compact","declare","defer","dir","direction","disabled","enctype","face","frame","hreflang","http-equiv","lang","language","link","media","method","multiple","nohref","noresize","noshade","nowrap","readonly","rel","rev","rules","scope","scrolling","selected","shape","target","text","type","valign","valuetype","vlink"]);function shouldIgnoreCase(e,r){return typeof e.ignoreCase==="boolean"?e.ignoreCase:e.ignoreCase==="quirks"?!!r.quirksMode:!r.xmlMode&&i.has(e.name)}r.attributeRules={equals:function(e,r,t){var a=t.adapter;var n=r.name;var i=r.value;if(shouldIgnoreCase(r,t)){i=i.toLowerCase();return function(r){var t=a.getAttributeValue(r,n);return t!=null&&t.length===i.length&&t.toLowerCase()===i&&e(r)}}return function(r){return a.getAttributeValue(r,n)===i&&e(r)}},hyphen:function(e,r,t){var a=t.adapter;var n=r.name;var i=r.value;var o=i.length;if(shouldIgnoreCase(r,t)){i=i.toLowerCase();return function hyphenIC(r){var t=a.getAttributeValue(r,n);return t!=null&&(t.length===o||t.charAt(o)==="-")&&t.substr(0,o).toLowerCase()===i&&e(r)}}return function hyphen(r){var t=a.getAttributeValue(r,n);return t!=null&&(t.length===o||t.charAt(o)==="-")&&t.substr(0,o)===i&&e(r)}},element:function(e,r,t){var n=t.adapter;var i=r.name,o=r.value;if(/\s/.test(o)){return a.falseFunc}var s=new RegExp("(?:^|\\s)".concat(escapeRegex(o),"(?:$|\\s)"),shouldIgnoreCase(r,t)?"i":"");return function element(r){var t=n.getAttributeValue(r,i);return t!=null&&t.length>=o.length&&s.test(t)&&e(r)}},exists:function(e,r,t){var a=r.name;var n=t.adapter;return function(r){return n.hasAttrib(r,a)&&e(r)}},start:function(e,r,t){var n=t.adapter;var i=r.name;var o=r.value;var s=o.length;if(s===0){return a.falseFunc}if(shouldIgnoreCase(r,t)){o=o.toLowerCase();return function(r){var t=n.getAttributeValue(r,i);return t!=null&&t.length>=s&&t.substr(0,s).toLowerCase()===o&&e(r)}}return function(r){var t;return!!((t=n.getAttributeValue(r,i))===null||t===void 0?void 0:t.startsWith(o))&&e(r)}},end:function(e,r,t){var n=t.adapter;var i=r.name;var o=r.value;var s=-o.length;if(s===0){return a.falseFunc}if(shouldIgnoreCase(r,t)){o=o.toLowerCase();return function(r){var t;return((t=n.getAttributeValue(r,i))===null||t===void 0?void 0:t.substr(s).toLowerCase())===o&&e(r)}}return function(r){var t;return!!((t=n.getAttributeValue(r,i))===null||t===void 0?void 0:t.endsWith(o))&&e(r)}},any:function(e,r,t){var n=t.adapter;var i=r.name,o=r.value;if(o===""){return a.falseFunc}if(shouldIgnoreCase(r,t)){var s=new RegExp(escapeRegex(o),"i");return function anyIC(r){var t=n.getAttributeValue(r,i);return t!=null&&t.length>=o.length&&s.test(t)&&e(r)}}return function(r){var t;return!!((t=n.getAttributeValue(r,i))===null||t===void 0?void 0:t.includes(o))&&e(r)}},not:function(e,r,t){var a=t.adapter;var n=r.name;var i=r.value;if(i===""){return function(r){return!!a.getAttributeValue(r,n)&&e(r)}}else if(shouldIgnoreCase(r,t)){i=i.toLowerCase();return function(r){var t=a.getAttributeValue(r,n);return(t==null||t.length!==i.length||t.toLowerCase()!==i)&&e(r)}}return function(r){return a.getAttributeValue(r,n)!==i&&e(r)}}}},8689:function(e,r,t){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:true});r.compileToken=r.compileUnsafe=r.compile=void 0;var n=t(8065);var i=t(2947);var o=a(t(4901));var s=t(538);var u=t(7088);var l=t(4428);function compile(e,r,t){var a=compileUnsafe(e,r,t);return(0,l.ensureIsTag)(a,r.adapter)}r.compile=compile;function compileUnsafe(e,r,t){var a=typeof e==="string"?(0,n.parse)(e):e;return compileToken(a,r,t)}r.compileUnsafe=compileUnsafe;function includesScopePseudo(e){return e.type==="pseudo"&&(e.name==="scope"||Array.isArray(e.data)&&e.data.some((function(e){return e.some(includesScopePseudo)})))}var c={type:n.SelectorType.Descendant};var p={type:"_flexibleDescendant"};var d={type:n.SelectorType.Pseudo,name:"scope",data:null};function absolutize(e,r,t){var a=r.adapter;var n=!!(t===null||t===void 0?void 0:t.every((function(e){var r=a.isTag(e)&&a.getParent(e);return e===l.PLACEHOLDER_ELEMENT||r&&a.isTag(r)})));for(var i=0,o=e;i0&&(0,s.isTraversal)(u[0])&&u[0].type!=="descendant"){}else if(n&&!u.some(includesScopePseudo)){u.unshift(c)}else{continue}u.unshift(d)}}function compileToken(e,r,t){var a;e=e.filter((function(e){return e.length>0}));e.forEach(o.default);t=(a=r.context)!==null&&a!==void 0?a:t;var n=Array.isArray(t);var s=t&&(Array.isArray(t)?t:[t]);absolutize(e,r,s);var u=false;var l=e.map((function(e){if(e.length>=2){var t=e[0],a=e[1];if(t.type!=="pseudo"||t.name!=="scope"){}else if(n&&a.type==="descendant"){e[1]=p}else if(a.type==="adjacent"||a.type==="sibling"){u=true}}return compileRules(e,r,s)})).reduce(reduceRules,i.falseFunc);l.shouldTestNextSiblings=u;return l}r.compileToken=compileToken;function compileRules(e,r,t){var a;return e.reduce((function(e,a){return e===i.falseFunc?i.falseFunc:(0,u.compileGeneralSelector)(e,a,r,t,compileToken)}),(a=r.rootFunc)!==null&&a!==void 0?a:i.trueFunc)}function reduceRules(e,r){if(r===i.falseFunc||e===i.trueFunc){return e}if(e===i.falseFunc||r===i.trueFunc){return r}return function combine(t){return e(t)||r(t)}}},7088:function(e,r,t){"use strict";Object.defineProperty(r,"__esModule",{value:true});r.compileGeneralSelector=void 0;var a=t(3387);var n=t(6463);var i=t(8065);function compileGeneralSelector(e,r,t,o,s){var u=t.adapter,l=t.equals;switch(r.type){case i.SelectorType.PseudoElement:{throw new Error("Pseudo-elements are not supported by css-select")}case i.SelectorType.ColumnCombinator:{throw new Error("Column combinators are not yet supported by css-select")}case i.SelectorType.Attribute:{if(r.namespace!=null){throw new Error("Namespaced attributes are not yet supported by css-select")}if(!t.xmlMode||t.lowerCaseAttributeNames){r.name=r.name.toLowerCase()}return a.attributeRules[r.action](e,r,t)}case i.SelectorType.Pseudo:{return(0,n.compilePseudoSelector)(e,r,t,o,s)}case i.SelectorType.Tag:{if(r.namespace!=null){throw new Error("Namespaced tag names are not yet supported by css-select")}var c=r.name;if(!t.xmlMode||t.lowerCaseTags){c=c.toLowerCase()}return function tag(r){return u.getName(r)===c&&e(r)}}case i.SelectorType.Descendant:{if(t.cacheResults===false||typeof WeakSet==="undefined"){return function descendant(r){var t=r;while(t=u.getParent(t)){if(u.isTag(t)&&e(t)){return true}}return false}}var p=new WeakSet;return function cachedDescendant(r){var t=r;while(t=u.getParent(t)){if(!p.has(t)){if(u.isTag(t)&&e(t)){return true}p.add(t)}}return false}}case"_flexibleDescendant":{return function flexibleDescendant(r){var t=r;do{if(u.isTag(t)&&e(t))return true}while(t=u.getParent(t));return false}}case i.SelectorType.Parent:{return function parent(r){return u.getChildren(r).some((function(r){return u.isTag(r)&&e(r)}))}}case i.SelectorType.Child:{return function child(r){var t=u.getParent(r);return t!=null&&u.isTag(t)&&e(t)}}case i.SelectorType.Sibling:{return function sibling(r){var t=u.getSiblings(r);for(var a=0;a option,\n fieldset[disabled]:not(fieldset[disabled] legend:first-of-type *)\n )",enabled:":not(:disabled)",checked:":is(:is(input[type=radio], input[type=checkbox])[checked], option:selected)",required:":is(input, select, textarea)[required]",optional:":is(input, select, textarea):not([required])",selected:"option:is([selected], select:not([multiple]):not(:has(> option[selected])) > :first-of-type)",checkbox:"[type=checkbox]",file:"[type=file]",password:"[type=password]",radio:"[type=radio]",reset:"[type=reset]",image:"[type=image]",submit:"[type=submit]",parent:":not(:empty)",header:":is(h1, h2, h3, h4, h5, h6)",button:":is(button, input[type=button])",input:":is(input, textarea, select, button)",text:"input:is(:not([type!='']), [type=text])"}},6804:function(e,r,t){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:true});r.filters=void 0;var n=a(t(7118));var i=t(2947);function getChildFunc(e,r){return function(t){var a=r.getParent(t);return a!=null&&r.isTag(a)&&e(t)}}r.filters={contains:function(e,r,t){var a=t.adapter;return function contains(t){return e(t)&&a.getText(t).includes(r)}},icontains:function(e,r,t){var a=t.adapter;var n=r.toLowerCase();return function icontains(r){return e(r)&&a.getText(r).toLowerCase().includes(n)}},"nth-child":function(e,r,t){var a=t.adapter,o=t.equals;var s=(0,n.default)(r);if(s===i.falseFunc)return i.falseFunc;if(s===i.trueFunc)return getChildFunc(e,a);return function nthChild(r){var t=a.getSiblings(r);var n=0;for(var i=0;i=0;i--){if(o(r,t[i]))break;if(a.isTag(t[i])){n++}}return s(n)&&e(r)}},"nth-of-type":function(e,r,t){var a=t.adapter,o=t.equals;var s=(0,n.default)(r);if(s===i.falseFunc)return i.falseFunc;if(s===i.trueFunc)return getChildFunc(e,a);return function nthOfType(r){var t=a.getSiblings(r);var n=0;for(var i=0;i=0;i--){var u=t[i];if(o(r,u))break;if(a.isTag(u)&&a.getName(u)===a.getName(r)){n++}}return s(n)&&e(r)}},root:function(e,r,t){var a=t.adapter;return function(r){var t=a.getParent(r);return(t==null||!a.isTag(t))&&e(r)}},scope:function(e,t,a,n){var i=a.equals;if(!n||n.length===0){return r.filters.root(e,t,a)}if(n.length===1){return function(r){return i(n[0],r)&&e(r)}}return function(r){return n.includes(r)&&e(r)}},hover:dynamicStatePseudo("isHovered"),visited:dynamicStatePseudo("isVisited"),active:dynamicStatePseudo("isActive")};function dynamicStatePseudo(e){return function dynamicPseudo(r,t,a){var n=a.adapter;var o=n[e];if(typeof o!=="function"){return i.falseFunc}return function active(e){return o(e)&&r(e)}}}},6463:function(e,r,t){"use strict";Object.defineProperty(r,"__esModule",{value:true});r.compilePseudoSelector=r.aliases=r.pseudos=r.filters=void 0;var a=t(2947);var n=t(8065);var i=t(6804);Object.defineProperty(r,"filters",{enumerable:true,get:function(){return i.filters}});var o=t(6973);Object.defineProperty(r,"pseudos",{enumerable:true,get:function(){return o.pseudos}});var s=t(8680);Object.defineProperty(r,"aliases",{enumerable:true,get:function(){return s.aliases}});var u=t(4428);function compilePseudoSelector(e,r,t,l,c){var p=r.name,d=r.data;if(Array.isArray(d)){return u.subselects[p](e,d,t,l,c)}if(p in s.aliases){if(d!=null){throw new Error("Pseudo ".concat(p," doesn't have any arguments"))}var f=(0,n.parse)(s.aliases[p]);return u.subselects.is(e,f,t,l,c)}if(p in i.filters){return i.filters[p](e,d,t,l)}if(p in o.pseudos){var g=o.pseudos[p];(0,o.verifyPseudoArgs)(g,p,d);return g===a.falseFunc?a.falseFunc:e===a.trueFunc?function(e){return g(e,t,d)}:function(r){return g(r,t,d)&&e(r)}}throw new Error("unmatched pseudo-class :".concat(p))}r.compilePseudoSelector=compilePseudoSelector},6973:function(e,r){"use strict";Object.defineProperty(r,"__esModule",{value:true});r.verifyPseudoArgs=r.pseudos=void 0;r.pseudos={empty:function(e,r){var t=r.adapter;return!t.getChildren(e).some((function(e){return t.isTag(e)||t.getText(e)!==""}))},"first-child":function(e,r){var t=r.adapter,a=r.equals;var n=t.getSiblings(e).find((function(e){return t.isTag(e)}));return n!=null&&a(e,n)},"last-child":function(e,r){var t=r.adapter,a=r.equals;var n=t.getSiblings(e);for(var i=n.length-1;i>=0;i--){if(a(e,n[i]))return true;if(t.isTag(n[i]))break}return false},"first-of-type":function(e,r){var t=r.adapter,a=r.equals;var n=t.getSiblings(e);var i=t.getName(e);for(var o=0;o=0;o--){var s=n[o];if(a(e,s))return true;if(t.isTag(s)&&t.getName(s)===i){break}}return false},"only-of-type":function(e,r){var t=r.adapter,a=r.equals;var n=t.getName(e);return t.getSiblings(e).every((function(r){return a(e,r)||!t.isTag(r)||t.getName(r)!==n}))},"only-child":function(e,r){var t=r.adapter,a=r.equals;return t.getSiblings(e).every((function(r){return a(e,r)||!t.isTag(r)}))}};function verifyPseudoArgs(e,r,t){if(t===null){if(e.length>2){throw new Error("pseudo-selector :".concat(r," requires an argument"))}}else if(e.length===2){throw new Error("pseudo-selector :".concat(r," doesn't have any arguments"))}}r.verifyPseudoArgs=verifyPseudoArgs},4428:function(e,r,t){"use strict";var a=this&&this.__spreadArray||function(e,r,t){if(t||arguments.length===2)for(var a=0,n=r.length,i;a=0&&a>=1}}else if(e.type===a.SelectorType.Pseudo){if(!e.data){r=3}else if(e.name==="has"||e.name==="contains"){r=0}else if(Array.isArray(e.data)){r=0;for(var t=0;tr)r=o}if(e.data.length>1&&r>0)r-=1}else{r=1}}return r}},8065:function(e,r,t){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,r,t,a){if(a===undefined)a=t;var n=Object.getOwnPropertyDescriptor(r,t);if(!n||("get"in n?!r.__esModule:n.writable||n.configurable)){n={enumerable:true,get:function(){return r[t]}}}Object.defineProperty(e,a,n)}:function(e,r,t,a){if(a===undefined)a=t;e[a]=r[t]});var n=this&&this.__exportStar||function(e,r){for(var t in e)if(t!=="default"&&!Object.prototype.hasOwnProperty.call(r,t))a(r,e,t)};Object.defineProperty(r,"__esModule",{value:true});r.stringify=r.parse=r.isTraversal=void 0;n(t(5615),r);var i=t(2422);Object.defineProperty(r,"isTraversal",{enumerable:true,get:function(){return i.isTraversal}});Object.defineProperty(r,"parse",{enumerable:true,get:function(){return i.parse}});var o=t(8279);Object.defineProperty(r,"stringify",{enumerable:true,get:function(){return o.stringify}})},2422:function(e,r,t){"use strict";Object.defineProperty(r,"__esModule",{value:true});r.parse=r.isTraversal=void 0;var a=t(5615);var n=/^[^\\#]?(?:\\(?:[\da-f]{1,6}\s?|.)|[\w\-\u00b0-\uFFFF])+/;var i=/\\([\da-f]{1,6}\s?|(\s)|.)/gi;var o=new Map([[126,a.AttributeAction.Element],[94,a.AttributeAction.Start],[36,a.AttributeAction.End],[42,a.AttributeAction.Any],[33,a.AttributeAction.Not],[124,a.AttributeAction.Hyphen]]);var s=new Set(["has","not","matches","is","where","host","host-context"]);function isTraversal(e){switch(e.type){case a.SelectorType.Adjacent:case a.SelectorType.Child:case a.SelectorType.Descendant:case a.SelectorType.Parent:case a.SelectorType.Sibling:case a.SelectorType.ColumnCombinator:return true;default:return false}}r.isTraversal=isTraversal;var u=new Set(["contains","icontains"]);function funescape(e,r,t){var a=parseInt(r,16)-65536;return a!==a||t?r:a<0?String.fromCharCode(a+65536):String.fromCharCode(a>>10|55296,a&1023|56320)}function unescapeCSS(e){return e.replace(i,funescape)}function isQuote(e){return e===39||e===34}function isWhitespace(e){return e===32||e===9||e===10||e===12||e===13}function parse(e){var r=[];var t=parseSelector(r,"".concat(e),0);if(t0&&t0&&isTraversal(i[i.length-1])){throw new Error("Did not expect successive traversals.")}}function addTraversal(e){if(i.length>0&&i[i.length-1].type===a.SelectorType.Descendant){i[i.length-1].type=e;return}ensureNotTraversal();i.push({type:e})}function addSpecialAttribute(e,r){i.push({type:a.SelectorType.Attribute,name:e,action:r,value:getName(1),namespace:null,ignoreCase:"quirks"})}function finalizeSubselector(){if(i.length&&i[i.length-1].type===a.SelectorType.Descendant){i.pop()}if(i.length===0){throw new Error("Empty sub-selector")}e.push(i)}stripWhitespace(0);if(r.length===t){return t}e:while(t ":" > ";case n.SelectorType.Parent:return r===0?"< ":" < ";case n.SelectorType.Sibling:return r===0?"~ ":" ~ ";case n.SelectorType.Adjacent:return r===0?"+ ":" + ";case n.SelectorType.Descendant:return" ";case n.SelectorType.ColumnCombinator:return r===0?"|| ":" || ";case n.SelectorType.Universal:return e.namespace==="*"&&r+10?a+e.slice(t):e}},5615:function(e,r){"use strict";Object.defineProperty(r,"__esModule",{value:true});r.AttributeAction=r.IgnoreCaseMode=r.SelectorType=void 0;var t;(function(e){e["Attribute"]="attribute";e["Pseudo"]="pseudo";e["PseudoElement"]="pseudo-element";e["Tag"]="tag";e["Universal"]="universal";e["Adjacent"]="adjacent";e["Child"]="child";e["Descendant"]="descendant";e["Parent"]="parent";e["Sibling"]="sibling";e["ColumnCombinator"]="column-combinator"})(t=r.SelectorType||(r.SelectorType={}));r.IgnoreCaseMode={Unknown:null,QuirksMode:"quirks",IgnoreCase:true,CaseSensitive:false};var a;(function(e){e["Any"]="any";e["Element"]="element";e["End"]="end";e["Equals"]="equals";e["Exists"]="exists";e["Hyphen"]="hyphen";e["Not"]="not";e["Start"]="start"})(a=r.AttributeAction||(r.AttributeAction={}))},7537:function(e,r){"use strict";Object.defineProperty(r,"__esModule",{value:true});r.attributeNames=r.elementNames=void 0;r.elementNames=new Map([["altglyph","altGlyph"],["altglyphdef","altGlyphDef"],["altglyphitem","altGlyphItem"],["animatecolor","animateColor"],["animatemotion","animateMotion"],["animatetransform","animateTransform"],["clippath","clipPath"],["feblend","feBlend"],["fecolormatrix","feColorMatrix"],["fecomponenttransfer","feComponentTransfer"],["fecomposite","feComposite"],["feconvolvematrix","feConvolveMatrix"],["fediffuselighting","feDiffuseLighting"],["fedisplacementmap","feDisplacementMap"],["fedistantlight","feDistantLight"],["fedropshadow","feDropShadow"],["feflood","feFlood"],["fefunca","feFuncA"],["fefuncb","feFuncB"],["fefuncg","feFuncG"],["fefuncr","feFuncR"],["fegaussianblur","feGaussianBlur"],["feimage","feImage"],["femerge","feMerge"],["femergenode","feMergeNode"],["femorphology","feMorphology"],["feoffset","feOffset"],["fepointlight","fePointLight"],["fespecularlighting","feSpecularLighting"],["fespotlight","feSpotLight"],["fetile","feTile"],["feturbulence","feTurbulence"],["foreignobject","foreignObject"],["glyphref","glyphRef"],["lineargradient","linearGradient"],["radialgradient","radialGradient"],["textpath","textPath"]]);r.attributeNames=new Map([["definitionurl","definitionURL"],["attributename","attributeName"],["attributetype","attributeType"],["basefrequency","baseFrequency"],["baseprofile","baseProfile"],["calcmode","calcMode"],["clippathunits","clipPathUnits"],["diffuseconstant","diffuseConstant"],["edgemode","edgeMode"],["filterunits","filterUnits"],["glyphref","glyphRef"],["gradienttransform","gradientTransform"],["gradientunits","gradientUnits"],["kernelmatrix","kernelMatrix"],["kernelunitlength","kernelUnitLength"],["keypoints","keyPoints"],["keysplines","keySplines"],["keytimes","keyTimes"],["lengthadjust","lengthAdjust"],["limitingconeangle","limitingConeAngle"],["markerheight","markerHeight"],["markerunits","markerUnits"],["markerwidth","markerWidth"],["maskcontentunits","maskContentUnits"],["maskunits","maskUnits"],["numoctaves","numOctaves"],["pathlength","pathLength"],["patterncontentunits","patternContentUnits"],["patterntransform","patternTransform"],["patternunits","patternUnits"],["pointsatx","pointsAtX"],["pointsaty","pointsAtY"],["pointsatz","pointsAtZ"],["preservealpha","preserveAlpha"],["preserveaspectratio","preserveAspectRatio"],["primitiveunits","primitiveUnits"],["refx","refX"],["refy","refY"],["repeatcount","repeatCount"],["repeatdur","repeatDur"],["requiredextensions","requiredExtensions"],["requiredfeatures","requiredFeatures"],["specularconstant","specularConstant"],["specularexponent","specularExponent"],["spreadmethod","spreadMethod"],["startoffset","startOffset"],["stddeviation","stdDeviation"],["stitchtiles","stitchTiles"],["surfacescale","surfaceScale"],["systemlanguage","systemLanguage"],["tablevalues","tableValues"],["targetx","targetX"],["targety","targetY"],["textlength","textLength"],["viewbox","viewBox"],["viewtarget","viewTarget"],["xchannelselector","xChannelSelector"],["ychannelselector","yChannelSelector"],["zoomandpan","zoomAndPan"]])},4614:function(e,r,t){"use strict";var a=this&&this.__assign||function(){a=Object.assign||function(e){for(var r,t=1,a=arguments.length;t0){n+=render(e.children,r)}if(r.xmlMode||!p.has(e.name)){n+=""}}return n}function renderDirective(e){return"<"+e.data+">"}function renderText(e,r){var t=e.data||"";if(r.decodeEntities!==false&&!(!r.xmlMode&&e.parent&&c.has(e.parent.name))){t=u.encodeXML(t)}return t}function renderCdata(e){return""}function renderComment(e){return"\x3c!--"+e.data+"--\x3e"}},9391:function(e,r){"use strict";Object.defineProperty(r,"__esModule",{value:true});r.Doctype=r.CDATA=r.Tag=r.Style=r.Script=r.Comment=r.Directive=r.Text=r.Root=r.isTag=r.ElementType=void 0;var t;(function(e){e["Root"]="root";e["Text"]="text";e["Directive"]="directive";e["Comment"]="comment";e["Script"]="script";e["Style"]="style";e["Tag"]="tag";e["CDATA"]="cdata";e["Doctype"]="doctype"})(t=r.ElementType||(r.ElementType={}));function isTag(e){return e.type===t.Tag||e.type===t.Script||e.type===t.Style}r.isTag=isTag;r.Root=t.Root;r.Text=t.Text;r.Directive=t.Directive;r.Comment=t.Comment;r.Script=t.Script;r.Style=t.Style;r.Tag=t.Tag;r.CDATA=t.CDATA;r.Doctype=t.Doctype},2472:function(e,r,t){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,r,t,a){if(a===undefined)a=t;var n=Object.getOwnPropertyDescriptor(r,t);if(!n||("get"in n?!r.__esModule:n.writable||n.configurable)){n={enumerable:true,get:function(){return r[t]}}}Object.defineProperty(e,a,n)}:function(e,r,t,a){if(a===undefined)a=t;e[a]=r[t]});var n=this&&this.__exportStar||function(e,r){for(var t in e)if(t!=="default"&&!Object.prototype.hasOwnProperty.call(r,t))a(r,e,t)};Object.defineProperty(r,"__esModule",{value:true});r.DomHandler=void 0;var i=t(9391);var o=t(1508);n(t(1508),r);var s=/\s+/g;var u={normalizeWhitespace:false,withStartIndices:false,withEndIndices:false,xmlMode:false};var l=function(){function DomHandler(e,r,t){this.dom=[];this.root=new o.Document(this.dom);this.done=false;this.tagStack=[this.root];this.lastNode=null;this.parser=null;if(typeof r==="function"){t=r;r=u}if(typeof e==="object"){r=e;e=undefined}this.callback=e!==null&&e!==void 0?e:null;this.options=r!==null&&r!==void 0?r:u;this.elementCB=t!==null&&t!==void 0?t:null}DomHandler.prototype.onparserinit=function(e){this.parser=e};DomHandler.prototype.onreset=function(){this.dom=[];this.root=new o.Document(this.dom);this.done=false;this.tagStack=[this.root];this.lastNode=null;this.parser=null};DomHandler.prototype.onend=function(){if(this.done)return;this.done=true;this.parser=null;this.handleCallback(null)};DomHandler.prototype.onerror=function(e){this.handleCallback(e)};DomHandler.prototype.onclosetag=function(){this.lastNode=null;var e=this.tagStack.pop();if(this.options.withEndIndices){e.endIndex=this.parser.endIndex}if(this.elementCB)this.elementCB(e)};DomHandler.prototype.onopentag=function(e,r){var t=this.options.xmlMode?i.ElementType.Tag:undefined;var a=new o.Element(e,r,undefined,t);this.addNode(a);this.tagStack.push(a)};DomHandler.prototype.ontext=function(e){var r=this.options.normalizeWhitespace;var t=this.lastNode;if(t&&t.type===i.ElementType.Text){if(r){t.data=(t.data+e).replace(s," ")}else{t.data+=e}if(this.options.withEndIndices){t.endIndex=this.parser.endIndex}}else{if(r){e=e.replace(s," ")}var a=new o.Text(e);this.addNode(a);this.lastNode=a}};DomHandler.prototype.oncomment=function(e){if(this.lastNode&&this.lastNode.type===i.ElementType.Comment){this.lastNode.data+=e;return}var r=new o.Comment(e);this.addNode(r);this.lastNode=r};DomHandler.prototype.oncommentend=function(){this.lastNode=null};DomHandler.prototype.oncdatastart=function(){var e=new o.Text("");var r=new o.NodeWithChildren(i.ElementType.CDATA,[e]);this.addNode(r);e.parent=r;this.lastNode=e};DomHandler.prototype.oncdataend=function(){this.lastNode=null};DomHandler.prototype.onprocessinginstruction=function(e,r){var t=new o.ProcessingInstruction(e,r);this.addNode(t)};DomHandler.prototype.handleCallback=function(e){if(typeof this.callback==="function"){this.callback(e,this.dom)}else if(e){throw e}};DomHandler.prototype.addNode=function(e){var r=this.tagStack[this.tagStack.length-1];var t=r.children[r.children.length-1];if(this.options.withStartIndices){e.startIndex=this.parser.startIndex}if(this.options.withEndIndices){e.endIndex=this.parser.endIndex}r.children.push(e);if(t){e.prev=t;t.next=e}e.parent=r;this.lastNode=null};return DomHandler}();r.DomHandler=l;r["default"]=l},1508:function(e,r,t){"use strict";var a=this&&this.__extends||function(){var extendStatics=function(e,r){extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var t in r)if(Object.prototype.hasOwnProperty.call(r,t))e[t]=r[t]};return extendStatics(e,r)};return function(e,r){if(typeof r!=="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");extendStatics(e,r);function __(){this.constructor=e}e.prototype=r===null?Object.create(r):(__.prototype=r.prototype,new __)}}();var n=this&&this.__assign||function(){n=Object.assign||function(e){for(var r,t=1,a=arguments.length;t0?this.children[this.children.length-1]:null},enumerable:false,configurable:true});Object.defineProperty(NodeWithChildren.prototype,"childNodes",{get:function(){return this.children},set:function(e){this.children=e},enumerable:false,configurable:true});return NodeWithChildren}(s);r.NodeWithChildren=d;var f=function(e){a(Document,e);function Document(r){return e.call(this,i.ElementType.Root,r)||this}return Document}(d);r.Document=f;var g=function(e){a(Element,e);function Element(r,t,a,n){if(a===void 0){a=[]}if(n===void 0){n=r==="script"?i.ElementType.Script:r==="style"?i.ElementType.Style:i.ElementType.Tag}var o=e.call(this,n,a)||this;o.name=r;o.attribs=t;return o}Object.defineProperty(Element.prototype,"tagName",{get:function(){return this.name},set:function(e){this.name=e},enumerable:false,configurable:true});Object.defineProperty(Element.prototype,"attributes",{get:function(){var e=this;return Object.keys(this.attribs).map((function(r){var t,a;return{name:r,value:e.attribs[r],namespace:(t=e["x-attribsNamespace"])===null||t===void 0?void 0:t[r],prefix:(a=e["x-attribsPrefix"])===null||a===void 0?void 0:a[r]}}))},enumerable:false,configurable:true});return Element}(d);r.Element=g;function isTag(e){return(0,i.isTag)(e)}r.isTag=isTag;function isCDATA(e){return e.type===i.ElementType.CDATA}r.isCDATA=isCDATA;function isText(e){return e.type===i.ElementType.Text}r.isText=isText;function isComment(e){return e.type===i.ElementType.Comment}r.isComment=isComment;function isDirective(e){return e.type===i.ElementType.Directive}r.isDirective=isDirective;function isDocument(e){return e.type===i.ElementType.Root}r.isDocument=isDocument;function hasChildren(e){return Object.prototype.hasOwnProperty.call(e,"children")}r.hasChildren=hasChildren;function cloneNode(e,r){if(r===void 0){r=false}var t;if(isText(e)){t=new l(e.data)}else if(isComment(e)){t=new c(e.data)}else if(isTag(e)){var a=r?cloneChildren(e.children):[];var o=new g(e.name,n({},e.attribs),a);a.forEach((function(e){return e.parent=o}));if(e.namespace!=null){o.namespace=e.namespace}if(e["x-attribsNamespace"]){o["x-attribsNamespace"]=n({},e["x-attribsNamespace"])}if(e["x-attribsPrefix"]){o["x-attribsPrefix"]=n({},e["x-attribsPrefix"])}t=o}else if(isCDATA(e)){var a=r?cloneChildren(e.children):[];var s=new d(i.ElementType.CDATA,a);a.forEach((function(e){return e.parent=s}));t=s}else if(isDocument(e)){var a=r?cloneChildren(e.children):[];var u=new f(a);a.forEach((function(e){return e.parent=u}));if(e["x-mode"]){u["x-mode"]=e["x-mode"]}t=u}else if(isDirective(e)){var h=new p(e.name,e.data);if(e["x-name"]!=null){h["x-name"]=e["x-name"];h["x-publicId"]=e["x-publicId"];h["x-systemId"]=e["x-systemId"]}t=h}else{throw new Error("Not implemented yet: ".concat(e.type))}t.startIndex=e.startIndex;t.endIndex=e.endIndex;if(e.sourceCodeLocation!=null){t.sourceCodeLocation=e.sourceCodeLocation}return t}r.cloneNode=cloneNode;function cloneChildren(e){var r=e.map((function(e){return cloneNode(e,true)}));for(var t=1;t=0){var t=e[r];if(r>0&&e.lastIndexOf(t,r-1)>=0){e.splice(r,1);continue}for(var a=t.parent;a;a=a.parent){if(e.includes(a)){e.splice(r,1);break}}}return e}r.removeSubsets=removeSubsets;function compareDocumentPosition(e,r){var t=[];var n=[];if(e===r){return 0}var i=(0,a.hasChildren)(e)?e:e.parent;while(i){t.unshift(i);i=i.parent}i=(0,a.hasChildren)(r)?r:r.parent;while(i){n.unshift(i);i=i.parent}var o=Math.min(t.length,n.length);var s=0;while(sl.indexOf(p)){if(u===r){return 4|16}return 4}if(u===e){return 2|8}return 2}r.compareDocumentPosition=compareDocumentPosition;function uniqueSort(e){e=e.filter((function(e,r,t){return!t.includes(e,r+1)}));e.sort((function(e,r){var t=compareDocumentPosition(e,r);if(t&2){return-1}else if(t&4){return 1}return 0}));return e}r.uniqueSort=uniqueSort},5861:function(e,r,t){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,r,t,a){if(a===undefined)a=t;Object.defineProperty(e,a,{enumerable:true,get:function(){return r[t]}})}:function(e,r,t,a){if(a===undefined)a=t;e[a]=r[t]});var n=this&&this.__exportStar||function(e,r){for(var t in e)if(t!=="default"&&!Object.prototype.hasOwnProperty.call(r,t))a(r,e,t)};Object.defineProperty(r,"__esModule",{value:true});r.hasChildren=r.isDocument=r.isComment=r.isText=r.isCDATA=r.isTag=void 0;n(t(3930),r);n(t(8298),r);n(t(1655),r);n(t(8929),r);n(t(7102),r);n(t(5509),r);n(t(3442),r);var i=t(2472);Object.defineProperty(r,"isTag",{enumerable:true,get:function(){return i.isTag}});Object.defineProperty(r,"isCDATA",{enumerable:true,get:function(){return i.isCDATA}});Object.defineProperty(r,"isText",{enumerable:true,get:function(){return i.isText}});Object.defineProperty(r,"isComment",{enumerable:true,get:function(){return i.isComment}});Object.defineProperty(r,"isDocument",{enumerable:true,get:function(){return i.isDocument}});Object.defineProperty(r,"hasChildren",{enumerable:true,get:function(){return i.hasChildren}})},7102:function(e,r,t){"use strict";Object.defineProperty(r,"__esModule",{value:true});r.getElementsByTagType=r.getElementsByTagName=r.getElementById=r.getElements=r.testElement=void 0;var a=t(2472);var n=t(8929);var i={tag_name:function(e){if(typeof e==="function"){return function(r){return(0,a.isTag)(r)&&e(r.name)}}else if(e==="*"){return a.isTag}return function(r){return(0,a.isTag)(r)&&r.name===e}},tag_type:function(e){if(typeof e==="function"){return function(r){return e(r.type)}}return function(r){return r.type===e}},tag_contains:function(e){if(typeof e==="function"){return function(r){return(0,a.isText)(r)&&e(r.data)}}return function(r){return(0,a.isText)(r)&&r.data===e}}};function getAttribCheck(e,r){if(typeof r==="function"){return function(t){return(0,a.isTag)(t)&&r(t.attribs[e])}}return function(t){return(0,a.isTag)(t)&&t.attribs[e]===r}}function combineFuncs(e,r){return function(t){return e(t)||r(t)}}function compileTest(e){var r=Object.keys(e).map((function(r){var t=e[r];return Object.prototype.hasOwnProperty.call(i,r)?i[r](t):getAttribCheck(r,t)}));return r.length===0?null:r.reduce(combineFuncs)}function testElement(e,r){var t=compileTest(e);return t?t(r):true}r.testElement=testElement;function getElements(e,r,t,a){if(a===void 0){a=Infinity}var i=compileTest(e);return i?(0,n.filter)(i,r,t,a):[]}r.getElements=getElements;function getElementById(e,r,t){if(t===void 0){t=true}if(!Array.isArray(r))r=[r];return(0,n.findOne)(getAttribCheck("id",e),r,t)}r.getElementById=getElementById;function getElementsByTagName(e,r,t,a){if(t===void 0){t=true}if(a===void 0){a=Infinity}return(0,n.filter)(i.tag_name(e),r,t,a)}r.getElementsByTagName=getElementsByTagName;function getElementsByTagType(e,r,t,a){if(t===void 0){t=true}if(a===void 0){a=Infinity}return(0,n.filter)(i.tag_type(e),r,t,a)}r.getElementsByTagType=getElementsByTagType},1655:function(e,r){"use strict";Object.defineProperty(r,"__esModule",{value:true});r.prepend=r.prependChild=r.append=r.appendChild=r.replaceElement=r.removeElement=void 0;function removeElement(e){if(e.prev)e.prev.next=e.next;if(e.next)e.next.prev=e.prev;if(e.parent){var r=e.parent.children;r.splice(r.lastIndexOf(e),1)}}r.removeElement=removeElement;function replaceElement(e,r){var t=r.prev=e.prev;if(t){t.next=r}var a=r.next=e.next;if(a){a.prev=r}var n=r.parent=e.parent;if(n){var i=n.children;i[i.lastIndexOf(e)]=r}}r.replaceElement=replaceElement;function appendChild(e,r){removeElement(r);r.next=null;r.parent=e;if(e.children.push(r)>1){var t=e.children[e.children.length-2];t.next=r;r.prev=t}else{r.prev=null}}r.appendChild=appendChild;function append(e,r){removeElement(r);var t=e.parent;var a=e.next;r.next=a;r.prev=e;e.next=r;r.parent=t;if(a){a.prev=r;if(t){var n=t.children;n.splice(n.lastIndexOf(a),0,r)}}else if(t){t.children.push(r)}}r.append=append;function prependChild(e,r){removeElement(r);r.parent=e;r.prev=null;if(e.children.unshift(r)!==1){var t=e.children[1];t.prev=r;r.next=t}else{r.next=null}}r.prependChild=prependChild;function prepend(e,r){removeElement(r);var t=e.parent;if(t){var a=t.children;a.splice(a.indexOf(e),0,r)}if(e.prev){e.prev.next=r}r.parent=t;r.prev=e.prev;r.next=e;e.prev=r}r.prepend=prepend},8929:function(e,r,t){"use strict";Object.defineProperty(r,"__esModule",{value:true});r.findAll=r.existsOne=r.findOne=r.findOneChild=r.find=r.filter=void 0;var a=t(2472);function filter(e,r,t,a){if(t===void 0){t=true}if(a===void 0){a=Infinity}if(!Array.isArray(r))r=[r];return find(e,r,t,a)}r.filter=filter;function find(e,r,t,n){var i=[];for(var o=0,s=r;o0){var l=find(e,u.children,t,n);i.push.apply(i,l);n-=l.length;if(n<=0)break}}return i}r.find=find;function findOneChild(e,r){return r.find(e)}r.findOneChild=findOneChild;function findOne(e,r,t){if(t===void 0){t=true}var n=null;for(var i=0;i0){n=findOne(e,o.children)}}return n}r.findOne=findOne;function existsOne(e,r){return r.some((function(r){return(0,a.isTag)(r)&&(e(r)||r.children.length>0&&existsOne(e,r.children))}))}r.existsOne=existsOne;function findAll(e,r){var t;var n=[];var i=r.filter(a.isTag);var o;while(o=i.shift()){var s=(t=o.children)===null||t===void 0?void 0:t.filter(a.isTag);if(s&&s.length>0){i.unshift.apply(i,s)}if(e(o))n.push(o)}return n}r.findAll=findAll},3930:function(e,r,t){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:true});r.innerText=r.textContent=r.getText=r.getInnerHTML=r.getOuterHTML=void 0;var n=t(2472);var i=a(t(4614));var o=t(9391);function getOuterHTML(e,r){return(0,i.default)(e,r)}r.getOuterHTML=getOuterHTML;function getInnerHTML(e,r){return(0,n.hasChildren)(e)?e.children.map((function(e){return getOuterHTML(e,r)})).join(""):""}r.getInnerHTML=getInnerHTML;function getText(e){if(Array.isArray(e))return e.map(getText).join("");if((0,n.isTag)(e))return e.name==="br"?"\n":getText(e.children);if((0,n.isCDATA)(e))return getText(e.children);if((0,n.isText)(e))return e.data;return""}r.getText=getText;function textContent(e){if(Array.isArray(e))return e.map(textContent).join("");if((0,n.hasChildren)(e)&&!(0,n.isComment)(e)){return textContent(e.children)}if((0,n.isText)(e))return e.data;return""}r.textContent=textContent;function innerText(e){if(Array.isArray(e))return e.map(innerText).join("");if((0,n.hasChildren)(e)&&(e.type===o.ElementType.Tag||(0,n.isCDATA)(e))){return innerText(e.children)}if((0,n.isText)(e))return e.data;return""}r.innerText=innerText},8298:function(e,r,t){"use strict";Object.defineProperty(r,"__esModule",{value:true});r.prevElementSibling=r.nextElementSibling=r.getName=r.hasAttrib=r.getAttributeValue=r.getSiblings=r.getParent=r.getChildren=void 0;var a=t(2472);var n=[];function getChildren(e){var r;return(r=e.children)!==null&&r!==void 0?r:n}r.getChildren=getChildren;function getParent(e){return e.parent||null}r.getParent=getParent;function getSiblings(e){var r,t;var a=getParent(e);if(a!=null)return getChildren(a);var n=[e];var i=e.prev,o=e.next;while(i!=null){n.unshift(i);r=i,i=r.prev}while(o!=null){n.push(o);t=o,o=t.next}return n}r.getSiblings=getSiblings;function getAttributeValue(e,r){var t;return(t=e.attribs)===null||t===void 0?void 0:t[r]}r.getAttributeValue=getAttributeValue;function hasAttrib(e,r){return e.attribs!=null&&Object.prototype.hasOwnProperty.call(e.attribs,r)&&e.attribs[r]!=null}r.hasAttrib=hasAttrib;function getName(e){return e.name}r.getName=getName;function nextElementSibling(e){var r;var t=e.next;while(t!==null&&!(0,a.isTag)(t))r=t,t=r.next;return t}r.nextElementSibling=nextElementSibling;function prevElementSibling(e){var r;var t=e.prev;while(t!==null&&!(0,a.isTag)(t))r=t,t=r.prev;return t}r.prevElementSibling=prevElementSibling},6674:function(e,r,t){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:true});var n=a(t(1859));var i=a(t(2128));var o=a(t(4931));var s=a(t(9281));r.decodeXML=getStrictDecoder(o.default);r.decodeHTMLStrict=getStrictDecoder(n.default);function getStrictDecoder(e){var r=Object.keys(e).join("|");var t=getReplacer(e);r+="|#[xX][\\da-fA-F]+|#\\d+";var a=new RegExp("&(?:"+r+");","g");return function(e){return String(e).replace(a,t)}}var sorter=function(e,r){return e=55296&&e<=57343||e>1114111){return"๏ฟฝ"}if(e in n.default){e=n.default[e]}var r="";if(e>65535){e-=65536;r+=String.fromCharCode(e>>>10&1023|55296);e=56320|e&1023}r+=String.fromCharCode(e);return r}r["default"]=decodeCodePoint},6032:function(e,r,t){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:true});var n=a(t(4931));var i=getInverseObj(n.default);var o=getInverseReplacer(i);r.encodeXML=getInverse(i,o);var s=a(t(1859));var u=getInverseObj(s.default);var l=getInverseReplacer(u);r.encodeHTML=getInverse(u,l);function getInverseObj(e){return Object.keys(e).sort().reduce((function(r,t){r[e[t]]="&"+t+";";return r}),{})}function getInverseReplacer(e){var r=[];var t=[];Object.keys(e).forEach((function(e){return e.length===1?r.push("\\"+e):t.push(e)}));t.unshift("["+r.join("")+"]");return new RegExp(t.join("|"),"g")}var c=/[^\0-\x7F]/g;var p=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g;function singleCharReplacer(e){return"&#x"+e.charCodeAt(0).toString(16).toUpperCase()+";"}function astralReplacer(e,r){var t=e.charCodeAt(0);var a=e.charCodeAt(1);var n=(t-55296)*1024+a-56320+65536;return"&#x"+n.toString(16).toUpperCase()+";"}function getInverse(e,r){return function(t){return t.replace(r,(function(r){return e[r]})).replace(p,astralReplacer).replace(c,singleCharReplacer)}}var d=getInverseReplacer(i);function escape(e){return e.replace(d,singleCharReplacer).replace(p,astralReplacer).replace(c,singleCharReplacer)}r.escape=escape},9280:function(e,r,t){"use strict";Object.defineProperty(r,"__esModule",{value:true});var a=t(6674);var n=t(6032);function decode(e,r){return(!r||r<=0?a.decodeXML:a.decodeHTML)(e)}r.decode=decode;function decodeStrict(e,r){return(!r||r<=0?a.decodeXML:a.decodeHTMLStrict)(e)}r.decodeStrict=decodeStrict;function encode(e,r){return(!r||r<=0?n.encodeXML:n.encodeHTML)(e)}r.encode=encode;var i=t(6032);r.encodeXML=i.encodeXML;r.encodeHTML=i.encodeHTML;r.escape=i.escape;r.encodeHTML4=i.encodeHTML;r.encodeHTML5=i.encodeHTML;var o=t(6674);r.decodeXML=o.decodeXML;r.decodeHTML=o.decodeHTML;r.decodeHTMLStrict=o.decodeHTMLStrict;r.decodeHTML4=o.decodeHTML;r.decodeHTML5=o.decodeHTML;r.decodeHTML4Strict=o.decodeHTMLStrict;r.decodeHTML5Strict=o.decodeHTMLStrict;r.decodeXMLStrict=o.decodeXML},5902:function(e,r,t){e=t.nmd(e); -/*! https://mths.be/he v1.2.0 by @mathias | MIT license */(function(t){var a=true&&r;var n=true&&e&&e.exports==a&&e;var i=typeof global=="object"&&global;if(i.global===i||i.window===i){t=i}var o=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g;var s=/[\x01-\x7F]/g;var u=/[\x01-\t\x0B\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g;var l=/<\u20D2|=\u20E5|>\u20D2|\u205F\u200A|\u219D\u0338|\u2202\u0338|\u2220\u20D2|\u2229\uFE00|\u222A\uFE00|\u223C\u20D2|\u223D\u0331|\u223E\u0333|\u2242\u0338|\u224B\u0338|\u224D\u20D2|\u224E\u0338|\u224F\u0338|\u2250\u0338|\u2261\u20E5|\u2264\u20D2|\u2265\u20D2|\u2266\u0338|\u2267\u0338|\u2268\uFE00|\u2269\uFE00|\u226A\u0338|\u226A\u20D2|\u226B\u0338|\u226B\u20D2|\u227F\u0338|\u2282\u20D2|\u2283\u20D2|\u228A\uFE00|\u228B\uFE00|\u228F\u0338|\u2290\u0338|\u2293\uFE00|\u2294\uFE00|\u22B4\u20D2|\u22B5\u20D2|\u22D8\u0338|\u22D9\u0338|\u22DA\uFE00|\u22DB\uFE00|\u22F5\u0338|\u22F9\u0338|\u2933\u0338|\u29CF\u0338|\u29D0\u0338|\u2A6D\u0338|\u2A70\u0338|\u2A7D\u0338|\u2A7E\u0338|\u2AA1\u0338|\u2AA2\u0338|\u2AAC\uFE00|\u2AAD\uFE00|\u2AAF\u0338|\u2AB0\u0338|\u2AC5\u0338|\u2AC6\u0338|\u2ACB\uFE00|\u2ACC\uFE00|\u2AFD\u20E5|[\xA0-\u0113\u0116-\u0122\u0124-\u012B\u012E-\u014D\u0150-\u017E\u0192\u01B5\u01F5\u0237\u02C6\u02C7\u02D8-\u02DD\u0311\u0391-\u03A1\u03A3-\u03A9\u03B1-\u03C9\u03D1\u03D2\u03D5\u03D6\u03DC\u03DD\u03F0\u03F1\u03F5\u03F6\u0401-\u040C\u040E-\u044F\u0451-\u045C\u045E\u045F\u2002-\u2005\u2007-\u2010\u2013-\u2016\u2018-\u201A\u201C-\u201E\u2020-\u2022\u2025\u2026\u2030-\u2035\u2039\u203A\u203E\u2041\u2043\u2044\u204F\u2057\u205F-\u2063\u20AC\u20DB\u20DC\u2102\u2105\u210A-\u2113\u2115-\u211E\u2122\u2124\u2127-\u2129\u212C\u212D\u212F-\u2131\u2133-\u2138\u2145-\u2148\u2153-\u215E\u2190-\u219B\u219D-\u21A7\u21A9-\u21AE\u21B0-\u21B3\u21B5-\u21B7\u21BA-\u21DB\u21DD\u21E4\u21E5\u21F5\u21FD-\u2205\u2207-\u2209\u220B\u220C\u220F-\u2214\u2216-\u2218\u221A\u221D-\u2238\u223A-\u2257\u2259\u225A\u225C\u225F-\u2262\u2264-\u228B\u228D-\u229B\u229D-\u22A5\u22A7-\u22B0\u22B2-\u22BB\u22BD-\u22DB\u22DE-\u22E3\u22E6-\u22F7\u22F9-\u22FE\u2305\u2306\u2308-\u2310\u2312\u2313\u2315\u2316\u231C-\u231F\u2322\u2323\u232D\u232E\u2336\u233D\u233F\u237C\u23B0\u23B1\u23B4-\u23B6\u23DC-\u23DF\u23E2\u23E7\u2423\u24C8\u2500\u2502\u250C\u2510\u2514\u2518\u251C\u2524\u252C\u2534\u253C\u2550-\u256C\u2580\u2584\u2588\u2591-\u2593\u25A1\u25AA\u25AB\u25AD\u25AE\u25B1\u25B3-\u25B5\u25B8\u25B9\u25BD-\u25BF\u25C2\u25C3\u25CA\u25CB\u25EC\u25EF\u25F8-\u25FC\u2605\u2606\u260E\u2640\u2642\u2660\u2663\u2665\u2666\u266A\u266D-\u266F\u2713\u2717\u2720\u2736\u2758\u2772\u2773\u27C8\u27C9\u27E6-\u27ED\u27F5-\u27FA\u27FC\u27FF\u2902-\u2905\u290C-\u2913\u2916\u2919-\u2920\u2923-\u292A\u2933\u2935-\u2939\u293C\u293D\u2945\u2948-\u294B\u294E-\u2976\u2978\u2979\u297B-\u297F\u2985\u2986\u298B-\u2996\u299A\u299C\u299D\u29A4-\u29B7\u29B9\u29BB\u29BC\u29BE-\u29C5\u29C9\u29CD-\u29D0\u29DC-\u29DE\u29E3-\u29E5\u29EB\u29F4\u29F6\u2A00-\u2A02\u2A04\u2A06\u2A0C\u2A0D\u2A10-\u2A17\u2A22-\u2A27\u2A29\u2A2A\u2A2D-\u2A31\u2A33-\u2A3C\u2A3F\u2A40\u2A42-\u2A4D\u2A50\u2A53-\u2A58\u2A5A-\u2A5D\u2A5F\u2A66\u2A6A\u2A6D-\u2A75\u2A77-\u2A9A\u2A9D-\u2AA2\u2AA4-\u2AB0\u2AB3-\u2AC8\u2ACB\u2ACC\u2ACF-\u2ADB\u2AE4\u2AE6-\u2AE9\u2AEB-\u2AF3\u2AFD\uFB00-\uFB04]|\uD835[\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDCCF\uDD04\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDD6B]/g;var c={"ยญ":"shy","โ€Œ":"zwnj","โ€":"zwj","โ€Ž":"lrm","โฃ":"ic","โข":"it","โก":"af","โ€":"rlm","โ€‹":"ZeroWidthSpace","โ ":"NoBreak","ฬ‘":"DownBreve","โƒ›":"tdot","โƒœ":"DotDot","\t":"Tab","\n":"NewLine","โ€ˆ":"puncsp","โŸ":"MediumSpace","โ€‰":"thinsp","โ€Š":"hairsp","โ€„":"emsp13","โ€‚":"ensp","โ€…":"emsp14","โ€ƒ":"emsp","โ€‡":"numsp","ย ":"nbsp","โŸโ€Š":"ThickSpace","โ€พ":"oline",_:"lowbar","โ€":"dash","โ€“":"ndash","โ€”":"mdash","โ€•":"horbar",",":"comma",";":"semi","โ":"bsemi",":":"colon","โฉด":"Colone","!":"excl","ยก":"iexcl","?":"quest","ยฟ":"iquest",".":"period","โ€ฅ":"nldr","โ€ฆ":"mldr","ยท":"middot","'":"apos","โ€˜":"lsquo","โ€™":"rsquo","โ€š":"sbquo","โ€น":"lsaquo","โ€บ":"rsaquo",'"':"quot","โ€œ":"ldquo","โ€":"rdquo","โ€ž":"bdquo","ยซ":"laquo","ยป":"raquo","(":"lpar",")":"rpar","[":"lsqb","]":"rsqb","{":"lcub","}":"rcub","โŒˆ":"lceil","โŒ‰":"rceil","โŒŠ":"lfloor","โŒ‹":"rfloor","โฆ…":"lopar","โฆ†":"ropar","โฆ‹":"lbrke","โฆŒ":"rbrke","โฆ":"lbrkslu","โฆŽ":"rbrksld","โฆ":"lbrksld","โฆ":"rbrkslu","โฆ‘":"langd","โฆ’":"rangd","โฆ“":"lparlt","โฆ”":"rpargt","โฆ•":"gtlPar","โฆ–":"ltrPar","โŸฆ":"lobrk","โŸง":"robrk","โŸจ":"lang","โŸฉ":"rang","โŸช":"Lang","โŸซ":"Rang","โŸฌ":"loang","โŸญ":"roang","โฒ":"lbbrk","โณ":"rbbrk","โ€–":"Vert","ยง":"sect","ยถ":"para","@":"commat","*":"ast","/":"sol",undefined:null,"&":"amp","#":"num","%":"percnt","โ€ฐ":"permil","โ€ฑ":"pertenk","โ€ ":"dagger","โ€ก":"Dagger","โ€ข":"bull","โƒ":"hybull","โ€ฒ":"prime","โ€ณ":"Prime","โ€ด":"tprime","โ—":"qprime","โ€ต":"bprime","โ":"caret","`":"grave","ยด":"acute","หœ":"tilde","^":"Hat","ยฏ":"macr","ห˜":"breve","ห™":"dot","ยจ":"die","หš":"ring","ห":"dblac","ยธ":"cedil","ห›":"ogon","ห†":"circ","ห‡":"caron","ยฐ":"deg","ยฉ":"copy","ยฎ":"reg","โ„—":"copysr","โ„˜":"wp","โ„ž":"rx","โ„ง":"mho","โ„ฉ":"iiota","โ†":"larr","โ†š":"nlarr","โ†’":"rarr","โ†›":"nrarr","โ†‘":"uarr","โ†“":"darr","โ†”":"harr","โ†ฎ":"nharr","โ†•":"varr","โ†–":"nwarr","โ†—":"nearr","โ†˜":"searr","โ†™":"swarr","โ†":"rarrw","โ†ฬธ":"nrarrw","โ†ž":"Larr","โ†Ÿ":"Uarr","โ† ":"Rarr","โ†ก":"Darr","โ†ข":"larrtl","โ†ฃ":"rarrtl","โ†ค":"mapstoleft","โ†ฅ":"mapstoup","โ†ฆ":"map","โ†ง":"mapstodown","โ†ฉ":"larrhk","โ†ช":"rarrhk","โ†ซ":"larrlp","โ†ฌ":"rarrlp","โ†ญ":"harrw","โ†ฐ":"lsh","โ†ฑ":"rsh","โ†ฒ":"ldsh","โ†ณ":"rdsh","โ†ต":"crarr","โ†ถ":"cularr","โ†ท":"curarr","โ†บ":"olarr","โ†ป":"orarr","โ†ผ":"lharu","โ†ฝ":"lhard","โ†พ":"uharr","โ†ฟ":"uharl","โ‡€":"rharu","โ‡":"rhard","โ‡‚":"dharr","โ‡ƒ":"dharl","โ‡„":"rlarr","โ‡…":"udarr","โ‡†":"lrarr","โ‡‡":"llarr","โ‡ˆ":"uuarr","โ‡‰":"rrarr","โ‡Š":"ddarr","โ‡‹":"lrhar","โ‡Œ":"rlhar","โ‡":"lArr","โ‡":"nlArr","โ‡‘":"uArr","โ‡’":"rArr","โ‡":"nrArr","โ‡“":"dArr","โ‡”":"iff","โ‡Ž":"nhArr","โ‡•":"vArr","โ‡–":"nwArr","โ‡—":"neArr","โ‡˜":"seArr","โ‡™":"swArr","โ‡š":"lAarr","โ‡›":"rAarr","โ‡":"zigrarr","โ‡ค":"larrb","โ‡ฅ":"rarrb","โ‡ต":"duarr","โ‡ฝ":"loarr","โ‡พ":"roarr","โ‡ฟ":"hoarr","โˆ€":"forall","โˆ":"comp","โˆ‚":"part","โˆ‚ฬธ":"npart","โˆƒ":"exist","โˆ„":"nexist","โˆ…":"empty","โˆ‡":"Del","โˆˆ":"in","โˆ‰":"notin","โˆ‹":"ni","โˆŒ":"notni","ฯถ":"bepsi","โˆ":"prod","โˆ":"coprod","โˆ‘":"sum","+":"plus","ยฑ":"pm","รท":"div","ร—":"times","<":"lt","โ‰ฎ":"nlt","<โƒ’":"nvlt","=":"equals","โ‰ ":"ne","=โƒฅ":"bne","โฉต":"Equal",">":"gt","โ‰ฏ":"ngt",">โƒ’":"nvgt","ยฌ":"not","|":"vert","ยฆ":"brvbar","โˆ’":"minus","โˆ“":"mp","โˆ”":"plusdo","โ„":"frasl","โˆ–":"setmn","โˆ—":"lowast","โˆ˜":"compfn","โˆš":"Sqrt","โˆ":"prop","โˆž":"infin","โˆŸ":"angrt","โˆ ":"ang","โˆ โƒ’":"nang","โˆก":"angmsd","โˆข":"angsph","โˆฃ":"mid","โˆค":"nmid","โˆฅ":"par","โˆฆ":"npar","โˆง":"and","โˆจ":"or","โˆฉ":"cap","โˆฉ๏ธ€":"caps","โˆช":"cup","โˆช๏ธ€":"cups","โˆซ":"int","โˆฌ":"Int","โˆญ":"tint","โจŒ":"qint","โˆฎ":"oint","โˆฏ":"Conint","โˆฐ":"Cconint","โˆฑ":"cwint","โˆฒ":"cwconint","โˆณ":"awconint","โˆด":"there4","โˆต":"becaus","โˆถ":"ratio","โˆท":"Colon","โˆธ":"minusd","โˆบ":"mDDot","โˆป":"homtht","โˆผ":"sim","โ‰":"nsim","โˆผโƒ’":"nvsim","โˆฝ":"bsim","โˆฝฬฑ":"race","โˆพ":"ac","โˆพฬณ":"acE","โˆฟ":"acd","โ‰€":"wr","โ‰‚":"esim","โ‰‚ฬธ":"nesim","โ‰ƒ":"sime","โ‰„":"nsime","โ‰…":"cong","โ‰‡":"ncong","โ‰†":"simne","โ‰ˆ":"ap","โ‰‰":"nap","โ‰Š":"ape","โ‰‹":"apid","โ‰‹ฬธ":"napid","โ‰Œ":"bcong","โ‰":"CupCap","โ‰ญ":"NotCupCap","โ‰โƒ’":"nvap","โ‰Ž":"bump","โ‰Žฬธ":"nbump","โ‰":"bumpe","โ‰ฬธ":"nbumpe","โ‰":"doteq","โ‰ฬธ":"nedot","โ‰‘":"eDot","โ‰’":"efDot","โ‰“":"erDot","โ‰”":"colone","โ‰•":"ecolon","โ‰–":"ecir","โ‰—":"cire","โ‰™":"wedgeq","โ‰š":"veeeq","โ‰œ":"trie","โ‰Ÿ":"equest","โ‰ก":"equiv","โ‰ข":"nequiv","โ‰กโƒฅ":"bnequiv","โ‰ค":"le","โ‰ฐ":"nle","โ‰คโƒ’":"nvle","โ‰ฅ":"ge","โ‰ฑ":"nge","โ‰ฅโƒ’":"nvge","โ‰ฆ":"lE","โ‰ฆฬธ":"nlE","โ‰ง":"gE","โ‰งฬธ":"ngE","โ‰จ๏ธ€":"lvnE","โ‰จ":"lnE","โ‰ฉ":"gnE","โ‰ฉ๏ธ€":"gvnE","โ‰ช":"ll","โ‰ชฬธ":"nLtv","โ‰ชโƒ’":"nLt","โ‰ซ":"gg","โ‰ซฬธ":"nGtv","โ‰ซโƒ’":"nGt","โ‰ฌ":"twixt","โ‰ฒ":"lsim","โ‰ด":"nlsim","โ‰ณ":"gsim","โ‰ต":"ngsim","โ‰ถ":"lg","โ‰ธ":"ntlg","โ‰ท":"gl","โ‰น":"ntgl","โ‰บ":"pr","โŠ€":"npr","โ‰ป":"sc","โŠ":"nsc","โ‰ผ":"prcue","โ‹ ":"nprcue","โ‰ฝ":"sccue","โ‹ก":"nsccue","โ‰พ":"prsim","โ‰ฟ":"scsim","โ‰ฟฬธ":"NotSucceedsTilde","โŠ‚":"sub","โŠ„":"nsub","โŠ‚โƒ’":"vnsub","โŠƒ":"sup","โŠ…":"nsup","โŠƒโƒ’":"vnsup","โŠ†":"sube","โŠˆ":"nsube","โŠ‡":"supe","โŠ‰":"nsupe","โŠŠ๏ธ€":"vsubne","โŠŠ":"subne","โŠ‹๏ธ€":"vsupne","โŠ‹":"supne","โŠ":"cupdot","โŠŽ":"uplus","โŠ":"sqsub","โŠฬธ":"NotSquareSubset","โŠ":"sqsup","โŠฬธ":"NotSquareSuperset","โŠ‘":"sqsube","โ‹ข":"nsqsube","โŠ’":"sqsupe","โ‹ฃ":"nsqsupe","โŠ“":"sqcap","โŠ“๏ธ€":"sqcaps","โŠ”":"sqcup","โŠ”๏ธ€":"sqcups","โŠ•":"oplus","โŠ–":"ominus","โŠ—":"otimes","โŠ˜":"osol","โŠ™":"odot","โŠš":"ocir","โŠ›":"oast","โŠ":"odash","โŠž":"plusb","โŠŸ":"minusb","โŠ ":"timesb","โŠก":"sdotb","โŠข":"vdash","โŠฌ":"nvdash","โŠฃ":"dashv","โŠค":"top","โŠฅ":"bot","โŠง":"models","โŠจ":"vDash","โŠญ":"nvDash","โŠฉ":"Vdash","โŠฎ":"nVdash","โŠช":"Vvdash","โŠซ":"VDash","โŠฏ":"nVDash","โŠฐ":"prurel","โŠฒ":"vltri","โ‹ช":"nltri","โŠณ":"vrtri","โ‹ซ":"nrtri","โŠด":"ltrie","โ‹ฌ":"nltrie","โŠดโƒ’":"nvltrie","โŠต":"rtrie","โ‹ญ":"nrtrie","โŠตโƒ’":"nvrtrie","โŠถ":"origof","โŠท":"imof","โŠธ":"mumap","โŠน":"hercon","โŠบ":"intcal","โŠป":"veebar","โŠฝ":"barvee","โŠพ":"angrtvb","โŠฟ":"lrtri","โ‹€":"Wedge","โ‹":"Vee","โ‹‚":"xcap","โ‹ƒ":"xcup","โ‹„":"diam","โ‹…":"sdot","โ‹†":"Star","โ‹‡":"divonx","โ‹ˆ":"bowtie","โ‹‰":"ltimes","โ‹Š":"rtimes","โ‹‹":"lthree","โ‹Œ":"rthree","โ‹":"bsime","โ‹Ž":"cuvee","โ‹":"cuwed","โ‹":"Sub","โ‹‘":"Sup","โ‹’":"Cap","โ‹“":"Cup","โ‹”":"fork","โ‹•":"epar","โ‹–":"ltdot","โ‹—":"gtdot","โ‹˜":"Ll","โ‹˜ฬธ":"nLl","โ‹™":"Gg","โ‹™ฬธ":"nGg","โ‹š๏ธ€":"lesg","โ‹š":"leg","โ‹›":"gel","โ‹›๏ธ€":"gesl","โ‹ž":"cuepr","โ‹Ÿ":"cuesc","โ‹ฆ":"lnsim","โ‹ง":"gnsim","โ‹จ":"prnsim","โ‹ฉ":"scnsim","โ‹ฎ":"vellip","โ‹ฏ":"ctdot","โ‹ฐ":"utdot","โ‹ฑ":"dtdot","โ‹ฒ":"disin","โ‹ณ":"isinsv","โ‹ด":"isins","โ‹ต":"isindot","โ‹ตฬธ":"notindot","โ‹ถ":"notinvc","โ‹ท":"notinvb","โ‹น":"isinE","โ‹นฬธ":"notinE","โ‹บ":"nisd","โ‹ป":"xnis","โ‹ผ":"nis","โ‹ฝ":"notnivc","โ‹พ":"notnivb","โŒ…":"barwed","โŒ†":"Barwed","โŒŒ":"drcrop","โŒ":"dlcrop","โŒŽ":"urcrop","โŒ":"ulcrop","โŒ":"bnot","โŒ’":"profline","โŒ“":"profsurf","โŒ•":"telrec","โŒ–":"target","โŒœ":"ulcorn","โŒ":"urcorn","โŒž":"dlcorn","โŒŸ":"drcorn","โŒข":"frown","โŒฃ":"smile","โŒญ":"cylcty","โŒฎ":"profalar","โŒถ":"topbot","โŒฝ":"ovbar","โŒฟ":"solbar","โผ":"angzarr","โŽฐ":"lmoust","โŽฑ":"rmoust","โŽด":"tbrk","โŽต":"bbrk","โŽถ":"bbrktbrk","โœ":"OverParenthesis","โ":"UnderParenthesis","โž":"OverBrace","โŸ":"UnderBrace","โข":"trpezium","โง":"elinters","โฃ":"blank","โ”€":"boxh","โ”‚":"boxv","โ”Œ":"boxdr","โ”":"boxdl","โ””":"boxur","โ”˜":"boxul","โ”œ":"boxvr","โ”ค":"boxvl","โ”ฌ":"boxhd","โ”ด":"boxhu","โ”ผ":"boxvh","โ•":"boxH","โ•‘":"boxV","โ•’":"boxdR","โ•“":"boxDr","โ•”":"boxDR","โ••":"boxdL","โ•–":"boxDl","โ•—":"boxDL","โ•˜":"boxuR","โ•™":"boxUr","โ•š":"boxUR","โ•›":"boxuL","โ•œ":"boxUl","โ•":"boxUL","โ•ž":"boxvR","โ•Ÿ":"boxVr","โ• ":"boxVR","โ•ก":"boxvL","โ•ข":"boxVl","โ•ฃ":"boxVL","โ•ค":"boxHd","โ•ฅ":"boxhD","โ•ฆ":"boxHD","โ•ง":"boxHu","โ•จ":"boxhU","โ•ฉ":"boxHU","โ•ช":"boxvH","โ•ซ":"boxVh","โ•ฌ":"boxVH","โ–€":"uhblk","โ–„":"lhblk","โ–ˆ":"block","โ–‘":"blk14","โ–’":"blk12","โ–“":"blk34","โ–ก":"squ","โ–ช":"squf","โ–ซ":"EmptyVerySmallSquare","โ–ญ":"rect","โ–ฎ":"marker","โ–ฑ":"fltns","โ–ณ":"xutri","โ–ด":"utrif","โ–ต":"utri","โ–ธ":"rtrif","โ–น":"rtri","โ–ฝ":"xdtri","โ–พ":"dtrif","โ–ฟ":"dtri","โ—‚":"ltrif","โ—ƒ":"ltri","โ—Š":"loz","โ—‹":"cir","โ—ฌ":"tridot","โ—ฏ":"xcirc","โ—ธ":"ultri","โ—น":"urtri","โ—บ":"lltri","โ—ป":"EmptySmallSquare","โ—ผ":"FilledSmallSquare","โ˜…":"starf","โ˜†":"star","โ˜Ž":"phone","โ™€":"female","โ™‚":"male","โ™ ":"spades","โ™ฃ":"clubs","โ™ฅ":"hearts","โ™ฆ":"diams","โ™ช":"sung","โœ“":"check","โœ—":"cross","โœ ":"malt","โœถ":"sext","โ˜":"VerticalSeparator","โŸˆ":"bsolhsub","โŸ‰":"suphsol","โŸต":"xlarr","โŸถ":"xrarr","โŸท":"xharr","โŸธ":"xlArr","โŸน":"xrArr","โŸบ":"xhArr","โŸผ":"xmap","โŸฟ":"dzigrarr","โค‚":"nvlArr","โคƒ":"nvrArr","โค„":"nvHarr","โค…":"Map","โคŒ":"lbarr","โค":"rbarr","โคŽ":"lBarr","โค":"rBarr","โค":"RBarr","โค‘":"DDotrahd","โค’":"UpArrowBar","โค“":"DownArrowBar","โค–":"Rarrtl","โค™":"latail","โคš":"ratail","โค›":"lAtail","โคœ":"rAtail","โค":"larrfs","โคž":"rarrfs","โคŸ":"larrbfs","โค ":"rarrbfs","โคฃ":"nwarhk","โคค":"nearhk","โคฅ":"searhk","โคฆ":"swarhk","โคง":"nwnear","โคจ":"toea","โคฉ":"tosa","โคช":"swnwar","โคณ":"rarrc","โคณฬธ":"nrarrc","โคต":"cudarrr","โคถ":"ldca","โคท":"rdca","โคธ":"cudarrl","โคน":"larrpl","โคผ":"curarrm","โคฝ":"cularrp","โฅ…":"rarrpl","โฅˆ":"harrcir","โฅ‰":"Uarrocir","โฅŠ":"lurdshar","โฅ‹":"ldrushar","โฅŽ":"LeftRightVector","โฅ":"RightUpDownVector","โฅ":"DownLeftRightVector","โฅ‘":"LeftUpDownVector","โฅ’":"LeftVectorBar","โฅ“":"RightVectorBar","โฅ”":"RightUpVectorBar","โฅ•":"RightDownVectorBar","โฅ–":"DownLeftVectorBar","โฅ—":"DownRightVectorBar","โฅ˜":"LeftUpVectorBar","โฅ™":"LeftDownVectorBar","โฅš":"LeftTeeVector","โฅ›":"RightTeeVector","โฅœ":"RightUpTeeVector","โฅ":"RightDownTeeVector","โฅž":"DownLeftTeeVector","โฅŸ":"DownRightTeeVector","โฅ ":"LeftUpTeeVector","โฅก":"LeftDownTeeVector","โฅข":"lHar","โฅฃ":"uHar","โฅค":"rHar","โฅฅ":"dHar","โฅฆ":"luruhar","โฅง":"ldrdhar","โฅจ":"ruluhar","โฅฉ":"rdldhar","โฅช":"lharul","โฅซ":"llhard","โฅฌ":"rharul","โฅญ":"lrhard","โฅฎ":"udhar","โฅฏ":"duhar","โฅฐ":"RoundImplies","โฅฑ":"erarr","โฅฒ":"simrarr","โฅณ":"larrsim","โฅด":"rarrsim","โฅต":"rarrap","โฅถ":"ltlarr","โฅธ":"gtrarr","โฅน":"subrarr","โฅป":"suplarr","โฅผ":"lfisht","โฅฝ":"rfisht","โฅพ":"ufisht","โฅฟ":"dfisht","โฆš":"vzigzag","โฆœ":"vangrt","โฆ":"angrtvbd","โฆค":"ange","โฆฅ":"range","โฆฆ":"dwangle","โฆง":"uwangle","โฆจ":"angmsdaa","โฆฉ":"angmsdab","โฆช":"angmsdac","โฆซ":"angmsdad","โฆฌ":"angmsdae","โฆญ":"angmsdaf","โฆฎ":"angmsdag","โฆฏ":"angmsdah","โฆฐ":"bemptyv","โฆฑ":"demptyv","โฆฒ":"cemptyv","โฆณ":"raemptyv","โฆด":"laemptyv","โฆต":"ohbar","โฆถ":"omid","โฆท":"opar","โฆน":"operp","โฆป":"olcross","โฆผ":"odsold","โฆพ":"olcir","โฆฟ":"ofcir","โง€":"olt","โง":"ogt","โง‚":"cirscir","โงƒ":"cirE","โง„":"solb","โง…":"bsolb","โง‰":"boxbox","โง":"trisb","โงŽ":"rtriltri","โง":"LeftTriangleBar","โงฬธ":"NotLeftTriangleBar","โง":"RightTriangleBar","โงฬธ":"NotRightTriangleBar","โงœ":"iinfin","โง":"infintie","โงž":"nvinfin","โงฃ":"eparsl","โงค":"smeparsl","โงฅ":"eqvparsl","โงซ":"lozf","โงด":"RuleDelayed","โงถ":"dsol","โจ€":"xodot","โจ":"xoplus","โจ‚":"xotime","โจ„":"xuplus","โจ†":"xsqcup","โจ":"fpartint","โจ":"cirfnint","โจ‘":"awint","โจ’":"rppolint","โจ“":"scpolint","โจ”":"npolint","โจ•":"pointint","โจ–":"quatint","โจ—":"intlarhk","โจข":"pluscir","โจฃ":"plusacir","โจค":"simplus","โจฅ":"plusdu","โจฆ":"plussim","โจง":"plustwo","โจฉ":"mcomma","โจช":"minusdu","โจญ":"loplus","โจฎ":"roplus","โจฏ":"Cross","โจฐ":"timesd","โจฑ":"timesbar","โจณ":"smashp","โจด":"lotimes","โจต":"rotimes","โจถ":"otimesas","โจท":"Otimes","โจธ":"odiv","โจน":"triplus","โจบ":"triminus","โจป":"tritime","โจผ":"iprod","โจฟ":"amalg","โฉ€":"capdot","โฉ‚":"ncup","โฉƒ":"ncap","โฉ„":"capand","โฉ…":"cupor","โฉ†":"cupcap","โฉ‡":"capcup","โฉˆ":"cupbrcap","โฉ‰":"capbrcup","โฉŠ":"cupcup","โฉ‹":"capcap","โฉŒ":"ccups","โฉ":"ccaps","โฉ":"ccupssm","โฉ“":"And","โฉ”":"Or","โฉ•":"andand","โฉ–":"oror","โฉ—":"orslope","โฉ˜":"andslope","โฉš":"andv","โฉ›":"orv","โฉœ":"andd","โฉ":"ord","โฉŸ":"wedbar","โฉฆ":"sdote","โฉช":"simdot","โฉญ":"congdot","โฉญฬธ":"ncongdot","โฉฎ":"easter","โฉฏ":"apacir","โฉฐ":"apE","โฉฐฬธ":"napE","โฉฑ":"eplus","โฉฒ":"pluse","โฉณ":"Esim","โฉท":"eDDot","โฉธ":"equivDD","โฉน":"ltcir","โฉบ":"gtcir","โฉป":"ltquest","โฉผ":"gtquest","โฉฝ":"les","โฉฝฬธ":"nles","โฉพ":"ges","โฉพฬธ":"nges","โฉฟ":"lesdot","โช€":"gesdot","โช":"lesdoto","โช‚":"gesdoto","โชƒ":"lesdotor","โช„":"gesdotol","โช…":"lap","โช†":"gap","โช‡":"lne","โชˆ":"gne","โช‰":"lnap","โชŠ":"gnap","โช‹":"lEg","โชŒ":"gEl","โช":"lsime","โชŽ":"gsime","โช":"lsimg","โช":"gsiml","โช‘":"lgE","โช’":"glE","โช“":"lesges","โช”":"gesles","โช•":"els","โช–":"egs","โช—":"elsdot","โช˜":"egsdot","โช™":"el","โชš":"eg","โช":"siml","โชž":"simg","โชŸ":"simlE","โช ":"simgE","โชก":"LessLess","โชกฬธ":"NotNestedLessLess","โชข":"GreaterGreater","โชขฬธ":"NotNestedGreaterGreater","โชค":"glj","โชฅ":"gla","โชฆ":"ltcc","โชง":"gtcc","โชจ":"lescc","โชฉ":"gescc","โชช":"smt","โชซ":"lat","โชฌ":"smte","โชฌ๏ธ€":"smtes","โชญ":"late","โชญ๏ธ€":"lates","โชฎ":"bumpE","โชฏ":"pre","โชฏฬธ":"npre","โชฐ":"sce","โชฐฬธ":"nsce","โชณ":"prE","โชด":"scE","โชต":"prnE","โชถ":"scnE","โชท":"prap","โชธ":"scap","โชน":"prnap","โชบ":"scnap","โชป":"Pr","โชผ":"Sc","โชฝ":"subdot","โชพ":"supdot","โชฟ":"subplus","โซ€":"supplus","โซ":"submult","โซ‚":"supmult","โซƒ":"subedot","โซ„":"supedot","โซ…":"subE","โซ…ฬธ":"nsubE","โซ†":"supE","โซ†ฬธ":"nsupE","โซ‡":"subsim","โซˆ":"supsim","โซ‹๏ธ€":"vsubnE","โซ‹":"subnE","โซŒ๏ธ€":"vsupnE","โซŒ":"supnE","โซ":"csub","โซ":"csup","โซ‘":"csube","โซ’":"csupe","โซ“":"subsup","โซ”":"supsub","โซ•":"subsub","โซ–":"supsup","โซ—":"suphsub","โซ˜":"supdsub","โซ™":"forkv","โซš":"topfork","โซ›":"mlcp","โซค":"Dashv","โซฆ":"Vdashl","โซง":"Barv","โซจ":"vBar","โซฉ":"vBarv","โซซ":"Vbar","โซฌ":"Not","โซญ":"bNot","โซฎ":"rnmid","โซฏ":"cirmid","โซฐ":"midcir","โซฑ":"topcir","โซฒ":"nhpar","โซณ":"parsim","โซฝ":"parsl","โซฝโƒฅ":"nparsl","โ™ญ":"flat","โ™ฎ":"natur","โ™ฏ":"sharp","ยค":"curren","ยข":"cent",$:"dollar","ยฃ":"pound","ยฅ":"yen","โ‚ฌ":"euro","ยน":"sup1","ยฝ":"half","โ…“":"frac13","ยผ":"frac14","โ…•":"frac15","โ…™":"frac16","โ…›":"frac18","ยฒ":"sup2","โ…”":"frac23","โ…–":"frac25","ยณ":"sup3","ยพ":"frac34","โ…—":"frac35","โ…œ":"frac38","โ…˜":"frac45","โ…š":"frac56","โ…":"frac58","โ…ž":"frac78","๐’ถ":"ascr","๐•’":"aopf","๐”ž":"afr","๐”ธ":"Aopf","๐”„":"Afr","๐’œ":"Ascr","ยช":"ordf","รก":"aacute","ร":"Aacute","ร ":"agrave","ร€":"Agrave","ฤƒ":"abreve","ฤ‚":"Abreve","รข":"acirc","ร‚":"Acirc","รฅ":"aring","ร…":"angst","รค":"auml","ร„":"Auml","รฃ":"atilde","รƒ":"Atilde","ฤ…":"aogon","ฤ„":"Aogon","ฤ":"amacr","ฤ€":"Amacr","รฆ":"aelig","ร†":"AElig","๐’ท":"bscr","๐•“":"bopf","๐”Ÿ":"bfr","๐”น":"Bopf","โ„ฌ":"Bscr","๐”…":"Bfr","๐” ":"cfr","๐’ธ":"cscr","๐•”":"copf","โ„ญ":"Cfr","๐’ž":"Cscr","โ„‚":"Copf","ฤ‡":"cacute","ฤ†":"Cacute","ฤ‰":"ccirc","ฤˆ":"Ccirc","ฤ":"ccaron","ฤŒ":"Ccaron","ฤ‹":"cdot","ฤŠ":"Cdot","รง":"ccedil","ร‡":"Ccedil","โ„…":"incare","๐”ก":"dfr","โ…†":"dd","๐••":"dopf","๐’น":"dscr","๐’Ÿ":"Dscr","๐”‡":"Dfr","โ……":"DD","๐”ป":"Dopf","ฤ":"dcaron","ฤŽ":"Dcaron","ฤ‘":"dstrok","ฤ":"Dstrok","รฐ":"eth","ร":"ETH","โ…‡":"ee","โ„ฏ":"escr","๐”ข":"efr","๐•–":"eopf","โ„ฐ":"Escr","๐”ˆ":"Efr","๐”ผ":"Eopf","รฉ":"eacute","ร‰":"Eacute","รจ":"egrave","รˆ":"Egrave","รช":"ecirc","รŠ":"Ecirc","ฤ›":"ecaron","ฤš":"Ecaron","รซ":"euml","ร‹":"Euml","ฤ—":"edot","ฤ–":"Edot","ฤ™":"eogon","ฤ˜":"Eogon","ฤ“":"emacr","ฤ’":"Emacr","๐”ฃ":"ffr","๐•—":"fopf","๐’ป":"fscr","๐”‰":"Ffr","๐”ฝ":"Fopf","โ„ฑ":"Fscr","๏ฌ€":"fflig","๏ฌƒ":"ffilig","๏ฌ„":"ffllig","๏ฌ":"filig",fj:"fjlig","๏ฌ‚":"fllig","ฦ’":"fnof","โ„Š":"gscr","๐•˜":"gopf","๐”ค":"gfr","๐’ข":"Gscr","๐”พ":"Gopf","๐”Š":"Gfr","วต":"gacute","ฤŸ":"gbreve","ฤž":"Gbreve","ฤ":"gcirc","ฤœ":"Gcirc","ฤก":"gdot","ฤ ":"Gdot","ฤข":"Gcedil","๐”ฅ":"hfr","โ„Ž":"planckh","๐’ฝ":"hscr","๐•™":"hopf","โ„‹":"Hscr","โ„Œ":"Hfr","โ„":"Hopf","ฤฅ":"hcirc","ฤค":"Hcirc","โ„":"hbar","ฤง":"hstrok","ฤฆ":"Hstrok","๐•š":"iopf","๐”ฆ":"ifr","๐’พ":"iscr","โ…ˆ":"ii","๐•€":"Iopf","โ„":"Iscr","โ„‘":"Im","รญ":"iacute","ร":"Iacute","รฌ":"igrave","รŒ":"Igrave","รฎ":"icirc","รŽ":"Icirc","รฏ":"iuml","ร":"Iuml","ฤฉ":"itilde","ฤจ":"Itilde","ฤฐ":"Idot","ฤฏ":"iogon","ฤฎ":"Iogon","ฤซ":"imacr","ฤช":"Imacr","ฤณ":"ijlig","ฤฒ":"IJlig","ฤฑ":"imath","๐’ฟ":"jscr","๐•›":"jopf","๐”ง":"jfr","๐’ฅ":"Jscr","๐”":"Jfr","๐•":"Jopf","ฤต":"jcirc","ฤด":"Jcirc","ศท":"jmath","๐•œ":"kopf","๐“€":"kscr","๐”จ":"kfr","๐’ฆ":"Kscr","๐•‚":"Kopf","๐”Ž":"Kfr","ฤท":"kcedil","ฤถ":"Kcedil","๐”ฉ":"lfr","๐“":"lscr","โ„“":"ell","๐•":"lopf","โ„’":"Lscr","๐”":"Lfr","๐•ƒ":"Lopf","ฤบ":"lacute","ฤน":"Lacute","ฤพ":"lcaron","ฤฝ":"Lcaron","ฤผ":"lcedil","ฤป":"Lcedil","ล‚":"lstrok","ล":"Lstrok","ล€":"lmidot","ฤฟ":"Lmidot","๐”ช":"mfr","๐•ž":"mopf","๐“‚":"mscr","๐”":"Mfr","๐•„":"Mopf","โ„ณ":"Mscr","๐”ซ":"nfr","๐•Ÿ":"nopf","๐“ƒ":"nscr","โ„•":"Nopf","๐’ฉ":"Nscr","๐”‘":"Nfr","ล„":"nacute","ลƒ":"Nacute","ลˆ":"ncaron","ล‡":"Ncaron","รฑ":"ntilde","ร‘":"Ntilde","ล†":"ncedil","ล…":"Ncedil","โ„–":"numero","ล‹":"eng","ลŠ":"ENG","๐• ":"oopf","๐”ฌ":"ofr","โ„ด":"oscr","๐’ช":"Oscr","๐”’":"Ofr","๐•†":"Oopf","ยบ":"ordm","รณ":"oacute","ร“":"Oacute","รฒ":"ograve","ร’":"Ograve","รด":"ocirc","ร”":"Ocirc","รถ":"ouml","ร–":"Ouml","ล‘":"odblac","ล":"Odblac","รต":"otilde","ร•":"Otilde","รธ":"oslash","ร˜":"Oslash","ล":"omacr","ลŒ":"Omacr","ล“":"oelig","ล’":"OElig","๐”ญ":"pfr","๐“…":"pscr","๐•ก":"popf","โ„™":"Popf","๐”“":"Pfr","๐’ซ":"Pscr","๐•ข":"qopf","๐”ฎ":"qfr","๐“†":"qscr","๐’ฌ":"Qscr","๐””":"Qfr","โ„š":"Qopf","ฤธ":"kgreen","๐”ฏ":"rfr","๐•ฃ":"ropf","๐“‡":"rscr","โ„›":"Rscr","โ„œ":"Re","โ„":"Ropf","ล•":"racute","ล”":"Racute","ล™":"rcaron","ล˜":"Rcaron","ล—":"rcedil","ล–":"Rcedil","๐•ค":"sopf","๐“ˆ":"sscr","๐”ฐ":"sfr","๐•Š":"Sopf","๐”–":"Sfr","๐’ฎ":"Sscr","โ“ˆ":"oS","ล›":"sacute","ลš":"Sacute","ล":"scirc","ลœ":"Scirc","ลก":"scaron","ล ":"Scaron","ลŸ":"scedil","ลž":"Scedil","รŸ":"szlig","๐”ฑ":"tfr","๐“‰":"tscr","๐•ฅ":"topf","๐’ฏ":"Tscr","๐”—":"Tfr","๐•‹":"Topf","ลฅ":"tcaron","ลค":"Tcaron","ลฃ":"tcedil","ลข":"Tcedil","โ„ข":"trade","ลง":"tstrok","ลฆ":"Tstrok","๐“Š":"uscr","๐•ฆ":"uopf","๐”ฒ":"ufr","๐•Œ":"Uopf","๐”˜":"Ufr","๐’ฐ":"Uscr","รบ":"uacute","รš":"Uacute","รน":"ugrave","ร™":"Ugrave","ลญ":"ubreve","ลฌ":"Ubreve","รป":"ucirc","ร›":"Ucirc","ลฏ":"uring","ลฎ":"Uring","รผ":"uuml","รœ":"Uuml","ลฑ":"udblac","ลฐ":"Udblac","ลฉ":"utilde","ลจ":"Utilde","ลณ":"uogon","ลฒ":"Uogon","ลซ":"umacr","ลช":"Umacr","๐”ณ":"vfr","๐•ง":"vopf","๐“‹":"vscr","๐”™":"Vfr","๐•":"Vopf","๐’ฑ":"Vscr","๐•จ":"wopf","๐“Œ":"wscr","๐”ด":"wfr","๐’ฒ":"Wscr","๐•Ž":"Wopf","๐”š":"Wfr","ลต":"wcirc","ลด":"Wcirc","๐”ต":"xfr","๐“":"xscr","๐•ฉ":"xopf","๐•":"Xopf","๐”›":"Xfr","๐’ณ":"Xscr","๐”ถ":"yfr","๐“Ž":"yscr","๐•ช":"yopf","๐’ด":"Yscr","๐”œ":"Yfr","๐•":"Yopf","รฝ":"yacute","ร":"Yacute","ลท":"ycirc","ลถ":"Ycirc","รฟ":"yuml","ลธ":"Yuml","๐“":"zscr","๐”ท":"zfr","๐•ซ":"zopf","โ„จ":"Zfr","โ„ค":"Zopf","๐’ต":"Zscr","ลบ":"zacute","ลน":"Zacute","ลพ":"zcaron","ลฝ":"Zcaron","ลผ":"zdot","ลป":"Zdot","ฦต":"imped","รพ":"thorn","รž":"THORN","ล‰":"napos","ฮฑ":"alpha","ฮ‘":"Alpha","ฮฒ":"beta","ฮ’":"Beta","ฮณ":"gamma","ฮ“":"Gamma","ฮด":"delta","ฮ”":"Delta","ฮต":"epsi","ฯต":"epsiv","ฮ•":"Epsilon","ฯ":"gammad","ฯœ":"Gammad","ฮถ":"zeta","ฮ–":"Zeta","ฮท":"eta","ฮ—":"Eta","ฮธ":"theta","ฯ‘":"thetav","ฮ˜":"Theta","ฮน":"iota","ฮ™":"Iota","ฮบ":"kappa","ฯฐ":"kappav","ฮš":"Kappa","ฮป":"lambda","ฮ›":"Lambda","ฮผ":"mu","ยต":"micro","ฮœ":"Mu","ฮฝ":"nu","ฮ":"Nu","ฮพ":"xi","ฮž":"Xi","ฮฟ":"omicron","ฮŸ":"Omicron","ฯ€":"pi","ฯ–":"piv","ฮ ":"Pi","ฯ":"rho","ฯฑ":"rhov","ฮก":"Rho","ฯƒ":"sigma","ฮฃ":"Sigma","ฯ‚":"sigmaf","ฯ„":"tau","ฮค":"Tau","ฯ…":"upsi","ฮฅ":"Upsilon","ฯ’":"Upsi","ฯ†":"phi","ฯ•":"phiv","ฮฆ":"Phi","ฯ‡":"chi","ฮง":"Chi","ฯˆ":"psi","ฮจ":"Psi","ฯ‰":"omega","ฮฉ":"ohm","ะฐ":"acy","ะ":"Acy","ะฑ":"bcy","ะ‘":"Bcy","ะฒ":"vcy","ะ’":"Vcy","ะณ":"gcy","ะ“":"Gcy","ั“":"gjcy","ะƒ":"GJcy","ะด":"dcy","ะ”":"Dcy","ั’":"djcy","ะ‚":"DJcy","ะต":"iecy","ะ•":"IEcy","ั‘":"iocy","ะ":"IOcy","ั”":"jukcy","ะ„":"Jukcy","ะถ":"zhcy","ะ–":"ZHcy","ะท":"zcy","ะ—":"Zcy","ั•":"dscy","ะ…":"DScy","ะธ":"icy","ะ˜":"Icy","ั–":"iukcy","ะ†":"Iukcy","ั—":"yicy","ะ‡":"YIcy","ะน":"jcy","ะ™":"Jcy","ั˜":"jsercy","ะˆ":"Jsercy","ะบ":"kcy","ะš":"Kcy","ัœ":"kjcy","ะŒ":"KJcy","ะป":"lcy","ะ›":"Lcy","ั™":"ljcy","ะ‰":"LJcy","ะผ":"mcy","ะœ":"Mcy","ะฝ":"ncy","ะ":"Ncy","ัš":"njcy","ะŠ":"NJcy","ะพ":"ocy","ะž":"Ocy","ะฟ":"pcy","ะŸ":"Pcy","ั€":"rcy","ะ ":"Rcy","ั":"scy","ะก":"Scy","ั‚":"tcy","ะข":"Tcy","ั›":"tshcy","ะ‹":"TSHcy","ัƒ":"ucy","ะฃ":"Ucy","ัž":"ubrcy","ะŽ":"Ubrcy","ั„":"fcy","ะค":"Fcy","ั…":"khcy","ะฅ":"KHcy","ั†":"tscy","ะฆ":"TScy","ั‡":"chcy","ะง":"CHcy","ัŸ":"dzcy","ะ":"DZcy","ัˆ":"shcy","ะจ":"SHcy","ั‰":"shchcy","ะฉ":"SHCHcy","ัŠ":"hardcy","ะช":"HARDcy","ั‹":"ycy","ะซ":"Ycy","ัŒ":"softcy","ะฌ":"SOFTcy","ั":"ecy","ะญ":"Ecy","ัŽ":"yucy","ะฎ":"YUcy","ั":"yacy","ะฏ":"YAcy","โ„ต":"aleph","โ„ถ":"beth","โ„ท":"gimel","โ„ธ":"daleth"};var p=/["&'<>`]/g;var d={'"':""","&":"&","'":"'","<":"<",">":">","`":"`"};var f=/&#(?:[xX][^a-fA-F0-9]|[^0-9xX])/;var g=/[\0-\x08\x0B\x0E-\x1F\x7F-\x9F\uFDD0-\uFDEF\uFFFE\uFFFF]|[\uD83F\uD87F\uD8BF\uD8FF\uD93F\uD97F\uD9BF\uD9FF\uDA3F\uDA7F\uDABF\uDAFF\uDB3F\uDB7F\uDBBF\uDBFF][\uDFFE\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/;var h=/&(CounterClockwiseContourIntegral|DoubleLongLeftRightArrow|ClockwiseContourIntegral|NotNestedGreaterGreater|NotSquareSupersetEqual|DiacriticalDoubleAcute|NotRightTriangleEqual|NotSucceedsSlantEqual|NotPrecedesSlantEqual|CloseCurlyDoubleQuote|NegativeVeryThinSpace|DoubleContourIntegral|FilledVerySmallSquare|CapitalDifferentialD|OpenCurlyDoubleQuote|EmptyVerySmallSquare|NestedGreaterGreater|DoubleLongRightArrow|NotLeftTriangleEqual|NotGreaterSlantEqual|ReverseUpEquilibrium|DoubleLeftRightArrow|NotSquareSubsetEqual|NotDoubleVerticalBar|RightArrowLeftArrow|NotGreaterFullEqual|NotRightTriangleBar|SquareSupersetEqual|DownLeftRightVector|DoubleLongLeftArrow|leftrightsquigarrow|LeftArrowRightArrow|NegativeMediumSpace|blacktriangleright|RightDownVectorBar|PrecedesSlantEqual|RightDoubleBracket|SucceedsSlantEqual|NotLeftTriangleBar|RightTriangleEqual|SquareIntersection|RightDownTeeVector|ReverseEquilibrium|NegativeThickSpace|longleftrightarrow|Longleftrightarrow|LongLeftRightArrow|DownRightTeeVector|DownRightVectorBar|GreaterSlantEqual|SquareSubsetEqual|LeftDownVectorBar|LeftDoubleBracket|VerticalSeparator|rightleftharpoons|NotGreaterGreater|NotSquareSuperset|blacktriangleleft|blacktriangledown|NegativeThinSpace|LeftDownTeeVector|NotLessSlantEqual|leftrightharpoons|DoubleUpDownArrow|DoubleVerticalBar|LeftTriangleEqual|FilledSmallSquare|twoheadrightarrow|NotNestedLessLess|DownLeftTeeVector|DownLeftVectorBar|RightAngleBracket|NotTildeFullEqual|NotReverseElement|RightUpDownVector|DiacriticalTilde|NotSucceedsTilde|circlearrowright|NotPrecedesEqual|rightharpoondown|DoubleRightArrow|NotSucceedsEqual|NonBreakingSpace|NotRightTriangle|LessEqualGreater|RightUpTeeVector|LeftAngleBracket|GreaterFullEqual|DownArrowUpArrow|RightUpVectorBar|twoheadleftarrow|GreaterEqualLess|downharpoonright|RightTriangleBar|ntrianglerighteq|NotSupersetEqual|LeftUpDownVector|DiacriticalAcute|rightrightarrows|vartriangleright|UpArrowDownArrow|DiacriticalGrave|UnderParenthesis|EmptySmallSquare|LeftUpVectorBar|leftrightarrows|DownRightVector|downharpoonleft|trianglerighteq|ShortRightArrow|OverParenthesis|DoubleLeftArrow|DoubleDownArrow|NotSquareSubset|bigtriangledown|ntrianglelefteq|UpperRightArrow|curvearrowright|vartriangleleft|NotLeftTriangle|nleftrightarrow|LowerRightArrow|NotHumpDownHump|NotGreaterTilde|rightthreetimes|LeftUpTeeVector|NotGreaterEqual|straightepsilon|LeftTriangleBar|rightsquigarrow|ContourIntegral|rightleftarrows|CloseCurlyQuote|RightDownVector|LeftRightVector|nLeftrightarrow|leftharpoondown|circlearrowleft|SquareSuperset|OpenCurlyQuote|hookrightarrow|HorizontalLine|DiacriticalDot|NotLessGreater|ntriangleright|DoubleRightTee|InvisibleComma|InvisibleTimes|LowerLeftArrow|DownLeftVector|NotSubsetEqual|curvearrowleft|trianglelefteq|NotVerticalBar|TildeFullEqual|downdownarrows|NotGreaterLess|RightTeeVector|ZeroWidthSpace|looparrowright|LongRightArrow|doublebarwedge|ShortLeftArrow|ShortDownArrow|RightVectorBar|GreaterGreater|ReverseElement|rightharpoonup|LessSlantEqual|leftthreetimes|upharpoonright|rightarrowtail|LeftDownVector|Longrightarrow|NestedLessLess|UpperLeftArrow|nshortparallel|leftleftarrows|leftrightarrow|Leftrightarrow|LeftRightArrow|longrightarrow|upharpoonleft|RightArrowBar|ApplyFunction|LeftTeeVector|leftarrowtail|NotEqualTilde|varsubsetneqq|varsupsetneqq|RightTeeArrow|SucceedsEqual|SucceedsTilde|LeftVectorBar|SupersetEqual|hookleftarrow|DifferentialD|VerticalTilde|VeryThinSpace|blacktriangle|bigtriangleup|LessFullEqual|divideontimes|leftharpoonup|UpEquilibrium|ntriangleleft|RightTriangle|measuredangle|shortparallel|longleftarrow|Longleftarrow|LongLeftArrow|DoubleLeftTee|Poincareplane|PrecedesEqual|triangleright|DoubleUpArrow|RightUpVector|fallingdotseq|looparrowleft|PrecedesTilde|NotTildeEqual|NotTildeTilde|smallsetminus|Proportional|triangleleft|triangledown|UnderBracket|NotHumpEqual|exponentiale|ExponentialE|NotLessTilde|HilbertSpace|RightCeiling|blacklozenge|varsupsetneq|HumpDownHump|GreaterEqual|VerticalLine|LeftTeeArrow|NotLessEqual|DownTeeArrow|LeftTriangle|varsubsetneq|Intersection|NotCongruent|DownArrowBar|LeftUpVector|LeftArrowBar|risingdotseq|GreaterTilde|RoundImplies|SquareSubset|ShortUpArrow|NotSuperset|quaternions|precnapprox|backepsilon|preccurlyeq|OverBracket|blacksquare|MediumSpace|VerticalBar|circledcirc|circleddash|CircleMinus|CircleTimes|LessGreater|curlyeqprec|curlyeqsucc|diamondsuit|UpDownArrow|Updownarrow|RuleDelayed|Rrightarrow|updownarrow|RightVector|nRightarrow|nrightarrow|eqslantless|LeftCeiling|Equilibrium|SmallCircle|expectation|NotSucceeds|thickapprox|GreaterLess|SquareUnion|NotPrecedes|NotLessLess|straightphi|succnapprox|succcurlyeq|SubsetEqual|sqsupseteq|Proportion|Laplacetrf|ImaginaryI|supsetneqq|NotGreater|gtreqqless|NotElement|ThickSpace|TildeEqual|TildeTilde|Fouriertrf|rmoustache|EqualTilde|eqslantgtr|UnderBrace|LeftVector|UpArrowBar|nLeftarrow|nsubseteqq|subsetneqq|nsupseteqq|nleftarrow|succapprox|lessapprox|UpTeeArrow|upuparrows|curlywedge|lesseqqgtr|varepsilon|varnothing|RightFloor|complement|CirclePlus|sqsubseteq|Lleftarrow|circledast|RightArrow|Rightarrow|rightarrow|lmoustache|Bernoullis|precapprox|mapstoleft|mapstodown|longmapsto|dotsquare|downarrow|DoubleDot|nsubseteq|supsetneq|leftarrow|nsupseteq|subsetneq|ThinSpace|ngeqslant|subseteqq|HumpEqual|NotSubset|triangleq|NotCupCap|lesseqgtr|heartsuit|TripleDot|Leftarrow|Coproduct|Congruent|varpropto|complexes|gvertneqq|LeftArrow|LessTilde|supseteqq|MinusPlus|CircleDot|nleqslant|NotExists|gtreqless|nparallel|UnionPlus|LeftFloor|checkmark|CenterDot|centerdot|Mellintrf|gtrapprox|bigotimes|OverBrace|spadesuit|therefore|pitchfork|rationals|PlusMinus|Backslash|Therefore|DownBreve|backsimeq|backprime|DownArrow|nshortmid|Downarrow|lvertneqq|eqvparsl|imagline|imagpart|infintie|integers|Integral|intercal|LessLess|Uarrocir|intlarhk|sqsupset|angmsdaf|sqsubset|llcorner|vartheta|cupbrcap|lnapprox|Superset|SuchThat|succnsim|succneqq|angmsdag|biguplus|curlyvee|trpezium|Succeeds|NotTilde|bigwedge|angmsdah|angrtvbd|triminus|cwconint|fpartint|lrcorner|smeparsl|subseteq|urcorner|lurdshar|laemptyv|DDotrahd|approxeq|ldrushar|awconint|mapstoup|backcong|shortmid|triangle|geqslant|gesdotol|timesbar|circledR|circledS|setminus|multimap|naturals|scpolint|ncongdot|RightTee|boxminus|gnapprox|boxtimes|andslope|thicksim|angmsdaa|varsigma|cirfnint|rtriltri|angmsdab|rppolint|angmsdac|barwedge|drbkarow|clubsuit|thetasym|bsolhsub|capbrcup|dzigrarr|doteqdot|DotEqual|dotminus|UnderBar|NotEqual|realpart|otimesas|ulcorner|hksearow|hkswarow|parallel|PartialD|elinters|emptyset|plusacir|bbrktbrk|angmsdad|pointint|bigoplus|angmsdae|Precedes|bigsqcup|varkappa|notindot|supseteq|precneqq|precnsim|profalar|profline|profsurf|leqslant|lesdotor|raemptyv|subplus|notnivb|notnivc|subrarr|zigrarr|vzigzag|submult|subedot|Element|between|cirscir|larrbfs|larrsim|lotimes|lbrksld|lbrkslu|lozenge|ldrdhar|dbkarow|bigcirc|epsilon|simrarr|simplus|ltquest|Epsilon|luruhar|gtquest|maltese|npolint|eqcolon|npreceq|bigodot|ddagger|gtrless|bnequiv|harrcir|ddotseq|equivDD|backsim|demptyv|nsqsube|nsqsupe|Upsilon|nsubset|upsilon|minusdu|nsucceq|swarrow|nsupset|coloneq|searrow|boxplus|napprox|natural|asympeq|alefsym|congdot|nearrow|bigstar|diamond|supplus|tritime|LeftTee|nvinfin|triplus|NewLine|nvltrie|nvrtrie|nwarrow|nexists|Diamond|ruluhar|Implies|supmult|angzarr|suplarr|suphsub|questeq|because|digamma|Because|olcross|bemptyv|omicron|Omicron|rotimes|NoBreak|intprod|angrtvb|orderof|uwangle|suphsol|lesdoto|orslope|DownTee|realine|cudarrl|rdldhar|OverBar|supedot|lessdot|supdsub|topfork|succsim|rbrkslu|rbrksld|pertenk|cudarrr|isindot|planckh|lessgtr|pluscir|gesdoto|plussim|plustwo|lesssim|cularrp|rarrsim|Cayleys|notinva|notinvb|notinvc|UpArrow|Uparrow|uparrow|NotLess|dwangle|precsim|Product|curarrm|Cconint|dotplus|rarrbfs|ccupssm|Cedilla|cemptyv|notniva|quatint|frac35|frac38|frac45|frac56|frac58|frac78|tridot|xoplus|gacute|gammad|Gammad|lfisht|lfloor|bigcup|sqsupe|gbreve|Gbreve|lharul|sqsube|sqcups|Gcedil|apacir|llhard|lmidot|Lmidot|lmoust|andand|sqcaps|approx|Abreve|spades|circeq|tprime|divide|topcir|Assign|topbot|gesdot|divonx|xuplus|timesd|gesles|atilde|solbar|SOFTcy|loplus|timesb|lowast|lowbar|dlcorn|dlcrop|softcy|dollar|lparlt|thksim|lrhard|Atilde|lsaquo|smashp|bigvee|thinsp|wreath|bkarow|lsquor|lstrok|Lstrok|lthree|ltimes|ltlarr|DotDot|simdot|ltrPar|weierp|xsqcup|angmsd|sigmav|sigmaf|zeetrf|Zcaron|zcaron|mapsto|vsupne|thetav|cirmid|marker|mcomma|Zacute|vsubnE|there4|gtlPar|vsubne|bottom|gtrarr|SHCHcy|shchcy|midast|midcir|middot|minusb|minusd|gtrdot|bowtie|sfrown|mnplus|models|colone|seswar|Colone|mstpos|searhk|gtrsim|nacute|Nacute|boxbox|telrec|hairsp|Tcedil|nbumpe|scnsim|ncaron|Ncaron|ncedil|Ncedil|hamilt|Scedil|nearhk|hardcy|HARDcy|tcedil|Tcaron|commat|nequiv|nesear|tcaron|target|hearts|nexist|varrho|scedil|Scaron|scaron|hellip|Sacute|sacute|hercon|swnwar|compfn|rtimes|rthree|rsquor|rsaquo|zacute|wedgeq|homtht|barvee|barwed|Barwed|rpargt|horbar|conint|swarhk|roplus|nltrie|hslash|hstrok|Hstrok|rmoust|Conint|bprime|hybull|hyphen|iacute|Iacute|supsup|supsub|supsim|varphi|coprod|brvbar|agrave|Supset|supset|igrave|Igrave|notinE|Agrave|iiiint|iinfin|copysr|wedbar|Verbar|vangrt|becaus|incare|verbar|inodot|bullet|drcorn|intcal|drcrop|cularr|vellip|Utilde|bumpeq|cupcap|dstrok|Dstrok|CupCap|cupcup|cupdot|eacute|Eacute|supdot|iquest|easter|ecaron|Ecaron|ecolon|isinsv|utilde|itilde|Itilde|curarr|succeq|Bumpeq|cacute|ulcrop|nparsl|Cacute|nprcue|egrave|Egrave|nrarrc|nrarrw|subsup|subsub|nrtrie|jsercy|nsccue|Jsercy|kappav|kcedil|Kcedil|subsim|ulcorn|nsimeq|egsdot|veebar|kgreen|capand|elsdot|Subset|subset|curren|aacute|lacute|Lacute|emptyv|ntilde|Ntilde|lagran|lambda|Lambda|capcap|Ugrave|langle|subdot|emsp13|numero|emsp14|nvdash|nvDash|nVdash|nVDash|ugrave|ufisht|nvHarr|larrfs|nvlArr|larrhk|larrlp|larrpl|nvrArr|Udblac|nwarhk|larrtl|nwnear|oacute|Oacute|latail|lAtail|sstarf|lbrace|odblac|Odblac|lbrack|udblac|odsold|eparsl|lcaron|Lcaron|ograve|Ograve|lcedil|Lcedil|Aacute|ssmile|ssetmn|squarf|ldquor|capcup|ominus|cylcty|rharul|eqcirc|dagger|rfloor|rfisht|Dagger|daleth|equals|origof|capdot|equest|dcaron|Dcaron|rdquor|oslash|Oslash|otilde|Otilde|otimes|Otimes|urcrop|Ubreve|ubreve|Yacute|Uacute|uacute|Rcedil|rcedil|urcorn|parsim|Rcaron|Vdashl|rcaron|Tstrok|percnt|period|permil|Exists|yacute|rbrack|rbrace|phmmat|ccaron|Ccaron|planck|ccedil|plankv|tstrok|female|plusdo|plusdu|ffilig|plusmn|ffllig|Ccedil|rAtail|dfisht|bernou|ratail|Rarrtl|rarrtl|angsph|rarrpl|rarrlp|rarrhk|xwedge|xotime|forall|ForAll|Vvdash|vsupnE|preceq|bigcap|frac12|frac13|frac14|primes|rarrfs|prnsim|frac15|Square|frac16|square|lesdot|frac18|frac23|propto|prurel|rarrap|rangle|puncsp|frac25|Racute|qprime|racute|lesges|frac34|abreve|AElig|eqsim|utdot|setmn|urtri|Equal|Uring|seArr|uring|searr|dashv|Dashv|mumap|nabla|iogon|Iogon|sdote|sdotb|scsim|napid|napos|equiv|natur|Acirc|dblac|erarr|nbump|iprod|erDot|ucirc|awint|esdot|angrt|ncong|isinE|scnap|Scirc|scirc|ndash|isins|Ubrcy|nearr|neArr|isinv|nedot|ubrcy|acute|Ycirc|iukcy|Iukcy|xutri|nesim|caret|jcirc|Jcirc|caron|twixt|ddarr|sccue|exist|jmath|sbquo|ngeqq|angst|ccaps|lceil|ngsim|UpTee|delta|Delta|rtrif|nharr|nhArr|nhpar|rtrie|jukcy|Jukcy|kappa|rsquo|Kappa|nlarr|nlArr|TSHcy|rrarr|aogon|Aogon|fflig|xrarr|tshcy|ccirc|nleqq|filig|upsih|nless|dharl|nlsim|fjlig|ropar|nltri|dharr|robrk|roarr|fllig|fltns|roang|rnmid|subnE|subne|lAarr|trisb|Ccirc|acirc|ccups|blank|VDash|forkv|Vdash|langd|cedil|blk12|blk14|laquo|strns|diams|notin|vDash|larrb|blk34|block|disin|uplus|vdash|vBarv|aelig|starf|Wedge|check|xrArr|lates|lbarr|lBarr|notni|lbbrk|bcong|frasl|lbrke|frown|vrtri|vprop|vnsup|gamma|Gamma|wedge|xodot|bdquo|srarr|doteq|ldquo|boxdl|boxdL|gcirc|Gcirc|boxDl|boxDL|boxdr|boxdR|boxDr|TRADE|trade|rlhar|boxDR|vnsub|npart|vltri|rlarr|boxhd|boxhD|nprec|gescc|nrarr|nrArr|boxHd|boxHD|boxhu|boxhU|nrtri|boxHu|clubs|boxHU|times|colon|Colon|gimel|xlArr|Tilde|nsime|tilde|nsmid|nspar|THORN|thorn|xlarr|nsube|nsubE|thkap|xhArr|comma|nsucc|boxul|boxuL|nsupe|nsupE|gneqq|gnsim|boxUl|boxUL|grave|boxur|boxuR|boxUr|boxUR|lescc|angle|bepsi|boxvh|varpi|boxvH|numsp|Theta|gsime|gsiml|theta|boxVh|boxVH|boxvl|gtcir|gtdot|boxvL|boxVl|boxVL|crarr|cross|Cross|nvsim|boxvr|nwarr|nwArr|sqsup|dtdot|Uogon|lhard|lharu|dtrif|ocirc|Ocirc|lhblk|duarr|odash|sqsub|Hacek|sqcup|llarr|duhar|oelig|OElig|ofcir|boxvR|uogon|lltri|boxVr|csube|uuarr|ohbar|csupe|ctdot|olarr|olcir|harrw|oline|sqcap|omacr|Omacr|omega|Omega|boxVR|aleph|lneqq|lnsim|loang|loarr|rharu|lobrk|hcirc|operp|oplus|rhard|Hcirc|orarr|Union|order|ecirc|Ecirc|cuepr|szlig|cuesc|breve|reals|eDDot|Breve|hoarr|lopar|utrif|rdquo|Umacr|umacr|efDot|swArr|ultri|alpha|rceil|ovbar|swarr|Wcirc|wcirc|smtes|smile|bsemi|lrarr|aring|parsl|lrhar|bsime|uhblk|lrtri|cupor|Aring|uharr|uharl|slarr|rbrke|bsolb|lsime|rbbrk|RBarr|lsimg|phone|rBarr|rbarr|icirc|lsquo|Icirc|emacr|Emacr|ratio|simne|plusb|simlE|simgE|simeq|pluse|ltcir|ltdot|empty|xharr|xdtri|iexcl|Alpha|ltrie|rarrw|pound|ltrif|xcirc|bumpe|prcue|bumpE|asymp|amacr|cuvee|Sigma|sigma|iiint|udhar|iiota|ijlig|IJlig|supnE|imacr|Imacr|prime|Prime|image|prnap|eogon|Eogon|rarrc|mdash|mDDot|cuwed|imath|supne|imped|Amacr|udarr|prsim|micro|rarrb|cwint|raquo|infin|eplus|range|rangd|Ucirc|radic|minus|amalg|veeeq|rAarr|epsiv|ycirc|quest|sharp|quot|zwnj|Qscr|race|qscr|Qopf|qopf|qint|rang|Rang|Zscr|zscr|Zopf|zopf|rarr|rArr|Rarr|Pscr|pscr|prop|prod|prnE|prec|ZHcy|zhcy|prap|Zeta|zeta|Popf|popf|Zdot|plus|zdot|Yuml|yuml|phiv|YUcy|yucy|Yscr|yscr|perp|Yopf|yopf|part|para|YIcy|Ouml|rcub|yicy|YAcy|rdca|ouml|osol|Oscr|rdsh|yacy|real|oscr|xvee|andd|rect|andv|Xscr|oror|ordm|ordf|xscr|ange|aopf|Aopf|rHar|Xopf|opar|Oopf|xopf|xnis|rhov|oopf|omid|xmap|oint|apid|apos|ogon|ascr|Ascr|odot|odiv|xcup|xcap|ocir|oast|nvlt|nvle|nvgt|nvge|nvap|Wscr|wscr|auml|ntlg|ntgl|nsup|nsub|nsim|Nscr|nscr|nsce|Wopf|ring|npre|wopf|npar|Auml|Barv|bbrk|Nopf|nopf|nmid|nLtv|beta|ropf|Ropf|Beta|beth|nles|rpar|nleq|bnot|bNot|nldr|NJcy|rscr|Rscr|Vscr|vscr|rsqb|njcy|bopf|nisd|Bopf|rtri|Vopf|nGtv|ngtr|vopf|boxh|boxH|boxv|nges|ngeq|boxV|bscr|scap|Bscr|bsim|Vert|vert|bsol|bull|bump|caps|cdot|ncup|scnE|ncap|nbsp|napE|Cdot|cent|sdot|Vbar|nang|vBar|chcy|Mscr|mscr|sect|semi|CHcy|Mopf|mopf|sext|circ|cire|mldr|mlcp|cirE|comp|shcy|SHcy|vArr|varr|cong|copf|Copf|copy|COPY|malt|male|macr|lvnE|cscr|ltri|sime|ltcc|simg|Cscr|siml|csub|Uuml|lsqb|lsim|uuml|csup|Lscr|lscr|utri|smid|lpar|cups|smte|lozf|darr|Lopf|Uscr|solb|lopf|sopf|Sopf|lneq|uscr|spar|dArr|lnap|Darr|dash|Sqrt|LJcy|ljcy|lHar|dHar|Upsi|upsi|diam|lesg|djcy|DJcy|leqq|dopf|Dopf|dscr|Dscr|dscy|ldsh|ldca|squf|DScy|sscr|Sscr|dsol|lcub|late|star|Star|Uopf|Larr|lArr|larr|uopf|dtri|dzcy|sube|subE|Lang|lang|Kscr|kscr|Kopf|kopf|KJcy|kjcy|KHcy|khcy|DZcy|ecir|edot|eDot|Jscr|jscr|succ|Jopf|jopf|Edot|uHar|emsp|ensp|Iuml|iuml|eopf|isin|Iscr|iscr|Eopf|epar|sung|epsi|escr|sup1|sup2|sup3|Iota|iota|supe|supE|Iopf|iopf|IOcy|iocy|Escr|esim|Esim|imof|Uarr|QUOT|uArr|uarr|euml|IEcy|iecy|Idot|Euml|euro|excl|Hscr|hscr|Hopf|hopf|TScy|tscy|Tscr|hbar|tscr|flat|tbrk|fnof|hArr|harr|half|fopf|Fopf|tdot|gvnE|fork|trie|gtcc|fscr|Fscr|gdot|gsim|Gscr|gscr|Gopf|gopf|gneq|Gdot|tosa|gnap|Topf|topf|geqq|toea|GJcy|gjcy|tint|gesl|mid|Sfr|ggg|top|ges|gla|glE|glj|geq|gne|gEl|gel|gnE|Gcy|gcy|gap|Tfr|tfr|Tcy|tcy|Hat|Tau|Ffr|tau|Tab|hfr|Hfr|ffr|Fcy|fcy|icy|Icy|iff|ETH|eth|ifr|Ifr|Eta|eta|int|Int|Sup|sup|ucy|Ucy|Sum|sum|jcy|ENG|ufr|Ufr|eng|Jcy|jfr|els|ell|egs|Efr|efr|Jfr|uml|kcy|Kcy|Ecy|ecy|kfr|Kfr|lap|Sub|sub|lat|lcy|Lcy|leg|Dot|dot|lEg|leq|les|squ|div|die|lfr|Lfr|lgE|Dfr|dfr|Del|deg|Dcy|dcy|lne|lnE|sol|loz|smt|Cup|lrm|cup|lsh|Lsh|sim|shy|map|Map|mcy|Mcy|mfr|Mfr|mho|gfr|Gfr|sfr|cir|Chi|chi|nap|Cfr|vcy|Vcy|cfr|Scy|scy|ncy|Ncy|vee|Vee|Cap|cap|nfr|scE|sce|Nfr|nge|ngE|nGg|vfr|Vfr|ngt|bot|nGt|nis|niv|Rsh|rsh|nle|nlE|bne|Bfr|bfr|nLl|nlt|nLt|Bcy|bcy|not|Not|rlm|wfr|Wfr|npr|nsc|num|ocy|ast|Ocy|ofr|xfr|Xfr|Ofr|ogt|ohm|apE|olt|Rho|ape|rho|Rfr|rfr|ord|REG|ang|reg|orv|And|and|AMP|Rcy|amp|Afr|ycy|Ycy|yen|yfr|Yfr|rcy|par|pcy|Pcy|pfr|Pfr|phi|Phi|afr|Acy|acy|zcy|Zcy|piv|acE|acd|zfr|Zfr|pre|prE|psi|Psi|qfr|Qfr|zwj|Or|ge|Gg|gt|gg|el|oS|lt|Lt|LT|Re|lg|gl|eg|ne|Im|it|le|DD|wp|wr|nu|Nu|dd|lE|Sc|sc|pi|Pi|ee|af|ll|Ll|rx|gE|xi|pm|Xi|ic|pr|Pr|in|ni|mp|mu|ac|Mu|or|ap|Gt|GT|ii);|&(Aacute|Agrave|Atilde|Ccedil|Eacute|Egrave|Iacute|Igrave|Ntilde|Oacute|Ograve|Oslash|Otilde|Uacute|Ugrave|Yacute|aacute|agrave|atilde|brvbar|ccedil|curren|divide|eacute|egrave|frac12|frac14|frac34|iacute|igrave|iquest|middot|ntilde|oacute|ograve|oslash|otilde|plusmn|uacute|ugrave|yacute|AElig|Acirc|Aring|Ecirc|Icirc|Ocirc|THORN|Ucirc|acirc|acute|aelig|aring|cedil|ecirc|icirc|iexcl|laquo|micro|ocirc|pound|raquo|szlig|thorn|times|ucirc|Auml|COPY|Euml|Iuml|Ouml|QUOT|Uuml|auml|cent|copy|euml|iuml|macr|nbsp|ordf|ordm|ouml|para|quot|sect|sup1|sup2|sup3|uuml|yuml|AMP|ETH|REG|amp|deg|eth|not|reg|shy|uml|yen|GT|LT|gt|lt)(?!;)([=a-zA-Z0-9]?)|&#([0-9]+)(;?)|&#[xX]([a-fA-F0-9]+)(;?)|&([0-9a-zA-Z]+)/g;var m={aacute:"รก",Aacute:"ร",abreve:"ฤƒ",Abreve:"ฤ‚",ac:"โˆพ",acd:"โˆฟ",acE:"โˆพฬณ",acirc:"รข",Acirc:"ร‚",acute:"ยด",acy:"ะฐ",Acy:"ะ",aelig:"รฆ",AElig:"ร†",af:"โก",afr:"๐”ž",Afr:"๐”„",agrave:"ร ",Agrave:"ร€",alefsym:"โ„ต",aleph:"โ„ต",alpha:"ฮฑ",Alpha:"ฮ‘",amacr:"ฤ",Amacr:"ฤ€",amalg:"โจฟ",amp:"&",AMP:"&",and:"โˆง",And:"โฉ“",andand:"โฉ•",andd:"โฉœ",andslope:"โฉ˜",andv:"โฉš",ang:"โˆ ",ange:"โฆค",angle:"โˆ ",angmsd:"โˆก",angmsdaa:"โฆจ",angmsdab:"โฆฉ",angmsdac:"โฆช",angmsdad:"โฆซ",angmsdae:"โฆฌ",angmsdaf:"โฆญ",angmsdag:"โฆฎ",angmsdah:"โฆฏ",angrt:"โˆŸ",angrtvb:"โŠพ",angrtvbd:"โฆ",angsph:"โˆข",angst:"ร…",angzarr:"โผ",aogon:"ฤ…",Aogon:"ฤ„",aopf:"๐•’",Aopf:"๐”ธ",ap:"โ‰ˆ",apacir:"โฉฏ",ape:"โ‰Š",apE:"โฉฐ",apid:"โ‰‹",apos:"'",ApplyFunction:"โก",approx:"โ‰ˆ",approxeq:"โ‰Š",aring:"รฅ",Aring:"ร…",ascr:"๐’ถ",Ascr:"๐’œ",Assign:"โ‰”",ast:"*",asymp:"โ‰ˆ",asympeq:"โ‰",atilde:"รฃ",Atilde:"รƒ",auml:"รค",Auml:"ร„",awconint:"โˆณ",awint:"โจ‘",backcong:"โ‰Œ",backepsilon:"ฯถ",backprime:"โ€ต",backsim:"โˆฝ",backsimeq:"โ‹",Backslash:"โˆ–",Barv:"โซง",barvee:"โŠฝ",barwed:"โŒ…",Barwed:"โŒ†",barwedge:"โŒ…",bbrk:"โŽต",bbrktbrk:"โŽถ",bcong:"โ‰Œ",bcy:"ะฑ",Bcy:"ะ‘",bdquo:"โ€ž",becaus:"โˆต",because:"โˆต",Because:"โˆต",bemptyv:"โฆฐ",bepsi:"ฯถ",bernou:"โ„ฌ",Bernoullis:"โ„ฌ",beta:"ฮฒ",Beta:"ฮ’",beth:"โ„ถ",between:"โ‰ฌ",bfr:"๐”Ÿ",Bfr:"๐”…",bigcap:"โ‹‚",bigcirc:"โ—ฏ",bigcup:"โ‹ƒ",bigodot:"โจ€",bigoplus:"โจ",bigotimes:"โจ‚",bigsqcup:"โจ†",bigstar:"โ˜…",bigtriangledown:"โ–ฝ",bigtriangleup:"โ–ณ",biguplus:"โจ„",bigvee:"โ‹",bigwedge:"โ‹€",bkarow:"โค",blacklozenge:"โงซ",blacksquare:"โ–ช",blacktriangle:"โ–ด",blacktriangledown:"โ–พ",blacktriangleleft:"โ—‚",blacktriangleright:"โ–ธ",blank:"โฃ",blk12:"โ–’",blk14:"โ–‘",blk34:"โ–“",block:"โ–ˆ",bne:"=โƒฅ",bnequiv:"โ‰กโƒฅ",bnot:"โŒ",bNot:"โซญ",bopf:"๐•“",Bopf:"๐”น",bot:"โŠฅ",bottom:"โŠฅ",bowtie:"โ‹ˆ",boxbox:"โง‰",boxdl:"โ”",boxdL:"โ••",boxDl:"โ•–",boxDL:"โ•—",boxdr:"โ”Œ",boxdR:"โ•’",boxDr:"โ•“",boxDR:"โ•”",boxh:"โ”€",boxH:"โ•",boxhd:"โ”ฌ",boxhD:"โ•ฅ",boxHd:"โ•ค",boxHD:"โ•ฆ",boxhu:"โ”ด",boxhU:"โ•จ",boxHu:"โ•ง",boxHU:"โ•ฉ",boxminus:"โŠŸ",boxplus:"โŠž",boxtimes:"โŠ ",boxul:"โ”˜",boxuL:"โ•›",boxUl:"โ•œ",boxUL:"โ•",boxur:"โ””",boxuR:"โ•˜",boxUr:"โ•™",boxUR:"โ•š",boxv:"โ”‚",boxV:"โ•‘",boxvh:"โ”ผ",boxvH:"โ•ช",boxVh:"โ•ซ",boxVH:"โ•ฌ",boxvl:"โ”ค",boxvL:"โ•ก",boxVl:"โ•ข",boxVL:"โ•ฃ",boxvr:"โ”œ",boxvR:"โ•ž",boxVr:"โ•Ÿ",boxVR:"โ• ",bprime:"โ€ต",breve:"ห˜",Breve:"ห˜",brvbar:"ยฆ",bscr:"๐’ท",Bscr:"โ„ฌ",bsemi:"โ",bsim:"โˆฝ",bsime:"โ‹",bsol:"\\",bsolb:"โง…",bsolhsub:"โŸˆ",bull:"โ€ข",bullet:"โ€ข",bump:"โ‰Ž",bumpe:"โ‰",bumpE:"โชฎ",bumpeq:"โ‰",Bumpeq:"โ‰Ž",cacute:"ฤ‡",Cacute:"ฤ†",cap:"โˆฉ",Cap:"โ‹’",capand:"โฉ„",capbrcup:"โฉ‰",capcap:"โฉ‹",capcup:"โฉ‡",capdot:"โฉ€",CapitalDifferentialD:"โ……",caps:"โˆฉ๏ธ€",caret:"โ",caron:"ห‡",Cayleys:"โ„ญ",ccaps:"โฉ",ccaron:"ฤ",Ccaron:"ฤŒ",ccedil:"รง",Ccedil:"ร‡",ccirc:"ฤ‰",Ccirc:"ฤˆ",Cconint:"โˆฐ",ccups:"โฉŒ",ccupssm:"โฉ",cdot:"ฤ‹",Cdot:"ฤŠ",cedil:"ยธ",Cedilla:"ยธ",cemptyv:"โฆฒ",cent:"ยข",centerdot:"ยท",CenterDot:"ยท",cfr:"๐” ",Cfr:"โ„ญ",chcy:"ั‡",CHcy:"ะง",check:"โœ“",checkmark:"โœ“",chi:"ฯ‡",Chi:"ฮง",cir:"โ—‹",circ:"ห†",circeq:"โ‰—",circlearrowleft:"โ†บ",circlearrowright:"โ†ป",circledast:"โŠ›",circledcirc:"โŠš",circleddash:"โŠ",CircleDot:"โŠ™",circledR:"ยฎ",circledS:"โ“ˆ",CircleMinus:"โŠ–",CirclePlus:"โŠ•",CircleTimes:"โŠ—",cire:"โ‰—",cirE:"โงƒ",cirfnint:"โจ",cirmid:"โซฏ",cirscir:"โง‚",ClockwiseContourIntegral:"โˆฒ",CloseCurlyDoubleQuote:"โ€",CloseCurlyQuote:"โ€™",clubs:"โ™ฃ",clubsuit:"โ™ฃ",colon:":",Colon:"โˆท",colone:"โ‰”",Colone:"โฉด",coloneq:"โ‰”",comma:",",commat:"@",comp:"โˆ",compfn:"โˆ˜",complement:"โˆ",complexes:"โ„‚",cong:"โ‰…",congdot:"โฉญ",Congruent:"โ‰ก",conint:"โˆฎ",Conint:"โˆฏ",ContourIntegral:"โˆฎ",copf:"๐•”",Copf:"โ„‚",coprod:"โˆ",Coproduct:"โˆ",copy:"ยฉ",COPY:"ยฉ",copysr:"โ„—",CounterClockwiseContourIntegral:"โˆณ",crarr:"โ†ต",cross:"โœ—",Cross:"โจฏ",cscr:"๐’ธ",Cscr:"๐’ž",csub:"โซ",csube:"โซ‘",csup:"โซ",csupe:"โซ’",ctdot:"โ‹ฏ",cudarrl:"โคธ",cudarrr:"โคต",cuepr:"โ‹ž",cuesc:"โ‹Ÿ",cularr:"โ†ถ",cularrp:"โคฝ",cup:"โˆช",Cup:"โ‹“",cupbrcap:"โฉˆ",cupcap:"โฉ†",CupCap:"โ‰",cupcup:"โฉŠ",cupdot:"โŠ",cupor:"โฉ…",cups:"โˆช๏ธ€",curarr:"โ†ท",curarrm:"โคผ",curlyeqprec:"โ‹ž",curlyeqsucc:"โ‹Ÿ",curlyvee:"โ‹Ž",curlywedge:"โ‹",curren:"ยค",curvearrowleft:"โ†ถ",curvearrowright:"โ†ท",cuvee:"โ‹Ž",cuwed:"โ‹",cwconint:"โˆฒ",cwint:"โˆฑ",cylcty:"โŒญ",dagger:"โ€ ",Dagger:"โ€ก",daleth:"โ„ธ",darr:"โ†“",dArr:"โ‡“",Darr:"โ†ก",dash:"โ€",dashv:"โŠฃ",Dashv:"โซค",dbkarow:"โค",dblac:"ห",dcaron:"ฤ",Dcaron:"ฤŽ",dcy:"ะด",Dcy:"ะ”",dd:"โ…†",DD:"โ……",ddagger:"โ€ก",ddarr:"โ‡Š",DDotrahd:"โค‘",ddotseq:"โฉท",deg:"ยฐ",Del:"โˆ‡",delta:"ฮด",Delta:"ฮ”",demptyv:"โฆฑ",dfisht:"โฅฟ",dfr:"๐”ก",Dfr:"๐”‡",dHar:"โฅฅ",dharl:"โ‡ƒ",dharr:"โ‡‚",DiacriticalAcute:"ยด",DiacriticalDot:"ห™",DiacriticalDoubleAcute:"ห",DiacriticalGrave:"`",DiacriticalTilde:"หœ",diam:"โ‹„",diamond:"โ‹„",Diamond:"โ‹„",diamondsuit:"โ™ฆ",diams:"โ™ฆ",die:"ยจ",DifferentialD:"โ…†",digamma:"ฯ",disin:"โ‹ฒ",div:"รท",divide:"รท",divideontimes:"โ‹‡",divonx:"โ‹‡",djcy:"ั’",DJcy:"ะ‚",dlcorn:"โŒž",dlcrop:"โŒ",dollar:"$",dopf:"๐••",Dopf:"๐”ป",dot:"ห™",Dot:"ยจ",DotDot:"โƒœ",doteq:"โ‰",doteqdot:"โ‰‘",DotEqual:"โ‰",dotminus:"โˆธ",dotplus:"โˆ”",dotsquare:"โŠก",doublebarwedge:"โŒ†",DoubleContourIntegral:"โˆฏ",DoubleDot:"ยจ",DoubleDownArrow:"โ‡“",DoubleLeftArrow:"โ‡",DoubleLeftRightArrow:"โ‡”",DoubleLeftTee:"โซค",DoubleLongLeftArrow:"โŸธ",DoubleLongLeftRightArrow:"โŸบ",DoubleLongRightArrow:"โŸน",DoubleRightArrow:"โ‡’",DoubleRightTee:"โŠจ",DoubleUpArrow:"โ‡‘",DoubleUpDownArrow:"โ‡•",DoubleVerticalBar:"โˆฅ",downarrow:"โ†“",Downarrow:"โ‡“",DownArrow:"โ†“",DownArrowBar:"โค“",DownArrowUpArrow:"โ‡ต",DownBreve:"ฬ‘",downdownarrows:"โ‡Š",downharpoonleft:"โ‡ƒ",downharpoonright:"โ‡‚",DownLeftRightVector:"โฅ",DownLeftTeeVector:"โฅž",DownLeftVector:"โ†ฝ",DownLeftVectorBar:"โฅ–",DownRightTeeVector:"โฅŸ",DownRightVector:"โ‡",DownRightVectorBar:"โฅ—",DownTee:"โŠค",DownTeeArrow:"โ†ง",drbkarow:"โค",drcorn:"โŒŸ",drcrop:"โŒŒ",dscr:"๐’น",Dscr:"๐’Ÿ",dscy:"ั•",DScy:"ะ…",dsol:"โงถ",dstrok:"ฤ‘",Dstrok:"ฤ",dtdot:"โ‹ฑ",dtri:"โ–ฟ",dtrif:"โ–พ",duarr:"โ‡ต",duhar:"โฅฏ",dwangle:"โฆฆ",dzcy:"ัŸ",DZcy:"ะ",dzigrarr:"โŸฟ",eacute:"รฉ",Eacute:"ร‰",easter:"โฉฎ",ecaron:"ฤ›",Ecaron:"ฤš",ecir:"โ‰–",ecirc:"รช",Ecirc:"รŠ",ecolon:"โ‰•",ecy:"ั",Ecy:"ะญ",eDDot:"โฉท",edot:"ฤ—",eDot:"โ‰‘",Edot:"ฤ–",ee:"โ…‡",efDot:"โ‰’",efr:"๐”ข",Efr:"๐”ˆ",eg:"โชš",egrave:"รจ",Egrave:"รˆ",egs:"โช–",egsdot:"โช˜",el:"โช™",Element:"โˆˆ",elinters:"โง",ell:"โ„“",els:"โช•",elsdot:"โช—",emacr:"ฤ“",Emacr:"ฤ’",empty:"โˆ…",emptyset:"โˆ…",EmptySmallSquare:"โ—ป",emptyv:"โˆ…",EmptyVerySmallSquare:"โ–ซ",emsp:"โ€ƒ",emsp13:"โ€„",emsp14:"โ€…",eng:"ล‹",ENG:"ลŠ",ensp:"โ€‚",eogon:"ฤ™",Eogon:"ฤ˜",eopf:"๐•–",Eopf:"๐”ผ",epar:"โ‹•",eparsl:"โงฃ",eplus:"โฉฑ",epsi:"ฮต",epsilon:"ฮต",Epsilon:"ฮ•",epsiv:"ฯต",eqcirc:"โ‰–",eqcolon:"โ‰•",eqsim:"โ‰‚",eqslantgtr:"โช–",eqslantless:"โช•",Equal:"โฉต",equals:"=",EqualTilde:"โ‰‚",equest:"โ‰Ÿ",Equilibrium:"โ‡Œ",equiv:"โ‰ก",equivDD:"โฉธ",eqvparsl:"โงฅ",erarr:"โฅฑ",erDot:"โ‰“",escr:"โ„ฏ",Escr:"โ„ฐ",esdot:"โ‰",esim:"โ‰‚",Esim:"โฉณ",eta:"ฮท",Eta:"ฮ—",eth:"รฐ",ETH:"ร",euml:"รซ",Euml:"ร‹",euro:"โ‚ฌ",excl:"!",exist:"โˆƒ",Exists:"โˆƒ",expectation:"โ„ฐ",exponentiale:"โ…‡",ExponentialE:"โ…‡",fallingdotseq:"โ‰’",fcy:"ั„",Fcy:"ะค",female:"โ™€",ffilig:"๏ฌƒ",fflig:"๏ฌ€",ffllig:"๏ฌ„",ffr:"๐”ฃ",Ffr:"๐”‰",filig:"๏ฌ",FilledSmallSquare:"โ—ผ",FilledVerySmallSquare:"โ–ช",fjlig:"fj",flat:"โ™ญ",fllig:"๏ฌ‚",fltns:"โ–ฑ",fnof:"ฦ’",fopf:"๐•—",Fopf:"๐”ฝ",forall:"โˆ€",ForAll:"โˆ€",fork:"โ‹”",forkv:"โซ™",Fouriertrf:"โ„ฑ",fpartint:"โจ",frac12:"ยฝ",frac13:"โ…“",frac14:"ยผ",frac15:"โ…•",frac16:"โ…™",frac18:"โ…›",frac23:"โ…”",frac25:"โ…–",frac34:"ยพ",frac35:"โ…—",frac38:"โ…œ",frac45:"โ…˜",frac56:"โ…š",frac58:"โ…",frac78:"โ…ž",frasl:"โ„",frown:"โŒข",fscr:"๐’ป",Fscr:"โ„ฑ",gacute:"วต",gamma:"ฮณ",Gamma:"ฮ“",gammad:"ฯ",Gammad:"ฯœ",gap:"โช†",gbreve:"ฤŸ",Gbreve:"ฤž",Gcedil:"ฤข",gcirc:"ฤ",Gcirc:"ฤœ",gcy:"ะณ",Gcy:"ะ“",gdot:"ฤก",Gdot:"ฤ ",ge:"โ‰ฅ",gE:"โ‰ง",gel:"โ‹›",gEl:"โชŒ",geq:"โ‰ฅ",geqq:"โ‰ง",geqslant:"โฉพ",ges:"โฉพ",gescc:"โชฉ",gesdot:"โช€",gesdoto:"โช‚",gesdotol:"โช„",gesl:"โ‹›๏ธ€",gesles:"โช”",gfr:"๐”ค",Gfr:"๐”Š",gg:"โ‰ซ",Gg:"โ‹™",ggg:"โ‹™",gimel:"โ„ท",gjcy:"ั“",GJcy:"ะƒ",gl:"โ‰ท",gla:"โชฅ",glE:"โช’",glj:"โชค",gnap:"โชŠ",gnapprox:"โชŠ",gne:"โชˆ",gnE:"โ‰ฉ",gneq:"โชˆ",gneqq:"โ‰ฉ",gnsim:"โ‹ง",gopf:"๐•˜",Gopf:"๐”พ",grave:"`",GreaterEqual:"โ‰ฅ",GreaterEqualLess:"โ‹›",GreaterFullEqual:"โ‰ง",GreaterGreater:"โชข",GreaterLess:"โ‰ท",GreaterSlantEqual:"โฉพ",GreaterTilde:"โ‰ณ",gscr:"โ„Š",Gscr:"๐’ข",gsim:"โ‰ณ",gsime:"โชŽ",gsiml:"โช",gt:">",Gt:"โ‰ซ",GT:">",gtcc:"โชง",gtcir:"โฉบ",gtdot:"โ‹—",gtlPar:"โฆ•",gtquest:"โฉผ",gtrapprox:"โช†",gtrarr:"โฅธ",gtrdot:"โ‹—",gtreqless:"โ‹›",gtreqqless:"โชŒ",gtrless:"โ‰ท",gtrsim:"โ‰ณ",gvertneqq:"โ‰ฉ๏ธ€",gvnE:"โ‰ฉ๏ธ€",Hacek:"ห‡",hairsp:"โ€Š",half:"ยฝ",hamilt:"โ„‹",hardcy:"ัŠ",HARDcy:"ะช",harr:"โ†”",hArr:"โ‡”",harrcir:"โฅˆ",harrw:"โ†ญ",Hat:"^",hbar:"โ„",hcirc:"ฤฅ",Hcirc:"ฤค",hearts:"โ™ฅ",heartsuit:"โ™ฅ",hellip:"โ€ฆ",hercon:"โŠน",hfr:"๐”ฅ",Hfr:"โ„Œ",HilbertSpace:"โ„‹",hksearow:"โคฅ",hkswarow:"โคฆ",hoarr:"โ‡ฟ",homtht:"โˆป",hookleftarrow:"โ†ฉ",hookrightarrow:"โ†ช",hopf:"๐•™",Hopf:"โ„",horbar:"โ€•",HorizontalLine:"โ”€",hscr:"๐’ฝ",Hscr:"โ„‹",hslash:"โ„",hstrok:"ฤง",Hstrok:"ฤฆ",HumpDownHump:"โ‰Ž",HumpEqual:"โ‰",hybull:"โƒ",hyphen:"โ€",iacute:"รญ",Iacute:"ร",ic:"โฃ",icirc:"รฎ",Icirc:"รŽ",icy:"ะธ",Icy:"ะ˜",Idot:"ฤฐ",iecy:"ะต",IEcy:"ะ•",iexcl:"ยก",iff:"โ‡”",ifr:"๐”ฆ",Ifr:"โ„‘",igrave:"รฌ",Igrave:"รŒ",ii:"โ…ˆ",iiiint:"โจŒ",iiint:"โˆญ",iinfin:"โงœ",iiota:"โ„ฉ",ijlig:"ฤณ",IJlig:"ฤฒ",Im:"โ„‘",imacr:"ฤซ",Imacr:"ฤช",image:"โ„‘",ImaginaryI:"โ…ˆ",imagline:"โ„",imagpart:"โ„‘",imath:"ฤฑ",imof:"โŠท",imped:"ฦต",Implies:"โ‡’",in:"โˆˆ",incare:"โ„…",infin:"โˆž",infintie:"โง",inodot:"ฤฑ",int:"โˆซ",Int:"โˆฌ",intcal:"โŠบ",integers:"โ„ค",Integral:"โˆซ",intercal:"โŠบ",Intersection:"โ‹‚",intlarhk:"โจ—",intprod:"โจผ",InvisibleComma:"โฃ",InvisibleTimes:"โข",iocy:"ั‘",IOcy:"ะ",iogon:"ฤฏ",Iogon:"ฤฎ",iopf:"๐•š",Iopf:"๐•€",iota:"ฮน",Iota:"ฮ™",iprod:"โจผ",iquest:"ยฟ",iscr:"๐’พ",Iscr:"โ„",isin:"โˆˆ",isindot:"โ‹ต",isinE:"โ‹น",isins:"โ‹ด",isinsv:"โ‹ณ",isinv:"โˆˆ",it:"โข",itilde:"ฤฉ",Itilde:"ฤจ",iukcy:"ั–",Iukcy:"ะ†",iuml:"รฏ",Iuml:"ร",jcirc:"ฤต",Jcirc:"ฤด",jcy:"ะน",Jcy:"ะ™",jfr:"๐”ง",Jfr:"๐”",jmath:"ศท",jopf:"๐•›",Jopf:"๐•",jscr:"๐’ฟ",Jscr:"๐’ฅ",jsercy:"ั˜",Jsercy:"ะˆ",jukcy:"ั”",Jukcy:"ะ„",kappa:"ฮบ",Kappa:"ฮš",kappav:"ฯฐ",kcedil:"ฤท",Kcedil:"ฤถ",kcy:"ะบ",Kcy:"ะš",kfr:"๐”จ",Kfr:"๐”Ž",kgreen:"ฤธ",khcy:"ั…",KHcy:"ะฅ",kjcy:"ัœ",KJcy:"ะŒ",kopf:"๐•œ",Kopf:"๐•‚",kscr:"๐“€",Kscr:"๐’ฆ",lAarr:"โ‡š",lacute:"ฤบ",Lacute:"ฤน",laemptyv:"โฆด",lagran:"โ„’",lambda:"ฮป",Lambda:"ฮ›",lang:"โŸจ",Lang:"โŸช",langd:"โฆ‘",langle:"โŸจ",lap:"โช…",Laplacetrf:"โ„’",laquo:"ยซ",larr:"โ†",lArr:"โ‡",Larr:"โ†ž",larrb:"โ‡ค",larrbfs:"โคŸ",larrfs:"โค",larrhk:"โ†ฉ",larrlp:"โ†ซ",larrpl:"โคน",larrsim:"โฅณ",larrtl:"โ†ข",lat:"โชซ",latail:"โค™",lAtail:"โค›",late:"โชญ",lates:"โชญ๏ธ€",lbarr:"โคŒ",lBarr:"โคŽ",lbbrk:"โฒ",lbrace:"{",lbrack:"[",lbrke:"โฆ‹",lbrksld:"โฆ",lbrkslu:"โฆ",lcaron:"ฤพ",Lcaron:"ฤฝ",lcedil:"ฤผ",Lcedil:"ฤป",lceil:"โŒˆ",lcub:"{",lcy:"ะป",Lcy:"ะ›",ldca:"โคถ",ldquo:"โ€œ",ldquor:"โ€ž",ldrdhar:"โฅง",ldrushar:"โฅ‹",ldsh:"โ†ฒ",le:"โ‰ค",lE:"โ‰ฆ",LeftAngleBracket:"โŸจ",leftarrow:"โ†",Leftarrow:"โ‡",LeftArrow:"โ†",LeftArrowBar:"โ‡ค",LeftArrowRightArrow:"โ‡†",leftarrowtail:"โ†ข",LeftCeiling:"โŒˆ",LeftDoubleBracket:"โŸฆ",LeftDownTeeVector:"โฅก",LeftDownVector:"โ‡ƒ",LeftDownVectorBar:"โฅ™",LeftFloor:"โŒŠ",leftharpoondown:"โ†ฝ",leftharpoonup:"โ†ผ",leftleftarrows:"โ‡‡",leftrightarrow:"โ†”",Leftrightarrow:"โ‡”",LeftRightArrow:"โ†”",leftrightarrows:"โ‡†",leftrightharpoons:"โ‡‹",leftrightsquigarrow:"โ†ญ",LeftRightVector:"โฅŽ",LeftTee:"โŠฃ",LeftTeeArrow:"โ†ค",LeftTeeVector:"โฅš",leftthreetimes:"โ‹‹",LeftTriangle:"โŠฒ",LeftTriangleBar:"โง",LeftTriangleEqual:"โŠด",LeftUpDownVector:"โฅ‘",LeftUpTeeVector:"โฅ ",LeftUpVector:"โ†ฟ",LeftUpVectorBar:"โฅ˜",LeftVector:"โ†ผ",LeftVectorBar:"โฅ’",leg:"โ‹š",lEg:"โช‹",leq:"โ‰ค",leqq:"โ‰ฆ",leqslant:"โฉฝ",les:"โฉฝ",lescc:"โชจ",lesdot:"โฉฟ",lesdoto:"โช",lesdotor:"โชƒ",lesg:"โ‹š๏ธ€",lesges:"โช“",lessapprox:"โช…",lessdot:"โ‹–",lesseqgtr:"โ‹š",lesseqqgtr:"โช‹",LessEqualGreater:"โ‹š",LessFullEqual:"โ‰ฆ",LessGreater:"โ‰ถ",lessgtr:"โ‰ถ",LessLess:"โชก",lesssim:"โ‰ฒ",LessSlantEqual:"โฉฝ",LessTilde:"โ‰ฒ",lfisht:"โฅผ",lfloor:"โŒŠ",lfr:"๐”ฉ",Lfr:"๐”",lg:"โ‰ถ",lgE:"โช‘",lHar:"โฅข",lhard:"โ†ฝ",lharu:"โ†ผ",lharul:"โฅช",lhblk:"โ–„",ljcy:"ั™",LJcy:"ะ‰",ll:"โ‰ช",Ll:"โ‹˜",llarr:"โ‡‡",llcorner:"โŒž",Lleftarrow:"โ‡š",llhard:"โฅซ",lltri:"โ—บ",lmidot:"ล€",Lmidot:"ฤฟ",lmoust:"โŽฐ",lmoustache:"โŽฐ",lnap:"โช‰",lnapprox:"โช‰",lne:"โช‡",lnE:"โ‰จ",lneq:"โช‡",lneqq:"โ‰จ",lnsim:"โ‹ฆ",loang:"โŸฌ",loarr:"โ‡ฝ",lobrk:"โŸฆ",longleftarrow:"โŸต",Longleftarrow:"โŸธ",LongLeftArrow:"โŸต",longleftrightarrow:"โŸท",Longleftrightarrow:"โŸบ",LongLeftRightArrow:"โŸท",longmapsto:"โŸผ",longrightarrow:"โŸถ",Longrightarrow:"โŸน",LongRightArrow:"โŸถ",looparrowleft:"โ†ซ",looparrowright:"โ†ฌ",lopar:"โฆ…",lopf:"๐•",Lopf:"๐•ƒ",loplus:"โจญ",lotimes:"โจด",lowast:"โˆ—",lowbar:"_",LowerLeftArrow:"โ†™",LowerRightArrow:"โ†˜",loz:"โ—Š",lozenge:"โ—Š",lozf:"โงซ",lpar:"(",lparlt:"โฆ“",lrarr:"โ‡†",lrcorner:"โŒŸ",lrhar:"โ‡‹",lrhard:"โฅญ",lrm:"โ€Ž",lrtri:"โŠฟ",lsaquo:"โ€น",lscr:"๐“",Lscr:"โ„’",lsh:"โ†ฐ",Lsh:"โ†ฐ",lsim:"โ‰ฒ",lsime:"โช",lsimg:"โช",lsqb:"[",lsquo:"โ€˜",lsquor:"โ€š",lstrok:"ล‚",Lstrok:"ล",lt:"<",Lt:"โ‰ช",LT:"<",ltcc:"โชฆ",ltcir:"โฉน",ltdot:"โ‹–",lthree:"โ‹‹",ltimes:"โ‹‰",ltlarr:"โฅถ",ltquest:"โฉป",ltri:"โ—ƒ",ltrie:"โŠด",ltrif:"โ—‚",ltrPar:"โฆ–",lurdshar:"โฅŠ",luruhar:"โฅฆ",lvertneqq:"โ‰จ๏ธ€",lvnE:"โ‰จ๏ธ€",macr:"ยฏ",male:"โ™‚",malt:"โœ ",maltese:"โœ ",map:"โ†ฆ",Map:"โค…",mapsto:"โ†ฆ",mapstodown:"โ†ง",mapstoleft:"โ†ค",mapstoup:"โ†ฅ",marker:"โ–ฎ",mcomma:"โจฉ",mcy:"ะผ",Mcy:"ะœ",mdash:"โ€”",mDDot:"โˆบ",measuredangle:"โˆก",MediumSpace:"โŸ",Mellintrf:"โ„ณ",mfr:"๐”ช",Mfr:"๐”",mho:"โ„ง",micro:"ยต",mid:"โˆฃ",midast:"*",midcir:"โซฐ",middot:"ยท",minus:"โˆ’",minusb:"โŠŸ",minusd:"โˆธ",minusdu:"โจช",MinusPlus:"โˆ“",mlcp:"โซ›",mldr:"โ€ฆ",mnplus:"โˆ“",models:"โŠง",mopf:"๐•ž",Mopf:"๐•„",mp:"โˆ“",mscr:"๐“‚",Mscr:"โ„ณ",mstpos:"โˆพ",mu:"ฮผ",Mu:"ฮœ",multimap:"โŠธ",mumap:"โŠธ",nabla:"โˆ‡",nacute:"ล„",Nacute:"ลƒ",nang:"โˆ โƒ’",nap:"โ‰‰",napE:"โฉฐฬธ",napid:"โ‰‹ฬธ",napos:"ล‰",napprox:"โ‰‰",natur:"โ™ฎ",natural:"โ™ฎ",naturals:"โ„•",nbsp:"ย ",nbump:"โ‰Žฬธ",nbumpe:"โ‰ฬธ",ncap:"โฉƒ",ncaron:"ลˆ",Ncaron:"ล‡",ncedil:"ล†",Ncedil:"ล…",ncong:"โ‰‡",ncongdot:"โฉญฬธ",ncup:"โฉ‚",ncy:"ะฝ",Ncy:"ะ",ndash:"โ€“",ne:"โ‰ ",nearhk:"โคค",nearr:"โ†—",neArr:"โ‡—",nearrow:"โ†—",nedot:"โ‰ฬธ",NegativeMediumSpace:"โ€‹",NegativeThickSpace:"โ€‹",NegativeThinSpace:"โ€‹",NegativeVeryThinSpace:"โ€‹",nequiv:"โ‰ข",nesear:"โคจ",nesim:"โ‰‚ฬธ",NestedGreaterGreater:"โ‰ซ",NestedLessLess:"โ‰ช",NewLine:"\n",nexist:"โˆ„",nexists:"โˆ„",nfr:"๐”ซ",Nfr:"๐”‘",nge:"โ‰ฑ",ngE:"โ‰งฬธ",ngeq:"โ‰ฑ",ngeqq:"โ‰งฬธ",ngeqslant:"โฉพฬธ",nges:"โฉพฬธ",nGg:"โ‹™ฬธ",ngsim:"โ‰ต",ngt:"โ‰ฏ",nGt:"โ‰ซโƒ’",ngtr:"โ‰ฏ",nGtv:"โ‰ซฬธ",nharr:"โ†ฎ",nhArr:"โ‡Ž",nhpar:"โซฒ",ni:"โˆ‹",nis:"โ‹ผ",nisd:"โ‹บ",niv:"โˆ‹",njcy:"ัš",NJcy:"ะŠ",nlarr:"โ†š",nlArr:"โ‡",nldr:"โ€ฅ",nle:"โ‰ฐ",nlE:"โ‰ฆฬธ",nleftarrow:"โ†š",nLeftarrow:"โ‡",nleftrightarrow:"โ†ฎ",nLeftrightarrow:"โ‡Ž",nleq:"โ‰ฐ",nleqq:"โ‰ฆฬธ",nleqslant:"โฉฝฬธ",nles:"โฉฝฬธ",nless:"โ‰ฎ",nLl:"โ‹˜ฬธ",nlsim:"โ‰ด",nlt:"โ‰ฎ",nLt:"โ‰ชโƒ’",nltri:"โ‹ช",nltrie:"โ‹ฌ",nLtv:"โ‰ชฬธ",nmid:"โˆค",NoBreak:"โ ",NonBreakingSpace:"ย ",nopf:"๐•Ÿ",Nopf:"โ„•",not:"ยฌ",Not:"โซฌ",NotCongruent:"โ‰ข",NotCupCap:"โ‰ญ",NotDoubleVerticalBar:"โˆฆ",NotElement:"โˆ‰",NotEqual:"โ‰ ",NotEqualTilde:"โ‰‚ฬธ",NotExists:"โˆ„",NotGreater:"โ‰ฏ",NotGreaterEqual:"โ‰ฑ",NotGreaterFullEqual:"โ‰งฬธ",NotGreaterGreater:"โ‰ซฬธ",NotGreaterLess:"โ‰น",NotGreaterSlantEqual:"โฉพฬธ",NotGreaterTilde:"โ‰ต",NotHumpDownHump:"โ‰Žฬธ",NotHumpEqual:"โ‰ฬธ",notin:"โˆ‰",notindot:"โ‹ตฬธ",notinE:"โ‹นฬธ",notinva:"โˆ‰",notinvb:"โ‹ท",notinvc:"โ‹ถ",NotLeftTriangle:"โ‹ช",NotLeftTriangleBar:"โงฬธ",NotLeftTriangleEqual:"โ‹ฌ",NotLess:"โ‰ฎ",NotLessEqual:"โ‰ฐ",NotLessGreater:"โ‰ธ",NotLessLess:"โ‰ชฬธ",NotLessSlantEqual:"โฉฝฬธ",NotLessTilde:"โ‰ด",NotNestedGreaterGreater:"โชขฬธ",NotNestedLessLess:"โชกฬธ",notni:"โˆŒ",notniva:"โˆŒ",notnivb:"โ‹พ",notnivc:"โ‹ฝ",NotPrecedes:"โŠ€",NotPrecedesEqual:"โชฏฬธ",NotPrecedesSlantEqual:"โ‹ ",NotReverseElement:"โˆŒ",NotRightTriangle:"โ‹ซ",NotRightTriangleBar:"โงฬธ",NotRightTriangleEqual:"โ‹ญ",NotSquareSubset:"โŠฬธ",NotSquareSubsetEqual:"โ‹ข",NotSquareSuperset:"โŠฬธ",NotSquareSupersetEqual:"โ‹ฃ",NotSubset:"โŠ‚โƒ’",NotSubsetEqual:"โŠˆ",NotSucceeds:"โŠ",NotSucceedsEqual:"โชฐฬธ",NotSucceedsSlantEqual:"โ‹ก",NotSucceedsTilde:"โ‰ฟฬธ",NotSuperset:"โŠƒโƒ’",NotSupersetEqual:"โŠ‰",NotTilde:"โ‰",NotTildeEqual:"โ‰„",NotTildeFullEqual:"โ‰‡",NotTildeTilde:"โ‰‰",NotVerticalBar:"โˆค",npar:"โˆฆ",nparallel:"โˆฆ",nparsl:"โซฝโƒฅ",npart:"โˆ‚ฬธ",npolint:"โจ”",npr:"โŠ€",nprcue:"โ‹ ",npre:"โชฏฬธ",nprec:"โŠ€",npreceq:"โชฏฬธ",nrarr:"โ†›",nrArr:"โ‡",nrarrc:"โคณฬธ",nrarrw:"โ†ฬธ",nrightarrow:"โ†›",nRightarrow:"โ‡",nrtri:"โ‹ซ",nrtrie:"โ‹ญ",nsc:"โŠ",nsccue:"โ‹ก",nsce:"โชฐฬธ",nscr:"๐“ƒ",Nscr:"๐’ฉ",nshortmid:"โˆค",nshortparallel:"โˆฆ",nsim:"โ‰",nsime:"โ‰„",nsimeq:"โ‰„",nsmid:"โˆค",nspar:"โˆฆ",nsqsube:"โ‹ข",nsqsupe:"โ‹ฃ",nsub:"โŠ„",nsube:"โŠˆ",nsubE:"โซ…ฬธ",nsubset:"โŠ‚โƒ’",nsubseteq:"โŠˆ",nsubseteqq:"โซ…ฬธ",nsucc:"โŠ",nsucceq:"โชฐฬธ",nsup:"โŠ…",nsupe:"โŠ‰",nsupE:"โซ†ฬธ",nsupset:"โŠƒโƒ’",nsupseteq:"โŠ‰",nsupseteqq:"โซ†ฬธ",ntgl:"โ‰น",ntilde:"รฑ",Ntilde:"ร‘",ntlg:"โ‰ธ",ntriangleleft:"โ‹ช",ntrianglelefteq:"โ‹ฌ",ntriangleright:"โ‹ซ",ntrianglerighteq:"โ‹ญ",nu:"ฮฝ",Nu:"ฮ",num:"#",numero:"โ„–",numsp:"โ€‡",nvap:"โ‰โƒ’",nvdash:"โŠฌ",nvDash:"โŠญ",nVdash:"โŠฎ",nVDash:"โŠฏ",nvge:"โ‰ฅโƒ’",nvgt:">โƒ’",nvHarr:"โค„",nvinfin:"โงž",nvlArr:"โค‚",nvle:"โ‰คโƒ’",nvlt:"<โƒ’",nvltrie:"โŠดโƒ’",nvrArr:"โคƒ",nvrtrie:"โŠตโƒ’",nvsim:"โˆผโƒ’",nwarhk:"โคฃ",nwarr:"โ†–",nwArr:"โ‡–",nwarrow:"โ†–",nwnear:"โคง",oacute:"รณ",Oacute:"ร“",oast:"โŠ›",ocir:"โŠš",ocirc:"รด",Ocirc:"ร”",ocy:"ะพ",Ocy:"ะž",odash:"โŠ",odblac:"ล‘",Odblac:"ล",odiv:"โจธ",odot:"โŠ™",odsold:"โฆผ",oelig:"ล“",OElig:"ล’",ofcir:"โฆฟ",ofr:"๐”ฌ",Ofr:"๐”’",ogon:"ห›",ograve:"รฒ",Ograve:"ร’",ogt:"โง",ohbar:"โฆต",ohm:"ฮฉ",oint:"โˆฎ",olarr:"โ†บ",olcir:"โฆพ",olcross:"โฆป",oline:"โ€พ",olt:"โง€",omacr:"ล",Omacr:"ลŒ",omega:"ฯ‰",Omega:"ฮฉ",omicron:"ฮฟ",Omicron:"ฮŸ",omid:"โฆถ",ominus:"โŠ–",oopf:"๐• ",Oopf:"๐•†",opar:"โฆท",OpenCurlyDoubleQuote:"โ€œ",OpenCurlyQuote:"โ€˜",operp:"โฆน",oplus:"โŠ•",or:"โˆจ",Or:"โฉ”",orarr:"โ†ป",ord:"โฉ",order:"โ„ด",orderof:"โ„ด",ordf:"ยช",ordm:"ยบ",origof:"โŠถ",oror:"โฉ–",orslope:"โฉ—",orv:"โฉ›",oS:"โ“ˆ",oscr:"โ„ด",Oscr:"๐’ช",oslash:"รธ",Oslash:"ร˜",osol:"โŠ˜",otilde:"รต",Otilde:"ร•",otimes:"โŠ—",Otimes:"โจท",otimesas:"โจถ",ouml:"รถ",Ouml:"ร–",ovbar:"โŒฝ",OverBar:"โ€พ",OverBrace:"โž",OverBracket:"โŽด",OverParenthesis:"โœ",par:"โˆฅ",para:"ยถ",parallel:"โˆฅ",parsim:"โซณ",parsl:"โซฝ",part:"โˆ‚",PartialD:"โˆ‚",pcy:"ะฟ",Pcy:"ะŸ",percnt:"%",period:".",permil:"โ€ฐ",perp:"โŠฅ",pertenk:"โ€ฑ",pfr:"๐”ญ",Pfr:"๐”“",phi:"ฯ†",Phi:"ฮฆ",phiv:"ฯ•",phmmat:"โ„ณ",phone:"โ˜Ž",pi:"ฯ€",Pi:"ฮ ",pitchfork:"โ‹”",piv:"ฯ–",planck:"โ„",planckh:"โ„Ž",plankv:"โ„",plus:"+",plusacir:"โจฃ",plusb:"โŠž",pluscir:"โจข",plusdo:"โˆ”",plusdu:"โจฅ",pluse:"โฉฒ",PlusMinus:"ยฑ",plusmn:"ยฑ",plussim:"โจฆ",plustwo:"โจง",pm:"ยฑ",Poincareplane:"โ„Œ",pointint:"โจ•",popf:"๐•ก",Popf:"โ„™",pound:"ยฃ",pr:"โ‰บ",Pr:"โชป",prap:"โชท",prcue:"โ‰ผ",pre:"โชฏ",prE:"โชณ",prec:"โ‰บ",precapprox:"โชท",preccurlyeq:"โ‰ผ",Precedes:"โ‰บ",PrecedesEqual:"โชฏ",PrecedesSlantEqual:"โ‰ผ",PrecedesTilde:"โ‰พ",preceq:"โชฏ",precnapprox:"โชน",precneqq:"โชต",precnsim:"โ‹จ",precsim:"โ‰พ",prime:"โ€ฒ",Prime:"โ€ณ",primes:"โ„™",prnap:"โชน",prnE:"โชต",prnsim:"โ‹จ",prod:"โˆ",Product:"โˆ",profalar:"โŒฎ",profline:"โŒ’",profsurf:"โŒ“",prop:"โˆ",Proportion:"โˆท",Proportional:"โˆ",propto:"โˆ",prsim:"โ‰พ",prurel:"โŠฐ",pscr:"๐“…",Pscr:"๐’ซ",psi:"ฯˆ",Psi:"ฮจ",puncsp:"โ€ˆ",qfr:"๐”ฎ",Qfr:"๐””",qint:"โจŒ",qopf:"๐•ข",Qopf:"โ„š",qprime:"โ—",qscr:"๐“†",Qscr:"๐’ฌ",quaternions:"โ„",quatint:"โจ–",quest:"?",questeq:"โ‰Ÿ",quot:'"',QUOT:'"',rAarr:"โ‡›",race:"โˆฝฬฑ",racute:"ล•",Racute:"ล”",radic:"โˆš",raemptyv:"โฆณ",rang:"โŸฉ",Rang:"โŸซ",rangd:"โฆ’",range:"โฆฅ",rangle:"โŸฉ",raquo:"ยป",rarr:"โ†’",rArr:"โ‡’",Rarr:"โ† ",rarrap:"โฅต",rarrb:"โ‡ฅ",rarrbfs:"โค ",rarrc:"โคณ",rarrfs:"โคž",rarrhk:"โ†ช",rarrlp:"โ†ฌ",rarrpl:"โฅ…",rarrsim:"โฅด",rarrtl:"โ†ฃ",Rarrtl:"โค–",rarrw:"โ†",ratail:"โคš",rAtail:"โคœ",ratio:"โˆถ",rationals:"โ„š",rbarr:"โค",rBarr:"โค",RBarr:"โค",rbbrk:"โณ",rbrace:"}",rbrack:"]",rbrke:"โฆŒ",rbrksld:"โฆŽ",rbrkslu:"โฆ",rcaron:"ล™",Rcaron:"ล˜",rcedil:"ล—",Rcedil:"ล–",rceil:"โŒ‰",rcub:"}",rcy:"ั€",Rcy:"ะ ",rdca:"โคท",rdldhar:"โฅฉ",rdquo:"โ€",rdquor:"โ€",rdsh:"โ†ณ",Re:"โ„œ",real:"โ„œ",realine:"โ„›",realpart:"โ„œ",reals:"โ„",rect:"โ–ญ",reg:"ยฎ",REG:"ยฎ",ReverseElement:"โˆ‹",ReverseEquilibrium:"โ‡‹",ReverseUpEquilibrium:"โฅฏ",rfisht:"โฅฝ",rfloor:"โŒ‹",rfr:"๐”ฏ",Rfr:"โ„œ",rHar:"โฅค",rhard:"โ‡",rharu:"โ‡€",rharul:"โฅฌ",rho:"ฯ",Rho:"ฮก",rhov:"ฯฑ",RightAngleBracket:"โŸฉ",rightarrow:"โ†’",Rightarrow:"โ‡’",RightArrow:"โ†’",RightArrowBar:"โ‡ฅ",RightArrowLeftArrow:"โ‡„",rightarrowtail:"โ†ฃ",RightCeiling:"โŒ‰",RightDoubleBracket:"โŸง",RightDownTeeVector:"โฅ",RightDownVector:"โ‡‚",RightDownVectorBar:"โฅ•",RightFloor:"โŒ‹",rightharpoondown:"โ‡",rightharpoonup:"โ‡€",rightleftarrows:"โ‡„",rightleftharpoons:"โ‡Œ",rightrightarrows:"โ‡‰",rightsquigarrow:"โ†",RightTee:"โŠข",RightTeeArrow:"โ†ฆ",RightTeeVector:"โฅ›",rightthreetimes:"โ‹Œ",RightTriangle:"โŠณ",RightTriangleBar:"โง",RightTriangleEqual:"โŠต",RightUpDownVector:"โฅ",RightUpTeeVector:"โฅœ",RightUpVector:"โ†พ",RightUpVectorBar:"โฅ”",RightVector:"โ‡€",RightVectorBar:"โฅ“",ring:"หš",risingdotseq:"โ‰“",rlarr:"โ‡„",rlhar:"โ‡Œ",rlm:"โ€",rmoust:"โŽฑ",rmoustache:"โŽฑ",rnmid:"โซฎ",roang:"โŸญ",roarr:"โ‡พ",robrk:"โŸง",ropar:"โฆ†",ropf:"๐•ฃ",Ropf:"โ„",roplus:"โจฎ",rotimes:"โจต",RoundImplies:"โฅฐ",rpar:")",rpargt:"โฆ”",rppolint:"โจ’",rrarr:"โ‡‰",Rrightarrow:"โ‡›",rsaquo:"โ€บ",rscr:"๐“‡",Rscr:"โ„›",rsh:"โ†ฑ",Rsh:"โ†ฑ",rsqb:"]",rsquo:"โ€™",rsquor:"โ€™",rthree:"โ‹Œ",rtimes:"โ‹Š",rtri:"โ–น",rtrie:"โŠต",rtrif:"โ–ธ",rtriltri:"โงŽ",RuleDelayed:"โงด",ruluhar:"โฅจ",rx:"โ„ž",sacute:"ล›",Sacute:"ลš",sbquo:"โ€š",sc:"โ‰ป",Sc:"โชผ",scap:"โชธ",scaron:"ลก",Scaron:"ล ",sccue:"โ‰ฝ",sce:"โชฐ",scE:"โชด",scedil:"ลŸ",Scedil:"ลž",scirc:"ล",Scirc:"ลœ",scnap:"โชบ",scnE:"โชถ",scnsim:"โ‹ฉ",scpolint:"โจ“",scsim:"โ‰ฟ",scy:"ั",Scy:"ะก",sdot:"โ‹…",sdotb:"โŠก",sdote:"โฉฆ",searhk:"โคฅ",searr:"โ†˜",seArr:"โ‡˜",searrow:"โ†˜",sect:"ยง",semi:";",seswar:"โคฉ",setminus:"โˆ–",setmn:"โˆ–",sext:"โœถ",sfr:"๐”ฐ",Sfr:"๐”–",sfrown:"โŒข",sharp:"โ™ฏ",shchcy:"ั‰",SHCHcy:"ะฉ",shcy:"ัˆ",SHcy:"ะจ",ShortDownArrow:"โ†“",ShortLeftArrow:"โ†",shortmid:"โˆฃ",shortparallel:"โˆฅ",ShortRightArrow:"โ†’",ShortUpArrow:"โ†‘",shy:"ยญ",sigma:"ฯƒ",Sigma:"ฮฃ",sigmaf:"ฯ‚",sigmav:"ฯ‚",sim:"โˆผ",simdot:"โฉช",sime:"โ‰ƒ",simeq:"โ‰ƒ",simg:"โชž",simgE:"โช ",siml:"โช",simlE:"โชŸ",simne:"โ‰†",simplus:"โจค",simrarr:"โฅฒ",slarr:"โ†",SmallCircle:"โˆ˜",smallsetminus:"โˆ–",smashp:"โจณ",smeparsl:"โงค",smid:"โˆฃ",smile:"โŒฃ",smt:"โชช",smte:"โชฌ",smtes:"โชฌ๏ธ€",softcy:"ัŒ",SOFTcy:"ะฌ",sol:"/",solb:"โง„",solbar:"โŒฟ",sopf:"๐•ค",Sopf:"๐•Š",spades:"โ™ ",spadesuit:"โ™ ",spar:"โˆฅ",sqcap:"โŠ“",sqcaps:"โŠ“๏ธ€",sqcup:"โŠ”",sqcups:"โŠ”๏ธ€",Sqrt:"โˆš",sqsub:"โŠ",sqsube:"โŠ‘",sqsubset:"โŠ",sqsubseteq:"โŠ‘",sqsup:"โŠ",sqsupe:"โŠ’",sqsupset:"โŠ",sqsupseteq:"โŠ’",squ:"โ–ก",square:"โ–ก",Square:"โ–ก",SquareIntersection:"โŠ“",SquareSubset:"โŠ",SquareSubsetEqual:"โŠ‘",SquareSuperset:"โŠ",SquareSupersetEqual:"โŠ’",SquareUnion:"โŠ”",squarf:"โ–ช",squf:"โ–ช",srarr:"โ†’",sscr:"๐“ˆ",Sscr:"๐’ฎ",ssetmn:"โˆ–",ssmile:"โŒฃ",sstarf:"โ‹†",star:"โ˜†",Star:"โ‹†",starf:"โ˜…",straightepsilon:"ฯต",straightphi:"ฯ•",strns:"ยฏ",sub:"โŠ‚",Sub:"โ‹",subdot:"โชฝ",sube:"โŠ†",subE:"โซ…",subedot:"โซƒ",submult:"โซ",subne:"โŠŠ",subnE:"โซ‹",subplus:"โชฟ",subrarr:"โฅน",subset:"โŠ‚",Subset:"โ‹",subseteq:"โŠ†",subseteqq:"โซ…",SubsetEqual:"โŠ†",subsetneq:"โŠŠ",subsetneqq:"โซ‹",subsim:"โซ‡",subsub:"โซ•",subsup:"โซ“",succ:"โ‰ป",succapprox:"โชธ",succcurlyeq:"โ‰ฝ",Succeeds:"โ‰ป",SucceedsEqual:"โชฐ",SucceedsSlantEqual:"โ‰ฝ",SucceedsTilde:"โ‰ฟ",succeq:"โชฐ",succnapprox:"โชบ",succneqq:"โชถ",succnsim:"โ‹ฉ",succsim:"โ‰ฟ",SuchThat:"โˆ‹",sum:"โˆ‘",Sum:"โˆ‘",sung:"โ™ช",sup:"โŠƒ",Sup:"โ‹‘",sup1:"ยน",sup2:"ยฒ",sup3:"ยณ",supdot:"โชพ",supdsub:"โซ˜",supe:"โŠ‡",supE:"โซ†",supedot:"โซ„",Superset:"โŠƒ",SupersetEqual:"โŠ‡",suphsol:"โŸ‰",suphsub:"โซ—",suplarr:"โฅป",supmult:"โซ‚",supne:"โŠ‹",supnE:"โซŒ",supplus:"โซ€",supset:"โŠƒ",Supset:"โ‹‘",supseteq:"โŠ‡",supseteqq:"โซ†",supsetneq:"โŠ‹",supsetneqq:"โซŒ",supsim:"โซˆ",supsub:"โซ”",supsup:"โซ–",swarhk:"โคฆ",swarr:"โ†™",swArr:"โ‡™",swarrow:"โ†™",swnwar:"โคช",szlig:"รŸ",Tab:"\t",target:"โŒ–",tau:"ฯ„",Tau:"ฮค",tbrk:"โŽด",tcaron:"ลฅ",Tcaron:"ลค",tcedil:"ลฃ",Tcedil:"ลข",tcy:"ั‚",Tcy:"ะข",tdot:"โƒ›",telrec:"โŒ•",tfr:"๐”ฑ",Tfr:"๐”—",there4:"โˆด",therefore:"โˆด",Therefore:"โˆด",theta:"ฮธ",Theta:"ฮ˜",thetasym:"ฯ‘",thetav:"ฯ‘",thickapprox:"โ‰ˆ",thicksim:"โˆผ",ThickSpace:"โŸโ€Š",thinsp:"โ€‰",ThinSpace:"โ€‰",thkap:"โ‰ˆ",thksim:"โˆผ",thorn:"รพ",THORN:"รž",tilde:"หœ",Tilde:"โˆผ",TildeEqual:"โ‰ƒ",TildeFullEqual:"โ‰…",TildeTilde:"โ‰ˆ",times:"ร—",timesb:"โŠ ",timesbar:"โจฑ",timesd:"โจฐ",tint:"โˆญ",toea:"โคจ",top:"โŠค",topbot:"โŒถ",topcir:"โซฑ",topf:"๐•ฅ",Topf:"๐•‹",topfork:"โซš",tosa:"โคฉ",tprime:"โ€ด",trade:"โ„ข",TRADE:"โ„ข",triangle:"โ–ต",triangledown:"โ–ฟ",triangleleft:"โ—ƒ",trianglelefteq:"โŠด",triangleq:"โ‰œ",triangleright:"โ–น",trianglerighteq:"โŠต",tridot:"โ—ฌ",trie:"โ‰œ",triminus:"โจบ",TripleDot:"โƒ›",triplus:"โจน",trisb:"โง",tritime:"โจป",trpezium:"โข",tscr:"๐“‰",Tscr:"๐’ฏ",tscy:"ั†",TScy:"ะฆ",tshcy:"ั›",TSHcy:"ะ‹",tstrok:"ลง",Tstrok:"ลฆ",twixt:"โ‰ฌ",twoheadleftarrow:"โ†ž",twoheadrightarrow:"โ† ",uacute:"รบ",Uacute:"รš",uarr:"โ†‘",uArr:"โ‡‘",Uarr:"โ†Ÿ",Uarrocir:"โฅ‰",ubrcy:"ัž",Ubrcy:"ะŽ",ubreve:"ลญ",Ubreve:"ลฌ",ucirc:"รป",Ucirc:"ร›",ucy:"ัƒ",Ucy:"ะฃ",udarr:"โ‡…",udblac:"ลฑ",Udblac:"ลฐ",udhar:"โฅฎ",ufisht:"โฅพ",ufr:"๐”ฒ",Ufr:"๐”˜",ugrave:"รน",Ugrave:"ร™",uHar:"โฅฃ",uharl:"โ†ฟ",uharr:"โ†พ",uhblk:"โ–€",ulcorn:"โŒœ",ulcorner:"โŒœ",ulcrop:"โŒ",ultri:"โ—ธ",umacr:"ลซ",Umacr:"ลช",uml:"ยจ",UnderBar:"_",UnderBrace:"โŸ",UnderBracket:"โŽต",UnderParenthesis:"โ",Union:"โ‹ƒ",UnionPlus:"โŠŽ",uogon:"ลณ",Uogon:"ลฒ",uopf:"๐•ฆ",Uopf:"๐•Œ",uparrow:"โ†‘",Uparrow:"โ‡‘",UpArrow:"โ†‘",UpArrowBar:"โค’",UpArrowDownArrow:"โ‡…",updownarrow:"โ†•",Updownarrow:"โ‡•",UpDownArrow:"โ†•",UpEquilibrium:"โฅฎ",upharpoonleft:"โ†ฟ",upharpoonright:"โ†พ",uplus:"โŠŽ",UpperLeftArrow:"โ†–",UpperRightArrow:"โ†—",upsi:"ฯ…",Upsi:"ฯ’",upsih:"ฯ’",upsilon:"ฯ…",Upsilon:"ฮฅ",UpTee:"โŠฅ",UpTeeArrow:"โ†ฅ",upuparrows:"โ‡ˆ",urcorn:"โŒ",urcorner:"โŒ",urcrop:"โŒŽ",uring:"ลฏ",Uring:"ลฎ",urtri:"โ—น",uscr:"๐“Š",Uscr:"๐’ฐ",utdot:"โ‹ฐ",utilde:"ลฉ",Utilde:"ลจ",utri:"โ–ต",utrif:"โ–ด",uuarr:"โ‡ˆ",uuml:"รผ",Uuml:"รœ",uwangle:"โฆง",vangrt:"โฆœ",varepsilon:"ฯต",varkappa:"ฯฐ",varnothing:"โˆ…",varphi:"ฯ•",varpi:"ฯ–",varpropto:"โˆ",varr:"โ†•",vArr:"โ‡•",varrho:"ฯฑ",varsigma:"ฯ‚",varsubsetneq:"โŠŠ๏ธ€",varsubsetneqq:"โซ‹๏ธ€",varsupsetneq:"โŠ‹๏ธ€",varsupsetneqq:"โซŒ๏ธ€",vartheta:"ฯ‘",vartriangleleft:"โŠฒ",vartriangleright:"โŠณ",vBar:"โซจ",Vbar:"โซซ",vBarv:"โซฉ",vcy:"ะฒ",Vcy:"ะ’",vdash:"โŠข",vDash:"โŠจ",Vdash:"โŠฉ",VDash:"โŠซ",Vdashl:"โซฆ",vee:"โˆจ",Vee:"โ‹",veebar:"โŠป",veeeq:"โ‰š",vellip:"โ‹ฎ",verbar:"|",Verbar:"โ€–",vert:"|",Vert:"โ€–",VerticalBar:"โˆฃ",VerticalLine:"|",VerticalSeparator:"โ˜",VerticalTilde:"โ‰€",VeryThinSpace:"โ€Š",vfr:"๐”ณ",Vfr:"๐”™",vltri:"โŠฒ",vnsub:"โŠ‚โƒ’",vnsup:"โŠƒโƒ’",vopf:"๐•ง",Vopf:"๐•",vprop:"โˆ",vrtri:"โŠณ",vscr:"๐“‹",Vscr:"๐’ฑ",vsubne:"โŠŠ๏ธ€",vsubnE:"โซ‹๏ธ€",vsupne:"โŠ‹๏ธ€",vsupnE:"โซŒ๏ธ€",Vvdash:"โŠช",vzigzag:"โฆš",wcirc:"ลต",Wcirc:"ลด",wedbar:"โฉŸ",wedge:"โˆง",Wedge:"โ‹€",wedgeq:"โ‰™",weierp:"โ„˜",wfr:"๐”ด",Wfr:"๐”š",wopf:"๐•จ",Wopf:"๐•Ž",wp:"โ„˜",wr:"โ‰€",wreath:"โ‰€",wscr:"๐“Œ",Wscr:"๐’ฒ",xcap:"โ‹‚",xcirc:"โ—ฏ",xcup:"โ‹ƒ",xdtri:"โ–ฝ",xfr:"๐”ต",Xfr:"๐”›",xharr:"โŸท",xhArr:"โŸบ",xi:"ฮพ",Xi:"ฮž",xlarr:"โŸต",xlArr:"โŸธ",xmap:"โŸผ",xnis:"โ‹ป",xodot:"โจ€",xopf:"๐•ฉ",Xopf:"๐•",xoplus:"โจ",xotime:"โจ‚",xrarr:"โŸถ",xrArr:"โŸน",xscr:"๐“",Xscr:"๐’ณ",xsqcup:"โจ†",xuplus:"โจ„",xutri:"โ–ณ",xvee:"โ‹",xwedge:"โ‹€",yacute:"รฝ",Yacute:"ร",yacy:"ั",YAcy:"ะฏ",ycirc:"ลท",Ycirc:"ลถ",ycy:"ั‹",Ycy:"ะซ",yen:"ยฅ",yfr:"๐”ถ",Yfr:"๐”œ",yicy:"ั—",YIcy:"ะ‡",yopf:"๐•ช",Yopf:"๐•",yscr:"๐“Ž",Yscr:"๐’ด",yucy:"ัŽ",YUcy:"ะฎ",yuml:"รฟ",Yuml:"ลธ",zacute:"ลบ",Zacute:"ลน",zcaron:"ลพ",Zcaron:"ลฝ",zcy:"ะท",Zcy:"ะ—",zdot:"ลผ",Zdot:"ลป",zeetrf:"โ„จ",ZeroWidthSpace:"โ€‹",zeta:"ฮถ",Zeta:"ฮ–",zfr:"๐”ท",Zfr:"โ„จ",zhcy:"ะถ",ZHcy:"ะ–",zigrarr:"โ‡",zopf:"๐•ซ",Zopf:"โ„ค",zscr:"๐“",Zscr:"๐’ต",zwj:"โ€",zwnj:"โ€Œ"};var v={aacute:"รก",Aacute:"ร",acirc:"รข",Acirc:"ร‚",acute:"ยด",aelig:"รฆ",AElig:"ร†",agrave:"ร ",Agrave:"ร€",amp:"&",AMP:"&",aring:"รฅ",Aring:"ร…",atilde:"รฃ",Atilde:"รƒ",auml:"รค",Auml:"ร„",brvbar:"ยฆ",ccedil:"รง",Ccedil:"ร‡",cedil:"ยธ",cent:"ยข",copy:"ยฉ",COPY:"ยฉ",curren:"ยค",deg:"ยฐ",divide:"รท",eacute:"รฉ",Eacute:"ร‰",ecirc:"รช",Ecirc:"รŠ",egrave:"รจ",Egrave:"รˆ",eth:"รฐ",ETH:"ร",euml:"รซ",Euml:"ร‹",frac12:"ยฝ",frac14:"ยผ",frac34:"ยพ",gt:">",GT:">",iacute:"รญ",Iacute:"ร",icirc:"รฎ",Icirc:"รŽ",iexcl:"ยก",igrave:"รฌ",Igrave:"รŒ",iquest:"ยฟ",iuml:"รฏ",Iuml:"ร",laquo:"ยซ",lt:"<",LT:"<",macr:"ยฏ",micro:"ยต",middot:"ยท",nbsp:"ย ",not:"ยฌ",ntilde:"รฑ",Ntilde:"ร‘",oacute:"รณ",Oacute:"ร“",ocirc:"รด",Ocirc:"ร”",ograve:"รฒ",Ograve:"ร’",ordf:"ยช",ordm:"ยบ",oslash:"รธ",Oslash:"ร˜",otilde:"รต",Otilde:"ร•",ouml:"รถ",Ouml:"ร–",para:"ยถ",plusmn:"ยฑ",pound:"ยฃ",quot:'"',QUOT:'"',raquo:"ยป",reg:"ยฎ",REG:"ยฎ",sect:"ยง",shy:"ยญ",sup1:"ยน",sup2:"ยฒ",sup3:"ยณ",szlig:"รŸ",thorn:"รพ",THORN:"รž",times:"ร—",uacute:"รบ",Uacute:"รš",ucirc:"รป",Ucirc:"ร›",ugrave:"รน",Ugrave:"ร™",uml:"ยจ",uuml:"รผ",Uuml:"รœ",yacute:"รฝ",Yacute:"ร",yen:"ยฅ",yuml:"รฟ"};var b={0:"๏ฟฝ",128:"โ‚ฌ",130:"โ€š",131:"ฦ’",132:"โ€ž",133:"โ€ฆ",134:"โ€ ",135:"โ€ก",136:"ห†",137:"โ€ฐ",138:"ล ",139:"โ€น",140:"ล’",142:"ลฝ",145:"โ€˜",146:"โ€™",147:"โ€œ",148:"โ€",149:"โ€ข",150:"โ€“",151:"โ€”",152:"หœ",153:"โ„ข",154:"ลก",155:"โ€บ",156:"ล“",158:"ลพ",159:"ลธ"};var y=[1,2,3,4,5,6,7,8,11,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,64976,64977,64978,64979,64980,64981,64982,64983,64984,64985,64986,64987,64988,64989,64990,64991,64992,64993,64994,64995,64996,64997,64998,64999,65e3,65001,65002,65003,65004,65005,65006,65007,65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111];var w=String.fromCharCode;var T={};var E=T.hasOwnProperty;var has=function(e,r){return E.call(e,r)};var contains=function(e,r){var t=-1;var a=e.length;while(++t=55296&&e<=57343||e>1114111){if(r){parseError("character reference outside the permissible Unicode range")}return"๏ฟฝ"}if(has(b,e)){if(r){parseError("disallowed character reference")}return b[e]}if(r&&contains(y,e)){parseError("disallowed character reference")}if(e>65535){e-=65536;t+=w(e>>>10&1023|55296);e=56320|e&1023}t+=w(e);return t};var hexEscape=function(e){return"&#x"+e.toString(16).toUpperCase()+";"};var decEscape=function(e){return"&#"+e+";"};var parseError=function(e){throw Error("Parse error: "+e)};var encode=function(e,r){r=merge(r,encode.options);var t=r.strict;if(t&&g.test(e)){parseError("forbidden code point")}var a=r.encodeEverything;var n=r.useNamedReferences;var i=r.allowUnsafeSymbols;var d=r.decimal?decEscape:hexEscape;var escapeBmpSymbol=function(e){return d(e.charCodeAt(0))};if(a){e=e.replace(s,(function(e){if(n&&has(c,e)){return"&"+c[e]+";"}return escapeBmpSymbol(e)}));if(n){e=e.replace(/>\u20D2/g,">⃒").replace(/<\u20D2/g,"<⃒").replace(/fj/g,"fj")}if(n){e=e.replace(l,(function(e){return"&"+c[e]+";"}))}}else if(n){if(!i){e=e.replace(p,(function(e){return"&"+c[e]+";"}))}e=e.replace(/>\u20D2/g,">⃒").replace(/<\u20D2/g,"<⃒");e=e.replace(l,(function(e){return"&"+c[e]+";"}))}else if(!i){e=e.replace(p,escapeBmpSymbol)}return e.replace(o,(function(e){var r=e.charCodeAt(0);var t=e.charCodeAt(1);var a=(r-55296)*1024+t-56320+65536;return d(a)})).replace(u,escapeBmpSymbol)};encode.options={allowUnsafeSymbols:false,encodeEverything:false,strict:false,useNamedReferences:false,decimal:false};var decode=function(e,r){r=merge(r,decode.options);var t=r.strict;if(t&&f.test(e)){parseError("malformed character reference")}return e.replace(h,(function(e,a,n,i,o,s,u,l,c){var p;var d;var f;var g;var h;var b;if(a){h=a;return m[h]}if(n){h=n;b=i;if(b&&r.isAttributeValue){if(t&&b=="="){parseError("`&` did not start a character reference")}return e}else{if(t){parseError("named character reference was not terminated by a semicolon")}return v[h]+(b||"")}}if(o){f=o;d=s;if(t&&!d){parseError("character reference was not terminated by a semicolon")}p=parseInt(f,10);return codePointToSymbol(p,t)}if(u){g=u;d=l;if(t&&!d){parseError("character reference was not terminated by a semicolon")}p=parseInt(g,16);return codePointToSymbol(p,t)}if(t){parseError("named character reference was not terminated by a semicolon")}return e}))};decode.options={isAttributeValue:false,strict:false};var escape=function(e){return e.replace(p,(function(e){return d[e]}))};var A={version:"1.2.0",encode:encode,decode:decode,escape:escape,unescape:decode};if(a&&!a.nodeType){if(n){n.exports=A}else{for(var q in A){has(A,q)&&(a[q]=A[q])}}}else{t.he=A}})(this)},5596:function(e,r){"use strict";Object.defineProperty(r,"__esModule",{value:true});function arr_back(e){return e[e.length-1]}r["default"]=arr_back},5417:function(e,r,t){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:true});r.NodeType=r.TextNode=r.Node=r.valid=r["default"]=r.parse=r.HTMLElement=r.CommentNode=void 0;var n=t(190);Object.defineProperty(r,"CommentNode",{enumerable:true,get:function(){return a(n).default}});var i=t(3248);Object.defineProperty(r,"HTMLElement",{enumerable:true,get:function(){return a(i).default}});var o=t(8653);Object.defineProperty(r,"parse",{enumerable:true,get:function(){return a(o).default}});Object.defineProperty(r,"default",{enumerable:true,get:function(){return a(o).default}});var s=t(3494);Object.defineProperty(r,"valid",{enumerable:true,get:function(){return a(s).default}});var u=t(7402);Object.defineProperty(r,"Node",{enumerable:true,get:function(){return a(u).default}});var l=t(111);Object.defineProperty(r,"TextNode",{enumerable:true,get:function(){return a(l).default}});var c=t(5896);Object.defineProperty(r,"NodeType",{enumerable:true,get:function(){return a(c).default}})},9958:function(e,r,t){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:true});var n=a(t(5896));function isTag(e){return e&&e.nodeType===n.default.ELEMENT_NODE}function getAttributeValue(e,r){return isTag(e)?e.getAttribute(r):undefined}function getName(e){return(e&&e.rawTagName||"").toLowerCase()}function getChildren(e){return e&&e.childNodes}function getParent(e){return e?e.parentNode:null}function getText(e){return e.text}function removeSubsets(e){var r=e.length;var t;var a;var n;while(--r>-1){t=a=e[r];e[r]=null;n=true;while(a){if(e.indexOf(a)>-1){n=false;e.splice(r,1);break}a=getParent(a)}if(n){e[r]=t}}return e}function existsOne(e,r){return r.some((function(r){return isTag(r)?e(r)||existsOne(e,getChildren(r)):false}))}function getSiblings(e){var r=getParent(e);return r&&getChildren(r)}function hasAttrib(e,r){return getAttributeValue(e,r)!==undefined}function findOne(e,r){var t=null;for(var a=0,n=r.length;a0){t=findOne(e,o)}}}return t}function findAll(e,r){var t=[];for(var a=0,n=r.length;a0){r.push(e=[])}t.childNodes.forEach(dfs);if(e.length>0){r.push(e=[])}}else{t.childNodes.forEach(dfs)}}else if(t.nodeType===g.default.TEXT_NODE){if(t.isWhitespace){e.prependWhitespace=true}else{var a=t.trimmedText;if(e.prependWhitespace){a=" ".concat(a);e.prependWhitespace=false}e.push(a)}}}dfs(this);return r.map((function(e){return e.join("").replace(/\s{2,}/g," ")})).join("\n").replace(/\s+$/,"")},enumerable:false,configurable:true});HTMLElement.prototype.toString=function(){var e=this.rawTagName;if(e){var r=this.rawAttrs?" ".concat(this.rawAttrs):"";return this.isVoidElement?"<".concat(e).concat(r,">"):"<".concat(e).concat(r,">").concat(this.innerHTML,"")}return this.innerHTML};Object.defineProperty(HTMLElement.prototype,"innerHTML",{get:function(){return this.childNodes.map((function(e){return e.toString()})).join("")},set:function(e){var r=parse(e);var t=r.childNodes.length?r.childNodes:[new f.default(e,this)];resetParent(t,this);resetParent(this.childNodes,null);this.childNodes=t},enumerable:false,configurable:true});HTMLElement.prototype.set_content=function(e,r){if(r===void 0){r={}}if(e instanceof d.default){e=[e]}else if(typeof e=="string"){var t=parse(e,r);e=t.childNodes.length?t.childNodes:[new f.default(e,this)]}resetParent(this.childNodes,null);resetParent(e,this);this.childNodes=e;return this};HTMLElement.prototype.replaceWith=function(){var e=this;var r=[];for(var t=0;t-1){t.rawText=t.rawText.substr(0,a);this.childNodes.length=r+1}}}return this};Object.defineProperty(HTMLElement.prototype,"structure",{get:function(){var e=[];var r=0;function write(t){e.push(" ".repeat(r)+t)}function dfs(e){var t=e.id?"#".concat(e.id):"";var a=e.classList.length?".".concat(e.classList.value.join(".")):"";write("".concat(e.rawTagName).concat(t).concat(a));r++;e.childNodes.forEach((function(e){if(e.nodeType===g.default.ELEMENT_NODE){dfs(e)}else if(e.nodeType===g.default.TEXT_NODE){if(!e.isWhitespace){write("#text")}}}));r--}dfs(this);return e.join("\n")},enumerable:false,configurable:true});HTMLElement.prototype.removeWhitespace=function(){var e=this;var r=0;this.childNodes.forEach((function(t){if(t.nodeType===g.default.TEXT_NODE){if(t.isWhitespace){return}t.rawText=t.trimmedRawText}else if(t.nodeType===g.default.ELEMENT_NODE){t.removeWhitespace()}e.childNodes[r++]=t}));this.childNodes.length=r;return this};HTMLElement.prototype.querySelectorAll=function(e){return(0,s.selectAll)(e,this,{xmlMode:true,adapter:c.default})};HTMLElement.prototype.querySelector=function(e){return(0,s.selectOne)(e,this,{xmlMode:true,adapter:c.default})};HTMLElement.prototype.getElementsByTagName=function(e){var r=e.toUpperCase();var t=[];var a=[];var n=this;var i=0;while(i!==undefined){var o=void 0;do{o=n.childNodes[i++]}while(i0){a.push(i);n=o;i=0}}}return t};HTMLElement.prototype.getElementById=function(e){var r=[];var t=this;var a=0;while(a!==undefined){var n=void 0;do{n=t.childNodes[a++]}while(a0){r.push(a);t=n;a=0}}}return null};HTMLElement.prototype.closest=function(e){var r=new Map;var t=this;var a=null;function findOne(e,t){var a=null;for(var n=0,i=t.length;n0){var t=e[--r];if(this===t)return e[r-1]||null}return null}},enumerable:false,configurable:true});Object.defineProperty(HTMLElement.prototype,"previousElementSibling",{get:function(){if(this.parentNode){var e=this.parentNode.childNodes;var r=e.length;var t=false;while(r>0){var a=e[--r];if(t){if(a instanceof HTMLElement){return a||null}}else if(this===a){t=true}}return null}},enumerable:false,configurable:true});Object.defineProperty(HTMLElement.prototype,"classNames",{get:function(){return this.classList.toString()},enumerable:false,configurable:true});HTMLElement.prototype.clone=function(){return parse(this.toString()).firstChild};return HTMLElement}(d.default);r["default"]=A;var q=/|<(\/?)([a-zA-Z][-.:0-9_a-zA-Z]*)((?:\s+[^>]*?(?:(?:'[^']*')|(?:"[^"]*"))?)*)\s*(\/?)>/g;var x=/(?:^|\s)(id|class)\s*=\s*((?:'[^']*')|(?:"[^"]*")|\S+)/gi;var D={area:true,AREA:true,base:true,BASE:true,br:true,BR:true,col:true,COL:true,hr:true,HR:true,img:true,IMG:true,input:true,INPUT:true,link:true,LINK:true,meta:true,META:true,source:true,SOURCE:true,embed:true,EMBED:true,param:true,PARAM:true,track:true,TRACK:true,wbr:true,WBR:true};var C={li:{li:true,LI:true},LI:{li:true,LI:true},p:{p:true,div:true,P:true,DIV:true},P:{p:true,div:true,P:true,DIV:true},b:{div:true,DIV:true},B:{div:true,DIV:true},td:{td:true,th:true,TD:true,TH:true},TD:{td:true,th:true,TD:true,TH:true},th:{td:true,th:true,TD:true,TH:true},TH:{td:true,th:true,TD:true,TH:true},h1:{h1:true,H1:true},H1:{h1:true,H1:true},h2:{h2:true,H2:true},H2:{h2:true,H2:true},h3:{h3:true,H3:true},H3:{h3:true,H3:true},h4:{h4:true,H4:true},H4:{h4:true,H4:true},h5:{h5:true,H5:true},H5:{h5:true,H5:true},h6:{h6:true,H6:true},H6:{h6:true,H6:true}};var N={li:{ul:true,ol:true,UL:true,OL:true},LI:{ul:true,ol:true,UL:true,OL:true},a:{div:true,DIV:true},A:{div:true,DIV:true},b:{div:true,DIV:true},B:{div:true,DIV:true},i:{div:true,DIV:true},I:{div:true,DIV:true},p:{div:true,DIV:true},P:{div:true,DIV:true},td:{tr:true,table:true,TR:true,TABLE:true},TD:{tr:true,table:true,TR:true,TABLE:true},th:{tr:true,table:true,TR:true,TABLE:true},TH:{tr:true,table:true,TR:true,TABLE:true}};var S="documentfragmentcontainer";function base_parse(e,r){if(r===void 0){r={lowerCaseTagName:false,comment:false}}var t=r.blockTextElements||{script:true,noscript:true,style:true,pre:true};var a=Object.keys(t);var n=a.map((function(e){return new RegExp("^".concat(e,"$"),"i")}));var i=a.filter((function(e){return t[e]})).map((function(e){return new RegExp("^".concat(e,"$"),"i")}));function element_should_be_ignore(e){return i.some((function(r){return r.test(e)}))}function is_block_text_element(e){return n.some((function(r){return r.test(e)}))}var createRange=function(e,r){return[e-v,r-v]};var o=new A(null,{},"",null,[0,e.length]);var s=o;var u=[o];var c=-1;var d=undefined;var g;e="<".concat(S,">").concat(e,"");var h=r.lowerCaseTagName;var m=e.length-(S.length+2);var v=S.length+2;while(g=q.exec(e)){var b=g[0],y=g[1],w=g[2],T=g[3],E=g[4];var L=b.length;var k=q.lastIndex-L;var O=q.lastIndex;if(c>-1){if(c+L");var I=h?e.toLocaleLowerCase().indexOf(U,q.lastIndex):e.indexOf(U,q.lastIndex);var G=I===-1?m:I;if(element_should_be_ignore(w)){var _=e.substring(F,G);if(_.length>0&&/\S/.test(_)){s.appendChild(new f.default(_,s,createRange(F,G)))}}if(I===-1){c=q.lastIndex=e.length+1}else{c=q.lastIndex=I+U.length;y="/"}}}if(y||E||D[w]){while(true){if(w==="a"||w==="A")d=undefined;if(s.rawTagName===w){s.range[1]=createRange(-1,Math.max(c,O))[1];u.pop();s=(0,l.default)(u);break}else{var H=s.tagName;if(N[H]){if(N[H][w]){u.pop();s=(0,l.default)(u);continue}}break}}}}return u}r.base_parse=base_parse;function parse(e,r){if(r===void 0){r={lowerCaseTagName:false,comment:false}}var t=base_parse(e,r);var a=t[0];var _loop_1=function(){var e=t.pop();var a=(0,l.default)(t);if(e.parentNode&&e.parentNode.parentNode){if(e.parentNode===a&&e.tagName===a.tagName){if(r.parseNoneClosedTags!==true){a.removeChild(e);e.childNodes.forEach((function(e){a.parentNode.appendChild(e)}));t.pop()}}else{if(r.parseNoneClosedTags!==true){a.removeChild(e);e.childNodes.forEach((function(e){a.appendChild(e)}))}}}else{}};while(t.length>1){_loop_1()}return a}r.parse=parse;function resetParent(e,r){return e.map((function(e){e.parentNode=r;return e}))}},7402:function(e,r,t){"use strict";Object.defineProperty(r,"__esModule",{value:true});var a=t(5902);var n=function(){function Node(e,r){if(e===void 0){e=null}this.parentNode=e;this.childNodes=[];Object.defineProperty(this,"range",{enumerable:false,writable:true,configurable:true,value:r!==null&&r!==void 0?r:[-1,-1]})}Node.prototype.remove=function(){var e=this;if(this.parentNode){var r=this.parentNode.childNodes;this.parentNode.childNodes=r.filter((function(r){return e!==r}));this.parentNode=null}return this};Object.defineProperty(Node.prototype,"innerText",{get:function(){return this.rawText},enumerable:false,configurable:true});Object.defineProperty(Node.prototype,"textContent",{get:function(){return(0,a.decode)(this.rawText)},set:function(e){this.rawText=(0,a.encode)(e)},enumerable:false,configurable:true});return Node}();r["default"]=n},111:function(e,r,t){"use strict";var a=this&&this.__extends||function(){var extendStatics=function(e,r){extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var t in r)if(Object.prototype.hasOwnProperty.call(r,t))e[t]=r[t]};return extendStatics(e,r)};return function(e,r){if(typeof r!=="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");extendStatics(e,r);function __(){this.constructor=e}e.prototype=r===null?Object.create(r):(__.prototype=r.prototype,new __)}}();var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:true});var i=t(5902);var o=n(t(7402));var s=n(t(5896));var u=function(e){a(TextNode,e);function TextNode(r,t,a){var n=e.call(this,t,a)||this;n.nodeType=s.default.TEXT_NODE;n._rawText=r;return n}TextNode.prototype.clone=function(){return new TextNode(this._rawText,null)};Object.defineProperty(TextNode.prototype,"rawText",{get:function(){return this._rawText},set:function(e){this._rawText=e;this._trimmedRawText=void 0;this._trimmedText=void 0},enumerable:false,configurable:true});Object.defineProperty(TextNode.prototype,"trimmedRawText",{get:function(){if(this._trimmedRawText!==undefined)return this._trimmedRawText;this._trimmedRawText=trimText(this.rawText);return this._trimmedRawText},enumerable:false,configurable:true});Object.defineProperty(TextNode.prototype,"trimmedText",{get:function(){if(this._trimmedText!==undefined)return this._trimmedText;this._trimmedText=trimText(this.text);return this._trimmedText},enumerable:false,configurable:true});Object.defineProperty(TextNode.prototype,"text",{get:function(){return(0,i.decode)(this.rawText)},enumerable:false,configurable:true});Object.defineProperty(TextNode.prototype,"isWhitespace",{get:function(){return/^(\s| )*$/.test(this.rawText)},enumerable:false,configurable:true});TextNode.prototype.toString=function(){return this.rawText};return TextNode}(o.default);r["default"]=u;function trimText(e){var r=0;var t;var a;while(r>=0&&r0&&/[^\S\r\n]/.test(e[t-1]);var i=a=t};var a=Math.abs(r);var i=(t%a+a)%a;return r>1?function(e){return e>=t&&e%a===i}:function(e){return e<=t&&e%a===i}}r.compile=compile;function generate(e){var r=e[0];var t=e[1]-1;var a=0;if(r<0){var n=-r;var i=(t%n+n)%n;return function(){var e=i+n*a++;return e>t?null:e}}if(r===0)return t<0?function(){return null}:function(){return a++===0?t:null};if(t<0){t+=r*Math.ceil(-t/r)}return function(){return r*a+++t}}r.generate=generate},7118:function(e,r,t){"use strict";Object.defineProperty(r,"__esModule",{value:true});r.sequence=r.generate=r.compile=r.parse=void 0;var a=t(2421);Object.defineProperty(r,"parse",{enumerable:true,get:function(){return a.parse}});var n=t(3947);Object.defineProperty(r,"compile",{enumerable:true,get:function(){return n.compile}});Object.defineProperty(r,"generate",{enumerable:true,get:function(){return n.generate}});function nthCheck(e){return(0,n.compile)((0,a.parse)(e))}r["default"]=nthCheck;function sequence(e){return(0,n.generate)((0,a.parse)(e))}r.sequence=sequence},2421:function(e,r){"use strict";Object.defineProperty(r,"__esModule",{value:true});r.parse=void 0;var t=new Set([9,10,12,13,32]);var a="0".charCodeAt(0);var n="9".charCodeAt(0);function parse(e){e=e.trim().toLowerCase();if(e==="even"){return[2,0]}else if(e==="odd"){return[2,1]}var r=0;var i=0;var o=readSign();var s=readNumber();if(r=a&&e.charCodeAt(r)<=n){i=i*10+(e.charCodeAt(r)-a);r++}return r===t?null:i}function skipWhitespace(){while(r","GT":">","Gt":"โ‰ซ","gtdot":"โ‹—","gtlPar":"โฆ•","gtquest":"โฉผ","gtrapprox":"โช†","gtrarr":"โฅธ","gtrdot":"โ‹—","gtreqless":"โ‹›","gtreqqless":"โชŒ","gtrless":"โ‰ท","gtrsim":"โ‰ณ","gvertneqq":"โ‰ฉ๏ธ€","gvnE":"โ‰ฉ๏ธ€","Hacek":"ห‡","hairsp":"โ€Š","half":"ยฝ","hamilt":"โ„‹","HARDcy":"ะช","hardcy":"ัŠ","harrcir":"โฅˆ","harr":"โ†”","hArr":"โ‡”","harrw":"โ†ญ","Hat":"^","hbar":"โ„","Hcirc":"ฤค","hcirc":"ฤฅ","hearts":"โ™ฅ","heartsuit":"โ™ฅ","hellip":"โ€ฆ","hercon":"โŠน","hfr":"๐”ฅ","Hfr":"โ„Œ","HilbertSpace":"โ„‹","hksearow":"โคฅ","hkswarow":"โคฆ","hoarr":"โ‡ฟ","homtht":"โˆป","hookleftarrow":"โ†ฉ","hookrightarrow":"โ†ช","hopf":"๐•™","Hopf":"โ„","horbar":"โ€•","HorizontalLine":"โ”€","hscr":"๐’ฝ","Hscr":"โ„‹","hslash":"โ„","Hstrok":"ฤฆ","hstrok":"ฤง","HumpDownHump":"โ‰Ž","HumpEqual":"โ‰","hybull":"โƒ","hyphen":"โ€","Iacute":"ร","iacute":"รญ","ic":"โฃ","Icirc":"รŽ","icirc":"รฎ","Icy":"ะ˜","icy":"ะธ","Idot":"ฤฐ","IEcy":"ะ•","iecy":"ะต","iexcl":"ยก","iff":"โ‡”","ifr":"๐”ฆ","Ifr":"โ„‘","Igrave":"รŒ","igrave":"รฌ","ii":"โ…ˆ","iiiint":"โจŒ","iiint":"โˆญ","iinfin":"โงœ","iiota":"โ„ฉ","IJlig":"ฤฒ","ijlig":"ฤณ","Imacr":"ฤช","imacr":"ฤซ","image":"โ„‘","ImaginaryI":"โ…ˆ","imagline":"โ„","imagpart":"โ„‘","imath":"ฤฑ","Im":"โ„‘","imof":"โŠท","imped":"ฦต","Implies":"โ‡’","incare":"โ„…","in":"โˆˆ","infin":"โˆž","infintie":"โง","inodot":"ฤฑ","intcal":"โŠบ","int":"โˆซ","Int":"โˆฌ","integers":"โ„ค","Integral":"โˆซ","intercal":"โŠบ","Intersection":"โ‹‚","intlarhk":"โจ—","intprod":"โจผ","InvisibleComma":"โฃ","InvisibleTimes":"โข","IOcy":"ะ","iocy":"ั‘","Iogon":"ฤฎ","iogon":"ฤฏ","Iopf":"๐•€","iopf":"๐•š","Iota":"ฮ™","iota":"ฮน","iprod":"โจผ","iquest":"ยฟ","iscr":"๐’พ","Iscr":"โ„","isin":"โˆˆ","isindot":"โ‹ต","isinE":"โ‹น","isins":"โ‹ด","isinsv":"โ‹ณ","isinv":"โˆˆ","it":"โข","Itilde":"ฤจ","itilde":"ฤฉ","Iukcy":"ะ†","iukcy":"ั–","Iuml":"ร","iuml":"รฏ","Jcirc":"ฤด","jcirc":"ฤต","Jcy":"ะ™","jcy":"ะน","Jfr":"๐”","jfr":"๐”ง","jmath":"ศท","Jopf":"๐•","jopf":"๐•›","Jscr":"๐’ฅ","jscr":"๐’ฟ","Jsercy":"ะˆ","jsercy":"ั˜","Jukcy":"ะ„","jukcy":"ั”","Kappa":"ฮš","kappa":"ฮบ","kappav":"ฯฐ","Kcedil":"ฤถ","kcedil":"ฤท","Kcy":"ะš","kcy":"ะบ","Kfr":"๐”Ž","kfr":"๐”จ","kgreen":"ฤธ","KHcy":"ะฅ","khcy":"ั…","KJcy":"ะŒ","kjcy":"ัœ","Kopf":"๐•‚","kopf":"๐•œ","Kscr":"๐’ฆ","kscr":"๐“€","lAarr":"โ‡š","Lacute":"ฤน","lacute":"ฤบ","laemptyv":"โฆด","lagran":"โ„’","Lambda":"ฮ›","lambda":"ฮป","lang":"โŸจ","Lang":"โŸช","langd":"โฆ‘","langle":"โŸจ","lap":"โช…","Laplacetrf":"โ„’","laquo":"ยซ","larrb":"โ‡ค","larrbfs":"โคŸ","larr":"โ†","Larr":"โ†ž","lArr":"โ‡","larrfs":"โค","larrhk":"โ†ฉ","larrlp":"โ†ซ","larrpl":"โคน","larrsim":"โฅณ","larrtl":"โ†ข","latail":"โค™","lAtail":"โค›","lat":"โชซ","late":"โชญ","lates":"โชญ๏ธ€","lbarr":"โคŒ","lBarr":"โคŽ","lbbrk":"โฒ","lbrace":"{","lbrack":"[","lbrke":"โฆ‹","lbrksld":"โฆ","lbrkslu":"โฆ","Lcaron":"ฤฝ","lcaron":"ฤพ","Lcedil":"ฤป","lcedil":"ฤผ","lceil":"โŒˆ","lcub":"{","Lcy":"ะ›","lcy":"ะป","ldca":"โคถ","ldquo":"โ€œ","ldquor":"โ€ž","ldrdhar":"โฅง","ldrushar":"โฅ‹","ldsh":"โ†ฒ","le":"โ‰ค","lE":"โ‰ฆ","LeftAngleBracket":"โŸจ","LeftArrowBar":"โ‡ค","leftarrow":"โ†","LeftArrow":"โ†","Leftarrow":"โ‡","LeftArrowRightArrow":"โ‡†","leftarrowtail":"โ†ข","LeftCeiling":"โŒˆ","LeftDoubleBracket":"โŸฆ","LeftDownTeeVector":"โฅก","LeftDownVectorBar":"โฅ™","LeftDownVector":"โ‡ƒ","LeftFloor":"โŒŠ","leftharpoondown":"โ†ฝ","leftharpoonup":"โ†ผ","leftleftarrows":"โ‡‡","leftrightarrow":"โ†”","LeftRightArrow":"โ†”","Leftrightarrow":"โ‡”","leftrightarrows":"โ‡†","leftrightharpoons":"โ‡‹","leftrightsquigarrow":"โ†ญ","LeftRightVector":"โฅŽ","LeftTeeArrow":"โ†ค","LeftTee":"โŠฃ","LeftTeeVector":"โฅš","leftthreetimes":"โ‹‹","LeftTriangleBar":"โง","LeftTriangle":"โŠฒ","LeftTriangleEqual":"โŠด","LeftUpDownVector":"โฅ‘","LeftUpTeeVector":"โฅ ","LeftUpVectorBar":"โฅ˜","LeftUpVector":"โ†ฟ","LeftVectorBar":"โฅ’","LeftVector":"โ†ผ","lEg":"โช‹","leg":"โ‹š","leq":"โ‰ค","leqq":"โ‰ฆ","leqslant":"โฉฝ","lescc":"โชจ","les":"โฉฝ","lesdot":"โฉฟ","lesdoto":"โช","lesdotor":"โชƒ","lesg":"โ‹š๏ธ€","lesges":"โช“","lessapprox":"โช…","lessdot":"โ‹–","lesseqgtr":"โ‹š","lesseqqgtr":"โช‹","LessEqualGreater":"โ‹š","LessFullEqual":"โ‰ฆ","LessGreater":"โ‰ถ","lessgtr":"โ‰ถ","LessLess":"โชก","lesssim":"โ‰ฒ","LessSlantEqual":"โฉฝ","LessTilde":"โ‰ฒ","lfisht":"โฅผ","lfloor":"โŒŠ","Lfr":"๐”","lfr":"๐”ฉ","lg":"โ‰ถ","lgE":"โช‘","lHar":"โฅข","lhard":"โ†ฝ","lharu":"โ†ผ","lharul":"โฅช","lhblk":"โ–„","LJcy":"ะ‰","ljcy":"ั™","llarr":"โ‡‡","ll":"โ‰ช","Ll":"โ‹˜","llcorner":"โŒž","Lleftarrow":"โ‡š","llhard":"โฅซ","lltri":"โ—บ","Lmidot":"ฤฟ","lmidot":"ล€","lmoustache":"โŽฐ","lmoust":"โŽฐ","lnap":"โช‰","lnapprox":"โช‰","lne":"โช‡","lnE":"โ‰จ","lneq":"โช‡","lneqq":"โ‰จ","lnsim":"โ‹ฆ","loang":"โŸฌ","loarr":"โ‡ฝ","lobrk":"โŸฆ","longleftarrow":"โŸต","LongLeftArrow":"โŸต","Longleftarrow":"โŸธ","longleftrightarrow":"โŸท","LongLeftRightArrow":"โŸท","Longleftrightarrow":"โŸบ","longmapsto":"โŸผ","longrightarrow":"โŸถ","LongRightArrow":"โŸถ","Longrightarrow":"โŸน","looparrowleft":"โ†ซ","looparrowright":"โ†ฌ","lopar":"โฆ…","Lopf":"๐•ƒ","lopf":"๐•","loplus":"โจญ","lotimes":"โจด","lowast":"โˆ—","lowbar":"_","LowerLeftArrow":"โ†™","LowerRightArrow":"โ†˜","loz":"โ—Š","lozenge":"โ—Š","lozf":"โงซ","lpar":"(","lparlt":"โฆ“","lrarr":"โ‡†","lrcorner":"โŒŸ","lrhar":"โ‡‹","lrhard":"โฅญ","lrm":"โ€Ž","lrtri":"โŠฟ","lsaquo":"โ€น","lscr":"๐“","Lscr":"โ„’","lsh":"โ†ฐ","Lsh":"โ†ฐ","lsim":"โ‰ฒ","lsime":"โช","lsimg":"โช","lsqb":"[","lsquo":"โ€˜","lsquor":"โ€š","Lstrok":"ล","lstrok":"ล‚","ltcc":"โชฆ","ltcir":"โฉน","lt":"<","LT":"<","Lt":"โ‰ช","ltdot":"โ‹–","lthree":"โ‹‹","ltimes":"โ‹‰","ltlarr":"โฅถ","ltquest":"โฉป","ltri":"โ—ƒ","ltrie":"โŠด","ltrif":"โ—‚","ltrPar":"โฆ–","lurdshar":"โฅŠ","luruhar":"โฅฆ","lvertneqq":"โ‰จ๏ธ€","lvnE":"โ‰จ๏ธ€","macr":"ยฏ","male":"โ™‚","malt":"โœ ","maltese":"โœ ","Map":"โค…","map":"โ†ฆ","mapsto":"โ†ฆ","mapstodown":"โ†ง","mapstoleft":"โ†ค","mapstoup":"โ†ฅ","marker":"โ–ฎ","mcomma":"โจฉ","Mcy":"ะœ","mcy":"ะผ","mdash":"โ€”","mDDot":"โˆบ","measuredangle":"โˆก","MediumSpace":"โŸ","Mellintrf":"โ„ณ","Mfr":"๐”","mfr":"๐”ช","mho":"โ„ง","micro":"ยต","midast":"*","midcir":"โซฐ","mid":"โˆฃ","middot":"ยท","minusb":"โŠŸ","minus":"โˆ’","minusd":"โˆธ","minusdu":"โจช","MinusPlus":"โˆ“","mlcp":"โซ›","mldr":"โ€ฆ","mnplus":"โˆ“","models":"โŠง","Mopf":"๐•„","mopf":"๐•ž","mp":"โˆ“","mscr":"๐“‚","Mscr":"โ„ณ","mstpos":"โˆพ","Mu":"ฮœ","mu":"ฮผ","multimap":"โŠธ","mumap":"โŠธ","nabla":"โˆ‡","Nacute":"ลƒ","nacute":"ล„","nang":"โˆ โƒ’","nap":"โ‰‰","napE":"โฉฐฬธ","napid":"โ‰‹ฬธ","napos":"ล‰","napprox":"โ‰‰","natural":"โ™ฎ","naturals":"โ„•","natur":"โ™ฎ","nbsp":"ย ","nbump":"โ‰Žฬธ","nbumpe":"โ‰ฬธ","ncap":"โฉƒ","Ncaron":"ล‡","ncaron":"ลˆ","Ncedil":"ล…","ncedil":"ล†","ncong":"โ‰‡","ncongdot":"โฉญฬธ","ncup":"โฉ‚","Ncy":"ะ","ncy":"ะฝ","ndash":"โ€“","nearhk":"โคค","nearr":"โ†—","neArr":"โ‡—","nearrow":"โ†—","ne":"โ‰ ","nedot":"โ‰ฬธ","NegativeMediumSpace":"โ€‹","NegativeThickSpace":"โ€‹","NegativeThinSpace":"โ€‹","NegativeVeryThinSpace":"โ€‹","nequiv":"โ‰ข","nesear":"โคจ","nesim":"โ‰‚ฬธ","NestedGreaterGreater":"โ‰ซ","NestedLessLess":"โ‰ช","NewLine":"\\n","nexist":"โˆ„","nexists":"โˆ„","Nfr":"๐”‘","nfr":"๐”ซ","ngE":"โ‰งฬธ","nge":"โ‰ฑ","ngeq":"โ‰ฑ","ngeqq":"โ‰งฬธ","ngeqslant":"โฉพฬธ","nges":"โฉพฬธ","nGg":"โ‹™ฬธ","ngsim":"โ‰ต","nGt":"โ‰ซโƒ’","ngt":"โ‰ฏ","ngtr":"โ‰ฏ","nGtv":"โ‰ซฬธ","nharr":"โ†ฎ","nhArr":"โ‡Ž","nhpar":"โซฒ","ni":"โˆ‹","nis":"โ‹ผ","nisd":"โ‹บ","niv":"โˆ‹","NJcy":"ะŠ","njcy":"ัš","nlarr":"โ†š","nlArr":"โ‡","nldr":"โ€ฅ","nlE":"โ‰ฆฬธ","nle":"โ‰ฐ","nleftarrow":"โ†š","nLeftarrow":"โ‡","nleftrightarrow":"โ†ฎ","nLeftrightarrow":"โ‡Ž","nleq":"โ‰ฐ","nleqq":"โ‰ฆฬธ","nleqslant":"โฉฝฬธ","nles":"โฉฝฬธ","nless":"โ‰ฎ","nLl":"โ‹˜ฬธ","nlsim":"โ‰ด","nLt":"โ‰ชโƒ’","nlt":"โ‰ฎ","nltri":"โ‹ช","nltrie":"โ‹ฌ","nLtv":"โ‰ชฬธ","nmid":"โˆค","NoBreak":"โ ","NonBreakingSpace":"ย ","nopf":"๐•Ÿ","Nopf":"โ„•","Not":"โซฌ","not":"ยฌ","NotCongruent":"โ‰ข","NotCupCap":"โ‰ญ","NotDoubleVerticalBar":"โˆฆ","NotElement":"โˆ‰","NotEqual":"โ‰ ","NotEqualTilde":"โ‰‚ฬธ","NotExists":"โˆ„","NotGreater":"โ‰ฏ","NotGreaterEqual":"โ‰ฑ","NotGreaterFullEqual":"โ‰งฬธ","NotGreaterGreater":"โ‰ซฬธ","NotGreaterLess":"โ‰น","NotGreaterSlantEqual":"โฉพฬธ","NotGreaterTilde":"โ‰ต","NotHumpDownHump":"โ‰Žฬธ","NotHumpEqual":"โ‰ฬธ","notin":"โˆ‰","notindot":"โ‹ตฬธ","notinE":"โ‹นฬธ","notinva":"โˆ‰","notinvb":"โ‹ท","notinvc":"โ‹ถ","NotLeftTriangleBar":"โงฬธ","NotLeftTriangle":"โ‹ช","NotLeftTriangleEqual":"โ‹ฌ","NotLess":"โ‰ฎ","NotLessEqual":"โ‰ฐ","NotLessGreater":"โ‰ธ","NotLessLess":"โ‰ชฬธ","NotLessSlantEqual":"โฉฝฬธ","NotLessTilde":"โ‰ด","NotNestedGreaterGreater":"โชขฬธ","NotNestedLessLess":"โชกฬธ","notni":"โˆŒ","notniva":"โˆŒ","notnivb":"โ‹พ","notnivc":"โ‹ฝ","NotPrecedes":"โŠ€","NotPrecedesEqual":"โชฏฬธ","NotPrecedesSlantEqual":"โ‹ ","NotReverseElement":"โˆŒ","NotRightTriangleBar":"โงฬธ","NotRightTriangle":"โ‹ซ","NotRightTriangleEqual":"โ‹ญ","NotSquareSubset":"โŠฬธ","NotSquareSubsetEqual":"โ‹ข","NotSquareSuperset":"โŠฬธ","NotSquareSupersetEqual":"โ‹ฃ","NotSubset":"โŠ‚โƒ’","NotSubsetEqual":"โŠˆ","NotSucceeds":"โŠ","NotSucceedsEqual":"โชฐฬธ","NotSucceedsSlantEqual":"โ‹ก","NotSucceedsTilde":"โ‰ฟฬธ","NotSuperset":"โŠƒโƒ’","NotSupersetEqual":"โŠ‰","NotTilde":"โ‰","NotTildeEqual":"โ‰„","NotTildeFullEqual":"โ‰‡","NotTildeTilde":"โ‰‰","NotVerticalBar":"โˆค","nparallel":"โˆฆ","npar":"โˆฆ","nparsl":"โซฝโƒฅ","npart":"โˆ‚ฬธ","npolint":"โจ”","npr":"โŠ€","nprcue":"โ‹ ","nprec":"โŠ€","npreceq":"โชฏฬธ","npre":"โชฏฬธ","nrarrc":"โคณฬธ","nrarr":"โ†›","nrArr":"โ‡","nrarrw":"โ†ฬธ","nrightarrow":"โ†›","nRightarrow":"โ‡","nrtri":"โ‹ซ","nrtrie":"โ‹ญ","nsc":"โŠ","nsccue":"โ‹ก","nsce":"โชฐฬธ","Nscr":"๐’ฉ","nscr":"๐“ƒ","nshortmid":"โˆค","nshortparallel":"โˆฆ","nsim":"โ‰","nsime":"โ‰„","nsimeq":"โ‰„","nsmid":"โˆค","nspar":"โˆฆ","nsqsube":"โ‹ข","nsqsupe":"โ‹ฃ","nsub":"โŠ„","nsubE":"โซ…ฬธ","nsube":"โŠˆ","nsubset":"โŠ‚โƒ’","nsubseteq":"โŠˆ","nsubseteqq":"โซ…ฬธ","nsucc":"โŠ","nsucceq":"โชฐฬธ","nsup":"โŠ…","nsupE":"โซ†ฬธ","nsupe":"โŠ‰","nsupset":"โŠƒโƒ’","nsupseteq":"โŠ‰","nsupseteqq":"โซ†ฬธ","ntgl":"โ‰น","Ntilde":"ร‘","ntilde":"รฑ","ntlg":"โ‰ธ","ntriangleleft":"โ‹ช","ntrianglelefteq":"โ‹ฌ","ntriangleright":"โ‹ซ","ntrianglerighteq":"โ‹ญ","Nu":"ฮ","nu":"ฮฝ","num":"#","numero":"โ„–","numsp":"โ€‡","nvap":"โ‰โƒ’","nvdash":"โŠฌ","nvDash":"โŠญ","nVdash":"โŠฎ","nVDash":"โŠฏ","nvge":"โ‰ฅโƒ’","nvgt":">โƒ’","nvHarr":"โค„","nvinfin":"โงž","nvlArr":"โค‚","nvle":"โ‰คโƒ’","nvlt":"<โƒ’","nvltrie":"โŠดโƒ’","nvrArr":"โคƒ","nvrtrie":"โŠตโƒ’","nvsim":"โˆผโƒ’","nwarhk":"โคฃ","nwarr":"โ†–","nwArr":"โ‡–","nwarrow":"โ†–","nwnear":"โคง","Oacute":"ร“","oacute":"รณ","oast":"โŠ›","Ocirc":"ร”","ocirc":"รด","ocir":"โŠš","Ocy":"ะž","ocy":"ะพ","odash":"โŠ","Odblac":"ล","odblac":"ล‘","odiv":"โจธ","odot":"โŠ™","odsold":"โฆผ","OElig":"ล’","oelig":"ล“","ofcir":"โฆฟ","Ofr":"๐”’","ofr":"๐”ฌ","ogon":"ห›","Ograve":"ร’","ograve":"รฒ","ogt":"โง","ohbar":"โฆต","ohm":"ฮฉ","oint":"โˆฎ","olarr":"โ†บ","olcir":"โฆพ","olcross":"โฆป","oline":"โ€พ","olt":"โง€","Omacr":"ลŒ","omacr":"ล","Omega":"ฮฉ","omega":"ฯ‰","Omicron":"ฮŸ","omicron":"ฮฟ","omid":"โฆถ","ominus":"โŠ–","Oopf":"๐•†","oopf":"๐• ","opar":"โฆท","OpenCurlyDoubleQuote":"โ€œ","OpenCurlyQuote":"โ€˜","operp":"โฆน","oplus":"โŠ•","orarr":"โ†ป","Or":"โฉ”","or":"โˆจ","ord":"โฉ","order":"โ„ด","orderof":"โ„ด","ordf":"ยช","ordm":"ยบ","origof":"โŠถ","oror":"โฉ–","orslope":"โฉ—","orv":"โฉ›","oS":"โ“ˆ","Oscr":"๐’ช","oscr":"โ„ด","Oslash":"ร˜","oslash":"รธ","osol":"โŠ˜","Otilde":"ร•","otilde":"รต","otimesas":"โจถ","Otimes":"โจท","otimes":"โŠ—","Ouml":"ร–","ouml":"รถ","ovbar":"โŒฝ","OverBar":"โ€พ","OverBrace":"โž","OverBracket":"โŽด","OverParenthesis":"โœ","para":"ยถ","parallel":"โˆฅ","par":"โˆฅ","parsim":"โซณ","parsl":"โซฝ","part":"โˆ‚","PartialD":"โˆ‚","Pcy":"ะŸ","pcy":"ะฟ","percnt":"%","period":".","permil":"โ€ฐ","perp":"โŠฅ","pertenk":"โ€ฑ","Pfr":"๐”“","pfr":"๐”ญ","Phi":"ฮฆ","phi":"ฯ†","phiv":"ฯ•","phmmat":"โ„ณ","phone":"โ˜Ž","Pi":"ฮ ","pi":"ฯ€","pitchfork":"โ‹”","piv":"ฯ–","planck":"โ„","planckh":"โ„Ž","plankv":"โ„","plusacir":"โจฃ","plusb":"โŠž","pluscir":"โจข","plus":"+","plusdo":"โˆ”","plusdu":"โจฅ","pluse":"โฉฒ","PlusMinus":"ยฑ","plusmn":"ยฑ","plussim":"โจฆ","plustwo":"โจง","pm":"ยฑ","Poincareplane":"โ„Œ","pointint":"โจ•","popf":"๐•ก","Popf":"โ„™","pound":"ยฃ","prap":"โชท","Pr":"โชป","pr":"โ‰บ","prcue":"โ‰ผ","precapprox":"โชท","prec":"โ‰บ","preccurlyeq":"โ‰ผ","Precedes":"โ‰บ","PrecedesEqual":"โชฏ","PrecedesSlantEqual":"โ‰ผ","PrecedesTilde":"โ‰พ","preceq":"โชฏ","precnapprox":"โชน","precneqq":"โชต","precnsim":"โ‹จ","pre":"โชฏ","prE":"โชณ","precsim":"โ‰พ","prime":"โ€ฒ","Prime":"โ€ณ","primes":"โ„™","prnap":"โชน","prnE":"โชต","prnsim":"โ‹จ","prod":"โˆ","Product":"โˆ","profalar":"โŒฎ","profline":"โŒ’","profsurf":"โŒ“","prop":"โˆ","Proportional":"โˆ","Proportion":"โˆท","propto":"โˆ","prsim":"โ‰พ","prurel":"โŠฐ","Pscr":"๐’ซ","pscr":"๐“…","Psi":"ฮจ","psi":"ฯˆ","puncsp":"โ€ˆ","Qfr":"๐””","qfr":"๐”ฎ","qint":"โจŒ","qopf":"๐•ข","Qopf":"โ„š","qprime":"โ—","Qscr":"๐’ฌ","qscr":"๐“†","quaternions":"โ„","quatint":"โจ–","quest":"?","questeq":"โ‰Ÿ","quot":"\\"","QUOT":"\\"","rAarr":"โ‡›","race":"โˆฝฬฑ","Racute":"ล”","racute":"ล•","radic":"โˆš","raemptyv":"โฆณ","rang":"โŸฉ","Rang":"โŸซ","rangd":"โฆ’","range":"โฆฅ","rangle":"โŸฉ","raquo":"ยป","rarrap":"โฅต","rarrb":"โ‡ฅ","rarrbfs":"โค ","rarrc":"โคณ","rarr":"โ†’","Rarr":"โ† ","rArr":"โ‡’","rarrfs":"โคž","rarrhk":"โ†ช","rarrlp":"โ†ฌ","rarrpl":"โฅ…","rarrsim":"โฅด","Rarrtl":"โค–","rarrtl":"โ†ฃ","rarrw":"โ†","ratail":"โคš","rAtail":"โคœ","ratio":"โˆถ","rationals":"โ„š","rbarr":"โค","rBarr":"โค","RBarr":"โค","rbbrk":"โณ","rbrace":"}","rbrack":"]","rbrke":"โฆŒ","rbrksld":"โฆŽ","rbrkslu":"โฆ","Rcaron":"ล˜","rcaron":"ล™","Rcedil":"ล–","rcedil":"ล—","rceil":"โŒ‰","rcub":"}","Rcy":"ะ ","rcy":"ั€","rdca":"โคท","rdldhar":"โฅฉ","rdquo":"โ€","rdquor":"โ€","rdsh":"โ†ณ","real":"โ„œ","realine":"โ„›","realpart":"โ„œ","reals":"โ„","Re":"โ„œ","rect":"โ–ญ","reg":"ยฎ","REG":"ยฎ","ReverseElement":"โˆ‹","ReverseEquilibrium":"โ‡‹","ReverseUpEquilibrium":"โฅฏ","rfisht":"โฅฝ","rfloor":"โŒ‹","rfr":"๐”ฏ","Rfr":"โ„œ","rHar":"โฅค","rhard":"โ‡","rharu":"โ‡€","rharul":"โฅฌ","Rho":"ฮก","rho":"ฯ","rhov":"ฯฑ","RightAngleBracket":"โŸฉ","RightArrowBar":"โ‡ฅ","rightarrow":"โ†’","RightArrow":"โ†’","Rightarrow":"โ‡’","RightArrowLeftArrow":"โ‡„","rightarrowtail":"โ†ฃ","RightCeiling":"โŒ‰","RightDoubleBracket":"โŸง","RightDownTeeVector":"โฅ","RightDownVectorBar":"โฅ•","RightDownVector":"โ‡‚","RightFloor":"โŒ‹","rightharpoondown":"โ‡","rightharpoonup":"โ‡€","rightleftarrows":"โ‡„","rightleftharpoons":"โ‡Œ","rightrightarrows":"โ‡‰","rightsquigarrow":"โ†","RightTeeArrow":"โ†ฆ","RightTee":"โŠข","RightTeeVector":"โฅ›","rightthreetimes":"โ‹Œ","RightTriangleBar":"โง","RightTriangle":"โŠณ","RightTriangleEqual":"โŠต","RightUpDownVector":"โฅ","RightUpTeeVector":"โฅœ","RightUpVectorBar":"โฅ”","RightUpVector":"โ†พ","RightVectorBar":"โฅ“","RightVector":"โ‡€","ring":"หš","risingdotseq":"โ‰“","rlarr":"โ‡„","rlhar":"โ‡Œ","rlm":"โ€","rmoustache":"โŽฑ","rmoust":"โŽฑ","rnmid":"โซฎ","roang":"โŸญ","roarr":"โ‡พ","robrk":"โŸง","ropar":"โฆ†","ropf":"๐•ฃ","Ropf":"โ„","roplus":"โจฎ","rotimes":"โจต","RoundImplies":"โฅฐ","rpar":")","rpargt":"โฆ”","rppolint":"โจ’","rrarr":"โ‡‰","Rrightarrow":"โ‡›","rsaquo":"โ€บ","rscr":"๐“‡","Rscr":"โ„›","rsh":"โ†ฑ","Rsh":"โ†ฑ","rsqb":"]","rsquo":"โ€™","rsquor":"โ€™","rthree":"โ‹Œ","rtimes":"โ‹Š","rtri":"โ–น","rtrie":"โŠต","rtrif":"โ–ธ","rtriltri":"โงŽ","RuleDelayed":"โงด","ruluhar":"โฅจ","rx":"โ„ž","Sacute":"ลš","sacute":"ล›","sbquo":"โ€š","scap":"โชธ","Scaron":"ล ","scaron":"ลก","Sc":"โชผ","sc":"โ‰ป","sccue":"โ‰ฝ","sce":"โชฐ","scE":"โชด","Scedil":"ลž","scedil":"ลŸ","Scirc":"ลœ","scirc":"ล","scnap":"โชบ","scnE":"โชถ","scnsim":"โ‹ฉ","scpolint":"โจ“","scsim":"โ‰ฟ","Scy":"ะก","scy":"ั","sdotb":"โŠก","sdot":"โ‹…","sdote":"โฉฆ","searhk":"โคฅ","searr":"โ†˜","seArr":"โ‡˜","searrow":"โ†˜","sect":"ยง","semi":";","seswar":"โคฉ","setminus":"โˆ–","setmn":"โˆ–","sext":"โœถ","Sfr":"๐”–","sfr":"๐”ฐ","sfrown":"โŒข","sharp":"โ™ฏ","SHCHcy":"ะฉ","shchcy":"ั‰","SHcy":"ะจ","shcy":"ัˆ","ShortDownArrow":"โ†“","ShortLeftArrow":"โ†","shortmid":"โˆฃ","shortparallel":"โˆฅ","ShortRightArrow":"โ†’","ShortUpArrow":"โ†‘","shy":"ยญ","Sigma":"ฮฃ","sigma":"ฯƒ","sigmaf":"ฯ‚","sigmav":"ฯ‚","sim":"โˆผ","simdot":"โฉช","sime":"โ‰ƒ","simeq":"โ‰ƒ","simg":"โชž","simgE":"โช ","siml":"โช","simlE":"โชŸ","simne":"โ‰†","simplus":"โจค","simrarr":"โฅฒ","slarr":"โ†","SmallCircle":"โˆ˜","smallsetminus":"โˆ–","smashp":"โจณ","smeparsl":"โงค","smid":"โˆฃ","smile":"โŒฃ","smt":"โชช","smte":"โชฌ","smtes":"โชฌ๏ธ€","SOFTcy":"ะฌ","softcy":"ัŒ","solbar":"โŒฟ","solb":"โง„","sol":"/","Sopf":"๐•Š","sopf":"๐•ค","spades":"โ™ ","spadesuit":"โ™ ","spar":"โˆฅ","sqcap":"โŠ“","sqcaps":"โŠ“๏ธ€","sqcup":"โŠ”","sqcups":"โŠ”๏ธ€","Sqrt":"โˆš","sqsub":"โŠ","sqsube":"โŠ‘","sqsubset":"โŠ","sqsubseteq":"โŠ‘","sqsup":"โŠ","sqsupe":"โŠ’","sqsupset":"โŠ","sqsupseteq":"โŠ’","square":"โ–ก","Square":"โ–ก","SquareIntersection":"โŠ“","SquareSubset":"โŠ","SquareSubsetEqual":"โŠ‘","SquareSuperset":"โŠ","SquareSupersetEqual":"โŠ’","SquareUnion":"โŠ”","squarf":"โ–ช","squ":"โ–ก","squf":"โ–ช","srarr":"โ†’","Sscr":"๐’ฎ","sscr":"๐“ˆ","ssetmn":"โˆ–","ssmile":"โŒฃ","sstarf":"โ‹†","Star":"โ‹†","star":"โ˜†","starf":"โ˜…","straightepsilon":"ฯต","straightphi":"ฯ•","strns":"ยฏ","sub":"โŠ‚","Sub":"โ‹","subdot":"โชฝ","subE":"โซ…","sube":"โŠ†","subedot":"โซƒ","submult":"โซ","subnE":"โซ‹","subne":"โŠŠ","subplus":"โชฟ","subrarr":"โฅน","subset":"โŠ‚","Subset":"โ‹","subseteq":"โŠ†","subseteqq":"โซ…","SubsetEqual":"โŠ†","subsetneq":"โŠŠ","subsetneqq":"โซ‹","subsim":"โซ‡","subsub":"โซ•","subsup":"โซ“","succapprox":"โชธ","succ":"โ‰ป","succcurlyeq":"โ‰ฝ","Succeeds":"โ‰ป","SucceedsEqual":"โชฐ","SucceedsSlantEqual":"โ‰ฝ","SucceedsTilde":"โ‰ฟ","succeq":"โชฐ","succnapprox":"โชบ","succneqq":"โชถ","succnsim":"โ‹ฉ","succsim":"โ‰ฟ","SuchThat":"โˆ‹","sum":"โˆ‘","Sum":"โˆ‘","sung":"โ™ช","sup1":"ยน","sup2":"ยฒ","sup3":"ยณ","sup":"โŠƒ","Sup":"โ‹‘","supdot":"โชพ","supdsub":"โซ˜","supE":"โซ†","supe":"โŠ‡","supedot":"โซ„","Superset":"โŠƒ","SupersetEqual":"โŠ‡","suphsol":"โŸ‰","suphsub":"โซ—","suplarr":"โฅป","supmult":"โซ‚","supnE":"โซŒ","supne":"โŠ‹","supplus":"โซ€","supset":"โŠƒ","Supset":"โ‹‘","supseteq":"โŠ‡","supseteqq":"โซ†","supsetneq":"โŠ‹","supsetneqq":"โซŒ","supsim":"โซˆ","supsub":"โซ”","supsup":"โซ–","swarhk":"โคฆ","swarr":"โ†™","swArr":"โ‡™","swarrow":"โ†™","swnwar":"โคช","szlig":"รŸ","Tab":"\\t","target":"โŒ–","Tau":"ฮค","tau":"ฯ„","tbrk":"โŽด","Tcaron":"ลค","tcaron":"ลฅ","Tcedil":"ลข","tcedil":"ลฃ","Tcy":"ะข","tcy":"ั‚","tdot":"โƒ›","telrec":"โŒ•","Tfr":"๐”—","tfr":"๐”ฑ","there4":"โˆด","therefore":"โˆด","Therefore":"โˆด","Theta":"ฮ˜","theta":"ฮธ","thetasym":"ฯ‘","thetav":"ฯ‘","thickapprox":"โ‰ˆ","thicksim":"โˆผ","ThickSpace":"โŸโ€Š","ThinSpace":"โ€‰","thinsp":"โ€‰","thkap":"โ‰ˆ","thksim":"โˆผ","THORN":"รž","thorn":"รพ","tilde":"หœ","Tilde":"โˆผ","TildeEqual":"โ‰ƒ","TildeFullEqual":"โ‰…","TildeTilde":"โ‰ˆ","timesbar":"โจฑ","timesb":"โŠ ","times":"ร—","timesd":"โจฐ","tint":"โˆญ","toea":"โคจ","topbot":"โŒถ","topcir":"โซฑ","top":"โŠค","Topf":"๐•‹","topf":"๐•ฅ","topfork":"โซš","tosa":"โคฉ","tprime":"โ€ด","trade":"โ„ข","TRADE":"โ„ข","triangle":"โ–ต","triangledown":"โ–ฟ","triangleleft":"โ—ƒ","trianglelefteq":"โŠด","triangleq":"โ‰œ","triangleright":"โ–น","trianglerighteq":"โŠต","tridot":"โ—ฌ","trie":"โ‰œ","triminus":"โจบ","TripleDot":"โƒ›","triplus":"โจน","trisb":"โง","tritime":"โจป","trpezium":"โข","Tscr":"๐’ฏ","tscr":"๐“‰","TScy":"ะฆ","tscy":"ั†","TSHcy":"ะ‹","tshcy":"ั›","Tstrok":"ลฆ","tstrok":"ลง","twixt":"โ‰ฌ","twoheadleftarrow":"โ†ž","twoheadrightarrow":"โ† ","Uacute":"รš","uacute":"รบ","uarr":"โ†‘","Uarr":"โ†Ÿ","uArr":"โ‡‘","Uarrocir":"โฅ‰","Ubrcy":"ะŽ","ubrcy":"ัž","Ubreve":"ลฌ","ubreve":"ลญ","Ucirc":"ร›","ucirc":"รป","Ucy":"ะฃ","ucy":"ัƒ","udarr":"โ‡…","Udblac":"ลฐ","udblac":"ลฑ","udhar":"โฅฎ","ufisht":"โฅพ","Ufr":"๐”˜","ufr":"๐”ฒ","Ugrave":"ร™","ugrave":"รน","uHar":"โฅฃ","uharl":"โ†ฟ","uharr":"โ†พ","uhblk":"โ–€","ulcorn":"โŒœ","ulcorner":"โŒœ","ulcrop":"โŒ","ultri":"โ—ธ","Umacr":"ลช","umacr":"ลซ","uml":"ยจ","UnderBar":"_","UnderBrace":"โŸ","UnderBracket":"โŽต","UnderParenthesis":"โ","Union":"โ‹ƒ","UnionPlus":"โŠŽ","Uogon":"ลฒ","uogon":"ลณ","Uopf":"๐•Œ","uopf":"๐•ฆ","UpArrowBar":"โค’","uparrow":"โ†‘","UpArrow":"โ†‘","Uparrow":"โ‡‘","UpArrowDownArrow":"โ‡…","updownarrow":"โ†•","UpDownArrow":"โ†•","Updownarrow":"โ‡•","UpEquilibrium":"โฅฎ","upharpoonleft":"โ†ฟ","upharpoonright":"โ†พ","uplus":"โŠŽ","UpperLeftArrow":"โ†–","UpperRightArrow":"โ†—","upsi":"ฯ…","Upsi":"ฯ’","upsih":"ฯ’","Upsilon":"ฮฅ","upsilon":"ฯ…","UpTeeArrow":"โ†ฅ","UpTee":"โŠฅ","upuparrows":"โ‡ˆ","urcorn":"โŒ","urcorner":"โŒ","urcrop":"โŒŽ","Uring":"ลฎ","uring":"ลฏ","urtri":"โ—น","Uscr":"๐’ฐ","uscr":"๐“Š","utdot":"โ‹ฐ","Utilde":"ลจ","utilde":"ลฉ","utri":"โ–ต","utrif":"โ–ด","uuarr":"โ‡ˆ","Uuml":"รœ","uuml":"รผ","uwangle":"โฆง","vangrt":"โฆœ","varepsilon":"ฯต","varkappa":"ฯฐ","varnothing":"โˆ…","varphi":"ฯ•","varpi":"ฯ–","varpropto":"โˆ","varr":"โ†•","vArr":"โ‡•","varrho":"ฯฑ","varsigma":"ฯ‚","varsubsetneq":"โŠŠ๏ธ€","varsubsetneqq":"โซ‹๏ธ€","varsupsetneq":"โŠ‹๏ธ€","varsupsetneqq":"โซŒ๏ธ€","vartheta":"ฯ‘","vartriangleleft":"โŠฒ","vartriangleright":"โŠณ","vBar":"โซจ","Vbar":"โซซ","vBarv":"โซฉ","Vcy":"ะ’","vcy":"ะฒ","vdash":"โŠข","vDash":"โŠจ","Vdash":"โŠฉ","VDash":"โŠซ","Vdashl":"โซฆ","veebar":"โŠป","vee":"โˆจ","Vee":"โ‹","veeeq":"โ‰š","vellip":"โ‹ฎ","verbar":"|","Verbar":"โ€–","vert":"|","Vert":"โ€–","VerticalBar":"โˆฃ","VerticalLine":"|","VerticalSeparator":"โ˜","VerticalTilde":"โ‰€","VeryThinSpace":"โ€Š","Vfr":"๐”™","vfr":"๐”ณ","vltri":"โŠฒ","vnsub":"โŠ‚โƒ’","vnsup":"โŠƒโƒ’","Vopf":"๐•","vopf":"๐•ง","vprop":"โˆ","vrtri":"โŠณ","Vscr":"๐’ฑ","vscr":"๐“‹","vsubnE":"โซ‹๏ธ€","vsubne":"โŠŠ๏ธ€","vsupnE":"โซŒ๏ธ€","vsupne":"โŠ‹๏ธ€","Vvdash":"โŠช","vzigzag":"โฆš","Wcirc":"ลด","wcirc":"ลต","wedbar":"โฉŸ","wedge":"โˆง","Wedge":"โ‹€","wedgeq":"โ‰™","weierp":"โ„˜","Wfr":"๐”š","wfr":"๐”ด","Wopf":"๐•Ž","wopf":"๐•จ","wp":"โ„˜","wr":"โ‰€","wreath":"โ‰€","Wscr":"๐’ฒ","wscr":"๐“Œ","xcap":"โ‹‚","xcirc":"โ—ฏ","xcup":"โ‹ƒ","xdtri":"โ–ฝ","Xfr":"๐”›","xfr":"๐”ต","xharr":"โŸท","xhArr":"โŸบ","Xi":"ฮž","xi":"ฮพ","xlarr":"โŸต","xlArr":"โŸธ","xmap":"โŸผ","xnis":"โ‹ป","xodot":"โจ€","Xopf":"๐•","xopf":"๐•ฉ","xoplus":"โจ","xotime":"โจ‚","xrarr":"โŸถ","xrArr":"โŸน","Xscr":"๐’ณ","xscr":"๐“","xsqcup":"โจ†","xuplus":"โจ„","xutri":"โ–ณ","xvee":"โ‹","xwedge":"โ‹€","Yacute":"ร","yacute":"รฝ","YAcy":"ะฏ","yacy":"ั","Ycirc":"ลถ","ycirc":"ลท","Ycy":"ะซ","ycy":"ั‹","yen":"ยฅ","Yfr":"๐”œ","yfr":"๐”ถ","YIcy":"ะ‡","yicy":"ั—","Yopf":"๐•","yopf":"๐•ช","Yscr":"๐’ด","yscr":"๐“Ž","YUcy":"ะฎ","yucy":"ัŽ","yuml":"รฟ","Yuml":"ลธ","Zacute":"ลน","zacute":"ลบ","Zcaron":"ลฝ","zcaron":"ลพ","Zcy":"ะ—","zcy":"ะท","Zdot":"ลป","zdot":"ลผ","zeetrf":"โ„จ","ZeroWidthSpace":"โ€‹","Zeta":"ฮ–","zeta":"ฮถ","zfr":"๐”ท","Zfr":"โ„จ","ZHcy":"ะ–","zhcy":"ะถ","zigrarr":"โ‡","zopf":"๐•ซ","Zopf":"โ„ค","Zscr":"๐’ต","zscr":"๐“","zwj":"โ€","zwnj":"โ€Œ"}')},2128:function(e){"use strict";e.exports=JSON.parse('{"Aacute":"ร","aacute":"รก","Acirc":"ร‚","acirc":"รข","acute":"ยด","AElig":"ร†","aelig":"รฆ","Agrave":"ร€","agrave":"ร ","amp":"&","AMP":"&","Aring":"ร…","aring":"รฅ","Atilde":"รƒ","atilde":"รฃ","Auml":"ร„","auml":"รค","brvbar":"ยฆ","Ccedil":"ร‡","ccedil":"รง","cedil":"ยธ","cent":"ยข","copy":"ยฉ","COPY":"ยฉ","curren":"ยค","deg":"ยฐ","divide":"รท","Eacute":"ร‰","eacute":"รฉ","Ecirc":"รŠ","ecirc":"รช","Egrave":"รˆ","egrave":"รจ","ETH":"ร","eth":"รฐ","Euml":"ร‹","euml":"รซ","frac12":"ยฝ","frac14":"ยผ","frac34":"ยพ","gt":">","GT":">","Iacute":"ร","iacute":"รญ","Icirc":"รŽ","icirc":"รฎ","iexcl":"ยก","Igrave":"รŒ","igrave":"รฌ","iquest":"ยฟ","Iuml":"ร","iuml":"รฏ","laquo":"ยซ","lt":"<","LT":"<","macr":"ยฏ","micro":"ยต","middot":"ยท","nbsp":"ย ","not":"ยฌ","Ntilde":"ร‘","ntilde":"รฑ","Oacute":"ร“","oacute":"รณ","Ocirc":"ร”","ocirc":"รด","Ograve":"ร’","ograve":"รฒ","ordf":"ยช","ordm":"ยบ","Oslash":"ร˜","oslash":"รธ","Otilde":"ร•","otilde":"รต","Ouml":"ร–","ouml":"รถ","para":"ยถ","plusmn":"ยฑ","pound":"ยฃ","quot":"\\"","QUOT":"\\"","raquo":"ยป","reg":"ยฎ","REG":"ยฎ","sect":"ยง","shy":"ยญ","sup1":"ยน","sup2":"ยฒ","sup3":"ยณ","szlig":"รŸ","THORN":"รž","thorn":"รพ","times":"ร—","Uacute":"รš","uacute":"รบ","Ucirc":"ร›","ucirc":"รป","Ugrave":"ร™","ugrave":"รน","uml":"ยจ","Uuml":"รœ","uuml":"รผ","Yacute":"ร","yacute":"รฝ","yen":"ยฅ","yuml":"รฟ"}')},4931:function(e){"use strict";e.exports=JSON.parse('{"amp":"&","apos":"\'","gt":">","lt":"<","quot":"\\""}')}};var r={};function __nccwpck_require__(t){var a=r[t];if(a!==undefined){return a.exports}var n=r[t]={id:t,loaded:false,exports:{}};var i=true;try{e[t].call(n.exports,n,n.exports,__nccwpck_require__);i=false}finally{if(i)delete r[t]}n.loaded=true;return n.exports}!function(){__nccwpck_require__.nmd=function(e){e.paths=[];if(!e.children)e.children=[];return e}}();if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var t=__nccwpck_require__(5417);module.exports=t})(); \ No newline at end of file +/*! https://mths.be/he v1.2.0 by @mathias | MIT license */(function(t){var a=true&&r;var n=true&&e&&e.exports==a&&e;var i=typeof global=="object"&&global;if(i.global===i||i.window===i){t=i}var o=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g;var s=/[\x01-\x7F]/g;var u=/[\x01-\t\x0B\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g;var l=/<\u20D2|=\u20E5|>\u20D2|\u205F\u200A|\u219D\u0338|\u2202\u0338|\u2220\u20D2|\u2229\uFE00|\u222A\uFE00|\u223C\u20D2|\u223D\u0331|\u223E\u0333|\u2242\u0338|\u224B\u0338|\u224D\u20D2|\u224E\u0338|\u224F\u0338|\u2250\u0338|\u2261\u20E5|\u2264\u20D2|\u2265\u20D2|\u2266\u0338|\u2267\u0338|\u2268\uFE00|\u2269\uFE00|\u226A\u0338|\u226A\u20D2|\u226B\u0338|\u226B\u20D2|\u227F\u0338|\u2282\u20D2|\u2283\u20D2|\u228A\uFE00|\u228B\uFE00|\u228F\u0338|\u2290\u0338|\u2293\uFE00|\u2294\uFE00|\u22B4\u20D2|\u22B5\u20D2|\u22D8\u0338|\u22D9\u0338|\u22DA\uFE00|\u22DB\uFE00|\u22F5\u0338|\u22F9\u0338|\u2933\u0338|\u29CF\u0338|\u29D0\u0338|\u2A6D\u0338|\u2A70\u0338|\u2A7D\u0338|\u2A7E\u0338|\u2AA1\u0338|\u2AA2\u0338|\u2AAC\uFE00|\u2AAD\uFE00|\u2AAF\u0338|\u2AB0\u0338|\u2AC5\u0338|\u2AC6\u0338|\u2ACB\uFE00|\u2ACC\uFE00|\u2AFD\u20E5|[\xA0-\u0113\u0116-\u0122\u0124-\u012B\u012E-\u014D\u0150-\u017E\u0192\u01B5\u01F5\u0237\u02C6\u02C7\u02D8-\u02DD\u0311\u0391-\u03A1\u03A3-\u03A9\u03B1-\u03C9\u03D1\u03D2\u03D5\u03D6\u03DC\u03DD\u03F0\u03F1\u03F5\u03F6\u0401-\u040C\u040E-\u044F\u0451-\u045C\u045E\u045F\u2002-\u2005\u2007-\u2010\u2013-\u2016\u2018-\u201A\u201C-\u201E\u2020-\u2022\u2025\u2026\u2030-\u2035\u2039\u203A\u203E\u2041\u2043\u2044\u204F\u2057\u205F-\u2063\u20AC\u20DB\u20DC\u2102\u2105\u210A-\u2113\u2115-\u211E\u2122\u2124\u2127-\u2129\u212C\u212D\u212F-\u2131\u2133-\u2138\u2145-\u2148\u2153-\u215E\u2190-\u219B\u219D-\u21A7\u21A9-\u21AE\u21B0-\u21B3\u21B5-\u21B7\u21BA-\u21DB\u21DD\u21E4\u21E5\u21F5\u21FD-\u2205\u2207-\u2209\u220B\u220C\u220F-\u2214\u2216-\u2218\u221A\u221D-\u2238\u223A-\u2257\u2259\u225A\u225C\u225F-\u2262\u2264-\u228B\u228D-\u229B\u229D-\u22A5\u22A7-\u22B0\u22B2-\u22BB\u22BD-\u22DB\u22DE-\u22E3\u22E6-\u22F7\u22F9-\u22FE\u2305\u2306\u2308-\u2310\u2312\u2313\u2315\u2316\u231C-\u231F\u2322\u2323\u232D\u232E\u2336\u233D\u233F\u237C\u23B0\u23B1\u23B4-\u23B6\u23DC-\u23DF\u23E2\u23E7\u2423\u24C8\u2500\u2502\u250C\u2510\u2514\u2518\u251C\u2524\u252C\u2534\u253C\u2550-\u256C\u2580\u2584\u2588\u2591-\u2593\u25A1\u25AA\u25AB\u25AD\u25AE\u25B1\u25B3-\u25B5\u25B8\u25B9\u25BD-\u25BF\u25C2\u25C3\u25CA\u25CB\u25EC\u25EF\u25F8-\u25FC\u2605\u2606\u260E\u2640\u2642\u2660\u2663\u2665\u2666\u266A\u266D-\u266F\u2713\u2717\u2720\u2736\u2758\u2772\u2773\u27C8\u27C9\u27E6-\u27ED\u27F5-\u27FA\u27FC\u27FF\u2902-\u2905\u290C-\u2913\u2916\u2919-\u2920\u2923-\u292A\u2933\u2935-\u2939\u293C\u293D\u2945\u2948-\u294B\u294E-\u2976\u2978\u2979\u297B-\u297F\u2985\u2986\u298B-\u2996\u299A\u299C\u299D\u29A4-\u29B7\u29B9\u29BB\u29BC\u29BE-\u29C5\u29C9\u29CD-\u29D0\u29DC-\u29DE\u29E3-\u29E5\u29EB\u29F4\u29F6\u2A00-\u2A02\u2A04\u2A06\u2A0C\u2A0D\u2A10-\u2A17\u2A22-\u2A27\u2A29\u2A2A\u2A2D-\u2A31\u2A33-\u2A3C\u2A3F\u2A40\u2A42-\u2A4D\u2A50\u2A53-\u2A58\u2A5A-\u2A5D\u2A5F\u2A66\u2A6A\u2A6D-\u2A75\u2A77-\u2A9A\u2A9D-\u2AA2\u2AA4-\u2AB0\u2AB3-\u2AC8\u2ACB\u2ACC\u2ACF-\u2ADB\u2AE4\u2AE6-\u2AE9\u2AEB-\u2AF3\u2AFD\uFB00-\uFB04]|\uD835[\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDCCF\uDD04\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDD6B]/g;var c={"ยญ":"shy","โ€Œ":"zwnj","โ€":"zwj","โ€Ž":"lrm","โฃ":"ic","โข":"it","โก":"af","โ€":"rlm","โ€‹":"ZeroWidthSpace","โ ":"NoBreak","ฬ‘":"DownBreve","โƒ›":"tdot","โƒœ":"DotDot","\t":"Tab","\n":"NewLine","โ€ˆ":"puncsp","โŸ":"MediumSpace","โ€‰":"thinsp","โ€Š":"hairsp","โ€„":"emsp13","โ€‚":"ensp","โ€…":"emsp14","โ€ƒ":"emsp","โ€‡":"numsp","ย ":"nbsp","โŸโ€Š":"ThickSpace","โ€พ":"oline",_:"lowbar","โ€":"dash","โ€“":"ndash","โ€”":"mdash","โ€•":"horbar",",":"comma",";":"semi","โ":"bsemi",":":"colon","โฉด":"Colone","!":"excl","ยก":"iexcl","?":"quest","ยฟ":"iquest",".":"period","โ€ฅ":"nldr","โ€ฆ":"mldr","ยท":"middot","'":"apos","โ€˜":"lsquo","โ€™":"rsquo","โ€š":"sbquo","โ€น":"lsaquo","โ€บ":"rsaquo",'"':"quot","โ€œ":"ldquo","โ€":"rdquo","โ€ž":"bdquo","ยซ":"laquo","ยป":"raquo","(":"lpar",")":"rpar","[":"lsqb","]":"rsqb","{":"lcub","}":"rcub","โŒˆ":"lceil","โŒ‰":"rceil","โŒŠ":"lfloor","โŒ‹":"rfloor","โฆ…":"lopar","โฆ†":"ropar","โฆ‹":"lbrke","โฆŒ":"rbrke","โฆ":"lbrkslu","โฆŽ":"rbrksld","โฆ":"lbrksld","โฆ":"rbrkslu","โฆ‘":"langd","โฆ’":"rangd","โฆ“":"lparlt","โฆ”":"rpargt","โฆ•":"gtlPar","โฆ–":"ltrPar","โŸฆ":"lobrk","โŸง":"robrk","โŸจ":"lang","โŸฉ":"rang","โŸช":"Lang","โŸซ":"Rang","โŸฌ":"loang","โŸญ":"roang","โฒ":"lbbrk","โณ":"rbbrk","โ€–":"Vert","ยง":"sect","ยถ":"para","@":"commat","*":"ast","/":"sol",undefined:null,"&":"amp","#":"num","%":"percnt","โ€ฐ":"permil","โ€ฑ":"pertenk","โ€ ":"dagger","โ€ก":"Dagger","โ€ข":"bull","โƒ":"hybull","โ€ฒ":"prime","โ€ณ":"Prime","โ€ด":"tprime","โ—":"qprime","โ€ต":"bprime","โ":"caret","`":"grave","ยด":"acute","หœ":"tilde","^":"Hat","ยฏ":"macr","ห˜":"breve","ห™":"dot","ยจ":"die","หš":"ring","ห":"dblac","ยธ":"cedil","ห›":"ogon","ห†":"circ","ห‡":"caron","ยฐ":"deg","ยฉ":"copy","ยฎ":"reg","โ„—":"copysr","โ„˜":"wp","โ„ž":"rx","โ„ง":"mho","โ„ฉ":"iiota","โ†":"larr","โ†š":"nlarr","โ†’":"rarr","โ†›":"nrarr","โ†‘":"uarr","โ†“":"darr","โ†”":"harr","โ†ฎ":"nharr","โ†•":"varr","โ†–":"nwarr","โ†—":"nearr","โ†˜":"searr","โ†™":"swarr","โ†":"rarrw","โ†ฬธ":"nrarrw","โ†ž":"Larr","โ†Ÿ":"Uarr","โ† ":"Rarr","โ†ก":"Darr","โ†ข":"larrtl","โ†ฃ":"rarrtl","โ†ค":"mapstoleft","โ†ฅ":"mapstoup","โ†ฆ":"map","โ†ง":"mapstodown","โ†ฉ":"larrhk","โ†ช":"rarrhk","โ†ซ":"larrlp","โ†ฌ":"rarrlp","โ†ญ":"harrw","โ†ฐ":"lsh","โ†ฑ":"rsh","โ†ฒ":"ldsh","โ†ณ":"rdsh","โ†ต":"crarr","โ†ถ":"cularr","โ†ท":"curarr","โ†บ":"olarr","โ†ป":"orarr","โ†ผ":"lharu","โ†ฝ":"lhard","โ†พ":"uharr","โ†ฟ":"uharl","โ‡€":"rharu","โ‡":"rhard","โ‡‚":"dharr","โ‡ƒ":"dharl","โ‡„":"rlarr","โ‡…":"udarr","โ‡†":"lrarr","โ‡‡":"llarr","โ‡ˆ":"uuarr","โ‡‰":"rrarr","โ‡Š":"ddarr","โ‡‹":"lrhar","โ‡Œ":"rlhar","โ‡":"lArr","โ‡":"nlArr","โ‡‘":"uArr","โ‡’":"rArr","โ‡":"nrArr","โ‡“":"dArr","โ‡”":"iff","โ‡Ž":"nhArr","โ‡•":"vArr","โ‡–":"nwArr","โ‡—":"neArr","โ‡˜":"seArr","โ‡™":"swArr","โ‡š":"lAarr","โ‡›":"rAarr","โ‡":"zigrarr","โ‡ค":"larrb","โ‡ฅ":"rarrb","โ‡ต":"duarr","โ‡ฝ":"loarr","โ‡พ":"roarr","โ‡ฟ":"hoarr","โˆ€":"forall","โˆ":"comp","โˆ‚":"part","โˆ‚ฬธ":"npart","โˆƒ":"exist","โˆ„":"nexist","โˆ…":"empty","โˆ‡":"Del","โˆˆ":"in","โˆ‰":"notin","โˆ‹":"ni","โˆŒ":"notni","ฯถ":"bepsi","โˆ":"prod","โˆ":"coprod","โˆ‘":"sum","+":"plus","ยฑ":"pm","รท":"div","ร—":"times","<":"lt","โ‰ฎ":"nlt","<โƒ’":"nvlt","=":"equals","โ‰ ":"ne","=โƒฅ":"bne","โฉต":"Equal",">":"gt","โ‰ฏ":"ngt",">โƒ’":"nvgt","ยฌ":"not","|":"vert","ยฆ":"brvbar","โˆ’":"minus","โˆ“":"mp","โˆ”":"plusdo","โ„":"frasl","โˆ–":"setmn","โˆ—":"lowast","โˆ˜":"compfn","โˆš":"Sqrt","โˆ":"prop","โˆž":"infin","โˆŸ":"angrt","โˆ ":"ang","โˆ โƒ’":"nang","โˆก":"angmsd","โˆข":"angsph","โˆฃ":"mid","โˆค":"nmid","โˆฅ":"par","โˆฆ":"npar","โˆง":"and","โˆจ":"or","โˆฉ":"cap","โˆฉ๏ธ€":"caps","โˆช":"cup","โˆช๏ธ€":"cups","โˆซ":"int","โˆฌ":"Int","โˆญ":"tint","โจŒ":"qint","โˆฎ":"oint","โˆฏ":"Conint","โˆฐ":"Cconint","โˆฑ":"cwint","โˆฒ":"cwconint","โˆณ":"awconint","โˆด":"there4","โˆต":"becaus","โˆถ":"ratio","โˆท":"Colon","โˆธ":"minusd","โˆบ":"mDDot","โˆป":"homtht","โˆผ":"sim","โ‰":"nsim","โˆผโƒ’":"nvsim","โˆฝ":"bsim","โˆฝฬฑ":"race","โˆพ":"ac","โˆพฬณ":"acE","โˆฟ":"acd","โ‰€":"wr","โ‰‚":"esim","โ‰‚ฬธ":"nesim","โ‰ƒ":"sime","โ‰„":"nsime","โ‰…":"cong","โ‰‡":"ncong","โ‰†":"simne","โ‰ˆ":"ap","โ‰‰":"nap","โ‰Š":"ape","โ‰‹":"apid","โ‰‹ฬธ":"napid","โ‰Œ":"bcong","โ‰":"CupCap","โ‰ญ":"NotCupCap","โ‰โƒ’":"nvap","โ‰Ž":"bump","โ‰Žฬธ":"nbump","โ‰":"bumpe","โ‰ฬธ":"nbumpe","โ‰":"doteq","โ‰ฬธ":"nedot","โ‰‘":"eDot","โ‰’":"efDot","โ‰“":"erDot","โ‰”":"colone","โ‰•":"ecolon","โ‰–":"ecir","โ‰—":"cire","โ‰™":"wedgeq","โ‰š":"veeeq","โ‰œ":"trie","โ‰Ÿ":"equest","โ‰ก":"equiv","โ‰ข":"nequiv","โ‰กโƒฅ":"bnequiv","โ‰ค":"le","โ‰ฐ":"nle","โ‰คโƒ’":"nvle","โ‰ฅ":"ge","โ‰ฑ":"nge","โ‰ฅโƒ’":"nvge","โ‰ฆ":"lE","โ‰ฆฬธ":"nlE","โ‰ง":"gE","โ‰งฬธ":"ngE","โ‰จ๏ธ€":"lvnE","โ‰จ":"lnE","โ‰ฉ":"gnE","โ‰ฉ๏ธ€":"gvnE","โ‰ช":"ll","โ‰ชฬธ":"nLtv","โ‰ชโƒ’":"nLt","โ‰ซ":"gg","โ‰ซฬธ":"nGtv","โ‰ซโƒ’":"nGt","โ‰ฌ":"twixt","โ‰ฒ":"lsim","โ‰ด":"nlsim","โ‰ณ":"gsim","โ‰ต":"ngsim","โ‰ถ":"lg","โ‰ธ":"ntlg","โ‰ท":"gl","โ‰น":"ntgl","โ‰บ":"pr","โŠ€":"npr","โ‰ป":"sc","โŠ":"nsc","โ‰ผ":"prcue","โ‹ ":"nprcue","โ‰ฝ":"sccue","โ‹ก":"nsccue","โ‰พ":"prsim","โ‰ฟ":"scsim","โ‰ฟฬธ":"NotSucceedsTilde","โŠ‚":"sub","โŠ„":"nsub","โŠ‚โƒ’":"vnsub","โŠƒ":"sup","โŠ…":"nsup","โŠƒโƒ’":"vnsup","โŠ†":"sube","โŠˆ":"nsube","โŠ‡":"supe","โŠ‰":"nsupe","โŠŠ๏ธ€":"vsubne","โŠŠ":"subne","โŠ‹๏ธ€":"vsupne","โŠ‹":"supne","โŠ":"cupdot","โŠŽ":"uplus","โŠ":"sqsub","โŠฬธ":"NotSquareSubset","โŠ":"sqsup","โŠฬธ":"NotSquareSuperset","โŠ‘":"sqsube","โ‹ข":"nsqsube","โŠ’":"sqsupe","โ‹ฃ":"nsqsupe","โŠ“":"sqcap","โŠ“๏ธ€":"sqcaps","โŠ”":"sqcup","โŠ”๏ธ€":"sqcups","โŠ•":"oplus","โŠ–":"ominus","โŠ—":"otimes","โŠ˜":"osol","โŠ™":"odot","โŠš":"ocir","โŠ›":"oast","โŠ":"odash","โŠž":"plusb","โŠŸ":"minusb","โŠ ":"timesb","โŠก":"sdotb","โŠข":"vdash","โŠฌ":"nvdash","โŠฃ":"dashv","โŠค":"top","โŠฅ":"bot","โŠง":"models","โŠจ":"vDash","โŠญ":"nvDash","โŠฉ":"Vdash","โŠฎ":"nVdash","โŠช":"Vvdash","โŠซ":"VDash","โŠฏ":"nVDash","โŠฐ":"prurel","โŠฒ":"vltri","โ‹ช":"nltri","โŠณ":"vrtri","โ‹ซ":"nrtri","โŠด":"ltrie","โ‹ฌ":"nltrie","โŠดโƒ’":"nvltrie","โŠต":"rtrie","โ‹ญ":"nrtrie","โŠตโƒ’":"nvrtrie","โŠถ":"origof","โŠท":"imof","โŠธ":"mumap","โŠน":"hercon","โŠบ":"intcal","โŠป":"veebar","โŠฝ":"barvee","โŠพ":"angrtvb","โŠฟ":"lrtri","โ‹€":"Wedge","โ‹":"Vee","โ‹‚":"xcap","โ‹ƒ":"xcup","โ‹„":"diam","โ‹…":"sdot","โ‹†":"Star","โ‹‡":"divonx","โ‹ˆ":"bowtie","โ‹‰":"ltimes","โ‹Š":"rtimes","โ‹‹":"lthree","โ‹Œ":"rthree","โ‹":"bsime","โ‹Ž":"cuvee","โ‹":"cuwed","โ‹":"Sub","โ‹‘":"Sup","โ‹’":"Cap","โ‹“":"Cup","โ‹”":"fork","โ‹•":"epar","โ‹–":"ltdot","โ‹—":"gtdot","โ‹˜":"Ll","โ‹˜ฬธ":"nLl","โ‹™":"Gg","โ‹™ฬธ":"nGg","โ‹š๏ธ€":"lesg","โ‹š":"leg","โ‹›":"gel","โ‹›๏ธ€":"gesl","โ‹ž":"cuepr","โ‹Ÿ":"cuesc","โ‹ฆ":"lnsim","โ‹ง":"gnsim","โ‹จ":"prnsim","โ‹ฉ":"scnsim","โ‹ฎ":"vellip","โ‹ฏ":"ctdot","โ‹ฐ":"utdot","โ‹ฑ":"dtdot","โ‹ฒ":"disin","โ‹ณ":"isinsv","โ‹ด":"isins","โ‹ต":"isindot","โ‹ตฬธ":"notindot","โ‹ถ":"notinvc","โ‹ท":"notinvb","โ‹น":"isinE","โ‹นฬธ":"notinE","โ‹บ":"nisd","โ‹ป":"xnis","โ‹ผ":"nis","โ‹ฝ":"notnivc","โ‹พ":"notnivb","โŒ…":"barwed","โŒ†":"Barwed","โŒŒ":"drcrop","โŒ":"dlcrop","โŒŽ":"urcrop","โŒ":"ulcrop","โŒ":"bnot","โŒ’":"profline","โŒ“":"profsurf","โŒ•":"telrec","โŒ–":"target","โŒœ":"ulcorn","โŒ":"urcorn","โŒž":"dlcorn","โŒŸ":"drcorn","โŒข":"frown","โŒฃ":"smile","โŒญ":"cylcty","โŒฎ":"profalar","โŒถ":"topbot","โŒฝ":"ovbar","โŒฟ":"solbar","โผ":"angzarr","โŽฐ":"lmoust","โŽฑ":"rmoust","โŽด":"tbrk","โŽต":"bbrk","โŽถ":"bbrktbrk","โœ":"OverParenthesis","โ":"UnderParenthesis","โž":"OverBrace","โŸ":"UnderBrace","โข":"trpezium","โง":"elinters","โฃ":"blank","โ”€":"boxh","โ”‚":"boxv","โ”Œ":"boxdr","โ”":"boxdl","โ””":"boxur","โ”˜":"boxul","โ”œ":"boxvr","โ”ค":"boxvl","โ”ฌ":"boxhd","โ”ด":"boxhu","โ”ผ":"boxvh","โ•":"boxH","โ•‘":"boxV","โ•’":"boxdR","โ•“":"boxDr","โ•”":"boxDR","โ••":"boxdL","โ•–":"boxDl","โ•—":"boxDL","โ•˜":"boxuR","โ•™":"boxUr","โ•š":"boxUR","โ•›":"boxuL","โ•œ":"boxUl","โ•":"boxUL","โ•ž":"boxvR","โ•Ÿ":"boxVr","โ• ":"boxVR","โ•ก":"boxvL","โ•ข":"boxVl","โ•ฃ":"boxVL","โ•ค":"boxHd","โ•ฅ":"boxhD","โ•ฆ":"boxHD","โ•ง":"boxHu","โ•จ":"boxhU","โ•ฉ":"boxHU","โ•ช":"boxvH","โ•ซ":"boxVh","โ•ฌ":"boxVH","โ–€":"uhblk","โ–„":"lhblk","โ–ˆ":"block","โ–‘":"blk14","โ–’":"blk12","โ–“":"blk34","โ–ก":"squ","โ–ช":"squf","โ–ซ":"EmptyVerySmallSquare","โ–ญ":"rect","โ–ฎ":"marker","โ–ฑ":"fltns","โ–ณ":"xutri","โ–ด":"utrif","โ–ต":"utri","โ–ธ":"rtrif","โ–น":"rtri","โ–ฝ":"xdtri","โ–พ":"dtrif","โ–ฟ":"dtri","โ—‚":"ltrif","โ—ƒ":"ltri","โ—Š":"loz","โ—‹":"cir","โ—ฌ":"tridot","โ—ฏ":"xcirc","โ—ธ":"ultri","โ—น":"urtri","โ—บ":"lltri","โ—ป":"EmptySmallSquare","โ—ผ":"FilledSmallSquare","โ˜…":"starf","โ˜†":"star","โ˜Ž":"phone","โ™€":"female","โ™‚":"male","โ™ ":"spades","โ™ฃ":"clubs","โ™ฅ":"hearts","โ™ฆ":"diams","โ™ช":"sung","โœ“":"check","โœ—":"cross","โœ ":"malt","โœถ":"sext","โ˜":"VerticalSeparator","โŸˆ":"bsolhsub","โŸ‰":"suphsol","โŸต":"xlarr","โŸถ":"xrarr","โŸท":"xharr","โŸธ":"xlArr","โŸน":"xrArr","โŸบ":"xhArr","โŸผ":"xmap","โŸฟ":"dzigrarr","โค‚":"nvlArr","โคƒ":"nvrArr","โค„":"nvHarr","โค…":"Map","โคŒ":"lbarr","โค":"rbarr","โคŽ":"lBarr","โค":"rBarr","โค":"RBarr","โค‘":"DDotrahd","โค’":"UpArrowBar","โค“":"DownArrowBar","โค–":"Rarrtl","โค™":"latail","โคš":"ratail","โค›":"lAtail","โคœ":"rAtail","โค":"larrfs","โคž":"rarrfs","โคŸ":"larrbfs","โค ":"rarrbfs","โคฃ":"nwarhk","โคค":"nearhk","โคฅ":"searhk","โคฆ":"swarhk","โคง":"nwnear","โคจ":"toea","โคฉ":"tosa","โคช":"swnwar","โคณ":"rarrc","โคณฬธ":"nrarrc","โคต":"cudarrr","โคถ":"ldca","โคท":"rdca","โคธ":"cudarrl","โคน":"larrpl","โคผ":"curarrm","โคฝ":"cularrp","โฅ…":"rarrpl","โฅˆ":"harrcir","โฅ‰":"Uarrocir","โฅŠ":"lurdshar","โฅ‹":"ldrushar","โฅŽ":"LeftRightVector","โฅ":"RightUpDownVector","โฅ":"DownLeftRightVector","โฅ‘":"LeftUpDownVector","โฅ’":"LeftVectorBar","โฅ“":"RightVectorBar","โฅ”":"RightUpVectorBar","โฅ•":"RightDownVectorBar","โฅ–":"DownLeftVectorBar","โฅ—":"DownRightVectorBar","โฅ˜":"LeftUpVectorBar","โฅ™":"LeftDownVectorBar","โฅš":"LeftTeeVector","โฅ›":"RightTeeVector","โฅœ":"RightUpTeeVector","โฅ":"RightDownTeeVector","โฅž":"DownLeftTeeVector","โฅŸ":"DownRightTeeVector","โฅ ":"LeftUpTeeVector","โฅก":"LeftDownTeeVector","โฅข":"lHar","โฅฃ":"uHar","โฅค":"rHar","โฅฅ":"dHar","โฅฆ":"luruhar","โฅง":"ldrdhar","โฅจ":"ruluhar","โฅฉ":"rdldhar","โฅช":"lharul","โฅซ":"llhard","โฅฌ":"rharul","โฅญ":"lrhard","โฅฎ":"udhar","โฅฏ":"duhar","โฅฐ":"RoundImplies","โฅฑ":"erarr","โฅฒ":"simrarr","โฅณ":"larrsim","โฅด":"rarrsim","โฅต":"rarrap","โฅถ":"ltlarr","โฅธ":"gtrarr","โฅน":"subrarr","โฅป":"suplarr","โฅผ":"lfisht","โฅฝ":"rfisht","โฅพ":"ufisht","โฅฟ":"dfisht","โฆš":"vzigzag","โฆœ":"vangrt","โฆ":"angrtvbd","โฆค":"ange","โฆฅ":"range","โฆฆ":"dwangle","โฆง":"uwangle","โฆจ":"angmsdaa","โฆฉ":"angmsdab","โฆช":"angmsdac","โฆซ":"angmsdad","โฆฌ":"angmsdae","โฆญ":"angmsdaf","โฆฎ":"angmsdag","โฆฏ":"angmsdah","โฆฐ":"bemptyv","โฆฑ":"demptyv","โฆฒ":"cemptyv","โฆณ":"raemptyv","โฆด":"laemptyv","โฆต":"ohbar","โฆถ":"omid","โฆท":"opar","โฆน":"operp","โฆป":"olcross","โฆผ":"odsold","โฆพ":"olcir","โฆฟ":"ofcir","โง€":"olt","โง":"ogt","โง‚":"cirscir","โงƒ":"cirE","โง„":"solb","โง…":"bsolb","โง‰":"boxbox","โง":"trisb","โงŽ":"rtriltri","โง":"LeftTriangleBar","โงฬธ":"NotLeftTriangleBar","โง":"RightTriangleBar","โงฬธ":"NotRightTriangleBar","โงœ":"iinfin","โง":"infintie","โงž":"nvinfin","โงฃ":"eparsl","โงค":"smeparsl","โงฅ":"eqvparsl","โงซ":"lozf","โงด":"RuleDelayed","โงถ":"dsol","โจ€":"xodot","โจ":"xoplus","โจ‚":"xotime","โจ„":"xuplus","โจ†":"xsqcup","โจ":"fpartint","โจ":"cirfnint","โจ‘":"awint","โจ’":"rppolint","โจ“":"scpolint","โจ”":"npolint","โจ•":"pointint","โจ–":"quatint","โจ—":"intlarhk","โจข":"pluscir","โจฃ":"plusacir","โจค":"simplus","โจฅ":"plusdu","โจฆ":"plussim","โจง":"plustwo","โจฉ":"mcomma","โจช":"minusdu","โจญ":"loplus","โจฎ":"roplus","โจฏ":"Cross","โจฐ":"timesd","โจฑ":"timesbar","โจณ":"smashp","โจด":"lotimes","โจต":"rotimes","โจถ":"otimesas","โจท":"Otimes","โจธ":"odiv","โจน":"triplus","โจบ":"triminus","โจป":"tritime","โจผ":"iprod","โจฟ":"amalg","โฉ€":"capdot","โฉ‚":"ncup","โฉƒ":"ncap","โฉ„":"capand","โฉ…":"cupor","โฉ†":"cupcap","โฉ‡":"capcup","โฉˆ":"cupbrcap","โฉ‰":"capbrcup","โฉŠ":"cupcup","โฉ‹":"capcap","โฉŒ":"ccups","โฉ":"ccaps","โฉ":"ccupssm","โฉ“":"And","โฉ”":"Or","โฉ•":"andand","โฉ–":"oror","โฉ—":"orslope","โฉ˜":"andslope","โฉš":"andv","โฉ›":"orv","โฉœ":"andd","โฉ":"ord","โฉŸ":"wedbar","โฉฆ":"sdote","โฉช":"simdot","โฉญ":"congdot","โฉญฬธ":"ncongdot","โฉฎ":"easter","โฉฏ":"apacir","โฉฐ":"apE","โฉฐฬธ":"napE","โฉฑ":"eplus","โฉฒ":"pluse","โฉณ":"Esim","โฉท":"eDDot","โฉธ":"equivDD","โฉน":"ltcir","โฉบ":"gtcir","โฉป":"ltquest","โฉผ":"gtquest","โฉฝ":"les","โฉฝฬธ":"nles","โฉพ":"ges","โฉพฬธ":"nges","โฉฟ":"lesdot","โช€":"gesdot","โช":"lesdoto","โช‚":"gesdoto","โชƒ":"lesdotor","โช„":"gesdotol","โช…":"lap","โช†":"gap","โช‡":"lne","โชˆ":"gne","โช‰":"lnap","โชŠ":"gnap","โช‹":"lEg","โชŒ":"gEl","โช":"lsime","โชŽ":"gsime","โช":"lsimg","โช":"gsiml","โช‘":"lgE","โช’":"glE","โช“":"lesges","โช”":"gesles","โช•":"els","โช–":"egs","โช—":"elsdot","โช˜":"egsdot","โช™":"el","โชš":"eg","โช":"siml","โชž":"simg","โชŸ":"simlE","โช ":"simgE","โชก":"LessLess","โชกฬธ":"NotNestedLessLess","โชข":"GreaterGreater","โชขฬธ":"NotNestedGreaterGreater","โชค":"glj","โชฅ":"gla","โชฆ":"ltcc","โชง":"gtcc","โชจ":"lescc","โชฉ":"gescc","โชช":"smt","โชซ":"lat","โชฌ":"smte","โชฌ๏ธ€":"smtes","โชญ":"late","โชญ๏ธ€":"lates","โชฎ":"bumpE","โชฏ":"pre","โชฏฬธ":"npre","โชฐ":"sce","โชฐฬธ":"nsce","โชณ":"prE","โชด":"scE","โชต":"prnE","โชถ":"scnE","โชท":"prap","โชธ":"scap","โชน":"prnap","โชบ":"scnap","โชป":"Pr","โชผ":"Sc","โชฝ":"subdot","โชพ":"supdot","โชฟ":"subplus","โซ€":"supplus","โซ":"submult","โซ‚":"supmult","โซƒ":"subedot","โซ„":"supedot","โซ…":"subE","โซ…ฬธ":"nsubE","โซ†":"supE","โซ†ฬธ":"nsupE","โซ‡":"subsim","โซˆ":"supsim","โซ‹๏ธ€":"vsubnE","โซ‹":"subnE","โซŒ๏ธ€":"vsupnE","โซŒ":"supnE","โซ":"csub","โซ":"csup","โซ‘":"csube","โซ’":"csupe","โซ“":"subsup","โซ”":"supsub","โซ•":"subsub","โซ–":"supsup","โซ—":"suphsub","โซ˜":"supdsub","โซ™":"forkv","โซš":"topfork","โซ›":"mlcp","โซค":"Dashv","โซฆ":"Vdashl","โซง":"Barv","โซจ":"vBar","โซฉ":"vBarv","โซซ":"Vbar","โซฌ":"Not","โซญ":"bNot","โซฎ":"rnmid","โซฏ":"cirmid","โซฐ":"midcir","โซฑ":"topcir","โซฒ":"nhpar","โซณ":"parsim","โซฝ":"parsl","โซฝโƒฅ":"nparsl","โ™ญ":"flat","โ™ฎ":"natur","โ™ฏ":"sharp","ยค":"curren","ยข":"cent",$:"dollar","ยฃ":"pound","ยฅ":"yen","โ‚ฌ":"euro","ยน":"sup1","ยฝ":"half","โ…“":"frac13","ยผ":"frac14","โ…•":"frac15","โ…™":"frac16","โ…›":"frac18","ยฒ":"sup2","โ…”":"frac23","โ…–":"frac25","ยณ":"sup3","ยพ":"frac34","โ…—":"frac35","โ…œ":"frac38","โ…˜":"frac45","โ…š":"frac56","โ…":"frac58","โ…ž":"frac78","๐’ถ":"ascr","๐•’":"aopf","๐”ž":"afr","๐”ธ":"Aopf","๐”„":"Afr","๐’œ":"Ascr","ยช":"ordf","รก":"aacute","ร":"Aacute","ร ":"agrave","ร€":"Agrave","ฤƒ":"abreve","ฤ‚":"Abreve","รข":"acirc","ร‚":"Acirc","รฅ":"aring","ร…":"angst","รค":"auml","ร„":"Auml","รฃ":"atilde","รƒ":"Atilde","ฤ…":"aogon","ฤ„":"Aogon","ฤ":"amacr","ฤ€":"Amacr","รฆ":"aelig","ร†":"AElig","๐’ท":"bscr","๐•“":"bopf","๐”Ÿ":"bfr","๐”น":"Bopf","โ„ฌ":"Bscr","๐”…":"Bfr","๐” ":"cfr","๐’ธ":"cscr","๐•”":"copf","โ„ญ":"Cfr","๐’ž":"Cscr","โ„‚":"Copf","ฤ‡":"cacute","ฤ†":"Cacute","ฤ‰":"ccirc","ฤˆ":"Ccirc","ฤ":"ccaron","ฤŒ":"Ccaron","ฤ‹":"cdot","ฤŠ":"Cdot","รง":"ccedil","ร‡":"Ccedil","โ„…":"incare","๐”ก":"dfr","โ…†":"dd","๐••":"dopf","๐’น":"dscr","๐’Ÿ":"Dscr","๐”‡":"Dfr","โ……":"DD","๐”ป":"Dopf","ฤ":"dcaron","ฤŽ":"Dcaron","ฤ‘":"dstrok","ฤ":"Dstrok","รฐ":"eth","ร":"ETH","โ…‡":"ee","โ„ฏ":"escr","๐”ข":"efr","๐•–":"eopf","โ„ฐ":"Escr","๐”ˆ":"Efr","๐”ผ":"Eopf","รฉ":"eacute","ร‰":"Eacute","รจ":"egrave","รˆ":"Egrave","รช":"ecirc","รŠ":"Ecirc","ฤ›":"ecaron","ฤš":"Ecaron","รซ":"euml","ร‹":"Euml","ฤ—":"edot","ฤ–":"Edot","ฤ™":"eogon","ฤ˜":"Eogon","ฤ“":"emacr","ฤ’":"Emacr","๐”ฃ":"ffr","๐•—":"fopf","๐’ป":"fscr","๐”‰":"Ffr","๐”ฝ":"Fopf","โ„ฑ":"Fscr","๏ฌ€":"fflig","๏ฌƒ":"ffilig","๏ฌ„":"ffllig","๏ฌ":"filig",fj:"fjlig","๏ฌ‚":"fllig","ฦ’":"fnof","โ„Š":"gscr","๐•˜":"gopf","๐”ค":"gfr","๐’ข":"Gscr","๐”พ":"Gopf","๐”Š":"Gfr","วต":"gacute","ฤŸ":"gbreve","ฤž":"Gbreve","ฤ":"gcirc","ฤœ":"Gcirc","ฤก":"gdot","ฤ ":"Gdot","ฤข":"Gcedil","๐”ฅ":"hfr","โ„Ž":"planckh","๐’ฝ":"hscr","๐•™":"hopf","โ„‹":"Hscr","โ„Œ":"Hfr","โ„":"Hopf","ฤฅ":"hcirc","ฤค":"Hcirc","โ„":"hbar","ฤง":"hstrok","ฤฆ":"Hstrok","๐•š":"iopf","๐”ฆ":"ifr","๐’พ":"iscr","โ…ˆ":"ii","๐•€":"Iopf","โ„":"Iscr","โ„‘":"Im","รญ":"iacute","ร":"Iacute","รฌ":"igrave","รŒ":"Igrave","รฎ":"icirc","รŽ":"Icirc","รฏ":"iuml","ร":"Iuml","ฤฉ":"itilde","ฤจ":"Itilde","ฤฐ":"Idot","ฤฏ":"iogon","ฤฎ":"Iogon","ฤซ":"imacr","ฤช":"Imacr","ฤณ":"ijlig","ฤฒ":"IJlig","ฤฑ":"imath","๐’ฟ":"jscr","๐•›":"jopf","๐”ง":"jfr","๐’ฅ":"Jscr","๐”":"Jfr","๐•":"Jopf","ฤต":"jcirc","ฤด":"Jcirc","ศท":"jmath","๐•œ":"kopf","๐“€":"kscr","๐”จ":"kfr","๐’ฆ":"Kscr","๐•‚":"Kopf","๐”Ž":"Kfr","ฤท":"kcedil","ฤถ":"Kcedil","๐”ฉ":"lfr","๐“":"lscr","โ„“":"ell","๐•":"lopf","โ„’":"Lscr","๐”":"Lfr","๐•ƒ":"Lopf","ฤบ":"lacute","ฤน":"Lacute","ฤพ":"lcaron","ฤฝ":"Lcaron","ฤผ":"lcedil","ฤป":"Lcedil","ล‚":"lstrok","ล":"Lstrok","ล€":"lmidot","ฤฟ":"Lmidot","๐”ช":"mfr","๐•ž":"mopf","๐“‚":"mscr","๐”":"Mfr","๐•„":"Mopf","โ„ณ":"Mscr","๐”ซ":"nfr","๐•Ÿ":"nopf","๐“ƒ":"nscr","โ„•":"Nopf","๐’ฉ":"Nscr","๐”‘":"Nfr","ล„":"nacute","ลƒ":"Nacute","ลˆ":"ncaron","ล‡":"Ncaron","รฑ":"ntilde","ร‘":"Ntilde","ล†":"ncedil","ล…":"Ncedil","โ„–":"numero","ล‹":"eng","ลŠ":"ENG","๐• ":"oopf","๐”ฌ":"ofr","โ„ด":"oscr","๐’ช":"Oscr","๐”’":"Ofr","๐•†":"Oopf","ยบ":"ordm","รณ":"oacute","ร“":"Oacute","รฒ":"ograve","ร’":"Ograve","รด":"ocirc","ร”":"Ocirc","รถ":"ouml","ร–":"Ouml","ล‘":"odblac","ล":"Odblac","รต":"otilde","ร•":"Otilde","รธ":"oslash","ร˜":"Oslash","ล":"omacr","ลŒ":"Omacr","ล“":"oelig","ล’":"OElig","๐”ญ":"pfr","๐“…":"pscr","๐•ก":"popf","โ„™":"Popf","๐”“":"Pfr","๐’ซ":"Pscr","๐•ข":"qopf","๐”ฎ":"qfr","๐“†":"qscr","๐’ฌ":"Qscr","๐””":"Qfr","โ„š":"Qopf","ฤธ":"kgreen","๐”ฏ":"rfr","๐•ฃ":"ropf","๐“‡":"rscr","โ„›":"Rscr","โ„œ":"Re","โ„":"Ropf","ล•":"racute","ล”":"Racute","ล™":"rcaron","ล˜":"Rcaron","ล—":"rcedil","ล–":"Rcedil","๐•ค":"sopf","๐“ˆ":"sscr","๐”ฐ":"sfr","๐•Š":"Sopf","๐”–":"Sfr","๐’ฎ":"Sscr","โ“ˆ":"oS","ล›":"sacute","ลš":"Sacute","ล":"scirc","ลœ":"Scirc","ลก":"scaron","ล ":"Scaron","ลŸ":"scedil","ลž":"Scedil","รŸ":"szlig","๐”ฑ":"tfr","๐“‰":"tscr","๐•ฅ":"topf","๐’ฏ":"Tscr","๐”—":"Tfr","๐•‹":"Topf","ลฅ":"tcaron","ลค":"Tcaron","ลฃ":"tcedil","ลข":"Tcedil","โ„ข":"trade","ลง":"tstrok","ลฆ":"Tstrok","๐“Š":"uscr","๐•ฆ":"uopf","๐”ฒ":"ufr","๐•Œ":"Uopf","๐”˜":"Ufr","๐’ฐ":"Uscr","รบ":"uacute","รš":"Uacute","รน":"ugrave","ร™":"Ugrave","ลญ":"ubreve","ลฌ":"Ubreve","รป":"ucirc","ร›":"Ucirc","ลฏ":"uring","ลฎ":"Uring","รผ":"uuml","รœ":"Uuml","ลฑ":"udblac","ลฐ":"Udblac","ลฉ":"utilde","ลจ":"Utilde","ลณ":"uogon","ลฒ":"Uogon","ลซ":"umacr","ลช":"Umacr","๐”ณ":"vfr","๐•ง":"vopf","๐“‹":"vscr","๐”™":"Vfr","๐•":"Vopf","๐’ฑ":"Vscr","๐•จ":"wopf","๐“Œ":"wscr","๐”ด":"wfr","๐’ฒ":"Wscr","๐•Ž":"Wopf","๐”š":"Wfr","ลต":"wcirc","ลด":"Wcirc","๐”ต":"xfr","๐“":"xscr","๐•ฉ":"xopf","๐•":"Xopf","๐”›":"Xfr","๐’ณ":"Xscr","๐”ถ":"yfr","๐“Ž":"yscr","๐•ช":"yopf","๐’ด":"Yscr","๐”œ":"Yfr","๐•":"Yopf","รฝ":"yacute","ร":"Yacute","ลท":"ycirc","ลถ":"Ycirc","รฟ":"yuml","ลธ":"Yuml","๐“":"zscr","๐”ท":"zfr","๐•ซ":"zopf","โ„จ":"Zfr","โ„ค":"Zopf","๐’ต":"Zscr","ลบ":"zacute","ลน":"Zacute","ลพ":"zcaron","ลฝ":"Zcaron","ลผ":"zdot","ลป":"Zdot","ฦต":"imped","รพ":"thorn","รž":"THORN","ล‰":"napos","ฮฑ":"alpha","ฮ‘":"Alpha","ฮฒ":"beta","ฮ’":"Beta","ฮณ":"gamma","ฮ“":"Gamma","ฮด":"delta","ฮ”":"Delta","ฮต":"epsi","ฯต":"epsiv","ฮ•":"Epsilon","ฯ":"gammad","ฯœ":"Gammad","ฮถ":"zeta","ฮ–":"Zeta","ฮท":"eta","ฮ—":"Eta","ฮธ":"theta","ฯ‘":"thetav","ฮ˜":"Theta","ฮน":"iota","ฮ™":"Iota","ฮบ":"kappa","ฯฐ":"kappav","ฮš":"Kappa","ฮป":"lambda","ฮ›":"Lambda","ฮผ":"mu","ยต":"micro","ฮœ":"Mu","ฮฝ":"nu","ฮ":"Nu","ฮพ":"xi","ฮž":"Xi","ฮฟ":"omicron","ฮŸ":"Omicron","ฯ€":"pi","ฯ–":"piv","ฮ ":"Pi","ฯ":"rho","ฯฑ":"rhov","ฮก":"Rho","ฯƒ":"sigma","ฮฃ":"Sigma","ฯ‚":"sigmaf","ฯ„":"tau","ฮค":"Tau","ฯ…":"upsi","ฮฅ":"Upsilon","ฯ’":"Upsi","ฯ†":"phi","ฯ•":"phiv","ฮฆ":"Phi","ฯ‡":"chi","ฮง":"Chi","ฯˆ":"psi","ฮจ":"Psi","ฯ‰":"omega","ฮฉ":"ohm","ะฐ":"acy","ะ":"Acy","ะฑ":"bcy","ะ‘":"Bcy","ะฒ":"vcy","ะ’":"Vcy","ะณ":"gcy","ะ“":"Gcy","ั“":"gjcy","ะƒ":"GJcy","ะด":"dcy","ะ”":"Dcy","ั’":"djcy","ะ‚":"DJcy","ะต":"iecy","ะ•":"IEcy","ั‘":"iocy","ะ":"IOcy","ั”":"jukcy","ะ„":"Jukcy","ะถ":"zhcy","ะ–":"ZHcy","ะท":"zcy","ะ—":"Zcy","ั•":"dscy","ะ…":"DScy","ะธ":"icy","ะ˜":"Icy","ั–":"iukcy","ะ†":"Iukcy","ั—":"yicy","ะ‡":"YIcy","ะน":"jcy","ะ™":"Jcy","ั˜":"jsercy","ะˆ":"Jsercy","ะบ":"kcy","ะš":"Kcy","ัœ":"kjcy","ะŒ":"KJcy","ะป":"lcy","ะ›":"Lcy","ั™":"ljcy","ะ‰":"LJcy","ะผ":"mcy","ะœ":"Mcy","ะฝ":"ncy","ะ":"Ncy","ัš":"njcy","ะŠ":"NJcy","ะพ":"ocy","ะž":"Ocy","ะฟ":"pcy","ะŸ":"Pcy","ั€":"rcy","ะ ":"Rcy","ั":"scy","ะก":"Scy","ั‚":"tcy","ะข":"Tcy","ั›":"tshcy","ะ‹":"TSHcy","ัƒ":"ucy","ะฃ":"Ucy","ัž":"ubrcy","ะŽ":"Ubrcy","ั„":"fcy","ะค":"Fcy","ั…":"khcy","ะฅ":"KHcy","ั†":"tscy","ะฆ":"TScy","ั‡":"chcy","ะง":"CHcy","ัŸ":"dzcy","ะ":"DZcy","ัˆ":"shcy","ะจ":"SHcy","ั‰":"shchcy","ะฉ":"SHCHcy","ัŠ":"hardcy","ะช":"HARDcy","ั‹":"ycy","ะซ":"Ycy","ัŒ":"softcy","ะฌ":"SOFTcy","ั":"ecy","ะญ":"Ecy","ัŽ":"yucy","ะฎ":"YUcy","ั":"yacy","ะฏ":"YAcy","โ„ต":"aleph","โ„ถ":"beth","โ„ท":"gimel","โ„ธ":"daleth"};var p=/["&'<>`]/g;var d={'"':""","&":"&","'":"'","<":"<",">":">","`":"`"};var f=/&#(?:[xX][^a-fA-F0-9]|[^0-9xX])/;var g=/[\0-\x08\x0B\x0E-\x1F\x7F-\x9F\uFDD0-\uFDEF\uFFFE\uFFFF]|[\uD83F\uD87F\uD8BF\uD8FF\uD93F\uD97F\uD9BF\uD9FF\uDA3F\uDA7F\uDABF\uDAFF\uDB3F\uDB7F\uDBBF\uDBFF][\uDFFE\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/;var h=/&(CounterClockwiseContourIntegral|DoubleLongLeftRightArrow|ClockwiseContourIntegral|NotNestedGreaterGreater|NotSquareSupersetEqual|DiacriticalDoubleAcute|NotRightTriangleEqual|NotSucceedsSlantEqual|NotPrecedesSlantEqual|CloseCurlyDoubleQuote|NegativeVeryThinSpace|DoubleContourIntegral|FilledVerySmallSquare|CapitalDifferentialD|OpenCurlyDoubleQuote|EmptyVerySmallSquare|NestedGreaterGreater|DoubleLongRightArrow|NotLeftTriangleEqual|NotGreaterSlantEqual|ReverseUpEquilibrium|DoubleLeftRightArrow|NotSquareSubsetEqual|NotDoubleVerticalBar|RightArrowLeftArrow|NotGreaterFullEqual|NotRightTriangleBar|SquareSupersetEqual|DownLeftRightVector|DoubleLongLeftArrow|leftrightsquigarrow|LeftArrowRightArrow|NegativeMediumSpace|blacktriangleright|RightDownVectorBar|PrecedesSlantEqual|RightDoubleBracket|SucceedsSlantEqual|NotLeftTriangleBar|RightTriangleEqual|SquareIntersection|RightDownTeeVector|ReverseEquilibrium|NegativeThickSpace|longleftrightarrow|Longleftrightarrow|LongLeftRightArrow|DownRightTeeVector|DownRightVectorBar|GreaterSlantEqual|SquareSubsetEqual|LeftDownVectorBar|LeftDoubleBracket|VerticalSeparator|rightleftharpoons|NotGreaterGreater|NotSquareSuperset|blacktriangleleft|blacktriangledown|NegativeThinSpace|LeftDownTeeVector|NotLessSlantEqual|leftrightharpoons|DoubleUpDownArrow|DoubleVerticalBar|LeftTriangleEqual|FilledSmallSquare|twoheadrightarrow|NotNestedLessLess|DownLeftTeeVector|DownLeftVectorBar|RightAngleBracket|NotTildeFullEqual|NotReverseElement|RightUpDownVector|DiacriticalTilde|NotSucceedsTilde|circlearrowright|NotPrecedesEqual|rightharpoondown|DoubleRightArrow|NotSucceedsEqual|NonBreakingSpace|NotRightTriangle|LessEqualGreater|RightUpTeeVector|LeftAngleBracket|GreaterFullEqual|DownArrowUpArrow|RightUpVectorBar|twoheadleftarrow|GreaterEqualLess|downharpoonright|RightTriangleBar|ntrianglerighteq|NotSupersetEqual|LeftUpDownVector|DiacriticalAcute|rightrightarrows|vartriangleright|UpArrowDownArrow|DiacriticalGrave|UnderParenthesis|EmptySmallSquare|LeftUpVectorBar|leftrightarrows|DownRightVector|downharpoonleft|trianglerighteq|ShortRightArrow|OverParenthesis|DoubleLeftArrow|DoubleDownArrow|NotSquareSubset|bigtriangledown|ntrianglelefteq|UpperRightArrow|curvearrowright|vartriangleleft|NotLeftTriangle|nleftrightarrow|LowerRightArrow|NotHumpDownHump|NotGreaterTilde|rightthreetimes|LeftUpTeeVector|NotGreaterEqual|straightepsilon|LeftTriangleBar|rightsquigarrow|ContourIntegral|rightleftarrows|CloseCurlyQuote|RightDownVector|LeftRightVector|nLeftrightarrow|leftharpoondown|circlearrowleft|SquareSuperset|OpenCurlyQuote|hookrightarrow|HorizontalLine|DiacriticalDot|NotLessGreater|ntriangleright|DoubleRightTee|InvisibleComma|InvisibleTimes|LowerLeftArrow|DownLeftVector|NotSubsetEqual|curvearrowleft|trianglelefteq|NotVerticalBar|TildeFullEqual|downdownarrows|NotGreaterLess|RightTeeVector|ZeroWidthSpace|looparrowright|LongRightArrow|doublebarwedge|ShortLeftArrow|ShortDownArrow|RightVectorBar|GreaterGreater|ReverseElement|rightharpoonup|LessSlantEqual|leftthreetimes|upharpoonright|rightarrowtail|LeftDownVector|Longrightarrow|NestedLessLess|UpperLeftArrow|nshortparallel|leftleftarrows|leftrightarrow|Leftrightarrow|LeftRightArrow|longrightarrow|upharpoonleft|RightArrowBar|ApplyFunction|LeftTeeVector|leftarrowtail|NotEqualTilde|varsubsetneqq|varsupsetneqq|RightTeeArrow|SucceedsEqual|SucceedsTilde|LeftVectorBar|SupersetEqual|hookleftarrow|DifferentialD|VerticalTilde|VeryThinSpace|blacktriangle|bigtriangleup|LessFullEqual|divideontimes|leftharpoonup|UpEquilibrium|ntriangleleft|RightTriangle|measuredangle|shortparallel|longleftarrow|Longleftarrow|LongLeftArrow|DoubleLeftTee|Poincareplane|PrecedesEqual|triangleright|DoubleUpArrow|RightUpVector|fallingdotseq|looparrowleft|PrecedesTilde|NotTildeEqual|NotTildeTilde|smallsetminus|Proportional|triangleleft|triangledown|UnderBracket|NotHumpEqual|exponentiale|ExponentialE|NotLessTilde|HilbertSpace|RightCeiling|blacklozenge|varsupsetneq|HumpDownHump|GreaterEqual|VerticalLine|LeftTeeArrow|NotLessEqual|DownTeeArrow|LeftTriangle|varsubsetneq|Intersection|NotCongruent|DownArrowBar|LeftUpVector|LeftArrowBar|risingdotseq|GreaterTilde|RoundImplies|SquareSubset|ShortUpArrow|NotSuperset|quaternions|precnapprox|backepsilon|preccurlyeq|OverBracket|blacksquare|MediumSpace|VerticalBar|circledcirc|circleddash|CircleMinus|CircleTimes|LessGreater|curlyeqprec|curlyeqsucc|diamondsuit|UpDownArrow|Updownarrow|RuleDelayed|Rrightarrow|updownarrow|RightVector|nRightarrow|nrightarrow|eqslantless|LeftCeiling|Equilibrium|SmallCircle|expectation|NotSucceeds|thickapprox|GreaterLess|SquareUnion|NotPrecedes|NotLessLess|straightphi|succnapprox|succcurlyeq|SubsetEqual|sqsupseteq|Proportion|Laplacetrf|ImaginaryI|supsetneqq|NotGreater|gtreqqless|NotElement|ThickSpace|TildeEqual|TildeTilde|Fouriertrf|rmoustache|EqualTilde|eqslantgtr|UnderBrace|LeftVector|UpArrowBar|nLeftarrow|nsubseteqq|subsetneqq|nsupseteqq|nleftarrow|succapprox|lessapprox|UpTeeArrow|upuparrows|curlywedge|lesseqqgtr|varepsilon|varnothing|RightFloor|complement|CirclePlus|sqsubseteq|Lleftarrow|circledast|RightArrow|Rightarrow|rightarrow|lmoustache|Bernoullis|precapprox|mapstoleft|mapstodown|longmapsto|dotsquare|downarrow|DoubleDot|nsubseteq|supsetneq|leftarrow|nsupseteq|subsetneq|ThinSpace|ngeqslant|subseteqq|HumpEqual|NotSubset|triangleq|NotCupCap|lesseqgtr|heartsuit|TripleDot|Leftarrow|Coproduct|Congruent|varpropto|complexes|gvertneqq|LeftArrow|LessTilde|supseteqq|MinusPlus|CircleDot|nleqslant|NotExists|gtreqless|nparallel|UnionPlus|LeftFloor|checkmark|CenterDot|centerdot|Mellintrf|gtrapprox|bigotimes|OverBrace|spadesuit|therefore|pitchfork|rationals|PlusMinus|Backslash|Therefore|DownBreve|backsimeq|backprime|DownArrow|nshortmid|Downarrow|lvertneqq|eqvparsl|imagline|imagpart|infintie|integers|Integral|intercal|LessLess|Uarrocir|intlarhk|sqsupset|angmsdaf|sqsubset|llcorner|vartheta|cupbrcap|lnapprox|Superset|SuchThat|succnsim|succneqq|angmsdag|biguplus|curlyvee|trpezium|Succeeds|NotTilde|bigwedge|angmsdah|angrtvbd|triminus|cwconint|fpartint|lrcorner|smeparsl|subseteq|urcorner|lurdshar|laemptyv|DDotrahd|approxeq|ldrushar|awconint|mapstoup|backcong|shortmid|triangle|geqslant|gesdotol|timesbar|circledR|circledS|setminus|multimap|naturals|scpolint|ncongdot|RightTee|boxminus|gnapprox|boxtimes|andslope|thicksim|angmsdaa|varsigma|cirfnint|rtriltri|angmsdab|rppolint|angmsdac|barwedge|drbkarow|clubsuit|thetasym|bsolhsub|capbrcup|dzigrarr|doteqdot|DotEqual|dotminus|UnderBar|NotEqual|realpart|otimesas|ulcorner|hksearow|hkswarow|parallel|PartialD|elinters|emptyset|plusacir|bbrktbrk|angmsdad|pointint|bigoplus|angmsdae|Precedes|bigsqcup|varkappa|notindot|supseteq|precneqq|precnsim|profalar|profline|profsurf|leqslant|lesdotor|raemptyv|subplus|notnivb|notnivc|subrarr|zigrarr|vzigzag|submult|subedot|Element|between|cirscir|larrbfs|larrsim|lotimes|lbrksld|lbrkslu|lozenge|ldrdhar|dbkarow|bigcirc|epsilon|simrarr|simplus|ltquest|Epsilon|luruhar|gtquest|maltese|npolint|eqcolon|npreceq|bigodot|ddagger|gtrless|bnequiv|harrcir|ddotseq|equivDD|backsim|demptyv|nsqsube|nsqsupe|Upsilon|nsubset|upsilon|minusdu|nsucceq|swarrow|nsupset|coloneq|searrow|boxplus|napprox|natural|asympeq|alefsym|congdot|nearrow|bigstar|diamond|supplus|tritime|LeftTee|nvinfin|triplus|NewLine|nvltrie|nvrtrie|nwarrow|nexists|Diamond|ruluhar|Implies|supmult|angzarr|suplarr|suphsub|questeq|because|digamma|Because|olcross|bemptyv|omicron|Omicron|rotimes|NoBreak|intprod|angrtvb|orderof|uwangle|suphsol|lesdoto|orslope|DownTee|realine|cudarrl|rdldhar|OverBar|supedot|lessdot|supdsub|topfork|succsim|rbrkslu|rbrksld|pertenk|cudarrr|isindot|planckh|lessgtr|pluscir|gesdoto|plussim|plustwo|lesssim|cularrp|rarrsim|Cayleys|notinva|notinvb|notinvc|UpArrow|Uparrow|uparrow|NotLess|dwangle|precsim|Product|curarrm|Cconint|dotplus|rarrbfs|ccupssm|Cedilla|cemptyv|notniva|quatint|frac35|frac38|frac45|frac56|frac58|frac78|tridot|xoplus|gacute|gammad|Gammad|lfisht|lfloor|bigcup|sqsupe|gbreve|Gbreve|lharul|sqsube|sqcups|Gcedil|apacir|llhard|lmidot|Lmidot|lmoust|andand|sqcaps|approx|Abreve|spades|circeq|tprime|divide|topcir|Assign|topbot|gesdot|divonx|xuplus|timesd|gesles|atilde|solbar|SOFTcy|loplus|timesb|lowast|lowbar|dlcorn|dlcrop|softcy|dollar|lparlt|thksim|lrhard|Atilde|lsaquo|smashp|bigvee|thinsp|wreath|bkarow|lsquor|lstrok|Lstrok|lthree|ltimes|ltlarr|DotDot|simdot|ltrPar|weierp|xsqcup|angmsd|sigmav|sigmaf|zeetrf|Zcaron|zcaron|mapsto|vsupne|thetav|cirmid|marker|mcomma|Zacute|vsubnE|there4|gtlPar|vsubne|bottom|gtrarr|SHCHcy|shchcy|midast|midcir|middot|minusb|minusd|gtrdot|bowtie|sfrown|mnplus|models|colone|seswar|Colone|mstpos|searhk|gtrsim|nacute|Nacute|boxbox|telrec|hairsp|Tcedil|nbumpe|scnsim|ncaron|Ncaron|ncedil|Ncedil|hamilt|Scedil|nearhk|hardcy|HARDcy|tcedil|Tcaron|commat|nequiv|nesear|tcaron|target|hearts|nexist|varrho|scedil|Scaron|scaron|hellip|Sacute|sacute|hercon|swnwar|compfn|rtimes|rthree|rsquor|rsaquo|zacute|wedgeq|homtht|barvee|barwed|Barwed|rpargt|horbar|conint|swarhk|roplus|nltrie|hslash|hstrok|Hstrok|rmoust|Conint|bprime|hybull|hyphen|iacute|Iacute|supsup|supsub|supsim|varphi|coprod|brvbar|agrave|Supset|supset|igrave|Igrave|notinE|Agrave|iiiint|iinfin|copysr|wedbar|Verbar|vangrt|becaus|incare|verbar|inodot|bullet|drcorn|intcal|drcrop|cularr|vellip|Utilde|bumpeq|cupcap|dstrok|Dstrok|CupCap|cupcup|cupdot|eacute|Eacute|supdot|iquest|easter|ecaron|Ecaron|ecolon|isinsv|utilde|itilde|Itilde|curarr|succeq|Bumpeq|cacute|ulcrop|nparsl|Cacute|nprcue|egrave|Egrave|nrarrc|nrarrw|subsup|subsub|nrtrie|jsercy|nsccue|Jsercy|kappav|kcedil|Kcedil|subsim|ulcorn|nsimeq|egsdot|veebar|kgreen|capand|elsdot|Subset|subset|curren|aacute|lacute|Lacute|emptyv|ntilde|Ntilde|lagran|lambda|Lambda|capcap|Ugrave|langle|subdot|emsp13|numero|emsp14|nvdash|nvDash|nVdash|nVDash|ugrave|ufisht|nvHarr|larrfs|nvlArr|larrhk|larrlp|larrpl|nvrArr|Udblac|nwarhk|larrtl|nwnear|oacute|Oacute|latail|lAtail|sstarf|lbrace|odblac|Odblac|lbrack|udblac|odsold|eparsl|lcaron|Lcaron|ograve|Ograve|lcedil|Lcedil|Aacute|ssmile|ssetmn|squarf|ldquor|capcup|ominus|cylcty|rharul|eqcirc|dagger|rfloor|rfisht|Dagger|daleth|equals|origof|capdot|equest|dcaron|Dcaron|rdquor|oslash|Oslash|otilde|Otilde|otimes|Otimes|urcrop|Ubreve|ubreve|Yacute|Uacute|uacute|Rcedil|rcedil|urcorn|parsim|Rcaron|Vdashl|rcaron|Tstrok|percnt|period|permil|Exists|yacute|rbrack|rbrace|phmmat|ccaron|Ccaron|planck|ccedil|plankv|tstrok|female|plusdo|plusdu|ffilig|plusmn|ffllig|Ccedil|rAtail|dfisht|bernou|ratail|Rarrtl|rarrtl|angsph|rarrpl|rarrlp|rarrhk|xwedge|xotime|forall|ForAll|Vvdash|vsupnE|preceq|bigcap|frac12|frac13|frac14|primes|rarrfs|prnsim|frac15|Square|frac16|square|lesdot|frac18|frac23|propto|prurel|rarrap|rangle|puncsp|frac25|Racute|qprime|racute|lesges|frac34|abreve|AElig|eqsim|utdot|setmn|urtri|Equal|Uring|seArr|uring|searr|dashv|Dashv|mumap|nabla|iogon|Iogon|sdote|sdotb|scsim|napid|napos|equiv|natur|Acirc|dblac|erarr|nbump|iprod|erDot|ucirc|awint|esdot|angrt|ncong|isinE|scnap|Scirc|scirc|ndash|isins|Ubrcy|nearr|neArr|isinv|nedot|ubrcy|acute|Ycirc|iukcy|Iukcy|xutri|nesim|caret|jcirc|Jcirc|caron|twixt|ddarr|sccue|exist|jmath|sbquo|ngeqq|angst|ccaps|lceil|ngsim|UpTee|delta|Delta|rtrif|nharr|nhArr|nhpar|rtrie|jukcy|Jukcy|kappa|rsquo|Kappa|nlarr|nlArr|TSHcy|rrarr|aogon|Aogon|fflig|xrarr|tshcy|ccirc|nleqq|filig|upsih|nless|dharl|nlsim|fjlig|ropar|nltri|dharr|robrk|roarr|fllig|fltns|roang|rnmid|subnE|subne|lAarr|trisb|Ccirc|acirc|ccups|blank|VDash|forkv|Vdash|langd|cedil|blk12|blk14|laquo|strns|diams|notin|vDash|larrb|blk34|block|disin|uplus|vdash|vBarv|aelig|starf|Wedge|check|xrArr|lates|lbarr|lBarr|notni|lbbrk|bcong|frasl|lbrke|frown|vrtri|vprop|vnsup|gamma|Gamma|wedge|xodot|bdquo|srarr|doteq|ldquo|boxdl|boxdL|gcirc|Gcirc|boxDl|boxDL|boxdr|boxdR|boxDr|TRADE|trade|rlhar|boxDR|vnsub|npart|vltri|rlarr|boxhd|boxhD|nprec|gescc|nrarr|nrArr|boxHd|boxHD|boxhu|boxhU|nrtri|boxHu|clubs|boxHU|times|colon|Colon|gimel|xlArr|Tilde|nsime|tilde|nsmid|nspar|THORN|thorn|xlarr|nsube|nsubE|thkap|xhArr|comma|nsucc|boxul|boxuL|nsupe|nsupE|gneqq|gnsim|boxUl|boxUL|grave|boxur|boxuR|boxUr|boxUR|lescc|angle|bepsi|boxvh|varpi|boxvH|numsp|Theta|gsime|gsiml|theta|boxVh|boxVH|boxvl|gtcir|gtdot|boxvL|boxVl|boxVL|crarr|cross|Cross|nvsim|boxvr|nwarr|nwArr|sqsup|dtdot|Uogon|lhard|lharu|dtrif|ocirc|Ocirc|lhblk|duarr|odash|sqsub|Hacek|sqcup|llarr|duhar|oelig|OElig|ofcir|boxvR|uogon|lltri|boxVr|csube|uuarr|ohbar|csupe|ctdot|olarr|olcir|harrw|oline|sqcap|omacr|Omacr|omega|Omega|boxVR|aleph|lneqq|lnsim|loang|loarr|rharu|lobrk|hcirc|operp|oplus|rhard|Hcirc|orarr|Union|order|ecirc|Ecirc|cuepr|szlig|cuesc|breve|reals|eDDot|Breve|hoarr|lopar|utrif|rdquo|Umacr|umacr|efDot|swArr|ultri|alpha|rceil|ovbar|swarr|Wcirc|wcirc|smtes|smile|bsemi|lrarr|aring|parsl|lrhar|bsime|uhblk|lrtri|cupor|Aring|uharr|uharl|slarr|rbrke|bsolb|lsime|rbbrk|RBarr|lsimg|phone|rBarr|rbarr|icirc|lsquo|Icirc|emacr|Emacr|ratio|simne|plusb|simlE|simgE|simeq|pluse|ltcir|ltdot|empty|xharr|xdtri|iexcl|Alpha|ltrie|rarrw|pound|ltrif|xcirc|bumpe|prcue|bumpE|asymp|amacr|cuvee|Sigma|sigma|iiint|udhar|iiota|ijlig|IJlig|supnE|imacr|Imacr|prime|Prime|image|prnap|eogon|Eogon|rarrc|mdash|mDDot|cuwed|imath|supne|imped|Amacr|udarr|prsim|micro|rarrb|cwint|raquo|infin|eplus|range|rangd|Ucirc|radic|minus|amalg|veeeq|rAarr|epsiv|ycirc|quest|sharp|quot|zwnj|Qscr|race|qscr|Qopf|qopf|qint|rang|Rang|Zscr|zscr|Zopf|zopf|rarr|rArr|Rarr|Pscr|pscr|prop|prod|prnE|prec|ZHcy|zhcy|prap|Zeta|zeta|Popf|popf|Zdot|plus|zdot|Yuml|yuml|phiv|YUcy|yucy|Yscr|yscr|perp|Yopf|yopf|part|para|YIcy|Ouml|rcub|yicy|YAcy|rdca|ouml|osol|Oscr|rdsh|yacy|real|oscr|xvee|andd|rect|andv|Xscr|oror|ordm|ordf|xscr|ange|aopf|Aopf|rHar|Xopf|opar|Oopf|xopf|xnis|rhov|oopf|omid|xmap|oint|apid|apos|ogon|ascr|Ascr|odot|odiv|xcup|xcap|ocir|oast|nvlt|nvle|nvgt|nvge|nvap|Wscr|wscr|auml|ntlg|ntgl|nsup|nsub|nsim|Nscr|nscr|nsce|Wopf|ring|npre|wopf|npar|Auml|Barv|bbrk|Nopf|nopf|nmid|nLtv|beta|ropf|Ropf|Beta|beth|nles|rpar|nleq|bnot|bNot|nldr|NJcy|rscr|Rscr|Vscr|vscr|rsqb|njcy|bopf|nisd|Bopf|rtri|Vopf|nGtv|ngtr|vopf|boxh|boxH|boxv|nges|ngeq|boxV|bscr|scap|Bscr|bsim|Vert|vert|bsol|bull|bump|caps|cdot|ncup|scnE|ncap|nbsp|napE|Cdot|cent|sdot|Vbar|nang|vBar|chcy|Mscr|mscr|sect|semi|CHcy|Mopf|mopf|sext|circ|cire|mldr|mlcp|cirE|comp|shcy|SHcy|vArr|varr|cong|copf|Copf|copy|COPY|malt|male|macr|lvnE|cscr|ltri|sime|ltcc|simg|Cscr|siml|csub|Uuml|lsqb|lsim|uuml|csup|Lscr|lscr|utri|smid|lpar|cups|smte|lozf|darr|Lopf|Uscr|solb|lopf|sopf|Sopf|lneq|uscr|spar|dArr|lnap|Darr|dash|Sqrt|LJcy|ljcy|lHar|dHar|Upsi|upsi|diam|lesg|djcy|DJcy|leqq|dopf|Dopf|dscr|Dscr|dscy|ldsh|ldca|squf|DScy|sscr|Sscr|dsol|lcub|late|star|Star|Uopf|Larr|lArr|larr|uopf|dtri|dzcy|sube|subE|Lang|lang|Kscr|kscr|Kopf|kopf|KJcy|kjcy|KHcy|khcy|DZcy|ecir|edot|eDot|Jscr|jscr|succ|Jopf|jopf|Edot|uHar|emsp|ensp|Iuml|iuml|eopf|isin|Iscr|iscr|Eopf|epar|sung|epsi|escr|sup1|sup2|sup3|Iota|iota|supe|supE|Iopf|iopf|IOcy|iocy|Escr|esim|Esim|imof|Uarr|QUOT|uArr|uarr|euml|IEcy|iecy|Idot|Euml|euro|excl|Hscr|hscr|Hopf|hopf|TScy|tscy|Tscr|hbar|tscr|flat|tbrk|fnof|hArr|harr|half|fopf|Fopf|tdot|gvnE|fork|trie|gtcc|fscr|Fscr|gdot|gsim|Gscr|gscr|Gopf|gopf|gneq|Gdot|tosa|gnap|Topf|topf|geqq|toea|GJcy|gjcy|tint|gesl|mid|Sfr|ggg|top|ges|gla|glE|glj|geq|gne|gEl|gel|gnE|Gcy|gcy|gap|Tfr|tfr|Tcy|tcy|Hat|Tau|Ffr|tau|Tab|hfr|Hfr|ffr|Fcy|fcy|icy|Icy|iff|ETH|eth|ifr|Ifr|Eta|eta|int|Int|Sup|sup|ucy|Ucy|Sum|sum|jcy|ENG|ufr|Ufr|eng|Jcy|jfr|els|ell|egs|Efr|efr|Jfr|uml|kcy|Kcy|Ecy|ecy|kfr|Kfr|lap|Sub|sub|lat|lcy|Lcy|leg|Dot|dot|lEg|leq|les|squ|div|die|lfr|Lfr|lgE|Dfr|dfr|Del|deg|Dcy|dcy|lne|lnE|sol|loz|smt|Cup|lrm|cup|lsh|Lsh|sim|shy|map|Map|mcy|Mcy|mfr|Mfr|mho|gfr|Gfr|sfr|cir|Chi|chi|nap|Cfr|vcy|Vcy|cfr|Scy|scy|ncy|Ncy|vee|Vee|Cap|cap|nfr|scE|sce|Nfr|nge|ngE|nGg|vfr|Vfr|ngt|bot|nGt|nis|niv|Rsh|rsh|nle|nlE|bne|Bfr|bfr|nLl|nlt|nLt|Bcy|bcy|not|Not|rlm|wfr|Wfr|npr|nsc|num|ocy|ast|Ocy|ofr|xfr|Xfr|Ofr|ogt|ohm|apE|olt|Rho|ape|rho|Rfr|rfr|ord|REG|ang|reg|orv|And|and|AMP|Rcy|amp|Afr|ycy|Ycy|yen|yfr|Yfr|rcy|par|pcy|Pcy|pfr|Pfr|phi|Phi|afr|Acy|acy|zcy|Zcy|piv|acE|acd|zfr|Zfr|pre|prE|psi|Psi|qfr|Qfr|zwj|Or|ge|Gg|gt|gg|el|oS|lt|Lt|LT|Re|lg|gl|eg|ne|Im|it|le|DD|wp|wr|nu|Nu|dd|lE|Sc|sc|pi|Pi|ee|af|ll|Ll|rx|gE|xi|pm|Xi|ic|pr|Pr|in|ni|mp|mu|ac|Mu|or|ap|Gt|GT|ii);|&(Aacute|Agrave|Atilde|Ccedil|Eacute|Egrave|Iacute|Igrave|Ntilde|Oacute|Ograve|Oslash|Otilde|Uacute|Ugrave|Yacute|aacute|agrave|atilde|brvbar|ccedil|curren|divide|eacute|egrave|frac12|frac14|frac34|iacute|igrave|iquest|middot|ntilde|oacute|ograve|oslash|otilde|plusmn|uacute|ugrave|yacute|AElig|Acirc|Aring|Ecirc|Icirc|Ocirc|THORN|Ucirc|acirc|acute|aelig|aring|cedil|ecirc|icirc|iexcl|laquo|micro|ocirc|pound|raquo|szlig|thorn|times|ucirc|Auml|COPY|Euml|Iuml|Ouml|QUOT|Uuml|auml|cent|copy|euml|iuml|macr|nbsp|ordf|ordm|ouml|para|quot|sect|sup1|sup2|sup3|uuml|yuml|AMP|ETH|REG|amp|deg|eth|not|reg|shy|uml|yen|GT|LT|gt|lt)(?!;)([=a-zA-Z0-9]?)|&#([0-9]+)(;?)|&#[xX]([a-fA-F0-9]+)(;?)|&([0-9a-zA-Z]+)/g;var m={aacute:"รก",Aacute:"ร",abreve:"ฤƒ",Abreve:"ฤ‚",ac:"โˆพ",acd:"โˆฟ",acE:"โˆพฬณ",acirc:"รข",Acirc:"ร‚",acute:"ยด",acy:"ะฐ",Acy:"ะ",aelig:"รฆ",AElig:"ร†",af:"โก",afr:"๐”ž",Afr:"๐”„",agrave:"ร ",Agrave:"ร€",alefsym:"โ„ต",aleph:"โ„ต",alpha:"ฮฑ",Alpha:"ฮ‘",amacr:"ฤ",Amacr:"ฤ€",amalg:"โจฟ",amp:"&",AMP:"&",and:"โˆง",And:"โฉ“",andand:"โฉ•",andd:"โฉœ",andslope:"โฉ˜",andv:"โฉš",ang:"โˆ ",ange:"โฆค",angle:"โˆ ",angmsd:"โˆก",angmsdaa:"โฆจ",angmsdab:"โฆฉ",angmsdac:"โฆช",angmsdad:"โฆซ",angmsdae:"โฆฌ",angmsdaf:"โฆญ",angmsdag:"โฆฎ",angmsdah:"โฆฏ",angrt:"โˆŸ",angrtvb:"โŠพ",angrtvbd:"โฆ",angsph:"โˆข",angst:"ร…",angzarr:"โผ",aogon:"ฤ…",Aogon:"ฤ„",aopf:"๐•’",Aopf:"๐”ธ",ap:"โ‰ˆ",apacir:"โฉฏ",ape:"โ‰Š",apE:"โฉฐ",apid:"โ‰‹",apos:"'",ApplyFunction:"โก",approx:"โ‰ˆ",approxeq:"โ‰Š",aring:"รฅ",Aring:"ร…",ascr:"๐’ถ",Ascr:"๐’œ",Assign:"โ‰”",ast:"*",asymp:"โ‰ˆ",asympeq:"โ‰",atilde:"รฃ",Atilde:"รƒ",auml:"รค",Auml:"ร„",awconint:"โˆณ",awint:"โจ‘",backcong:"โ‰Œ",backepsilon:"ฯถ",backprime:"โ€ต",backsim:"โˆฝ",backsimeq:"โ‹",Backslash:"โˆ–",Barv:"โซง",barvee:"โŠฝ",barwed:"โŒ…",Barwed:"โŒ†",barwedge:"โŒ…",bbrk:"โŽต",bbrktbrk:"โŽถ",bcong:"โ‰Œ",bcy:"ะฑ",Bcy:"ะ‘",bdquo:"โ€ž",becaus:"โˆต",because:"โˆต",Because:"โˆต",bemptyv:"โฆฐ",bepsi:"ฯถ",bernou:"โ„ฌ",Bernoullis:"โ„ฌ",beta:"ฮฒ",Beta:"ฮ’",beth:"โ„ถ",between:"โ‰ฌ",bfr:"๐”Ÿ",Bfr:"๐”…",bigcap:"โ‹‚",bigcirc:"โ—ฏ",bigcup:"โ‹ƒ",bigodot:"โจ€",bigoplus:"โจ",bigotimes:"โจ‚",bigsqcup:"โจ†",bigstar:"โ˜…",bigtriangledown:"โ–ฝ",bigtriangleup:"โ–ณ",biguplus:"โจ„",bigvee:"โ‹",bigwedge:"โ‹€",bkarow:"โค",blacklozenge:"โงซ",blacksquare:"โ–ช",blacktriangle:"โ–ด",blacktriangledown:"โ–พ",blacktriangleleft:"โ—‚",blacktriangleright:"โ–ธ",blank:"โฃ",blk12:"โ–’",blk14:"โ–‘",blk34:"โ–“",block:"โ–ˆ",bne:"=โƒฅ",bnequiv:"โ‰กโƒฅ",bnot:"โŒ",bNot:"โซญ",bopf:"๐•“",Bopf:"๐”น",bot:"โŠฅ",bottom:"โŠฅ",bowtie:"โ‹ˆ",boxbox:"โง‰",boxdl:"โ”",boxdL:"โ••",boxDl:"โ•–",boxDL:"โ•—",boxdr:"โ”Œ",boxdR:"โ•’",boxDr:"โ•“",boxDR:"โ•”",boxh:"โ”€",boxH:"โ•",boxhd:"โ”ฌ",boxhD:"โ•ฅ",boxHd:"โ•ค",boxHD:"โ•ฆ",boxhu:"โ”ด",boxhU:"โ•จ",boxHu:"โ•ง",boxHU:"โ•ฉ",boxminus:"โŠŸ",boxplus:"โŠž",boxtimes:"โŠ ",boxul:"โ”˜",boxuL:"โ•›",boxUl:"โ•œ",boxUL:"โ•",boxur:"โ””",boxuR:"โ•˜",boxUr:"โ•™",boxUR:"โ•š",boxv:"โ”‚",boxV:"โ•‘",boxvh:"โ”ผ",boxvH:"โ•ช",boxVh:"โ•ซ",boxVH:"โ•ฌ",boxvl:"โ”ค",boxvL:"โ•ก",boxVl:"โ•ข",boxVL:"โ•ฃ",boxvr:"โ”œ",boxvR:"โ•ž",boxVr:"โ•Ÿ",boxVR:"โ• ",bprime:"โ€ต",breve:"ห˜",Breve:"ห˜",brvbar:"ยฆ",bscr:"๐’ท",Bscr:"โ„ฌ",bsemi:"โ",bsim:"โˆฝ",bsime:"โ‹",bsol:"\\",bsolb:"โง…",bsolhsub:"โŸˆ",bull:"โ€ข",bullet:"โ€ข",bump:"โ‰Ž",bumpe:"โ‰",bumpE:"โชฎ",bumpeq:"โ‰",Bumpeq:"โ‰Ž",cacute:"ฤ‡",Cacute:"ฤ†",cap:"โˆฉ",Cap:"โ‹’",capand:"โฉ„",capbrcup:"โฉ‰",capcap:"โฉ‹",capcup:"โฉ‡",capdot:"โฉ€",CapitalDifferentialD:"โ……",caps:"โˆฉ๏ธ€",caret:"โ",caron:"ห‡",Cayleys:"โ„ญ",ccaps:"โฉ",ccaron:"ฤ",Ccaron:"ฤŒ",ccedil:"รง",Ccedil:"ร‡",ccirc:"ฤ‰",Ccirc:"ฤˆ",Cconint:"โˆฐ",ccups:"โฉŒ",ccupssm:"โฉ",cdot:"ฤ‹",Cdot:"ฤŠ",cedil:"ยธ",Cedilla:"ยธ",cemptyv:"โฆฒ",cent:"ยข",centerdot:"ยท",CenterDot:"ยท",cfr:"๐” ",Cfr:"โ„ญ",chcy:"ั‡",CHcy:"ะง",check:"โœ“",checkmark:"โœ“",chi:"ฯ‡",Chi:"ฮง",cir:"โ—‹",circ:"ห†",circeq:"โ‰—",circlearrowleft:"โ†บ",circlearrowright:"โ†ป",circledast:"โŠ›",circledcirc:"โŠš",circleddash:"โŠ",CircleDot:"โŠ™",circledR:"ยฎ",circledS:"โ“ˆ",CircleMinus:"โŠ–",CirclePlus:"โŠ•",CircleTimes:"โŠ—",cire:"โ‰—",cirE:"โงƒ",cirfnint:"โจ",cirmid:"โซฏ",cirscir:"โง‚",ClockwiseContourIntegral:"โˆฒ",CloseCurlyDoubleQuote:"โ€",CloseCurlyQuote:"โ€™",clubs:"โ™ฃ",clubsuit:"โ™ฃ",colon:":",Colon:"โˆท",colone:"โ‰”",Colone:"โฉด",coloneq:"โ‰”",comma:",",commat:"@",comp:"โˆ",compfn:"โˆ˜",complement:"โˆ",complexes:"โ„‚",cong:"โ‰…",congdot:"โฉญ",Congruent:"โ‰ก",conint:"โˆฎ",Conint:"โˆฏ",ContourIntegral:"โˆฎ",copf:"๐•”",Copf:"โ„‚",coprod:"โˆ",Coproduct:"โˆ",copy:"ยฉ",COPY:"ยฉ",copysr:"โ„—",CounterClockwiseContourIntegral:"โˆณ",crarr:"โ†ต",cross:"โœ—",Cross:"โจฏ",cscr:"๐’ธ",Cscr:"๐’ž",csub:"โซ",csube:"โซ‘",csup:"โซ",csupe:"โซ’",ctdot:"โ‹ฏ",cudarrl:"โคธ",cudarrr:"โคต",cuepr:"โ‹ž",cuesc:"โ‹Ÿ",cularr:"โ†ถ",cularrp:"โคฝ",cup:"โˆช",Cup:"โ‹“",cupbrcap:"โฉˆ",cupcap:"โฉ†",CupCap:"โ‰",cupcup:"โฉŠ",cupdot:"โŠ",cupor:"โฉ…",cups:"โˆช๏ธ€",curarr:"โ†ท",curarrm:"โคผ",curlyeqprec:"โ‹ž",curlyeqsucc:"โ‹Ÿ",curlyvee:"โ‹Ž",curlywedge:"โ‹",curren:"ยค",curvearrowleft:"โ†ถ",curvearrowright:"โ†ท",cuvee:"โ‹Ž",cuwed:"โ‹",cwconint:"โˆฒ",cwint:"โˆฑ",cylcty:"โŒญ",dagger:"โ€ ",Dagger:"โ€ก",daleth:"โ„ธ",darr:"โ†“",dArr:"โ‡“",Darr:"โ†ก",dash:"โ€",dashv:"โŠฃ",Dashv:"โซค",dbkarow:"โค",dblac:"ห",dcaron:"ฤ",Dcaron:"ฤŽ",dcy:"ะด",Dcy:"ะ”",dd:"โ…†",DD:"โ……",ddagger:"โ€ก",ddarr:"โ‡Š",DDotrahd:"โค‘",ddotseq:"โฉท",deg:"ยฐ",Del:"โˆ‡",delta:"ฮด",Delta:"ฮ”",demptyv:"โฆฑ",dfisht:"โฅฟ",dfr:"๐”ก",Dfr:"๐”‡",dHar:"โฅฅ",dharl:"โ‡ƒ",dharr:"โ‡‚",DiacriticalAcute:"ยด",DiacriticalDot:"ห™",DiacriticalDoubleAcute:"ห",DiacriticalGrave:"`",DiacriticalTilde:"หœ",diam:"โ‹„",diamond:"โ‹„",Diamond:"โ‹„",diamondsuit:"โ™ฆ",diams:"โ™ฆ",die:"ยจ",DifferentialD:"โ…†",digamma:"ฯ",disin:"โ‹ฒ",div:"รท",divide:"รท",divideontimes:"โ‹‡",divonx:"โ‹‡",djcy:"ั’",DJcy:"ะ‚",dlcorn:"โŒž",dlcrop:"โŒ",dollar:"$",dopf:"๐••",Dopf:"๐”ป",dot:"ห™",Dot:"ยจ",DotDot:"โƒœ",doteq:"โ‰",doteqdot:"โ‰‘",DotEqual:"โ‰",dotminus:"โˆธ",dotplus:"โˆ”",dotsquare:"โŠก",doublebarwedge:"โŒ†",DoubleContourIntegral:"โˆฏ",DoubleDot:"ยจ",DoubleDownArrow:"โ‡“",DoubleLeftArrow:"โ‡",DoubleLeftRightArrow:"โ‡”",DoubleLeftTee:"โซค",DoubleLongLeftArrow:"โŸธ",DoubleLongLeftRightArrow:"โŸบ",DoubleLongRightArrow:"โŸน",DoubleRightArrow:"โ‡’",DoubleRightTee:"โŠจ",DoubleUpArrow:"โ‡‘",DoubleUpDownArrow:"โ‡•",DoubleVerticalBar:"โˆฅ",downarrow:"โ†“",Downarrow:"โ‡“",DownArrow:"โ†“",DownArrowBar:"โค“",DownArrowUpArrow:"โ‡ต",DownBreve:"ฬ‘",downdownarrows:"โ‡Š",downharpoonleft:"โ‡ƒ",downharpoonright:"โ‡‚",DownLeftRightVector:"โฅ",DownLeftTeeVector:"โฅž",DownLeftVector:"โ†ฝ",DownLeftVectorBar:"โฅ–",DownRightTeeVector:"โฅŸ",DownRightVector:"โ‡",DownRightVectorBar:"โฅ—",DownTee:"โŠค",DownTeeArrow:"โ†ง",drbkarow:"โค",drcorn:"โŒŸ",drcrop:"โŒŒ",dscr:"๐’น",Dscr:"๐’Ÿ",dscy:"ั•",DScy:"ะ…",dsol:"โงถ",dstrok:"ฤ‘",Dstrok:"ฤ",dtdot:"โ‹ฑ",dtri:"โ–ฟ",dtrif:"โ–พ",duarr:"โ‡ต",duhar:"โฅฏ",dwangle:"โฆฆ",dzcy:"ัŸ",DZcy:"ะ",dzigrarr:"โŸฟ",eacute:"รฉ",Eacute:"ร‰",easter:"โฉฎ",ecaron:"ฤ›",Ecaron:"ฤš",ecir:"โ‰–",ecirc:"รช",Ecirc:"รŠ",ecolon:"โ‰•",ecy:"ั",Ecy:"ะญ",eDDot:"โฉท",edot:"ฤ—",eDot:"โ‰‘",Edot:"ฤ–",ee:"โ…‡",efDot:"โ‰’",efr:"๐”ข",Efr:"๐”ˆ",eg:"โชš",egrave:"รจ",Egrave:"รˆ",egs:"โช–",egsdot:"โช˜",el:"โช™",Element:"โˆˆ",elinters:"โง",ell:"โ„“",els:"โช•",elsdot:"โช—",emacr:"ฤ“",Emacr:"ฤ’",empty:"โˆ…",emptyset:"โˆ…",EmptySmallSquare:"โ—ป",emptyv:"โˆ…",EmptyVerySmallSquare:"โ–ซ",emsp:"โ€ƒ",emsp13:"โ€„",emsp14:"โ€…",eng:"ล‹",ENG:"ลŠ",ensp:"โ€‚",eogon:"ฤ™",Eogon:"ฤ˜",eopf:"๐•–",Eopf:"๐”ผ",epar:"โ‹•",eparsl:"โงฃ",eplus:"โฉฑ",epsi:"ฮต",epsilon:"ฮต",Epsilon:"ฮ•",epsiv:"ฯต",eqcirc:"โ‰–",eqcolon:"โ‰•",eqsim:"โ‰‚",eqslantgtr:"โช–",eqslantless:"โช•",Equal:"โฉต",equals:"=",EqualTilde:"โ‰‚",equest:"โ‰Ÿ",Equilibrium:"โ‡Œ",equiv:"โ‰ก",equivDD:"โฉธ",eqvparsl:"โงฅ",erarr:"โฅฑ",erDot:"โ‰“",escr:"โ„ฏ",Escr:"โ„ฐ",esdot:"โ‰",esim:"โ‰‚",Esim:"โฉณ",eta:"ฮท",Eta:"ฮ—",eth:"รฐ",ETH:"ร",euml:"รซ",Euml:"ร‹",euro:"โ‚ฌ",excl:"!",exist:"โˆƒ",Exists:"โˆƒ",expectation:"โ„ฐ",exponentiale:"โ…‡",ExponentialE:"โ…‡",fallingdotseq:"โ‰’",fcy:"ั„",Fcy:"ะค",female:"โ™€",ffilig:"๏ฌƒ",fflig:"๏ฌ€",ffllig:"๏ฌ„",ffr:"๐”ฃ",Ffr:"๐”‰",filig:"๏ฌ",FilledSmallSquare:"โ—ผ",FilledVerySmallSquare:"โ–ช",fjlig:"fj",flat:"โ™ญ",fllig:"๏ฌ‚",fltns:"โ–ฑ",fnof:"ฦ’",fopf:"๐•—",Fopf:"๐”ฝ",forall:"โˆ€",ForAll:"โˆ€",fork:"โ‹”",forkv:"โซ™",Fouriertrf:"โ„ฑ",fpartint:"โจ",frac12:"ยฝ",frac13:"โ…“",frac14:"ยผ",frac15:"โ…•",frac16:"โ…™",frac18:"โ…›",frac23:"โ…”",frac25:"โ…–",frac34:"ยพ",frac35:"โ…—",frac38:"โ…œ",frac45:"โ…˜",frac56:"โ…š",frac58:"โ…",frac78:"โ…ž",frasl:"โ„",frown:"โŒข",fscr:"๐’ป",Fscr:"โ„ฑ",gacute:"วต",gamma:"ฮณ",Gamma:"ฮ“",gammad:"ฯ",Gammad:"ฯœ",gap:"โช†",gbreve:"ฤŸ",Gbreve:"ฤž",Gcedil:"ฤข",gcirc:"ฤ",Gcirc:"ฤœ",gcy:"ะณ",Gcy:"ะ“",gdot:"ฤก",Gdot:"ฤ ",ge:"โ‰ฅ",gE:"โ‰ง",gel:"โ‹›",gEl:"โชŒ",geq:"โ‰ฅ",geqq:"โ‰ง",geqslant:"โฉพ",ges:"โฉพ",gescc:"โชฉ",gesdot:"โช€",gesdoto:"โช‚",gesdotol:"โช„",gesl:"โ‹›๏ธ€",gesles:"โช”",gfr:"๐”ค",Gfr:"๐”Š",gg:"โ‰ซ",Gg:"โ‹™",ggg:"โ‹™",gimel:"โ„ท",gjcy:"ั“",GJcy:"ะƒ",gl:"โ‰ท",gla:"โชฅ",glE:"โช’",glj:"โชค",gnap:"โชŠ",gnapprox:"โชŠ",gne:"โชˆ",gnE:"โ‰ฉ",gneq:"โชˆ",gneqq:"โ‰ฉ",gnsim:"โ‹ง",gopf:"๐•˜",Gopf:"๐”พ",grave:"`",GreaterEqual:"โ‰ฅ",GreaterEqualLess:"โ‹›",GreaterFullEqual:"โ‰ง",GreaterGreater:"โชข",GreaterLess:"โ‰ท",GreaterSlantEqual:"โฉพ",GreaterTilde:"โ‰ณ",gscr:"โ„Š",Gscr:"๐’ข",gsim:"โ‰ณ",gsime:"โชŽ",gsiml:"โช",gt:">",Gt:"โ‰ซ",GT:">",gtcc:"โชง",gtcir:"โฉบ",gtdot:"โ‹—",gtlPar:"โฆ•",gtquest:"โฉผ",gtrapprox:"โช†",gtrarr:"โฅธ",gtrdot:"โ‹—",gtreqless:"โ‹›",gtreqqless:"โชŒ",gtrless:"โ‰ท",gtrsim:"โ‰ณ",gvertneqq:"โ‰ฉ๏ธ€",gvnE:"โ‰ฉ๏ธ€",Hacek:"ห‡",hairsp:"โ€Š",half:"ยฝ",hamilt:"โ„‹",hardcy:"ัŠ",HARDcy:"ะช",harr:"โ†”",hArr:"โ‡”",harrcir:"โฅˆ",harrw:"โ†ญ",Hat:"^",hbar:"โ„",hcirc:"ฤฅ",Hcirc:"ฤค",hearts:"โ™ฅ",heartsuit:"โ™ฅ",hellip:"โ€ฆ",hercon:"โŠน",hfr:"๐”ฅ",Hfr:"โ„Œ",HilbertSpace:"โ„‹",hksearow:"โคฅ",hkswarow:"โคฆ",hoarr:"โ‡ฟ",homtht:"โˆป",hookleftarrow:"โ†ฉ",hookrightarrow:"โ†ช",hopf:"๐•™",Hopf:"โ„",horbar:"โ€•",HorizontalLine:"โ”€",hscr:"๐’ฝ",Hscr:"โ„‹",hslash:"โ„",hstrok:"ฤง",Hstrok:"ฤฆ",HumpDownHump:"โ‰Ž",HumpEqual:"โ‰",hybull:"โƒ",hyphen:"โ€",iacute:"รญ",Iacute:"ร",ic:"โฃ",icirc:"รฎ",Icirc:"รŽ",icy:"ะธ",Icy:"ะ˜",Idot:"ฤฐ",iecy:"ะต",IEcy:"ะ•",iexcl:"ยก",iff:"โ‡”",ifr:"๐”ฆ",Ifr:"โ„‘",igrave:"รฌ",Igrave:"รŒ",ii:"โ…ˆ",iiiint:"โจŒ",iiint:"โˆญ",iinfin:"โงœ",iiota:"โ„ฉ",ijlig:"ฤณ",IJlig:"ฤฒ",Im:"โ„‘",imacr:"ฤซ",Imacr:"ฤช",image:"โ„‘",ImaginaryI:"โ…ˆ",imagline:"โ„",imagpart:"โ„‘",imath:"ฤฑ",imof:"โŠท",imped:"ฦต",Implies:"โ‡’",in:"โˆˆ",incare:"โ„…",infin:"โˆž",infintie:"โง",inodot:"ฤฑ",int:"โˆซ",Int:"โˆฌ",intcal:"โŠบ",integers:"โ„ค",Integral:"โˆซ",intercal:"โŠบ",Intersection:"โ‹‚",intlarhk:"โจ—",intprod:"โจผ",InvisibleComma:"โฃ",InvisibleTimes:"โข",iocy:"ั‘",IOcy:"ะ",iogon:"ฤฏ",Iogon:"ฤฎ",iopf:"๐•š",Iopf:"๐•€",iota:"ฮน",Iota:"ฮ™",iprod:"โจผ",iquest:"ยฟ",iscr:"๐’พ",Iscr:"โ„",isin:"โˆˆ",isindot:"โ‹ต",isinE:"โ‹น",isins:"โ‹ด",isinsv:"โ‹ณ",isinv:"โˆˆ",it:"โข",itilde:"ฤฉ",Itilde:"ฤจ",iukcy:"ั–",Iukcy:"ะ†",iuml:"รฏ",Iuml:"ร",jcirc:"ฤต",Jcirc:"ฤด",jcy:"ะน",Jcy:"ะ™",jfr:"๐”ง",Jfr:"๐”",jmath:"ศท",jopf:"๐•›",Jopf:"๐•",jscr:"๐’ฟ",Jscr:"๐’ฅ",jsercy:"ั˜",Jsercy:"ะˆ",jukcy:"ั”",Jukcy:"ะ„",kappa:"ฮบ",Kappa:"ฮš",kappav:"ฯฐ",kcedil:"ฤท",Kcedil:"ฤถ",kcy:"ะบ",Kcy:"ะš",kfr:"๐”จ",Kfr:"๐”Ž",kgreen:"ฤธ",khcy:"ั…",KHcy:"ะฅ",kjcy:"ัœ",KJcy:"ะŒ",kopf:"๐•œ",Kopf:"๐•‚",kscr:"๐“€",Kscr:"๐’ฆ",lAarr:"โ‡š",lacute:"ฤบ",Lacute:"ฤน",laemptyv:"โฆด",lagran:"โ„’",lambda:"ฮป",Lambda:"ฮ›",lang:"โŸจ",Lang:"โŸช",langd:"โฆ‘",langle:"โŸจ",lap:"โช…",Laplacetrf:"โ„’",laquo:"ยซ",larr:"โ†",lArr:"โ‡",Larr:"โ†ž",larrb:"โ‡ค",larrbfs:"โคŸ",larrfs:"โค",larrhk:"โ†ฉ",larrlp:"โ†ซ",larrpl:"โคน",larrsim:"โฅณ",larrtl:"โ†ข",lat:"โชซ",latail:"โค™",lAtail:"โค›",late:"โชญ",lates:"โชญ๏ธ€",lbarr:"โคŒ",lBarr:"โคŽ",lbbrk:"โฒ",lbrace:"{",lbrack:"[",lbrke:"โฆ‹",lbrksld:"โฆ",lbrkslu:"โฆ",lcaron:"ฤพ",Lcaron:"ฤฝ",lcedil:"ฤผ",Lcedil:"ฤป",lceil:"โŒˆ",lcub:"{",lcy:"ะป",Lcy:"ะ›",ldca:"โคถ",ldquo:"โ€œ",ldquor:"โ€ž",ldrdhar:"โฅง",ldrushar:"โฅ‹",ldsh:"โ†ฒ",le:"โ‰ค",lE:"โ‰ฆ",LeftAngleBracket:"โŸจ",leftarrow:"โ†",Leftarrow:"โ‡",LeftArrow:"โ†",LeftArrowBar:"โ‡ค",LeftArrowRightArrow:"โ‡†",leftarrowtail:"โ†ข",LeftCeiling:"โŒˆ",LeftDoubleBracket:"โŸฆ",LeftDownTeeVector:"โฅก",LeftDownVector:"โ‡ƒ",LeftDownVectorBar:"โฅ™",LeftFloor:"โŒŠ",leftharpoondown:"โ†ฝ",leftharpoonup:"โ†ผ",leftleftarrows:"โ‡‡",leftrightarrow:"โ†”",Leftrightarrow:"โ‡”",LeftRightArrow:"โ†”",leftrightarrows:"โ‡†",leftrightharpoons:"โ‡‹",leftrightsquigarrow:"โ†ญ",LeftRightVector:"โฅŽ",LeftTee:"โŠฃ",LeftTeeArrow:"โ†ค",LeftTeeVector:"โฅš",leftthreetimes:"โ‹‹",LeftTriangle:"โŠฒ",LeftTriangleBar:"โง",LeftTriangleEqual:"โŠด",LeftUpDownVector:"โฅ‘",LeftUpTeeVector:"โฅ ",LeftUpVector:"โ†ฟ",LeftUpVectorBar:"โฅ˜",LeftVector:"โ†ผ",LeftVectorBar:"โฅ’",leg:"โ‹š",lEg:"โช‹",leq:"โ‰ค",leqq:"โ‰ฆ",leqslant:"โฉฝ",les:"โฉฝ",lescc:"โชจ",lesdot:"โฉฟ",lesdoto:"โช",lesdotor:"โชƒ",lesg:"โ‹š๏ธ€",lesges:"โช“",lessapprox:"โช…",lessdot:"โ‹–",lesseqgtr:"โ‹š",lesseqqgtr:"โช‹",LessEqualGreater:"โ‹š",LessFullEqual:"โ‰ฆ",LessGreater:"โ‰ถ",lessgtr:"โ‰ถ",LessLess:"โชก",lesssim:"โ‰ฒ",LessSlantEqual:"โฉฝ",LessTilde:"โ‰ฒ",lfisht:"โฅผ",lfloor:"โŒŠ",lfr:"๐”ฉ",Lfr:"๐”",lg:"โ‰ถ",lgE:"โช‘",lHar:"โฅข",lhard:"โ†ฝ",lharu:"โ†ผ",lharul:"โฅช",lhblk:"โ–„",ljcy:"ั™",LJcy:"ะ‰",ll:"โ‰ช",Ll:"โ‹˜",llarr:"โ‡‡",llcorner:"โŒž",Lleftarrow:"โ‡š",llhard:"โฅซ",lltri:"โ—บ",lmidot:"ล€",Lmidot:"ฤฟ",lmoust:"โŽฐ",lmoustache:"โŽฐ",lnap:"โช‰",lnapprox:"โช‰",lne:"โช‡",lnE:"โ‰จ",lneq:"โช‡",lneqq:"โ‰จ",lnsim:"โ‹ฆ",loang:"โŸฌ",loarr:"โ‡ฝ",lobrk:"โŸฆ",longleftarrow:"โŸต",Longleftarrow:"โŸธ",LongLeftArrow:"โŸต",longleftrightarrow:"โŸท",Longleftrightarrow:"โŸบ",LongLeftRightArrow:"โŸท",longmapsto:"โŸผ",longrightarrow:"โŸถ",Longrightarrow:"โŸน",LongRightArrow:"โŸถ",looparrowleft:"โ†ซ",looparrowright:"โ†ฌ",lopar:"โฆ…",lopf:"๐•",Lopf:"๐•ƒ",loplus:"โจญ",lotimes:"โจด",lowast:"โˆ—",lowbar:"_",LowerLeftArrow:"โ†™",LowerRightArrow:"โ†˜",loz:"โ—Š",lozenge:"โ—Š",lozf:"โงซ",lpar:"(",lparlt:"โฆ“",lrarr:"โ‡†",lrcorner:"โŒŸ",lrhar:"โ‡‹",lrhard:"โฅญ",lrm:"โ€Ž",lrtri:"โŠฟ",lsaquo:"โ€น",lscr:"๐“",Lscr:"โ„’",lsh:"โ†ฐ",Lsh:"โ†ฐ",lsim:"โ‰ฒ",lsime:"โช",lsimg:"โช",lsqb:"[",lsquo:"โ€˜",lsquor:"โ€š",lstrok:"ล‚",Lstrok:"ล",lt:"<",Lt:"โ‰ช",LT:"<",ltcc:"โชฆ",ltcir:"โฉน",ltdot:"โ‹–",lthree:"โ‹‹",ltimes:"โ‹‰",ltlarr:"โฅถ",ltquest:"โฉป",ltri:"โ—ƒ",ltrie:"โŠด",ltrif:"โ—‚",ltrPar:"โฆ–",lurdshar:"โฅŠ",luruhar:"โฅฆ",lvertneqq:"โ‰จ๏ธ€",lvnE:"โ‰จ๏ธ€",macr:"ยฏ",male:"โ™‚",malt:"โœ ",maltese:"โœ ",map:"โ†ฆ",Map:"โค…",mapsto:"โ†ฆ",mapstodown:"โ†ง",mapstoleft:"โ†ค",mapstoup:"โ†ฅ",marker:"โ–ฎ",mcomma:"โจฉ",mcy:"ะผ",Mcy:"ะœ",mdash:"โ€”",mDDot:"โˆบ",measuredangle:"โˆก",MediumSpace:"โŸ",Mellintrf:"โ„ณ",mfr:"๐”ช",Mfr:"๐”",mho:"โ„ง",micro:"ยต",mid:"โˆฃ",midast:"*",midcir:"โซฐ",middot:"ยท",minus:"โˆ’",minusb:"โŠŸ",minusd:"โˆธ",minusdu:"โจช",MinusPlus:"โˆ“",mlcp:"โซ›",mldr:"โ€ฆ",mnplus:"โˆ“",models:"โŠง",mopf:"๐•ž",Mopf:"๐•„",mp:"โˆ“",mscr:"๐“‚",Mscr:"โ„ณ",mstpos:"โˆพ",mu:"ฮผ",Mu:"ฮœ",multimap:"โŠธ",mumap:"โŠธ",nabla:"โˆ‡",nacute:"ล„",Nacute:"ลƒ",nang:"โˆ โƒ’",nap:"โ‰‰",napE:"โฉฐฬธ",napid:"โ‰‹ฬธ",napos:"ล‰",napprox:"โ‰‰",natur:"โ™ฎ",natural:"โ™ฎ",naturals:"โ„•",nbsp:"ย ",nbump:"โ‰Žฬธ",nbumpe:"โ‰ฬธ",ncap:"โฉƒ",ncaron:"ลˆ",Ncaron:"ล‡",ncedil:"ล†",Ncedil:"ล…",ncong:"โ‰‡",ncongdot:"โฉญฬธ",ncup:"โฉ‚",ncy:"ะฝ",Ncy:"ะ",ndash:"โ€“",ne:"โ‰ ",nearhk:"โคค",nearr:"โ†—",neArr:"โ‡—",nearrow:"โ†—",nedot:"โ‰ฬธ",NegativeMediumSpace:"โ€‹",NegativeThickSpace:"โ€‹",NegativeThinSpace:"โ€‹",NegativeVeryThinSpace:"โ€‹",nequiv:"โ‰ข",nesear:"โคจ",nesim:"โ‰‚ฬธ",NestedGreaterGreater:"โ‰ซ",NestedLessLess:"โ‰ช",NewLine:"\n",nexist:"โˆ„",nexists:"โˆ„",nfr:"๐”ซ",Nfr:"๐”‘",nge:"โ‰ฑ",ngE:"โ‰งฬธ",ngeq:"โ‰ฑ",ngeqq:"โ‰งฬธ",ngeqslant:"โฉพฬธ",nges:"โฉพฬธ",nGg:"โ‹™ฬธ",ngsim:"โ‰ต",ngt:"โ‰ฏ",nGt:"โ‰ซโƒ’",ngtr:"โ‰ฏ",nGtv:"โ‰ซฬธ",nharr:"โ†ฎ",nhArr:"โ‡Ž",nhpar:"โซฒ",ni:"โˆ‹",nis:"โ‹ผ",nisd:"โ‹บ",niv:"โˆ‹",njcy:"ัš",NJcy:"ะŠ",nlarr:"โ†š",nlArr:"โ‡",nldr:"โ€ฅ",nle:"โ‰ฐ",nlE:"โ‰ฆฬธ",nleftarrow:"โ†š",nLeftarrow:"โ‡",nleftrightarrow:"โ†ฎ",nLeftrightarrow:"โ‡Ž",nleq:"โ‰ฐ",nleqq:"โ‰ฆฬธ",nleqslant:"โฉฝฬธ",nles:"โฉฝฬธ",nless:"โ‰ฎ",nLl:"โ‹˜ฬธ",nlsim:"โ‰ด",nlt:"โ‰ฎ",nLt:"โ‰ชโƒ’",nltri:"โ‹ช",nltrie:"โ‹ฌ",nLtv:"โ‰ชฬธ",nmid:"โˆค",NoBreak:"โ ",NonBreakingSpace:"ย ",nopf:"๐•Ÿ",Nopf:"โ„•",not:"ยฌ",Not:"โซฌ",NotCongruent:"โ‰ข",NotCupCap:"โ‰ญ",NotDoubleVerticalBar:"โˆฆ",NotElement:"โˆ‰",NotEqual:"โ‰ ",NotEqualTilde:"โ‰‚ฬธ",NotExists:"โˆ„",NotGreater:"โ‰ฏ",NotGreaterEqual:"โ‰ฑ",NotGreaterFullEqual:"โ‰งฬธ",NotGreaterGreater:"โ‰ซฬธ",NotGreaterLess:"โ‰น",NotGreaterSlantEqual:"โฉพฬธ",NotGreaterTilde:"โ‰ต",NotHumpDownHump:"โ‰Žฬธ",NotHumpEqual:"โ‰ฬธ",notin:"โˆ‰",notindot:"โ‹ตฬธ",notinE:"โ‹นฬธ",notinva:"โˆ‰",notinvb:"โ‹ท",notinvc:"โ‹ถ",NotLeftTriangle:"โ‹ช",NotLeftTriangleBar:"โงฬธ",NotLeftTriangleEqual:"โ‹ฌ",NotLess:"โ‰ฎ",NotLessEqual:"โ‰ฐ",NotLessGreater:"โ‰ธ",NotLessLess:"โ‰ชฬธ",NotLessSlantEqual:"โฉฝฬธ",NotLessTilde:"โ‰ด",NotNestedGreaterGreater:"โชขฬธ",NotNestedLessLess:"โชกฬธ",notni:"โˆŒ",notniva:"โˆŒ",notnivb:"โ‹พ",notnivc:"โ‹ฝ",NotPrecedes:"โŠ€",NotPrecedesEqual:"โชฏฬธ",NotPrecedesSlantEqual:"โ‹ ",NotReverseElement:"โˆŒ",NotRightTriangle:"โ‹ซ",NotRightTriangleBar:"โงฬธ",NotRightTriangleEqual:"โ‹ญ",NotSquareSubset:"โŠฬธ",NotSquareSubsetEqual:"โ‹ข",NotSquareSuperset:"โŠฬธ",NotSquareSupersetEqual:"โ‹ฃ",NotSubset:"โŠ‚โƒ’",NotSubsetEqual:"โŠˆ",NotSucceeds:"โŠ",NotSucceedsEqual:"โชฐฬธ",NotSucceedsSlantEqual:"โ‹ก",NotSucceedsTilde:"โ‰ฟฬธ",NotSuperset:"โŠƒโƒ’",NotSupersetEqual:"โŠ‰",NotTilde:"โ‰",NotTildeEqual:"โ‰„",NotTildeFullEqual:"โ‰‡",NotTildeTilde:"โ‰‰",NotVerticalBar:"โˆค",npar:"โˆฆ",nparallel:"โˆฆ",nparsl:"โซฝโƒฅ",npart:"โˆ‚ฬธ",npolint:"โจ”",npr:"โŠ€",nprcue:"โ‹ ",npre:"โชฏฬธ",nprec:"โŠ€",npreceq:"โชฏฬธ",nrarr:"โ†›",nrArr:"โ‡",nrarrc:"โคณฬธ",nrarrw:"โ†ฬธ",nrightarrow:"โ†›",nRightarrow:"โ‡",nrtri:"โ‹ซ",nrtrie:"โ‹ญ",nsc:"โŠ",nsccue:"โ‹ก",nsce:"โชฐฬธ",nscr:"๐“ƒ",Nscr:"๐’ฉ",nshortmid:"โˆค",nshortparallel:"โˆฆ",nsim:"โ‰",nsime:"โ‰„",nsimeq:"โ‰„",nsmid:"โˆค",nspar:"โˆฆ",nsqsube:"โ‹ข",nsqsupe:"โ‹ฃ",nsub:"โŠ„",nsube:"โŠˆ",nsubE:"โซ…ฬธ",nsubset:"โŠ‚โƒ’",nsubseteq:"โŠˆ",nsubseteqq:"โซ…ฬธ",nsucc:"โŠ",nsucceq:"โชฐฬธ",nsup:"โŠ…",nsupe:"โŠ‰",nsupE:"โซ†ฬธ",nsupset:"โŠƒโƒ’",nsupseteq:"โŠ‰",nsupseteqq:"โซ†ฬธ",ntgl:"โ‰น",ntilde:"รฑ",Ntilde:"ร‘",ntlg:"โ‰ธ",ntriangleleft:"โ‹ช",ntrianglelefteq:"โ‹ฌ",ntriangleright:"โ‹ซ",ntrianglerighteq:"โ‹ญ",nu:"ฮฝ",Nu:"ฮ",num:"#",numero:"โ„–",numsp:"โ€‡",nvap:"โ‰โƒ’",nvdash:"โŠฌ",nvDash:"โŠญ",nVdash:"โŠฎ",nVDash:"โŠฏ",nvge:"โ‰ฅโƒ’",nvgt:">โƒ’",nvHarr:"โค„",nvinfin:"โงž",nvlArr:"โค‚",nvle:"โ‰คโƒ’",nvlt:"<โƒ’",nvltrie:"โŠดโƒ’",nvrArr:"โคƒ",nvrtrie:"โŠตโƒ’",nvsim:"โˆผโƒ’",nwarhk:"โคฃ",nwarr:"โ†–",nwArr:"โ‡–",nwarrow:"โ†–",nwnear:"โคง",oacute:"รณ",Oacute:"ร“",oast:"โŠ›",ocir:"โŠš",ocirc:"รด",Ocirc:"ร”",ocy:"ะพ",Ocy:"ะž",odash:"โŠ",odblac:"ล‘",Odblac:"ล",odiv:"โจธ",odot:"โŠ™",odsold:"โฆผ",oelig:"ล“",OElig:"ล’",ofcir:"โฆฟ",ofr:"๐”ฌ",Ofr:"๐”’",ogon:"ห›",ograve:"รฒ",Ograve:"ร’",ogt:"โง",ohbar:"โฆต",ohm:"ฮฉ",oint:"โˆฎ",olarr:"โ†บ",olcir:"โฆพ",olcross:"โฆป",oline:"โ€พ",olt:"โง€",omacr:"ล",Omacr:"ลŒ",omega:"ฯ‰",Omega:"ฮฉ",omicron:"ฮฟ",Omicron:"ฮŸ",omid:"โฆถ",ominus:"โŠ–",oopf:"๐• ",Oopf:"๐•†",opar:"โฆท",OpenCurlyDoubleQuote:"โ€œ",OpenCurlyQuote:"โ€˜",operp:"โฆน",oplus:"โŠ•",or:"โˆจ",Or:"โฉ”",orarr:"โ†ป",ord:"โฉ",order:"โ„ด",orderof:"โ„ด",ordf:"ยช",ordm:"ยบ",origof:"โŠถ",oror:"โฉ–",orslope:"โฉ—",orv:"โฉ›",oS:"โ“ˆ",oscr:"โ„ด",Oscr:"๐’ช",oslash:"รธ",Oslash:"ร˜",osol:"โŠ˜",otilde:"รต",Otilde:"ร•",otimes:"โŠ—",Otimes:"โจท",otimesas:"โจถ",ouml:"รถ",Ouml:"ร–",ovbar:"โŒฝ",OverBar:"โ€พ",OverBrace:"โž",OverBracket:"โŽด",OverParenthesis:"โœ",par:"โˆฅ",para:"ยถ",parallel:"โˆฅ",parsim:"โซณ",parsl:"โซฝ",part:"โˆ‚",PartialD:"โˆ‚",pcy:"ะฟ",Pcy:"ะŸ",percnt:"%",period:".",permil:"โ€ฐ",perp:"โŠฅ",pertenk:"โ€ฑ",pfr:"๐”ญ",Pfr:"๐”“",phi:"ฯ†",Phi:"ฮฆ",phiv:"ฯ•",phmmat:"โ„ณ",phone:"โ˜Ž",pi:"ฯ€",Pi:"ฮ ",pitchfork:"โ‹”",piv:"ฯ–",planck:"โ„",planckh:"โ„Ž",plankv:"โ„",plus:"+",plusacir:"โจฃ",plusb:"โŠž",pluscir:"โจข",plusdo:"โˆ”",plusdu:"โจฅ",pluse:"โฉฒ",PlusMinus:"ยฑ",plusmn:"ยฑ",plussim:"โจฆ",plustwo:"โจง",pm:"ยฑ",Poincareplane:"โ„Œ",pointint:"โจ•",popf:"๐•ก",Popf:"โ„™",pound:"ยฃ",pr:"โ‰บ",Pr:"โชป",prap:"โชท",prcue:"โ‰ผ",pre:"โชฏ",prE:"โชณ",prec:"โ‰บ",precapprox:"โชท",preccurlyeq:"โ‰ผ",Precedes:"โ‰บ",PrecedesEqual:"โชฏ",PrecedesSlantEqual:"โ‰ผ",PrecedesTilde:"โ‰พ",preceq:"โชฏ",precnapprox:"โชน",precneqq:"โชต",precnsim:"โ‹จ",precsim:"โ‰พ",prime:"โ€ฒ",Prime:"โ€ณ",primes:"โ„™",prnap:"โชน",prnE:"โชต",prnsim:"โ‹จ",prod:"โˆ",Product:"โˆ",profalar:"โŒฎ",profline:"โŒ’",profsurf:"โŒ“",prop:"โˆ",Proportion:"โˆท",Proportional:"โˆ",propto:"โˆ",prsim:"โ‰พ",prurel:"โŠฐ",pscr:"๐“…",Pscr:"๐’ซ",psi:"ฯˆ",Psi:"ฮจ",puncsp:"โ€ˆ",qfr:"๐”ฎ",Qfr:"๐””",qint:"โจŒ",qopf:"๐•ข",Qopf:"โ„š",qprime:"โ—",qscr:"๐“†",Qscr:"๐’ฌ",quaternions:"โ„",quatint:"โจ–",quest:"?",questeq:"โ‰Ÿ",quot:'"',QUOT:'"',rAarr:"โ‡›",race:"โˆฝฬฑ",racute:"ล•",Racute:"ล”",radic:"โˆš",raemptyv:"โฆณ",rang:"โŸฉ",Rang:"โŸซ",rangd:"โฆ’",range:"โฆฅ",rangle:"โŸฉ",raquo:"ยป",rarr:"โ†’",rArr:"โ‡’",Rarr:"โ† ",rarrap:"โฅต",rarrb:"โ‡ฅ",rarrbfs:"โค ",rarrc:"โคณ",rarrfs:"โคž",rarrhk:"โ†ช",rarrlp:"โ†ฌ",rarrpl:"โฅ…",rarrsim:"โฅด",rarrtl:"โ†ฃ",Rarrtl:"โค–",rarrw:"โ†",ratail:"โคš",rAtail:"โคœ",ratio:"โˆถ",rationals:"โ„š",rbarr:"โค",rBarr:"โค",RBarr:"โค",rbbrk:"โณ",rbrace:"}",rbrack:"]",rbrke:"โฆŒ",rbrksld:"โฆŽ",rbrkslu:"โฆ",rcaron:"ล™",Rcaron:"ล˜",rcedil:"ล—",Rcedil:"ล–",rceil:"โŒ‰",rcub:"}",rcy:"ั€",Rcy:"ะ ",rdca:"โคท",rdldhar:"โฅฉ",rdquo:"โ€",rdquor:"โ€",rdsh:"โ†ณ",Re:"โ„œ",real:"โ„œ",realine:"โ„›",realpart:"โ„œ",reals:"โ„",rect:"โ–ญ",reg:"ยฎ",REG:"ยฎ",ReverseElement:"โˆ‹",ReverseEquilibrium:"โ‡‹",ReverseUpEquilibrium:"โฅฏ",rfisht:"โฅฝ",rfloor:"โŒ‹",rfr:"๐”ฏ",Rfr:"โ„œ",rHar:"โฅค",rhard:"โ‡",rharu:"โ‡€",rharul:"โฅฌ",rho:"ฯ",Rho:"ฮก",rhov:"ฯฑ",RightAngleBracket:"โŸฉ",rightarrow:"โ†’",Rightarrow:"โ‡’",RightArrow:"โ†’",RightArrowBar:"โ‡ฅ",RightArrowLeftArrow:"โ‡„",rightarrowtail:"โ†ฃ",RightCeiling:"โŒ‰",RightDoubleBracket:"โŸง",RightDownTeeVector:"โฅ",RightDownVector:"โ‡‚",RightDownVectorBar:"โฅ•",RightFloor:"โŒ‹",rightharpoondown:"โ‡",rightharpoonup:"โ‡€",rightleftarrows:"โ‡„",rightleftharpoons:"โ‡Œ",rightrightarrows:"โ‡‰",rightsquigarrow:"โ†",RightTee:"โŠข",RightTeeArrow:"โ†ฆ",RightTeeVector:"โฅ›",rightthreetimes:"โ‹Œ",RightTriangle:"โŠณ",RightTriangleBar:"โง",RightTriangleEqual:"โŠต",RightUpDownVector:"โฅ",RightUpTeeVector:"โฅœ",RightUpVector:"โ†พ",RightUpVectorBar:"โฅ”",RightVector:"โ‡€",RightVectorBar:"โฅ“",ring:"หš",risingdotseq:"โ‰“",rlarr:"โ‡„",rlhar:"โ‡Œ",rlm:"โ€",rmoust:"โŽฑ",rmoustache:"โŽฑ",rnmid:"โซฎ",roang:"โŸญ",roarr:"โ‡พ",robrk:"โŸง",ropar:"โฆ†",ropf:"๐•ฃ",Ropf:"โ„",roplus:"โจฎ",rotimes:"โจต",RoundImplies:"โฅฐ",rpar:")",rpargt:"โฆ”",rppolint:"โจ’",rrarr:"โ‡‰",Rrightarrow:"โ‡›",rsaquo:"โ€บ",rscr:"๐“‡",Rscr:"โ„›",rsh:"โ†ฑ",Rsh:"โ†ฑ",rsqb:"]",rsquo:"โ€™",rsquor:"โ€™",rthree:"โ‹Œ",rtimes:"โ‹Š",rtri:"โ–น",rtrie:"โŠต",rtrif:"โ–ธ",rtriltri:"โงŽ",RuleDelayed:"โงด",ruluhar:"โฅจ",rx:"โ„ž",sacute:"ล›",Sacute:"ลš",sbquo:"โ€š",sc:"โ‰ป",Sc:"โชผ",scap:"โชธ",scaron:"ลก",Scaron:"ล ",sccue:"โ‰ฝ",sce:"โชฐ",scE:"โชด",scedil:"ลŸ",Scedil:"ลž",scirc:"ล",Scirc:"ลœ",scnap:"โชบ",scnE:"โชถ",scnsim:"โ‹ฉ",scpolint:"โจ“",scsim:"โ‰ฟ",scy:"ั",Scy:"ะก",sdot:"โ‹…",sdotb:"โŠก",sdote:"โฉฆ",searhk:"โคฅ",searr:"โ†˜",seArr:"โ‡˜",searrow:"โ†˜",sect:"ยง",semi:";",seswar:"โคฉ",setminus:"โˆ–",setmn:"โˆ–",sext:"โœถ",sfr:"๐”ฐ",Sfr:"๐”–",sfrown:"โŒข",sharp:"โ™ฏ",shchcy:"ั‰",SHCHcy:"ะฉ",shcy:"ัˆ",SHcy:"ะจ",ShortDownArrow:"โ†“",ShortLeftArrow:"โ†",shortmid:"โˆฃ",shortparallel:"โˆฅ",ShortRightArrow:"โ†’",ShortUpArrow:"โ†‘",shy:"ยญ",sigma:"ฯƒ",Sigma:"ฮฃ",sigmaf:"ฯ‚",sigmav:"ฯ‚",sim:"โˆผ",simdot:"โฉช",sime:"โ‰ƒ",simeq:"โ‰ƒ",simg:"โชž",simgE:"โช ",siml:"โช",simlE:"โชŸ",simne:"โ‰†",simplus:"โจค",simrarr:"โฅฒ",slarr:"โ†",SmallCircle:"โˆ˜",smallsetminus:"โˆ–",smashp:"โจณ",smeparsl:"โงค",smid:"โˆฃ",smile:"โŒฃ",smt:"โชช",smte:"โชฌ",smtes:"โชฌ๏ธ€",softcy:"ัŒ",SOFTcy:"ะฌ",sol:"/",solb:"โง„",solbar:"โŒฟ",sopf:"๐•ค",Sopf:"๐•Š",spades:"โ™ ",spadesuit:"โ™ ",spar:"โˆฅ",sqcap:"โŠ“",sqcaps:"โŠ“๏ธ€",sqcup:"โŠ”",sqcups:"โŠ”๏ธ€",Sqrt:"โˆš",sqsub:"โŠ",sqsube:"โŠ‘",sqsubset:"โŠ",sqsubseteq:"โŠ‘",sqsup:"โŠ",sqsupe:"โŠ’",sqsupset:"โŠ",sqsupseteq:"โŠ’",squ:"โ–ก",square:"โ–ก",Square:"โ–ก",SquareIntersection:"โŠ“",SquareSubset:"โŠ",SquareSubsetEqual:"โŠ‘",SquareSuperset:"โŠ",SquareSupersetEqual:"โŠ’",SquareUnion:"โŠ”",squarf:"โ–ช",squf:"โ–ช",srarr:"โ†’",sscr:"๐“ˆ",Sscr:"๐’ฎ",ssetmn:"โˆ–",ssmile:"โŒฃ",sstarf:"โ‹†",star:"โ˜†",Star:"โ‹†",starf:"โ˜…",straightepsilon:"ฯต",straightphi:"ฯ•",strns:"ยฏ",sub:"โŠ‚",Sub:"โ‹",subdot:"โชฝ",sube:"โŠ†",subE:"โซ…",subedot:"โซƒ",submult:"โซ",subne:"โŠŠ",subnE:"โซ‹",subplus:"โชฟ",subrarr:"โฅน",subset:"โŠ‚",Subset:"โ‹",subseteq:"โŠ†",subseteqq:"โซ…",SubsetEqual:"โŠ†",subsetneq:"โŠŠ",subsetneqq:"โซ‹",subsim:"โซ‡",subsub:"โซ•",subsup:"โซ“",succ:"โ‰ป",succapprox:"โชธ",succcurlyeq:"โ‰ฝ",Succeeds:"โ‰ป",SucceedsEqual:"โชฐ",SucceedsSlantEqual:"โ‰ฝ",SucceedsTilde:"โ‰ฟ",succeq:"โชฐ",succnapprox:"โชบ",succneqq:"โชถ",succnsim:"โ‹ฉ",succsim:"โ‰ฟ",SuchThat:"โˆ‹",sum:"โˆ‘",Sum:"โˆ‘",sung:"โ™ช",sup:"โŠƒ",Sup:"โ‹‘",sup1:"ยน",sup2:"ยฒ",sup3:"ยณ",supdot:"โชพ",supdsub:"โซ˜",supe:"โŠ‡",supE:"โซ†",supedot:"โซ„",Superset:"โŠƒ",SupersetEqual:"โŠ‡",suphsol:"โŸ‰",suphsub:"โซ—",suplarr:"โฅป",supmult:"โซ‚",supne:"โŠ‹",supnE:"โซŒ",supplus:"โซ€",supset:"โŠƒ",Supset:"โ‹‘",supseteq:"โŠ‡",supseteqq:"โซ†",supsetneq:"โŠ‹",supsetneqq:"โซŒ",supsim:"โซˆ",supsub:"โซ”",supsup:"โซ–",swarhk:"โคฆ",swarr:"โ†™",swArr:"โ‡™",swarrow:"โ†™",swnwar:"โคช",szlig:"รŸ",Tab:"\t",target:"โŒ–",tau:"ฯ„",Tau:"ฮค",tbrk:"โŽด",tcaron:"ลฅ",Tcaron:"ลค",tcedil:"ลฃ",Tcedil:"ลข",tcy:"ั‚",Tcy:"ะข",tdot:"โƒ›",telrec:"โŒ•",tfr:"๐”ฑ",Tfr:"๐”—",there4:"โˆด",therefore:"โˆด",Therefore:"โˆด",theta:"ฮธ",Theta:"ฮ˜",thetasym:"ฯ‘",thetav:"ฯ‘",thickapprox:"โ‰ˆ",thicksim:"โˆผ",ThickSpace:"โŸโ€Š",thinsp:"โ€‰",ThinSpace:"โ€‰",thkap:"โ‰ˆ",thksim:"โˆผ",thorn:"รพ",THORN:"รž",tilde:"หœ",Tilde:"โˆผ",TildeEqual:"โ‰ƒ",TildeFullEqual:"โ‰…",TildeTilde:"โ‰ˆ",times:"ร—",timesb:"โŠ ",timesbar:"โจฑ",timesd:"โจฐ",tint:"โˆญ",toea:"โคจ",top:"โŠค",topbot:"โŒถ",topcir:"โซฑ",topf:"๐•ฅ",Topf:"๐•‹",topfork:"โซš",tosa:"โคฉ",tprime:"โ€ด",trade:"โ„ข",TRADE:"โ„ข",triangle:"โ–ต",triangledown:"โ–ฟ",triangleleft:"โ—ƒ",trianglelefteq:"โŠด",triangleq:"โ‰œ",triangleright:"โ–น",trianglerighteq:"โŠต",tridot:"โ—ฌ",trie:"โ‰œ",triminus:"โจบ",TripleDot:"โƒ›",triplus:"โจน",trisb:"โง",tritime:"โจป",trpezium:"โข",tscr:"๐“‰",Tscr:"๐’ฏ",tscy:"ั†",TScy:"ะฆ",tshcy:"ั›",TSHcy:"ะ‹",tstrok:"ลง",Tstrok:"ลฆ",twixt:"โ‰ฌ",twoheadleftarrow:"โ†ž",twoheadrightarrow:"โ† ",uacute:"รบ",Uacute:"รš",uarr:"โ†‘",uArr:"โ‡‘",Uarr:"โ†Ÿ",Uarrocir:"โฅ‰",ubrcy:"ัž",Ubrcy:"ะŽ",ubreve:"ลญ",Ubreve:"ลฌ",ucirc:"รป",Ucirc:"ร›",ucy:"ัƒ",Ucy:"ะฃ",udarr:"โ‡…",udblac:"ลฑ",Udblac:"ลฐ",udhar:"โฅฎ",ufisht:"โฅพ",ufr:"๐”ฒ",Ufr:"๐”˜",ugrave:"รน",Ugrave:"ร™",uHar:"โฅฃ",uharl:"โ†ฟ",uharr:"โ†พ",uhblk:"โ–€",ulcorn:"โŒœ",ulcorner:"โŒœ",ulcrop:"โŒ",ultri:"โ—ธ",umacr:"ลซ",Umacr:"ลช",uml:"ยจ",UnderBar:"_",UnderBrace:"โŸ",UnderBracket:"โŽต",UnderParenthesis:"โ",Union:"โ‹ƒ",UnionPlus:"โŠŽ",uogon:"ลณ",Uogon:"ลฒ",uopf:"๐•ฆ",Uopf:"๐•Œ",uparrow:"โ†‘",Uparrow:"โ‡‘",UpArrow:"โ†‘",UpArrowBar:"โค’",UpArrowDownArrow:"โ‡…",updownarrow:"โ†•",Updownarrow:"โ‡•",UpDownArrow:"โ†•",UpEquilibrium:"โฅฎ",upharpoonleft:"โ†ฟ",upharpoonright:"โ†พ",uplus:"โŠŽ",UpperLeftArrow:"โ†–",UpperRightArrow:"โ†—",upsi:"ฯ…",Upsi:"ฯ’",upsih:"ฯ’",upsilon:"ฯ…",Upsilon:"ฮฅ",UpTee:"โŠฅ",UpTeeArrow:"โ†ฅ",upuparrows:"โ‡ˆ",urcorn:"โŒ",urcorner:"โŒ",urcrop:"โŒŽ",uring:"ลฏ",Uring:"ลฎ",urtri:"โ—น",uscr:"๐“Š",Uscr:"๐’ฐ",utdot:"โ‹ฐ",utilde:"ลฉ",Utilde:"ลจ",utri:"โ–ต",utrif:"โ–ด",uuarr:"โ‡ˆ",uuml:"รผ",Uuml:"รœ",uwangle:"โฆง",vangrt:"โฆœ",varepsilon:"ฯต",varkappa:"ฯฐ",varnothing:"โˆ…",varphi:"ฯ•",varpi:"ฯ–",varpropto:"โˆ",varr:"โ†•",vArr:"โ‡•",varrho:"ฯฑ",varsigma:"ฯ‚",varsubsetneq:"โŠŠ๏ธ€",varsubsetneqq:"โซ‹๏ธ€",varsupsetneq:"โŠ‹๏ธ€",varsupsetneqq:"โซŒ๏ธ€",vartheta:"ฯ‘",vartriangleleft:"โŠฒ",vartriangleright:"โŠณ",vBar:"โซจ",Vbar:"โซซ",vBarv:"โซฉ",vcy:"ะฒ",Vcy:"ะ’",vdash:"โŠข",vDash:"โŠจ",Vdash:"โŠฉ",VDash:"โŠซ",Vdashl:"โซฆ",vee:"โˆจ",Vee:"โ‹",veebar:"โŠป",veeeq:"โ‰š",vellip:"โ‹ฎ",verbar:"|",Verbar:"โ€–",vert:"|",Vert:"โ€–",VerticalBar:"โˆฃ",VerticalLine:"|",VerticalSeparator:"โ˜",VerticalTilde:"โ‰€",VeryThinSpace:"โ€Š",vfr:"๐”ณ",Vfr:"๐”™",vltri:"โŠฒ",vnsub:"โŠ‚โƒ’",vnsup:"โŠƒโƒ’",vopf:"๐•ง",Vopf:"๐•",vprop:"โˆ",vrtri:"โŠณ",vscr:"๐“‹",Vscr:"๐’ฑ",vsubne:"โŠŠ๏ธ€",vsubnE:"โซ‹๏ธ€",vsupne:"โŠ‹๏ธ€",vsupnE:"โซŒ๏ธ€",Vvdash:"โŠช",vzigzag:"โฆš",wcirc:"ลต",Wcirc:"ลด",wedbar:"โฉŸ",wedge:"โˆง",Wedge:"โ‹€",wedgeq:"โ‰™",weierp:"โ„˜",wfr:"๐”ด",Wfr:"๐”š",wopf:"๐•จ",Wopf:"๐•Ž",wp:"โ„˜",wr:"โ‰€",wreath:"โ‰€",wscr:"๐“Œ",Wscr:"๐’ฒ",xcap:"โ‹‚",xcirc:"โ—ฏ",xcup:"โ‹ƒ",xdtri:"โ–ฝ",xfr:"๐”ต",Xfr:"๐”›",xharr:"โŸท",xhArr:"โŸบ",xi:"ฮพ",Xi:"ฮž",xlarr:"โŸต",xlArr:"โŸธ",xmap:"โŸผ",xnis:"โ‹ป",xodot:"โจ€",xopf:"๐•ฉ",Xopf:"๐•",xoplus:"โจ",xotime:"โจ‚",xrarr:"โŸถ",xrArr:"โŸน",xscr:"๐“",Xscr:"๐’ณ",xsqcup:"โจ†",xuplus:"โจ„",xutri:"โ–ณ",xvee:"โ‹",xwedge:"โ‹€",yacute:"รฝ",Yacute:"ร",yacy:"ั",YAcy:"ะฏ",ycirc:"ลท",Ycirc:"ลถ",ycy:"ั‹",Ycy:"ะซ",yen:"ยฅ",yfr:"๐”ถ",Yfr:"๐”œ",yicy:"ั—",YIcy:"ะ‡",yopf:"๐•ช",Yopf:"๐•",yscr:"๐“Ž",Yscr:"๐’ด",yucy:"ัŽ",YUcy:"ะฎ",yuml:"รฟ",Yuml:"ลธ",zacute:"ลบ",Zacute:"ลน",zcaron:"ลพ",Zcaron:"ลฝ",zcy:"ะท",Zcy:"ะ—",zdot:"ลผ",Zdot:"ลป",zeetrf:"โ„จ",ZeroWidthSpace:"โ€‹",zeta:"ฮถ",Zeta:"ฮ–",zfr:"๐”ท",Zfr:"โ„จ",zhcy:"ะถ",ZHcy:"ะ–",zigrarr:"โ‡",zopf:"๐•ซ",Zopf:"โ„ค",zscr:"๐“",Zscr:"๐’ต",zwj:"โ€",zwnj:"โ€Œ"};var v={aacute:"รก",Aacute:"ร",acirc:"รข",Acirc:"ร‚",acute:"ยด",aelig:"รฆ",AElig:"ร†",agrave:"ร ",Agrave:"ร€",amp:"&",AMP:"&",aring:"รฅ",Aring:"ร…",atilde:"รฃ",Atilde:"รƒ",auml:"รค",Auml:"ร„",brvbar:"ยฆ",ccedil:"รง",Ccedil:"ร‡",cedil:"ยธ",cent:"ยข",copy:"ยฉ",COPY:"ยฉ",curren:"ยค",deg:"ยฐ",divide:"รท",eacute:"รฉ",Eacute:"ร‰",ecirc:"รช",Ecirc:"รŠ",egrave:"รจ",Egrave:"รˆ",eth:"รฐ",ETH:"ร",euml:"รซ",Euml:"ร‹",frac12:"ยฝ",frac14:"ยผ",frac34:"ยพ",gt:">",GT:">",iacute:"รญ",Iacute:"ร",icirc:"รฎ",Icirc:"รŽ",iexcl:"ยก",igrave:"รฌ",Igrave:"รŒ",iquest:"ยฟ",iuml:"รฏ",Iuml:"ร",laquo:"ยซ",lt:"<",LT:"<",macr:"ยฏ",micro:"ยต",middot:"ยท",nbsp:"ย ",not:"ยฌ",ntilde:"รฑ",Ntilde:"ร‘",oacute:"รณ",Oacute:"ร“",ocirc:"รด",Ocirc:"ร”",ograve:"รฒ",Ograve:"ร’",ordf:"ยช",ordm:"ยบ",oslash:"รธ",Oslash:"ร˜",otilde:"รต",Otilde:"ร•",ouml:"รถ",Ouml:"ร–",para:"ยถ",plusmn:"ยฑ",pound:"ยฃ",quot:'"',QUOT:'"',raquo:"ยป",reg:"ยฎ",REG:"ยฎ",sect:"ยง",shy:"ยญ",sup1:"ยน",sup2:"ยฒ",sup3:"ยณ",szlig:"รŸ",thorn:"รพ",THORN:"รž",times:"ร—",uacute:"รบ",Uacute:"รš",ucirc:"รป",Ucirc:"ร›",ugrave:"รน",Ugrave:"ร™",uml:"ยจ",uuml:"รผ",Uuml:"รœ",yacute:"รฝ",Yacute:"ร",yen:"ยฅ",yuml:"รฟ"};var b={0:"๏ฟฝ",128:"โ‚ฌ",130:"โ€š",131:"ฦ’",132:"โ€ž",133:"โ€ฆ",134:"โ€ ",135:"โ€ก",136:"ห†",137:"โ€ฐ",138:"ล ",139:"โ€น",140:"ล’",142:"ลฝ",145:"โ€˜",146:"โ€™",147:"โ€œ",148:"โ€",149:"โ€ข",150:"โ€“",151:"โ€”",152:"หœ",153:"โ„ข",154:"ลก",155:"โ€บ",156:"ล“",158:"ลพ",159:"ลธ"};var y=[1,2,3,4,5,6,7,8,11,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,64976,64977,64978,64979,64980,64981,64982,64983,64984,64985,64986,64987,64988,64989,64990,64991,64992,64993,64994,64995,64996,64997,64998,64999,65e3,65001,65002,65003,65004,65005,65006,65007,65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111];var w=String.fromCharCode;var T={};var E=T.hasOwnProperty;var has=function(e,r){return E.call(e,r)};var contains=function(e,r){var t=-1;var a=e.length;while(++t=55296&&e<=57343||e>1114111){if(r){parseError("character reference outside the permissible Unicode range")}return"๏ฟฝ"}if(has(b,e)){if(r){parseError("disallowed character reference")}return b[e]}if(r&&contains(y,e)){parseError("disallowed character reference")}if(e>65535){e-=65536;t+=w(e>>>10&1023|55296);e=56320|e&1023}t+=w(e);return t};var hexEscape=function(e){return"&#x"+e.toString(16).toUpperCase()+";"};var decEscape=function(e){return"&#"+e+";"};var parseError=function(e){throw Error("Parse error: "+e)};var encode=function(e,r){r=merge(r,encode.options);var t=r.strict;if(t&&g.test(e)){parseError("forbidden code point")}var a=r.encodeEverything;var n=r.useNamedReferences;var i=r.allowUnsafeSymbols;var d=r.decimal?decEscape:hexEscape;var escapeBmpSymbol=function(e){return d(e.charCodeAt(0))};if(a){e=e.replace(s,(function(e){if(n&&has(c,e)){return"&"+c[e]+";"}return escapeBmpSymbol(e)}));if(n){e=e.replace(/>\u20D2/g,">⃒").replace(/<\u20D2/g,"<⃒").replace(/fj/g,"fj")}if(n){e=e.replace(l,(function(e){return"&"+c[e]+";"}))}}else if(n){if(!i){e=e.replace(p,(function(e){return"&"+c[e]+";"}))}e=e.replace(/>\u20D2/g,">⃒").replace(/<\u20D2/g,"<⃒");e=e.replace(l,(function(e){return"&"+c[e]+";"}))}else if(!i){e=e.replace(p,escapeBmpSymbol)}return e.replace(o,(function(e){var r=e.charCodeAt(0);var t=e.charCodeAt(1);var a=(r-55296)*1024+t-56320+65536;return d(a)})).replace(u,escapeBmpSymbol)};encode.options={allowUnsafeSymbols:false,encodeEverything:false,strict:false,useNamedReferences:false,decimal:false};var decode=function(e,r){r=merge(r,decode.options);var t=r.strict;if(t&&f.test(e)){parseError("malformed character reference")}return e.replace(h,(function(e,a,n,i,o,s,u,l,c){var p;var d;var f;var g;var h;var b;if(a){h=a;return m[h]}if(n){h=n;b=i;if(b&&r.isAttributeValue){if(t&&b=="="){parseError("`&` did not start a character reference")}return e}else{if(t){parseError("named character reference was not terminated by a semicolon")}return v[h]+(b||"")}}if(o){f=o;d=s;if(t&&!d){parseError("character reference was not terminated by a semicolon")}p=parseInt(f,10);return codePointToSymbol(p,t)}if(u){g=u;d=l;if(t&&!d){parseError("character reference was not terminated by a semicolon")}p=parseInt(g,16);return codePointToSymbol(p,t)}if(t){parseError("named character reference was not terminated by a semicolon")}return e}))};decode.options={isAttributeValue:false,strict:false};var escape=function(e){return e.replace(p,(function(e){return d[e]}))};var A={version:"1.2.0",encode:encode,decode:decode,escape:escape,unescape:decode};if(typeof define=="function"&&typeof define.amd=="object"&&define.amd){define((function(){return A}))}else if(a&&!a.nodeType){if(n){n.exports=A}else{for(var q in A){has(A,q)&&(a[q]=A[q])}}}else{t.he=A}})(this)},5596:function(e,r){"use strict";Object.defineProperty(r,"__esModule",{value:true});function arr_back(e){return e[e.length-1]}r["default"]=arr_back},5417:function(e,r,t){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:true});r.NodeType=r.TextNode=r.Node=r.valid=r["default"]=r.parse=r.HTMLElement=r.CommentNode=void 0;var n=t(190);Object.defineProperty(r,"CommentNode",{enumerable:true,get:function(){return a(n).default}});var i=t(3248);Object.defineProperty(r,"HTMLElement",{enumerable:true,get:function(){return a(i).default}});var o=t(8653);Object.defineProperty(r,"parse",{enumerable:true,get:function(){return a(o).default}});Object.defineProperty(r,"default",{enumerable:true,get:function(){return a(o).default}});var s=t(3494);Object.defineProperty(r,"valid",{enumerable:true,get:function(){return a(s).default}});var u=t(7402);Object.defineProperty(r,"Node",{enumerable:true,get:function(){return a(u).default}});var l=t(111);Object.defineProperty(r,"TextNode",{enumerable:true,get:function(){return a(l).default}});var c=t(5896);Object.defineProperty(r,"NodeType",{enumerable:true,get:function(){return a(c).default}})},9958:function(e,r,t){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:true});var n=a(t(5896));function isTag(e){return e&&e.nodeType===n.default.ELEMENT_NODE}function getAttributeValue(e,r){return isTag(e)?e.getAttribute(r):undefined}function getName(e){return(e&&e.rawTagName||"").toLowerCase()}function getChildren(e){return e&&e.childNodes}function getParent(e){return e?e.parentNode:null}function getText(e){return e.text}function removeSubsets(e){var r=e.length;var t;var a;var n;while(--r>-1){t=a=e[r];e[r]=null;n=true;while(a){if(e.indexOf(a)>-1){n=false;e.splice(r,1);break}a=getParent(a)}if(n){e[r]=t}}return e}function existsOne(e,r){return r.some((function(r){return isTag(r)?e(r)||existsOne(e,getChildren(r)):false}))}function getSiblings(e){var r=getParent(e);return r&&getChildren(r)}function hasAttrib(e,r){return getAttributeValue(e,r)!==undefined}function findOne(e,r){var t=null;for(var a=0,n=r.length;a0){t=findOne(e,o)}}}return t}function findAll(e,r){var t=[];for(var a=0,n=r.length;a0){r.push(e=[])}t.childNodes.forEach(dfs);if(e.length>0){r.push(e=[])}}else{t.childNodes.forEach(dfs)}}else if(t.nodeType===g.default.TEXT_NODE){if(t.isWhitespace){e.prependWhitespace=true}else{var a=t.trimmedText;if(e.prependWhitespace){a=" ".concat(a);e.prependWhitespace=false}e.push(a)}}}dfs(this);return r.map((function(e){return e.join("").replace(/\s{2,}/g," ")})).join("\n").replace(/\s+$/,"")},enumerable:false,configurable:true});HTMLElement.prototype.toString=function(){var e=this.rawTagName;if(e){var r=this.rawAttrs?" ".concat(this.rawAttrs):"";return this.isVoidElement?"<".concat(e).concat(r,">"):"<".concat(e).concat(r,">").concat(this.innerHTML,"")}return this.innerHTML};Object.defineProperty(HTMLElement.prototype,"innerHTML",{get:function(){return this.childNodes.map((function(e){return e.toString()})).join("")},set:function(e){var r=parse(e);var t=r.childNodes.length?r.childNodes:[new f.default(e,this)];resetParent(t,this);resetParent(this.childNodes,null);this.childNodes=t},enumerable:false,configurable:true});HTMLElement.prototype.set_content=function(e,r){if(r===void 0){r={}}if(e instanceof d.default){e=[e]}else if(typeof e=="string"){var t=parse(e,r);e=t.childNodes.length?t.childNodes:[new f.default(e,this)]}resetParent(this.childNodes,null);resetParent(e,this);this.childNodes=e;return this};HTMLElement.prototype.replaceWith=function(){var e=this;var r=[];for(var t=0;t-1){t.rawText=t.rawText.substr(0,a);this.childNodes.length=r+1}}}return this};Object.defineProperty(HTMLElement.prototype,"structure",{get:function(){var e=[];var r=0;function write(t){e.push(" ".repeat(r)+t)}function dfs(e){var t=e.id?"#".concat(e.id):"";var a=e.classList.length?".".concat(e.classList.value.join(".")):"";write("".concat(e.rawTagName).concat(t).concat(a));r++;e.childNodes.forEach((function(e){if(e.nodeType===g.default.ELEMENT_NODE){dfs(e)}else if(e.nodeType===g.default.TEXT_NODE){if(!e.isWhitespace){write("#text")}}}));r--}dfs(this);return e.join("\n")},enumerable:false,configurable:true});HTMLElement.prototype.removeWhitespace=function(){var e=this;var r=0;this.childNodes.forEach((function(t){if(t.nodeType===g.default.TEXT_NODE){if(t.isWhitespace){return}t.rawText=t.trimmedRawText}else if(t.nodeType===g.default.ELEMENT_NODE){t.removeWhitespace()}e.childNodes[r++]=t}));this.childNodes.length=r;return this};HTMLElement.prototype.querySelectorAll=function(e){return(0,s.selectAll)(e,this,{xmlMode:true,adapter:c.default})};HTMLElement.prototype.querySelector=function(e){return(0,s.selectOne)(e,this,{xmlMode:true,adapter:c.default})};HTMLElement.prototype.getElementsByTagName=function(e){var r=e.toUpperCase();var t=[];var a=[];var n=this;var i=0;while(i!==undefined){var o=void 0;do{o=n.childNodes[i++]}while(i0){a.push(i);n=o;i=0}}}return t};HTMLElement.prototype.getElementById=function(e){var r=[];var t=this;var a=0;while(a!==undefined){var n=void 0;do{n=t.childNodes[a++]}while(a0){r.push(a);t=n;a=0}}}return null};HTMLElement.prototype.closest=function(e){var r=new Map;var t=this;var a=null;function findOne(e,t){var a=null;for(var n=0,i=t.length;n0){var t=e[--r];if(this===t)return e[r-1]||null}return null}},enumerable:false,configurable:true});Object.defineProperty(HTMLElement.prototype,"previousElementSibling",{get:function(){if(this.parentNode){var e=this.parentNode.childNodes;var r=e.length;var t=false;while(r>0){var a=e[--r];if(t){if(a instanceof HTMLElement){return a||null}}else if(this===a){t=true}}return null}},enumerable:false,configurable:true});Object.defineProperty(HTMLElement.prototype,"classNames",{get:function(){return this.classList.toString()},enumerable:false,configurable:true});HTMLElement.prototype.clone=function(){return parse(this.toString()).firstChild};return HTMLElement}(d.default);r["default"]=A;var q=/|<(\/?)([a-zA-Z][-.:0-9_a-zA-Z]*)((?:\s+[^>]*?(?:(?:'[^']*')|(?:"[^"]*"))?)*)\s*(\/?)>/g;var x=/(?:^|\s)(id|class)\s*=\s*((?:'[^']*')|(?:"[^"]*")|\S+)/gi;var D={area:true,AREA:true,base:true,BASE:true,br:true,BR:true,col:true,COL:true,hr:true,HR:true,img:true,IMG:true,input:true,INPUT:true,link:true,LINK:true,meta:true,META:true,source:true,SOURCE:true,embed:true,EMBED:true,param:true,PARAM:true,track:true,TRACK:true,wbr:true,WBR:true};var C={li:{li:true,LI:true},LI:{li:true,LI:true},p:{p:true,div:true,P:true,DIV:true},P:{p:true,div:true,P:true,DIV:true},b:{div:true,DIV:true},B:{div:true,DIV:true},td:{td:true,th:true,TD:true,TH:true},TD:{td:true,th:true,TD:true,TH:true},th:{td:true,th:true,TD:true,TH:true},TH:{td:true,th:true,TD:true,TH:true},h1:{h1:true,H1:true},H1:{h1:true,H1:true},h2:{h2:true,H2:true},H2:{h2:true,H2:true},h3:{h3:true,H3:true},H3:{h3:true,H3:true},h4:{h4:true,H4:true},H4:{h4:true,H4:true},h5:{h5:true,H5:true},H5:{h5:true,H5:true},h6:{h6:true,H6:true},H6:{h6:true,H6:true}};var N={li:{ul:true,ol:true,UL:true,OL:true},LI:{ul:true,ol:true,UL:true,OL:true},a:{div:true,DIV:true},A:{div:true,DIV:true},b:{div:true,DIV:true},B:{div:true,DIV:true},i:{div:true,DIV:true},I:{div:true,DIV:true},p:{div:true,DIV:true},P:{div:true,DIV:true},td:{tr:true,table:true,TR:true,TABLE:true},TD:{tr:true,table:true,TR:true,TABLE:true},th:{tr:true,table:true,TR:true,TABLE:true},TH:{tr:true,table:true,TR:true,TABLE:true}};var S="documentfragmentcontainer";function base_parse(e,r){if(r===void 0){r={lowerCaseTagName:false,comment:false}}var t=r.blockTextElements||{script:true,noscript:true,style:true,pre:true};var a=Object.keys(t);var n=a.map((function(e){return new RegExp("^".concat(e,"$"),"i")}));var i=a.filter((function(e){return t[e]})).map((function(e){return new RegExp("^".concat(e,"$"),"i")}));function element_should_be_ignore(e){return i.some((function(r){return r.test(e)}))}function is_block_text_element(e){return n.some((function(r){return r.test(e)}))}var createRange=function(e,r){return[e-v,r-v]};var o=new A(null,{},"",null,[0,e.length]);var s=o;var u=[o];var c=-1;var d=undefined;var g;e="<".concat(S,">").concat(e,"");var h=r.lowerCaseTagName;var m=e.length-(S.length+2);var v=S.length+2;while(g=q.exec(e)){var b=g[0],y=g[1],w=g[2],T=g[3],E=g[4];var L=b.length;var k=q.lastIndex-L;var O=q.lastIndex;if(c>-1){if(c+L");var I=h?e.toLocaleLowerCase().indexOf(U,q.lastIndex):e.indexOf(U,q.lastIndex);var G=I===-1?m:I;if(element_should_be_ignore(w)){var _=e.substring(F,G);if(_.length>0&&/\S/.test(_)){s.appendChild(new f.default(_,s,createRange(F,G)))}}if(I===-1){c=q.lastIndex=e.length+1}else{c=q.lastIndex=I+U.length;y="/"}}}if(y||E||D[w]){while(true){if(w==="a"||w==="A")d=undefined;if(s.rawTagName===w){s.range[1]=createRange(-1,Math.max(c,O))[1];u.pop();s=(0,l.default)(u);break}else{var H=s.tagName;if(N[H]){if(N[H][w]){u.pop();s=(0,l.default)(u);continue}}break}}}}return u}r.base_parse=base_parse;function parse(e,r){if(r===void 0){r={lowerCaseTagName:false,comment:false}}var t=base_parse(e,r);var a=t[0];var _loop_1=function(){var e=t.pop();var a=(0,l.default)(t);if(e.parentNode&&e.parentNode.parentNode){if(e.parentNode===a&&e.tagName===a.tagName){if(r.parseNoneClosedTags!==true){a.removeChild(e);e.childNodes.forEach((function(e){a.parentNode.appendChild(e)}));t.pop()}}else{if(r.parseNoneClosedTags!==true){a.removeChild(e);e.childNodes.forEach((function(e){a.appendChild(e)}))}}}else{}};while(t.length>1){_loop_1()}return a}r.parse=parse;function resetParent(e,r){return e.map((function(e){e.parentNode=r;return e}))}},7402:function(e,r,t){"use strict";Object.defineProperty(r,"__esModule",{value:true});var a=t(5902);var n=function(){function Node(e,r){if(e===void 0){e=null}this.parentNode=e;this.childNodes=[];Object.defineProperty(this,"range",{enumerable:false,writable:true,configurable:true,value:r!==null&&r!==void 0?r:[-1,-1]})}Node.prototype.remove=function(){var e=this;if(this.parentNode){var r=this.parentNode.childNodes;this.parentNode.childNodes=r.filter((function(r){return e!==r}));this.parentNode=null}return this};Object.defineProperty(Node.prototype,"innerText",{get:function(){return this.rawText},enumerable:false,configurable:true});Object.defineProperty(Node.prototype,"textContent",{get:function(){return(0,a.decode)(this.rawText)},set:function(e){this.rawText=(0,a.encode)(e)},enumerable:false,configurable:true});return Node}();r["default"]=n},111:function(e,r,t){"use strict";var a=this&&this.__extends||function(){var extendStatics=function(e,r){extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var t in r)if(Object.prototype.hasOwnProperty.call(r,t))e[t]=r[t]};return extendStatics(e,r)};return function(e,r){if(typeof r!=="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");extendStatics(e,r);function __(){this.constructor=e}e.prototype=r===null?Object.create(r):(__.prototype=r.prototype,new __)}}();var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:true});var i=t(5902);var o=n(t(7402));var s=n(t(5896));var u=function(e){a(TextNode,e);function TextNode(r,t,a){var n=e.call(this,t,a)||this;n.nodeType=s.default.TEXT_NODE;n._rawText=r;return n}TextNode.prototype.clone=function(){return new TextNode(this._rawText,null)};Object.defineProperty(TextNode.prototype,"rawText",{get:function(){return this._rawText},set:function(e){this._rawText=e;this._trimmedRawText=void 0;this._trimmedText=void 0},enumerable:false,configurable:true});Object.defineProperty(TextNode.prototype,"trimmedRawText",{get:function(){if(this._trimmedRawText!==undefined)return this._trimmedRawText;this._trimmedRawText=trimText(this.rawText);return this._trimmedRawText},enumerable:false,configurable:true});Object.defineProperty(TextNode.prototype,"trimmedText",{get:function(){if(this._trimmedText!==undefined)return this._trimmedText;this._trimmedText=trimText(this.text);return this._trimmedText},enumerable:false,configurable:true});Object.defineProperty(TextNode.prototype,"text",{get:function(){return(0,i.decode)(this.rawText)},enumerable:false,configurable:true});Object.defineProperty(TextNode.prototype,"isWhitespace",{get:function(){return/^(\s| )*$/.test(this.rawText)},enumerable:false,configurable:true});TextNode.prototype.toString=function(){return this.rawText};return TextNode}(o.default);r["default"]=u;function trimText(e){var r=0;var t;var a;while(r>=0&&r0&&/[^\S\r\n]/.test(e[t-1]);var i=a=t};var a=Math.abs(r);var i=(t%a+a)%a;return r>1?function(e){return e>=t&&e%a===i}:function(e){return e<=t&&e%a===i}}r.compile=compile;function generate(e){var r=e[0];var t=e[1]-1;var a=0;if(r<0){var n=-r;var i=(t%n+n)%n;return function(){var e=i+n*a++;return e>t?null:e}}if(r===0)return t<0?function(){return null}:function(){return a++===0?t:null};if(t<0){t+=r*Math.ceil(-t/r)}return function(){return r*a+++t}}r.generate=generate},7118:function(e,r,t){"use strict";Object.defineProperty(r,"__esModule",{value:true});r.sequence=r.generate=r.compile=r.parse=void 0;var a=t(2421);Object.defineProperty(r,"parse",{enumerable:true,get:function(){return a.parse}});var n=t(3947);Object.defineProperty(r,"compile",{enumerable:true,get:function(){return n.compile}});Object.defineProperty(r,"generate",{enumerable:true,get:function(){return n.generate}});function nthCheck(e){return(0,n.compile)((0,a.parse)(e))}r["default"]=nthCheck;function sequence(e){return(0,n.generate)((0,a.parse)(e))}r.sequence=sequence},2421:function(e,r){"use strict";Object.defineProperty(r,"__esModule",{value:true});r.parse=void 0;var t=new Set([9,10,12,13,32]);var a="0".charCodeAt(0);var n="9".charCodeAt(0);function parse(e){e=e.trim().toLowerCase();if(e==="even"){return[2,0]}else if(e==="odd"){return[2,1]}var r=0;var i=0;var o=readSign();var s=readNumber();if(r=a&&e.charCodeAt(r)<=n){i=i*10+(e.charCodeAt(r)-a);r++}return r===t?null:i}function skipWhitespace(){while(r","GT":">","Gt":"โ‰ซ","gtdot":"โ‹—","gtlPar":"โฆ•","gtquest":"โฉผ","gtrapprox":"โช†","gtrarr":"โฅธ","gtrdot":"โ‹—","gtreqless":"โ‹›","gtreqqless":"โชŒ","gtrless":"โ‰ท","gtrsim":"โ‰ณ","gvertneqq":"โ‰ฉ๏ธ€","gvnE":"โ‰ฉ๏ธ€","Hacek":"ห‡","hairsp":"โ€Š","half":"ยฝ","hamilt":"โ„‹","HARDcy":"ะช","hardcy":"ัŠ","harrcir":"โฅˆ","harr":"โ†”","hArr":"โ‡”","harrw":"โ†ญ","Hat":"^","hbar":"โ„","Hcirc":"ฤค","hcirc":"ฤฅ","hearts":"โ™ฅ","heartsuit":"โ™ฅ","hellip":"โ€ฆ","hercon":"โŠน","hfr":"๐”ฅ","Hfr":"โ„Œ","HilbertSpace":"โ„‹","hksearow":"โคฅ","hkswarow":"โคฆ","hoarr":"โ‡ฟ","homtht":"โˆป","hookleftarrow":"โ†ฉ","hookrightarrow":"โ†ช","hopf":"๐•™","Hopf":"โ„","horbar":"โ€•","HorizontalLine":"โ”€","hscr":"๐’ฝ","Hscr":"โ„‹","hslash":"โ„","Hstrok":"ฤฆ","hstrok":"ฤง","HumpDownHump":"โ‰Ž","HumpEqual":"โ‰","hybull":"โƒ","hyphen":"โ€","Iacute":"ร","iacute":"รญ","ic":"โฃ","Icirc":"รŽ","icirc":"รฎ","Icy":"ะ˜","icy":"ะธ","Idot":"ฤฐ","IEcy":"ะ•","iecy":"ะต","iexcl":"ยก","iff":"โ‡”","ifr":"๐”ฆ","Ifr":"โ„‘","Igrave":"รŒ","igrave":"รฌ","ii":"โ…ˆ","iiiint":"โจŒ","iiint":"โˆญ","iinfin":"โงœ","iiota":"โ„ฉ","IJlig":"ฤฒ","ijlig":"ฤณ","Imacr":"ฤช","imacr":"ฤซ","image":"โ„‘","ImaginaryI":"โ…ˆ","imagline":"โ„","imagpart":"โ„‘","imath":"ฤฑ","Im":"โ„‘","imof":"โŠท","imped":"ฦต","Implies":"โ‡’","incare":"โ„…","in":"โˆˆ","infin":"โˆž","infintie":"โง","inodot":"ฤฑ","intcal":"โŠบ","int":"โˆซ","Int":"โˆฌ","integers":"โ„ค","Integral":"โˆซ","intercal":"โŠบ","Intersection":"โ‹‚","intlarhk":"โจ—","intprod":"โจผ","InvisibleComma":"โฃ","InvisibleTimes":"โข","IOcy":"ะ","iocy":"ั‘","Iogon":"ฤฎ","iogon":"ฤฏ","Iopf":"๐•€","iopf":"๐•š","Iota":"ฮ™","iota":"ฮน","iprod":"โจผ","iquest":"ยฟ","iscr":"๐’พ","Iscr":"โ„","isin":"โˆˆ","isindot":"โ‹ต","isinE":"โ‹น","isins":"โ‹ด","isinsv":"โ‹ณ","isinv":"โˆˆ","it":"โข","Itilde":"ฤจ","itilde":"ฤฉ","Iukcy":"ะ†","iukcy":"ั–","Iuml":"ร","iuml":"รฏ","Jcirc":"ฤด","jcirc":"ฤต","Jcy":"ะ™","jcy":"ะน","Jfr":"๐”","jfr":"๐”ง","jmath":"ศท","Jopf":"๐•","jopf":"๐•›","Jscr":"๐’ฅ","jscr":"๐’ฟ","Jsercy":"ะˆ","jsercy":"ั˜","Jukcy":"ะ„","jukcy":"ั”","Kappa":"ฮš","kappa":"ฮบ","kappav":"ฯฐ","Kcedil":"ฤถ","kcedil":"ฤท","Kcy":"ะš","kcy":"ะบ","Kfr":"๐”Ž","kfr":"๐”จ","kgreen":"ฤธ","KHcy":"ะฅ","khcy":"ั…","KJcy":"ะŒ","kjcy":"ัœ","Kopf":"๐•‚","kopf":"๐•œ","Kscr":"๐’ฆ","kscr":"๐“€","lAarr":"โ‡š","Lacute":"ฤน","lacute":"ฤบ","laemptyv":"โฆด","lagran":"โ„’","Lambda":"ฮ›","lambda":"ฮป","lang":"โŸจ","Lang":"โŸช","langd":"โฆ‘","langle":"โŸจ","lap":"โช…","Laplacetrf":"โ„’","laquo":"ยซ","larrb":"โ‡ค","larrbfs":"โคŸ","larr":"โ†","Larr":"โ†ž","lArr":"โ‡","larrfs":"โค","larrhk":"โ†ฉ","larrlp":"โ†ซ","larrpl":"โคน","larrsim":"โฅณ","larrtl":"โ†ข","latail":"โค™","lAtail":"โค›","lat":"โชซ","late":"โชญ","lates":"โชญ๏ธ€","lbarr":"โคŒ","lBarr":"โคŽ","lbbrk":"โฒ","lbrace":"{","lbrack":"[","lbrke":"โฆ‹","lbrksld":"โฆ","lbrkslu":"โฆ","Lcaron":"ฤฝ","lcaron":"ฤพ","Lcedil":"ฤป","lcedil":"ฤผ","lceil":"โŒˆ","lcub":"{","Lcy":"ะ›","lcy":"ะป","ldca":"โคถ","ldquo":"โ€œ","ldquor":"โ€ž","ldrdhar":"โฅง","ldrushar":"โฅ‹","ldsh":"โ†ฒ","le":"โ‰ค","lE":"โ‰ฆ","LeftAngleBracket":"โŸจ","LeftArrowBar":"โ‡ค","leftarrow":"โ†","LeftArrow":"โ†","Leftarrow":"โ‡","LeftArrowRightArrow":"โ‡†","leftarrowtail":"โ†ข","LeftCeiling":"โŒˆ","LeftDoubleBracket":"โŸฆ","LeftDownTeeVector":"โฅก","LeftDownVectorBar":"โฅ™","LeftDownVector":"โ‡ƒ","LeftFloor":"โŒŠ","leftharpoondown":"โ†ฝ","leftharpoonup":"โ†ผ","leftleftarrows":"โ‡‡","leftrightarrow":"โ†”","LeftRightArrow":"โ†”","Leftrightarrow":"โ‡”","leftrightarrows":"โ‡†","leftrightharpoons":"โ‡‹","leftrightsquigarrow":"โ†ญ","LeftRightVector":"โฅŽ","LeftTeeArrow":"โ†ค","LeftTee":"โŠฃ","LeftTeeVector":"โฅš","leftthreetimes":"โ‹‹","LeftTriangleBar":"โง","LeftTriangle":"โŠฒ","LeftTriangleEqual":"โŠด","LeftUpDownVector":"โฅ‘","LeftUpTeeVector":"โฅ ","LeftUpVectorBar":"โฅ˜","LeftUpVector":"โ†ฟ","LeftVectorBar":"โฅ’","LeftVector":"โ†ผ","lEg":"โช‹","leg":"โ‹š","leq":"โ‰ค","leqq":"โ‰ฆ","leqslant":"โฉฝ","lescc":"โชจ","les":"โฉฝ","lesdot":"โฉฟ","lesdoto":"โช","lesdotor":"โชƒ","lesg":"โ‹š๏ธ€","lesges":"โช“","lessapprox":"โช…","lessdot":"โ‹–","lesseqgtr":"โ‹š","lesseqqgtr":"โช‹","LessEqualGreater":"โ‹š","LessFullEqual":"โ‰ฆ","LessGreater":"โ‰ถ","lessgtr":"โ‰ถ","LessLess":"โชก","lesssim":"โ‰ฒ","LessSlantEqual":"โฉฝ","LessTilde":"โ‰ฒ","lfisht":"โฅผ","lfloor":"โŒŠ","Lfr":"๐”","lfr":"๐”ฉ","lg":"โ‰ถ","lgE":"โช‘","lHar":"โฅข","lhard":"โ†ฝ","lharu":"โ†ผ","lharul":"โฅช","lhblk":"โ–„","LJcy":"ะ‰","ljcy":"ั™","llarr":"โ‡‡","ll":"โ‰ช","Ll":"โ‹˜","llcorner":"โŒž","Lleftarrow":"โ‡š","llhard":"โฅซ","lltri":"โ—บ","Lmidot":"ฤฟ","lmidot":"ล€","lmoustache":"โŽฐ","lmoust":"โŽฐ","lnap":"โช‰","lnapprox":"โช‰","lne":"โช‡","lnE":"โ‰จ","lneq":"โช‡","lneqq":"โ‰จ","lnsim":"โ‹ฆ","loang":"โŸฌ","loarr":"โ‡ฝ","lobrk":"โŸฆ","longleftarrow":"โŸต","LongLeftArrow":"โŸต","Longleftarrow":"โŸธ","longleftrightarrow":"โŸท","LongLeftRightArrow":"โŸท","Longleftrightarrow":"โŸบ","longmapsto":"โŸผ","longrightarrow":"โŸถ","LongRightArrow":"โŸถ","Longrightarrow":"โŸน","looparrowleft":"โ†ซ","looparrowright":"โ†ฌ","lopar":"โฆ…","Lopf":"๐•ƒ","lopf":"๐•","loplus":"โจญ","lotimes":"โจด","lowast":"โˆ—","lowbar":"_","LowerLeftArrow":"โ†™","LowerRightArrow":"โ†˜","loz":"โ—Š","lozenge":"โ—Š","lozf":"โงซ","lpar":"(","lparlt":"โฆ“","lrarr":"โ‡†","lrcorner":"โŒŸ","lrhar":"โ‡‹","lrhard":"โฅญ","lrm":"โ€Ž","lrtri":"โŠฟ","lsaquo":"โ€น","lscr":"๐“","Lscr":"โ„’","lsh":"โ†ฐ","Lsh":"โ†ฐ","lsim":"โ‰ฒ","lsime":"โช","lsimg":"โช","lsqb":"[","lsquo":"โ€˜","lsquor":"โ€š","Lstrok":"ล","lstrok":"ล‚","ltcc":"โชฆ","ltcir":"โฉน","lt":"<","LT":"<","Lt":"โ‰ช","ltdot":"โ‹–","lthree":"โ‹‹","ltimes":"โ‹‰","ltlarr":"โฅถ","ltquest":"โฉป","ltri":"โ—ƒ","ltrie":"โŠด","ltrif":"โ—‚","ltrPar":"โฆ–","lurdshar":"โฅŠ","luruhar":"โฅฆ","lvertneqq":"โ‰จ๏ธ€","lvnE":"โ‰จ๏ธ€","macr":"ยฏ","male":"โ™‚","malt":"โœ ","maltese":"โœ ","Map":"โค…","map":"โ†ฆ","mapsto":"โ†ฆ","mapstodown":"โ†ง","mapstoleft":"โ†ค","mapstoup":"โ†ฅ","marker":"โ–ฎ","mcomma":"โจฉ","Mcy":"ะœ","mcy":"ะผ","mdash":"โ€”","mDDot":"โˆบ","measuredangle":"โˆก","MediumSpace":"โŸ","Mellintrf":"โ„ณ","Mfr":"๐”","mfr":"๐”ช","mho":"โ„ง","micro":"ยต","midast":"*","midcir":"โซฐ","mid":"โˆฃ","middot":"ยท","minusb":"โŠŸ","minus":"โˆ’","minusd":"โˆธ","minusdu":"โจช","MinusPlus":"โˆ“","mlcp":"โซ›","mldr":"โ€ฆ","mnplus":"โˆ“","models":"โŠง","Mopf":"๐•„","mopf":"๐•ž","mp":"โˆ“","mscr":"๐“‚","Mscr":"โ„ณ","mstpos":"โˆพ","Mu":"ฮœ","mu":"ฮผ","multimap":"โŠธ","mumap":"โŠธ","nabla":"โˆ‡","Nacute":"ลƒ","nacute":"ล„","nang":"โˆ โƒ’","nap":"โ‰‰","napE":"โฉฐฬธ","napid":"โ‰‹ฬธ","napos":"ล‰","napprox":"โ‰‰","natural":"โ™ฎ","naturals":"โ„•","natur":"โ™ฎ","nbsp":"ย ","nbump":"โ‰Žฬธ","nbumpe":"โ‰ฬธ","ncap":"โฉƒ","Ncaron":"ล‡","ncaron":"ลˆ","Ncedil":"ล…","ncedil":"ล†","ncong":"โ‰‡","ncongdot":"โฉญฬธ","ncup":"โฉ‚","Ncy":"ะ","ncy":"ะฝ","ndash":"โ€“","nearhk":"โคค","nearr":"โ†—","neArr":"โ‡—","nearrow":"โ†—","ne":"โ‰ ","nedot":"โ‰ฬธ","NegativeMediumSpace":"โ€‹","NegativeThickSpace":"โ€‹","NegativeThinSpace":"โ€‹","NegativeVeryThinSpace":"โ€‹","nequiv":"โ‰ข","nesear":"โคจ","nesim":"โ‰‚ฬธ","NestedGreaterGreater":"โ‰ซ","NestedLessLess":"โ‰ช","NewLine":"\\n","nexist":"โˆ„","nexists":"โˆ„","Nfr":"๐”‘","nfr":"๐”ซ","ngE":"โ‰งฬธ","nge":"โ‰ฑ","ngeq":"โ‰ฑ","ngeqq":"โ‰งฬธ","ngeqslant":"โฉพฬธ","nges":"โฉพฬธ","nGg":"โ‹™ฬธ","ngsim":"โ‰ต","nGt":"โ‰ซโƒ’","ngt":"โ‰ฏ","ngtr":"โ‰ฏ","nGtv":"โ‰ซฬธ","nharr":"โ†ฎ","nhArr":"โ‡Ž","nhpar":"โซฒ","ni":"โˆ‹","nis":"โ‹ผ","nisd":"โ‹บ","niv":"โˆ‹","NJcy":"ะŠ","njcy":"ัš","nlarr":"โ†š","nlArr":"โ‡","nldr":"โ€ฅ","nlE":"โ‰ฆฬธ","nle":"โ‰ฐ","nleftarrow":"โ†š","nLeftarrow":"โ‡","nleftrightarrow":"โ†ฎ","nLeftrightarrow":"โ‡Ž","nleq":"โ‰ฐ","nleqq":"โ‰ฆฬธ","nleqslant":"โฉฝฬธ","nles":"โฉฝฬธ","nless":"โ‰ฎ","nLl":"โ‹˜ฬธ","nlsim":"โ‰ด","nLt":"โ‰ชโƒ’","nlt":"โ‰ฎ","nltri":"โ‹ช","nltrie":"โ‹ฌ","nLtv":"โ‰ชฬธ","nmid":"โˆค","NoBreak":"โ ","NonBreakingSpace":"ย ","nopf":"๐•Ÿ","Nopf":"โ„•","Not":"โซฌ","not":"ยฌ","NotCongruent":"โ‰ข","NotCupCap":"โ‰ญ","NotDoubleVerticalBar":"โˆฆ","NotElement":"โˆ‰","NotEqual":"โ‰ ","NotEqualTilde":"โ‰‚ฬธ","NotExists":"โˆ„","NotGreater":"โ‰ฏ","NotGreaterEqual":"โ‰ฑ","NotGreaterFullEqual":"โ‰งฬธ","NotGreaterGreater":"โ‰ซฬธ","NotGreaterLess":"โ‰น","NotGreaterSlantEqual":"โฉพฬธ","NotGreaterTilde":"โ‰ต","NotHumpDownHump":"โ‰Žฬธ","NotHumpEqual":"โ‰ฬธ","notin":"โˆ‰","notindot":"โ‹ตฬธ","notinE":"โ‹นฬธ","notinva":"โˆ‰","notinvb":"โ‹ท","notinvc":"โ‹ถ","NotLeftTriangleBar":"โงฬธ","NotLeftTriangle":"โ‹ช","NotLeftTriangleEqual":"โ‹ฌ","NotLess":"โ‰ฎ","NotLessEqual":"โ‰ฐ","NotLessGreater":"โ‰ธ","NotLessLess":"โ‰ชฬธ","NotLessSlantEqual":"โฉฝฬธ","NotLessTilde":"โ‰ด","NotNestedGreaterGreater":"โชขฬธ","NotNestedLessLess":"โชกฬธ","notni":"โˆŒ","notniva":"โˆŒ","notnivb":"โ‹พ","notnivc":"โ‹ฝ","NotPrecedes":"โŠ€","NotPrecedesEqual":"โชฏฬธ","NotPrecedesSlantEqual":"โ‹ ","NotReverseElement":"โˆŒ","NotRightTriangleBar":"โงฬธ","NotRightTriangle":"โ‹ซ","NotRightTriangleEqual":"โ‹ญ","NotSquareSubset":"โŠฬธ","NotSquareSubsetEqual":"โ‹ข","NotSquareSuperset":"โŠฬธ","NotSquareSupersetEqual":"โ‹ฃ","NotSubset":"โŠ‚โƒ’","NotSubsetEqual":"โŠˆ","NotSucceeds":"โŠ","NotSucceedsEqual":"โชฐฬธ","NotSucceedsSlantEqual":"โ‹ก","NotSucceedsTilde":"โ‰ฟฬธ","NotSuperset":"โŠƒโƒ’","NotSupersetEqual":"โŠ‰","NotTilde":"โ‰","NotTildeEqual":"โ‰„","NotTildeFullEqual":"โ‰‡","NotTildeTilde":"โ‰‰","NotVerticalBar":"โˆค","nparallel":"โˆฆ","npar":"โˆฆ","nparsl":"โซฝโƒฅ","npart":"โˆ‚ฬธ","npolint":"โจ”","npr":"โŠ€","nprcue":"โ‹ ","nprec":"โŠ€","npreceq":"โชฏฬธ","npre":"โชฏฬธ","nrarrc":"โคณฬธ","nrarr":"โ†›","nrArr":"โ‡","nrarrw":"โ†ฬธ","nrightarrow":"โ†›","nRightarrow":"โ‡","nrtri":"โ‹ซ","nrtrie":"โ‹ญ","nsc":"โŠ","nsccue":"โ‹ก","nsce":"โชฐฬธ","Nscr":"๐’ฉ","nscr":"๐“ƒ","nshortmid":"โˆค","nshortparallel":"โˆฆ","nsim":"โ‰","nsime":"โ‰„","nsimeq":"โ‰„","nsmid":"โˆค","nspar":"โˆฆ","nsqsube":"โ‹ข","nsqsupe":"โ‹ฃ","nsub":"โŠ„","nsubE":"โซ…ฬธ","nsube":"โŠˆ","nsubset":"โŠ‚โƒ’","nsubseteq":"โŠˆ","nsubseteqq":"โซ…ฬธ","nsucc":"โŠ","nsucceq":"โชฐฬธ","nsup":"โŠ…","nsupE":"โซ†ฬธ","nsupe":"โŠ‰","nsupset":"โŠƒโƒ’","nsupseteq":"โŠ‰","nsupseteqq":"โซ†ฬธ","ntgl":"โ‰น","Ntilde":"ร‘","ntilde":"รฑ","ntlg":"โ‰ธ","ntriangleleft":"โ‹ช","ntrianglelefteq":"โ‹ฌ","ntriangleright":"โ‹ซ","ntrianglerighteq":"โ‹ญ","Nu":"ฮ","nu":"ฮฝ","num":"#","numero":"โ„–","numsp":"โ€‡","nvap":"โ‰โƒ’","nvdash":"โŠฌ","nvDash":"โŠญ","nVdash":"โŠฎ","nVDash":"โŠฏ","nvge":"โ‰ฅโƒ’","nvgt":">โƒ’","nvHarr":"โค„","nvinfin":"โงž","nvlArr":"โค‚","nvle":"โ‰คโƒ’","nvlt":"<โƒ’","nvltrie":"โŠดโƒ’","nvrArr":"โคƒ","nvrtrie":"โŠตโƒ’","nvsim":"โˆผโƒ’","nwarhk":"โคฃ","nwarr":"โ†–","nwArr":"โ‡–","nwarrow":"โ†–","nwnear":"โคง","Oacute":"ร“","oacute":"รณ","oast":"โŠ›","Ocirc":"ร”","ocirc":"รด","ocir":"โŠš","Ocy":"ะž","ocy":"ะพ","odash":"โŠ","Odblac":"ล","odblac":"ล‘","odiv":"โจธ","odot":"โŠ™","odsold":"โฆผ","OElig":"ล’","oelig":"ล“","ofcir":"โฆฟ","Ofr":"๐”’","ofr":"๐”ฌ","ogon":"ห›","Ograve":"ร’","ograve":"รฒ","ogt":"โง","ohbar":"โฆต","ohm":"ฮฉ","oint":"โˆฎ","olarr":"โ†บ","olcir":"โฆพ","olcross":"โฆป","oline":"โ€พ","olt":"โง€","Omacr":"ลŒ","omacr":"ล","Omega":"ฮฉ","omega":"ฯ‰","Omicron":"ฮŸ","omicron":"ฮฟ","omid":"โฆถ","ominus":"โŠ–","Oopf":"๐•†","oopf":"๐• ","opar":"โฆท","OpenCurlyDoubleQuote":"โ€œ","OpenCurlyQuote":"โ€˜","operp":"โฆน","oplus":"โŠ•","orarr":"โ†ป","Or":"โฉ”","or":"โˆจ","ord":"โฉ","order":"โ„ด","orderof":"โ„ด","ordf":"ยช","ordm":"ยบ","origof":"โŠถ","oror":"โฉ–","orslope":"โฉ—","orv":"โฉ›","oS":"โ“ˆ","Oscr":"๐’ช","oscr":"โ„ด","Oslash":"ร˜","oslash":"รธ","osol":"โŠ˜","Otilde":"ร•","otilde":"รต","otimesas":"โจถ","Otimes":"โจท","otimes":"โŠ—","Ouml":"ร–","ouml":"รถ","ovbar":"โŒฝ","OverBar":"โ€พ","OverBrace":"โž","OverBracket":"โŽด","OverParenthesis":"โœ","para":"ยถ","parallel":"โˆฅ","par":"โˆฅ","parsim":"โซณ","parsl":"โซฝ","part":"โˆ‚","PartialD":"โˆ‚","Pcy":"ะŸ","pcy":"ะฟ","percnt":"%","period":".","permil":"โ€ฐ","perp":"โŠฅ","pertenk":"โ€ฑ","Pfr":"๐”“","pfr":"๐”ญ","Phi":"ฮฆ","phi":"ฯ†","phiv":"ฯ•","phmmat":"โ„ณ","phone":"โ˜Ž","Pi":"ฮ ","pi":"ฯ€","pitchfork":"โ‹”","piv":"ฯ–","planck":"โ„","planckh":"โ„Ž","plankv":"โ„","plusacir":"โจฃ","plusb":"โŠž","pluscir":"โจข","plus":"+","plusdo":"โˆ”","plusdu":"โจฅ","pluse":"โฉฒ","PlusMinus":"ยฑ","plusmn":"ยฑ","plussim":"โจฆ","plustwo":"โจง","pm":"ยฑ","Poincareplane":"โ„Œ","pointint":"โจ•","popf":"๐•ก","Popf":"โ„™","pound":"ยฃ","prap":"โชท","Pr":"โชป","pr":"โ‰บ","prcue":"โ‰ผ","precapprox":"โชท","prec":"โ‰บ","preccurlyeq":"โ‰ผ","Precedes":"โ‰บ","PrecedesEqual":"โชฏ","PrecedesSlantEqual":"โ‰ผ","PrecedesTilde":"โ‰พ","preceq":"โชฏ","precnapprox":"โชน","precneqq":"โชต","precnsim":"โ‹จ","pre":"โชฏ","prE":"โชณ","precsim":"โ‰พ","prime":"โ€ฒ","Prime":"โ€ณ","primes":"โ„™","prnap":"โชน","prnE":"โชต","prnsim":"โ‹จ","prod":"โˆ","Product":"โˆ","profalar":"โŒฎ","profline":"โŒ’","profsurf":"โŒ“","prop":"โˆ","Proportional":"โˆ","Proportion":"โˆท","propto":"โˆ","prsim":"โ‰พ","prurel":"โŠฐ","Pscr":"๐’ซ","pscr":"๐“…","Psi":"ฮจ","psi":"ฯˆ","puncsp":"โ€ˆ","Qfr":"๐””","qfr":"๐”ฎ","qint":"โจŒ","qopf":"๐•ข","Qopf":"โ„š","qprime":"โ—","Qscr":"๐’ฌ","qscr":"๐“†","quaternions":"โ„","quatint":"โจ–","quest":"?","questeq":"โ‰Ÿ","quot":"\\"","QUOT":"\\"","rAarr":"โ‡›","race":"โˆฝฬฑ","Racute":"ล”","racute":"ล•","radic":"โˆš","raemptyv":"โฆณ","rang":"โŸฉ","Rang":"โŸซ","rangd":"โฆ’","range":"โฆฅ","rangle":"โŸฉ","raquo":"ยป","rarrap":"โฅต","rarrb":"โ‡ฅ","rarrbfs":"โค ","rarrc":"โคณ","rarr":"โ†’","Rarr":"โ† ","rArr":"โ‡’","rarrfs":"โคž","rarrhk":"โ†ช","rarrlp":"โ†ฌ","rarrpl":"โฅ…","rarrsim":"โฅด","Rarrtl":"โค–","rarrtl":"โ†ฃ","rarrw":"โ†","ratail":"โคš","rAtail":"โคœ","ratio":"โˆถ","rationals":"โ„š","rbarr":"โค","rBarr":"โค","RBarr":"โค","rbbrk":"โณ","rbrace":"}","rbrack":"]","rbrke":"โฆŒ","rbrksld":"โฆŽ","rbrkslu":"โฆ","Rcaron":"ล˜","rcaron":"ล™","Rcedil":"ล–","rcedil":"ล—","rceil":"โŒ‰","rcub":"}","Rcy":"ะ ","rcy":"ั€","rdca":"โคท","rdldhar":"โฅฉ","rdquo":"โ€","rdquor":"โ€","rdsh":"โ†ณ","real":"โ„œ","realine":"โ„›","realpart":"โ„œ","reals":"โ„","Re":"โ„œ","rect":"โ–ญ","reg":"ยฎ","REG":"ยฎ","ReverseElement":"โˆ‹","ReverseEquilibrium":"โ‡‹","ReverseUpEquilibrium":"โฅฏ","rfisht":"โฅฝ","rfloor":"โŒ‹","rfr":"๐”ฏ","Rfr":"โ„œ","rHar":"โฅค","rhard":"โ‡","rharu":"โ‡€","rharul":"โฅฌ","Rho":"ฮก","rho":"ฯ","rhov":"ฯฑ","RightAngleBracket":"โŸฉ","RightArrowBar":"โ‡ฅ","rightarrow":"โ†’","RightArrow":"โ†’","Rightarrow":"โ‡’","RightArrowLeftArrow":"โ‡„","rightarrowtail":"โ†ฃ","RightCeiling":"โŒ‰","RightDoubleBracket":"โŸง","RightDownTeeVector":"โฅ","RightDownVectorBar":"โฅ•","RightDownVector":"โ‡‚","RightFloor":"โŒ‹","rightharpoondown":"โ‡","rightharpoonup":"โ‡€","rightleftarrows":"โ‡„","rightleftharpoons":"โ‡Œ","rightrightarrows":"โ‡‰","rightsquigarrow":"โ†","RightTeeArrow":"โ†ฆ","RightTee":"โŠข","RightTeeVector":"โฅ›","rightthreetimes":"โ‹Œ","RightTriangleBar":"โง","RightTriangle":"โŠณ","RightTriangleEqual":"โŠต","RightUpDownVector":"โฅ","RightUpTeeVector":"โฅœ","RightUpVectorBar":"โฅ”","RightUpVector":"โ†พ","RightVectorBar":"โฅ“","RightVector":"โ‡€","ring":"หš","risingdotseq":"โ‰“","rlarr":"โ‡„","rlhar":"โ‡Œ","rlm":"โ€","rmoustache":"โŽฑ","rmoust":"โŽฑ","rnmid":"โซฎ","roang":"โŸญ","roarr":"โ‡พ","robrk":"โŸง","ropar":"โฆ†","ropf":"๐•ฃ","Ropf":"โ„","roplus":"โจฎ","rotimes":"โจต","RoundImplies":"โฅฐ","rpar":")","rpargt":"โฆ”","rppolint":"โจ’","rrarr":"โ‡‰","Rrightarrow":"โ‡›","rsaquo":"โ€บ","rscr":"๐“‡","Rscr":"โ„›","rsh":"โ†ฑ","Rsh":"โ†ฑ","rsqb":"]","rsquo":"โ€™","rsquor":"โ€™","rthree":"โ‹Œ","rtimes":"โ‹Š","rtri":"โ–น","rtrie":"โŠต","rtrif":"โ–ธ","rtriltri":"โงŽ","RuleDelayed":"โงด","ruluhar":"โฅจ","rx":"โ„ž","Sacute":"ลš","sacute":"ล›","sbquo":"โ€š","scap":"โชธ","Scaron":"ล ","scaron":"ลก","Sc":"โชผ","sc":"โ‰ป","sccue":"โ‰ฝ","sce":"โชฐ","scE":"โชด","Scedil":"ลž","scedil":"ลŸ","Scirc":"ลœ","scirc":"ล","scnap":"โชบ","scnE":"โชถ","scnsim":"โ‹ฉ","scpolint":"โจ“","scsim":"โ‰ฟ","Scy":"ะก","scy":"ั","sdotb":"โŠก","sdot":"โ‹…","sdote":"โฉฆ","searhk":"โคฅ","searr":"โ†˜","seArr":"โ‡˜","searrow":"โ†˜","sect":"ยง","semi":";","seswar":"โคฉ","setminus":"โˆ–","setmn":"โˆ–","sext":"โœถ","Sfr":"๐”–","sfr":"๐”ฐ","sfrown":"โŒข","sharp":"โ™ฏ","SHCHcy":"ะฉ","shchcy":"ั‰","SHcy":"ะจ","shcy":"ัˆ","ShortDownArrow":"โ†“","ShortLeftArrow":"โ†","shortmid":"โˆฃ","shortparallel":"โˆฅ","ShortRightArrow":"โ†’","ShortUpArrow":"โ†‘","shy":"ยญ","Sigma":"ฮฃ","sigma":"ฯƒ","sigmaf":"ฯ‚","sigmav":"ฯ‚","sim":"โˆผ","simdot":"โฉช","sime":"โ‰ƒ","simeq":"โ‰ƒ","simg":"โชž","simgE":"โช ","siml":"โช","simlE":"โชŸ","simne":"โ‰†","simplus":"โจค","simrarr":"โฅฒ","slarr":"โ†","SmallCircle":"โˆ˜","smallsetminus":"โˆ–","smashp":"โจณ","smeparsl":"โงค","smid":"โˆฃ","smile":"โŒฃ","smt":"โชช","smte":"โชฌ","smtes":"โชฌ๏ธ€","SOFTcy":"ะฌ","softcy":"ัŒ","solbar":"โŒฟ","solb":"โง„","sol":"/","Sopf":"๐•Š","sopf":"๐•ค","spades":"โ™ ","spadesuit":"โ™ ","spar":"โˆฅ","sqcap":"โŠ“","sqcaps":"โŠ“๏ธ€","sqcup":"โŠ”","sqcups":"โŠ”๏ธ€","Sqrt":"โˆš","sqsub":"โŠ","sqsube":"โŠ‘","sqsubset":"โŠ","sqsubseteq":"โŠ‘","sqsup":"โŠ","sqsupe":"โŠ’","sqsupset":"โŠ","sqsupseteq":"โŠ’","square":"โ–ก","Square":"โ–ก","SquareIntersection":"โŠ“","SquareSubset":"โŠ","SquareSubsetEqual":"โŠ‘","SquareSuperset":"โŠ","SquareSupersetEqual":"โŠ’","SquareUnion":"โŠ”","squarf":"โ–ช","squ":"โ–ก","squf":"โ–ช","srarr":"โ†’","Sscr":"๐’ฎ","sscr":"๐“ˆ","ssetmn":"โˆ–","ssmile":"โŒฃ","sstarf":"โ‹†","Star":"โ‹†","star":"โ˜†","starf":"โ˜…","straightepsilon":"ฯต","straightphi":"ฯ•","strns":"ยฏ","sub":"โŠ‚","Sub":"โ‹","subdot":"โชฝ","subE":"โซ…","sube":"โŠ†","subedot":"โซƒ","submult":"โซ","subnE":"โซ‹","subne":"โŠŠ","subplus":"โชฟ","subrarr":"โฅน","subset":"โŠ‚","Subset":"โ‹","subseteq":"โŠ†","subseteqq":"โซ…","SubsetEqual":"โŠ†","subsetneq":"โŠŠ","subsetneqq":"โซ‹","subsim":"โซ‡","subsub":"โซ•","subsup":"โซ“","succapprox":"โชธ","succ":"โ‰ป","succcurlyeq":"โ‰ฝ","Succeeds":"โ‰ป","SucceedsEqual":"โชฐ","SucceedsSlantEqual":"โ‰ฝ","SucceedsTilde":"โ‰ฟ","succeq":"โชฐ","succnapprox":"โชบ","succneqq":"โชถ","succnsim":"โ‹ฉ","succsim":"โ‰ฟ","SuchThat":"โˆ‹","sum":"โˆ‘","Sum":"โˆ‘","sung":"โ™ช","sup1":"ยน","sup2":"ยฒ","sup3":"ยณ","sup":"โŠƒ","Sup":"โ‹‘","supdot":"โชพ","supdsub":"โซ˜","supE":"โซ†","supe":"โŠ‡","supedot":"โซ„","Superset":"โŠƒ","SupersetEqual":"โŠ‡","suphsol":"โŸ‰","suphsub":"โซ—","suplarr":"โฅป","supmult":"โซ‚","supnE":"โซŒ","supne":"โŠ‹","supplus":"โซ€","supset":"โŠƒ","Supset":"โ‹‘","supseteq":"โŠ‡","supseteqq":"โซ†","supsetneq":"โŠ‹","supsetneqq":"โซŒ","supsim":"โซˆ","supsub":"โซ”","supsup":"โซ–","swarhk":"โคฆ","swarr":"โ†™","swArr":"โ‡™","swarrow":"โ†™","swnwar":"โคช","szlig":"รŸ","Tab":"\\t","target":"โŒ–","Tau":"ฮค","tau":"ฯ„","tbrk":"โŽด","Tcaron":"ลค","tcaron":"ลฅ","Tcedil":"ลข","tcedil":"ลฃ","Tcy":"ะข","tcy":"ั‚","tdot":"โƒ›","telrec":"โŒ•","Tfr":"๐”—","tfr":"๐”ฑ","there4":"โˆด","therefore":"โˆด","Therefore":"โˆด","Theta":"ฮ˜","theta":"ฮธ","thetasym":"ฯ‘","thetav":"ฯ‘","thickapprox":"โ‰ˆ","thicksim":"โˆผ","ThickSpace":"โŸโ€Š","ThinSpace":"โ€‰","thinsp":"โ€‰","thkap":"โ‰ˆ","thksim":"โˆผ","THORN":"รž","thorn":"รพ","tilde":"หœ","Tilde":"โˆผ","TildeEqual":"โ‰ƒ","TildeFullEqual":"โ‰…","TildeTilde":"โ‰ˆ","timesbar":"โจฑ","timesb":"โŠ ","times":"ร—","timesd":"โจฐ","tint":"โˆญ","toea":"โคจ","topbot":"โŒถ","topcir":"โซฑ","top":"โŠค","Topf":"๐•‹","topf":"๐•ฅ","topfork":"โซš","tosa":"โคฉ","tprime":"โ€ด","trade":"โ„ข","TRADE":"โ„ข","triangle":"โ–ต","triangledown":"โ–ฟ","triangleleft":"โ—ƒ","trianglelefteq":"โŠด","triangleq":"โ‰œ","triangleright":"โ–น","trianglerighteq":"โŠต","tridot":"โ—ฌ","trie":"โ‰œ","triminus":"โจบ","TripleDot":"โƒ›","triplus":"โจน","trisb":"โง","tritime":"โจป","trpezium":"โข","Tscr":"๐’ฏ","tscr":"๐“‰","TScy":"ะฆ","tscy":"ั†","TSHcy":"ะ‹","tshcy":"ั›","Tstrok":"ลฆ","tstrok":"ลง","twixt":"โ‰ฌ","twoheadleftarrow":"โ†ž","twoheadrightarrow":"โ† ","Uacute":"รš","uacute":"รบ","uarr":"โ†‘","Uarr":"โ†Ÿ","uArr":"โ‡‘","Uarrocir":"โฅ‰","Ubrcy":"ะŽ","ubrcy":"ัž","Ubreve":"ลฌ","ubreve":"ลญ","Ucirc":"ร›","ucirc":"รป","Ucy":"ะฃ","ucy":"ัƒ","udarr":"โ‡…","Udblac":"ลฐ","udblac":"ลฑ","udhar":"โฅฎ","ufisht":"โฅพ","Ufr":"๐”˜","ufr":"๐”ฒ","Ugrave":"ร™","ugrave":"รน","uHar":"โฅฃ","uharl":"โ†ฟ","uharr":"โ†พ","uhblk":"โ–€","ulcorn":"โŒœ","ulcorner":"โŒœ","ulcrop":"โŒ","ultri":"โ—ธ","Umacr":"ลช","umacr":"ลซ","uml":"ยจ","UnderBar":"_","UnderBrace":"โŸ","UnderBracket":"โŽต","UnderParenthesis":"โ","Union":"โ‹ƒ","UnionPlus":"โŠŽ","Uogon":"ลฒ","uogon":"ลณ","Uopf":"๐•Œ","uopf":"๐•ฆ","UpArrowBar":"โค’","uparrow":"โ†‘","UpArrow":"โ†‘","Uparrow":"โ‡‘","UpArrowDownArrow":"โ‡…","updownarrow":"โ†•","UpDownArrow":"โ†•","Updownarrow":"โ‡•","UpEquilibrium":"โฅฎ","upharpoonleft":"โ†ฟ","upharpoonright":"โ†พ","uplus":"โŠŽ","UpperLeftArrow":"โ†–","UpperRightArrow":"โ†—","upsi":"ฯ…","Upsi":"ฯ’","upsih":"ฯ’","Upsilon":"ฮฅ","upsilon":"ฯ…","UpTeeArrow":"โ†ฅ","UpTee":"โŠฅ","upuparrows":"โ‡ˆ","urcorn":"โŒ","urcorner":"โŒ","urcrop":"โŒŽ","Uring":"ลฎ","uring":"ลฏ","urtri":"โ—น","Uscr":"๐’ฐ","uscr":"๐“Š","utdot":"โ‹ฐ","Utilde":"ลจ","utilde":"ลฉ","utri":"โ–ต","utrif":"โ–ด","uuarr":"โ‡ˆ","Uuml":"รœ","uuml":"รผ","uwangle":"โฆง","vangrt":"โฆœ","varepsilon":"ฯต","varkappa":"ฯฐ","varnothing":"โˆ…","varphi":"ฯ•","varpi":"ฯ–","varpropto":"โˆ","varr":"โ†•","vArr":"โ‡•","varrho":"ฯฑ","varsigma":"ฯ‚","varsubsetneq":"โŠŠ๏ธ€","varsubsetneqq":"โซ‹๏ธ€","varsupsetneq":"โŠ‹๏ธ€","varsupsetneqq":"โซŒ๏ธ€","vartheta":"ฯ‘","vartriangleleft":"โŠฒ","vartriangleright":"โŠณ","vBar":"โซจ","Vbar":"โซซ","vBarv":"โซฉ","Vcy":"ะ’","vcy":"ะฒ","vdash":"โŠข","vDash":"โŠจ","Vdash":"โŠฉ","VDash":"โŠซ","Vdashl":"โซฆ","veebar":"โŠป","vee":"โˆจ","Vee":"โ‹","veeeq":"โ‰š","vellip":"โ‹ฎ","verbar":"|","Verbar":"โ€–","vert":"|","Vert":"โ€–","VerticalBar":"โˆฃ","VerticalLine":"|","VerticalSeparator":"โ˜","VerticalTilde":"โ‰€","VeryThinSpace":"โ€Š","Vfr":"๐”™","vfr":"๐”ณ","vltri":"โŠฒ","vnsub":"โŠ‚โƒ’","vnsup":"โŠƒโƒ’","Vopf":"๐•","vopf":"๐•ง","vprop":"โˆ","vrtri":"โŠณ","Vscr":"๐’ฑ","vscr":"๐“‹","vsubnE":"โซ‹๏ธ€","vsubne":"โŠŠ๏ธ€","vsupnE":"โซŒ๏ธ€","vsupne":"โŠ‹๏ธ€","Vvdash":"โŠช","vzigzag":"โฆš","Wcirc":"ลด","wcirc":"ลต","wedbar":"โฉŸ","wedge":"โˆง","Wedge":"โ‹€","wedgeq":"โ‰™","weierp":"โ„˜","Wfr":"๐”š","wfr":"๐”ด","Wopf":"๐•Ž","wopf":"๐•จ","wp":"โ„˜","wr":"โ‰€","wreath":"โ‰€","Wscr":"๐’ฒ","wscr":"๐“Œ","xcap":"โ‹‚","xcirc":"โ—ฏ","xcup":"โ‹ƒ","xdtri":"โ–ฝ","Xfr":"๐”›","xfr":"๐”ต","xharr":"โŸท","xhArr":"โŸบ","Xi":"ฮž","xi":"ฮพ","xlarr":"โŸต","xlArr":"โŸธ","xmap":"โŸผ","xnis":"โ‹ป","xodot":"โจ€","Xopf":"๐•","xopf":"๐•ฉ","xoplus":"โจ","xotime":"โจ‚","xrarr":"โŸถ","xrArr":"โŸน","Xscr":"๐’ณ","xscr":"๐“","xsqcup":"โจ†","xuplus":"โจ„","xutri":"โ–ณ","xvee":"โ‹","xwedge":"โ‹€","Yacute":"ร","yacute":"รฝ","YAcy":"ะฏ","yacy":"ั","Ycirc":"ลถ","ycirc":"ลท","Ycy":"ะซ","ycy":"ั‹","yen":"ยฅ","Yfr":"๐”œ","yfr":"๐”ถ","YIcy":"ะ‡","yicy":"ั—","Yopf":"๐•","yopf":"๐•ช","Yscr":"๐’ด","yscr":"๐“Ž","YUcy":"ะฎ","yucy":"ัŽ","yuml":"รฟ","Yuml":"ลธ","Zacute":"ลน","zacute":"ลบ","Zcaron":"ลฝ","zcaron":"ลพ","Zcy":"ะ—","zcy":"ะท","Zdot":"ลป","zdot":"ลผ","zeetrf":"โ„จ","ZeroWidthSpace":"โ€‹","Zeta":"ฮ–","zeta":"ฮถ","zfr":"๐”ท","Zfr":"โ„จ","ZHcy":"ะ–","zhcy":"ะถ","zigrarr":"โ‡","zopf":"๐•ซ","Zopf":"โ„ค","Zscr":"๐’ต","zscr":"๐“","zwj":"โ€","zwnj":"โ€Œ"}')},2128:function(e){"use strict";e.exports=JSON.parse('{"Aacute":"ร","aacute":"รก","Acirc":"ร‚","acirc":"รข","acute":"ยด","AElig":"ร†","aelig":"รฆ","Agrave":"ร€","agrave":"ร ","amp":"&","AMP":"&","Aring":"ร…","aring":"รฅ","Atilde":"รƒ","atilde":"รฃ","Auml":"ร„","auml":"รค","brvbar":"ยฆ","Ccedil":"ร‡","ccedil":"รง","cedil":"ยธ","cent":"ยข","copy":"ยฉ","COPY":"ยฉ","curren":"ยค","deg":"ยฐ","divide":"รท","Eacute":"ร‰","eacute":"รฉ","Ecirc":"รŠ","ecirc":"รช","Egrave":"รˆ","egrave":"รจ","ETH":"ร","eth":"รฐ","Euml":"ร‹","euml":"รซ","frac12":"ยฝ","frac14":"ยผ","frac34":"ยพ","gt":">","GT":">","Iacute":"ร","iacute":"รญ","Icirc":"รŽ","icirc":"รฎ","iexcl":"ยก","Igrave":"รŒ","igrave":"รฌ","iquest":"ยฟ","Iuml":"ร","iuml":"รฏ","laquo":"ยซ","lt":"<","LT":"<","macr":"ยฏ","micro":"ยต","middot":"ยท","nbsp":"ย ","not":"ยฌ","Ntilde":"ร‘","ntilde":"รฑ","Oacute":"ร“","oacute":"รณ","Ocirc":"ร”","ocirc":"รด","Ograve":"ร’","ograve":"รฒ","ordf":"ยช","ordm":"ยบ","Oslash":"ร˜","oslash":"รธ","Otilde":"ร•","otilde":"รต","Ouml":"ร–","ouml":"รถ","para":"ยถ","plusmn":"ยฑ","pound":"ยฃ","quot":"\\"","QUOT":"\\"","raquo":"ยป","reg":"ยฎ","REG":"ยฎ","sect":"ยง","shy":"ยญ","sup1":"ยน","sup2":"ยฒ","sup3":"ยณ","szlig":"รŸ","THORN":"รž","thorn":"รพ","times":"ร—","Uacute":"รš","uacute":"รบ","Ucirc":"ร›","ucirc":"รป","Ugrave":"ร™","ugrave":"รน","uml":"ยจ","Uuml":"รœ","uuml":"รผ","Yacute":"ร","yacute":"รฝ","yen":"ยฅ","yuml":"รฟ"}')},4931:function(e){"use strict";e.exports=JSON.parse('{"amp":"&","apos":"\'","gt":">","lt":"<","quot":"\\""}')}};var r={};function __nccwpck_require__(t){var a=r[t];if(a!==undefined){return a.exports}var n=r[t]={id:t,loaded:false,exports:{}};var i=true;try{e[t].call(n.exports,n,n.exports,__nccwpck_require__);i=false}finally{if(i)delete r[t]}n.loaded=true;return n.exports}!function(){__nccwpck_require__.nmd=function(e){e.paths=[];if(!e.children)e.children=[];return e}}();if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var t=__nccwpck_require__(5417);module.exports=t})(); \ No newline at end of file diff --git a/packages/next/export/index.ts b/packages/next/export/index.ts index 9650a542480601..8110fda0e9de96 100644 --- a/packages/next/export/index.ts +++ b/packages/next/export/index.ts @@ -28,11 +28,9 @@ import { PAGES_MANIFEST, PHASE_EXPORT, PRERENDER_MANIFEST, - SERVERLESS_DIRECTORY, SERVER_DIRECTORY, } from '../shared/lib/constants' import loadConfig from '../server/config' -import { isTargetLikeServerless } from '../server/utils' import { ExportPathMap, NextConfigComplete } from '../server/config-shared' import { eventCliSession } from '../telemetry/events' import { hasNextSupport } from '../telemetry/ci-info' @@ -180,7 +178,6 @@ export default async function exportApp( } const subFolders = nextConfig.trailingSlash && !options.buildExport - const isLikeServerless = nextConfig.target !== 'server' if (!options.silent && !options.buildExport) { Log.info(`using build directory: ${distDir}`) @@ -215,7 +212,7 @@ export default async function exportApp( !options.pages && (require(join( distDir, - isLikeServerless ? SERVERLESS_DIRECTORY : SERVER_DIRECTORY, + SERVER_DIRECTORY, PAGES_MANIFEST )) as PagesManifest) @@ -611,7 +608,6 @@ export default async function exportApp( serverRuntimeConfig, subFolders, buildExport: options.buildExport, - serverless: isTargetLikeServerless(nextConfig.target), optimizeFonts: nextConfig.optimizeFonts as FontConfig, optimizeCss: nextConfig.experimental.optimizeCss, disableOptimizedLoading: @@ -673,7 +669,7 @@ export default async function exportApp( } route = normalizePagePath(route) - const pagePath = getPagePath(pageName, distDir, isLikeServerless) + const pagePath = getPagePath(pageName, distDir) const distPagesDir = join( pagePath, // strip leading / and then recurse number of nested dirs diff --git a/packages/next/export/worker.ts b/packages/next/export/worker.ts index 93c265b698eb08..850752849a78a3 100644 --- a/packages/next/export/worker.ts +++ b/packages/next/export/worker.ts @@ -1,6 +1,4 @@ -import type { ComponentType } from 'react' import type { FontManifest, FontConfig } from '../server/font-utils' -import type { GetStaticProps } from '../types' import type { IncomingMessage, ServerResponse } from 'http' import type { DomainLocale, NextConfigComplete } from '../server/config-shared' import type { NextParsedUrlQuery } from '../server/request-meta' @@ -8,7 +6,6 @@ import type { NextParsedUrlQuery } from '../server/request-meta' import '../server/node-polyfill-fetch' import loadRequireHook from '../build/webpack/require-hook' -import url from 'url' import { extname, join, dirname, sep } from 'path' import { renderToHTML } from '../server/render' import { promises } from 'fs' @@ -62,7 +59,6 @@ interface ExportPageInput { buildExport?: boolean serverRuntimeConfig: { [key: string]: any } subFolders?: boolean - serverless: boolean optimizeFonts: FontConfig optimizeCss: any disableOptimizedLoading: any @@ -99,11 +95,6 @@ interface RenderOpts { supportsDynamicHTML?: boolean } -type ComponentModule = ComponentType<{}> & { - renderReqToHTML: typeof renderToHTML - getStaticProps?: GetStaticProps -} - export default async function exportPage({ parentSpanId, path, @@ -115,7 +106,6 @@ export default async function exportPage({ buildExport, serverRuntimeConfig, subFolders, - serverless, optimizeFonts, optimizeCss, disableOptimizedLoading, @@ -191,12 +181,9 @@ export default async function exportPage({ getRouteMatcher(getRouteRegex(normalizedPage))(updatedPath) || undefined if (params) { - // we have to pass these separately for serverless - if (!serverless) { - query = { - ...query, - ...params, - } + query = { + ...query, + ...params, } } else { throw new Error( @@ -267,8 +254,7 @@ export default async function exportPage({ ) // If the ssg path has .html extension, and it's not builtin paths, use it directly // Otherwise, use that as the filename instead - const isHtmlExtPath = - !serverless && !isBuiltinPaths && path.endsWith('.html') + const isHtmlExtPath = !isBuiltinPaths && path.endsWith('.html') htmlFilename = isHtmlExtPath ? getHtmlFilename(path) : path } else if (path === '/') { // If the path is the root, just use index.html @@ -289,205 +275,118 @@ export default async function exportPage({ return !buildExport && getStaticProps && !isDynamicRoute(path) } - if (serverless) { - const curUrl = url.parse(req.url!, true) - req.url = url.format({ - ...curUrl, - query: { - ...curUrl.query, - ...query, - }, - }) - const { - Component, - ComponentMod, - getServerSideProps, - getStaticProps, - pageConfig, - } = await loadComponents({ - distDir, - pathname: page, - serverless, - hasServerComponents: !!serverComponents, - isAppPath: isAppDir, - }) - const ampState = { - ampFirst: pageConfig?.amp === true, - hasQuery: Boolean(query.amp), - hybrid: pageConfig?.amp === 'hybrid', - } - inAmpMode = isInAmpMode(ampState) - hybridAmp = ampState.hybrid + const components = await loadComponents({ + distDir, + pathname: page, + hasServerComponents: !!serverComponents, + isAppPath: isAppDir, + }) + curRenderOpts = { + ...components, + ...renderOpts, + ampPath: renderAmpPath, + params, + optimizeFonts, + optimizeCss, + disableOptimizedLoading, + fontManifest: optimizeFonts ? requireFontManifest(distDir) : null, + locale: locale as string, + supportsDynamicHTML: false, + } - if (getServerSideProps) { - throw new Error( - `Error for page ${page}: ${SERVER_PROPS_EXPORT_ERROR}` - ) - } + // during build we attempt rendering app dir paths + // and bail when dynamic dependencies are detected + // only fully static paths are fully generated here + if (isAppDir) { + const { renderToHTMLOrFlight } = + require('../server/app-render') as typeof import('../server/app-render') - // if it was auto-exported the HTML is loaded here - if (typeof Component === 'string') { - renderResult = RenderResult.fromStatic(Component) - queryWithAutoExportWarn() - } else { - // for non-dynamic SSG pages we should have already - // prerendered the file - if (renderedDuringBuild(getStaticProps)) - return { ...results, duration: Date.now() - start } - - if (getStaticProps && !htmlFilepath.endsWith('.html')) { - // make sure it ends with .html if the name contains a dot - htmlFilename += '.html' - htmlFilepath += '.html' - } + try { + curRenderOpts.params ||= {} - renderMethod = (ComponentMod as ComponentModule).renderReqToHTML - const result = await renderMethod( - req, - res, - 'export', - { - ampPath: renderAmpPath, - /// @ts-ignore - optimizeFonts, - /// @ts-ignore - optimizeCss, - disableOptimizedLoading, - distDir, - fontManifest: optimizeFonts - ? requireFontManifest(distDir, serverless) - : null, - locale: locale!, - locales: renderOpts.locales!, - }, - // @ts-ignore - params + const result = await renderToHTMLOrFlight( + req as any, + res as any, + page, + query, + curRenderOpts as any ) - curRenderOpts = (result as any).renderOpts || {} - renderResult = (result as any).html - } - - if (!renderResult && !(curRenderOpts as any).isNotFound) { - throw new Error(`Failed to render serverless page`) - } - } else { - const components = await loadComponents({ - distDir, - pathname: page, - serverless, - hasServerComponents: !!serverComponents, - isAppPath: isAppDir, - }) - curRenderOpts = { - ...components, - ...renderOpts, - ampPath: renderAmpPath, - params, - optimizeFonts, - optimizeCss, - disableOptimizedLoading, - fontManifest: optimizeFonts - ? requireFontManifest(distDir, serverless) - : null, - locale: locale as string, - supportsDynamicHTML: false, - } - - // during build we attempt rendering app dir paths - // and bail when dynamic dependencies are detected - // only fully static paths are fully generated here - if (isAppDir) { - const { renderToHTMLOrFlight } = - require('../server/app-render') as typeof import('../server/app-render') - - try { - curRenderOpts.params ||= {} - - const result = await renderToHTMLOrFlight( - req as any, - res as any, - page, - query, - curRenderOpts as any + const html = result?.toUnchunkedString() + const flightData = (curRenderOpts as any).pageData + const revalidate = (curRenderOpts as any).revalidate + results.fromBuildExportRevalidate = revalidate + + if (revalidate !== 0) { + await promises.writeFile(htmlFilepath, html, 'utf8') + await promises.writeFile( + htmlFilepath.replace(/\.html$/, '.rsc'), + flightData ) - const html = result?.toUnchunkedString() - const flightData = (curRenderOpts as any).pageData - const revalidate = (curRenderOpts as any).revalidate - results.fromBuildExportRevalidate = revalidate - - if (revalidate !== 0) { - await promises.writeFile(htmlFilepath, html, 'utf8') - await promises.writeFile( - htmlFilepath.replace(/\.html$/, '.rsc'), - flightData - ) - } - } catch (err: any) { - if ( - err.digest !== DYNAMIC_ERROR_CODE && - err.digest !== NOT_FOUND_ERROR_CODE && - !err.digest?.startsWith(REDIRECT_ERROR_CODE) - ) { - throw err - } } - - return { ...results, duration: Date.now() - start } + } catch (err: any) { + if ( + err.digest !== DYNAMIC_ERROR_CODE && + err.digest !== NOT_FOUND_ERROR_CODE && + !err.digest?.startsWith(REDIRECT_ERROR_CODE) + ) { + throw err + } } - const ampState = { - ampFirst: components.pageConfig?.amp === true, - hasQuery: Boolean(query.amp), - hybrid: components.pageConfig?.amp === 'hybrid', - } - inAmpMode = isInAmpMode(ampState) - hybridAmp = ampState.hybrid + return { ...results, duration: Date.now() - start } + } - if (components.getServerSideProps) { - throw new Error( - `Error for page ${page}: ${SERVER_PROPS_EXPORT_ERROR}` - ) - } + const ampState = { + ampFirst: components.pageConfig?.amp === true, + hasQuery: Boolean(query.amp), + hybrid: components.pageConfig?.amp === 'hybrid', + } + inAmpMode = isInAmpMode(ampState) + hybridAmp = ampState.hybrid - // for non-dynamic SSG pages we should have already - // prerendered the file - if (renderedDuringBuild(components.getStaticProps)) { - return { ...results, duration: Date.now() - start } - } + if (components.getServerSideProps) { + throw new Error(`Error for page ${page}: ${SERVER_PROPS_EXPORT_ERROR}`) + } - // TODO: de-dupe the logic here between serverless and server mode - if (components.getStaticProps && !htmlFilepath.endsWith('.html')) { - // make sure it ends with .html if the name contains a dot - htmlFilepath += '.html' - htmlFilename += '.html' - } + // for non-dynamic SSG pages we should have already + // prerendered the file + if (renderedDuringBuild(components.getStaticProps)) { + return { ...results, duration: Date.now() - start } + } - if (typeof components.Component === 'string') { - renderResult = RenderResult.fromStatic(components.Component) - queryWithAutoExportWarn() - } else { - /** - * This sets environment variable to be used at the time of static export by head.tsx. - * Using this from process.env allows targeting both serverless and SSR by calling - * `process.env.__NEXT_OPTIMIZE_FONTS`. - * TODO(prateekbh@): Remove this when experimental.optimizeFonts are being cleaned up. - */ - if (optimizeFonts) { - process.env.__NEXT_OPTIMIZE_FONTS = JSON.stringify(optimizeFonts) - } - if (optimizeCss) { - process.env.__NEXT_OPTIMIZE_CSS = JSON.stringify(true) - } - renderResult = await renderMethod( - req, - res, - page, - query, - // @ts-ignore - curRenderOpts - ) + // TODO: de-dupe the logic here between serverless and server mode + if (components.getStaticProps && !htmlFilepath.endsWith('.html')) { + // make sure it ends with .html if the name contains a dot + htmlFilepath += '.html' + htmlFilename += '.html' + } + + if (typeof components.Component === 'string') { + renderResult = RenderResult.fromStatic(components.Component) + queryWithAutoExportWarn() + } else { + /** + * This sets environment variable to be used at the time of static export by head.tsx. + * Using this from process.env allows targeting both serverless and SSR by calling + * `process.env.__NEXT_OPTIMIZE_FONTS`. + * TODO(prateekbh@): Remove this when experimental.optimizeFonts are being cleaned up. + */ + if (optimizeFonts) { + process.env.__NEXT_OPTIMIZE_FONTS = JSON.stringify(optimizeFonts) + } + if (optimizeCss) { + process.env.__NEXT_OPTIMIZE_CSS = JSON.stringify(true) } + renderResult = await renderMethod( + req, + res, + page, + query, + // @ts-ignore + curRenderOpts + ) } + results.ssgNotFound = (curRenderOpts as any).isNotFound const validateAmp = async ( @@ -529,29 +428,14 @@ export default async function exportPage({ await promises.access(ampHtmlFilepath) } catch (_) { // make sure it doesn't exist from manual mapping - let ampRenderResult - if (serverless) { - req.url += (req.url!.includes('?') ? '&' : '?') + 'amp=1' + let ampRenderResult = await renderMethod( + req, + res, + page, // @ts-ignore - ampRenderResult = ( - await (renderMethod as any)( - req, - res, - 'export', - curRenderOpts, - params - ) - ).html - } else { - ampRenderResult = await renderMethod( - req, - res, - page, - // @ts-ignore - { ...query, amp: '1' }, - curRenderOpts as any - ) - } + { ...query, amp: '1' }, + curRenderOpts as any + ) const ampHtml = ampRenderResult ? ampRenderResult.toUnchunkedString() diff --git a/packages/next/server/base-server.ts b/packages/next/server/base-server.ts index 483f711a6c21d1..13e3b6770a5bfa 100644 --- a/packages/next/server/base-server.ts +++ b/packages/next/server/base-server.ts @@ -166,21 +166,6 @@ type ResponsePayload = { revalidateOptions?: any } -export function prepareServerlessUrl( - req: BaseNextRequest, - query: ParsedUrlQuery -): void { - const curUrl = parseUrl(req.url!, true) - req.url = formatUrl({ - ...curUrl, - search: undefined, - query: { - ...curUrl.query, - ...query, - }, - }) -} - export default abstract class Server { protected dir: string protected quiet: boolean @@ -1000,10 +985,6 @@ export default abstract class Server { const is404Page = pathname === '/404' const is500Page = pathname === '/500' const isAppPath = components.isAppPath - - const isLikeServerless = - typeof components.ComponentMod === 'object' && - typeof (components.ComponentMod as any).renderReqToHTML === 'function' const hasServerProps = !!components.getServerSideProps let hasStaticPaths = !!components.getStaticPaths @@ -1157,11 +1138,7 @@ export default abstract class Server { // be static so we can collect revalidate and populate the // cache if there are no dynamic data requirements opts.supportsDynamicHTML = - !isSSG && - !isLikeServerless && - !isBotRequest && - !query.amp && - isSupportedDocument + !isSSG && !isBotRequest && !query.amp && isSupportedDocument } const defaultLocale = isSSG @@ -1285,88 +1262,65 @@ export default abstract class Server { let isNotFound: boolean | undefined let isRedirect: boolean | undefined - // handle serverless - if (isLikeServerless) { - const renderResult = await ( - components.ComponentMod as any - ).renderReqToHTML(req, res, 'passthrough', { - locale, - locales, - defaultLocale, - optimizeFonts: this.renderOpts.optimizeFonts, - optimizeCss: this.renderOpts.optimizeCss, - nextScriptWorkers: this.renderOpts.nextScriptWorkers, - distDir: this.distDir, - fontManifest: this.renderOpts.fontManifest, - domainLocales: this.renderOpts.domainLocales, - }) - - body = renderResult.html - pageData = renderResult.renderOpts.pageData - sprRevalidate = renderResult.renderOpts.revalidate - isNotFound = renderResult.renderOpts.isNotFound - isRedirect = renderResult.renderOpts.isRedirect - } else { - const origQuery = parseUrl(req.url || '', true).query - - // clear any dynamic route params so they aren't in - // the resolvedUrl - if (opts.params) { - Object.keys(opts.params).forEach((key) => { - delete origQuery[key] - }) - } - const hadTrailingSlash = - urlPathname !== '/' && this.nextConfig.trailingSlash + const origQuery = parseUrl(req.url || '', true).query - const resolvedUrl = formatUrl({ - pathname: `${resolvedUrlPathname}${hadTrailingSlash ? '/' : ''}`, - // make sure to only add query values from original URL - query: origQuery, + // clear any dynamic route params so they aren't in + // the resolvedUrl + if (opts.params) { + Object.keys(opts.params).forEach((key) => { + delete origQuery[key] }) + } + const hadTrailingSlash = + urlPathname !== '/' && this.nextConfig.trailingSlash - const renderOpts: RenderOpts = { - ...components, - ...opts, - isDataReq, - resolvedUrl, - locale, - locales, - defaultLocale, - // For getServerSideProps and getInitialProps we need to ensure we use the original URL - // and not the resolved URL to prevent a hydration mismatch on - // asPath - resolvedAsPath: - hasServerProps || hasGetInitialProps - ? formatUrl({ - // we use the original URL pathname less the _next/data prefix if - // present - pathname: `${urlPathname}${hadTrailingSlash ? '/' : ''}`, - query: origQuery, - }) - : resolvedUrl, - } - - if (isSSG || hasStaticPaths) { - renderOpts.supportsDynamicHTML = false - } + const resolvedUrl = formatUrl({ + pathname: `${resolvedUrlPathname}${hadTrailingSlash ? '/' : ''}`, + // make sure to only add query values from original URL + query: origQuery, + }) - const renderResult = await this.renderHTML( - req, - res, - pathname, - query, - renderOpts - ) + const renderOpts: RenderOpts = { + ...components, + ...opts, + isDataReq, + resolvedUrl, + locale, + locales, + defaultLocale, + // For getServerSideProps and getInitialProps we need to ensure we use the original URL + // and not the resolved URL to prevent a hydration mismatch on + // asPath + resolvedAsPath: + hasServerProps || hasGetInitialProps + ? formatUrl({ + // we use the original URL pathname less the _next/data prefix if + // present + pathname: `${urlPathname}${hadTrailingSlash ? '/' : ''}`, + query: origQuery, + }) + : resolvedUrl, + } - body = renderResult - // TODO: change this to a different passing mechanism - pageData = (renderOpts as any).pageData - sprRevalidate = (renderOpts as any).revalidate - isNotFound = (renderOpts as any).isNotFound - isRedirect = (renderOpts as any).isRedirect + if (isSSG || hasStaticPaths) { + renderOpts.supportsDynamicHTML = false } + const renderResult = await this.renderHTML( + req, + res, + pathname, + query, + renderOpts + ) + + body = renderResult + // TODO: change this to a different passing mechanism + pageData = (renderOpts as any).pageData + sprRevalidate = (renderOpts as any).revalidate + isNotFound = (renderOpts as any).isNotFound + isRedirect = (renderOpts as any).isRedirect + let value: ResponseCacheValue | null if (isNotFound) { value = null @@ -1479,9 +1433,6 @@ export default abstract class Server { // We need to generate the fallback on-demand for development. else { query.__nextFallback = 'true' - if (isLikeServerless) { - prepareServerlessUrl(req, query) - } const result = await doRender() if (!result) { return null diff --git a/packages/next/server/config.ts b/packages/next/server/config.ts index a52d53b71cfad1..88fb42dd095b65 100644 --- a/packages/next/server/config.ts +++ b/packages/next/server/config.ts @@ -22,13 +22,10 @@ import { VALID_LOADERS, } from '../shared/lib/image-config' import { loadEnvConfig } from '@next/env' -import { hasNextSupport } from '../telemetry/ci-info' import { gte as semverGte } from 'next/dist/compiled/semver' export { DomainLocale, NextConfig, normalizeConfig } from './config-shared' -const targets = ['server', 'serverless', 'experimental-serverless-trace'] - const experimentalWarning = execOnce( (configFileName: string, features: string[]) => { const s = features.length > 1 ? 's' : '' @@ -805,17 +802,9 @@ export default async function loadConfig( ) } - if (userConfig.target && !targets.includes(userConfig.target)) { - throw new Error( - `Specified target is invalid. Provided: "${ - userConfig.target - }" should be one of ${targets.join(', ')}` - ) - } - if (userConfig.target && userConfig.target !== 'server') { - Log.warn( - 'The `target` config is deprecated and will be removed in a future version.\n' + + throw new Error( + `The "target" property is no longer supported in ${configFileName}.\n` + 'See more info here https://nextjs.org/docs/messages/deprecated-target-config' ) } @@ -829,10 +818,6 @@ export default async function loadConfig( : canonicalBase) || '' } - if (process.env.NEXT_PRIVATE_TARGET || hasNextSupport) { - userConfig.target = process.env.NEXT_PRIVATE_TARGET || 'server' - } - return assignDefaults({ configOrigin: relative(dir, path), configFile: path, diff --git a/packages/next/server/dev/hot-reloader.ts b/packages/next/server/dev/hot-reloader.ts index 84314c211b96ae..92f890f1971ec5 100644 --- a/packages/next/server/dev/hot-reloader.ts +++ b/packages/next/server/dev/hot-reloader.ts @@ -448,7 +448,6 @@ export default class HotReloader { pagesDir: this.pagesDir, previewMode: this.previewProps, rootDir: this.dir, - target: 'server', pageExtensions: this.config.pageExtensions, }) ) @@ -519,7 +518,6 @@ export default class HotReloader { pagesDir: this.pagesDir, previewMode: this.previewProps, rootDir: this.dir, - target: 'server', pageExtensions: this.config.pageExtensions, }) ).client, diff --git a/packages/next/server/dev/next-dev-server.ts b/packages/next/server/dev/next-dev-server.ts index c5c2f986039fbc..fbed543655c6e7 100644 --- a/packages/next/server/dev/next-dev-server.ts +++ b/packages/next/server/dev/next-dev-server.ts @@ -1297,7 +1297,6 @@ export default class DevServer extends Server { const pathsResult = await this.getStaticPathsWorker().loadStaticPaths({ distDir: this.distDir, pathname, - serverless: !this.renderOpts.dev && this._isLikeServerless, config: { configFileName, publicRuntimeConfig, diff --git a/packages/next/server/dev/static-paths-worker.ts b/packages/next/server/dev/static-paths-worker.ts index aa8346387e132a..6cf690b77903bc 100644 --- a/packages/next/server/dev/static-paths-worker.ts +++ b/packages/next/server/dev/static-paths-worker.ts @@ -19,7 +19,6 @@ let workerWasUsed = false export async function loadStaticPaths({ distDir, pathname, - serverless, config, httpAgentOptions, enableUndici, @@ -30,7 +29,6 @@ export async function loadStaticPaths({ }: { distDir: string pathname: string - serverless: boolean config: RuntimeConfig httpAgentOptions: NextConfigComplete['httpAgentOptions'] enableUndici: NextConfigComplete['enableUndici'] @@ -59,7 +57,6 @@ export async function loadStaticPaths({ const components = await loadComponents({ distDir, pathname: originalAppPath || pathname, - serverless, hasServerComponents: false, isAppPath: !!isAppPath, }) diff --git a/packages/next/server/load-components.ts b/packages/next/server/load-components.ts index 46757e836f6eef..de59321b8f9065 100644 --- a/packages/next/server/load-components.ts +++ b/packages/next/server/load-components.ts @@ -65,63 +65,24 @@ export async function loadDefaultErrorComponents(distDir: string) { export async function loadComponents({ distDir, pathname, - serverless, hasServerComponents, isAppPath, }: { distDir: string pathname: string - serverless: boolean hasServerComponents: boolean isAppPath: boolean }): Promise { - if (serverless) { - const ComponentMod = await requirePage(pathname, distDir, serverless) - if (typeof ComponentMod === 'string') { - return { - Component: ComponentMod as any, - pageConfig: {}, - ComponentMod, - } as LoadComponentsReturnType - } - - let { - default: Component, - getStaticProps, - getStaticPaths, - getServerSideProps, - } = ComponentMod - - Component = await Component - getStaticProps = await getStaticProps - getStaticPaths = await getStaticPaths - getServerSideProps = await getServerSideProps - const pageConfig = (await ComponentMod.config) || {} - - return { - Component, - pageConfig, - getStaticProps, - getStaticPaths, - getServerSideProps, - ComponentMod, - } as LoadComponentsReturnType - } - let DocumentMod = {} let AppMod = {} if (!isAppPath) { ;[DocumentMod, AppMod] = await Promise.all([ - Promise.resolve().then(() => - requirePage('/_document', distDir, serverless, false) - ), - Promise.resolve().then(() => - requirePage('/_app', distDir, serverless, false) - ), + Promise.resolve().then(() => requirePage('/_document', distDir, false)), + Promise.resolve().then(() => requirePage('/_app', distDir, false)), ]) } const ComponentMod = await Promise.resolve().then(() => - requirePage(pathname, distDir, serverless, isAppPath) + requirePage(pathname, distDir, isAppPath) ) const [buildManifest, reactLoadableManifest, serverComponentManifest] = diff --git a/packages/next/server/next-server.ts b/packages/next/server/next-server.ts index ef5a0a3bfc325f..f04e2933f56461 100644 --- a/packages/next/server/next-server.ts +++ b/packages/next/server/next-server.ts @@ -43,7 +43,6 @@ import { CLIENT_PUBLIC_FILES_PATH, APP_PATHS_MANIFEST, FLIGHT_SERVER_CSS_MANIFEST, - SERVERLESS_DIRECTORY, SERVER_DIRECTORY, FONT_LOADER_MANIFEST, } from '../shared/lib/constants' @@ -72,7 +71,6 @@ import loadRequireHook from '../build/webpack/require-hook' import BaseServer, { Options, FindComponentsResult, - prepareServerlessUrl, MiddlewareRoutingItem, RoutingItem, NoFallbackError, @@ -97,7 +95,7 @@ import { removeTrailingSlash } from '../shared/lib/router/utils/remove-trailing- import { getNextPathnameInfo } from '../shared/lib/router/utils/get-next-pathname-info' import { getClonableBody } from './body-streams' import { checkIsManualRevalidate } from './api-utils' -import { shouldUseReactRoot, isTargetLikeServerless } from './utils' +import { shouldUseReactRoot } from './utils' import ResponseCache from './response-cache' import { IncrementalCache } from './lib/incremental-cache' import { normalizeAppPath } from '../shared/lib/router/utils/app-paths' @@ -252,24 +250,21 @@ export default class NextNodeServer extends BaseServer { loadComponents({ distDir: this.distDir, pathname: '/_document', - serverless: this._isLikeServerless, hasServerComponents: false, isAppPath: false, }).catch(() => {}) loadComponents({ distDir: this.distDir, pathname: '/_app', - serverless: this._isLikeServerless, hasServerComponents: false, isAppPath: false, }).catch(() => {}) } } - private compression = - this.nextConfig.compress && this.nextConfig.target === 'server' - ? (compression() as ExpressMiddleware) - : undefined + private compression = this.nextConfig.compress + ? (compression() as ExpressMiddleware) + : undefined protected loadEnvConfig({ dev, @@ -785,14 +780,6 @@ export default class NextNodeServer extends BaseServer { delete query.__nextLocale delete query.__nextDefaultLocale - if (!this.renderOpts.dev && this._isLikeServerless) { - if (typeof pageModule.default === 'function') { - prepareServerlessUrl(req, query) - await pageModule.default(req, res) - return true - } - } - await apiResolver( (req as NodeNextRequest).originalRequest, (res as NodeNextResponse).originalResponse, @@ -882,14 +869,7 @@ export default class NextNodeServer extends BaseServer { } protected getPagePath(pathname: string, locales?: string[]): string { - return getPagePath( - pathname, - this.distDir, - this._isLikeServerless, - this.renderOpts.dev, - locales, - this.hasAppDir - ) + return getPagePath(pathname, this.distDir, locales, this.hasAppDir) } protected async renderPageComponent( @@ -958,7 +938,6 @@ export default class NextNodeServer extends BaseServer { const components = await loadComponents({ distDir: this.distDir, pathname: pagePath, - serverless: !this.renderOpts.dev && this._isLikeServerless, hasServerComponents: !!this.renderOpts.serverComponents, isAppPath, }) @@ -1000,7 +979,7 @@ export default class NextNodeServer extends BaseServer { } protected getFontManifest(): FontManifest { - return requireFontManifest(this.distDir, this._isLikeServerless) + return requireFontManifest(this.distDir) } protected getServerComponentManifest() { @@ -2156,14 +2135,7 @@ export default class NextNodeServer extends BaseServer { return result } - protected get _isLikeServerless(): boolean { - return isTargetLikeServerless(this.nextConfig.target) - } - protected get serverDistDir() { - return join( - this.distDir, - this._isLikeServerless ? SERVERLESS_DIRECTORY : SERVER_DIRECTORY - ) + return join(this.distDir, SERVER_DIRECTORY) } } diff --git a/packages/next/server/require.ts b/packages/next/server/require.ts index 0f8ebd714e6ea2..2bbcdfe1dc7e30 100644 --- a/packages/next/server/require.ts +++ b/packages/next/server/require.ts @@ -4,7 +4,6 @@ import { FONT_MANIFEST, PAGES_MANIFEST, SERVER_DIRECTORY, - SERVERLESS_DIRECTORY, APP_PATHS_MANIFEST, } from '../shared/lib/constants' import { normalizeLocalePath } from '../shared/lib/i18n/normalize-locale-path' @@ -16,15 +15,10 @@ import { PageNotFoundError, MissingStaticPage } from '../shared/lib/utils' export function getPagePath( page: string, distDir: string, - serverless: boolean, - dev?: boolean, locales?: string[], appDirEnabled?: boolean ): string { - const serverBuildPath = join( - distDir, - serverless && !dev ? SERVERLESS_DIRECTORY : SERVER_DIRECTORY - ) + const serverBuildPath = join(distDir, SERVER_DIRECTORY) let appPathsManifest: undefined | PagesManifest if (appDirEnabled) { @@ -75,17 +69,9 @@ export function getPagePath( export function requirePage( page: string, distDir: string, - serverless: boolean, appDirEnabled?: boolean ): any { - const pagePath = getPagePath( - page, - distDir, - serverless, - false, - undefined, - appDirEnabled - ) + const pagePath = getPagePath(page, distDir, undefined, appDirEnabled) if (pagePath.endsWith('.html')) { return promises.readFile(pagePath, 'utf8').catch((err) => { throw new MissingStaticPage(page, err.message) @@ -94,11 +80,8 @@ export function requirePage( return require(pagePath) } -export function requireFontManifest(distDir: string, serverless: boolean) { - const serverBuildPath = join( - distDir, - serverless ? SERVERLESS_DIRECTORY : SERVER_DIRECTORY - ) +export function requireFontManifest(distDir: string) { + const serverBuildPath = join(distDir, SERVER_DIRECTORY) const fontManifest = require(join(serverBuildPath, FONT_MANIFEST)) return fontManifest } diff --git a/packages/next/server/utils.ts b/packages/next/server/utils.ts index eb75aa6af1ebef..a3d3134185c08f 100644 --- a/packages/next/server/utils.ts +++ b/packages/next/server/utils.ts @@ -16,11 +16,5 @@ export function cleanAmpPath(pathname: string): string { return pathname } -export function isTargetLikeServerless(target: string) { - const isServerless = target === 'serverless' - const isServerlessTrace = target === 'experimental-serverless-trace' - return isServerless || isServerlessTrace -} - // When react version is >= 18 opt-in using reactRoot export const shouldUseReactRoot = parseInt(React.version) >= 18 diff --git a/packages/next/shared/lib/constants.ts b/packages/next/shared/lib/constants.ts index e6ca4b6116fd8a..fc366dd88f03c3 100644 --- a/packages/next/shared/lib/constants.ts +++ b/packages/next/shared/lib/constants.ts @@ -40,7 +40,6 @@ export const DEV_MIDDLEWARE_MANIFEST = '_devMiddlewareManifest.json' export const REACT_LOADABLE_MANIFEST = 'react-loadable-manifest.json' export const FONT_MANIFEST = 'font-manifest.json' export const SERVER_DIRECTORY = 'server' -export const SERVERLESS_DIRECTORY = 'serverless' export const CONFIG_FILES = ['next.config.js', 'next.config.mjs'] export const BUILD_ID_FILE = 'BUILD_ID' export const BLOCKED_PAGES = ['/_document', '/_app', '/_error'] diff --git a/packages/next/taskfile.js b/packages/next/taskfile.js index b9d1dc7b07716c..84c9de68401c45 100644 --- a/packages/next/taskfile.js +++ b/packages/next/taskfile.js @@ -7,8 +7,6 @@ const glob = require('glob') // eslint-disable-next-line import/no-extraneous-dependencies const fs = require('fs-extra') // eslint-disable-next-line import/no-extraneous-dependencies -const escapeRegex = require('escape-string-regexp') -// eslint-disable-next-line import/no-extraneous-dependencies const resolveFrom = require('resolve-from') export async function next__polyfill_nomodule(task, opts) { @@ -98,26 +96,6 @@ export async function ncc_node_html_parser(task, opts) { ) .ncc({ packageName: 'node-html-parser', externals, target: 'es5' }) .target('compiled/node-html-parser') - - const filePath = join(__dirname, 'compiled/node-html-parser/index.js') - const content = fs.readFileSync(filePath, 'utf8') - // remove AMD define branch as this forces the module to not - // be treated as commonjs in serverless mode - // TODO: this can be removed after serverless target is removed - fs.writeFileSync( - filePath, - content.replace( - new RegExp( - escapeRegex( - 'if(typeof define=="function"&&typeof define.amd=="object"&&define.amd){define((function(){return ' - ) + - '\\w' + - escapeRegex('}))}else '), - 'g' - ), - '' - ) - ) } // eslint-disable-next-line camelcase diff --git a/packages/next/telemetry/events/version.ts b/packages/next/telemetry/events/version.ts index 8a308e45a8495d..759574cee4492b 100644 --- a/packages/next/telemetry/events/version.ts +++ b/packages/next/telemetry/events/version.ts @@ -91,7 +91,7 @@ export function eventCliSession( hasNowJson: event.hasNowJson, isCustomServer: event.isCustomServer, hasNextConfig: nextConfig.configOrigin !== 'default', - buildTarget: nextConfig.target === 'server' ? 'default' : nextConfig.target, + buildTarget: 'default', hasWebpackConfig: typeof nextConfig?.webpack === 'function', hasBabelConfig: hasBabelConfig(dir), imageEnabled: !!images, diff --git a/test/integration/404-page-custom-error/test/index.test.js b/test/integration/404-page-custom-error/test/index.test.js index 26e767a65c7dc5..44ef2429f3e3c1 100644 --- a/test/integration/404-page-custom-error/test/index.test.js +++ b/test/integration/404-page-custom-error/test/index.test.js @@ -14,7 +14,6 @@ import { } from 'next-test-utils' const appDir = join(__dirname, '../') -const nextConfig = join(appDir, 'next.config.js') let appPort let app @@ -71,33 +70,6 @@ describe('Default 404 Page with custom _error', () => { runTests('server') }) - describe.skip('serverless mode', () => { - afterAll(async () => { - await fs.remove(nextConfig) - await killApp(app) - }) - - it('should build successfully', async () => { - await fs.writeFile( - nextConfig, - ` - module.exports = { target: 'experimental-serverless-trace' } - ` - ) - const { code } = await nextBuild(appDir, [], { - stderr: true, - stdout: true, - }) - - expect(code).toBe(0) - - appPort = await findPort() - app = await nextStart(appDir, appPort) - }) - - runTests('serverless') - }) - describe('dev mode', () => { beforeAll(async () => { appPort = await findPort() diff --git a/test/integration/404-page-ssg/test/index.test.js b/test/integration/404-page-ssg/test/index.test.js index 10db743e90c3b0..946055e1c442eb 100644 --- a/test/integration/404-page-ssg/test/index.test.js +++ b/test/integration/404-page-ssg/test/index.test.js @@ -13,11 +13,9 @@ import { } from 'next-test-utils' const appDir = join(__dirname, '../') -const nextConfig = join(appDir, 'next.config.js') const gip404Err = /`pages\/404` can not have getInitialProps\/getServerSideProps/ -let nextConfigContent let stdout let stderr let buildId @@ -82,7 +80,6 @@ describe('404 Page Support SSG', () => { afterAll(() => killApp(app)) it('should build successfully', async () => { - nextConfigContent = await fs.readFile(nextConfig, 'utf8') const { code, stderr: buildStderr, @@ -114,50 +111,6 @@ describe('404 Page Support SSG', () => { runTests() }) - describe.skip('serverless mode', () => { - afterAll(async () => { - await fs.writeFile(nextConfig, nextConfigContent) - await killApp(app) - }) - - it('should build successfully', async () => { - nextConfigContent = await fs.readFile(nextConfig, 'utf8') - await fs.writeFile( - nextConfig, - ` - module.exports = { target: 'experimental-serverless-trace' } - ` - ) - const { - code, - stderr: buildStderr, - stdout: buildStdout, - } = await nextBuild(appDir, [], { - stderr: true, - stdout: true, - }) - - expect(code).toBe(0) - expect(buildStderr).not.toMatch(gip404Err) - expect(buildStdout).not.toMatch(gip404Err) - - appPort = await findPort() - stderr = '' - stdout = '' - app = await nextStart(appDir, appPort, { - onStdout(msg) { - stdout += msg - }, - onStderr(msg) { - stderr += msg - }, - }) - buildId = await fs.readFile(join(appDir, '.next/BUILD_ID'), 'utf8') - }) - - runTests() - }) - describe('dev mode', () => { beforeAll(async () => { appPort = await findPort() diff --git a/test/integration/404-page/test/index.test.js b/test/integration/404-page/test/index.test.js index e2e6d2e5eb7bfb..fd02b99ab69ceb 100644 --- a/test/integration/404-page/test/index.test.js +++ b/test/integration/404-page/test/index.test.js @@ -16,11 +16,9 @@ import { const appDir = join(__dirname, '../') const pages404 = join(appDir, 'pages/404.js') -const nextConfig = join(appDir, 'next.config.js') const gip404Err = /`pages\/404` can not have getInitialProps\/getServerSideProps/ -let nextConfigContent let appPort let app @@ -92,29 +90,6 @@ describe('404 Page Support', () => { runTests('server') }) - describe.skip('serverless mode', () => { - beforeAll(async () => { - nextConfigContent = await fs.readFile(nextConfig, 'utf8') - await fs.writeFile( - nextConfig, - ` - module.exports = { - target: 'serverless' - } - ` - ) - await nextBuild(appDir) - appPort = await findPort() - app = await nextStart(appDir, appPort) - }) - afterAll(async () => { - await fs.writeFile(nextConfig, nextConfigContent) - await killApp(app) - }) - - runTests('serverless') - }) - it('should not cache for custom 404 page with gssp and revalidate disabled', async () => { await fs.move(pages404, `${pages404}.bak`) await fs.writeFile( diff --git a/test/integration/500-page/test/index.test.js b/test/integration/500-page/test/index.test.js index 04e341354303c3..dceebd117b0c94 100644 --- a/test/integration/500-page/test/index.test.js +++ b/test/integration/500-page/test/index.test.js @@ -21,11 +21,9 @@ const appDir = join(__dirname, '../') const pages500 = join(appDir, 'pages/500.js') const pagesApp = join(appDir, 'pages/_app.js') const pagesError = join(appDir, 'pages/_error.js') -const nextConfig = join(appDir, 'next.config.js') const gip500Err = /`pages\/500` can not have getInitialProps\/getServerSideProps/ -let nextConfigContent let appPort let app @@ -85,30 +83,6 @@ describe('500 Page Support', () => { runTests('server') }) - describe.skip('serverless mode', () => { - beforeAll(async () => { - nextConfigContent = await fs.readFile(nextConfig, 'utf8') - await fs.writeFile( - nextConfig, - ` - module.exports = { - target: 'serverless' - } - ` - ) - await fs.remove(join(appDir, '.next')) - await nextBuild(appDir) - appPort = await findPort() - app = await nextStart(appDir, appPort) - }) - afterAll(async () => { - await fs.writeFile(nextConfig, nextConfigContent) - await killApp(app) - }) - - runTests('serverless') - }) - it('does not build 500 statically with getInitialProps in _app', async () => { await fs.writeFile( pagesApp, diff --git a/test/integration/amphtml-ssg/test/index.test.js b/test/integration/amphtml-ssg/test/index.test.js index 550543a7ede43c..ba0bb9abe3e58b 100644 --- a/test/integration/amphtml-ssg/test/index.test.js +++ b/test/integration/amphtml-ssg/test/index.test.js @@ -15,7 +15,6 @@ import { } from 'next-test-utils' const appDir = join(__dirname, '../') -const nextConfig = join(appDir, 'next.config.js') let builtServerPagesDir let appPort let app @@ -99,27 +98,6 @@ const runTests = (isDev = false) => { } describe('AMP SSG Support', () => { - describe.skip('serverless mode', () => { - beforeAll(async () => { - await fs.writeFile( - nextConfig, - ` - module.exports = { - target: 'experimental-serverless-trace' - } - ` - ) - await nextBuild(appDir) - appPort = await findPort() - app = await nextStart(appDir, appPort) - builtServerPagesDir = join(appDir, '.next/serverless/pages') - }) - afterAll(async () => { - await fs.remove(nextConfig) - await killApp(app) - }) - runTests() - }) describe('server mode', () => { beforeAll(async () => { await nextBuild(appDir) diff --git a/test/integration/api-catch-all/test/index.test.js b/test/integration/api-catch-all/test/index.test.js index ce96d97e357b52..696465cdc0c6c8 100644 --- a/test/integration/api-catch-all/test/index.test.js +++ b/test/integration/api-catch-all/test/index.test.js @@ -1,5 +1,4 @@ /* eslint-env jest */ -import fs from 'fs-extra' import { join } from 'path' import { killApp, @@ -11,7 +10,6 @@ import { } from 'next-test-utils' const appDir = join(__dirname, '../') -const nextConfig = join(appDir, 'next.config.js') let appPort let app @@ -72,22 +70,4 @@ describe('API routes', () => { runTests() }) - - describe.skip('Serverless support', () => { - beforeAll(async () => { - await fs.writeFile( - nextConfig, - `module.exports = { target: 'serverless' }` - ) - await nextBuild(appDir) - appPort = await findPort() - app = await nextStart(appDir, appPort) - }) - afterAll(async () => { - await killApp(app) - await fs.remove(nextConfig) - }) - - runTests() - }) }) diff --git a/test/integration/api-support/test/index.test.js b/test/integration/api-support/test/index.test.js index 30ba7f9513f78b..4b5004c2f2ffdc 100644 --- a/test/integration/api-support/test/index.test.js +++ b/test/integration/api-support/test/index.test.js @@ -19,7 +19,6 @@ import { import json from '../big.json' const appDir = join(__dirname, '../') -const nextConfig = join(appDir, 'next.config.js') let appPort let stderr let mode @@ -619,23 +618,4 @@ describe('API routes', () => { runTests() }) - - describe.skip('Serverless support', () => { - beforeAll(async () => { - await fs.writeFile( - nextConfig, - `module.exports = { target: 'serverless' }` - ) - await nextBuild(appDir) - mode = 'serverless' - appPort = await findPort() - app = await nextStart(appDir, appPort) - }) - afterAll(async () => { - await killApp(app) - await fs.remove(nextConfig) - }) - - runTests() - }) }) diff --git a/test/integration/app-tree/test/index.test.js b/test/integration/app-tree/test/index.test.js index 35a8a506ad8c92..724be1cf6ebcb6 100644 --- a/test/integration/app-tree/test/index.test.js +++ b/test/integration/app-tree/test/index.test.js @@ -1,7 +1,6 @@ /* eslint-env jest */ import path from 'path' -import fs from 'fs-extra' import webdriver from 'next-webdriver' import { nextBuild, @@ -14,7 +13,6 @@ import { } from 'next-test-utils' const appDir = path.join(__dirname, '..') -const nextConfig = path.join(appDir, 'next.config.js') let appPort let app @@ -68,21 +66,4 @@ describe('AppTree', () => { afterAll(() => killApp(app)) runTests() }) - - describe.skip('serverless mode', () => { - beforeAll(async () => { - await fs.writeFile( - nextConfig, - `module.exports = { target: 'serverless' }` - ) - await nextBuild(appDir) - appPort = await findPort() - app = await nextStart(appDir, appPort) - }) - afterAll(async () => { - await killApp(app) - await fs.remove(nextConfig) - }) - runTests() - }) }) diff --git a/test/integration/async-modules/next.config.js b/test/integration/async-modules/next.config.js index 1feb3213bb2088..6951c7f67ad59a 100644 --- a/test/integration/async-modules/next.config.js +++ b/test/integration/async-modules/next.config.js @@ -1,5 +1,4 @@ module.exports = { - // target: 'experimental-serverless-trace', webpack: (config) => { config.experiments = config.experiments || {} config.experiments.topLevelAwait = true diff --git a/test/integration/async-modules/test/index.test.js b/test/integration/async-modules/test/index.test.js index cdae323f56e9c0..a878641652ab76 100644 --- a/test/integration/async-modules/test/index.test.js +++ b/test/integration/async-modules/test/index.test.js @@ -11,7 +11,6 @@ import { launchApp, nextBuild, nextStart, - File, check, } from 'next-test-utils' import { join } from 'path' @@ -19,7 +18,6 @@ import { join } from 'path' let app let appPort const appDir = join(__dirname, '../') -const nextConfig = new File(join(appDir, 'next.config.js')) function runTests(dev = false) { it('ssr async page modules', async () => { @@ -130,19 +128,4 @@ describe('Async modules', () => { runTests() }) - - describe.skip('serverless mode', () => { - beforeAll(async () => { - nextConfig.replace('// target:', 'target:') - await nextBuild(appDir) - appPort = await findPort() - app = await nextStart(appDir, appPort) - }) - afterAll(async () => { - await nextConfig.restore() - await killApp(app) - }) - - runTests() - }) }) diff --git a/test/integration/auto-export-error-bail/test/index.test.js b/test/integration/auto-export-error-bail/test/index.test.js index ebba608acd5485..ff0752b0934478 100644 --- a/test/integration/auto-export-error-bail/test/index.test.js +++ b/test/integration/auto-export-error-bail/test/index.test.js @@ -1,11 +1,9 @@ /* eslint-env jest */ import path from 'path' -import fs from 'fs-extra' import { nextBuild } from 'next-test-utils' const appDir = path.join(__dirname, '..') -const nextConfig = path.join(appDir, 'next.config.js') const runTests = () => { it('should not opt-out of auto static optimization from invalid _error', async () => { @@ -35,20 +33,4 @@ describe('Auto Export _error bail', () => { describe('server mode', () => { runTests() }) - - describe.skip('serverless mode', () => { - beforeAll(() => - fs.writeFile( - nextConfig, - ` - module.exports = { - target: 'experimental-serverless-trace' - } - ` - ) - ) - afterAll(() => fs.remove(nextConfig)) - - runTests() - }) }) diff --git a/test/integration/auto-export-query-error/next.config.js b/test/integration/auto-export-query-error/next.config.js index a770f34bd27e5b..3151758a38e9c1 100644 --- a/test/integration/auto-export-query-error/next.config.js +++ b/test/integration/auto-export-query-error/next.config.js @@ -1,5 +1,4 @@ module.exports = { - // target: 'serverless', exportPathMap() { return { '/': { page: '/hello', query: { first: 'second' } }, diff --git a/test/integration/auto-export-query-error/test/index.test.js b/test/integration/auto-export-query-error/test/index.test.js index 696f9b725c685d..95a1e8e5c46729 100644 --- a/test/integration/auto-export-query-error/test/index.test.js +++ b/test/integration/auto-export-query-error/test/index.test.js @@ -1,12 +1,10 @@ /* eslint-env jest */ import path from 'path' -import fs from 'fs-extra' import { nextBuild, nextExport } from 'next-test-utils' const appDir = path.join(__dirname, '..') const outdir = path.join(__dirname, 'out') -const nextConfig = path.join(appDir, 'next.config.js') let stderr let exitCode @@ -23,8 +21,6 @@ const runTests = () => { }) } -let origNextConfig - describe('Auto Export', () => { describe('server mode', () => { beforeAll(async () => { @@ -40,23 +36,4 @@ describe('Auto Export', () => { runTests() }) - - describe.skip('serverless mode', () => { - beforeAll(async () => { - origNextConfig = await fs.readFile(nextConfig, 'utf8') - await nextBuild(appDir) - const { stderr: curStderr, code: curCode } = await nextExport( - appDir, - { outdir }, - { stderr: true } - ) - stderr = curStderr - exitCode = curCode - }) - afterAll(async () => { - await fs.writeFile(nextConfig, origNextConfig) - }) - - runTests() - }) }) diff --git a/test/integration/auto-export-serverless-error/next.config.js b/test/integration/auto-export-serverless-error/next.config.js deleted file mode 100644 index f0b0ae02419782..00000000000000 --- a/test/integration/auto-export-serverless-error/next.config.js +++ /dev/null @@ -1,3 +0,0 @@ -module.exports = { - target: 'serverless', -} diff --git a/test/integration/auto-export-serverless-error/pages/index.js b/test/integration/auto-export-serverless-error/pages/index.js deleted file mode 100644 index 2cb3b6bb5afb43..00000000000000 --- a/test/integration/auto-export-serverless-error/pages/index.js +++ /dev/null @@ -1,2 +0,0 @@ -// eslint-disable-next-line -export default () => something.error diff --git a/test/integration/auto-export-serverless-error/test/index.test.js b/test/integration/auto-export-serverless-error/test/index.test.js deleted file mode 100644 index 3e12333ba53c76..00000000000000 --- a/test/integration/auto-export-serverless-error/test/index.test.js +++ /dev/null @@ -1,21 +0,0 @@ -/* eslint-env jest */ - -import fs from 'fs' -import path from 'path' -import { nextBuild } from 'next-test-utils' - -const appDir = path.join(__dirname, '..') - -describe.skip('Auto Export Error Serverless', () => { - it('fails to emit the page', async () => { - const { stderr } = await nextBuild(appDir, [], { - stderr: true, - }) - - expect( - fs.existsSync(path.join(appDir, '.next/serverless/pages/index.html')) - ).toBe(false) - expect(stderr).toContain('ReferenceError') - expect(stderr).toContain('Build error occurred') - }) -}) diff --git a/test/integration/auto-export-serverless/next.config.js b/test/integration/auto-export-serverless/next.config.js deleted file mode 100644 index f0b0ae02419782..00000000000000 --- a/test/integration/auto-export-serverless/next.config.js +++ /dev/null @@ -1,3 +0,0 @@ -module.exports = { - target: 'serverless', -} diff --git a/test/integration/auto-export-serverless/pages/[post].js b/test/integration/auto-export-serverless/pages/[post].js deleted file mode 100644 index 94492b467fa511..00000000000000 --- a/test/integration/auto-export-serverless/pages/[post].js +++ /dev/null @@ -1,7 +0,0 @@ -import { useRouter } from 'next/router' - -export default () => { - const { query } = useRouter() - - return

post: {query.post}

-} diff --git a/test/integration/auto-export-serverless/test/index.test.js b/test/integration/auto-export-serverless/test/index.test.js deleted file mode 100644 index bc170fe8249d89..00000000000000 --- a/test/integration/auto-export-serverless/test/index.test.js +++ /dev/null @@ -1,25 +0,0 @@ -/* eslint-env jest */ - -import webdriver from 'next-webdriver' -import path from 'path' -import { nextBuild, nextStart, findPort, killApp } from 'next-test-utils' - -const appDir = path.join(__dirname, '..') -let appPort -let app - -describe.skip('Auto Export Serverless', () => { - it('Refreshes query on mount', async () => { - await nextBuild(appDir) - appPort = await findPort() - app = await nextStart(appDir, appPort) - - const browser = await webdriver(appPort, '/post-1') - const html = await browser.eval('document.body.innerHTML') - expect(html).toMatch(/post.*post-1/) - expect(html).toMatch(/nextExport/) - - await killApp(app) - await browser.close() - }) -}) diff --git a/test/integration/basepath-root-catch-all/next.config.js b/test/integration/basepath-root-catch-all/next.config.js index acffd20df397d6..ee95502b605d33 100644 --- a/test/integration/basepath-root-catch-all/next.config.js +++ b/test/integration/basepath-root-catch-all/next.config.js @@ -1,4 +1,3 @@ module.exports = { - // target: 'experimental-serverless-trace', basePath: '/docs', } diff --git a/test/integration/basepath-root-catch-all/test/index.test.js b/test/integration/basepath-root-catch-all/test/index.test.js index 0c41258387e636..6af60f1f2d4ef5 100644 --- a/test/integration/basepath-root-catch-all/test/index.test.js +++ b/test/integration/basepath-root-catch-all/test/index.test.js @@ -3,7 +3,6 @@ import { findPort, killApp, nextStart, - File, launchApp, } from 'next-test-utils' import webdriver from 'next-webdriver' @@ -15,7 +14,6 @@ let app let appPort let buildId const appDir = join(__dirname, '..') -const nextConfig = new File(join(appDir, 'next.config.js')) const runTests = () => { it('should use correct data URL for root catch-all', async () => { @@ -50,18 +48,3 @@ describe('production mode', () => { afterAll(() => killApp(app)) runTests() }) - -describe.skip('serverless mode', () => { - beforeAll(async () => { - nextConfig.replace('// target', 'target') - await nextBuild(appDir) - buildId = await fs.readFile(join(appDir, '.next/BUILD_ID'), 'utf8') - appPort = await findPort() - app = await nextStart(appDir, appPort) - }) - afterAll(async () => { - nextConfig.restore() - await killApp(app) - }) - runTests() -}) diff --git a/test/integration/bigint/test/index.test.js b/test/integration/bigint/test/index.test.js index 51a57c232559f3..c04ad1424fc5fe 100644 --- a/test/integration/bigint/test/index.test.js +++ b/test/integration/bigint/test/index.test.js @@ -54,22 +54,4 @@ describe('bigint API route support', () => { runTests() }) - - describe.skip('serverless mode', () => { - beforeAll(async () => { - await fs.writeFile( - nextConfig, - `module.exports = { target: 'serverless' }` - ) - await nextBuild(appDir) - appPort = await findPort() - app = await nextStart(appDir, appPort) - }) - afterAll(async () => { - await killApp(app) - await fs.remove(nextConfig) - }) - - runTests() - }) }) diff --git a/test/integration/catches-missing-getStaticProps/test/index.test.js b/test/integration/catches-missing-getStaticProps/test/index.test.js index 9afc574ebfb147..d8ffd2fe8b964f 100644 --- a/test/integration/catches-missing-getStaticProps/test/index.test.js +++ b/test/integration/catches-missing-getStaticProps/test/index.test.js @@ -1,7 +1,6 @@ /* eslint-env jest */ import { join } from 'path' -import fs from 'fs-extra' import { renderViaHTTP, nextBuild, @@ -11,12 +10,9 @@ import { } from 'next-test-utils' const appDir = join(__dirname, '../') -const nextConfig = join(appDir, 'next.config.js') const errorRegex = /getStaticPaths was added without a getStaticProps in/ describe('Catches Missing getStaticProps', () => { - afterAll(() => fs.remove(nextConfig)) - it('should catch it in dev mode', async () => { const appPort = await findPort() const app = await launchApp(appDir, appPort) @@ -27,19 +23,6 @@ describe('Catches Missing getStaticProps', () => { }) it('should catch it in server build mode', async () => { - await fs.remove(nextConfig) - const { stderr } = await nextBuild(appDir, [], { - stderr: true, - }) - expect(stderr).toMatch(errorRegex) - }) - - it('should catch it in serverless mode', async () => { - await fs.writeFile( - nextConfig, - `module.exports = { target: 'serverless' }`, - 'utf8' - ) const { stderr } = await nextBuild(appDir, [], { stderr: true, }) diff --git a/test/integration/clean-distdir/test/index.test.js b/test/integration/clean-distdir/test/index.test.js index 3d0e70c5e9af4f..adc49f446cc65d 100644 --- a/test/integration/clean-distdir/test/index.test.js +++ b/test/integration/clean-distdir/test/index.test.js @@ -33,25 +33,6 @@ describe('Cleaning distDir', () => { runTests() }) - describe.skip('serverless mode', () => { - beforeAll(async () => { - nextConfigContent = await fs.readFile(nextConfig, 'utf8') - await fs.writeFile( - nextConfig, - ` - module.exports = { - target: 'serverless' - } - ` - ) - }) - afterAll(async () => { - await fs.writeFile(nextConfig, nextConfigContent) - }) - - runTests() - }) - describe('disabled write', () => { beforeAll(async () => { nextConfigContent = await fs.readFile(nextConfig, 'utf8') diff --git a/test/integration/config-experimental-warning/test/index.test.js b/test/integration/config-experimental-warning/test/index.test.js index 4f9b9c27b8c1e0..300a0a4f748e88 100644 --- a/test/integration/config-experimental-warning/test/index.test.js +++ b/test/integration/config-experimental-warning/test/index.test.js @@ -19,7 +19,6 @@ describe('Config Experimental Warning', () => { configFile.write(` module.exports = (phase, { defaultConfig }) => { return { - target: 'server', ...defaultConfig, } } @@ -32,7 +31,7 @@ describe('Config Experimental Warning', () => { it('should not show warning with config from object', async () => { configFile.write(` module.exports = { - target: 'server' + images: {}, } `) const { stderr } = await nextBuild(appDir, [], { stderr: true }) @@ -42,7 +41,6 @@ describe('Config Experimental Warning', () => { it('should show warning with config from object with experimental', async () => { configFile.write(` module.exports = { - target: 'server', experimental: { workerThreads: true } @@ -57,7 +55,6 @@ describe('Config Experimental Warning', () => { it('should show warning with config from function with experimental', async () => { configFile.write(` module.exports = (phase) => ({ - target: 'server', experimental: { workerThreads: true } @@ -72,7 +69,6 @@ describe('Config Experimental Warning', () => { it('should not show warning with default value', async () => { configFile.write(` module.exports = (phase) => ({ - target: 'server', experimental: { workerThreads: false } diff --git a/test/integration/critical-css/test/index.test.js b/test/integration/critical-css/test/index.test.js index f0b4aeb831cb55..f8d31c85ee4b53 100644 --- a/test/integration/critical-css/test/index.test.js +++ b/test/integration/critical-css/test/index.test.js @@ -77,21 +77,3 @@ describe('CSS optimization for SSR apps', () => { }) runTests() }) - -describe.skip('Font optimization for emulated serverless apps', () => { - beforeAll(async () => { - await fs.writeFile( - nextConfig, - `module.exports = { target: 'experimental-serverless-trace', experimental: {optimizeCss: true} }`, - 'utf8' - ) - await nextBuild(appDir) - appPort = await findPort() - app = await nextStart(appDir, appPort) - }) - afterAll(async () => { - await killApp(app) - await fs.remove(nextConfig) - }) - runTests() -}) diff --git a/test/integration/custom-error/test/index.test.js b/test/integration/custom-error/test/index.test.js index d3fa642ed55450..a519dbd86dd129 100644 --- a/test/integration/custom-error/test/index.test.js +++ b/test/integration/custom-error/test/index.test.js @@ -13,7 +13,6 @@ import { const appDir = join(__dirname, '..') const page404 = join(appDir, 'pages/404.js') -const nextConfig = join(appDir, 'next.config.js') let appPort let app @@ -102,22 +101,4 @@ describe('Custom _error', () => { runTests() }) - - describe.skip('serverless mode', () => { - beforeAll(async () => { - await fs.writeFile( - nextConfig, - `module.exports = { target: 'serverless' }` - ) - await nextBuild(appDir) - appPort = await findPort() - app = await nextStart(appDir, appPort) - }) - afterAll(async () => { - await killApp(app) - await fs.remove(nextConfig) - }) - - runTests() - }) }) diff --git a/test/integration/custom-page-extension/next.config.js b/test/integration/custom-page-extension/next.config.js index 9eb82eee1de095..d864815f9a70f6 100644 --- a/test/integration/custom-page-extension/next.config.js +++ b/test/integration/custom-page-extension/next.config.js @@ -1,4 +1,3 @@ module.exports = { - target: 'server', pageExtensions: ['page.js'], } diff --git a/test/integration/custom-page-extension/test/index.test.js b/test/integration/custom-page-extension/test/index.test.js index 5471699a83c6de..8ed1b5b63ddcf3 100644 --- a/test/integration/custom-page-extension/test/index.test.js +++ b/test/integration/custom-page-extension/test/index.test.js @@ -8,7 +8,6 @@ import { launchApp, killApp, renderViaHTTP, - File, } from 'next-test-utils' const appDir = join(__dirname, '..') @@ -46,19 +45,4 @@ describe('Custom page extension', () => { afterAll(() => killApp(app)) runTests() }) - - describe.skip('serverless mode', () => { - const nextConfig = new File(join(appDir, 'next.config.js')) - beforeAll(async () => { - nextConfig.replace('server', 'serverless') - await nextBuild(appDir) - appPort = await findPort() - app = await nextStart(appDir, appPort) - }) - afterAll(async () => { - await killApp(app) - nextConfig.restore() - }) - runTests() - }) }) diff --git a/test/integration/custom-routes/next.config.js b/test/integration/custom-routes/next.config.js index 1a06c977858879..8ffd186d8296ec 100644 --- a/test/integration/custom-routes/next.config.js +++ b/test/integration/custom-routes/next.config.js @@ -1,5 +1,4 @@ module.exports = { - // target: 'serverless', async rewrites() { // no-rewrites comment return { diff --git a/test/integration/custom-routes/test/index.test.js b/test/integration/custom-routes/test/index.test.js index 673e5ea34f37d4..5384aba34aa850 100644 --- a/test/integration/custom-routes/test/index.test.js +++ b/test/integration/custom-routes/test/index.test.js @@ -20,7 +20,6 @@ import { getBrowserBodyText, waitFor, normalizeRegEx, - initNextServerScript, nextExport, hasRedbox, check, @@ -2426,96 +2425,6 @@ describe('Custom routes', () => { }) }) - describe.skip('serverless mode', () => { - beforeAll(async () => { - nextConfigContent = await fs.readFile(nextConfigPath, 'utf8') - await fs.writeFile( - nextConfigPath, - nextConfigContent.replace(/\/\/ target/, 'target'), - 'utf8' - ) - const { stdout: buildStdout } = await nextBuild(appDir, ['-d'], { - stdout: true, - }) - stdout = buildStdout - appPort = await findPort() - app = await nextStart(appDir, appPort, { - onStdout: (msg) => { - stdout += msg - }, - }) - buildId = await fs.readFile(join(appDir, '.next/BUILD_ID'), 'utf8') - }) - afterAll(async () => { - await fs.writeFile(nextConfigPath, nextConfigContent, 'utf8') - await killApp(app) - }) - - runTests() - }) - - describe.skip('raw serverless mode', () => { - beforeAll(async () => { - nextConfigContent = await fs.readFile(nextConfigPath, 'utf8') - await fs.writeFile( - nextConfigPath, - nextConfigContent.replace(/\/\/ target/, 'target'), - 'utf8' - ) - await nextBuild(appDir) - - appPort = await findPort() - app = await initNextServerScript(join(appDir, 'server.js'), /ready on/, { - ...process.env, - PORT: appPort, - }) - }) - afterAll(async () => { - await fs.writeFile(nextConfigPath, nextConfigContent, 'utf8') - await killApp(app) - }) - - it('should apply rewrites in lambda correctly for page route', async () => { - const html = await renderViaHTTP(appPort, '/query-rewrite/first/second') - const data = JSON.parse(cheerio.load(html)('p').text()) - expect(data).toEqual({ - first: 'first', - second: 'second', - section: 'first', - name: 'second', - }) - }) - - it('should apply rewrites in lambda correctly for dynamic route', async () => { - const html = await renderViaHTTP(appPort, '/blog/post-1') - expect(html).toContain('post-2') - }) - - it('should apply rewrites in lambda correctly for API route', async () => { - const data = JSON.parse( - await renderViaHTTP(appPort, '/api-hello-param/first') - ) - expect(data).toEqual({ - query: { - name: 'first', - hello: 'first', - }, - }) - }) - - it('should apply rewrites in lambda correctly for dynamic API route', async () => { - const data = JSON.parse( - await renderViaHTTP(appPort, '/api-dynamic-param/first') - ) - expect(data).toEqual({ - query: { - slug: 'first', - hello: 'first', - }, - }) - }) - }) - describe('should load custom routes when only one type is used', () => { const runSoloTests = (isDev) => { const buildAndStart = async () => { diff --git a/test/integration/dynamic-optional-routing-root-fallback/test/index.test.js b/test/integration/dynamic-optional-routing-root-fallback/test/index.test.js index 0454e0c1437669..7f4ace18698bf4 100644 --- a/test/integration/dynamic-optional-routing-root-fallback/test/index.test.js +++ b/test/integration/dynamic-optional-routing-root-fallback/test/index.test.js @@ -81,29 +81,4 @@ describe('Dynamic Optional Routing Root Fallback', () => { runTests() }) - - describe.skip('serverless mode', () => { - let origNextConfig - - beforeAll(async () => { - await fs.remove(join(appDir, '.next')) - - origNextConfig = await fs.readFile(nextConfig, 'utf8') - await fs.writeFile( - nextConfig, - `module.exports = { target: 'serverless' }` - ) - - await nextBuild(appDir) - - appPort = await findPort() - app = await nextStart(appDir, appPort) - }) - afterAll(async () => { - await fs.writeFile(nextConfig, origNextConfig) - await killApp(app) - }) - - runTests() - }) }) diff --git a/test/integration/dynamic-optional-routing-root-static-paths/test/index.test.js b/test/integration/dynamic-optional-routing-root-static-paths/test/index.test.js index 05ebed2c19515f..c396dbfccffd32 100644 --- a/test/integration/dynamic-optional-routing-root-static-paths/test/index.test.js +++ b/test/integration/dynamic-optional-routing-root-static-paths/test/index.test.js @@ -65,27 +65,4 @@ describe('Dynamic Optional Routing', () => { runTests() }) - - describe.skip('serverless mode', () => { - let origNextConfig - - beforeAll(async () => { - origNextConfig = await fs.readFile(nextConfig, 'utf8') - await fs.writeFile( - nextConfig, - `module.exports = { target: 'serverless' }` - ) - - await nextBuild(appDir) - - appPort = await findPort() - app = await nextStart(appDir, appPort) - }) - afterAll(async () => { - await fs.writeFile(nextConfig, origNextConfig) - await killApp(app) - }) - - runTests() - }) }) diff --git a/test/integration/dynamic-optional-routing/test/index.test.js b/test/integration/dynamic-optional-routing/test/index.test.js index 84343a283acaa2..f3b8bff63d1802 100644 --- a/test/integration/dynamic-optional-routing/test/index.test.js +++ b/test/integration/dynamic-optional-routing/test/index.test.js @@ -11,7 +11,6 @@ import { nextStart, renderViaHTTP, check, - initNextServerScript, } from 'next-test-utils' import { join } from 'path' @@ -313,133 +312,4 @@ describe('Dynamic Optional Routing', () => { } }) }) - - describe.skip('serverless mode', () => { - let origNextConfig - - beforeAll(async () => { - origNextConfig = await fs.readFile(nextConfig, 'utf8') - await fs.writeFile( - nextConfig, - `module.exports = { target: 'experimental-serverless-trace' }` - ) - - await nextBuild(appDir) - - appPort = await findPort() - app = await nextStart(appDir, appPort) - }) - afterAll(async () => { - await fs.writeFile(nextConfig, origNextConfig) - await killApp(app) - }) - runTests() - }) - - describe.skip('raw serverless mode', () => { - let origNextConfig - - beforeAll(async () => { - origNextConfig = await fs.readFile(nextConfig, 'utf8') - await fs.writeFile( - nextConfig, - `module.exports = { target: 'experimental-serverless-trace' }` - ) - - await nextBuild(appDir) - - appPort = await findPort() - app = await initNextServerScript(join(appDir, 'server.js'), /ready on/, { - ...process.env, - PORT: appPort, - }) - }) - afterAll(async () => { - await fs.writeFile(nextConfig, origNextConfig) - await killApp(app) - }) - - const render = (path, query) => { - return fetchViaHTTP(appPort, path, query, { - headers: { - // force relying on query values - 'x-vercel-id': 'hi', - }, - }).then((res) => res.text()) - } - - it('should render normal (non-dynamic) page', async () => { - const html = await render('/about') - const $ = cheerio.load(html) - expect($('#content').text()).toBe('about') - }) - - it('should render top level optional catch-all root', async () => { - const html = await render('/', { optionalName: '' }) - const $ = cheerio.load(html) - expect($('#route').text()).toBe('top level route param: undefined') - expect($('#keys').text()).toBe('[]') - expect($('#asPath').text()).toBe('/') - }) - - it('should render top level optional catch-all one level', async () => { - const html = await render('/hello', { optionalName: 'hello' }) - const $ = cheerio.load(html) - expect($('#route').text()).toBe('top level route param: [hello]') - expect($('#keys').text()).toBe('["optionalName"]') - expect($('#asPath').text()).toBe('/hello') - }) - - it('should render top level optional catch-all two levels', async () => { - const html = await render('/hello/world', { optionalName: 'hello/world' }) - const $ = cheerio.load(html) - expect($('#route').text()).toBe('top level route param: [hello|world]') - expect($('#keys').text()).toBe('["optionalName"]') - expect($('#asPath').text()).toBe('/hello/world') - }) - - it('should render nested optional catch-all root', async () => { - const html = await render('/nested', { optionalName: '' }) - const $ = cheerio.load(html) - expect($('#route').text()).toBe('nested route param: undefined') - expect($('#keys').text()).toBe('[]') - expect($('#asPath').text()).toBe('/nested') - }) - - it('should render nested optional catch-all one level', async () => { - const html = await render('/nested/hello', { optionalName: 'hello' }) - const $ = cheerio.load(html) - expect($('#route').text()).toBe('nested route param: [hello]') - expect($('#keys').text()).toBe('["optionalName"]') - expect($('#asPath').text()).toBe('/nested/hello') - }) - - it('should render nested optional catch-all two levels', async () => { - const html = await render('/nested/hello/world', { - optionalName: 'hello/world', - }) - const $ = cheerio.load(html) - expect($('#route').text()).toBe('nested route param: [hello|world]') - expect($('#keys').text()).toBe('["optionalName"]') - expect($('#asPath').text()).toBe('/nested/hello/world') - }) - - it('should render optional catch-all api root', async () => { - const text = await render('/api/post', { slug: '' }) - const data = JSON.parse(text) - expect(data).toEqual({}) - }) - - it('should render optional catch-all api root one level', async () => { - const text = await render('/api/post/hello', { slug: 'hello' }) - const data = JSON.parse(text) - expect(data).toEqual({ slug: ['hello'] }) - }) - - it('should render optional catch-all api root two levels', async () => { - const text = await render('/api/post/hello', { slug: 'hello/world' }) - const data = JSON.parse(text) - expect(data).toEqual({ slug: ['hello', 'world'] }) - }) - }) }) diff --git a/test/integration/dynamic-routing/test/index.test.js b/test/integration/dynamic-routing/test/index.test.js index efe6d13f512c59..6866e9ba7699ca 100644 --- a/test/integration/dynamic-routing/test/index.test.js +++ b/test/integration/dynamic-routing/test/index.test.js @@ -27,7 +27,7 @@ let buildId const appDir = join(__dirname, '../') const buildIdPath = join(appDir, '.next/BUILD_ID') -function runTests({ dev, serverless }) { +function runTests({ dev }) { if (!dev) { it('should have correct cache entries on prefetch', async () => { const browser = await webdriver(appPort, '/') @@ -1429,42 +1429,40 @@ function runTests({ dev, serverless }) { }) }) - if (!serverless) { - it('should output a pages-manifest correctly', async () => { - const manifest = await fs.readJson( - join(appDir, '.next/server/pages-manifest.json') - ) + it('should output a pages-manifest correctly', async () => { + const manifest = await fs.readJson( + join(appDir, '.next/server/pages-manifest.json') + ) - expect(manifest).toEqual({ - '/[name]/[comment]': 'pages/[name]/[comment].js', - '/[name]/comments': 'pages/[name]/comments.js', - '/[name]': 'pages/[name].js', - '/[name]/on-mount-redir': 'pages/[name]/on-mount-redir.html', - '/another': 'pages/another.html', - '/b/[123]': 'pages/b/[123].js', - '/blog/[name]/comment/[id]': 'pages/blog/[name]/comment/[id].js', - '/c/[alongparamnameshouldbeallowedeventhoughweird]': - 'pages/c/[alongparamnameshouldbeallowedeventhoughweird].js', - '/catchall-dash/[...hello-world]': - 'pages/catchall-dash/[...hello-world].html', - '/d/[id]': 'pages/d/[id].html', - '/dash/[hello-world]': 'pages/dash/[hello-world].html', - '/': 'pages/index.html', - '/index/[...slug]': 'pages/index/[...slug].html', - '/on-mount/[post]': 'pages/on-mount/[post].html', - '/p1/p2/all-ssg/[...rest]': 'pages/p1/p2/all-ssg/[...rest].js', - '/p1/p2/all-ssr/[...rest]': 'pages/p1/p2/all-ssr/[...rest].js', - '/p1/p2/nested-all-ssg/[...rest]': - 'pages/p1/p2/nested-all-ssg/[...rest].js', - '/p1/p2/predefined-ssg/[...rest]': - 'pages/p1/p2/predefined-ssg/[...rest].js', - '/_app': 'pages/_app.js', - '/_error': 'pages/_error.js', - '/_document': 'pages/_document.js', - '/404': 'pages/404.html', - }) + expect(manifest).toEqual({ + '/[name]/[comment]': 'pages/[name]/[comment].js', + '/[name]/comments': 'pages/[name]/comments.js', + '/[name]': 'pages/[name].js', + '/[name]/on-mount-redir': 'pages/[name]/on-mount-redir.html', + '/another': 'pages/another.html', + '/b/[123]': 'pages/b/[123].js', + '/blog/[name]/comment/[id]': 'pages/blog/[name]/comment/[id].js', + '/c/[alongparamnameshouldbeallowedeventhoughweird]': + 'pages/c/[alongparamnameshouldbeallowedeventhoughweird].js', + '/catchall-dash/[...hello-world]': + 'pages/catchall-dash/[...hello-world].html', + '/d/[id]': 'pages/d/[id].html', + '/dash/[hello-world]': 'pages/dash/[hello-world].html', + '/': 'pages/index.html', + '/index/[...slug]': 'pages/index/[...slug].html', + '/on-mount/[post]': 'pages/on-mount/[post].html', + '/p1/p2/all-ssg/[...rest]': 'pages/p1/p2/all-ssg/[...rest].js', + '/p1/p2/all-ssr/[...rest]': 'pages/p1/p2/all-ssr/[...rest].js', + '/p1/p2/nested-all-ssg/[...rest]': + 'pages/p1/p2/nested-all-ssg/[...rest].js', + '/p1/p2/predefined-ssg/[...rest]': + 'pages/p1/p2/predefined-ssg/[...rest].js', + '/_app': 'pages/_app.js', + '/_error': 'pages/_error.js', + '/_document': 'pages/_document.js', + '/404': 'pages/404.html', }) - } + }) } } @@ -1498,7 +1496,7 @@ describe('Dynamic Routing', () => { }) afterAll(() => killApp(app)) - runTests({ dev: true, serverless: false }) + runTests({ dev: true }) }) describe('production mode', () => { @@ -1513,6 +1511,6 @@ describe('Dynamic Routing', () => { }) afterAll(() => killApp(app)) - runTests({ dev: false, serverless: false }) + runTests({ dev: false }) }) }) diff --git a/test/integration/env-config/test/index.test.js b/test/integration/env-config/test/index.test.js index f6c0571ede8dbf..464eb924da7eff 100644 --- a/test/integration/env-config/test/index.test.js +++ b/test/integration/env-config/test/index.test.js @@ -384,60 +384,4 @@ describe('Env Config', () => { runTests('server') }) - - describe.skip('serverless mode', () => { - let nextConfigContent = '' - const nextConfigPath = join(appDir, 'next.config.js') - const envFiles = [ - '.env', - '.env.development', - '.env.development.local', - '.env.local', - '.env.production', - '.env.production.local', - '.env.test', - '.env.test.local', - ].map((file) => join(appDir, file)) - - beforeAll(async () => { - nextConfigContent = await fs.readFile(nextConfigPath, 'utf8') - await fs.writeFile( - nextConfigPath, - nextConfigContent.replace( - '// update me', - `target: 'experimental-serverless-trace',` - ) - ) - const { code } = await nextBuild(appDir, [], { - env: { - PROCESS_ENV_KEY: 'processenvironment', - ENV_FILE_PROCESS_ENV: 'env-cli', - }, - }) - - if (code !== 0) throw new Error(`Build failed with exit code ${code}`) - appPort = await findPort() - - // rename the files so they aren't loaded by `next start` - // to test that they were bundled into the serverless files - for (const file of envFiles) { - await fs.rename(file, `${file}.bak`) - } - - app = await nextStart(appDir, appPort, { - env: { - ENV_FILE_PROCESS_ENV: 'env-cli', - }, - }) - }) - afterAll(async () => { - for (const file of envFiles) { - await fs.rename(`${file}.bak`, file) - } - await fs.writeFile(nextConfigPath, nextConfigContent) - await killApp(app) - }) - - runTests('serverless') - }) }) diff --git a/test/integration/export-default-map-serverless/next.config.js b/test/integration/export-default-map-serverless/next.config.js deleted file mode 100644 index f0b0ae02419782..00000000000000 --- a/test/integration/export-default-map-serverless/next.config.js +++ /dev/null @@ -1,3 +0,0 @@ -module.exports = { - target: 'serverless', -} diff --git a/test/integration/export-default-map-serverless/pages/docs/index.js b/test/integration/export-default-map-serverless/pages/docs/index.js deleted file mode 100644 index a9a0dda5d87e4e..00000000000000 --- a/test/integration/export-default-map-serverless/pages/docs/index.js +++ /dev/null @@ -1,5 +0,0 @@ -import { useAmp } from 'next/amp' - -export const config = { amp: 'hybrid' } - -export default () =>

I'm an {useAmp() ? 'AMP' : 'normal'} page

diff --git a/test/integration/export-default-map-serverless/pages/index.js b/test/integration/export-default-map-serverless/pages/index.js deleted file mode 100644 index 75c983e69e85b6..00000000000000 --- a/test/integration/export-default-map-serverless/pages/index.js +++ /dev/null @@ -1,2 +0,0 @@ -export default () =>

Simple hybrid amp/non-amp page

-export const config = { amp: 'hybrid' } diff --git a/test/integration/export-default-map-serverless/pages/info.js b/test/integration/export-default-map-serverless/pages/info.js deleted file mode 100644 index a9a0dda5d87e4e..00000000000000 --- a/test/integration/export-default-map-serverless/pages/info.js +++ /dev/null @@ -1,5 +0,0 @@ -import { useAmp } from 'next/amp' - -export const config = { amp: 'hybrid' } - -export default () =>

I'm an {useAmp() ? 'AMP' : 'normal'} page

diff --git a/test/integration/export-default-map-serverless/pages/just-amp/index.js b/test/integration/export-default-map-serverless/pages/just-amp/index.js deleted file mode 100644 index 332a64770b8685..00000000000000 --- a/test/integration/export-default-map-serverless/pages/just-amp/index.js +++ /dev/null @@ -1,2 +0,0 @@ -export default () =>

I am an AMP only page

-export const config = { amp: true } diff --git a/test/integration/export-default-map-serverless/pages/some.js b/test/integration/export-default-map-serverless/pages/some.js deleted file mode 100644 index 76b8930bd6f465..00000000000000 --- a/test/integration/export-default-map-serverless/pages/some.js +++ /dev/null @@ -1,3 +0,0 @@ -export const config = { amp: 'hybrid' } - -export default () =>

I'm an AMP page

diff --git a/test/integration/export-default-map-serverless/pages/v1.12/docs.js b/test/integration/export-default-map-serverless/pages/v1.12/docs.js deleted file mode 100644 index 569e62008df65d..00000000000000 --- a/test/integration/export-default-map-serverless/pages/v1.12/docs.js +++ /dev/null @@ -1,3 +0,0 @@ -export default function Docs(props) { - return
Hello again ๐Ÿ‘‹
-} diff --git a/test/integration/export-default-map-serverless/pages/v1.12/index.js b/test/integration/export-default-map-serverless/pages/v1.12/index.js deleted file mode 100644 index 6a9540f9efec55..00000000000000 --- a/test/integration/export-default-map-serverless/pages/v1.12/index.js +++ /dev/null @@ -1,3 +0,0 @@ -export default function Index(props) { - return
Hello ๐Ÿ‘‹
-} diff --git a/test/integration/export-default-map-serverless/test/index.test.js b/test/integration/export-default-map-serverless/test/index.test.js deleted file mode 100644 index 210efe87c09d3d..00000000000000 --- a/test/integration/export-default-map-serverless/test/index.test.js +++ /dev/null @@ -1,65 +0,0 @@ -/* eslint-env jest */ - -import { promises } from 'fs' -import { join } from 'path' -import cheerio from 'cheerio' -import { nextBuild, nextExport } from 'next-test-utils' - -const { access, readFile } = promises -const appDir = join(__dirname, '../') -const outdir = join(appDir, 'out') - -describe('Export with default map', () => { - beforeAll(async () => { - await nextBuild(appDir) - await nextExport(appDir, { outdir }) - }) - - it('should export with folder that has dot in name', async () => { - expect.assertions(1) - await expect(access(join(outdir, 'v1.12.html'))).resolves.toBe(undefined) - }) - - it('should export an amp only page to clean path', async () => { - expect.assertions(1) - await expect(access(join(outdir, 'docs.html'))).resolves.toBe(undefined) - }) - - it('should export hybrid amp page correctly', async () => { - expect.assertions(2) - await expect(access(join(outdir, 'some.html'))).resolves.toBe(undefined) - await expect(access(join(outdir, 'some.amp.html'))).resolves.toBe(undefined) - }) - - it('should export nested hybrid amp page correctly', async () => { - expect.assertions(3) - await expect(access(join(outdir, 'docs.html'))).resolves.toBe(undefined) - await expect(access(join(outdir, 'docs.amp.html'))).resolves.toBe(undefined) - - const html = await readFile(join(outdir, 'docs.html')) - const $ = cheerio.load(html) - expect($('link[rel=amphtml]').attr('href')).toBe('/docs.amp') - }) - - it('should export nested hybrid amp page correctly with folder', async () => { - expect.assertions(3) - await expect(access(join(outdir, 'info.html'))).resolves.toBe(undefined) - await expect(access(join(outdir, 'info.amp.html'))).resolves.toBe(undefined) - - const html = await readFile(join(outdir, 'info.html')) - const $ = cheerio.load(html) - expect($('link[rel=amphtml]').attr('href')).toBe('/info.amp') - }) - - it('should export hybrid index amp page correctly', async () => { - expect.assertions(3) - await expect(access(join(outdir, 'index.html'))).resolves.toBe(undefined) - await expect(access(join(outdir, 'index.amp.html'))).resolves.toBe( - undefined - ) - - const html = await readFile(join(outdir, 'index.html')) - const $ = cheerio.load(html) - expect($('link[rel=amphtml]').attr('href')).toBe('/index.amp') - }) -}) diff --git a/test/integration/export-dynamic-pages-serverless/next.config.js b/test/integration/export-dynamic-pages-serverless/next.config.js deleted file mode 100644 index dd6fb6a25adc9d..00000000000000 --- a/test/integration/export-dynamic-pages-serverless/next.config.js +++ /dev/null @@ -1,8 +0,0 @@ -module.exports = { - target: 'serverless', - exportPathMap() { - return { - '/regression/jeff-is-cool': { page: '/regression/[slug]' }, - } - }, -} diff --git a/test/integration/export-dynamic-pages-serverless/pages/regression/[slug].js b/test/integration/export-dynamic-pages-serverless/pages/regression/[slug].js deleted file mode 100644 index 675fc6e844332d..00000000000000 --- a/test/integration/export-dynamic-pages-serverless/pages/regression/[slug].js +++ /dev/null @@ -1,13 +0,0 @@ -import { useRouter } from 'next/router' - -function Regression() { - const { asPath } = useRouter() - if (typeof window !== 'undefined') { - window.__AS_PATHS = [...new Set([...(window.__AS_PATHS || []), asPath])] - } - return
{asPath}
-} - -Regression.getInitialProps = () => ({}) - -export default Regression diff --git a/test/integration/export-dynamic-pages-serverless/test/index.test.js b/test/integration/export-dynamic-pages-serverless/test/index.test.js deleted file mode 100644 index 80224be06bfb5c..00000000000000 --- a/test/integration/export-dynamic-pages-serverless/test/index.test.js +++ /dev/null @@ -1,49 +0,0 @@ -/* eslint-env jest */ - -import { join } from 'path' -import cheerio from 'cheerio' -import webdriver from 'next-webdriver' -import { - nextBuild, - nextExport, - startCleanStaticServer, - stopApp, - renderViaHTTP, -} from 'next-test-utils' - -const appDir = join(__dirname, '../') -const outdir = join(appDir, 'out') - -describe('Export Dynamic Pages', () => { - let server - let port - beforeAll(async () => { - await nextBuild(appDir) - await nextExport(appDir, { outdir }) - - server = await startCleanStaticServer(outdir) - port = server.address().port - }) - - afterAll(async () => { - await stopApp(server) - }) - - it('should of exported with correct asPath', async () => { - const html = await renderViaHTTP(port, '/regression/jeff-is-cool') - const $ = cheerio.load(html) - expect($('#asPath').text()).toBe('/regression/jeff-is-cool') - }) - - it('should hydrate with correct asPath', async () => { - expect.assertions(1) - const browser = await webdriver(port, '/regression/jeff-is-cool') - try { - expect(await browser.eval(`window.__AS_PATHS`)).toEqual([ - '/regression/jeff-is-cool', - ]) - } finally { - await browser.close() - } - }) -}) diff --git a/test/integration/export-serverless/.gitignore b/test/integration/export-serverless/.gitignore deleted file mode 100644 index 3ec8dc5141d75f..00000000000000 --- a/test/integration/export-serverless/.gitignore +++ /dev/null @@ -1 +0,0 @@ -.next-dev diff --git a/test/integration/export-serverless/components/hello.js b/test/integration/export-serverless/components/hello.js deleted file mode 100644 index c39174c9dbc7ea..00000000000000 --- a/test/integration/export-serverless/components/hello.js +++ /dev/null @@ -1 +0,0 @@ -export default () =>

Welcome to dynamic imports.

diff --git a/test/integration/export-serverless/next.config.js b/test/integration/export-serverless/next.config.js deleted file mode 100644 index bbf005a73f207c..00000000000000 --- a/test/integration/export-serverless/next.config.js +++ /dev/null @@ -1,38 +0,0 @@ -const { PHASE_DEVELOPMENT_SERVER } = require('next/constants') - -module.exports = (phase) => { - return { - target: 'serverless', - distDir: phase === PHASE_DEVELOPMENT_SERVER ? '.next-dev' : '.next', - exportTrailingSlash: true, - exportPathMap: function () { - return { - '/': { page: '/' }, - '/about': { page: '/about' }, - '/button-link': { page: '/button-link' }, - '/get-initial-props-with-no-query': { - page: '/get-initial-props-with-no-query', - }, - '/counter': { page: '/counter' }, - '/dynamic-imports': { page: '/dynamic-imports' }, - '/dynamic': { page: '/dynamic', query: { text: 'cool dynamic text' } }, - '/dynamic/one': { - page: '/dynamic', - query: { text: 'next export is nice' }, - }, - '/dynamic/two': { - page: '/dynamic', - query: { text: 'Vercel is awesome' }, - }, - '/file-name.md': { - page: '/dynamic', - query: { text: 'this file has an extension' }, - }, - '/query': { page: '/query', query: { a: 'blue' } }, - '/query-update': { page: '/query-update', query: { a: 'blue' } }, - // API route - '/blog/nextjs/comment/test': { page: '/blog/[post]/comment/[id]' }, - } - }, // end exportPathMap - } -} diff --git a/test/integration/export-serverless/pages/about.js b/test/integration/export-serverless/pages/about.js deleted file mode 100644 index 54a0ac485413aa..00000000000000 --- a/test/integration/export-serverless/pages/about.js +++ /dev/null @@ -1,16 +0,0 @@ -import Link from 'next/link' - -const About = ({ bar }) => ( -
-
- Go Back -
-

{`This is the About page foo${bar || ''}`}

-
-) - -About.getInitialProps = async () => { - return { bar: typeof window === 'undefined' ? 'bar' : '' } -} - -export default About diff --git a/test/integration/export-serverless/pages/api/data.js b/test/integration/export-serverless/pages/api/data.js deleted file mode 100644 index 0484d94b2c5f2f..00000000000000 --- a/test/integration/export-serverless/pages/api/data.js +++ /dev/null @@ -1,3 +0,0 @@ -export default (req, res) => { - res.send('Hello World') -} diff --git a/test/integration/export-serverless/pages/blog/[post]/comment/[id].js b/test/integration/export-serverless/pages/blog/[post]/comment/[id].js deleted file mode 100644 index e23ec345283f54..00000000000000 --- a/test/integration/export-serverless/pages/blog/[post]/comment/[id].js +++ /dev/null @@ -1,16 +0,0 @@ -import { useRouter } from 'next/router' - -const Page = () => { - const router = useRouter() - const { post, id } = router.query - - return ( - <> -

{`Blog post ${post} comment ${id || '(all)'}`}

- - ) -} - -Page.getInitialProps = () => ({}) - -export default Page diff --git a/test/integration/export-serverless/pages/button-link.js b/test/integration/export-serverless/pages/button-link.js deleted file mode 100644 index 1f0c5540fe84ce..00000000000000 --- a/test/integration/export-serverless/pages/button-link.js +++ /dev/null @@ -1,12 +0,0 @@ -import Link from 'next/link' - -export default () => ( - -) diff --git a/test/integration/export-serverless/pages/counter.js b/test/integration/export-serverless/pages/counter.js deleted file mode 100644 index 6d3ceccf0ae361..00000000000000 --- a/test/integration/export-serverless/pages/counter.js +++ /dev/null @@ -1,27 +0,0 @@ -import React from 'react' -import Link from 'next/link' - -let counter = 0 - -export default class Counter extends React.Component { - increaseCounter() { - counter++ - this.forceUpdate() - } - - render() { - return ( -
-
- - Go Back - -
-

Counter: {counter}

- -
- ) - } -} diff --git a/test/integration/export-serverless/pages/dynamic-imports.js b/test/integration/export-serverless/pages/dynamic-imports.js deleted file mode 100644 index ec8f06e656e8a5..00000000000000 --- a/test/integration/export-serverless/pages/dynamic-imports.js +++ /dev/null @@ -1,13 +0,0 @@ -import Link from 'next/link' -import dynamic from 'next/dynamic' - -const DynamicComponent = dynamic(() => import('../components/hello')) - -export default () => ( -
-
- Go Back -
- -
-) diff --git a/test/integration/export-serverless/pages/dynamic.js b/test/integration/export-serverless/pages/dynamic.js deleted file mode 100644 index 3a0d4d426cdc70..00000000000000 --- a/test/integration/export-serverless/pages/dynamic.js +++ /dev/null @@ -1,31 +0,0 @@ -/* global location */ -import React from 'react' -import Link from 'next/link' - -export default class DynamicPage extends React.Component { - static getInitialProps({ query }) { - return { text: query.text } - } - - state = {} - - componentDidMount() { - const [, hash] = location.href.split('#') - this.setState({ hash }) - } - - render() { - const { text } = this.props - const { hash } = this.state - - return ( -
-
- Go Back -
-

{text}

-
Hash: {hash}
-
- ) - } -} diff --git a/test/integration/export-serverless/pages/get-initial-props-with-no-query.js b/test/integration/export-serverless/pages/get-initial-props-with-no-query.js deleted file mode 100644 index f7a7a1f8ec0bea..00000000000000 --- a/test/integration/export-serverless/pages/get-initial-props-with-no-query.js +++ /dev/null @@ -1,7 +0,0 @@ -const Page = ({ query }) =>
{`Query is: ${query}`}
- -Page.getInitialProps = ({ query }) => { - return { query: JSON.stringify(query) } -} - -export default Page diff --git a/test/integration/export-serverless/pages/index.js b/test/integration/export-serverless/pages/index.js deleted file mode 100644 index 7948b0ea6361d7..00000000000000 --- a/test/integration/export-serverless/pages/index.js +++ /dev/null @@ -1,65 +0,0 @@ -import Link from 'next/link' -import Router from 'next/router' - -function routeToAbout(e) { - e.preventDefault() - Router.push('/about') -} - -export default () => ( -
- -

This is the home page

- -
-) diff --git a/test/integration/export-serverless/pages/level1/about.js b/test/integration/export-serverless/pages/level1/about.js deleted file mode 100644 index 1f68cbd2e68630..00000000000000 --- a/test/integration/export-serverless/pages/level1/about.js +++ /dev/null @@ -1,10 +0,0 @@ -import Link from 'next/link' - -export default () => ( -
-
- Go Back -
-

This is the Level1 about page

-
-) diff --git a/test/integration/export-serverless/pages/level1/index.js b/test/integration/export-serverless/pages/level1/index.js deleted file mode 100644 index 82e32702621fd2..00000000000000 --- a/test/integration/export-serverless/pages/level1/index.js +++ /dev/null @@ -1,10 +0,0 @@ -import Link from 'next/link' - -export default () => ( -
-
- Go Back -
-

This is the Level1 home page

-
-) diff --git a/test/integration/export-serverless/pages/query-update.js b/test/integration/export-serverless/pages/query-update.js deleted file mode 100644 index 2fd0f49fcee73b..00000000000000 --- a/test/integration/export-serverless/pages/query-update.js +++ /dev/null @@ -1,7 +0,0 @@ -import { useRouter } from 'next/router' - -const Page = () =>
{JSON.stringify(useRouter().query)}
- -Page.getInitialProps = () => ({ hello: 'world' }) - -export default Page diff --git a/test/integration/export-serverless/pages/query.js b/test/integration/export-serverless/pages/query.js deleted file mode 100644 index 81794e10427ee8..00000000000000 --- a/test/integration/export-serverless/pages/query.js +++ /dev/null @@ -1,12 +0,0 @@ -import { Component } from 'react' - -class Page extends Component { - static getInitialProps({ query }) { - return { query } - } - render() { - return JSON.stringify(this.props.query, null, 2) - } -} - -export default Page diff --git a/test/integration/export-serverless/public/about/data.txt b/test/integration/export-serverless/public/about/data.txt deleted file mode 100644 index 6320cd248dd8ae..00000000000000 --- a/test/integration/export-serverless/public/about/data.txt +++ /dev/null @@ -1 +0,0 @@ -data \ No newline at end of file diff --git a/test/integration/export-serverless/static/data/item.txt b/test/integration/export-serverless/static/data/item.txt deleted file mode 100644 index a713074253483f..00000000000000 --- a/test/integration/export-serverless/static/data/item.txt +++ /dev/null @@ -1 +0,0 @@ -item \ No newline at end of file diff --git a/test/integration/export-serverless/test/api-routes.js b/test/integration/export-serverless/test/api-routes.js deleted file mode 100644 index 7d0bcdf80eaa26..00000000000000 --- a/test/integration/export-serverless/test/api-routes.js +++ /dev/null @@ -1,28 +0,0 @@ -/* eslint-env jest */ -import { join } from 'path' -import { File, runNextCommand } from 'next-test-utils' - -export default function (context) { - describe('API routes export', () => { - const nextConfig = new File(join(context.appDir, 'next.config.js')) - - beforeEach(() => { - nextConfig.replace('// API route', `'/data': { page: '/api/data' },`) - }) - afterEach(() => { - nextConfig.restore() - }) - - it('Should throw if a route is matched', async () => { - const outdir = join(context.appDir, 'outApi') - const { stderr } = await runNextCommand( - ['export', context.appDir, '--outdir', outdir], - { stderr: true } - ) - - expect(stderr).toContain( - 'https://nextjs.org/docs/messages/api-routes-static-export' - ) - }) - }) -} diff --git a/test/integration/export-serverless/test/browser.js b/test/integration/export-serverless/test/browser.js deleted file mode 100644 index c39e0286a036f9..00000000000000 --- a/test/integration/export-serverless/test/browser.js +++ /dev/null @@ -1,224 +0,0 @@ -/* eslint-env jest */ -import webdriver from 'next-webdriver' -import { check, getBrowserBodyText } from 'next-test-utils' - -export default function (context) { - describe('Render via browser', () => { - it('should render the home page', async () => { - const browser = await webdriver(context.port, '/') - const text = await browser.elementByCss('#home-page p').text() - - expect(text).toBe('This is the home page') - await browser.close() - }) - - it('should add trailing slash on Link', async () => { - const browser = await webdriver(context.port, '/') - const link = await browser - .elementByCss('#about-via-link') - .getAttribute('href') - - expect(link.slice(-1)).toBe('/') - }) - - it('should not add trailing slash on Link when disabled', async () => { - const browser = await webdriver(context.portNoTrailSlash, '/') - const link = await browser - .elementByCss('#about-via-link') - .getAttribute('href') - - expect(link.slice(-1)).not.toBe('/') - }) - - it('should do navigations via Link', async () => { - const browser = await webdriver(context.port, '/') - const text = await browser - .elementByCss('#about-via-link') - .click() - .waitForElementByCss('#about-page') - .elementByCss('#about-page p') - .text() - - expect(text).toBe('This is the About page foo') - await browser.close() - }) - - it('should do navigations via Router', async () => { - const browser = await webdriver(context.port, '/') - const text = await browser - .elementByCss('#about-via-router') - .click() - .waitForElementByCss('#about-page') - .elementByCss('#about-page p') - .text() - - expect(text).toBe('This is the About page foo') - await browser.close() - }) - - it('should do run client side javascript', async () => { - const browser = await webdriver(context.port, '/') - const text = await browser - .elementByCss('#counter') - .click() - .waitForElementByCss('#counter-page') - .elementByCss('#counter-increase') - .click() - .elementByCss('#counter-increase') - .click() - .elementByCss('#counter-page p') - .text() - - expect(text).toBe('Counter: 2') - await browser.close() - }) - - it('should render pages using getInitialProps', async () => { - const browser = await webdriver(context.port, '/') - const text = await browser - .elementByCss('#get-initial-props') - .click() - .waitForElementByCss('#dynamic-page') - .elementByCss('#dynamic-page p') - .text() - - expect(text).toBe('cool dynamic text') - await browser.close() - }) - - it('should render dynamic pages with custom urls', async () => { - const browser = await webdriver(context.port, '/') - const text = await browser - .elementByCss('#dynamic-1') - .click() - .waitForElementByCss('#dynamic-page') - .elementByCss('#dynamic-page p') - .text() - - expect(text).toBe('next export is nice') - await browser.close() - }) - - it('should support client side navigation', async () => { - const browser = await webdriver(context.port, '/') - const text = await browser - .elementByCss('#counter') - .click() - .waitForElementByCss('#counter-page') - .elementByCss('#counter-increase') - .click() - .elementByCss('#counter-increase') - .click() - .elementByCss('#counter-page p') - .text() - - expect(text).toBe('Counter: 2') - - // let's go back and come again to this page: - const textNow = await browser - .elementByCss('#go-back') - .click() - .waitForElementByCss('#home-page') - .elementByCss('#counter') - .click() - .waitForElementByCss('#counter-page') - .elementByCss('#counter-page p') - .text() - - expect(textNow).toBe('Counter: 2') - - await browser.close() - }) - - it('should render dynamic import components in the client', async () => { - const browser = await webdriver(context.port, '/') - await browser - .elementByCss('#dynamic-imports-link') - .click() - .waitForElementByCss('#dynamic-imports-page') - - await check( - () => getBrowserBodyText(browser), - /Welcome to dynamic imports/ - ) - - await browser.close() - }) - - it('should render pages with url hash correctly', async () => { - let browser - try { - browser = await webdriver(context.port, '/') - - // Check for the query string content - const text = await browser - .elementByCss('#with-hash') - .click() - .waitForElementByCss('#dynamic-page') - .elementByCss('#dynamic-page p') - .text() - - expect(text).toBe('Vercel is awesome') - - await check(() => browser.elementByCss('#hash').text(), /cool/) - } finally { - if (browser) { - await browser.close() - } - } - }) - - it('should navigate even if used a button inside ', async () => { - const browser = await webdriver(context.port, '/button-link') - - const text = await browser - .elementByCss('button') - .click() - .waitForElementByCss('#home-page') - .elementByCss('#home-page p') - .text() - - expect(text).toBe('This is the home page') - await browser.close() - }) - - it('should update query after mount', async () => { - const browser = await webdriver(context.port, '/query-update?hello=world') - const query = await browser.elementByCss('#query').text() - expect(JSON.parse(query)).toEqual({ hello: 'world', a: 'blue' }) - await browser.close() - }) - - describe('pages in the nested level: level1', () => { - it('should render the home page', async () => { - const browser = await webdriver(context.port, '/') - - await browser.eval( - 'document.getElementById("level1-home-page").click()' - ) - - await check( - () => getBrowserBodyText(browser), - /This is the Level1 home page/ - ) - - await browser.close() - }) - - it('should render the about page', async () => { - const browser = await webdriver(context.port, '/') - - await browser.eval( - 'document.getElementById("level1-about-page").click()' - ) - - await check( - () => getBrowserBodyText(browser), - /This is the Level1 about page/ - ) - - await browser.close() - }) - }) - }) -} diff --git a/test/integration/export-serverless/test/dev.js b/test/integration/export-serverless/test/dev.js deleted file mode 100644 index 2a1b45076f6124..00000000000000 --- a/test/integration/export-serverless/test/dev.js +++ /dev/null @@ -1,46 +0,0 @@ -/* eslint-env jest */ -import webdriver from 'next-webdriver' -import { renderViaHTTP, getBrowserBodyText, check } from 'next-test-utils' -import cheerio from 'cheerio' - -const loadJSONInPage = (pageContent) => { - const page = cheerio.load(pageContent) - return JSON.parse(page('#__next').text()) -} - -export default function (context) { - describe('Render in development mode', () => { - it('should render the home page', async () => { - const browser = await webdriver(context.port, '/') - await check(() => getBrowserBodyText(browser), /This is the home page/) - await browser.close() - }) - - it('should render pages only existent in exportPathMap page', async () => { - const browser = await webdriver(context.port, '/dynamic/one') - const text = await browser.elementByCss('#dynamic-page p').text() - expect(text).toBe('next export is nice') - await browser.close() - }) - }) - - describe(`ExportPathMap's query in development mode`, () => { - it('should be present in ctx.query', async () => { - const pageContent = await renderViaHTTP(context.port, '/query') - const json = loadJSONInPage(pageContent) - expect(json).toEqual({ a: 'blue' }) - }) - - it('should replace url query params in ctx.query when conflicting', async () => { - const pageContent = await renderViaHTTP(context.port, '/query?a=red') - const json = loadJSONInPage(pageContent) - expect(json).toEqual({ a: 'blue' }) - }) - - it('should be merged with url query params in ctx.query', async () => { - const pageContent = await renderViaHTTP(context.port, '/query?b=green') - const json = loadJSONInPage(pageContent) - expect(json).toEqual({ a: 'blue', b: 'green' }) - }) - }) -} diff --git a/test/integration/export-serverless/test/dynamic.js b/test/integration/export-serverless/test/dynamic.js deleted file mode 100644 index e3e4117d75b00b..00000000000000 --- a/test/integration/export-serverless/test/dynamic.js +++ /dev/null @@ -1,27 +0,0 @@ -/* eslint-env jest */ -import { join } from 'path' -import { File, runNextCommand } from 'next-test-utils' - -export default function (context) { - describe('Dynamic routes export', () => { - const nextConfig = new File(join(context.appDir, 'next.config.js')) - beforeEach(() => { - nextConfig.replace('/blog/nextjs/comment/test', '/bad/path') - }) - afterEach(() => { - nextConfig.restore() - }) - - it('Should throw error not matched route', async () => { - const outdir = join(context.appDir, 'outDynamic') - const { stderr } = await runNextCommand( - ['export', context.appDir, '--outdir', outdir], - { stderr: true } - ).catch((err) => err) - - expect(stderr).toContain( - 'https://nextjs.org/docs/messages/export-path-mismatch' - ) - }) - }) -} diff --git a/test/integration/export-serverless/test/index.test.js b/test/integration/export-serverless/test/index.test.js deleted file mode 100644 index c07ac232a3cac5..00000000000000 --- a/test/integration/export-serverless/test/index.test.js +++ /dev/null @@ -1,96 +0,0 @@ -/* eslint-env jest */ - -import { join } from 'path' -import { promises } from 'fs' -import { - nextBuild, - nextExport, - startStaticServer, - launchApp, - stopApp, - killApp, - findPort, - renderViaHTTP, - File, -} from 'next-test-utils' - -import ssr from './ssr' -import browser from './browser' -import dev from './dev' -import dynamic from './dynamic' -import apiRoutes from './api-routes' - -const { access, mkdir, writeFile } = promises -const appDir = join(__dirname, '../') -const context = {} -context.appDir = appDir -const devContext = {} -const nextConfig = new File(join(appDir, 'next.config.js')) - -describe('Static Export', () => { - it('should delete existing exported files', async () => { - const outdir = join(appDir, 'out') - const tempfile = join(outdir, 'temp.txt') - - await mkdir(outdir).catch((e) => { - if (e.code !== 'EEXIST') throw e - }) - await writeFile(tempfile, 'Hello there') - - await nextBuild(appDir) - await nextExport(appDir, { outdir }) - - let doesNotExist = false - await access(tempfile).catch((e) => { - if (e.code === 'ENOENT') doesNotExist = true - }) - expect(doesNotExist).toBe(true) - }) - beforeAll(async () => { - const outdir = join(appDir, 'out') - const outNoTrailSlash = join(appDir, 'outNoTrailSlash') - - await nextBuild(appDir) - await nextExport(appDir, { outdir }) - - nextConfig.replace( - `exportTrailingSlash: true`, - `exportTrailingSlash: false` - ) - await nextBuild(appDir) - await nextExport(appDir, { outdir: outNoTrailSlash }) - nextConfig.restore() - - context.server = await startStaticServer(outdir) - context.port = context.server.address().port - - context.serverNoTrailSlash = await startStaticServer(outNoTrailSlash) - context.portNoTrailSlash = context.serverNoTrailSlash.address().port - - devContext.port = await findPort() - devContext.server = await launchApp( - join(__dirname, '../'), - devContext.port, - true - ) - - // pre-build all pages at the start - await Promise.all([ - renderViaHTTP(devContext.port, '/'), - renderViaHTTP(devContext.port, '/dynamic/one'), - ]) - }) - afterAll(async () => { - await Promise.all([ - stopApp(context.server), - killApp(devContext.server), - stopApp(context.serverNoTrailSlash), - ]) - }) - - ssr(context) - browser(context) - dev(devContext) - dynamic(context) - apiRoutes(context) -}) diff --git a/test/integration/export-serverless/test/ssr.js b/test/integration/export-serverless/test/ssr.js deleted file mode 100644 index ad1721f9809e66..00000000000000 --- a/test/integration/export-serverless/test/ssr.js +++ /dev/null @@ -1,88 +0,0 @@ -/* eslint-env jest */ -import { renderViaHTTP } from 'next-test-utils' -import cheerio from 'cheerio' - -export default function (context) { - describe('Render via SSR', () => { - it('should render the home page', async () => { - const html = await renderViaHTTP(context.port, '/') - expect(html).toMatch(/This is the home page/) - }) - - it('should render the about page', async () => { - const html = await renderViaHTTP(context.port, '/about') - expect(html).toMatch(/This is the About page foobar/) - }) - - it('should render links correctly', async () => { - const html = await renderViaHTTP(context.port, '/') - const $ = cheerio.load(html) - const dynamicLink = $('#dynamic-1').prop('href') - const filePathLink = $('#path-with-extension').prop('href') - expect(dynamicLink).toEqual('/dynamic/one/') - expect(filePathLink).toEqual('/file-name.md') - }) - - it('should render a page with getInitialProps', async () => { - const html = await renderViaHTTP(context.port, '/dynamic') - expect(html).toMatch(/cool dynamic text/) - }) - - it('should render a dynamically rendered custom url page', async () => { - const html = await renderViaHTTP(context.port, '/dynamic/one') - expect(html).toMatch(/next export is nice/) - }) - - it('should render pages with dynamic imports', async () => { - const html = await renderViaHTTP(context.port, '/dynamic-imports') - expect(html).toMatch(/Welcome to dynamic imports/) - }) - - it('should render paths with extensions', async () => { - const html = await renderViaHTTP(context.port, '/file-name.md') - expect(html).toMatch(/this file has an extension/) - }) - - it('should give empty object for query if there is no query', async () => { - const html = await renderViaHTTP( - context.port, - '/get-initial-props-with-no-query' - ) - expect(html).toMatch(/Query is: {}/) - }) - - it('should render _error on 404.html even if not provided in exportPathMap', async () => { - const html = await renderViaHTTP(context.port, '/404.html') - // The default error page from the test server - // contains "404", so need to be specific here - expect(html).toMatch(/404.*page.*not.*found/i) - }) - - it('should render _error on /404/index.html', async () => { - const html = await renderViaHTTP(context.port, '/404/index.html') - // The default error page from the test server - // contains "404", so need to be specific here - expect(html).toMatch(/404.*page.*not.*found/i) - }) - - it('Should serve static files', async () => { - const data = await renderViaHTTP(context.port, '/static/data/item.txt') - expect(data).toBe('item') - }) - - it('Should serve public files', async () => { - const html = await renderViaHTTP(context.port, '/about') - const data = await renderViaHTTP(context.port, '/about/data.txt') - expect(html).toMatch(/This is the About page foobar/) - expect(data).toBe('data') - }) - - it('Should render dynamic files with query', async () => { - const html = await renderViaHTTP( - context.port, - '/blog/nextjs/comment/test' - ) - expect(html).toMatch(/Blog post nextjs comment test/) - }) - }) -} diff --git a/test/integration/export-subfolders-serverless/next.config.js b/test/integration/export-subfolders-serverless/next.config.js deleted file mode 100644 index f0b0ae02419782..00000000000000 --- a/test/integration/export-subfolders-serverless/next.config.js +++ /dev/null @@ -1,3 +0,0 @@ -module.exports = { - target: 'serverless', -} diff --git a/test/integration/export-subfolders-serverless/pages/about.js b/test/integration/export-subfolders-serverless/pages/about.js deleted file mode 100644 index 4bd43bbc91d21f..00000000000000 --- a/test/integration/export-subfolders-serverless/pages/about.js +++ /dev/null @@ -1 +0,0 @@ -export default () =>

I am an about page

diff --git a/test/integration/export-subfolders-serverless/pages/index.js b/test/integration/export-subfolders-serverless/pages/index.js deleted file mode 100644 index 5c13c39dbd689b..00000000000000 --- a/test/integration/export-subfolders-serverless/pages/index.js +++ /dev/null @@ -1 +0,0 @@ -export default () =>

I am a home page

diff --git a/test/integration/export-subfolders-serverless/pages/posts/index.js b/test/integration/export-subfolders-serverless/pages/posts/index.js deleted file mode 100644 index 7c9f74caf75464..00000000000000 --- a/test/integration/export-subfolders-serverless/pages/posts/index.js +++ /dev/null @@ -1 +0,0 @@ -export default () =>

I am a list of posts

diff --git a/test/integration/export-subfolders-serverless/pages/posts/single.js b/test/integration/export-subfolders-serverless/pages/posts/single.js deleted file mode 100644 index 0bd295f6d2ecc3..00000000000000 --- a/test/integration/export-subfolders-serverless/pages/posts/single.js +++ /dev/null @@ -1 +0,0 @@ -export default () =>

I am a single post

diff --git a/test/integration/export-subfolders-serverless/test/index.test.js b/test/integration/export-subfolders-serverless/test/index.test.js deleted file mode 100644 index 6fcbee3dfeb228..00000000000000 --- a/test/integration/export-subfolders-serverless/test/index.test.js +++ /dev/null @@ -1,36 +0,0 @@ -/* eslint-env jest */ - -import { promises } from 'fs' -import { join } from 'path' -import cheerio from 'cheerio' -import { nextBuild, nextExport } from 'next-test-utils' - -const { access, readFile } = promises -const appDir = join(__dirname, '../') -const outdir = join(appDir, 'out') - -describe('Export config#exportTrailingSlash set to false', () => { - beforeAll(async () => { - await nextBuild(appDir) - await nextExport(appDir, { outdir }) - }) - - it('should export pages as [filename].html instead of [filename]/index.html', async () => { - expect.assertions(6) - - await expect(access(join(outdir, 'index.html'))).resolves.toBe(undefined) - await expect(access(join(outdir, 'about.html'))).resolves.toBe(undefined) - await expect(access(join(outdir, 'posts.html'))).resolves.toBe(undefined) - await expect(access(join(outdir, 'posts', 'single.html'))).resolves.toBe( - undefined - ) - - const html = await readFile(join(outdir, 'index.html')) - const $ = cheerio.load(html) - expect($('p').text()).toBe('I am a home page') - - const htmlSingle = await readFile(join(outdir, 'posts', 'single.html')) - const $single = cheerio.load(htmlSingle) - expect($single('p').text()).toBe('I am a single post') - }) -}) diff --git a/test/integration/external-assets/next.config.js b/test/integration/external-assets/next.config.js deleted file mode 100644 index b97886447fb3a7..00000000000000 --- a/test/integration/external-assets/next.config.js +++ /dev/null @@ -1,6 +0,0 @@ -module.exports = { - target: 'experimental-serverless-trace', - onDemandEntries: { - maxInactiveAge: 1000 * 60 * 60, - }, -} diff --git a/test/integration/external-assets/pages/about/history.js b/test/integration/external-assets/pages/about/history.js deleted file mode 100644 index 17844f4af04a2a..00000000000000 --- a/test/integration/external-assets/pages/about/history.js +++ /dev/null @@ -1,19 +0,0 @@ -import firebase from 'firebase/app' -import 'firebase/firestore' - -if (!firebase.apps.length) { - firebase.initializeApp({ projectId: 'noop' }) -} - -const store = firebase.firestore() - -const Comp = ({ results }) => { - return
Hello Firebase: {results}
-} - -Comp.getInitialProps = async () => { - const query = await store.collection('users').get() - return { results: query.size } -} - -export default Comp diff --git a/test/integration/external-assets/test/index.test.js b/test/integration/external-assets/test/index.test.js deleted file mode 100644 index 0934085eba497b..00000000000000 --- a/test/integration/external-assets/test/index.test.js +++ /dev/null @@ -1,28 +0,0 @@ -/* eslint-env jest */ - -import { join } from 'path' -import { - killApp, - findPort, - nextBuild, - nextStart, - renderViaHTTP, -} from 'next-test-utils' - -const appDir = join(__dirname, '../') -let appPort -let app - -describe('External Assets', () => { - beforeAll(async () => { - await nextBuild(appDir, []) - appPort = await findPort() - app = await nextStart(appDir, appPort) - }) - afterAll(() => killApp(app)) - - it('should support Firebase', async () => { - const html = await renderViaHTTP(appPort, '/about/history') - expect(html).toMatch(/Hello Firebase: 0/) - }) -}) diff --git a/test/integration/fallback-route-params/test/index.test.js b/test/integration/fallback-route-params/test/index.test.js index 04f04b2f6738c1..b8509556e7f819 100644 --- a/test/integration/fallback-route-params/test/index.test.js +++ b/test/integration/fallback-route-params/test/index.test.js @@ -11,11 +11,9 @@ import { nextStart, renderViaHTTP, launchApp, - File, } from 'next-test-utils' const appDir = join(__dirname, '../') -const nextConfig = new File(join(appDir, 'next.config.js')) let appPort let app @@ -64,24 +62,4 @@ describe('Fallback Dynamic Route Params', () => { runTests() }) - - describe.skip('serverless mode', () => { - beforeAll(async () => { - nextConfig.write(` - module.exports = { - target: 'experimental-serverless-trace' - } - `) - await fs.remove(join(appDir, '.next')) - await nextBuild(appDir, [], { stdout: true }) - appPort = await findPort() - app = await nextStart(appDir, appPort) - }) - afterAll(async () => { - await killApp(app) - nextConfig.delete() - }) - - runTests() - }) }) diff --git a/test/integration/fetch-polyfill-ky-universal/serverless-server.js b/test/integration/fetch-polyfill-ky-universal/serverless-server.js deleted file mode 100644 index e8931d53d3b348..00000000000000 --- a/test/integration/fetch-polyfill-ky-universal/serverless-server.js +++ /dev/null @@ -1,44 +0,0 @@ -// This is not the correct way to implement the Next.js serverless target for production traffic -// It is only used for testing cases of rendering specific pages in the integration test suite - -const path = require('path') -const http = require('http') -const send = require('send') - -const server = http.createServer((req, res) => { - if (req.url === '/ssr') { - return require('./.next/serverless/pages/ssr.js').render(req, res) - } - - if (req.url === '/getinitialprops') { - return require('./.next/serverless/pages/getinitialprops.js').render( - req, - res - ) - } - - if (req.url === '/api/api-route') { - return require('./.next/serverless/pages/api/api-route.js').default( - req, - res - ) - } - - if (req.url === '/static') { - return send( - req, - path.join(__dirname, '.next/serverless/pages/static.html') - ).pipe(res) - } - - if (req.url.startsWith('/_next')) { - send( - req, - path.join(__dirname, '.next', req.url.split('/_next').pop()) - ).pipe(res) - } -}) - -server.listen(process.env.PORT, () => { - console.log('ready on', process.env.PORT) -}) diff --git a/test/integration/fetch-polyfill-ky-universal/test/index.test.js b/test/integration/fetch-polyfill-ky-universal/test/index.test.js index 681dd5da6d2712..8488da5c83b9ff 100644 --- a/test/integration/fetch-polyfill-ky-universal/test/index.test.js +++ b/test/integration/fetch-polyfill-ky-universal/test/index.test.js @@ -1,6 +1,5 @@ /* eslint-env jest */ -import fs from 'fs-extra' import { join } from 'path' import { killApp, @@ -13,7 +12,6 @@ import { } from 'next-test-utils' const appDir = join(__dirname, '../') -const nextConfig = join(appDir, 'next.config.js') let appPort let app let apiServerPort @@ -37,20 +35,6 @@ const startApiServer = async (optEnv = {}, opts) => { ) } -const startServerlessServer = async (optEnv = {}, opts) => { - const scriptPath = join(appDir, 'serverless-server.js') - appPort = await findPort() - const env = Object.assign({ ...process.env }, { PORT: `${appPort}` }, optEnv) - - return await initNextServerScript( - scriptPath, - /ready on/i, - env, - /ReferenceError: options is not defined/, - opts - ) -} - function runTests() { it('includes polyfilled fetch when using getStaticProps', async () => { const html = await renderViaHTTP(appPort, '/static') @@ -103,28 +87,4 @@ describe('Fetch polyfill with ky-universal', () => { runTests() }) - - describe.skip('Serverless support', () => { - beforeAll(async () => { - await fs.writeFile( - nextConfig, - `module.exports = { target: 'serverless' }` - ) - await startApiServer() - await nextBuild(appDir, [], { - env: { - NEXT_PUBLIC_API_PORT: apiServerPort, - }, - }) - appPort = await findPort() - app = await startServerlessServer() - }) - afterAll(async () => { - await killApp(app) - await fs.remove(nextConfig) - await killApp(apiServer) - }) - - runTests() - }) }) diff --git a/test/integration/fetch-polyfill/serverless-server.js b/test/integration/fetch-polyfill/serverless-server.js deleted file mode 100644 index 2cedcfbe079440..00000000000000 --- a/test/integration/fetch-polyfill/serverless-server.js +++ /dev/null @@ -1,58 +0,0 @@ -// This is not the correct way to implement the Next.js serverless target for production traffic -// It is only used for testing cases of rendering specific pages in the integration test suite - -const path = require('path') -const http = require('http') -const send = require('send') - -const server = http.createServer((req, res) => { - if (req.url === '/ssr') { - return require('./.next/serverless/pages/ssr.js').render(req, res) - } - - if (req.url === '/getinitialprops') { - return require('./.next/serverless/pages/getinitialprops.js').render( - req, - res - ) - } - - if (req.url === '/api/api-route') { - return require('./.next/serverless/pages/api/api-route.js').default( - req, - res - ) - } - - if (req.url === '/user/a') { - return send( - req, - path.join(__dirname, '.next/serverless/pages/user/a.html') - ).pipe(res) - } - - if (req.url === '/user/b') { - return send( - req, - path.join(__dirname, '.next/serverless/pages/user/b.html') - ).pipe(res) - } - - if (req.url === '/static') { - return send( - req, - path.join(__dirname, '.next/serverless/pages/static.html') - ).pipe(res) - } - - if (req.url.startsWith('/_next')) { - send( - req, - path.join(__dirname, '.next', req.url.split('/_next').pop()) - ).pipe(res) - } -}) - -server.listen(process.env.PORT, () => { - console.log('ready on', process.env.PORT) -}) diff --git a/test/integration/fetch-polyfill/test/index.test.js b/test/integration/fetch-polyfill/test/index.test.js index 0e5b5f6712e8a0..f90e953407053a 100644 --- a/test/integration/fetch-polyfill/test/index.test.js +++ b/test/integration/fetch-polyfill/test/index.test.js @@ -1,6 +1,5 @@ /* eslint-env jest */ -import fs from 'fs-extra' import { join } from 'path' import { killApp, @@ -15,7 +14,6 @@ import { import cheerio from 'cheerio' const appDir = join(__dirname, '../') -const nextConfig = join(appDir, 'next.config.js') let appPort let app let apiServerPort @@ -39,20 +37,6 @@ const startApiServer = async (optEnv = {}, opts) => { ) } -const startServerlessServer = async (optEnv = {}, opts) => { - const scriptPath = join(appDir, 'serverless-server.js') - appPort = await findPort() - const env = Object.assign({ ...process.env }, { PORT: `${appPort}` }, optEnv) - - return await initNextServerScript( - scriptPath, - /ready on/i, - env, - /ReferenceError: options is not defined/, - opts - ) -} - function runTests() { it('includes polyfilled fetch when using getStaticProps', async () => { const html = await renderViaHTTP(appPort, '/static') @@ -122,28 +106,4 @@ describe('Fetch polyfill', () => { runTests() }) - - describe.skip('Serverless support', () => { - beforeAll(async () => { - await fs.writeFile( - nextConfig, - `module.exports = { target: 'serverless' }` - ) - await startApiServer() - await nextBuild(appDir, [], { - env: { - NEXT_PUBLIC_API_PORT: apiServerPort, - }, - }) - appPort = await findPort() - app = await startServerlessServer() - }) - afterAll(async () => { - await killApp(app) - await fs.remove(nextConfig) - await killApp(apiServer) - }) - - runTests() - }) }) diff --git a/test/integration/font-optimization/test/index.test.js b/test/integration/font-optimization/test/index.test.js index 93e080d79dd0ba..b894b94ed01a1a 100644 --- a/test/integration/font-optimization/test/index.test.js +++ b/test/integration/font-optimization/test/index.test.js @@ -9,7 +9,6 @@ import { nextStart, nextBuild, renderViaHTTP, - initNextServerScript, waitFor, } from 'next-test-utils' import webdriver from 'next-webdriver' @@ -22,20 +21,6 @@ const fsExists = (file) => .then(() => true) .catch(() => false) -async function getBuildId(appDir) { - return fs.readFile(join(appDir, '.next', 'BUILD_ID'), 'utf8') -} - -const startServerlessEmulator = async (dir, port, opts = {}) => { - const scriptPath = join(dir, 'server.js') - const env = Object.assign( - {}, - { ...process.env }, - { PORT: port, BUILD_ID: await getBuildId(dir) } - ) - return initNextServerScript(scriptPath, /ready on/i, env, false, opts) -} - describe('Font Optimization', () => { describe.each([ [ @@ -79,7 +64,6 @@ describe('Font Optimization', () => { preconnectUrl ) => { const appDir = join(fixturesDir, `with-${property}`) - const nextConfig = join(appDir, 'next.config.js') let builtServerPagesDir let builtPage let appPort @@ -250,50 +234,6 @@ describe('Font Optimization', () => { runTests() }) - describe.skip('Font optimization for serverless apps', () => { - const origNextConfig = fs.readFileSync(nextConfig) - - beforeAll(async () => { - await fs.writeFile( - nextConfig, - `module.exports = ({ target: 'serverless', cleanDistDir: false })`, - 'utf8' - ) - await nextBuild(appDir) - appPort = await findPort() - app = await nextStart(appDir, appPort) - builtServerPagesDir = join(appDir, '.next', 'serverless') - builtPage = (file) => join(builtServerPagesDir, file) - }) - afterAll(async () => { - await fs.writeFile(nextConfig, origNextConfig) - await killApp(app) - }) - runTests() - }) - - describe.skip('Font optimization for emulated serverless apps', () => { - const origNextConfig = fs.readFileSync(nextConfig) - - beforeAll(async () => { - await fs.writeFile( - nextConfig, - `module.exports = ({ target: 'experimental-serverless-trace', cleanDistDir: false })`, - 'utf8' - ) - await nextBuild(appDir) - appPort = await findPort() - app = await startServerlessEmulator(appDir, appPort) - builtServerPagesDir = join(appDir, '.next', 'serverless') - builtPage = (file) => join(builtServerPagesDir, file) - }) - afterAll(async () => { - await fs.writeFile(nextConfig, origNextConfig) - await killApp(app) - }) - runTests() - }) - describe('Font optimization for unreachable font definitions.', () => { beforeAll(async () => { await nextBuild(appDir) diff --git a/test/integration/getinitialprops/next.config.js b/test/integration/getinitialprops/next.config.js index 41cc8e0d0e5eeb..ffa9bd56069e46 100644 --- a/test/integration/getinitialprops/next.config.js +++ b/test/integration/getinitialprops/next.config.js @@ -1,5 +1,4 @@ module.exports = { - // replace me async rewrites() { return [ { diff --git a/test/integration/getinitialprops/test/index.test.js b/test/integration/getinitialprops/test/index.test.js index 6f748b680879a6..be346ac37a6e71 100644 --- a/test/integration/getinitialprops/test/index.test.js +++ b/test/integration/getinitialprops/test/index.test.js @@ -7,13 +7,11 @@ import { nextStart, nextBuild, renderViaHTTP, - File, } from 'next-test-utils' let app let appPort const appDir = join(__dirname, '..') -const nextConfig = new File(join(appDir, 'next.config.js')) const runTests = () => { it('should have gip in __NEXT_DATA__', async () => { @@ -52,21 +50,6 @@ describe('getInitialProps', () => { runTests() }) - describe.skip('serverless mode', () => { - beforeAll(async () => { - await nextConfig.replace('// replace me', `target: 'serverless', `) - await nextBuild(appDir) - appPort = await findPort() - app = await nextStart(appDir, appPort) - }) - afterAll(async () => { - await killApp(app) - nextConfig.restore() - }) - - runTests() - }) - describe('production mode', () => { beforeAll(async () => { await nextBuild(appDir) diff --git a/test/integration/getserversideprops-export-error/test/index.test.js b/test/integration/getserversideprops-export-error/test/index.test.js index dc5f70bf21efbb..abfd90d32f1058 100644 --- a/test/integration/getserversideprops-export-error/test/index.test.js +++ b/test/integration/getserversideprops-export-error/test/index.test.js @@ -29,19 +29,6 @@ const runTests = () => { } describe('getServerSideProps', () => { - describe.skip('serverless mode', () => { - beforeAll(async () => { - await fs.remove(join(appDir, '.next')) - await fs.writeFile( - nextConfig, - `module.exports = { target: 'experimental-serverless-trace' }`, - 'utf8' - ) - }) - - runTests() - }) - describe('production mode', () => { beforeAll(async () => { await fs.remove(nextConfig) diff --git a/test/integration/getserversideprops-preview/test/index.test.js b/test/integration/getserversideprops-preview/test/index.test.js index 18026f4ded9463..7c7f68bbdf063d 100644 --- a/test/integration/getserversideprops-preview/test/index.test.js +++ b/test/integration/getserversideprops-preview/test/index.test.js @@ -6,7 +6,6 @@ import fs from 'fs-extra' import { fetchViaHTTP, findPort, - initNextServerScript, killApp, launchApp, nextBuild, @@ -14,12 +13,10 @@ import { renderViaHTTP, } from 'next-test-utils' import webdriver from 'next-webdriver' -import os from 'os' import { join } from 'path' import qs from 'querystring' const appDir = join(__dirname, '..') -const nextConfigPath = join(appDir, 'next.config.js') async function getBuildId() { return fs.readFile(join(appDir, '.next', 'BUILD_ID'), 'utf8') @@ -176,22 +173,8 @@ function runTests(startServer = nextStart) { }) } -const startServerlessEmulator = async (dir, port) => { - const scriptPath = join(dir, 'server.js') - const env = Object.assign( - {}, - { ...process.env }, - { PORT: port, BUILD_ID: await getBuildId() } - ) - return initNextServerScript(scriptPath, /ready on/i, env) -} - describe('ServerSide Props Preview Mode', () => { describe('Development Mode', () => { - beforeAll(async () => { - await fs.remove(nextConfigPath) - }) - let appPort, app it('should start development application', async () => { appPort = await findPort() @@ -287,38 +270,6 @@ describe('ServerSide Props Preview Mode', () => { }) describe('Server Mode', () => { - beforeAll(async () => { - await fs.remove(nextConfigPath) - }) - runTests() }) - - describe.skip('Serverless Mode', () => { - beforeAll(async () => { - await fs.writeFile( - nextConfigPath, - `module.exports = { target: 'experimental-serverless-trace' }` + os.EOL - ) - }) - afterAll(async () => { - await fs.remove(nextConfigPath) - }) - - runTests() - }) - - describe.skip('Emulated Serverless Mode', () => { - beforeAll(async () => { - await fs.writeFile( - nextConfigPath, - `module.exports = { target: 'experimental-serverless-trace' }` + os.EOL - ) - }) - afterAll(async () => { - await fs.remove(nextConfigPath) - }) - - runTests(startServerlessEmulator) - }) }) diff --git a/test/integration/gssp-pageProps-merge/test/index.test.js b/test/integration/gssp-pageProps-merge/test/index.test.js index 840f96a6ae858a..756071025c3a85 100644 --- a/test/integration/gssp-pageProps-merge/test/index.test.js +++ b/test/integration/gssp-pageProps-merge/test/index.test.js @@ -1,6 +1,5 @@ /* eslint-env jest */ -import fs from 'fs-extra' import { join } from 'path' import cheerio from 'cheerio' import { @@ -13,7 +12,6 @@ import { } from 'next-test-utils' const appDir = join(__dirname, '..') -const nextConfig = join(appDir, 'next.config.js') let appPort let app @@ -55,26 +53,4 @@ describe('pageProps GSSP conflict', () => { runTests() }) - - describe.skip('serverless mode', () => { - beforeAll(async () => { - await fs.writeFile( - nextConfig, - `module.exports = { - target: 'experimental-serverless-trace' - }` - ) - const { code } = await nextBuild(appDir) - if (code !== 0) throw new Error(`build failed with code ${code}`) - - appPort = await findPort() - app = await nextStart(appDir, appPort) - }) - afterAll(async () => { - await fs.remove(nextConfig) - await killApp(app) - }) - - runTests() - }) }) diff --git a/test/integration/gssp-redirect-base-path/test/index.test.js b/test/integration/gssp-redirect-base-path/test/index.test.js index fe309d0d6b8967..250eda938a7078 100644 --- a/test/integration/gssp-redirect-base-path/test/index.test.js +++ b/test/integration/gssp-redirect-base-path/test/index.test.js @@ -1,5 +1,4 @@ /* eslint-env jest */ -import http from 'http' import url from 'url' import fs from 'fs-extra' import webdriver from 'next-webdriver' @@ -12,11 +11,9 @@ import { nextStart, fetchViaHTTP, check, - File, } from 'next-test-utils' const appDir = join(__dirname, '..') -const nextConfig = new File(join(appDir, 'next.config.js')) let app let appPort @@ -505,132 +502,6 @@ describe('GS(S)P Redirect Support', () => { runTests() }) - describe.skip('serverless mode', () => { - let server - - beforeAll(async () => { - nextConfig.write( - `module.exports = { - basePath: "${basePath}", - target: 'experimental-serverless-trace' - }` - ) - await fs.remove(join(appDir, '.next')) - await nextBuild(appDir) - appPort = await findPort() - app = await nextStart(appDir, appPort) - }) - afterAll(async () => { - nextConfig.restore() - await killApp(app) - - try { - server.close() - } catch (err) { - console.error('failed to close server', err) - } - }) - - it('should handle redirect in raw serverless mode correctly', async () => { - server = http.createServer(async (req, res) => { - try { - console.log(req.url) - if (req.url.includes('/gsp-blog')) { - await require(join( - appDir, - '.next/serverless/pages/gsp-blog/[post].js' - )).render(req, res) - } else { - await require(join( - appDir, - './.next/serverless/pages/gssp-blog/[post].js' - )).render(req, res) - } - } catch (err) { - console.error('failed to render', err) - res.statusCode = 500 - res.end('error') - } - }) - const port = await findPort() - - await new Promise((resolve, reject) => { - server.listen(port, (err) => (err ? reject(err) : resolve())) - }) - console.log(`Raw serverless server listening at port ${port}`) - - const res1 = await fetchViaHTTP( - port, - '/gsp-blog/redirect-dest-_gsp-blog_first', - undefined, - { - redirect: 'manual', - } - ) - expect(res1.status).toBe(307) - const text1 = await res1.text() - expect(text1).toEqual(`${basePath}/gsp-blog/first`) - const parsed = url.parse(res1.headers.get('location'), true) - expect(parsed.pathname).toBe(`${basePath}/gsp-blog/first`) - expect(parsed.query).toEqual({}) - expect(res1.headers.get('refresh')).toBe(null) - - const res2 = await fetchViaHTTP( - port, - '/gsp-blog/redirect-permanent-dest-_gsp-blog_first', - undefined, - { - redirect: 'manual', - } - ) - expect(res2.status).toBe(308) - const text2 = await res2.text() - expect(text2).toEqual(`${basePath}/gsp-blog/first`) - expect(res2.headers.get('refresh')).toContain( - `url=${basePath}/gsp-blog/first` - ) - const parsed2 = url.parse(res2.headers.get('location'), true) - expect(parsed2.pathname).toBe(`${basePath}/gsp-blog/first`) - expect(parsed2.query).toEqual({}) - - const res3 = await fetchViaHTTP( - port, - '/gssp-blog/redirect-dest-_gssp-blog_first', - undefined, - { - redirect: 'manual', - } - ) - expect(res3.status).toBe(307) - const text3 = await res3.text() - expect(text3).toEqual(`${basePath}/gssp-blog/first`) - expect(res3.headers.get('refresh')).toBe(null) - const parsed3 = url.parse(res3.headers.get('location'), true) - expect(parsed3.pathname).toBe(`${basePath}/gssp-blog/first`) - expect(parsed3.query).toEqual({}) - - const res4 = await fetchViaHTTP( - port, - '/gssp-blog/redirect-permanent-dest-_gssp-blog_first', - undefined, - { - redirect: 'manual', - } - ) - expect(res4.status).toBe(308) - const text4 = await res4.text() - expect(text4).toEqual(`${basePath}/gssp-blog/first`) - expect(res4.headers.get('refresh')).toContain( - `url=${basePath}/gssp-blog/first` - ) - const parsed4 = url.parse(res4.headers.get('location'), true) - expect(parsed4.pathname).toBe(`${basePath}/gssp-blog/first`) - expect(parsed4.query).toEqual({}) - }) - - runTests() - }) - it('should error for redirect during prerendering', async () => { await fs.mkdirp(join(appDir, 'pages/invalid')) await fs.writeFile( diff --git a/test/integration/gssp-redirect/test/index.test.js b/test/integration/gssp-redirect/test/index.test.js index 548f9d8ea43a3b..e34ef007e7a8db 100644 --- a/test/integration/gssp-redirect/test/index.test.js +++ b/test/integration/gssp-redirect/test/index.test.js @@ -1,5 +1,4 @@ /* eslint-env jest */ -import http from 'http' import url from 'url' import fs from 'fs-extra' import webdriver from 'next-webdriver' @@ -15,7 +14,6 @@ import { } from 'next-test-utils' const appDir = join(__dirname, '..') -const nextConfig = join(appDir, 'next.config.js') let app let appPort @@ -542,120 +540,6 @@ describe('GS(S)P Redirect Support', () => { }) }) - describe.skip('serverless mode', () => { - let server - - beforeAll(async () => { - await fs.writeFile( - nextConfig, - `module.exports = { - target: 'experimental-serverless-trace' - }` - ) - await fs.remove(join(appDir, '.next')) - await nextBuild(appDir) - appPort = await findPort() - app = await nextStart(appDir, appPort) - }) - afterAll(async () => { - await fs.remove(nextConfig) - await killApp(app) - - try { - server.close() - } catch (err) { - console.error('failed to close server', err) - } - }) - - it('should handle redirect in raw serverless mode correctly', async () => { - server = http.createServer(async (req, res) => { - try { - console.log(req.url) - if (req.url.includes('/gsp-blog')) { - await require(join( - appDir, - '.next/serverless/pages/gsp-blog/[post].js' - )).render(req, res) - } else { - await require(join( - appDir, - './.next/serverless/pages/gssp-blog/[post].js' - )).render(req, res) - } - } catch (err) { - console.error('failed to render', err) - res.statusCode = 500 - res.end('error') - } - }) - const port = await findPort() - - await new Promise((resolve, reject) => { - server.listen(port, (err) => (err ? reject(err) : resolve())) - }) - console.log(`Raw serverless server listening at port ${port}`) - - const res1 = await fetchViaHTTP( - port, - '/gsp-blog/redirect-dest-_gsp-blog_first', - undefined, - { - redirect: 'manual', - } - ) - expect(res1.status).toBe(307) - const parsed = url.parse(res1.headers.get('location'), true) - expect(parsed.pathname).toBe('/gsp-blog/first') - expect(parsed.query).toEqual({}) - expect(res1.headers.get('refresh')).toBe(null) - - const res2 = await fetchViaHTTP( - port, - '/gsp-blog/redirect-permanent-dest-_gsp-blog_first', - undefined, - { - redirect: 'manual', - } - ) - expect(res2.status).toBe(308) - expect(res2.headers.get('refresh')).toMatch(/url=\/gsp-blog\/first/) - const parsed2 = url.parse(res2.headers.get('location'), true) - expect(parsed2.pathname).toBe('/gsp-blog/first') - expect(parsed2.query).toEqual({}) - - const res3 = await fetchViaHTTP( - port, - '/gssp-blog/redirect-dest-_gssp-blog_first', - undefined, - { - redirect: 'manual', - } - ) - expect(res3.status).toBe(307) - expect(res3.headers.get('refresh')).toBe(null) - const parsed3 = url.parse(res3.headers.get('location'), true) - expect(parsed3.pathname).toBe('/gssp-blog/first') - expect(parsed3.query).toEqual({}) - - const res4 = await fetchViaHTTP( - port, - '/gssp-blog/redirect-permanent-dest-_gssp-blog_first', - undefined, - { - redirect: 'manual', - } - ) - expect(res4.status).toBe(308) - expect(res4.headers.get('refresh')).toMatch(/url=\/gssp-blog\/first/) - const parsed4 = url.parse(res4.headers.get('location'), true) - expect(parsed4.pathname).toBe('/gssp-blog/first') - expect(parsed4.query).toEqual({}) - }) - - runTests() - }) - it('should error for redirect during prerendering', async () => { await fs.mkdirp(join(appDir, 'pages/invalid')) await fs.writeFile( diff --git a/test/integration/handle-non-page-in-pages/next.config.js b/test/integration/handle-non-page-in-pages/next.config.js deleted file mode 100644 index 91c68aa65f28d2..00000000000000 --- a/test/integration/handle-non-page-in-pages/next.config.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { target: 'serverless' } diff --git a/test/integration/handle-non-page-in-pages/pages/invalid.tsx b/test/integration/handle-non-page-in-pages/pages/invalid.tsx deleted file mode 100644 index 7dd171695f915d..00000000000000 --- a/test/integration/handle-non-page-in-pages/pages/invalid.tsx +++ /dev/null @@ -1,2 +0,0 @@ -const Invalid = (): JSX.Element =>

Hello world

-export { Invalid } diff --git a/test/integration/handle-non-page-in-pages/pages/valid.tsx b/test/integration/handle-non-page-in-pages/pages/valid.tsx deleted file mode 100644 index 4dd2c2f270f599..00000000000000 --- a/test/integration/handle-non-page-in-pages/pages/valid.tsx +++ /dev/null @@ -1 +0,0 @@ -export default (): JSX.Element =>

Hello world

diff --git a/test/integration/handle-non-page-in-pages/test/index.test.js b/test/integration/handle-non-page-in-pages/test/index.test.js deleted file mode 100644 index 3254cc2a7dcd1d..00000000000000 --- a/test/integration/handle-non-page-in-pages/test/index.test.js +++ /dev/null @@ -1,17 +0,0 @@ -/* eslint-env jest */ - -import path from 'path' -import { nextBuild } from 'next-test-utils' - -const appDir = path.join(__dirname, '..') - -describe.skip('Handle non-page in pages when target: serverless', () => { - it('Fails softly with descriptive error', async () => { - const { stderr } = await nextBuild(appDir, [], { stderr: true }) - - expect(stderr).toMatch( - /found page without a React Component as default export in/ - ) - expect(stderr).toMatch(/pages\/invalid/) - }) -}) diff --git a/test/integration/handle-non-page-in-pages/tsconfig.json b/test/integration/handle-non-page-in-pages/tsconfig.json deleted file mode 100644 index fd92c3d69662eb..00000000000000 --- a/test/integration/handle-non-page-in-pages/tsconfig.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "compilerOptions": { - "target": "es5", - "lib": ["dom", "dom.iterable", "esnext"], - "allowJs": true, - "skipLibCheck": true, - "strict": false, - "forceConsistentCasingInFileNames": true, - "noEmit": true, - "incremental": true, - "esModuleInterop": true, - "module": "esnext", - "moduleResolution": "node", - "resolveJsonModule": true, - "isolatedModules": true, - "jsx": "preserve" - }, - "exclude": ["node_modules"], - "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"] -} diff --git a/test/integration/i18n-support-base-path/next.config.js b/test/integration/i18n-support-base-path/next.config.js index b9ea2878622967..800cf14a0e5df0 100644 --- a/test/integration/i18n-support-base-path/next.config.js +++ b/test/integration/i18n-support-base-path/next.config.js @@ -1,5 +1,4 @@ module.exports = { - // target: 'experimental-serverless-trace', basePath: '/docs', i18n: { // localeDetection: false, diff --git a/test/integration/i18n-support-base-path/test/index.test.js b/test/integration/i18n-support-base-path/test/index.test.js index 5ee93bd72057aa..55c9b99c9d8ce5 100644 --- a/test/integration/i18n-support-base-path/test/index.test.js +++ b/test/integration/i18n-support-base-path/test/index.test.js @@ -8,7 +8,6 @@ import { nextStart, findPort, killApp, - getPageFileFromPagesManifest, fetchViaHTTP, File, launchApp, @@ -72,122 +71,6 @@ describe('i18n Support basePath', () => { runTests(ctx) }) - describe.skip('serverless mode', () => { - beforeAll(async () => { - await fs.remove(join(appDir, '.next')) - nextConfig.replace('// target', 'target') - nextConfig.replace(/__EXTERNAL_PORT__/g, ctx.externalPort) - - await nextBuild(appDir) - ctx.appPort = await findPort() - ctx.app = await nextStart(appDir, ctx.appPort) - ctx.buildPagesDir = join(appDir, '.next/serverless/pages') - ctx.buildId = await fs.readFile(join(appDir, '.next/BUILD_ID'), 'utf8') - }) - afterAll(async () => { - nextConfig.restore() - await killApp(ctx.app) - }) - - it('should have correct props for blocking notFound', async () => { - const serverFile = getPageFileFromPagesManifest( - appDir, - '/not-found/blocking-fallback/[slug]' - ) - const appPort = await findPort() - const mod = require(join(appDir, '.next/serverless', serverFile)) - - const server = http.createServer(async (req, res) => { - try { - await mod.render(req, res) - } catch (err) { - res.statusCode = 500 - res.end('internal err') - } - }) - - await new Promise((resolve, reject) => { - server.listen(appPort, (err) => (err ? reject(err) : resolve())) - }) - console.log('listening on', appPort) - - const res = await fetchViaHTTP( - appPort, - `${ctx.basePath}/nl/not-found/blocking-fallback/first` - ) - server.close() - - expect(res.status).toBe(404) - - const $ = cheerio.load(await res.text()) - const props = JSON.parse($('#props').text()) - - expect($('#not-found').text().length > 0).toBe(true) - expect(props).toEqual({ - is404: true, - locale: 'nl', - locales, - defaultLocale: 'en-US', - }) - }) - - it('should resolve rewrites correctly', async () => { - const serverFile = getPageFileFromPagesManifest(appDir, '/another') - const appPort = await findPort() - const mod = require(join(appDir, '.next/serverless', serverFile)) - - const server = http.createServer(async (req, res) => { - try { - await mod.render(req, res) - } catch (err) { - res.statusCode = 500 - res.end('internal err') - } - }) - - await new Promise((resolve, reject) => { - server.listen(appPort, (err) => (err ? reject(err) : resolve())) - }) - console.log('listening on', appPort) - - const requests = await Promise.all( - [ - '/en-US/rewrite-1', - '/nl/rewrite-2', - '/fr/rewrite-3', - '/en-US/rewrite-4', - '/fr/rewrite-4', - ].map((path) => - fetchViaHTTP(appPort, `${ctx.basePath}${path}`, undefined, { - redirect: 'manual', - }) - ) - ) - - server.close() - - const checks = [ - ['en-US', '/rewrite-1'], - ['nl', '/rewrite-2'], - ['nl', '/rewrite-3'], - ['en-US', '/rewrite-4'], - ['fr', '/rewrite-4'], - ] - - for (let i = 0; i < requests.length; i++) { - const res = requests[i] - const [locale, asPath] = checks[i] - const $ = cheerio.load(await res.text()) - expect($('html').attr('lang')).toBe(locale) - expect($('#router-locale').text()).toBe(locale) - expect($('#router-pathname').text()).toBe('/another') - expect($('#router-as-path').text()).toBe(asPath) - } - }) - - runTests(ctx) - }) - describe('with localeDetection disabled', () => { beforeAll(async () => { await fs.remove(join(appDir, '.next')) diff --git a/test/integration/i18n-support-catchall/next.config.js b/test/integration/i18n-support-catchall/next.config.js index 57799eaa25ed1c..1c6978ee94f9ac 100644 --- a/test/integration/i18n-support-catchall/next.config.js +++ b/test/integration/i18n-support-catchall/next.config.js @@ -1,5 +1,4 @@ module.exports = { - // target: 'experimental-serverless-trace', i18n: { locales: ['nl-NL', 'nl-BE', 'nl', 'fr-BE', 'fr', 'en-US', 'en'], defaultLocale: 'en-US', diff --git a/test/integration/i18n-support-catchall/test/index.test.js b/test/integration/i18n-support-catchall/test/index.test.js index 6b3aadc60e8ec7..c3cee248718b4b 100644 --- a/test/integration/i18n-support-catchall/test/index.test.js +++ b/test/integration/i18n-support-catchall/test/index.test.js @@ -1,7 +1,5 @@ /* eslint-env jest */ import assert from 'assert' -import http from 'http' -import qs from 'querystring' import fs from 'fs-extra' import cheerio from 'cheerio' import { join } from 'path' @@ -13,13 +11,10 @@ import { launchApp, nextBuild, nextStart, - File, check, - getPageFileFromPagesManifest, } from 'next-test-utils' const appDir = join(__dirname, '../') -const nextConfig = new File(join(appDir, 'next.config.js')) let app let appPort let buildPagesDir @@ -249,129 +244,4 @@ describe('i18n Support Root Catch-all', () => { runTests() }) - - describe.skip('serverless mode', () => { - beforeAll(async () => { - await fs.remove(join(appDir, '.next')) - nextConfig.replace('// target', 'target') - - await nextBuild(appDir) - appPort = await findPort() - app = await nextStart(appDir, appPort) - buildPagesDir = join(appDir, '.next/serverless') - }) - afterAll(async () => { - nextConfig.restore() - await killApp(app) - }) - - it('should normalize locale items in route-matches', async () => { - const server = http.createServer(async (req, res) => { - try { - await require(join( - appDir, - '.next/serverless', - getPageFileFromPagesManifest(appDir, '/[[...slug]]') - )).render(req, res) - } catch (err) { - console.error(err) - res.statusCode = 500 - res.end('internal server error') - } - }) - const port = await findPort() - await new Promise((resolve, reject) => { - server.listen(port, (err) => (err ? reject(err) : resolve())) - }) - console.log(`Listening at ::${port}`) - - const res = await fetchViaHTTP(port, '/[[...slug]]', undefined, { - headers: { - 'x-vercel-id': 'hi', - 'x-now-route-matches': qs.stringify({ - 1: 'nl-NL', - }), - }, - redirect: 'manual', - }) - const res2 = await fetchViaHTTP(port, '/[[...slug]]', undefined, { - headers: { - 'x-vercel-id': 'hi', - 'x-now-route-matches': qs.stringify({ - slug: 'eN', - }), - }, - redirect: 'manual', - }) - const res3 = await fetchViaHTTP(port, '/fr/[[...slug]]', undefined, { - headers: { - 'x-vercel-id': 'hi', - 'x-now-route-matches': qs.stringify({ - slug: 'hello', - }), - }, - redirect: 'manual', - }) - - const res4 = await fetchViaHTTP(port, '/fr', undefined, { - redirect: 'manual', - }) - - server.close() - - expect(res.status).toBe(200) - expect(res2.status).toBe(200) - expect(res3.status).toBe(200) - expect(res4.status).toBe(200) - - const $ = cheerio.load(await res.text()) - const $2 = cheerio.load(await res2.text()) - const $3 = cheerio.load(await res3.text()) - - expect($('#router-locale').text()).toBe('nl-NL') - expect($('#router-pathname').text()).toBe('/[[...slug]]') - expect($('#router-as-path').text()).toBe('/') - expect($('#router-default-locale').text()).toBe('en-US') - expect(JSON.parse($('#router-query').text())).toEqual({}) - expect(JSON.parse($('#router-locales').text())).toEqual(locales) - expect(JSON.parse($('#props').text())).toEqual({ - locale: 'nl-NL', - defaultLocale: 'en-US', - locales, - params: {}, - }) - - expect($2('#router-locale').text()).toBe('en') - expect($2('#router-pathname').text()).toBe('/[[...slug]]') - expect($2('#router-as-path').text()).toBe('/') - expect($2('#router-default-locale').text()).toBe('en-US') - expect(JSON.parse($2('#router-query').text())).toEqual({}) - expect(JSON.parse($2('#router-locales').text())).toEqual(locales) - expect(JSON.parse($2('#props').text())).toEqual({ - locale: 'en', - defaultLocale: 'en-US', - locales, - params: {}, - }) - - expect($3('#router-locale').text()).toBe('fr') - expect($3('#router-pathname').text()).toBe('/[[...slug]]') - expect($3('#router-as-path').text()).toBe('/hello') - expect($3('#router-default-locale').text()).toBe('en-US') - expect(JSON.parse($3('#router-query').text())).toEqual({ - slug: ['hello'], - }) - expect(JSON.parse($3('#router-locales').text())).toEqual(locales) - expect(JSON.parse($3('#props').text())).toEqual({ - locale: 'fr', - defaultLocale: 'en-US', - locales, - params: { - slug: ['hello'], - }, - }) - }) - - runTests() - }) }) diff --git a/test/integration/i18n-support/next.config.js b/test/integration/i18n-support/next.config.js index d1b867f72152b9..2b73c7f7886b78 100644 --- a/test/integration/i18n-support/next.config.js +++ b/test/integration/i18n-support/next.config.js @@ -1,5 +1,4 @@ module.exports = { - // target: 'experimental-serverless-trace', // basePath: '/docs', // trailingSlash: true, i18n: { diff --git a/test/integration/i18n-support/server.js b/test/integration/i18n-support/server.js deleted file mode 100644 index 101320568c1d37..00000000000000 --- a/test/integration/i18n-support/server.js +++ /dev/null @@ -1,14 +0,0 @@ -const http = require('http') -const mod = require('./.next/serverless/pages/another') - -const server = http.createServer(async (req, res) => { - try { - await mod.render(req, res) - } catch (err) { - console.error(err) - res.statusCode = 500 - res.end('internal error') - } -}) - -server.listen(3000, () => console.log('listening')) diff --git a/test/integration/i18n-support/test/index.test.js b/test/integration/i18n-support/test/index.test.js index 6bf502d668ab41..ef34453ef2024a 100644 --- a/test/integration/i18n-support/test/index.test.js +++ b/test/integration/i18n-support/test/index.test.js @@ -10,7 +10,6 @@ import { nextStart, findPort, killApp, - getPageFileFromPagesManifest, fetchViaHTTP, File, launchApp, @@ -89,122 +88,6 @@ describe('i18n Support', () => { }) }) - describe.skip('serverless mode', () => { - beforeAll(async () => { - await fs.remove(join(appDir, '.next')) - nextConfig.replace('// target', 'target') - nextConfig.replace(/__EXTERNAL_PORT__/g, ctx.externalPort) - - await nextBuild(appDir) - ctx.appPort = await findPort() - ctx.app = await nextStart(appDir, ctx.appPort) - ctx.buildPagesDir = join(appDir, '.next/serverless/pages') - ctx.buildId = await fs.readFile(join(appDir, '.next/BUILD_ID'), 'utf8') - }) - afterAll(async () => { - nextConfig.restore() - await killApp(ctx.app) - }) - - it('should have correct props for blocking notFound', async () => { - const serverFile = getPageFileFromPagesManifest( - appDir, - '/not-found/blocking-fallback/[slug]' - ) - const appPort = await findPort() - const mod = require(join(appDir, '.next/serverless', serverFile)) - - const server = http.createServer(async (req, res) => { - try { - await mod.render(req, res) - } catch (err) { - res.statusCode = 500 - res.end('internal err') - } - }) - - await new Promise((resolve, reject) => { - server.listen(appPort, (err) => (err ? reject(err) : resolve())) - }) - console.log('listening on', appPort) - - const res = await fetchViaHTTP( - appPort, - '/nl/not-found/blocking-fallback/first' - ) - server.close() - - expect(res.status).toBe(404) - - const $ = cheerio.load(await res.text()) - const props = JSON.parse($('#props').text()) - - expect($('#not-found').text().length > 0).toBe(true) - expect(props).toEqual({ - is404: true, - locale: 'nl', - locales, - defaultLocale: 'en-US', - }) - }) - - it('should resolve rewrites correctly', async () => { - const serverFile = getPageFileFromPagesManifest(appDir, '/another') - const appPort = await findPort() - const mod = require(join(appDir, '.next/serverless', serverFile)) - - const server = http.createServer(async (req, res) => { - try { - await mod.render(req, res) - } catch (err) { - res.statusCode = 500 - res.end('internal err') - } - }) - - await new Promise((resolve, reject) => { - server.listen(appPort, (err) => (err ? reject(err) : resolve())) - }) - console.log('listening on', appPort) - - const requests = await Promise.all( - [ - '/en-US/rewrite-1', - '/nl/rewrite-2', - '/fr/rewrite-3', - '/en-US/rewrite-4', - '/fr/rewrite-4', - ].map((path) => - fetchViaHTTP(appPort, `${ctx.basePath}${path}`, undefined, { - redirect: 'manual', - }) - ) - ) - - server.close() - - const checks = [ - ['en-US', '/rewrite-1'], - ['nl', '/rewrite-2'], - ['nl', '/rewrite-3'], - ['en-US', '/rewrite-4'], - ['fr', '/rewrite-4'], - ] - - for (let i = 0; i < requests.length; i++) { - const res = requests[i] - const [locale, asPath] = checks[i] - const $ = cheerio.load(await res.text()) - expect($('html').attr('lang')).toBe(locale) - expect($('#router-locale').text()).toBe(locale) - expect($('#router-pathname').text()).toBe('/another') - expect($('#router-as-path').text()).toBe(asPath) - } - }) - - runTests(ctx) - }) - describe('with localeDetection disabled', () => { beforeAll(async () => { await fs.remove(join(appDir, '.next')) diff --git a/test/integration/index-index/test/index.test.js b/test/integration/index-index/test/index.test.js index a2d7bfa8e3f160..f4745335c9eaf1 100644 --- a/test/integration/index-index/test/index.test.js +++ b/test/integration/index-index/test/index.test.js @@ -208,26 +208,4 @@ describe('nested index.js', () => { runTests() }) - - describe.skip('serverless mode', () => { - let origNextConfig - - beforeAll(async () => { - origNextConfig = await fs.readFile(nextConfig, 'utf8') - await fs.writeFile( - nextConfig, - `module.exports = { target: 'serverless' }` - ) - - await nextBuild(appDir) - - appPort = await findPort() - app = await nextStart(appDir, appPort) - }) - afterAll(async () => { - await fs.writeFile(nextConfig, origNextConfig) - await killApp(app) - }) - runTests() - }) }) diff --git a/test/integration/legacy-pkg-gently/next.config.js b/test/integration/legacy-pkg-gently/next.config.js deleted file mode 100644 index 91c68aa65f28d2..00000000000000 --- a/test/integration/legacy-pkg-gently/next.config.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { target: 'serverless' } diff --git a/test/integration/legacy-pkg-gently/pages/api/hello.js b/test/integration/legacy-pkg-gently/pages/api/hello.js deleted file mode 100644 index b837ca426f5862..00000000000000 --- a/test/integration/legacy-pkg-gently/pages/api/hello.js +++ /dev/null @@ -1,7 +0,0 @@ -import { Client } from 'faunadb' - -export default (_req, res) => { - const client = new Client({ secret: 'foobar' }) - console.log(client) - res.send({ message: 'hello world' }) -} diff --git a/test/integration/legacy-pkg-gently/test/index.test.js b/test/integration/legacy-pkg-gently/test/index.test.js deleted file mode 100644 index 7a353794e244b8..00000000000000 --- a/test/integration/legacy-pkg-gently/test/index.test.js +++ /dev/null @@ -1,37 +0,0 @@ -/* eslint-env jest */ - -import { join } from 'path' -import { - renderViaHTTP, - runNextCommand, - nextServer, - startApp, - stopApp, -} from 'next-test-utils' - -let app -let appPort -let server -const appDir = join(__dirname, '../') - -describe('Legacy Packages', () => { - beforeAll(async () => { - await runNextCommand(['build', appDir]) - - app = nextServer({ - dir: appDir, - dev: false, - quiet: true, - }) - - server = await startApp(app) - appPort = server.address().port - }) - - it('should support `node-gently` packages', async () => { - const res = await renderViaHTTP(appPort, '/api/hello') - expect(res).toMatch(/hello world/i) - }) - - afterAll(() => stopApp(server)) -}) diff --git a/test/integration/legacy-ssg-methods-error/test/index.test.js b/test/integration/legacy-ssg-methods-error/test/index.test.js index 90d83c8157f168..0aa0a75156593c 100644 --- a/test/integration/legacy-ssg-methods-error/test/index.test.js +++ b/test/integration/legacy-ssg-methods-error/test/index.test.js @@ -8,24 +8,7 @@ const appDir = join(__dirname, '..') const indexPage = join(appDir, 'pages/index.js') let origIndexPage = '' -const runTests = (serverless = false) => { - if (serverless) { - const nextConfig = join(appDir, 'next.config.js') - - beforeEach(() => - fs.writeFile( - nextConfig, - ` - module.exports = { - target: 'experimental-serverless-trace' - } - ` - ) - ) - - afterAll(() => fs.remove(nextConfig)) - } - +const runTests = () => { it('should error when legacy unstable_getStaticProps', async () => { const { stderr, code } = await nextBuild(appDir, [], { stderr: true }) expect(code).toBe(1) @@ -72,8 +55,4 @@ describe('Mixed getStaticProps and getServerSideProps error', () => { describe('server mode', () => { runTests(false) }) - - describe.skip('serverless mode', () => { - runTests(true) - }) }) diff --git a/test/integration/next-image-legacy/base-path/test/index.test.ts b/test/integration/next-image-legacy/base-path/test/index.test.ts index 0273044bfa6899..1e294e2f5d3d4c 100644 --- a/test/integration/next-image-legacy/base-path/test/index.test.ts +++ b/test/integration/next-image-legacy/base-path/test/index.test.ts @@ -1,6 +1,5 @@ /* eslint-env jest */ -import fs from 'fs-extra' import { check, findPort, @@ -16,7 +15,6 @@ import webdriver from 'next-webdriver' import { join } from 'path' const appDir = join(__dirname, '../') -const nextConfig = join(appDir, 'next.config.js') let appPort let app @@ -504,30 +502,4 @@ describe('Image Component basePath Tests', () => { runTests('server') }) - - describe.skip('serverless mode', () => { - let origConfig - - beforeAll(async () => { - origConfig = await fs.readFile(nextConfig, 'utf8') - await fs.writeFile( - nextConfig, - ` - module.exports = { - basePath: '/docs', - target: 'serverless' - } - ` - ) - await nextBuild(appDir) - appPort = await findPort() - app = await nextStart(appDir, appPort) - }) - afterAll(async () => { - await fs.writeFile(nextConfig, origConfig) - await killApp(app) - }) - - runTests('serverless') - }) }) diff --git a/test/integration/next-image-legacy/default/test/index.test.ts b/test/integration/next-image-legacy/default/test/index.test.ts index 2fe202645dff4b..cb58ca2e35a03e 100644 --- a/test/integration/next-image-legacy/default/test/index.test.ts +++ b/test/integration/next-image-legacy/default/test/index.test.ts @@ -1446,17 +1446,4 @@ describe('Image Component Tests', () => { runTests('server') }) - - describe.skip('serverless mode', () => { - beforeAll(async () => { - await nextBuild(appDir) - appPort = await findPort() - app = await nextStart(appDir, appPort) - }) - afterAll(async () => { - await killApp(app) - }) - - runTests('serverless') - }) }) diff --git a/test/integration/optional-chaining-nullish-coalescing/test/index.test.js b/test/integration/optional-chaining-nullish-coalescing/test/index.test.js index 79681cdac6789a..fe387090d371ff 100644 --- a/test/integration/optional-chaining-nullish-coalescing/test/index.test.js +++ b/test/integration/optional-chaining-nullish-coalescing/test/index.test.js @@ -1,6 +1,5 @@ /* eslint-env jest */ -import fs from 'fs-extra' import { join } from 'path' import { renderViaHTTP, @@ -12,7 +11,6 @@ import { } from 'next-test-utils' const appDir = join(__dirname, '..') -const nextConfig = join(appDir, 'next.config.js') let appPort let app @@ -43,7 +41,6 @@ describe('Optional chaining and nullish coalescing support', () => { describe('server mode', () => { beforeAll(async () => { - await fs.remove(nextConfig) await nextBuild(appDir) appPort = await findPort() app = await nextStart(appDir, appPort) @@ -52,22 +49,4 @@ describe('Optional chaining and nullish coalescing support', () => { runTests() }) - - describe.skip('serverless mode', () => { - beforeAll(async () => { - await fs.writeFile( - nextConfig, - `module.exports = { target: 'serverless' }` - ) - await nextBuild(appDir) - appPort = await findPort() - app = await nextStart(appDir, appPort) - }) - afterAll(async () => { - await killApp(app) - await fs.remove(nextConfig) - }) - - runTests() - }) }) diff --git a/test/integration/prerender-fallback-aspath/next.config.js b/test/integration/prerender-fallback-aspath/next.config.js deleted file mode 100644 index 47a259eabaee29..00000000000000 --- a/test/integration/prerender-fallback-aspath/next.config.js +++ /dev/null @@ -1,3 +0,0 @@ -module.exports = { - target: 'experimental-serverless-trace', -} diff --git a/test/integration/prerender-fallback-aspath/pages/blog/[post]/[comment].js b/test/integration/prerender-fallback-aspath/pages/blog/[post]/[comment].js deleted file mode 100644 index b6637184b0e6fb..00000000000000 --- a/test/integration/prerender-fallback-aspath/pages/blog/[post]/[comment].js +++ /dev/null @@ -1,30 +0,0 @@ -import { useRouter } from 'next/router' - -export default function Comment({ params }) { - const router = useRouter() - - if (router.isFallback) return 'Loading...' - - return ( - <> -

{router.asPath}

-

{JSON.stringify(router.query)}

-

{JSON.stringify(params)}

- - ) -} - -export const getStaticProps = ({ params }) => { - return { - props: { - params, - }, - } -} - -export const getStaticPaths = () => { - return { - paths: [], - fallback: true, - } -} diff --git a/test/integration/prerender-fallback-aspath/pages/blog/[post]/index.js b/test/integration/prerender-fallback-aspath/pages/blog/[post]/index.js deleted file mode 100644 index 6871672d426910..00000000000000 --- a/test/integration/prerender-fallback-aspath/pages/blog/[post]/index.js +++ /dev/null @@ -1,30 +0,0 @@ -import { useRouter } from 'next/router' - -export default function Post({ params }) { - const router = useRouter() - - if (router.isFallback) return 'Loading...' - - return ( - <> -

{router.asPath}

-

{JSON.stringify(router.query)}

-

{JSON.stringify(params)}

- - ) -} - -export const getStaticProps = ({ params }) => { - return { - props: { - params, - }, - } -} - -export const getStaticPaths = () => { - return { - paths: [], - fallback: true, - } -} diff --git a/test/integration/prerender-fallback-aspath/server.js b/test/integration/prerender-fallback-aspath/server.js deleted file mode 100644 index f6bcbd4857443f..00000000000000 --- a/test/integration/prerender-fallback-aspath/server.js +++ /dev/null @@ -1,31 +0,0 @@ -const http = require('http') -const url = require('url') - -const server = http.createServer(async (req, res) => { - try { - const { pathname } = url.parse(req.url) - - switch (pathname) { - case '/blog/[post]': - case '/web-app/blog/[post]': - return require('./.next/serverless/pages/blog/[post].js').render( - req, - res - ) - case '/blog/[post]/[comment]': - case '/web-app/blog/[post]/[comment]': - return require('./.next/serverless/pages/blog/[post]/[comment].js').render( - req, - res - ) - default: - return res.end('404') - } - } catch (err) { - console.error('error rendering', err) - } -}) - -server.listen(process.env.PORT, () => { - console.log('ready on', process.env.PORT) -}) diff --git a/test/integration/prerender-fallback-aspath/test/index.test.js b/test/integration/prerender-fallback-aspath/test/index.test.js deleted file mode 100644 index 8889a0a891e351..00000000000000 --- a/test/integration/prerender-fallback-aspath/test/index.test.js +++ /dev/null @@ -1,119 +0,0 @@ -/* eslint-env jest */ - -import fs from 'fs-extra' -import { join } from 'path' -import cheerio from 'cheerio' -import { - initNextServerScript, - killApp, - findPort, - nextBuild, - fetchViaHTTP, -} from 'next-test-utils' - -const appDir = join(__dirname, '..') -let app -let appPort - -describe('Fallback asPath normalizing', () => { - beforeAll(async () => { - const startServerlessEmulator = async (dir, port, buildId) => { - const scriptPath = join(dir, 'server.js') - const env = Object.assign({}, { ...process.env }, { PORT: port }) - return initNextServerScript(scriptPath, /ready on/i, env, false) - } - await fs.remove(join(appDir, '.next')) - await nextBuild(appDir) - - appPort = await findPort() - app = await startServerlessEmulator(appDir, appPort) - }) - afterAll(() => killApp(app)) - - it('should have normalized asPath for fallback page', async () => { - const html = await fetchViaHTTP(appPort, '/blog/[post]', undefined, { - headers: { - 'x-now-route-matches': '1=post-1', - 'x-vercel-id': 'hi', - }, - }).then((res) => res.text()) - - const $ = cheerio.load(html) - const asPath = $('#as-path').text() - const query = JSON.parse($('#query').text()) - const params = JSON.parse($('#params').text()) - - expect(asPath).toBe('/blog/post-1') - expect(query).toEqual({ post: 'post-1' }) - expect(params).toEqual({ post: 'post-1' }) - }) - - it('should have normalized asPath for fallback page with entry directory', async () => { - const html = await fetchViaHTTP( - appPort, - '/web-app/blog/[post]', - undefined, - { - headers: { - 'x-now-route-matches': '1=post-abc', - 'x-vercel-id': 'hi', - }, - } - ).then((res) => res.text()) - - const $ = cheerio.load(html) - const asPath = $('#as-path').text() - const query = JSON.parse($('#query').text()) - const params = JSON.parse($('#params').text()) - - expect(asPath).toBe('/web-app/blog/post-abc') - expect(query).toEqual({ post: 'post-abc' }) - expect(params).toEqual({ post: 'post-abc' }) - }) - - it('should have normalized asPath for fallback page multi-params', async () => { - const html = await fetchViaHTTP( - appPort, - '/blog/[post]/[comment]', - undefined, - { - headers: { - 'x-now-route-matches': '1=post-1&2=comment-2', - 'x-vercel-id': 'hi', - }, - } - ).then((res) => res.text()) - - const $ = cheerio.load(html) - const asPath = $('#as-path').text() - const query = JSON.parse($('#query').text()) - const params = JSON.parse($('#params').text()) - - expect(asPath).toBe('/blog/post-1/comment-2') - expect(query).toEqual({ post: 'post-1', comment: 'comment-2' }) - expect(params).toEqual({ post: 'post-1', comment: 'comment-2' }) - }) - - it('should have normalized asPath for fallback page with entry directory multi-params', async () => { - const html = await fetchViaHTTP( - appPort, - '/web-app/blog/[post]/[comment]', - undefined, - { - headers: { - 'x-now-route-matches': '1=post-abc&2=comment-cba', - 'x-vercel-id': 'hi', - }, - } - ).then((res) => res.text()) - - const $ = cheerio.load(html) - const asPath = $('#as-path').text() - const query = JSON.parse($('#query').text()) - const params = JSON.parse($('#params').text()) - - expect(asPath).toBe('/web-app/blog/post-abc/comment-cba') - expect(query).toEqual({ post: 'post-abc', comment: 'comment-cba' }) - expect(params).toEqual({ post: 'post-abc', comment: 'comment-cba' }) - }) -}) diff --git a/test/integration/prerender-legacy/test/index.test.js b/test/integration/prerender-legacy/test/index.test.js index c48ceaf650e95f..c740e399646b3f 100644 --- a/test/integration/prerender-legacy/test/index.test.js +++ b/test/integration/prerender-legacy/test/index.test.js @@ -1,11 +1,9 @@ /* eslint-env jest */ -import fs from 'fs-extra' import { join } from 'path' import { nextBuild } from 'next-test-utils' const appDir = join(__dirname, '..') -const nextConfig = join(appDir, 'next.config.js') describe('Legacy Prerender', () => { describe('handles old getStaticParams', () => { @@ -16,18 +14,5 @@ describe('Legacy Prerender', () => { 'unstable_getStaticParams was replaced with getStaticPaths. Please update your code.' ) }) - - it('should fail the build in serverless mode', async () => { - await fs.writeFile( - nextConfig, - `module.exports = { target: 'serverless' }` - ) - const out = await nextBuild(appDir, [], { stderr: true }) - await fs.remove(nextConfig) - expect(out.stderr).toMatch(`Build error occurred`) - expect(out.stderr).toMatch( - 'unstable_getStaticParams was replaced with getStaticPaths. Please update your code.' - ) - }) }) }) diff --git a/test/integration/prerender-no-revalidate/test/index.test.js b/test/integration/prerender-no-revalidate/test/index.test.js index a02f9c2a5c3f01..d7900e988cdcbb 100644 --- a/test/integration/prerender-no-revalidate/test/index.test.js +++ b/test/integration/prerender-no-revalidate/test/index.test.js @@ -13,18 +13,17 @@ import { import { join } from 'path' const appDir = join(__dirname, '..') -const nextConfig = join(appDir, 'next.config.js') let app let appPort let buildId let stderr -function runTests(route, routePath, serverless) { +function runTests(route, routePath) { it(`[${route}] should not revalidate when set to false`, async () => { const fileName = join( appDir, '.next', - serverless ? 'serverless' : 'server', + 'server', getPageFileFromPagesManifest(appDir, routePath) ) const initialHtml = await renderViaHTTP(appPort, route) @@ -53,7 +52,7 @@ function runTests(route, routePath, serverless) { const fileName = join( appDir, '.next', - serverless ? 'serverless' : 'server', + 'server', getPageFileFromPagesManifest(appDir, routePath) ) const route = join(`/_next/data/${buildId}`, `${routePath}.json`) @@ -77,37 +76,8 @@ function runTests(route, routePath, serverless) { } describe('SSG Prerender No Revalidate', () => { - afterAll(() => fs.remove(nextConfig)) - - describe.skip('serverless mode', () => { - beforeAll(async () => { - await fs.writeFile( - nextConfig, - `module.exports = { target: 'experimental-serverless-trace' }`, - 'utf8' - ) - await fs.remove(join(appDir, '.next')) - await nextBuild(appDir) - appPort = await findPort() - stderr = '' - app = await nextStart(appDir, appPort, { - onStderr: (msg) => { - stderr += msg - }, - }) - buildId = await fs.readFile(join(appDir, '.next/BUILD_ID'), 'utf8') - }) - afterAll(() => killApp(app)) - - runTests('/', '/', true) - runTests('/named', '/named', true) - runTests('/nested', '/nested', true) - runTests('/nested/named', '/nested/named', true) - }) - describe('production mode', () => { beforeAll(async () => { - await fs.remove(nextConfig) await fs.remove(join(appDir, '.next')) await nextBuild(appDir, []) appPort = await findPort() diff --git a/test/integration/prerender-preview/test/index.test.js b/test/integration/prerender-preview/test/index.test.js index 67b803a14e46d9..32cc96ae23f6fc 100644 --- a/test/integration/prerender-preview/test/index.test.js +++ b/test/integration/prerender-preview/test/index.test.js @@ -6,7 +6,6 @@ import fs from 'fs-extra' import { fetchViaHTTP, findPort, - initNextServerScript, killApp, launchApp, nextBuild, @@ -14,12 +13,10 @@ import { renderViaHTTP, } from 'next-test-utils' import webdriver from 'next-webdriver' -import os from 'os' import { join } from 'path' import qs from 'querystring' const appDir = join(__dirname, '..') -const nextConfigPath = join(appDir, 'next.config.js') async function getBuildId() { return fs.readFile(join(appDir, '.next', 'BUILD_ID'), 'utf8') @@ -269,22 +266,8 @@ function runTests(startServer = nextStart) { }) } -const startServerlessEmulator = async (dir, port) => { - const scriptPath = join(dir, 'server.js') - const env = Object.assign( - {}, - { ...process.env }, - { PORT: port, BUILD_ID: await getBuildId() } - ) - return initNextServerScript(scriptPath, /ready on/i, env) -} - describe('Prerender Preview Mode', () => { describe('Development Mode', () => { - beforeAll(async () => { - await fs.remove(nextConfigPath) - }) - let appPort, app it('should start development application', async () => { appPort = await findPort() @@ -398,38 +381,6 @@ describe('Prerender Preview Mode', () => { }) describe('Server Mode', () => { - beforeAll(async () => { - await fs.remove(nextConfigPath) - }) - runTests() }) - - describe.skip('Serverless Mode', () => { - beforeAll(async () => { - await fs.writeFile( - nextConfigPath, - `module.exports = { target: 'experimental-serverless-trace' }` + os.EOL - ) - }) - afterAll(async () => { - await fs.remove(nextConfigPath) - }) - - runTests() - }) - - describe.skip('Emulated Serverless Mode', () => { - beforeAll(async () => { - await fs.writeFile( - nextConfigPath, - `module.exports = { target: 'experimental-serverless-trace' }` + os.EOL - ) - }) - afterAll(async () => { - await fs.remove(nextConfigPath) - }) - - runTests(startServerlessEmulator) - }) }) diff --git a/test/integration/prerender-revalidate/test/index.test.js b/test/integration/prerender-revalidate/test/index.test.js index 661a8c9e97e3d7..c2203d27d2b6c1 100644 --- a/test/integration/prerender-revalidate/test/index.test.js +++ b/test/integration/prerender-revalidate/test/index.test.js @@ -17,7 +17,7 @@ let app let appPort let buildId -function runTests(route, routePath, serverless) { +function runTests(route, routePath) { it(`[${route}] should regenerate page when revalidate time exceeded`, async () => { const fileName = join( appDir, diff --git a/test/integration/preview-fallback/test/index.test.js b/test/integration/preview-fallback/test/index.test.js index 26fa8f17e60da0..3a7ba9f256f5e8 100644 --- a/test/integration/preview-fallback/test/index.test.js +++ b/test/integration/preview-fallback/test/index.test.js @@ -12,29 +12,21 @@ import { launchApp, nextBuild, nextStart, - File, renderViaHTTP, check, } from 'next-test-utils' const appDir = join(__dirname, '..') -const nextConfig = new File(join(appDir, 'next.config.js')) let app let appPort let previewCookie -const getCacheFile = (path = '', serverless) => { - return join( - appDir, - '.next', - serverless ? 'serverless' : 'server', - 'pages', - path - ) +const getCacheFile = (path = '') => { + return join(appDir, '.next', 'server', 'pages', path) } -function runTests(isDev, serverless) { +function runTests(isDev) { it('should get preview cookie correctly', async () => { const res = await fetchViaHTTP(appPort, '/api/enable') previewCookie = '' @@ -83,7 +75,7 @@ function runTests(isDev, serverless) { }) if (!isDev) { - const fsHtml = await fs.readFile(getCacheFile('index.html', serverless)) + const fsHtml = await fs.readFile(getCacheFile('index.html')) const fsProps = JSON.parse(cheerio.load(fsHtml)('#props').text()) expect(fsProps).toEqual({ @@ -125,9 +117,7 @@ function runTests(isDev, serverless) { }) if (!isDev) { - const fsHtml = await fs.readFile( - getCacheFile('no-fallback/first.html', serverless) - ) + const fsHtml = await fs.readFile(getCacheFile('no-fallback/first.html')) const fsProps = JSON.parse(cheerio.load(fsHtml)('#props').text()) expect(fsProps).toEqual({ @@ -165,9 +155,9 @@ function runTests(isDev, serverless) { }) if (!isDev) { - expect( - await fs.exists(getCacheFile('no-fallback/second.html', serverless)) - ).toBe(false) + expect(await fs.exists(getCacheFile('no-fallback/second.html'))).toBe( + false + ) } const res2 = await fetchViaHTTP(appPort, '/no-fallback/second') @@ -199,9 +189,7 @@ function runTests(isDev, serverless) { }) if (!isDev) { - const fsHtml = await fs.readFile( - getCacheFile('fallback/first.html', serverless) - ) + const fsHtml = await fs.readFile(getCacheFile('fallback/first.html')) const fsProps = JSON.parse(cheerio.load(fsHtml)('#props').text()) expect(fsProps).toEqual({ @@ -251,9 +239,7 @@ function runTests(isDev, serverless) { }) if (!isDev) { - const fsHtml = await fs.readFile( - getCacheFile('fallback/second.html', serverless) - ) + const fsHtml = await fs.readFile(getCacheFile('fallback/second.html')) const fsProps = JSON.parse(cheerio.load(fsHtml)('#props').text()) expect(fsProps).toEqual({ @@ -302,24 +288,4 @@ describe('Preview mode with fallback pages', () => { runTests() }) - - describe.skip('serverless mode', () => { - beforeAll(async () => { - nextConfig.write(` - module.exports = { - target: 'experimental-serverless-trace' - } - `) - await fs.remove(join(appDir, '.next')) - await nextBuild(appDir) - appPort = await findPort() - app = await nextStart(appDir, appPort) - }) - afterAll(async () => { - nextConfig.delete() - await killApp(app) - }) - - runTests(true, true) - }) }) diff --git a/test/integration/production-browser-sourcemaps/serverless-server.js b/test/integration/production-browser-sourcemaps/serverless-server.js deleted file mode 100644 index 2cedcfbe079440..00000000000000 --- a/test/integration/production-browser-sourcemaps/serverless-server.js +++ /dev/null @@ -1,58 +0,0 @@ -// This is not the correct way to implement the Next.js serverless target for production traffic -// It is only used for testing cases of rendering specific pages in the integration test suite - -const path = require('path') -const http = require('http') -const send = require('send') - -const server = http.createServer((req, res) => { - if (req.url === '/ssr') { - return require('./.next/serverless/pages/ssr.js').render(req, res) - } - - if (req.url === '/getinitialprops') { - return require('./.next/serverless/pages/getinitialprops.js').render( - req, - res - ) - } - - if (req.url === '/api/api-route') { - return require('./.next/serverless/pages/api/api-route.js').default( - req, - res - ) - } - - if (req.url === '/user/a') { - return send( - req, - path.join(__dirname, '.next/serverless/pages/user/a.html') - ).pipe(res) - } - - if (req.url === '/user/b') { - return send( - req, - path.join(__dirname, '.next/serverless/pages/user/b.html') - ).pipe(res) - } - - if (req.url === '/static') { - return send( - req, - path.join(__dirname, '.next/serverless/pages/static.html') - ).pipe(res) - } - - if (req.url.startsWith('/_next')) { - send( - req, - path.join(__dirname, '.next', req.url.split('/_next').pop()) - ).pipe(res) - } -}) - -server.listen(process.env.PORT, () => { - console.log('ready on', process.env.PORT) -}) diff --git a/test/integration/production-browser-sourcemaps/test/index.test.js b/test/integration/production-browser-sourcemaps/test/index.test.js index b9e1e7da647f8f..3ae63a974e9709 100644 --- a/test/integration/production-browser-sourcemaps/test/index.test.js +++ b/test/integration/production-browser-sourcemaps/test/index.test.js @@ -5,8 +5,6 @@ import { nextBuild, getPageFileFromBuildManifest } from 'next-test-utils' import { recursiveReadDir } from 'next/dist/lib/recursive-readdir' const appDir = join(__dirname, '../') -const nextConfig = join(appDir, 'next.config.js') -let nextConfigContent function runTests() { it('includes sourcemaps for all browser files', async () => { @@ -50,25 +48,4 @@ describe('Production browser sourcemaps', () => { runTests() }) - - describe.skip('Serverless support', () => { - beforeAll(async () => { - nextConfigContent = await fs.readFile(nextConfig, 'utf8') - await fs.writeFile( - nextConfig, - ` - module.exports = { - target: 'serverless', - productionBrowserSourceMaps: true - } - ` - ) - await nextBuild(appDir, [], {}) - }) - afterAll(async () => { - await fs.writeFile(nextConfig, nextConfigContent) - }) - - runTests() - }) }) diff --git a/test/integration/profiling/next.config.js b/test/integration/profiling/next.config.js deleted file mode 100644 index 5614bc006991d7..00000000000000 --- a/test/integration/profiling/next.config.js +++ /dev/null @@ -1,10 +0,0 @@ -module.exports = { - target: 'serverless', - experimental: { - profiling: true, - }, - onDemandEntries: { - // Make sure entries are not getting disposed. - maxInactiveAge: 1000 * 60 * 60, - }, -} diff --git a/test/integration/profiling/pages/index.js b/test/integration/profiling/pages/index.js deleted file mode 100644 index dfeb49b3a0f5c8..00000000000000 --- a/test/integration/profiling/pages/index.js +++ /dev/null @@ -1,8 +0,0 @@ -import Link from 'next/link' - -export default () => ( -
- About Page -

Hello World

-
-) diff --git a/test/integration/profiling/test/index.test.js b/test/integration/profiling/test/index.test.js deleted file mode 100644 index de16f6291a5a1c..00000000000000 --- a/test/integration/profiling/test/index.test.js +++ /dev/null @@ -1,26 +0,0 @@ -/* eslint-env jest */ - -import { join } from 'path' -import { nextBuild } from 'next-test-utils' -import fs from 'fs' -const appDir = join(__dirname, '../') -const profileEventsPath = join(appDir, '.next', 'profile-events.json') - -// TODO: Make profiling experimental flag work with webpack 5 -describe.skip('Profiling Usage', () => { - beforeAll(async () => { - // Delete file if it already exists - if (fs.existsSync(profileEventsPath)) - fs.unlink(profileEventsPath, () => { - console.log('Deleted Existing profile-events.json file') - }) - - await nextBuild(appDir) - }) - - describe('Profiling the build', () => { - it('should emit files', async () => { - expect(fs.existsSync(profileEventsPath)).toBe(true) - }) - }) -}) diff --git a/test/integration/required-server-files-ssr-404/next.config.js b/test/integration/required-server-files-ssr-404/next.config.js index 3636a73ef1f1b1..1214e33ad2f06a 100644 --- a/test/integration/required-server-files-ssr-404/next.config.js +++ b/test/integration/required-server-files-ssr-404/next.config.js @@ -1,6 +1,4 @@ module.exports = { - // ensure incorrect target is overridden by env - target: 'serverless', rewrites() { return [ { diff --git a/test/integration/revalidate-as-path/test/index.test.js b/test/integration/revalidate-as-path/test/index.test.js index 0bd089943d2033..5c84f5122d7809 100644 --- a/test/integration/revalidate-as-path/test/index.test.js +++ b/test/integration/revalidate-as-path/test/index.test.js @@ -7,7 +7,6 @@ import { killApp, findPort, nextBuild, - initNextServerScript, renderViaHTTP, nextStart, waitFor, @@ -15,7 +14,6 @@ import { } from 'next-test-utils' const appDir = join(__dirname, '../') -const nextConfigPath = join(appDir, 'next.config.js') let appPort let buildId let app @@ -29,13 +27,7 @@ const checkAsPath = async (urlPath, expectedAsPath) => { expect(asPath).toBe(expectedAsPath) } -const runTests = (isServerless) => { - if (isServerless) { - it('should render with correct asPath with /index requested', async () => { - await checkAsPath('/index', '/') - }) - } - +const runTests = () => { it('should render with correct asPath with /_next/data /index requested', async () => { stdout = '' const path = `/_next/data/${buildId}/index.json` @@ -78,45 +70,6 @@ const runTests = (isServerless) => { } describe('Revalidate asPath Normalizing', () => { - describe.skip('raw serverless mode', () => { - beforeAll(async () => { - await fs.remove(join(appDir, '.next')) - await fs.writeFile( - nextConfigPath, - ` - module.exports = { - target: 'experimental-serverless-trace' - } - ` - ) - appPort = await findPort() - await nextBuild(appDir) - - buildId = await fs.readFile(join(appDir, '.next/BUILD_ID'), 'utf8') - - app = await initNextServerScript( - join(appDir, 'server.js'), - /ready on/, - { - ...process.env, - PORT: appPort, - BUILD_ID: buildId, - }, - /error/, - { - onStdout(msg) { - stdout += msg || '' - }, - } - ) - }) - afterAll(async () => { - await killApp(app) - await fs.remove(nextConfigPath) - }) - runTests() - }) - describe('server mode', () => { beforeAll(async () => { await fs.remove(join(appDir, '.next')) diff --git a/test/integration/root-optional-revalidate/test/index.test.js b/test/integration/root-optional-revalidate/test/index.test.js index bf69ff160ec1b6..68612e99a78188 100644 --- a/test/integration/root-optional-revalidate/test/index.test.js +++ b/test/integration/root-optional-revalidate/test/index.test.js @@ -5,16 +5,13 @@ import cheerio from 'cheerio' import { killApp, findPort, - File, nextBuild, nextStart, - initNextServerScript, renderViaHTTP, waitFor, } from 'next-test-utils' const appDir = join(__dirname, '../') -const nextConfig = new File(join(appDir, 'next.config.js')) let app let appPort @@ -24,7 +21,7 @@ const getProps = async (path) => { return JSON.parse($('#props').text()) } -const runTests = (rawServerless = false) => { +const runTests = () => { it('should render / correctly', async () => { const props = await getProps('/') expect(props.params).toEqual({}) @@ -37,20 +34,6 @@ const runTests = (rawServerless = false) => { expect(props.random).not.toBe(newProps.random) }) - if (rawServerless) { - it('should render /index correctly', async () => { - const props = await getProps('/index') - expect(props.params).toEqual({}) - - await waitFor(1000) - await getProps('/index') - - const newProps = await getProps('/index') - expect(newProps.params).toEqual({}) - expect(props.random).not.toBe(newProps.random) - }) - } - it('should render /a correctly', async () => { const props = await getProps('/a') expect(props.params).toEqual({ slug: ['a'] }) @@ -87,27 +70,4 @@ describe('Root Optional Catch-all Revalidate', () => { runTests() }) - - describe.skip('raw serverless mode', () => { - beforeAll(async () => { - nextConfig.write(` - module.exports = { - target: 'experimental-serverless-trace' - } - `) - await nextBuild(appDir) - appPort = await findPort() - - app = await initNextServerScript(join(appDir, 'server.js'), /ready on/i, { - ...process.env, - PORT: appPort, - }) - }) - afterAll(async () => { - nextConfig.delete() - await killApp(app) - }) - - runTests(true) - }) }) diff --git a/test/integration/route-load-cancel-css/next.config.js b/test/integration/route-load-cancel-css/next.config.js deleted file mode 100644 index 390f14f326adf4..00000000000000 --- a/test/integration/route-load-cancel-css/next.config.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { target: 'experimental-serverless-trace' } diff --git a/test/integration/route-load-cancel-css/pages/page1.js b/test/integration/route-load-cancel-css/pages/page1.js index 7a7f0d23002161..f098c278d7fb38 100644 --- a/test/integration/route-load-cancel-css/pages/page1.js +++ b/test/integration/route-load-cancel-css/pages/page1.js @@ -1,6 +1,6 @@ import styles from './page1.module.css' -function Page1() { +function Page1(props) { return (

1 @@ -8,4 +8,9 @@ function Page1() { ) } +export async function getServerSideProps() { + await new Promise((resolve) => setTimeout(resolve, 5000)) + return { props: {} } +} + export default Page1 diff --git a/test/integration/route-load-cancel-css/server.js b/test/integration/route-load-cancel-css/server.js deleted file mode 100644 index 64921f037eac92..00000000000000 --- a/test/integration/route-load-cancel-css/server.js +++ /dev/null @@ -1,120 +0,0 @@ -const http = require('http') -const url = require('url') -const fs = require('fs') -const path = require('path') -const server = http.createServer(async (req, res) => { - let { pathname } = url.parse(req.url) - pathname = pathname.replace(/\/$/, '') - let isDataReq = false - if (pathname.startsWith('/_next/data')) { - isDataReq = true - pathname = pathname - .replace(`/_next/data/${process.env.BUILD_ID}/`, '/') - .replace(/\.json$/, '') - } - console.log('serving', pathname) - - if (pathname === '/favicon.ico') { - res.statusCode = 404 - return res.end() - } - - if (pathname.startsWith('/_next/static/')) { - let prom = Promise.resolve() - if (pathname.endsWith('.css')) { - prom = new Promise((resolve) => setTimeout(resolve, 20000)) - } - prom.then(() => { - res.write( - fs.readFileSync( - path.join( - __dirname, - './.next/static/', - decodeURI(pathname.slice('/_next/static/'.length)) - ), - 'utf8' - ) - ) - return res.end() - }) - } else { - if (pathname === '') { - pathname = '/index' - } - const ext = isDataReq ? 'json' : 'html' - if ( - fs.existsSync( - path.join(__dirname, `./.next/serverless/pages${pathname}.${ext}`) - ) - ) { - res.write( - fs.readFileSync( - path.join(__dirname, `./.next/serverless/pages${pathname}.${ext}`), - 'utf8' - ) - ) - return res.end() - } - - let re - try { - re = require(`./.next/serverless/pages${pathname}`) - } catch { - const d = decodeURI(pathname) - if ( - fs.existsSync( - path.join(__dirname, `./.next/serverless/pages${d}.${ext}`) - ) - ) { - res.write( - fs.readFileSync( - path.join(__dirname, `./.next/serverless/pages${d}.${ext}`), - 'utf8' - ) - ) - return res.end() - } - - const routesManifest = require('./.next/routes-manifest.json') - const { dynamicRoutes } = routesManifest - dynamicRoutes.some(({ page, regex }) => { - if (new RegExp(regex).test(pathname)) { - if ( - fs.existsSync( - path.join(__dirname, `./.next/serverless/pages${page}.${ext}`) - ) - ) { - res.write( - fs.readFileSync( - path.join(__dirname, `./.next/serverless/pages${page}.${ext}`), - 'utf8' - ) - ) - res.end() - return true - } - - re = require(`./.next/serverless/pages${page}`) - return true - } - return false - }) - } - if (!res.finished) { - try { - return await (typeof re.render === 'function' - ? re.render(req, res) - : re.default(req, res)) - } catch (e) { - console.log('FAIL_FUNCTION', e) - res.statusCode = 500 - res.write('FAIL_FUNCTION') - res.end() - } - } - } -}) - -server.listen(process.env.PORT, () => { - console.log('ready on', process.env.PORT) -}) diff --git a/test/integration/route-load-cancel-css/test/index.test.js b/test/integration/route-load-cancel-css/test/index.test.js index 0ae6385a4d57e9..81aca9488f82f7 100644 --- a/test/integration/route-load-cancel-css/test/index.test.js +++ b/test/integration/route-load-cancel-css/test/index.test.js @@ -1,11 +1,10 @@ /* eslint-env jest */ -import fs from 'fs-extra' import { - findPort, - initNextServerScript, - killApp, - nextBuild, + nextServer, + runNextCommand, + startApp, + stopApp, waitFor, } from 'next-test-utils' import webdriver from 'next-webdriver' @@ -13,6 +12,7 @@ import { join } from 'path' let app let appPort +let server const appDir = join(__dirname, '../') function runTests() { @@ -34,27 +34,19 @@ function runTests() { describe('route cancel via CSS', () => { beforeAll(async () => { - const startServerlessEmulator = async (dir, port, buildId) => { - const scriptPath = join(dir, 'server.js') - const env = Object.assign( - {}, - { ...process.env }, - { PORT: port, BUILD_ID: buildId } - ) - return initNextServerScript(scriptPath, /ready on/i, env, false, {}) - } - - await fs.remove(join(appDir, '.next')) - await nextBuild(appDir) - - const buildId = await fs.readFile(join(appDir, '.next/BUILD_ID'), 'utf8') - appPort = await findPort() - app = await startServerlessEmulator(appDir, appPort, buildId) - }) + await runNextCommand(['build', appDir]) + + app = nextServer({ + dir: appDir, + dev: false, + quiet: true, + }) - afterAll(async () => { - await killApp(app) + server = await startApp(app) + appPort = server.address().port }) + afterAll(() => stopApp(server)) + runTests() }) diff --git a/test/integration/server-asset-modules/next.config.js b/test/integration/server-asset-modules/next.config.js deleted file mode 100644 index 4ba52ba2c8df67..00000000000000 --- a/test/integration/server-asset-modules/next.config.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = {} diff --git a/test/integration/server-asset-modules/test/index.test.js b/test/integration/server-asset-modules/test/index.test.js index f6e4fda5e3dee0..3b7cb2e298ebe3 100644 --- a/test/integration/server-asset-modules/test/index.test.js +++ b/test/integration/server-asset-modules/test/index.test.js @@ -1,6 +1,5 @@ /* eslint-env jest */ -import fs from 'fs-extra' import { fetchViaHTTP, findPort, @@ -26,8 +25,6 @@ function runTests() { }) } -const nextConfig = join(appDir, 'next.config.js') - describe('serverside asset modules', () => { describe('dev mode', () => { beforeAll(async () => { @@ -41,11 +38,6 @@ describe('serverside asset modules', () => { describe('production mode', () => { beforeAll(async () => { - const curConfig = await fs.readFile(nextConfig, 'utf8') - - if (curConfig.includes('target')) { - await fs.writeFile(nextConfig, `module.exports = {}`) - } await nextBuild(appDir) appPort = await findPort() @@ -55,26 +47,4 @@ describe('serverside asset modules', () => { runTests() }) - - describe.skip('serverless mode', () => { - let origNextConfig - - beforeAll(async () => { - origNextConfig = await fs.readFile(nextConfig, 'utf8') - await fs.writeFile( - nextConfig, - `module.exports = { target: 'serverless' }` - ) - - await nextBuild(appDir) - - appPort = await findPort() - app = await nextStart(appDir, appPort) - }) - afterAll(async () => { - await fs.writeFile(nextConfig, origNextConfig) - await killApp(app) - }) - runTests() - }) }) diff --git a/test/integration/serverless-runtime-configs/pages/_app.js b/test/integration/serverless-runtime-configs/pages/_app.js deleted file mode 100644 index de649117817675..00000000000000 --- a/test/integration/serverless-runtime-configs/pages/_app.js +++ /dev/null @@ -1,12 +0,0 @@ -import getConfig from 'next/config' - -const config = getConfig() - -export default function App({ Component, pageProps }) { - return ( - <> -

{JSON.stringify(config)}

- - - ) -} diff --git a/test/integration/serverless-runtime-configs/pages/_document.js b/test/integration/serverless-runtime-configs/pages/_document.js deleted file mode 100644 index 6f85bbef1fdb73..00000000000000 --- a/test/integration/serverless-runtime-configs/pages/_document.js +++ /dev/null @@ -1,26 +0,0 @@ -import Document, { Html, Head, Main, NextScript } from 'next/document' -import getConfig from 'next/config' - -const config = getConfig() - -class MyDocument extends Document { - static async getInitialProps(ctx) { - const initialProps = await Document.getInitialProps(ctx) - return { ...initialProps } - } - - render() { - return ( - - - -
{JSON.stringify(config)}
-
- - - - ) - } -} - -export default MyDocument diff --git a/test/integration/serverless-runtime-configs/pages/api/config.js b/test/integration/serverless-runtime-configs/pages/api/config.js deleted file mode 100644 index 8e64ae591ba48f..00000000000000 --- a/test/integration/serverless-runtime-configs/pages/api/config.js +++ /dev/null @@ -1,7 +0,0 @@ -import getConfig from 'next/config' - -const config = getConfig() - -export default (req, res) => { - res.json(config) -} diff --git a/test/integration/serverless-runtime-configs/pages/config.js b/test/integration/serverless-runtime-configs/pages/config.js deleted file mode 100644 index 27341d294b8245..00000000000000 --- a/test/integration/serverless-runtime-configs/pages/config.js +++ /dev/null @@ -1,9 +0,0 @@ -import getConfig from 'next/config' - -const config = getConfig() - -const page = () =>

{JSON.stringify(config)}

- -page.getInitialProps = () => ({ a: 'b' }) - -export default page diff --git a/test/integration/serverless-runtime-configs/pages/index.js b/test/integration/serverless-runtime-configs/pages/index.js deleted file mode 100644 index 0957a987fc2f22..00000000000000 --- a/test/integration/serverless-runtime-configs/pages/index.js +++ /dev/null @@ -1 +0,0 @@ -export default () => 'hi' diff --git a/test/integration/serverless-runtime-configs/server.js b/test/integration/serverless-runtime-configs/server.js deleted file mode 100644 index a80556e110bd00..00000000000000 --- a/test/integration/serverless-runtime-configs/server.js +++ /dev/null @@ -1,31 +0,0 @@ -const path = require('path') -const http = require('http') -const send = require('send') - -const server = http.createServer((req, res) => { - if (req.url === '/config') { - return require('./.next/serverless/pages/config.js').render(req, res) - } - - if (req.url === '/') { - return send( - req, - path.join(__dirname, '.next/serverless/pages/index.html') - ).pipe(res) - } - - if (req.url === '/api/config') { - return require('./.next/serverless/pages/api/config.js').default(req, res) - } - - if (req.url.startsWith('/_next')) { - send( - req, - path.join(__dirname, '.next', req.url.split('/_next').pop()) - ).pipe(res) - } -}) - -server.listen(process.env.PORT, () => { - console.log('ready on', process.env.PORT) -}) diff --git a/test/integration/serverless-runtime-configs/test/index.test.js b/test/integration/serverless-runtime-configs/test/index.test.js deleted file mode 100644 index eb29238ea5bafb..00000000000000 --- a/test/integration/serverless-runtime-configs/test/index.test.js +++ /dev/null @@ -1,180 +0,0 @@ -/* eslint-env jest */ - -import fs from 'fs-extra' -import { join } from 'path' -import { - nextBuild, - findPort, - killApp, - launchApp, - renderViaHTTP, - initNextServerScript, -} from 'next-test-utils' -import cheerio from 'cheerio' -import webdriver from 'next-webdriver' - -const appDir = join(__dirname, '../') -const nextConfigPath = join(appDir, 'next.config.js') - -const cleanUp = () => fs.remove(nextConfigPath) - -const nextStart = async (appDir, appPort) => { - const scriptPath = join(appDir, 'server.js') - const env = Object.assign({ ...process.env }, { PORT: `${appPort}` }) - - return initNextServerScript( - scriptPath, - /ready on/i, - env, - /ReferenceError: options is not defined/ - ) -} - -const runTests = (oldServerless = false) => { - const serverlessMode = oldServerless - ? 'serverless' - : 'experimental-serverless-trace' - - it('should not error on usage of publicRuntimeConfig', async () => { - await fs.writeFile( - nextConfigPath, - `module.exports = { - target: '${serverlessMode}', - publicRuntimeConfig: { - hello: 'world' - } - }` - ) - - const { stderr, code } = await nextBuild(appDir, undefined, { - stderr: true, - }) - expect(code).toBe(0) - expect(stderr).not.toMatch( - /Cannot use publicRuntimeConfig or serverRuntimeConfig/ - ) - }) - - it('should not error on usage of serverRuntimeConfig', async () => { - await fs.writeFile( - nextConfigPath, - `module.exports = { - target: '${serverlessMode}', - serverRuntimeConfig: { - hello: 'world' - } - }` - ) - - const { stderr, code } = await nextBuild(appDir, undefined, { - stderr: true, - }) - expect(code).toBe(0) - expect(stderr).not.toMatch( - /Cannot use publicRuntimeConfig or serverRuntimeConfig/ - ) - }) - - const testRuntimeConfig = async (app, appPort) => { - const browser = await webdriver(appPort, '/config') - - const clientHTML = await browser.eval(`document.documentElement.innerHTML`) - const ssrHTML = await renderViaHTTP(appPort, '/config') - const apiJson = await renderViaHTTP(appPort, '/api/config') - - await killApp(app) - await fs.remove(nextConfigPath) - - const ssr$ = cheerio.load(ssrHTML) - const client$ = cheerio.load(clientHTML) - - const ssrConfig = ssr$('#config').text() - const clientConfig = client$('#config').text() - - const expectedSsrConfig = { - publicRuntimeConfig: { - another: 'thing', - }, - serverRuntimeConfig: { - hello: 'world', - }, - } - - const expectedClientConfig = { - publicRuntimeConfig: { - another: 'thing', - }, - serverRuntimeConfig: {}, - } - - expect(JSON.parse(ssrConfig)).toEqual(expectedSsrConfig) - expect(JSON.parse(clientConfig)).toEqual(expectedClientConfig) - - const appSsrConfig = ssr$('#app-config').text() - const appClientConfig = client$('#app-config').text() - - expect(JSON.parse(appSsrConfig)).toEqual(expectedSsrConfig) - expect(JSON.parse(appClientConfig)).toEqual(expectedClientConfig) - - const docSsrConfig = ssr$('#doc-config').text() - const docClientConfig = client$('#doc-config').text() - - // _document doesn't update on client so should be the same - expect(JSON.parse(docSsrConfig)).toEqual(expectedSsrConfig) - expect(JSON.parse(docClientConfig)).toEqual(expectedSsrConfig) - - expect(JSON.parse(apiJson)).toEqual(expectedSsrConfig) - } - - it('should support runtime configs in serverless mode (production)', async () => { - await fs.writeFile( - nextConfigPath, - `module.exports = { - target: '${serverlessMode}', - serverRuntimeConfig: { - hello: 'world' - }, - publicRuntimeConfig: { - another: 'thing' - } - }` - ) - - await nextBuild(appDir, [], { stderr: true, stdout: true }) - const appPort = await findPort() - const app = await nextStart(appDir, appPort) - await testRuntimeConfig(app, appPort) - }) - - it('should support runtime configs in serverless mode (dev)', async () => { - await fs.writeFile( - nextConfigPath, - `module.exports = { - target: '${serverlessMode}', - serverRuntimeConfig: { - hello: 'world' - }, - publicRuntimeConfig: { - another: 'thing' - } - }` - ) - - const appPort = await findPort() - const app = await launchApp(appDir, appPort) - await testRuntimeConfig(app, appPort) - }) -} - -describe.skip('Serverless runtime configs', () => { - beforeAll(() => cleanUp()) - afterAll(() => cleanUp()) - - describe.skip('legacy serverless mode', () => { - runTests(true) - }) - - describe.skip('experimental-serverless-trace mode', () => { - runTests() - }) -}) diff --git a/test/integration/serverless-trace-revalidate/next.config.js b/test/integration/serverless-trace-revalidate/next.config.js deleted file mode 100644 index d15379d6767aac..00000000000000 --- a/test/integration/serverless-trace-revalidate/next.config.js +++ /dev/null @@ -1,5 +0,0 @@ -module.exports = { - target: 'experimental-serverless-trace', - // make sure error isn't thrown from empty publicRuntimeConfig - publicRuntimeConfig: {}, -} diff --git a/test/integration/serverless-trace-revalidate/pages/revalidate.js b/test/integration/serverless-trace-revalidate/pages/revalidate.js deleted file mode 100644 index f810f624ed2bce..00000000000000 --- a/test/integration/serverless-trace-revalidate/pages/revalidate.js +++ /dev/null @@ -1,16 +0,0 @@ -export const getStaticProps = () => { - return { - props: { - hello: 'hello world', - random: Math.random(), - }, - revalidate: 10, - } -} - -export default ({ hello, random }) => ( - <> -

{hello}

-

{random}

- -) diff --git a/test/integration/serverless-trace-revalidate/server.js b/test/integration/serverless-trace-revalidate/server.js deleted file mode 100644 index 848c88de5ac4fb..00000000000000 --- a/test/integration/serverless-trace-revalidate/server.js +++ /dev/null @@ -1,21 +0,0 @@ -const path = require('path') -const http = require('http') - -const server = http.createServer((req, res) => { - const pagePath = (page) => path.join('.next/serverless/pages/', page) - const render = (page) => { - require(`./${pagePath(page)}`).render(req, res) - } - - switch (req.url) { - case '/revalidate': { - return render('/revalidate') - } - default: { - return res.end('404') - } - } -}) -server.listen(process.env.PORT, () => { - console.log('ready on', process.env.PORT) -}) diff --git a/test/integration/serverless-trace-revalidate/test/index.test.js b/test/integration/serverless-trace-revalidate/test/index.test.js deleted file mode 100644 index d258b8f0624051..00000000000000 --- a/test/integration/serverless-trace-revalidate/test/index.test.js +++ /dev/null @@ -1,57 +0,0 @@ -/* eslint-env jest */ - -import fs from 'fs-extra' -import { join } from 'path' -import { - nextBuild, - findPort, - killApp, - initNextServerScript, -} from 'next-test-utils' - -const appDir = join(__dirname, '../') - -let appPort -let app -let buildId - -const nextStart = async (appDir, appPort) => { - const scriptPath = join(appDir, 'server.js') - const env = Object.assign({ ...process.env }, { PORT: `${appPort}` }) - - return initNextServerScript( - scriptPath, - /ready on/i, - env, - /ReferenceError: options is not defined/ - ) -} - -describe.skip('Serverless Trace', () => { - beforeAll(async () => { - await nextBuild(appDir) - appPort = await findPort() - app = await nextStart(appDir, appPort) - buildId = await fs.readFile(join(appDir, '.next/BUILD_ID'), 'utf8') - }) - afterAll(() => killApp(app)) - - it('should have revalidate page in prerender-manifest with correct interval', async () => { - const data = await fs.readJSON( - join(appDir, '.next/prerender-manifest.json') - ) - expect(data.routes['/revalidate']).toEqual({ - initialRevalidateSeconds: 10, - dataRoute: `/_next/data/${buildId}/revalidate.json`, - srcRoute: null, - }) - }) - - it('should set correct Cache-Control header', async () => { - const url = `http://localhost:${appPort}/revalidate` - const res = await fetch(url) - expect(res.headers.get('Cache-Control')).toMatch( - 's-maxage=10, stale-while-revalidate' - ) - }) -}) diff --git a/test/integration/serverless-trace/components/hello.js b/test/integration/serverless-trace/components/hello.js deleted file mode 100644 index 0a350ec10be597..00000000000000 --- a/test/integration/serverless-trace/components/hello.js +++ /dev/null @@ -1 +0,0 @@ -export default () =>

Hello!

diff --git a/test/integration/serverless-trace/next.config.js b/test/integration/serverless-trace/next.config.js deleted file mode 100644 index 08f5958aaf2b77..00000000000000 --- a/test/integration/serverless-trace/next.config.js +++ /dev/null @@ -1,9 +0,0 @@ -module.exports = { - target: 'experimental-serverless-trace', - onDemandEntries: { - // Make sure entries are not getting disposed. - maxInactiveAge: 1000 * 60 * 60, - }, - // make sure error isn't thrown from empty publicRuntimeConfig - publicRuntimeConfig: {}, -} diff --git a/test/integration/serverless-trace/pages/abc.js b/test/integration/serverless-trace/pages/abc.js deleted file mode 100644 index 7d148e908f1275..00000000000000 --- a/test/integration/serverless-trace/pages/abc.js +++ /dev/null @@ -1 +0,0 @@ -export default () =>
test
diff --git a/test/integration/serverless-trace/pages/api/dynamic/[path]/index.js b/test/integration/serverless-trace/pages/api/dynamic/[path]/index.js deleted file mode 100644 index a85b40be7a0750..00000000000000 --- a/test/integration/serverless-trace/pages/api/dynamic/[path]/index.js +++ /dev/null @@ -1,3 +0,0 @@ -export default ({ query }, res) => { - res.json(query) -} diff --git a/test/integration/serverless-trace/pages/api/hello.js b/test/integration/serverless-trace/pages/api/hello.js deleted file mode 100644 index a9f26c92c2adca..00000000000000 --- a/test/integration/serverless-trace/pages/api/hello.js +++ /dev/null @@ -1,3 +0,0 @@ -export default (req, res) => { - res.send('hello world') -} diff --git a/test/integration/serverless-trace/pages/api/posts/[id].js b/test/integration/serverless-trace/pages/api/posts/[id].js deleted file mode 100644 index a85b40be7a0750..00000000000000 --- a/test/integration/serverless-trace/pages/api/posts/[id].js +++ /dev/null @@ -1,3 +0,0 @@ -export default ({ query }, res) => { - res.json(query) -} diff --git a/test/integration/serverless-trace/pages/dynamic-two.js b/test/integration/serverless-trace/pages/dynamic-two.js deleted file mode 100644 index 88d9e7d63496c5..00000000000000 --- a/test/integration/serverless-trace/pages/dynamic-two.js +++ /dev/null @@ -1,9 +0,0 @@ -import dynamic from 'next/dynamic' - -const Hello = dynamic(() => import('../components/hello')) - -export default () => ( -
- -
-) diff --git a/test/integration/serverless-trace/pages/dynamic.js b/test/integration/serverless-trace/pages/dynamic.js deleted file mode 100644 index 88d9e7d63496c5..00000000000000 --- a/test/integration/serverless-trace/pages/dynamic.js +++ /dev/null @@ -1,9 +0,0 @@ -import dynamic from 'next/dynamic' - -const Hello = dynamic(() => import('../components/hello')) - -export default () => ( -
- -
-) diff --git a/test/integration/serverless-trace/pages/fetch.js b/test/integration/serverless-trace/pages/fetch.js deleted file mode 100644 index 18638a31c2ee32..00000000000000 --- a/test/integration/serverless-trace/pages/fetch.js +++ /dev/null @@ -1,29 +0,0 @@ -import fetch from 'isomorphic-unfetch' -import React from 'react' - -export default class extends React.Component { - static async getInitialProps() { - try { - const res = await fetch('') - const text = await res.text() - console.log(text) - return { text } - } catch (err) { - if (err.message.includes('is not a function')) { - return { failed: true, error: err.toString() } - } - - return { error: err.toString() } - } - } - render() { - const { failed, error, text } = this.props - return ( -
- {failed ? 'failed' : ''} - {error} -
{text}
-
- ) - } -} diff --git a/test/integration/serverless-trace/pages/index.js b/test/integration/serverless-trace/pages/index.js deleted file mode 100644 index 0dc47ec0eba6d0..00000000000000 --- a/test/integration/serverless-trace/pages/index.js +++ /dev/null @@ -1,11 +0,0 @@ -import Link from 'next/link' -export default () => { - return ( -
- Hello World - - fetch page - -
- ) -} diff --git a/test/integration/serverless-trace/pages/some-amp.js b/test/integration/serverless-trace/pages/some-amp.js deleted file mode 100644 index 8b00afe0125b3a..00000000000000 --- a/test/integration/serverless-trace/pages/some-amp.js +++ /dev/null @@ -1,2 +0,0 @@ -export default () => `Hi Im an AMP page!` -export const config = { amp: 'hybrid' } diff --git a/test/integration/serverless-trace/public/hello.txt b/test/integration/serverless-trace/public/hello.txt deleted file mode 100644 index 3b18e512dba79e..00000000000000 --- a/test/integration/serverless-trace/public/hello.txt +++ /dev/null @@ -1 +0,0 @@ -hello world diff --git a/test/integration/serverless-trace/test/index.test.js b/test/integration/serverless-trace/test/index.test.js deleted file mode 100644 index bfbdb8ca08a6f6..00000000000000 --- a/test/integration/serverless-trace/test/index.test.js +++ /dev/null @@ -1,202 +0,0 @@ -/* eslint-env jest */ - -import webdriver from 'next-webdriver' -import { join } from 'path' -import { existsSync, readdirSync } from 'fs' -import { - killApp, - findPort, - nextBuild, - nextStart, - renderViaHTTP, - fetchViaHTTP, - readNextBuildClientPageFile, - getPageFileFromPagesManifest, -} from 'next-test-utils' -import fetch from 'node-fetch' - -const appDir = join(__dirname, '../') -const serverlessDir = join(appDir, '.next/serverless/pages') -const chunksDir = join(appDir, '.next/static/chunks') -let appPort -let app - -describe.skip('Serverless Trace', () => { - beforeAll(async () => { - await nextBuild(appDir) - appPort = await findPort() - app = await nextStart(appDir, appPort) - }) - afterAll(() => killApp(app)) - - it('should render the page', async () => { - const html = await renderViaHTTP(appPort, '/') - expect(html).toMatch(/Hello World/) - }) - - it('should serve file from public folder', async () => { - const content = await renderViaHTTP(appPort, '/hello.txt') - expect(content.trim()).toBe('hello world') - }) - - it('should render the page with dynamic import', async () => { - const html = await renderViaHTTP(appPort, '/dynamic') - expect(html).toMatch(/Hello!/) - }) - - it('should render the page with same dynamic import', async () => { - const html = await renderViaHTTP(appPort, '/dynamic-two') - expect(html).toMatch(/Hello!/) - }) - - it('should render 404', async () => { - const html = await renderViaHTTP(appPort, '/404') - expect(html).toMatch(/This page could not be found/) - }) - - it('should render 404 for /_next/static', async () => { - const html = await renderViaHTTP(appPort, '/_next/static') - expect(html).toMatch(/This page could not be found/) - }) - - it('should render an AMP page', async () => { - const html = await renderViaHTTP(appPort, '/some-amp?amp=1') - expect(html).toMatch(/Hi Im an AMP page/) - expect(html).toMatch(/ampproject\.org/) - }) - - it('should have correct amphtml rel link', async () => { - const html = await renderViaHTTP(appPort, '/some-amp') - expect(html).toMatch(/Hi Im an AMP page/) - expect(html).toMatch(/rel="amphtml" href="\/some-amp\.amp"/) - }) - - it('should have correct canonical link', async () => { - const html = await renderViaHTTP(appPort, '/some-amp?amp=1') - expect(html).toMatch(/rel="canonical" href="\/some-amp"/) - }) - - it('should have correct canonical link (auto-export link)', async () => { - const html = await renderViaHTTP(appPort, '/some-amp.amp') - expect(html).toMatch(/rel="canonical" href="\/some-amp"/) - }) - - it('should render correctly when importing isomorphic-unfetch', async () => { - const url = `http://localhost:${appPort}/fetch` - const res = await fetch(url) - expect(res.status).toBe(200) - const text = await res.text() - expect(text.includes('failed')).toBe(false) - }) - - it('should render correctly when importing isomorphic-unfetch on the client side', async () => { - const browser = await webdriver(appPort, '/') - try { - const text = await browser - .elementByCss('a') - .click() - .waitForElementByCss('.fetch-page') - .elementByCss('#text') - .text() - - expect(text).toMatch(/fetch page/) - } finally { - await browser.close() - } - }) - - it('should not have combined client-side chunks', () => { - expect(readdirSync(chunksDir).length).toBeGreaterThanOrEqual(2) - const contents = readNextBuildClientPageFile(appDir, '/dynamic') - expect(contents).not.toContain('Hello!') - }) - - it('should not output _app.js and _document.js to serverless build', () => { - expect(existsSync(join(serverlessDir, '_app.js'))).toBeFalsy() - expect(existsSync(join(serverlessDir, '_document.js'))).toBeFalsy() - }) - - it('should replace static pages with HTML files', async () => { - const pages = ['/abc', '/dynamic', '/dynamic-two', '/some-amp'] - for (const page of pages) { - const file = getPageFileFromPagesManifest(appDir, page) - - expect(file.endsWith('.html')).toBe(true) - } - }) - - it('should not replace non-static pages with HTML files', async () => { - const pages = ['/fetch', '/_error'] - - for (const page of pages) { - const file = getPageFileFromPagesManifest(appDir, page) - - expect(file.endsWith('.js')).toBe(true) - } - }) - it('should reply on API request successfully', async () => { - const content = await renderViaHTTP(appPort, '/api/hello') - expect(content).toMatch(/hello world/) - }) - - it('should reply on dynamic API request successfully', async () => { - const result = await renderViaHTTP(appPort, '/api/posts/post-1') - const { id } = JSON.parse(result) - expect(id).toBe('post-1') - }) - - it('should reply on dynamic API request successfully with query parameters', async () => { - const result = await renderViaHTTP(appPort, '/api/posts/post-1?param=val') - const { id, param } = JSON.parse(result) - expect(id).toBe('post-1') - expect(param).toBe('val') - }) - - it('should reply on dynamic API index request successfully', async () => { - const result = await renderViaHTTP(appPort, '/api/dynamic/post-1') - const { path } = JSON.parse(result) - expect(path).toBe('post-1') - }) - - it('should reply on dynamic API index request successfully with query parameters', async () => { - const result = await renderViaHTTP(appPort, '/api/dynamic/post-1?param=val') - const { path, param } = JSON.parse(result) - expect(path).toBe('post-1') - expect(param).toBe('val') - }) - - it('should reply with redirect on API request with trailing slash', async () => { - const res = await fetchViaHTTP( - appPort, - '/api/hello/', - {}, - { redirect: 'manual' } - ) - expect(res.status).toBe(308) - expect(res.headers.get('location')).toBe( - `http://localhost:${appPort}/api/hello` - ) - }) - - it('should reply on API request with trailing slassh successfully', async () => { - const content = await renderViaHTTP(appPort, '/api/hello/') - expect(content).toMatch(/hello world/) - }) - - describe('With basic usage', () => { - it('should allow etag header support', async () => { - const url = `http://localhost:${appPort}/` - const etag = (await fetch(url)).headers.get('ETag') - - const headers = { 'If-None-Match': etag } - const res2 = await fetch(url, { headers }) - expect(res2.status).toBe(304) - }) - - it('should set Content-Length header', async () => { - const url = `http://localhost:${appPort}` - const res = await fetch(url) - expect(res.headers.get('Content-Length')).toBeDefined() - }) - }) -}) diff --git a/test/integration/serverless/components/hello.js b/test/integration/serverless/components/hello.js deleted file mode 100644 index 0a350ec10be597..00000000000000 --- a/test/integration/serverless/components/hello.js +++ /dev/null @@ -1 +0,0 @@ -export default () =>

Hello!

diff --git a/test/integration/serverless/next.config.js b/test/integration/serverless/next.config.js deleted file mode 100644 index 4ed8e75b4dd008..00000000000000 --- a/test/integration/serverless/next.config.js +++ /dev/null @@ -1,9 +0,0 @@ -module.exports = { - target: 'serverless', - onDemandEntries: { - // Make sure entries are not getting disposed. - maxInactiveAge: 1000 * 60 * 60, - }, - // make sure error isn't thrown from empty publicRuntimeConfig - publicRuntimeConfig: {}, -} diff --git a/test/integration/serverless/pages/abc.js b/test/integration/serverless/pages/abc.js deleted file mode 100644 index 7d148e908f1275..00000000000000 --- a/test/integration/serverless/pages/abc.js +++ /dev/null @@ -1 +0,0 @@ -export default () =>
test
diff --git a/test/integration/serverless/pages/api/dynamic/[path]/index.js b/test/integration/serverless/pages/api/dynamic/[path]/index.js deleted file mode 100644 index a85b40be7a0750..00000000000000 --- a/test/integration/serverless/pages/api/dynamic/[path]/index.js +++ /dev/null @@ -1,3 +0,0 @@ -export default ({ query }, res) => { - res.json(query) -} diff --git a/test/integration/serverless/pages/api/hello.js b/test/integration/serverless/pages/api/hello.js deleted file mode 100644 index a9f26c92c2adca..00000000000000 --- a/test/integration/serverless/pages/api/hello.js +++ /dev/null @@ -1,3 +0,0 @@ -export default (req, res) => { - res.send('hello world') -} diff --git a/test/integration/serverless/pages/api/posts/[id].js b/test/integration/serverless/pages/api/posts/[id].js deleted file mode 100644 index a85b40be7a0750..00000000000000 --- a/test/integration/serverless/pages/api/posts/[id].js +++ /dev/null @@ -1,3 +0,0 @@ -export default ({ query }, res) => { - res.json(query) -} diff --git a/test/integration/serverless/pages/api/top-level-error.js b/test/integration/serverless/pages/api/top-level-error.js deleted file mode 100644 index 76e62c7ae9a59f..00000000000000 --- a/test/integration/serverless/pages/api/top-level-error.js +++ /dev/null @@ -1,6 +0,0 @@ -throw new Error('top-level-oops') - -// eslint-disable-next-line -export default (req, res) => { - res.end('hi') -} diff --git a/test/integration/serverless/pages/catchall/[...slug].js b/test/integration/serverless/pages/catchall/[...slug].js deleted file mode 100644 index 0f299096056360..00000000000000 --- a/test/integration/serverless/pages/catchall/[...slug].js +++ /dev/null @@ -1,5 +0,0 @@ -const SlugPage = ({ query }) =>
{JSON.stringify(query)}
- -SlugPage.getInitialProps = ({ query }) => ({ query }) - -export default SlugPage diff --git a/test/integration/serverless/pages/dr/[slug].js b/test/integration/serverless/pages/dr/[slug].js deleted file mode 100644 index 0f299096056360..00000000000000 --- a/test/integration/serverless/pages/dr/[slug].js +++ /dev/null @@ -1,5 +0,0 @@ -const SlugPage = ({ query }) =>
{JSON.stringify(query)}
- -SlugPage.getInitialProps = ({ query }) => ({ query }) - -export default SlugPage diff --git a/test/integration/serverless/pages/dynamic-two.js b/test/integration/serverless/pages/dynamic-two.js deleted file mode 100644 index 88d9e7d63496c5..00000000000000 --- a/test/integration/serverless/pages/dynamic-two.js +++ /dev/null @@ -1,9 +0,0 @@ -import dynamic from 'next/dynamic' - -const Hello = dynamic(() => import('../components/hello')) - -export default () => ( -
- -
-) diff --git a/test/integration/serverless/pages/dynamic.js b/test/integration/serverless/pages/dynamic.js deleted file mode 100644 index 88d9e7d63496c5..00000000000000 --- a/test/integration/serverless/pages/dynamic.js +++ /dev/null @@ -1,9 +0,0 @@ -import dynamic from 'next/dynamic' - -const Hello = dynamic(() => import('../components/hello')) - -export default () => ( -
- -
-) diff --git a/test/integration/serverless/pages/fetch-cjs.js b/test/integration/serverless/pages/fetch-cjs.js deleted file mode 100644 index b87d029b7e941c..00000000000000 --- a/test/integration/serverless/pages/fetch-cjs.js +++ /dev/null @@ -1,29 +0,0 @@ -const fetch = require('isomorphic-unfetch') -const React = require('react') - -export default class extends React.Component { - static async getInitialProps() { - try { - const res = await fetch('') - const text = await res.text() - console.log(text) - return { text } - } catch (err) { - if (err.message.includes('is not a function')) { - return { failed: true, error: err.toString() } - } - - return { error: err.toString() } - } - } - render() { - const { failed, error, text } = this.props - return ( -
- {failed ? 'failed' : ''} - {error} -
{text}
-
- ) - } -} diff --git a/test/integration/serverless/pages/fetch.js b/test/integration/serverless/pages/fetch.js deleted file mode 100644 index 18638a31c2ee32..00000000000000 --- a/test/integration/serverless/pages/fetch.js +++ /dev/null @@ -1,29 +0,0 @@ -import fetch from 'isomorphic-unfetch' -import React from 'react' - -export default class extends React.Component { - static async getInitialProps() { - try { - const res = await fetch('') - const text = await res.text() - console.log(text) - return { text } - } catch (err) { - if (err.message.includes('is not a function')) { - return { failed: true, error: err.toString() } - } - - return { error: err.toString() } - } - } - render() { - const { failed, error, text } = this.props - return ( -
- {failed ? 'failed' : ''} - {error} -
{text}
-
- ) - } -} diff --git a/test/integration/serverless/pages/index.js b/test/integration/serverless/pages/index.js deleted file mode 100644 index d16232feaadca4..00000000000000 --- a/test/integration/serverless/pages/index.js +++ /dev/null @@ -1,14 +0,0 @@ -import Link from 'next/link' -export default () => { - return ( -
- Hello World - - fetch page - - - fetch cjs page - -
- ) -} diff --git a/test/integration/serverless/pages/some-amp.js b/test/integration/serverless/pages/some-amp.js deleted file mode 100644 index 8b00afe0125b3a..00000000000000 --- a/test/integration/serverless/pages/some-amp.js +++ /dev/null @@ -1,2 +0,0 @@ -export default () => `Hi Im an AMP page!` -export const config = { amp: 'hybrid' } diff --git a/test/integration/serverless/public/hello.txt b/test/integration/serverless/public/hello.txt deleted file mode 100644 index 3b18e512dba79e..00000000000000 --- a/test/integration/serverless/public/hello.txt +++ /dev/null @@ -1 +0,0 @@ -hello world diff --git a/test/integration/serverless/public/static/legacy.txt b/test/integration/serverless/public/static/legacy.txt deleted file mode 100644 index 5b813149083518..00000000000000 --- a/test/integration/serverless/public/static/legacy.txt +++ /dev/null @@ -1 +0,0 @@ -new static folder diff --git a/test/integration/serverless/test/index.test.js b/test/integration/serverless/test/index.test.js deleted file mode 100644 index d41cc66e93eb4e..00000000000000 --- a/test/integration/serverless/test/index.test.js +++ /dev/null @@ -1,346 +0,0 @@ -/* eslint-env jest */ - -import webdriver from 'next-webdriver' -import { join } from 'path' -import cheerio from 'cheerio' -import { existsSync, readdirSync, readFileSync } from 'fs' -import { - killApp, - waitFor, - findPort, - nextBuild, - nextStart, - fetchViaHTTP, - renderViaHTTP, - getPageFileFromBuildManifest, - getPageFileFromPagesManifest, -} from 'next-test-utils' -import qs from 'querystring' -import fetch from 'node-fetch' - -const appDir = join(__dirname, '../') -const serverlessDir = join(appDir, '.next/serverless/pages') -const chunksDir = join(appDir, '.next/static/chunks') -let stderr = '' -let appPort -let app - -describe.skip('Serverless', () => { - let output - - beforeAll(async () => { - const result = await nextBuild(appDir, undefined, { - stderr: true, - stdout: true, - }) - output = result.stdout + result.stderr - appPort = await findPort() - app = await nextStart(appDir, appPort, { - onStderr: (msg) => { - stderr += msg || '' - }, - }) - }) - afterAll(() => killApp(app)) - - it('should show target config deprecation warning', () => { - expect(output).toContain( - 'The `target` config is deprecated and will be removed in a future version' - ) - }) - - it('should render the page', async () => { - const html = await renderViaHTTP(appPort, '/') - expect(html).toMatch(/Hello World/) - }) - - it('should add autoExport for auto pre-rendered pages', async () => { - for (const page of ['/', '/abc']) { - const html = await renderViaHTTP(appPort, page) - const $ = cheerio.load(html) - const data = JSON.parse($('#__NEXT_DATA__').html()) - expect(data.autoExport).toBe(true) - } - }) - - it('should not add autoExport for non pre-rendered pages', async () => { - for (const page of ['/fetch']) { - const html = await renderViaHTTP(appPort, page) - const $ = cheerio.load(html) - const data = JSON.parse($('#__NEXT_DATA__').html()) - expect(!!data.autoExport).toBe(false) - } - }) - - it('should serve file from public folder', async () => { - const content = await renderViaHTTP(appPort, '/hello.txt') - expect(content.trim()).toBe('hello world') - - const legacy = await renderViaHTTP(appPort, '/static/legacy.txt') - expect(legacy).toMatch(`new static folder`) - }) - - it('should not infinity loop on a 404 static file', async () => { - expect.assertions(2) - - // ensure top-level static does not exist (important for test) - // we expect /public/static, though. - expect(existsSync(join(appDir, 'static'))).toBe(false) - - const res = await fetchViaHTTP(appPort, '/static/404') - expect(res.status).toBe(404) - }) - - it('should render the page with dynamic import', async () => { - const html = await renderViaHTTP(appPort, '/dynamic') - expect(html).toMatch(/Hello!/) - }) - - it('should render the page with same dynamic import', async () => { - const html = await renderViaHTTP(appPort, '/dynamic-two') - expect(html).toMatch(/Hello!/) - }) - - it('should render 404', async () => { - const html = await renderViaHTTP(appPort, '/404') - expect(html).toMatch(/This page could not be found/) - }) - - it('should render 404 for /_next/static', async () => { - const html = await renderViaHTTP(appPort, '/_next/static') - expect(html).toMatch(/This page could not be found/) - }) - - it('should render an AMP page', async () => { - const html = await renderViaHTTP(appPort, '/some-amp?amp=1') - expect(html).toMatch(/Hi Im an AMP page/) - expect(html).toMatch(/ampproject\.org/) - }) - - it('should have correct amphtml rel link', async () => { - const html = await renderViaHTTP(appPort, '/some-amp') - expect(html).toMatch(/Hi Im an AMP page/) - expect(html).toMatch(/rel="amphtml" href="\/some-amp\.amp"/) - }) - - it('should have correct canonical link', async () => { - const html = await renderViaHTTP(appPort, '/some-amp?amp=1') - expect(html).toMatch(/rel="canonical" href="\/some-amp"/) - }) - - it('should have correct canonical link (auto-export link)', async () => { - const html = await renderViaHTTP(appPort, '/some-amp.amp') - expect(html).toMatch(/rel="canonical" href="\/some-amp"/) - }) - - it('should render correctly when importing isomorphic-unfetch', async () => { - const url = `http://localhost:${appPort}/fetch` - const res = await fetch(url) - expect(res.status).toBe(200) - const text = await res.text() - expect(text.includes('failed')).toBe(false) - }) - - it('should render correctly when importing isomorphic-unfetch on the client side', async () => { - const browser = await webdriver(appPort, '/') - try { - const text = await browser - .elementByCss('#fetchlink') - .click() - .waitForElementByCss('.fetch-page') - .elementByCss('#text') - .text() - - expect(text).toMatch(/fetch page/) - } finally { - await browser.close() - } - }) - - it('should render correctly when importing isomorphic-unfetch CJS', async () => { - const url = `http://localhost:${appPort}/fetch-cjs` - const res = await fetch(url) - expect(res.status).toBe(200) - const text = await res.text() - expect(text.includes('failed')).toBe(false) - }) - - it('should render correctly when importing isomorphic-unfetch CJS on the client side', async () => { - const browser = await webdriver(appPort, '/') - try { - const text = await browser - .elementByCss('#fetchcjslink') - .click() - .waitForElementByCss('.fetch-cjs-page') - .elementByCss('#text') - .text() - - expect(text).toMatch(/fetch page/) - } finally { - await browser.close() - } - }) - - it('should not have combined client-side chunks', () => { - expect(readdirSync(chunksDir).length).toBeGreaterThanOrEqual(2) - - const pageFile = getPageFileFromBuildManifest(appDir, '/') - - expect( - readFileSync(join(__dirname, '..', '.next', pageFile), 'utf8') - ).not.toContain('Hello!') - }) - - it('should not output _app.js and _document.js to serverless build', () => { - expect(existsSync(join(serverlessDir, '_app.js'))).toBeFalsy() - expect(existsSync(join(serverlessDir, '_document.js'))).toBeFalsy() - }) - - it('should replace static pages with HTML files', async () => { - const pages = ['/abc', '/dynamic', '/dynamic-two', '/some-amp'] - for (const page of pages) { - const file = getPageFileFromPagesManifest(appDir, page) - - expect(file.endsWith('.html')).toBe(true) - } - }) - - it('should not replace non-static pages with HTML files', async () => { - const pages = ['/fetch', '/_error'] - - for (const page of pages) { - const file = getPageFileFromPagesManifest(appDir, page) - - expect(file.endsWith('.js')).toBe(true) - } - }) - - it('should reply on API request successfully', async () => { - const content = await renderViaHTTP(appPort, '/api/hello') - expect(content).toMatch(/hello world/) - }) - - it('should reply on dynamic API request successfully', async () => { - const result = await renderViaHTTP(appPort, '/api/posts/post-1') - const { id } = JSON.parse(result) - expect(id).toBe('post-1') - }) - - it('should reply on dynamic API request successfully with query parameters', async () => { - const result = await renderViaHTTP(appPort, '/api/posts/post-1?param=val') - const { id, param } = JSON.parse(result) - expect(id).toBe('post-1') - expect(param).toBe('val') - }) - - it('should reply on dynamic API index request successfully', async () => { - const result = await renderViaHTTP(appPort, '/api/dynamic/post-1') - const { path } = JSON.parse(result) - expect(path).toBe('post-1') - }) - - it('should reply on dynamic API index request successfully with query parameters', async () => { - const result = await renderViaHTTP(appPort, '/api/dynamic/post-1?param=val') - const { path, param } = JSON.parse(result) - expect(path).toBe('post-1') - expect(param).toBe('val') - }) - - it('should reply with redirect on API request with trailing slash', async () => { - const res = await fetchViaHTTP( - appPort, - '/api/hello/', - {}, - { redirect: 'manual' } - ) - expect(res.status).toBe(308) - expect(res.headers.get('location')).toBe( - `http://localhost:${appPort}/api/hello` - ) - }) - - it('should reply on API request with trailing slash successfully', async () => { - const content = await renderViaHTTP(appPort, '/api/hello/') - expect(content).toMatch(/hello world/) - }) - - it('should have the correct query string for a dynamic route', async () => { - const paramRaw = 'test % 123' - const param = encodeURIComponent(paramRaw) - - const html = await renderViaHTTP(appPort, `/dr/${param}`) - const $ = cheerio.load(html) - const data = JSON.parse($('#__NEXT_DATA__').html()) - - expect(data.query).toEqual({ slug: paramRaw }) - }) - - it('should have the correct query string for a now route', async () => { - const paramRaw = 'test % 123' - const html = await fetchViaHTTP(appPort, `/dr/[slug]`, '', { - headers: { - 'x-now-route-matches': qs.stringify({ - 1: encodeURIComponent(paramRaw), - }), - }, - }).then((res) => res.text()) - const $ = cheerio.load(html) - const data = JSON.parse($('#__NEXT_DATA__').html()) - - expect(data.query).toEqual({ slug: paramRaw }) - }) - - it('should have the correct query string for a now route with invalid matches but correct path', async () => { - const paramRaw = 'dr/first' - const html = await fetchViaHTTP(appPort, `/dr/first`, '', { - headers: { - 'x-now-route-matches': qs.stringify({ - 1: encodeURIComponent(paramRaw), - }), - }, - }).then((res) => res.text()) - const $ = cheerio.load(html) - const data = JSON.parse($('#__NEXT_DATA__').html()) - - expect(data.query).toEqual({ slug: 'first' }) - }) - - it('should have the correct query string for a catch all now route', async () => { - const paramRaw = ['nested % 1', 'nested/2'] - - const html = await fetchViaHTTP(appPort, `/catchall/[...slug]`, '', { - headers: { - 'x-now-route-matches': qs.stringify({ - 1: paramRaw.map((e) => encodeURIComponent(e)).join('/'), - }), - }, - }).then((res) => res.text()) - const $ = cheerio.load(html) - const data = JSON.parse($('#__NEXT_DATA__').html()) - - expect(data.query).toEqual({ slug: paramRaw }) - }) - - it('should log error in API route correctly', async () => { - await renderViaHTTP(appPort, '/api/top-level-error') - await waitFor(1000) - expect(stderr).toContain('top-level-oops') - }) - - describe('With basic usage', () => { - it('should allow etag header support', async () => { - const url = `http://localhost:${appPort}/` - const etag = (await fetch(url)).headers.get('ETag') - - const headers = { 'If-None-Match': etag } - const res2 = await fetch(url, { headers }) - expect(res2.status).toBe(304) - }) - - it('should set Content-Length header', async () => { - const url = `http://localhost:${appPort}` - const res = await fetch(url) - expect(res.headers.get('Content-Length')).toBeDefined() - }) - }) -}) diff --git a/test/integration/src-dir-support-double-dir/next.config.js b/test/integration/src-dir-support-double-dir/next.config.js deleted file mode 100644 index 91c68aa65f28d2..00000000000000 --- a/test/integration/src-dir-support-double-dir/next.config.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { target: 'serverless' } diff --git a/test/integration/src-dir-support-double-dir/test/index.test.js b/test/integration/src-dir-support-double-dir/test/index.test.js index 3b8bd374066738..58f055f15f631c 100644 --- a/test/integration/src-dir-support-double-dir/test/index.test.js +++ b/test/integration/src-dir-support-double-dir/test/index.test.js @@ -1,7 +1,6 @@ /* eslint-env jest */ import { join } from 'path' -import fs from 'fs-extra' import { renderViaHTTP, findPort, @@ -27,8 +26,6 @@ function runTests(dev) { }) } -const nextConfig = join(appDir, 'next.config.js') - describe('Dynamic Routing', () => { describe('dev mode', () => { beforeAll(async () => { @@ -42,11 +39,6 @@ describe('Dynamic Routing', () => { describe('production mode', () => { beforeAll(async () => { - const curConfig = await fs.readFile(nextConfig, 'utf8') - - if (curConfig.includes('target')) { - await fs.remove(nextConfig) - } await nextBuild(appDir) appPort = await findPort() @@ -56,20 +48,4 @@ describe('Dynamic Routing', () => { runTests() }) - - describe.skip('serverless production mode', () => { - beforeAll(async () => { - await fs.writeFile( - nextConfig, - `module.exports = { target: 'serverless' }` - ) - - await nextBuild(appDir) - - appPort = await findPort() - app = await nextStart(appDir, appPort) - }) - afterAll(() => killApp(app)) - runTests() - }) }) diff --git a/test/integration/src-dir-support/next.config.js b/test/integration/src-dir-support/next.config.js deleted file mode 100644 index 4ba52ba2c8df67..00000000000000 --- a/test/integration/src-dir-support/next.config.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = {} diff --git a/test/integration/src-dir-support/test/index.test.js b/test/integration/src-dir-support/test/index.test.js index 336057c5c47db6..f3f9cff5c5d9a5 100644 --- a/test/integration/src-dir-support/test/index.test.js +++ b/test/integration/src-dir-support/test/index.test.js @@ -2,7 +2,6 @@ import webdriver from 'next-webdriver' import { join } from 'path' -import fs from 'fs-extra' import { renderViaHTTP, findPort, @@ -76,8 +75,6 @@ function runTests() { }) } -const nextConfig = join(appDir, 'next.config.js') - describe('Dynamic Routing', () => { describe('dev mode', () => { beforeAll(async () => { @@ -91,7 +88,6 @@ describe('Dynamic Routing', () => { describe('production mode', () => { beforeAll(async () => { - await fs.remove(nextConfig) await nextBuild(appDir) appPort = await findPort() app = await nextStart(appDir, appPort) @@ -100,23 +96,4 @@ describe('Dynamic Routing', () => { runTests() }) - - describe('SSR production mode', () => { - beforeAll(async () => { - await fs.writeFile( - nextConfig, - ` - module.exports = { - target: 'serverless' - } - ` - ) - - await nextBuild(appDir) - appPort = await findPort() - app = await nextStart(appDir, appPort) - }) - afterAll(() => killApp(app)) - runTests() - }) }) diff --git a/test/integration/ssg-dynamic-routes-404-page/test/index.test.js b/test/integration/ssg-dynamic-routes-404-page/test/index.test.js index fa1ebd17306065..35ed02ad16f21a 100644 --- a/test/integration/ssg-dynamic-routes-404-page/test/index.test.js +++ b/test/integration/ssg-dynamic-routes-404-page/test/index.test.js @@ -1,6 +1,5 @@ /* eslint-env jest */ -import fs from 'fs-extra' import { join } from 'path' import { killApp, @@ -12,7 +11,6 @@ import { } from 'next-test-utils' const appDir = join(__dirname, '../') -const nextConfig = join(appDir, 'next.config.js') let appPort let app @@ -45,33 +43,6 @@ describe('Custom 404 Page for static site generation with dynamic routes', () => runTests('server') }) - describe.skip('serverless mode', () => { - afterAll(async () => { - await fs.remove(nextConfig) - await killApp(app) - }) - - it('should build successfully', async () => { - await fs.writeFile( - nextConfig, - ` - module.exports = { target: 'experimental-serverless-trace' } - ` - ) - const { code } = await nextBuild(appDir, [], { - stderr: true, - stdout: true, - }) - - expect(code).toBe(0) - - appPort = await findPort() - app = await nextStart(appDir, appPort) - }) - - runTests('serverless') - }) - describe('dev mode', () => { beforeAll(async () => { appPort = await findPort() diff --git a/test/integration/ssr-prepass/next.config.js b/test/integration/ssr-prepass/next.config.js deleted file mode 100644 index f0b0ae02419782..00000000000000 --- a/test/integration/ssr-prepass/next.config.js +++ /dev/null @@ -1,3 +0,0 @@ -module.exports = { - target: 'serverless', -} diff --git a/test/integration/ssr-prepass/pages/index.js b/test/integration/ssr-prepass/pages/index.js deleted file mode 100644 index ad7a183a5aab59..00000000000000 --- a/test/integration/ssr-prepass/pages/index.js +++ /dev/null @@ -1,3 +0,0 @@ -import ssrPrepass from 'react-ssr-prepass' - -export default () =>

hello {ssrPrepass && 'world'}

diff --git a/test/integration/ssr-prepass/test/index.test.js b/test/integration/ssr-prepass/test/index.test.js deleted file mode 100644 index bedcf443289d04..00000000000000 --- a/test/integration/ssr-prepass/test/index.test.js +++ /dev/null @@ -1,28 +0,0 @@ -/* eslint-env jest */ - -import { join } from 'path' -import { - killApp, - findPort, - nextStart, - nextBuild, - renderViaHTTP, -} from 'next-test-utils' - -const appDir = join(__dirname, '../') -let appPort -let app - -describe('SSR Prepass', () => { - beforeAll(async () => { - await nextBuild(appDir) - appPort = await findPort() - app = await nextStart(appDir, appPort) - }) - afterAll(() => killApp(app)) - - it('should not externalize when used outside Next.js', async () => { - const html = await renderViaHTTP(appPort, '/') - expect(html).toMatch(/hello.*?world/) - }) -}) diff --git a/test/integration/static-404/test/index.test.js b/test/integration/static-404/test/index.test.js index 47194d7e17e36c..68bec4ca39e174 100644 --- a/test/integration/static-404/test/index.test.js +++ b/test/integration/static-404/test/index.test.js @@ -35,23 +35,6 @@ describe('Static 404 page', () => { expect(html).toContain('This page could not be found') }) - it('should export 404 page without custom _error (serverless)', async () => { - await fs.writeFile( - nextConfig, - ` - module.exports = { - target: 'experimental-serverless-trace' - } - ` - ) - await nextBuild(appDir) - appPort = await findPort() - app = await nextStart(appDir, appPort) - const html = await renderViaHTTP(appPort, '/non-existent') - await killApp(app) - expect(html).toContain('This page could not be found') - }) - it('should not export 404 page with custom _error GIP', async () => { await fs.writeFile( errorPage, diff --git a/test/integration/static-page-name/test/index.test.js b/test/integration/static-page-name/test/index.test.js index 5a0fce53d87af7..6136db40fd07b6 100644 --- a/test/integration/static-page-name/test/index.test.js +++ b/test/integration/static-page-name/test/index.test.js @@ -1,7 +1,6 @@ /* eslint-env jest */ import path from 'path' -import fs from 'fs-extra' import webdriver from 'next-webdriver' import { launchApp, @@ -13,7 +12,6 @@ import { } from 'next-test-utils' const appDir = path.join(__dirname, '..') -const nextConfigPath = path.join(appDir, 'next.config.js') let app let appPort @@ -51,21 +49,4 @@ describe('Static Page Name', () => { afterAll(() => killApp(app)) runTests() }) - - describe.skip('serverless mode', () => { - beforeAll(async () => { - appPort = await findPort() - await fs.writeFile( - nextConfigPath, - 'module.exports = { target: "serverless" }' - ) - await nextBuild(appDir) - app = await nextStart(appDir, appPort) - }) - afterAll(async () => { - await killApp(app) - await fs.remove(nextConfigPath) - }) - runTests() - }) }) diff --git a/test/integration/telemetry/next.config.target b/test/integration/telemetry/next.config.target deleted file mode 100644 index d1a88cac38d9ca..00000000000000 --- a/test/integration/telemetry/next.config.target +++ /dev/null @@ -1,10 +0,0 @@ -const { PHASE_PRODUCTION_BUILD } = require('next/constants') - -module.exports = phase => { - if (phase === PHASE_PRODUCTION_BUILD) { - return { - target: 'experimental-serverless-trace', - } - } - return {} -} diff --git a/test/integration/telemetry/test/index.test.js b/test/integration/telemetry/test/index.test.js index 2b236414e9a0dd..749f1a5c3f63e9 100644 --- a/test/integration/telemetry/test/index.test.js +++ b/test/integration/telemetry/test/index.test.js @@ -284,32 +284,6 @@ describe('Telemetry CLI', () => { expect(event).toMatch(/"hasBabelConfig": true/) }) - it('cli session: next config with target', async () => { - await fs.rename( - path.join(appDir, 'next.config.target'), - path.join(appDir, 'next.config.js') - ) - const { stderr } = await runNextCommand(['build', appDir], { - stderr: true, - env: { - NEXT_TELEMETRY_DEBUG: 1, - }, - }) - await fs.rename( - path.join(appDir, 'next.config.js'), - path.join(appDir, 'next.config.target') - ) - - const event = /NEXT_CLI_SESSION_STARTED[\s\S]+?{([\s\S]+?)}/ - .exec(stderr) - .pop() - - expect(event).toMatch(/"hasNextConfig": true/) - expect(event).toMatch(/"buildTarget": "experimental-serverless-trace"/) - expect(event).toMatch(/"hasWebpackConfig": false/) - expect(event).toMatch(/"hasBabelConfig": false/) - }) - it('cli session: next config with webpack', async () => { await fs.rename( path.join(appDir, 'next.config.webpack'), diff --git a/test/production/middleware-is-not-allowed-when-using-serverless-target/app/middleware.js b/test/production/middleware-is-not-allowed-when-using-serverless-target/app/middleware.js deleted file mode 100644 index 18694660d48c51..00000000000000 --- a/test/production/middleware-is-not-allowed-when-using-serverless-target/app/middleware.js +++ /dev/null @@ -1,3 +0,0 @@ -export default (req) => { - console.log(req.url) -} diff --git a/test/production/middleware-is-not-allowed-when-using-serverless-target/app/next.config.js b/test/production/middleware-is-not-allowed-when-using-serverless-target/app/next.config.js deleted file mode 100644 index f0b0ae02419782..00000000000000 --- a/test/production/middleware-is-not-allowed-when-using-serverless-target/app/next.config.js +++ /dev/null @@ -1,3 +0,0 @@ -module.exports = { - target: 'serverless', -} diff --git a/test/production/middleware-is-not-allowed-when-using-serverless-target/app/pages/index.js b/test/production/middleware-is-not-allowed-when-using-serverless-target/app/pages/index.js deleted file mode 100644 index 08fe48e9b56c87..00000000000000 --- a/test/production/middleware-is-not-allowed-when-using-serverless-target/app/pages/index.js +++ /dev/null @@ -1,3 +0,0 @@ -export default function Home() { - return
Hello
-} diff --git a/test/production/middleware-is-not-allowed-when-using-serverless-target/index.test.ts b/test/production/middleware-is-not-allowed-when-using-serverless-target/index.test.ts deleted file mode 100644 index e3eafa950a23f4..00000000000000 --- a/test/production/middleware-is-not-allowed-when-using-serverless-target/index.test.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { nextBuild } from 'next-test-utils' -import path from 'path' - -describe.skip('Middleware is not allowed when using serverless target', () => { - it('fails to build', async () => { - const { code, stderr } = await nextBuild( - path.resolve(__dirname, './app'), - undefined, - { ignoreFail: true, stderr: true } - ) - expect(code).toEqual(1) - expect(stderr).toContain('MiddlewareInServerlessTargetError') - }) -}) diff --git a/test/unit/isolated/_resolvedata/valid-target/next.config.js b/test/unit/isolated/_resolvedata/valid-target/next.config.js deleted file mode 100644 index f0b0ae02419782..00000000000000 --- a/test/unit/isolated/_resolvedata/valid-target/next.config.js +++ /dev/null @@ -1,3 +0,0 @@ -module.exports = { - target: 'serverless', -} diff --git a/test/unit/isolated/config.test.ts b/test/unit/isolated/config.test.ts index 01bc0c2671fb5d..1eb964c37ff250 100644 --- a/test/unit/isolated/config.test.ts +++ b/test/unit/isolated/config.test.ts @@ -74,15 +74,7 @@ describe('config', () => { PHASE_DEVELOPMENT_SERVER, join(__dirname, '_resolvedata', 'invalid-target') ) - }).rejects.toThrow(/Specified target is invalid/) - }) - - it('Should pass when a valid target is provided', async () => { - const config = await loadConfig( - PHASE_DEVELOPMENT_SERVER, - join(__dirname, '_resolvedata', 'valid-target') - ) - expect(config.target).toBe('serverless') + }).rejects.toThrow(/The "target" property is no longer supported/) }) it('Should throw an error when next.config.js is not present', async () => { diff --git a/test/unit/isolated/require-page.test.ts b/test/unit/isolated/require-page.test.ts index 17fe2815d11faf..7a099dc3c66172 100644 --- a/test/unit/isolated/require-page.test.ts +++ b/test/unit/isolated/require-page.test.ts @@ -52,18 +52,18 @@ describe('normalizePagePath', () => { describe('getPagePath', () => { it('Should not append /index to the / page', () => { - expect(() => getPagePath('/', distDir, false)).toThrow( + expect(() => getPagePath('/', distDir)).toThrow( 'Cannot find module for page: /' ) }) it('Should prepend / when a page does not have it', () => { - const pagePath = getPagePath('_error', distDir, false) + const pagePath = getPagePath('_error', distDir) expect(pagePath).toBe(join(pathToBundles, `${sep}_error.js`)) }) it('Should throw with paths containing ../', () => { - expect(() => getPagePath('/../../package.json', distDir, false)).toThrow() + expect(() => getPagePath('/../../package.json', distDir)).toThrow() }) }) From 761d7646cc3d5326f3cb1095b0a1553dfb2dca32 Mon Sep 17 00:00:00 2001 From: Shu Ding Date: Tue, 18 Oct 2022 18:53:08 +0200 Subject: [PATCH 05/13] Fix next-app-loader bug in windows (#41520) There is this `createAbsolutePath` function that concatenates a virtual route and a dir path. The virtual route uses the posix separator `/` but the dir path uses `\` in Windows. Here's an example of the error: ``` error - ./node_modules/.pnpm/next@12.3.2-canary.29_ikefsjgelhtr3cq7h24gohqzbe/node_modules/next/dist/build/webpack/loaders/next-app-loader.js?name=app%2Fpage&appPaths=%2Fpage&pagePath=private-next-app-dir% 2Fpage.tsx&appDir=E%3A%5CWorkSpace%5C2022%5Csongbook.studio%5Capp&pageExtensions=tsx&pageExtensions=ts&pageExtensions=jsx&pageExtensions=js! Module parse failed: Octal literal in strict mode (9:41) ``` ## Bug - [ ] Related issues linked using `fixes #number` - [ ] Integration tests added - [ ] Errors have a helpful link attached, see `contributing.md` ## Feature - [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR. - [ ] Related issues linked using `fixes #number` - [ ] Integration tests added - [ ] Documentation added - [ ] Telemetry added. In case of a feature if it's used or not. - [ ] Errors have a helpful link attached, see `contributing.md` ## Documentation / Examples - [ ] Make sure the linting passes by running `pnpm lint` - [ ] The "examples guidelines" are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md) --- packages/next/build/webpack/loaders/next-app-loader.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/packages/next/build/webpack/loaders/next-app-loader.ts b/packages/next/build/webpack/loaders/next-app-loader.ts index 3e724e56dd1f4d..1f1ea4dd7458bb 100644 --- a/packages/next/build/webpack/loaders/next-app-loader.ts +++ b/packages/next/build/webpack/loaders/next-app-loader.ts @@ -2,6 +2,7 @@ import type webpack from 'webpack' import type { ValueOf } from '../../../shared/lib/constants' import { NODE_RESOLVE_OPTIONS } from '../../webpack-config' import { getModuleBuildInfo } from './get-module-build-info' +import { sep } from 'path' export const FILE_TYPES = { layout: 'layout', @@ -114,7 +115,12 @@ async function createTreeCodeFromPath({ } function createAbsolutePath(appDir: string, pathToTurnAbsolute: string) { - return pathToTurnAbsolute.replace(/^private-next-app-dir/, appDir) + return ( + pathToTurnAbsolute + // Replace all POSIX path separators with the current OS path separator + .replace(/\//g, sep) + .replace(/^private-next-app-dir/, appDir) + ) } const nextAppLoader: webpack.LoaderDefinitionFunction<{ From cf1c0b60758a67f5f94fcbdc7d51055be9caa2ec Mon Sep 17 00:00:00 2001 From: JJ Kasper Date: Tue, 18 Oct 2022 09:54:31 -0700 Subject: [PATCH 06/13] v12.3.2-canary.30 --- lerna.json | 2 +- packages/create-next-app/package.json | 2 +- packages/eslint-config-next/package.json | 4 ++-- packages/eslint-plugin-next/package.json | 2 +- packages/font/package.json | 2 +- packages/next-bundle-analyzer/package.json | 2 +- packages/next-codemod/package.json | 2 +- packages/next-env/package.json | 2 +- packages/next-mdx/package.json | 2 +- packages/next-plugin-storybook/package.json | 2 +- packages/next-polyfill-module/package.json | 2 +- packages/next-polyfill-nomodule/package.json | 2 +- packages/next-swc/package.json | 2 +- packages/next/package.json | 14 +++++++------- packages/react-dev-overlay/package.json | 2 +- packages/react-refresh-utils/package.json | 2 +- pnpm-lock.yaml | 14 +++++++------- 17 files changed, 30 insertions(+), 30 deletions(-) diff --git a/lerna.json b/lerna.json index 93e50ea281c294..e66ad7a7e63eca 100644 --- a/lerna.json +++ b/lerna.json @@ -16,5 +16,5 @@ "registry": "https://registry.npmjs.org/" } }, - "version": "12.3.2-canary.29" + "version": "12.3.2-canary.30" } diff --git a/packages/create-next-app/package.json b/packages/create-next-app/package.json index b30afdc5b1a8b2..d9bac0fb85952f 100644 --- a/packages/create-next-app/package.json +++ b/packages/create-next-app/package.json @@ -1,6 +1,6 @@ { "name": "create-next-app", - "version": "12.3.2-canary.29", + "version": "12.3.2-canary.30", "keywords": [ "react", "next", diff --git a/packages/eslint-config-next/package.json b/packages/eslint-config-next/package.json index 8068f4d40693fa..272cf7cf0d2c52 100644 --- a/packages/eslint-config-next/package.json +++ b/packages/eslint-config-next/package.json @@ -1,6 +1,6 @@ { "name": "eslint-config-next", - "version": "12.3.2-canary.29", + "version": "12.3.2-canary.30", "description": "ESLint configuration used by NextJS.", "main": "index.js", "license": "MIT", @@ -9,7 +9,7 @@ "directory": "packages/eslint-config-next" }, "dependencies": { - "@next/eslint-plugin-next": "12.3.2-canary.29", + "@next/eslint-plugin-next": "12.3.2-canary.30", "@rushstack/eslint-patch": "^1.1.3", "@typescript-eslint/parser": "^5.21.0", "eslint-import-resolver-node": "^0.3.6", diff --git a/packages/eslint-plugin-next/package.json b/packages/eslint-plugin-next/package.json index 415b2b54ebc9bd..60b35fd0b2ae8f 100644 --- a/packages/eslint-plugin-next/package.json +++ b/packages/eslint-plugin-next/package.json @@ -1,6 +1,6 @@ { "name": "@next/eslint-plugin-next", - "version": "12.3.2-canary.29", + "version": "12.3.2-canary.30", "description": "ESLint plugin for NextJS.", "main": "dist/index.js", "license": "MIT", diff --git a/packages/font/package.json b/packages/font/package.json index 4c7f89fe205c27..1493bc20154419 100644 --- a/packages/font/package.json +++ b/packages/font/package.json @@ -1,6 +1,6 @@ { "name": "@next/font", - "version": "12.3.2-canary.29", + "version": "12.3.2-canary.30", "repository": { "url": "vercel/next.js", "directory": "packages/font" diff --git a/packages/next-bundle-analyzer/package.json b/packages/next-bundle-analyzer/package.json index f6df76b1296398..c3be13759210a9 100644 --- a/packages/next-bundle-analyzer/package.json +++ b/packages/next-bundle-analyzer/package.json @@ -1,6 +1,6 @@ { "name": "@next/bundle-analyzer", - "version": "12.3.2-canary.29", + "version": "12.3.2-canary.30", "main": "index.js", "types": "index.d.ts", "license": "MIT", diff --git a/packages/next-codemod/package.json b/packages/next-codemod/package.json index 5ee6ae1961bc97..114d694b46d0e1 100644 --- a/packages/next-codemod/package.json +++ b/packages/next-codemod/package.json @@ -1,6 +1,6 @@ { "name": "@next/codemod", - "version": "12.3.2-canary.29", + "version": "12.3.2-canary.30", "license": "MIT", "dependencies": { "chalk": "4.1.0", diff --git a/packages/next-env/package.json b/packages/next-env/package.json index 36be881c31858e..2602ad2ba4b102 100644 --- a/packages/next-env/package.json +++ b/packages/next-env/package.json @@ -1,6 +1,6 @@ { "name": "@next/env", - "version": "12.3.2-canary.29", + "version": "12.3.2-canary.30", "keywords": [ "react", "next", diff --git a/packages/next-mdx/package.json b/packages/next-mdx/package.json index ae5fb2160d7c4b..a1b74f67dbb1c6 100644 --- a/packages/next-mdx/package.json +++ b/packages/next-mdx/package.json @@ -1,6 +1,6 @@ { "name": "@next/mdx", - "version": "12.3.2-canary.29", + "version": "12.3.2-canary.30", "main": "index.js", "license": "MIT", "repository": { diff --git a/packages/next-plugin-storybook/package.json b/packages/next-plugin-storybook/package.json index edab18cc0d61f6..7fd43f1e379089 100644 --- a/packages/next-plugin-storybook/package.json +++ b/packages/next-plugin-storybook/package.json @@ -1,6 +1,6 @@ { "name": "@next/plugin-storybook", - "version": "12.3.2-canary.29", + "version": "12.3.2-canary.30", "repository": { "url": "vercel/next.js", "directory": "packages/next-plugin-storybook" diff --git a/packages/next-polyfill-module/package.json b/packages/next-polyfill-module/package.json index b041f6d8975f83..39cabddb8cb484 100644 --- a/packages/next-polyfill-module/package.json +++ b/packages/next-polyfill-module/package.json @@ -1,6 +1,6 @@ { "name": "@next/polyfill-module", - "version": "12.3.2-canary.29", + "version": "12.3.2-canary.30", "description": "A standard library polyfill for ES Modules supporting browsers (Edge 16+, Firefox 60+, Chrome 61+, Safari 10.1+)", "main": "dist/polyfill-module.js", "license": "MIT", diff --git a/packages/next-polyfill-nomodule/package.json b/packages/next-polyfill-nomodule/package.json index 89743c99d023ef..5cc379705ebdf5 100644 --- a/packages/next-polyfill-nomodule/package.json +++ b/packages/next-polyfill-nomodule/package.json @@ -1,6 +1,6 @@ { "name": "@next/polyfill-nomodule", - "version": "12.3.2-canary.29", + "version": "12.3.2-canary.30", "description": "A polyfill for non-dead, nomodule browsers.", "main": "dist/polyfill-nomodule.js", "license": "MIT", diff --git a/packages/next-swc/package.json b/packages/next-swc/package.json index 05e4334850e209..25ae7556c6c1fa 100644 --- a/packages/next-swc/package.json +++ b/packages/next-swc/package.json @@ -1,6 +1,6 @@ { "name": "@next/swc", - "version": "12.3.2-canary.29", + "version": "12.3.2-canary.30", "private": true, "scripts": { "build-native": "napi build --platform -p next-swc-napi --cargo-name next_swc_napi --features plugin --js false native", diff --git a/packages/next/package.json b/packages/next/package.json index ae4105dbb2f5f0..ef17daffb4fa10 100644 --- a/packages/next/package.json +++ b/packages/next/package.json @@ -1,6 +1,6 @@ { "name": "next", - "version": "12.3.2-canary.29", + "version": "12.3.2-canary.30", "description": "The React Framework", "main": "./dist/server/next.js", "license": "MIT", @@ -74,7 +74,7 @@ ] }, "dependencies": { - "@next/env": "12.3.2-canary.29", + "@next/env": "12.3.2-canary.30", "@swc/helpers": "0.4.11", "caniuse-lite": "^1.0.30001406", "postcss": "8.4.14", @@ -125,11 +125,11 @@ "@hapi/accept": "5.0.2", "@napi-rs/cli": "2.12.0", "@napi-rs/triples": "1.1.0", - "@next/polyfill-module": "12.3.2-canary.29", - "@next/polyfill-nomodule": "12.3.2-canary.29", - "@next/react-dev-overlay": "12.3.2-canary.29", - "@next/react-refresh-utils": "12.3.2-canary.29", - "@next/swc": "12.3.2-canary.29", + "@next/polyfill-module": "12.3.2-canary.30", + "@next/polyfill-nomodule": "12.3.2-canary.30", + "@next/react-dev-overlay": "12.3.2-canary.30", + "@next/react-refresh-utils": "12.3.2-canary.30", + "@next/swc": "12.3.2-canary.30", "@segment/ajv-human-errors": "2.1.2", "@taskr/clear": "1.1.0", "@taskr/esnext": "1.1.0", diff --git a/packages/react-dev-overlay/package.json b/packages/react-dev-overlay/package.json index c172254fab3224..f9475b249dd7c4 100644 --- a/packages/react-dev-overlay/package.json +++ b/packages/react-dev-overlay/package.json @@ -1,6 +1,6 @@ { "name": "@next/react-dev-overlay", - "version": "12.3.2-canary.29", + "version": "12.3.2-canary.30", "description": "A development-only overlay for developing React applications.", "repository": { "url": "vercel/next.js", diff --git a/packages/react-refresh-utils/package.json b/packages/react-refresh-utils/package.json index aef4507db07c02..86ba88091678ed 100644 --- a/packages/react-refresh-utils/package.json +++ b/packages/react-refresh-utils/package.json @@ -1,6 +1,6 @@ { "name": "@next/react-refresh-utils", - "version": "12.3.2-canary.29", + "version": "12.3.2-canary.30", "description": "An experimental package providing utilities for React Refresh.", "repository": { "url": "vercel/next.js", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 4a3b5a304dae16..0fa74a61d3a82d 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -397,7 +397,7 @@ importers: packages/eslint-config-next: specifiers: - '@next/eslint-plugin-next': 12.3.2-canary.29 + '@next/eslint-plugin-next': 12.3.2-canary.30 '@rushstack/eslint-patch': ^1.1.3 '@typescript-eslint/parser': ^5.21.0 eslint-import-resolver-node: ^0.3.6 @@ -465,12 +465,12 @@ importers: '@hapi/accept': 5.0.2 '@napi-rs/cli': 2.12.0 '@napi-rs/triples': 1.1.0 - '@next/env': 12.3.2-canary.29 - '@next/polyfill-module': 12.3.2-canary.29 - '@next/polyfill-nomodule': 12.3.2-canary.29 - '@next/react-dev-overlay': 12.3.2-canary.29 - '@next/react-refresh-utils': 12.3.2-canary.29 - '@next/swc': 12.3.2-canary.29 + '@next/env': 12.3.2-canary.30 + '@next/polyfill-module': 12.3.2-canary.30 + '@next/polyfill-nomodule': 12.3.2-canary.30 + '@next/react-dev-overlay': 12.3.2-canary.30 + '@next/react-refresh-utils': 12.3.2-canary.30 + '@next/swc': 12.3.2-canary.30 '@segment/ajv-human-errors': 2.1.2 '@swc/helpers': 0.4.11 '@taskr/clear': 1.1.0 From 17773a1cf3b087f0c4dee75b07b9f9c5fa70c4ce Mon Sep 17 00:00:00 2001 From: Steven Date: Tue, 18 Oct 2022 19:09:43 -0400 Subject: [PATCH 07/13] Fix links to `next/legacy/image` demo (#41539) This PR fixes links to `next/legacy/image` (demo, deploy, etc) --- docs/api-reference/next/legacy/image.md | 22 +++++++++++----------- docs/basic-features/image-optimization.md | 2 +- examples/image-component/README.md | 2 +- examples/image-legacy-component/README.md | 14 +++++++------- 4 files changed, 20 insertions(+), 20 deletions(-) diff --git a/docs/api-reference/next/legacy/image.md b/docs/api-reference/next/legacy/image.md index c8493622ec8a31..4f9919160d2bc1 100644 --- a/docs/api-reference/next/legacy/image.md +++ b/docs/api-reference/next/legacy/image.md @@ -89,18 +89,18 @@ The layout behavior of the image as the viewport changes size. | `responsive` | Scale to fit width of container | `640w`,ย `750w`, ...ย `2048w`,ย `3840w` (based on [imageSizes](#image-sizes) and [deviceSizes](#device-sizes)) | `100vw` | yes | | `fill` | Grow in both X and Y axes to fill container | `640w`,ย `750w`, ...ย `2048w`,ย `3840w` (based on [imageSizes](#image-sizes) and [deviceSizes](#device-sizes)) | `100vw` | yes | -- [Demo the `intrinsic` layout (default)](https://image-component.nextjs.gallery/layout-intrinsic) +- [Demo the `intrinsic` layout (default)](https://image-legacy-component.nextjs.gallery/layout-intrinsic) - When `intrinsic`, the image will scale the dimensions down for smaller viewports, but maintain the original dimensions for larger viewports. -- [Demo the `fixed` layout](https://image-component.nextjs.gallery/layout-fixed) +- [Demo the `fixed` layout](https://image-legacy-component.nextjs.gallery/layout-fixed) - When `fixed`, the image dimensions will not change as the viewport changes (no responsiveness) similar to the native `img` element. -- [Demo the `responsive` layout](https://image-component.nextjs.gallery/layout-responsive) +- [Demo the `responsive` layout](https://image-legacy-component.nextjs.gallery/layout-responsive) - When `responsive`, the image will scale the dimensions down for smaller viewports and scale up for larger viewports. - Ensure the parent element uses `display: block` in their stylesheet. -- [Demo the `fill` layout](https://image-component.nextjs.gallery/layout-fill) +- [Demo the `fill` layout](https://image-legacy-component.nextjs.gallery/layout-fill) - When `fill`, the image will stretch both width and height to the dimensions of the parent element, provided the parent element is relative. - This is usually paired with the [`objectFit`](#objectFit) property. - Ensure the parent element has `position: relative` in their stylesheet. -- [Demo background image](https://image-component.nextjs.gallery/background) +- [Demo background image](https://image-legacy-component.nextjs.gallery/background) ### loader @@ -193,9 +193,9 @@ When `empty`, there will be no placeholder while the image is loading, only empt Try it out: -- [Demo the `blur` placeholder](https://image-component.nextjs.gallery/placeholder) -- [Demo the shimmer effect with `blurDataURL` prop](https://image-component.nextjs.gallery/shimmer) -- [Demo the color effect with `blurDataURL` prop](https://image-component.nextjs.gallery/color) +- [Demo the `blur` placeholder](https://image-legacy-component.nextjs.gallery/placeholder) +- [Demo the shimmer effect with `blurDataURL` prop](https://image-legacy-component.nextjs.gallery/shimmer) +- [Demo the color effect with `blurDataURL` prop](https://image-legacy-component.nextjs.gallery/color) ## Advanced Props @@ -258,9 +258,9 @@ less) is recommended. Including larger images as placeholders may harm your appl Try it out: -- [Demo the default `blurDataURL` prop](https://image-component.nextjs.gallery/placeholder) -- [Demo the shimmer effect with `blurDataURL` prop](https://image-component.nextjs.gallery/shimmer) -- [Demo the color effect with `blurDataURL` prop](https://image-component.nextjs.gallery/color) +- [Demo the default `blurDataURL` prop](https://image-legacy-component.nextjs.gallery/placeholder) +- [Demo the shimmer effect with `blurDataURL` prop](https://image-legacy-component.nextjs.gallery/shimmer) +- [Demo the color effect with `blurDataURL` prop](https://image-legacy-component.nextjs.gallery/color) You can also [generate a solid color Data URL](https://png-pixel.com) to match the image. diff --git a/docs/basic-features/image-optimization.md b/docs/basic-features/image-optimization.md index 6264cb6472266d..d68189b8300776 100644 --- a/docs/basic-features/image-optimization.md +++ b/docs/basic-features/image-optimization.md @@ -193,7 +193,7 @@ This is the default for `
` elements but should be specified otherwise. ### Styling Examples -For examples of the Image component used with the various styles, see the [Image component example app](https://image-component.nextjs.gallery). +For examples of the Image component used with the various styles, see the [Image Component Demo](https://image-component.nextjs.gallery). ## Configuration diff --git a/examples/image-component/README.md b/examples/image-component/README.md index d56babeeaaa881..f56fc5671d6b59 100644 --- a/examples/image-component/README.md +++ b/examples/image-component/README.md @@ -6,7 +6,7 @@ The index page ([`pages/index.js`](pages/index.js)) has a couple images, one int ## Live demo -[https://image-component.nextjs.gallery/](https://image-component.nextjs.gallery/) +[https://image-component.nextjs.gallery](https://image-component.nextjs.gallery) ## Deploy your own diff --git a/examples/image-legacy-component/README.md b/examples/image-legacy-component/README.md index 4aea7c6be0f9b5..84d5c3561cb097 100644 --- a/examples/image-legacy-component/README.md +++ b/examples/image-legacy-component/README.md @@ -1,29 +1,29 @@ -# Image Component Example +# Legacy Image Component Example -This example shows how to use the [Image Component in Next.js](https://nextjs.org/docs/api-reference/next/image) serve optimized, responsive images. +This example shows how to use the [Legacy Image Component in Next.js](https://nextjs.org/docs/api-reference/next/legacy/image) serve optimized, responsive images. The index page ([`pages/index.js`](pages/index.js)) has a couple images, one internal image and one external image. In [`next.config.js`](next.config.js), the `domains` property is used to enable external images. The other pages demonstrate the different layouts. Run or deploy the app to see how it works! ## Live demo -[https://image-component.nextjs.gallery/](https://image-component.nextjs.gallery/) +[https://image-legacy-component.nextjs.gallery](https://image-legacy-component.nextjs.gallery) ## Deploy your own Deploy the example using [Vercel](https://vercel.com?utm_source=github&utm_medium=readme&utm_campaign=next-example) or preview live with [StackBlitz](https://stackblitz.com/github/vercel/next.js/tree/canary/examples/image-legacy-component) -[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/git/external?repository-url=https://github.com/vercel/next.js/tree/canary/examples/image-component&project-name=image-component&repository-name=image-legacy-component) +[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/git/external?repository-url=https://github.com/vercel/next.js/tree/canary/examples/image-legacy-component&project-name=image-legacy-component&repository-name=image-legacy-component) ## How to use Execute [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app) with [npm](https://docs.npmjs.com/cli/init), [Yarn](https://yarnpkg.com/lang/en/docs/cli/create/), or [pnpm](https://pnpm.io) to bootstrap the example: ```bash -npx create-next-app --example image-component image-app +npx create-next-app --example image-legacy-component image-app # or -yarn create next-app --example image-component image-app +yarn create next-app --example image-legacy-component image-app # or -pnpm create next-app --example image-component image-app +pnpm create next-app --example image-legacy-component image-app ``` Deploy it to the cloud with [Vercel](https://vercel.com/new?utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). From bc335d7ef7aeddc2a943e520973636103bfe7972 Mon Sep 17 00:00:00 2001 From: Jiachi Liu Date: Tue, 18 Oct 2022 16:32:23 -0700 Subject: [PATCH 08/13] Prebundle react for appDir (#41337) Inline a react and react-dom for app dir, when `appDir` flag is enabled opt into the built-in version for all. For server layer react, use the react share subset for server components. For all server side of react-dom usage, use the server-rendering-stub. Co-authored-by: Shu Ding Co-authored-by: JJ Kasper --- package.json | 4 - packages/next/build/index.ts | 3 + packages/next/build/utils.ts | 12 +- packages/next/build/webpack-config.ts | 181 +- packages/next/build/webpack/require-hook.ts | 66 +- packages/next/compiled/react-dom/LICENSE | 21 + ...t-dom-server-legacy.browser.development.js | 8682 ++++ ...om-server-legacy.browser.production.min.js | 113 + ...eact-dom-server-legacy.node.development.js | 8742 ++++ ...t-dom-server-legacy.node.production.min.js | 123 + ...t-dom-server-rendering-stub.development.js | 62 + ...om-server-rendering-stub.production.min.js | 11 + .../react-dom-server.browser.development.js | 8674 ++++ ...react-dom-server.browser.production.min.js | 117 + .../cjs/react-dom-server.node.development.js | 8726 ++++ .../react-dom-server.node.production.min.js | 126 + .../react-dom-static.browser.development.js | 8659 ++++ ...react-dom-static.browser.production.min.js | 117 + .../cjs/react-dom-static.node.development.js | 8741 ++++ .../react-dom-static.node.production.min.js | 127 + .../cjs/react-dom-test-utils.development.js | 1760 + .../react-dom-test-utils.production.min.js | 40 + .../react-dom-unstable_testing.development.js | 31891 +++++++++++++++ ...act-dom-unstable_testing.production.min.js | 363 + .../react-dom/cjs/react-dom.development.js | 33758 ++++++++++++++++ .../react-dom/cjs/react-dom.production.min.js | 370 + .../react-dom/cjs/react-dom.profiling.min.js | 413 + packages/next/compiled/react-dom/client.js | 25 + packages/next/compiled/react-dom/index.js | 38 + packages/next/compiled/react-dom/package.json | 78 + packages/next/compiled/react-dom/profiling.js | 38 + .../react-dom/server-rendering-stub.js | 7 + .../next/compiled/react-dom/server.browser.js | 17 + packages/next/compiled/react-dom/server.js | 3 + .../next/compiled/react-dom/server.node.js | 17 + .../next/compiled/react-dom/static.browser.js | 7 + packages/next/compiled/react-dom/static.js | 3 + .../next/compiled/react-dom/static.node.js | 7 + .../next/compiled/react-dom/test-utils.js | 7 + .../compiled/react-dom/unstable_testing.js | 38 + ...bpack-writer.browser.development.server.js | 281 +- ...ck-writer.browser.production.min.server.js | 84 +- .../react-server-dom-webpack.development.js | 3 +- .../react-server-dom-webpack/index.js | 1002 +- .../writer.browser.server.js | 2406 +- packages/next/compiled/react/LICENSE | 21 + .../cjs/react-jsx-dev-runtime.development.js | 1309 + .../react-jsx-dev-runtime.production.min.js | 10 + .../react-jsx-dev-runtime.profiling.min.js | 10 + .../cjs/react-jsx-runtime.development.js | 1327 + .../cjs/react-jsx-runtime.production.min.js | 11 + .../cjs/react-jsx-runtime.profiling.min.js | 11 + .../compiled/react/cjs/react.development.js | 2899 ++ .../react/cjs/react.production.min.js | 29 + .../cjs/react.shared-subset.development.js | 2429 ++ .../cjs/react.shared-subset.production.min.js | 23 + packages/next/compiled/react/index.js | 7 + .../next/compiled/react/jsx-dev-runtime.js | 7 + packages/next/compiled/react/jsx-runtime.js | 7 + packages/next/compiled/react/package.json | 47 + .../compiled/react/react.shared-subset.js | 7 + packages/next/compiled/scheduler/LICENSE | 21 + packages/next/compiled/scheduler/index.js | 21 + packages/next/compiled/scheduler/package.json | 1 + packages/next/compiled/unistore/unistore.js | 2 +- packages/next/export/index.ts | 9 + packages/next/export/worker.ts | 11 +- packages/next/package.json | 6 +- packages/next/server/app-render.tsx | 17 +- packages/next/server/config-utils.ts | 2 +- packages/next/server/dev/next-dev-server.ts | 4 +- .../next/server/dev/static-paths-worker.ts | 9 + packages/next/server/next-server.ts | 6 +- packages/next/server/next.ts | 16 +- packages/next/server/render.tsx | 2 + packages/next/taskfile.js | 77 +- packages/next/types/misc.d.ts | 11 + pnpm-lock.yaml | 43 +- test/.stats-app/next.config.js | 13 + test/e2e/app-dir/app-alias.test.ts | 4 +- test/e2e/app-dir/app-edge.test.ts | 4 +- test/e2e/app-dir/app-static.test.ts | 4 +- test/e2e/app-dir/app/pages/index.js | 2 + test/e2e/app-dir/rsc-basic.test.ts | 4 +- test/e2e/app-dir/rsc-external.test.ts | 4 +- 85 files changed, 134145 insertions(+), 265 deletions(-) create mode 100644 packages/next/compiled/react-dom/LICENSE create mode 100644 packages/next/compiled/react-dom/cjs/react-dom-server-legacy.browser.development.js create mode 100644 packages/next/compiled/react-dom/cjs/react-dom-server-legacy.browser.production.min.js create mode 100644 packages/next/compiled/react-dom/cjs/react-dom-server-legacy.node.development.js create mode 100644 packages/next/compiled/react-dom/cjs/react-dom-server-legacy.node.production.min.js create mode 100644 packages/next/compiled/react-dom/cjs/react-dom-server-rendering-stub.development.js create mode 100644 packages/next/compiled/react-dom/cjs/react-dom-server-rendering-stub.production.min.js create mode 100644 packages/next/compiled/react-dom/cjs/react-dom-server.browser.development.js create mode 100644 packages/next/compiled/react-dom/cjs/react-dom-server.browser.production.min.js create mode 100644 packages/next/compiled/react-dom/cjs/react-dom-server.node.development.js create mode 100644 packages/next/compiled/react-dom/cjs/react-dom-server.node.production.min.js create mode 100644 packages/next/compiled/react-dom/cjs/react-dom-static.browser.development.js create mode 100644 packages/next/compiled/react-dom/cjs/react-dom-static.browser.production.min.js create mode 100644 packages/next/compiled/react-dom/cjs/react-dom-static.node.development.js create mode 100644 packages/next/compiled/react-dom/cjs/react-dom-static.node.production.min.js create mode 100644 packages/next/compiled/react-dom/cjs/react-dom-test-utils.development.js create mode 100644 packages/next/compiled/react-dom/cjs/react-dom-test-utils.production.min.js create mode 100644 packages/next/compiled/react-dom/cjs/react-dom-unstable_testing.development.js create mode 100644 packages/next/compiled/react-dom/cjs/react-dom-unstable_testing.production.min.js create mode 100644 packages/next/compiled/react-dom/cjs/react-dom.development.js create mode 100644 packages/next/compiled/react-dom/cjs/react-dom.production.min.js create mode 100644 packages/next/compiled/react-dom/cjs/react-dom.profiling.min.js create mode 100644 packages/next/compiled/react-dom/client.js create mode 100644 packages/next/compiled/react-dom/index.js create mode 100644 packages/next/compiled/react-dom/package.json create mode 100644 packages/next/compiled/react-dom/profiling.js create mode 100644 packages/next/compiled/react-dom/server-rendering-stub.js create mode 100644 packages/next/compiled/react-dom/server.browser.js create mode 100644 packages/next/compiled/react-dom/server.js create mode 100644 packages/next/compiled/react-dom/server.node.js create mode 100644 packages/next/compiled/react-dom/static.browser.js create mode 100644 packages/next/compiled/react-dom/static.js create mode 100644 packages/next/compiled/react-dom/static.node.js create mode 100644 packages/next/compiled/react-dom/test-utils.js create mode 100644 packages/next/compiled/react-dom/unstable_testing.js create mode 100644 packages/next/compiled/react/LICENSE create mode 100644 packages/next/compiled/react/cjs/react-jsx-dev-runtime.development.js create mode 100644 packages/next/compiled/react/cjs/react-jsx-dev-runtime.production.min.js create mode 100644 packages/next/compiled/react/cjs/react-jsx-dev-runtime.profiling.min.js create mode 100644 packages/next/compiled/react/cjs/react-jsx-runtime.development.js create mode 100644 packages/next/compiled/react/cjs/react-jsx-runtime.production.min.js create mode 100644 packages/next/compiled/react/cjs/react-jsx-runtime.profiling.min.js create mode 100644 packages/next/compiled/react/cjs/react.development.js create mode 100644 packages/next/compiled/react/cjs/react.production.min.js create mode 100644 packages/next/compiled/react/cjs/react.shared-subset.development.js create mode 100644 packages/next/compiled/react/cjs/react.shared-subset.production.min.js create mode 100644 packages/next/compiled/react/index.js create mode 100644 packages/next/compiled/react/jsx-dev-runtime.js create mode 100644 packages/next/compiled/react/jsx-runtime.js create mode 100644 packages/next/compiled/react/package.json create mode 100644 packages/next/compiled/react/react.shared-subset.js create mode 100644 packages/next/compiled/scheduler/LICENSE create mode 100644 packages/next/compiled/scheduler/index.js create mode 100644 packages/next/compiled/scheduler/package.json create mode 100644 test/.stats-app/next.config.js diff --git a/package.json b/package.json index 6af2281f0e9bb7..ee7fcf8a550731 100644 --- a/package.json +++ b/package.json @@ -40,11 +40,9 @@ "next-with-deps": "./scripts/next-with-deps.sh", "next": "node --trace-deprecation --enable-source-maps packages/next/dist/bin/next", "next-react-17": "__NEXT_REACT_CHANNEL=17 node --trace-deprecation --enable-source-maps -r ./test/lib/react-channel-require-hook.js packages/next/dist/bin/next", - "next-react-exp": "__NEXT_REACT_CHANNEL=exp node --trace-deprecation --enable-source-maps -r ./test/lib/react-channel-require-hook.js packages/next/dist/bin/next", "next-no-sourcemaps": "node --trace-deprecation packages/next/dist/bin/next", "clean-trace-jaeger": "rm -rf test/integration/basic/.next && TRACE_TARGET=JAEGER node --trace-deprecation --enable-source-maps packages/next/dist/bin/next build test/integration/basic", "debug": "node --inspect packages/next/dist/bin/next", - "debug-react-exp": "__NEXT_REACT_CHANNEL=exp node --inspect --trace-deprecation --enable-source-maps -r ./test/lib/react-channel-require-hook.js packages/next/dist/bin/next", "postinstall": "git config feature.manyFiles true && node scripts/install-native.mjs", "version": "pnpm install && git add pnpm-lock.yaml", "prepare": "husky install" @@ -183,8 +181,6 @@ "react-17": "npm:react@17.0.2", "react-dom": "18.2.0", "react-dom-17": "npm:react-dom@17.0.2", - "react-dom-exp": "npm:react-dom@0.0.0-experimental-a8c16a004-20221012", - "react-exp": "npm:react@0.0.0-experimental-a8c16a004-20221012", "react-ssr-prepass": "1.0.8", "react-virtualized": "9.22.3", "relay-compiler": "13.0.2", diff --git a/packages/next/build/index.ts b/packages/next/build/index.ts index b4f4e122cc9ef1..9aff27259e6284 100644 --- a/packages/next/build/index.ts +++ b/packages/next/build/index.ts @@ -300,6 +300,9 @@ export default async function build( const publicDir = path.join(dir, 'public') const isAppDirEnabled = !!config.experimental.appDir + if (isAppDirEnabled) { + process.env.HAS_APP_DIR = '1' + } const { pagesDir, appDir } = findPagesDir(dir, isAppDirEnabled) const hasPublicDir = await fileExists(publicDir) diff --git a/packages/next/build/utils.ts b/packages/next/build/utils.ts index 0b50d10708f08f..63a0ea809798fc 100644 --- a/packages/next/build/utils.ts +++ b/packages/next/build/utils.ts @@ -1,7 +1,6 @@ import type { NextConfigComplete } from '../server/config-shared' import '../server/node-polyfill-fetch' -import loadRequireHook from '../build/webpack/require-hook' import chalk from 'next/dist/compiled/chalk' import getGzipSize from 'next/dist/compiled/gzip-size' import textTable from 'next/dist/compiled/text-table' @@ -49,6 +48,15 @@ import { denormalizePagePath } from '../shared/lib/page-path/denormalize-page-pa import { normalizePagePath } from '../shared/lib/page-path/normalize-page-path' import { AppBuildManifest } from './webpack/plugins/app-build-manifest-plugin' import { getRuntimeContext } from '../server/web/sandbox' +import { + loadRequireHook, + overrideBuiltInReactPackages, +} from './webpack/require-hook' + +loadRequireHook() +if (process.env.HAS_APP_DIR) { + overrideBuiltInReactPackages() +} export type ROUTER_TYPE = 'pages' | 'app' @@ -69,8 +77,6 @@ const fsStat = (file: string) => { return (fileStats[file] = fileSize(file)) } -loadRequireHook() - export function unique(main: ReadonlyArray, sub: ReadonlyArray): T[] { return [...new Set([...main, ...sub])] } diff --git a/packages/next/build/webpack-config.ts b/packages/next/build/webpack-config.ts index 412634c037759a..840dd402d4fe01 100644 --- a/packages/next/build/webpack-config.ts +++ b/packages/next/build/webpack-config.ts @@ -2,7 +2,7 @@ import ReactRefreshWebpackPlugin from 'next/dist/compiled/@next/react-refresh-ut import chalk from 'next/dist/compiled/chalk' import crypto from 'crypto' import { webpack } from 'next/dist/compiled/webpack/webpack' -import path, { dirname, join as pathJoin, relative as relativePath } from 'path' +import path, { join as pathJoin, relative as relativePath } from 'path' import { escapeStringRegexp } from '../shared/lib/escape-regexp' import { DOT_NEXT_ALIAS, @@ -89,9 +89,6 @@ const nodePathList = (process.env.NODE_PATH || '') .split(process.platform === 'win32' ? ';' : ':') .filter((p) => !!p) -const reactDir = dirname(require.resolve('react/package.json')) -const reactDomDir = dirname(require.resolve('react-dom/package.json')) - const watchOptions = Object.freeze({ aggregateTimeout: 5, ignored: ['**/.git/**', '**/.next/**'], @@ -125,6 +122,12 @@ function isResourceInPackages(resource: string, packageNames?: string[]) { ) } +const builtInReactImports = [ + 'react', + 'react/jsx-runtime', + 'next/dist/compiled/react-server-dom-webpack/writer.browser.server', +] + export function getDefineEnv({ dev, config, @@ -573,11 +576,6 @@ export default async function getBaseWebpackConfig( '`experimental.runtime` requires React 18 to be installed.' ) } - if (hasAppDir) { - throw new Error( - '`experimental.appDir` requires React 18 to be installed.' - ) - } } } @@ -869,11 +867,19 @@ export default async function getBaseWebpackConfig( next: NEXT_PROJECT_ROOT, - react: reactDir, - 'react-dom$': reactDomDir, - 'react-dom/server$': `${reactDomDir}/server`, - 'react-dom/server.browser$': `${reactDomDir}/server.browser`, - 'react-dom/client$': `${reactDomDir}/client`, + ...(hasServerComponents + ? { + // For react and react-dom, alias them dynamically for server layer + // and others in the loaders configuration + 'react-dom/client$': 'next/dist/compiled/react-dom/client', + 'react-dom/server$': 'next/dist/compiled/react-dom/server', + 'react-dom/server.browser$': + 'next/dist/compiled/react-dom/server.browser', + 'react/jsx-dev-runtime$': + 'next/dist/compiled/react/jsx-dev-runtime', + 'react/jsx-runtime$': 'next/dist/compiled/react/jsx-runtime', + } + : undefined), 'styled-jsx/style$': require.resolve(`styled-jsx/style`), 'styled-jsx$': require.resolve(`styled-jsx`), @@ -1035,12 +1041,7 @@ export default async function getBaseWebpackConfig( // Special internal modules that must be bundled for Server Components. if (layer === WEBPACK_LAYERS.server) { - if ( - request === 'react' || - request === 'react/jsx-runtime' || - request === - 'next/dist/compiled/react-server-dom-webpack/writer.browser.server' - ) { + if (builtInReactImports.includes(request)) { return } } @@ -1514,47 +1515,6 @@ export default async function getBaseWebpackConfig( }, module: { rules: [ - ...(hasAppDir && !isClient && !isEdgeServer - ? [ - { - issuerLayer: WEBPACK_LAYERS.server, - test: (req: string) => { - // If it's not a source code file, or has been opted out of - // bundling, don't resolve it. - if ( - !codeCondition.test.test(req) || - isResourceInPackages( - req, - config.experimental.serverComponentsExternalPackages - ) - ) { - return false - } - - return true - }, - resolve: process.env.__NEXT_REACT_CHANNEL - ? { - conditionNames: ['react-server', 'node', 'require'], - alias: { - react: `react-${process.env.__NEXT_REACT_CHANNEL}`, - 'react-dom': `react-dom-${process.env.__NEXT_REACT_CHANNEL}`, - }, - } - : { - conditionNames: ['react-server', 'node', 'require'], - alias: { - // If missing the alias override here, the default alias will be used which aliases - // react to the direct file path, not the package name. In that case the condition - // will be ignored completely. - react: 'react', - 'react-dom': 'react-dom', - }, - }, - }, - ] - : []), - // TODO: FIXME: do NOT webpack 5 support with this // x-ref: https://github.com/webpack/webpack/issues/11467 ...(!config.experimental.fullySpecified @@ -1578,22 +1538,39 @@ export default async function getBaseWebpackConfig( }, ] : []), - // Alias `next/dynamic` to React.lazy implementation for RSC - ...(hasServerComponents + ...(hasAppDir && !isClient ? [ { - test: codeCondition.test, - include: [appDir], + issuerLayer: WEBPACK_LAYERS.server, + test: (req: string) => { + // If it's not a source code file, or has been opted out of + // bundling, don't resolve it. + if ( + !codeCondition.test.test(req) || + isResourceInPackages( + req, + config.experimental.serverComponentsExternalPackages + ) + ) { + return false + } + + return true + }, resolve: { + conditionNames: ['react-server', 'node', 'require'], alias: { - [require.resolve('next/dynamic')]: - 'next/dist/client/components/dynamic', + // If missing the alias override here, the default alias will be used which aliases + // react to the direct file path, not the package name. In that case the condition + // will be ignored completely. + react: 'react', + 'react-dom': 'react-dom', }, }, }, ] : []), - ...(hasServerComponents && (isNodeServer || isEdgeServer) + ...(hasServerComponents && !isClient ? [ // RSC server compilation loaders { @@ -1601,7 +1578,7 @@ export default async function getBaseWebpackConfig( include: [ dir, // To let the internal client components passing through flight loader - /next[\\/]dist/, + NEXT_PROJECT_ROOT_DIST, ], issuerLayer: WEBPACK_LAYERS.server, use: { @@ -1610,6 +1587,72 @@ export default async function getBaseWebpackConfig( }, ] : []), + // Alias `next/dynamic` to React.lazy implementation for RSC + ...(hasServerComponents + ? [ + { + test: codeCondition.test, + include: [appDir], + resolve: { + alias: { + // Alias `next/dynamic` to React.lazy implementation for RSC + [require.resolve('next/dynamic')]: require.resolve( + 'next/dist/client/components/dynamic' + ), + }, + }, + }, + { + // Alias react-dom for ReactDOM.preload usage. + // Alias react for switching between default set and share subset. + oneOf: [ + { + // test: codeCondition.test, + issuerLayer: WEBPACK_LAYERS.server, + test: (req: string) => { + // If it's not a source code file, or has been opted out of + // bundling, don't resolve it. + if ( + !codeCondition.test.test(req) || + isResourceInPackages( + req, + config.experimental.serverComponentsExternalPackages + ) + ) { + return false + } + + return true + }, + resolve: { + // It needs `conditionNames` here to require the proper asset, + // when react is acting as dependency of compiled/react-dom. + alias: { + react: 'next/dist/compiled/react/react.shared-subset', + // Use server rendering stub for RSC + // x-ref: https://github.com/facebook/react/pull/25436 + 'react-dom$': + 'next/dist/compiled/react-dom/server-rendering-stub', + }, + }, + }, + { + test: codeCondition.test, + resolve: { + alias: { + react: 'next/dist/compiled/react', + 'react-dom$': isClient + ? 'next/dist/compiled/react-dom/index' + : 'next/dist/compiled/react-dom/server-rendering-stub', + 'react-dom/client$': + 'next/dist/compiled/react-dom/client', + }, + }, + }, + ], + }, + ] + : []), { test: /\.(js|cjs|mjs)$/, issuerLayer: WEBPACK_LAYERS.api, diff --git a/packages/next/build/webpack/require-hook.ts b/packages/next/build/webpack/require-hook.ts index 0c0d6890f78b14..0a75a9134f0a83 100644 --- a/packages/next/build/webpack/require-hook.ts +++ b/packages/next/build/webpack/require-hook.ts @@ -2,16 +2,14 @@ // this is in order for userland plugins to attach to the same webpack instance as next.js // the individual compiled modules are as defined for the compilation in bundles/webpack/packages/* -export default function loadRequireHook(aliases: [string, string][] = []) { - const hookPropertyMap = new Map( - [ - ...aliases, - // Use `require.resolve` explicitly to make them statically analyzable - ['styled-jsx', require.resolve('styled-jsx')], - ['styled-jsx/style', require.resolve('styled-jsx/style')], - ].map(([request, replacement]) => [request, replacement]) - ) +const hookPropertyMap = new Map() +let initialized = false +function setupResolve() { + if (initialized) { + return + } + initialized = true const mod = require('module') const resolveFilename = mod._resolveFilename mod._resolveFilename = function ( @@ -25,3 +23,53 @@ export default function loadRequireHook(aliases: [string, string][] = []) { return resolveFilename.call(mod, request, parent, isMain, options) } } + +export function setRequireOverrides(aliases: [string, string][]) { + for (const [key, value] of aliases) { + hookPropertyMap.set(key, value) + } +} + +export function loadRequireHook(aliases: [string, string][] = []) { + const defaultAliases = [ + ...aliases, + // Use `require.resolve` explicitly to make them statically analyzable + ['styled-jsx', require.resolve('styled-jsx')], + ['styled-jsx/style', require.resolve('styled-jsx/style')], + ['styled-jsx/style', require.resolve('styled-jsx/style')], + ] as [string, string][] + + setRequireOverrides(defaultAliases) + + setupResolve() +} + +export function overrideBuiltInReactPackages() { + setRequireOverrides([ + ['react', require.resolve('next/dist/compiled/react')], + [ + 'react/jsx-runtime', + require.resolve('next/dist/compiled/react/jsx-runtime'), + ], + [ + 'react/jsx-dev-runtime', + require.resolve('next/dist/compiled/react/jsx-dev-runtime'), + ], + [ + 'react-dom', + require.resolve('next/dist/compiled/react-dom/server-rendering-stub'), + ], + [ + 'react-dom/client', + require.resolve('next/dist/compiled/react-dom/client'), + ], + [ + 'react-dom/server', + require.resolve('next/dist/compiled/react-dom/server'), + ], + [ + 'react-dom/server.browser', + require.resolve('next/dist/compiled/react-dom/server.browser'), + ], + ]) +} diff --git a/packages/next/compiled/react-dom/LICENSE b/packages/next/compiled/react-dom/LICENSE new file mode 100644 index 00000000000000..b96dcb0480a0b0 --- /dev/null +++ b/packages/next/compiled/react-dom/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) Facebook, Inc. and its affiliates. + +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. diff --git a/packages/next/compiled/react-dom/cjs/react-dom-server-legacy.browser.development.js b/packages/next/compiled/react-dom/cjs/react-dom-server-legacy.browser.development.js new file mode 100644 index 00000000000000..341a5ad48243ee --- /dev/null +++ b/packages/next/compiled/react-dom/cjs/react-dom-server-legacy.browser.development.js @@ -0,0 +1,8682 @@ +/** + * @license React + * react-dom-server-legacy.browser.development.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +'use strict'; + +if (process.env.NODE_ENV !== "production") { + (function() { +'use strict'; + +var React = require('react'); +var ReactDOM = require('react-dom'); + +var ReactVersion = '18.3.0-experimental-a8c16a004-20221012'; + +var ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; + +// by calls to these methods by a Babel plugin. +// +// In PROD (or in packages without access to React internals), +// they are left as they are instead. + +function warn(format) { + { + { + for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { + args[_key - 1] = arguments[_key]; + } + + printWarning('warn', format, args); + } + } +} +function error(format) { + { + { + for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) { + args[_key2 - 1] = arguments[_key2]; + } + + printWarning('error', format, args); + } + } +} + +function printWarning(level, format, args) { + // When changing this logic, you might want to also + // update consoleWithStackDev.www.js as well. + { + var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame; + var stack = ReactDebugCurrentFrame.getStackAddendum(); + + if (stack !== '') { + format += '%s'; + args = args.concat([stack]); + } // eslint-disable-next-line react-internal/safe-string-coercion + + + var argsWithFormat = args.map(function (item) { + return String(item); + }); // Careful: RN currently depends on this prefix + + argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it + // breaks IE9: https://github.com/facebook/react/issues/13610 + // eslint-disable-next-line react-internal/no-production-logging + + Function.prototype.apply.call(console[level], console, argsWithFormat); + } +} + +function scheduleWork(callback) { + callback(); +} +function beginWriting(destination) {} +function writeChunk(destination, chunk) { + writeChunkAndReturn(destination, chunk); +} +function writeChunkAndReturn(destination, chunk) { + return destination.push(chunk); +} +function completeWriting(destination) {} +function close(destination) { + destination.push(null); +} +function stringToChunk(content) { + return content; +} +function stringToPrecomputedChunk(content) { + return content; +} +function closeWithError(destination, error) { + // $FlowFixMe: This is an Error object or the destination accepts other types. + destination.destroy(error); +} + +/* + * The `'' + value` pattern (used in perf-sensitive code) throws for Symbol + * and Temporal.* types. See https://github.com/facebook/react/pull/22064. + * + * The functions in this module will throw an easier-to-understand, + * easier-to-debug exception with a clear errors message message explaining the + * problem. (Instead of a confusing exception thrown inside the implementation + * of the `value` object). + */ +// $FlowFixMe only called in DEV, so void return is not possible. +function typeName(value) { + { + // toStringTag is needed for namespaced types like Temporal.Instant + var hasToStringTag = typeof Symbol === 'function' && Symbol.toStringTag; + var type = hasToStringTag && value[Symbol.toStringTag] || value.constructor.name || 'Object'; // $FlowFixMe + + return type; + } +} // $FlowFixMe only called in DEV, so void return is not possible. + + +function willCoercionThrow(value) { + { + try { + testStringCoercion(value); + return false; + } catch (e) { + return true; + } + } +} + +function testStringCoercion(value) { + // If you ended up here by following an exception call stack, here's what's + // happened: you supplied an object or symbol value to React (as a prop, key, + // DOM attribute, CSS property, string ref, etc.) and when React tried to + // coerce it to a string using `'' + value`, an exception was thrown. + // + // The most common types that will cause this exception are `Symbol` instances + // and Temporal objects like `Temporal.Instant`. But any object that has a + // `valueOf` or `[Symbol.toPrimitive]` method that throws will also cause this + // exception. (Library authors do this to prevent users from using built-in + // numeric operators like `+` or comparison operators like `>=` because custom + // methods are needed to perform accurate arithmetic or comparison.) + // + // To fix the problem, coerce this object or symbol value to a string before + // passing it to React. The most reliable way is usually `String(value)`. + // + // To find which value is throwing, check the browser or debugger console. + // Before this exception was thrown, there should be `console.error` output + // that shows the type (Symbol, Temporal.PlainDate, etc.) that caused the + // problem and how that type was used: key, atrribute, input value prop, etc. + // In most cases, this console output also shows the component and its + // ancestor components where the exception happened. + // + // eslint-disable-next-line react-internal/safe-string-coercion + return '' + value; +} + +function checkAttributeStringCoercion(value, attributeName) { + { + if (willCoercionThrow(value)) { + error('The provided `%s` attribute is an unsupported type %s.' + ' This value must be coerced to a string before before using it here.', attributeName, typeName(value)); + + return testStringCoercion(value); // throw (to help callers find troubleshooting comments) + } + } +} +function checkCSSPropertyStringCoercion(value, propName) { + { + if (willCoercionThrow(value)) { + error('The provided `%s` CSS property is an unsupported type %s.' + ' This value must be coerced to a string before before using it here.', propName, typeName(value)); + + return testStringCoercion(value); // throw (to help callers find troubleshooting comments) + } + } +} +function checkHtmlStringCoercion(value) { + { + if (willCoercionThrow(value)) { + error('The provided HTML markup uses a value of unsupported type %s.' + ' This value must be coerced to a string before before using it here.', typeName(value)); + + return testStringCoercion(value); // throw (to help callers find troubleshooting comments) + } + } +} + +// ----------------------------------------------------------------------------- +var enableFloat = true; // When a node is unmounted, recurse into the Fiber subtree and clean out + +// $FlowFixMe[method-unbinding] +var hasOwnProperty = Object.prototype.hasOwnProperty; + +// A reserved attribute. +// It is handled by React separately and shouldn't be written to the DOM. +var RESERVED = 0; // A simple string attribute. +// Attributes that aren't in the filter are presumed to have this type. + +var STRING = 1; // A string attribute that accepts booleans in React. In HTML, these are called +// "enumerated" attributes with "true" and "false" as possible values. +// When true, it should be set to a "true" string. +// When false, it should be set to a "false" string. + +var BOOLEANISH_STRING = 2; // A real boolean attribute. +// When true, it should be present (set either to an empty string or its name). +// When false, it should be omitted. + +var BOOLEAN = 3; // An attribute that can be used as a flag as well as with a value. +// When true, it should be present (set either to an empty string or its name). +// When false, it should be omitted. +// For any other value, should be present with that value. + +var OVERLOADED_BOOLEAN = 4; // An attribute that must be numeric or parse as a numeric. +// When falsy, it should be removed. + +var NUMERIC = 5; // An attribute that must be positive numeric or parse as a positive numeric. +// When falsy, it should be removed. + +var POSITIVE_NUMERIC = 6; + +/* eslint-disable max-len */ +var ATTRIBUTE_NAME_START_CHAR = ":A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD"; +/* eslint-enable max-len */ + +var ATTRIBUTE_NAME_CHAR = ATTRIBUTE_NAME_START_CHAR + "\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040"; +var VALID_ATTRIBUTE_NAME_REGEX = new RegExp('^[' + ATTRIBUTE_NAME_START_CHAR + '][' + ATTRIBUTE_NAME_CHAR + ']*$'); +var illegalAttributeNameCache = {}; +var validatedAttributeNameCache = {}; +function isAttributeNameSafe(attributeName) { + if (hasOwnProperty.call(validatedAttributeNameCache, attributeName)) { + return true; + } + + if (hasOwnProperty.call(illegalAttributeNameCache, attributeName)) { + return false; + } + + if (VALID_ATTRIBUTE_NAME_REGEX.test(attributeName)) { + validatedAttributeNameCache[attributeName] = true; + return true; + } + + illegalAttributeNameCache[attributeName] = true; + + { + error('Invalid attribute name: `%s`', attributeName); + } + + return false; +} +function shouldRemoveAttributeWithWarning(name, value, propertyInfo, isCustomComponentTag) { + if (propertyInfo !== null && propertyInfo.type === RESERVED) { + return false; + } + + switch (typeof value) { + case 'function': + case 'symbol': + // eslint-disable-line + return true; + + case 'boolean': + { + if (isCustomComponentTag) { + return false; + } + + if (propertyInfo !== null) { + return !propertyInfo.acceptsBooleans; + } else { + var prefix = name.toLowerCase().slice(0, 5); + return prefix !== 'data-' && prefix !== 'aria-'; + } + } + + default: + return false; + } +} +function getPropertyInfo(name) { + return properties.hasOwnProperty(name) ? properties[name] : null; +} + +function PropertyInfoRecord(name, type, mustUseProperty, attributeName, attributeNamespace, sanitizeURL, removeEmptyString) { + this.acceptsBooleans = type === BOOLEANISH_STRING || type === BOOLEAN || type === OVERLOADED_BOOLEAN; + this.attributeName = attributeName; + this.attributeNamespace = attributeNamespace; + this.mustUseProperty = mustUseProperty; + this.propertyName = name; + this.type = type; + this.sanitizeURL = sanitizeURL; + this.removeEmptyString = removeEmptyString; +} // When adding attributes to this list, be sure to also add them to +// the `possibleStandardNames` module to ensure casing and incorrect +// name warnings. + + +var properties = {}; // These props are reserved by React. They shouldn't be written to the DOM. + +var reservedProps = ['children', 'dangerouslySetInnerHTML', // TODO: This prevents the assignment of defaultValue to regular +// elements (not just inputs). Now that ReactDOMInput assigns to the +// defaultValue property -- do we need this? +'defaultValue', 'defaultChecked', 'innerHTML', 'suppressContentEditableWarning', 'suppressHydrationWarning', 'style']; + +{ + reservedProps.push('innerText', 'textContent'); +} + +reservedProps.forEach(function (name) { + // $FlowFixMe[invalid-constructor] Flow no longer supports calling new on functions + properties[name] = new PropertyInfoRecord(name, RESERVED, false, // mustUseProperty + name, // attributeName + null, // attributeNamespace + false, // sanitizeURL + false); +}); // A few React string attributes have a different name. +// This is a mapping from React prop names to the attribute names. + +[['acceptCharset', 'accept-charset'], ['className', 'class'], ['htmlFor', 'for'], ['httpEquiv', 'http-equiv']].forEach(function (_ref) { + var name = _ref[0], + attributeName = _ref[1]; + // $FlowFixMe[invalid-constructor] Flow no longer supports calling new on functions + properties[name] = new PropertyInfoRecord(name, STRING, false, // mustUseProperty + attributeName, // attributeName + null, // attributeNamespace + false, // sanitizeURL + false); +}); // These are "enumerated" HTML attributes that accept "true" and "false". +// In React, we let users pass `true` and `false` even though technically +// these aren't boolean attributes (they are coerced to strings). + +['contentEditable', 'draggable', 'spellCheck', 'value'].forEach(function (name) { + // $FlowFixMe[invalid-constructor] Flow no longer supports calling new on functions + properties[name] = new PropertyInfoRecord(name, BOOLEANISH_STRING, false, // mustUseProperty + name.toLowerCase(), // attributeName + null, // attributeNamespace + false, // sanitizeURL + false); +}); // These are "enumerated" SVG attributes that accept "true" and "false". +// In React, we let users pass `true` and `false` even though technically +// these aren't boolean attributes (they are coerced to strings). +// Since these are SVG attributes, their attribute names are case-sensitive. + +['autoReverse', 'externalResourcesRequired', 'focusable', 'preserveAlpha'].forEach(function (name) { + // $FlowFixMe[invalid-constructor] Flow no longer supports calling new on functions + properties[name] = new PropertyInfoRecord(name, BOOLEANISH_STRING, false, // mustUseProperty + name, // attributeName + null, // attributeNamespace + false, // sanitizeURL + false); +}); // These are HTML boolean attributes. + +['allowFullScreen', 'async', // Note: there is a special case that prevents it from being written to the DOM +// on the client side because the browsers are inconsistent. Instead we call focus(). +'autoFocus', 'autoPlay', 'controls', 'default', 'defer', 'disabled', 'disablePictureInPicture', 'disableRemotePlayback', 'formNoValidate', 'hidden', 'loop', 'noModule', 'noValidate', 'open', 'playsInline', 'readOnly', 'required', 'reversed', 'scoped', 'seamless', // Microdata +'itemScope'].forEach(function (name) { + // $FlowFixMe[invalid-constructor] Flow no longer supports calling new on functions + properties[name] = new PropertyInfoRecord(name, BOOLEAN, false, // mustUseProperty + name.toLowerCase(), // attributeName + null, // attributeNamespace + false, // sanitizeURL + false); +}); // These are the few React props that we set as DOM properties +// rather than attributes. These are all booleans. + +['checked', // Note: `option.selected` is not updated if `select.multiple` is +// disabled with `removeAttribute`. We have special logic for handling this. +'multiple', 'muted', 'selected' // NOTE: if you add a camelCased prop to this list, +// you'll need to set attributeName to name.toLowerCase() +// instead in the assignment below. +].forEach(function (name) { + // $FlowFixMe[invalid-constructor] Flow no longer supports calling new on functions + properties[name] = new PropertyInfoRecord(name, BOOLEAN, true, // mustUseProperty + name, // attributeName + null, // attributeNamespace + false, // sanitizeURL + false); +}); // These are HTML attributes that are "overloaded booleans": they behave like +// booleans, but can also accept a string value. + +['capture', 'download' // NOTE: if you add a camelCased prop to this list, +// you'll need to set attributeName to name.toLowerCase() +// instead in the assignment below. +].forEach(function (name) { + // $FlowFixMe[invalid-constructor] Flow no longer supports calling new on functions + properties[name] = new PropertyInfoRecord(name, OVERLOADED_BOOLEAN, false, // mustUseProperty + name, // attributeName + null, // attributeNamespace + false, // sanitizeURL + false); +}); // These are HTML attributes that must be positive numbers. + +['cols', 'rows', 'size', 'span' // NOTE: if you add a camelCased prop to this list, +// you'll need to set attributeName to name.toLowerCase() +// instead in the assignment below. +].forEach(function (name) { + // $FlowFixMe[invalid-constructor] Flow no longer supports calling new on functions + properties[name] = new PropertyInfoRecord(name, POSITIVE_NUMERIC, false, // mustUseProperty + name, // attributeName + null, // attributeNamespace + false, // sanitizeURL + false); +}); // These are HTML attributes that must be numbers. + +['rowSpan', 'start'].forEach(function (name) { + // $FlowFixMe[invalid-constructor] Flow no longer supports calling new on functions + properties[name] = new PropertyInfoRecord(name, NUMERIC, false, // mustUseProperty + name.toLowerCase(), // attributeName + null, // attributeNamespace + false, // sanitizeURL + false); +}); +var CAMELIZE = /[\-\:]([a-z])/g; + +var capitalize = function (token) { + return token[1].toUpperCase(); +}; // This is a list of all SVG attributes that need special casing, namespacing, +// or boolean value assignment. Regular attributes that just accept strings +// and have the same names are omitted, just like in the HTML attribute filter. +// Some of these attributes can be hard to find. This list was created by +// scraping the MDN documentation. + + +['accent-height', 'alignment-baseline', 'arabic-form', 'baseline-shift', 'cap-height', 'clip-path', 'clip-rule', 'color-interpolation', 'color-interpolation-filters', 'color-profile', 'color-rendering', 'dominant-baseline', 'enable-background', 'fill-opacity', 'fill-rule', 'flood-color', 'flood-opacity', 'font-family', 'font-size', 'font-size-adjust', 'font-stretch', 'font-style', 'font-variant', 'font-weight', 'glyph-name', 'glyph-orientation-horizontal', 'glyph-orientation-vertical', 'horiz-adv-x', 'horiz-origin-x', 'image-rendering', 'letter-spacing', 'lighting-color', 'marker-end', 'marker-mid', 'marker-start', 'overline-position', 'overline-thickness', 'paint-order', 'panose-1', 'pointer-events', 'rendering-intent', 'shape-rendering', 'stop-color', 'stop-opacity', 'strikethrough-position', 'strikethrough-thickness', 'stroke-dasharray', 'stroke-dashoffset', 'stroke-linecap', 'stroke-linejoin', 'stroke-miterlimit', 'stroke-opacity', 'stroke-width', 'text-anchor', 'text-decoration', 'text-rendering', 'underline-position', 'underline-thickness', 'unicode-bidi', 'unicode-range', 'units-per-em', 'v-alphabetic', 'v-hanging', 'v-ideographic', 'v-mathematical', 'vector-effect', 'vert-adv-y', 'vert-origin-x', 'vert-origin-y', 'word-spacing', 'writing-mode', 'xmlns:xlink', 'x-height' // NOTE: if you add a camelCased prop to this list, +// you'll need to set attributeName to name.toLowerCase() +// instead in the assignment below. +].forEach(function (attributeName) { + var name = attributeName.replace(CAMELIZE, capitalize); // $FlowFixMe[invalid-constructor] Flow no longer supports calling new on functions + + properties[name] = new PropertyInfoRecord(name, STRING, false, // mustUseProperty + attributeName, null, // attributeNamespace + false, // sanitizeURL + false); +}); // String SVG attributes with the xlink namespace. + +['xlink:actuate', 'xlink:arcrole', 'xlink:role', 'xlink:show', 'xlink:title', 'xlink:type' // NOTE: if you add a camelCased prop to this list, +// you'll need to set attributeName to name.toLowerCase() +// instead in the assignment below. +].forEach(function (attributeName) { + var name = attributeName.replace(CAMELIZE, capitalize); // $FlowFixMe[invalid-constructor] Flow no longer supports calling new on functions + + properties[name] = new PropertyInfoRecord(name, STRING, false, // mustUseProperty + attributeName, 'http://www.w3.org/1999/xlink', false, // sanitizeURL + false); +}); // String SVG attributes with the xml namespace. + +['xml:base', 'xml:lang', 'xml:space' // NOTE: if you add a camelCased prop to this list, +// you'll need to set attributeName to name.toLowerCase() +// instead in the assignment below. +].forEach(function (attributeName) { + var name = attributeName.replace(CAMELIZE, capitalize); // $FlowFixMe[invalid-constructor] Flow no longer supports calling new on functions + + properties[name] = new PropertyInfoRecord(name, STRING, false, // mustUseProperty + attributeName, 'http://www.w3.org/XML/1998/namespace', false, // sanitizeURL + false); +}); // These attribute exists both in HTML and SVG. +// The attribute name is case-sensitive in SVG so we can't just use +// the React name like we do for attributes that exist only in HTML. + +['tabIndex', 'crossOrigin'].forEach(function (attributeName) { + // $FlowFixMe[invalid-constructor] Flow no longer supports calling new on functions + properties[attributeName] = new PropertyInfoRecord(attributeName, STRING, false, // mustUseProperty + attributeName.toLowerCase(), // attributeName + null, // attributeNamespace + false, // sanitizeURL + false); +}); // These attributes accept URLs. These must not allow javascript: URLS. +// These will also need to accept Trusted Types object in the future. + +var xlinkHref = 'xlinkHref'; // $FlowFixMe[invalid-constructor] Flow no longer supports calling new on functions + +properties[xlinkHref] = new PropertyInfoRecord('xlinkHref', STRING, false, // mustUseProperty +'xlink:href', 'http://www.w3.org/1999/xlink', true, // sanitizeURL +false); +['src', 'href', 'action', 'formAction'].forEach(function (attributeName) { + // $FlowFixMe[invalid-constructor] Flow no longer supports calling new on functions + properties[attributeName] = new PropertyInfoRecord(attributeName, STRING, false, // mustUseProperty + attributeName.toLowerCase(), // attributeName + null, // attributeNamespace + true, // sanitizeURL + true); +}); + +/** + * CSS properties which accept numbers but are not in units of "px". + */ +var isUnitlessNumber = { + animationIterationCount: true, + aspectRatio: true, + borderImageOutset: true, + borderImageSlice: true, + borderImageWidth: true, + boxFlex: true, + boxFlexGroup: true, + boxOrdinalGroup: true, + columnCount: true, + columns: true, + flex: true, + flexGrow: true, + flexPositive: true, + flexShrink: true, + flexNegative: true, + flexOrder: true, + gridArea: true, + gridRow: true, + gridRowEnd: true, + gridRowSpan: true, + gridRowStart: true, + gridColumn: true, + gridColumnEnd: true, + gridColumnSpan: true, + gridColumnStart: true, + fontWeight: true, + lineClamp: true, + lineHeight: true, + opacity: true, + order: true, + orphans: true, + tabSize: true, + widows: true, + zIndex: true, + zoom: true, + // SVG-related properties + fillOpacity: true, + floodOpacity: true, + stopOpacity: true, + strokeDasharray: true, + strokeDashoffset: true, + strokeMiterlimit: true, + strokeOpacity: true, + strokeWidth: true +}; +/** + * @param {string} prefix vendor-specific prefix, eg: Webkit + * @param {string} key style name, eg: transitionDuration + * @return {string} style name prefixed with `prefix`, properly camelCased, eg: + * WebkitTransitionDuration + */ + +function prefixKey(prefix, key) { + return prefix + key.charAt(0).toUpperCase() + key.substring(1); +} +/** + * Support style names that may come passed in prefixed by adding permutations + * of vendor prefixes. + */ + + +var prefixes = ['Webkit', 'ms', 'Moz', 'O']; // Using Object.keys here, or else the vanilla for-in loop makes IE8 go into an +// infinite loop, because it iterates over the newly added props too. + +Object.keys(isUnitlessNumber).forEach(function (prop) { + prefixes.forEach(function (prefix) { + isUnitlessNumber[prefixKey(prefix, prop)] = isUnitlessNumber[prop]; + }); +}); + +var hasReadOnlyValue = { + button: true, + checkbox: true, + image: true, + hidden: true, + radio: true, + reset: true, + submit: true +}; +function checkControlledValueProps(tagName, props) { + { + if (!(hasReadOnlyValue[props.type] || props.onChange || props.onInput || props.readOnly || props.disabled || props.value == null)) { + error('You provided a `value` prop to a form field without an ' + '`onChange` handler. This will render a read-only field. If ' + 'the field should be mutable use `defaultValue`. Otherwise, ' + 'set either `onChange` or `readOnly`.'); + } + + if (!(props.onChange || props.readOnly || props.disabled || props.checked == null)) { + error('You provided a `checked` prop to a form field without an ' + '`onChange` handler. This will render a read-only field. If ' + 'the field should be mutable use `defaultChecked`. Otherwise, ' + 'set either `onChange` or `readOnly`.'); + } + } +} + +function isCustomComponent(tagName, props) { + if (tagName.indexOf('-') === -1) { + return typeof props.is === 'string'; + } + + switch (tagName) { + // These are reserved SVG and MathML elements. + // We don't mind this list too much because we expect it to never grow. + // The alternative is to track the namespace in a few places which is convoluted. + // https://w3c.github.io/webcomponents/spec/custom/#custom-elements-core-concepts + case 'annotation-xml': + case 'color-profile': + case 'font-face': + case 'font-face-src': + case 'font-face-uri': + case 'font-face-format': + case 'font-face-name': + case 'missing-glyph': + return false; + + default: + return true; + } +} + +var ariaProperties = { + 'aria-current': 0, + // state + 'aria-description': 0, + 'aria-details': 0, + 'aria-disabled': 0, + // state + 'aria-hidden': 0, + // state + 'aria-invalid': 0, + // state + 'aria-keyshortcuts': 0, + 'aria-label': 0, + 'aria-roledescription': 0, + // Widget Attributes + 'aria-autocomplete': 0, + 'aria-checked': 0, + 'aria-expanded': 0, + 'aria-haspopup': 0, + 'aria-level': 0, + 'aria-modal': 0, + 'aria-multiline': 0, + 'aria-multiselectable': 0, + 'aria-orientation': 0, + 'aria-placeholder': 0, + 'aria-pressed': 0, + 'aria-readonly': 0, + 'aria-required': 0, + 'aria-selected': 0, + 'aria-sort': 0, + 'aria-valuemax': 0, + 'aria-valuemin': 0, + 'aria-valuenow': 0, + 'aria-valuetext': 0, + // Live Region Attributes + 'aria-atomic': 0, + 'aria-busy': 0, + 'aria-live': 0, + 'aria-relevant': 0, + // Drag-and-Drop Attributes + 'aria-dropeffect': 0, + 'aria-grabbed': 0, + // Relationship Attributes + 'aria-activedescendant': 0, + 'aria-colcount': 0, + 'aria-colindex': 0, + 'aria-colspan': 0, + 'aria-controls': 0, + 'aria-describedby': 0, + 'aria-errormessage': 0, + 'aria-flowto': 0, + 'aria-labelledby': 0, + 'aria-owns': 0, + 'aria-posinset': 0, + 'aria-rowcount': 0, + 'aria-rowindex': 0, + 'aria-rowspan': 0, + 'aria-setsize': 0 +}; + +var warnedProperties = {}; +var rARIA = new RegExp('^(aria)-[' + ATTRIBUTE_NAME_CHAR + ']*$'); +var rARIACamel = new RegExp('^(aria)[A-Z][' + ATTRIBUTE_NAME_CHAR + ']*$'); + +function validateProperty(tagName, name) { + { + if (hasOwnProperty.call(warnedProperties, name) && warnedProperties[name]) { + return true; + } + + if (rARIACamel.test(name)) { + var ariaName = 'aria-' + name.slice(4).toLowerCase(); + var correctName = ariaProperties.hasOwnProperty(ariaName) ? ariaName : null; // If this is an aria-* attribute, but is not listed in the known DOM + // DOM properties, then it is an invalid aria-* attribute. + + if (correctName == null) { + error('Invalid ARIA attribute `%s`. ARIA attributes follow the pattern aria-* and must be lowercase.', name); + + warnedProperties[name] = true; + return true; + } // aria-* attributes should be lowercase; suggest the lowercase version. + + + if (name !== correctName) { + error('Invalid ARIA attribute `%s`. Did you mean `%s`?', name, correctName); + + warnedProperties[name] = true; + return true; + } + } + + if (rARIA.test(name)) { + var lowerCasedName = name.toLowerCase(); + var standardName = ariaProperties.hasOwnProperty(lowerCasedName) ? lowerCasedName : null; // If this is an aria-* attribute, but is not listed in the known DOM + // DOM properties, then it is an invalid aria-* attribute. + + if (standardName == null) { + warnedProperties[name] = true; + return false; + } // aria-* attributes should be lowercase; suggest the lowercase version. + + + if (name !== standardName) { + error('Unknown ARIA attribute `%s`. Did you mean `%s`?', name, standardName); + + warnedProperties[name] = true; + return true; + } + } + } + + return true; +} + +function warnInvalidARIAProps(type, props) { + { + var invalidProps = []; + + for (var key in props) { + var isValid = validateProperty(type, key); + + if (!isValid) { + invalidProps.push(key); + } + } + + var unknownPropString = invalidProps.map(function (prop) { + return '`' + prop + '`'; + }).join(', '); + + if (invalidProps.length === 1) { + error('Invalid aria prop %s on <%s> tag. ' + 'For details, see https://reactjs.org/link/invalid-aria-props', unknownPropString, type); + } else if (invalidProps.length > 1) { + error('Invalid aria props %s on <%s> tag. ' + 'For details, see https://reactjs.org/link/invalid-aria-props', unknownPropString, type); + } + } +} + +function validateProperties(type, props) { + if (isCustomComponent(type, props)) { + return; + } + + warnInvalidARIAProps(type, props); +} + +var didWarnValueNull = false; +function validateProperties$1(type, props) { + { + if (type !== 'input' && type !== 'textarea' && type !== 'select') { + return; + } + + if (props != null && props.value === null && !didWarnValueNull) { + didWarnValueNull = true; + + if (type === 'select' && props.multiple) { + error('`value` prop on `%s` should not be null. ' + 'Consider using an empty array when `multiple` is set to `true` ' + 'to clear the component or `undefined` for uncontrolled components.', type); + } else { + error('`value` prop on `%s` should not be null. ' + 'Consider using an empty string to clear the component or `undefined` ' + 'for uncontrolled components.', type); + } + } + } +} + +// When adding attributes to the HTML or SVG allowed attribute list, be sure to +// also add them to this module to ensure casing and incorrect name +// warnings. +var possibleStandardNames = { + // HTML + accept: 'accept', + acceptcharset: 'acceptCharset', + 'accept-charset': 'acceptCharset', + accesskey: 'accessKey', + action: 'action', + allowfullscreen: 'allowFullScreen', + alt: 'alt', + as: 'as', + async: 'async', + autocapitalize: 'autoCapitalize', + autocomplete: 'autoComplete', + autocorrect: 'autoCorrect', + autofocus: 'autoFocus', + autoplay: 'autoPlay', + autosave: 'autoSave', + capture: 'capture', + cellpadding: 'cellPadding', + cellspacing: 'cellSpacing', + challenge: 'challenge', + charset: 'charSet', + checked: 'checked', + children: 'children', + cite: 'cite', + class: 'className', + classid: 'classID', + classname: 'className', + cols: 'cols', + colspan: 'colSpan', + content: 'content', + contenteditable: 'contentEditable', + contextmenu: 'contextMenu', + controls: 'controls', + controlslist: 'controlsList', + coords: 'coords', + crossorigin: 'crossOrigin', + dangerouslysetinnerhtml: 'dangerouslySetInnerHTML', + data: 'data', + datetime: 'dateTime', + default: 'default', + defaultchecked: 'defaultChecked', + defaultvalue: 'defaultValue', + defer: 'defer', + dir: 'dir', + disabled: 'disabled', + disablepictureinpicture: 'disablePictureInPicture', + disableremoteplayback: 'disableRemotePlayback', + download: 'download', + draggable: 'draggable', + enctype: 'encType', + enterkeyhint: 'enterKeyHint', + for: 'htmlFor', + form: 'form', + formmethod: 'formMethod', + formaction: 'formAction', + formenctype: 'formEncType', + formnovalidate: 'formNoValidate', + formtarget: 'formTarget', + frameborder: 'frameBorder', + headers: 'headers', + height: 'height', + hidden: 'hidden', + high: 'high', + href: 'href', + hreflang: 'hrefLang', + htmlfor: 'htmlFor', + httpequiv: 'httpEquiv', + 'http-equiv': 'httpEquiv', + icon: 'icon', + id: 'id', + imagesizes: 'imageSizes', + imagesrcset: 'imageSrcSet', + innerhtml: 'innerHTML', + inputmode: 'inputMode', + integrity: 'integrity', + is: 'is', + itemid: 'itemID', + itemprop: 'itemProp', + itemref: 'itemRef', + itemscope: 'itemScope', + itemtype: 'itemType', + keyparams: 'keyParams', + keytype: 'keyType', + kind: 'kind', + label: 'label', + lang: 'lang', + list: 'list', + loop: 'loop', + low: 'low', + manifest: 'manifest', + marginwidth: 'marginWidth', + marginheight: 'marginHeight', + max: 'max', + maxlength: 'maxLength', + media: 'media', + mediagroup: 'mediaGroup', + method: 'method', + min: 'min', + minlength: 'minLength', + multiple: 'multiple', + muted: 'muted', + name: 'name', + nomodule: 'noModule', + nonce: 'nonce', + novalidate: 'noValidate', + open: 'open', + optimum: 'optimum', + pattern: 'pattern', + placeholder: 'placeholder', + playsinline: 'playsInline', + poster: 'poster', + preload: 'preload', + profile: 'profile', + radiogroup: 'radioGroup', + readonly: 'readOnly', + referrerpolicy: 'referrerPolicy', + rel: 'rel', + required: 'required', + reversed: 'reversed', + role: 'role', + rows: 'rows', + rowspan: 'rowSpan', + sandbox: 'sandbox', + scope: 'scope', + scoped: 'scoped', + scrolling: 'scrolling', + seamless: 'seamless', + selected: 'selected', + shape: 'shape', + size: 'size', + sizes: 'sizes', + span: 'span', + spellcheck: 'spellCheck', + src: 'src', + srcdoc: 'srcDoc', + srclang: 'srcLang', + srcset: 'srcSet', + start: 'start', + step: 'step', + style: 'style', + summary: 'summary', + tabindex: 'tabIndex', + target: 'target', + title: 'title', + type: 'type', + usemap: 'useMap', + value: 'value', + width: 'width', + wmode: 'wmode', + wrap: 'wrap', + // SVG + about: 'about', + accentheight: 'accentHeight', + 'accent-height': 'accentHeight', + accumulate: 'accumulate', + additive: 'additive', + alignmentbaseline: 'alignmentBaseline', + 'alignment-baseline': 'alignmentBaseline', + allowreorder: 'allowReorder', + alphabetic: 'alphabetic', + amplitude: 'amplitude', + arabicform: 'arabicForm', + 'arabic-form': 'arabicForm', + ascent: 'ascent', + attributename: 'attributeName', + attributetype: 'attributeType', + autoreverse: 'autoReverse', + azimuth: 'azimuth', + basefrequency: 'baseFrequency', + baselineshift: 'baselineShift', + 'baseline-shift': 'baselineShift', + baseprofile: 'baseProfile', + bbox: 'bbox', + begin: 'begin', + bias: 'bias', + by: 'by', + calcmode: 'calcMode', + capheight: 'capHeight', + 'cap-height': 'capHeight', + clip: 'clip', + clippath: 'clipPath', + 'clip-path': 'clipPath', + clippathunits: 'clipPathUnits', + cliprule: 'clipRule', + 'clip-rule': 'clipRule', + color: 'color', + colorinterpolation: 'colorInterpolation', + 'color-interpolation': 'colorInterpolation', + colorinterpolationfilters: 'colorInterpolationFilters', + 'color-interpolation-filters': 'colorInterpolationFilters', + colorprofile: 'colorProfile', + 'color-profile': 'colorProfile', + colorrendering: 'colorRendering', + 'color-rendering': 'colorRendering', + contentscripttype: 'contentScriptType', + contentstyletype: 'contentStyleType', + cursor: 'cursor', + cx: 'cx', + cy: 'cy', + d: 'd', + datatype: 'datatype', + decelerate: 'decelerate', + descent: 'descent', + diffuseconstant: 'diffuseConstant', + direction: 'direction', + display: 'display', + divisor: 'divisor', + dominantbaseline: 'dominantBaseline', + 'dominant-baseline': 'dominantBaseline', + dur: 'dur', + dx: 'dx', + dy: 'dy', + edgemode: 'edgeMode', + elevation: 'elevation', + enablebackground: 'enableBackground', + 'enable-background': 'enableBackground', + end: 'end', + exponent: 'exponent', + externalresourcesrequired: 'externalResourcesRequired', + fill: 'fill', + fillopacity: 'fillOpacity', + 'fill-opacity': 'fillOpacity', + fillrule: 'fillRule', + 'fill-rule': 'fillRule', + filter: 'filter', + filterres: 'filterRes', + filterunits: 'filterUnits', + floodopacity: 'floodOpacity', + 'flood-opacity': 'floodOpacity', + floodcolor: 'floodColor', + 'flood-color': 'floodColor', + focusable: 'focusable', + fontfamily: 'fontFamily', + 'font-family': 'fontFamily', + fontsize: 'fontSize', + 'font-size': 'fontSize', + fontsizeadjust: 'fontSizeAdjust', + 'font-size-adjust': 'fontSizeAdjust', + fontstretch: 'fontStretch', + 'font-stretch': 'fontStretch', + fontstyle: 'fontStyle', + 'font-style': 'fontStyle', + fontvariant: 'fontVariant', + 'font-variant': 'fontVariant', + fontweight: 'fontWeight', + 'font-weight': 'fontWeight', + format: 'format', + from: 'from', + fx: 'fx', + fy: 'fy', + g1: 'g1', + g2: 'g2', + glyphname: 'glyphName', + 'glyph-name': 'glyphName', + glyphorientationhorizontal: 'glyphOrientationHorizontal', + 'glyph-orientation-horizontal': 'glyphOrientationHorizontal', + glyphorientationvertical: 'glyphOrientationVertical', + 'glyph-orientation-vertical': 'glyphOrientationVertical', + glyphref: 'glyphRef', + gradienttransform: 'gradientTransform', + gradientunits: 'gradientUnits', + hanging: 'hanging', + horizadvx: 'horizAdvX', + 'horiz-adv-x': 'horizAdvX', + horizoriginx: 'horizOriginX', + 'horiz-origin-x': 'horizOriginX', + ideographic: 'ideographic', + imagerendering: 'imageRendering', + 'image-rendering': 'imageRendering', + in2: 'in2', + in: 'in', + inlist: 'inlist', + intercept: 'intercept', + k1: 'k1', + k2: 'k2', + k3: 'k3', + k4: 'k4', + k: 'k', + kernelmatrix: 'kernelMatrix', + kernelunitlength: 'kernelUnitLength', + kerning: 'kerning', + keypoints: 'keyPoints', + keysplines: 'keySplines', + keytimes: 'keyTimes', + lengthadjust: 'lengthAdjust', + letterspacing: 'letterSpacing', + 'letter-spacing': 'letterSpacing', + lightingcolor: 'lightingColor', + 'lighting-color': 'lightingColor', + limitingconeangle: 'limitingConeAngle', + local: 'local', + markerend: 'markerEnd', + 'marker-end': 'markerEnd', + markerheight: 'markerHeight', + markermid: 'markerMid', + 'marker-mid': 'markerMid', + markerstart: 'markerStart', + 'marker-start': 'markerStart', + markerunits: 'markerUnits', + markerwidth: 'markerWidth', + mask: 'mask', + maskcontentunits: 'maskContentUnits', + maskunits: 'maskUnits', + mathematical: 'mathematical', + mode: 'mode', + numoctaves: 'numOctaves', + offset: 'offset', + opacity: 'opacity', + operator: 'operator', + order: 'order', + orient: 'orient', + orientation: 'orientation', + origin: 'origin', + overflow: 'overflow', + overlineposition: 'overlinePosition', + 'overline-position': 'overlinePosition', + overlinethickness: 'overlineThickness', + 'overline-thickness': 'overlineThickness', + paintorder: 'paintOrder', + 'paint-order': 'paintOrder', + panose1: 'panose1', + 'panose-1': 'panose1', + pathlength: 'pathLength', + patterncontentunits: 'patternContentUnits', + patterntransform: 'patternTransform', + patternunits: 'patternUnits', + pointerevents: 'pointerEvents', + 'pointer-events': 'pointerEvents', + points: 'points', + pointsatx: 'pointsAtX', + pointsaty: 'pointsAtY', + pointsatz: 'pointsAtZ', + prefix: 'prefix', + preservealpha: 'preserveAlpha', + preserveaspectratio: 'preserveAspectRatio', + primitiveunits: 'primitiveUnits', + property: 'property', + r: 'r', + radius: 'radius', + refx: 'refX', + refy: 'refY', + renderingintent: 'renderingIntent', + 'rendering-intent': 'renderingIntent', + repeatcount: 'repeatCount', + repeatdur: 'repeatDur', + requiredextensions: 'requiredExtensions', + requiredfeatures: 'requiredFeatures', + resource: 'resource', + restart: 'restart', + result: 'result', + results: 'results', + rotate: 'rotate', + rx: 'rx', + ry: 'ry', + scale: 'scale', + security: 'security', + seed: 'seed', + shaperendering: 'shapeRendering', + 'shape-rendering': 'shapeRendering', + slope: 'slope', + spacing: 'spacing', + specularconstant: 'specularConstant', + specularexponent: 'specularExponent', + speed: 'speed', + spreadmethod: 'spreadMethod', + startoffset: 'startOffset', + stddeviation: 'stdDeviation', + stemh: 'stemh', + stemv: 'stemv', + stitchtiles: 'stitchTiles', + stopcolor: 'stopColor', + 'stop-color': 'stopColor', + stopopacity: 'stopOpacity', + 'stop-opacity': 'stopOpacity', + strikethroughposition: 'strikethroughPosition', + 'strikethrough-position': 'strikethroughPosition', + strikethroughthickness: 'strikethroughThickness', + 'strikethrough-thickness': 'strikethroughThickness', + string: 'string', + stroke: 'stroke', + strokedasharray: 'strokeDasharray', + 'stroke-dasharray': 'strokeDasharray', + strokedashoffset: 'strokeDashoffset', + 'stroke-dashoffset': 'strokeDashoffset', + strokelinecap: 'strokeLinecap', + 'stroke-linecap': 'strokeLinecap', + strokelinejoin: 'strokeLinejoin', + 'stroke-linejoin': 'strokeLinejoin', + strokemiterlimit: 'strokeMiterlimit', + 'stroke-miterlimit': 'strokeMiterlimit', + strokewidth: 'strokeWidth', + 'stroke-width': 'strokeWidth', + strokeopacity: 'strokeOpacity', + 'stroke-opacity': 'strokeOpacity', + suppresscontenteditablewarning: 'suppressContentEditableWarning', + suppresshydrationwarning: 'suppressHydrationWarning', + surfacescale: 'surfaceScale', + systemlanguage: 'systemLanguage', + tablevalues: 'tableValues', + targetx: 'targetX', + targety: 'targetY', + textanchor: 'textAnchor', + 'text-anchor': 'textAnchor', + textdecoration: 'textDecoration', + 'text-decoration': 'textDecoration', + textlength: 'textLength', + textrendering: 'textRendering', + 'text-rendering': 'textRendering', + to: 'to', + transform: 'transform', + typeof: 'typeof', + u1: 'u1', + u2: 'u2', + underlineposition: 'underlinePosition', + 'underline-position': 'underlinePosition', + underlinethickness: 'underlineThickness', + 'underline-thickness': 'underlineThickness', + unicode: 'unicode', + unicodebidi: 'unicodeBidi', + 'unicode-bidi': 'unicodeBidi', + unicoderange: 'unicodeRange', + 'unicode-range': 'unicodeRange', + unitsperem: 'unitsPerEm', + 'units-per-em': 'unitsPerEm', + unselectable: 'unselectable', + valphabetic: 'vAlphabetic', + 'v-alphabetic': 'vAlphabetic', + values: 'values', + vectoreffect: 'vectorEffect', + 'vector-effect': 'vectorEffect', + version: 'version', + vertadvy: 'vertAdvY', + 'vert-adv-y': 'vertAdvY', + vertoriginx: 'vertOriginX', + 'vert-origin-x': 'vertOriginX', + vertoriginy: 'vertOriginY', + 'vert-origin-y': 'vertOriginY', + vhanging: 'vHanging', + 'v-hanging': 'vHanging', + videographic: 'vIdeographic', + 'v-ideographic': 'vIdeographic', + viewbox: 'viewBox', + viewtarget: 'viewTarget', + visibility: 'visibility', + vmathematical: 'vMathematical', + 'v-mathematical': 'vMathematical', + vocab: 'vocab', + widths: 'widths', + wordspacing: 'wordSpacing', + 'word-spacing': 'wordSpacing', + writingmode: 'writingMode', + 'writing-mode': 'writingMode', + x1: 'x1', + x2: 'x2', + x: 'x', + xchannelselector: 'xChannelSelector', + xheight: 'xHeight', + 'x-height': 'xHeight', + xlinkactuate: 'xlinkActuate', + 'xlink:actuate': 'xlinkActuate', + xlinkarcrole: 'xlinkArcrole', + 'xlink:arcrole': 'xlinkArcrole', + xlinkhref: 'xlinkHref', + 'xlink:href': 'xlinkHref', + xlinkrole: 'xlinkRole', + 'xlink:role': 'xlinkRole', + xlinkshow: 'xlinkShow', + 'xlink:show': 'xlinkShow', + xlinktitle: 'xlinkTitle', + 'xlink:title': 'xlinkTitle', + xlinktype: 'xlinkType', + 'xlink:type': 'xlinkType', + xmlbase: 'xmlBase', + 'xml:base': 'xmlBase', + xmllang: 'xmlLang', + 'xml:lang': 'xmlLang', + xmlns: 'xmlns', + 'xml:space': 'xmlSpace', + xmlnsxlink: 'xmlnsXlink', + 'xmlns:xlink': 'xmlnsXlink', + xmlspace: 'xmlSpace', + y1: 'y1', + y2: 'y2', + y: 'y', + ychannelselector: 'yChannelSelector', + z: 'z', + zoomandpan: 'zoomAndPan' +}; + +var validateProperty$1 = function () {}; + +{ + var warnedProperties$1 = {}; + var EVENT_NAME_REGEX = /^on./; + var INVALID_EVENT_NAME_REGEX = /^on[^A-Z]/; + var rARIA$1 = new RegExp('^(aria)-[' + ATTRIBUTE_NAME_CHAR + ']*$'); + var rARIACamel$1 = new RegExp('^(aria)[A-Z][' + ATTRIBUTE_NAME_CHAR + ']*$'); + + validateProperty$1 = function (tagName, name, value, eventRegistry) { + if (hasOwnProperty.call(warnedProperties$1, name) && warnedProperties$1[name]) { + return true; + } + + var lowerCasedName = name.toLowerCase(); + + if (lowerCasedName === 'onfocusin' || lowerCasedName === 'onfocusout') { + error('React uses onFocus and onBlur instead of onFocusIn and onFocusOut. ' + 'All React events are normalized to bubble, so onFocusIn and onFocusOut ' + 'are not needed/supported by React.'); + + warnedProperties$1[name] = true; + return true; + } // We can't rely on the event system being injected on the server. + + + if (eventRegistry != null) { + var registrationNameDependencies = eventRegistry.registrationNameDependencies, + possibleRegistrationNames = eventRegistry.possibleRegistrationNames; + + if (registrationNameDependencies.hasOwnProperty(name)) { + return true; + } + + var registrationName = possibleRegistrationNames.hasOwnProperty(lowerCasedName) ? possibleRegistrationNames[lowerCasedName] : null; + + if (registrationName != null) { + error('Invalid event handler property `%s`. Did you mean `%s`?', name, registrationName); + + warnedProperties$1[name] = true; + return true; + } + + if (EVENT_NAME_REGEX.test(name)) { + error('Unknown event handler property `%s`. It will be ignored.', name); + + warnedProperties$1[name] = true; + return true; + } + } else if (EVENT_NAME_REGEX.test(name)) { + // If no event plugins have been injected, we are in a server environment. + // So we can't tell if the event name is correct for sure, but we can filter + // out known bad ones like `onclick`. We can't suggest a specific replacement though. + if (INVALID_EVENT_NAME_REGEX.test(name)) { + error('Invalid event handler property `%s`. ' + 'React events use the camelCase naming convention, for example `onClick`.', name); + } + + warnedProperties$1[name] = true; + return true; + } // Let the ARIA attribute hook validate ARIA attributes + + + if (rARIA$1.test(name) || rARIACamel$1.test(name)) { + return true; + } + + if (lowerCasedName === 'innerhtml') { + error('Directly setting property `innerHTML` is not permitted. ' + 'For more information, lookup documentation on `dangerouslySetInnerHTML`.'); + + warnedProperties$1[name] = true; + return true; + } + + if (lowerCasedName === 'aria') { + error('The `aria` attribute is reserved for future use in React. ' + 'Pass individual `aria-` attributes instead.'); + + warnedProperties$1[name] = true; + return true; + } + + if (lowerCasedName === 'is' && value !== null && value !== undefined && typeof value !== 'string') { + error('Received a `%s` for a string attribute `is`. If this is expected, cast ' + 'the value to a string.', typeof value); + + warnedProperties$1[name] = true; + return true; + } + + if (typeof value === 'number' && isNaN(value)) { + error('Received NaN for the `%s` attribute. If this is expected, cast ' + 'the value to a string.', name); + + warnedProperties$1[name] = true; + return true; + } + + var propertyInfo = getPropertyInfo(name); + var isReserved = propertyInfo !== null && propertyInfo.type === RESERVED; // Known attributes should match the casing specified in the property config. + + if (possibleStandardNames.hasOwnProperty(lowerCasedName)) { + var standardName = possibleStandardNames[lowerCasedName]; + + if (standardName !== name) { + error('Invalid DOM property `%s`. Did you mean `%s`?', name, standardName); + + warnedProperties$1[name] = true; + return true; + } + } else if (!isReserved && name !== lowerCasedName) { + // Unknown attributes should have lowercase casing since that's how they + // will be cased anyway with server rendering. + error('React does not recognize the `%s` prop on a DOM element. If you ' + 'intentionally want it to appear in the DOM as a custom ' + 'attribute, spell it as lowercase `%s` instead. ' + 'If you accidentally passed it from a parent component, remove ' + 'it from the DOM element.', name, lowerCasedName); + + warnedProperties$1[name] = true; + return true; + } + + if (typeof value === 'boolean' && shouldRemoveAttributeWithWarning(name, value, propertyInfo, false)) { + if (value) { + error('Received `%s` for a non-boolean attribute `%s`.\n\n' + 'If you want to write it to the DOM, pass a string instead: ' + '%s="%s" or %s={value.toString()}.', value, name, name, value, name); + } else { + error('Received `%s` for a non-boolean attribute `%s`.\n\n' + 'If you want to write it to the DOM, pass a string instead: ' + '%s="%s" or %s={value.toString()}.\n\n' + 'If you used to conditionally omit it with %s={condition && value}, ' + 'pass %s={condition ? value : undefined} instead.', value, name, name, value, name, name, name); + } + + warnedProperties$1[name] = true; + return true; + } // Now that we've validated casing, do not validate + // data types for reserved props + + + if (isReserved) { + return true; + } // Warn when a known attribute is a bad type + + + if (shouldRemoveAttributeWithWarning(name, value, propertyInfo, false)) { + warnedProperties$1[name] = true; + return false; + } // Warn when passing the strings 'false' or 'true' into a boolean prop + + + if ((value === 'false' || value === 'true') && propertyInfo !== null && propertyInfo.type === BOOLEAN) { + error('Received the string `%s` for the boolean attribute `%s`. ' + '%s ' + 'Did you mean %s={%s}?', value, name, value === 'false' ? 'The browser will interpret it as a truthy value.' : 'Although this works, it will not work as expected if you pass the string "false".', name, value); + + warnedProperties$1[name] = true; + return true; + } + + return true; + }; +} + +var warnUnknownProperties = function (type, props, eventRegistry) { + { + var unknownProps = []; + + for (var key in props) { + var isValid = validateProperty$1(type, key, props[key], eventRegistry); + + if (!isValid) { + unknownProps.push(key); + } + } + + var unknownPropString = unknownProps.map(function (prop) { + return '`' + prop + '`'; + }).join(', '); + + if (unknownProps.length === 1) { + error('Invalid value for prop %s on <%s> tag. Either remove it from the element, ' + 'or pass a string or number value to keep it in the DOM. ' + 'For details, see https://reactjs.org/link/attribute-behavior ', unknownPropString, type); + } else if (unknownProps.length > 1) { + error('Invalid values for props %s on <%s> tag. Either remove them from the element, ' + 'or pass a string or number value to keep them in the DOM. ' + 'For details, see https://reactjs.org/link/attribute-behavior ', unknownPropString, type); + } + } +}; + +function validateProperties$2(type, props, eventRegistry) { + if (isCustomComponent(type, props)) { + return; + } + + warnUnknownProperties(type, props, eventRegistry); +} + +var warnValidStyle = function () {}; + +{ + // 'msTransform' is correct, but the other prefixes should be capitalized + var badVendoredStyleNamePattern = /^(?:webkit|moz|o)[A-Z]/; + var msPattern = /^-ms-/; + var hyphenPattern = /-(.)/g; // style values shouldn't contain a semicolon + + var badStyleValueWithSemicolonPattern = /;\s*$/; + var warnedStyleNames = {}; + var warnedStyleValues = {}; + var warnedForNaNValue = false; + var warnedForInfinityValue = false; + + var camelize = function (string) { + return string.replace(hyphenPattern, function (_, character) { + return character.toUpperCase(); + }); + }; + + var warnHyphenatedStyleName = function (name) { + if (warnedStyleNames.hasOwnProperty(name) && warnedStyleNames[name]) { + return; + } + + warnedStyleNames[name] = true; + + error('Unsupported style property %s. Did you mean %s?', name, // As Andi Smith suggests + // (http://www.andismith.com/blog/2012/02/modernizr-prefixed/), an `-ms` prefix + // is converted to lowercase `ms`. + camelize(name.replace(msPattern, 'ms-'))); + }; + + var warnBadVendoredStyleName = function (name) { + if (warnedStyleNames.hasOwnProperty(name) && warnedStyleNames[name]) { + return; + } + + warnedStyleNames[name] = true; + + error('Unsupported vendor-prefixed style property %s. Did you mean %s?', name, name.charAt(0).toUpperCase() + name.slice(1)); + }; + + var warnStyleValueWithSemicolon = function (name, value) { + if (warnedStyleValues.hasOwnProperty(value) && warnedStyleValues[value]) { + return; + } + + warnedStyleValues[value] = true; + + error("Style property values shouldn't contain a semicolon. " + 'Try "%s: %s" instead.', name, value.replace(badStyleValueWithSemicolonPattern, '')); + }; + + var warnStyleValueIsNaN = function (name, value) { + if (warnedForNaNValue) { + return; + } + + warnedForNaNValue = true; + + error('`NaN` is an invalid value for the `%s` css style property.', name); + }; + + var warnStyleValueIsInfinity = function (name, value) { + if (warnedForInfinityValue) { + return; + } + + warnedForInfinityValue = true; + + error('`Infinity` is an invalid value for the `%s` css style property.', name); + }; + + warnValidStyle = function (name, value) { + if (name.indexOf('-') > -1) { + warnHyphenatedStyleName(name); + } else if (badVendoredStyleNamePattern.test(name)) { + warnBadVendoredStyleName(name); + } else if (badStyleValueWithSemicolonPattern.test(value)) { + warnStyleValueWithSemicolon(name, value); + } + + if (typeof value === 'number') { + if (isNaN(value)) { + warnStyleValueIsNaN(name, value); + } else if (!isFinite(value)) { + warnStyleValueIsInfinity(name, value); + } + } + }; +} + +var warnValidStyle$1 = warnValidStyle; + +// code copied and modified from escape-html +var matchHtmlRegExp = /["'&<>]/; +/** + * Escapes special characters and HTML entities in a given html string. + * + * @param {string} string HTML string to escape for later insertion + * @return {string} + * @public + */ + +function escapeHtml(string) { + { + checkHtmlStringCoercion(string); + } + + var str = '' + string; + var match = matchHtmlRegExp.exec(str); + + if (!match) { + return str; + } + + var escape; + var html = ''; + var index; + var lastIndex = 0; + + for (index = match.index; index < str.length; index++) { + switch (str.charCodeAt(index)) { + case 34: + // " + escape = '"'; + break; + + case 38: + // & + escape = '&'; + break; + + case 39: + // ' + escape = '''; // modified from escape-html; used to be ''' + + break; + + case 60: + // < + escape = '<'; + break; + + case 62: + // > + escape = '>'; + break; + + default: + continue; + } + + if (lastIndex !== index) { + html += str.substring(lastIndex, index); + } + + lastIndex = index + 1; + html += escape; + } + + return lastIndex !== index ? html + str.substring(lastIndex, index) : html; +} // end code copied and modified from escape-html + +/** + * Escapes text to prevent scripting attacks. + * + * @param {*} text Text value to escape. + * @return {string} An escaped string. + */ + + +function escapeTextForBrowser(text) { + if (typeof text === 'boolean' || typeof text === 'number') { + // this shortcircuit helps perf for types that we know will never have + // special characters, especially given that this function is used often + // for numeric dom ids. + return '' + text; + } + + return escapeHtml(text); +} + +var uppercasePattern = /([A-Z])/g; +var msPattern$1 = /^ms-/; +/** + * Hyphenates a camelcased CSS property name, for example: + * + * > hyphenateStyleName('backgroundColor') + * < "background-color" + * > hyphenateStyleName('MozTransition') + * < "-moz-transition" + * > hyphenateStyleName('msTransition') + * < "-ms-transition" + * + * As Modernizr suggests (http://modernizr.com/docs/#prefixed), an `ms` prefix + * is converted to `-ms-`. + */ + +function hyphenateStyleName(name) { + return name.replace(uppercasePattern, '-$1').toLowerCase().replace(msPattern$1, '-ms-'); +} + +// and any newline or tab are filtered out as if they're not part of the URL. +// https://url.spec.whatwg.org/#url-parsing +// Tab or newline are defined as \r\n\t: +// https://infra.spec.whatwg.org/#ascii-tab-or-newline +// A C0 control is a code point in the range \u0000 NULL to \u001F +// INFORMATION SEPARATOR ONE, inclusive: +// https://infra.spec.whatwg.org/#c0-control-or-space + +/* eslint-disable max-len */ + +var isJavaScriptProtocol = /^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*\:/i; +var didWarn = false; + +function sanitizeURL(url) { + { + if (!didWarn && isJavaScriptProtocol.test(url)) { + didWarn = true; + + error('A future version of React will block javascript: URLs as a security precaution. ' + 'Use event handlers instead if you can. If you need to generate unsafe HTML try ' + 'using dangerouslySetInnerHTML instead. React was passed %s.', JSON.stringify(url)); + } + } +} + +var isArrayImpl = Array.isArray; // eslint-disable-next-line no-redeclare + +function isArray(a) { + return isArrayImpl(a); +} + +var assign = Object.assign; + +function validatePreloadResourceDifference(originalProps, originalImplicit, latestProps, latestImplicit) { + { + var href = originalProps.href; + var originalWarningName = getResourceNameForWarning('preload', originalProps, originalImplicit); + var latestWarningName = getResourceNameForWarning('preload', latestProps, latestImplicit); + + if (latestProps.as !== originalProps.as) { + error('A %s is using the same href "%s" as a %s. This is always an error and React will only keep the first preload' + ' for any given href, discarding subsequent instances. To fix, find where you are using this href in link' + ' tags or in calls to ReactDOM.preload() or ReactDOM.preinit() and either make the Resource types agree or' + ' update the hrefs to be distinct for different Resource types.', latestWarningName, href, originalWarningName); + } else { + var missingProps = null; + var extraProps = null; + var differentProps = null; + + if (originalProps.media != null && latestProps.media == null) { + missingProps = missingProps || {}; + missingProps.media = originalProps.media; + } + + for (var propName in latestProps) { + var propValue = latestProps[propName]; + var originalValue = originalProps[propName]; + + if (propValue != null && propValue !== originalValue) { + if (originalValue == null) { + extraProps = extraProps || {}; + extraProps[propName] = propValue; + } else { + differentProps = differentProps || {}; + differentProps[propName] = { + original: originalValue, + latest: propValue + }; + } + } + } + + if (missingProps || extraProps || differentProps) { + warnDifferentProps(href, originalWarningName, latestWarningName, extraProps, missingProps, differentProps); + } + } + } +} +function validateStyleResourceDifference(originalProps, latestProps) { + { + var href = originalProps.href; // eslint-disable-next-line no-labels + + var originalWarningName = getResourceNameForWarning('style', originalProps, false); + var latestWarningName = getResourceNameForWarning('style', latestProps, false); + var missingProps = null; + var extraProps = null; + var differentProps = null; + + if (originalProps.media != null && latestProps.media == null) { + missingProps = missingProps || {}; + missingProps.media = originalProps.media; + } + + for (var propName in latestProps) { + var propValue = latestProps[propName]; + var originalValue = originalProps[propName]; + + if (propValue != null && propValue !== originalValue) { + propName = propName === 'data-rprec' ? 'precedence' : propName; + + if (originalValue == null) { + extraProps = extraProps || {}; + extraProps[propName] = propValue; + } else { + differentProps = differentProps || {}; + differentProps[propName] = { + original: originalValue, + latest: propValue + }; + } + } + } + + if (missingProps || extraProps || differentProps) { + warnDifferentProps(href, originalWarningName, latestWarningName, extraProps, missingProps, differentProps); + } + } +} +function validateStyleAndHintProps(preloadProps, styleProps, implicitPreload) { + { + var href = preloadProps.href; + var originalWarningName = getResourceNameForWarning('preload', preloadProps, implicitPreload); + var latestWarningName = getResourceNameForWarning('style', styleProps, false); + + if (preloadProps.as !== 'style') { + error('While creating a %s for href "%s" a %s for this same href was found. When preloading a stylesheet the' + ' "as" prop must be of type "style". This most likely ocurred by rending a preload link with an incorrect' + ' "as" prop or by calling ReactDOM.preload with an incorrect "as" option.', latestWarningName, href, originalWarningName); + } + + var missingProps = null; + var extraProps = null; + var differentProps = null; + + for (var propName in styleProps) { + var styleValue = styleProps[propName]; + var preloadValue = preloadProps[propName]; + + switch (propName) { + // Check for difference on specific props that cross over or influence + // the relationship between the preload and stylesheet + case 'crossOrigin': + case 'referrerPolicy': + case 'media': + case 'title': + { + if (preloadValue !== styleValue && !(preloadValue == null && styleValue == null)) { + if (styleValue == null) { + missingProps = missingProps || {}; + missingProps[propName] = preloadValue; + } else if (preloadValue == null) { + extraProps = extraProps || {}; + extraProps[propName] = styleValue; + } else { + differentProps = differentProps || {}; + differentProps[propName] = { + original: preloadValue, + latest: styleValue + }; + } + } + } + } + } + + if (missingProps || extraProps || differentProps) { + warnDifferentProps(href, originalWarningName, latestWarningName, extraProps, missingProps, differentProps); + } + } +} + +function warnDifferentProps(href, originalName, latestName, extraProps, missingProps, differentProps) { + { + var juxtaposedNameStatement = latestName === originalName ? 'an earlier instance of this Resource' : "a " + originalName + " with the same href"; + var comparisonStatement = ''; + + if (missingProps !== null && typeof missingProps === 'object') { + for (var propName in missingProps) { + comparisonStatement += "\n " + propName + ": missing or null in latest props, \"" + missingProps[propName] + "\" in original props"; + } + } + + if (extraProps !== null && typeof extraProps === 'object') { + for (var _propName in extraProps) { + comparisonStatement += "\n " + _propName + ": \"" + extraProps[_propName] + "\" in latest props, missing or null in original props"; + } + } + + if (differentProps !== null && typeof differentProps === 'object') { + for (var _propName2 in differentProps) { + comparisonStatement += "\n " + _propName2 + ": \"" + differentProps[_propName2].latest + "\" in latest props, \"" + differentProps[_propName2].original + "\" in original props"; + } + } + + error('A %s with href "%s" has props that disagree with those found on %s. Resources always use the props' + ' that were provided the first time they are encountered so any differences will be ignored. Please' + ' update Resources that share an href to have props that agree. The differences are described below.%s', latestName, href, juxtaposedNameStatement, comparisonStatement); + } +} + +function getResourceNameForWarning(type, props, implicit) { + { + switch (type) { + case 'style': + { + return 'style Resource'; + } + + case 'preload': + { + if (implicit) { + return "preload for a " + props.as + " Resource"; + } + + return "preload Resource (as \"" + props.as + "\")"; + } + } + } + + return 'Resource'; +} +function validateLinkPropsForStyleResource(props) { + { + // This should only be called when we know we are opting into Resource semantics (i.e. precedence is not null) + var href = props.href, + onLoad = props.onLoad, + onError = props.onError, + disabled = props.disabled; + var allProps = ['onLoad', 'onError', 'disabled']; + var includedProps = []; + if (onLoad) includedProps.push('onLoad'); + if (onError) includedProps.push('onError'); + if (disabled != null) includedProps.push('disabled'); + var allPropsUnionPhrase = propNamesListJoin(allProps, 'or'); + var includedPropsPhrase = propNamesListJoin(includedProps, 'and'); + includedPropsPhrase += includedProps.length === 1 ? ' prop' : ' props'; + + if (includedProps.length) { + error('A link (rel="stylesheet") element with href "%s" has the precedence prop but also included the %s.' + ' When using %s React will opt out of Resource behavior. If you meant for this' + ' element to be treated as a Resource remove the %s. Otherwise remove the precedence prop.', href, includedPropsPhrase, allPropsUnionPhrase, includedPropsPhrase); + + return true; + } + } + + return false; +} + +function propNamesListJoin(list, combinator) { + switch (list.length) { + case 0: + return ''; + + case 1: + return list[0]; + + case 2: + return list[0] + ' ' + combinator + ' ' + list[1]; + + default: + return list.slice(0, -1).join(', ') + ', ' + combinator + ' ' + list[list.length - 1]; + } +} + +function validateLinkPropsForPreloadResource(linkProps) { + { + var href = linkProps.href, + as = linkProps.as; + + if (as === 'font') { + var name = getResourceNameForWarning('preload', linkProps, false); + + if (!hasOwnProperty.call(linkProps, 'crossOrigin')) { + error('A %s with href "%s" did not specify the crossOrigin prop. Font preloads must always use' + ' anonymouse CORS mode. To fix add an empty string, "anonymous", or any other string' + ' value except "use-credentials" for the crossOrigin prop of all font preloads.', name, href); + } else if (linkProps.crossOrigin === 'use-credentials') { + error('A %s with href "%s" specified a crossOrigin value of "use-credentials". Font preloads must always use' + ' anonymouse CORS mode. To fix use an empty string, "anonymous", or any other string' + ' value except "use-credentials" for the crossOrigin prop of all font preloads.', name, href); + } + } + } +} +function validatePreloadArguments(href, options) { + { + if (!href || typeof href !== 'string') { + var typeOfArg = getValueDescriptorExpectingObjectForWarning(href); + + error('ReactDOM.preload() expected the first argument to be a string representing an href but found %s instead.', typeOfArg); + } else if (typeof options !== 'object' || options === null) { + var _typeOfArg = getValueDescriptorExpectingObjectForWarning(options); + + error('ReactDOM.preload() expected the second argument to be an options argument containing at least an "as" property' + ' specifying the Resource type. It found %s instead. The href for the preload call where this warning originated is "%s".', _typeOfArg, href); + } else { + var as = options.as; + + switch (as) { + // Font specific validation of options + case 'font': + { + if (options.crossOrigin === 'use-credentials') { + error('ReactDOM.preload() was called with an "as" type of "font" and with a "crossOrigin" option of "use-credentials".' + ' Fonts preloading must use crossOrigin "anonymous" to be functional. Please update your font preload to omit' + ' the crossOrigin option or change it to any other value than "use-credentials" (Browsers default all other values' + ' to anonymous mode). The href for the preload call where this warning originated is "%s"', href); + } + + break; + } + + case 'script': + case 'style': + { + break; + } + // We have an invalid as type and need to warn + + default: + { + var typeOfAs = getValueDescriptorExpectingEnumForWarning(as); + + error('ReactDOM.preload() expected a valid "as" type in the options (second) argument but found %s instead.' + ' Please use one of the following valid values instead: %s. The href for the preload call where this' + ' warning originated is "%s".', typeOfAs, '"style", "font", or "script"', href); + } + } + } + } +} +function validatePreinitArguments(href, options) { + { + if (!href || typeof href !== 'string') { + var typeOfArg = getValueDescriptorExpectingObjectForWarning(href); + + error('ReactDOM.preinit() expected the first argument to be a string representing an href but found %s instead.', typeOfArg); + } else if (typeof options !== 'object' || options === null) { + var _typeOfArg2 = getValueDescriptorExpectingObjectForWarning(options); + + error('ReactDOM.preinit() expected the second argument to be an options argument containing at least an "as" property' + ' specifying the Resource type. It found %s instead. The href for the preload call where this warning originated is "%s".', _typeOfArg2, href); + } else { + var as = options.as; + + switch (as) { + case 'style': + { + break; + } + // We have an invalid as type and need to warn + + default: + { + var typeOfAs = getValueDescriptorExpectingEnumForWarning(as); + + error('ReactDOM.preinit() expected the second argument to be an options argument containing at least an "as" property' + ' specifying the Resource type. It found %s instead. Currently, the only valid resource type for preinit is "style".' + ' The href for the preinit call where this warning originated is "%s".', typeOfAs, href); + } + } + } + } +} + +function getValueDescriptorExpectingObjectForWarning(thing) { + return thing === null ? 'null' : thing === undefined ? 'undefined' : thing === '' ? 'an empty string' : "something with type \"" + typeof thing + "\""; +} + +function getValueDescriptorExpectingEnumForWarning(thing) { + return thing === null ? 'null' : thing === undefined ? 'undefined' : thing === '' ? 'an empty string' : typeof thing === 'string' ? JSON.stringify(thing) : "something with type \"" + typeof thing + "\""; +} + +// @TODO add bootstrap script to implicit preloads +function createResources() { + return { + // persistent + preloadsMap: new Map(), + stylesMap: new Map(), + // cleared on flush + explicitPreloads: new Set(), + implicitPreloads: new Set(), + precedences: new Map(), + // like a module global for currently rendering boundary + boundaryResources: null + }; +} +function createBoundaryResources() { + return new Set(); +} +function mergeBoundaryResources(target, source) { + source.forEach(function (resource) { + return target.add(resource); + }); +} +var currentResources = null; +var currentResourcesStack = []; +function prepareToRenderResources(resources) { + currentResourcesStack.push(currentResources); + currentResources = resources; +} +function finishRenderingResources() { + currentResources = currentResourcesStack.pop(); +} +function setCurrentlyRenderingBoundaryResourcesTarget(resources, boundaryResources) { + resources.boundaryResources = boundaryResources; +} +var ReactDOMServerDispatcher = { + preload: preload, + preinit: preinit +}; + +function preload(href, options) { + if (!currentResources) { + // While we expect that preload calls are primarily going to be observed + // during render because effects and events don't run on the server it is + // still possible that these get called in module scope. This is valid on + // the client since there is still a document to interact with but on the + // server we need a request to associate the call to. Because of this we + // simply return and do not warn. + return; + } + + { + validatePreloadArguments(href, options); + } + + if (typeof href === 'string' && href && typeof options === 'object' && options !== null) { + var as = options.as; // $FlowFixMe[incompatible-use] found when upgrading Flow + + var resource = currentResources.preloadsMap.get(href); + + if (resource) { + { + var originallyImplicit = resource._dev_implicit_construction === true; + var latestProps = preloadPropsFromPreloadOptions(href, as, options); + validatePreloadResourceDifference(resource.props, originallyImplicit, latestProps, false); + } + } else { + resource = createPreloadResource( // $FlowFixMe[incompatible-call] found when upgrading Flow + currentResources, href, as, preloadPropsFromPreloadOptions(href, as, options)); + } // $FlowFixMe[incompatible-call] found when upgrading Flow + + + captureExplicitPreloadResourceDependency(currentResources, resource); + } +} + +function preinit(href, options) { + if (!currentResources) { + // While we expect that preinit calls are primarily going to be observed + // during render because effects and events don't run on the server it is + // still possible that these get called in module scope. This is valid on + // the client since there is still a document to interact with but on the + // server we need a request to associate the call to. Because of this we + // simply return and do not warn. + return; + } + + { + validatePreinitArguments(href, options); + } + + if (typeof href === 'string' && href && typeof options === 'object' && options !== null) { + var as = options.as; + + switch (as) { + case 'style': + { + var precedence = options.precedence || 'default'; // $FlowFixMe[incompatible-use] found when upgrading Flow + + var resource = currentResources.stylesMap.get(href); + + if (resource) { + { + var latestProps = stylePropsFromPreinitOptions(href, precedence, options); + validateStyleResourceDifference(resource.props, latestProps); + } + } else { + var resourceProps = stylePropsFromPreinitOptions(href, precedence, options); + resource = createStyleResource( // $FlowFixMe[incompatible-call] found when upgrading Flow + currentResources, href, precedence, resourceProps); + } // Do not associate preinit style resources with any specific boundary regardless of where it is called + // $FlowFixMe[incompatible-call] found when upgrading Flow + + + captureStyleResourceDependency(currentResources, null, resource); + return; + } + } + } +} + +function preloadPropsFromPreloadOptions(href, as, options) { + return { + href: href, + rel: 'preload', + as: as, + crossOrigin: as === 'font' ? '' : options.crossOrigin, + integrity: options.integrity + }; +} + +function preloadPropsFromRawProps(href, as, rawProps) { + var props = assign({}, rawProps); + + props.href = href; + props.rel = 'preload'; + props.as = as; + + if (as === 'font') { + // Font preloads always need CORS anonymous mode so we set it here + // regardless of the props provided. This should warn elsewhere in + // dev + props.crossOrigin = ''; + } + + return props; +} + +function preloadAsStylePropsFromProps(href, props) { + return { + rel: 'preload', + as: 'style', + href: href, + crossOrigin: props.crossOrigin, + integrity: props.integrity, + media: props.media, + hrefLang: props.hrefLang, + referrerPolicy: props.referrerPolicy + }; +} + +function createPreloadResource(resources, href, as, props) { + var preloadsMap = resources.preloadsMap; + + { + if (preloadsMap.has(href)) { + error('createPreloadResource was called when a preload Resource matching the same href already exists. This is a bug in React.'); + } + } + + var resource = { + type: 'preload', + as: as, + href: href, + flushed: false, + props: props + }; + preloadsMap.set(href, resource); + return resource; +} + +function stylePropsFromRawProps(href, precedence, rawProps) { + var props = assign({}, rawProps); + + props.href = href; + props.rel = 'stylesheet'; + props['data-rprec'] = precedence; + delete props.precedence; + return props; +} + +function stylePropsFromPreinitOptions(href, precedence, options) { + return { + rel: 'stylesheet', + href: href, + 'data-rprec': precedence, + crossOrigin: options.crossOrigin + }; +} + +function createStyleResource(resources, href, precedence, props) { + { + if (resources.stylesMap.has(href)) { + error('createStyleResource was called when a style Resource matching the same href already exists. This is a bug in React.'); + } + } + + var stylesMap = resources.stylesMap, + preloadsMap = resources.preloadsMap; + var hint = preloadsMap.get(href); + + if (hint) { + // If a preload for this style Resource already exists there are certain props we want to adopt + // on the style Resource, primarily focussed on making sure the style network pathways utilize + // the preload pathways. For instance if you have diffreent crossOrigin attributes for a preload + // and a stylesheet the stylesheet will make a new request even if the preload had already loaded + var preloadProps = hint.props; + if (props.crossOrigin == null) props.crossOrigin = preloadProps.crossOrigin; + if (props.referrerPolicy == null) props.referrerPolicy = preloadProps.referrerPolicy; + if (props.media == null) props.media = preloadProps.media; + if (props.title == null) props.title = preloadProps.title; + + { + validateStyleAndHintProps(preloadProps, props, hint._dev_implicit_construction); + } + } else { + var preloadResourceProps = preloadAsStylePropsFromProps(href, props); + hint = createPreloadResource(resources, href, 'style', preloadResourceProps); + + { + hint._dev_implicit_construction = true; + } + + captureImplicitPreloadResourceDependency(resources, hint); + } + + var resource = { + type: 'style', + href: href, + precedence: precedence, + flushed: false, + inShell: false, + props: props, + hint: hint + }; + stylesMap.set(href, resource); + return resource; +} + +function captureStyleResourceDependency(resources, boundaryResources, styleResource) { + var precedences = resources.precedences; + var precedence = styleResource.precedence; + + if (boundaryResources) { + boundaryResources.add(styleResource); + + if (!precedences.has(precedence)) { + precedences.set(precedence, new Set()); + } + } else { + var set = precedences.get(precedence); + + if (!set) { + set = new Set(); + precedences.set(precedence, set); + } + + set.add(styleResource); + } +} + +function captureExplicitPreloadResourceDependency(resources, preloadResource) { + resources.explicitPreloads.add(preloadResource); +} + +function captureImplicitPreloadResourceDependency(resources, preloadResource) { + resources.implicitPreloads.add(preloadResource); +} // Construct a resource from link props. + + +function resourcesFromLink(props) { + if (!currentResources) { + throw new Error('"currentResources" was expected to exist. This is a bug in React.'); + } + + var rel = props.rel, + href = props.href; + + if (!href || typeof href !== 'string') { + return false; + } + + switch (rel) { + case 'stylesheet': + { + var onLoad = props.onLoad, + onError = props.onError, + precedence = props.precedence, + disabled = props.disabled; + + if (typeof precedence !== 'string' || onLoad || onError || disabled != null) { + // This stylesheet is either not opted into Resource semantics or has conflicting properties which + // disqualify it for such. We can still create a preload resource to help it load faster on the + // client + { + validateLinkPropsForStyleResource(props); + } // $FlowFixMe[incompatible-use] found when upgrading Flow + + + var preloadResource = currentResources.preloadsMap.get(href); + + if (!preloadResource) { + preloadResource = createPreloadResource( // $FlowFixMe[incompatible-call] found when upgrading Flow + currentResources, href, 'style', preloadAsStylePropsFromProps(href, props)); + + { + preloadResource._dev_implicit_construction = true; + } + } + + captureImplicitPreloadResourceDependency( // $FlowFixMe[incompatible-call] found when upgrading Flow + currentResources, preloadResource); + return false; + } else { + // We are able to convert this link element to a resource exclusively. We construct the relevant Resource + // and return true indicating that this link was fully consumed. + var resource = currentResources.stylesMap.get(href); + + if (resource) { + { + var resourceProps = stylePropsFromRawProps(href, precedence, props); + validateStyleResourceDifference(resource.props, resourceProps); + } + } else { + var _resourceProps = stylePropsFromRawProps(href, precedence, props); + + resource = createStyleResource( // $FlowFixMe[incompatible-call] found when upgrading Flow + currentResources, href, precedence, _resourceProps); + } + + captureStyleResourceDependency( // $FlowFixMe[incompatible-call] found when upgrading Flow + currentResources, // $FlowFixMe[incompatible-use] found when upgrading Flow + currentResources.boundaryResources, resource); + return true; + } + } + + case 'preload': + { + var as = props.as, + _onLoad = props.onLoad, + _onError = props.onError; + + if (_onLoad || _onError) { + // these props signal an opt-out of Resource semantics. We don't warn because there is no + // conflicting opt-in like there is with Style Resources + return false; + } + + switch (as) { + case 'script': + case 'style': + case 'font': + { + { + validateLinkPropsForPreloadResource(props); + } // $FlowFixMe[incompatible-use] found when upgrading Flow + + + var _resource = currentResources.preloadsMap.get(href); + + if (_resource) { + { + var originallyImplicit = _resource._dev_implicit_construction === true; + var latestProps = preloadPropsFromRawProps(href, as, props); + validatePreloadResourceDifference(_resource.props, originallyImplicit, latestProps, false); + } + } else { + _resource = createPreloadResource( // $FlowFixMe[incompatible-call] found when upgrading Flow + currentResources, href, as, preloadPropsFromRawProps(href, as, props)); + } // $FlowFixMe[incompatible-call] found when upgrading Flow + + + captureExplicitPreloadResourceDependency(currentResources, _resource); + return true; + } + } + + return false; + } + } + + return false; +} +function hoistResources(resources, source) { + if (resources.boundaryResources) { + mergeBoundaryResources(resources.boundaryResources, source); + source.clear(); + } +} +function hoistResourcesToRoot(resources, boundaryResources) { + boundaryResources.forEach(function (resource) { + // all precedences are set upon discovery. so we know we will have a set here + var set = resources.precedences.get(resource.precedence); + set.add(resource); + }); + boundaryResources.clear(); +} + +var ReactDOMSharedInternals = ReactDOM.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; + +var ReactDOMCurrentDispatcher = ReactDOMSharedInternals.Dispatcher; +function prepareToRender(resources) { + prepareToRenderResources(resources); + var previousHostDispatcher = ReactDOMCurrentDispatcher.current; + ReactDOMCurrentDispatcher.current = ReactDOMServerDispatcher; + return previousHostDispatcher; +} +function cleanupAfterRender(previousDispatcher) { + finishRenderingResources(); + ReactDOMCurrentDispatcher.current = previousDispatcher; +} // Used to distinguish these contexts from ones used in other renderers. + +var startInlineScript = stringToPrecomputedChunk(''); +var startScriptSrc = stringToPrecomputedChunk(''); +/** + * This escaping function is designed to work with bootstrapScriptContent only. + * because we know we are escaping the entire script. We can avoid for instance + * escaping html comment string sequences that are valid javascript as well because + * if there are no sebsequent '); +function writeCompletedSegmentInstruction(destination, responseState, contentSegmentID) { + writeChunk(destination, responseState.startInlineScript); + + if (!responseState.sentCompleteSegmentFunction) { + // The first time we write this, we'll need to include the full implementation. + responseState.sentCompleteSegmentFunction = true; + writeChunk(destination, completeSegmentScript1Full); + } else { + // Future calls can just reuse the same function. + writeChunk(destination, completeSegmentScript1Partial); + } + + writeChunk(destination, responseState.segmentPrefix); + var formattedID = stringToChunk(contentSegmentID.toString(16)); + writeChunk(destination, formattedID); + writeChunk(destination, completeSegmentScript2); + writeChunk(destination, responseState.placeholderPrefix); + writeChunk(destination, formattedID); + return writeChunkAndReturn(destination, completeSegmentScript3); +} +var completeBoundaryScript1Full = stringToPrecomputedChunk(completeBoundaryFunction + ';$RC("'); +var completeBoundaryScript1Partial = stringToPrecomputedChunk('$RC("'); +var completeBoundaryWithStylesScript1FullBoth = stringToPrecomputedChunk(completeBoundaryFunction + ';' + styleInsertionFunction + ';$RR("'); +var completeBoundaryWithStylesScript1FullPartial = stringToPrecomputedChunk(styleInsertionFunction + ';$RR("'); +var completeBoundaryWithStylesScript1Partial = stringToPrecomputedChunk('$RR("'); +var completeBoundaryScript2 = stringToPrecomputedChunk('","'); +var completeBoundaryScript2a = stringToPrecomputedChunk('",'); +var completeBoundaryScript3 = stringToPrecomputedChunk('"'); +var completeBoundaryScript4 = stringToPrecomputedChunk(')'); +function writeCompletedBoundaryInstruction(destination, responseState, boundaryID, contentSegmentID, boundaryResources) { + var hasStyleDependencies; + + { + hasStyleDependencies = hasStyleResourceDependencies(boundaryResources); + } + + writeChunk(destination, responseState.startInlineScript); + + if ( hasStyleDependencies) { + if (!responseState.sentCompleteBoundaryFunction) { + responseState.sentCompleteBoundaryFunction = true; + responseState.sentStyleInsertionFunction = true; + writeChunk(destination, completeBoundaryWithStylesScript1FullBoth); + } else if (!responseState.sentStyleInsertionFunction) { + responseState.sentStyleInsertionFunction = true; + writeChunk(destination, completeBoundaryWithStylesScript1FullPartial); + } else { + writeChunk(destination, completeBoundaryWithStylesScript1Partial); + } + } else { + if (!responseState.sentCompleteBoundaryFunction) { + responseState.sentCompleteBoundaryFunction = true; + writeChunk(destination, completeBoundaryScript1Full); + } else { + writeChunk(destination, completeBoundaryScript1Partial); + } + } + + if (boundaryID === null) { + throw new Error('An ID must have been assigned before we can complete the boundary.'); + } + + var formattedContentID = stringToChunk(contentSegmentID.toString(16)); + writeChunk(destination, boundaryID); + writeChunk(destination, completeBoundaryScript2); + writeChunk(destination, responseState.segmentPrefix); + writeChunk(destination, formattedContentID); + + if ( hasStyleDependencies) { + writeChunk(destination, completeBoundaryScript2a); + writeStyleResourceDependencies(destination, boundaryResources); + } else { + writeChunk(destination, completeBoundaryScript3); + } + + return writeChunkAndReturn(destination, completeBoundaryScript4); +} +var clientRenderScript1Full = stringToPrecomputedChunk(clientRenderFunction + ';$RX("'); +var clientRenderScript1Partial = stringToPrecomputedChunk('$RX("'); +var clientRenderScript1A = stringToPrecomputedChunk('"'); +var clientRenderScript2 = stringToPrecomputedChunk(')'); +var clientRenderErrorScriptArgInterstitial = stringToPrecomputedChunk(','); +function writeClientRenderBoundaryInstruction(destination, responseState, boundaryID, errorDigest, errorMessage, errorComponentStack) { + writeChunk(destination, responseState.startInlineScript); + + if (!responseState.sentClientRenderFunction) { + // The first time we write this, we'll need to include the full implementation. + responseState.sentClientRenderFunction = true; + writeChunk(destination, clientRenderScript1Full); + } else { + // Future calls can just reuse the same function. + writeChunk(destination, clientRenderScript1Partial); + } + + if (boundaryID === null) { + throw new Error('An ID must have been assigned before we can complete the boundary.'); + } + + writeChunk(destination, boundaryID); + writeChunk(destination, clientRenderScript1A); + + if (errorDigest || errorMessage || errorComponentStack) { + writeChunk(destination, clientRenderErrorScriptArgInterstitial); + writeChunk(destination, stringToChunk(escapeJSStringsForInstructionScripts(errorDigest || ''))); + } + + if (errorMessage || errorComponentStack) { + writeChunk(destination, clientRenderErrorScriptArgInterstitial); + writeChunk(destination, stringToChunk(escapeJSStringsForInstructionScripts(errorMessage || ''))); + } + + if (errorComponentStack) { + writeChunk(destination, clientRenderErrorScriptArgInterstitial); + writeChunk(destination, stringToChunk(escapeJSStringsForInstructionScripts(errorComponentStack))); + } + + return writeChunkAndReturn(destination, clientRenderScript2); +} +var regexForJSStringsInInstructionScripts = /[<\u2028\u2029]/g; + +function escapeJSStringsForInstructionScripts(input) { + var escaped = JSON.stringify(input); + return escaped.replace(regexForJSStringsInInstructionScripts, function (match) { + switch (match) { + // santizing breaking out of strings and script tags + case '<': + return "\\u003c"; + + case "\u2028": + return "\\u2028"; + + case "\u2029": + return "\\u2029"; + + default: + { + // eslint-disable-next-line react-internal/prod-error-codes + throw new Error('escapeJSStringsForInstructionScripts encountered a match it does not know how to replace. this means the match regex and the replacement characters are no longer in sync. This is a bug in React'); + } + } + }); +} + +var regexForJSStringsInScripts = /[&><\u2028\u2029]/g; + +function escapeJSObjectForInstructionScripts(input) { + var escaped = JSON.stringify(input); + return escaped.replace(regexForJSStringsInScripts, function (match) { + switch (match) { + // santizing breaking out of strings and script tags + case '&': + return "\\u0026"; + + case '>': + return "\\u003e"; + + case '<': + return "\\u003c"; + + case "\u2028": + return "\\u2028"; + + case "\u2029": + return "\\u2029"; + + default: + { + // eslint-disable-next-line react-internal/prod-error-codes + throw new Error('escapeJSObjectForInstructionScripts encountered a match it does not know how to replace. this means the match regex and the replacement characters are no longer in sync. This is a bug in React'); + } + } + }); +} + +function writeInitialResources(destination, resources, responseState) { + var explicitPreloadsTarget = []; + var remainingTarget = []; + var precedences = resources.precedences, + explicitPreloads = resources.explicitPreloads, + implicitPreloads = resources.implicitPreloads; // Flush stylesheets first by earliest precedence + + precedences.forEach(function (precedenceResources) { + precedenceResources.forEach(function (resource) { + // resources should not already be flushed so we elide this check + pushLinkImpl(remainingTarget, resource.props, responseState); + resource.flushed = true; + resource.inShell = true; + resource.hint.flushed = true; + }); + }); + explicitPreloads.forEach(function (resource) { + if (!resource.flushed) { + pushLinkImpl(explicitPreloadsTarget, resource.props, responseState); + resource.flushed = true; + } + }); + explicitPreloads.clear(); + implicitPreloads.forEach(function (resource) { + if (!resource.flushed) { + pushLinkImpl(remainingTarget, resource.props, responseState); + resource.flushed = true; + } + }); + implicitPreloads.clear(); + var i; + var r = true; + + for (i = 0; i < explicitPreloadsTarget.length - 1; i++) { + writeChunk(destination, explicitPreloadsTarget[i]); + } + + if (i < explicitPreloadsTarget.length) { + r = writeChunkAndReturn(destination, explicitPreloadsTarget[i]); + } + + for (i = 0; i < remainingTarget.length - 1; i++) { + writeChunk(destination, remainingTarget[i]); + } + + if (i < remainingTarget.length) { + r = writeChunkAndReturn(destination, remainingTarget[i]); + } + + return r; +} +function writeImmediateResources(destination, resources, responseState) { + var explicitPreloads = resources.explicitPreloads, + implicitPreloads = resources.implicitPreloads; + var target = []; + explicitPreloads.forEach(function (resource) { + if (!resource.flushed) { + pushLinkImpl(target, resource.props, responseState); + resource.flushed = true; + } + }); + explicitPreloads.clear(); + implicitPreloads.forEach(function (resource) { + if (!resource.flushed) { + pushLinkImpl(target, resource.props, responseState); + resource.flushed = true; + } + }); + implicitPreloads.clear(); + var i = 0; + + for (; i < target.length - 1; i++) { + writeChunk(destination, target[i]); + } + + if (i < target.length) { + return writeChunkAndReturn(destination, target[i]); + } + + return false; +} + +function hasStyleResourceDependencies(boundaryResources) { + var iter = boundaryResources.values(); // At the moment boundaries only accumulate style resources + // so we assume the type is correct and don't check it + + while (true) { + var _iter$next = iter.next(), + resource = _iter$next.value; + + if (!resource) break; // If every style Resource flushed in the shell we do not need to send + // any dependencies + + if (!resource.inShell) { + return true; + } + } + + return false; +} + +var arrayFirstOpenBracket = stringToPrecomputedChunk('['); +var arraySubsequentOpenBracket = stringToPrecomputedChunk(',['); +var arrayInterstitial = stringToPrecomputedChunk(','); +var arrayCloseBracket = stringToPrecomputedChunk(']'); + +function writeStyleResourceDependencies(destination, boundaryResources) { + writeChunk(destination, arrayFirstOpenBracket); + var nextArrayOpenBrackChunk = arrayFirstOpenBracket; + boundaryResources.forEach(function (resource) { + if (resource.inShell) ; else if (resource.flushed) { + writeChunk(destination, nextArrayOpenBrackChunk); + writeStyleResourceDependencyHrefOnly(destination, resource.href); + writeChunk(destination, arrayCloseBracket); + nextArrayOpenBrackChunk = arraySubsequentOpenBracket; + } else { + writeChunk(destination, nextArrayOpenBrackChunk); + writeStyleResourceDependency(destination, resource.href, resource.precedence, resource.props); + writeChunk(destination, arrayCloseBracket); + nextArrayOpenBrackChunk = arraySubsequentOpenBracket; + resource.flushed = true; + resource.hint.flushed = true; + } + }); + writeChunk(destination, arrayCloseBracket); +} + +function writeStyleResourceDependencyHrefOnly(destination, href) { + // We should actually enforce this earlier when the resource is created but for + // now we make sure we are actually dealing with a string here. + { + checkAttributeStringCoercion(href, 'href'); + } + + var coercedHref = '' + href; + writeChunk(destination, stringToChunk(escapeJSObjectForInstructionScripts(coercedHref))); +} + +function writeStyleResourceDependency(destination, href, precedence, props) { + { + checkAttributeStringCoercion(href, 'href'); + } + + var coercedHref = '' + href; + sanitizeURL(coercedHref); + writeChunk(destination, stringToChunk(escapeJSObjectForInstructionScripts(coercedHref))); + + { + checkAttributeStringCoercion(precedence, 'precedence'); + } + + var coercedPrecedence = '' + precedence; + writeChunk(destination, arrayInterstitial); + writeChunk(destination, stringToChunk(escapeJSObjectForInstructionScripts(coercedPrecedence))); + + for (var propKey in props) { + if (hasOwnProperty.call(props, propKey)) { + var propValue = props[propKey]; + + if (propValue == null) { + continue; + } + + switch (propKey) { + case 'href': + case 'rel': + case 'precedence': + case 'data-rprec': + { + break; + } + + case 'children': + case 'dangerouslySetInnerHTML': + throw new Error('link' + " is a self-closing tag and must neither have `children` nor " + 'use `dangerouslySetInnerHTML`.'); + // eslint-disable-next-line-no-fallthrough + + default: + writeStyleResourceAttribute(destination, propKey, propValue); + break; + } + } + } + + return null; +} + +function writeStyleResourceAttribute(destination, name, value) { + var attributeName = name.toLowerCase(); + var attributeValue; + + switch (typeof value) { + case 'function': + case 'symbol': + return; + } + + switch (name) { + // Reserved names + case 'innerHTML': + case 'dangerouslySetInnerHTML': + case 'suppressContentEditableWarning': + case 'suppressHydrationWarning': + case 'style': + // Ignored + return; + // Attribute renames + + case 'className': + attributeName = 'class'; + break; + // Booleans + + case 'hidden': + if (value === false) { + return; + } + + attributeValue = ''; + break; + // Santized URLs + + case 'src': + case 'href': + { + { + checkAttributeStringCoercion(value, attributeName); + } + + attributeValue = '' + value; + sanitizeURL(attributeValue); + break; + } + + default: + { + if (!isAttributeNameSafe(name)) { + return; + } + } + } + + if ( // shouldIgnoreAttribute + // We have already filtered out null/undefined and reserved words. + name.length > 2 && (name[0] === 'o' || name[0] === 'O') && (name[1] === 'n' || name[1] === 'N')) { + return; + } + + { + checkAttributeStringCoercion(value, attributeName); + } + + attributeValue = '' + value; + writeChunk(destination, arrayInterstitial); + writeChunk(destination, stringToChunk(escapeJSObjectForInstructionScripts(attributeName))); + writeChunk(destination, arrayInterstitial); + writeChunk(destination, stringToChunk(escapeJSObjectForInstructionScripts(attributeValue))); +} + +function createResponseState$1(generateStaticMarkup, identifierPrefix) { + var responseState = createResponseState(identifierPrefix, undefined); + return { + // Keep this in sync with ReactDOMServerFormatConfig + bootstrapChunks: responseState.bootstrapChunks, + startInlineScript: responseState.startInlineScript, + placeholderPrefix: responseState.placeholderPrefix, + segmentPrefix: responseState.segmentPrefix, + boundaryPrefix: responseState.boundaryPrefix, + idPrefix: responseState.idPrefix, + nextSuspenseID: responseState.nextSuspenseID, + sentCompleteSegmentFunction: responseState.sentCompleteSegmentFunction, + sentCompleteBoundaryFunction: responseState.sentCompleteBoundaryFunction, + sentClientRenderFunction: responseState.sentClientRenderFunction, + sentStyleInsertionFunction: responseState.sentStyleInsertionFunction, + // This is an extra field for the legacy renderer + generateStaticMarkup: generateStaticMarkup + }; +} +function createRootFormatContext() { + return { + insertionMode: HTML_MODE, + // We skip the root mode because we don't want to emit the DOCTYPE in legacy mode. + selectedValue: null + }; +} +function pushTextInstance$1(target, text, responseState, textEmbedded) { + if (responseState.generateStaticMarkup) { + target.push(stringToChunk(escapeTextForBrowser(text))); + return false; + } else { + return pushTextInstance(target, text, responseState, textEmbedded); + } +} +function pushSegmentFinale$1(target, responseState, lastPushedText, textEmbedded) { + if (responseState.generateStaticMarkup) { + return; + } else { + return pushSegmentFinale(target, responseState, lastPushedText, textEmbedded); + } +} +function writeStartCompletedSuspenseBoundary$1(destination, responseState) { + if (responseState.generateStaticMarkup) { + // A completed boundary is done and doesn't need a representation in the HTML + // if we're not going to be hydrating it. + return true; + } + + return writeStartCompletedSuspenseBoundary(destination); +} +function writeStartClientRenderedSuspenseBoundary$1(destination, responseState, // flushing these error arguments are not currently supported in this legacy streaming format. +errorDigest, errorMessage, errorComponentStack) { + if (responseState.generateStaticMarkup) { + // A client rendered boundary is done and doesn't need a representation in the HTML + // since we'll never hydrate it. This is arguably an error in static generation. + return true; + } + + return writeStartClientRenderedSuspenseBoundary(destination, responseState, errorDigest, errorMessage, errorComponentStack); +} +function writeEndCompletedSuspenseBoundary$1(destination, responseState) { + if (responseState.generateStaticMarkup) { + return true; + } + + return writeEndCompletedSuspenseBoundary(destination); +} +function writeEndClientRenderedSuspenseBoundary$1(destination, responseState) { + if (responseState.generateStaticMarkup) { + return true; + } + + return writeEndClientRenderedSuspenseBoundary(destination); +} + +// ATTENTION +// When adding new symbols to this file, +// Please consider also adding to 'react-devtools-shared/src/backend/ReactSymbols' +// The Symbol used to tag the ReactElement-like types. +var REACT_ELEMENT_TYPE = Symbol.for('react.element'); +var REACT_PORTAL_TYPE = Symbol.for('react.portal'); +var REACT_FRAGMENT_TYPE = Symbol.for('react.fragment'); +var REACT_STRICT_MODE_TYPE = Symbol.for('react.strict_mode'); +var REACT_PROFILER_TYPE = Symbol.for('react.profiler'); +var REACT_PROVIDER_TYPE = Symbol.for('react.provider'); +var REACT_CONTEXT_TYPE = Symbol.for('react.context'); +var REACT_SERVER_CONTEXT_TYPE = Symbol.for('react.server_context'); +var REACT_FORWARD_REF_TYPE = Symbol.for('react.forward_ref'); +var REACT_SUSPENSE_TYPE = Symbol.for('react.suspense'); +var REACT_SUSPENSE_LIST_TYPE = Symbol.for('react.suspense_list'); +var REACT_MEMO_TYPE = Symbol.for('react.memo'); +var REACT_LAZY_TYPE = Symbol.for('react.lazy'); +var REACT_SCOPE_TYPE = Symbol.for('react.scope'); +var REACT_DEBUG_TRACING_MODE_TYPE = Symbol.for('react.debug_trace_mode'); +var REACT_OFFSCREEN_TYPE = Symbol.for('react.offscreen'); +var REACT_LEGACY_HIDDEN_TYPE = Symbol.for('react.legacy_hidden'); +var REACT_CACHE_TYPE = Symbol.for('react.cache'); +var REACT_SERVER_CONTEXT_DEFAULT_VALUE_NOT_LOADED = Symbol.for('react.default_value'); +var MAYBE_ITERATOR_SYMBOL = Symbol.iterator; +var FAUX_ITERATOR_SYMBOL = '@@iterator'; +function getIteratorFn(maybeIterable) { + if (maybeIterable === null || typeof maybeIterable !== 'object') { + return null; + } + + var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]; + + if (typeof maybeIterator === 'function') { + return maybeIterator; + } + + return null; +} + +function getWrappedName(outerType, innerType, wrapperName) { + var displayName = outerType.displayName; + + if (displayName) { + return displayName; + } + + var functionName = innerType.displayName || innerType.name || ''; + return functionName !== '' ? wrapperName + "(" + functionName + ")" : wrapperName; +} // Keep in sync with react-reconciler/getComponentNameFromFiber + + +function getContextName(type) { + return type.displayName || 'Context'; +} // Note that the reconciler package should generally prefer to use getComponentNameFromFiber() instead. + + +function getComponentNameFromType(type) { + if (type == null) { + // Host root, text node or just invalid type. + return null; + } + + { + if (typeof type.tag === 'number') { + error('Received an unexpected object in getComponentNameFromType(). ' + 'This is likely a bug in React. Please file an issue.'); + } + } + + if (typeof type === 'function') { + return type.displayName || type.name || null; + } + + if (typeof type === 'string') { + return type; + } + + switch (type) { + case REACT_FRAGMENT_TYPE: + return 'Fragment'; + + case REACT_PORTAL_TYPE: + return 'Portal'; + + case REACT_PROFILER_TYPE: + return 'Profiler'; + + case REACT_STRICT_MODE_TYPE: + return 'StrictMode'; + + case REACT_SUSPENSE_TYPE: + return 'Suspense'; + + case REACT_SUSPENSE_LIST_TYPE: + return 'SuspenseList'; + + case REACT_CACHE_TYPE: + { + return 'Cache'; + } + + } + + if (typeof type === 'object') { + switch (type.$$typeof) { + case REACT_CONTEXT_TYPE: + var context = type; + return getContextName(context) + '.Consumer'; + + case REACT_PROVIDER_TYPE: + var provider = type; + return getContextName(provider._context) + '.Provider'; + + case REACT_FORWARD_REF_TYPE: + return getWrappedName(type, type.render, 'ForwardRef'); + + case REACT_MEMO_TYPE: + var outerName = type.displayName || null; + + if (outerName !== null) { + return outerName; + } + + return getComponentNameFromType(type.type) || 'Memo'; + + case REACT_LAZY_TYPE: + { + var lazyComponent = type; + var payload = lazyComponent._payload; + var init = lazyComponent._init; + + try { + return getComponentNameFromType(init(payload)); + } catch (x) { + return null; + } + } + + case REACT_SERVER_CONTEXT_TYPE: + { + var context2 = type; + return (context2.displayName || context2._globalName) + '.Provider'; + } + + // eslint-disable-next-line no-fallthrough + } + } + + return null; +} + +// Helpers to patch console.logs to avoid logging during side-effect free +// replaying on render function. This currently only patches the object +// lazily which won't cover if the log function was extracted eagerly. +// We could also eagerly patch the method. +var disabledDepth = 0; +var prevLog; +var prevInfo; +var prevWarn; +var prevError; +var prevGroup; +var prevGroupCollapsed; +var prevGroupEnd; + +function disabledLog() {} + +disabledLog.__reactDisabledLog = true; +function disableLogs() { + { + if (disabledDepth === 0) { + /* eslint-disable react-internal/no-production-logging */ + prevLog = console.log; + prevInfo = console.info; + prevWarn = console.warn; + prevError = console.error; + prevGroup = console.group; + prevGroupCollapsed = console.groupCollapsed; + prevGroupEnd = console.groupEnd; // https://github.com/facebook/react/issues/19099 + + var props = { + configurable: true, + enumerable: true, + value: disabledLog, + writable: true + }; // $FlowFixMe Flow thinks console is immutable. + + Object.defineProperties(console, { + info: props, + log: props, + warn: props, + error: props, + group: props, + groupCollapsed: props, + groupEnd: props + }); + /* eslint-enable react-internal/no-production-logging */ + } + + disabledDepth++; + } +} +function reenableLogs() { + { + disabledDepth--; + + if (disabledDepth === 0) { + /* eslint-disable react-internal/no-production-logging */ + var props = { + configurable: true, + enumerable: true, + writable: true + }; // $FlowFixMe Flow thinks console is immutable. + + Object.defineProperties(console, { + log: assign({}, props, { + value: prevLog + }), + info: assign({}, props, { + value: prevInfo + }), + warn: assign({}, props, { + value: prevWarn + }), + error: assign({}, props, { + value: prevError + }), + group: assign({}, props, { + value: prevGroup + }), + groupCollapsed: assign({}, props, { + value: prevGroupCollapsed + }), + groupEnd: assign({}, props, { + value: prevGroupEnd + }) + }); + /* eslint-enable react-internal/no-production-logging */ + } + + if (disabledDepth < 0) { + error('disabledDepth fell below zero. ' + 'This is a bug in React. Please file an issue.'); + } + } +} + +var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher; +var prefix; +function describeBuiltInComponentFrame(name, source, ownerFn) { + { + if (prefix === undefined) { + // Extract the VM specific prefix used by each line. + try { + throw Error(); + } catch (x) { + var match = x.stack.trim().match(/\n( *(at )?)/); + prefix = match && match[1] || ''; + } + } // We use the prefix to ensure our stacks line up with native stack frames. + + + return '\n' + prefix + name; + } +} +var reentry = false; +var componentFrameCache; + +{ + var PossiblyWeakMap = typeof WeakMap === 'function' ? WeakMap : Map; + componentFrameCache = new PossiblyWeakMap(); +} + +function describeNativeComponentFrame(fn, construct) { + // If something asked for a stack inside a fake render, it should get ignored. + if ( !fn || reentry) { + return ''; + } + + { + var frame = componentFrameCache.get(fn); + + if (frame !== undefined) { + return frame; + } + } + + var control; + reentry = true; + var previousPrepareStackTrace = Error.prepareStackTrace; // $FlowFixMe It does accept undefined. + + Error.prepareStackTrace = undefined; + var previousDispatcher; + + { + previousDispatcher = ReactCurrentDispatcher.current; // Set the dispatcher in DEV because this might be call in the render function + // for warnings. + + ReactCurrentDispatcher.current = null; + disableLogs(); + } + + try { + // This should throw. + if (construct) { + // Something should be setting the props in the constructor. + var Fake = function () { + throw Error(); + }; // $FlowFixMe + + + Object.defineProperty(Fake.prototype, 'props', { + set: function () { + // We use a throwing setter instead of frozen or non-writable props + // because that won't throw in a non-strict mode function. + throw Error(); + } + }); + + if (typeof Reflect === 'object' && Reflect.construct) { + // We construct a different control for this case to include any extra + // frames added by the construct call. + try { + Reflect.construct(Fake, []); + } catch (x) { + control = x; + } + + Reflect.construct(fn, [], Fake); + } else { + try { + Fake.call(); + } catch (x) { + control = x; + } // $FlowFixMe[prop-missing] found when upgrading Flow + + + fn.call(Fake.prototype); + } + } else { + try { + throw Error(); + } catch (x) { + control = x; + } // TODO(luna): This will currently only throw if the function component + // tries to access React/ReactDOM/props. We should probably make this throw + // in simple components too + + + fn(); + } + } catch (sample) { + // This is inlined manually because closure doesn't do it for us. + if (sample && control && typeof sample.stack === 'string') { + // This extracts the first frame from the sample that isn't also in the control. + // Skipping one frame that we assume is the frame that calls the two. + var sampleLines = sample.stack.split('\n'); + var controlLines = control.stack.split('\n'); + var s = sampleLines.length - 1; + var c = controlLines.length - 1; + + while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) { + // We expect at least one stack frame to be shared. + // Typically this will be the root most one. However, stack frames may be + // cut off due to maximum stack limits. In this case, one maybe cut off + // earlier than the other. We assume that the sample is longer or the same + // and there for cut off earlier. So we should find the root most frame in + // the sample somewhere in the control. + c--; + } + + for (; s >= 1 && c >= 0; s--, c--) { + // Next we find the first one that isn't the same which should be the + // frame that called our sample function and the control. + if (sampleLines[s] !== controlLines[c]) { + // In V8, the first line is describing the message but other VMs don't. + // If we're about to return the first line, and the control is also on the same + // line, that's a pretty good indicator that our sample threw at same line as + // the control. I.e. before we entered the sample frame. So we ignore this result. + // This can happen if you passed a class to function component, or non-function. + if (s !== 1 || c !== 1) { + do { + s--; + c--; // We may still have similar intermediate frames from the construct call. + // The next one that isn't the same should be our match though. + + if (c < 0 || sampleLines[s] !== controlLines[c]) { + // V8 adds a "new" prefix for native classes. Let's remove it to make it prettier. + var _frame = '\n' + sampleLines[s].replace(' at new ', ' at '); // If our component frame is labeled "" + // but we have a user-provided "displayName" + // splice it in to make the stack more readable. + + + if (fn.displayName && _frame.includes('')) { + _frame = _frame.replace('', fn.displayName); + } + + { + if (typeof fn === 'function') { + componentFrameCache.set(fn, _frame); + } + } // Return the line we found. + + + return _frame; + } + } while (s >= 1 && c >= 0); + } + + break; + } + } + } + } finally { + reentry = false; + + { + ReactCurrentDispatcher.current = previousDispatcher; + reenableLogs(); + } + + Error.prepareStackTrace = previousPrepareStackTrace; + } // Fallback to just using the name if we couldn't make it throw. + + + var name = fn ? fn.displayName || fn.name : ''; + var syntheticFrame = name ? describeBuiltInComponentFrame(name) : ''; + + { + if (typeof fn === 'function') { + componentFrameCache.set(fn, syntheticFrame); + } + } + + return syntheticFrame; +} + +function describeClassComponentFrame(ctor, source, ownerFn) { + { + return describeNativeComponentFrame(ctor, true); + } +} +function describeFunctionComponentFrame(fn, source, ownerFn) { + { + return describeNativeComponentFrame(fn, false); + } +} + +function shouldConstruct(Component) { + var prototype = Component.prototype; + return !!(prototype && prototype.isReactComponent); +} + +function describeUnknownElementTypeFrameInDEV(type, source, ownerFn) { + + if (type == null) { + return ''; + } + + if (typeof type === 'function') { + { + return describeNativeComponentFrame(type, shouldConstruct(type)); + } + } + + if (typeof type === 'string') { + return describeBuiltInComponentFrame(type); + } + + switch (type) { + case REACT_SUSPENSE_TYPE: + return describeBuiltInComponentFrame('Suspense'); + + case REACT_SUSPENSE_LIST_TYPE: + return describeBuiltInComponentFrame('SuspenseList'); + } + + if (typeof type === 'object') { + switch (type.$$typeof) { + case REACT_FORWARD_REF_TYPE: + return describeFunctionComponentFrame(type.render); + + case REACT_MEMO_TYPE: + // Memo may contain any component type so we recursively resolve it. + return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn); + + case REACT_LAZY_TYPE: + { + var lazyComponent = type; + var payload = lazyComponent._payload; + var init = lazyComponent._init; + + try { + // Lazy may contain any component type so we recursively resolve it. + return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn); + } catch (x) {} + } + } + } + + return ''; +} + +var loggedTypeFailures = {}; +var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame; + +function setCurrentlyValidatingElement(element) { + { + if (element) { + var owner = element._owner; + var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null); + ReactDebugCurrentFrame.setExtraStackFrame(stack); + } else { + ReactDebugCurrentFrame.setExtraStackFrame(null); + } + } +} + +function checkPropTypes(typeSpecs, values, location, componentName, element) { + { + // $FlowFixMe This is okay but Flow doesn't know it. + var has = Function.call.bind(hasOwnProperty); + + for (var typeSpecName in typeSpecs) { + if (has(typeSpecs, typeSpecName)) { + var error$1 = void 0; // Prop type validation may throw. In case they do, we don't want to + // fail the render phase where it didn't fail before. So we log it. + // After these have been cleaned up, we'll let them throw. + + try { + // This is intentionally an invariant that gets caught. It's the same + // behavior as without this statement except with a better message. + if (typeof typeSpecs[typeSpecName] !== 'function') { + // eslint-disable-next-line react-internal/prod-error-codes + var err = Error((componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' + 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' + 'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.'); + err.name = 'Invariant Violation'; + throw err; + } + + error$1 = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED'); + } catch (ex) { + error$1 = ex; + } + + if (error$1 && !(error$1 instanceof Error)) { + setCurrentlyValidatingElement(element); + + error('%s: type specification of %s' + ' `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', location, typeSpecName, typeof error$1); + + setCurrentlyValidatingElement(null); + } + + if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) { + // Only monitor this failure once because there tends to be a lot of the + // same error. + loggedTypeFailures[error$1.message] = true; + setCurrentlyValidatingElement(element); + + error('Failed %s type: %s', location, error$1.message); + + setCurrentlyValidatingElement(null); + } + } + } + } +} + +var warnedAboutMissingGetChildContext; + +{ + warnedAboutMissingGetChildContext = {}; +} // $FlowFixMe[incompatible-exact] + + +var emptyContextObject = {}; + +{ + Object.freeze(emptyContextObject); +} + +function getMaskedContext(type, unmaskedContext) { + { + var contextTypes = type.contextTypes; + + if (!contextTypes) { + return emptyContextObject; + } + + var context = {}; + + for (var key in contextTypes) { + context[key] = unmaskedContext[key]; + } + + { + var name = getComponentNameFromType(type) || 'Unknown'; + checkPropTypes(contextTypes, context, 'context', name); + } + + return context; + } +} +function processChildContext(instance, type, parentContext, childContextTypes) { + { + // TODO (bvaughn) Replace this behavior with an invariant() in the future. + // It has only been added in Fiber to match the (unintentional) behavior in Stack. + if (typeof instance.getChildContext !== 'function') { + { + var componentName = getComponentNameFromType(type) || 'Unknown'; + + if (!warnedAboutMissingGetChildContext[componentName]) { + warnedAboutMissingGetChildContext[componentName] = true; + + error('%s.childContextTypes is specified but there is no getChildContext() method ' + 'on the instance. You can either define getChildContext() on %s or remove ' + 'childContextTypes from it.', componentName, componentName); + } + } + + return parentContext; + } + + var childContext = instance.getChildContext(); + + for (var contextKey in childContext) { + if (!(contextKey in childContextTypes)) { + throw new Error((getComponentNameFromType(type) || 'Unknown') + ".getChildContext(): key \"" + contextKey + "\" is not defined in childContextTypes."); + } + } + + { + var name = getComponentNameFromType(type) || 'Unknown'; + checkPropTypes(childContextTypes, childContext, 'child context', name); + } + + return assign({}, parentContext, childContext); + } +} + +var rendererSigil; + +{ + // Use this to detect multiple renderers using the same context + rendererSigil = {}; +} // Used to store the parent path of all context overrides in a shared linked list. +// Forming a reverse tree. + + +var rootContextSnapshot = null; // We assume that this runtime owns the "current" field on all ReactContext instances. +// This global (actually thread local) state represents what state all those "current", +// fields are currently in. + +var currentActiveSnapshot = null; + +function popNode(prev) { + { + prev.context._currentValue2 = prev.parentValue; + } +} + +function pushNode(next) { + { + next.context._currentValue2 = next.value; + } +} + +function popToNearestCommonAncestor(prev, next) { + if (prev === next) ; else { + popNode(prev); + var parentPrev = prev.parent; + var parentNext = next.parent; + + if (parentPrev === null) { + if (parentNext !== null) { + throw new Error('The stacks must reach the root at the same time. This is a bug in React.'); + } + } else { + if (parentNext === null) { + throw new Error('The stacks must reach the root at the same time. This is a bug in React.'); + } + + popToNearestCommonAncestor(parentPrev, parentNext); + } // On the way back, we push the new ones that weren't common. + + + pushNode(next); + } +} + +function popAllPrevious(prev) { + popNode(prev); + var parentPrev = prev.parent; + + if (parentPrev !== null) { + popAllPrevious(parentPrev); + } +} + +function pushAllNext(next) { + var parentNext = next.parent; + + if (parentNext !== null) { + pushAllNext(parentNext); + } + + pushNode(next); +} + +function popPreviousToCommonLevel(prev, next) { + popNode(prev); + var parentPrev = prev.parent; + + if (parentPrev === null) { + throw new Error('The depth must equal at least at zero before reaching the root. This is a bug in React.'); + } + + if (parentPrev.depth === next.depth) { + // We found the same level. Now we just need to find a shared ancestor. + popToNearestCommonAncestor(parentPrev, next); + } else { + // We must still be deeper. + popPreviousToCommonLevel(parentPrev, next); + } +} + +function popNextToCommonLevel(prev, next) { + var parentNext = next.parent; + + if (parentNext === null) { + throw new Error('The depth must equal at least at zero before reaching the root. This is a bug in React.'); + } + + if (prev.depth === parentNext.depth) { + // We found the same level. Now we just need to find a shared ancestor. + popToNearestCommonAncestor(prev, parentNext); + } else { + // We must still be deeper. + popNextToCommonLevel(prev, parentNext); + } + + pushNode(next); +} // Perform context switching to the new snapshot. +// To make it cheap to read many contexts, while not suspending, we make the switch eagerly by +// updating all the context's current values. That way reads, always just read the current value. +// At the cost of updating contexts even if they're never read by this subtree. + + +function switchContext(newSnapshot) { + // The basic algorithm we need to do is to pop back any contexts that are no longer on the stack. + // We also need to update any new contexts that are now on the stack with the deepest value. + // The easiest way to update new contexts is to just reapply them in reverse order from the + // perspective of the backpointers. To avoid allocating a lot when switching, we use the stack + // for that. Therefore this algorithm is recursive. + // 1) First we pop which ever snapshot tree was deepest. Popping old contexts as we go. + // 2) Then we find the nearest common ancestor from there. Popping old contexts as we go. + // 3) Then we reapply new contexts on the way back up the stack. + var prev = currentActiveSnapshot; + var next = newSnapshot; + + if (prev !== next) { + if (prev === null) { + // $FlowFixMe: This has to be non-null since it's not equal to prev. + pushAllNext(next); + } else if (next === null) { + popAllPrevious(prev); + } else if (prev.depth === next.depth) { + popToNearestCommonAncestor(prev, next); + } else if (prev.depth > next.depth) { + popPreviousToCommonLevel(prev, next); + } else { + popNextToCommonLevel(prev, next); + } + + currentActiveSnapshot = next; + } +} +function pushProvider(context, nextValue) { + var prevValue; + + { + prevValue = context._currentValue2; + context._currentValue2 = nextValue; + + { + if (context._currentRenderer2 !== undefined && context._currentRenderer2 !== null && context._currentRenderer2 !== rendererSigil) { + error('Detected multiple renderers concurrently rendering the ' + 'same context provider. This is currently unsupported.'); + } + + context._currentRenderer2 = rendererSigil; + } + } + + var prevNode = currentActiveSnapshot; + var newNode = { + parent: prevNode, + depth: prevNode === null ? 0 : prevNode.depth + 1, + context: context, + parentValue: prevValue, + value: nextValue + }; + currentActiveSnapshot = newNode; + return newNode; +} +function popProvider(context) { + var prevSnapshot = currentActiveSnapshot; + + if (prevSnapshot === null) { + throw new Error('Tried to pop a Context at the root of the app. This is a bug in React.'); + } + + { + if (prevSnapshot.context !== context) { + error('The parent context is not the expected context. This is probably a bug in React.'); + } + } + + { + var _value = prevSnapshot.parentValue; + + if (_value === REACT_SERVER_CONTEXT_DEFAULT_VALUE_NOT_LOADED) { + prevSnapshot.context._currentValue2 = prevSnapshot.context._defaultValue; + } else { + prevSnapshot.context._currentValue2 = _value; + } + + { + if (context._currentRenderer2 !== undefined && context._currentRenderer2 !== null && context._currentRenderer2 !== rendererSigil) { + error('Detected multiple renderers concurrently rendering the ' + 'same context provider. This is currently unsupported.'); + } + + context._currentRenderer2 = rendererSigil; + } + } + + return currentActiveSnapshot = prevSnapshot.parent; +} +function getActiveContext() { + return currentActiveSnapshot; +} +function readContext(context) { + var value = context._currentValue2; + return value; +} + +/** + * `ReactInstanceMap` maintains a mapping from a public facing stateful + * instance (key) and the internal representation (value). This allows public + * methods to accept the user facing instance as an argument and map them back + * to internal methods. + * + * Note that this module is currently shared and assumed to be stateless. + * If this becomes an actual Map, that will break. + */ +function get(key) { + return key._reactInternals; +} +function set(key, value) { + key._reactInternals = value; +} + +var didWarnAboutNoopUpdateForComponent = {}; +var didWarnAboutDeprecatedWillMount = {}; +var didWarnAboutUninitializedState; +var didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate; +var didWarnAboutLegacyLifecyclesAndDerivedState; +var didWarnAboutUndefinedDerivedState; +var warnOnUndefinedDerivedState; +var warnOnInvalidCallback; +var didWarnAboutDirectlyAssigningPropsToState; +var didWarnAboutContextTypeAndContextTypes; +var didWarnAboutInvalidateContextType; + +{ + didWarnAboutUninitializedState = new Set(); + didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate = new Set(); + didWarnAboutLegacyLifecyclesAndDerivedState = new Set(); + didWarnAboutDirectlyAssigningPropsToState = new Set(); + didWarnAboutUndefinedDerivedState = new Set(); + didWarnAboutContextTypeAndContextTypes = new Set(); + didWarnAboutInvalidateContextType = new Set(); + var didWarnOnInvalidCallback = new Set(); + + warnOnInvalidCallback = function (callback, callerName) { + if (callback === null || typeof callback === 'function') { + return; + } + + var key = callerName + '_' + callback; + + if (!didWarnOnInvalidCallback.has(key)) { + didWarnOnInvalidCallback.add(key); + + error('%s(...): Expected the last optional `callback` argument to be a ' + 'function. Instead received: %s.', callerName, callback); + } + }; + + warnOnUndefinedDerivedState = function (type, partialState) { + if (partialState === undefined) { + var componentName = getComponentNameFromType(type) || 'Component'; + + if (!didWarnAboutUndefinedDerivedState.has(componentName)) { + didWarnAboutUndefinedDerivedState.add(componentName); + + error('%s.getDerivedStateFromProps(): A valid state object (or null) must be returned. ' + 'You have returned undefined.', componentName); + } + } + }; +} + +function warnNoop(publicInstance, callerName) { + { + var _constructor = publicInstance.constructor; + var componentName = _constructor && getComponentNameFromType(_constructor) || 'ReactClass'; + var warningKey = componentName + '.' + callerName; + + if (didWarnAboutNoopUpdateForComponent[warningKey]) { + return; + } + + error('%s(...): Can only update a mounting component. ' + 'This usually means you called %s() outside componentWillMount() on the server. ' + 'This is a no-op.\n\nPlease check the code for the %s component.', callerName, callerName, componentName); + + didWarnAboutNoopUpdateForComponent[warningKey] = true; + } +} + +var classComponentUpdater = { + isMounted: function (inst) { + return false; + }, + enqueueSetState: function (inst, payload, callback) { + var internals = get(inst); + + if (internals.queue === null) { + warnNoop(inst, 'setState'); + } else { + internals.queue.push(payload); + + { + if (callback !== undefined && callback !== null) { + warnOnInvalidCallback(callback, 'setState'); + } + } + } + }, + enqueueReplaceState: function (inst, payload, callback) { + var internals = get(inst); + internals.replace = true; + internals.queue = [payload]; + + { + if (callback !== undefined && callback !== null) { + warnOnInvalidCallback(callback, 'setState'); + } + } + }, + enqueueForceUpdate: function (inst, callback) { + var internals = get(inst); + + if (internals.queue === null) { + warnNoop(inst, 'forceUpdate'); + } else { + { + if (callback !== undefined && callback !== null) { + warnOnInvalidCallback(callback, 'setState'); + } + } + } + } +}; + +function applyDerivedStateFromProps(instance, ctor, getDerivedStateFromProps, prevState, nextProps) { + var partialState = getDerivedStateFromProps(nextProps, prevState); + + { + warnOnUndefinedDerivedState(ctor, partialState); + } // Merge the partial state and the previous state. + + + var newState = partialState === null || partialState === undefined ? prevState : assign({}, prevState, partialState); + return newState; +} + +function constructClassInstance(ctor, props, maskedLegacyContext) { + var context = emptyContextObject; + var contextType = ctor.contextType; + + { + if ('contextType' in ctor) { + var isValid = // Allow null for conditional declaration + contextType === null || contextType !== undefined && contextType.$$typeof === REACT_CONTEXT_TYPE && contextType._context === undefined; // Not a + + if (!isValid && !didWarnAboutInvalidateContextType.has(ctor)) { + didWarnAboutInvalidateContextType.add(ctor); + var addendum = ''; + + if (contextType === undefined) { + addendum = ' However, it is set to undefined. ' + 'This can be caused by a typo or by mixing up named and default imports. ' + 'This can also happen due to a circular dependency, so ' + 'try moving the createContext() call to a separate file.'; + } else if (typeof contextType !== 'object') { + addendum = ' However, it is set to a ' + typeof contextType + '.'; + } else if (contextType.$$typeof === REACT_PROVIDER_TYPE) { + addendum = ' Did you accidentally pass the Context.Provider instead?'; + } else if (contextType._context !== undefined) { + // + addendum = ' Did you accidentally pass the Context.Consumer instead?'; + } else { + addendum = ' However, it is set to an object with keys {' + Object.keys(contextType).join(', ') + '}.'; + } + + error('%s defines an invalid contextType. ' + 'contextType should point to the Context object returned by React.createContext().%s', getComponentNameFromType(ctor) || 'Component', addendum); + } + } + } + + if (typeof contextType === 'object' && contextType !== null) { + context = readContext(contextType); + } else { + context = maskedLegacyContext; + } + + var instance = new ctor(props, context); + + { + if (typeof ctor.getDerivedStateFromProps === 'function' && (instance.state === null || instance.state === undefined)) { + var componentName = getComponentNameFromType(ctor) || 'Component'; + + if (!didWarnAboutUninitializedState.has(componentName)) { + didWarnAboutUninitializedState.add(componentName); + + error('`%s` uses `getDerivedStateFromProps` but its initial state is ' + '%s. This is not recommended. Instead, define the initial state by ' + 'assigning an object to `this.state` in the constructor of `%s`. ' + 'This ensures that `getDerivedStateFromProps` arguments have a consistent shape.', componentName, instance.state === null ? 'null' : 'undefined', componentName); + } + } // If new component APIs are defined, "unsafe" lifecycles won't be called. + // Warn about these lifecycles if they are present. + // Don't warn about react-lifecycles-compat polyfilled methods though. + + + if (typeof ctor.getDerivedStateFromProps === 'function' || typeof instance.getSnapshotBeforeUpdate === 'function') { + var foundWillMountName = null; + var foundWillReceivePropsName = null; + var foundWillUpdateName = null; + + if (typeof instance.componentWillMount === 'function' && instance.componentWillMount.__suppressDeprecationWarning !== true) { + foundWillMountName = 'componentWillMount'; + } else if (typeof instance.UNSAFE_componentWillMount === 'function') { + foundWillMountName = 'UNSAFE_componentWillMount'; + } + + if (typeof instance.componentWillReceiveProps === 'function' && instance.componentWillReceiveProps.__suppressDeprecationWarning !== true) { + foundWillReceivePropsName = 'componentWillReceiveProps'; + } else if (typeof instance.UNSAFE_componentWillReceiveProps === 'function') { + foundWillReceivePropsName = 'UNSAFE_componentWillReceiveProps'; + } + + if (typeof instance.componentWillUpdate === 'function' && instance.componentWillUpdate.__suppressDeprecationWarning !== true) { + foundWillUpdateName = 'componentWillUpdate'; + } else if (typeof instance.UNSAFE_componentWillUpdate === 'function') { + foundWillUpdateName = 'UNSAFE_componentWillUpdate'; + } + + if (foundWillMountName !== null || foundWillReceivePropsName !== null || foundWillUpdateName !== null) { + var _componentName = getComponentNameFromType(ctor) || 'Component'; + + var newApiName = typeof ctor.getDerivedStateFromProps === 'function' ? 'getDerivedStateFromProps()' : 'getSnapshotBeforeUpdate()'; + + if (!didWarnAboutLegacyLifecyclesAndDerivedState.has(_componentName)) { + didWarnAboutLegacyLifecyclesAndDerivedState.add(_componentName); + + error('Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n' + '%s uses %s but also contains the following legacy lifecycles:%s%s%s\n\n' + 'The above lifecycles should be removed. Learn more about this warning here:\n' + 'https://reactjs.org/link/unsafe-component-lifecycles', _componentName, newApiName, foundWillMountName !== null ? "\n " + foundWillMountName : '', foundWillReceivePropsName !== null ? "\n " + foundWillReceivePropsName : '', foundWillUpdateName !== null ? "\n " + foundWillUpdateName : ''); + } + } + } + } + + return instance; +} + +function checkClassInstance(instance, ctor, newProps) { + { + var name = getComponentNameFromType(ctor) || 'Component'; + var renderPresent = instance.render; + + if (!renderPresent) { + if (ctor.prototype && typeof ctor.prototype.render === 'function') { + error('%s(...): No `render` method found on the returned component ' + 'instance: did you accidentally return an object from the constructor?', name); + } else { + error('%s(...): No `render` method found on the returned component ' + 'instance: you may have forgotten to define `render`.', name); + } + } + + if (instance.getInitialState && !instance.getInitialState.isReactClassApproved && !instance.state) { + error('getInitialState was defined on %s, a plain JavaScript class. ' + 'This is only supported for classes created using React.createClass. ' + 'Did you mean to define a state property instead?', name); + } + + if (instance.getDefaultProps && !instance.getDefaultProps.isReactClassApproved) { + error('getDefaultProps was defined on %s, a plain JavaScript class. ' + 'This is only supported for classes created using React.createClass. ' + 'Use a static property to define defaultProps instead.', name); + } + + if (instance.propTypes) { + error('propTypes was defined as an instance property on %s. Use a static ' + 'property to define propTypes instead.', name); + } + + if (instance.contextType) { + error('contextType was defined as an instance property on %s. Use a static ' + 'property to define contextType instead.', name); + } + + { + if (instance.contextTypes) { + error('contextTypes was defined as an instance property on %s. Use a static ' + 'property to define contextTypes instead.', name); + } + + if (ctor.contextType && ctor.contextTypes && !didWarnAboutContextTypeAndContextTypes.has(ctor)) { + didWarnAboutContextTypeAndContextTypes.add(ctor); + + error('%s declares both contextTypes and contextType static properties. ' + 'The legacy contextTypes property will be ignored.', name); + } + } + + if (typeof instance.componentShouldUpdate === 'function') { + error('%s has a method called ' + 'componentShouldUpdate(). Did you mean shouldComponentUpdate()? ' + 'The name is phrased as a question because the function is ' + 'expected to return a value.', name); + } + + if (ctor.prototype && ctor.prototype.isPureReactComponent && typeof instance.shouldComponentUpdate !== 'undefined') { + error('%s has a method called shouldComponentUpdate(). ' + 'shouldComponentUpdate should not be used when extending React.PureComponent. ' + 'Please extend React.Component if shouldComponentUpdate is used.', getComponentNameFromType(ctor) || 'A pure component'); + } + + if (typeof instance.componentDidUnmount === 'function') { + error('%s has a method called ' + 'componentDidUnmount(). But there is no such lifecycle method. ' + 'Did you mean componentWillUnmount()?', name); + } + + if (typeof instance.componentDidReceiveProps === 'function') { + error('%s has a method called ' + 'componentDidReceiveProps(). But there is no such lifecycle method. ' + 'If you meant to update the state in response to changing props, ' + 'use componentWillReceiveProps(). If you meant to fetch data or ' + 'run side-effects or mutations after React has updated the UI, use componentDidUpdate().', name); + } + + if (typeof instance.componentWillRecieveProps === 'function') { + error('%s has a method called ' + 'componentWillRecieveProps(). Did you mean componentWillReceiveProps()?', name); + } + + if (typeof instance.UNSAFE_componentWillRecieveProps === 'function') { + error('%s has a method called ' + 'UNSAFE_componentWillRecieveProps(). Did you mean UNSAFE_componentWillReceiveProps()?', name); + } + + var hasMutatedProps = instance.props !== newProps; + + if (instance.props !== undefined && hasMutatedProps) { + error('%s(...): When calling super() in `%s`, make sure to pass ' + "up the same props that your component's constructor was passed.", name, name); + } + + if (instance.defaultProps) { + error('Setting defaultProps as an instance property on %s is not supported and will be ignored.' + ' Instead, define defaultProps as a static property on %s.', name, name); + } + + if (typeof instance.getSnapshotBeforeUpdate === 'function' && typeof instance.componentDidUpdate !== 'function' && !didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate.has(ctor)) { + didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate.add(ctor); + + error('%s: getSnapshotBeforeUpdate() should be used with componentDidUpdate(). ' + 'This component defines getSnapshotBeforeUpdate() only.', getComponentNameFromType(ctor)); + } + + if (typeof instance.getDerivedStateFromProps === 'function') { + error('%s: getDerivedStateFromProps() is defined as an instance method ' + 'and will be ignored. Instead, declare it as a static method.', name); + } + + if (typeof instance.getDerivedStateFromError === 'function') { + error('%s: getDerivedStateFromError() is defined as an instance method ' + 'and will be ignored. Instead, declare it as a static method.', name); + } + + if (typeof ctor.getSnapshotBeforeUpdate === 'function') { + error('%s: getSnapshotBeforeUpdate() is defined as a static method ' + 'and will be ignored. Instead, declare it as an instance method.', name); + } + + var _state = instance.state; + + if (_state && (typeof _state !== 'object' || isArray(_state))) { + error('%s.state: must be set to an object or null', name); + } + + if (typeof instance.getChildContext === 'function' && typeof ctor.childContextTypes !== 'object') { + error('%s.getChildContext(): childContextTypes must be defined in order to ' + 'use getChildContext().', name); + } + } +} + +function callComponentWillMount(type, instance) { + var oldState = instance.state; + + if (typeof instance.componentWillMount === 'function') { + { + if ( instance.componentWillMount.__suppressDeprecationWarning !== true) { + var componentName = getComponentNameFromType(type) || 'Unknown'; + + if (!didWarnAboutDeprecatedWillMount[componentName]) { + warn( // keep this warning in sync with ReactStrictModeWarning.js + 'componentWillMount has been renamed, and is not recommended for use. ' + 'See https://reactjs.org/link/unsafe-component-lifecycles for details.\n\n' + '* Move code from componentWillMount to componentDidMount (preferred in most cases) ' + 'or the constructor.\n' + '\nPlease update the following components: %s', componentName); + + didWarnAboutDeprecatedWillMount[componentName] = true; + } + } + } + + instance.componentWillMount(); + } + + if (typeof instance.UNSAFE_componentWillMount === 'function') { + instance.UNSAFE_componentWillMount(); + } + + if (oldState !== instance.state) { + { + error('%s.componentWillMount(): Assigning directly to this.state is ' + "deprecated (except inside a component's " + 'constructor). Use setState instead.', getComponentNameFromType(type) || 'Component'); + } + + classComponentUpdater.enqueueReplaceState(instance, instance.state, null); + } +} + +function processUpdateQueue(internalInstance, inst, props, maskedLegacyContext) { + if (internalInstance.queue !== null && internalInstance.queue.length > 0) { + var oldQueue = internalInstance.queue; + var oldReplace = internalInstance.replace; + internalInstance.queue = null; + internalInstance.replace = false; + + if (oldReplace && oldQueue.length === 1) { + inst.state = oldQueue[0]; + } else { + var nextState = oldReplace ? oldQueue[0] : inst.state; + var dontMutate = true; + + for (var i = oldReplace ? 1 : 0; i < oldQueue.length; i++) { + var partial = oldQueue[i]; + var partialState = typeof partial === 'function' ? partial.call(inst, nextState, props, maskedLegacyContext) : partial; + + if (partialState != null) { + if (dontMutate) { + dontMutate = false; + nextState = assign({}, nextState, partialState); + } else { + assign(nextState, partialState); + } + } + } + + inst.state = nextState; + } + } else { + internalInstance.queue = null; + } +} // Invokes the mount life-cycles on a previously never rendered instance. + + +function mountClassInstance(instance, ctor, newProps, maskedLegacyContext) { + { + checkClassInstance(instance, ctor, newProps); + } + + var initialState = instance.state !== undefined ? instance.state : null; + instance.updater = classComponentUpdater; + instance.props = newProps; + instance.state = initialState; // We don't bother initializing the refs object on the server, since we're not going to resolve them anyway. + // The internal instance will be used to manage updates that happen during this mount. + + var internalInstance = { + queue: [], + replace: false + }; + set(instance, internalInstance); + var contextType = ctor.contextType; + + if (typeof contextType === 'object' && contextType !== null) { + instance.context = readContext(contextType); + } else { + instance.context = maskedLegacyContext; + } + + { + if (instance.state === newProps) { + var componentName = getComponentNameFromType(ctor) || 'Component'; + + if (!didWarnAboutDirectlyAssigningPropsToState.has(componentName)) { + didWarnAboutDirectlyAssigningPropsToState.add(componentName); + + error('%s: It is not recommended to assign props directly to state ' + "because updates to props won't be reflected in state. " + 'In most cases, it is better to use props directly.', componentName); + } + } + } + + var getDerivedStateFromProps = ctor.getDerivedStateFromProps; + + if (typeof getDerivedStateFromProps === 'function') { + instance.state = applyDerivedStateFromProps(instance, ctor, getDerivedStateFromProps, initialState, newProps); + } // In order to support react-lifecycles-compat polyfilled components, + // Unsafe lifecycles should not be invoked for components using the new APIs. + + + if (typeof ctor.getDerivedStateFromProps !== 'function' && typeof instance.getSnapshotBeforeUpdate !== 'function' && (typeof instance.UNSAFE_componentWillMount === 'function' || typeof instance.componentWillMount === 'function')) { + callComponentWillMount(ctor, instance); // If we had additional state updates during this life-cycle, let's + // process them now. + + processUpdateQueue(internalInstance, instance, newProps, maskedLegacyContext); + } +} + +// Ids are base 32 strings whose binary representation corresponds to the +// position of a node in a tree. +// Every time the tree forks into multiple children, we add additional bits to +// the left of the sequence that represent the position of the child within the +// current level of children. +// +// 00101 00010001011010101 +// โ•ฐโ”€โ”ฌโ”€โ•ฏ โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ +// Fork 5 of 20 Parent id +// +// The leading 0s are important. In the above example, you only need 3 bits to +// represent slot 5. However, you need 5 bits to represent all the forks at +// the current level, so we must account for the empty bits at the end. +// +// For this same reason, slots are 1-indexed instead of 0-indexed. Otherwise, +// the zeroth id at a level would be indistinguishable from its parent. +// +// If a node has only one child, and does not materialize an id (i.e. does not +// contain a useId hook), then we don't need to allocate any space in the +// sequence. It's treated as a transparent indirection. For example, these two +// trees produce the same ids: +// +// <> <> +// +// +// +// +// +// +// However, we cannot skip any node that materializes an id. Otherwise, a parent +// id that does not fork would be indistinguishable from its child id. For +// example, this tree does not fork, but the parent and child must have +// different ids. +// +// +// +// +// +// To handle this scenario, every time we materialize an id, we allocate a +// new level with a single slot. You can think of this as a fork with only one +// prong, or an array of children with length 1. +// +// It's possible for the size of the sequence to exceed 32 bits, the max +// size for bitwise operations. When this happens, we make more room by +// converting the right part of the id to a string and storing it in an overflow +// variable. We use a base 32 string representation, because 32 is the largest +// power of 2 that is supported by toString(). We want the base to be large so +// that the resulting ids are compact, and we want the base to be a power of 2 +// because every log2(base) bits corresponds to a single character, i.e. every +// log2(32) = 5 bits. That means we can lop bits off the end 5 at a time without +// affecting the final result. +var emptyTreeContext = { + id: 1, + overflow: '' +}; +function getTreeId(context) { + var overflow = context.overflow; + var idWithLeadingBit = context.id; + var id = idWithLeadingBit & ~getLeadingBit(idWithLeadingBit); + return id.toString(32) + overflow; +} +function pushTreeContext(baseContext, totalChildren, index) { + var baseIdWithLeadingBit = baseContext.id; + var baseOverflow = baseContext.overflow; // The leftmost 1 marks the end of the sequence, non-inclusive. It's not part + // of the id; we use it to account for leading 0s. + + var baseLength = getBitLength(baseIdWithLeadingBit) - 1; + var baseId = baseIdWithLeadingBit & ~(1 << baseLength); + var slot = index + 1; + var length = getBitLength(totalChildren) + baseLength; // 30 is the max length we can store without overflowing, taking into + // consideration the leading 1 we use to mark the end of the sequence. + + if (length > 30) { + // We overflowed the bitwise-safe range. Fall back to slower algorithm. + // This branch assumes the length of the base id is greater than 5; it won't + // work for smaller ids, because you need 5 bits per character. + // + // We encode the id in multiple steps: first the base id, then the + // remaining digits. + // + // Each 5 bit sequence corresponds to a single base 32 character. So for + // example, if the current id is 23 bits long, we can convert 20 of those + // bits into a string of 4 characters, with 3 bits left over. + // + // First calculate how many bits in the base id represent a complete + // sequence of characters. + var numberOfOverflowBits = baseLength - baseLength % 5; // Then create a bitmask that selects only those bits. + + var newOverflowBits = (1 << numberOfOverflowBits) - 1; // Select the bits, and convert them to a base 32 string. + + var newOverflow = (baseId & newOverflowBits).toString(32); // Now we can remove those bits from the base id. + + var restOfBaseId = baseId >> numberOfOverflowBits; + var restOfBaseLength = baseLength - numberOfOverflowBits; // Finally, encode the rest of the bits using the normal algorithm. Because + // we made more room, this time it won't overflow. + + var restOfLength = getBitLength(totalChildren) + restOfBaseLength; + var restOfNewBits = slot << restOfBaseLength; + var id = restOfNewBits | restOfBaseId; + var overflow = newOverflow + baseOverflow; + return { + id: 1 << restOfLength | id, + overflow: overflow + }; + } else { + // Normal path + var newBits = slot << baseLength; + + var _id = newBits | baseId; + + var _overflow = baseOverflow; + return { + id: 1 << length | _id, + overflow: _overflow + }; + } +} + +function getBitLength(number) { + return 32 - clz32(number); +} + +function getLeadingBit(id) { + return 1 << getBitLength(id) - 1; +} // TODO: Math.clz32 is supported in Node 12+. Maybe we can drop the fallback. + + +var clz32 = Math.clz32 ? Math.clz32 : clz32Fallback; // Count leading zeros. +// Based on: +// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/clz32 + +var log = Math.log; +var LN2 = Math.LN2; + +function clz32Fallback(x) { + var asUint = x >>> 0; + + if (asUint === 0) { + return 32; + } + + return 31 - (log(asUint) / LN2 | 0) | 0; +} + +// Corresponds to ReactFiberWakeable and ReactFlightWakeable modules. Generally, +// changes to one module should be reflected in the others. +// TODO: Rename this module and the corresponding Fiber one to "Thenable" +// instead of "Wakeable". Or some other more appropriate name. +// TODO: Sparse arrays are bad for performance. +function createThenableState() { + // The ThenableState is created the first time a component suspends. If it + // suspends again, we'll reuse the same state. + return []; +} +function trackSuspendedWakeable(wakeable) { + // If this wakeable isn't already a thenable, turn it into one now. Then, + // when we resume the work loop, we can check if its status is + // still pending. + // TODO: Get rid of the Wakeable type? It's superseded by UntrackedThenable. + var thenable = wakeable; // We use an expando to track the status and result of a thenable so that we + // can synchronously unwrap the value. Think of this as an extension of the + // Promise API, or a custom interface that is a superset of Thenable. + // + // If the thenable doesn't have a status, set it to "pending" and attach + // a listener that will update its status and result when it resolves. + + switch (thenable.status) { + case 'fulfilled': + case 'rejected': + // A thenable that already resolved shouldn't have been thrown, so this is + // unexpected. Suggests a mistake in a userspace data library. Don't track + // this thenable, because if we keep trying it will likely infinite loop + // without ever resolving. + // TODO: Log a warning? + break; + + default: + { + if (typeof thenable.status === 'string') { + // Only instrument the thenable if the status if not defined. If + // it's defined, but an unknown value, assume it's been instrumented by + // some custom userspace implementation. We treat it as "pending". + break; + } + + var pendingThenable = thenable; + pendingThenable.status = 'pending'; + pendingThenable.then(function (fulfilledValue) { + if (thenable.status === 'pending') { + var fulfilledThenable = thenable; + fulfilledThenable.status = 'fulfilled'; + fulfilledThenable.value = fulfilledValue; + } + }, function (error) { + if (thenable.status === 'pending') { + var rejectedThenable = thenable; + rejectedThenable.status = 'rejected'; + rejectedThenable.reason = error; + } + }); + break; + } + } +} +function trackUsedThenable(thenableState, thenable, index) { + // This is only a separate function from trackSuspendedWakeable for symmetry + // with Fiber. + thenableState[index] = thenable; +} +function getPreviouslyUsedThenableAtIndex(thenableState, index) { + if (thenableState !== null) { + var thenable = thenableState[index]; + + if (thenable !== undefined) { + return thenable; + } + } + + return null; +} + +/** + * inlined Object.is polyfill to avoid requiring consumers ship their own + * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is + */ +function is(x, y) { + return x === y && (x !== 0 || 1 / x === 1 / y) || x !== x && y !== y // eslint-disable-line no-self-compare + ; +} + +var objectIs = // $FlowFixMe[method-unbinding] +typeof Object.is === 'function' ? Object.is : is; + +var currentlyRenderingComponent = null; +var currentlyRenderingTask = null; +var firstWorkInProgressHook = null; +var workInProgressHook = null; // Whether the work-in-progress hook is a re-rendered hook + +var isReRender = false; // Whether an update was scheduled during the currently executing render pass. + +var didScheduleRenderPhaseUpdate = false; // Counts the number of useId hooks in this component + +var localIdCounter = 0; // Counts the number of use(thenable) calls in this component + +var thenableIndexCounter = 0; +var thenableState = null; // Lazily created map of render-phase updates + +var renderPhaseUpdates = null; // Counter to prevent infinite loops. + +var numberOfReRenders = 0; +var RE_RENDER_LIMIT = 25; +var isInHookUserCodeInDev = false; // In DEV, this is the name of the currently executing primitive hook + +var currentHookNameInDev; + +function resolveCurrentlyRenderingComponent() { + if (currentlyRenderingComponent === null) { + throw new Error('Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for' + ' one of the following reasons:\n' + '1. You might have mismatching versions of React and the renderer (such as React DOM)\n' + '2. You might be breaking the Rules of Hooks\n' + '3. You might have more than one copy of React in the same app\n' + 'See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.'); + } + + { + if (isInHookUserCodeInDev) { + error('Do not call Hooks inside useEffect(...), useMemo(...), or other built-in Hooks. ' + 'You can only call Hooks at the top level of your React function. ' + 'For more information, see ' + 'https://reactjs.org/link/rules-of-hooks'); + } + } + + return currentlyRenderingComponent; +} + +function areHookInputsEqual(nextDeps, prevDeps) { + if (prevDeps === null) { + { + error('%s received a final argument during this render, but not during ' + 'the previous render. Even though the final argument is optional, ' + 'its type cannot change between renders.', currentHookNameInDev); + } + + return false; + } + + { + // Don't bother comparing lengths in prod because these arrays should be + // passed inline. + if (nextDeps.length !== prevDeps.length) { + error('The final argument passed to %s changed size between renders. The ' + 'order and size of this array must remain constant.\n\n' + 'Previous: %s\n' + 'Incoming: %s', currentHookNameInDev, "[" + nextDeps.join(', ') + "]", "[" + prevDeps.join(', ') + "]"); + } + } // $FlowFixMe[incompatible-use] found when upgrading Flow + + + for (var i = 0; i < prevDeps.length && i < nextDeps.length; i++) { + // $FlowFixMe[incompatible-use] found when upgrading Flow + if (objectIs(nextDeps[i], prevDeps[i])) { + continue; + } + + return false; + } + + return true; +} + +function createHook() { + if (numberOfReRenders > 0) { + throw new Error('Rendered more hooks than during the previous render'); + } + + return { + memoizedState: null, + queue: null, + next: null + }; +} + +function createWorkInProgressHook() { + if (workInProgressHook === null) { + // This is the first hook in the list + if (firstWorkInProgressHook === null) { + isReRender = false; + firstWorkInProgressHook = workInProgressHook = createHook(); + } else { + // There's already a work-in-progress. Reuse it. + isReRender = true; + workInProgressHook = firstWorkInProgressHook; + } + } else { + if (workInProgressHook.next === null) { + isReRender = false; // Append to the end of the list + + workInProgressHook = workInProgressHook.next = createHook(); + } else { + // There's already a work-in-progress. Reuse it. + isReRender = true; + workInProgressHook = workInProgressHook.next; + } + } + + return workInProgressHook; +} + +function prepareToUseHooks(task, componentIdentity, prevThenableState) { + currentlyRenderingComponent = componentIdentity; + currentlyRenderingTask = task; + + { + isInHookUserCodeInDev = false; + } // The following should have already been reset + // didScheduleRenderPhaseUpdate = false; + // firstWorkInProgressHook = null; + // numberOfReRenders = 0; + // renderPhaseUpdates = null; + // workInProgressHook = null; + + + localIdCounter = 0; + thenableIndexCounter = 0; + thenableState = prevThenableState; +} +function finishHooks(Component, props, children, refOrContext) { + // This must be called after every function component to prevent hooks from + // being used in classes. + while (didScheduleRenderPhaseUpdate) { + // Updates were scheduled during the render phase. They are stored in + // the `renderPhaseUpdates` map. Call the component again, reusing the + // work-in-progress hooks and applying the additional updates on top. Keep + // restarting until no more updates are scheduled. + didScheduleRenderPhaseUpdate = false; + localIdCounter = 0; + thenableIndexCounter = 0; + numberOfReRenders += 1; // Start over from the beginning of the list + + workInProgressHook = null; + children = Component(props, refOrContext); + } + + resetHooksState(); + return children; +} +function getThenableStateAfterSuspending() { + var state = thenableState; + thenableState = null; + return state; +} +function checkDidRenderIdHook() { + // This should be called immediately after every finishHooks call. + // Conceptually, it's part of the return value of finishHooks; it's only a + // separate function to avoid using an array tuple. + var didRenderIdHook = localIdCounter !== 0; + return didRenderIdHook; +} // Reset the internal hooks state if an error occurs while rendering a component + +function resetHooksState() { + { + isInHookUserCodeInDev = false; + } + + currentlyRenderingComponent = null; + currentlyRenderingTask = null; + didScheduleRenderPhaseUpdate = false; + firstWorkInProgressHook = null; + numberOfReRenders = 0; + renderPhaseUpdates = null; + workInProgressHook = null; +} + +function readContext$1(context) { + { + if (isInHookUserCodeInDev) { + error('Context can only be read while React is rendering. ' + 'In classes, you can read it in the render method or getDerivedStateFromProps. ' + 'In function components, you can read it directly in the function body, but not ' + 'inside Hooks like useReducer() or useMemo().'); + } + } + + return readContext(context); +} + +function useContext(context) { + { + currentHookNameInDev = 'useContext'; + } + + resolveCurrentlyRenderingComponent(); + return readContext(context); +} + +function basicStateReducer(state, action) { + // $FlowFixMe: Flow doesn't like mixed types + return typeof action === 'function' ? action(state) : action; +} + +function useState(initialState) { + { + currentHookNameInDev = 'useState'; + } + + return useReducer(basicStateReducer, // useReducer has a special case to support lazy useState initializers + initialState); +} +function useReducer(reducer, initialArg, init) { + { + if (reducer !== basicStateReducer) { + currentHookNameInDev = 'useReducer'; + } + } + + currentlyRenderingComponent = resolveCurrentlyRenderingComponent(); + workInProgressHook = createWorkInProgressHook(); + + if (isReRender) { + // This is a re-render. Apply the new render phase updates to the previous + // current hook. + var queue = workInProgressHook.queue; + var dispatch = queue.dispatch; + + if (renderPhaseUpdates !== null) { + // Render phase updates are stored in a map of queue -> linked list + var firstRenderPhaseUpdate = renderPhaseUpdates.get(queue); + + if (firstRenderPhaseUpdate !== undefined) { + // $FlowFixMe[incompatible-use] found when upgrading Flow + renderPhaseUpdates.delete(queue); // $FlowFixMe[incompatible-use] found when upgrading Flow + + var newState = workInProgressHook.memoizedState; + var update = firstRenderPhaseUpdate; + + do { + // Process this render phase update. We don't have to check the + // priority because it will always be the same as the current + // render's. + var action = update.action; + + { + isInHookUserCodeInDev = true; + } + + newState = reducer(newState, action); + + { + isInHookUserCodeInDev = false; + } // $FlowFixMe[incompatible-type] we bail out when we get a null + + + update = update.next; + } while (update !== null); // $FlowFixMe[incompatible-use] found when upgrading Flow + + + workInProgressHook.memoizedState = newState; + return [newState, dispatch]; + } + } // $FlowFixMe[incompatible-use] found when upgrading Flow + + + return [workInProgressHook.memoizedState, dispatch]; + } else { + { + isInHookUserCodeInDev = true; + } + + var initialState; + + if (reducer === basicStateReducer) { + // Special case for `useState`. + initialState = typeof initialArg === 'function' ? initialArg() : initialArg; + } else { + initialState = init !== undefined ? init(initialArg) : initialArg; + } + + { + isInHookUserCodeInDev = false; + } // $FlowFixMe[incompatible-use] found when upgrading Flow + + + workInProgressHook.memoizedState = initialState; // $FlowFixMe[incompatible-use] found when upgrading Flow + + var _queue = workInProgressHook.queue = { + last: null, + dispatch: null + }; + + var _dispatch = _queue.dispatch = dispatchAction.bind(null, currentlyRenderingComponent, _queue); // $FlowFixMe[incompatible-use] found when upgrading Flow + + + return [workInProgressHook.memoizedState, _dispatch]; + } +} + +function useMemo(nextCreate, deps) { + currentlyRenderingComponent = resolveCurrentlyRenderingComponent(); + workInProgressHook = createWorkInProgressHook(); + var nextDeps = deps === undefined ? null : deps; + + if (workInProgressHook !== null) { + var prevState = workInProgressHook.memoizedState; + + if (prevState !== null) { + if (nextDeps !== null) { + var prevDeps = prevState[1]; + + if (areHookInputsEqual(nextDeps, prevDeps)) { + return prevState[0]; + } + } + } + } + + { + isInHookUserCodeInDev = true; + } + + var nextValue = nextCreate(); + + { + isInHookUserCodeInDev = false; + } // $FlowFixMe[incompatible-use] found when upgrading Flow + + + workInProgressHook.memoizedState = [nextValue, nextDeps]; + return nextValue; +} + +function useRef(initialValue) { + currentlyRenderingComponent = resolveCurrentlyRenderingComponent(); + workInProgressHook = createWorkInProgressHook(); + var previousRef = workInProgressHook.memoizedState; + + if (previousRef === null) { + var ref = { + current: initialValue + }; + + { + Object.seal(ref); + } // $FlowFixMe[incompatible-use] found when upgrading Flow + + + workInProgressHook.memoizedState = ref; + return ref; + } else { + return previousRef; + } +} + +function useLayoutEffect(create, inputs) { + { + currentHookNameInDev = 'useLayoutEffect'; + + error('useLayoutEffect does nothing on the server, because its effect cannot ' + "be encoded into the server renderer's output format. This will lead " + 'to a mismatch between the initial, non-hydrated UI and the intended ' + 'UI. To avoid this, useLayoutEffect should only be used in ' + 'components that render exclusively on the client. ' + 'See https://reactjs.org/link/uselayouteffect-ssr for common fixes.'); + } +} + +function dispatchAction(componentIdentity, queue, action) { + if (numberOfReRenders >= RE_RENDER_LIMIT) { + throw new Error('Too many re-renders. React limits the number of renders to prevent ' + 'an infinite loop.'); + } + + if (componentIdentity === currentlyRenderingComponent) { + // This is a render phase update. Stash it in a lazily-created map of + // queue -> linked list of updates. After this render pass, we'll restart + // and apply the stashed updates on top of the work-in-progress hook. + didScheduleRenderPhaseUpdate = true; + var update = { + action: action, + next: null + }; + + if (renderPhaseUpdates === null) { + renderPhaseUpdates = new Map(); + } + + var firstRenderPhaseUpdate = renderPhaseUpdates.get(queue); + + if (firstRenderPhaseUpdate === undefined) { + // $FlowFixMe[incompatible-use] found when upgrading Flow + renderPhaseUpdates.set(queue, update); + } else { + // Append the update to the end of the list. + var lastRenderPhaseUpdate = firstRenderPhaseUpdate; + + while (lastRenderPhaseUpdate.next !== null) { + lastRenderPhaseUpdate = lastRenderPhaseUpdate.next; + } + + lastRenderPhaseUpdate.next = update; + } + } +} + +function useCallback(callback, deps) { + return useMemo(function () { + return callback; + }, deps); +} + +function throwOnUseEventCall() { + throw new Error("A function wrapped in useEvent can't be called during rendering."); +} + +function useEvent(callback) { + return throwOnUseEventCall; +} // TODO Decide on how to implement this hook for server rendering. +// If a mutation occurs during render, consider triggering a Suspense boundary +// and falling back to client rendering. + +function useMutableSource(source, getSnapshot, subscribe) { + resolveCurrentlyRenderingComponent(); + return getSnapshot(source._source); +} + +function useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot) { + if (getServerSnapshot === undefined) { + throw new Error('Missing getServerSnapshot, which is required for ' + 'server-rendered content. Will revert to client rendering.'); + } + + return getServerSnapshot(); +} + +function useDeferredValue(value) { + resolveCurrentlyRenderingComponent(); + return value; +} + +function unsupportedStartTransition() { + throw new Error('startTransition cannot be called during server rendering.'); +} + +function useTransition() { + resolveCurrentlyRenderingComponent(); + return [false, unsupportedStartTransition]; +} + +function useId() { + var task = currentlyRenderingTask; + var treeId = getTreeId(task.treeContext); + var responseState = currentResponseState; + + if (responseState === null) { + throw new Error('Invalid hook call. Hooks can only be called inside of the body of a function component.'); + } + + var localId = localIdCounter++; + return makeId(responseState, treeId, localId); +} + +function use(usable) { + if (usable !== null && typeof usable === 'object') { + // $FlowFixMe[method-unbinding] + if (typeof usable.then === 'function') { + // This is a thenable. + var thenable = usable; // Track the position of the thenable within this fiber. + + var index = thenableIndexCounter; + thenableIndexCounter += 1; + + switch (thenable.status) { + case 'fulfilled': + { + var fulfilledValue = thenable.value; + return fulfilledValue; + } + + case 'rejected': + { + var rejectedError = thenable.reason; + throw rejectedError; + } + + default: + { + var prevThenableAtIndex = getPreviouslyUsedThenableAtIndex(thenableState, index); + + if (prevThenableAtIndex !== null) { + switch (prevThenableAtIndex.status) { + case 'fulfilled': + { + var _fulfilledValue = prevThenableAtIndex.value; + return _fulfilledValue; + } + + case 'rejected': + { + var _rejectedError = prevThenableAtIndex.reason; + throw _rejectedError; + } + + default: + { + // The thenable still hasn't resolved. Suspend with the same + // thenable as last time to avoid redundant listeners. + throw prevThenableAtIndex; + } + } + } else { + // This is the first time something has been used at this index. + // Stash the thenable at the current index so we can reuse it during + // the next attempt. + if (thenableState === null) { + thenableState = createThenableState(); + } + + trackUsedThenable(thenableState, thenable, index); // Suspend. + // TODO: Throwing here is an implementation detail that allows us to + // unwind the call stack. But we shouldn't allow it to leak into + // userspace. Throw an opaque placeholder value instead of the + // actual thenable. If it doesn't get captured by the work loop, log + // a warning, because that means something in userspace must have + // caught it. + + throw thenable; + } + } + } + } else if (usable.$$typeof === REACT_CONTEXT_TYPE || usable.$$typeof === REACT_SERVER_CONTEXT_TYPE) { + var context = usable; + return readContext$1(context); + } + } // eslint-disable-next-line react-internal/safe-string-coercion + + + throw new Error('An unsupported type was passed to use(): ' + String(usable)); +} + +function unsupportedRefresh() { + throw new Error('Cache cannot be refreshed during server rendering.'); +} + +function useCacheRefresh() { + return unsupportedRefresh; +} + +function useMemoCache(size) { + return new Array(size); +} + +function noop() {} + +var HooksDispatcher = { + readContext: readContext$1, + useContext: useContext, + useMemo: useMemo, + useReducer: useReducer, + useRef: useRef, + useState: useState, + useInsertionEffect: noop, + useLayoutEffect: useLayoutEffect, + useCallback: useCallback, + // useImperativeHandle is not run in the server environment + useImperativeHandle: noop, + // Effects are not run in the server environment. + useEffect: noop, + // Debugging effect + useDebugValue: noop, + useDeferredValue: useDeferredValue, + useTransition: useTransition, + useId: useId, + // Subscriptions are not setup in a server environment. + useMutableSource: useMutableSource, + useSyncExternalStore: useSyncExternalStore +}; + +{ + HooksDispatcher.useCacheRefresh = useCacheRefresh; +} + +{ + HooksDispatcher.useEvent = useEvent; +} + +{ + HooksDispatcher.useMemoCache = useMemoCache; +} + +{ + HooksDispatcher.use = use; +} + +var currentResponseState = null; +function setCurrentResponseState(responseState) { + currentResponseState = responseState; +} + +function getCacheSignal() { + throw new Error('Not implemented.'); +} + +function getCacheForType(resourceType) { + throw new Error('Not implemented.'); +} + +var DefaultCacheDispatcher = { + getCacheSignal: getCacheSignal, + getCacheForType: getCacheForType +}; + +function getStackByComponentStackNode(componentStack) { + try { + var info = ''; + var node = componentStack; + + do { + switch (node.tag) { + case 0: + info += describeBuiltInComponentFrame(node.type, null, null); + break; + + case 1: + info += describeFunctionComponentFrame(node.type, null, null); + break; + + case 2: + info += describeClassComponentFrame(node.type, null, null); + break; + } // $FlowFixMe[incompatible-type] we bail out when we get a null + + + node = node.parent; + } while (node); + + return info; + } catch (x) { + return '\nError generating stack: ' + x.message + '\n' + x.stack; + } +} + +var ReactCurrentDispatcher$1 = ReactSharedInternals.ReactCurrentDispatcher; +var ReactCurrentCache = ReactSharedInternals.ReactCurrentCache; +var ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame; +var PENDING = 0; +var COMPLETED = 1; +var FLUSHED = 2; +var ABORTED = 3; +var ERRORED = 4; +var OPEN = 0; +var CLOSING = 1; +var CLOSED = 2; +// This is a default heuristic for how to split up the HTML content into progressive +// loading. Our goal is to be able to display additional new content about every 500ms. +// Faster than that is unnecessary and should be throttled on the client. It also +// adds unnecessary overhead to do more splits. We don't know if it's a higher or lower +// end device but higher end suffer less from the overhead than lower end does from +// not getting small enough pieces. We error on the side of low end. +// We base this on low end 3G speeds which is about 500kbits per second. We assume +// that there can be a reasonable drop off from max bandwidth which leaves you with +// as little as 80%. We can receive half of that each 500ms - at best. In practice, +// a little bandwidth is lost to processing and contention - e.g. CSS and images that +// are downloaded along with the main content. So we estimate about half of that to be +// the lower end throughput. In other words, we expect that you can at least show +// about 12.5kb of content per 500ms. Not counting starting latency for the first +// paint. +// 500 * 1024 / 8 * .8 * 0.5 / 2 +var DEFAULT_PROGRESSIVE_CHUNK_SIZE = 12800; + +function defaultErrorHandler(error) { + console['error'](error); // Don't transform to our wrapper + + return null; +} + +function noop$1() {} + +function createRequest(children, responseState, rootFormatContext, progressiveChunkSize, onError, onAllReady, onShellReady, onShellError, onFatalError) { + var pingedTasks = []; + var abortSet = new Set(); + var resources = createResources(); + var request = { + destination: null, + responseState: responseState, + progressiveChunkSize: progressiveChunkSize === undefined ? DEFAULT_PROGRESSIVE_CHUNK_SIZE : progressiveChunkSize, + status: OPEN, + fatalError: null, + nextSegmentId: 0, + allPendingTasks: 0, + pendingRootTasks: 0, + resources: resources, + completedRootSegment: null, + abortableTasks: abortSet, + pingedTasks: pingedTasks, + clientRenderedBoundaries: [], + completedBoundaries: [], + partialBoundaries: [], + preamble: [], + postamble: [], + onError: onError === undefined ? defaultErrorHandler : onError, + onAllReady: onAllReady === undefined ? noop$1 : onAllReady, + onShellReady: onShellReady === undefined ? noop$1 : onShellReady, + onShellError: onShellError === undefined ? noop$1 : onShellError, + onFatalError: onFatalError === undefined ? noop$1 : onFatalError + }; // This segment represents the root fallback. + + var rootSegment = createPendingSegment(request, 0, null, rootFormatContext, // Root segments are never embedded in Text on either edge + false, false); // There is no parent so conceptually, we're unblocked to flush this segment. + + rootSegment.parentFlushed = true; + var rootTask = createTask(request, null, children, null, rootSegment, abortSet, emptyContextObject, rootContextSnapshot, emptyTreeContext); + pingedTasks.push(rootTask); + return request; +} + +function pingTask(request, task) { + var pingedTasks = request.pingedTasks; + pingedTasks.push(task); + + if (pingedTasks.length === 1) { + scheduleWork(function () { + return performWork(request); + }); + } +} + +function createSuspenseBoundary(request, fallbackAbortableTasks) { + return { + id: UNINITIALIZED_SUSPENSE_BOUNDARY_ID, + rootSegmentID: -1, + parentFlushed: false, + pendingTasks: 0, + forceClientRender: false, + completedSegments: [], + byteSize: 0, + fallbackAbortableTasks: fallbackAbortableTasks, + errorDigest: null, + resources: createBoundaryResources() + }; +} + +function createTask(request, thenableState, node, blockedBoundary, blockedSegment, abortSet, legacyContext, context, treeContext) { + request.allPendingTasks++; + + if (blockedBoundary === null) { + request.pendingRootTasks++; + } else { + blockedBoundary.pendingTasks++; + } + + var task = { + node: node, + ping: function () { + return pingTask(request, task); + }, + blockedBoundary: blockedBoundary, + blockedSegment: blockedSegment, + abortSet: abortSet, + legacyContext: legacyContext, + context: context, + treeContext: treeContext, + thenableState: thenableState + }; + + { + task.componentStack = null; + } + + abortSet.add(task); + return task; +} + +function createPendingSegment(request, index, boundary, formatContext, lastPushedText, textEmbedded) { + return { + status: PENDING, + id: -1, + // lazily assigned later + index: index, + parentFlushed: false, + chunks: [], + children: [], + formatContext: formatContext, + boundary: boundary, + lastPushedText: lastPushedText, + textEmbedded: textEmbedded + }; +} // DEV-only global reference to the currently executing task + + +var currentTaskInDEV = null; + +function getCurrentStackInDEV() { + { + if (currentTaskInDEV === null || currentTaskInDEV.componentStack === null) { + return ''; + } + + return getStackByComponentStackNode(currentTaskInDEV.componentStack); + } +} + +function pushBuiltInComponentStackInDEV(task, type) { + { + task.componentStack = { + tag: 0, + parent: task.componentStack, + type: type + }; + } +} + +function pushFunctionComponentStackInDEV(task, type) { + { + task.componentStack = { + tag: 1, + parent: task.componentStack, + type: type + }; + } +} + +function pushClassComponentStackInDEV(task, type) { + { + task.componentStack = { + tag: 2, + parent: task.componentStack, + type: type + }; + } +} + +function popComponentStackInDEV(task) { + { + if (task.componentStack === null) { + error('Unexpectedly popped too many stack frames. This is a bug in React.'); + } else { + task.componentStack = task.componentStack.parent; + } + } +} // stash the component stack of an unwinding error until it is processed + + +var lastBoundaryErrorComponentStackDev = null; + +function captureBoundaryErrorDetailsDev(boundary, error) { + { + var errorMessage; + + if (typeof error === 'string') { + errorMessage = error; + } else if (error && typeof error.message === 'string') { + errorMessage = error.message; + } else { + // eslint-disable-next-line react-internal/safe-string-coercion + errorMessage = String(error); + } + + var errorComponentStack = lastBoundaryErrorComponentStackDev || getCurrentStackInDEV(); + lastBoundaryErrorComponentStackDev = null; + boundary.errorMessage = errorMessage; + boundary.errorComponentStack = errorComponentStack; + } +} + +function logRecoverableError(request, error) { + // If this callback errors, we intentionally let that error bubble up to become a fatal error + // so that someone fixes the error reporting instead of hiding it. + var errorDigest = request.onError(error); + + if (errorDigest != null && typeof errorDigest !== 'string') { + // eslint-disable-next-line react-internal/prod-error-codes + throw new Error("onError returned something with a type other than \"string\". onError should return a string and may return null or undefined but must not return anything else. It received something of type \"" + typeof errorDigest + "\" instead"); + } + + return errorDigest; +} + +function fatalError(request, error) { + // This is called outside error handling code such as if the root errors outside + // a suspense boundary or if the root suspense boundary's fallback errors. + // It's also called if React itself or its host configs errors. + var onShellError = request.onShellError; + onShellError(error); + var onFatalError = request.onFatalError; + onFatalError(error); + + if (request.destination !== null) { + request.status = CLOSED; + closeWithError(request.destination, error); + } else { + request.status = CLOSING; + request.fatalError = error; + } +} + +function renderSuspenseBoundary(request, task, props) { + pushBuiltInComponentStackInDEV(task, 'Suspense'); + var parentBoundary = task.blockedBoundary; + var parentSegment = task.blockedSegment; // Each time we enter a suspense boundary, we split out into a new segment for + // the fallback so that we can later replace that segment with the content. + // This also lets us split out the main content even if it doesn't suspend, + // in case it ends up generating a large subtree of content. + + var fallback = props.fallback; + var content = props.children; + var fallbackAbortSet = new Set(); + var newBoundary = createSuspenseBoundary(request, fallbackAbortSet); + var insertionIndex = parentSegment.chunks.length; // The children of the boundary segment is actually the fallback. + + var boundarySegment = createPendingSegment(request, insertionIndex, newBoundary, parentSegment.formatContext, // boundaries never require text embedding at their edges because comment nodes bound them + false, false); + parentSegment.children.push(boundarySegment); // The parentSegment has a child Segment at this index so we reset the lastPushedText marker on the parent + + parentSegment.lastPushedText = false; // This segment is the actual child content. We can start rendering that immediately. + + var contentRootSegment = createPendingSegment(request, 0, null, parentSegment.formatContext, // boundaries never require text embedding at their edges because comment nodes bound them + false, false); // We mark the root segment as having its parent flushed. It's not really flushed but there is + // no parent segment so there's nothing to wait on. + + contentRootSegment.parentFlushed = true; // Currently this is running synchronously. We could instead schedule this to pingedTasks. + // I suspect that there might be some efficiency benefits from not creating the suspended task + // and instead just using the stack if possible. + // TODO: Call this directly instead of messing with saving and restoring contexts. + // We can reuse the current context and task to render the content immediately without + // context switching. We just need to temporarily switch which boundary and which segment + // we're writing to. If something suspends, it'll spawn new suspended task with that context. + + task.blockedBoundary = newBoundary; + task.blockedSegment = contentRootSegment; + + { + setCurrentlyRenderingBoundaryResourcesTarget(request.resources, newBoundary.resources); + } + + try { + // We use the safe form because we don't handle suspending here. Only error handling. + renderNode(request, task, content); + pushSegmentFinale$1(contentRootSegment.chunks, request.responseState, contentRootSegment.lastPushedText, contentRootSegment.textEmbedded); + contentRootSegment.status = COMPLETED; + + if (enableFloat) { + if (newBoundary.pendingTasks === 0) { + hoistCompletedBoundaryResources(request, newBoundary); + } + } + + queueCompletedSegment(newBoundary, contentRootSegment); + + if (newBoundary.pendingTasks === 0) { + // This must have been the last segment we were waiting on. This boundary is now complete. + // Therefore we won't need the fallback. We early return so that we don't have to create + // the fallback. + popComponentStackInDEV(task); + return; + } + } catch (error) { + contentRootSegment.status = ERRORED; + newBoundary.forceClientRender = true; + newBoundary.errorDigest = logRecoverableError(request, error); + + { + captureBoundaryErrorDetailsDev(newBoundary, error); + } // We don't need to decrement any task numbers because we didn't spawn any new task. + // We don't need to schedule any task because we know the parent has written yet. + // We do need to fallthrough to create the fallback though. + + } finally { + { + setCurrentlyRenderingBoundaryResourcesTarget(request.resources, parentBoundary ? parentBoundary.resources : null); + } + + task.blockedBoundary = parentBoundary; + task.blockedSegment = parentSegment; + } // We create suspended task for the fallback because we don't want to actually work + // on it yet in case we finish the main content, so we queue for later. + + + var suspendedFallbackTask = createTask(request, null, fallback, parentBoundary, boundarySegment, fallbackAbortSet, task.legacyContext, task.context, task.treeContext); + + { + suspendedFallbackTask.componentStack = task.componentStack; + } // TODO: This should be queued at a separate lower priority queue so that we only work + // on preparing fallbacks if we don't have any more main content to task on. + + + request.pingedTasks.push(suspendedFallbackTask); + popComponentStackInDEV(task); +} + +function hoistCompletedBoundaryResources(request, completedBoundary) { + if (request.completedRootSegment !== null || request.pendingRootTasks > 0) { + // The Shell has not flushed yet. we can hoist Resources for this boundary + // all the way to the Root. + hoistResourcesToRoot(request.resources, completedBoundary.resources); + } // We don't hoist if the root already flushed because late resources will be hoisted + // as boundaries flush + +} + +function renderHostElement(request, task, type, props) { + pushBuiltInComponentStackInDEV(task, type); + var segment = task.blockedSegment; + var children = pushStartInstance(segment.chunks, request.preamble, type, props, request.responseState, segment.formatContext, segment.lastPushedText); + segment.lastPushedText = false; + var prevContext = segment.formatContext; + segment.formatContext = getChildFormatContext(prevContext, type, props); // We use the non-destructive form because if something suspends, we still + // need to pop back up and finish this subtree of HTML. + + renderNode(request, task, children); // We expect that errors will fatal the whole task and that we don't need + // the correct context. Therefore this is not in a finally. + + segment.formatContext = prevContext; + pushEndInstance(segment.chunks, request.postamble, type); + segment.lastPushedText = false; + popComponentStackInDEV(task); +} + +function shouldConstruct$1(Component) { + return Component.prototype && Component.prototype.isReactComponent; +} + +function renderWithHooks(request, task, prevThenableState, Component, props, secondArg) { + var componentIdentity = {}; + prepareToUseHooks(task, componentIdentity, prevThenableState); + var result = Component(props, secondArg); + return finishHooks(Component, props, result, secondArg); +} + +function finishClassComponent(request, task, instance, Component, props) { + var nextChildren = instance.render(); + + { + if (instance.props !== props) { + if (!didWarnAboutReassigningProps) { + error('It looks like %s is reassigning its own `this.props` while rendering. ' + 'This is not supported and can lead to confusing bugs.', getComponentNameFromType(Component) || 'a component'); + } + + didWarnAboutReassigningProps = true; + } + } + + { + var childContextTypes = Component.childContextTypes; + + if (childContextTypes !== null && childContextTypes !== undefined) { + var previousContext = task.legacyContext; + var mergedContext = processChildContext(instance, Component, previousContext, childContextTypes); + task.legacyContext = mergedContext; + renderNodeDestructive(request, task, null, nextChildren); + task.legacyContext = previousContext; + return; + } + } + + renderNodeDestructive(request, task, null, nextChildren); +} + +function renderClassComponent(request, task, Component, props) { + pushClassComponentStackInDEV(task, Component); + var maskedContext = getMaskedContext(Component, task.legacyContext) ; + var instance = constructClassInstance(Component, props, maskedContext); + mountClassInstance(instance, Component, props, maskedContext); + finishClassComponent(request, task, instance, Component, props); + popComponentStackInDEV(task); +} + +var didWarnAboutBadClass = {}; +var didWarnAboutModulePatternComponent = {}; +var didWarnAboutContextTypeOnFunctionComponent = {}; +var didWarnAboutGetDerivedStateOnFunctionComponent = {}; +var didWarnAboutReassigningProps = false; +var didWarnAboutGenerators = false; +var didWarnAboutMaps = false; +var hasWarnedAboutUsingContextAsConsumer = false; // This would typically be a function component but we still support module pattern +// components for some reason. + +function renderIndeterminateComponent(request, task, prevThenableState, Component, props) { + var legacyContext; + + { + legacyContext = getMaskedContext(Component, task.legacyContext); + } + + pushFunctionComponentStackInDEV(task, Component); + + { + if (Component.prototype && typeof Component.prototype.render === 'function') { + var componentName = getComponentNameFromType(Component) || 'Unknown'; + + if (!didWarnAboutBadClass[componentName]) { + error("The <%s /> component appears to have a render method, but doesn't extend React.Component. " + 'This is likely to cause errors. Change %s to extend React.Component instead.', componentName, componentName); + + didWarnAboutBadClass[componentName] = true; + } + } + } + + var value = renderWithHooks(request, task, prevThenableState, Component, props, legacyContext); + var hasId = checkDidRenderIdHook(); + + { + // Support for module components is deprecated and is removed behind a flag. + // Whether or not it would crash later, we want to show a good message in DEV first. + if (typeof value === 'object' && value !== null && typeof value.render === 'function' && value.$$typeof === undefined) { + var _componentName = getComponentNameFromType(Component) || 'Unknown'; + + if (!didWarnAboutModulePatternComponent[_componentName]) { + error('The <%s /> component appears to be a function component that returns a class instance. ' + 'Change %s to a class that extends React.Component instead. ' + "If you can't use a class try assigning the prototype on the function as a workaround. " + "`%s.prototype = React.Component.prototype`. Don't use an arrow function since it " + 'cannot be called with `new` by React.', _componentName, _componentName, _componentName); + + didWarnAboutModulePatternComponent[_componentName] = true; + } + } + } + + if ( // Run these checks in production only if the flag is off. + // Eventually we'll delete this branch altogether. + typeof value === 'object' && value !== null && typeof value.render === 'function' && value.$$typeof === undefined) { + { + var _componentName2 = getComponentNameFromType(Component) || 'Unknown'; + + if (!didWarnAboutModulePatternComponent[_componentName2]) { + error('The <%s /> component appears to be a function component that returns a class instance. ' + 'Change %s to a class that extends React.Component instead. ' + "If you can't use a class try assigning the prototype on the function as a workaround. " + "`%s.prototype = React.Component.prototype`. Don't use an arrow function since it " + 'cannot be called with `new` by React.', _componentName2, _componentName2, _componentName2); + + didWarnAboutModulePatternComponent[_componentName2] = true; + } + } + + mountClassInstance(value, Component, props, legacyContext); + finishClassComponent(request, task, value, Component, props); + } else { + + { + validateFunctionComponentInDev(Component); + } // We're now successfully past this task, and we don't have to pop back to + // the previous task every again, so we can use the destructive recursive form. + + + if (hasId) { + // This component materialized an id. We treat this as its own level, with + // a single "child" slot. + var prevTreeContext = task.treeContext; + var totalChildren = 1; + var index = 0; + task.treeContext = pushTreeContext(prevTreeContext, totalChildren, index); + + try { + renderNodeDestructive(request, task, null, value); + } finally { + task.treeContext = prevTreeContext; + } + } else { + renderNodeDestructive(request, task, null, value); + } + } + + popComponentStackInDEV(task); +} + +function validateFunctionComponentInDev(Component) { + { + if (Component) { + if (Component.childContextTypes) { + error('%s(...): childContextTypes cannot be defined on a function component.', Component.displayName || Component.name || 'Component'); + } + } + + if (typeof Component.getDerivedStateFromProps === 'function') { + var _componentName3 = getComponentNameFromType(Component) || 'Unknown'; + + if (!didWarnAboutGetDerivedStateOnFunctionComponent[_componentName3]) { + error('%s: Function components do not support getDerivedStateFromProps.', _componentName3); + + didWarnAboutGetDerivedStateOnFunctionComponent[_componentName3] = true; + } + } + + if (typeof Component.contextType === 'object' && Component.contextType !== null) { + var _componentName4 = getComponentNameFromType(Component) || 'Unknown'; + + if (!didWarnAboutContextTypeOnFunctionComponent[_componentName4]) { + error('%s: Function components do not support contextType.', _componentName4); + + didWarnAboutContextTypeOnFunctionComponent[_componentName4] = true; + } + } + } +} + +function resolveDefaultProps(Component, baseProps) { + if (Component && Component.defaultProps) { + // Resolve default props. Taken from ReactElement + var props = assign({}, baseProps); + var defaultProps = Component.defaultProps; + + for (var propName in defaultProps) { + if (props[propName] === undefined) { + props[propName] = defaultProps[propName]; + } + } + + return props; + } + + return baseProps; +} + +function renderForwardRef(request, task, prevThenableState, type, props, ref) { + pushFunctionComponentStackInDEV(task, type.render); + var children = renderWithHooks(request, task, prevThenableState, type.render, props, ref); + var hasId = checkDidRenderIdHook(); + + if (hasId) { + // This component materialized an id. We treat this as its own level, with + // a single "child" slot. + var prevTreeContext = task.treeContext; + var totalChildren = 1; + var index = 0; + task.treeContext = pushTreeContext(prevTreeContext, totalChildren, index); + + try { + renderNodeDestructive(request, task, null, children); + } finally { + task.treeContext = prevTreeContext; + } + } else { + renderNodeDestructive(request, task, null, children); + } + + popComponentStackInDEV(task); +} + +function renderMemo(request, task, prevThenableState, type, props, ref) { + var innerType = type.type; + var resolvedProps = resolveDefaultProps(innerType, props); + renderElement(request, task, prevThenableState, innerType, resolvedProps, ref); +} + +function renderContextConsumer(request, task, context, props) { + // The logic below for Context differs depending on PROD or DEV mode. In + // DEV mode, we create a separate object for Context.Consumer that acts + // like a proxy to Context. This proxy object adds unnecessary code in PROD + // so we use the old behaviour (Context.Consumer references Context) to + // reduce size and overhead. The separate object references context via + // a property called "_context", which also gives us the ability to check + // in DEV mode if this property exists or not and warn if it does not. + { + if (context._context === undefined) { + // This may be because it's a Context (rather than a Consumer). + // Or it may be because it's older React where they're the same thing. + // We only want to warn if we're sure it's a new React. + if (context !== context.Consumer) { + if (!hasWarnedAboutUsingContextAsConsumer) { + hasWarnedAboutUsingContextAsConsumer = true; + + error('Rendering directly is not supported and will be removed in ' + 'a future major release. Did you mean to render instead?'); + } + } + } else { + context = context._context; + } + } + + var render = props.children; + + { + if (typeof render !== 'function') { + error('A context consumer was rendered with multiple children, or a child ' + "that isn't a function. A context consumer expects a single child " + 'that is a function. If you did pass a function, make sure there ' + 'is no trailing or leading whitespace around it.'); + } + } + + var newValue = readContext(context); + var newChildren = render(newValue); + renderNodeDestructive(request, task, null, newChildren); +} + +function renderContextProvider(request, task, type, props) { + var context = type._context; + var value = props.value; + var children = props.children; + var prevSnapshot; + + { + prevSnapshot = task.context; + } + + task.context = pushProvider(context, value); + renderNodeDestructive(request, task, null, children); + task.context = popProvider(context); + + { + if (prevSnapshot !== task.context) { + error('Popping the context provider did not return back to the original snapshot. This is a bug in React.'); + } + } +} + +function renderLazyComponent(request, task, prevThenableState, lazyComponent, props, ref) { + pushBuiltInComponentStackInDEV(task, 'Lazy'); + var payload = lazyComponent._payload; + var init = lazyComponent._init; + var Component = init(payload); + var resolvedProps = resolveDefaultProps(Component, props); + renderElement(request, task, prevThenableState, Component, resolvedProps, ref); + popComponentStackInDEV(task); +} + +function renderOffscreen(request, task, props) { + var mode = props.mode; + + if (mode === 'hidden') ; else { + // A visible Offscreen boundary is treated exactly like a fragment: a + // pure indirection. + renderNodeDestructive(request, task, null, props.children); + } +} + +function renderElement(request, task, prevThenableState, type, props, ref) { + if (typeof type === 'function') { + if (shouldConstruct$1(type)) { + renderClassComponent(request, task, type, props); + return; + } else { + renderIndeterminateComponent(request, task, prevThenableState, type, props); + return; + } + } + + if (typeof type === 'string') { + renderHostElement(request, task, type, props); + return; + } + + switch (type) { + // LegacyHidden acts the same as a fragment. This only works because we + // currently assume that every instance of LegacyHidden is accompanied by a + // host component wrapper. In the hidden mode, the host component is given a + // `hidden` attribute, which ensures that the initial HTML is not visible. + // To support the use of LegacyHidden as a true fragment, without an extra + // DOM node, we would have to hide the initial HTML in some other way. + // TODO: Delete in LegacyHidden. It's an unstable API only used in the + // www build. As a migration step, we could add a special prop to Offscreen + // that simulates the old behavior (no hiding, no change to effects). + case REACT_LEGACY_HIDDEN_TYPE: + case REACT_DEBUG_TRACING_MODE_TYPE: + case REACT_STRICT_MODE_TYPE: + case REACT_PROFILER_TYPE: + case REACT_FRAGMENT_TYPE: + { + renderNodeDestructive(request, task, null, props.children); + return; + } + + case REACT_OFFSCREEN_TYPE: + { + renderOffscreen(request, task, props); + return; + } + + case REACT_SUSPENSE_LIST_TYPE: + { + pushBuiltInComponentStackInDEV(task, 'SuspenseList'); // TODO: SuspenseList should control the boundaries. + + renderNodeDestructive(request, task, null, props.children); + popComponentStackInDEV(task); + return; + } + + case REACT_SCOPE_TYPE: + { + + throw new Error('ReactDOMServer does not yet support scope components.'); + } + // eslint-disable-next-line-no-fallthrough + + case REACT_SUSPENSE_TYPE: + { + { + renderSuspenseBoundary(request, task, props); + } + + return; + } + } + + if (typeof type === 'object' && type !== null) { + switch (type.$$typeof) { + case REACT_FORWARD_REF_TYPE: + { + renderForwardRef(request, task, prevThenableState, type, props, ref); + return; + } + + case REACT_MEMO_TYPE: + { + renderMemo(request, task, prevThenableState, type, props, ref); + return; + } + + case REACT_PROVIDER_TYPE: + { + renderContextProvider(request, task, type, props); + return; + } + + case REACT_CONTEXT_TYPE: + { + renderContextConsumer(request, task, type, props); + return; + } + + case REACT_LAZY_TYPE: + { + renderLazyComponent(request, task, prevThenableState, type, props); + return; + } + } + } + + var info = ''; + + { + if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) { + info += ' You likely forgot to export your component from the file ' + "it's defined in, or you might have mixed up default and " + 'named imports.'; + } + } + + throw new Error('Element type is invalid: expected a string (for built-in ' + 'components) or a class/function (for composite components) ' + ("but got: " + (type == null ? type : typeof type) + "." + info)); +} + +function validateIterable(iterable, iteratorFn) { + { + // We don't support rendering Generators because it's a mutation. + // See https://github.com/facebook/react/issues/12995 + if (typeof Symbol === 'function' && // $FlowFixMe Flow doesn't know about toStringTag + iterable[Symbol.toStringTag] === 'Generator') { + if (!didWarnAboutGenerators) { + error('Using Generators as children is unsupported and will likely yield ' + 'unexpected results because enumerating a generator mutates it. ' + 'You may convert it to an array with `Array.from()` or the ' + '`[...spread]` operator before rendering. Keep in mind ' + 'you might need to polyfill these features for older browsers.'); + } + + didWarnAboutGenerators = true; + } // Warn about using Maps as children + + + if (iterable.entries === iteratorFn) { + if (!didWarnAboutMaps) { + error('Using Maps as children is not supported. ' + 'Use an array of keyed ReactElements instead.'); + } + + didWarnAboutMaps = true; + } + } +} + +function renderNodeDestructive(request, task, // The thenable state reused from the previous attempt, if any. This is almost +// always null, except when called by retryTask. +prevThenableState, node) { + { + // In Dev we wrap renderNodeDestructiveImpl in a try / catch so we can capture + // a component stack at the right place in the tree. We don't do this in renderNode + // becuase it is not called at every layer of the tree and we may lose frames + try { + return renderNodeDestructiveImpl(request, task, prevThenableState, node); + } catch (x) { + if (typeof x === 'object' && x !== null && typeof x.then === 'function') ; else { + // This is an error, stash the component stack if it is null. + lastBoundaryErrorComponentStackDev = lastBoundaryErrorComponentStackDev !== null ? lastBoundaryErrorComponentStackDev : getCurrentStackInDEV(); + } // rethrow so normal suspense logic can handle thrown value accordingly + + + throw x; + } + } +} // This function by it self renders a node and consumes the task by mutating it +// to update the current execution state. + + +function renderNodeDestructiveImpl(request, task, prevThenableState, node) { + // Stash the node we're working on. We'll pick up from this task in case + // something suspends. + task.node = node; // Handle object types + + if (typeof node === 'object' && node !== null) { + switch (node.$$typeof) { + case REACT_ELEMENT_TYPE: + { + var element = node; + var type = element.type; + var props = element.props; + var ref = element.ref; + renderElement(request, task, prevThenableState, type, props, ref); + return; + } + + case REACT_PORTAL_TYPE: + throw new Error('Portals are not currently supported by the server renderer. ' + 'Render them conditionally so that they only appear on the client render.'); + // eslint-disable-next-line-no-fallthrough + + case REACT_LAZY_TYPE: + { + var lazyNode = node; + var payload = lazyNode._payload; + var init = lazyNode._init; + var resolvedNode; + + { + try { + resolvedNode = init(payload); + } catch (x) { + if (typeof x === 'object' && x !== null && typeof x.then === 'function') { + // this Lazy initializer is suspending. push a temporary frame onto the stack so it can be + // popped off in spawnNewSuspendedTask. This aligns stack behavior between Lazy in element position + // vs Component position. We do not want the frame for Errors so we exclusively do this in + // the wakeable branch + pushBuiltInComponentStackInDEV(task, 'Lazy'); + } + + throw x; + } + } + + renderNodeDestructive(request, task, null, resolvedNode); + return; + } + } + + if (isArray(node)) { + renderChildrenArray(request, task, node); + return; + } + + var iteratorFn = getIteratorFn(node); + + if (iteratorFn) { + { + validateIterable(node, iteratorFn); + } + + var iterator = iteratorFn.call(node); + + if (iterator) { + // We need to know how many total children are in this set, so that we + // can allocate enough id slots to acommodate them. So we must exhaust + // the iterator before we start recursively rendering the children. + // TODO: This is not great but I think it's inherent to the id + // generation algorithm. + var step = iterator.next(); // If there are not entries, we need to push an empty so we start by checking that. + + if (!step.done) { + var children = []; + + do { + children.push(step.value); + step = iterator.next(); + } while (!step.done); + + renderChildrenArray(request, task, children); + return; + } + + return; + } + } // $FlowFixMe[method-unbinding] + + + var childString = Object.prototype.toString.call(node); + throw new Error("Objects are not valid as a React child (found: " + (childString === '[object Object]' ? 'object with keys {' + Object.keys(node).join(', ') + '}' : childString) + "). " + 'If you meant to render a collection of children, use an array ' + 'instead.'); + } + + if (typeof node === 'string') { + var segment = task.blockedSegment; + segment.lastPushedText = pushTextInstance$1(task.blockedSegment.chunks, node, request.responseState, segment.lastPushedText); + return; + } + + if (typeof node === 'number') { + var _segment = task.blockedSegment; + _segment.lastPushedText = pushTextInstance$1(task.blockedSegment.chunks, '' + node, request.responseState, _segment.lastPushedText); + return; + } + + { + if (typeof node === 'function') { + error('Functions are not valid as a React child. This may happen if ' + 'you return a Component instead of from render. ' + 'Or maybe you meant to call this function rather than return it.'); + } + } +} + +function renderChildrenArray(request, task, children) { + var totalChildren = children.length; + + for (var i = 0; i < totalChildren; i++) { + var prevTreeContext = task.treeContext; + task.treeContext = pushTreeContext(prevTreeContext, totalChildren, i); + + try { + // We need to use the non-destructive form so that we can safely pop back + // up and render the sibling if something suspends. + renderNode(request, task, children[i]); + } finally { + task.treeContext = prevTreeContext; + } + } +} + +function spawnNewSuspendedTask(request, task, thenableState, x) { + // Something suspended, we'll need to create a new segment and resolve it later. + var segment = task.blockedSegment; + var insertionIndex = segment.chunks.length; + var newSegment = createPendingSegment(request, insertionIndex, null, segment.formatContext, // Adopt the parent segment's leading text embed + segment.lastPushedText, // Assume we are text embedded at the trailing edge + true); + segment.children.push(newSegment); // Reset lastPushedText for current Segment since the new Segment "consumed" it + + segment.lastPushedText = false; + var newTask = createTask(request, thenableState, task.node, task.blockedBoundary, newSegment, task.abortSet, task.legacyContext, task.context, task.treeContext); + trackSuspendedWakeable(x); + + { + if (task.componentStack !== null) { + // We pop one task off the stack because the node that suspended will be tried again, + // which will add it back onto the stack. + newTask.componentStack = task.componentStack.parent; + } + } + + var ping = newTask.ping; + x.then(ping, ping); +} // This is a non-destructive form of rendering a node. If it suspends it spawns +// a new task and restores the context of this task to what it was before. + + +function renderNode(request, task, node) { + // TODO: Store segment.children.length here and reset it in case something + // suspended partially through writing something. + // Snapshot the current context in case something throws to interrupt the + // process. + var previousFormatContext = task.blockedSegment.formatContext; + var previousLegacyContext = task.legacyContext; + var previousContext = task.context; + var previousComponentStack = null; + + { + previousComponentStack = task.componentStack; + } + + try { + return renderNodeDestructive(request, task, null, node); + } catch (x) { + resetHooksState(); + + if (typeof x === 'object' && x !== null && typeof x.then === 'function') { + var thenableState = getThenableStateAfterSuspending(); + spawnNewSuspendedTask(request, task, thenableState, x); // Restore the context. We assume that this will be restored by the inner + // functions in case nothing throws so we don't use "finally" here. + + task.blockedSegment.formatContext = previousFormatContext; + task.legacyContext = previousLegacyContext; + task.context = previousContext; // Restore all active ReactContexts to what they were before. + + switchContext(previousContext); + + { + task.componentStack = previousComponentStack; + } + + return; + } else { + // Restore the context. We assume that this will be restored by the inner + // functions in case nothing throws so we don't use "finally" here. + task.blockedSegment.formatContext = previousFormatContext; + task.legacyContext = previousLegacyContext; + task.context = previousContext; // Restore all active ReactContexts to what they were before. + + switchContext(previousContext); + + { + task.componentStack = previousComponentStack; + } // We assume that we don't need the correct context. + // Let's terminate the rest of the tree and don't render any siblings. + + + throw x; + } + } +} + +function erroredTask(request, boundary, segment, error) { + // Report the error to a global handler. + var errorDigest = logRecoverableError(request, error); + + if (boundary === null) { + fatalError(request, error); + } else { + boundary.pendingTasks--; + + if (!boundary.forceClientRender) { + boundary.forceClientRender = true; + boundary.errorDigest = errorDigest; + + { + captureBoundaryErrorDetailsDev(boundary, error); + } // Regardless of what happens next, this boundary won't be displayed, + // so we can flush it, if the parent already flushed. + + + if (boundary.parentFlushed) { + // We don't have a preference where in the queue this goes since it's likely + // to error on the client anyway. However, intentionally client-rendered + // boundaries should be flushed earlier so that they can start on the client. + // We reuse the same queue for errors. + request.clientRenderedBoundaries.push(boundary); + } + } + } + + request.allPendingTasks--; + + if (request.allPendingTasks === 0) { + var onAllReady = request.onAllReady; + onAllReady(); + } +} + +function abortTaskSoft(task) { + // This aborts task without aborting the parent boundary that it blocks. + // It's used for when we didn't need this task to complete the tree. + // If task was needed, then it should use abortTask instead. + var request = this; + var boundary = task.blockedBoundary; + var segment = task.blockedSegment; + segment.status = ABORTED; + finishedTask(request, boundary, segment); +} + +function abortTask(task, request, error) { + // This aborts the task and aborts the parent that it blocks, putting it into + // client rendered mode. + var boundary = task.blockedBoundary; + var segment = task.blockedSegment; + segment.status = ABORTED; + + if (boundary === null) { + request.allPendingTasks--; // We didn't complete the root so we have nothing to show. We can close + // the request; + + if (request.status !== CLOSING && request.status !== CLOSED) { + logRecoverableError(request, error); + fatalError(request, error); + } + } else { + boundary.pendingTasks--; + + if (!boundary.forceClientRender) { + boundary.forceClientRender = true; + boundary.errorDigest = request.onError(error); + + { + var errorPrefix = 'The server did not finish this Suspense boundary: '; + var errorMessage; + + if (error && typeof error.message === 'string') { + errorMessage = errorPrefix + error.message; + } else { + // eslint-disable-next-line react-internal/safe-string-coercion + errorMessage = errorPrefix + String(error); + } + + var previousTaskInDev = currentTaskInDEV; + currentTaskInDEV = task; + + try { + captureBoundaryErrorDetailsDev(boundary, errorMessage); + } finally { + currentTaskInDEV = previousTaskInDev; + } + } + + if (boundary.parentFlushed) { + request.clientRenderedBoundaries.push(boundary); + } + } // If this boundary was still pending then we haven't already cancelled its fallbacks. + // We'll need to abort the fallbacks, which will also error that parent boundary. + + + boundary.fallbackAbortableTasks.forEach(function (fallbackTask) { + return abortTask(fallbackTask, request, error); + }); + boundary.fallbackAbortableTasks.clear(); + request.allPendingTasks--; + + if (request.allPendingTasks === 0) { + var onAllReady = request.onAllReady; + onAllReady(); + } + } +} + +function queueCompletedSegment(boundary, segment) { + if (segment.chunks.length === 0 && segment.children.length === 1 && segment.children[0].boundary === null) { + // This is an empty segment. There's nothing to write, so we can instead transfer the ID + // to the child. That way any existing references point to the child. + var childSegment = segment.children[0]; + childSegment.id = segment.id; + childSegment.parentFlushed = true; + + if (childSegment.status === COMPLETED) { + queueCompletedSegment(boundary, childSegment); + } + } else { + var completedSegments = boundary.completedSegments; + completedSegments.push(segment); + } +} + +function finishedTask(request, boundary, segment) { + if (boundary === null) { + if (segment.parentFlushed) { + if (request.completedRootSegment !== null) { + throw new Error('There can only be one root segment. This is a bug in React.'); + } + + request.completedRootSegment = segment; + } + + request.pendingRootTasks--; + + if (request.pendingRootTasks === 0) { + // We have completed the shell so the shell can't error anymore. + request.onShellError = noop$1; + var onShellReady = request.onShellReady; + onShellReady(); + } + } else { + boundary.pendingTasks--; + + if (boundary.forceClientRender) ; else if (boundary.pendingTasks === 0) { + // This must have been the last segment we were waiting on. This boundary is now complete. + if (segment.parentFlushed) { + // Our parent segment already flushed, so we need to schedule this segment to be emitted. + // If it is a segment that was aborted, we'll write other content instead so we don't need + // to emit it. + if (segment.status === COMPLETED) { + queueCompletedSegment(boundary, segment); + } + } + + { + hoistCompletedBoundaryResources(request, boundary); + } + + if (boundary.parentFlushed) { + // The segment might be part of a segment that didn't flush yet, but if the boundary's + // parent flushed, we need to schedule the boundary to be emitted. + request.completedBoundaries.push(boundary); + } // We can now cancel any pending task on the fallback since we won't need to show it anymore. + // This needs to happen after we read the parentFlushed flags because aborting can finish + // work which can trigger user code, which can start flushing, which can change those flags. + + + boundary.fallbackAbortableTasks.forEach(abortTaskSoft, request); + boundary.fallbackAbortableTasks.clear(); + } else { + if (segment.parentFlushed) { + // Our parent already flushed, so we need to schedule this segment to be emitted. + // If it is a segment that was aborted, we'll write other content instead so we don't need + // to emit it. + if (segment.status === COMPLETED) { + queueCompletedSegment(boundary, segment); + var completedSegments = boundary.completedSegments; + + if (completedSegments.length === 1) { + // This is the first time since we last flushed that we completed anything. + // We can schedule this boundary to emit its partially completed segments early + // in case the parent has already been flushed. + if (boundary.parentFlushed) { + request.partialBoundaries.push(boundary); + } + } + } + } + } + } + + request.allPendingTasks--; + + if (request.allPendingTasks === 0) { + // This needs to be called at the very end so that we can synchronously write the result + // in the callback if needed. + var onAllReady = request.onAllReady; + onAllReady(); + } +} + +function retryTask(request, task) { + { + var blockedBoundary = task.blockedBoundary; + setCurrentlyRenderingBoundaryResourcesTarget(request.resources, blockedBoundary ? blockedBoundary.resources : null); + } + + var segment = task.blockedSegment; + + if (segment.status !== PENDING) { + // We completed this by other means before we had a chance to retry it. + return; + } // We restore the context to what it was when we suspended. + // We don't restore it after we leave because it's likely that we'll end up + // needing a very similar context soon again. + + + switchContext(task.context); + var prevTaskInDEV = null; + + { + prevTaskInDEV = currentTaskInDEV; + currentTaskInDEV = task; + } + + try { + // We call the destructive form that mutates this task. That way if something + // suspends again, we can reuse the same task instead of spawning a new one. + // Reset the task's thenable state before continuing, so that if a later + // component suspends we can reuse the same task object. If the same + // component suspends again, the thenable state will be restored. + var prevThenableState = task.thenableState; + task.thenableState = null; + renderNodeDestructive(request, task, prevThenableState, task.node); + pushSegmentFinale$1(segment.chunks, request.responseState, segment.lastPushedText, segment.textEmbedded); + task.abortSet.delete(task); + segment.status = COMPLETED; + finishedTask(request, task.blockedBoundary, segment); + } catch (x) { + resetHooksState(); + + if (typeof x === 'object' && x !== null && typeof x.then === 'function') { + // Something suspended again, let's pick it back up later. + var ping = task.ping; + x.then(ping, ping); + var wakeable = x; + trackSuspendedWakeable(wakeable); + task.thenableState = getThenableStateAfterSuspending(); + } else { + task.abortSet.delete(task); + segment.status = ERRORED; + erroredTask(request, task.blockedBoundary, segment, x); + } + } finally { + { + setCurrentlyRenderingBoundaryResourcesTarget(request.resources, null); + } + + { + currentTaskInDEV = prevTaskInDEV; + } + } +} + +function performWork(request) { + if (request.status === CLOSED) { + return; + } + + var prevContext = getActiveContext(); + var prevDispatcher = ReactCurrentDispatcher$1.current; + ReactCurrentDispatcher$1.current = HooksDispatcher; + var prevCacheDispatcher; + + { + prevCacheDispatcher = ReactCurrentCache.current; + ReactCurrentCache.current = DefaultCacheDispatcher; + } + + var previousHostDispatcher = prepareToRender(request.resources); + var prevGetCurrentStackImpl; + + { + prevGetCurrentStackImpl = ReactDebugCurrentFrame$1.getCurrentStack; + ReactDebugCurrentFrame$1.getCurrentStack = getCurrentStackInDEV; + } + + var prevResponseState = currentResponseState; + setCurrentResponseState(request.responseState); + + try { + var pingedTasks = request.pingedTasks; + var i; + + for (i = 0; i < pingedTasks.length; i++) { + var task = pingedTasks[i]; + retryTask(request, task); + } + + pingedTasks.splice(0, i); + + if (request.destination !== null) { + flushCompletedQueues(request, request.destination); + } + } catch (error) { + logRecoverableError(request, error); + fatalError(request, error); + } finally { + setCurrentResponseState(prevResponseState); + ReactCurrentDispatcher$1.current = prevDispatcher; + + { + ReactCurrentCache.current = prevCacheDispatcher; + } + + cleanupAfterRender(previousHostDispatcher); + + { + ReactDebugCurrentFrame$1.getCurrentStack = prevGetCurrentStackImpl; + } + + if (prevDispatcher === HooksDispatcher) { + // This means that we were in a reentrant work loop. This could happen + // in a renderer that supports synchronous work like renderToString, + // when it's called from within another renderer. + // Normally we don't bother switching the contexts to their root/default + // values when leaving because we'll likely need the same or similar + // context again. However, when we're inside a synchronous loop like this + // we'll to restore the context to what it was before returning. + switchContext(prevContext); + } + } +} + +function flushSubtree(request, destination, segment) { + segment.parentFlushed = true; + + switch (segment.status) { + case PENDING: + { + // We're emitting a placeholder for this segment to be filled in later. + // Therefore we'll need to assign it an ID - to refer to it by. + var segmentID = segment.id = request.nextSegmentId++; // When this segment finally completes it won't be embedded in text since it will flush separately + + segment.lastPushedText = false; + segment.textEmbedded = false; + return writePlaceholder(destination, request.responseState, segmentID); + } + + case COMPLETED: + { + segment.status = FLUSHED; + var r = true; + var chunks = segment.chunks; + var chunkIdx = 0; + var children = segment.children; + + for (var childIdx = 0; childIdx < children.length; childIdx++) { + var nextChild = children[childIdx]; // Write all the chunks up until the next child. + + for (; chunkIdx < nextChild.index; chunkIdx++) { + writeChunk(destination, chunks[chunkIdx]); + } + + r = flushSegment(request, destination, nextChild); + } // Finally just write all the remaining chunks + + + for (; chunkIdx < chunks.length - 1; chunkIdx++) { + writeChunk(destination, chunks[chunkIdx]); + } + + if (chunkIdx < chunks.length) { + r = writeChunkAndReturn(destination, chunks[chunkIdx]); + } + + return r; + } + + default: + { + throw new Error('Aborted, errored or already flushed boundaries should not be flushed again. This is a bug in React.'); + } + } +} + +function flushSegment(request, destination, segment) { + var boundary = segment.boundary; + + if (boundary === null) { + // Not a suspense boundary. + return flushSubtree(request, destination, segment); + } + + boundary.parentFlushed = true; // This segment is a Suspense boundary. We need to decide whether to + // emit the content or the fallback now. + + if (boundary.forceClientRender) { + // Emit a client rendered suspense boundary wrapper. + // We never queue the inner boundary so we'll never emit its content or partial segments. + writeStartClientRenderedSuspenseBoundary$1(destination, request.responseState, boundary.errorDigest, boundary.errorMessage, boundary.errorComponentStack); // Flush the fallback. + + flushSubtree(request, destination, segment); + return writeEndClientRenderedSuspenseBoundary$1(destination, request.responseState); + } else if (boundary.pendingTasks > 0) { + // This boundary is still loading. Emit a pending suspense boundary wrapper. + // Assign an ID to refer to the future content by. + boundary.rootSegmentID = request.nextSegmentId++; + + if (boundary.completedSegments.length > 0) { + // If this is at least partially complete, we can queue it to be partially emitted early. + request.partialBoundaries.push(boundary); + } /// This is the first time we should have referenced this ID. + + + var id = boundary.id = assignSuspenseBoundaryID(request.responseState); + writeStartPendingSuspenseBoundary(destination, request.responseState, id); // Flush the fallback. + + flushSubtree(request, destination, segment); + return writeEndPendingSuspenseBoundary(destination, request.responseState); + } else if (boundary.byteSize > request.progressiveChunkSize) { + // This boundary is large and will be emitted separately so that we can progressively show + // other content. We add it to the queue during the flush because we have to ensure that + // the parent flushes first so that there's something to inject it into. + // We also have to make sure that it's emitted into the queue in a deterministic slot. + // I.e. we can't insert it here when it completes. + // Assign an ID to refer to the future content by. + boundary.rootSegmentID = request.nextSegmentId++; + request.completedBoundaries.push(boundary); // Emit a pending rendered suspense boundary wrapper. + + writeStartPendingSuspenseBoundary(destination, request.responseState, boundary.id); // Flush the fallback. + + flushSubtree(request, destination, segment); + return writeEndPendingSuspenseBoundary(destination, request.responseState); + } else { + { + hoistResources(request.resources, boundary.resources); + } // We can inline this boundary's content as a complete boundary. + + + writeStartCompletedSuspenseBoundary$1(destination, request.responseState); + var completedSegments = boundary.completedSegments; + + if (completedSegments.length !== 1) { + throw new Error('A previously unvisited boundary must have exactly one root segment. This is a bug in React.'); + } + + var contentSegment = completedSegments[0]; + flushSegment(request, destination, contentSegment); + return writeEndCompletedSuspenseBoundary$1(destination, request.responseState); + } +} + +function flushInitialResources(destination, resources, responseState) { + writeInitialResources(destination, resources, responseState); +} + +function flushImmediateResources(destination, request) { + writeImmediateResources(destination, request.resources, request.responseState); +} + +function flushClientRenderedBoundary(request, destination, boundary) { + return writeClientRenderBoundaryInstruction(destination, request.responseState, boundary.id, boundary.errorDigest, boundary.errorMessage, boundary.errorComponentStack); +} + +function flushSegmentContainer(request, destination, segment) { + writeStartSegment(destination, request.responseState, segment.formatContext, segment.id); + flushSegment(request, destination, segment); + return writeEndSegment(destination, segment.formatContext); +} + +function flushCompletedBoundary(request, destination, boundary) { + { + setCurrentlyRenderingBoundaryResourcesTarget(request.resources, boundary.resources); + } + + var completedSegments = boundary.completedSegments; + var i = 0; + + for (; i < completedSegments.length; i++) { + var segment = completedSegments[i]; + flushPartiallyCompletedSegment(request, destination, boundary, segment); + } + + completedSegments.length = 0; + return writeCompletedBoundaryInstruction(destination, request.responseState, boundary.id, boundary.rootSegmentID, boundary.resources); +} + +function flushPartialBoundary(request, destination, boundary) { + { + setCurrentlyRenderingBoundaryResourcesTarget(request.resources, boundary.resources); + } + + var completedSegments = boundary.completedSegments; + var i = 0; + + for (; i < completedSegments.length; i++) { + var segment = completedSegments[i]; + + if (!flushPartiallyCompletedSegment(request, destination, boundary, segment)) { + i++; + completedSegments.splice(0, i); // Only write as much as the buffer wants. Something higher priority + // might want to write later. + + return false; + } + } + + completedSegments.splice(0, i); + return true; +} + +function flushPartiallyCompletedSegment(request, destination, boundary, segment) { + if (segment.status === FLUSHED) { + // We've already flushed this inline. + return true; + } + + var segmentID = segment.id; + + if (segmentID === -1) { + // This segment wasn't previously referred to. This happens at the root of + // a boundary. We make kind of a leap here and assume this is the root. + var rootSegmentID = segment.id = boundary.rootSegmentID; + + if (rootSegmentID === -1) { + throw new Error('A root segment ID must have been assigned by now. This is a bug in React.'); + } + + return flushSegmentContainer(request, destination, segment); + } else { + flushSegmentContainer(request, destination, segment); + return writeCompletedSegmentInstruction(destination, request.responseState, segmentID); + } +} + +function flushCompletedQueues(request, destination) { + + try { + // The structure of this is to go through each queue one by one and write + // until the sink tells us to stop. When we should stop, we still finish writing + // that item fully and then yield. At that point we remove the already completed + // items up until the point we completed them. + var i; + var completedRootSegment = request.completedRootSegment; + + if (completedRootSegment !== null) { + if (request.pendingRootTasks === 0) { + if (enableFloat) { + var preamble = request.preamble; + + for (i = 0; i < preamble.length; i++) { + // we expect the preamble to be tiny and will ignore backpressure + writeChunk(destination, preamble[i]); + } + + flushInitialResources(destination, request.resources, request.responseState); + } + + flushSegment(request, destination, completedRootSegment); + request.completedRootSegment = null; + writeCompletedRoot(destination, request.responseState); + } else { + // We haven't flushed the root yet so we don't need to check any other branches further down + return; + } + } else if (enableFloat) { + flushImmediateResources(destination, request); + } // We emit client rendering instructions for already emitted boundaries first. + // This is so that we can signal to the client to start client rendering them as + // soon as possible. + + + var clientRenderedBoundaries = request.clientRenderedBoundaries; + + for (i = 0; i < clientRenderedBoundaries.length; i++) { + var boundary = clientRenderedBoundaries[i]; + + if (!flushClientRenderedBoundary(request, destination, boundary)) { + request.destination = null; + i++; + clientRenderedBoundaries.splice(0, i); + return; + } + } + + clientRenderedBoundaries.splice(0, i); // Next we emit any complete boundaries. It's better to favor boundaries + // that are completely done since we can actually show them, than it is to emit + // any individual segments from a partially complete boundary. + + var completedBoundaries = request.completedBoundaries; + + for (i = 0; i < completedBoundaries.length; i++) { + var _boundary = completedBoundaries[i]; + + if (!flushCompletedBoundary(request, destination, _boundary)) { + request.destination = null; + i++; + completedBoundaries.splice(0, i); + return; + } + } + + completedBoundaries.splice(0, i); // Allow anything written so far to flush to the underlying sink before + // we continue with lower priorities. + + completeWriting(destination); + beginWriting(destination); // TODO: Here we'll emit data used by hydration. + // Next we emit any segments of any boundaries that are partially complete + // but not deeply complete. + + var partialBoundaries = request.partialBoundaries; + + for (i = 0; i < partialBoundaries.length; i++) { + var _boundary2 = partialBoundaries[i]; + + if (!flushPartialBoundary(request, destination, _boundary2)) { + request.destination = null; + i++; + partialBoundaries.splice(0, i); + return; + } + } + + partialBoundaries.splice(0, i); // Next we check the completed boundaries again. This may have had + // boundaries added to it in case they were too larged to be inlined. + // New ones might be added in this loop. + + var largeBoundaries = request.completedBoundaries; + + for (i = 0; i < largeBoundaries.length; i++) { + var _boundary3 = largeBoundaries[i]; + + if (!flushCompletedBoundary(request, destination, _boundary3)) { + request.destination = null; + i++; + largeBoundaries.splice(0, i); + return; + } + } + + largeBoundaries.splice(0, i); + } finally { + if (request.allPendingTasks === 0 && request.pingedTasks.length === 0 && request.clientRenderedBoundaries.length === 0 && request.completedBoundaries.length === 0 // We don't need to check any partially completed segments because + // either they have pending task or they're complete. + ) { + { + var postamble = request.postamble; + + for (var _i = 0; _i < postamble.length; _i++) { + writeChunk(destination, postamble[_i]); + } + } + + { + if (request.abortableTasks.size !== 0) { + error('There was still abortable task at the root when we closed. This is a bug in React.'); + } + } // We're done. + + + close(destination); + } + } +} + +function startWork(request) { + scheduleWork(function () { + return performWork(request); + }); +} +function startFlowing(request, destination) { + if (request.status === CLOSING) { + request.status = CLOSED; + closeWithError(destination, request.fatalError); + return; + } + + if (request.status === CLOSED) { + return; + } + + if (request.destination !== null) { + // We're already flowing. + return; + } + + request.destination = destination; + + try { + flushCompletedQueues(request, destination); + } catch (error) { + logRecoverableError(request, error); + fatalError(request, error); + } +} // This is called to early terminate a request. It puts all pending boundaries in client rendered state. + +function abort(request, reason) { + try { + var abortableTasks = request.abortableTasks; + + if (abortableTasks.size > 0) { + var _error = reason === undefined ? new Error('The render was aborted by the server without a reason.') : reason; + + abortableTasks.forEach(function (task) { + return abortTask(task, request, _error); + }); + abortableTasks.clear(); + } + + if (request.destination !== null) { + flushCompletedQueues(request, request.destination); + } + } catch (error) { + logRecoverableError(request, error); + fatalError(request, error); + } +} + +function onError() {// Non-fatal errors are ignored. +} + +function renderToStringImpl(children, options, generateStaticMarkup, abortReason) { + var didFatal = false; + var fatalError = null; + var result = ''; + var destination = { + push: function (chunk) { + if (chunk !== null) { + result += chunk; + } + + return true; + }, + destroy: function (error) { + didFatal = true; + fatalError = error; + } + }; + var readyToStream = false; + + function onShellReady() { + readyToStream = true; + } + + var request = createRequest(children, createResponseState$1(generateStaticMarkup, options ? options.identifierPrefix : undefined), createRootFormatContext(), Infinity, onError, undefined, onShellReady, undefined, undefined); + startWork(request); // If anything suspended and is still pending, we'll abort it before writing. + // That way we write only client-rendered boundaries from the start. + + abort(request, abortReason); + startFlowing(request, destination); + + if (didFatal && fatalError !== abortReason) { + throw fatalError; + } + + if (!readyToStream) { + // Note: This error message is the one we use on the client. It doesn't + // really make sense here. But this is the legacy server renderer, anyway. + // We're going to delete it soon. + throw new Error('A component suspended while responding to synchronous input. This ' + 'will cause the UI to be replaced with a loading indicator. To fix, ' + 'updates that suspend should be wrapped with startTransition.'); + } + + return result; +} + +function renderToString(children, options) { + return renderToStringImpl(children, options, false, 'The server used "renderToString" which does not support Suspense. If you intended for this Suspense boundary to render the fallback content on the server consider throwing an Error somewhere within the Suspense boundary. If you intended to have the server wait for the suspended component please switch to "renderToReadableStream" which supports Suspense on the server'); +} + +function renderToStaticMarkup(children, options) { + return renderToStringImpl(children, options, true, 'The server used "renderToStaticMarkup" which does not support Suspense. If you intended to have the server wait for the suspended component please switch to "renderToReadableStream" which supports Suspense on the server'); +} + +function renderToNodeStream() { + throw new Error('ReactDOMServer.renderToNodeStream(): The streaming API is not available ' + 'in the browser. Use ReactDOMServer.renderToString() instead.'); +} + +function renderToStaticNodeStream() { + throw new Error('ReactDOMServer.renderToStaticNodeStream(): The streaming API is not available ' + 'in the browser. Use ReactDOMServer.renderToStaticMarkup() instead.'); +} + +exports.renderToNodeStream = renderToNodeStream; +exports.renderToStaticMarkup = renderToStaticMarkup; +exports.renderToStaticNodeStream = renderToStaticNodeStream; +exports.renderToString = renderToString; +exports.version = ReactVersion; + })(); +} diff --git a/packages/next/compiled/react-dom/cjs/react-dom-server-legacy.browser.production.min.js b/packages/next/compiled/react-dom/cjs/react-dom-server-legacy.browser.production.min.js new file mode 100644 index 00000000000000..6fcd87364e750a --- /dev/null +++ b/packages/next/compiled/react-dom/cjs/react-dom-server-legacy.browser.production.min.js @@ -0,0 +1,113 @@ +/** + * @license React + * react-dom-server-legacy.browser.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ +'use strict';var aa=require("react"),ba=require("react-dom");function m(a){for(var b="https://reactjs.org/docs/error-decoder.html?invariant="+a,c=1;c