@iblai/web-utils 1.11.7 → 1.11.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (300) hide show
  1. package/dist/auth/index.esm.js.map +1 -1
  2. package/dist/auth/index.js.map +1 -1
  3. package/dist/auth/web-utils/src/__tests__/index.mobile.test.d.ts +7 -0
  4. package/dist/auth/web-utils/src/__tests__/index.web.test.d.ts +8 -0
  5. package/dist/auth/web-utils/src/constants/__tests__/chat.test.d.ts +1 -0
  6. package/dist/auth/web-utils/src/constants/chat.d.ts +8 -0
  7. package/dist/auth/web-utils/src/features/apple-restriction/__tests__/slice.test.d.ts +1 -0
  8. package/dist/auth/web-utils/src/features/apple-restriction/slice.d.ts +7 -0
  9. package/dist/auth/web-utils/src/features/chat/__tests__/slice.test.d.ts +1 -0
  10. package/dist/auth/web-utils/src/features/chat/slice.d.ts +164 -0
  11. package/dist/auth/web-utils/src/features/chat-input/__tests__/api-slice.test.d.ts +1 -0
  12. package/dist/auth/web-utils/src/features/chat-input/api-slice.d.ts +12 -0
  13. package/dist/auth/web-utils/src/features/csv/combine-csv.d.ts +35 -0
  14. package/dist/auth/web-utils/src/features/csv/index.d.ts +1 -0
  15. package/dist/auth/web-utils/src/features/files/__tests__/filesSlice.test.d.ts +1 -0
  16. package/dist/auth/web-utils/src/features/files/filesSlice.d.ts +23 -0
  17. package/dist/auth/web-utils/src/features/host-chat/__tests__/slice.test.d.ts +1 -0
  18. package/dist/auth/web-utils/src/features/host-chat/slice.d.ts +17 -0
  19. package/dist/auth/web-utils/src/features/index.d.ts +11 -0
  20. package/dist/auth/web-utils/src/features/monetization/__tests__/slice.test.d.ts +1 -0
  21. package/dist/auth/web-utils/src/features/monetization/slice.d.ts +16 -0
  22. package/dist/auth/web-utils/src/features/rbac/__tests__/rbac-slice.test.d.ts +1 -0
  23. package/dist/auth/web-utils/src/features/rbac/rbac-slice.d.ts +13 -0
  24. package/dist/auth/web-utils/src/features/subscription/__tests__/slice.test.d.ts +1 -0
  25. package/dist/auth/web-utils/src/features/subscription/constants.d.ts +12 -0
  26. package/dist/auth/web-utils/src/features/subscription/slice.d.ts +28 -0
  27. package/dist/auth/web-utils/src/features/top-banner/__tests__/slice.test.d.ts +1 -0
  28. package/dist/auth/web-utils/src/features/top-banner/slice.d.ts +24 -0
  29. package/dist/auth/web-utils/src/features/tracking/__tests__/time-tracker.test.d.ts +1 -0
  30. package/dist/auth/web-utils/src/features/tracking/examples.d.ts +4 -0
  31. package/dist/auth/web-utils/src/features/tracking/index.d.ts +6 -0
  32. package/dist/auth/web-utils/src/features/tracking/time-tracker.d.ts +29 -0
  33. package/dist/auth/web-utils/src/features/tracking/use-time-tracker-native.d.ts +14 -0
  34. package/dist/auth/web-utils/src/features/tracking/use-time-tracker.d.ts +14 -0
  35. package/dist/auth/web-utils/src/hoc/index.d.ts +2 -0
  36. package/dist/auth/web-utils/src/hoc/with-permissions.d.ts +44 -0
  37. package/dist/auth/web-utils/src/hooks/__tests__/use-accessing-public-route.test.d.ts +1 -0
  38. package/dist/auth/web-utils/src/hooks/__tests__/use-cached-session-id.test.d.ts +1 -0
  39. package/dist/auth/web-utils/src/hooks/__tests__/use-chat-file-upload.test.d.ts +1 -0
  40. package/dist/auth/web-utils/src/hooks/__tests__/use-embed-mode.test.d.ts +1 -0
  41. package/dist/auth/web-utils/src/hooks/__tests__/use-event-callback.test.d.ts +1 -0
  42. package/dist/auth/web-utils/src/hooks/__tests__/use-event-listener.test.d.ts +1 -0
  43. package/dist/auth/web-utils/src/hooks/__tests__/use-file-drag-drop.test.d.ts +1 -0
  44. package/dist/auth/web-utils/src/hooks/__tests__/use-local-storage.test.d.ts +1 -0
  45. package/dist/auth/web-utils/src/hooks/__tests__/use-mentor-settings.test.d.ts +1 -0
  46. package/dist/auth/web-utils/src/hooks/__tests__/use-model-file-upload-capabilities.test.d.ts +1 -0
  47. package/dist/auth/web-utils/src/hooks/__tests__/use-os.test.d.ts +1 -0
  48. package/dist/auth/web-utils/src/hooks/__tests__/use-responsive.test.d.ts +1 -0
  49. package/dist/auth/web-utils/src/hooks/__tests__/use-show-attachment.test.d.ts +1 -0
  50. package/dist/auth/web-utils/src/hooks/__tests__/use-show-free-trial-dialog.test.d.ts +1 -0
  51. package/dist/auth/web-utils/src/hooks/__tests__/use-show-voice-call.test.d.ts +1 -0
  52. package/dist/auth/web-utils/src/hooks/__tests__/use-show-voice-recorder.test.d.ts +1 -0
  53. package/dist/auth/web-utils/src/hooks/__tests__/use-timer.test.d.ts +1 -0
  54. package/dist/auth/web-utils/src/hooks/__tests__/use-tokens.test.d.ts +1 -0
  55. package/dist/auth/web-utils/src/hooks/__tests__/use-user-agreement.test.d.ts +1 -0
  56. package/dist/auth/web-utils/src/hooks/__tests__/use-user.test.d.ts +1 -0
  57. package/dist/auth/web-utils/src/hooks/__tests__/use-voice-chat.test.d.ts +1 -0
  58. package/dist/auth/web-utils/src/hooks/__tests__/use-welcome-message.test.d.ts +1 -0
  59. package/dist/auth/web-utils/src/hooks/chat/__tests__/chat-history.utils.test.d.ts +1 -0
  60. package/dist/auth/web-utils/src/hooks/chat/chat-history.utils.d.ts +10 -0
  61. package/dist/auth/web-utils/src/hooks/chat/ollama-client.d.ts +57 -0
  62. package/dist/auth/web-utils/src/hooks/chat/use-advanced-chat.d.ts +61 -0
  63. package/dist/auth/web-utils/src/hooks/chat/use-advanced-chat.test.d.ts +1 -0
  64. package/dist/auth/web-utils/src/hooks/chat/use-chat-history.d.ts +17 -0
  65. package/dist/auth/web-utils/src/hooks/chat/use-chat-v2.d.ts +146 -0
  66. package/dist/auth/web-utils/src/hooks/chat/use-chat-v2.test.d.ts +1 -0
  67. package/dist/auth/web-utils/src/hooks/chat/use-chat.d.ts +53 -0
  68. package/dist/auth/web-utils/src/hooks/chat/use-get-chat-details.d.ts +14 -0
  69. package/dist/auth/web-utils/src/hooks/chat/use-get-chat-details.test.d.ts +1 -0
  70. package/dist/auth/web-utils/src/hooks/chat/use-mentor-tools.d.ts +24 -0
  71. package/dist/auth/web-utils/src/hooks/chat/use-mentor-tools.test.d.ts +1 -0
  72. package/dist/auth/web-utils/src/hooks/index.d.ts +42 -0
  73. package/dist/auth/web-utils/src/hooks/profile/use-profile-image-upload.d.ts +13 -0
  74. package/dist/auth/web-utils/src/hooks/profile/use-user-profile-update.d.ts +28 -0
  75. package/dist/auth/web-utils/src/hooks/stripe/__tests__/use-stripe-upgrade.test.d.ts +1 -0
  76. package/dist/auth/web-utils/src/hooks/stripe/use-stripe-upgrade.d.ts +14 -0
  77. package/dist/auth/web-utils/src/hooks/subscription/class-subscription-flow.d.ts +70 -0
  78. package/dist/auth/web-utils/src/hooks/subscription/constants.d.ts +4 -0
  79. package/dist/auth/web-utils/src/hooks/subscription/use-subscription-handler.d.ts +11 -0
  80. package/dist/auth/web-utils/src/hooks/subscription-v2/__tests__/use-402-error-check.test.d.ts +1 -0
  81. package/dist/auth/web-utils/src/hooks/subscription-v2/class-subscription-flow.d.ts +78 -0
  82. package/dist/auth/web-utils/src/hooks/subscription-v2/constants.d.ts +56 -0
  83. package/dist/auth/web-utils/src/hooks/subscription-v2/use-402-error-check.d.ts +22 -0
  84. package/dist/auth/web-utils/src/hooks/subscription-v2/use-external-pricing-plan.d.ts +7 -0
  85. package/dist/auth/web-utils/src/hooks/subscription-v2/use-subscription-handler.d.ts +71 -0
  86. package/dist/auth/web-utils/src/hooks/tenant-metadata/__tests__/config-loader.test.d.ts +10 -0
  87. package/dist/auth/web-utils/src/hooks/tenant-metadata/__tests__/use-tenant-metadata.test.d.ts +1 -0
  88. package/dist/auth/web-utils/src/hooks/tenant-metadata/config-loader.d.ts +41 -0
  89. package/dist/auth/web-utils/src/hooks/tenant-metadata/constants.d.ts +9 -0
  90. package/dist/auth/web-utils/src/hooks/tenant-metadata/index.d.ts +5 -0
  91. package/dist/auth/web-utils/src/hooks/tenant-metadata/types.d.ts +9 -0
  92. package/dist/auth/web-utils/src/hooks/tenant-metadata/use-tenant-metadata.d.ts +29 -0
  93. package/dist/auth/web-utils/src/hooks/use-accessing-public-route.d.ts +1 -0
  94. package/dist/auth/web-utils/src/hooks/use-cached-session-id.d.ts +8 -0
  95. package/dist/auth/web-utils/src/hooks/use-chat-file-upload.d.ts +17 -0
  96. package/dist/auth/web-utils/src/hooks/use-day-js.d.ts +7 -0
  97. package/dist/auth/web-utils/src/hooks/use-embed-mode.d.ts +1 -0
  98. package/dist/auth/web-utils/src/hooks/use-event-callback.d.ts +2 -0
  99. package/dist/auth/web-utils/src/hooks/use-event-listener.d.ts +6 -0
  100. package/dist/auth/web-utils/src/hooks/use-file-drag-drop.d.ts +15 -0
  101. package/dist/auth/web-utils/src/hooks/use-isomorphic-layout-effect.d.ts +2 -0
  102. package/dist/auth/web-utils/src/hooks/use-local-storage.d.ts +13 -0
  103. package/dist/auth/web-utils/src/hooks/use-mentor-settings.d.ts +46 -0
  104. package/dist/auth/web-utils/src/hooks/use-model-file-upload-capabilities.d.ts +21 -0
  105. package/dist/auth/web-utils/src/hooks/use-os.d.ts +8 -0
  106. package/dist/auth/web-utils/src/hooks/use-responsive.d.ts +13 -0
  107. package/dist/auth/web-utils/src/hooks/use-show-attachment.d.ts +7 -0
  108. package/dist/auth/web-utils/src/hooks/use-show-free-trial-dialog.d.ts +31 -0
  109. package/dist/auth/web-utils/src/hooks/use-show-voice-call.d.ts +7 -0
  110. package/dist/auth/web-utils/src/hooks/use-show-voice-recorder.d.ts +7 -0
  111. package/dist/auth/web-utils/src/hooks/use-tenant-switch-sync.d.ts +13 -0
  112. package/dist/auth/web-utils/src/hooks/use-timer.d.ts +7 -0
  113. package/dist/auth/web-utils/src/hooks/use-tokens.d.ts +2 -0
  114. package/dist/auth/web-utils/src/hooks/use-user-agreement.d.ts +18 -0
  115. package/dist/auth/web-utils/src/hooks/use-user.d.ts +23 -0
  116. package/dist/auth/web-utils/src/hooks/use-voice-chat.d.ts +11 -0
  117. package/dist/auth/web-utils/src/hooks/use-welcome-message.d.ts +16 -0
  118. package/dist/auth/web-utils/src/index.d.ts +8 -0
  119. package/dist/auth/web-utils/src/index.mobile.d.ts +86 -0
  120. package/dist/auth/web-utils/src/index.web.d.ts +142 -0
  121. package/dist/auth/web-utils/src/providers/__tests__/auth-provider.test.d.ts +1 -0
  122. package/dist/auth/web-utils/src/providers/__tests__/mentor-provider.test.d.ts +1 -0
  123. package/dist/auth/web-utils/src/providers/__tests__/service-worker-provider.test.d.ts +1 -0
  124. package/dist/auth/web-utils/src/providers/__tests__/tenant-provider.test.d.ts +1 -0
  125. package/dist/auth/web-utils/src/providers/auth-provider.d.ts +129 -0
  126. package/dist/auth/web-utils/src/providers/index.d.ts +4 -0
  127. package/dist/auth/web-utils/src/providers/mentor-provider.d.ts +44 -0
  128. package/dist/auth/web-utils/src/providers/service-worker-provider.d.ts +21 -0
  129. package/dist/auth/web-utils/src/providers/tenant-provider.d.ts +77 -0
  130. package/dist/auth/web-utils/src/services/__tests__/event-bus.test.d.ts +1 -0
  131. package/dist/auth/web-utils/src/services/__tests__/file-upload.test.d.ts +1 -0
  132. package/dist/auth/web-utils/src/services/__tests__/register-sw.test.d.ts +1 -0
  133. package/dist/auth/web-utils/src/services/event-bus.d.ts +6 -0
  134. package/dist/auth/web-utils/src/services/file-upload.d.ts +60 -0
  135. package/dist/auth/web-utils/src/services/index.d.ts +3 -0
  136. package/dist/auth/web-utils/src/services/register-sw.d.ts +71 -0
  137. package/dist/auth/web-utils/src/types/chat.d.ts +1 -0
  138. package/dist/auth/web-utils/src/types/file-upload.d.ts +62 -0
  139. package/dist/auth/web-utils/src/types/index.d.ts +68 -0
  140. package/dist/auth/web-utils/src/types/subscription.d.ts +40 -0
  141. package/dist/auth/web-utils/src/utils/__tests__/auth.test.d.ts +1 -0
  142. package/dist/auth/web-utils/src/utils/__tests__/constants.test.d.ts +1 -0
  143. package/dist/auth/web-utils/src/utils/__tests__/helpers.test.d.ts +1 -0
  144. package/dist/auth/web-utils/src/utils/__tests__/platform.test.d.ts +1 -0
  145. package/dist/auth/web-utils/src/utils/__tests__/tauri-api-cache.test.d.ts +1 -0
  146. package/dist/auth/web-utils/src/utils/__tests__/tenant-switch.test.d.ts +1 -0
  147. package/dist/auth/web-utils/src/utils/constants.d.ts +69 -0
  148. package/dist/auth/web-utils/src/utils/data/__tests__/advanced-tab.test.d.ts +1 -0
  149. package/dist/auth/web-utils/src/utils/data/advanced-tab.d.ts +62 -0
  150. package/dist/auth/web-utils/src/utils/helpers.d.ts +33 -0
  151. package/dist/auth/web-utils/src/utils/index.d.ts +6 -0
  152. package/dist/auth/web-utils/src/utils/platform.d.ts +9 -0
  153. package/dist/auth/web-utils/src/utils/tauri-api-cache.d.ts +19 -0
  154. package/dist/index.esm.js +581 -266
  155. package/dist/index.esm.js.map +1 -1
  156. package/dist/index.js +594 -279
  157. package/dist/index.js.map +1 -1
  158. package/dist/package.json +1 -2
  159. package/dist/web-utils/src/hooks/chat/use-advanced-chat.d.ts +4 -4
  160. package/dist/web-utils/src/hooks/subscription-v2/use-subscription-handler.d.ts +3 -3
  161. package/dist/web-utils/src/hooks/tenant-metadata/use-tenant-metadata.d.ts +3 -3
  162. package/dist/web-utils/src/hooks/use-isomorphic-layout-effect.d.ts +2 -2
  163. package/dist/web-utils/src/hooks/use-mentor-settings.d.ts +21 -21
  164. package/dist/web-utils/src/hooks/use-user-agreement.d.ts +3 -6
  165. package/dist/web-utils/tsconfig.tsbuildinfo +1 -0
  166. package/package.json +1 -2
  167. package/dist/data-layer/src/config.d.ts +0 -8
  168. package/dist/data-layer/src/constants.d.ts +0 -31
  169. package/dist/data-layer/src/core/index.d.ts +0 -11
  170. package/dist/data-layer/src/features/analytics/api-slice.d.ts +0 -3756
  171. package/dist/data-layer/src/features/analytics/constants.d.ts +0 -133
  172. package/dist/data-layer/src/features/analytics/custom-api-slice.d.ts +0 -311
  173. package/dist/data-layer/src/features/analytics/types.d.ts +0 -696
  174. package/dist/data-layer/src/features/api-keys/api-slice.d.ts +0 -702
  175. package/dist/data-layer/src/features/apps/api-slice.d.ts +0 -720
  176. package/dist/data-layer/src/features/artifacts/api-slice.d.ts +0 -1798
  177. package/dist/data-layer/src/features/artifacts/constants.d.ts +0 -42
  178. package/dist/data-layer/src/features/artifacts/types.d.ts +0 -37
  179. package/dist/data-layer/src/features/audit-logs/api-slice.d.ts +0 -268
  180. package/dist/data-layer/src/features/audit-logs/constants.d.ts +0 -11
  181. package/dist/data-layer/src/features/audit-logs/types.d.ts +0 -32
  182. package/dist/data-layer/src/features/auth/api-slice.d.ts +0 -639
  183. package/dist/data-layer/src/features/auth/constants.d.ts +0 -20
  184. package/dist/data-layer/src/features/auth/types.d.ts +0 -33
  185. package/dist/data-layer/src/features/billing/api-slice.d.ts +0 -359
  186. package/dist/data-layer/src/features/billing/constants.d.ts +0 -16
  187. package/dist/data-layer/src/features/billing/custom-api-slice.d.ts +0 -634
  188. package/dist/data-layer/src/features/billing/types.d.ts +0 -36
  189. package/dist/data-layer/src/features/call-configurations/api-slice.d.ts +0 -855
  190. package/dist/data-layer/src/features/call-configurations/constants.d.ts +0 -16
  191. package/dist/data-layer/src/features/call-configurations/types.d.ts +0 -49
  192. package/dist/data-layer/src/features/career/api-slice.d.ts +0 -3080
  193. package/dist/data-layer/src/features/catalog/api-slice.d.ts +0 -10260
  194. package/dist/data-layer/src/features/chat/api-slice.d.ts +0 -1977
  195. package/dist/data-layer/src/features/chat/constants.d.ts +0 -8
  196. package/dist/data-layer/src/features/chat/custom-api-slice.d.ts +0 -272
  197. package/dist/data-layer/src/features/chat-files/api-slice.d.ts +0 -185
  198. package/dist/data-layer/src/features/chat-files/types.d.ts +0 -32
  199. package/dist/data-layer/src/features/chat-history/api-slice.d.ts +0 -1528
  200. package/dist/data-layer/src/features/chat-privacy/api-slice.d.ts +0 -1398
  201. package/dist/data-layer/src/features/chat-privacy/constants.d.ts +0 -13
  202. package/dist/data-layer/src/features/claw/api-slice.d.ts +0 -5471
  203. package/dist/data-layer/src/features/claw/constants.d.ts +0 -126
  204. package/dist/data-layer/src/features/claw/types.d.ts +0 -275
  205. package/dist/data-layer/src/features/constants.d.ts +0 -3
  206. package/dist/data-layer/src/features/core/api-slice.d.ts +0 -6188
  207. package/dist/data-layer/src/features/core/constants.d.ts +0 -51
  208. package/dist/data-layer/src/features/core/custom-api-slice.d.ts +0 -1766
  209. package/dist/data-layer/src/features/core/custom-public-image-asset-api-slice.d.ts +0 -373
  210. package/dist/data-layer/src/features/core/types.d.ts +0 -73
  211. package/dist/data-layer/src/features/course-metadata/api-slice.d.ts +0 -1728
  212. package/dist/data-layer/src/features/course-metadata/types.d.ts +0 -179
  213. package/dist/data-layer/src/features/courses/api-slice.d.ts +0 -664
  214. package/dist/data-layer/src/features/courses/types.d.ts +0 -26
  215. package/dist/data-layer/src/features/credentials/api-slice.d.ts +0 -6360
  216. package/dist/data-layer/src/features/credentials/constants.d.ts +0 -36
  217. package/dist/data-layer/src/features/credentials/custom-api-slice.d.ts +0 -1839
  218. package/dist/data-layer/src/features/credentials/types.d.ts +0 -39
  219. package/dist/data-layer/src/features/custom-domain/api-slice.d.ts +0 -602
  220. package/dist/data-layer/src/features/custom-domain/constants.d.ts +0 -20
  221. package/dist/data-layer/src/features/custom-domain/types.d.ts +0 -46
  222. package/dist/data-layer/src/features/datasets/api-slice.d.ts +0 -439
  223. package/dist/data-layer/src/features/disclaimers/api-slice.d.ts +0 -912
  224. package/dist/data-layer/src/features/disclaimers/constants.d.ts +0 -27
  225. package/dist/data-layer/src/features/disclaimers/types.d.ts +0 -67
  226. package/dist/data-layer/src/features/edx-proctoring/api-slice.d.ts +0 -590
  227. package/dist/data-layer/src/features/edx-proctoring/constants.d.ts +0 -15
  228. package/dist/data-layer/src/features/edx-proctoring/types.d.ts +0 -61
  229. package/dist/data-layer/src/features/edx-sso/api-slice.d.ts +0 -334
  230. package/dist/data-layer/src/features/edx-sso/types.d.ts +0 -10
  231. package/dist/data-layer/src/features/llms/api-slice.d.ts +0 -373
  232. package/dist/data-layer/src/features/mcp/api-slice.d.ts +0 -2613
  233. package/dist/data-layer/src/features/mcp/constants.d.ts +0 -57
  234. package/dist/data-layer/src/features/mcp/types.d.ts +0 -176
  235. package/dist/data-layer/src/features/memory/api-slice.d.ts +0 -3462
  236. package/dist/data-layer/src/features/memory/constants.d.ts +0 -80
  237. package/dist/data-layer/src/features/memory/types.d.ts +0 -190
  238. package/dist/data-layer/src/features/mentor/api-slice.d.ts +0 -7984
  239. package/dist/data-layer/src/features/mentor/constants.d.ts +0 -45
  240. package/dist/data-layer/src/features/mentor/custom-api-slice.d.ts +0 -957
  241. package/dist/data-layer/src/features/mentor/privacy.d.ts +0 -61
  242. package/dist/data-layer/src/features/mentor/types.d.ts +0 -83
  243. package/dist/data-layer/src/features/mentor-categories/api-slice.d.ts +0 -785
  244. package/dist/data-layer/src/features/moderation-logs/api-slice.d.ts +0 -705
  245. package/dist/data-layer/src/features/monetization/constants.d.ts +0 -76
  246. package/dist/data-layer/src/features/monetization/custom-api-slice.d.ts +0 -5178
  247. package/dist/data-layer/src/features/monetization/types.d.ts +0 -229
  248. package/dist/data-layer/src/features/notifications/api-slice.d.ts +0 -1728
  249. package/dist/data-layer/src/features/notifications/constants.d.ts +0 -26
  250. package/dist/data-layer/src/features/notifications/custom-api-slice.d.ts +0 -996
  251. package/dist/data-layer/src/features/notifications/types.d.ts +0 -69
  252. package/dist/data-layer/src/features/per-learner/api-slice.d.ts +0 -1329
  253. package/dist/data-layer/src/features/periodic-agents/api-slice.d.ts +0 -2347
  254. package/dist/data-layer/src/features/platform/api-slice.d.ts +0 -2553
  255. package/dist/data-layer/src/features/platform/constants.d.ts +0 -17
  256. package/dist/data-layer/src/features/platform/custom-api-slice.d.ts +0 -493
  257. package/dist/data-layer/src/features/platform/types.d.ts +0 -61
  258. package/dist/data-layer/src/features/projects/api-slice.d.ts +0 -2026
  259. package/dist/data-layer/src/features/projects/constants.d.ts +0 -51
  260. package/dist/data-layer/src/features/projects/types.d.ts +0 -79
  261. package/dist/data-layer/src/features/prompts/api-slice.d.ts +0 -2464
  262. package/dist/data-layer/src/features/reports/api-slice.d.ts +0 -789
  263. package/dist/data-layer/src/features/retirement/api-slice.d.ts +0 -165
  264. package/dist/data-layer/src/features/retirement/constants.d.ts +0 -7
  265. package/dist/data-layer/src/features/retirement/types.d.ts +0 -3
  266. package/dist/data-layer/src/features/search/ai-search-api-slice.d.ts +0 -1413
  267. package/dist/data-layer/src/features/search/api-slice.d.ts +0 -2017
  268. package/dist/data-layer/src/features/search/constants.d.ts +0 -41
  269. package/dist/data-layer/src/features/search/types.d.ts +0 -161
  270. package/dist/data-layer/src/features/sessions/api-slice.d.ts +0 -969
  271. package/dist/data-layer/src/features/sessions/constants.d.ts +0 -3
  272. package/dist/data-layer/src/features/sessions/url.d.ts +0 -9
  273. package/dist/data-layer/src/features/skills/api-slice.d.ts +0 -1389
  274. package/dist/data-layer/src/features/stripe/api-slice.d.ts +0 -803
  275. package/dist/data-layer/src/features/stripe/constants.d.ts +0 -19
  276. package/dist/data-layer/src/features/stripe/types.d.ts +0 -19
  277. package/dist/data-layer/src/features/tenant/api-slice.d.ts +0 -832
  278. package/dist/data-layer/src/features/tenant/constants.d.ts +0 -11
  279. package/dist/data-layer/src/features/tenant/types.d.ts +0 -19
  280. package/dist/data-layer/src/features/tenant-logo/api-slice.d.ts +0 -349
  281. package/dist/data-layer/src/features/tenant-logo/constants.d.ts +0 -24
  282. package/dist/data-layer/src/features/tools/api-slice.d.ts +0 -417
  283. package/dist/data-layer/src/features/training-documents/api-slice.d.ts +0 -1523
  284. package/dist/data-layer/src/features/user/api-slice.d.ts +0 -2128
  285. package/dist/data-layer/src/features/user/constants.d.ts +0 -47
  286. package/dist/data-layer/src/features/user/types.d.ts +0 -134
  287. package/dist/data-layer/src/features/user-invitations/api-slice.d.ts +0 -762
  288. package/dist/data-layer/src/features/utils.d.ts +0 -94
  289. package/dist/data-layer/src/features/watched-groups/api-slice.d.ts +0 -2481
  290. package/dist/data-layer/src/features/watched-groups/constants.d.ts +0 -66
  291. package/dist/data-layer/src/features/watched-groups/types.d.ts +0 -143
  292. package/dist/data-layer/src/features/workflows/api-slice.d.ts +0 -2454
  293. package/dist/data-layer/src/features/workflows/constants.d.ts +0 -57
  294. package/dist/data-layer/src/features/workflows/types.d.ts +0 -130
  295. package/dist/data-layer/src/index.d.ts +0 -121
  296. package/dist/data-layer/src/reducers/index.d.ts +0 -2
  297. package/dist/data-layer/src/reducers/mentor.d.ts +0 -2
  298. package/dist/data-layer/src/reducers/skills.d.ts +0 -2
  299. package/dist/data-layer/src/services/StorageService.d.ts +0 -5
  300. package/dist/data-layer/src/utils/index.d.ts +0 -6
