next 15.2.0-canary.65 → 15.2.0-canary.66

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.

Potentially problematic release.


This version of next might be problematic. Click here for more details.

Files changed (334) hide show
  1. package/dist/bin/next +5 -1
  2. package/dist/bin/next.map +1 -1
  3. package/dist/build/entries.d.ts +1 -0
  4. package/dist/build/entries.js +12 -1
  5. package/dist/build/entries.js.map +1 -1
  6. package/dist/build/index.js +3 -3
  7. package/dist/build/index.js.map +1 -1
  8. package/dist/build/swc/index.js +1 -1
  9. package/dist/build/webpack/config/blocks/base.js +3 -1
  10. package/dist/build/webpack/config/blocks/base.js.map +1 -1
  11. package/dist/build/webpack/config/blocks/css/index.js +3 -1
  12. package/dist/build/webpack/config/blocks/css/index.js.map +1 -1
  13. package/dist/build/webpack/config/blocks/css/loaders/client.js +3 -1
  14. package/dist/build/webpack/config/blocks/css/loaders/client.js.map +1 -1
  15. package/dist/build/webpack/loaders/next-flight-client-entry-loader.js +4 -0
  16. package/dist/build/webpack/loaders/next-flight-client-entry-loader.js.map +1 -1
  17. package/dist/build/webpack/loaders/next-flight-client-module-loader.js +7 -1
  18. package/dist/build/webpack/loaders/next-flight-client-module-loader.js.map +1 -1
  19. package/dist/build/webpack/loaders/next-flight-loader/index.js +8 -2
  20. package/dist/build/webpack/loaders/next-flight-loader/index.js.map +1 -1
  21. package/dist/build/webpack/loaders/utils.js +1 -1
  22. package/dist/build/webpack/loaders/utils.js.map +1 -1
  23. package/dist/build/webpack/plugins/build-manifest-plugin.d.ts +1 -1
  24. package/dist/build/webpack/plugins/build-manifest-plugin.js +13 -4
  25. package/dist/build/webpack/plugins/build-manifest-plugin.js.map +1 -1
  26. package/dist/build/webpack/plugins/flight-client-entry-plugin.d.ts +1 -1
  27. package/dist/build/webpack/plugins/flight-client-entry-plugin.js +28 -18
  28. package/dist/build/webpack/plugins/flight-client-entry-plugin.js.map +1 -1
  29. package/dist/build/webpack/plugins/flight-manifest-plugin.js +3 -3
  30. package/dist/build/webpack/plugins/flight-manifest-plugin.js.map +1 -1
  31. package/dist/build/webpack/plugins/middleware-plugin.js +6 -3
  32. package/dist/build/webpack/plugins/middleware-plugin.js.map +1 -1
  33. package/dist/build/webpack/plugins/next-trace-entrypoints-plugin.js +11 -1
  34. package/dist/build/webpack/plugins/next-trace-entrypoints-plugin.js.map +1 -1
  35. package/dist/build/webpack/plugins/nextjs-require-cache-hot-reloader.js +1 -1
  36. package/dist/build/webpack/plugins/nextjs-require-cache-hot-reloader.js.map +1 -1
  37. package/dist/build/webpack/plugins/rspack-flight-client-entry-plugin.d.ts +36 -0
  38. package/dist/build/webpack/plugins/rspack-flight-client-entry-plugin.js +97 -0
  39. package/dist/build/webpack/plugins/rspack-flight-client-entry-plugin.js.map +1 -0
  40. package/dist/build/webpack/plugins/rspack-profiling-plugin.d.ts +9 -0
  41. package/dist/build/webpack/plugins/rspack-profiling-plugin.js +62 -0
  42. package/dist/build/webpack/plugins/rspack-profiling-plugin.js.map +1 -0
  43. package/dist/build/webpack/plugins/wellknown-errors-plugin/parseNextAppLoaderError.js +2 -1
  44. package/dist/build/webpack/plugins/wellknown-errors-plugin/parseNextAppLoaderError.js.map +1 -1
  45. package/dist/build/webpack/utils.js +6 -2
  46. package/dist/build/webpack/utils.js.map +1 -1
  47. package/dist/build/webpack-config.js +37 -5
  48. package/dist/build/webpack-config.js.map +1 -1
  49. package/dist/client/app-bootstrap.js +1 -1
  50. package/dist/client/app-dir/link.js +2 -0
  51. package/dist/client/app-dir/link.js.map +1 -1
  52. package/dist/client/components/react-dev-overlay/_experimental/app/react-dev-overlay.js +34 -26
  53. package/dist/client/components/react-dev-overlay/_experimental/app/react-dev-overlay.js.map +1 -1
  54. package/dist/client/components/react-dev-overlay/_experimental/app/react-dev-overlay.stories.js +1 -0
  55. package/dist/client/components/react-dev-overlay/_experimental/app/react-dev-overlay.stories.js.map +1 -1
  56. package/dist/client/components/react-dev-overlay/_experimental/font/font-styles.d.ts +1 -0
  57. package/dist/client/components/react-dev-overlay/_experimental/font/font-styles.js +41 -0
  58. package/dist/client/components/react-dev-overlay/_experimental/font/font-styles.js.map +1 -0
  59. package/dist/client/components/react-dev-overlay/_experimental/font/geist-latin-ext.woff2 +0 -0
  60. package/dist/client/components/react-dev-overlay/_experimental/font/geist-latin.woff2 +0 -0
  61. package/dist/client/components/react-dev-overlay/_experimental/font/geist-mono-latin-ext.woff2 +0 -0
  62. package/dist/client/components/react-dev-overlay/_experimental/font/geist-mono-latin.woff2 +0 -0
  63. package/dist/client/components/react-dev-overlay/_experimental/font/get-dev-overlay-font-middleware.d.ts +2 -0
  64. package/dist/client/components/react-dev-overlay/_experimental/font/get-dev-overlay-font-middleware.js +72 -0
  65. package/dist/client/components/react-dev-overlay/_experimental/font/get-dev-overlay-font-middleware.js.map +1 -0
  66. package/dist/client/components/react-dev-overlay/_experimental/internal/components/code-frame/code-frame.js +16 -8
  67. package/dist/client/components/react-dev-overlay/_experimental/internal/components/code-frame/code-frame.js.map +1 -1
  68. package/dist/client/components/react-dev-overlay/_experimental/internal/components/copy-button/index.js +3 -3
  69. package/dist/client/components/react-dev-overlay/_experimental/internal/components/copy-button/index.js.map +1 -1
  70. package/dist/client/components/react-dev-overlay/_experimental/internal/components/dialog/dialog.js +2 -1
  71. package/dist/client/components/react-dev-overlay/_experimental/internal/components/dialog/dialog.js.map +1 -1
  72. package/dist/client/components/react-dev-overlay/_experimental/internal/components/dialog/styles.js +1 -1
  73. package/dist/client/components/react-dev-overlay/_experimental/internal/components/dialog/styles.js.map +1 -1
  74. package/dist/client/components/react-dev-overlay/_experimental/internal/components/errors/dev-tools-indicator/dev-tools-indicator.d.ts +2 -1
  75. package/dist/client/components/react-dev-overlay/_experimental/internal/components/errors/dev-tools-indicator/dev-tools-indicator.js +82 -31
  76. package/dist/client/components/react-dev-overlay/_experimental/internal/components/errors/dev-tools-indicator/dev-tools-indicator.js.map +1 -1
  77. package/dist/client/components/react-dev-overlay/_experimental/internal/components/errors/dev-tools-indicator/dev-tools-indicator.stories.d.ts +2 -2
  78. package/dist/client/components/react-dev-overlay/_experimental/internal/components/errors/dev-tools-indicator/dev-tools-indicator.stories.js +20 -21
  79. package/dist/client/components/react-dev-overlay/_experimental/internal/components/errors/dev-tools-indicator/dev-tools-indicator.stories.js.map +1 -1
  80. package/dist/client/components/react-dev-overlay/_experimental/internal/components/errors/dev-tools-indicator/dev-tools-info/dev-tools-info.d.ts +8 -0
  81. package/dist/client/components/react-dev-overlay/_experimental/internal/components/errors/dev-tools-indicator/dev-tools-info/dev-tools-info.js +80 -0
  82. package/dist/client/components/react-dev-overlay/_experimental/internal/components/errors/dev-tools-indicator/dev-tools-info/dev-tools-info.js.map +1 -0
  83. package/dist/client/components/react-dev-overlay/_experimental/internal/components/errors/dev-tools-indicator/dev-tools-info/route-info.d.ts +9 -0
  84. package/dist/client/components/react-dev-overlay/_experimental/internal/components/errors/dev-tools-indicator/dev-tools-info/route-info.js +158 -0
  85. package/dist/client/components/react-dev-overlay/_experimental/internal/components/errors/dev-tools-indicator/dev-tools-info/route-info.js.map +1 -0
  86. package/dist/client/components/react-dev-overlay/_experimental/internal/components/errors/dev-tools-indicator/dev-tools-info/turbopack-info.d.ts +8 -0
  87. package/dist/client/components/react-dev-overlay/_experimental/internal/components/errors/dev-tools-indicator/dev-tools-info/turbopack-info.js +212 -0
  88. package/dist/client/components/react-dev-overlay/_experimental/internal/components/errors/dev-tools-indicator/dev-tools-info/turbopack-info.js.map +1 -0
  89. package/dist/client/components/react-dev-overlay/_experimental/internal/components/errors/dev-tools-indicator/internal/next-logo.d.ts +1 -0
  90. package/dist/client/components/react-dev-overlay/_experimental/internal/components/errors/dev-tools-indicator/internal/next-logo.js +28 -6
  91. package/dist/client/components/react-dev-overlay/_experimental/internal/components/errors/dev-tools-indicator/internal/next-logo.js.map +1 -1
  92. package/dist/client/components/react-dev-overlay/_experimental/internal/components/errors/error-message/error-message.js +1 -1
  93. package/dist/client/components/react-dev-overlay/_experimental/internal/components/errors/error-message/error-message.js.map +1 -1
  94. package/dist/client/components/react-dev-overlay/_experimental/internal/components/errors/error-overlay/error-overlay.d.ts +2 -2
  95. package/dist/client/components/react-dev-overlay/_experimental/internal/components/errors/error-overlay/error-overlay.js +3 -3
  96. package/dist/client/components/react-dev-overlay/_experimental/internal/components/errors/error-overlay/error-overlay.js.map +1 -1
  97. package/dist/client/components/react-dev-overlay/_experimental/internal/components/errors/error-overlay-layout/error-overlay-layout.d.ts +2 -2
  98. package/dist/client/components/react-dev-overlay/_experimental/internal/components/errors/error-overlay-layout/error-overlay-layout.js +4 -4
  99. package/dist/client/components/react-dev-overlay/_experimental/internal/components/errors/error-overlay-layout/error-overlay-layout.js.map +1 -1
  100. package/dist/client/components/react-dev-overlay/_experimental/internal/components/errors/error-overlay-nav/error-overlay-nav.d.ts +2 -2
  101. package/dist/client/components/react-dev-overlay/_experimental/internal/components/errors/error-overlay-nav/error-overlay-nav.js +2 -2
  102. package/dist/client/components/react-dev-overlay/_experimental/internal/components/errors/error-overlay-nav/error-overlay-nav.js.map +1 -1
  103. package/dist/client/components/react-dev-overlay/_experimental/internal/components/errors/error-overlay-nav/error-overlay-nav.stories.js +1 -1
  104. package/dist/client/components/react-dev-overlay/_experimental/internal/components/errors/error-overlay-nav/error-overlay-nav.stories.js.map +1 -1
  105. package/dist/client/components/react-dev-overlay/_experimental/internal/components/errors/error-overlay-pagination/error-overlay-pagination.d.ts +2 -2
  106. package/dist/client/components/react-dev-overlay/_experimental/internal/components/errors/error-overlay-pagination/error-overlay-pagination.js +9 -9
  107. package/dist/client/components/react-dev-overlay/_experimental/internal/components/errors/error-overlay-pagination/error-overlay-pagination.js.map +1 -1
  108. package/dist/client/components/react-dev-overlay/_experimental/internal/components/errors/error-overlay-pagination/error-overlay-pagination.stories.js +4 -4
  109. package/dist/client/components/react-dev-overlay/_experimental/internal/components/errors/error-overlay-pagination/error-overlay-pagination.stories.js.map +1 -1
  110. package/dist/client/components/react-dev-overlay/_experimental/internal/components/terminal/terminal.js +15 -10
  111. package/dist/client/components/react-dev-overlay/_experimental/internal/components/terminal/terminal.js.map +1 -1
  112. package/dist/client/components/react-dev-overlay/_experimental/internal/components/toast/toast.js +3 -1
  113. package/dist/client/components/react-dev-overlay/_experimental/internal/components/toast/toast.js.map +1 -1
  114. package/dist/client/components/react-dev-overlay/_experimental/internal/container/errors.d.ts +2 -2
  115. package/dist/client/components/react-dev-overlay/_experimental/internal/container/errors.js +7 -7
  116. package/dist/client/components/react-dev-overlay/_experimental/internal/container/errors.js.map +1 -1
  117. package/dist/client/components/react-dev-overlay/_experimental/internal/container/errors.stories.js +5 -5
  118. package/dist/client/components/react-dev-overlay/_experimental/internal/container/errors.stories.js.map +1 -1
  119. package/dist/client/components/react-dev-overlay/_experimental/internal/container/runtime-error/component-stack-pseudo-html.js +1 -1
  120. package/dist/client/components/react-dev-overlay/_experimental/internal/container/runtime-error/component-stack-pseudo-html.js.map +1 -1
  121. package/dist/client/components/react-dev-overlay/_experimental/internal/container/runtime-error/render-error.d.ts +1 -1
  122. package/dist/client/components/react-dev-overlay/_experimental/internal/container/runtime-error/render-error.js +4 -12
  123. package/dist/client/components/react-dev-overlay/_experimental/internal/container/runtime-error/render-error.js.map +1 -1
  124. package/dist/client/components/react-dev-overlay/_experimental/internal/icons/collapse-icon.js +3 -1
  125. package/dist/client/components/react-dev-overlay/_experimental/internal/icons/collapse-icon.js.map +1 -1
  126. package/dist/client/components/react-dev-overlay/_experimental/internal/icons/stop-icon.d.ts +1 -0
  127. package/dist/client/components/react-dev-overlay/_experimental/internal/icons/stop-icon.js +34 -0
  128. package/dist/client/components/react-dev-overlay/_experimental/internal/icons/stop-icon.js.map +1 -0
  129. package/dist/client/components/react-dev-overlay/_experimental/internal/styles/base.js +2 -2
  130. package/dist/client/components/react-dev-overlay/_experimental/internal/styles/base.js.map +1 -1
  131. package/dist/client/components/react-dev-overlay/_experimental/internal/styles/component-styles.js +7 -1
  132. package/dist/client/components/react-dev-overlay/_experimental/internal/styles/component-styles.js.map +1 -1
  133. package/dist/client/components/react-dev-overlay/_experimental/pages/react-dev-overlay.js +6 -2
  134. package/dist/client/components/react-dev-overlay/_experimental/pages/react-dev-overlay.js.map +1 -1
  135. package/dist/client/components/react-dev-overlay/hydration-diff/diff-view.js +2 -2
  136. package/dist/client/components/react-dev-overlay/hydration-diff/diff-view.js.map +1 -1
  137. package/dist/client/components/react-dev-overlay/server/get-next-error-feedback-middleware.js +4 -4
  138. package/dist/client/components/react-dev-overlay/server/get-next-error-feedback-middleware.js.map +1 -1
  139. package/dist/client/components/react-dev-overlay/server/middleware-response.d.ts +9 -0
  140. package/dist/client/components/react-dev-overlay/server/middleware-response.js +46 -0
  141. package/dist/client/components/react-dev-overlay/server/middleware-response.js.map +1 -0
  142. package/dist/client/components/react-dev-overlay/server/middleware-turbopack.js +13 -12
  143. package/dist/client/components/react-dev-overlay/server/middleware-turbopack.js.map +1 -1
  144. package/dist/client/components/react-dev-overlay/server/middleware-webpack.js +12 -11
  145. package/dist/client/components/react-dev-overlay/server/middleware-webpack.js.map +1 -1
  146. package/dist/client/components/react-dev-overlay/server/shared.d.ts +0 -7
  147. package/dist/client/components/react-dev-overlay/server/shared.js +1 -51
  148. package/dist/client/components/react-dev-overlay/server/shared.js.map +1 -1
  149. package/dist/client/components/react-dev-overlay/shared.d.ts +1 -0
  150. package/dist/client/components/react-dev-overlay/shared.js +2 -0
  151. package/dist/client/components/react-dev-overlay/shared.js.map +1 -1
  152. package/dist/client/index.js +2 -3
  153. package/dist/client/index.js.map +1 -1
  154. package/dist/client/link.js.map +1 -1
  155. package/dist/compiled/@next/font/dist/google/fetch-css-from-google-fonts.js +8 -44
  156. package/dist/compiled/@next/font/dist/google/fetch-font-file.d.ts +2 -1
  157. package/dist/compiled/@next/font/dist/google/fetch-font-file.js +6 -20
  158. package/dist/compiled/@next/font/dist/google/fetch-resource.d.ts +6 -0
  159. package/dist/compiled/@next/font/dist/google/fetch-resource.js +46 -0
  160. package/dist/compiled/next-server/app-page-experimental.runtime.dev.js +3 -3
  161. package/dist/compiled/next-server/app-page-experimental.runtime.dev.js.map +1 -1
  162. package/dist/compiled/next-server/app-page.runtime.dev.js +3 -3
  163. package/dist/compiled/next-server/app-page.runtime.dev.js.map +1 -1
  164. package/dist/compiled/next-server/server.runtime.prod.js +2 -2
  165. package/dist/compiled/next-server/server.runtime.prod.js.map +1 -1
  166. package/dist/compiled/node-fetch/index.js +1 -1
  167. package/dist/compiled/sass-loader/cjs.js +1 -1
  168. package/dist/compiled/webpack/webpack.js +23 -1
  169. package/dist/esm/build/entries.js +9 -2
  170. package/dist/esm/build/entries.js.map +1 -1
  171. package/dist/esm/build/index.js +3 -3
  172. package/dist/esm/build/index.js.map +1 -1
  173. package/dist/esm/build/swc/index.js +1 -1
  174. package/dist/esm/build/webpack/config/blocks/base.js +3 -1
  175. package/dist/esm/build/webpack/config/blocks/base.js.map +1 -1
  176. package/dist/esm/build/webpack/config/blocks/css/index.js +3 -1
  177. package/dist/esm/build/webpack/config/blocks/css/index.js.map +1 -1
  178. package/dist/esm/build/webpack/config/blocks/css/loaders/client.js +3 -1
  179. package/dist/esm/build/webpack/config/blocks/css/loaders/client.js.map +1 -1
  180. package/dist/esm/build/webpack/loaders/next-flight-client-entry-loader.js +4 -0
  181. package/dist/esm/build/webpack/loaders/next-flight-client-entry-loader.js.map +1 -1
  182. package/dist/esm/build/webpack/loaders/next-flight-client-module-loader.js +7 -1
  183. package/dist/esm/build/webpack/loaders/next-flight-client-module-loader.js.map +1 -1
  184. package/dist/esm/build/webpack/loaders/next-flight-loader/index.js +8 -2
  185. package/dist/esm/build/webpack/loaders/next-flight-loader/index.js.map +1 -1
  186. package/dist/esm/build/webpack/loaders/utils.js +1 -1
  187. package/dist/esm/build/webpack/loaders/utils.js.map +1 -1
  188. package/dist/esm/build/webpack/plugins/build-manifest-plugin.js +14 -5
  189. package/dist/esm/build/webpack/plugins/build-manifest-plugin.js.map +1 -1
  190. package/dist/esm/build/webpack/plugins/flight-client-entry-plugin.js +28 -18
  191. package/dist/esm/build/webpack/plugins/flight-client-entry-plugin.js.map +1 -1
  192. package/dist/esm/build/webpack/plugins/flight-manifest-plugin.js +3 -3
  193. package/dist/esm/build/webpack/plugins/flight-manifest-plugin.js.map +1 -1
  194. package/dist/esm/build/webpack/plugins/middleware-plugin.js +6 -3
  195. package/dist/esm/build/webpack/plugins/middleware-plugin.js.map +1 -1
  196. package/dist/esm/build/webpack/plugins/next-trace-entrypoints-plugin.js +11 -1
  197. package/dist/esm/build/webpack/plugins/next-trace-entrypoints-plugin.js.map +1 -1
  198. package/dist/esm/build/webpack/plugins/nextjs-require-cache-hot-reloader.js +1 -1
  199. package/dist/esm/build/webpack/plugins/nextjs-require-cache-hot-reloader.js.map +1 -1
  200. package/dist/esm/build/webpack/plugins/rspack-flight-client-entry-plugin.js +87 -0
  201. package/dist/esm/build/webpack/plugins/rspack-flight-client-entry-plugin.js.map +1 -0
  202. package/dist/esm/build/webpack/plugins/rspack-profiling-plugin.js +40 -0
  203. package/dist/esm/build/webpack/plugins/rspack-profiling-plugin.js.map +1 -0
  204. package/dist/esm/build/webpack/plugins/wellknown-errors-plugin/parseNextAppLoaderError.js +2 -1
  205. package/dist/esm/build/webpack/plugins/wellknown-errors-plugin/parseNextAppLoaderError.js.map +1 -1
  206. package/dist/esm/build/webpack/utils.js +6 -2
  207. package/dist/esm/build/webpack/utils.js.map +1 -1
  208. package/dist/esm/build/webpack-config.js +37 -5
  209. package/dist/esm/build/webpack-config.js.map +1 -1
  210. package/dist/esm/client/app-bootstrap.js +1 -1
  211. package/dist/esm/client/app-dir/link.js +2 -0
  212. package/dist/esm/client/app-dir/link.js.map +1 -1
  213. package/dist/esm/client/components/react-dev-overlay/_experimental/app/react-dev-overlay.js +34 -26
  214. package/dist/esm/client/components/react-dev-overlay/_experimental/app/react-dev-overlay.js.map +1 -1
  215. package/dist/esm/client/components/react-dev-overlay/_experimental/app/react-dev-overlay.stories.js +1 -0
  216. package/dist/esm/client/components/react-dev-overlay/_experimental/app/react-dev-overlay.stories.js.map +1 -1
  217. package/dist/esm/client/components/react-dev-overlay/_experimental/font/font-styles.js +25 -0
  218. package/dist/esm/client/components/react-dev-overlay/_experimental/font/font-styles.js.map +1 -0
  219. package/dist/esm/client/components/react-dev-overlay/_experimental/font/geist-latin-ext.woff2 +0 -0
  220. package/dist/esm/client/components/react-dev-overlay/_experimental/font/geist-latin.woff2 +0 -0
  221. package/dist/esm/client/components/react-dev-overlay/_experimental/font/geist-mono-latin-ext.woff2 +0 -0
  222. package/dist/esm/client/components/react-dev-overlay/_experimental/font/geist-mono-latin.woff2 +0 -0
  223. package/dist/esm/client/components/react-dev-overlay/_experimental/font/get-dev-overlay-font-middleware.js +54 -0
  224. package/dist/esm/client/components/react-dev-overlay/_experimental/font/get-dev-overlay-font-middleware.js.map +1 -0
  225. package/dist/esm/client/components/react-dev-overlay/_experimental/internal/components/code-frame/code-frame.js +16 -8
  226. package/dist/esm/client/components/react-dev-overlay/_experimental/internal/components/code-frame/code-frame.js.map +1 -1
  227. package/dist/esm/client/components/react-dev-overlay/_experimental/internal/components/copy-button/index.js +3 -3
  228. package/dist/esm/client/components/react-dev-overlay/_experimental/internal/components/copy-button/index.js.map +1 -1
  229. package/dist/esm/client/components/react-dev-overlay/_experimental/internal/components/dialog/dialog.js +2 -1
  230. package/dist/esm/client/components/react-dev-overlay/_experimental/internal/components/dialog/dialog.js.map +1 -1
  231. package/dist/esm/client/components/react-dev-overlay/_experimental/internal/components/dialog/styles.js +1 -1
  232. package/dist/esm/client/components/react-dev-overlay/_experimental/internal/components/dialog/styles.js.map +1 -1
  233. package/dist/esm/client/components/react-dev-overlay/_experimental/internal/components/errors/dev-tools-indicator/dev-tools-indicator.js +83 -31
  234. package/dist/esm/client/components/react-dev-overlay/_experimental/internal/components/errors/dev-tools-indicator/dev-tools-indicator.js.map +1 -1
  235. package/dist/esm/client/components/react-dev-overlay/_experimental/internal/components/errors/dev-tools-indicator/dev-tools-indicator.stories.js +13 -14
  236. package/dist/esm/client/components/react-dev-overlay/_experimental/internal/components/errors/dev-tools-indicator/dev-tools-indicator.stories.js.map +1 -1
  237. package/dist/esm/client/components/react-dev-overlay/_experimental/internal/components/errors/dev-tools-indicator/dev-tools-info/dev-tools-info.js +52 -0
  238. package/dist/esm/client/components/react-dev-overlay/_experimental/internal/components/errors/dev-tools-indicator/dev-tools-info/dev-tools-info.js.map +1 -0
  239. package/dist/esm/client/components/react-dev-overlay/_experimental/internal/components/errors/dev-tools-indicator/dev-tools-info/route-info.js +130 -0
  240. package/dist/esm/client/components/react-dev-overlay/_experimental/internal/components/errors/dev-tools-indicator/dev-tools-info/route-info.js.map +1 -0
  241. package/dist/esm/client/components/react-dev-overlay/_experimental/internal/components/errors/dev-tools-indicator/dev-tools-info/turbopack-info.js +184 -0
  242. package/dist/esm/client/components/react-dev-overlay/_experimental/internal/components/errors/dev-tools-indicator/dev-tools-info/turbopack-info.js.map +1 -0
  243. package/dist/esm/client/components/react-dev-overlay/_experimental/internal/components/errors/dev-tools-indicator/internal/next-logo.js +28 -6
  244. package/dist/esm/client/components/react-dev-overlay/_experimental/internal/components/errors/dev-tools-indicator/internal/next-logo.js.map +1 -1
  245. package/dist/esm/client/components/react-dev-overlay/_experimental/internal/components/errors/error-message/error-message.js +1 -1
  246. package/dist/esm/client/components/react-dev-overlay/_experimental/internal/components/errors/error-message/error-message.js.map +1 -1
  247. package/dist/esm/client/components/react-dev-overlay/_experimental/internal/components/errors/error-overlay/error-overlay.js +3 -3
  248. package/dist/esm/client/components/react-dev-overlay/_experimental/internal/components/errors/error-overlay/error-overlay.js.map +1 -1
  249. package/dist/esm/client/components/react-dev-overlay/_experimental/internal/components/errors/error-overlay-layout/error-overlay-layout.js +4 -4
  250. package/dist/esm/client/components/react-dev-overlay/_experimental/internal/components/errors/error-overlay-layout/error-overlay-layout.js.map +1 -1
  251. package/dist/esm/client/components/react-dev-overlay/_experimental/internal/components/errors/error-overlay-nav/error-overlay-nav.js +2 -2
  252. package/dist/esm/client/components/react-dev-overlay/_experimental/internal/components/errors/error-overlay-nav/error-overlay-nav.js.map +1 -1
  253. package/dist/esm/client/components/react-dev-overlay/_experimental/internal/components/errors/error-overlay-nav/error-overlay-nav.stories.js +1 -1
  254. package/dist/esm/client/components/react-dev-overlay/_experimental/internal/components/errors/error-overlay-nav/error-overlay-nav.stories.js.map +1 -1
  255. package/dist/esm/client/components/react-dev-overlay/_experimental/internal/components/errors/error-overlay-pagination/error-overlay-pagination.js +9 -9
  256. package/dist/esm/client/components/react-dev-overlay/_experimental/internal/components/errors/error-overlay-pagination/error-overlay-pagination.js.map +1 -1
  257. package/dist/esm/client/components/react-dev-overlay/_experimental/internal/components/errors/error-overlay-pagination/error-overlay-pagination.stories.js +4 -4
  258. package/dist/esm/client/components/react-dev-overlay/_experimental/internal/components/errors/error-overlay-pagination/error-overlay-pagination.stories.js.map +1 -1
  259. package/dist/esm/client/components/react-dev-overlay/_experimental/internal/components/terminal/terminal.js +15 -10
  260. package/dist/esm/client/components/react-dev-overlay/_experimental/internal/components/terminal/terminal.js.map +1 -1
  261. package/dist/esm/client/components/react-dev-overlay/_experimental/internal/components/toast/toast.js +3 -1
  262. package/dist/esm/client/components/react-dev-overlay/_experimental/internal/components/toast/toast.js.map +1 -1
  263. package/dist/esm/client/components/react-dev-overlay/_experimental/internal/container/errors.js +7 -7
  264. package/dist/esm/client/components/react-dev-overlay/_experimental/internal/container/errors.js.map +1 -1
  265. package/dist/esm/client/components/react-dev-overlay/_experimental/internal/container/errors.stories.js +5 -5
  266. package/dist/esm/client/components/react-dev-overlay/_experimental/internal/container/errors.stories.js.map +1 -1
  267. package/dist/esm/client/components/react-dev-overlay/_experimental/internal/container/runtime-error/component-stack-pseudo-html.js +1 -1
  268. package/dist/esm/client/components/react-dev-overlay/_experimental/internal/container/runtime-error/component-stack-pseudo-html.js.map +1 -1
  269. package/dist/esm/client/components/react-dev-overlay/_experimental/internal/container/runtime-error/render-error.js +4 -12
  270. package/dist/esm/client/components/react-dev-overlay/_experimental/internal/container/runtime-error/render-error.js.map +1 -1
  271. package/dist/esm/client/components/react-dev-overlay/_experimental/internal/icons/collapse-icon.js +3 -1
  272. package/dist/esm/client/components/react-dev-overlay/_experimental/internal/icons/collapse-icon.js.map +1 -1
  273. package/dist/esm/client/components/react-dev-overlay/_experimental/internal/icons/stop-icon.js +18 -0
  274. package/dist/esm/client/components/react-dev-overlay/_experimental/internal/icons/stop-icon.js.map +1 -0
  275. package/dist/esm/client/components/react-dev-overlay/_experimental/internal/styles/base.js +2 -2
  276. package/dist/esm/client/components/react-dev-overlay/_experimental/internal/styles/base.js.map +1 -1
  277. package/dist/esm/client/components/react-dev-overlay/_experimental/internal/styles/component-styles.js +7 -1
  278. package/dist/esm/client/components/react-dev-overlay/_experimental/internal/styles/component-styles.js.map +1 -1
  279. package/dist/esm/client/components/react-dev-overlay/_experimental/pages/react-dev-overlay.js +6 -2
  280. package/dist/esm/client/components/react-dev-overlay/_experimental/pages/react-dev-overlay.js.map +1 -1
  281. package/dist/esm/client/components/react-dev-overlay/hydration-diff/diff-view.js +1 -1
  282. package/dist/esm/client/components/react-dev-overlay/hydration-diff/diff-view.js.map +1 -1
  283. package/dist/esm/client/components/react-dev-overlay/server/get-next-error-feedback-middleware.js +4 -4
  284. package/dist/esm/client/components/react-dev-overlay/server/get-next-error-feedback-middleware.js.map +1 -1
  285. package/dist/esm/client/components/react-dev-overlay/server/middleware-response.js +30 -0
  286. package/dist/esm/client/components/react-dev-overlay/server/middleware-response.js.map +1 -0
  287. package/dist/esm/client/components/react-dev-overlay/server/middleware-turbopack.js +14 -13
  288. package/dist/esm/client/components/react-dev-overlay/server/middleware-turbopack.js.map +1 -1
  289. package/dist/esm/client/components/react-dev-overlay/server/middleware-webpack.js +13 -12
  290. package/dist/esm/client/components/react-dev-overlay/server/middleware-webpack.js.map +1 -1
  291. package/dist/esm/client/components/react-dev-overlay/server/shared.js +0 -26
  292. package/dist/esm/client/components/react-dev-overlay/server/shared.js.map +1 -1
  293. package/dist/esm/client/components/react-dev-overlay/shared.js +2 -0
  294. package/dist/esm/client/components/react-dev-overlay/shared.js.map +1 -1
  295. package/dist/esm/client/index.js +2 -3
  296. package/dist/esm/client/index.js.map +1 -1
  297. package/dist/esm/client/link.js.map +1 -1
  298. package/dist/esm/server/base-server.js +15 -15
  299. package/dist/esm/server/base-server.js.map +1 -1
  300. package/dist/esm/server/config-shared.js.map +1 -1
  301. package/dist/esm/server/config.js +1 -1
  302. package/dist/esm/server/dev/hot-reloader-turbopack.js +4 -2
  303. package/dist/esm/server/dev/hot-reloader-turbopack.js.map +1 -1
  304. package/dist/esm/server/dev/hot-reloader-webpack.js +4 -2
  305. package/dist/esm/server/dev/hot-reloader-webpack.js.map +1 -1
  306. package/dist/esm/server/lib/app-info-log.js +1 -1
  307. package/dist/esm/server/lib/start-server.js +1 -1
  308. package/dist/esm/shared/lib/get-rspack.js +32 -0
  309. package/dist/esm/shared/lib/get-rspack.js.map +1 -0
  310. package/dist/server/base-server.js +15 -15
  311. package/dist/server/base-server.js.map +1 -1
  312. package/dist/server/config-shared.d.ts +3 -3
  313. package/dist/server/config-shared.js.map +1 -1
  314. package/dist/server/config.js +1 -1
  315. package/dist/server/dev/hot-reloader-turbopack.js +4 -2
  316. package/dist/server/dev/hot-reloader-turbopack.js.map +1 -1
  317. package/dist/server/dev/hot-reloader-webpack.js +4 -2
  318. package/dist/server/dev/hot-reloader-webpack.js.map +1 -1
  319. package/dist/server/lib/app-info-log.js +1 -1
  320. package/dist/server/lib/start-server.js +1 -1
  321. package/dist/shared/lib/get-rspack.d.ts +2 -0
  322. package/dist/shared/lib/get-rspack.js +54 -0
  323. package/dist/shared/lib/get-rspack.js.map +1 -0
  324. package/dist/telemetry/anonymous-meta.js +1 -1
  325. package/dist/telemetry/events/session-stopped.js +2 -2
  326. package/dist/telemetry/events/version.js +2 -2
  327. package/dist/trace/trace-uploader.js +1 -2
  328. package/dist/trace/trace-uploader.js.map +1 -1
  329. package/package.json +15 -15
  330. package/dist/client/components/react-dev-overlay/internal/icons/CollapseIcon.d.ts +0 -3
  331. package/dist/client/components/react-dev-overlay/internal/icons/CollapseIcon.js +0 -43
  332. package/dist/client/components/react-dev-overlay/internal/icons/CollapseIcon.js.map +0 -1
  333. package/dist/esm/client/components/react-dev-overlay/internal/icons/CollapseIcon.js +0 -27
  334. package/dist/esm/client/components/react-dev-overlay/internal/icons/CollapseIcon.js.map +0 -1
