@scrabble-solver/scrabble-solver 2.15.15 → 2.15.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (200) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/build-manifest.json +29 -28
  3. package/.next/cache/.previewinfo +1 -1
  4. package/.next/cache/.rscinfo +1 -1
  5. package/.next/cache/.tsbuildinfo +1 -1
  6. package/.next/cache/webpack/client-production/0.pack +0 -0
  7. package/.next/cache/webpack/client-production/index.pack +0 -0
  8. package/.next/cache/webpack/client-production/index.pack.old +0 -0
  9. package/.next/cache/webpack/edge-server-production/0.pack +0 -0
  10. package/.next/cache/webpack/edge-server-production/index.pack +0 -0
  11. package/.next/cache/webpack/edge-server-production/index.pack.old +0 -0
  12. package/.next/cache/webpack/server-production/0.pack +0 -0
  13. package/.next/cache/webpack/server-production/index.pack +0 -0
  14. package/.next/cache/webpack/server-production/index.pack.old +0 -0
  15. package/.next/diagnostics/build-diagnostics.json +1 -1
  16. package/.next/diagnostics/framework.json +1 -1
  17. package/.next/next-minimal-server.js.nft.json +1 -1
  18. package/.next/next-server.js.nft.json +1 -1
  19. package/.next/prerender-manifest.json +4 -4
  20. package/.next/required-server-files.json +4 -30
  21. package/.next/routes-manifest.json +1 -1
  22. package/.next/server/chunks/30.js +6 -0
  23. package/.next/server/chunks/318.js +3 -0
  24. package/.next/server/chunks/392.js +1 -0
  25. package/.next/server/chunks/671.js +1 -0
  26. package/.next/server/chunks/712.js +1 -0
  27. package/.next/server/chunks/791.js +19 -0
  28. package/.next/server/chunks/812.js +1 -0
  29. package/.next/server/dynamic-css-manifest.js +1 -0
  30. package/.next/server/middleware-build-manifest.js +1 -40
  31. package/.next/server/middleware-manifest.json +2 -2
  32. package/.next/server/middleware-react-loadable-manifest.js +1 -0
  33. package/.next/server/next-font-manifest.js +1 -1
  34. package/.next/server/next-font-manifest.json +1 -6
  35. package/.next/server/pages/404.html +1 -1
  36. package/.next/server/pages/500.html +1 -1
  37. package/.next/server/pages/_app.js +1 -6
  38. package/.next/server/pages/_app.js.nft.json +1 -1
  39. package/.next/server/pages/_document.js +1 -5
  40. package/.next/server/pages/_document.js.nft.json +1 -1
  41. package/.next/server/pages/_error.js +1 -10
  42. package/.next/server/pages/_error.js.nft.json +1 -1
  43. package/.next/server/pages/api/dictionary/[locale]/[word].js +2 -8
  44. package/.next/server/pages/api/dictionary/[locale]/[word].js.nft.json +1 -1
  45. package/.next/server/pages/api/dictionary/[locale].js +1 -6
  46. package/.next/server/pages/api/dictionary/[locale].js.nft.json +1 -1
  47. package/.next/server/pages/api/solve.js +1 -8
  48. package/.next/server/pages/api/solve.js.nft.json +1 -1
  49. package/.next/server/pages/api/verify.js +1 -7
  50. package/.next/server/pages/api/verify.js.nft.json +1 -1
  51. package/.next/server/pages/api/visit.js +1 -5
  52. package/.next/server/pages/api/visit.js.nft.json +1 -1
  53. package/.next/server/pages/index.html +1 -1
  54. package/.next/server/pages/index.js +1 -11
  55. package/.next/server/pages/index.js.nft.json +1 -1
  56. package/.next/server/pages/index.json +1 -1
  57. package/.next/server/pages/not-found.html +1 -1
  58. package/.next/server/pages/not-found.js.nft.json +1 -1
  59. package/.next/server/pages-manifest.json +5 -5
  60. package/.next/server/webpack-api-runtime.js +1 -0
  61. package/.next/server/webpack-runtime.js +1 -0
  62. package/.next/static/JsuHKQsDCNm7ddeBFmAGT/_buildManifest.js +1 -0
  63. package/.next/static/chunks/framework-07e31bfe438047c5.js +1 -0
  64. package/.next/static/chunks/main-5ae82999af4e5667.js +5 -0
  65. package/.next/static/chunks/pages/_app-34d868ee8cde5436.js +3 -0
  66. package/.next/static/chunks/pages/_error-afeda7c5231b6c3c.js +1 -0
  67. package/.next/static/chunks/pages/index-a23a3a272e535225.js +1 -0
  68. package/.next/static/chunks/pages/not-found-9e076427bad69d90.js +1 -0
  69. package/.next/static/chunks/polyfills-42372ed130431b0a.js +1 -0
  70. package/.next/static/chunks/webpack-06b4b4da58317e44.js +1 -0
  71. package/.next/static/css/500cdc9a24075d91.css +2 -0
  72. package/.next/static/css/addf6fd4f75742d0.css +1 -0
  73. package/.next/trace +21 -1
  74. package/.next/trace-build +1 -1
  75. package/next.config.js +19 -20
  76. package/package.json +14 -17
  77. package/.next/build/chunks/[root-of-the-server]__6e020478._.js +0 -441
  78. package/.next/build/chunks/[root-of-the-server]__6e020478._.js.map +0 -7
  79. package/.next/build/chunks/[root-of-the-server]__c7ae8543._.js +0 -500
  80. package/.next/build/chunks/[root-of-the-server]__c7ae8543._.js.map +0 -11
  81. package/.next/build/chunks/[turbopack-node]_transforms_webpack-loaders_ts_c84aa21a._.js +0 -12
  82. package/.next/build/chunks/[turbopack-node]_transforms_webpack-loaders_ts_c84aa21a._.js.map +0 -5
  83. package/.next/build/chunks/[turbopack]_runtime.js +0 -770
  84. package/.next/build/chunks/[turbopack]_runtime.js.map +0 -10
  85. package/.next/build/package.json +0 -1
  86. package/.next/build/webpack-loaders.js +0 -6
  87. package/.next/build/webpack-loaders.js.map +0 -5
  88. package/.next/fallback-build-manifest.json +0 -24
  89. package/.next/server/app-paths-manifest.json +0 -1
  90. package/.next/server/chunks/[root-of-the-server]__378b5933._.js +0 -3
  91. package/.next/server/chunks/[root-of-the-server]__378b5933._.js.map +0 -1
  92. package/.next/server/chunks/[root-of-the-server]__51a21f60._.js +0 -3
  93. package/.next/server/chunks/[root-of-the-server]__51a21f60._.js.map +0 -1
  94. package/.next/server/chunks/[root-of-the-server]__53eb4a3b._.js +0 -4
  95. package/.next/server/chunks/[root-of-the-server]__53eb4a3b._.js.map +0 -1
  96. package/.next/server/chunks/[root-of-the-server]__7e4e99cd._.js +0 -3
  97. package/.next/server/chunks/[root-of-the-server]__7e4e99cd._.js.map +0 -1
  98. package/.next/server/chunks/[root-of-the-server]__a6a82e19._.js +0 -3
  99. package/.next/server/chunks/[root-of-the-server]__a6a82e19._.js.map +0 -1
  100. package/.next/server/chunks/[root-of-the-server]__a84df743._.js +0 -3
  101. package/.next/server/chunks/[root-of-the-server]__a84df743._.js.map +0 -1
  102. package/.next/server/chunks/[root-of-the-server]__a99303dc._.js +0 -3
  103. package/.next/server/chunks/[root-of-the-server]__a99303dc._.js.map +0 -1
  104. package/.next/server/chunks/[root-of-the-server]__bfa4320b._.js +0 -3
  105. package/.next/server/chunks/[root-of-the-server]__bfa4320b._.js.map +0 -1
  106. package/.next/server/chunks/[turbopack]_runtime.js +0 -770
  107. package/.next/server/chunks/[turbopack]_runtime.js.map +0 -10
  108. package/.next/server/chunks/scrabble-solver_b903dbba._.js +0 -3
  109. package/.next/server/chunks/scrabble-solver_b903dbba._.js.map +0 -1
  110. package/.next/server/chunks/scrabble-solver_packages_configs_build_5accd600._.js +0 -3
  111. package/.next/server/chunks/scrabble-solver_packages_configs_build_5accd600._.js.map +0 -1
  112. package/.next/server/chunks/ssr/1b834_next_d69de9fa._.js +0 -3
  113. package/.next/server/chunks/ssr/1b834_next_d69de9fa._.js.map +0 -1
  114. package/.next/server/chunks/ssr/[externals]_fs_54ffce70._.js +0 -3
  115. package/.next/server/chunks/ssr/[externals]_fs_54ffce70._.js.map +0 -1
  116. package/.next/server/chunks/ssr/[externals]_transliteration_b8916dda._.js +0 -3
  117. package/.next/server/chunks/ssr/[externals]_transliteration_b8916dda._.js.map +0 -1
  118. package/.next/server/chunks/ssr/[root-of-the-server]__1115f13a._.js +0 -3
  119. package/.next/server/chunks/ssr/[root-of-the-server]__1115f13a._.js.map +0 -1
  120. package/.next/server/chunks/ssr/[root-of-the-server]__421f2b10._.js +0 -3
  121. package/.next/server/chunks/ssr/[root-of-the-server]__421f2b10._.js.map +0 -1
  122. package/.next/server/chunks/ssr/[root-of-the-server]__b87cf431._.js +0 -3
  123. package/.next/server/chunks/ssr/[root-of-the-server]__b87cf431._.js.map +0 -1
  124. package/.next/server/chunks/ssr/[root-of-the-server]__bdcde4df._.js +0 -5
  125. package/.next/server/chunks/ssr/[root-of-the-server]__bdcde4df._.js.map +0 -1
  126. package/.next/server/chunks/ssr/[root-of-the-server]__c803ce2b._.js +0 -3
  127. package/.next/server/chunks/ssr/[root-of-the-server]__c803ce2b._.js.map +0 -1
  128. package/.next/server/chunks/ssr/[turbopack]_runtime.js +0 -770
  129. package/.next/server/chunks/ssr/[turbopack]_runtime.js.map +0 -10
  130. package/.next/server/chunks/ssr/scrabble-solver_1bf76a93._.js +0 -3
  131. package/.next/server/chunks/ssr/scrabble-solver_1bf76a93._.js.map +0 -1
  132. package/.next/server/chunks/ssr/scrabble-solver_a6d23152._.js +0 -8
  133. package/.next/server/chunks/ssr/scrabble-solver_a6d23152._.js.map +0 -1
  134. package/.next/server/chunks/ssr/scrabble-solver_packages_scrabble-solver_src_i18n_languages_1f0474f1._.js +0 -3
  135. package/.next/server/chunks/ssr/scrabble-solver_packages_scrabble-solver_src_i18n_languages_1f0474f1._.js.map +0 -1
  136. package/.next/server/pages/_app/build-manifest.json +0 -18
  137. package/.next/server/pages/_app/client-build-manifest.json +0 -5
  138. package/.next/server/pages/_app/next-font-manifest.json +0 -6
  139. package/.next/server/pages/_app/pages-manifest.json +0 -3
  140. package/.next/server/pages/_app.js.map +0 -5
  141. package/.next/server/pages/_document/next-font-manifest.json +0 -6
  142. package/.next/server/pages/_document/pages-manifest.json +0 -3
  143. package/.next/server/pages/_document/react-loadable-manifest.json +0 -1
  144. package/.next/server/pages/_document.js.map +0 -5
  145. package/.next/server/pages/_error/build-manifest.json +0 -15
  146. package/.next/server/pages/_error/client-build-manifest.json +0 -5
  147. package/.next/server/pages/_error/next-font-manifest.json +0 -6
  148. package/.next/server/pages/_error/pages-manifest.json +0 -3
  149. package/.next/server/pages/_error/react-loadable-manifest.json +0 -1
  150. package/.next/server/pages/_error.js.map +0 -5
  151. package/.next/server/pages/api/dictionary/[locale]/[word]/pages-manifest.json +0 -3
  152. package/.next/server/pages/api/dictionary/[locale]/[word].js.map +0 -5
  153. package/.next/server/pages/api/dictionary/[locale]/pages-manifest.json +0 -3
  154. package/.next/server/pages/api/dictionary/[locale].js.map +0 -5
  155. package/.next/server/pages/api/solve/pages-manifest.json +0 -3
  156. package/.next/server/pages/api/solve.js.map +0 -5
  157. package/.next/server/pages/api/verify/pages-manifest.json +0 -3
  158. package/.next/server/pages/api/verify.js.map +0 -5
  159. package/.next/server/pages/api/visit/pages-manifest.json +0 -3
  160. package/.next/server/pages/api/visit.js.map +0 -5
  161. package/.next/server/pages/index/build-manifest.json +0 -18
  162. package/.next/server/pages/index/client-build-manifest.json +0 -5
  163. package/.next/server/pages/index/next-font-manifest.json +0 -6
  164. package/.next/server/pages/index/pages-manifest.json +0 -3
  165. package/.next/server/pages/index/react-loadable-manifest.json +0 -1
  166. package/.next/server/pages/index.js.map +0 -5
  167. package/.next/server/pages/not-found/build-manifest.json +0 -17
  168. package/.next/server/pages/not-found/client-build-manifest.json +0 -5
  169. package/.next/server/pages/not-found/next-font-manifest.json +0 -6
  170. package/.next/server/pages/not-found/pages-manifest.json +0 -3
  171. package/.next/server/pages/not-found/react-loadable-manifest.json +0 -1
  172. package/.next/server/pages/not-found.js.map +0 -5
  173. package/.next/server/server-reference-manifest.js +0 -1
  174. package/.next/server/server-reference-manifest.json +0 -5
  175. package/.next/static/7kzTSHcrJ7tE47btIJcLO/_buildManifest.js +0 -27
  176. package/.next/static/chunks/060b82a3f336704f.js +0 -3
  177. package/.next/static/chunks/18159e87dc14f3cf.js +0 -1
  178. package/.next/static/chunks/27692b9d65f8b241.js +0 -8
  179. package/.next/static/chunks/2f5ae49118c8c86e.js +0 -1
  180. package/.next/static/chunks/339ed8704781040d.js +0 -5
  181. package/.next/static/chunks/3c8b810de7908416.js +0 -3
  182. package/.next/static/chunks/50e709cb7765c2f9.js +0 -1
  183. package/.next/static/chunks/69fdc9801e177051.js +0 -1
  184. package/.next/static/chunks/77bd0d5f1fb6eeba.js +0 -3
  185. package/.next/static/chunks/88b0985f454c1075.js +0 -1
  186. package/.next/static/chunks/95230bbbdd629d16.js +0 -1
  187. package/.next/static/chunks/997907c5fccf02bb.js +0 -5
  188. package/.next/static/chunks/9b2e7a689e581b58.js +0 -7
  189. package/.next/static/chunks/a4580bbcd72cf165.css +0 -2
  190. package/.next/static/chunks/e37c75eaddd8268a.css +0 -47
  191. package/.next/static/chunks/e75d2aeb209c3d8c.js +0 -8
  192. package/.next/static/chunks/eebac312ab720248.js +0 -1
  193. package/.next/static/chunks/turbopack-3eaa540498b1c1e9.js +0 -3
  194. package/.next/static/chunks/turbopack-6422aba52462ed1d.js +0 -3
  195. package/.next/static/chunks/turbopack-c70c4122d677e1a8.js +0 -3
  196. package/.next/static/chunks/turbopack-cc316a12eadf598b.js +0 -3
  197. package/.next/turbopack +0 -0
  198. /package/.next/{static/7kzTSHcrJ7tE47btIJcLO/_clientMiddlewareManifest.json → dynamic-css-manifest.json} +0 -0
  199. /package/.next/{server/pages/_app/react-loadable-manifest.json → react-loadable-manifest.json} +0 -0
  200. /package/.next/static/{7kzTSHcrJ7tE47btIJcLO → JsuHKQsDCNm7ddeBFmAGT}/_ssgManifest.js +0 -0
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../../../../../scrabble-solver/node_modules/next/src/server/route-modules/pages/module.compiled.js","../../../../../../../scrabble-solver/node_modules/next/src/server/route-kind.ts","../../../../../../../scrabble-solver/node_modules/next/src/build/templates/helpers.ts","../../../../../../../scrabble-solver/node_modules/next/dist/compiled/%40edge-runtime/cookies/index.js","../../../../../../../scrabble-solver/node_modules/next/dist/compiled/fresh/index.js","../../../../../../../scrabble-solver/node_modules/next/dist/esm/server/client-component-renderer-logger.js","../../../../../../../scrabble-solver/node_modules/next/dist/esm/server/lib/trace/constants.js","../../../../../../../scrabble-solver/node_modules/next/dist/esm/shared/lib/segment-cache/output-export-prefetch-encoding.js","../../../../../../../scrabble-solver/node_modules/next/dist/esm/shared/lib/i18n/normalize-locale-path.js","../../../../../../../scrabble-solver/node_modules/next/dist/esm/server/web/spec-extension/cookies.js","../../../../../../../scrabble-solver/node_modules/next/dist/esm/server/route-modules/pages/pages-handler.js","../../../../../../../scrabble-solver/node_modules/next/dist/esm/client/components/app-router-headers.js","../../../../../../../scrabble-solver/node_modules/next/dist/esm/server/response-cache/types.js","../../../../../../../scrabble-solver/node_modules/next/dist/esm/server/stream-utils/encoded-tags.js","../../../../../../../scrabble-solver/node_modules/next/dist/esm/shared/lib/errors/constants.js","../../../../../../../scrabble-solver/node_modules/next/dist/esm/shared/lib/router/utils/querystring.js","../../../../../../../scrabble-solver/node_modules/next/dist/esm/shared/lib/i18n/detect-domain-locale.js","../../../../../../../scrabble-solver/node_modules/next/dist/esm/server/instrumentation/utils.js","../../../../../../../scrabble-solver/node_modules/next/dist/esm/server/web/error.js","../../../../../../../scrabble-solver/node_modules/next/dist/esm/shared/lib/invariant-error.js","../../../../../../../scrabble-solver/node_modules/next/dist/esm/client/components/redirect-status-code.js","../../../../../../../scrabble-solver/node_modules/next/dist/esm/lib/constants.js","../../../../../../../scrabble-solver/node_modules/next/dist/esm/shared/lib/router/utils/is-bot.js","../../../../../../../scrabble-solver/node_modules/next/dist/esm/shared/lib/router/utils/cache-busting-search-param.js","../../../../../../../scrabble-solver/node_modules/next/dist/esm/server/lib/cache-control.js","../../../../../../../scrabble-solver/node_modules/next/dist/esm/server/request-meta.js","../../../../../../../scrabble-solver/node_modules/next/dist/esm/lib/redirect-status.js","../../../../../../../scrabble-solver/node_modules/next/dist/esm/server/lib/trace/tracer.js","../../../../../../../scrabble-solver/node_modules/next/dist/esm/server/send-payload.js","../../../../../../../scrabble-solver/node_modules/next/dist/esm/server/app-render/interop-default.js","../../../../../../../scrabble-solver/node_modules/next/dist/esm/server/stream-utils/uint8array-helpers.js","../../../../../../../scrabble-solver/node_modules/next/dist/esm/shared/lib/router/utils/get-next-pathname-info.js","../../../../../../../scrabble-solver/node_modules/next/dist/esm/shared/lib/utils.js","../../../../../../../scrabble-solver/node_modules/next/dist/esm/shared/lib/page-path/normalize-data-path.js","../../../../../../../scrabble-solver/node_modules/next/dist/esm/server/render-result.js","../../../../../../../scrabble-solver/node_modules/next/dist/esm/server/web/next-url.js","../../../../../../../scrabble-solver/node_modules/next/dist/esm/shared/lib/router/utils/format-next-pathname-info.js","../../../../../../../scrabble-solver/node_modules/next/dist/esm/server/web/spec-extension/request.js","../../../../../../../scrabble-solver/node_modules/next/dist/esm/server/web/spec-extension/adapters/next-request.js","../../../../../../../scrabble-solver/node_modules/next/dist/esm/server/response-cache/utils.js","../../../../../../../scrabble-solver/node_modules/next/dist/esm/shared/lib/router/utils/html-bots.js","../../../../../../../scrabble-solver/node_modules/next/dist/esm/shared/lib/router/utils/parse-path.js","../../../../../../../scrabble-solver/node_modules/next/dist/esm/lib/batcher.js","../../../../../../../scrabble-solver/node_modules/next/dist/esm/shared/lib/router/utils/add-path-prefix.js","../../../../../../../scrabble-solver/node_modules/next/dist/esm/server/response-cache/index.js","../../../../../../../scrabble-solver/node_modules/next/dist/esm/server/pipe-readable.js","../../../../../../../scrabble-solver/node_modules/next/dist/esm/lib/detached-promise.js","../../../../../../../scrabble-solver/node_modules/next/dist/esm/shared/lib/get-hostname.js","../../../../../../../scrabble-solver/node_modules/next/dist/esm/shared/lib/router/utils/add-path-suffix.js","../../../../../../../scrabble-solver/node_modules/next/dist/esm/lib/scheduler.js","../../../../../../../scrabble-solver/node_modules/next/dist/esm/shared/lib/is-thenable.js","../../../../../../../scrabble-solver/node_modules/next/dist/esm/shared/lib/router/utils/remove-trailing-slash.js","../../../../../../../scrabble-solver/node_modules/next/dist/esm/shared/lib/router/utils/add-locale.js","../../../../../../../scrabble-solver/node_modules/next/dist/esm/shared/lib/hash.js","../../../../../../../scrabble-solver/node_modules/next/dist/esm/shared/lib/router/utils/path-has-prefix.js","../../../../../../../scrabble-solver/node_modules/next/dist/esm/server/lib/etag.js","../../../../../../../scrabble-solver/node_modules/next/dist/esm/shared/lib/router/utils/remove-path-prefix.js","../../../../../../../scrabble-solver/node_modules/next/dist/esm/server/web/utils.js","../../../../../../../scrabble-solver/node_modules/next/dist/esm/server/stream-utils/node-web-streams-helper.js","../../../../../../../scrabble-solver/node_modules/next/dist/esm/server/base-http/helpers.js","../../../../../../../scrabble-solver/node_modules/next/dist/esm/shared/lib/router/utils/format-url.js"],"sourcesContent":["if (process.env.NEXT_RUNTIME === 'edge') {\n module.exports = require('next/dist/server/route-modules/pages/module.js')\n} else {\n if (process.env.NODE_ENV === 'development') {\n if (process.env.TURBOPACK) {\n module.exports = require('next/dist/compiled/next-server/pages-turbo.runtime.dev.js')\n } else {\n module.exports = require('next/dist/compiled/next-server/pages.runtime.dev.js')\n }\n } else {\n if (process.env.TURBOPACK) {\n module.exports = require('next/dist/compiled/next-server/pages-turbo.runtime.prod.js')\n } else {\n module.exports = require('next/dist/compiled/next-server/pages.runtime.prod.js')\n }\n }\n}\n","export const enum RouteKind {\n /**\n * `PAGES` represents all the React pages that are under `pages/`.\n */\n PAGES = 'PAGES',\n /**\n * `PAGES_API` represents all the API routes under `pages/api/`.\n */\n PAGES_API = 'PAGES_API',\n /**\n * `APP_PAGE` represents all the React pages that are under `app/` with the\n * filename of `page.{j,t}s{,x}`.\n */\n APP_PAGE = 'APP_PAGE',\n /**\n * `APP_ROUTE` represents all the API routes and metadata routes that are under `app/` with the\n * filename of `route.{j,t}s{,x}`.\n */\n APP_ROUTE = 'APP_ROUTE',\n\n /**\n * `IMAGE` represents all the images that are generated by `next/image`.\n */\n IMAGE = 'IMAGE',\n}\n","/**\n * Hoists a name from a module or promised module.\n *\n * @param module the module to hoist the name from\n * @param name the name to hoist\n * @returns the value on the module (or promised module)\n */\nexport function hoist(module: any, name: string) {\n // If the name is available in the module, return it.\n if (name in module) {\n return module[name]\n }\n\n // If a property called `then` exists, assume it's a promise and\n // return a promise that resolves to the name.\n if ('then' in module && typeof module.then === 'function') {\n return module.then((mod: any) => hoist(mod, name))\n }\n\n // If we're trying to hoise the default export, and the module is a function,\n // return the module itself.\n if (typeof module === 'function' && name === 'default') {\n return module\n }\n\n // Otherwise, return undefined.\n return undefined\n}\n","\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n RequestCookies: () => RequestCookies,\n ResponseCookies: () => ResponseCookies,\n parseCookie: () => parseCookie,\n parseSetCookie: () => parseSetCookie,\n stringifyCookie: () => stringifyCookie\n});\nmodule.exports = __toCommonJS(src_exports);\n\n// src/serialize.ts\nfunction stringifyCookie(c) {\n var _a;\n const attrs = [\n \"path\" in c && c.path && `Path=${c.path}`,\n \"expires\" in c && (c.expires || c.expires === 0) && `Expires=${(typeof c.expires === \"number\" ? new Date(c.expires) : c.expires).toUTCString()}`,\n \"maxAge\" in c && typeof c.maxAge === \"number\" && `Max-Age=${c.maxAge}`,\n \"domain\" in c && c.domain && `Domain=${c.domain}`,\n \"secure\" in c && c.secure && \"Secure\",\n \"httpOnly\" in c && c.httpOnly && \"HttpOnly\",\n \"sameSite\" in c && c.sameSite && `SameSite=${c.sameSite}`,\n \"partitioned\" in c && c.partitioned && \"Partitioned\",\n \"priority\" in c && c.priority && `Priority=${c.priority}`\n ].filter(Boolean);\n const stringified = `${c.name}=${encodeURIComponent((_a = c.value) != null ? _a : \"\")}`;\n return attrs.length === 0 ? stringified : `${stringified}; ${attrs.join(\"; \")}`;\n}\nfunction parseCookie(cookie) {\n const map = /* @__PURE__ */ new Map();\n for (const pair of cookie.split(/; */)) {\n if (!pair)\n continue;\n const splitAt = pair.indexOf(\"=\");\n if (splitAt === -1) {\n map.set(pair, \"true\");\n continue;\n }\n const [key, value] = [pair.slice(0, splitAt), pair.slice(splitAt + 1)];\n try {\n map.set(key, decodeURIComponent(value != null ? value : \"true\"));\n } catch {\n }\n }\n return map;\n}\nfunction parseSetCookie(setCookie) {\n if (!setCookie) {\n return void 0;\n }\n const [[name, value], ...attributes] = parseCookie(setCookie);\n const {\n domain,\n expires,\n httponly,\n maxage,\n path,\n samesite,\n secure,\n partitioned,\n priority\n } = Object.fromEntries(\n attributes.map(([key, value2]) => [\n key.toLowerCase().replace(/-/g, \"\"),\n value2\n ])\n );\n const cookie = {\n name,\n value: decodeURIComponent(value),\n domain,\n ...expires && { expires: new Date(expires) },\n ...httponly && { httpOnly: true },\n ...typeof maxage === \"string\" && { maxAge: Number(maxage) },\n path,\n ...samesite && { sameSite: parseSameSite(samesite) },\n ...secure && { secure: true },\n ...priority && { priority: parsePriority(priority) },\n ...partitioned && { partitioned: true }\n };\n return compact(cookie);\n}\nfunction compact(t) {\n const newT = {};\n for (const key in t) {\n if (t[key]) {\n newT[key] = t[key];\n }\n }\n return newT;\n}\nvar SAME_SITE = [\"strict\", \"lax\", \"none\"];\nfunction parseSameSite(string) {\n string = string.toLowerCase();\n return SAME_SITE.includes(string) ? string : void 0;\n}\nvar PRIORITY = [\"low\", \"medium\", \"high\"];\nfunction parsePriority(string) {\n string = string.toLowerCase();\n return PRIORITY.includes(string) ? string : void 0;\n}\nfunction splitCookiesString(cookiesString) {\n if (!cookiesString)\n return [];\n var cookiesStrings = [];\n var pos = 0;\n var start;\n var ch;\n var lastComma;\n var nextStart;\n var cookiesSeparatorFound;\n function skipWhitespace() {\n while (pos < cookiesString.length && /\\s/.test(cookiesString.charAt(pos))) {\n pos += 1;\n }\n return pos < cookiesString.length;\n }\n function notSpecialChar() {\n ch = cookiesString.charAt(pos);\n return ch !== \"=\" && ch !== \";\" && ch !== \",\";\n }\n while (pos < cookiesString.length) {\n start = pos;\n cookiesSeparatorFound = false;\n while (skipWhitespace()) {\n ch = cookiesString.charAt(pos);\n if (ch === \",\") {\n lastComma = pos;\n pos += 1;\n skipWhitespace();\n nextStart = pos;\n while (pos < cookiesString.length && notSpecialChar()) {\n pos += 1;\n }\n if (pos < cookiesString.length && cookiesString.charAt(pos) === \"=\") {\n cookiesSeparatorFound = true;\n pos = nextStart;\n cookiesStrings.push(cookiesString.substring(start, lastComma));\n start = pos;\n } else {\n pos = lastComma + 1;\n }\n } else {\n pos += 1;\n }\n }\n if (!cookiesSeparatorFound || pos >= cookiesString.length) {\n cookiesStrings.push(cookiesString.substring(start, cookiesString.length));\n }\n }\n return cookiesStrings;\n}\n\n// src/request-cookies.ts\nvar RequestCookies = class {\n constructor(requestHeaders) {\n /** @internal */\n this._parsed = /* @__PURE__ */ new Map();\n this._headers = requestHeaders;\n const header = requestHeaders.get(\"cookie\");\n if (header) {\n const parsed = parseCookie(header);\n for (const [name, value] of parsed) {\n this._parsed.set(name, { name, value });\n }\n }\n }\n [Symbol.iterator]() {\n return this._parsed[Symbol.iterator]();\n }\n /**\n * The amount of cookies received from the client\n */\n get size() {\n return this._parsed.size;\n }\n get(...args) {\n const name = typeof args[0] === \"string\" ? args[0] : args[0].name;\n return this._parsed.get(name);\n }\n getAll(...args) {\n var _a;\n const all = Array.from(this._parsed);\n if (!args.length) {\n return all.map(([_, value]) => value);\n }\n const name = typeof args[0] === \"string\" ? args[0] : (_a = args[0]) == null ? void 0 : _a.name;\n return all.filter(([n]) => n === name).map(([_, value]) => value);\n }\n has(name) {\n return this._parsed.has(name);\n }\n set(...args) {\n const [name, value] = args.length === 1 ? [args[0].name, args[0].value] : args;\n const map = this._parsed;\n map.set(name, { name, value });\n this._headers.set(\n \"cookie\",\n Array.from(map).map(([_, value2]) => stringifyCookie(value2)).join(\"; \")\n );\n return this;\n }\n /**\n * Delete the cookies matching the passed name or names in the request.\n */\n delete(names) {\n const map = this._parsed;\n const result = !Array.isArray(names) ? map.delete(names) : names.map((name) => map.delete(name));\n this._headers.set(\n \"cookie\",\n Array.from(map).map(([_, value]) => stringifyCookie(value)).join(\"; \")\n );\n return result;\n }\n /**\n * Delete all the cookies in the cookies in the request.\n */\n clear() {\n this.delete(Array.from(this._parsed.keys()));\n return this;\n }\n /**\n * Format the cookies in the request as a string for logging\n */\n [Symbol.for(\"edge-runtime.inspect.custom\")]() {\n return `RequestCookies ${JSON.stringify(Object.fromEntries(this._parsed))}`;\n }\n toString() {\n return [...this._parsed.values()].map((v) => `${v.name}=${encodeURIComponent(v.value)}`).join(\"; \");\n }\n};\n\n// src/response-cookies.ts\nvar ResponseCookies = class {\n constructor(responseHeaders) {\n /** @internal */\n this._parsed = /* @__PURE__ */ new Map();\n var _a, _b, _c;\n this._headers = responseHeaders;\n const setCookie = (_c = (_b = (_a = responseHeaders.getSetCookie) == null ? void 0 : _a.call(responseHeaders)) != null ? _b : responseHeaders.get(\"set-cookie\")) != null ? _c : [];\n const cookieStrings = Array.isArray(setCookie) ? setCookie : splitCookiesString(setCookie);\n for (const cookieString of cookieStrings) {\n const parsed = parseSetCookie(cookieString);\n if (parsed)\n this._parsed.set(parsed.name, parsed);\n }\n }\n /**\n * {@link https://wicg.github.io/cookie-store/#CookieStore-get CookieStore#get} without the Promise.\n */\n get(...args) {\n const key = typeof args[0] === \"string\" ? args[0] : args[0].name;\n return this._parsed.get(key);\n }\n /**\n * {@link https://wicg.github.io/cookie-store/#CookieStore-getAll CookieStore#getAll} without the Promise.\n */\n getAll(...args) {\n var _a;\n const all = Array.from(this._parsed.values());\n if (!args.length) {\n return all;\n }\n const key = typeof args[0] === \"string\" ? args[0] : (_a = args[0]) == null ? void 0 : _a.name;\n return all.filter((c) => c.name === key);\n }\n has(name) {\n return this._parsed.has(name);\n }\n /**\n * {@link https://wicg.github.io/cookie-store/#CookieStore-set CookieStore#set} without the Promise.\n */\n set(...args) {\n const [name, value, cookie] = args.length === 1 ? [args[0].name, args[0].value, args[0]] : args;\n const map = this._parsed;\n map.set(name, normalizeCookie({ name, value, ...cookie }));\n replace(map, this._headers);\n return this;\n }\n /**\n * {@link https://wicg.github.io/cookie-store/#CookieStore-delete CookieStore#delete} without the Promise.\n */\n delete(...args) {\n const [name, options] = typeof args[0] === \"string\" ? [args[0]] : [args[0].name, args[0]];\n return this.set({ ...options, name, value: \"\", expires: /* @__PURE__ */ new Date(0) });\n }\n [Symbol.for(\"edge-runtime.inspect.custom\")]() {\n return `ResponseCookies ${JSON.stringify(Object.fromEntries(this._parsed))}`;\n }\n toString() {\n return [...this._parsed.values()].map(stringifyCookie).join(\"; \");\n }\n};\nfunction replace(bag, headers) {\n headers.delete(\"set-cookie\");\n for (const [, value] of bag) {\n const serialized = stringifyCookie(value);\n headers.append(\"set-cookie\", serialized);\n }\n}\nfunction normalizeCookie(cookie = { name: \"\", value: \"\" }) {\n if (typeof cookie.expires === \"number\") {\n cookie.expires = new Date(cookie.expires);\n }\n if (cookie.maxAge) {\n cookie.expires = new Date(Date.now() + cookie.maxAge * 1e3);\n }\n if (cookie.path === null || cookie.path === void 0) {\n cookie.path = \"/\";\n }\n return cookie;\n}\n// Annotate the CommonJS export names for ESM import in node:\n0 && (module.exports = {\n RequestCookies,\n ResponseCookies,\n parseCookie,\n parseSetCookie,\n stringifyCookie\n});\n","(()=>{\"use strict\";var e={695:e=>{\n/*!\n * fresh\n * Copyright(c) 2012 TJ Holowaychuk\n * Copyright(c) 2016-2017 Douglas Christopher Wilson\n * MIT Licensed\n */\nvar r=/(?:^|,)\\s*?no-cache\\s*?(?:,|$)/;e.exports=fresh;function fresh(e,a){var t=e[\"if-modified-since\"];var s=e[\"if-none-match\"];if(!t&&!s){return false}var i=e[\"cache-control\"];if(i&&r.test(i)){return false}if(s&&s!==\"*\"){var f=a[\"etag\"];if(!f){return false}var n=true;var u=parseTokenList(s);for(var _=0;_<u.length;_++){var o=u[_];if(o===f||o===\"W/\"+f||\"W/\"+o===f){n=false;break}}if(n){return false}}if(t){var p=a[\"last-modified\"];var v=!p||!(parseHttpDate(p)<=parseHttpDate(t));if(v){return false}}return true}function parseHttpDate(e){var r=e&&Date.parse(e);return typeof r===\"number\"?r:NaN}function parseTokenList(e){var r=0;var a=[];var t=0;for(var s=0,i=e.length;s<i;s++){switch(e.charCodeAt(s)){case 32:if(t===r){t=r=s+1}break;case 44:a.push(e.substring(t,r));t=r=s+1;break;default:r=s+1;break}}a.push(e.substring(t,r));return a}}};var r={};function __nccwpck_require__(a){var t=r[a];if(t!==undefined){return t.exports}var s=r[a]={exports:{}};var i=true;try{e[a](s,s.exports,__nccwpck_require__);i=false}finally{if(i)delete r[a]}return s.exports}if(typeof __nccwpck_require__!==\"undefined\")__nccwpck_require__.ab=__dirname+\"/\";var a=__nccwpck_require__(695);module.exports=a})();","// Combined load times for loading client components\nlet clientComponentLoadStart = 0;\nlet clientComponentLoadTimes = 0;\nlet clientComponentLoadCount = 0;\nexport function wrapClientComponentLoader(ComponentMod) {\n if (!('performance' in globalThis)) {\n return ComponentMod.__next_app__;\n }\n return {\n require: (...args)=>{\n const startTime = performance.now();\n if (clientComponentLoadStart === 0) {\n clientComponentLoadStart = startTime;\n }\n try {\n clientComponentLoadCount += 1;\n return ComponentMod.__next_app__.require(...args);\n } finally{\n clientComponentLoadTimes += performance.now() - startTime;\n }\n },\n loadChunk: (...args)=>{\n const startTime = performance.now();\n const result = ComponentMod.__next_app__.loadChunk(...args);\n // Avoid wrapping `loadChunk`'s result in an extra promise in case something like React depends on its identity.\n // We only need to know when it's settled.\n result.finally(()=>{\n clientComponentLoadTimes += performance.now() - startTime;\n });\n return result;\n }\n };\n}\nexport function getClientComponentLoaderMetrics(options = {}) {\n const metrics = clientComponentLoadStart === 0 ? undefined : {\n clientComponentLoadStart,\n clientComponentLoadTimes,\n clientComponentLoadCount\n };\n if (options.reset) {\n clientComponentLoadStart = 0;\n clientComponentLoadTimes = 0;\n clientComponentLoadCount = 0;\n }\n return metrics;\n}\n\n//# sourceMappingURL=client-component-renderer-logger.js.map","/**\n * Contains predefined constants for the trace span name in next/server.\n *\n * Currently, next/server/tracer is internal implementation only for tracking\n * next.js's implementation only with known span names defined here.\n **/ // eslint typescript has a bug with TS enums\nvar BaseServerSpan = /*#__PURE__*/ function(BaseServerSpan) {\n BaseServerSpan[\"handleRequest\"] = \"BaseServer.handleRequest\";\n BaseServerSpan[\"run\"] = \"BaseServer.run\";\n BaseServerSpan[\"pipe\"] = \"BaseServer.pipe\";\n BaseServerSpan[\"getStaticHTML\"] = \"BaseServer.getStaticHTML\";\n BaseServerSpan[\"render\"] = \"BaseServer.render\";\n BaseServerSpan[\"renderToResponseWithComponents\"] = \"BaseServer.renderToResponseWithComponents\";\n BaseServerSpan[\"renderToResponse\"] = \"BaseServer.renderToResponse\";\n BaseServerSpan[\"renderToHTML\"] = \"BaseServer.renderToHTML\";\n BaseServerSpan[\"renderError\"] = \"BaseServer.renderError\";\n BaseServerSpan[\"renderErrorToResponse\"] = \"BaseServer.renderErrorToResponse\";\n BaseServerSpan[\"renderErrorToHTML\"] = \"BaseServer.renderErrorToHTML\";\n BaseServerSpan[\"render404\"] = \"BaseServer.render404\";\n return BaseServerSpan;\n}(BaseServerSpan || {});\nvar LoadComponentsSpan = /*#__PURE__*/ function(LoadComponentsSpan) {\n LoadComponentsSpan[\"loadDefaultErrorComponents\"] = \"LoadComponents.loadDefaultErrorComponents\";\n LoadComponentsSpan[\"loadComponents\"] = \"LoadComponents.loadComponents\";\n return LoadComponentsSpan;\n}(LoadComponentsSpan || {});\nvar NextServerSpan = /*#__PURE__*/ function(NextServerSpan) {\n NextServerSpan[\"getRequestHandler\"] = \"NextServer.getRequestHandler\";\n NextServerSpan[\"getRequestHandlerWithMetadata\"] = \"NextServer.getRequestHandlerWithMetadata\";\n NextServerSpan[\"getServer\"] = \"NextServer.getServer\";\n NextServerSpan[\"getServerRequestHandler\"] = \"NextServer.getServerRequestHandler\";\n NextServerSpan[\"createServer\"] = \"createServer.createServer\";\n return NextServerSpan;\n}(NextServerSpan || {});\nvar NextNodeServerSpan = /*#__PURE__*/ function(NextNodeServerSpan) {\n NextNodeServerSpan[\"compression\"] = \"NextNodeServer.compression\";\n NextNodeServerSpan[\"getBuildId\"] = \"NextNodeServer.getBuildId\";\n NextNodeServerSpan[\"createComponentTree\"] = \"NextNodeServer.createComponentTree\";\n NextNodeServerSpan[\"clientComponentLoading\"] = \"NextNodeServer.clientComponentLoading\";\n NextNodeServerSpan[\"getLayoutOrPageModule\"] = \"NextNodeServer.getLayoutOrPageModule\";\n NextNodeServerSpan[\"generateStaticRoutes\"] = \"NextNodeServer.generateStaticRoutes\";\n NextNodeServerSpan[\"generateFsStaticRoutes\"] = \"NextNodeServer.generateFsStaticRoutes\";\n NextNodeServerSpan[\"generatePublicRoutes\"] = \"NextNodeServer.generatePublicRoutes\";\n NextNodeServerSpan[\"generateImageRoutes\"] = \"NextNodeServer.generateImageRoutes.route\";\n NextNodeServerSpan[\"sendRenderResult\"] = \"NextNodeServer.sendRenderResult\";\n NextNodeServerSpan[\"proxyRequest\"] = \"NextNodeServer.proxyRequest\";\n NextNodeServerSpan[\"runApi\"] = \"NextNodeServer.runApi\";\n NextNodeServerSpan[\"render\"] = \"NextNodeServer.render\";\n NextNodeServerSpan[\"renderHTML\"] = \"NextNodeServer.renderHTML\";\n NextNodeServerSpan[\"imageOptimizer\"] = \"NextNodeServer.imageOptimizer\";\n NextNodeServerSpan[\"getPagePath\"] = \"NextNodeServer.getPagePath\";\n NextNodeServerSpan[\"getRoutesManifest\"] = \"NextNodeServer.getRoutesManifest\";\n NextNodeServerSpan[\"findPageComponents\"] = \"NextNodeServer.findPageComponents\";\n NextNodeServerSpan[\"getFontManifest\"] = \"NextNodeServer.getFontManifest\";\n NextNodeServerSpan[\"getServerComponentManifest\"] = \"NextNodeServer.getServerComponentManifest\";\n NextNodeServerSpan[\"getRequestHandler\"] = \"NextNodeServer.getRequestHandler\";\n NextNodeServerSpan[\"renderToHTML\"] = \"NextNodeServer.renderToHTML\";\n NextNodeServerSpan[\"renderError\"] = \"NextNodeServer.renderError\";\n NextNodeServerSpan[\"renderErrorToHTML\"] = \"NextNodeServer.renderErrorToHTML\";\n NextNodeServerSpan[\"render404\"] = \"NextNodeServer.render404\";\n NextNodeServerSpan[\"startResponse\"] = \"NextNodeServer.startResponse\";\n // nested inner span, does not require parent scope name\n NextNodeServerSpan[\"route\"] = \"route\";\n NextNodeServerSpan[\"onProxyReq\"] = \"onProxyReq\";\n NextNodeServerSpan[\"apiResolver\"] = \"apiResolver\";\n NextNodeServerSpan[\"internalFetch\"] = \"internalFetch\";\n return NextNodeServerSpan;\n}(NextNodeServerSpan || {});\nvar StartServerSpan = /*#__PURE__*/ function(StartServerSpan) {\n StartServerSpan[\"startServer\"] = \"startServer.startServer\";\n return StartServerSpan;\n}(StartServerSpan || {});\nvar RenderSpan = /*#__PURE__*/ function(RenderSpan) {\n RenderSpan[\"getServerSideProps\"] = \"Render.getServerSideProps\";\n RenderSpan[\"getStaticProps\"] = \"Render.getStaticProps\";\n RenderSpan[\"renderToString\"] = \"Render.renderToString\";\n RenderSpan[\"renderDocument\"] = \"Render.renderDocument\";\n RenderSpan[\"createBodyResult\"] = \"Render.createBodyResult\";\n return RenderSpan;\n}(RenderSpan || {});\nvar AppRenderSpan = /*#__PURE__*/ function(AppRenderSpan) {\n AppRenderSpan[\"renderToString\"] = \"AppRender.renderToString\";\n AppRenderSpan[\"renderToReadableStream\"] = \"AppRender.renderToReadableStream\";\n AppRenderSpan[\"getBodyResult\"] = \"AppRender.getBodyResult\";\n AppRenderSpan[\"fetch\"] = \"AppRender.fetch\";\n return AppRenderSpan;\n}(AppRenderSpan || {});\nvar RouterSpan = /*#__PURE__*/ function(RouterSpan) {\n RouterSpan[\"executeRoute\"] = \"Router.executeRoute\";\n return RouterSpan;\n}(RouterSpan || {});\nvar NodeSpan = /*#__PURE__*/ function(NodeSpan) {\n NodeSpan[\"runHandler\"] = \"Node.runHandler\";\n return NodeSpan;\n}(NodeSpan || {});\nvar AppRouteRouteHandlersSpan = /*#__PURE__*/ function(AppRouteRouteHandlersSpan) {\n AppRouteRouteHandlersSpan[\"runHandler\"] = \"AppRouteRouteHandlers.runHandler\";\n return AppRouteRouteHandlersSpan;\n}(AppRouteRouteHandlersSpan || {});\nvar ResolveMetadataSpan = /*#__PURE__*/ function(ResolveMetadataSpan) {\n ResolveMetadataSpan[\"generateMetadata\"] = \"ResolveMetadata.generateMetadata\";\n ResolveMetadataSpan[\"generateViewport\"] = \"ResolveMetadata.generateViewport\";\n return ResolveMetadataSpan;\n}(ResolveMetadataSpan || {});\nvar MiddlewareSpan = /*#__PURE__*/ function(MiddlewareSpan) {\n MiddlewareSpan[\"execute\"] = \"Middleware.execute\";\n return MiddlewareSpan;\n}(MiddlewareSpan || {});\n// This list is used to filter out spans that are not relevant to the user\nexport const NextVanillaSpanAllowlist = new Set([\n \"Middleware.execute\",\n \"BaseServer.handleRequest\",\n \"Render.getServerSideProps\",\n \"Render.getStaticProps\",\n \"AppRender.fetch\",\n \"AppRender.getBodyResult\",\n \"Render.renderDocument\",\n \"Node.runHandler\",\n \"AppRouteRouteHandlers.runHandler\",\n \"ResolveMetadata.generateMetadata\",\n \"ResolveMetadata.generateViewport\",\n \"NextNodeServer.createComponentTree\",\n \"NextNodeServer.findPageComponents\",\n \"NextNodeServer.getLayoutOrPageModule\",\n \"NextNodeServer.startResponse\",\n \"NextNodeServer.clientComponentLoading\"\n]);\n// These Spans are allowed to be always logged\n// when the otel log prefix env is set\nexport const LogSpanAllowList = new Set([\n \"NextNodeServer.findPageComponents\",\n \"NextNodeServer.createComponentTree\",\n \"NextNodeServer.clientComponentLoading\"\n]);\nexport { BaseServerSpan, LoadComponentsSpan, NextServerSpan, NextNodeServerSpan, StartServerSpan, RenderSpan, RouterSpan, AppRenderSpan, NodeSpan, AppRouteRouteHandlersSpan, ResolveMetadataSpan, MiddlewareSpan, };\n\n//# sourceMappingURL=constants.js.map","// In output: export mode, the build id is added to the start of the HTML\n// document, directly after the doctype declaration. During a prefetch, the\n// client performs a range request to get the build id, so it can check whether\n// the target page belongs to the same build.\n//\n// The first 64 bytes of the document are requested. The exact number isn't\n// too important; it must be larger than the build id + doctype + closing and\n// ending comment markers, but it doesn't need to match the end of the\n// comment exactly.\n//\n// Build ids are 21 bytes long in the default implementation, though this\n// can be overridden in the Next.js config. For the purposes of this check,\n// it's OK to only match the start of the id, so we'll truncate it if exceeds\n// a certain length.\nconst DOCTYPE_PREFIX = '<!DOCTYPE html>' // 15 bytes\n;\nconst MAX_BUILD_ID_LENGTH = 24;\n// Request the first 64 bytes. The Range header is inclusive of the end value.\nexport const DOC_PREFETCH_RANGE_HEADER_VALUE = 'bytes=0-63';\nfunction escapeBuildId(buildId) {\n // If the build id is longer than the given limit, it's OK for our purposes\n // to only match the beginning.\n const truncated = buildId.slice(0, MAX_BUILD_ID_LENGTH);\n // Replace hyphens with underscores so it doesn't break the HTML comment.\n // (Unlikely, but if this did happen it would break the whole document.)\n return truncated.replace(/-/g, '_');\n}\nexport function insertBuildIdComment(originalHtml, buildId) {\n if (// Skip if the build id contains a closing comment marker.\n buildId.includes('-->') || // React always inserts a doctype at the start of the document. Skip if it\n // isn't present. Shouldn't happen; suggests an issue elsewhere.\n !originalHtml.startsWith(DOCTYPE_PREFIX)) {\n // Return the original HTML unchanged. This means the document will not\n // be prefetched.\n // TODO: The build id comment is currently only used during prefetches, but\n // if we eventually use this mechanism for regular navigations, we may need\n // to error during build if we fail to insert it for some reason.\n return originalHtml;\n }\n // The comment must be inserted after the doctype.\n return originalHtml.replace(DOCTYPE_PREFIX, DOCTYPE_PREFIX + '<!--' + escapeBuildId(buildId) + '-->');\n}\nexport function doesExportedHtmlMatchBuildId(partialHtmlDocument, buildId) {\n // Check whether the document starts with the expected buildId.\n return partialHtmlDocument.startsWith(DOCTYPE_PREFIX + '<!--' + escapeBuildId(buildId) + '-->');\n}\n\n//# sourceMappingURL=output-export-prefetch-encoding.js.map","/**\n * A cache of lowercased locales for each list of locales. This is stored as a\n * WeakMap so if the locales are garbage collected, the cache entry will be\n * removed as well.\n */ const cache = new WeakMap();\n/**\n * For a pathname that may include a locale from a list of locales, it\n * removes the locale from the pathname returning it alongside with the\n * detected locale.\n *\n * @param pathname A pathname that may include a locale.\n * @param locales A list of locales.\n * @returns The detected locale and pathname without locale\n */ export function normalizeLocalePath(pathname, locales) {\n // If locales is undefined, return the pathname as is.\n if (!locales) return {\n pathname\n };\n // Get the cached lowercased locales or create a new cache entry.\n let lowercasedLocales = cache.get(locales);\n if (!lowercasedLocales) {\n lowercasedLocales = locales.map((locale)=>locale.toLowerCase());\n cache.set(locales, lowercasedLocales);\n }\n let detectedLocale;\n // The first segment will be empty, because it has a leading `/`. If\n // there is no further segment, there is no locale (or it's the default).\n const segments = pathname.split('/', 2);\n // If there's no second segment (ie, the pathname is just `/`), there's no\n // locale.\n if (!segments[1]) return {\n pathname\n };\n // The second segment will contain the locale part if any.\n const segment = segments[1].toLowerCase();\n // See if the segment matches one of the locales. If it doesn't, there is\n // no locale (or it's the default).\n const index = lowercasedLocales.indexOf(segment);\n if (index < 0) return {\n pathname\n };\n // Return the case-sensitive locale.\n detectedLocale = locales[index];\n // Remove the `/${locale}` part of the pathname.\n pathname = pathname.slice(detectedLocale.length + 1) || '/';\n return {\n pathname,\n detectedLocale\n };\n}\n\n//# sourceMappingURL=normalize-locale-path.js.map","export { RequestCookies, ResponseCookies, stringifyCookie } from 'next/dist/compiled/@edge-runtime/cookies';\n\n//# sourceMappingURL=cookies.js.map","import { RouteKind } from '../../route-kind';\nimport { BaseServerSpan } from '../../lib/trace/constants';\nimport { getTracer, SpanKind } from '../../lib/trace/tracer';\nimport { formatUrl } from '../../../shared/lib/router/utils/format-url';\nimport { addRequestMeta, getRequestMeta } from '../../request-meta';\nimport { interopDefault } from '../../app-render/interop-default';\nimport { getRevalidateReason } from '../../instrumentation/utils';\nimport { normalizeDataPath } from '../../../shared/lib/page-path/normalize-data-path';\nimport { CachedRouteKind } from '../../response-cache';\nimport { getCacheControlHeader } from '../../lib/cache-control';\nimport { normalizeRepeatedSlashes } from '../../../shared/lib/utils';\nimport { getRedirectStatus } from '../../../lib/redirect-status';\nimport { CACHE_ONE_YEAR, HTML_CONTENT_TYPE_HEADER, JSON_CONTENT_TYPE_HEADER } from '../../../lib/constants';\nimport path from 'path';\nimport { sendRenderResult } from '../../send-payload';\nimport RenderResult from '../../render-result';\nimport { toResponseCacheEntry } from '../../response-cache/utils';\nimport { NoFallbackError } from '../../../shared/lib/no-fallback-error.external';\nimport { RedirectStatusCode } from '../../../client/components/redirect-status-code';\nimport { isBot } from '../../../shared/lib/router/utils/is-bot';\nimport { addPathPrefix } from '../../../shared/lib/router/utils/add-path-prefix';\nimport { removeTrailingSlash } from '../../../shared/lib/router/utils/remove-trailing-slash';\nexport const getHandler = ({ srcPage: originalSrcPage, config, userland, routeModule, isFallbackError, getStaticPaths, getStaticProps, getServerSideProps })=>{\n return async function handler(req, res, ctx) {\n var _serverFilesManifest_config_experimental, _serverFilesManifest_config;\n if (routeModule.isDev) {\n addRequestMeta(req, 'devRequestTimingInternalsEnd', process.hrtime.bigint());\n }\n let srcPage = originalSrcPage;\n // turbopack doesn't normalize `/index` in the page name\n // so we need to to process dynamic routes properly\n // TODO: fix turbopack providing differing value from webpack\n if (process.env.TURBOPACK) {\n srcPage = srcPage.replace(/\\/index$/, '') || '/';\n } else if (srcPage === '/index') {\n // we always normalize /index specifically\n srcPage = '/';\n }\n const multiZoneDraftMode = process.env.__NEXT_MULTI_ZONE_DRAFT_MODE;\n const prepareResult = await routeModule.prepare(req, res, {\n srcPage,\n multiZoneDraftMode\n });\n if (!prepareResult) {\n res.statusCode = 400;\n res.end('Bad Request');\n ctx.waitUntil == null ? void 0 : ctx.waitUntil.call(ctx, Promise.resolve());\n return;\n }\n const isMinimalMode = Boolean(process.env.MINIMAL_MODE || getRequestMeta(req, 'minimalMode'));\n const render404 = async ()=>{\n // TODO: should route-module itself handle rendering the 404\n if (routerServerContext == null ? void 0 : routerServerContext.render404) {\n await routerServerContext.render404(req, res, parsedUrl, false);\n } else {\n res.end('This page could not be found');\n }\n };\n const { buildId, query, params, parsedUrl, originalQuery, originalPathname, buildManifest, fallbackBuildManifest, nextFontManifest, serverFilesManifest, reactLoadableManifest, prerenderManifest, isDraftMode, isOnDemandRevalidate, revalidateOnlyGenerated, locale, locales, defaultLocale, routerServerContext, nextConfig, resolvedPathname, encodedResolvedPathname } = prepareResult;\n const isExperimentalCompile = serverFilesManifest == null ? void 0 : (_serverFilesManifest_config = serverFilesManifest.config) == null ? void 0 : (_serverFilesManifest_config_experimental = _serverFilesManifest_config.experimental) == null ? void 0 : _serverFilesManifest_config_experimental.isExperimentalCompile;\n const hasServerProps = Boolean(getServerSideProps);\n const hasStaticProps = Boolean(getStaticProps);\n const hasStaticPaths = Boolean(getStaticPaths);\n const hasGetInitialProps = Boolean((userland.default || userland).getInitialProps);\n let cacheKey = null;\n let isIsrFallback = false;\n let isNextDataRequest = prepareResult.isNextDataRequest && (hasStaticProps || hasServerProps);\n const is404Page = srcPage === '/404';\n const is500Page = srcPage === '/500';\n const isErrorPage = srcPage === '/_error';\n if (!routeModule.isDev && !isDraftMode && hasStaticProps) {\n cacheKey = `${locale ? `/${locale}` : ''}${(srcPage === '/' || resolvedPathname === '/') && locale ? '' : resolvedPathname}`;\n if (is404Page || is500Page || isErrorPage) {\n cacheKey = `${locale ? `/${locale}` : ''}${srcPage}`;\n }\n // ensure /index and / is normalized to one key\n cacheKey = cacheKey === '/index' ? '/' : cacheKey;\n }\n if (hasStaticPaths && !isDraftMode) {\n const decodedPathname = removeTrailingSlash(locale ? addPathPrefix(resolvedPathname, `/${locale}`) : resolvedPathname);\n const isPrerendered = Boolean(prerenderManifest.routes[decodedPathname]) || prerenderManifest.notFoundRoutes.includes(decodedPathname);\n const prerenderInfo = prerenderManifest.dynamicRoutes[srcPage];\n if (prerenderInfo) {\n if (prerenderInfo.fallback === false && !isPrerendered) {\n if (nextConfig.experimental.adapterPath) {\n return await render404();\n }\n throw new NoFallbackError();\n }\n if (typeof prerenderInfo.fallback === 'string' && !isPrerendered && !isNextDataRequest) {\n isIsrFallback = true;\n }\n }\n }\n // When serving a bot request, we want to serve a blocking render and not\n // the prerendered page. This ensures that the correct content is served\n // to the bot in the head.\n if (isIsrFallback && isBot(req.headers['user-agent'] || '') || isMinimalMode) {\n isIsrFallback = false;\n }\n const tracer = getTracer();\n const activeSpan = tracer.getActiveScopeSpan();\n try {\n var _parsedUrl_pathname;\n const method = req.method || 'GET';\n const resolvedUrl = formatUrl({\n pathname: nextConfig.trailingSlash ? `${encodedResolvedPathname}${!encodedResolvedPathname.endsWith('/') && ((_parsedUrl_pathname = parsedUrl.pathname) == null ? void 0 : _parsedUrl_pathname.endsWith('/')) ? '/' : ''}` : removeTrailingSlash(encodedResolvedPathname || '/'),\n // make sure to only add query values from original URL\n query: hasStaticProps ? {} : originalQuery\n });\n const handleResponse = async (span)=>{\n const responseGenerator = async ({ previousCacheEntry })=>{\n var _previousCacheEntry_value;\n const doRender = async ()=>{\n try {\n var _nextConfig_i18n;\n return await routeModule.render(req, res, {\n query: hasStaticProps && !isExperimentalCompile ? {\n ...params\n } : {\n ...query,\n ...params\n },\n params,\n page: srcPage,\n renderContext: {\n isDraftMode,\n isFallback: isIsrFallback,\n developmentNotFoundSourcePage: getRequestMeta(req, 'developmentNotFoundSourcePage')\n },\n sharedContext: {\n buildId,\n customServer: Boolean(routerServerContext == null ? void 0 : routerServerContext.isCustomServer) || undefined,\n deploymentId: process.env.NEXT_DEPLOYMENT_ID\n },\n renderOpts: {\n params,\n routeModule,\n page: srcPage,\n pageConfig: config || {},\n Component: interopDefault(userland),\n ComponentMod: userland,\n getStaticProps,\n getStaticPaths,\n getServerSideProps,\n supportsDynamicResponse: !hasStaticProps,\n buildManifest: isFallbackError ? fallbackBuildManifest : buildManifest,\n nextFontManifest,\n reactLoadableManifest,\n assetPrefix: nextConfig.assetPrefix,\n previewProps: prerenderManifest.preview,\n images: nextConfig.images,\n nextConfigOutput: nextConfig.output,\n optimizeCss: Boolean(nextConfig.experimental.optimizeCss),\n nextScriptWorkers: Boolean(nextConfig.experimental.nextScriptWorkers),\n domainLocales: (_nextConfig_i18n = nextConfig.i18n) == null ? void 0 : _nextConfig_i18n.domains,\n crossOrigin: nextConfig.crossOrigin,\n multiZoneDraftMode,\n basePath: nextConfig.basePath,\n disableOptimizedLoading: nextConfig.experimental.disableOptimizedLoading,\n largePageDataBytes: nextConfig.experimental.largePageDataBytes,\n isExperimentalCompile,\n experimental: {\n clientTraceMetadata: nextConfig.experimental.clientTraceMetadata || []\n },\n locale,\n locales,\n defaultLocale,\n setIsrStatus: routerServerContext == null ? void 0 : routerServerContext.setIsrStatus,\n isNextDataRequest: isNextDataRequest && (hasServerProps || hasStaticProps),\n resolvedUrl,\n // For getServerSideProps and getInitialProps we need to ensure we use the original URL\n // and not the resolved URL to prevent a hydration mismatch on\n // asPath\n resolvedAsPath: hasServerProps || hasGetInitialProps ? formatUrl({\n // we use the original URL pathname less the _next/data prefix if\n // present\n pathname: isNextDataRequest ? normalizeDataPath(originalPathname) : originalPathname,\n query: originalQuery\n }) : resolvedUrl,\n isOnDemandRevalidate,\n ErrorDebug: getRequestMeta(req, 'PagesErrorDebug'),\n err: getRequestMeta(req, 'invokeError'),\n dev: routeModule.isDev,\n // needed for experimental.optimizeCss feature\n distDir: path.join(/* turbopackIgnore: true */ process.cwd(), routeModule.relativeProjectDir, routeModule.distDir)\n }\n }).then((renderResult)=>{\n const { metadata } = renderResult;\n let cacheControl = metadata.cacheControl;\n if ('isNotFound' in metadata && metadata.isNotFound) {\n return {\n value: null,\n cacheControl\n };\n }\n // Handle `isRedirect`.\n if (metadata.isRedirect) {\n return {\n value: {\n kind: CachedRouteKind.REDIRECT,\n props: metadata.pageData ?? metadata.flightData\n },\n cacheControl\n };\n }\n return {\n value: {\n kind: CachedRouteKind.PAGES,\n html: renderResult,\n pageData: renderResult.metadata.pageData,\n headers: renderResult.metadata.headers,\n status: renderResult.metadata.statusCode\n },\n cacheControl\n };\n }).finally(()=>{\n if (!span) return;\n span.setAttributes({\n 'http.status_code': res.statusCode,\n 'next.rsc': false\n });\n const rootSpanAttributes = tracer.getRootSpanAttributes();\n // We were unable to get attributes, probably OTEL is not enabled\n if (!rootSpanAttributes) {\n return;\n }\n if (rootSpanAttributes.get('next.span_type') !== BaseServerSpan.handleRequest) {\n console.warn(`Unexpected root span type '${rootSpanAttributes.get('next.span_type')}'. Please report this Next.js issue https://github.com/vercel/next.js`);\n return;\n }\n const route = rootSpanAttributes.get('next.route');\n if (route) {\n const name = `${method} ${route}`;\n span.setAttributes({\n 'next.route': route,\n 'http.route': route,\n 'next.span_name': name\n });\n span.updateName(name);\n } else {\n span.updateName(`${method} ${srcPage}`);\n }\n });\n } catch (err) {\n // if this is a background revalidate we need to report\n // the request error here as it won't be bubbled\n if (previousCacheEntry == null ? void 0 : previousCacheEntry.isStale) {\n await routeModule.onRequestError(req, err, {\n routerKind: 'Pages Router',\n routePath: srcPage,\n routeType: 'render',\n revalidateReason: getRevalidateReason({\n isStaticGeneration: hasStaticProps,\n isOnDemandRevalidate\n })\n }, routerServerContext);\n }\n throw err;\n }\n };\n // if we've already generated this page we no longer\n // serve the fallback\n if (previousCacheEntry) {\n isIsrFallback = false;\n }\n if (isIsrFallback) {\n const fallbackResponse = await routeModule.getResponseCache(req).get(routeModule.isDev ? null : locale ? `/${locale}${srcPage}` : srcPage, async ({ previousCacheEntry: previousFallbackCacheEntry = null })=>{\n if (!routeModule.isDev) {\n return toResponseCacheEntry(previousFallbackCacheEntry);\n }\n return doRender();\n }, {\n routeKind: RouteKind.PAGES,\n isFallback: true,\n isRoutePPREnabled: false,\n isOnDemandRevalidate: false,\n incrementalCache: await routeModule.getIncrementalCache(req, nextConfig, prerenderManifest, isMinimalMode),\n waitUntil: ctx.waitUntil\n });\n if (fallbackResponse) {\n // Remove the cache control from the response to prevent it from being\n // used in the surrounding cache.\n delete fallbackResponse.cacheControl;\n fallbackResponse.isMiss = true;\n return fallbackResponse;\n }\n }\n if (!isMinimalMode && isOnDemandRevalidate && revalidateOnlyGenerated && !previousCacheEntry) {\n res.statusCode = 404;\n // on-demand revalidate always sets this header\n res.setHeader('x-nextjs-cache', 'REVALIDATED');\n res.end('This page could not be found');\n return null;\n }\n if (isIsrFallback && (previousCacheEntry == null ? void 0 : (_previousCacheEntry_value = previousCacheEntry.value) == null ? void 0 : _previousCacheEntry_value.kind) === CachedRouteKind.PAGES) {\n return {\n value: {\n kind: CachedRouteKind.PAGES,\n html: new RenderResult(Buffer.from(previousCacheEntry.value.html), {\n contentType: HTML_CONTENT_TYPE_HEADER,\n metadata: {\n statusCode: previousCacheEntry.value.status,\n headers: previousCacheEntry.value.headers\n }\n }),\n pageData: {},\n status: previousCacheEntry.value.status,\n headers: previousCacheEntry.value.headers\n },\n cacheControl: {\n revalidate: 0,\n expire: undefined\n }\n };\n }\n return doRender();\n };\n const result = await routeModule.handleResponse({\n cacheKey,\n req,\n nextConfig,\n routeKind: RouteKind.PAGES,\n isOnDemandRevalidate,\n revalidateOnlyGenerated,\n waitUntil: ctx.waitUntil,\n responseGenerator: responseGenerator,\n prerenderManifest,\n isMinimalMode\n });\n // if we got a cache hit this wasn't an ISR fallback\n // but it wasn't generated during build so isn't in the\n // prerender-manifest\n if (isIsrFallback && !(result == null ? void 0 : result.isMiss)) {\n isIsrFallback = false;\n }\n // response is finished is no cache entry\n if (!result) {\n return;\n }\n if (hasStaticProps && !isMinimalMode) {\n res.setHeader('x-nextjs-cache', isOnDemandRevalidate ? 'REVALIDATED' : result.isMiss ? 'MISS' : result.isStale ? 'STALE' : 'HIT');\n }\n let cacheControl;\n if (!hasStaticProps || isIsrFallback) {\n if (!res.getHeader('Cache-Control')) {\n cacheControl = {\n revalidate: 0,\n expire: undefined\n };\n }\n } else if (is404Page) {\n const notFoundRevalidate = getRequestMeta(req, 'notFoundRevalidate');\n cacheControl = {\n revalidate: typeof notFoundRevalidate === 'undefined' ? 0 : notFoundRevalidate,\n expire: undefined\n };\n } else if (is500Page) {\n cacheControl = {\n revalidate: 0,\n expire: undefined\n };\n } else if (result.cacheControl) {\n // If the cache entry has a cache control with a revalidate value that's\n // a number, use it.\n if (typeof result.cacheControl.revalidate === 'number') {\n var _result_cacheControl;\n if (result.cacheControl.revalidate < 1) {\n throw Object.defineProperty(new Error(`Invalid revalidate configuration provided: ${result.cacheControl.revalidate} < 1`), \"__NEXT_ERROR_CODE\", {\n value: \"E22\",\n enumerable: false,\n configurable: true\n });\n }\n cacheControl = {\n revalidate: result.cacheControl.revalidate,\n expire: ((_result_cacheControl = result.cacheControl) == null ? void 0 : _result_cacheControl.expire) ?? nextConfig.expireTime\n };\n } else {\n // revalidate: false\n cacheControl = {\n revalidate: CACHE_ONE_YEAR,\n expire: undefined\n };\n }\n }\n // If cache control is already set on the response we don't\n // override it to allow users to customize it via next.config\n if (cacheControl && !res.getHeader('Cache-Control')) {\n res.setHeader('Cache-Control', getCacheControlHeader(cacheControl));\n }\n // notFound: true case\n if (!result.value) {\n var _result_cacheControl1;\n // add revalidate metadata before rendering 404 page\n // so that we can use this as source of truth for the\n // cache-control header instead of what the 404 page returns\n // for the revalidate value\n addRequestMeta(req, 'notFoundRevalidate', (_result_cacheControl1 = result.cacheControl) == null ? void 0 : _result_cacheControl1.revalidate);\n res.statusCode = 404;\n if (isNextDataRequest) {\n res.end('{\"notFound\":true}');\n return;\n }\n return await render404();\n }\n if (result.value.kind === CachedRouteKind.REDIRECT) {\n if (isNextDataRequest) {\n res.setHeader('content-type', JSON_CONTENT_TYPE_HEADER);\n res.end(JSON.stringify(result.value.props));\n return;\n } else {\n const handleRedirect = (pageData)=>{\n const redirect = {\n destination: pageData.pageProps.__N_REDIRECT,\n statusCode: pageData.pageProps.__N_REDIRECT_STATUS,\n basePath: pageData.pageProps.__N_REDIRECT_BASE_PATH\n };\n const statusCode = getRedirectStatus(redirect);\n const { basePath } = nextConfig;\n if (basePath && redirect.basePath !== false && redirect.destination.startsWith('/')) {\n redirect.destination = `${basePath}${redirect.destination}`;\n }\n if (redirect.destination.startsWith('/')) {\n redirect.destination = normalizeRepeatedSlashes(redirect.destination);\n }\n res.statusCode = statusCode;\n res.setHeader('Location', redirect.destination);\n if (statusCode === RedirectStatusCode.PermanentRedirect) {\n res.setHeader('Refresh', `0;url=${redirect.destination}`);\n }\n res.end(redirect.destination);\n };\n await handleRedirect(result.value.props);\n return null;\n }\n }\n if (result.value.kind !== CachedRouteKind.PAGES) {\n throw Object.defineProperty(new Error(`Invariant: received non-pages cache entry in pages handler`), \"__NEXT_ERROR_CODE\", {\n value: \"E695\",\n enumerable: false,\n configurable: true\n });\n }\n // In dev, we should not cache pages for any reason.\n if (routeModule.isDev) {\n res.setHeader('Cache-Control', 'no-store, must-revalidate');\n }\n // Draft mode should never be cached\n if (isDraftMode) {\n res.setHeader('Cache-Control', 'private, no-cache, no-store, max-age=0, must-revalidate');\n }\n // when invoking _error before pages/500 we don't actually\n // send the _error response\n if (getRequestMeta(req, 'customErrorRender') || isErrorPage && isMinimalMode && res.statusCode === 500) {\n return null;\n }\n await sendRenderResult({\n req,\n res,\n // If we are rendering the error page it's not a data request\n // anymore\n result: isNextDataRequest && !isErrorPage && !is500Page ? new RenderResult(Buffer.from(JSON.stringify(result.value.pageData)), {\n contentType: JSON_CONTENT_TYPE_HEADER,\n metadata: result.value.html.metadata\n }) : result.value.html,\n generateEtags: nextConfig.generateEtags,\n poweredByHeader: nextConfig.poweredByHeader,\n cacheControl: routeModule.isDev ? undefined : cacheControl\n });\n };\n // TODO: activeSpan code path is for when wrapped by\n // next-server can be removed when this is no longer used\n if (activeSpan) {\n await handleResponse();\n } else {\n await tracer.withPropagatedContext(req.headers, ()=>tracer.trace(BaseServerSpan.handleRequest, {\n spanName: `${method} ${srcPage}`,\n kind: SpanKind.SERVER,\n attributes: {\n 'http.method': method,\n 'http.target': req.url\n }\n }, handleResponse));\n }\n } catch (err) {\n if (!(err instanceof NoFallbackError)) {\n await routeModule.onRequestError(req, err, {\n routerKind: 'Pages Router',\n routePath: srcPage,\n routeType: 'render',\n revalidateReason: getRevalidateReason({\n isStaticGeneration: hasStaticProps,\n isOnDemandRevalidate\n })\n }, routerServerContext);\n }\n // rethrow so that we can handle serving error page\n throw err;\n }\n };\n};\n\n//# sourceMappingURL=pages-handler.js.map","export const RSC_HEADER = 'rsc';\nexport const ACTION_HEADER = 'next-action';\n// TODO: Instead of sending the full router state, we only need to send the\n// segment path. Saves bytes. Then we could also use this field for segment\n// prefetches, which also need to specify a particular segment.\nexport const NEXT_ROUTER_STATE_TREE_HEADER = 'next-router-state-tree';\nexport const NEXT_ROUTER_PREFETCH_HEADER = 'next-router-prefetch';\n// This contains the path to the segment being prefetched.\n// TODO: If we change next-router-state-tree to be a segment path, we can use\n// that instead. Then next-router-prefetch and next-router-segment-prefetch can\n// be merged into a single enum.\nexport const NEXT_ROUTER_SEGMENT_PREFETCH_HEADER = 'next-router-segment-prefetch';\nexport const NEXT_HMR_REFRESH_HEADER = 'next-hmr-refresh';\nexport const NEXT_HMR_REFRESH_HASH_COOKIE = '__next_hmr_refresh_hash__';\nexport const NEXT_URL = 'next-url';\nexport const RSC_CONTENT_TYPE_HEADER = 'text/x-component';\nexport const FLIGHT_HEADERS = [\n RSC_HEADER,\n NEXT_ROUTER_STATE_TREE_HEADER,\n NEXT_ROUTER_PREFETCH_HEADER,\n NEXT_HMR_REFRESH_HEADER,\n NEXT_ROUTER_SEGMENT_PREFETCH_HEADER\n];\nexport const NEXT_RSC_UNION_QUERY = '_rsc';\nexport const NEXT_ROUTER_STALE_TIME_HEADER = 'x-nextjs-stale-time';\nexport const NEXT_DID_POSTPONE_HEADER = 'x-nextjs-postponed';\nexport const NEXT_REWRITTEN_PATH_HEADER = 'x-nextjs-rewritten-path';\nexport const NEXT_REWRITTEN_QUERY_HEADER = 'x-nextjs-rewritten-query';\nexport const NEXT_IS_PRERENDER_HEADER = 'x-nextjs-prerender';\nexport const NEXT_ACTION_NOT_FOUND_HEADER = 'x-nextjs-action-not-found';\nexport const NEXT_REQUEST_ID_HEADER = 'x-nextjs-request-id';\nexport const NEXT_HTML_REQUEST_ID_HEADER = 'x-nextjs-html-request-id';\n\n//# sourceMappingURL=app-router-headers.js.map","export var CachedRouteKind = /*#__PURE__*/ function(CachedRouteKind) {\n CachedRouteKind[\"APP_PAGE\"] = \"APP_PAGE\";\n CachedRouteKind[\"APP_ROUTE\"] = \"APP_ROUTE\";\n CachedRouteKind[\"PAGES\"] = \"PAGES\";\n CachedRouteKind[\"FETCH\"] = \"FETCH\";\n CachedRouteKind[\"REDIRECT\"] = \"REDIRECT\";\n CachedRouteKind[\"IMAGE\"] = \"IMAGE\";\n return CachedRouteKind;\n}({});\nexport var IncrementalCacheKind = /*#__PURE__*/ function(IncrementalCacheKind) {\n IncrementalCacheKind[\"APP_PAGE\"] = \"APP_PAGE\";\n IncrementalCacheKind[\"APP_ROUTE\"] = \"APP_ROUTE\";\n IncrementalCacheKind[\"PAGES\"] = \"PAGES\";\n IncrementalCacheKind[\"FETCH\"] = \"FETCH\";\n IncrementalCacheKind[\"IMAGE\"] = \"IMAGE\";\n return IncrementalCacheKind;\n}({});\n\n//# sourceMappingURL=types.js.map","export const ENCODED_TAGS = {\n // opening tags do not have the closing `>` since they can contain other attributes such as `<body className=''>`\n OPENING: {\n // <html\n HTML: new Uint8Array([\n 60,\n 104,\n 116,\n 109,\n 108\n ]),\n // <body\n BODY: new Uint8Array([\n 60,\n 98,\n 111,\n 100,\n 121\n ])\n },\n CLOSED: {\n // </head>\n HEAD: new Uint8Array([\n 60,\n 47,\n 104,\n 101,\n 97,\n 100,\n 62\n ]),\n // </body>\n BODY: new Uint8Array([\n 60,\n 47,\n 98,\n 111,\n 100,\n 121,\n 62\n ]),\n // </html>\n HTML: new Uint8Array([\n 60,\n 47,\n 104,\n 116,\n 109,\n 108,\n 62\n ]),\n // </body></html>\n BODY_AND_HTML: new Uint8Array([\n 60,\n 47,\n 98,\n 111,\n 100,\n 121,\n 62,\n 60,\n 47,\n 104,\n 116,\n 109,\n 108,\n 62\n ])\n },\n META: {\n // Only the match the prefix cause the suffix can be different wether it's xml compatible or not \">\" or \"/>\"\n // <meta name=\"«nxt-icon»\"\n // This is a special mark that will be replaced by the icon insertion script tag.\n ICON_MARK: new Uint8Array([\n 60,\n 109,\n 101,\n 116,\n 97,\n 32,\n 110,\n 97,\n 109,\n 101,\n 61,\n 34,\n 194,\n 171,\n 110,\n 120,\n 116,\n 45,\n 105,\n 99,\n 111,\n 110,\n 194,\n 187,\n 34\n ])\n }\n};\n\n//# sourceMappingURL=encoded-tags.js.map","export const MISSING_ROOT_TAGS_ERROR = 'NEXT_MISSING_ROOT_TAGS';\n\n//# sourceMappingURL=constants.js.map","export function searchParamsToUrlQuery(searchParams) {\n const query = {};\n for (const [key, value] of searchParams.entries()){\n const existing = query[key];\n if (typeof existing === 'undefined') {\n query[key] = value;\n } else if (Array.isArray(existing)) {\n existing.push(value);\n } else {\n query[key] = [\n existing,\n value\n ];\n }\n }\n return query;\n}\nfunction stringifyUrlQueryParam(param) {\n if (typeof param === 'string') {\n return param;\n }\n if (typeof param === 'number' && !isNaN(param) || typeof param === 'boolean') {\n return String(param);\n } else {\n return '';\n }\n}\nexport function urlQueryToSearchParams(query) {\n const searchParams = new URLSearchParams();\n for (const [key, value] of Object.entries(query)){\n if (Array.isArray(value)) {\n for (const item of value){\n searchParams.append(key, stringifyUrlQueryParam(item));\n }\n } else {\n searchParams.set(key, stringifyUrlQueryParam(value));\n }\n }\n return searchParams;\n}\nexport function assign(target, ...searchParamsList) {\n for (const searchParams of searchParamsList){\n for (const key of searchParams.keys()){\n target.delete(key);\n }\n for (const [key, value] of searchParams.entries()){\n target.append(key, value);\n }\n }\n return target;\n}\n\n//# sourceMappingURL=querystring.js.map","export function detectDomainLocale(domainItems, hostname, detectedLocale) {\n if (!domainItems) return;\n if (detectedLocale) {\n detectedLocale = detectedLocale.toLowerCase();\n }\n for (const item of domainItems){\n // remove port if present\n const domainHostname = item.domain?.split(':', 1)[0].toLowerCase();\n if (hostname === domainHostname || detectedLocale === item.defaultLocale.toLowerCase() || item.locales?.some((locale)=>locale.toLowerCase() === detectedLocale)) {\n return item;\n }\n }\n}\n\n//# sourceMappingURL=detect-domain-locale.js.map","export function getRevalidateReason(params) {\n if (params.isOnDemandRevalidate) {\n return 'on-demand';\n }\n if (params.isStaticGeneration) {\n return 'stale';\n }\n return undefined;\n}\n\n//# sourceMappingURL=utils.js.map","export class PageSignatureError extends Error {\n constructor({ page }){\n super(`The middleware \"${page}\" accepts an async API directly with the form:\n \n export function middleware(request, event) {\n return NextResponse.redirect('/new-location')\n }\n \n Read more: https://nextjs.org/docs/messages/middleware-new-signature\n `);\n }\n}\nexport class RemovedPageError extends Error {\n constructor(){\n super(`The request.page has been deprecated in favour of \\`URLPattern\\`.\n Read more: https://nextjs.org/docs/messages/middleware-request-page\n `);\n }\n}\nexport class RemovedUAError extends Error {\n constructor(){\n super(`The request.ua has been removed in favour of \\`userAgent\\` function.\n Read more: https://nextjs.org/docs/messages/middleware-parse-user-agent\n `);\n }\n}\n\n//# sourceMappingURL=error.js.map","export class InvariantError extends Error {\n constructor(message, options){\n super(`Invariant: ${message.endsWith('.') ? message : message + '.'} This is a bug in Next.js.`, options);\n this.name = 'InvariantError';\n }\n}\n\n//# sourceMappingURL=invariant-error.js.map","export var RedirectStatusCode = /*#__PURE__*/ function(RedirectStatusCode) {\n RedirectStatusCode[RedirectStatusCode[\"SeeOther\"] = 303] = \"SeeOther\";\n RedirectStatusCode[RedirectStatusCode[\"TemporaryRedirect\"] = 307] = \"TemporaryRedirect\";\n RedirectStatusCode[RedirectStatusCode[\"PermanentRedirect\"] = 308] = \"PermanentRedirect\";\n return RedirectStatusCode;\n}({});\n\n//# sourceMappingURL=redirect-status-code.js.map","export const TEXT_PLAIN_CONTENT_TYPE_HEADER = 'text/plain';\nexport const HTML_CONTENT_TYPE_HEADER = 'text/html; charset=utf-8';\nexport const JSON_CONTENT_TYPE_HEADER = 'application/json; charset=utf-8';\nexport const NEXT_QUERY_PARAM_PREFIX = 'nxtP';\nexport const NEXT_INTERCEPTION_MARKER_PREFIX = 'nxtI';\nexport const MATCHED_PATH_HEADER = 'x-matched-path';\nexport const PRERENDER_REVALIDATE_HEADER = 'x-prerender-revalidate';\nexport const PRERENDER_REVALIDATE_ONLY_GENERATED_HEADER = 'x-prerender-revalidate-if-generated';\nexport const RSC_PREFETCH_SUFFIX = '.prefetch.rsc';\nexport const RSC_SEGMENTS_DIR_SUFFIX = '.segments';\nexport const RSC_SEGMENT_SUFFIX = '.segment.rsc';\nexport const RSC_SUFFIX = '.rsc';\nexport const ACTION_SUFFIX = '.action';\nexport const NEXT_DATA_SUFFIX = '.json';\nexport const NEXT_META_SUFFIX = '.meta';\nexport const NEXT_BODY_SUFFIX = '.body';\nexport const NEXT_CACHE_TAGS_HEADER = 'x-next-cache-tags';\nexport const NEXT_CACHE_REVALIDATED_TAGS_HEADER = 'x-next-revalidated-tags';\nexport const NEXT_CACHE_REVALIDATE_TAG_TOKEN_HEADER = 'x-next-revalidate-tag-token';\nexport const NEXT_RESUME_HEADER = 'next-resume';\n// if these change make sure we update the related\n// documentation as well\nexport const NEXT_CACHE_TAG_MAX_ITEMS = 128;\nexport const NEXT_CACHE_TAG_MAX_LENGTH = 256;\nexport const NEXT_CACHE_SOFT_TAG_MAX_LENGTH = 1024;\nexport const NEXT_CACHE_IMPLICIT_TAG_ID = '_N_T_';\n// in seconds\nexport const CACHE_ONE_YEAR = 31536000;\n// in seconds, represents revalidate=false. I.e. never revaliate.\n// We use this value since it can be represented as a V8 SMI for optimal performance.\n// It can also be serialized as JSON if it ever leaks accidentally as an actual value.\nexport const INFINITE_CACHE = 0xfffffffe;\n// Patterns to detect middleware files\nexport const MIDDLEWARE_FILENAME = 'middleware';\nexport const MIDDLEWARE_LOCATION_REGEXP = `(?:src/)?${MIDDLEWARE_FILENAME}`;\n// Patterns to detect proxy files (replacement for middleware)\nexport const PROXY_FILENAME = 'proxy';\nexport const PROXY_LOCATION_REGEXP = `(?:src/)?${PROXY_FILENAME}`;\n// Pattern to detect instrumentation hooks file\nexport const INSTRUMENTATION_HOOK_FILENAME = 'instrumentation';\n// Because on Windows absolute paths in the generated code can break because of numbers, eg 1 in the path,\n// we have to use a private alias\nexport const PAGES_DIR_ALIAS = 'private-next-pages';\nexport const DOT_NEXT_ALIAS = 'private-dot-next';\nexport const ROOT_DIR_ALIAS = 'private-next-root-dir';\nexport const APP_DIR_ALIAS = 'private-next-app-dir';\nexport const RSC_MOD_REF_PROXY_ALIAS = 'private-next-rsc-mod-ref-proxy';\nexport const RSC_ACTION_VALIDATE_ALIAS = 'private-next-rsc-action-validate';\nexport const RSC_ACTION_PROXY_ALIAS = 'private-next-rsc-server-reference';\nexport const RSC_CACHE_WRAPPER_ALIAS = 'private-next-rsc-cache-wrapper';\nexport const RSC_DYNAMIC_IMPORT_WRAPPER_ALIAS = 'private-next-rsc-track-dynamic-import';\nexport const RSC_ACTION_ENCRYPTION_ALIAS = 'private-next-rsc-action-encryption';\nexport const RSC_ACTION_CLIENT_WRAPPER_ALIAS = 'private-next-rsc-action-client-wrapper';\nexport const PUBLIC_DIR_MIDDLEWARE_CONFLICT = `You can not have a '_next' folder inside of your public folder. This conflicts with the internal '/_next' route. https://nextjs.org/docs/messages/public-next-folder-conflict`;\nexport const SSG_GET_INITIAL_PROPS_CONFLICT = `You can not use getInitialProps with getStaticProps. To use SSG, please remove your getInitialProps`;\nexport const SERVER_PROPS_GET_INIT_PROPS_CONFLICT = `You can not use getInitialProps with getServerSideProps. Please remove getInitialProps.`;\nexport const SERVER_PROPS_SSG_CONFLICT = `You can not use getStaticProps or getStaticPaths with getServerSideProps. To use SSG, please remove getServerSideProps`;\nexport const STATIC_STATUS_PAGE_GET_INITIAL_PROPS_ERROR = `can not have getInitialProps/getServerSideProps, https://nextjs.org/docs/messages/404-get-initial-props`;\nexport const SERVER_PROPS_EXPORT_ERROR = `pages with \\`getServerSideProps\\` can not be exported. See more info here: https://nextjs.org/docs/messages/gssp-export`;\nexport const GSP_NO_RETURNED_VALUE = 'Your `getStaticProps` function did not return an object. Did you forget to add a `return`?';\nexport const GSSP_NO_RETURNED_VALUE = 'Your `getServerSideProps` function did not return an object. Did you forget to add a `return`?';\nexport const UNSTABLE_REVALIDATE_RENAME_ERROR = 'The `unstable_revalidate` property is available for general use.\\n' + 'Please use `revalidate` instead.';\nexport const GSSP_COMPONENT_MEMBER_ERROR = `can not be attached to a page's component and must be exported from the page. See more info here: https://nextjs.org/docs/messages/gssp-component-member`;\nexport const NON_STANDARD_NODE_ENV = `You are using a non-standard \"NODE_ENV\" value in your environment. This creates inconsistencies in the project and is strongly advised against. Read more: https://nextjs.org/docs/messages/non-standard-node-env`;\nexport const SSG_FALLBACK_EXPORT_ERROR = `Pages with \\`fallback\\` enabled in \\`getStaticPaths\\` can not be exported. See more info here: https://nextjs.org/docs/messages/ssg-fallback-true-export`;\nexport const ESLINT_DEFAULT_DIRS = [\n 'app',\n 'pages',\n 'components',\n 'lib',\n 'src'\n];\nexport const SERVER_RUNTIME = {\n edge: 'edge',\n experimentalEdge: 'experimental-edge',\n nodejs: 'nodejs'\n};\nexport const WEB_SOCKET_MAX_RECONNECTIONS = 12;\n/**\n * The names of the webpack layers. These layers are the primitives for the\n * webpack chunks.\n */ const WEBPACK_LAYERS_NAMES = {\n /**\n * The layer for the shared code between the client and server bundles.\n */ shared: 'shared',\n /**\n * The layer for server-only runtime and picking up `react-server` export conditions.\n * Including app router RSC pages and app router custom routes and metadata routes.\n */ reactServerComponents: 'rsc',\n /**\n * Server Side Rendering layer for app (ssr).\n */ serverSideRendering: 'ssr',\n /**\n * The browser client bundle layer for actions.\n */ actionBrowser: 'action-browser',\n /**\n * The Node.js bundle layer for the API routes.\n */ apiNode: 'api-node',\n /**\n * The Edge Lite bundle layer for the API routes.\n */ apiEdge: 'api-edge',\n /**\n * The layer for the middleware code.\n */ middleware: 'middleware',\n /**\n * The layer for the instrumentation hooks.\n */ instrument: 'instrument',\n /**\n * The layer for assets on the edge.\n */ edgeAsset: 'edge-asset',\n /**\n * The browser client bundle layer for App directory.\n */ appPagesBrowser: 'app-pages-browser',\n /**\n * The browser client bundle layer for Pages directory.\n */ pagesDirBrowser: 'pages-dir-browser',\n /**\n * The Edge Lite bundle layer for Pages directory.\n */ pagesDirEdge: 'pages-dir-edge',\n /**\n * The Node.js bundle layer for Pages directory.\n */ pagesDirNode: 'pages-dir-node'\n};\nconst WEBPACK_LAYERS = {\n ...WEBPACK_LAYERS_NAMES,\n GROUP: {\n builtinReact: [\n WEBPACK_LAYERS_NAMES.reactServerComponents,\n WEBPACK_LAYERS_NAMES.actionBrowser\n ],\n serverOnly: [\n WEBPACK_LAYERS_NAMES.reactServerComponents,\n WEBPACK_LAYERS_NAMES.actionBrowser,\n WEBPACK_LAYERS_NAMES.instrument,\n WEBPACK_LAYERS_NAMES.middleware\n ],\n neutralTarget: [\n // pages api\n WEBPACK_LAYERS_NAMES.apiNode,\n WEBPACK_LAYERS_NAMES.apiEdge\n ],\n clientOnly: [\n WEBPACK_LAYERS_NAMES.serverSideRendering,\n WEBPACK_LAYERS_NAMES.appPagesBrowser\n ],\n bundled: [\n WEBPACK_LAYERS_NAMES.reactServerComponents,\n WEBPACK_LAYERS_NAMES.actionBrowser,\n WEBPACK_LAYERS_NAMES.serverSideRendering,\n WEBPACK_LAYERS_NAMES.appPagesBrowser,\n WEBPACK_LAYERS_NAMES.shared,\n WEBPACK_LAYERS_NAMES.instrument,\n WEBPACK_LAYERS_NAMES.middleware\n ],\n appPages: [\n // app router pages and layouts\n WEBPACK_LAYERS_NAMES.reactServerComponents,\n WEBPACK_LAYERS_NAMES.serverSideRendering,\n WEBPACK_LAYERS_NAMES.appPagesBrowser,\n WEBPACK_LAYERS_NAMES.actionBrowser\n ]\n }\n};\nconst WEBPACK_RESOURCE_QUERIES = {\n edgeSSREntry: '__next_edge_ssr_entry__',\n metadata: '__next_metadata__',\n metadataRoute: '__next_metadata_route__',\n metadataImageMeta: '__next_metadata_image_meta__'\n};\nexport { WEBPACK_LAYERS, WEBPACK_RESOURCE_QUERIES };\n\n//# sourceMappingURL=constants.js.map","import { HTML_LIMITED_BOT_UA_RE } from './html-bots';\n// Bot crawler that will spin up a headless browser and execute JS.\n// Only the main Googlebot search crawler executes JavaScript, not other Google crawlers.\n// x-ref: https://developers.google.com/search/docs/crawling-indexing/google-common-crawlers\n// This regex specifically matches \"Googlebot\" but NOT \"Mediapartners-Google\", \"AdsBot-Google\", etc.\nconst HEADLESS_BROWSER_BOT_UA_RE = /Googlebot(?!-)|Googlebot$/i;\nexport const HTML_LIMITED_BOT_UA_RE_STRING = HTML_LIMITED_BOT_UA_RE.source;\nexport { HTML_LIMITED_BOT_UA_RE };\nfunction isDomBotUA(userAgent) {\n return HEADLESS_BROWSER_BOT_UA_RE.test(userAgent);\n}\nfunction isHtmlLimitedBotUA(userAgent) {\n return HTML_LIMITED_BOT_UA_RE.test(userAgent);\n}\nexport function isBot(userAgent) {\n return isDomBotUA(userAgent) || isHtmlLimitedBotUA(userAgent);\n}\nexport function getBotType(userAgent) {\n if (isDomBotUA(userAgent)) {\n return 'dom';\n }\n if (isHtmlLimitedBotUA(userAgent)) {\n return 'html';\n }\n return undefined;\n}\n\n//# sourceMappingURL=is-bot.js.map","import { hexHash } from '../../hash';\nexport function computeCacheBustingSearchParam(prefetchHeader, segmentPrefetchHeader, stateTreeHeader, nextUrlHeader) {\n if ((prefetchHeader === undefined || prefetchHeader === '0') && segmentPrefetchHeader === undefined && stateTreeHeader === undefined && nextUrlHeader === undefined) {\n return '';\n }\n return hexHash([\n prefetchHeader || '0',\n segmentPrefetchHeader || '0',\n stateTreeHeader || '0',\n nextUrlHeader || '0'\n ].join(','));\n}\n\n//# sourceMappingURL=cache-busting-search-param.js.map","import { CACHE_ONE_YEAR } from '../../lib/constants';\nexport function getCacheControlHeader({ revalidate, expire }) {\n const swrHeader = typeof revalidate === 'number' && expire !== undefined && revalidate < expire ? `, stale-while-revalidate=${expire - revalidate}` : '';\n if (revalidate === 0) {\n return 'private, no-cache, no-store, max-age=0, must-revalidate';\n } else if (typeof revalidate === 'number') {\n return `s-maxage=${revalidate}${swrHeader}`;\n }\n return `s-maxage=${CACHE_ONE_YEAR}${swrHeader}`;\n}\n\n//# sourceMappingURL=cache-control.js.map","// FIXME: (wyattjoh) this is a temporary solution to allow us to pass data between bundled modules\nexport const NEXT_REQUEST_META = Symbol.for('NextInternalRequestMeta');\nexport function getRequestMeta(req, key) {\n const meta = req[NEXT_REQUEST_META] || {};\n return typeof key === 'string' ? meta[key] : meta;\n}\n/**\n * Sets the request metadata.\n *\n * @param req the request to set the metadata on\n * @param meta the metadata to set\n * @returns the mutated request metadata\n */ export function setRequestMeta(req, meta) {\n req[NEXT_REQUEST_META] = meta;\n return meta;\n}\n/**\n * Adds a value to the request metadata.\n *\n * @param request the request to mutate\n * @param key the key to set\n * @param value the value to set\n * @returns the mutated request metadata\n */ export function addRequestMeta(request, key, value) {\n const meta = getRequestMeta(request);\n meta[key] = value;\n return setRequestMeta(request, meta);\n}\n/**\n * Removes a key from the request metadata.\n *\n * @param request the request to mutate\n * @param key the key to remove\n * @returns the mutated request metadata\n */ export function removeRequestMeta(request, key) {\n const meta = getRequestMeta(request);\n delete meta[key];\n return setRequestMeta(request, meta);\n}\n\n//# sourceMappingURL=request-meta.js.map","import { RedirectStatusCode } from '../client/components/redirect-status-code';\nexport const allowedStatusCodes = new Set([\n 301,\n 302,\n 303,\n 307,\n 308\n]);\nexport function getRedirectStatus(route) {\n return route.statusCode || (route.permanent ? RedirectStatusCode.PermanentRedirect : RedirectStatusCode.TemporaryRedirect);\n}\n// for redirects we restrict matching /_next and for all routes\n// we add an optional trailing slash at the end for easier\n// configuring between trailingSlash: true/false\nexport function modifyRouteRegex(regex, restrictedPaths) {\n if (restrictedPaths) {\n regex = regex.replace(/\\^/, `^(?!${restrictedPaths.map((path)=>path.replace(/\\//g, '\\\\/')).join('|')})`);\n }\n regex = regex.replace(/\\$$/, '(?:\\\\/)?$');\n return regex;\n}\n\n//# sourceMappingURL=redirect-status.js.map","import { LogSpanAllowList, NextVanillaSpanAllowlist } from './constants';\nimport { isThenable } from '../../../shared/lib/is-thenable';\nconst NEXT_OTEL_PERFORMANCE_PREFIX = process.env.NEXT_OTEL_PERFORMANCE_PREFIX;\nlet api;\n// we want to allow users to use their own version of @opentelemetry/api if they\n// want to, so we try to require it first, and if it fails we fall back to the\n// version that is bundled with Next.js\n// this is because @opentelemetry/api has to be synced with the version of\n// @opentelemetry/tracing that is used, and we don't want to force users to use\n// the version that is bundled with Next.js.\n// the API is ~stable, so this should be fine\nif (process.env.NEXT_RUNTIME === 'edge') {\n api = require('@opentelemetry/api');\n} else {\n try {\n api = require('@opentelemetry/api');\n } catch (err) {\n api = require('next/dist/compiled/@opentelemetry/api');\n }\n}\nconst { context, propagation, trace, SpanStatusCode, SpanKind, ROOT_CONTEXT } = api;\nexport class BubbledError extends Error {\n constructor(bubble, result){\n super(), this.bubble = bubble, this.result = result;\n }\n}\nexport function isBubbledError(error) {\n if (typeof error !== 'object' || error === null) return false;\n return error instanceof BubbledError;\n}\nconst closeSpanWithError = (span, error)=>{\n if (isBubbledError(error) && error.bubble) {\n span.setAttribute('next.bubble', true);\n } else {\n if (error) {\n span.recordException(error);\n span.setAttribute('error.type', error.name);\n }\n span.setStatus({\n code: SpanStatusCode.ERROR,\n message: error == null ? void 0 : error.message\n });\n }\n span.end();\n};\n/** we use this map to propagate attributes from nested spans to the top span */ const rootSpanAttributesStore = new Map();\nconst rootSpanIdKey = api.createContextKey('next.rootSpanId');\nlet lastSpanId = 0;\nconst getSpanId = ()=>lastSpanId++;\nconst clientTraceDataSetter = {\n set (carrier, key, value) {\n carrier.push({\n key,\n value\n });\n }\n};\nclass NextTracerImpl {\n /**\n * Returns an instance to the trace with configured name.\n * Since wrap / trace can be defined in any place prior to actual trace subscriber initialization,\n * This should be lazily evaluated.\n */ getTracerInstance() {\n return trace.getTracer('next.js', '0.0.1');\n }\n getContext() {\n return context;\n }\n getTracePropagationData() {\n const activeContext = context.active();\n const entries = [];\n propagation.inject(activeContext, entries, clientTraceDataSetter);\n return entries;\n }\n getActiveScopeSpan() {\n return trace.getSpan(context == null ? void 0 : context.active());\n }\n withPropagatedContext(carrier, fn, getter) {\n const activeContext = context.active();\n if (trace.getSpanContext(activeContext)) {\n // Active span is already set, too late to propagate.\n return fn();\n }\n const remoteContext = propagation.extract(activeContext, carrier, getter);\n return context.with(remoteContext, fn);\n }\n trace(...args) {\n const [type, fnOrOptions, fnOrEmpty] = args;\n // coerce options form overload\n const { fn, options } = typeof fnOrOptions === 'function' ? {\n fn: fnOrOptions,\n options: {}\n } : {\n fn: fnOrEmpty,\n options: {\n ...fnOrOptions\n }\n };\n const spanName = options.spanName ?? type;\n if (!NextVanillaSpanAllowlist.has(type) && process.env.NEXT_OTEL_VERBOSE !== '1' || options.hideSpan) {\n return fn();\n }\n // Trying to get active scoped span to assign parent. If option specifies parent span manually, will try to use it.\n let spanContext = this.getSpanContext((options == null ? void 0 : options.parentSpan) ?? this.getActiveScopeSpan());\n if (!spanContext) {\n spanContext = (context == null ? void 0 : context.active()) ?? ROOT_CONTEXT;\n }\n // Check if there's already a root span in the store for this trace\n // We are intentionally not checking whether there is an active context\n // from outside of nextjs to ensure that we can provide the same level\n // of telemetry when using a custom server\n const existingRootSpanId = spanContext.getValue(rootSpanIdKey);\n const isRootSpan = typeof existingRootSpanId !== 'number' || !rootSpanAttributesStore.has(existingRootSpanId);\n const spanId = getSpanId();\n options.attributes = {\n 'next.span_name': spanName,\n 'next.span_type': type,\n ...options.attributes\n };\n return context.with(spanContext.setValue(rootSpanIdKey, spanId), ()=>this.getTracerInstance().startActiveSpan(spanName, options, (span)=>{\n let startTime;\n if (NEXT_OTEL_PERFORMANCE_PREFIX && type && LogSpanAllowList.has(type)) {\n startTime = 'performance' in globalThis && 'measure' in performance ? globalThis.performance.now() : undefined;\n }\n let cleanedUp = false;\n const onCleanup = ()=>{\n if (cleanedUp) return;\n cleanedUp = true;\n rootSpanAttributesStore.delete(spanId);\n if (startTime) {\n performance.measure(`${NEXT_OTEL_PERFORMANCE_PREFIX}:next-${(type.split('.').pop() || '').replace(/[A-Z]/g, (match)=>'-' + match.toLowerCase())}`, {\n start: startTime,\n end: performance.now()\n });\n }\n };\n if (isRootSpan) {\n rootSpanAttributesStore.set(spanId, new Map(Object.entries(options.attributes ?? {})));\n }\n if (fn.length > 1) {\n try {\n return fn(span, (err)=>closeSpanWithError(span, err));\n } catch (err) {\n closeSpanWithError(span, err);\n throw err;\n } finally{\n onCleanup();\n }\n }\n try {\n const result = fn(span);\n if (isThenable(result)) {\n // If there's error make sure it throws\n return result.then((res)=>{\n span.end();\n // Need to pass down the promise result,\n // it could be react stream response with error { error, stream }\n return res;\n }).catch((err)=>{\n closeSpanWithError(span, err);\n throw err;\n }).finally(onCleanup);\n } else {\n span.end();\n onCleanup();\n }\n return result;\n } catch (err) {\n closeSpanWithError(span, err);\n onCleanup();\n throw err;\n }\n }));\n }\n wrap(...args) {\n const tracer = this;\n const [name, options, fn] = args.length === 3 ? args : [\n args[0],\n {},\n args[1]\n ];\n if (!NextVanillaSpanAllowlist.has(name) && process.env.NEXT_OTEL_VERBOSE !== '1') {\n return fn;\n }\n return function() {\n let optionsObj = options;\n if (typeof optionsObj === 'function' && typeof fn === 'function') {\n optionsObj = optionsObj.apply(this, arguments);\n }\n const lastArgId = arguments.length - 1;\n const cb = arguments[lastArgId];\n if (typeof cb === 'function') {\n const scopeBoundCb = tracer.getContext().bind(context.active(), cb);\n return tracer.trace(name, optionsObj, (_span, done)=>{\n arguments[lastArgId] = function(err) {\n done == null ? void 0 : done(err);\n return scopeBoundCb.apply(this, arguments);\n };\n return fn.apply(this, arguments);\n });\n } else {\n return tracer.trace(name, optionsObj, ()=>fn.apply(this, arguments));\n }\n };\n }\n startSpan(...args) {\n const [type, options] = args;\n const spanContext = this.getSpanContext((options == null ? void 0 : options.parentSpan) ?? this.getActiveScopeSpan());\n return this.getTracerInstance().startSpan(type, options, spanContext);\n }\n getSpanContext(parentSpan) {\n const spanContext = parentSpan ? trace.setSpan(context.active(), parentSpan) : undefined;\n return spanContext;\n }\n getRootSpanAttributes() {\n const spanId = context.active().getValue(rootSpanIdKey);\n return rootSpanAttributesStore.get(spanId);\n }\n setRootSpanAttribute(key, value) {\n const spanId = context.active().getValue(rootSpanIdKey);\n const attributes = rootSpanAttributesStore.get(spanId);\n if (attributes && !attributes.has(key)) {\n attributes.set(key, value);\n }\n }\n}\nconst getTracer = (()=>{\n const tracer = new NextTracerImpl();\n return ()=>tracer;\n})();\nexport { getTracer, SpanStatusCode, SpanKind };\n\n//# sourceMappingURL=tracer.js.map","import { isResSent } from '../shared/lib/utils';\nimport { generateETag } from './lib/etag';\nimport fresh from 'next/dist/compiled/fresh';\nimport { getCacheControlHeader } from './lib/cache-control';\nimport { HTML_CONTENT_TYPE_HEADER } from '../lib/constants';\nexport function sendEtagResponse(req, res, etag) {\n if (etag) {\n /**\n * The server generating a 304 response MUST generate any of the\n * following header fields that would have been sent in a 200 (OK)\n * response to the same request: Cache-Control, Content-Location, Date,\n * ETag, Expires, and Vary. https://tools.ietf.org/html/rfc7232#section-4.1\n */ res.setHeader('ETag', etag);\n }\n if (fresh(req.headers, {\n etag\n })) {\n res.statusCode = 304;\n res.end();\n return true;\n }\n return false;\n}\nexport async function sendRenderResult({ req, res, result, generateEtags, poweredByHeader, cacheControl }) {\n if (isResSent(res)) {\n return;\n }\n if (poweredByHeader && result.contentType === HTML_CONTENT_TYPE_HEADER) {\n res.setHeader('X-Powered-By', 'Next.js');\n }\n // If cache control is already set on the response we don't\n // override it to allow users to customize it via next.config\n if (cacheControl && !res.getHeader('Cache-Control')) {\n res.setHeader('Cache-Control', getCacheControlHeader(cacheControl));\n }\n const payload = result.isDynamic ? null : result.toUnchunkedString();\n if (generateEtags && payload !== null) {\n const etag = generateETag(payload);\n if (sendEtagResponse(req, res, etag)) {\n return;\n }\n }\n if (!res.getHeader('Content-Type') && result.contentType) {\n res.setHeader('Content-Type', result.contentType);\n }\n if (payload) {\n res.setHeader('Content-Length', Buffer.byteLength(payload));\n }\n if (req.method === 'HEAD') {\n res.end(null);\n return;\n }\n if (payload !== null) {\n res.end(payload);\n return;\n }\n // Pipe the render result to the response after we get a writer for it.\n await result.pipeToNodeResponse(res);\n}\n\n//# sourceMappingURL=send-payload.js.map","/**\n * Interop between \"export default\" and \"module.exports\".\n */ export function interopDefault(mod) {\n return mod.default || mod;\n}\n\n//# sourceMappingURL=interop-default.js.map","/**\n * Find the starting index of Uint8Array `b` within Uint8Array `a`.\n */ export function indexOfUint8Array(a, b) {\n if (b.length === 0) return 0;\n if (a.length === 0 || b.length > a.length) return -1;\n // start iterating through `a`\n for(let i = 0; i <= a.length - b.length; i++){\n let completeMatch = true;\n // from index `i`, iterate through `b` and check for mismatch\n for(let j = 0; j < b.length; j++){\n // if the values do not match, then this isn't a complete match, exit `b` iteration early and iterate to next index of `a`.\n if (a[i + j] !== b[j]) {\n completeMatch = false;\n break;\n }\n }\n if (completeMatch) {\n return i;\n }\n }\n return -1;\n}\n/**\n * Check if two Uint8Arrays are strictly equivalent.\n */ export function isEquivalentUint8Arrays(a, b) {\n if (a.length !== b.length) return false;\n for(let i = 0; i < a.length; i++){\n if (a[i] !== b[i]) return false;\n }\n return true;\n}\n/**\n * Remove Uint8Array `b` from Uint8Array `a`.\n *\n * If `b` is not in `a`, `a` is returned unchanged.\n *\n * Otherwise, the function returns a new Uint8Array instance with size `a.length - b.length`\n */ export function removeFromUint8Array(a, b) {\n const tagIndex = indexOfUint8Array(a, b);\n if (tagIndex === 0) return a.subarray(b.length);\n if (tagIndex > -1) {\n const removed = new Uint8Array(a.length - b.length);\n removed.set(a.slice(0, tagIndex));\n removed.set(a.slice(tagIndex + b.length), tagIndex);\n return removed;\n } else {\n return a;\n }\n}\n\n//# sourceMappingURL=uint8array-helpers.js.map","import { normalizeLocalePath } from '../../i18n/normalize-locale-path';\nimport { removePathPrefix } from './remove-path-prefix';\nimport { pathHasPrefix } from './path-has-prefix';\nexport function getNextPathnameInfo(pathname, options) {\n const { basePath, i18n, trailingSlash } = options.nextConfig ?? {};\n const info = {\n pathname,\n trailingSlash: pathname !== '/' ? pathname.endsWith('/') : trailingSlash\n };\n if (basePath && pathHasPrefix(info.pathname, basePath)) {\n info.pathname = removePathPrefix(info.pathname, basePath);\n info.basePath = basePath;\n }\n let pathnameNoDataPrefix = info.pathname;\n if (info.pathname.startsWith('/_next/data/') && info.pathname.endsWith('.json')) {\n const paths = info.pathname.replace(/^\\/_next\\/data\\//, '').replace(/\\.json$/, '').split('/');\n const buildId = paths[0];\n info.buildId = buildId;\n pathnameNoDataPrefix = paths[1] !== 'index' ? `/${paths.slice(1).join('/')}` : '/';\n // update pathname with normalized if enabled although\n // we use normalized to populate locale info still\n if (options.parseData === true) {\n info.pathname = pathnameNoDataPrefix;\n }\n }\n // If provided, use the locale route normalizer to detect the locale instead\n // of the function below.\n if (i18n) {\n let result = options.i18nProvider ? options.i18nProvider.analyze(info.pathname) : normalizeLocalePath(info.pathname, i18n.locales);\n info.locale = result.detectedLocale;\n info.pathname = result.pathname ?? info.pathname;\n if (!result.detectedLocale && info.buildId) {\n result = options.i18nProvider ? options.i18nProvider.analyze(pathnameNoDataPrefix) : normalizeLocalePath(pathnameNoDataPrefix, i18n.locales);\n if (result.detectedLocale) {\n info.locale = result.detectedLocale;\n }\n }\n }\n return info;\n}\n\n//# sourceMappingURL=get-next-pathname-info.js.map","/**\n * Web vitals provided to _app.reportWebVitals by Core Web Vitals plugin developed by Google Chrome team.\n * https://nextjs.org/blog/next-9-4#integrated-web-vitals-reporting\n */ export const WEB_VITALS = [\n 'CLS',\n 'FCP',\n 'FID',\n 'INP',\n 'LCP',\n 'TTFB'\n];\n/**\n * Utils\n */ export function execOnce(fn) {\n let used = false;\n let result;\n return (...args)=>{\n if (!used) {\n used = true;\n result = fn(...args);\n }\n return result;\n };\n}\n// Scheme: https://tools.ietf.org/html/rfc3986#section-3.1\n// Absolute URL: https://tools.ietf.org/html/rfc3986#section-4.3\nconst ABSOLUTE_URL_REGEX = /^[a-zA-Z][a-zA-Z\\d+\\-.]*?:/;\nexport const isAbsoluteUrl = (url)=>ABSOLUTE_URL_REGEX.test(url);\nexport function getLocationOrigin() {\n const { protocol, hostname, port } = window.location;\n return `${protocol}//${hostname}${port ? ':' + port : ''}`;\n}\nexport function getURL() {\n const { href } = window.location;\n const origin = getLocationOrigin();\n return href.substring(origin.length);\n}\nexport function getDisplayName(Component) {\n return typeof Component === 'string' ? Component : Component.displayName || Component.name || 'Unknown';\n}\nexport function isResSent(res) {\n return res.finished || res.headersSent;\n}\nexport function normalizeRepeatedSlashes(url) {\n const urlParts = url.split('?');\n const urlNoQuery = urlParts[0];\n return urlNoQuery// first we replace any non-encoded backslashes with forward\n // then normalize repeated forward slashes\n .replace(/\\\\/g, '/').replace(/\\/\\/+/g, '/') + (urlParts[1] ? `?${urlParts.slice(1).join('?')}` : '');\n}\nexport async function loadGetInitialProps(App, ctx) {\n if (process.env.NODE_ENV !== 'production') {\n if (App.prototype?.getInitialProps) {\n const message = `\"${getDisplayName(App)}.getInitialProps()\" is defined as an instance method - visit https://nextjs.org/docs/messages/get-initial-props-as-an-instance-method for more information.`;\n throw Object.defineProperty(new Error(message), \"__NEXT_ERROR_CODE\", {\n value: \"E394\",\n enumerable: false,\n configurable: true\n });\n }\n }\n // when called from _app `ctx` is nested in `ctx`\n const res = ctx.res || ctx.ctx && ctx.ctx.res;\n if (!App.getInitialProps) {\n if (ctx.ctx && ctx.Component) {\n // @ts-ignore pageProps default\n return {\n pageProps: await loadGetInitialProps(ctx.Component, ctx.ctx)\n };\n }\n return {};\n }\n const props = await App.getInitialProps(ctx);\n if (res && isResSent(res)) {\n return props;\n }\n if (!props) {\n const message = `\"${getDisplayName(App)}.getInitialProps()\" should resolve to an object. But found \"${props}\" instead.`;\n throw Object.defineProperty(new Error(message), \"__NEXT_ERROR_CODE\", {\n value: \"E394\",\n enumerable: false,\n configurable: true\n });\n }\n if (process.env.NODE_ENV !== 'production') {\n if (Object.keys(props).length === 0 && !ctx.ctx) {\n console.warn(`${getDisplayName(App)} returned an empty object from \\`getInitialProps\\`. This de-optimizes and prevents automatic static optimization. https://nextjs.org/docs/messages/empty-object-getInitialProps`);\n }\n }\n return props;\n}\nexport const SP = typeof performance !== 'undefined';\nexport const ST = SP && [\n 'mark',\n 'measure',\n 'getEntriesByName'\n].every((method)=>typeof performance[method] === 'function');\nexport class DecodeError extends Error {\n}\nexport class NormalizeError extends Error {\n}\nexport class PageNotFoundError extends Error {\n constructor(page){\n super();\n this.code = 'ENOENT';\n this.name = 'PageNotFoundError';\n this.message = `Cannot find module for page: ${page}`;\n }\n}\nexport class MissingStaticPage extends Error {\n constructor(page, message){\n super();\n this.message = `Failed to load static file for page: ${page} ${message}`;\n }\n}\nexport class MiddlewareNotFoundError extends Error {\n constructor(){\n super();\n this.code = 'ENOENT';\n this.message = `Cannot find the middleware module`;\n }\n}\nexport function stringifyError(error) {\n return JSON.stringify({\n message: error.message,\n stack: error.stack\n });\n}\n\n//# sourceMappingURL=utils.js.map","import { pathHasPrefix } from '../router/utils/path-has-prefix';\n/**\n * strip _next/data/<build-id>/ prefix and .json suffix\n */ export function normalizeDataPath(pathname) {\n if (!pathHasPrefix(pathname || '/', '/_next/data')) {\n return pathname;\n }\n pathname = pathname.replace(/\\/_next\\/data\\/[^/]{1,}/, '').replace(/\\.json$/, '');\n if (pathname === '/index') {\n return '/';\n }\n return pathname;\n}\n\n//# sourceMappingURL=normalize-data-path.js.map","import { chainStreams, streamFromBuffer, streamFromString, streamToString } from './stream-utils/node-web-streams-helper';\nimport { isAbortError, pipeToNodeResponse } from './pipe-readable';\nimport { InvariantError } from '../shared/lib/invariant-error';\nexport default class RenderResult {\n static #_ = /**\n * A render result that represents an empty response. This is used to\n * represent a response that was not found or was already sent.\n */ this.EMPTY = new RenderResult(null, {\n metadata: {},\n contentType: null\n });\n /**\n * Creates a new RenderResult instance from a static response.\n *\n * @param value the static response value\n * @param contentType the content type of the response\n * @returns a new RenderResult instance\n */ static fromStatic(value, contentType) {\n return new RenderResult(value, {\n metadata: {},\n contentType\n });\n }\n constructor(response, { contentType, waitUntil, metadata }){\n this.response = response;\n this.contentType = contentType;\n this.metadata = metadata;\n this.waitUntil = waitUntil;\n }\n assignMetadata(metadata) {\n Object.assign(this.metadata, metadata);\n }\n /**\n * Returns true if the response is null. It can be null if the response was\n * not found or was already sent.\n */ get isNull() {\n return this.response === null;\n }\n /**\n * Returns false if the response is a string. It can be a string if the page\n * was prerendered. If it's not, then it was generated dynamically.\n */ get isDynamic() {\n return typeof this.response !== 'string';\n }\n toUnchunkedString(stream = false) {\n if (this.response === null) {\n // If the response is null, return an empty string. This behavior is\n // intentional as we're now providing the `RenderResult.EMPTY` value.\n return '';\n }\n if (typeof this.response !== 'string') {\n if (!stream) {\n throw Object.defineProperty(new InvariantError('dynamic responses cannot be unchunked. This is a bug in Next.js'), \"__NEXT_ERROR_CODE\", {\n value: \"E732\",\n enumerable: false,\n configurable: true\n });\n }\n return streamToString(this.readable);\n }\n return this.response;\n }\n /**\n * Returns a readable stream of the response.\n */ get readable() {\n if (this.response === null) {\n // If the response is null, return an empty stream. This behavior is\n // intentional as we're now providing the `RenderResult.EMPTY` value.\n return new ReadableStream({\n start (controller) {\n controller.close();\n }\n });\n }\n if (typeof this.response === 'string') {\n return streamFromString(this.response);\n }\n if (Buffer.isBuffer(this.response)) {\n return streamFromBuffer(this.response);\n }\n // If the response is an array of streams, then chain them together.\n if (Array.isArray(this.response)) {\n return chainStreams(...this.response);\n }\n return this.response;\n }\n /**\n * Coerces the response to an array of streams. This will convert the response\n * to an array of streams if it is not already one.\n *\n * @returns An array of streams\n */ coerce() {\n if (this.response === null) {\n // If the response is null, return an empty stream. This behavior is\n // intentional as we're now providing the `RenderResult.EMPTY` value.\n return [];\n }\n if (typeof this.response === 'string') {\n return [\n streamFromString(this.response)\n ];\n } else if (Array.isArray(this.response)) {\n return this.response;\n } else if (Buffer.isBuffer(this.response)) {\n return [\n streamFromBuffer(this.response)\n ];\n } else {\n return [\n this.response\n ];\n }\n }\n /**\n * Unshifts a new stream to the response. This will convert the response to an\n * array of streams if it is not already one and will add the new stream to\n * the start of the array. When this response is piped, all of the streams\n * will be piped one after the other.\n *\n * @param readable The new stream to unshift\n */ unshift(readable) {\n // Coerce the response to an array of streams.\n this.response = this.coerce();\n // Add the new stream to the start of the array.\n this.response.unshift(readable);\n }\n /**\n * Chains a new stream to the response. This will convert the response to an\n * array of streams if it is not already one and will add the new stream to\n * the end. When this response is piped, all of the streams will be piped\n * one after the other.\n *\n * @param readable The new stream to chain\n */ push(readable) {\n // Coerce the response to an array of streams.\n this.response = this.coerce();\n // Add the new stream to the end of the array.\n this.response.push(readable);\n }\n /**\n * Pipes the response to a writable stream. This will close/cancel the\n * writable stream if an error is encountered. If this doesn't throw, then\n * the writable stream will be closed or aborted.\n *\n * @param writable Writable stream to pipe the response to\n */ async pipeTo(writable) {\n try {\n await this.readable.pipeTo(writable, {\n // We want to close the writable stream ourselves so that we can wait\n // for the waitUntil promise to resolve before closing it. If an error\n // is encountered, we'll abort the writable stream if we swallowed the\n // error.\n preventClose: true\n });\n // If there is a waitUntil promise, wait for it to resolve before\n // closing the writable stream.\n if (this.waitUntil) await this.waitUntil;\n // Close the writable stream.\n await writable.close();\n } catch (err) {\n // If this is an abort error, we should abort the writable stream (as we\n // took ownership of it when we started piping). We don't need to re-throw\n // because we handled the error.\n if (isAbortError(err)) {\n // Abort the writable stream if an error is encountered.\n await writable.abort(err);\n return;\n }\n // We're not aborting the writer here as when this method throws it's not\n // clear as to how so the caller should assume it's their responsibility\n // to clean up the writer.\n throw err;\n }\n }\n /**\n * Pipes the response to a node response. This will close/cancel the node\n * response if an error is encountered.\n *\n * @param res\n */ async pipeToNodeResponse(res) {\n await pipeToNodeResponse(this.readable, res, this.waitUntil);\n }\n}\n\n//# sourceMappingURL=render-result.js.map","import { detectDomainLocale } from '../../shared/lib/i18n/detect-domain-locale';\nimport { formatNextPathnameInfo } from '../../shared/lib/router/utils/format-next-pathname-info';\nimport { getHostname } from '../../shared/lib/get-hostname';\nimport { getNextPathnameInfo } from '../../shared/lib/router/utils/get-next-pathname-info';\nconst REGEX_LOCALHOST_HOSTNAME = /(?!^https?:\\/\\/)(127(?:\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}|\\[::1\\]|localhost)/;\nfunction parseURL(url, base) {\n return new URL(String(url).replace(REGEX_LOCALHOST_HOSTNAME, 'localhost'), base && String(base).replace(REGEX_LOCALHOST_HOSTNAME, 'localhost'));\n}\nconst Internal = Symbol('NextURLInternal');\nexport class NextURL {\n constructor(input, baseOrOpts, opts){\n let base;\n let options;\n if (typeof baseOrOpts === 'object' && 'pathname' in baseOrOpts || typeof baseOrOpts === 'string') {\n base = baseOrOpts;\n options = opts || {};\n } else {\n options = opts || baseOrOpts || {};\n }\n this[Internal] = {\n url: parseURL(input, base ?? options.base),\n options: options,\n basePath: ''\n };\n this.analyze();\n }\n analyze() {\n var _this_Internal_options_nextConfig_i18n, _this_Internal_options_nextConfig, _this_Internal_domainLocale, _this_Internal_options_nextConfig_i18n1, _this_Internal_options_nextConfig1;\n const info = getNextPathnameInfo(this[Internal].url.pathname, {\n nextConfig: this[Internal].options.nextConfig,\n parseData: !process.env.__NEXT_NO_MIDDLEWARE_URL_NORMALIZE,\n i18nProvider: this[Internal].options.i18nProvider\n });\n const hostname = getHostname(this[Internal].url, this[Internal].options.headers);\n this[Internal].domainLocale = this[Internal].options.i18nProvider ? this[Internal].options.i18nProvider.detectDomainLocale(hostname) : detectDomainLocale((_this_Internal_options_nextConfig = this[Internal].options.nextConfig) == null ? void 0 : (_this_Internal_options_nextConfig_i18n = _this_Internal_options_nextConfig.i18n) == null ? void 0 : _this_Internal_options_nextConfig_i18n.domains, hostname);\n const defaultLocale = ((_this_Internal_domainLocale = this[Internal].domainLocale) == null ? void 0 : _this_Internal_domainLocale.defaultLocale) || ((_this_Internal_options_nextConfig1 = this[Internal].options.nextConfig) == null ? void 0 : (_this_Internal_options_nextConfig_i18n1 = _this_Internal_options_nextConfig1.i18n) == null ? void 0 : _this_Internal_options_nextConfig_i18n1.defaultLocale);\n this[Internal].url.pathname = info.pathname;\n this[Internal].defaultLocale = defaultLocale;\n this[Internal].basePath = info.basePath ?? '';\n this[Internal].buildId = info.buildId;\n this[Internal].locale = info.locale ?? defaultLocale;\n this[Internal].trailingSlash = info.trailingSlash;\n }\n formatPathname() {\n return formatNextPathnameInfo({\n basePath: this[Internal].basePath,\n buildId: this[Internal].buildId,\n defaultLocale: !this[Internal].options.forceLocale ? this[Internal].defaultLocale : undefined,\n locale: this[Internal].locale,\n pathname: this[Internal].url.pathname,\n trailingSlash: this[Internal].trailingSlash\n });\n }\n formatSearch() {\n return this[Internal].url.search;\n }\n get buildId() {\n return this[Internal].buildId;\n }\n set buildId(buildId) {\n this[Internal].buildId = buildId;\n }\n get locale() {\n return this[Internal].locale ?? '';\n }\n set locale(locale) {\n var _this_Internal_options_nextConfig_i18n, _this_Internal_options_nextConfig;\n if (!this[Internal].locale || !((_this_Internal_options_nextConfig = this[Internal].options.nextConfig) == null ? void 0 : (_this_Internal_options_nextConfig_i18n = _this_Internal_options_nextConfig.i18n) == null ? void 0 : _this_Internal_options_nextConfig_i18n.locales.includes(locale))) {\n throw Object.defineProperty(new TypeError(`The NextURL configuration includes no locale \"${locale}\"`), \"__NEXT_ERROR_CODE\", {\n value: \"E597\",\n enumerable: false,\n configurable: true\n });\n }\n this[Internal].locale = locale;\n }\n get defaultLocale() {\n return this[Internal].defaultLocale;\n }\n get domainLocale() {\n return this[Internal].domainLocale;\n }\n get searchParams() {\n return this[Internal].url.searchParams;\n }\n get host() {\n return this[Internal].url.host;\n }\n set host(value) {\n this[Internal].url.host = value;\n }\n get hostname() {\n return this[Internal].url.hostname;\n }\n set hostname(value) {\n this[Internal].url.hostname = value;\n }\n get port() {\n return this[Internal].url.port;\n }\n set port(value) {\n this[Internal].url.port = value;\n }\n get protocol() {\n return this[Internal].url.protocol;\n }\n set protocol(value) {\n this[Internal].url.protocol = value;\n }\n get href() {\n const pathname = this.formatPathname();\n const search = this.formatSearch();\n return `${this.protocol}//${this.host}${pathname}${search}${this.hash}`;\n }\n set href(url) {\n this[Internal].url = parseURL(url);\n this.analyze();\n }\n get origin() {\n return this[Internal].url.origin;\n }\n get pathname() {\n return this[Internal].url.pathname;\n }\n set pathname(value) {\n this[Internal].url.pathname = value;\n }\n get hash() {\n return this[Internal].url.hash;\n }\n set hash(value) {\n this[Internal].url.hash = value;\n }\n get search() {\n return this[Internal].url.search;\n }\n set search(value) {\n this[Internal].url.search = value;\n }\n get password() {\n return this[Internal].url.password;\n }\n set password(value) {\n this[Internal].url.password = value;\n }\n get username() {\n return this[Internal].url.username;\n }\n set username(value) {\n this[Internal].url.username = value;\n }\n get basePath() {\n return this[Internal].basePath;\n }\n set basePath(value) {\n this[Internal].basePath = value.startsWith('/') ? value : `/${value}`;\n }\n toString() {\n return this.href;\n }\n toJSON() {\n return this.href;\n }\n [Symbol.for('edge-runtime.inspect.custom')]() {\n return {\n href: this.href,\n origin: this.origin,\n protocol: this.protocol,\n username: this.username,\n password: this.password,\n host: this.host,\n hostname: this.hostname,\n port: this.port,\n pathname: this.pathname,\n search: this.search,\n searchParams: this.searchParams,\n hash: this.hash\n };\n }\n clone() {\n return new NextURL(String(this), this[Internal].options);\n }\n}\n\n//# sourceMappingURL=next-url.js.map","import { removeTrailingSlash } from './remove-trailing-slash';\nimport { addPathPrefix } from './add-path-prefix';\nimport { addPathSuffix } from './add-path-suffix';\nimport { addLocale } from './add-locale';\nexport function formatNextPathnameInfo(info) {\n let pathname = addLocale(info.pathname, info.locale, info.buildId ? undefined : info.defaultLocale, info.ignorePrefix);\n if (info.buildId || !info.trailingSlash) {\n pathname = removeTrailingSlash(pathname);\n }\n if (info.buildId) {\n pathname = addPathSuffix(addPathPrefix(pathname, `/_next/data/${info.buildId}`), info.pathname === '/' ? 'index.json' : '.json');\n }\n pathname = addPathPrefix(pathname, info.basePath);\n return !info.buildId && info.trailingSlash ? !pathname.endsWith('/') ? addPathSuffix(pathname, '/') : pathname : removeTrailingSlash(pathname);\n}\n\n//# sourceMappingURL=format-next-pathname-info.js.map","import { NextURL } from '../next-url';\nimport { toNodeOutgoingHttpHeaders, validateURL } from '../utils';\nimport { RemovedUAError, RemovedPageError } from '../error';\nimport { RequestCookies } from './cookies';\nexport const INTERNALS = Symbol('internal request');\n/**\n * This class extends the [Web `Request` API](https://developer.mozilla.org/docs/Web/API/Request) with additional convenience methods.\n *\n * Read more: [Next.js Docs: `NextRequest`](https://nextjs.org/docs/app/api-reference/functions/next-request)\n */ export class NextRequest extends Request {\n constructor(input, init = {}){\n const url = typeof input !== 'string' && 'url' in input ? input.url : String(input);\n validateURL(url);\n // node Request instance requires duplex option when a body\n // is present or it errors, we don't handle this for\n // Request being passed in since it would have already\n // errored if this wasn't configured\n if (process.env.NEXT_RUNTIME !== 'edge') {\n if (init.body && init.duplex !== 'half') {\n init.duplex = 'half';\n }\n }\n if (input instanceof Request) super(input, init);\n else super(url, init);\n const nextUrl = new NextURL(url, {\n headers: toNodeOutgoingHttpHeaders(this.headers),\n nextConfig: init.nextConfig\n });\n this[INTERNALS] = {\n cookies: new RequestCookies(this.headers),\n nextUrl,\n url: process.env.__NEXT_NO_MIDDLEWARE_URL_NORMALIZE ? url : nextUrl.toString()\n };\n }\n [Symbol.for('edge-runtime.inspect.custom')]() {\n return {\n cookies: this.cookies,\n nextUrl: this.nextUrl,\n url: this.url,\n // rest of props come from Request\n bodyUsed: this.bodyUsed,\n cache: this.cache,\n credentials: this.credentials,\n destination: this.destination,\n headers: Object.fromEntries(this.headers),\n integrity: this.integrity,\n keepalive: this.keepalive,\n method: this.method,\n mode: this.mode,\n redirect: this.redirect,\n referrer: this.referrer,\n referrerPolicy: this.referrerPolicy,\n signal: this.signal\n };\n }\n get cookies() {\n return this[INTERNALS].cookies;\n }\n get nextUrl() {\n return this[INTERNALS].nextUrl;\n }\n /**\n * @deprecated\n * `page` has been deprecated in favour of `URLPattern`.\n * Read more: https://nextjs.org/docs/messages/middleware-request-page\n */ get page() {\n throw new RemovedPageError();\n }\n /**\n * @deprecated\n * `ua` has been removed in favour of \\`userAgent\\` function.\n * Read more: https://nextjs.org/docs/messages/middleware-parse-user-agent\n */ get ua() {\n throw new RemovedUAError();\n }\n get url() {\n return this[INTERNALS].url;\n }\n}\n\n//# sourceMappingURL=request.js.map","import { getRequestMeta } from '../../../request-meta';\nimport { fromNodeOutgoingHttpHeaders } from '../../utils';\nimport { NextRequest } from '../request';\nimport { isNodeNextRequest, isWebNextRequest } from '../../../base-http/helpers';\nexport const ResponseAbortedName = 'ResponseAborted';\nexport class ResponseAborted extends Error {\n constructor(...args){\n super(...args), this.name = ResponseAbortedName;\n }\n}\n/**\n * Creates an AbortController tied to the closing of a ServerResponse (or other\n * appropriate Writable).\n *\n * If the `close` event is fired before the `finish` event, then we'll send the\n * `abort` signal.\n */ export function createAbortController(response) {\n const controller = new AbortController();\n // If `finish` fires first, then `res.end()` has been called and the close is\n // just us finishing the stream on our side. If `close` fires first, then we\n // know the client disconnected before we finished.\n response.once('close', ()=>{\n if (response.writableFinished) return;\n controller.abort(new ResponseAborted());\n });\n return controller;\n}\n/**\n * Creates an AbortSignal tied to the closing of a ServerResponse (or other\n * appropriate Writable).\n *\n * This cannot be done with the request (IncomingMessage or Readable) because\n * the `abort` event will not fire if to data has been fully read (because that\n * will \"close\" the readable stream and nothing fires after that).\n */ export function signalFromNodeResponse(response) {\n const { errored, destroyed } = response;\n if (errored || destroyed) {\n return AbortSignal.abort(errored ?? new ResponseAborted());\n }\n const { signal } = createAbortController(response);\n return signal;\n}\nexport class NextRequestAdapter {\n static fromBaseNextRequest(request, signal) {\n if (// The type check here ensures that `req` is correctly typed, and the\n // environment variable check provides dead code elimination.\n process.env.NEXT_RUNTIME === 'edge' && isWebNextRequest(request)) {\n return NextRequestAdapter.fromWebNextRequest(request);\n } else if (// The type check here ensures that `req` is correctly typed, and the\n // environment variable check provides dead code elimination.\n process.env.NEXT_RUNTIME !== 'edge' && isNodeNextRequest(request)) {\n return NextRequestAdapter.fromNodeNextRequest(request, signal);\n } else {\n throw Object.defineProperty(new Error('Invariant: Unsupported NextRequest type'), \"__NEXT_ERROR_CODE\", {\n value: \"E345\",\n enumerable: false,\n configurable: true\n });\n }\n }\n static fromNodeNextRequest(request, signal) {\n // HEAD and GET requests can not have a body.\n let body = null;\n if (request.method !== 'GET' && request.method !== 'HEAD' && request.body) {\n // @ts-expect-error - this is handled by undici, when streams/web land use it instead\n body = request.body;\n }\n let url;\n if (request.url.startsWith('http')) {\n url = new URL(request.url);\n } else {\n // Grab the full URL from the request metadata.\n const base = getRequestMeta(request, 'initURL');\n if (!base || !base.startsWith('http')) {\n // Because the URL construction relies on the fact that the URL provided\n // is absolute, we need to provide a base URL. We can't use the request\n // URL because it's relative, so we use a dummy URL instead.\n url = new URL(request.url, 'http://n');\n } else {\n url = new URL(request.url, base);\n }\n }\n return new NextRequest(url, {\n method: request.method,\n headers: fromNodeOutgoingHttpHeaders(request.headers),\n duplex: 'half',\n signal,\n // geo\n // ip\n // nextConfig\n // body can not be passed if request was aborted\n // or we get a Request body was disturbed error\n ...signal.aborted ? {} : {\n body\n }\n });\n }\n static fromWebNextRequest(request) {\n // HEAD and GET requests can not have a body.\n let body = null;\n if (request.method !== 'GET' && request.method !== 'HEAD') {\n body = request.body;\n }\n return new NextRequest(request.url, {\n method: request.method,\n headers: fromNodeOutgoingHttpHeaders(request.headers),\n duplex: 'half',\n signal: request.request.signal,\n // geo\n // ip\n // nextConfig\n // body can not be passed if request was aborted\n // or we get a Request body was disturbed error\n ...request.request.signal.aborted ? {} : {\n body\n }\n });\n }\n}\n\n//# sourceMappingURL=next-request.js.map","import { CachedRouteKind, IncrementalCacheKind } from './types';\nimport RenderResult from '../render-result';\nimport { RouteKind } from '../route-kind';\nimport { HTML_CONTENT_TYPE_HEADER } from '../../lib/constants';\nexport async function fromResponseCacheEntry(cacheEntry) {\n var _cacheEntry_value, _cacheEntry_value1;\n return {\n ...cacheEntry,\n value: ((_cacheEntry_value = cacheEntry.value) == null ? void 0 : _cacheEntry_value.kind) === CachedRouteKind.PAGES ? {\n kind: CachedRouteKind.PAGES,\n html: await cacheEntry.value.html.toUnchunkedString(true),\n pageData: cacheEntry.value.pageData,\n headers: cacheEntry.value.headers,\n status: cacheEntry.value.status\n } : ((_cacheEntry_value1 = cacheEntry.value) == null ? void 0 : _cacheEntry_value1.kind) === CachedRouteKind.APP_PAGE ? {\n kind: CachedRouteKind.APP_PAGE,\n html: await cacheEntry.value.html.toUnchunkedString(true),\n postponed: cacheEntry.value.postponed,\n rscData: cacheEntry.value.rscData,\n headers: cacheEntry.value.headers,\n status: cacheEntry.value.status,\n segmentData: cacheEntry.value.segmentData\n } : cacheEntry.value\n };\n}\nexport async function toResponseCacheEntry(response) {\n var _response_value, _response_value1;\n if (!response) return null;\n return {\n isMiss: response.isMiss,\n isStale: response.isStale,\n cacheControl: response.cacheControl,\n value: ((_response_value = response.value) == null ? void 0 : _response_value.kind) === CachedRouteKind.PAGES ? {\n kind: CachedRouteKind.PAGES,\n html: RenderResult.fromStatic(response.value.html, HTML_CONTENT_TYPE_HEADER),\n pageData: response.value.pageData,\n headers: response.value.headers,\n status: response.value.status\n } : ((_response_value1 = response.value) == null ? void 0 : _response_value1.kind) === CachedRouteKind.APP_PAGE ? {\n kind: CachedRouteKind.APP_PAGE,\n html: RenderResult.fromStatic(response.value.html, HTML_CONTENT_TYPE_HEADER),\n rscData: response.value.rscData,\n headers: response.value.headers,\n status: response.value.status,\n postponed: response.value.postponed,\n segmentData: response.value.segmentData\n } : response.value\n };\n}\nexport function routeKindToIncrementalCacheKind(routeKind) {\n switch(routeKind){\n case RouteKind.PAGES:\n return IncrementalCacheKind.PAGES;\n case RouteKind.APP_PAGE:\n return IncrementalCacheKind.APP_PAGE;\n case RouteKind.IMAGE:\n return IncrementalCacheKind.IMAGE;\n case RouteKind.APP_ROUTE:\n return IncrementalCacheKind.APP_ROUTE;\n case RouteKind.PAGES_API:\n // Pages Router API routes are not cached in the incremental cache.\n throw Object.defineProperty(new Error(`Unexpected route kind ${routeKind}`), \"__NEXT_ERROR_CODE\", {\n value: \"E64\",\n enumerable: false,\n configurable: true\n });\n default:\n return routeKind;\n }\n}\n\n//# sourceMappingURL=utils.js.map","// This regex contains the bots that we need to do a blocking render for and can't safely stream the response\n// due to how they parse the DOM. For example, they might explicitly check for metadata in the `head` tag, so we can't stream metadata tags after the `head` was sent.\n// Note: The pattern [\\w-]+-Google captures all Google crawlers with \"-Google\" suffix (e.g., Mediapartners-Google, AdsBot-Google, Storebot-Google)\n// as well as crawlers starting with \"Google-\" (e.g., Google-PageRenderer, Google-InspectionTool)\nexport const HTML_LIMITED_BOT_UA_RE = /[\\w-]+-Google|Google-[\\w-]+|Chrome-Lighthouse|Slurp|DuckDuckBot|baiduspider|yandex|sogou|bitlybot|tumblr|vkShare|quora link preview|redditbot|ia_archiver|Bingbot|BingPreview|applebot|facebookexternalhit|facebookcatalog|Twitterbot|LinkedInBot|Slackbot|Discordbot|WhatsApp|SkypeUriPreview|Yeti|googleweblight/i;\n\n//# sourceMappingURL=html-bots.js.map","/**\n * Given a path this function will find the pathname, query and hash and return\n * them. This is useful to parse full paths on the client side.\n * @param path A path to parse e.g. /foo/bar?id=1#hash\n */ export function parsePath(path) {\n const hashIndex = path.indexOf('#');\n const queryIndex = path.indexOf('?');\n const hasQuery = queryIndex > -1 && (hashIndex < 0 || queryIndex < hashIndex);\n if (hasQuery || hashIndex > -1) {\n return {\n pathname: path.substring(0, hasQuery ? queryIndex : hashIndex),\n query: hasQuery ? path.substring(queryIndex, hashIndex > -1 ? hashIndex : undefined) : '',\n hash: hashIndex > -1 ? path.slice(hashIndex) : ''\n };\n }\n return {\n pathname: path,\n query: '',\n hash: ''\n };\n}\n\n//# sourceMappingURL=parse-path.js.map","import { DetachedPromise } from './detached-promise';\n/**\n * A wrapper for a function that will only allow one call to the function to\n * execute at a time.\n */ export class Batcher {\n constructor(cacheKeyFn, /**\n * A function that will be called to schedule the wrapped function to be\n * executed. This defaults to a function that will execute the function\n * immediately.\n */ schedulerFn = (fn)=>fn()){\n this.cacheKeyFn = cacheKeyFn;\n this.schedulerFn = schedulerFn;\n this.pending = new Map();\n }\n static create(options) {\n return new Batcher(options == null ? void 0 : options.cacheKeyFn, options == null ? void 0 : options.schedulerFn);\n }\n /**\n * Wraps a function in a promise that will be resolved or rejected only once\n * for a given key. This will allow multiple calls to the function to be\n * made, but only one will be executed at a time. The result of the first\n * call will be returned to all callers.\n *\n * @param key the key to use for the cache\n * @param fn the function to wrap\n * @returns a promise that resolves to the result of the function\n */ async batch(key, fn) {\n const cacheKey = this.cacheKeyFn ? await this.cacheKeyFn(key) : key;\n if (cacheKey === null) {\n return fn({\n resolve: (value)=>Promise.resolve(value),\n key\n });\n }\n const pending = this.pending.get(cacheKey);\n if (pending) return pending;\n const { promise, resolve, reject } = new DetachedPromise();\n this.pending.set(cacheKey, promise);\n this.schedulerFn(async ()=>{\n try {\n const result = await fn({\n resolve,\n key\n });\n // Resolving a promise multiple times is a no-op, so we can safely\n // resolve all pending promises with the same result.\n resolve(result);\n } catch (err) {\n reject(err);\n } finally{\n this.pending.delete(cacheKey);\n }\n });\n return promise;\n }\n}\n\n//# sourceMappingURL=batcher.js.map","import { parsePath } from './parse-path';\n/**\n * Adds the provided prefix to the given path. It first ensures that the path\n * is indeed starting with a slash.\n */ export function addPathPrefix(path, prefix) {\n if (!path.startsWith('/') || !prefix) {\n return path;\n }\n const { pathname, query, hash } = parsePath(path);\n return `${prefix}${pathname}${query}${hash}`;\n}\n\n//# sourceMappingURL=add-path-prefix.js.map","import { Batcher } from '../../lib/batcher';\nimport { scheduleOnNextTick } from '../../lib/scheduler';\nimport { fromResponseCacheEntry, routeKindToIncrementalCacheKind, toResponseCacheEntry } from './utils';\nexport * from './types';\nexport default class ResponseCache {\n constructor(minimal_mode){\n this.getBatcher = Batcher.create({\n // Ensure on-demand revalidate doesn't block normal requests, it should be\n // safe to run an on-demand revalidate for the same key as a normal request.\n cacheKeyFn: ({ key, isOnDemandRevalidate })=>`${key}-${isOnDemandRevalidate ? '1' : '0'}`,\n // We wait to do any async work until after we've added our promise to\n // `pendingResponses` to ensure that any any other calls will reuse the\n // same promise until we've fully finished our work.\n schedulerFn: scheduleOnNextTick\n });\n this.revalidateBatcher = Batcher.create({\n // We wait to do any async work until after we've added our promise to\n // `pendingResponses` to ensure that any any other calls will reuse the\n // same promise until we've fully finished our work.\n schedulerFn: scheduleOnNextTick\n });\n this.minimal_mode = minimal_mode;\n }\n /**\n * Gets the response cache entry for the given key.\n *\n * @param key - The key to get the response cache entry for.\n * @param responseGenerator - The response generator to use to generate the response cache entry.\n * @param context - The context for the get request.\n * @returns The response cache entry.\n */ async get(key, responseGenerator, context) {\n var _this_previousCacheItem;\n // If there is no key for the cache, we can't possibly look this up in the\n // cache so just return the result of the response generator.\n if (!key) {\n return responseGenerator({\n hasResolved: false,\n previousCacheEntry: null\n });\n }\n // Check minimal mode cache before doing any other work\n if (this.minimal_mode && ((_this_previousCacheItem = this.previousCacheItem) == null ? void 0 : _this_previousCacheItem.key) === key && this.previousCacheItem.expiresAt > Date.now()) {\n return toResponseCacheEntry(this.previousCacheItem.entry);\n }\n const { incrementalCache, isOnDemandRevalidate = false, isFallback = false, isRoutePPREnabled = false, isPrefetch = false, waitUntil, routeKind } = context;\n const response = await this.getBatcher.batch({\n key,\n isOnDemandRevalidate\n }, ({ resolve })=>{\n const promise = this.handleGet(key, responseGenerator, {\n incrementalCache,\n isOnDemandRevalidate,\n isFallback,\n isRoutePPREnabled,\n isPrefetch,\n routeKind\n }, resolve);\n // We need to ensure background revalidates are passed to waitUntil.\n if (waitUntil) waitUntil(promise);\n return promise;\n });\n return toResponseCacheEntry(response);\n }\n /**\n * Handles the get request for the response cache.\n *\n * @param key - The key to get the response cache entry for.\n * @param responseGenerator - The response generator to use to generate the response cache entry.\n * @param context - The context for the get request.\n * @param resolve - The resolve function to use to resolve the response cache entry.\n * @returns The response cache entry.\n */ async handleGet(key, responseGenerator, context, resolve) {\n let previousIncrementalCacheEntry = null;\n let resolved = false;\n try {\n // Get the previous cache entry if not in minimal mode\n previousIncrementalCacheEntry = !this.minimal_mode ? await context.incrementalCache.get(key, {\n kind: routeKindToIncrementalCacheKind(context.routeKind),\n isRoutePPREnabled: context.isRoutePPREnabled,\n isFallback: context.isFallback\n }) : null;\n if (previousIncrementalCacheEntry && !context.isOnDemandRevalidate) {\n resolve(previousIncrementalCacheEntry);\n resolved = true;\n if (!previousIncrementalCacheEntry.isStale || context.isPrefetch) {\n // The cached value is still valid, so we don't need to update it yet.\n return previousIncrementalCacheEntry;\n }\n }\n // Revalidate the cache entry\n const incrementalResponseCacheEntry = await this.revalidate(key, context.incrementalCache, context.isRoutePPREnabled, context.isFallback, responseGenerator, previousIncrementalCacheEntry, previousIncrementalCacheEntry !== null && !context.isOnDemandRevalidate);\n // Handle null response\n if (!incrementalResponseCacheEntry) {\n // Unset the previous cache item if it was set so we don't use it again.\n if (this.minimal_mode) this.previousCacheItem = undefined;\n return null;\n }\n // Resolve for on-demand revalidation or if not already resolved\n if (context.isOnDemandRevalidate && !resolved) {\n return incrementalResponseCacheEntry;\n }\n return incrementalResponseCacheEntry;\n } catch (err) {\n // If we've already resolved the cache entry, we can't reject as we\n // already resolved the cache entry so log the error here.\n if (resolved) {\n console.error(err);\n return null;\n }\n throw err;\n }\n }\n /**\n * Revalidates the cache entry for the given key.\n *\n * @param key - The key to revalidate the cache entry for.\n * @param incrementalCache - The incremental cache to use to revalidate the cache entry.\n * @param isRoutePPREnabled - Whether the route is PPR enabled.\n * @param isFallback - Whether the route is a fallback.\n * @param responseGenerator - The response generator to use to generate the response cache entry.\n * @param previousIncrementalCacheEntry - The previous cache entry to use to revalidate the cache entry.\n * @param hasResolved - Whether the response has been resolved.\n * @returns The revalidated cache entry.\n */ async revalidate(key, incrementalCache, isRoutePPREnabled, isFallback, responseGenerator, previousIncrementalCacheEntry, hasResolved, waitUntil) {\n return this.revalidateBatcher.batch(key, ()=>{\n const promise = this.handleRevalidate(key, incrementalCache, isRoutePPREnabled, isFallback, responseGenerator, previousIncrementalCacheEntry, hasResolved);\n // We need to ensure background revalidates are passed to waitUntil.\n if (waitUntil) waitUntil(promise);\n return promise;\n });\n }\n async handleRevalidate(key, incrementalCache, isRoutePPREnabled, isFallback, responseGenerator, previousIncrementalCacheEntry, hasResolved) {\n try {\n // Generate the response cache entry using the response generator.\n const responseCacheEntry = await responseGenerator({\n hasResolved,\n previousCacheEntry: previousIncrementalCacheEntry,\n isRevalidating: true\n });\n if (!responseCacheEntry) {\n return null;\n }\n // Convert the response cache entry to an incremental response cache entry.\n const incrementalResponseCacheEntry = await fromResponseCacheEntry({\n ...responseCacheEntry,\n isMiss: !previousIncrementalCacheEntry\n });\n // We want to persist the result only if it has a cache control value\n // defined.\n if (incrementalResponseCacheEntry.cacheControl) {\n if (this.minimal_mode) {\n this.previousCacheItem = {\n key,\n entry: incrementalResponseCacheEntry,\n expiresAt: Date.now() + 1000\n };\n } else {\n await incrementalCache.set(key, incrementalResponseCacheEntry.value, {\n cacheControl: incrementalResponseCacheEntry.cacheControl,\n isRoutePPREnabled,\n isFallback\n });\n }\n }\n return incrementalResponseCacheEntry;\n } catch (err) {\n // When a path is erroring we automatically re-set the existing cache\n // with new revalidate and expire times to prevent non-stop retrying.\n if (previousIncrementalCacheEntry == null ? void 0 : previousIncrementalCacheEntry.cacheControl) {\n const revalidate = Math.min(Math.max(previousIncrementalCacheEntry.cacheControl.revalidate || 3, 3), 30);\n const expire = previousIncrementalCacheEntry.cacheControl.expire === undefined ? undefined : Math.max(revalidate + 3, previousIncrementalCacheEntry.cacheControl.expire);\n await incrementalCache.set(key, previousIncrementalCacheEntry.value, {\n cacheControl: {\n revalidate: revalidate,\n expire: expire\n },\n isRoutePPREnabled,\n isFallback\n });\n }\n // We haven't resolved yet, so let's throw to indicate an error.\n throw err;\n }\n }\n}\n\n//# sourceMappingURL=index.js.map","import { ResponseAbortedName, createAbortController } from './web/spec-extension/adapters/next-request';\nimport { DetachedPromise } from '../lib/detached-promise';\nimport { getTracer } from './lib/trace/tracer';\nimport { NextNodeServerSpan } from './lib/trace/constants';\nimport { getClientComponentLoaderMetrics } from './client-component-renderer-logger';\nexport function isAbortError(e) {\n return (e == null ? void 0 : e.name) === 'AbortError' || (e == null ? void 0 : e.name) === ResponseAbortedName;\n}\nfunction createWriterFromResponse(res, waitUntilForEnd) {\n let started = false;\n // Create a promise that will resolve once the response has drained. See\n // https://nodejs.org/api/stream.html#stream_event_drain\n let drained = new DetachedPromise();\n function onDrain() {\n drained.resolve();\n }\n res.on('drain', onDrain);\n // If the finish event fires, it means we shouldn't block and wait for the\n // drain event.\n res.once('close', ()=>{\n res.off('drain', onDrain);\n drained.resolve();\n });\n // Create a promise that will resolve once the response has finished. See\n // https://nodejs.org/api/http.html#event-finish_1\n const finished = new DetachedPromise();\n res.once('finish', ()=>{\n finished.resolve();\n });\n // Create a writable stream that will write to the response.\n return new WritableStream({\n write: async (chunk)=>{\n // You'd think we'd want to use `start` instead of placing this in `write`\n // but this ensures that we don't actually flush the headers until we've\n // started writing chunks.\n if (!started) {\n started = true;\n if ('performance' in globalThis && process.env.NEXT_OTEL_PERFORMANCE_PREFIX) {\n const metrics = getClientComponentLoaderMetrics();\n if (metrics) {\n performance.measure(`${process.env.NEXT_OTEL_PERFORMANCE_PREFIX}:next-client-component-loading`, {\n start: metrics.clientComponentLoadStart,\n end: metrics.clientComponentLoadStart + metrics.clientComponentLoadTimes\n });\n }\n }\n res.flushHeaders();\n getTracer().trace(NextNodeServerSpan.startResponse, {\n spanName: 'start response'\n }, ()=>undefined);\n }\n try {\n const ok = res.write(chunk);\n // Added by the `compression` middleware, this is a function that will\n // flush the partially-compressed response to the client.\n if ('flush' in res && typeof res.flush === 'function') {\n res.flush();\n }\n // If the write returns false, it means there's some backpressure, so\n // wait until it's streamed before continuing.\n if (!ok) {\n await drained.promise;\n // Reset the drained promise so that we can wait for the next drain event.\n drained = new DetachedPromise();\n }\n } catch (err) {\n res.end();\n throw Object.defineProperty(new Error('failed to write chunk to response', {\n cause: err\n }), \"__NEXT_ERROR_CODE\", {\n value: \"E321\",\n enumerable: false,\n configurable: true\n });\n }\n },\n abort: (err)=>{\n if (res.writableFinished) return;\n res.destroy(err);\n },\n close: async ()=>{\n // if a waitUntil promise was passed, wait for it to resolve before\n // ending the response.\n if (waitUntilForEnd) {\n await waitUntilForEnd;\n }\n if (res.writableFinished) return;\n res.end();\n return finished.promise;\n }\n });\n}\nexport async function pipeToNodeResponse(readable, res, waitUntilForEnd) {\n try {\n // If the response has already errored, then just return now.\n const { errored, destroyed } = res;\n if (errored || destroyed) return;\n // Create a new AbortController so that we can abort the readable if the\n // client disconnects.\n const controller = createAbortController(res);\n const writer = createWriterFromResponse(res, waitUntilForEnd);\n await readable.pipeTo(writer, {\n signal: controller.signal\n });\n } catch (err) {\n // If this isn't related to an abort error, re-throw it.\n if (isAbortError(err)) return;\n throw Object.defineProperty(new Error('failed to pipe response', {\n cause: err\n }), \"__NEXT_ERROR_CODE\", {\n value: \"E180\",\n enumerable: false,\n configurable: true\n });\n }\n}\n\n//# sourceMappingURL=pipe-readable.js.map","/**\n * A `Promise.withResolvers` implementation that exposes the `resolve` and\n * `reject` functions on a `Promise`.\n *\n * @see https://tc39.es/proposal-promise-with-resolvers/\n */ export class DetachedPromise {\n constructor(){\n let resolve;\n let reject;\n // Create the promise and assign the resolvers to the object.\n this.promise = new Promise((res, rej)=>{\n resolve = res;\n reject = rej;\n });\n // We know that resolvers is defined because the Promise constructor runs\n // synchronously.\n this.resolve = resolve;\n this.reject = reject;\n }\n}\n\n//# sourceMappingURL=detached-promise.js.map","/**\n * Takes an object with a hostname property (like a parsed URL) and some\n * headers that may contain Host and returns the preferred hostname.\n * @param parsed An object containing a hostname property.\n * @param headers A dictionary with headers containing a `host`.\n */ export function getHostname(parsed, headers) {\n // Get the hostname from the headers if it exists, otherwise use the parsed\n // hostname.\n let hostname;\n if (headers?.host && !Array.isArray(headers.host)) {\n hostname = headers.host.toString().split(':', 1)[0];\n } else if (parsed.hostname) {\n hostname = parsed.hostname;\n } else return;\n return hostname.toLowerCase();\n}\n\n//# sourceMappingURL=get-hostname.js.map","import { parsePath } from './parse-path';\n/**\n * Similarly to `addPathPrefix`, this function adds a suffix at the end on the\n * provided path. It also works only for paths ensuring the argument starts\n * with a slash.\n */ export function addPathSuffix(path, suffix) {\n if (!path.startsWith('/') || !suffix) {\n return path;\n }\n const { pathname, query, hash } = parsePath(path);\n return `${pathname}${suffix}${query}${hash}`;\n}\n\n//# sourceMappingURL=add-path-suffix.js.map","/**\n * Schedules a function to be called on the next tick after the other promises\n * have been resolved.\n *\n * @param cb the function to schedule\n */ export const scheduleOnNextTick = (cb)=>{\n // We use Promise.resolve().then() here so that the operation is scheduled at\n // the end of the promise job queue, we then add it to the next process tick\n // to ensure it's evaluated afterwards.\n //\n // This was inspired by the implementation of the DataLoader interface: https://github.com/graphql/dataloader/blob/d336bd15282664e0be4b4a657cb796f09bafbc6b/src/index.js#L213-L255\n //\n Promise.resolve().then(()=>{\n if (process.env.NEXT_RUNTIME === 'edge') {\n setTimeout(cb, 0);\n } else {\n process.nextTick(cb);\n }\n });\n};\n/**\n * Schedules a function to be called using `setImmediate` or `setTimeout` if\n * `setImmediate` is not available (like in the Edge runtime).\n *\n * @param cb the function to schedule\n */ export const scheduleImmediate = (cb)=>{\n if (process.env.NEXT_RUNTIME === 'edge') {\n setTimeout(cb, 0);\n } else {\n setImmediate(cb);\n }\n};\n/**\n * returns a promise than resolves in a future task. There is no guarantee that the task it resolves in\n * will be the next task but if you await it you can at least be sure that the current task is over and\n * most usefully that the entire microtask queue of the current task has been emptied.\n */ export function atLeastOneTask() {\n return new Promise((resolve)=>scheduleImmediate(resolve));\n}\n/**\n * This utility function is extracted to make it easier to find places where we are doing\n * specific timing tricks to try to schedule work after React has rendered. This is especially\n * important at the moment because Next.js uses the edge builds of React which use setTimeout to\n * schedule work when you might expect that something like setImmediate would do the trick.\n *\n * Long term we should switch to the node versions of React rendering when possible and then\n * update this to use setImmediate rather than setTimeout\n */ export function waitAtLeastOneReactRenderTask() {\n if (process.env.NEXT_RUNTIME === 'edge') {\n return new Promise((r)=>setTimeout(r, 0));\n } else {\n return new Promise((r)=>setImmediate(r));\n }\n}\n\n//# sourceMappingURL=scheduler.js.map","/**\n * Check to see if a value is Thenable.\n *\n * @param promise the maybe-thenable value\n * @returns true if the value is thenable\n */ export function isThenable(promise) {\n return promise !== null && typeof promise === 'object' && 'then' in promise && typeof promise.then === 'function';\n}\n\n//# sourceMappingURL=is-thenable.js.map","/**\n * Removes the trailing slash for a given route or page path. Preserves the\n * root page. Examples:\n * - `/foo/bar/` -> `/foo/bar`\n * - `/foo/bar` -> `/foo/bar`\n * - `/` -> `/`\n */ export function removeTrailingSlash(route) {\n return route.replace(/\\/$/, '') || '/';\n}\n\n//# sourceMappingURL=remove-trailing-slash.js.map","import { addPathPrefix } from './add-path-prefix';\nimport { pathHasPrefix } from './path-has-prefix';\n/**\n * For a given path and a locale, if the locale is given, it will prefix the\n * locale. The path shouldn't be an API path. If a default locale is given the\n * prefix will be omitted if the locale is already the default locale.\n */ export function addLocale(path, locale, defaultLocale, ignorePrefix) {\n // If no locale was given or the locale is the default locale, we don't need\n // to prefix the path.\n if (!locale || locale === defaultLocale) return path;\n const lower = path.toLowerCase();\n // If the path is an API path or the path already has the locale prefix, we\n // don't need to prefix the path.\n if (!ignorePrefix) {\n if (pathHasPrefix(lower, '/api')) return path;\n if (pathHasPrefix(lower, `/${locale.toLowerCase()}`)) return path;\n }\n // Add the locale prefix to the path.\n return addPathPrefix(path, `/${locale}`);\n}\n\n//# sourceMappingURL=add-locale.js.map","// http://www.cse.yorku.ca/~oz/hash.html\n// More specifically, 32-bit hash via djbxor\n// (ref: https://gist.github.com/eplawless/52813b1d8ad9af510d85?permalink_comment_id=3367765#gistcomment-3367765)\n// This is due to number type differences between rust for turbopack to js number types,\n// where rust does not have easy way to repreesnt js's 53-bit float number type for the matching\n// overflow behavior. This is more `correct` in terms of having canonical hash across different runtime / implementation\n// as can gaurantee determinstic output from 32bit hash.\nexport function djb2Hash(str) {\n let hash = 5381;\n for(let i = 0; i < str.length; i++){\n const char = str.charCodeAt(i);\n hash = (hash << 5) + hash + char & 0xffffffff;\n }\n return hash >>> 0;\n}\nexport function hexHash(str) {\n return djb2Hash(str).toString(36).slice(0, 5);\n}\n\n//# sourceMappingURL=hash.js.map","import { parsePath } from './parse-path';\n/**\n * Checks if a given path starts with a given prefix. It ensures it matches\n * exactly without containing extra chars. e.g. prefix /docs should replace\n * for /docs, /docs/, /docs/a but not /docsss\n * @param path The path to check.\n * @param prefix The prefix to check against.\n */ export function pathHasPrefix(path, prefix) {\n if (typeof path !== 'string') {\n return false;\n }\n const { pathname } = parsePath(path);\n return pathname === prefix || pathname.startsWith(prefix + '/');\n}\n\n//# sourceMappingURL=path-has-prefix.js.map","/**\n * FNV-1a Hash implementation\n * @author Travis Webb (tjwebb) <me@traviswebb.com>\n *\n * Ported from https://github.com/tjwebb/fnv-plus/blob/master/index.js\n *\n * Simplified, optimized and add modified for 52 bit, which provides a larger hash space\n * and still making use of Javascript's 53-bit integer space.\n */ export const fnv1a52 = (str)=>{\n const len = str.length;\n let i = 0, t0 = 0, v0 = 0x2325, t1 = 0, v1 = 0x8422, t2 = 0, v2 = 0x9ce4, t3 = 0, v3 = 0xcbf2;\n while(i < len){\n v0 ^= str.charCodeAt(i++);\n t0 = v0 * 435;\n t1 = v1 * 435;\n t2 = v2 * 435;\n t3 = v3 * 435;\n t2 += v0 << 8;\n t3 += v1 << 8;\n t1 += t0 >>> 16;\n v0 = t0 & 65535;\n t2 += t1 >>> 16;\n v1 = t1 & 65535;\n v3 = t3 + (t2 >>> 16) & 65535;\n v2 = t2 & 65535;\n }\n return (v3 & 15) * 281474976710656 + v2 * 4294967296 + v1 * 65536 + (v0 ^ v3 >> 4);\n};\nexport const generateETag = (payload, weak = false)=>{\n const prefix = weak ? 'W/\"' : '\"';\n return prefix + fnv1a52(payload).toString(36) + payload.length.toString(36) + '\"';\n};\n\n//# sourceMappingURL=etag.js.map","import { pathHasPrefix } from './path-has-prefix';\n/**\n * Given a path and a prefix it will remove the prefix when it exists in the\n * given path. It ensures it matches exactly without containing extra chars\n * and if the prefix is not there it will be noop.\n *\n * @param path The path to remove the prefix from.\n * @param prefix The prefix to be removed.\n */ export function removePathPrefix(path, prefix) {\n // If the path doesn't start with the prefix we can return it as is. This\n // protects us from situations where the prefix is a substring of the path\n // prefix such as:\n //\n // For prefix: /blog\n //\n // /blog -> true\n // /blog/ -> true\n // /blog/1 -> true\n // /blogging -> false\n // /blogging/ -> false\n // /blogging/1 -> false\n if (!pathHasPrefix(path, prefix)) {\n return path;\n }\n // Remove the prefix from the path via slicing.\n const withoutPrefix = path.slice(prefix.length);\n // If the path without the prefix starts with a `/` we can return it as is.\n if (withoutPrefix.startsWith('/')) {\n return withoutPrefix;\n }\n // If the path without the prefix doesn't start with a `/` we need to add it\n // back to the path to make sure it's a valid path.\n return `/${withoutPrefix}`;\n}\n\n//# sourceMappingURL=remove-path-prefix.js.map","import { NEXT_INTERCEPTION_MARKER_PREFIX, NEXT_QUERY_PARAM_PREFIX } from '../../lib/constants';\n/**\n * Converts a Node.js IncomingHttpHeaders object to a Headers object. Any\n * headers with multiple values will be joined with a comma and space. Any\n * headers that have an undefined value will be ignored and others will be\n * coerced to strings.\n *\n * @param nodeHeaders the headers object to convert\n * @returns the converted headers object\n */ export function fromNodeOutgoingHttpHeaders(nodeHeaders) {\n const headers = new Headers();\n for (let [key, value] of Object.entries(nodeHeaders)){\n const values = Array.isArray(value) ? value : [\n value\n ];\n for (let v of values){\n if (typeof v === 'undefined') continue;\n if (typeof v === 'number') {\n v = v.toString();\n }\n headers.append(key, v);\n }\n }\n return headers;\n}\n/*\n Set-Cookie header field-values are sometimes comma joined in one string. This splits them without choking on commas\n that are within a single set-cookie field-value, such as in the Expires portion.\n This is uncommon, but explicitly allowed - see https://tools.ietf.org/html/rfc2616#section-4.2\n Node.js does this for every header *except* set-cookie - see https://github.com/nodejs/node/blob/d5e363b77ebaf1caf67cd7528224b651c86815c1/lib/_http_incoming.js#L128\n React Native's fetch does this for *every* header, including set-cookie.\n \n Based on: https://github.com/google/j2objc/commit/16820fdbc8f76ca0c33472810ce0cb03d20efe25\n Credits to: https://github.com/tomball for original and https://github.com/chrusart for JavaScript implementation\n*/ export function splitCookiesString(cookiesString) {\n var cookiesStrings = [];\n var pos = 0;\n var start;\n var ch;\n var lastComma;\n var nextStart;\n var cookiesSeparatorFound;\n function skipWhitespace() {\n while(pos < cookiesString.length && /\\s/.test(cookiesString.charAt(pos))){\n pos += 1;\n }\n return pos < cookiesString.length;\n }\n function notSpecialChar() {\n ch = cookiesString.charAt(pos);\n return ch !== '=' && ch !== ';' && ch !== ',';\n }\n while(pos < cookiesString.length){\n start = pos;\n cookiesSeparatorFound = false;\n while(skipWhitespace()){\n ch = cookiesString.charAt(pos);\n if (ch === ',') {\n // ',' is a cookie separator if we have later first '=', not ';' or ','\n lastComma = pos;\n pos += 1;\n skipWhitespace();\n nextStart = pos;\n while(pos < cookiesString.length && notSpecialChar()){\n pos += 1;\n }\n // currently special character\n if (pos < cookiesString.length && cookiesString.charAt(pos) === '=') {\n // we found cookies separator\n cookiesSeparatorFound = true;\n // pos is inside the next cookie, so back up and return it.\n pos = nextStart;\n cookiesStrings.push(cookiesString.substring(start, lastComma));\n start = pos;\n } else {\n // in param ',' or param separator ';',\n // we continue from that comma\n pos = lastComma + 1;\n }\n } else {\n pos += 1;\n }\n }\n if (!cookiesSeparatorFound || pos >= cookiesString.length) {\n cookiesStrings.push(cookiesString.substring(start, cookiesString.length));\n }\n }\n return cookiesStrings;\n}\n/**\n * Converts a Headers object to a Node.js OutgoingHttpHeaders object. This is\n * required to support the set-cookie header, which may have multiple values.\n *\n * @param headers the headers object to convert\n * @returns the converted headers object\n */ export function toNodeOutgoingHttpHeaders(headers) {\n const nodeHeaders = {};\n const cookies = [];\n if (headers) {\n for (const [key, value] of headers.entries()){\n if (key.toLowerCase() === 'set-cookie') {\n // We may have gotten a comma joined string of cookies, or multiple\n // set-cookie headers. We need to merge them into one header array\n // to represent all the cookies.\n cookies.push(...splitCookiesString(value));\n nodeHeaders[key] = cookies.length === 1 ? cookies[0] : cookies;\n } else {\n nodeHeaders[key] = value;\n }\n }\n }\n return nodeHeaders;\n}\n/**\n * Validate the correctness of a user-provided URL.\n */ export function validateURL(url) {\n try {\n return String(new URL(String(url)));\n } catch (error) {\n throw Object.defineProperty(new Error(`URL is malformed \"${String(url)}\". Please use only absolute URLs - https://nextjs.org/docs/messages/middleware-relative-urls`, {\n cause: error\n }), \"__NEXT_ERROR_CODE\", {\n value: \"E61\",\n enumerable: false,\n configurable: true\n });\n }\n}\n/**\n * Normalizes `nxtP` and `nxtI` query param values to remove the prefix.\n * This function does not mutate the input key.\n */ export function normalizeNextQueryParam(key) {\n const prefixes = [\n NEXT_QUERY_PARAM_PREFIX,\n NEXT_INTERCEPTION_MARKER_PREFIX\n ];\n for (const prefix of prefixes){\n if (key !== prefix && key.startsWith(prefix)) {\n return key.substring(prefix.length);\n }\n }\n return null;\n}\n\n//# sourceMappingURL=utils.js.map","import { getTracer } from '../lib/trace/tracer';\nimport { AppRenderSpan } from '../lib/trace/constants';\nimport { DetachedPromise } from '../../lib/detached-promise';\nimport { scheduleImmediate, atLeastOneTask } from '../../lib/scheduler';\nimport { ENCODED_TAGS } from './encoded-tags';\nimport { indexOfUint8Array, isEquivalentUint8Arrays, removeFromUint8Array } from './uint8array-helpers';\nimport { MISSING_ROOT_TAGS_ERROR } from '../../shared/lib/errors/constants';\nimport { insertBuildIdComment } from '../../shared/lib/segment-cache/output-export-prefetch-encoding';\nimport { RSC_HEADER, NEXT_ROUTER_PREFETCH_HEADER, NEXT_ROUTER_SEGMENT_PREFETCH_HEADER, NEXT_RSC_UNION_QUERY } from '../../client/components/app-router-headers';\nimport { computeCacheBustingSearchParam } from '../../shared/lib/router/utils/cache-busting-search-param';\nfunction voidCatch() {\n// this catcher is designed to be used with pipeTo where we expect the underlying\n// pipe implementation to forward errors but we don't want the pipeTo promise to reject\n// and be unhandled\n}\n// We can share the same encoder instance everywhere\n// Notably we cannot do the same for TextDecoder because it is stateful\n// when handling streaming data\nconst encoder = new TextEncoder();\nexport function chainStreams(...streams) {\n // If we have no streams, return an empty stream. This behavior is\n // intentional as we're now providing the `RenderResult.EMPTY` value.\n if (streams.length === 0) {\n return new ReadableStream({\n start (controller) {\n controller.close();\n }\n });\n }\n // If we only have 1 stream we fast path it by returning just this stream\n if (streams.length === 1) {\n return streams[0];\n }\n const { readable, writable } = new TransformStream();\n // We always initiate pipeTo immediately. We know we have at least 2 streams\n // so we need to avoid closing the writable when this one finishes.\n let promise = streams[0].pipeTo(writable, {\n preventClose: true\n });\n let i = 1;\n for(; i < streams.length - 1; i++){\n const nextStream = streams[i];\n promise = promise.then(()=>nextStream.pipeTo(writable, {\n preventClose: true\n }));\n }\n // We can omit the length check because we halted before the last stream and there\n // is at least two streams so the lastStream here will always be defined\n const lastStream = streams[i];\n promise = promise.then(()=>lastStream.pipeTo(writable));\n // Catch any errors from the streams and ignore them, they will be handled\n // by whatever is consuming the readable stream.\n promise.catch(voidCatch);\n return readable;\n}\nexport function streamFromString(str) {\n return new ReadableStream({\n start (controller) {\n controller.enqueue(encoder.encode(str));\n controller.close();\n }\n });\n}\nexport function streamFromBuffer(chunk) {\n return new ReadableStream({\n start (controller) {\n controller.enqueue(chunk);\n controller.close();\n }\n });\n}\nexport async function streamToBuffer(stream) {\n const reader = stream.getReader();\n const chunks = [];\n while(true){\n const { done, value } = await reader.read();\n if (done) {\n break;\n }\n chunks.push(value);\n }\n return Buffer.concat(chunks);\n}\nexport async function streamToString(stream, signal) {\n const decoder = new TextDecoder('utf-8', {\n fatal: true\n });\n let string = '';\n for await (const chunk of stream){\n if (signal == null ? void 0 : signal.aborted) {\n return string;\n }\n string += decoder.decode(chunk, {\n stream: true\n });\n }\n string += decoder.decode();\n return string;\n}\nexport function createBufferedTransformStream(options = {}) {\n const { maxBufferByteLength = Infinity } = options;\n let bufferedChunks = [];\n let bufferByteLength = 0;\n let pending;\n const flush = (controller)=>{\n try {\n if (bufferedChunks.length === 0) {\n return;\n }\n const chunk = new Uint8Array(bufferByteLength);\n let copiedBytes = 0;\n for(let i = 0; i < bufferedChunks.length; i++){\n const bufferedChunk = bufferedChunks[i];\n chunk.set(bufferedChunk, copiedBytes);\n copiedBytes += bufferedChunk.byteLength;\n }\n // We just wrote all the buffered chunks so we need to reset the bufferedChunks array\n // and our bufferByteLength to prepare for the next round of buffered chunks\n bufferedChunks.length = 0;\n bufferByteLength = 0;\n controller.enqueue(chunk);\n } catch {\n // If an error occurs while enqueuing, it can't be due to this\n // transformer. It's most likely caused by the controller having been\n // errored (for example, if the stream was cancelled).\n }\n };\n const scheduleFlush = (controller)=>{\n if (pending) {\n return;\n }\n const detached = new DetachedPromise();\n pending = detached;\n scheduleImmediate(()=>{\n try {\n flush(controller);\n } finally{\n pending = undefined;\n detached.resolve();\n }\n });\n };\n return new TransformStream({\n transform (chunk, controller) {\n // Combine the previous buffer with the new chunk.\n bufferedChunks.push(chunk);\n bufferByteLength += chunk.byteLength;\n if (bufferByteLength >= maxBufferByteLength) {\n flush(controller);\n } else {\n scheduleFlush(controller);\n }\n },\n flush () {\n return pending == null ? void 0 : pending.promise;\n }\n });\n}\nfunction createPrefetchCommentStream(isBuildTimePrerendering, buildId) {\n // Insert an extra comment at the beginning of the HTML document. This must\n // come after the DOCTYPE, which is inserted by React.\n //\n // The first chunk sent by React will contain the doctype. After that, we can\n // pass through the rest of the chunks as-is.\n let didTransformFirstChunk = false;\n return new TransformStream({\n transform (chunk, controller) {\n if (isBuildTimePrerendering && !didTransformFirstChunk) {\n didTransformFirstChunk = true;\n const decoder = new TextDecoder('utf-8', {\n fatal: true\n });\n const chunkStr = decoder.decode(chunk, {\n stream: true\n });\n const updatedChunkStr = insertBuildIdComment(chunkStr, buildId);\n controller.enqueue(encoder.encode(updatedChunkStr));\n return;\n }\n controller.enqueue(chunk);\n }\n });\n}\nexport function renderToInitialFizzStream({ ReactDOMServer, element, streamOptions }) {\n return getTracer().trace(AppRenderSpan.renderToReadableStream, async ()=>ReactDOMServer.renderToReadableStream(element, streamOptions));\n}\nfunction createMetadataTransformStream(insert) {\n let chunkIndex = -1;\n let isMarkRemoved = false;\n return new TransformStream({\n async transform (chunk, controller) {\n let iconMarkIndex = -1;\n let closedHeadIndex = -1;\n chunkIndex++;\n if (isMarkRemoved) {\n controller.enqueue(chunk);\n return;\n }\n let iconMarkLength = 0;\n // Only search for the closed head tag once\n if (iconMarkIndex === -1) {\n iconMarkIndex = indexOfUint8Array(chunk, ENCODED_TAGS.META.ICON_MARK);\n if (iconMarkIndex === -1) {\n controller.enqueue(chunk);\n return;\n } else {\n // When we found the `<meta name=\"«nxt-icon»\"` tag prefix, we will remove it from the chunk.\n // Its close tag could either be `/>` or `>`, checking the next char to ensure we cover both cases.\n iconMarkLength = ENCODED_TAGS.META.ICON_MARK.length;\n // Check if next char is /, this is for xml mode.\n if (chunk[iconMarkIndex + iconMarkLength] === 47) {\n iconMarkLength += 2;\n } else {\n // The last char is `>`\n iconMarkLength++;\n }\n }\n }\n // Check if icon mark is inside <head> tag in the first chunk.\n if (chunkIndex === 0) {\n closedHeadIndex = indexOfUint8Array(chunk, ENCODED_TAGS.CLOSED.HEAD);\n if (iconMarkIndex !== -1) {\n // The mark icon is located in the 1st chunk before the head tag.\n // We do not need to insert the script tag in this case because it's in the head.\n // Just remove the icon mark from the chunk.\n if (iconMarkIndex < closedHeadIndex) {\n const replaced = new Uint8Array(chunk.length - iconMarkLength);\n // Remove the icon mark from the chunk.\n replaced.set(chunk.subarray(0, iconMarkIndex));\n replaced.set(chunk.subarray(iconMarkIndex + iconMarkLength), iconMarkIndex);\n chunk = replaced;\n } else {\n // The icon mark is after the head tag, replace and insert the script tag at that position.\n const insertion = await insert();\n const encodedInsertion = encoder.encode(insertion);\n const insertionLength = encodedInsertion.length;\n const replaced = new Uint8Array(chunk.length - iconMarkLength + insertionLength);\n replaced.set(chunk.subarray(0, iconMarkIndex));\n replaced.set(encodedInsertion, iconMarkIndex);\n replaced.set(chunk.subarray(iconMarkIndex + iconMarkLength), iconMarkIndex + insertionLength);\n chunk = replaced;\n }\n isMarkRemoved = true;\n }\n // If there's no icon mark located, it will be handled later when if present in the following chunks.\n } else {\n // When it's appeared in the following chunks, we'll need to\n // remove the mark and then insert the script tag at that position.\n const insertion = await insert();\n const encodedInsertion = encoder.encode(insertion);\n const insertionLength = encodedInsertion.length;\n // Replace the icon mark with the hoist script or empty string.\n const replaced = new Uint8Array(chunk.length - iconMarkLength + insertionLength);\n // Set the first part of the chunk, before the icon mark.\n replaced.set(chunk.subarray(0, iconMarkIndex));\n // Set the insertion after the icon mark.\n replaced.set(encodedInsertion, iconMarkIndex);\n // Set the rest of the chunk after the icon mark.\n replaced.set(chunk.subarray(iconMarkIndex + iconMarkLength), iconMarkIndex + insertionLength);\n chunk = replaced;\n isMarkRemoved = true;\n }\n controller.enqueue(chunk);\n }\n });\n}\nfunction createHeadInsertionTransformStream(insert) {\n let inserted = false;\n // We need to track if this transform saw any bytes because if it didn't\n // we won't want to insert any server HTML at all\n let hasBytes = false;\n return new TransformStream({\n async transform (chunk, controller) {\n hasBytes = true;\n const insertion = await insert();\n if (inserted) {\n if (insertion) {\n const encodedInsertion = encoder.encode(insertion);\n controller.enqueue(encodedInsertion);\n }\n controller.enqueue(chunk);\n } else {\n // TODO (@Ethan-Arrowood): Replace the generic `indexOfUint8Array` method with something finely tuned for the subset of things actually being checked for.\n const index = indexOfUint8Array(chunk, ENCODED_TAGS.CLOSED.HEAD);\n // In fully static rendering or non PPR rendering cases:\n // `/head>` will always be found in the chunk in first chunk rendering.\n if (index !== -1) {\n if (insertion) {\n const encodedInsertion = encoder.encode(insertion);\n // Get the total count of the bytes in the chunk and the insertion\n // e.g.\n // chunk = <head><meta charset=\"utf-8\"></head>\n // insertion = <script>...</script>\n // output = <head><meta charset=\"utf-8\"> [ <script>...</script> ] </head>\n const insertedHeadContent = new Uint8Array(chunk.length + encodedInsertion.length);\n // Append the first part of the chunk, before the head tag\n insertedHeadContent.set(chunk.slice(0, index));\n // Append the server inserted content\n insertedHeadContent.set(encodedInsertion, index);\n // Append the rest of the chunk\n insertedHeadContent.set(chunk.slice(index), index + encodedInsertion.length);\n controller.enqueue(insertedHeadContent);\n } else {\n controller.enqueue(chunk);\n }\n inserted = true;\n } else {\n // This will happens in PPR rendering during next start, when the page is partially rendered.\n // When the page resumes, the head tag will be found in the middle of the chunk.\n // Where we just need to append the insertion and chunk to the current stream.\n // e.g.\n // PPR-static: <head>...</head><body> [ resume content ] </body>\n // PPR-resume: [ insertion ] [ rest content ]\n if (insertion) {\n controller.enqueue(encoder.encode(insertion));\n }\n controller.enqueue(chunk);\n inserted = true;\n }\n }\n },\n async flush (controller) {\n // Check before closing if there's anything remaining to insert.\n if (hasBytes) {\n const insertion = await insert();\n if (insertion) {\n controller.enqueue(encoder.encode(insertion));\n }\n }\n }\n });\n}\nfunction createClientResumeScriptInsertionTransformStream() {\n const segmentPath = '/_full';\n const cacheBustingHeader = computeCacheBustingSearchParam('1', '/_full', undefined, undefined // headers[NEXT_URL]\n );\n const searchStr = `${NEXT_RSC_UNION_QUERY}=${cacheBustingHeader}`;\n const NEXT_CLIENT_RESUME_SCRIPT = `<script>__NEXT_CLIENT_RESUME=fetch(location.pathname+'?${searchStr}',{credentials:'same-origin',headers:{'${RSC_HEADER}': '1','${NEXT_ROUTER_PREFETCH_HEADER}': '1','${NEXT_ROUTER_SEGMENT_PREFETCH_HEADER}': '${segmentPath}'}})</script>`;\n let didAlreadyInsert = false;\n return new TransformStream({\n transform (chunk, controller) {\n if (didAlreadyInsert) {\n // Already inserted the script into the head. Pass through.\n controller.enqueue(chunk);\n return;\n }\n // TODO (@Ethan-Arrowood): Replace the generic `indexOfUint8Array` method with something finely tuned for the subset of things actually being checked for.\n const headClosingTagIndex = indexOfUint8Array(chunk, ENCODED_TAGS.CLOSED.HEAD);\n if (headClosingTagIndex === -1) {\n // In fully static rendering or non PPR rendering cases:\n // `/head>` will always be found in the chunk in first chunk rendering.\n controller.enqueue(chunk);\n return;\n }\n const encodedInsertion = encoder.encode(NEXT_CLIENT_RESUME_SCRIPT);\n // Get the total count of the bytes in the chunk and the insertion\n // e.g.\n // chunk = <head><meta charset=\"utf-8\"></head>\n // insertion = <script>...</script>\n // output = <head><meta charset=\"utf-8\"> [ <script>...</script> ] </head>\n const insertedHeadContent = new Uint8Array(chunk.length + encodedInsertion.length);\n // Append the first part of the chunk, before the head tag\n insertedHeadContent.set(chunk.slice(0, headClosingTagIndex));\n // Append the server inserted content\n insertedHeadContent.set(encodedInsertion, headClosingTagIndex);\n // Append the rest of the chunk\n insertedHeadContent.set(chunk.slice(headClosingTagIndex), headClosingTagIndex + encodedInsertion.length);\n controller.enqueue(insertedHeadContent);\n didAlreadyInsert = true;\n }\n });\n}\n// Suffix after main body content - scripts before </body>,\n// but wait for the major chunks to be enqueued.\nfunction createDeferredSuffixStream(suffix) {\n let flushed = false;\n let pending;\n const flush = (controller)=>{\n const detached = new DetachedPromise();\n pending = detached;\n scheduleImmediate(()=>{\n try {\n controller.enqueue(encoder.encode(suffix));\n } catch {\n // If an error occurs while enqueuing it can't be due to this\n // transformers fault. It's likely due to the controller being\n // errored due to the stream being cancelled.\n } finally{\n pending = undefined;\n detached.resolve();\n }\n });\n };\n return new TransformStream({\n transform (chunk, controller) {\n controller.enqueue(chunk);\n // If we've already flushed, we're done.\n if (flushed) return;\n // Schedule the flush to happen.\n flushed = true;\n flush(controller);\n },\n flush (controller) {\n if (pending) return pending.promise;\n if (flushed) return;\n // Flush now.\n controller.enqueue(encoder.encode(suffix));\n }\n });\n}\nfunction createFlightDataInjectionTransformStream(stream, delayDataUntilFirstHtmlChunk) {\n let htmlStreamFinished = false;\n let pull = null;\n let donePulling = false;\n function startOrContinuePulling(controller) {\n if (!pull) {\n pull = startPulling(controller);\n }\n return pull;\n }\n async function startPulling(controller) {\n const reader = stream.getReader();\n if (delayDataUntilFirstHtmlChunk) {\n // NOTE: streaming flush\n // We are buffering here for the inlined data stream because the\n // \"shell\" stream might be chunkenized again by the underlying stream\n // implementation, e.g. with a specific high-water mark. To ensure it's\n // the safe timing to pipe the data stream, this extra tick is\n // necessary.\n // We don't start reading until we've left the current Task to ensure\n // that it's inserted after flushing the shell. Note that this implementation\n // might get stale if impl details of Fizz change in the future.\n await atLeastOneTask();\n }\n try {\n while(true){\n const { done, value } = await reader.read();\n if (done) {\n donePulling = true;\n return;\n }\n // We want to prioritize HTML over RSC data.\n // The SSR render is based on the same RSC stream, so when we get a new RSC chunk,\n // we're likely to produce an HTML chunk as well, so give it a chance to flush first.\n if (!delayDataUntilFirstHtmlChunk && !htmlStreamFinished) {\n await atLeastOneTask();\n }\n controller.enqueue(value);\n }\n } catch (err) {\n controller.error(err);\n }\n }\n return new TransformStream({\n start (controller) {\n if (!delayDataUntilFirstHtmlChunk) {\n startOrContinuePulling(controller);\n }\n },\n transform (chunk, controller) {\n controller.enqueue(chunk);\n // Start the streaming if it hasn't already been started yet.\n if (delayDataUntilFirstHtmlChunk) {\n startOrContinuePulling(controller);\n }\n },\n flush (controller) {\n htmlStreamFinished = true;\n if (donePulling) {\n return;\n }\n return startOrContinuePulling(controller);\n }\n });\n}\nconst CLOSE_TAG = '</body></html>';\n/**\n * This transform stream moves the suffix to the end of the stream, so results\n * like `</body></html><script>...</script>` will be transformed to\n * `<script>...</script></body></html>`.\n */ function createMoveSuffixStream() {\n let foundSuffix = false;\n return new TransformStream({\n transform (chunk, controller) {\n if (foundSuffix) {\n return controller.enqueue(chunk);\n }\n const index = indexOfUint8Array(chunk, ENCODED_TAGS.CLOSED.BODY_AND_HTML);\n if (index > -1) {\n foundSuffix = true;\n // If the whole chunk is the suffix, then don't write anything, it will\n // be written in the flush.\n if (chunk.length === ENCODED_TAGS.CLOSED.BODY_AND_HTML.length) {\n return;\n }\n // Write out the part before the suffix.\n const before = chunk.slice(0, index);\n controller.enqueue(before);\n // In the case where the suffix is in the middle of the chunk, we need\n // to split the chunk into two parts.\n if (chunk.length > ENCODED_TAGS.CLOSED.BODY_AND_HTML.length + index) {\n // Write out the part after the suffix.\n const after = chunk.slice(index + ENCODED_TAGS.CLOSED.BODY_AND_HTML.length);\n controller.enqueue(after);\n }\n } else {\n controller.enqueue(chunk);\n }\n },\n flush (controller) {\n // Even if we didn't find the suffix, the HTML is not valid if we don't\n // add it, so insert it at the end.\n controller.enqueue(ENCODED_TAGS.CLOSED.BODY_AND_HTML);\n }\n });\n}\nfunction createStripDocumentClosingTagsTransform() {\n return new TransformStream({\n transform (chunk, controller) {\n // We rely on the assumption that chunks will never break across a code unit.\n // This is reasonable because we currently concat all of React's output from a single\n // flush into one chunk before streaming it forward which means the chunk will represent\n // a single coherent utf-8 string. This is not safe to use if we change our streaming to no\n // longer do this large buffered chunk\n if (isEquivalentUint8Arrays(chunk, ENCODED_TAGS.CLOSED.BODY_AND_HTML) || isEquivalentUint8Arrays(chunk, ENCODED_TAGS.CLOSED.BODY) || isEquivalentUint8Arrays(chunk, ENCODED_TAGS.CLOSED.HTML)) {\n // the entire chunk is the closing tags; return without enqueueing anything.\n return;\n }\n // We assume these tags will go at together at the end of the document and that\n // they won't appear anywhere else in the document. This is not really a safe assumption\n // but until we revamp our streaming infra this is a performant way to string the tags\n chunk = removeFromUint8Array(chunk, ENCODED_TAGS.CLOSED.BODY);\n chunk = removeFromUint8Array(chunk, ENCODED_TAGS.CLOSED.HTML);\n controller.enqueue(chunk);\n }\n });\n}\n/*\n * Checks if the root layout is missing the html or body tags\n * and if so, it will inject a script tag to throw an error in the browser, showing the user\n * the error message in the error overlay.\n */ export function createRootLayoutValidatorStream() {\n let foundHtml = false;\n let foundBody = false;\n return new TransformStream({\n async transform (chunk, controller) {\n // Peek into the streamed chunk to see if the tags are present.\n if (!foundHtml && indexOfUint8Array(chunk, ENCODED_TAGS.OPENING.HTML) > -1) {\n foundHtml = true;\n }\n if (!foundBody && indexOfUint8Array(chunk, ENCODED_TAGS.OPENING.BODY) > -1) {\n foundBody = true;\n }\n controller.enqueue(chunk);\n },\n flush (controller) {\n const missingTags = [];\n if (!foundHtml) missingTags.push('html');\n if (!foundBody) missingTags.push('body');\n if (!missingTags.length) return;\n controller.enqueue(encoder.encode(`<html id=\"__next_error__\">\n <template\n data-next-error-message=\"Missing ${missingTags.map((c)=>`<${c}>`).join(missingTags.length > 1 ? ' and ' : '')} tags in the root layout.\\nRead more at https://nextjs.org/docs/messages/missing-root-layout-tags\"\n data-next-error-digest=\"${MISSING_ROOT_TAGS_ERROR}\"\n data-next-error-stack=\"\"\n ></template>\n `));\n }\n });\n}\nfunction chainTransformers(readable, transformers) {\n let stream = readable;\n for (const transformer of transformers){\n if (!transformer) continue;\n stream = stream.pipeThrough(transformer);\n }\n return stream;\n}\nexport async function continueFizzStream(renderStream, { suffix, inlinedDataStream, isStaticGeneration, isBuildTimePrerendering, buildId, getServerInsertedHTML, getServerInsertedMetadata, validateRootLayout }) {\n // Suffix itself might contain close tags at the end, so we need to split it.\n const suffixUnclosed = suffix ? suffix.split(CLOSE_TAG, 1)[0] : null;\n // If we're generating static HTML we need to wait for it to resolve before continuing.\n if (isStaticGeneration) {\n await renderStream.allReady;\n }\n return chainTransformers(renderStream, [\n // Buffer everything to avoid flushing too frequently\n createBufferedTransformStream(),\n // Add build id comment to start of the HTML document (in export mode)\n createPrefetchCommentStream(isBuildTimePrerendering, buildId),\n // Transform metadata\n createMetadataTransformStream(getServerInsertedMetadata),\n // Insert suffix content\n suffixUnclosed != null && suffixUnclosed.length > 0 ? createDeferredSuffixStream(suffixUnclosed) : null,\n // Insert the inlined data (Flight data, form state, etc.) stream into the HTML\n inlinedDataStream ? createFlightDataInjectionTransformStream(inlinedDataStream, true) : null,\n // Validate the root layout for missing html or body tags\n validateRootLayout ? createRootLayoutValidatorStream() : null,\n // Close tags should always be deferred to the end\n createMoveSuffixStream(),\n // Special head insertions\n // TODO-APP: Insert server side html to end of head in app layout rendering, to avoid\n // hydration errors. Remove this once it's ready to be handled by react itself.\n createHeadInsertionTransformStream(getServerInsertedHTML)\n ]);\n}\nexport async function continueDynamicPrerender(prerenderStream, { getServerInsertedHTML, getServerInsertedMetadata }) {\n return prerenderStream// Buffer everything to avoid flushing too frequently\n .pipeThrough(createBufferedTransformStream()).pipeThrough(createStripDocumentClosingTagsTransform())// Insert generated tags to head\n .pipeThrough(createHeadInsertionTransformStream(getServerInsertedHTML))// Transform metadata\n .pipeThrough(createMetadataTransformStream(getServerInsertedMetadata));\n}\nexport async function continueStaticPrerender(prerenderStream, { inlinedDataStream, getServerInsertedHTML, getServerInsertedMetadata, isBuildTimePrerendering, buildId }) {\n return prerenderStream// Buffer everything to avoid flushing too frequently\n .pipeThrough(createBufferedTransformStream())// Add build id comment to start of the HTML document (in export mode)\n .pipeThrough(createPrefetchCommentStream(isBuildTimePrerendering, buildId))// Insert generated tags to head\n .pipeThrough(createHeadInsertionTransformStream(getServerInsertedHTML))// Transform metadata\n .pipeThrough(createMetadataTransformStream(getServerInsertedMetadata))// Insert the inlined data (Flight data, form state, etc.) stream into the HTML\n .pipeThrough(createFlightDataInjectionTransformStream(inlinedDataStream, true))// Close tags should always be deferred to the end\n .pipeThrough(createMoveSuffixStream());\n}\nexport async function continueStaticFallbackPrerender(prerenderStream, { inlinedDataStream, getServerInsertedHTML, getServerInsertedMetadata, isBuildTimePrerendering, buildId }) {\n // Same as `continueStaticPrerender`, but also inserts an additional script\n // to instruct the client to start fetching the hydration data as early\n // as possible.\n return prerenderStream// Buffer everything to avoid flushing too frequently\n .pipeThrough(createBufferedTransformStream())// Add build id comment to start of the HTML document (in export mode)\n .pipeThrough(createPrefetchCommentStream(isBuildTimePrerendering, buildId))// Insert generated tags to head\n .pipeThrough(createHeadInsertionTransformStream(getServerInsertedHTML))// Insert the client resume script into the head\n .pipeThrough(createClientResumeScriptInsertionTransformStream())// Transform metadata\n .pipeThrough(createMetadataTransformStream(getServerInsertedMetadata))// Insert the inlined data (Flight data, form state, etc.) stream into the HTML\n .pipeThrough(createFlightDataInjectionTransformStream(inlinedDataStream, true))// Close tags should always be deferred to the end\n .pipeThrough(createMoveSuffixStream());\n}\nexport async function continueDynamicHTMLResume(renderStream, { delayDataUntilFirstHtmlChunk, inlinedDataStream, getServerInsertedHTML, getServerInsertedMetadata }) {\n return renderStream// Buffer everything to avoid flushing too frequently\n .pipeThrough(createBufferedTransformStream())// Insert generated tags to head\n .pipeThrough(createHeadInsertionTransformStream(getServerInsertedHTML))// Transform metadata\n .pipeThrough(createMetadataTransformStream(getServerInsertedMetadata))// Insert the inlined data (Flight data, form state, etc.) stream into the HTML\n .pipeThrough(createFlightDataInjectionTransformStream(inlinedDataStream, delayDataUntilFirstHtmlChunk))// Close tags should always be deferred to the end\n .pipeThrough(createMoveSuffixStream());\n}\nexport function createDocumentClosingStream() {\n return streamFromString(CLOSE_TAG);\n}\n\n//# sourceMappingURL=node-web-streams-helper.js.map","/**\n * This file provides some helpers that should be used in conjunction with\n * explicit environment checks. When combined with the environment checks, it\n * will ensure that the correct typings are used as well as enable code\n * elimination.\n */ /**\n * Type guard to determine if a request is a WebNextRequest. This does not\n * actually check the type of the request, but rather the runtime environment.\n * It's expected that when the runtime environment is the edge runtime, that any\n * base request is a WebNextRequest.\n */ export const isWebNextRequest = (req)=>process.env.NEXT_RUNTIME === 'edge';\n/**\n * Type guard to determine if a response is a WebNextResponse. This does not\n * actually check the type of the response, but rather the runtime environment.\n * It's expected that when the runtime environment is the edge runtime, that any\n * base response is a WebNextResponse.\n */ export const isWebNextResponse = (res)=>process.env.NEXT_RUNTIME === 'edge';\n/**\n * Type guard to determine if a request is a NodeNextRequest. This does not\n * actually check the type of the request, but rather the runtime environment.\n * It's expected that when the runtime environment is the node runtime, that any\n * base request is a NodeNextRequest.\n */ export const isNodeNextRequest = (req)=>process.env.NEXT_RUNTIME !== 'edge';\n/**\n * Type guard to determine if a response is a NodeNextResponse. This does not\n * actually check the type of the response, but rather the runtime environment.\n * It's expected that when the runtime environment is the node runtime, that any\n * base response is a NodeNextResponse.\n */ export const isNodeNextResponse = (res)=>process.env.NEXT_RUNTIME !== 'edge';\n\n//# sourceMappingURL=helpers.js.map","// Format function modified from nodejs\n// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\nimport * as querystring from './querystring';\nconst slashedProtocols = /https?|ftp|gopher|file/;\nexport function formatUrl(urlObj) {\n let { auth, hostname } = urlObj;\n let protocol = urlObj.protocol || '';\n let pathname = urlObj.pathname || '';\n let hash = urlObj.hash || '';\n let query = urlObj.query || '';\n let host = false;\n auth = auth ? encodeURIComponent(auth).replace(/%3A/i, ':') + '@' : '';\n if (urlObj.host) {\n host = auth + urlObj.host;\n } else if (hostname) {\n host = auth + (~hostname.indexOf(':') ? `[${hostname}]` : hostname);\n if (urlObj.port) {\n host += ':' + urlObj.port;\n }\n }\n if (query && typeof query === 'object') {\n query = String(querystring.urlQueryToSearchParams(query));\n }\n let search = urlObj.search || query && `?${query}` || '';\n if (protocol && !protocol.endsWith(':')) protocol += ':';\n if (urlObj.slashes || (!protocol || slashedProtocols.test(protocol)) && host !== false) {\n host = '//' + (host || '');\n if (pathname && pathname[0] !== '/') pathname = '/' + pathname;\n } else if (!host) {\n host = '';\n }\n if (hash && hash[0] !== '#') hash = '#' + hash;\n if (search && search[0] !== '?') search = '?' + search;\n pathname = pathname.replace(/[?#]/g, encodeURIComponent);\n search = search.replace('#', '%23');\n return `${protocol}${host}${pathname}${search}${hash}`;\n}\nexport const urlObjectKeys = [\n 'auth',\n 'hash',\n 'host',\n 'hostname',\n 'href',\n 'path',\n 'pathname',\n 'port',\n 'protocol',\n 'query',\n 'search',\n 'slashes'\n];\nexport function formatWithValidation(url) {\n if (process.env.NODE_ENV === 'development') {\n if (url !== null && typeof url === 'object') {\n Object.keys(url).forEach((key)=>{\n if (!urlObjectKeys.includes(key)) {\n console.warn(`Unknown key passed via urlObject into url.format: ${key}`);\n }\n });\n }\n }\n return formatUrl(url);\n}\n\n//# sourceMappingURL=format-url.js.map"],"names":["process","env","NEXT_RUNTIME","module","exports","require","NODE_ENV","TURBOPACK","RouteKind","hoist","name","then","mod","undefined"],"mappings":"gCAWMG,EAAOC,OAAO,CAAGC,EAAQ,CAAA,CAAA,IAAA,0BCXxB,MAAWG,GAGf,CAHeA,MAwBjB,AArBE,EAHeA,AAGf,CAHeA,EAGf,CAAA,OAHeA,CAOf,EAAA,AAPeA,OAOf,EAAA,CAAA,YAKA,EAAA,OAAA,CAAA,CAAA,WAKA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