package/dist/index.esm.js CHANGED
@@ -10387,7 +10387,7 @@ function MentorProvider({ children, fallback, onAuthSuccess, onAuthFailure, redi
10387
10387
  * Returns the mentor object if found, undefined otherwise
10388
10388
  */
10389
10389
  async function determineMentorToRedirectTo() {
10390
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
10390
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
10391
10391
  setIsLoading(true);
10392
10392
  try {
10393
10393
  // Get the user's recent mentors
@@ -10422,9 +10422,9 @@ function MentorProvider({ children, fallback, onAuthSuccess, onAuthFailure, redi
10422
10422
  console.log("[determineMentorToRedirectTo] starredMentors ", starredMentors);
10423
10423
  if (starredMentors && starredMentors.length > 0) {
10424
10424
  const starredMentor = starredMentors[0];
10425
- // @ts-expect-error - mentor is not part of the starred mentor object
10426
- if ((starredMentor === null || starredMentor === void 0 ? void 0 : starredMentor.unique_id) || (starredMentor === null || starredMentor === void 0 ? void 0 : starredMentor.mentor)) {
10427
- return starredMentor;
10425
+ const uniqueId = (_a = starredMentor === null || starredMentor === void 0 ? void 0 : starredMentor.unique_id) !== null && _a !== void 0 ? _a : starredMentor === null || starredMentor === void 0 ? void 0 : starredMentor.mentor;
10426
+ if (uniqueId) {
10427
+ return { ...starredMentor, unique_id: uniqueId };
10428
10428
  }
10429
10429
  }
10430
10430
  console.log("[determineMentorToRedirectTo] recentMentors ", recentMentors);
@@ -10441,12 +10441,12 @@ function MentorProvider({ children, fallback, onAuthSuccess, onAuthFailure, redi
10441
10441
  orderBy: "recently_accessed_at",
10442
10442
  });
10443
10443
  console.log("[determineMentorToRedirectTo] recentMentorsResult ", recentMentorsResult);
10444
- recentMentors = ((_a = recentMentorsResult.data) === null || _a === void 0 ? void 0 : _a.results) || [];
10444
+ recentMentors = ((_b = recentMentorsResult.data) === null || _b === void 0 ? void 0 : _b.results) || [];
10445
10445
  // Check if we found recent mentors for the tenant
10446
10446
  if (recentMentors.length > 0) {
10447
10447
  console.log("found recent mentor", JSON.stringify({
10448
- selectedMentorId: (_b = recentMentors[0]) === null || _b === void 0 ? void 0 : _b.unique_id,
10449
- mentorName: (_c = recentMentors[0]) === null || _c === void 0 ? void 0 : _c.name,
10448
+ selectedMentorId: (_c = recentMentors[0]) === null || _c === void 0 ? void 0 : _c.unique_id,
10449
+ mentorName: (_d = recentMentors[0]) === null || _d === void 0 ? void 0 : _d.name,
10450
10450
  tenantKey,
10451
10451
  }));
10452
10452
  return recentMentors[0];
@@ -10462,7 +10462,7 @@ function MentorProvider({ children, fallback, onAuthSuccess, onAuthFailure, redi
10462
10462
  limit: QUERY_LIMIT,
10463
10463
  orderBy: "recently_accessed_at",
10464
10464
  });
10465
- const featuredMentors = ((_d = featuredMentorsResult.data) === null || _d === void 0 ? void 0 : _d.results) || [];
10465
+ const featuredMentors = ((_e = featuredMentorsResult.data) === null || _e === void 0 ? void 0 : _e.results) || [];
10466
10466
  console.log("featured mentors fetched", {
10467
10467
  count: featuredMentors.length,
10468
10468
  mentorIds: featuredMentors.map((m) => m === null || m === void 0 ? void 0 : m.unique_id),
@@ -10506,8 +10506,8 @@ function MentorProvider({ children, fallback, onAuthSuccess, onAuthFailure, redi
10506
10506
  }
10507
10507
  // If no default mentor, select the first featured mentor
10508
10508
  console.log("found first featured mentor", {
10509
- mentorId: (_e = featuredMentors[0]) === null || _e === void 0 ? void 0 : _e.unique_id,
10510
- mentorName: (_f = featuredMentors[0]) === null || _f === void 0 ? void 0 : _f.name,
10509
+ mentorId: (_f = featuredMentors[0]) === null || _f === void 0 ? void 0 : _f.unique_id,
10510
+ mentorName: (_g = featuredMentors[0]) === null || _g === void 0 ? void 0 : _g.name,
10511
10511
  });
10512
10512
  return featuredMentors[0];
10513
10513
  }
@@ -10522,7 +10522,7 @@ function MentorProvider({ children, fallback, onAuthSuccess, onAuthFailure, redi
10522
10522
  limit: QUERY_LIMIT,
10523
10523
  orderBy: "recently_accessed_at",
10524
10524
  });
10525
- const nonFeaturedMentors = ((_g = nonFeaturedMentorsResult.data) === null || _g === void 0 ? void 0 : _g.results) || [];
10525
+ const nonFeaturedMentors = ((_h = nonFeaturedMentorsResult.data) === null || _h === void 0 ? void 0 : _h.results) || [];
10526
10526
  console.log("non-featured mentors fetched", {
10527
10527
  count: nonFeaturedMentors.length,
10528
10528
  mentorIds: nonFeaturedMentors.map((m) => m === null || m === void 0 ? void 0 : m.unique_id),
@@ -10530,8 +10530,8 @@ function MentorProvider({ children, fallback, onAuthSuccess, onAuthFailure, redi
10530
10530
  // Check if we found non-featured mentors
10531
10531
  if (nonFeaturedMentors.length > 0) {
10532
10532
  console.log("found first non-featured mentor", {
10533
- mentorId: (_h = nonFeaturedMentors[0]) === null || _h === void 0 ? void 0 : _h.unique_id,
10534
- mentorName: (_j = nonFeaturedMentors[0]) === null || _j === void 0 ? void 0 : _j.name,
10533
+ mentorId: (_j = nonFeaturedMentors[0]) === null || _j === void 0 ? void 0 : _j.unique_id,
10534
+ mentorName: (_k = nonFeaturedMentors[0]) === null || _k === void 0 ? void 0 : _k.name,
10535
10535
  });
10536
10536
  return nonFeaturedMentors[0];
10537
10537
  }
@@ -10552,7 +10552,7 @@ function MentorProvider({ children, fallback, onAuthSuccess, onAuthFailure, redi
10552
10552
  // @ts-expect-error - userId is passed but not in generated API types
10553
10553
  userId: username,
10554
10554
  });
10555
- const seededMentorsDetails = (_k = seedMentorsResult.data) === null || _k === void 0 ? void 0 : _k.detail;
10555
+ const seededMentorsDetails = (_l = seedMentorsResult.data) === null || _l === void 0 ? void 0 : _l.detail;
10556
10556
  console.log("mentor seeding completed", {
10557
10557
  success: !!seededMentorsDetails,
10558
10558
  details: seededMentorsDetails,
@@ -10566,15 +10566,15 @@ function MentorProvider({ children, fallback, onAuthSuccess, onAuthFailure, redi
10566
10566
  username,
10567
10567
  limit: QUERY_LIMIT,
10568
10568
  });
10569
- const featuredMentorsAfterSeed = ((_l = featuredMentorsAfterSeedResult.data) === null || _l === void 0 ? void 0 : _l.results) || [];
10569
+ const featuredMentorsAfterSeed = ((_m = featuredMentorsAfterSeedResult.data) === null || _m === void 0 ? void 0 : _m.results) || [];
10570
10570
  console.log("featured mentors after seeding", {
10571
10571
  count: featuredMentorsAfterSeed.length,
10572
10572
  mentorIds: featuredMentorsAfterSeed.map((m) => m === null || m === void 0 ? void 0 : m.unique_id),
10573
10573
  });
10574
10574
  if (featuredMentorsAfterSeed.length > 0) {
10575
10575
  console.log("found seeded mentor", {
10576
- mentorId: (_m = featuredMentorsAfterSeed[0]) === null || _m === void 0 ? void 0 : _m.unique_id,
10577
- mentorName: (_o = featuredMentorsAfterSeed[0]) === null || _o === void 0 ? void 0 : _o.name,
10576
+ mentorId: (_o = featuredMentorsAfterSeed[0]) === null || _o === void 0 ? void 0 : _o.unique_id,
10577
+ mentorName: (_p = featuredMentorsAfterSeed[0]) === null || _p === void 0 ? void 0 : _p.name,
10578
10578
  });
10579
10579
  return featuredMentorsAfterSeed[0];
10580
10580
  }
@@ -14479,6 +14479,7 @@ function useAdvancedChat({ tenantKey, mentorId, username = ANONYMOUS_USERNAME, t
14479
14479
  // `addUserMessage`) between the two `getChats` resolutions.
14480
14480
  const startNewChatInFlightRef = React__default.useRef(false);
14481
14481
  const startNewChat = React__default.useCallback(async () => {
14482
+ var _a, _b, _c;
14482
14483
  // Reset all chat state
14483
14484
  if (!showingSharedChat) {
14484
14485
  dispatch(chatActions.resetChats(undefined));
@@ -14511,6 +14512,10 @@ function useAdvancedChat({ tenantKey, mentorId, username = ANONYMOUS_USERNAME, t
14511
14512
  requestBody,
14512
14513
  }).unwrap();
14513
14514
  dispatch(chatActions.updateSessionIds(response.session_id));
14515
+ // The backend is the source of truth for which tools/artifacts are
14516
+ // enabled by default; seed the UI toggles from the create-session response.
14517
+ dispatch(chatActions.setTools((_b = (_a = response.tools) === null || _a === void 0 ? void 0 : _a.map((t) => t.slug).filter(Boolean)) !== null && _b !== void 0 ? _b : []));
14518
+ dispatch(chatActions.setArtifactsEnabled((_c = response.enable_artifacts) !== null && _c !== void 0 ? _c : false));
14514
14519
  onStartNewChat === null || onStartNewChat === void 0 ? void 0 : onStartNewChat(response.session_id);
14515
14520
  }
14516
14521
  catch (error) {
@@ -14630,7 +14635,7 @@ function useAdvancedChat({ tenantKey, mentorId, username = ANONYMOUS_USERNAME, t
14630
14635
  sendMessage,
14631
14636
  ]);
14632
14637
  async function changeTab(tab) {
14633
- var _a, _b, _c, _d;
14638
+ var _a, _b, _c, _d, _e, _f, _g;
14634
14639
  // while responding to a message, do not change the tab
14635
14640
  if (streaming) {
14636
14641
  errorHandler === null || errorHandler === void 0 ? void 0 : errorHandler("Cannot change tab while streaming");
@@ -14659,14 +14664,18 @@ function useAdvancedChat({ tenantKey, mentorId, username = ANONYMOUS_USERNAME, t
14659
14664
  requestBody,
14660
14665
  }).unwrap();
14661
14666
  dispatch(chatActions.updateSessionIds(response.session_id));
14667
+ // The backend is the source of truth for which tools/artifacts are
14668
+ // enabled by default; seed the UI toggles from the create-session response.
14669
+ dispatch(chatActions.setTools((_b = (_a = response.tools) === null || _a === void 0 ? void 0 : _a.map((t) => t.slug).filter(Boolean)) !== null && _b !== void 0 ? _b : []));
14670
+ dispatch(chatActions.setArtifactsEnabled((_c = response.enable_artifacts) !== null && _c !== void 0 ? _c : false));
14662
14671
  // if the tab we are going to activate has no session Id (this is the first time we are creating the session for this tag)
14663
14672
  // we need to send a proactive prompt if the advanced tabs properties has no tag.
14664
14673
  // (presence of tag indicates an ACTIONABLE UI)
14665
- if (!((_a = advancedTabsProperties[tab]) === null || _a === void 0 ? void 0 : _a.tag)) {
14666
- for (const prompt of (_c = (_b = advancedTabsProperties[tab]) === null || _b === void 0 ? void 0 : _b.prompts) !== null && _c !== void 0 ? _c : []) {
14674
+ if (!((_d = advancedTabsProperties[tab]) === null || _d === void 0 ? void 0 : _d.tag)) {
14675
+ for (const prompt of (_f = (_e = advancedTabsProperties[tab]) === null || _e === void 0 ? void 0 : _e.prompts) !== null && _f !== void 0 ? _f : []) {
14667
14676
  // @ts-expect-error - Type mismatch
14668
14677
  if (prompt.type === "human" && (prompt === null || prompt === void 0 ? void 0 : prompt.proactive)) {
14669
- sendMessage(tab, (_d = prompt.content) !== null && _d !== void 0 ? _d : "", { visible: false });
14678
+ sendMessage(tab, (_g = prompt.content) !== null && _g !== void 0 ? _g : "", { visible: false });
14670
14679
  }
14671
14680
  }
14672
14681
  }
@@ -15816,6 +15825,9 @@ function requireDynamicRenderingUtils () {
15816
15825
  isHangingPromiseRejectionError: function() {
15817
15826
  return isHangingPromiseRejectionError;
15818
15827
  },
15828
+ makeDevtoolsIOAwarePromise: function() {
15829
+ return makeDevtoolsIOAwarePromise;
15830
+ },
15819
15831
  makeHangingPromise: function() {
15820
15832
  return makeHangingPromise;
15821
15833
  }
@@ -15828,17 +15840,17 @@ function requireDynamicRenderingUtils () {
15828
15840
  }
15829
15841
  const HANGING_PROMISE_REJECTION = 'HANGING_PROMISE_REJECTION';
15830
15842
  class HangingPromiseRejectionError extends Error {
15831
- constructor(expression){
15832
- super(`During prerendering, ${expression} rejects when the prerender is complete. Typically these errors are handled by React but if you move ${expression} to a different context by using \`setTimeout\`, \`after\`, or similar functions you may observe this error and you should handle it in that context.`), this.expression = expression, this.digest = HANGING_PROMISE_REJECTION;
15843
+ constructor(route, expression){
15844
+ super(`During prerendering, ${expression} rejects when the prerender is complete. Typically these errors are handled by React but if you move ${expression} to a different context by using \`setTimeout\`, \`after\`, or similar functions you may observe this error and you should handle it in that context. This occurred at route "${route}".`), this.route = route, this.expression = expression, this.digest = HANGING_PROMISE_REJECTION;
15833
15845
  }
15834
15846
  }
15835
15847
  const abortListenersBySignal = new WeakMap();
15836
- function makeHangingPromise(signal, expression) {
15848
+ function makeHangingPromise(signal, route, expression) {
15837
15849
  if (signal.aborted) {
15838
- return Promise.reject(new HangingPromiseRejectionError(expression));
15850
+ return Promise.reject(new HangingPromiseRejectionError(route, expression));
15839
15851
  } else {
15840
15852
  const hangingPromise = new Promise((_, reject)=>{
15841
- const boundRejection = reject.bind(null, new HangingPromiseRejectionError(expression));
15853
+ const boundRejection = reject.bind(null, new HangingPromiseRejectionError(route, expression));
15842
15854
  let currentListeners = abortListenersBySignal.get(signal);
15843
15855
  if (currentListeners) {
15844
15856
  currentListeners.push(boundRejection);
@@ -15864,6 +15876,16 @@ function requireDynamicRenderingUtils () {
15864
15876
  }
15865
15877
  }
15866
15878
  function ignoreReject() {}
15879
+ function makeDevtoolsIOAwarePromise(underlying) {
15880
+ // in React DevTools if we resolve in a setTimeout we will observe
15881
+ // the promise resolution as something that can suspend a boundary or root.
15882
+ return new Promise((resolve)=>{
15883
+ // Must use setTimeout to be considered IO React DevTools. setImmediate will not work.
15884
+ setTimeout(()=>{
15885
+ resolve(underlying);
15886
+ }, 0);
15887
+ });
15888
+ }
15867
15889
 
15868
15890
 
15869
15891
  } (dynamicRenderingUtils));
@@ -16125,6 +16147,9 @@ function requireAppRouterHeaders () {
16125
16147
  FLIGHT_HEADERS: function() {
16126
16148
  return FLIGHT_HEADERS;
16127
16149
  },
16150
+ NEXT_ACTION_NOT_FOUND_HEADER: function() {
16151
+ return NEXT_ACTION_NOT_FOUND_HEADER;
16152
+ },
16128
16153
  NEXT_DID_POSTPONE_HEADER: function() {
16129
16154
  return NEXT_DID_POSTPONE_HEADER;
16130
16155
  },
@@ -16168,14 +16193,14 @@ function requireAppRouterHeaders () {
16168
16193
  return RSC_HEADER;
16169
16194
  }
16170
16195
  });
16171
- const RSC_HEADER = 'RSC';
16172
- const ACTION_HEADER = 'Next-Action';
16173
- const NEXT_ROUTER_STATE_TREE_HEADER = 'Next-Router-State-Tree';
16174
- const NEXT_ROUTER_PREFETCH_HEADER = 'Next-Router-Prefetch';
16175
- const NEXT_ROUTER_SEGMENT_PREFETCH_HEADER = 'Next-Router-Segment-Prefetch';
16176
- const NEXT_HMR_REFRESH_HEADER = 'Next-HMR-Refresh';
16196
+ const RSC_HEADER = 'rsc';
16197
+ const ACTION_HEADER = 'next-action';
16198
+ const NEXT_ROUTER_STATE_TREE_HEADER = 'next-router-state-tree';
16199
+ const NEXT_ROUTER_PREFETCH_HEADER = 'next-router-prefetch';
16200
+ const NEXT_ROUTER_SEGMENT_PREFETCH_HEADER = 'next-router-segment-prefetch';
16201
+ const NEXT_HMR_REFRESH_HEADER = 'next-hmr-refresh';
16177
16202
  const NEXT_HMR_REFRESH_HASH_COOKIE = '__next_hmr_refresh_hash__';
16178
- const NEXT_URL = 'Next-Url';
16203
+ const NEXT_URL = 'next-url';
16179
16204
  const RSC_CONTENT_TYPE_HEADER = 'text/x-component';
16180
16205
  const FLIGHT_HEADERS = [
16181
16206
  RSC_HEADER,
@@ -16190,6 +16215,7 @@ function requireAppRouterHeaders () {
16190
16215
  const NEXT_REWRITTEN_PATH_HEADER = 'x-nextjs-rewritten-path';
16191
16216
  const NEXT_REWRITTEN_QUERY_HEADER = 'x-nextjs-rewritten-query';
16192
16217
  const NEXT_IS_PRERENDER_HEADER = 'x-nextjs-prerender';
16218
+ const NEXT_ACTION_NOT_FOUND_HEADER = 'x-nextjs-action-not-found';
16193
16219
 
16194
16220
  if ((typeof exports$1.default === 'function' || (typeof exports$1.default === 'object' && exports$1.default !== null)) && typeof exports$1.default.__esModule === 'undefined') {
16195
16221
  Object.defineProperty(exports$1.default, '__esModule', { value: true });
@@ -16202,6 +16228,35 @@ function requireAppRouterHeaders () {
16202
16228
  return appRouterHeaders.exports;
16203
16229
  }
16204
16230
 
16231
+ var invariantError = {};
16232
+
16233
+ var hasRequiredInvariantError;
16234
+
16235
+ function requireInvariantError () {
16236
+ if (hasRequiredInvariantError) return invariantError;
16237
+ hasRequiredInvariantError = 1;
16238
+ (function (exports$1) {
16239
+ Object.defineProperty(exports$1, "__esModule", {
16240
+ value: true
16241
+ });
16242
+ Object.defineProperty(exports$1, "InvariantError", {
16243
+ enumerable: true,
16244
+ get: function() {
16245
+ return InvariantError;
16246
+ }
16247
+ });
16248
+ class InvariantError extends Error {
16249
+ constructor(message, options){
16250
+ super("Invariant: " + (message.endsWith('.') ? message : message + '.') + " This is a bug in Next.js.", options);
16251
+ this.name = 'InvariantError';
16252
+ }
16253
+ }
16254
+
16255
+
16256
+ } (invariantError));
16257
+ return invariantError;
16258
+ }
16259
+
16205
16260
  var hasRequiredWorkUnitAsyncStorage_external;
16206
16261
 
16207
16262
  function requireWorkUnitAsyncStorage_external () {
@@ -16218,12 +16273,12 @@ function requireWorkUnitAsyncStorage_external () {
16218
16273
  });
16219
16274
  }
16220
16275
  _export(exports$1, {
16276
+ getCacheSignal: function() {
16277
+ return getCacheSignal;
16278
+ },
16221
16279
  getDraftModeProviderForCacheScope: function() {
16222
16280
  return getDraftModeProviderForCacheScope;
16223
16281
  },
16224
- getExpectedRequestStore: function() {
16225
- return getExpectedRequestStore;
16226
- },
16227
16282
  getHmrRefreshHash: function() {
16228
16283
  return getHmrRefreshHash;
16229
16284
  },
@@ -16233,49 +16288,28 @@ function requireWorkUnitAsyncStorage_external () {
16233
16288
  getRenderResumeDataCache: function() {
16234
16289
  return getRenderResumeDataCache;
16235
16290
  },
16291
+ getRuntimeStagePromise: function() {
16292
+ return getRuntimeStagePromise;
16293
+ },
16294
+ getServerComponentsHmrCache: function() {
16295
+ return getServerComponentsHmrCache;
16296
+ },
16297
+ isHmrRefresh: function() {
16298
+ return isHmrRefresh;
16299
+ },
16236
16300
  throwForMissingRequestStore: function() {
16237
16301
  return throwForMissingRequestStore;
16238
16302
  },
16303
+ throwInvariantForMissingStore: function() {
16304
+ return throwInvariantForMissingStore;
16305
+ },
16239
16306
  workUnitAsyncStorage: function() {
16240
16307
  return _workunitasyncstorageinstance.workUnitAsyncStorageInstance;
16241
16308
  }
16242
16309
  });
16243
16310
  const _workunitasyncstorageinstance = requireWorkUnitAsyncStorageInstance();
16244
16311
  const _approuterheaders = requireAppRouterHeaders();
16245
- function getExpectedRequestStore(callingExpression) {
16246
- const workUnitStore = _workunitasyncstorageinstance.workUnitAsyncStorageInstance.getStore();
16247
- if (!workUnitStore) {
16248
- throwForMissingRequestStore(callingExpression);
16249
- }
16250
- switch(workUnitStore.type){
16251
- case 'request':
16252
- return workUnitStore;
16253
- case 'prerender':
16254
- case 'prerender-ppr':
16255
- case 'prerender-legacy':
16256
- // This should not happen because we should have checked it already.
16257
- throw Object.defineProperty(new Error(`\`${callingExpression}\` cannot be called inside a prerender. This is a bug in Next.js.`), "__NEXT_ERROR_CODE", {
16258
- value: "E401",
16259
- enumerable: false,
16260
- configurable: true
16261
- });
16262
- case 'cache':
16263
- throw Object.defineProperty(new Error(`\`${callingExpression}\` cannot be called inside "use cache". Call it outside and pass an argument instead. Read more: https://nextjs.org/docs/messages/next-request-in-use-cache`), "__NEXT_ERROR_CODE", {
16264
- value: "E37",
16265
- enumerable: false,
16266
- configurable: true
16267
- });
16268
- case 'unstable-cache':
16269
- throw Object.defineProperty(new Error(`\`${callingExpression}\` cannot be called inside unstable_cache. Call it outside and pass an argument instead. Read more: https://nextjs.org/docs/app/api-reference/functions/unstable_cache`), "__NEXT_ERROR_CODE", {
16270
- value: "E69",
16271
- enumerable: false,
16272
- configurable: true
16273
- });
16274
- default:
16275
- const _exhaustiveCheck = workUnitStore;
16276
- return _exhaustiveCheck;
16277
- }
16278
- }
16312
+ const _invarianterror = requireInvariantError();
16279
16313
  function throwForMissingRequestStore(callingExpression) {
16280
16314
  throw Object.defineProperty(new Error(`\`${callingExpression}\` was called outside a request scope. Read more: https://nextjs.org/docs/messages/next-dynamic-api-wrong-context`), "__NEXT_ERROR_CODE", {
16281
16315
  value: "E251",
@@ -16283,43 +16317,143 @@ function requireWorkUnitAsyncStorage_external () {
16283
16317
  configurable: true
16284
16318
  });
16285
16319
  }
16320
+ function throwInvariantForMissingStore() {
16321
+ throw Object.defineProperty(new _invarianterror.InvariantError('Expected workUnitAsyncStorage to have a store.'), "__NEXT_ERROR_CODE", {
16322
+ value: "E696",
16323
+ enumerable: false,
16324
+ configurable: true
16325
+ });
16326
+ }
16286
16327
  function getPrerenderResumeDataCache(workUnitStore) {
16287
- if (workUnitStore.type === 'prerender' || workUnitStore.type === 'prerender-ppr') {
16288
- return workUnitStore.prerenderResumeDataCache;
16328
+ switch(workUnitStore.type){
16329
+ case 'prerender':
16330
+ case 'prerender-runtime':
16331
+ case 'prerender-ppr':
16332
+ return workUnitStore.prerenderResumeDataCache;
16333
+ case 'prerender-client':
16334
+ // TODO eliminate fetch caching in client scope and stop exposing this data
16335
+ // cache during SSR.
16336
+ return workUnitStore.prerenderResumeDataCache;
16337
+ case 'prerender-legacy':
16338
+ case 'request':
16339
+ case 'cache':
16340
+ case 'private-cache':
16341
+ case 'unstable-cache':
16342
+ return null;
16343
+ default:
16344
+ return workUnitStore;
16289
16345
  }
16290
- return null;
16291
16346
  }
16292
16347
  function getRenderResumeDataCache(workUnitStore) {
16293
- if (workUnitStore.type !== 'prerender-legacy' && workUnitStore.type !== 'cache' && workUnitStore.type !== 'unstable-cache') {
16294
- if (workUnitStore.type === 'request') {
16348
+ switch(workUnitStore.type){
16349
+ case 'request':
16295
16350
  return workUnitStore.renderResumeDataCache;
16296
- }
16297
- // We return the mutable resume data cache here as an immutable version of
16298
- // the cache as it can also be used for reading.
16299
- return workUnitStore.prerenderResumeDataCache;
16351
+ case 'prerender':
16352
+ case 'prerender-runtime':
16353
+ case 'prerender-client':
16354
+ if (workUnitStore.renderResumeDataCache) {
16355
+ // If we are in a prerender, we might have a render resume data cache
16356
+ // that is used to read from prefilled caches.
16357
+ return workUnitStore.renderResumeDataCache;
16358
+ }
16359
+ // fallthrough
16360
+ case 'prerender-ppr':
16361
+ // Otherwise we return the mutable resume data cache here as an immutable
16362
+ // version of the cache as it can also be used for reading.
16363
+ return workUnitStore.prerenderResumeDataCache;
16364
+ case 'cache':
16365
+ case 'private-cache':
16366
+ case 'unstable-cache':
16367
+ case 'prerender-legacy':
16368
+ return null;
16369
+ default:
16370
+ return workUnitStore;
16300
16371
  }
16301
- return null;
16302
16372
  }
16303
16373
  function getHmrRefreshHash(workStore, workUnitStore) {
16304
- var _workUnitStore_cookies_get;
16305
- if (!workStore.dev) {
16306
- return undefined;
16374
+ if (workStore.dev) {
16375
+ switch(workUnitStore.type){
16376
+ case 'cache':
16377
+ case 'private-cache':
16378
+ case 'prerender':
16379
+ case 'prerender-runtime':
16380
+ return workUnitStore.hmrRefreshHash;
16381
+ case 'request':
16382
+ var _workUnitStore_cookies_get;
16383
+ return (_workUnitStore_cookies_get = workUnitStore.cookies.get(_approuterheaders.NEXT_HMR_REFRESH_HASH_COOKIE)) == null ? void 0 : _workUnitStore_cookies_get.value;
16384
+ }
16307
16385
  }
16308
- return workUnitStore.type === 'cache' || workUnitStore.type === 'prerender' ? workUnitStore.hmrRefreshHash : workUnitStore.type === 'request' ? (_workUnitStore_cookies_get = workUnitStore.cookies.get(_approuterheaders.NEXT_HMR_REFRESH_HASH_COOKIE)) == null ? void 0 : _workUnitStore_cookies_get.value : undefined;
16386
+ return undefined;
16387
+ }
16388
+ function isHmrRefresh(workStore, workUnitStore) {
16389
+ if (workStore.dev) {
16390
+ switch(workUnitStore.type){
16391
+ case 'cache':
16392
+ case 'private-cache':
16393
+ case 'request':
16394
+ return workUnitStore.isHmrRefresh ?? false;
16395
+ }
16396
+ }
16397
+ return false;
16398
+ }
16399
+ function getServerComponentsHmrCache(workStore, workUnitStore) {
16400
+ if (workStore.dev) {
16401
+ switch(workUnitStore.type){
16402
+ case 'cache':
16403
+ case 'private-cache':
16404
+ case 'request':
16405
+ return workUnitStore.serverComponentsHmrCache;
16406
+ }
16407
+ }
16408
+ return undefined;
16309
16409
  }
16310
16410
  function getDraftModeProviderForCacheScope(workStore, workUnitStore) {
16311
16411
  if (workStore.isDraftMode) {
16312
16412
  switch(workUnitStore.type){
16313
16413
  case 'cache':
16414
+ case 'private-cache':
16314
16415
  case 'unstable-cache':
16416
+ case 'prerender-runtime':
16315
16417
  case 'request':
16316
16418
  return workUnitStore.draftMode;
16317
- default:
16318
- return undefined;
16319
16419
  }
16320
16420
  }
16321
16421
  return undefined;
16322
16422
  }
16423
+ function getCacheSignal(workUnitStore) {
16424
+ switch(workUnitStore.type){
16425
+ case 'prerender':
16426
+ case 'prerender-client':
16427
+ case 'prerender-runtime':
16428
+ return workUnitStore.cacheSignal;
16429
+ case 'prerender-ppr':
16430
+ case 'prerender-legacy':
16431
+ case 'request':
16432
+ case 'cache':
16433
+ case 'private-cache':
16434
+ case 'unstable-cache':
16435
+ return null;
16436
+ default:
16437
+ return workUnitStore;
16438
+ }
16439
+ }
16440
+ function getRuntimeStagePromise(workUnitStore) {
16441
+ switch(workUnitStore.type){
16442
+ case 'prerender-runtime':
16443
+ case 'private-cache':
16444
+ return workUnitStore.runtimeStagePromise;
16445
+ case 'prerender':
16446
+ case 'prerender-client':
16447
+ case 'prerender-ppr':
16448
+ case 'prerender-legacy':
16449
+ case 'request':
16450
+ case 'cache':
16451
+ case 'unstable-cache':
16452
+ return null;
16453
+ default:
16454
+ return workUnitStore;
16455
+ }
16456
+ }
16323
16457
 
16324
16458
 
16325
16459
  } (workUnitAsyncStorage_external));
@@ -16375,13 +16509,13 @@ function requireWorkAsyncStorage_external () {
16375
16509
  return workAsyncStorage_external;
16376
16510
  }
16377
16511
 
16378
- var metadataConstants = {};
16512
+ var boundaryConstants = {};
16379
16513
 
16380
- var hasRequiredMetadataConstants;
16514
+ var hasRequiredBoundaryConstants;
16381
16515
 
16382
- function requireMetadataConstants () {
16383
- if (hasRequiredMetadataConstants) return metadataConstants;
16384
- hasRequiredMetadataConstants = 1;
16516
+ function requireBoundaryConstants () {
16517
+ if (hasRequiredBoundaryConstants) return boundaryConstants;
16518
+ hasRequiredBoundaryConstants = 1;
16385
16519
  (function (exports$1) {
16386
16520
  Object.defineProperty(exports$1, "__esModule", {
16387
16521
  value: true
@@ -16399,6 +16533,9 @@ function requireMetadataConstants () {
16399
16533
  OUTLET_BOUNDARY_NAME: function() {
16400
16534
  return OUTLET_BOUNDARY_NAME;
16401
16535
  },
16536
+ ROOT_LAYOUT_BOUNDARY_NAME: function() {
16537
+ return ROOT_LAYOUT_BOUNDARY_NAME;
16538
+ },
16402
16539
  VIEWPORT_BOUNDARY_NAME: function() {
16403
16540
  return VIEWPORT_BOUNDARY_NAME;
16404
16541
  }
@@ -16406,10 +16543,11 @@ function requireMetadataConstants () {
16406
16543
  const METADATA_BOUNDARY_NAME = '__next_metadata_boundary__';
16407
16544
  const VIEWPORT_BOUNDARY_NAME = '__next_viewport_boundary__';
16408
16545
  const OUTLET_BOUNDARY_NAME = '__next_outlet_boundary__';
16546
+ const ROOT_LAYOUT_BOUNDARY_NAME = '__next_root_layout_boundary__';
16409
16547
 
16410
16548
 
16411
- } (metadataConstants));
16412
- return metadataConstants;
16549
+ } (boundaryConstants));
16550
+ return boundaryConstants;
16413
16551
  }
16414
16552
 
16415
16553
  var scheduler = {};
@@ -16522,6 +16660,9 @@ function requireDynamicRendering () {
16522
16660
  Postpone: function() {
16523
16661
  return Postpone;
16524
16662
  },
16663
+ PreludeState: function() {
16664
+ return PreludeState;
16665
+ },
16525
16666
  abortAndThrowOnSynchronousRequestDataAccess: function() {
16526
16667
  return abortAndThrowOnSynchronousRequestDataAccess;
16527
16668
  },
@@ -16546,8 +16687,11 @@ function requireDynamicRendering () {
16546
16687
  createHangingInputAbortSignal: function() {
16547
16688
  return createHangingInputAbortSignal;
16548
16689
  },
16549
- createPostponedAbortSignal: function() {
16550
- return createPostponedAbortSignal;
16690
+ createRenderInBrowserAbortSignal: function() {
16691
+ return createRenderInBrowserAbortSignal;
16692
+ },
16693
+ delayUntilRuntimeStage: function() {
16694
+ return delayUntilRuntimeStage;
16551
16695
  },
16552
16696
  formatDynamicAPIAccesses: function() {
16553
16697
  return formatDynamicAPIAccesses;
@@ -16561,6 +16705,9 @@ function requireDynamicRendering () {
16561
16705
  isPrerenderInterruptedError: function() {
16562
16706
  return isPrerenderInterruptedError;
16563
16707
  },
16708
+ logDisallowedDynamicError: function() {
16709
+ return logDisallowedDynamicError;
16710
+ },
16564
16711
  markCurrentScopeAsDynamic: function() {
16565
16712
  return markCurrentScopeAsDynamic;
16566
16713
  },
@@ -16579,9 +16726,6 @@ function requireDynamicRendering () {
16579
16726
  trackDynamicDataInDynamicRender: function() {
16580
16727
  return trackDynamicDataInDynamicRender;
16581
16728
  },
16582
- trackFallbackParamAccessed: function() {
16583
- return trackFallbackParamAccessed;
16584
- },
16585
16729
  trackSynchronousPlatformIOAccessInDev: function() {
16586
16730
  return trackSynchronousPlatformIOAccessInDev;
16587
16731
  },
@@ -16590,6 +16734,9 @@ function requireDynamicRendering () {
16590
16734
  },
16591
16735
  useDynamicRouteParams: function() {
16592
16736
  return useDynamicRouteParams;
16737
+ },
16738
+ warnOnSyncDynamicError: function() {
16739
+ return warnOnSyncDynamicError;
16593
16740
  }
16594
16741
  });
16595
16742
  const _react = /*#__PURE__*/ _interop_require_default(React__default);
@@ -16598,8 +16745,10 @@ function requireDynamicRendering () {
16598
16745
  const _workunitasyncstorageexternal = requireWorkUnitAsyncStorage_external();
16599
16746
  const _workasyncstorageexternal = requireWorkAsyncStorage_external();
16600
16747
  const _dynamicrenderingutils = requireDynamicRenderingUtils();
16601
- const _metadataconstants = requireMetadataConstants();
16748
+ const _boundaryconstants = requireBoundaryConstants();
16602
16749
  const _scheduler = requireScheduler();
16750
+ const _bailouttocsr = requireBailoutToCsr();
16751
+ const _invarianterror = requireInvariantError();
16603
16752
  function _interop_require_default(obj) {
16604
16753
  return obj && obj.__esModule ? obj : {
16605
16754
  default: obj
@@ -16610,16 +16759,15 @@ function requireDynamicRendering () {
16610
16759
  return {
16611
16760
  isDebugDynamicAccesses,
16612
16761
  dynamicAccesses: [],
16613
- syncDynamicExpression: undefined,
16614
16762
  syncDynamicErrorWithStack: null
16615
16763
  };
16616
16764
  }
16617
16765
  function createDynamicValidationState() {
16618
16766
  return {
16619
- hasSuspendedDynamic: false,
16767
+ hasSuspenseAboveBody: false,
16620
16768
  hasDynamicMetadata: false,
16621
16769
  hasDynamicViewport: false,
16622
- hasSyncDynamicErrors: false,
16770
+ hasAllowedDynamic: false,
16623
16771
  dynamicErrors: []
16624
16772
  };
16625
16773
  }
@@ -16629,11 +16777,17 @@ function requireDynamicRendering () {
16629
16777
  }
16630
16778
  function markCurrentScopeAsDynamic(store, workUnitStore, expression) {
16631
16779
  if (workUnitStore) {
16632
- if (workUnitStore.type === 'cache' || workUnitStore.type === 'unstable-cache') {
16633
- // inside cache scopes marking a scope as dynamic has no effect because the outer cache scope
16634
- // creates a cache boundary. This is subtly different from reading a dynamic data source which is
16635
- // forbidden inside a cache scope.
16636
- return;
16780
+ switch(workUnitStore.type){
16781
+ case 'cache':
16782
+ case 'unstable-cache':
16783
+ // Inside cache scopes, marking a scope as dynamic has no effect,
16784
+ // because the outer cache scope creates a cache boundary. This is
16785
+ // subtly different from reading a dynamic data source, which is
16786
+ // forbidden inside a cache scope.
16787
+ return;
16788
+ case 'private-cache':
16789
+ // A private cache scope is already dynamic by definition.
16790
+ return;
16637
16791
  }
16638
16792
  }
16639
16793
  // If we're forcing dynamic rendering or we're forcing static rendering, we
@@ -16648,29 +16802,29 @@ function requireDynamicRendering () {
16648
16802
  });
16649
16803
  }
16650
16804
  if (workUnitStore) {
16651
- if (workUnitStore.type === 'prerender-ppr') {
16652
- postponeWithTracking(store.route, expression, workUnitStore.dynamicTracking);
16653
- } else if (workUnitStore.type === 'prerender-legacy') {
16654
- workUnitStore.revalidate = 0;
16655
- // We aren't prerendering but we are generating a static page. We need to bail out of static generation
16656
- const err = Object.defineProperty(new _hooksservercontext.DynamicServerError(`Route ${store.route} couldn't be rendered statically because it used ${expression}. See more info here: https://nextjs.org/docs/messages/dynamic-server-error`), "__NEXT_ERROR_CODE", {
16657
- value: "E550",
16658
- enumerable: false,
16659
- configurable: true
16660
- });
16661
- store.dynamicUsageDescription = expression;
16662
- store.dynamicUsageStack = err.stack;
16663
- throw err;
16664
- } else if (process.env.NODE_ENV === 'development' && workUnitStore && workUnitStore.type === 'request') {
16665
- workUnitStore.usedDynamic = true;
16805
+ switch(workUnitStore.type){
16806
+ case 'prerender-ppr':
16807
+ return postponeWithTracking(store.route, expression, workUnitStore.dynamicTracking);
16808
+ case 'prerender-legacy':
16809
+ workUnitStore.revalidate = 0;
16810
+ // We aren't prerendering, but we are generating a static page. We need
16811
+ // to bail out of static generation.
16812
+ const err = Object.defineProperty(new _hooksservercontext.DynamicServerError(`Route ${store.route} couldn't be rendered statically because it used ${expression}. See more info here: https://nextjs.org/docs/messages/dynamic-server-error`), "__NEXT_ERROR_CODE", {
16813
+ value: "E550",
16814
+ enumerable: false,
16815
+ configurable: true
16816
+ });
16817
+ store.dynamicUsageDescription = expression;
16818
+ store.dynamicUsageStack = err.stack;
16819
+ throw err;
16820
+ case 'request':
16821
+ if (process.env.NODE_ENV !== 'production') {
16822
+ workUnitStore.usedDynamic = true;
16823
+ }
16824
+ break;
16666
16825
  }
16667
16826
  }
16668
16827
  }
16669
- function trackFallbackParamAccessed(store, expression) {
16670
- const prerenderStore = _workunitasyncstorageexternal.workUnitAsyncStorage.getStore();
16671
- if (!prerenderStore || prerenderStore.type !== 'prerender-ppr') return;
16672
- postponeWithTracking(store.route, expression, prerenderStore.dynamicTracking);
16673
- }
16674
16828
  function throwToInterruptStaticGeneration(expression, store, prerenderStore) {
16675
16829
  // We aren't prerendering but we are generating a static page. We need to bail out of static generation
16676
16830
  const err = Object.defineProperty(new _hooksservercontext.DynamicServerError(`Route ${store.route} couldn't be rendered statically because it used \`${expression}\`. See more info here: https://nextjs.org/docs/messages/dynamic-server-error`), "__NEXT_ERROR_CODE", {
@@ -16683,25 +16837,31 @@ function requireDynamicRendering () {
16683
16837
  store.dynamicUsageStack = err.stack;
16684
16838
  throw err;
16685
16839
  }
16686
- function trackDynamicDataInDynamicRender(_store, workUnitStore) {
16687
- if (workUnitStore) {
16688
- if (workUnitStore.type === 'cache' || workUnitStore.type === 'unstable-cache') {
16689
- // inside cache scopes marking a scope as dynamic has no effect because the outer cache scope
16690
- // creates a cache boundary. This is subtly different from reading a dynamic data source which is
16840
+ function trackDynamicDataInDynamicRender(workUnitStore) {
16841
+ switch(workUnitStore.type){
16842
+ case 'cache':
16843
+ case 'unstable-cache':
16844
+ // Inside cache scopes, marking a scope as dynamic has no effect,
16845
+ // because the outer cache scope creates a cache boundary. This is
16846
+ // subtly different from reading a dynamic data source, which is
16691
16847
  // forbidden inside a cache scope.
16692
16848
  return;
16693
- }
16694
- if (workUnitStore.type === 'prerender' || workUnitStore.type === 'prerender-legacy') {
16695
- workUnitStore.revalidate = 0;
16696
- }
16697
- if (process.env.NODE_ENV === 'development' && workUnitStore.type === 'request') {
16698
- workUnitStore.usedDynamic = true;
16699
- }
16849
+ case 'private-cache':
16850
+ // A private cache scope is already dynamic by definition.
16851
+ return;
16852
+ case 'prerender':
16853
+ case 'prerender-runtime':
16854
+ case 'prerender-legacy':
16855
+ case 'prerender-ppr':
16856
+ case 'prerender-client':
16857
+ break;
16858
+ case 'request':
16859
+ if (process.env.NODE_ENV !== 'production') {
16860
+ workUnitStore.usedDynamic = true;
16861
+ }
16862
+ break;
16700
16863
  }
16701
16864
  }
16702
- // Despite it's name we don't actually abort unless we have a controller to call abort on
16703
- // There are times when we let a prerender run long to discover caches where we want the semantics
16704
- // of tracking dynamic access without terminating the prerender early
16705
16865
  function abortOnSynchronousDynamicDataAccess(route, expression, prerenderStore) {
16706
16866
  const reason = `Route ${route} needs to bail out of prerendering at this point because it used ${expression}.`;
16707
16867
  const error = createPrerenderInterruptedError(reason);
@@ -16718,13 +16878,16 @@ function requireDynamicRendering () {
16718
16878
  }
16719
16879
  function abortOnSynchronousPlatformIOAccess(route, expression, errorWithStack, prerenderStore) {
16720
16880
  const dynamicTracking = prerenderStore.dynamicTracking;
16881
+ abortOnSynchronousDynamicDataAccess(route, expression, prerenderStore);
16882
+ // It is important that we set this tracking value after aborting. Aborts are executed
16883
+ // synchronously except for the case where you abort during render itself. By setting this
16884
+ // value late we can use it to determine if any of the aborted tasks are the task that
16885
+ // called the sync IO expression in the first place.
16721
16886
  if (dynamicTracking) {
16722
16887
  if (dynamicTracking.syncDynamicErrorWithStack === null) {
16723
- dynamicTracking.syncDynamicExpression = expression;
16724
16888
  dynamicTracking.syncDynamicErrorWithStack = errorWithStack;
16725
16889
  }
16726
16890
  }
16727
- abortOnSynchronousDynamicDataAccess(route, expression, prerenderStore);
16728
16891
  }
16729
16892
  function trackSynchronousPlatformIOAccessInDev(requestStore) {
16730
16893
  // We don't actually have a controller to abort but we do the semantic equivalent by
@@ -16739,22 +16902,27 @@ function requireDynamicRendering () {
16739
16902
  // since we need the throw semantics regardless of whether we abort it is easier to land
16740
16903
  // this way. See how this was handled with `abortOnSynchronousPlatformIOAccess` for a closer
16741
16904
  // to ideal implementation
16905
+ abortOnSynchronousDynamicDataAccess(route, expression, prerenderStore);
16906
+ // It is important that we set this tracking value after aborting. Aborts are executed
16907
+ // synchronously except for the case where you abort during render itself. By setting this
16908
+ // value late we can use it to determine if any of the aborted tasks are the task that
16909
+ // called the sync IO expression in the first place.
16742
16910
  const dynamicTracking = prerenderStore.dynamicTracking;
16743
16911
  if (dynamicTracking) {
16744
16912
  if (dynamicTracking.syncDynamicErrorWithStack === null) {
16745
- dynamicTracking.syncDynamicExpression = expression;
16746
16913
  dynamicTracking.syncDynamicErrorWithStack = errorWithStack;
16747
- if (prerenderStore.validating === true) {
16748
- // We always log Request Access in dev at the point of calling the function
16749
- // So we mark the dynamic validation as not requiring it to be printed
16750
- dynamicTracking.syncDynamicLogged = true;
16751
- }
16752
16914
  }
16753
16915
  }
16754
- abortOnSynchronousDynamicDataAccess(route, expression, prerenderStore);
16755
16916
  }
16756
16917
  throw createPrerenderInterruptedError(`Route ${route} needs to bail out of prerendering at this point because it used ${expression}.`);
16757
16918
  }
16919
+ function warnOnSyncDynamicError(dynamicTracking) {
16920
+ if (dynamicTracking.syncDynamicErrorWithStack) {
16921
+ // the server did something sync dynamic, likely
16922
+ // leading to an early termination of the prerender.
16923
+ console.error(dynamicTracking.syncDynamicErrorWithStack);
16924
+ }
16925
+ }
16758
16926
  const trackSynchronousRequestDataAccessInDev = trackSynchronousPlatformIOAccessInDev;
16759
16927
  function Postpone({ reason, route }) {
16760
16928
  const prerenderStore = _workunitasyncstorageexternal.workUnitAsyncStorage.getStore();
@@ -16847,35 +17015,57 @@ function requireDynamicRendering () {
16847
17015
  });
16848
17016
  }
16849
17017
  }
16850
- function createPostponedAbortSignal(reason) {
16851
- assertPostpone();
17018
+ function createRenderInBrowserAbortSignal() {
16852
17019
  const controller = new AbortController();
16853
- // We get our hands on a postpone instance by calling postpone and catching the throw
16854
- try {
16855
- _react.default.unstable_postpone(reason);
16856
- } catch (x) {
16857
- controller.abort(x);
16858
- }
17020
+ controller.abort(Object.defineProperty(new _bailouttocsr.BailoutToCSRError('Render in Browser'), "__NEXT_ERROR_CODE", {
17021
+ value: "E721",
17022
+ enumerable: false,
17023
+ configurable: true
17024
+ }));
16859
17025
  return controller.signal;
16860
17026
  }
16861
17027
  function createHangingInputAbortSignal(workUnitStore) {
16862
- const controller = new AbortController();
16863
- if (workUnitStore.cacheSignal) {
16864
- // If we have a cacheSignal it means we're in a prospective render. If the input
16865
- // we're waiting on is coming from another cache, we do want to wait for it so that
16866
- // we can resolve this cache entry too.
16867
- workUnitStore.cacheSignal.inputReady().then(()=>{
16868
- controller.abort();
16869
- });
16870
- } else {
16871
- // Otherwise we're in the final render and we should already have all our caches
16872
- // filled. We might still be waiting on some microtasks so we wait one tick before
16873
- // giving up. When we give up, we still want to render the content of this cache
16874
- // as deeply as we can so that we can suspend as deeply as possible in the tree
16875
- // or not at all if we don't end up waiting for the input.
16876
- (0, _scheduler.scheduleOnNextTick)(()=>controller.abort());
17028
+ switch(workUnitStore.type){
17029
+ case 'prerender':
17030
+ case 'prerender-runtime':
17031
+ const controller = new AbortController();
17032
+ if (workUnitStore.cacheSignal) {
17033
+ // If we have a cacheSignal it means we're in a prospective render. If
17034
+ // the input we're waiting on is coming from another cache, we do want
17035
+ // to wait for it so that we can resolve this cache entry too.
17036
+ workUnitStore.cacheSignal.inputReady().then(()=>{
17037
+ controller.abort();
17038
+ });
17039
+ } else {
17040
+ // Otherwise we're in the final render and we should already have all
17041
+ // our caches filled.
17042
+ // If the prerender uses stages, we have wait until the runtime stage,
17043
+ // at which point all runtime inputs will be resolved.
17044
+ // (otherwise, a runtime prerender might consider `cookies()` hanging
17045
+ // even though they'd resolve in the next task.)
17046
+ //
17047
+ // We might still be waiting on some microtasks so we
17048
+ // wait one tick before giving up. When we give up, we still want to
17049
+ // render the content of this cache as deeply as we can so that we can
17050
+ // suspend as deeply as possible in the tree or not at all if we don't
17051
+ // end up waiting for the input.
17052
+ const runtimeStagePromise = (0, _workunitasyncstorageexternal.getRuntimeStagePromise)(workUnitStore);
17053
+ if (runtimeStagePromise) {
17054
+ runtimeStagePromise.then(()=>(0, _scheduler.scheduleOnNextTick)(()=>controller.abort()));
17055
+ } else {
17056
+ (0, _scheduler.scheduleOnNextTick)(()=>controller.abort());
17057
+ }
17058
+ }
17059
+ return controller.signal;
17060
+ case 'prerender-client':
17061
+ case 'prerender-ppr':
17062
+ case 'prerender-legacy':
17063
+ case 'request':
17064
+ case 'cache':
17065
+ case 'private-cache':
17066
+ case 'unstable-cache':
17067
+ return undefined;
16877
17068
  }
16878
- return controller.signal;
16879
17069
  }
16880
17070
  function annotateDynamicAccess(expression, prerenderStore) {
16881
17071
  const dynamicTracking = prerenderStore.dynamicTracking;
@@ -16888,31 +17078,65 @@ function requireDynamicRendering () {
16888
17078
  }
16889
17079
  function useDynamicRouteParams(expression) {
16890
17080
  const workStore = _workasyncstorageexternal.workAsyncStorage.getStore();
16891
- if (workStore && workStore.isStaticGeneration && workStore.fallbackRouteParams && workStore.fallbackRouteParams.size > 0) {
16892
- // There are fallback route params, we should track these as dynamic
16893
- // accesses.
16894
- const workUnitStore = _workunitasyncstorageexternal.workUnitAsyncStorage.getStore();
16895
- if (workUnitStore) {
16896
- // We're prerendering with dynamicIO or PPR or both
16897
- if (workUnitStore.type === 'prerender') {
16898
- // We are in a prerender with dynamicIO semantics
16899
- // We are going to hang here and never resolve. This will cause the currently
16900
- // rendering component to effectively be a dynamic hole
16901
- _react.default.use((0, _dynamicrenderingutils.makeHangingPromise)(workUnitStore.renderSignal, expression));
16902
- } else if (workUnitStore.type === 'prerender-ppr') {
16903
- // We're prerendering with PPR
16904
- postponeWithTracking(workStore.route, expression, workUnitStore.dynamicTracking);
16905
- } else if (workUnitStore.type === 'prerender-legacy') {
16906
- throwToInterruptStaticGeneration(expression, workStore, workUnitStore);
16907
- }
17081
+ const workUnitStore = _workunitasyncstorageexternal.workUnitAsyncStorage.getStore();
17082
+ if (workStore && workUnitStore) {
17083
+ switch(workUnitStore.type){
17084
+ case 'prerender-client':
17085
+ case 'prerender':
17086
+ {
17087
+ const fallbackParams = workUnitStore.fallbackRouteParams;
17088
+ if (fallbackParams && fallbackParams.size > 0) {
17089
+ // We are in a prerender with cacheComponents semantics. We are going to
17090
+ // hang here and never resolve. This will cause the currently
17091
+ // rendering component to effectively be a dynamic hole.
17092
+ _react.default.use((0, _dynamicrenderingutils.makeHangingPromise)(workUnitStore.renderSignal, workStore.route, expression));
17093
+ }
17094
+ break;
17095
+ }
17096
+ case 'prerender-ppr':
17097
+ {
17098
+ const fallbackParams = workUnitStore.fallbackRouteParams;
17099
+ if (fallbackParams && fallbackParams.size > 0) {
17100
+ return postponeWithTracking(workStore.route, expression, workUnitStore.dynamicTracking);
17101
+ }
17102
+ break;
17103
+ }
17104
+ case 'prerender-runtime':
17105
+ throw Object.defineProperty(new _invarianterror.InvariantError(`\`${expression}\` was called during a runtime prerender. Next.js should be preventing ${expression} from being included in server components statically, but did not in this case.`), "__NEXT_ERROR_CODE", {
17106
+ value: "E771",
17107
+ enumerable: false,
17108
+ configurable: true
17109
+ });
17110
+ case 'cache':
17111
+ case 'private-cache':
17112
+ throw Object.defineProperty(new _invarianterror.InvariantError(`\`${expression}\` was called inside a cache scope. Next.js should be preventing ${expression} from being included in server components statically, but did not in this case.`), "__NEXT_ERROR_CODE", {
17113
+ value: "E745",
17114
+ enumerable: false,
17115
+ configurable: true
17116
+ });
16908
17117
  }
16909
17118
  }
16910
17119
  }
16911
17120
  const hasSuspenseRegex = /\n\s+at Suspense \(<anonymous>\)/;
16912
- const hasMetadataRegex = new RegExp(`\\n\\s+at ${_metadataconstants.METADATA_BOUNDARY_NAME}[\\n\\s]`);
16913
- const hasViewportRegex = new RegExp(`\\n\\s+at ${_metadataconstants.VIEWPORT_BOUNDARY_NAME}[\\n\\s]`);
16914
- const hasOutletRegex = new RegExp(`\\n\\s+at ${_metadataconstants.OUTLET_BOUNDARY_NAME}[\\n\\s]`);
16915
- function trackAllowedDynamicAccess(route, componentStack, dynamicValidation, serverDynamic, clientDynamic) {
17121
+ // Common implicit body tags that React will treat as body when placed directly in html
17122
+ const bodyAndImplicitTags = 'body|div|main|section|article|aside|header|footer|nav|form|p|span|h1|h2|h3|h4|h5|h6';
17123
+ // Detects when RootLayoutBoundary (our framework marker component) appears
17124
+ // after Suspense in the component stack, indicating the root layout is wrapped
17125
+ // within a Suspense boundary. Ensures no body/html/implicit-body components are in between.
17126
+ //
17127
+ // Example matches:
17128
+ // at Suspense (<anonymous>)
17129
+ // at __next_root_layout_boundary__ (<anonymous>)
17130
+ //
17131
+ // Or with other components in between (but not body/html/implicit-body):
17132
+ // at Suspense (<anonymous>)
17133
+ // at SomeComponent (<anonymous>)
17134
+ // at __next_root_layout_boundary__ (<anonymous>)
17135
+ const hasSuspenseBeforeRootLayoutWithoutBodyOrImplicitBodyRegex = new RegExp(`\\n\\s+at Suspense \\(<anonymous>\\)(?:(?!\\n\\s+at (?:${bodyAndImplicitTags}) \\(<anonymous>\\))[\\s\\S])*?\\n\\s+at ${_boundaryconstants.ROOT_LAYOUT_BOUNDARY_NAME} \\([^\\n]*\\)`);
17136
+ const hasMetadataRegex = new RegExp(`\\n\\s+at ${_boundaryconstants.METADATA_BOUNDARY_NAME}[\\n\\s]`);
17137
+ const hasViewportRegex = new RegExp(`\\n\\s+at ${_boundaryconstants.VIEWPORT_BOUNDARY_NAME}[\\n\\s]`);
17138
+ const hasOutletRegex = new RegExp(`\\n\\s+at ${_boundaryconstants.OUTLET_BOUNDARY_NAME}[\\n\\s]`);
17139
+ function trackAllowedDynamicAccess(workStore, componentStack, dynamicValidation, clientDynamic) {
16916
17140
  if (hasOutletRegex.test(componentStack)) {
16917
17141
  // We don't need to track that this is dynamic. It is only so when something else is also dynamic.
16918
17142
  return;
@@ -16922,92 +17146,112 @@ function requireDynamicRendering () {
16922
17146
  } else if (hasViewportRegex.test(componentStack)) {
16923
17147
  dynamicValidation.hasDynamicViewport = true;
16924
17148
  return;
17149
+ } else if (hasSuspenseBeforeRootLayoutWithoutBodyOrImplicitBodyRegex.test(componentStack)) {
17150
+ // For Suspense within body, the prelude wouldn't be empty so it wouldn't violate the empty static shells rule.
17151
+ // But if you have Suspense above body, the prelude is empty but we allow that because having Suspense
17152
+ // is an explicit signal from the user that they acknowledge the empty shell and want dynamic rendering.
17153
+ dynamicValidation.hasAllowedDynamic = true;
17154
+ dynamicValidation.hasSuspenseAboveBody = true;
17155
+ return;
16925
17156
  } else if (hasSuspenseRegex.test(componentStack)) {
16926
- dynamicValidation.hasSuspendedDynamic = true;
17157
+ // this error had a Suspense boundary above it so we don't need to report it as a source
17158
+ // of disallowed
17159
+ dynamicValidation.hasAllowedDynamic = true;
16927
17160
  return;
16928
- } else if (serverDynamic.syncDynamicErrorWithStack || clientDynamic.syncDynamicErrorWithStack) {
16929
- dynamicValidation.hasSyncDynamicErrors = true;
17161
+ } else if (clientDynamic.syncDynamicErrorWithStack) {
17162
+ // This task was the task that called the sync error.
17163
+ dynamicValidation.dynamicErrors.push(clientDynamic.syncDynamicErrorWithStack);
16930
17164
  return;
16931
17165
  } else {
16932
- const message = `Route "${route}": A component accessed data, headers, params, searchParams, or a short-lived cache without a Suspense boundary nor a "use cache" above it. We don't have the exact line number added to error messages yet but you can see which component in the stack below. See more info: https://nextjs.org/docs/messages/next-prerender-missing-suspense`;
16933
- const error = createErrorWithComponentStack(message, componentStack);
17166
+ const message = `Route "${workStore.route}": A component accessed data, headers, params, searchParams, or a short-lived cache without a Suspense boundary nor a "use cache" above it. See more info: https://nextjs.org/docs/messages/next-prerender-missing-suspense`;
17167
+ const error = createErrorWithComponentOrOwnerStack(message, componentStack);
16934
17168
  dynamicValidation.dynamicErrors.push(error);
16935
17169
  return;
16936
17170
  }
16937
17171
  }
16938
- function createErrorWithComponentStack(message, componentStack) {
17172
+ /**
17173
+ * In dev mode, we prefer using the owner stack, otherwise the provided
17174
+ * component stack is used.
17175
+ */ function createErrorWithComponentOrOwnerStack(message, componentStack) {
17176
+ const ownerStack = process.env.NODE_ENV !== 'production' && _react.default.captureOwnerStack ? _react.default.captureOwnerStack() : null;
16939
17177
  const error = Object.defineProperty(new Error(message), "__NEXT_ERROR_CODE", {
16940
17178
  value: "E394",
16941
17179
  enumerable: false,
16942
17180
  configurable: true
16943
17181
  });
16944
- error.stack = 'Error: ' + message + componentStack;
17182
+ error.stack = error.name + ': ' + message + (ownerStack ?? componentStack);
16945
17183
  return error;
16946
17184
  }
16947
- function throwIfDisallowedDynamic(route, dynamicValidation, serverDynamic, clientDynamic) {
16948
- let syncError;
16949
- let syncExpression;
16950
- let syncLogged;
16951
- if (serverDynamic.syncDynamicErrorWithStack) {
16952
- syncError = serverDynamic.syncDynamicErrorWithStack;
16953
- syncExpression = serverDynamic.syncDynamicExpression;
16954
- syncLogged = serverDynamic.syncDynamicLogged === true;
16955
- } else if (clientDynamic.syncDynamicErrorWithStack) {
16956
- syncError = clientDynamic.syncDynamicErrorWithStack;
16957
- syncExpression = clientDynamic.syncDynamicExpression;
16958
- syncLogged = clientDynamic.syncDynamicLogged === true;
16959
- } else {
16960
- syncError = null;
16961
- syncExpression = undefined;
16962
- syncLogged = false;
16963
- }
16964
- if (dynamicValidation.hasSyncDynamicErrors && syncError) {
16965
- if (!syncLogged) {
16966
- // In dev we already log errors about sync dynamic access. But during builds we need to ensure
16967
- // the offending sync error is logged before we exit the build
16968
- console.error(syncError);
17185
+ var PreludeState = /*#__PURE__*/ function(PreludeState) {
17186
+ PreludeState[PreludeState["Full"] = 0] = "Full";
17187
+ PreludeState[PreludeState["Empty"] = 1] = "Empty";
17188
+ PreludeState[PreludeState["Errored"] = 2] = "Errored";
17189
+ return PreludeState;
17190
+ }({});
17191
+ function logDisallowedDynamicError(workStore, error) {
17192
+ console.error(error);
17193
+ if (!workStore.dev) {
17194
+ if (workStore.hasReadableErrorStacks) {
17195
+ console.error(`To get a more detailed stack trace and pinpoint the issue, start the app in development mode by running \`next dev\`, then open "${workStore.route}" in your browser to investigate the error.`);
17196
+ } else {
17197
+ console.error(`To get a more detailed stack trace and pinpoint the issue, try one of the following:
17198
+ - Start the app in development mode by running \`next dev\`, then open "${workStore.route}" in your browser to investigate the error.
17199
+ - Rerun the production build with \`next build --debug-prerender\` to generate better stack traces.`);
16969
17200
  }
16970
- // The actual error should have been logged when the sync access ocurred
16971
- throw new _staticgenerationbailout.StaticGenBailoutError();
16972
17201
  }
16973
- const dynamicErrors = dynamicValidation.dynamicErrors;
16974
- if (dynamicErrors.length) {
16975
- for(let i = 0; i < dynamicErrors.length; i++){
16976
- console.error(dynamicErrors[i]);
17202
+ }
17203
+ function throwIfDisallowedDynamic(workStore, prelude, dynamicValidation, serverDynamic) {
17204
+ if (prelude !== 0) {
17205
+ if (dynamicValidation.hasSuspenseAboveBody) {
17206
+ // This route has opted into allowing fully dynamic rendering
17207
+ // by including a Suspense boundary above the body. In this case
17208
+ // a lack of a shell is not considered disallowed so we simply return
17209
+ return;
16977
17210
  }
16978
- throw new _staticgenerationbailout.StaticGenBailoutError();
16979
- }
16980
- if (!dynamicValidation.hasSuspendedDynamic) {
16981
- if (dynamicValidation.hasDynamicMetadata) {
16982
- if (syncError) {
16983
- console.error(syncError);
16984
- throw Object.defineProperty(new _staticgenerationbailout.StaticGenBailoutError(`Route "${route}" has a \`generateMetadata\` that could not finish rendering before ${syncExpression} was used. Follow the instructions in the error for this expression to resolve.`), "__NEXT_ERROR_CODE", {
16985
- value: "E608",
16986
- enumerable: false,
16987
- configurable: true
16988
- });
16989
- }
16990
- throw Object.defineProperty(new _staticgenerationbailout.StaticGenBailoutError(`Route "${route}" has a \`generateMetadata\` that depends on Request data (\`cookies()\`, etc...) or external data (\`fetch(...)\`, etc...) but the rest of the route was static or only used cached data (\`"use cache"\`). If you expected this route to be prerenderable update your \`generateMetadata\` to not use Request data and only use cached external data. Otherwise, add \`await connection()\` somewhere within this route to indicate explicitly it should not be prerendered.`), "__NEXT_ERROR_CODE", {
16991
- value: "E534",
16992
- enumerable: false,
16993
- configurable: true
16994
- });
16995
- } else if (dynamicValidation.hasDynamicViewport) {
16996
- if (syncError) {
16997
- console.error(syncError);
16998
- throw Object.defineProperty(new _staticgenerationbailout.StaticGenBailoutError(`Route "${route}" has a \`generateViewport\` that could not finish rendering before ${syncExpression} was used. Follow the instructions in the error for this expression to resolve.`), "__NEXT_ERROR_CODE", {
16999
- value: "E573",
17000
- enumerable: false,
17001
- configurable: true
17002
- });
17211
+ if (serverDynamic.syncDynamicErrorWithStack) {
17212
+ // There is no shell and the server did something sync dynamic likely
17213
+ // leading to an early termination of the prerender before the shell
17214
+ // could be completed. We terminate the build/validating render.
17215
+ logDisallowedDynamicError(workStore, serverDynamic.syncDynamicErrorWithStack);
17216
+ throw new _staticgenerationbailout.StaticGenBailoutError();
17217
+ }
17218
+ // We didn't have any sync bailouts but there may be user code which
17219
+ // blocked the root. We would have captured these during the prerender
17220
+ // and can log them here and then terminate the build/validating render
17221
+ const dynamicErrors = dynamicValidation.dynamicErrors;
17222
+ if (dynamicErrors.length > 0) {
17223
+ for(let i = 0; i < dynamicErrors.length; i++){
17224
+ logDisallowedDynamicError(workStore, dynamicErrors[i]);
17003
17225
  }
17004
- throw Object.defineProperty(new _staticgenerationbailout.StaticGenBailoutError(`Route "${route}" has a \`generateViewport\` that depends on Request data (\`cookies()\`, etc...) or external data (\`fetch(...)\`, etc...) but the rest of the route was static or only used cached data (\`"use cache"\`). If you expected this route to be prerenderable update your \`generateViewport\` to not use Request data and only use cached external data. Otherwise, add \`await connection()\` somewhere within this route to indicate explicitly it should not be prerendered.`), "__NEXT_ERROR_CODE", {
17005
- value: "E590",
17006
- enumerable: false,
17007
- configurable: true
17008
- });
17226
+ throw new _staticgenerationbailout.StaticGenBailoutError();
17227
+ }
17228
+ // If we got this far then the only other thing that could be blocking
17229
+ // the root is dynamic Viewport. If this is dynamic then
17230
+ // you need to opt into that by adding a Suspense boundary above the body
17231
+ // to indicate your are ok with fully dynamic rendering.
17232
+ if (dynamicValidation.hasDynamicViewport) {
17233
+ console.error(`Route "${workStore.route}" has a \`generateViewport\` that depends on Request data (\`cookies()\`, etc...) or uncached external data (\`fetch(...)\`, etc...) without explicitly allowing fully dynamic rendering. See more info here: https://nextjs.org/docs/messages/next-prerender-dynamic-viewport`);
17234
+ throw new _staticgenerationbailout.StaticGenBailoutError();
17235
+ }
17236
+ if (prelude === 1) {
17237
+ // If we ever get this far then we messed up the tracking of invalid dynamic.
17238
+ // We still adhere to the constraint that you must produce a shell but invite the
17239
+ // user to report this as a bug in Next.js.
17240
+ console.error(`Route "${workStore.route}" did not produce a static shell and Next.js was unable to determine a reason. This is a bug in Next.js.`);
17241
+ throw new _staticgenerationbailout.StaticGenBailoutError();
17009
17242
  }
17243
+ } else {
17244
+ if (dynamicValidation.hasAllowedDynamic === false && dynamicValidation.hasDynamicMetadata) {
17245
+ console.error(`Route "${workStore.route}" has a \`generateMetadata\` that depends on Request data (\`cookies()\`, etc...) or uncached external data (\`fetch(...)\`, etc...) when the rest of the route does not. See more info here: https://nextjs.org/docs/messages/next-prerender-dynamic-metadata`);
17246
+ throw new _staticgenerationbailout.StaticGenBailoutError();
17247
+ }
17248
+ }
17249
+ }
17250
+ function delayUntilRuntimeStage(prerenderStore, result) {
17251
+ if (prerenderStore.runtimeStagePromise) {
17252
+ return prerenderStore.runtimeStagePromise.then(()=>result);
17010
17253
  }
17254
+ return result;
17011
17255
  }
17012
17256
 
17013
17257
 
@@ -17170,6 +17414,9 @@ function requireNavigation_reactServer () {
17170
17414
  unauthorized: function() {
17171
17415
  return _unauthorized.unauthorized;
17172
17416
  },
17417
+ unstable_isUnrecognizedActionError: function() {
17418
+ return unstable_isUnrecognizedActionError;
17419
+ },
17173
17420
  unstable_rethrow: function() {
17174
17421
  return _unstablerethrow.unstable_rethrow;
17175
17422
  }
@@ -17199,6 +17446,13 @@ function requireNavigation_reactServer () {
17199
17446
  throw new ReadonlyURLSearchParamsError();
17200
17447
  }
17201
17448
  }
17449
+ function unstable_isUnrecognizedActionError() {
17450
+ throw Object.defineProperty(new Error('`unstable_isUnrecognizedActionError` can only be used on the client.'), "__NEXT_ERROR_CODE", {
17451
+ value: "E776",
17452
+ enumerable: false,
17453
+ configurable: true
17454
+ });
17455
+ }
17202
17456
 
17203
17457
  if ((typeof exports$1.default === 'function' || (typeof exports$1.default === 'object' && exports$1.default !== null)) && typeof exports$1.default.__esModule === 'undefined') {
17204
17458
  Object.defineProperty(exports$1.default, '__esModule', { value: true });
@@ -17300,6 +17554,52 @@ function requireServerInsertedHtml_sharedRuntime () {
17300
17554
  return serverInsertedHtml_sharedRuntime;
17301
17555
  }
17302
17556
 
17557
+ var unrecognizedActionError = {exports: {}};
17558
+
17559
+ var hasRequiredUnrecognizedActionError;
17560
+
17561
+ function requireUnrecognizedActionError () {
17562
+ if (hasRequiredUnrecognizedActionError) return unrecognizedActionError.exports;
17563
+ hasRequiredUnrecognizedActionError = 1;
17564
+ (function (module, exports$1) {
17565
+ Object.defineProperty(exports$1, "__esModule", {
17566
+ value: true
17567
+ });
17568
+ function _export(target, all) {
17569
+ for(var name in all)Object.defineProperty(target, name, {
17570
+ enumerable: true,
17571
+ get: all[name]
17572
+ });
17573
+ }
17574
+ _export(exports$1, {
17575
+ UnrecognizedActionError: function() {
17576
+ return UnrecognizedActionError;
17577
+ },
17578
+ unstable_isUnrecognizedActionError: function() {
17579
+ return unstable_isUnrecognizedActionError;
17580
+ }
17581
+ });
17582
+ class UnrecognizedActionError extends Error {
17583
+ constructor(...args){
17584
+ super(...args);
17585
+ this.name = 'UnrecognizedActionError';
17586
+ }
17587
+ }
17588
+ function unstable_isUnrecognizedActionError(error) {
17589
+ return !!(error && typeof error === 'object' && error instanceof UnrecognizedActionError);
17590
+ }
17591
+
17592
+ if ((typeof exports$1.default === 'function' || (typeof exports$1.default === 'object' && exports$1.default !== null)) && typeof exports$1.default.__esModule === 'undefined') {
17593
+ Object.defineProperty(exports$1.default, '__esModule', { value: true });
17594
+ Object.assign(exports$1.default, exports$1);
17595
+ module.exports = exports$1.default;
17596
+ }
17597
+
17598
+
17599
+ } (unrecognizedActionError, unrecognizedActionError.exports));
17600
+ return unrecognizedActionError.exports;
17601
+ }
17602
+
17303
17603
  var bailoutToClientRendering = {exports: {}};
17304
17604
 
17305
17605
  var hasRequiredBailoutToClientRendering;
@@ -17319,14 +17619,25 @@ function requireBailoutToClientRendering () {
17319
17619
  });
17320
17620
  const _bailouttocsr = requireBailoutToCsr();
17321
17621
  const _workasyncstorageexternal = requireWorkAsyncStorage_external();
17622
+ const _workunitasyncstorageexternal = requireWorkUnitAsyncStorage_external();
17322
17623
  function bailoutToClientRendering(reason) {
17323
17624
  const workStore = _workasyncstorageexternal.workAsyncStorage.getStore();
17324
17625
  if (workStore == null ? void 0 : workStore.forceStatic) return;
17325
- if (workStore == null ? void 0 : workStore.isStaticGeneration) throw Object.defineProperty(new _bailouttocsr.BailoutToCSRError(reason), "__NEXT_ERROR_CODE", {
17326
- value: "E394",
17327
- enumerable: false,
17328
- configurable: true
17329
- });
17626
+ const workUnitStore = _workunitasyncstorageexternal.workUnitAsyncStorage.getStore();
17627
+ if (workUnitStore) {
17628
+ switch(workUnitStore.type){
17629
+ case 'prerender':
17630
+ case 'prerender-runtime':
17631
+ case 'prerender-client':
17632
+ case 'prerender-ppr':
17633
+ case 'prerender-legacy':
17634
+ throw Object.defineProperty(new _bailouttocsr.BailoutToCSRError(reason), "__NEXT_ERROR_CODE", {
17635
+ value: "E394",
17636
+ enumerable: false,
17637
+ configurable: true
17638
+ });
17639
+ }
17640
+ }
17330
17641
  }
17331
17642
 
17332
17643
  if ((typeof exports$1.default === 'function' || (typeof exports$1.default === 'object' && exports$1.default !== null)) && typeof exports$1.default.__esModule === 'undefined') {
@@ -17380,6 +17691,9 @@ function requireNavigation$1 () {
17380
17691
  unauthorized: function() {
17381
17692
  return _navigationreactserver.unauthorized;
17382
17693
  },
17694
+ unstable_isUnrecognizedActionError: function() {
17695
+ return _unrecognizedactionerror.unstable_isUnrecognizedActionError;
17696
+ },
17383
17697
  unstable_rethrow: function() {
17384
17698
  return _navigationreactserver.unstable_rethrow;
17385
17699
  },
@@ -17412,6 +17726,7 @@ function requireNavigation$1 () {
17412
17726
  const _segment = requireSegment();
17413
17727
  const _navigationreactserver = requireNavigation_reactServer();
17414
17728
  const _serverinsertedhtmlsharedruntime = requireServerInsertedHtml_sharedRuntime();
17729
+ const _unrecognizedactionerror = requireUnrecognizedActionError();
17415
17730
  const useDynamicRouteParams = typeof window === 'undefined' ? requireDynamicRendering().useDynamicRouteParams : undefined;
17416
17731
  function useSearchParams() {
17417
17732
  const searchParams = (0, _react.useContext)(_hooksclientcontextsharedruntime.SearchParamsContext);