@@ -1,5 +1,4 @@
1
1
  import type { StackFrame } from 'stacktrace-parser';
2
- import type { ServerResponse } from 'http';
3
2
  export type SourcePackage = 'react' | 'next';
4
3
  export interface OriginalStackFramesRequest {
5
4
  frames: StackFrame[];
@@ -27,9 +26,3 @@ export declare function findSourcePackage({ file, methodName, }: Partial<{
27
26
  * @note It ignores Next.js/React internals, as these can often be huge bundled files.
28
27
  */
29
28
  export declare function getOriginalCodeFrame(frame: StackFrame, source: string | null, colors?: boolean): string | null;
30
- export declare function noContent(res: ServerResponse): void;
31
- export declare function badRequest(res: ServerResponse): void;
32
- export declare function notFound(res: ServerResponse): void;
33
- export declare function internalServerError(res: ServerResponse, error?: unknown): void;
34
- export declare function json(res: ServerResponse, data: any): void;
35
- export declare function jsonString(res: ServerResponse, data: string): void;
@@ -3,14 +3,8 @@ Object.defineProperty(exports, "__esModule", {
3
3
  value: true
4
4
  });
5
5
  0 && (module.exports = {
6
- badRequest: null,
7
6
  findSourcePackage: null,
8
- getOriginalCodeFrame: null,
9
- internalServerError: null,
10
- json: null,
11
- jsonString: null,
12
- noContent: null,
13
- notFound: null
7
+ getOriginalCodeFrame: null
14
8
  });
15
9
  function _export(target, all) {
16
10
  for(var name in all)Object.defineProperty(target, name, {
@@ -19,33 +13,14 @@ function _export(target, all) {
19
13
  });
20
14
  }
21
15
  _export(exports, {
22
- badRequest: function() {
23
- return badRequest;
24
- },
25
16
  findSourcePackage: function() {
26
17
  return findSourcePackage;
27
18
  },
28
19
  getOriginalCodeFrame: function() {
29
20
  return getOriginalCodeFrame;
30
- },
31
- internalServerError: function() {
32
- return internalServerError;
33
- },
34
- json: function() {
35
- return json;
36
- },
37
- jsonString: function() {
38
- return jsonString;
39
- },
40
- noContent: function() {
41
- return noContent;
42
- },
43
- notFound: function() {
44
- return notFound;
45
21
  }
46
22
  });
47
23
  const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
48
- const _util = require("util");
49
24
  const _codeframe = require("next/dist/compiled/babel/code-frame");
50
25
  const _isinternal = /*#__PURE__*/ _interop_require_wildcard._(require("../../../../shared/lib/is-internal"));
51
26
  const nextMethodRe = /(^__webpack_.*|node_modules[\\/]next[\\/])/;
@@ -84,31 +59,6 @@ function getOriginalCodeFrame(frame, source, colors) {
84
59
  forceColor: colors
85
60
  });
86
61
  }
87
- function noContent(res) {
88
- res.statusCode = 204;
89
- res.end('No Content');
90
- }
91
- function badRequest(res) {
92
- res.statusCode = 400;
93
- res.end('Bad Request');
94
- }
95
- function notFound(res) {
96
- res.statusCode = 404;
97
- res.end('Not Found');
98
- }
99
- function internalServerError(res, error) {
100
- res.statusCode = 500;
101
- res.setHeader('Content-Type', 'text/plain');
102
- res.end(error !== undefined ? (0, _util.inspect)(error, {
103
- colors: false
104
- }) : 'Internal Server Error');
105
- }
106
- function json(res, data) {
107
- res.setHeader('Content-Type', 'application/json').end(Buffer.from(JSON.stringify(data)));
108
- }
109
- function jsonString(res, data) {
110
- res.setHeader('Content-Type', 'application/json').end(Buffer.from(data));
111
- }
112
62
 
113
63
  if ((typeof exports.default === 'function' || (typeof exports.default === 'object' && exports.default !== null)) && typeof exports.default.__esModule === 'undefined') {
114
64
  Object.defineProperty(exports.default, '__esModule', { value: true });
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../src/client/components/react-dev-overlay/server/shared.ts"],"sourcesContent":["import type { StackFrame } from 'stacktrace-parser'\nimport type { ServerResponse } from 'http'\nimport { inspect } from 'util'\nimport { codeFrameColumns } from 'next/dist/compiled/babel/code-frame'\nimport isInternal, {\n nextInternalsRe,\n reactNodeModulesRe,\n reactVendoredRe,\n} from '../../../../shared/lib/is-internal'\n\nexport type SourcePackage = 'react' | 'next'\n\nexport interface OriginalStackFramesRequest {\n frames: StackFrame[]\n isServer: boolean\n isEdgeServer: boolean\n isAppDirectory: boolean\n}\n\nexport type OriginalStackFramesResponse = OriginalStackFrameResponseResult[]\n\nexport type OriginalStackFrameResponseResult =\n PromiseSettledResult<OriginalStackFrameResponse>\n\nexport interface OriginalStackFrameResponse {\n originalStackFrame?: (StackFrame & { ignored: boolean }) | null\n originalCodeFrame?: string | null\n /** We use this to group frames in the error overlay */\n sourcePackage?: SourcePackage | null\n}\n\nconst nextMethodRe = /(^__webpack_.*|node_modules[\\\\/]next[\\\\/])/\n\n/** Given a frame, it parses which package it belongs to. */\nexport function findSourcePackage({\n file,\n methodName,\n}: Partial<{ file: string | null; methodName: string | null }>):\n | SourcePackage\n | undefined {\n if (file) {\n // matching React first since vendored would match under `next` too\n if (reactVendoredRe.test(file) || reactNodeModulesRe.test(file)) {\n return 'react'\n } else if (nextInternalsRe.test(file)) {\n return 'next'\n } else if (file.startsWith('[turbopack]/')) {\n return 'next'\n }\n }\n\n if (methodName) {\n if (nextMethodRe.test(methodName)) {\n return 'next'\n }\n }\n}\n\n/**\n * It looks up the code frame of the traced source.\n * @note It ignores Next.js/React internals, as these can often be huge bundled files.\n */\nexport function getOriginalCodeFrame(\n frame: StackFrame,\n source: string | null,\n colors: boolean = process.stdout.isTTY\n): string | null {\n if (!source || isInternal(frame.file)) {\n return null\n }\n\n return codeFrameColumns(\n source,\n {\n start: {\n // 1-based, but -1 means start line without highlighting\n line: frame.lineNumber ?? -1,\n // 1-based, but 0 means whole line without column highlighting\n column: frame.column ?? 0,\n },\n },\n { forceColor: colors }\n )\n}\n\nexport function noContent(res: ServerResponse) {\n res.statusCode = 204\n res.end('No Content')\n}\n\nexport function badRequest(res: ServerResponse) {\n res.statusCode = 400\n res.end('Bad Request')\n}\n\nexport function notFound(res: ServerResponse) {\n res.statusCode = 404\n res.end('Not Found')\n}\n\nexport function internalServerError(res: ServerResponse, error?: unknown) {\n res.statusCode = 500\n res.setHeader('Content-Type', 'text/plain')\n res.end(\n error !== undefined\n ? inspect(error, { colors: false })\n : 'Internal Server Error'\n )\n}\n\nexport function json(res: ServerResponse, data: any) {\n res\n .setHeader('Content-Type', 'application/json')\n .end(Buffer.from(JSON.stringify(data)))\n}\n\nexport function jsonString(res: ServerResponse, data: string) {\n res.setHeader('Content-Type', 'application/json').end(Buffer.from(data))\n}\n"],"names":["badRequest","findSourcePackage","getOriginalCodeFrame","internalServerError","json","jsonString","noContent","notFound","nextMethodRe","file","methodName","reactVendoredRe","test","reactNodeModulesRe","nextInternalsRe","startsWith","frame","source","colors","process","stdout","isTTY","isInternal","codeFrameColumns","start","line","lineNumber","column","forceColor","res","statusCode","end","error","setHeader","undefined","inspect","data","Buffer","from","JSON","stringify"],"mappings":";;;;;;;;;;;;;;;;;;;;;IA0FgBA,UAAU;eAAVA;;IAxDAC,iBAAiB;eAAjBA;;IA4BAC,oBAAoB;eAApBA;;IAsCAC,mBAAmB;eAAnBA;;IAUAC,IAAI;eAAJA;;IAMAC,UAAU;eAAVA;;IA/BAC,SAAS;eAATA;;IAUAC,QAAQ;eAARA;;;;sBA7FQ;2BACS;sEAK1B;AAuBP,MAAMC,eAAe;AAGd,SAASP,kBAAkB,KAG4B;IAH5B,IAAA,EAChCQ,IAAI,EACJC,UAAU,EACkD,GAH5B;IAMhC,IAAID,MAAM;QACR,mEAAmE;QACnE,IAAIE,2BAAe,CAACC,IAAI,CAACH,SAASI,8BAAkB,CAACD,IAAI,CAACH,OAAO;YAC/D,OAAO;QACT,OAAO,IAAIK,2BAAe,CAACF,IAAI,CAACH,OAAO;YACrC,OAAO;QACT,OAAO,IAAIA,KAAKM,UAAU,CAAC,iBAAiB;YAC1C,OAAO;QACT;IACF;IAEA,IAAIL,YAAY;QACd,IAAIF,aAAaI,IA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CAACF;AACpE"}
1
+ {"version":3,"sources":["../../../../../src/client/components/react-dev-overlay/server/shared.ts"],"sourcesContent":["import type { StackFrame } from 'stacktrace-parser'\nimport { codeFrameColumns } from 'next/dist/compiled/babel/code-frame'\nimport isInternal, {\n nextInternalsRe,\n reactNodeModulesRe,\n reactVendoredRe,\n} from '../../../../shared/lib/is-internal'\n\nexport type SourcePackage = 'react' | 'next'\n\nexport interface OriginalStackFramesRequest {\n frames: StackFrame[]\n isServer: boolean\n isEdgeServer: boolean\n isAppDirectory: boolean\n}\n\nexport type OriginalStackFramesResponse = OriginalStackFrameResponseResult[]\n\nexport type OriginalStackFrameResponseResult =\n PromiseSettledResult<OriginalStackFrameResponse>\n\nexport interface OriginalStackFrameResponse {\n originalStackFrame?: (StackFrame & { ignored: boolean }) | null\n originalCodeFrame?: string | null\n /** We use this to group frames in the error overlay */\n sourcePackage?: SourcePackage | null\n}\n\nconst nextMethodRe = /(^__webpack_.*|node_modules[\\\\/]next[\\\\/])/\n\n/** Given a frame, it parses which package it belongs to. */\nexport function findSourcePackage({\n file,\n methodName,\n}: Partial<{ file: string | null; methodName: string | null }>):\n | SourcePackage\n | undefined {\n if (file) {\n // matching React first since vendored would match under `next` too\n if (reactVendoredRe.test(file) || reactNodeModulesRe.test(file)) {\n return 'react'\n } else if (nextInternalsRe.test(file)) {\n return 'next'\n } else if (file.startsWith('[turbopack]/')) {\n return 'next'\n }\n }\n\n if (methodName) {\n if (nextMethodRe.test(methodName)) {\n return 'next'\n }\n }\n}\n\n/**\n * It looks up the code frame of the traced source.\n * @note It ignores Next.js/React internals, as these can often be huge bundled files.\n */\nexport function getOriginalCodeFrame(\n frame: StackFrame,\n source: string | null,\n colors: boolean = process.stdout.isTTY\n): string | null {\n if (!source || isInternal(frame.file)) {\n return null\n }\n\n return codeFrameColumns(\n source,\n {\n start: {\n // 1-based, but -1 means start line without highlighting\n line: frame.lineNumber ?? -1,\n // 1-based, but 0 means whole line without column highlighting\n column: frame.column ?? 0,\n },\n },\n { forceColor: colors }\n )\n}\n"],"names":["findSourcePackage","getOriginalCodeFrame","nextMethodRe","file","methodName","reactVendoredRe","test","reactNodeModulesRe","nextInternalsRe","startsWith","frame","source","colors","process","stdout","isTTY","isInternal","codeFrameColumns","start","line","lineNumber","column","forceColor"],"mappings":";;;;;;;;;;;;;;;IAgCgBA,iBAAiB;eAAjBA;;IA4BAC,oBAAoB;eAApBA;;;;2BA3DiB;sEAK1B;AAuBP,MAAMC,eAAe;AAGd,SAASF,kBAAkB,KAG4B;IAH5B,IAAA,EAChCG,IAAI,EACJC,UAAU,EACkD,GAH5B;IAMhC,IAAID,MAAM;QACR,mEAAmE;QACnE,IAAIE,2BAAe,CAACC,IAAI,CAACH,SAASI,8BAAkB,CAACD,IAAI,CAACH,OAAO;YAC/D,OAAO;QACT,OAAO,IAAIK,2BAAe,CAACF,IAAI,CAACH,OAAO;YACrC,OAAO;QACT,OAAO,IAAIA,KAAKM,UAAU,CAAC,iBAAiB;YAC1C,OAAO;QACT;IACF;IAEA,IAAIL,YAAY;QACd,IAAIF,aAAaI,IAAI,CAACF,aAAa;YACjC,OAAO;QACT;IACF;AACF;AAMO,SAASH,qBACdS,KAAiB,EACjBC,MAAqB,EACrBC,MAAsC;IAAtCA,IAAAA,mBAAAA,SAAkBC,QAAQC,MAAM,CAACC,KAAK;IAEtC,IAAI,CAACJ,UAAUK,IAAAA,mBAAU,EAACN,MAAMP,IAAI,GAAG;QACrC,OAAO;IACT;QAOYO,mBAEEA;IAPd,OAAOO,IAAAA,2BAAgB,EACrBN,QACA;QACEO,OAAO;YACL,wDAAwD;YACxDC,MAAMT,CAAAA,oBAAAA,MAAMU,UAAU,YAAhBV,oBAAoB,CAAC;YAC3B,8DAA8D;YAC9DW,QAAQX,CAAAA,gBAAAA,MAAMW,MAAM,YAAZX,gBAAgB;QAC1B;IACF,GACA;QAAEY,YAAYV;IAAO;AAEzB"}
@@ -22,6 +22,7 @@ export interface OverlayState {
22
22
  versionInfo: VersionInfo;
23
23
  notFound: boolean;
24
24
  staticIndicator: boolean;
25
+ disableDevIndicator: boolean;
25
26
  debugInfo: DebugInfo;
26
27
  }
27
28
  export declare const ACTION_STATIC_INDICATOR = "static-indicator";
@@ -61,6 +61,7 @@ _export(exports, {
61
61
  }
62
62
  });
63
63
  const _react = require("react");
64
+ var _process_env___NEXT_DEV_INDICATOR;
64
65
  const ACTION_STATIC_INDICATOR = 'static-indicator';
65
66
  const ACTION_BUILD_OK = 'build-ok';
66
67
  const ACTION_BUILD_ERROR = 'build-error';
@@ -85,6 +86,7 @@ const INITIAL_OVERLAY_STATE = {
85
86
  errors: [],
86
87
  notFound: false,
87
88
  staticIndicator: false,
89
+ disableDevIndicator: ((_process_env___NEXT_DEV_INDICATOR = process.env.__NEXT_DEV_INDICATOR) == null ? void 0 : _process_env___NEXT_DEV_INDICATOR.toString()) === 'false',
88
90
  refreshState: {
89
91
  type: 'idle'
90
92
  },
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/client/components/react-dev-overlay/shared.ts"],"sourcesContent":["import { useReducer } from 'react'\n\nimport type { StackFrame } from 'next/dist/compiled/stacktrace-parser'\nimport type { VersionInfo } from '../../../server/dev/parse-version-info'\nimport type { SupportedErrorEvent } from './internal/container/Errors'\nimport type { ComponentStackFrame } from './internal/helpers/parse-component-stack'\nimport type { DebugInfo } from './types'\n\ntype FastRefreshState =\n /** No refresh in progress. */\n | { type: 'idle' }\n /** The refresh process has been triggered, but the new code has not been executed yet. */\n | { type: 'pending'; errors: SupportedErrorEvent[] }\n\nexport interface OverlayState {\n nextId: number\n buildError: string | null\n errors: SupportedErrorEvent[]\n refreshState: FastRefreshState\n rootLayoutMissingTags: typeof window.__next_root_layout_missing_tags\n versionInfo: VersionInfo\n notFound: boolean\n staticIndicator: boolean\n debugInfo: DebugInfo\n}\n\nexport const ACTION_STATIC_INDICATOR = 'static-indicator'\nexport const ACTION_BUILD_OK = 'build-ok'\nexport const ACTION_BUILD_ERROR = 'build-error'\nexport const ACTION_BEFORE_REFRESH = 'before-fast-refresh'\nexport const ACTION_REFRESH = 'fast-refresh'\nexport const ACTION_VERSION_INFO = 'version-info'\nexport const ACTION_UNHANDLED_ERROR = 'unhandled-error'\nexport const ACTION_UNHANDLED_REJECTION = 'unhandled-rejection'\nexport const ACTION_DEBUG_INFO = 'debug-info'\n\ninterface StaticIndicatorAction {\n type: typeof ACTION_STATIC_INDICATOR\n staticIndicator: boolean\n}\n\ninterface BuildOkAction {\n type: typeof ACTION_BUILD_OK\n}\ninterface BuildErrorAction {\n type: typeof ACTION_BUILD_ERROR\n message: string\n}\ninterface BeforeFastRefreshAction {\n type: typeof ACTION_BEFORE_REFRESH\n}\ninterface FastRefreshAction {\n type: typeof ACTION_REFRESH\n}\n\nexport interface UnhandledErrorAction {\n type: typeof ACTION_UNHANDLED_ERROR\n reason: Error\n frames: StackFrame[]\n componentStackFrames?: ComponentStackFrame[]\n warning?: [string, string, string]\n}\nexport interface UnhandledRejectionAction {\n type: typeof ACTION_UNHANDLED_REJECTION\n reason: Error\n frames: StackFrame[]\n}\n\nexport interface DebugInfoAction {\n type: typeof ACTION_DEBUG_INFO\n debugInfo: any\n}\n\ninterface VersionInfoAction {\n type: typeof ACTION_VERSION_INFO\n versionInfo: VersionInfo\n}\n\nexport type BusEvent =\n | BuildOkAction\n | BuildErrorAction\n | BeforeFastRefreshAction\n | FastRefreshAction\n | UnhandledErrorAction\n | UnhandledRejectionAction\n | VersionInfoAction\n | StaticIndicatorAction\n | DebugInfoAction\n\nfunction pushErrorFilterDuplicates(\n errors: SupportedErrorEvent[],\n err: SupportedErrorEvent\n): SupportedErrorEvent[] {\n return [\n ...errors.filter((e) => {\n // Filter out duplicate errors\n return e.event.reason.stack !== err.event.reason.stack\n }),\n err,\n ]\n}\n\nexport const INITIAL_OVERLAY_STATE: OverlayState = {\n nextId: 1,\n buildError: null,\n errors: [],\n notFound: false,\n staticIndicator: false,\n refreshState: { type: 'idle' },\n rootLayoutMissingTags: [],\n versionInfo: { installed: '0.0.0', staleness: 'unknown' },\n debugInfo: { devtoolsFrontendUrl: undefined },\n}\n\nexport function useErrorOverlayReducer() {\n return useReducer((_state: OverlayState, action: BusEvent): OverlayState => {\n switch (action.type) {\n case ACTION_DEBUG_INFO: {\n return { ..._state, debugInfo: action.debugInfo }\n }\n case ACTION_STATIC_INDICATOR: {\n return { ..._state, staticIndicator: action.staticIndicator }\n }\n case ACTION_BUILD_OK: {\n return { ..._state, buildError: null }\n }\n case ACTION_BUILD_ERROR: {\n return { ..._state, buildError: action.message }\n }\n case ACTION_BEFORE_REFRESH: {\n return { ..._state, refreshState: { type: 'pending', errors: [] } }\n }\n case ACTION_REFRESH: {\n return {\n ..._state,\n buildError: null,\n errors:\n // Errors can come in during updates. In this case, UNHANDLED_ERROR\n // and UNHANDLED_REJECTION events might be dispatched between the\n // BEFORE_REFRESH and the REFRESH event. We want to keep those errors\n // around until the next refresh. Otherwise we run into a race\n // condition where those errors would be cleared on refresh completion\n // before they can be displayed.\n _state.refreshState.type === 'pending'\n ? _state.refreshState.errors\n : [],\n refreshState: { type: 'idle' },\n }\n }\n case ACTION_UNHANDLED_ERROR:\n case ACTION_UNHANDLED_REJECTION: {\n switch (_state.refreshState.type) {\n case 'idle': {\n return {\n ..._state,\n nextId: _state.nextId + 1,\n errors: pushErrorFilterDuplicates(_state.errors, {\n id: _state.nextId,\n event: action,\n }),\n }\n }\n case 'pending': {\n return {\n ..._state,\n nextId: _state.nextId + 1,\n refreshState: {\n ..._state.refreshState,\n errors: pushErrorFilterDuplicates(_state.refreshState.errors, {\n id: _state.nextId,\n event: action,\n }),\n },\n }\n }\n default:\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const _: never = _state.refreshState\n return _state\n }\n }\n case ACTION_VERSION_INFO: {\n return { ..._state, versionInfo: action.versionInfo }\n }\n default: {\n return _state\n }\n }\n }, INITIAL_OVERLAY_STATE)\n}\n\nexport const REACT_REFRESH_FULL_RELOAD_FROM_ERROR =\n '[Fast Refresh] performing full reload because your application had an unrecoverable error'\n"],"names":["ACTION_BEFORE_REFRESH","ACTION_BUILD_ERROR","ACTION_BUILD_OK","ACTION_DEBUG_INFO","ACTION_REFRESH","ACTION_STATIC_INDICATOR","ACTION_UNHANDLED_ERROR","ACTION_UNHANDLED_REJECTION","ACTION_VERSION_INFO","INITIAL_OVERLAY_STATE","REACT_REFRESH_FULL_RELOAD_FROM_ERROR","useErrorOverlayReducer","pushErrorFilterDuplicates","errors","err","filter","e","event","reason","stack","nextId","buildError","notFound","staticIndicator","refreshState","type","rootLayoutMissingTags","versionInfo","installed","staleness","debugInfo","devtoolsFrontendUrl","undefined","useReducer","_state","action","message","id","_"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;IA6BaA,qBAAqB;eAArBA;;IADAC,kBAAkB;eAAlBA;;IADAC,eAAe;eAAfA;;IAOAC,iBAAiB;eAAjBA;;IAJAC,cAAc;eAAdA;;IAJAC,uBAAuB;eAAvBA;;IAMAC,sBAAsB;eAAtBA;;IACAC,0BAA0B;eAA1BA;;IAFAC,mBAAmB;eAAnBA;;IAuEAC,qBAAqB;eAArBA;;IAyFAC,oCAAoC;eAApCA;;IA7EGC,sBAAsB;eAAtBA;;;uBAlHW;AA0BpB,MAAMN,0BAA0B;AAChC,MAAMH,kBAAkB;AACxB,MAAMD,qBAAqB;AAC3B,MAAMD,wBAAwB;AAC9B,MAAMI,iBAAiB;AACvB,MAAMI,sBAAsB;AAC5B,MAAMF,yBAAyB;AAC/B,MAAMC,6BAA6B;AACnC,MAAMJ,oBAAoB;AAuDjC,SAASS,0BACPC,MAA6B,EAC7BC,GAAwB;IAExB,OAAO;WACFD,OAAOE,MAAM,CAAC,CAACC;YAChB,8BAA8B;YAC9B,OAAOA,EAAEC,KAAK,CAACC,MAAM,CAACC,KAAK,KAAKL,IAAIG,KAAK,CAACC,MAAM,CAACC,KAAK;QACxD;QACAL;KACD;AACH;AAEO,MAAML,wBAAsC;IACjDW,QAAQ;IACRC,YAAY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AAM;oCACTd,QAAQc,OAAOd,MAAM,GAAG;oCACxBP,QAAQD,0BAA0BsB,OAAOrB,MAAM,EAAE;wCAC/CwB,IAAIH,OAAOd,MAAM;wCACjBH,OAAOkB;oCACT;gCACF;4BACF;wBACA,KAAK;4BAAW;gCACd,OAAO;oCACL,GAAGD,MAAM;oCACTd,QAAQc,OAAOd,MAAM,GAAG;oCACxBI,cAAc;wCACZ,GAAGU,OAAOV,YAAY;wCACtBX,QAAQD,0BAA0BsB,OAAOV,YAAY,CAACX,MAAM,EAAE;4CAC5DwB,IAAIH,OAAOd,MAAM;4CACjBH,OAAOkB;wCACT;oCACF;gCACF;4BACF;wBACA;4BACE,6DAA6D;4BAC7D,MAAMG,IAAWJ,OAAOV,YAAY;4BACpC,OAAOU;oBACX;gBACF;YACA,KAAK1B;gBAAqB;oBACxB,OAAO;wBAAE,GAAG0B,MAAM;wBAAEP,aAAaQ,OAAOR,WAAW;oBAAC;gBACtD;YACA;gBAAS;oBACP,OAAOO;gBACT;QACF;IACF,GAAGzB;AACL;AAEO,MAAMC,uCACX"}
1
+ {"version":3,"sources":["../../../../src/client/components/react-dev-overlay/shared.ts"],"sourcesContent":["import { useReducer } from 'react'\n\nimport type { StackFrame } from 'next/dist/compiled/stacktrace-parser'\nimport type { VersionInfo } from '../../../server/dev/parse-version-info'\nimport type { SupportedErrorEvent } from './internal/container/Errors'\nimport type { ComponentStackFrame } from './internal/helpers/parse-component-stack'\nimport type { DebugInfo } from './types'\n\ntype FastRefreshState =\n /** No refresh in progress. */\n | { type: 'idle' }\n /** The refresh process has been triggered, but the new code has not been executed yet. */\n | { type: 'pending'; errors: SupportedErrorEvent[] }\n\nexport interface OverlayState {\n nextId: number\n buildError: string | null\n errors: SupportedErrorEvent[]\n refreshState: FastRefreshState\n rootLayoutMissingTags: typeof window.__next_root_layout_missing_tags\n versionInfo: VersionInfo\n notFound: boolean\n staticIndicator: boolean\n disableDevIndicator: boolean\n debugInfo: DebugInfo\n}\n\nexport const ACTION_STATIC_INDICATOR = 'static-indicator'\nexport const ACTION_BUILD_OK = 'build-ok'\nexport const ACTION_BUILD_ERROR = 'build-error'\nexport const ACTION_BEFORE_REFRESH = 'before-fast-refresh'\nexport const ACTION_REFRESH = 'fast-refresh'\nexport const ACTION_VERSION_INFO = 'version-info'\nexport const ACTION_UNHANDLED_ERROR = 'unhandled-error'\nexport const ACTION_UNHANDLED_REJECTION = 'unhandled-rejection'\nexport const ACTION_DEBUG_INFO = 'debug-info'\n\ninterface StaticIndicatorAction {\n type: typeof ACTION_STATIC_INDICATOR\n staticIndicator: boolean\n}\n\ninterface BuildOkAction {\n type: typeof ACTION_BUILD_OK\n}\ninterface BuildErrorAction {\n type: typeof ACTION_BUILD_ERROR\n message: string\n}\ninterface BeforeFastRefreshAction {\n type: typeof ACTION_BEFORE_REFRESH\n}\ninterface FastRefreshAction {\n type: typeof ACTION_REFRESH\n}\n\nexport interface UnhandledErrorAction {\n type: typeof ACTION_UNHANDLED_ERROR\n reason: Error\n frames: StackFrame[]\n componentStackFrames?: ComponentStackFrame[]\n warning?: [string, string, string]\n}\nexport interface UnhandledRejectionAction {\n type: typeof ACTION_UNHANDLED_REJECTION\n reason: Error\n frames: StackFrame[]\n}\n\nexport interface DebugInfoAction {\n type: typeof ACTION_DEBUG_INFO\n debugInfo: any\n}\n\ninterface VersionInfoAction {\n type: typeof ACTION_VERSION_INFO\n versionInfo: VersionInfo\n}\n\nexport type BusEvent =\n | BuildOkAction\n | BuildErrorAction\n | BeforeFastRefreshAction\n | FastRefreshAction\n | UnhandledErrorAction\n | UnhandledRejectionAction\n | VersionInfoAction\n | StaticIndicatorAction\n | DebugInfoAction\n\nfunction pushErrorFilterDuplicates(\n errors: SupportedErrorEvent[],\n err: SupportedErrorEvent\n): SupportedErrorEvent[] {\n return [\n ...errors.filter((e) => {\n // Filter out duplicate errors\n return e.event.reason.stack !== err.event.reason.stack\n }),\n err,\n ]\n}\n\nexport const INITIAL_OVERLAY_STATE: OverlayState = {\n nextId: 1,\n buildError: null,\n errors: [],\n notFound: false,\n staticIndicator: false,\n disableDevIndicator: process.env.__NEXT_DEV_INDICATOR?.toString() === 'false',\n refreshState: { type: 'idle' },\n rootLayoutMissingTags: [],\n versionInfo: { installed: '0.0.0', staleness: 'unknown' },\n debugInfo: { devtoolsFrontendUrl: undefined },\n}\n\nexport function useErrorOverlayReducer() {\n return useReducer((_state: OverlayState, action: BusEvent): OverlayState => {\n switch (action.type) {\n case ACTION_DEBUG_INFO: {\n return { ..._state, debugInfo: action.debugInfo }\n }\n case ACTION_STATIC_INDICATOR: {\n return { ..._state, staticIndicator: action.staticIndicator }\n }\n case ACTION_BUILD_OK: {\n return { ..._state, buildError: null }\n }\n case ACTION_BUILD_ERROR: {\n return { ..._state, buildError: action.message }\n }\n case ACTION_BEFORE_REFRESH: {\n return { ..._state, refreshState: { type: 'pending', errors: [] } }\n }\n case ACTION_REFRESH: {\n return {\n ..._state,\n buildError: null,\n errors:\n // Errors can come in during updates. In this case, UNHANDLED_ERROR\n // and UNHANDLED_REJECTION events might be dispatched between the\n // BEFORE_REFRESH and the REFRESH event. We want to keep those errors\n // around until the next refresh. Otherwise we run into a race\n // condition where those errors would be cleared on refresh completion\n // before they can be displayed.\n _state.refreshState.type === 'pending'\n ? _state.refreshState.errors\n : [],\n refreshState: { type: 'idle' },\n }\n }\n case ACTION_UNHANDLED_ERROR:\n case ACTION_UNHANDLED_REJECTION: {\n switch (_state.refreshState.type) {\n case 'idle': {\n return {\n ..._state,\n nextId: _state.nextId + 1,\n errors: pushErrorFilterDuplicates(_state.errors, {\n id: _state.nextId,\n event: action,\n }),\n }\n }\n case 'pending': {\n return {\n ..._state,\n nextId: _state.nextId + 1,\n refreshState: {\n ..._state.refreshState,\n errors: pushErrorFilterDuplicates(_state.refreshState.errors, {\n id: _state.nextId,\n event: action,\n }),\n },\n }\n }\n default:\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const _: never = _state.refreshState\n return _state\n }\n }\n case ACTION_VERSION_INFO: {\n return { ..._state, versionInfo: action.versionInfo }\n }\n default: {\n return _state\n }\n }\n }, INITIAL_OVERLAY_STATE)\n}\n\nexport const REACT_REFRESH_FULL_RELOAD_FROM_ERROR =\n '[Fast Refresh] performing full reload because your application had an unrecoverable error'\n"],"names":["ACTION_BEFORE_REFRESH","ACTION_BUILD_ERROR","ACTION_BUILD_OK","ACTION_DEBUG_INFO","ACTION_REFRESH","ACTION_STATIC_INDICATOR","ACTION_UNHANDLED_ERROR","ACTION_UNHANDLED_REJECTION","ACTION_VERSION_INFO","INITIAL_OVERLAY_STATE","REACT_REFRESH_FULL_RELOAD_FROM_ERROR","useErrorOverlayReducer","process","pushErrorFilterDuplicates","errors","err","filter","e","event","reason","stack","nextId","buildError","notFound","staticIndicator","disableDevIndicator","env","__NEXT_DEV_INDICATOR","toString","refreshState","type","rootLayoutMissingTags","versionInfo","installed","staleness","debugInfo","devtoolsFrontendUrl","undefined","useReducer","_state","action","message","id","_"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;IA8BaA,qBAAqB;eAArBA;;IADAC,kBAAkB;eAAlBA;;IADAC,eAAe;eAAfA;;IAOAC,iBAAiB;eAAjBA;;IAJAC,cAAc;eAAdA;;IAJAC,uBAAuB;eAAvBA;;IAMAC,sBAAsB;eAAtBA;;IACAC,0BAA0B;eAA1BA;;IAFAC,mBAAmB;eAAnBA;;IAuEAC,qBAAqB;eAArBA;;IA0FAC,oCAAoC;eAApCA;;IA7EGC,sBAAsB;eAAtBA;;;uBApHW;IA6GJC;AAlFhB,MAAMP,0BAA0B;AAChC,MAAMH,kBAAkB;AACxB,MAAMD,qBAAqB;AAC3B,MAAMD,wBAAwB;AAC9B,MAAMI,iBAAiB;AACvB,MAAMI,sBAAsB;AAC5B,MAAMF,yBAAyB;AAC/B,MAAMC,6BAA6B;AACnC,MAAMJ,oBAAoB;AAuDjC,SAASU,0BACPC,MAA6B,EAC7BC,GAAwB;IAExB,OAAO;WACFD,OAAOE,MAAM,C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C9D,sEAAsE;wBACtE,gCAAgC;wBAChCyB,OAAOV,YAAY,CAACC,IAAI,KAAK,YACzBS,OAAOV,YAAY,CAACf,MAAM,GAC1B,EAAE;wBACRe,cAAc;4BAAEC,MAAM;wBAAO;oBAC/B;gBACF;YACA,KAAKxB;YACL,KAAKC;gBAA4B;oBAC/B,OAAQgC,OAAOV,YAAY,CAACC,IAAI;wBAC9B,KAAK;4BAAQ;gCACX,OAAO;oCACL,GAAGS,MAAM;oCACTlB,QAAQkB,OAAOlB,MAAM,GAAG;oCACxBP,QAAQD,0BAA0B0B,OAAOzB,MAAM,EAAE;wCAC/C4B,IAAIH,OAAOlB,MAAM;wCACjBH,OAAOsB;oCACT;gCACF;4BACF;wBACA,KAAK;4BAAW;gCACd,OAAO;oCACL,GAAGD,MAAM;oCACTlB,QAAQkB,OAAOlB,MAAM,GAAG;oCACxBQ,cAAc;wCACZ,GAAGU,OAAOV,YAAY;wCACtBf,QAAQD,0BAA0B0B,OAAOV,YAAY,CAACf,MAAM,EAAE;4CAC5D4B,IAAIH,OAAOlB,MAAM;4CACjBH,OAAOsB;wCACT;oCACF;gCACF;4BACF;wBACA;4BACE,6DAA6D;4BAC7D,MAAMG,IAAWJ,OAAOV,YAAY;4BACpC,OAAOU;oBACX;gBACF;YACA,KAAK/B;gBAAqB;oBACxB,OAAO;wBAAE,GAAG+B,MAAM;wBAAEP,aAAaQ,OAAOR,WAAW;oBAAC;gBACtD;YACA;gBAAS;oBACP,OAAOO;gBACT;QACF;IACF,GAAG9B;AACL;AAEO,MAAMC,uCACX"}
@@ -60,9 +60,8 @@ const _adapters = require("../shared/lib/router/adapters");
60
60
  const _hooksclientcontextsharedruntime = require("../shared/lib/hooks-client-context.shared-runtime");
61
61
  const _onrecoverableerror = require("./react-client-callbacks/on-recoverable-error");
62
62
  const _tracer = /*#__PURE__*/ _interop_require_default._(require("./tracing/tracer"));
63
- const _reporttosocket = /*#__PURE__*/ _interop_require_default._(require("./tracing/report-to-socket"));
64
63
  const _isnextroutererror = require("./components/is-next-router-error");
65
- const version = "15.2.0-canary.65";
64
+ const version = "15.2.0-canary.66";
66
65
  let router;
67
66
  const emitter = (0, _mitt.default)();
68
67
  const looseToArray = (input)=>[].slice.call(input);
@@ -134,9 +133,9 @@ class Container extends _react.default.Component {
134
133
  }
135
134
  async function initialize(opts) {
136
135
  if (opts === void 0) opts = {};
137
- _tracer.default.onSpanEnd(_reporttosocket.default);
138
136
  // This makes sure this specific lines are removed in production
139
137
  if (process.env.NODE_ENV === 'development') {
138
+ _tracer.default.onSpanEnd(require('./tracing/report-to-socket').default);
140
139
  devClient = opts.devClient;
141
140
  }
142
141
  initialData = JSON.parse(document.getElementById('__NEXT_DATA__').textContent);
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/client/index.tsx"],"sourcesContent":["/* global location */\n// imports polyfill from `@next/polyfill-module` after build.\nimport '../build/polyfills/polyfill-module'\nimport type Router from '../shared/lib/router/router'\nimport type {\n AppComponent,\n AppProps,\n PrivateRouteInfo,\n} from '../shared/lib/router/router'\n\nimport React, { type JSX } from 'react'\nimport ReactDOM from 'react-dom/client'\nimport { HeadManagerContext } from '../shared/lib/head-manager-context.shared-runtime'\nimport mitt from '../shared/lib/mitt'\nimport type { MittEmitter } from '../shared/lib/mitt'\nimport { RouterContext } from '../shared/lib/router-context.shared-runtime'\nimport { handleSmoothScroll } from '../shared/lib/router/utils/handle-smooth-scroll'\nimport { isDynamicRoute } from '../shared/lib/router/utils/is-dynamic'\nimport {\n urlQueryToSearchParams,\n assign,\n} from '../shared/lib/router/utils/querystring'\nimport { setConfig } from '../shared/lib/runtime-config.external'\nimport { getURL, loadGetInitialProps, ST } from '../shared/lib/utils'\nimport type { NextWebVitalsMetric, NEXT_DATA } from '../shared/lib/utils'\nimport { Portal } from './portal'\nimport initHeadManager from './head-manager'\nimport PageLoader from './page-loader'\nimport type { StyleSheetTuple } from './page-loader'\nimport { RouteAnnouncer } from './route-announcer'\nimport { createRouter, makePublicRouterInstance } from './router'\nimport { getProperError } from '../lib/is-error'\nimport { ImageConfigContext } from '../shared/lib/image-config-context.shared-runtime'\nimport type { ImageConfigComplete } from '../shared/lib/image-config'\nimport { removeBasePath } from './remove-base-path'\nimport { hasBasePath } from './has-base-path'\nimport { AppRouterContext } from '../shared/lib/app-router-context.shared-runtime'\nimport {\n adaptForAppRouterInstance,\n adaptForPathParams,\n adaptForSearchParams,\n PathnameContextProviderAdapter,\n} from '../shared/lib/router/adapters'\nimport {\n SearchParamsContext,\n PathParamsContext,\n} from '../shared/lib/hooks-client-context.shared-runtime'\nimport { onRecoverableError } from './react-client-callbacks/on-recoverable-error'\nimport tracer from './tracing/tracer'\nimport reportToSocket from './tracing/report-to-socket'\nimport { isNextRouterError } from './components/is-next-router-error'\n\n/// <reference types=\"react-dom/experimental\" />\n\ndeclare global {\n interface Window {\n /* test fns */\n __NEXT_HYDRATED?: boolean\n __NEXT_HYDRATED_CB?: () => void\n\n /* prod */\n __NEXT_DATA__: NEXT_DATA\n __NEXT_P: any[]\n }\n}\ntype RenderRouteInfo = PrivateRouteInfo & {\n App: AppComponent\n scroll?: { x: number; y: number } | null\n isHydratePass?: boolean\n}\ntype RenderErrorProps = Omit<RenderRouteInfo, 'Component' | 'styleSheets'>\ntype RegisterFn = (input: [string, () => void]) => void\n\nexport const version = process.env.__NEXT_VERSION\nexport let router: Router\nexport const emitter: MittEmitter<string> = mitt()\n\nconst looseToArray = <T extends {}>(input: any): T[] => [].slice.call(input)\n\nlet initialData: NEXT_DATA\nlet defaultLocale: string | undefined = undefined\nlet asPath: string\nlet pageLoader: PageLoader\nlet appElement: HTMLElement | null\nlet headManager: {\n mountedInstances: Set<unknown>\n updateHead: (head: JSX.Element[]) => void\n getIsSsr?: () => boolean\n}\nlet initialMatchesMiddleware = false\nlet lastAppProps: AppProps\n\nlet lastRenderReject: (() => void) | null\nlet devClient: any\n\nlet CachedApp: AppComponent, onPerfEntry: (metric: any) => void\nlet CachedComponent: React.ComponentType\n\nclass Container extends React.Component<{\n children?: React.ReactNode\n fn: (err: Error, info?: any) => void\n}> {\n componentDidCatch(componentErr: Error, info: any) {\n this.props.fn(componentErr, info)\n }\n\n componentDidMount() {\n this.scrollToHash()\n\n // We need to replace the router state if:\n // - the page was (auto) exported and has a query string or search (hash)\n // - it was auto exported and is a dynamic route (to provide params)\n // - if it is a client-side skeleton (fallback render)\n // - if middleware matches the current page (may have rewrite params)\n // - if rewrites in next.config.js match (may have rewrite params)\n if (\n router.isSsr &&\n (initialData.isFallback ||\n (initialData.nextExport &&\n (isDynamicRoute(router.pathname) ||\n location.search ||\n process.env.__NEXT_HAS_REWRITES ||\n initialMatchesMiddleware)) ||\n (initialData.props &&\n initialData.props.__N_SSG &&\n (location.search ||\n process.env.__NEXT_HAS_REWRITES ||\n initialMatchesMiddleware)))\n ) {\n // update query on mount for exported pages\n router\n .replace(\n router.pathname +\n '?' +\n String(\n assign(\n urlQueryToSearchParams(router.query),\n new URLSearchParams(location.search)\n )\n ),\n asPath,\n {\n // @ts-ignore\n // WARNING: `_h` is an internal option for handing Next.js\n // client-side hydration. Your app should _never_ use this property.\n // It may change at any time without notice.\n _h: 1,\n // Fallback pages must trigger the data fetch, so the transition is\n // not shallow.\n // Other pages (strictly updating query) happens shallowly, as data\n // requirements would already be present.\n shallow: !initialData.isFallback && !initialMatchesMiddleware,\n }\n )\n .catch((err) => {\n if (!err.cancelled) throw err\n })\n }\n }\n\n componentDidUpdate() {\n this.scrollToHash()\n }\n\n scrollToHash() {\n let { hash } = location\n hash = hash && hash.substring(1)\n if (!hash) return\n\n const el: HTMLElement | null = document.getElementById(hash)\n if (!el) return\n\n // If we call scrollIntoView() in here without a setTimeout\n // it won't scroll properly.\n setTimeout(() => el.scrollIntoView(), 0)\n }\n\n render() {\n if (process.env.NODE_ENV === 'production') {\n return this.props.children\n } else {\n const ReactDevOverlay: typeof import('./components/react-dev-overlay/pages/client').ReactDevOverlay =\n require('./components/react-dev-overlay/pages/client').ReactDevOverlay\n return <ReactDevOverlay>{this.props.children}</ReactDevOverlay>\n }\n }\n}\n\nexport async function initialize(opts: { devClient?: any } = {}): Promise<{\n assetPrefix: string\n}> {\n tracer.onSpanEnd(reportToSocket)\n\n // This makes sure this specific lines are removed in production\n if (process.env.NODE_ENV === 'development') {\n devClient = opts.devClient\n }\n\n initialData = JSON.parse(\n document.getElementById('__NEXT_DATA__')!.textContent!\n )\n window.__NEXT_DATA__ = initialData\n\n defaultLocale = initialData.defaultLocale\n const prefix: string = initialData.assetPrefix || ''\n // With dynamic assetPrefix it's no longer possible to set assetPrefix at the build time\n // So, this is how we do it in the client side at runtime\n ;(self as any).__next_set_public_path__(`${prefix}/_next/`) //eslint-disable-line\n\n // Initialize next/config with the environment configuration\n setConfig({\n serverRuntimeConfig: {},\n publicRuntimeConfig: initialData.runtimeConfig || {},\n })\n\n asPath = getURL()\n\n // make sure not to attempt stripping basePath for 404s\n if (hasBasePath(asPath)) {\n asPath = removeBasePath(asPath)\n }\n\n if (process.env.__NEXT_I18N_SUPPORT) {\n const { normalizeLocalePath } =\n require('../shared/lib/i18n/normalize-locale-path') as typeof import('../shared/lib/i18n/normalize-locale-path')\n\n const { detectDomainLocale } =\n require('../shared/lib/i18n/detect-domain-locale') as typeof import('../shared/lib/i18n/detect-domain-locale')\n\n const { parseRelativeUrl } =\n require('../shared/lib/router/utils/parse-relative-url') as typeof import('../shared/lib/router/utils/parse-relative-url')\n\n const { formatUrl } =\n require('../shared/lib/router/utils/format-url') as typeof import('../shared/lib/router/utils/format-url')\n\n if (initialData.locales) {\n const parsedAs = parseRelativeUrl(asPath)\n const localePathResult = normalizeLocalePath(\n parsedAs.pathname,\n initialData.locales\n )\n\n if (localePathResult.detectedLocale) {\n parsedAs.pathname = localePathResult.pathname\n asPath = formatUrl(parsedAs)\n } else {\n // derive the default locale if it wasn't detected in the asPath\n // since we don't prerender static pages with all possible default\n // locales\n defaultLocale = initialData.locale\n }\n\n // attempt detecting default locale based on hostname\n const detectedDomain = detectDomainLocale(\n process.env.__NEXT_I18N_DOMAINS as any,\n window.location.hostname\n )\n\n // TODO: investigate if defaultLocale needs to be populated after\n // hydration to prevent mismatched renders\n if (detectedDomain) {\n defaultLocale = detectedDomain.defaultLocale\n }\n }\n }\n\n if (initialData.scriptLoader) {\n const { initScriptLoader } = require('./script')\n initScriptLoader(initialData.scriptLoader)\n }\n\n pageLoader = new PageLoader(initialData.buildId, prefix)\n\n const register: RegisterFn = ([r, f]) =>\n pageLoader.routeLoader.onEntrypoint(r, f)\n if (window.__NEXT_P) {\n // Defer page registration for another tick. This will increase the overall\n // latency in hydrating the page, but reduce the total blocking time.\n window.__NEXT_P.map((p) => setTimeout(() => register(p), 0))\n }\n window.__NEXT_P = []\n ;(window.__NEXT_P as any).push = register\n\n headManager = initHeadManager()\n headManager.getIsSsr = () => {\n return router.isSsr\n }\n\n appElement = document.getElementById('__next')\n return { assetPrefix: prefix }\n}\n\nfunction renderApp(App: AppComponent, appProps: AppProps) {\n return <App {...appProps} />\n}\n\nfunction AppContainer({\n children,\n}: React.PropsWithChildren<{}>): React.ReactElement {\n // Create a memoized value for next/navigation router context.\n const adaptedForAppRouter = React.useMemo(() => {\n return adaptForAppRouterInstance(router)\n }, [])\n return (\n <Container\n fn={(error) =>\n // TODO: Fix disabled eslint rule\n // eslint-disable-next-line @typescript-eslint/no-use-before-define\n renderError({ App: CachedApp, err: error }).catch((err) =>\n console.error('Error rendering page: ', err)\n )\n }\n >\n <AppRouterContext.Provider value={adaptedForAppRouter}>\n <SearchParamsContext.Provider value={adaptForSearchParams(router)}>\n <PathnameContextProviderAdapter\n router={router}\n isAutoExport={self.__NEXT_DATA__.autoExport ?? false}\n >\n <PathParamsContext.Provider value={adaptForPathParams(router)}>\n <RouterContext.Provider value={makePublicRouterInstance(router)}>\n <HeadManagerContext.Provider value={headManager}>\n <ImageConfigContext.Provider\n value={\n process.env\n .__NEXT_IMAGE_OPTS as any as ImageConfigComplete\n }\n >\n {children}\n </ImageConfigContext.Provider>\n </HeadManagerContext.Provider>\n </RouterContext.Provider>\n </PathParamsContext.Provider>\n </PathnameContextProviderAdapter>\n </SearchParamsContext.Provider>\n </AppRouterContext.Provider>\n </Container>\n )\n}\n\nconst wrapApp =\n (App: AppComponent) =>\n (wrappedAppProps: Record<string, any>): JSX.Element => {\n const appProps: AppProps = {\n ...wrappedAppProps,\n Component: CachedComponent,\n err: initialData.err,\n router,\n }\n return <AppContainer>{renderApp(App, appProps)}</AppContainer>\n }\n\n// This method handles all runtime and debug errors.\n// 404 and 500 errors are special kind of errors\n// and they are still handle via the main render method.\nfunction renderError(renderErrorProps: RenderErrorProps): Promise<any> {\n let { App, err } = renderErrorProps\n\n // In development runtime errors are caught by our overlay\n // In production we catch runtime errors using componentDidCatch which will trigger renderError\n if (process.env.NODE_ENV !== 'production') {\n // A Next.js rendering runtime error is always unrecoverable\n // FIXME: let's make this recoverable (error in GIP client-transition)\n devClient.onUnrecoverableError()\n\n // We need to render an empty <App> so that the `<ReactDevOverlay>` can\n // render itself.\n // TODO: Fix disabled eslint rule\n // eslint-disable-next-line @typescript-eslint/no-use-before-define\n return doRender({\n App: () => null,\n props: {},\n Component: () => null,\n styleSheets: [],\n })\n }\n\n // Make sure we log the error to the console, otherwise users can't track down issues.\n console.error(err)\n console.error(\n `A client-side exception has occurred, see here for more info: https://nextjs.org/docs/messages/client-side-exception-occurred`\n )\n\n return pageLoader\n .loadPage('/_error')\n .then(({ page: ErrorComponent, styleSheets }) => {\n return lastAppProps?.Component === ErrorComponent\n ? import('../pages/_error')\n .then((errorModule) => {\n return import('../pages/_app').then((appModule) => {\n App = appModule.default as any as AppComponent\n renderErrorProps.App = App\n return errorModule\n })\n })\n .then((m) => ({\n ErrorComponent: m.default as React.ComponentType<{}>,\n styleSheets: [],\n }))\n : { ErrorComponent, styleSheets }\n })\n .then(({ ErrorComponent, styleSheets }) => {\n // In production we do a normal render with the `ErrorComponent` as component.\n // If we've gotten here upon initial render, we can use the props from the server.\n // Otherwise, we need to call `getInitialProps` on `App` before mounting.\n const AppTree = wrapApp(App)\n const appCtx = {\n Component: ErrorComponent,\n AppTree,\n router,\n ctx: {\n err,\n pathname: initialData.page,\n query: initialData.query,\n asPath,\n AppTree,\n },\n }\n return Promise.resolve(\n renderErrorProps.props?.err\n ? renderErrorProps.props\n : loadGetInitialProps(App, appCtx)\n ).then((initProps) =>\n // TODO: Fix disabled eslint rule\n // eslint-disable-next-line @typescript-eslint/no-use-before-define\n doRender({\n ...renderErrorProps,\n err,\n Component: ErrorComponent,\n styleSheets,\n props: initProps,\n })\n )\n })\n}\n\n// Dummy component that we render as a child of Root so that we can\n// toggle the correct styles before the page is rendered.\nfunction Head({ callback }: { callback: () => void }): null {\n // We use `useLayoutEffect` to guarantee the callback is executed\n // as soon as React flushes the update.\n React.useLayoutEffect(() => callback(), [callback])\n return null\n}\n\nconst performanceMarks = {\n navigationStart: 'navigationStart',\n beforeRender: 'beforeRender',\n afterRender: 'afterRender',\n afterHydrate: 'afterHydrate',\n routeChange: 'routeChange',\n} as const\n\nconst performanceMeasures = {\n hydration: 'Next.js-hydration',\n beforeHydration: 'Next.js-before-hydration',\n routeChangeToRender: 'Next.js-route-change-to-render',\n render: 'Next.js-render',\n} as const\n\nlet reactRoot: any = null\n// On initial render a hydrate should always happen\nlet shouldHydrate: boolean = true\n\nfunction clearMarks(): void {\n ;[\n performanceMarks.beforeRender,\n performanceMarks.afterHydrate,\n performanceMarks.afterRender,\n performanceMarks.routeChange,\n ].forEach((mark) => performance.clearMarks(mark))\n}\n\nfunction markHydrateComplete(): void {\n if (!ST) return\n\n performance.mark(performanceMarks.afterHydrate) // mark end of hydration\n\n const hasBeforeRenderMark = performance.getEntriesByName(\n performanceMarks.beforeRender,\n 'mark'\n ).length\n if (hasBeforeRenderMark) {\n const beforeHydrationMeasure = performance.measure(\n performanceMeasures.beforeHydration,\n performanceMarks.navigationStart,\n performanceMarks.beforeRender\n )\n\n const hydrationMeasure = performance.measure(\n performanceMeasures.hydration,\n performanceMarks.beforeRender,\n performanceMarks.afterHydrate\n )\n\n if (\n process.env.NODE_ENV === 'development' &&\n // Old versions of Safari don't return `PerformanceMeasure`s from `performance.measure()`\n beforeHydrationMeasure &&\n hydrationMeasure\n ) {\n tracer\n .startSpan('navigation-to-hydration', {\n startTime: performance.timeOrigin + beforeHydrationMeasure.startTime,\n attributes: {\n pathname: location.pathname,\n query: location.search,\n },\n })\n .end(\n performance.timeOrigin +\n hydrationMeasure.startTime +\n hydrationMeasure.duration\n )\n }\n }\n\n if (onPerfEntry) {\n performance\n .getEntriesByName(performanceMeasures.hydration)\n .forEach(onPerfEntry)\n }\n clearMarks()\n}\n\nfunction markRenderComplete(): void {\n if (!ST) return\n\n performance.mark(performanceMarks.afterRender) // mark end of render\n const navStartEntries: PerformanceEntryList = performance.getEntriesByName(\n performanceMarks.routeChange,\n 'mark'\n )\n\n if (!navStartEntries.length) return\n\n const hasBeforeRenderMark = performance.getEntriesByName(\n performanceMarks.beforeRender,\n 'mark'\n ).length\n\n if (hasBeforeRenderMark) {\n performance.measure(\n performanceMeasures.routeChangeToRender,\n navStartEntries[0].name,\n performanceMarks.beforeRender\n )\n performance.measure(\n performanceMeasures.render,\n performanceMarks.beforeRender,\n performanceMarks.afterRender\n )\n if (onPerfEntry) {\n performance\n .getEntriesByName(performanceMeasures.render)\n .forEach(onPerfEntry)\n performance\n .getEntriesByName(performanceMeasures.routeChangeToRender)\n .forEach(onPerfEntry)\n }\n }\n\n clearMarks()\n ;[\n performanceMeasures.routeChangeToRender,\n performanceMeasures.render,\n ].forEach((measure) => performance.clearMeasures(measure))\n}\n\nfunction renderReactElement(\n domEl: HTMLElement,\n fn: (cb: () => void) => JSX.Element\n): void {\n // mark start of hydrate/render\n if (ST) {\n performance.mark(performanceMarks.beforeRender)\n }\n\n const reactEl = fn(shouldHydrate ? markHydrateComplete : markRenderComplete)\n if (!reactRoot) {\n // Unlike with createRoot, you don't need a separate root.render() call here\n reactRoot = ReactDOM.hydrateRoot(domEl, reactEl, {\n onRecoverableError,\n })\n // TODO: Remove shouldHydrate variable when React 18 is stable as it can depend on `reactRoot` existing\n shouldHydrate = false\n } else {\n const startTransition = (React as any).startTransition\n startTransition(() => {\n reactRoot.render(reactEl)\n })\n }\n}\n\nfunction Root({\n callbacks,\n children,\n}: React.PropsWithChildren<{\n callbacks: Array<() => void>\n}>): React.ReactElement {\n // We use `useLayoutEffect` to guarantee the callbacks are executed\n // as soon as React flushes the update\n React.useLayoutEffect(\n () => callbacks.forEach((callback) => callback()),\n [callbacks]\n )\n\n if (process.env.__NEXT_TEST_MODE) {\n // eslint-disable-next-line react-hooks/rules-of-hooks\n React.useEffect(() => {\n window.__NEXT_HYDRATED = true\n\n if (window.__NEXT_HYDRATED_CB) {\n window.__NEXT_HYDRATED_CB()\n }\n }, [])\n }\n\n return children as React.ReactElement\n}\n\nfunction doRender(input: RenderRouteInfo): Promise<any> {\n let { App, Component, props, err }: RenderRouteInfo = input\n let styleSheets: StyleSheetTuple[] | undefined =\n 'initial' in input ? undefined : input.styleSheets\n Component = Component || lastAppProps.Component\n props = props || lastAppProps.props\n\n const appProps: AppProps = {\n ...props,\n Component,\n err,\n router,\n }\n // lastAppProps has to be set before ReactDom.render to account for ReactDom throwing an error.\n lastAppProps = appProps\n\n let canceled: boolean = false\n let resolvePromise: () => void\n const renderPromise = new Promise<void>((resolve, reject) => {\n if (lastRenderReject) {\n lastRenderReject()\n }\n resolvePromise = () => {\n lastRenderReject = null\n resolve()\n }\n lastRenderReject = () => {\n canceled = true\n lastRenderReject = null\n\n const error: any = new Error('Cancel rendering route')\n error.cancelled = true\n reject(error)\n }\n })\n\n // This function has a return type to ensure it doesn't start returning a\n // Promise. It should remain synchronous.\n function onStart(): boolean {\n if (\n !styleSheets ||\n // We use `style-loader` in development, so we don't need to do anything\n // unless we're in production:\n process.env.NODE_ENV !== 'production'\n ) {\n return false\n }\n\n const currentStyleTags: HTMLStyleElement[] = looseToArray<HTMLStyleElement>(\n document.querySelectorAll('style[data-n-href]')\n )\n const currentHrefs: Set<string | null> = new Set(\n currentStyleTags.map((tag) => tag.getAttribute('data-n-href'))\n )\n\n const noscript: Element | null = document.querySelector(\n 'noscript[data-n-css]'\n )\n const nonce: string | null | undefined =\n noscript?.getAttribute('data-n-css')\n\n styleSheets.forEach(({ href, text }: { href: string; text: any }) => {\n if (!currentHrefs.has(href)) {\n const styleTag = document.createElement('style')\n styleTag.setAttribute('data-n-href', href)\n styleTag.setAttribute('media', 'x')\n\n if (nonce) {\n styleTag.setAttribute('nonce', nonce)\n }\n\n document.head.appendChild(styleTag)\n styleTag.appendChild(document.createTextNode(text))\n }\n })\n return true\n }\n\n function onHeadCommit(): void {\n if (\n // Turbopack has it's own css injection handling, this code ends up removing the CSS.\n !process.env.TURBOPACK &&\n // We use `style-loader` in development, so we don't need to do anything\n // unless we're in production:\n process.env.NODE_ENV === 'production' &&\n // We can skip this during hydration. Running it wont cause any harm, but\n // we may as well save the CPU cycles:\n styleSheets &&\n // Ensure this render was not canceled\n !canceled\n ) {\n const desiredHrefs: Set<string> = new Set(styleSheets.map((s) => s.href))\n const currentStyleTags: HTMLStyleElement[] =\n looseToArray<HTMLStyleElement>(\n document.querySelectorAll('style[data-n-href]')\n )\n const currentHrefs: string[] = currentStyleTags.map(\n (tag) => tag.getAttribute('data-n-href')!\n )\n\n // Toggle `<style>` tags on or off depending on if they're needed:\n for (let idx = 0; idx < currentHrefs.length; ++idx) {\n if (desiredHrefs.has(currentHrefs[idx])) {\n currentStyleTags[idx].removeAttribute('media')\n } else {\n currentStyleTags[idx].setAttribute('media', 'x')\n }\n }\n\n // Reorder styles into intended order:\n let referenceNode: Element | null = document.querySelector(\n 'noscript[data-n-css]'\n )\n if (\n // This should be an invariant:\n referenceNode\n ) {\n styleSheets.forEach(({ href }: { href: string }) => {\n const targetTag: Element | null = document.querySelector(\n `style[data-n-href=\"${href}\"]`\n )\n if (\n // This should be an invariant:\n targetTag\n ) {\n referenceNode!.parentNode!.insertBefore(\n targetTag,\n referenceNode!.nextSibling\n )\n referenceNode = targetTag\n }\n })\n }\n\n // Finally, clean up server rendered stylesheets:\n looseToArray<HTMLLinkElement>(\n document.querySelectorAll('link[data-n-p]')\n ).forEach((el) => {\n el.parentNode!.removeChild(el)\n })\n }\n\n if (input.scroll) {\n const { x, y } = input.scroll\n handleSmoothScroll(() => {\n window.scrollTo(x, y)\n })\n }\n }\n\n function onRootCommit(): void {\n resolvePromise()\n }\n\n onStart()\n\n const elem: JSX.Element = (\n <>\n <Head callback={onHeadCommit} />\n <AppContainer>\n {renderApp(App, appProps)}\n <Portal type=\"next-route-announcer\">\n <RouteAnnouncer />\n </Portal>\n </AppContainer>\n </>\n )\n\n // We catch runtime errors using componentDidCatch which will trigger renderError\n renderReactElement(appElement!, (callback) => (\n <Root callbacks={[callback, onRootCommit]}>\n {process.env.__NEXT_STRICT_MODE ? (\n <React.StrictMode>{elem}</React.StrictMode>\n ) : (\n elem\n )}\n </Root>\n ))\n\n return renderPromise\n}\n\nasync function render(renderingProps: RenderRouteInfo): Promise<void> {\n // if an error occurs in a server-side page (e.g. in getInitialProps),\n // skip re-rendering the error page client-side as data-fetching operations\n // will already have been done on the server and NEXT_DATA contains the correct\n // data for straight-forward hydration of the error page\n if (\n renderingProps.err &&\n // renderingProps.Component might be undefined if there is a top/module-level error\n (typeof renderingProps.Component === 'undefined' ||\n !renderingProps.isHydratePass)\n ) {\n await renderError(renderingProps)\n return\n }\n\n try {\n await doRender(renderingProps)\n } catch (err) {\n const renderErr = getProperError(err)\n // bubble up cancelation errors\n if ((renderErr as Error & { cancelled?: boolean }).cancelled) {\n throw renderErr\n }\n\n if (process.env.NODE_ENV === 'development') {\n // Ensure this error is displayed in the overlay in development\n setTimeout(() => {\n throw renderErr\n })\n }\n await renderError({ ...renderingProps, err: renderErr })\n }\n}\n\nexport async function hydrate(opts?: { beforeRender?: () => Promise<void> }) {\n let initialErr = initialData.err\n\n try {\n const appEntrypoint = await pageLoader.routeLoader.whenEntrypoint('/_app')\n if ('error' in appEntrypoint) {\n throw appEntrypoint.error\n }\n\n const { component: app, exports: mod } = appEntrypoint\n CachedApp = app as AppComponent\n if (mod && mod.reportWebVitals) {\n onPerfEntry = ({\n id,\n name,\n startTime,\n value,\n duration,\n entryType,\n entries,\n attribution,\n }: any): void => {\n // Combines timestamp with random number for unique ID\n const uniqueID: string = `${Date.now()}-${\n Math.floor(Math.random() * (9e12 - 1)) + 1e12\n }`\n let perfStartEntry: string | undefined\n\n if (entries && entries.length) {\n perfStartEntry = entries[0].startTime\n }\n\n const webVitals: NextWebVitalsMetric = {\n id: id || uniqueID,\n name,\n startTime: startTime || perfStartEntry,\n value: value == null ? duration : value,\n label:\n entryType === 'mark' || entryType === 'measure'\n ? 'custom'\n : 'web-vital',\n }\n if (attribution) {\n webVitals.attribution = attribution\n }\n mod.reportWebVitals(webVitals)\n }\n }\n\n const pageEntrypoint =\n // The dev server fails to serve script assets when there's a hydration\n // error, so we need to skip waiting for the entrypoint.\n process.env.NODE_ENV === 'development' && initialData.err\n ? { error: initialData.err }\n : await pageLoader.routeLoader.whenEntrypoint(initialData.page)\n if ('error' in pageEntrypoint) {\n throw pageEntrypoint.error\n }\n CachedComponent = pageEntrypoint.component\n\n if (process.env.NODE_ENV !== 'production') {\n const { isValidElementType } = require('next/dist/compiled/react-is')\n if (!isValidElementType(CachedComponent)) {\n throw new Error(\n `The default export is not a React Component in page: \"${initialData.page}\"`\n )\n }\n }\n } catch (error) {\n // This catches errors like throwing in the top level of a module\n initialErr = getProperError(error)\n }\n\n if (process.env.NODE_ENV === 'development') {\n const getServerError: typeof import('./components/react-dev-overlay/pages/client').getServerError =\n require('./components/react-dev-overlay/pages/client').getServerError\n // Server-side runtime errors need to be re-thrown on the client-side so\n // that the overlay is rendered.\n if (initialErr) {\n if (initialErr === initialData.err) {\n setTimeout(() => {\n let error\n try {\n // Generate a new error object. We `throw` it because some browsers\n // will set the `stack` when thrown, and we want to ensure ours is\n // not overridden when we re-throw it below.\n throw new Error(initialErr!.message)\n } catch (e) {\n error = e as Error\n }\n\n error.name = initialErr!.name\n error.stack = initialErr!.stack\n const errSource = initialErr.source!\n\n // In development, error the navigation API usage in runtime,\n // since it's not allowed to be used in pages router as it doesn't contain error boundary like app router.\n if (isNextRouterError(initialErr)) {\n error.message =\n 'Next.js navigation API is not allowed to be used in Pages Router.'\n }\n\n throw getServerError(error, errSource)\n })\n }\n // We replaced the server-side error with a client-side error, and should\n // no longer rewrite the stack trace to a Node error.\n else {\n setTimeout(() => {\n throw initialErr\n })\n }\n }\n }\n\n if (window.__NEXT_PRELOADREADY) {\n await window.__NEXT_PRELOADREADY(initialData.dynamicIds)\n }\n\n router = createRouter(initialData.page, initialData.query, asPath, {\n initialProps: initialData.props,\n pageLoader,\n App: CachedApp,\n Component: CachedComponent,\n wrapApp,\n err: initialErr,\n isFallback: Boolean(initialData.isFallback),\n subscription: (info, App, scroll) =>\n render(\n Object.assign<\n {},\n Omit<RenderRouteInfo, 'App' | 'scroll'>,\n Pick<RenderRouteInfo, 'App' | 'scroll'>\n >({}, info, {\n App,\n scroll,\n }) as RenderRouteInfo\n ),\n locale: initialData.locale,\n locales: initialData.locales,\n defaultLocale,\n domainLocales: initialData.domainLocales,\n isPreview: initialData.isPreview,\n })\n\n initialMatchesMiddleware = await router._initialMatchesMiddlewarePromise\n\n const renderCtx: RenderRouteInfo = {\n App: CachedApp,\n initial: true,\n Component: CachedComponent,\n props: initialData.props,\n err: initialErr,\n isHydratePass: true,\n }\n\n if (opts?.beforeRender) {\n await opts.beforeRender()\n }\n\n render(renderCtx)\n}\n"],"names":["emitter","hydrate","initialize","router","version","process","env","__NEXT_VERSION","mitt","looseToArray","input","slice","call","initialData","defaultLocale","undefined","asPath","pageLoader","appElement","headManager","initialMatchesMiddleware","lastAppProps","lastRenderReject","devClient","CachedApp","onPerfEntry","CachedComponent","Container","React","Component","componentDidCatch","componentErr","info","props","fn","componentDidMount","scrollToHash","isSsr","isFallback","nextExport","isDynamicRoute","pathname","location","search","__NEXT_HAS_REWRITES","__N_SSG","replace","String","assign","urlQueryToSearchParams","query","URLSearchParams","_h","shallow","catch","err","cancelled","componentDidUpdate","hash","substring","el","document","getElementById","setTimeout","scrollIntoView","render","NODE_ENV","children","ReactDevOverlay","require","opts","tracer","onSpanEnd","reportToSocket","JSON","parse","textContent","window","__NEXT_DATA__","prefix","assetPrefix","self","__next_set_public_path__","setConfig","serverRuntimeConfig","publicRuntimeConfig","runtimeConfig","getURL","hasBasePath","removeBasePath","__NEXT_I18N_SUPPORT","normalizeLocalePath","detectDomainLocale","parseRelativeUrl","formatUrl","locales","parsedAs","localePathResult","detectedLocale","locale","detectedDomain","__NEXT_I18N_DOMAINS","hostname","scriptLoader","initScriptLoader","PageLoader","buildId","register","r","f","routeLoader","onEntrypoint","__NEXT_P","map","p","push","initHeadManager","getIsSsr","renderApp","App","appProps","AppContainer","adaptedForAppRouter","useMemo","adaptForAppRouterInstance","error","renderError","console","AppRouterContext","Provider","value","SearchParamsContext","adaptForSearchParams","PathnameContextProviderAdapter","isAutoExport","autoExport","PathParamsContext","adaptForPathParams","RouterContext","makePublicRouterInstance","HeadManagerContext","ImageConfigContext","__NEXT_IMAGE_OPTS","wrapApp","wrappedAppProps","renderErrorProps","onUnrecoverableError","doRender","styleSheets","loadPage","then","page","ErrorComponent","errorModule","appModule","default","m","AppTree","appCtx","ctx","Promise","resolve","loadGetInitialProps","initProps","Head","callback","useLayoutEffect","performanceMarks","navigationStart","beforeRender","afterRender","afterHydrate","routeChange","performanceMeasures","hydration","beforeHydration","routeChangeToRender","reactRoot","shouldHydrate","clearMarks","forEach","mark","performance","markHydrateComplete","ST","hasBeforeRenderMark","getEntriesByName","length","beforeHydrationMeasure","measure","hydrationMeasure","startSpan","startTime","timeOrigin","attributes","end","duration","markRenderComplete","navStartEntries","name","clearMeasures","renderReactElement","domEl","reactEl","ReactDOM","hydrateRoot","onRecoverableError","startTransition","Root","callbacks","__NEXT_TEST_MODE","useEffect","__NEXT_HYDRATED","__NEXT_HYDRATED_CB","canceled","resolvePromise","renderPromise","reject","Error","onStart","currentStyleTags","querySelectorAll","currentHrefs","Set","tag","getAttribute","noscript","querySelector","nonce","href","text","has","styleTag","createElement","setAttribute","head","appendChild","createTextNode","onHeadCommit","TURBOPACK","desiredHrefs","s","idx","removeAttribute","referenceNode","targetTag","parentNode","insertBefore","nextSibling","removeChild","scroll","x","y","handleSmoothScroll","scrollTo","onRootCommit","elem","Portal","type","RouteAnnouncer","__NEXT_STRICT_MODE","StrictMode","renderingProps","isHydratePass","renderErr","getProperError","initialErr","appEntrypoint","whenEntrypoint","component","app","exports","mod","reportWebVitals","id","entryType","entries","attribution","uniqueID","Date","now","Math","floor","random","perfStartEntry","webVitals","label","pageEntrypoint","isValidElementType","getServerError","message","e","stack","errSource","source","isNextRouterError","__NEXT_PRELOADREADY","dynamicIds","createRouter","initialProps","Boolean","subscription","Object","domainLocales","isPreview","_initialMatchesMiddlewarePromise","renderCtx","initial"],"mappings":"AAAA,mBAAmB,GACnB,6DAA6D;;;;;;;;;;;;;;;;;;;IA0EhDA,OAAO;eAAPA;;IA0vBSC,OAAO;eAAPA;;IAzoBAC,UAAU;eAAVA;;IAlHXC,MAAM;eAANA;;IADEC,OAAO;eAAPA;;;;;QAvEN;gEAQyB;iEACX;iDACc;+DAClB;4CAEa;oCACK;2BACJ;6BAIxB;uCACmB;uBACsB;wBAEzB;sEACK;qEACL;gCAEQ;wBACwB;yBACxB;iDACI;gCAEJ;6BACH;+CACK;0BAM1B;iDAIA;oCAC4B;iEAChB;yEACQ;mCACO;AAuB3B,MAAMA,UAAUC,QAAQC,GAAG,CAACC,cAAc;AAC1C,IAAIJ;AACJ,MAAMH,UAA+BQ,IAAAA,aAAI;AAEhD,MAAMC,eAAe,CAAeC,QAAoB,EAAE,CAACC,KAAK,CAACC,IAAI,CAACF;AAEtE,IAAIG;AACJ,IAAIC,gBAAoCC;AACxC,IAAIC;AACJ,IAAIC;AACJ,IAAIC;AACJ,IAAIC;AAK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iP;AACT"}
1
+ {"version":3,"sources":["../../src/client/index.tsx"],"sourcesContent":["/* global location */\n// imports polyfill from `@next/polyfill-module` after build.\nimport '../build/polyfills/polyfill-module'\nimport type Router from '../shared/lib/router/router'\nimport type {\n AppComponent,\n AppProps,\n PrivateRouteInfo,\n} from '../shared/lib/router/router'\n\nimport React, { type JSX } from 'react'\nimport ReactDOM from 'react-dom/client'\nimport { HeadManagerContext } from '../shared/lib/head-manager-context.shared-runtime'\nimport mitt from '../shared/lib/mitt'\nimport type { MittEmitter } from '../shared/lib/mitt'\nimport { RouterContext } from '../shared/lib/router-context.shared-runtime'\nimport { handleSmoothScroll } from '../shared/lib/router/utils/handle-smooth-scroll'\nimport { isDynamicRoute } from '../shared/lib/router/utils/is-dynamic'\nimport {\n urlQueryToSearchParams,\n assign,\n} from '../shared/lib/router/utils/querystring'\nimport { setConfig } from '../shared/lib/runtime-config.external'\nimport { getURL, loadGetInitialProps, ST } from '../shared/lib/utils'\nimport type { NextWebVitalsMetric, NEXT_DATA } from '../shared/lib/utils'\nimport { Portal } from './portal'\nimport initHeadManager from './head-manager'\nimport PageLoader from './page-loader'\nimport type { StyleSheetTuple } from './page-loader'\nimport { RouteAnnouncer } from './route-announcer'\nimport { createRouter, makePublicRouterInstance } from './router'\nimport { getProperError } from '../lib/is-error'\nimport { ImageConfigContext } from '../shared/lib/image-config-context.shared-runtime'\nimport type { ImageConfigComplete } from '../shared/lib/image-config'\nimport { removeBasePath } from './remove-base-path'\nimport { hasBasePath } from './has-base-path'\nimport { AppRouterContext } from '../shared/lib/app-router-context.shared-runtime'\nimport {\n adaptForAppRouterInstance,\n adaptForPathParams,\n adaptForSearchParams,\n PathnameContextProviderAdapter,\n} from '../shared/lib/router/adapters'\nimport {\n SearchParamsContext,\n PathParamsContext,\n} from '../shared/lib/hooks-client-context.shared-runtime'\nimport { onRecoverableError } from './react-client-callbacks/on-recoverable-error'\nimport tracer from './tracing/tracer'\nimport { isNextRouterError } from './components/is-next-router-error'\n\n/// <reference types=\"react-dom/experimental\" />\n\ndeclare global {\n interface Window {\n /* test fns */\n __NEXT_HYDRATED?: boolean\n __NEXT_HYDRATED_CB?: () => void\n\n /* prod */\n __NEXT_DATA__: NEXT_DATA\n __NEXT_P: any[]\n }\n}\ntype RenderRouteInfo = PrivateRouteInfo & {\n App: AppComponent\n scroll?: { x: number; y: number } | null\n isHydratePass?: boolean\n}\ntype RenderErrorProps = Omit<RenderRouteInfo, 'Component' | 'styleSheets'>\ntype RegisterFn = (input: [string, () => void]) => void\n\nexport const version = process.env.__NEXT_VERSION\nexport let router: Router\nexport const emitter: MittEmitter<string> = mitt()\n\nconst looseToArray = <T extends {}>(input: any): T[] => [].slice.call(input)\n\nlet initialData: NEXT_DATA\nlet defaultLocale: string | undefined = undefined\nlet asPath: string\nlet pageLoader: PageLoader\nlet appElement: HTMLElement | null\nlet headManager: {\n mountedInstances: Set<unknown>\n updateHead: (head: JSX.Element[]) => void\n getIsSsr?: () => boolean\n}\nlet initialMatchesMiddleware = false\nlet lastAppProps: AppProps\n\nlet lastRenderReject: (() => void) | null\nlet devClient: any\n\nlet CachedApp: AppComponent, onPerfEntry: (metric: any) => void\nlet CachedComponent: React.ComponentType\n\nclass Container extends React.Component<{\n children?: React.ReactNode\n fn: (err: Error, info?: any) => void\n}> {\n componentDidCatch(componentErr: Error, info: any) {\n this.props.fn(componentErr, info)\n }\n\n componentDidMount() {\n this.scrollToHash()\n\n // We need to replace the router state if:\n // - the page was (auto) exported and has a query string or search (hash)\n // - it was auto exported and is a dynamic route (to provide params)\n // - if it is a client-side skeleton (fallback render)\n // - if middleware matches the current page (may have rewrite params)\n // - if rewrites in next.config.js match (may have rewrite params)\n if (\n router.isSsr &&\n (initialData.isFallback ||\n (initialData.nextExport &&\n (isDynamicRoute(router.pathname) ||\n location.search ||\n process.env.__NEXT_HAS_REWRITES ||\n initialMatchesMiddleware)) ||\n (initialData.props &&\n initialData.props.__N_SSG &&\n (location.search ||\n process.env.__NEXT_HAS_REWRITES ||\n initialMatchesMiddleware)))\n ) {\n // update query on mount for exported pages\n router\n .replace(\n router.pathname +\n '?' +\n String(\n assign(\n urlQueryToSearchParams(router.query),\n new URLSearchParams(location.search)\n )\n ),\n asPath,\n {\n // @ts-ignore\n // WARNING: `_h` is an internal option for handing Next.js\n // client-side hydration. Your app should _never_ use this property.\n // It may change at any time without notice.\n _h: 1,\n // Fallback pages must trigger the data fetch, so the transition is\n // not shallow.\n // Other pages (strictly updating query) happens shallowly, as data\n // requirements would already be present.\n shallow: !initialData.isFallback && !initialMatchesMiddleware,\n }\n )\n .catch((err) => {\n if (!err.cancelled) throw err\n })\n }\n }\n\n componentDidUpdate() {\n this.scrollToHash()\n }\n\n scrollToHash() {\n let { hash } = location\n hash = hash && hash.substring(1)\n if (!hash) return\n\n const el: HTMLElement | null = document.getElementById(hash)\n if (!el) return\n\n // If we call scrollIntoView() in here without a setTimeout\n // it won't scroll properly.\n setTimeout(() => el.scrollIntoView(), 0)\n }\n\n render() {\n if (process.env.NODE_ENV === 'production') {\n return this.props.children\n } else {\n const ReactDevOverlay: typeof import('./components/react-dev-overlay/pages/client').ReactDevOverlay =\n require('./components/react-dev-overlay/pages/client').ReactDevOverlay\n return <ReactDevOverlay>{this.props.children}</ReactDevOverlay>\n }\n }\n}\n\nexport async function initialize(opts: { devClient?: any } = {}): Promise<{\n assetPrefix: string\n}> {\n // This makes sure this specific lines are removed in production\n if (process.env.NODE_ENV === 'development') {\n tracer.onSpanEnd(\n (\n require('./tracing/report-to-socket') as typeof import('./tracing/report-to-socket')\n ).default\n )\n devClient = opts.devClient\n }\n\n initialData = JSON.parse(\n document.getElementById('__NEXT_DATA__')!.textContent!\n )\n window.__NEXT_DATA__ = initialData\n\n defaultLocale = initialData.defaultLocale\n const prefix: string = initialData.assetPrefix || ''\n // With dynamic assetPrefix it's no longer possible to set assetPrefix at the build time\n // So, this is how we do it in the client side at runtime\n ;(self as any).__next_set_public_path__(`${prefix}/_next/`) //eslint-disable-line\n\n // Initialize next/config with the environment configuration\n setConfig({\n serverRuntimeConfig: {},\n publicRuntimeConfig: initialData.runtimeConfig || {},\n })\n\n asPath = getURL()\n\n // make sure not to attempt stripping basePath for 404s\n if (hasBasePath(asPath)) {\n asPath = removeBasePath(asPath)\n }\n\n if (process.env.__NEXT_I18N_SUPPORT) {\n const { normalizeLocalePath } =\n require('../shared/lib/i18n/normalize-locale-path') as typeof import('../shared/lib/i18n/normalize-locale-path')\n\n const { detectDomainLocale } =\n require('../shared/lib/i18n/detect-domain-locale') as typeof import('../shared/lib/i18n/detect-domain-locale')\n\n const { parseRelativeUrl } =\n require('../shared/lib/router/utils/parse-relative-url') as typeof import('../shared/lib/router/utils/parse-relative-url')\n\n const { formatUrl } =\n require('../shared/lib/router/utils/format-url') as typeof import('../shared/lib/router/utils/format-url')\n\n if (initialData.locales) {\n const parsedAs = parseRelativeUrl(asPath)\n const localePathResult = normalizeLocalePath(\n parsedAs.pathname,\n initialData.locales\n )\n\n if (localePathResult.detectedLocale) {\n parsedAs.pathname = localePathResult.pathname\n asPath = formatUrl(parsedAs)\n } else {\n // derive the default locale if it wasn't detected in the asPath\n // since we don't prerender static pages with all possible default\n // locales\n defaultLocale = initialData.locale\n }\n\n // attempt detecting default locale based on hostname\n const detectedDomain = detectDomainLocale(\n process.env.__NEXT_I18N_DOMAINS as any,\n window.location.hostname\n )\n\n // TODO: investigate if defaultLocale needs to be populated after\n // hydration to prevent mismatched renders\n if (detectedDomain) {\n defaultLocale = detectedDomain.defaultLocale\n }\n }\n }\n\n if (initialData.scriptLoader) {\n const { initScriptLoader } = require('./script')\n initScriptLoader(initialData.scriptLoader)\n }\n\n pageLoader = new PageLoader(initialData.buildId, prefix)\n\n const register: RegisterFn = ([r, f]) =>\n pageLoader.routeLoader.onEntrypoint(r, f)\n if (window.__NEXT_P) {\n // Defer page registration for another tick. This will increase the overall\n // latency in hydrating the page, but reduce the total blocking time.\n window.__NEXT_P.map((p) => setTimeout(() => register(p), 0))\n }\n window.__NEXT_P = []\n ;(window.__NEXT_P as any).push = register\n\n headManager = initHeadManager()\n headManager.getIsSsr = () => {\n return router.isSsr\n }\n\n appElement = document.getElementById('__next')\n return { assetPrefix: prefix }\n}\n\nfunction renderApp(App: AppComponent, appProps: AppProps) {\n return <App {...appProps} />\n}\n\nfunction AppContainer({\n children,\n}: React.PropsWithChildren<{}>): React.ReactElement {\n // Create a memoized value for next/navigation router context.\n const adaptedForAppRouter = React.useMemo(() => {\n return adaptForAppRouterInstance(router)\n }, [])\n return (\n <Container\n fn={(error) =>\n // TODO: Fix disabled eslint rule\n // eslint-disable-next-line @typescript-eslint/no-use-before-define\n renderError({ App: CachedApp, err: error }).catch((err) =>\n console.error('Error rendering page: ', err)\n )\n }\n >\n <AppRouterContext.Provider value={adaptedForAppRouter}>\n <SearchParamsContext.Provider value={adaptForSearchParams(router)}>\n <PathnameContextProviderAdapter\n router={router}\n isAutoExport={self.__NEXT_DATA__.autoExport ?? false}\n >\n <PathParamsContext.Provider value={adaptForPathParams(router)}>\n <RouterContext.Provider value={makePublicRouterInstance(router)}>\n <HeadManagerContext.Provider value={headManager}>\n <ImageConfigContext.Provider\n value={\n process.env\n .__NEXT_IMAGE_OPTS as any as ImageConfigComplete\n }\n >\n {children}\n </ImageConfigContext.Provider>\n </HeadManagerContext.Provider>\n </RouterContext.Provider>\n </PathParamsContext.Provider>\n </PathnameContextProviderAdapter>\n </SearchParamsContext.Provider>\n </AppRouterContext.Provider>\n </Container>\n )\n}\n\nconst wrapApp =\n (App: AppComponent) =>\n (wrappedAppProps: Record<string, any>): JSX.Element => {\n const appProps: AppProps = {\n ...wrappedAppProps,\n Component: CachedComponent,\n err: initialData.err,\n router,\n }\n return <AppContainer>{renderApp(App, appProps)}</AppContainer>\n }\n\n// This method handles all runtime and debug errors.\n// 404 and 500 errors are special kind of errors\n// and they are still handle via the main render method.\nfunction renderError(renderErrorProps: RenderErrorProps): Promise<any> {\n let { App, err } = renderErrorProps\n\n // In development runtime errors are caught by our overlay\n // In production we catch runtime errors using componentDidCatch which will trigger renderError\n if (process.env.NODE_ENV !== 'production') {\n // A Next.js rendering runtime error is always unrecoverable\n // FIXME: let's make this recoverable (error in GIP client-transition)\n devClient.onUnrecoverableError()\n\n // We need to render an empty <App> so that the `<ReactDevOverlay>` can\n // render itself.\n // TODO: Fix disabled eslint rule\n // eslint-disable-next-line @typescript-eslint/no-use-before-define\n return doRender({\n App: () => null,\n props: {},\n Component: () => null,\n styleSheets: [],\n })\n }\n\n // Make sure we log the error to the console, otherwise users can't track down issues.\n console.error(err)\n console.error(\n `A client-side exception has occurred, see here for more info: https://nextjs.org/docs/messages/client-side-exception-occurred`\n )\n\n return pageLoader\n .loadPage('/_error')\n .then(({ page: ErrorComponent, styleSheets }) => {\n return lastAppProps?.Component === ErrorComponent\n ? import('../pages/_error')\n .then((errorModule) => {\n return import('../pages/_app').then((appModule) => {\n App = appModule.default as any as AppComponent\n renderErrorProps.App = App\n return errorModule\n })\n })\n .then((m) => ({\n ErrorComponent: m.default as React.ComponentType<{}>,\n styleSheets: [],\n }))\n : { ErrorComponent, styleSheets }\n })\n .then(({ ErrorComponent, styleSheets }) => {\n // In production we do a normal render with the `ErrorComponent` as component.\n // If we've gotten here upon initial render, we can use the props from the server.\n // Otherwise, we need to call `getInitialProps` on `App` before mounting.\n const AppTree = wrapApp(App)\n const appCtx = {\n Component: ErrorComponent,\n AppTree,\n router,\n ctx: {\n err,\n pathname: initialData.page,\n query: initialData.query,\n asPath,\n AppTree,\n },\n }\n return Promise.resolve(\n renderErrorProps.props?.err\n ? renderErrorProps.props\n : loadGetInitialProps(App, appCtx)\n ).then((initProps) =>\n // TODO: Fix disabled eslint rule\n // eslint-disable-next-line @typescript-eslint/no-use-before-define\n doRender({\n ...renderErrorProps,\n err,\n Component: ErrorComponent,\n styleSheets,\n props: initProps,\n })\n )\n })\n}\n\n// Dummy component that we render as a child of Root so that we can\n// toggle the correct styles before the page is rendered.\nfunction Head({ callback }: { callback: () => void }): null {\n // We use `useLayoutEffect` to guarantee the callback is executed\n // as soon as React flushes the update.\n React.useLayoutEffect(() => callback(), [callback])\n return null\n}\n\nconst performanceMarks = {\n navigationStart: 'navigationStart',\n beforeRender: 'beforeRender',\n afterRender: 'afterRender',\n afterHydrate: 'afterHydrate',\n routeChange: 'routeChange',\n} as const\n\nconst performanceMeasures = {\n hydration: 'Next.js-hydration',\n beforeHydration: 'Next.js-before-hydration',\n routeChangeToRender: 'Next.js-route-change-to-render',\n render: 'Next.js-render',\n} as const\n\nlet reactRoot: any = null\n// On initial render a hydrate should always happen\nlet shouldHydrate: boolean = true\n\nfunction clearMarks(): void {\n ;[\n performanceMarks.beforeRender,\n performanceMarks.afterHydrate,\n performanceMarks.afterRender,\n performanceMarks.routeChange,\n ].forEach((mark) => performance.clearMarks(mark))\n}\n\nfunction markHydrateComplete(): void {\n if (!ST) return\n\n performance.mark(performanceMarks.afterHydrate) // mark end of hydration\n\n const hasBeforeRenderMark = performance.getEntriesByName(\n performanceMarks.beforeRender,\n 'mark'\n ).length\n if (hasBeforeRenderMark) {\n const beforeHydrationMeasure = performance.measure(\n performanceMeasures.beforeHydration,\n performanceMarks.navigationStart,\n performanceMarks.beforeRender\n )\n\n const hydrationMeasure = performance.measure(\n performanceMeasures.hydration,\n performanceMarks.beforeRender,\n performanceMarks.afterHydrate\n )\n\n if (\n process.env.NODE_ENV === 'development' &&\n // Old versions of Safari don't return `PerformanceMeasure`s from `performance.measure()`\n beforeHydrationMeasure &&\n hydrationMeasure\n ) {\n tracer\n .startSpan('navigation-to-hydration', {\n startTime: performance.timeOrigin + beforeHydrationMeasure.startTime,\n attributes: {\n pathname: location.pathname,\n query: location.search,\n },\n })\n .end(\n performance.timeOrigin +\n hydrationMeasure.startTime +\n hydrationMeasure.duration\n )\n }\n }\n\n if (onPerfEntry) {\n performance\n .getEntriesByName(performanceMeasures.hydration)\n .forEach(onPerfEntry)\n }\n clearMarks()\n}\n\nfunction markRenderComplete(): void {\n if (!ST) return\n\n performance.mark(performanceMarks.afterRender) // mark end of render\n const navStartEntries: PerformanceEntryList = performance.getEntriesByName(\n performanceMarks.routeChange,\n 'mark'\n )\n\n if (!navStartEntries.length) return\n\n const hasBeforeRenderMark = performance.getEntriesByName(\n performanceMarks.beforeRender,\n 'mark'\n ).length\n\n if (hasBeforeRenderMark) {\n performance.measure(\n performanceMeasures.routeChangeToRender,\n navStartEntries[0].name,\n performanceMarks.beforeRender\n )\n performance.measure(\n performanceMeasures.render,\n performanceMarks.beforeRender,\n performanceMarks.afterRender\n )\n if (onPerfEntry) {\n performance\n .getEntriesByName(performanceMeasures.render)\n .forEach(onPerfEntry)\n performance\n .getEntriesByName(performanceMeasures.routeChangeToRender)\n .forEach(onPerfEntry)\n }\n }\n\n clearMarks()\n ;[\n performanceMeasures.routeChangeToRender,\n performanceMeasures.render,\n ].forEach((measure) => performance.clearMeasures(measure))\n}\n\nfunction renderReactElement(\n domEl: HTMLElement,\n fn: (cb: () => void) => JSX.Element\n): void {\n // mark start of hydrate/render\n if (ST) {\n performance.mark(performanceMarks.beforeRender)\n }\n\n const reactEl = fn(shouldHydrate ? markHydrateComplete : markRenderComplete)\n if (!reactRoot) {\n // Unlike with createRoot, you don't need a separate root.render() call here\n reactRoot = ReactDOM.hydrateRoot(domEl, reactEl, {\n onRecoverableError,\n })\n // TODO: Remove shouldHydrate variable when React 18 is stable as it can depend on `reactRoot` existing\n shouldHydrate = false\n } else {\n const startTransition = (React as any).startTransition\n startTransition(() => {\n reactRoot.render(reactEl)\n })\n }\n}\n\nfunction Root({\n callbacks,\n children,\n}: React.PropsWithChildren<{\n callbacks: Array<() => void>\n}>): React.ReactElement {\n // We use `useLayoutEffect` to guarantee the callbacks are executed\n // as soon as React flushes the update\n React.useLayoutEffect(\n () => callbacks.forEach((callback) => callback()),\n [callbacks]\n )\n\n if (process.env.__NEXT_TEST_MODE) {\n // eslint-disable-next-line react-hooks/rules-of-hooks\n React.useEffect(() => {\n window.__NEXT_HYDRATED = true\n\n if (window.__NEXT_HYDRATED_CB) {\n window.__NEXT_HYDRATED_CB()\n }\n }, [])\n }\n\n return children as React.ReactElement\n}\n\nfunction doRender(input: RenderRouteInfo): Promise<any> {\n let { App, Component, props, err }: RenderRouteInfo = input\n let styleSheets: StyleSheetTuple[] | undefined =\n 'initial' in input ? undefined : input.styleSheets\n Component = Component || lastAppProps.Component\n props = props || lastAppProps.props\n\n const appProps: AppProps = {\n ...props,\n Component,\n err,\n router,\n }\n // lastAppProps has to be set before ReactDom.render to account for ReactDom throwing an error.\n lastAppProps = appProps\n\n let canceled: boolean = false\n let resolvePromise: () => void\n const renderPromise = new Promise<void>((resolve, reject) => {\n if (lastRenderReject) {\n lastRenderReject()\n }\n resolvePromise = () => {\n lastRenderReject = null\n resolve()\n }\n lastRenderReject = () => {\n canceled = true\n lastRenderReject = null\n\n const error: any = new Error('Cancel rendering route')\n error.cancelled = true\n reject(error)\n }\n })\n\n // This function has a return type to ensure it doesn't start returning a\n // Promise. It should remain synchronous.\n function onStart(): boolean {\n if (\n !styleSheets ||\n // We use `style-loader` in development, so we don't need to do anything\n // unless we're in production:\n process.env.NODE_ENV !== 'production'\n ) {\n return false\n }\n\n const currentStyleTags: HTMLStyleElement[] = looseToArray<HTMLStyleElement>(\n document.querySelectorAll('style[data-n-href]')\n )\n const currentHrefs: Set<string | null> = new Set(\n currentStyleTags.map((tag) => tag.getAttribute('data-n-href'))\n )\n\n const noscript: Element | null = document.querySelector(\n 'noscript[data-n-css]'\n )\n const nonce: string | null | undefined =\n noscript?.getAttribute('data-n-css')\n\n styleSheets.forEach(({ href, text }: { href: string; text: any }) => {\n if (!currentHrefs.has(href)) {\n const styleTag = document.createElement('style')\n styleTag.setAttribute('data-n-href', href)\n styleTag.setAttribute('media', 'x')\n\n if (nonce) {\n styleTag.setAttribute('nonce', nonce)\n }\n\n document.head.appendChild(styleTag)\n styleTag.appendChild(document.createTextNode(text))\n }\n })\n return true\n }\n\n function onHeadCommit(): void {\n if (\n // Turbopack has it's own css injection handling, this code ends up removing the CSS.\n !process.env.TURBOPACK &&\n // We use `style-loader` in development, so we don't need to do anything\n // unless we're in production:\n process.env.NODE_ENV === 'production' &&\n // We can skip this during hydration. Running it wont cause any harm, but\n // we may as well save the CPU cycles:\n styleSheets &&\n // Ensure this render was not canceled\n !canceled\n ) {\n const desiredHrefs: Set<string> = new Set(styleSheets.map((s) => s.href))\n const currentStyleTags: HTMLStyleElement[] =\n looseToArray<HTMLStyleElement>(\n document.querySelectorAll('style[data-n-href]')\n )\n const currentHrefs: string[] = currentStyleTags.map(\n (tag) => tag.getAttribute('data-n-href')!\n )\n\n // Toggle `<style>` tags on or off depending on if they're needed:\n for (let idx = 0; idx < currentHrefs.length; ++idx) {\n if (desiredHrefs.has(currentHrefs[idx])) {\n currentStyleTags[idx].removeAttribute('media')\n } else {\n currentStyleTags[idx].setAttribute('media', 'x')\n }\n }\n\n // Reorder styles into intended order:\n let referenceNode: Element | null = document.querySelector(\n 'noscript[data-n-css]'\n )\n if (\n // This should be an invariant:\n referenceNode\n ) {\n styleSheets.forEach(({ href }: { href: string }) => {\n const targetTag: Element | null = document.querySelector(\n `style[data-n-href=\"${href}\"]`\n )\n if (\n // This should be an invariant:\n targetTag\n ) {\n referenceNode!.parentNode!.insertBefore(\n targetTag,\n referenceNode!.nextSibling\n )\n referenceNode = targetTag\n }\n })\n }\n\n // Finally, clean up server rendered stylesheets:\n looseToArray<HTMLLinkElement>(\n document.querySelectorAll('link[data-n-p]')\n ).forEach((el) => {\n el.parentNode!.removeChild(el)\n })\n }\n\n if (input.scroll) {\n const { x, y } = input.scroll\n handleSmoothScroll(() => {\n window.scrollTo(x, y)\n })\n }\n }\n\n function onRootCommit(): void {\n resolvePromise()\n }\n\n onStart()\n\n const elem: JSX.Element = (\n <>\n <Head callback={onHeadCommit} />\n <AppContainer>\n {renderApp(App, appProps)}\n <Portal type=\"next-route-announcer\">\n <RouteAnnouncer />\n </Portal>\n </AppContainer>\n </>\n )\n\n // We catch runtime errors using componentDidCatch which will trigger renderError\n renderReactElement(appElement!, (callback) => (\n <Root callbacks={[callback, onRootCommit]}>\n {process.env.__NEXT_STRICT_MODE ? (\n <React.StrictMode>{elem}</React.StrictMode>\n ) : (\n elem\n )}\n </Root>\n ))\n\n return renderPromise\n}\n\nasync function render(renderingProps: RenderRouteInfo): Promise<void> {\n // if an error occurs in a server-side page (e.g. in getInitialProps),\n // skip re-rendering the error page client-side as data-fetching operations\n // will already have been done on the server and NEXT_DATA contains the correct\n // data for straight-forward hydration of the error page\n if (\n renderingProps.err &&\n // renderingProps.Component might be undefined if there is a top/module-level error\n (typeof renderingProps.Component === 'undefined' ||\n !renderingProps.isHydratePass)\n ) {\n await renderError(renderingProps)\n return\n }\n\n try {\n await doRender(renderingProps)\n } catch (err) {\n const renderErr = getProperError(err)\n // bubble up cancelation errors\n if ((renderErr as Error & { cancelled?: boolean }).cancelled) {\n throw renderErr\n }\n\n if (process.env.NODE_ENV === 'development') {\n // Ensure this error is displayed in the overlay in development\n setTimeout(() => {\n throw renderErr\n })\n }\n await renderError({ ...renderingProps, err: renderErr })\n }\n}\n\nexport async function hydrate(opts?: { beforeRender?: () => Promise<void> }) {\n let initialErr = initialData.err\n\n try {\n const appEntrypoint = await pageLoader.routeLoader.whenEntrypoint('/_app')\n if ('error' in appEntrypoint) {\n throw appEntrypoint.error\n }\n\n const { component: app, exports: mod } = appEntrypoint\n CachedApp = app as AppComponent\n if (mod && mod.reportWebVitals) {\n onPerfEntry = ({\n id,\n name,\n startTime,\n value,\n duration,\n entryType,\n entries,\n attribution,\n }: any): void => {\n // Combines timestamp with random number for unique ID\n const uniqueID: string = `${Date.now()}-${\n Math.floor(Math.random() * (9e12 - 1)) + 1e12\n }`\n let perfStartEntry: string | undefined\n\n if (entries && entries.length) {\n perfStartEntry = entries[0].startTime\n }\n\n const webVitals: NextWebVitalsMetric = {\n id: id || uniqueID,\n name,\n startTime: startTime || perfStartEntry,\n value: value == null ? duration : value,\n label:\n entryType === 'mark' || entryType === 'measure'\n ? 'custom'\n : 'web-vital',\n }\n if (attribution) {\n webVitals.attribution = attribution\n }\n mod.reportWebVitals(webVitals)\n }\n }\n\n const pageEntrypoint =\n // The dev server fails to serve script assets when there's a hydration\n // error, so we need to skip waiting for the entrypoint.\n process.env.NODE_ENV === 'development' && initialData.err\n ? { error: initialData.err }\n : await pageLoader.routeLoader.whenEntrypoint(initialData.page)\n if ('error' in pageEntrypoint) {\n throw pageEntrypoint.error\n }\n CachedComponent = pageEntrypoint.component\n\n if (process.env.NODE_ENV !== 'production') {\n const { isValidElementType } = require('next/dist/compiled/react-is')\n if (!isValidElementType(CachedComponent)) {\n throw new Error(\n `The default export is not a React Component in page: \"${initialData.page}\"`\n )\n }\n }\n } catch (error) {\n // This catches errors like throwing in the top level of a module\n initialErr = getProperError(error)\n }\n\n if (process.env.NODE_ENV === 'development') {\n const getServerError: typeof import('./components/react-dev-overlay/pages/client').getServerError =\n require('./components/react-dev-overlay/pages/client').getServerError\n // Server-side runtime errors need to be re-thrown on the client-side so\n // that the overlay is rendered.\n if (initialErr) {\n if (initialErr === initialData.err) {\n setTimeout(() => {\n let error\n try {\n // Generate a new error object. We `throw` it because some browsers\n // will set the `stack` when thrown, and we want to ensure ours is\n // not overridden when we re-throw it below.\n throw new Error(initialErr!.message)\n } catch (e) {\n error = e as Error\n }\n\n error.name = initialErr!.name\n error.stack = initialErr!.stack\n const errSource = initialErr.source!\n\n // In development, error the navigation API usage in runtime,\n // since it's not allowed to be used in pages router as it doesn't contain error boundary like app router.\n if (isNextRouterError(initialErr)) {\n error.message =\n 'Next.js navigation API is not allowed to be used in Pages Router.'\n }\n\n throw getServerError(error, errSource)\n })\n }\n // We replaced the server-side error with a client-side error, and should\n // no longer rewrite the stack trace to a Node error.\n else {\n setTimeout(() => {\n throw initialErr\n })\n }\n }\n }\n\n if (window.__NEXT_PRELOADREADY) {\n await window.__NEXT_PRELOADREADY(initialData.dynamicIds)\n }\n\n router = createRouter(initialData.page, initialData.query, asPath, {\n initialProps: initialData.props,\n pageLoader,\n App: CachedApp,\n Component: CachedComponent,\n wrapApp,\n err: initialErr,\n isFallback: Boolean(initialData.isFallback),\n subscription: (info, App, scroll) =>\n render(\n Object.assign<\n {},\n Omit<RenderRouteInfo, 'App' | 'scroll'>,\n Pick<RenderRouteInfo, 'App' | 'scroll'>\n >({}, info, {\n App,\n scroll,\n }) as RenderRouteInfo\n ),\n locale: initialData.locale,\n locales: initialData.locales,\n defaultLocale,\n domainLocales: initialData.domainLocales,\n isPreview: initialData.isPreview,\n })\n\n initialMatchesMiddleware = await router._initialMatchesMiddlewarePromise\n\n const renderCtx: RenderRouteInfo = {\n App: CachedApp,\n initial: true,\n Component: CachedComponent,\n props: initialData.props,\n err: initialErr,\n isHydratePass: true,\n }\n\n if (opts?.beforeRender) {\n await opts.beforeRender()\n }\n\n render(renderCtx)\n}\n"],"names":["emitter","hydrate","initialize","router","version","process","env","__NEXT_VERSION","mitt","looseToArray","input","slice","call","initialData","defaultLocale","undefined","asPath","pageLoader","appElement","headManager","initialMatchesMiddleware","lastAppProps","lastRenderReject","devClient","CachedApp","onPerfEntry","CachedComponent","Container","React","Component","componentDidCatch","componentErr","info","props","fn","componentDidMount","scrollToHash","isSsr","isFallback","nextExport","isDynamicRoute","pathname","location","search","__NEXT_HAS_REWRITES","__N_SSG","replace","String","assign","urlQueryToSearchParams","query","URLSearchParams","_h","shallow","catch","err","cancelled","componentDidUpdate","hash","substring","el","document","getElementById","setTimeout","scrollIntoView","render","NODE_ENV","children","ReactDevOverlay","require","opts","tracer","onSpanEnd","default","JSON","parse","textContent","window","__NEXT_DATA__","prefix","assetPrefix","self","__next_set_public_path__","setConfig","serverRuntimeConfig","publicRuntimeConfig","runtimeConfig","getURL","hasBasePath","removeBasePath","__NEXT_I18N_SUPPORT","normalizeLocalePath","detectDomainLocale","parseRelativeUrl","formatUrl","locales","parsedAs","localePathResult","detectedLocale","locale","detectedDomain","__NEXT_I18N_DOMAINS","hostname","scriptLoader","initScriptLoader","PageLoader","buildId","register","r","f","routeLoader","onEntrypoint","__NEXT_P","map","p","push","initHeadManager","getIsSsr","renderApp","App","appProps","AppContainer","adaptedForAppRouter","useMemo","adaptForAppRouterInstance","error","renderError","console","AppRouterContext","Provider","value","SearchParamsContext","adaptForSearchParams","PathnameContextProviderAdapter","isAutoExport","autoExport","PathParamsContext","adaptForPathParams","RouterContext","makePublicRouterInstance","HeadManagerContext","ImageConfigContext","__NEXT_IMAGE_OPTS","wrapApp","wrappedAppProps","renderErrorProps","onUnrecoverableError","doRender","styleSheets","loadPage","then","page","ErrorComponent","errorModule","appModule","m","AppTree","appCtx","ctx","Promise","resolve","loadGetInitialProps","initProps","Head","callback","useLayoutEffect","performanceMarks","navigationStart","beforeRender","afterRender","afterHydrate","routeChange","performanceMeasures","hydration","beforeHydration","routeChangeToRender","reactRoot","shouldHydrate","clearMarks","forEach","mark","performance","markHydrateComplete","ST","hasBeforeRenderMark","getEntriesByName","length","beforeHydrationMeasure","measure","hydrationMeasure","startSpan","startTime","timeOrigin","attributes","end","duration","markRenderComplete","navStartEntries","name","clearMeasures","renderReactElement","domEl","reactEl","ReactDOM","hydrateRoot","onRecoverableError","startTransition","Root","callbacks","__NEXT_TEST_MODE","useEffect","__NEXT_HYDRATED","__NEXT_HYDRATED_CB","canceled","resolvePromise","renderPromise","reject","Error","onStart","currentStyleTags","querySelectorAll","currentHrefs","Set","tag","getAttribute","noscript","querySelector","nonce","href","text","has","styleTag","createElement","setAttribute","head","appendChild","createTextNode","onHeadCommit","TURBOPACK","desiredHrefs","s","idx","removeAttribute","referenceNode","targetTag","parentNode","insertBefore","nextSibling","removeChild","scroll","x","y","handleSmoothScroll","scrollTo","onRootCommit","elem","Portal","type","RouteAnnouncer","__NEXT_STRICT_MODE","StrictMode","renderingProps","isHydratePass","renderErr","getProperError","initialErr","appEntrypoint","whenEntrypoint","component","app","exports","mod","reportWebVitals","id","entryType","entries","attribution","uniqueID","Date","now","Math","floor","random","perfStartEntry","webVitals","label","pageEntrypoint","isValidElementType","getServerError","message","e","stack","errSource","source","isNextRouterError","__NEXT_PRELOADREADY","dynamicIds","createRouter","initialProps","Boolean","subscription","Object","domainLocales","isPreview","_initialMatchesMiddlewarePromise","renderCtx","initial"],"mappings":"AAAA,mBAAmB,GACnB,6DAA6D;;;;;;;;;;;;;;;;;;;IAyEhDA,OAAO;eAAPA;;IA6vBSC,OAAO;eAAPA;;IA5oBAC,UAAU;eAAVA;;IAlHXC,MAAM;eAANA;;IADEC,OAAO;eAAPA;;;;;QAtEN;gEAQyB;iEACX;iDACc;+DAClB;4CAEa;oCACK;2BACJ;6BAIxB;uCACmB;uBACsB;wBAEzB;sEACK;qEACL;gCAEQ;wBACwB;yBACxB;iDACI;gCAEJ;6BACH;+CACK;0BAM1B;iDAIA;oCAC4B;iEAChB;mCACe;AAuB3B,MAAMA,UAAUC,QAAQC,GAAG,CAACC,cAAc;AAC1C,IAAIJ;AACJ,MAAMH,UAA+BQ,IAAAA,aAAI;AAEhD,MAAMC,eAAe,CAAeC,QAAoB,EAAE,CAACC,KAAK,CAACC,IAAI,CAACF;AAEtE,IAAIG;AACJ,IAAIC,gBAAoCC;AACxC,IAAIC;AACJ,IAAIC;AACJ,IAAIC;AACJ,IAAIC;AAKJ,IAAIC,2BAA2B;AAC/B,IAAIC;AAEJ,IAAIC;AACJ,IAAIC;AAEJ,IAAIC,WAAyBC;AAC7B,IAAIC;AAEJ,MAAMC,kBAAkBC,cAAK,CAACC,SAAS;IAIrCC,kBAAkBC,YAAmB,EAAEC,IAAS,EAAE;QAChD,IAAI,CAACC,KAAK,CAACC,EAAE,CAACH,cAAcC;IAC9B;IAEAG,oBAAoB;QAClB,IAAI,CAACC,YAAY;QAEjB,0CAA0C;QAC1C,yEAAyE;QACzE,oEAAoE;QACpE,sDAAsD;QACtD,qEAAqE;QACrE,kEAAkE;QAClE,IACEjC,OAAOkC,KAAK,IACXxB,CAAAA,YAAYyB,UAAU,IACpBzB,YAAY0B,UAAU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