@semiont/frontend 0.2.36 → 0.2.39
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.
- package/package.json +1 -1
- package/standalone/apps/frontend/.next/BUILD_ID +1 -1
- package/standalone/apps/frontend/.next/app-build-manifest.json +122 -122
- package/standalone/apps/frontend/.next/app-path-routes-manifest.json +8 -8
- package/standalone/apps/frontend/.next/build-manifest.json +6 -6
- package/standalone/apps/frontend/.next/prerender-manifest.json +3 -3
- package/standalone/apps/frontend/.next/required-server-files.json +4 -4
- package/standalone/apps/frontend/.next/server/app/[locale]/about/page.js +35 -35
- package/standalone/apps/frontend/.next/server/app/[locale]/about/page.js.nft.json +1 -1
- package/standalone/apps/frontend/.next/server/app/[locale]/about/page_client-reference-manifest.js +1 -1
- package/standalone/apps/frontend/.next/server/app/[locale]/admin/devops/page.js +49 -49
- package/standalone/apps/frontend/.next/server/app/[locale]/admin/devops/page.js.nft.json +1 -1
- package/standalone/apps/frontend/.next/server/app/[locale]/admin/devops/page_client-reference-manifest.js +1 -1
- package/standalone/apps/frontend/.next/server/app/[locale]/admin/page.js +69 -69
- package/standalone/apps/frontend/.next/server/app/[locale]/admin/page.js.nft.json +1 -1
- package/standalone/apps/frontend/.next/server/app/[locale]/admin/page_client-reference-manifest.js +1 -1
- package/standalone/apps/frontend/.next/server/app/[locale]/admin/security/page.js +158 -158
- package/standalone/apps/frontend/.next/server/app/[locale]/admin/security/page.js.nft.json +1 -1
- package/standalone/apps/frontend/.next/server/app/[locale]/admin/security/page_client-reference-manifest.js +1 -1
- package/standalone/apps/frontend/.next/server/app/[locale]/admin/users/page.js +121 -121
- package/standalone/apps/frontend/.next/server/app/[locale]/admin/users/page.js.nft.json +1 -1
- package/standalone/apps/frontend/.next/server/app/[locale]/admin/users/page_client-reference-manifest.js +1 -1
- package/standalone/apps/frontend/.next/server/app/[locale]/auth/error/page.js +440 -440
- package/standalone/apps/frontend/.next/server/app/[locale]/auth/error/page.js.nft.json +1 -1
- package/standalone/apps/frontend/.next/server/app/[locale]/auth/error/page_client-reference-manifest.js +1 -1
- package/standalone/apps/frontend/.next/server/app/[locale]/auth/mcp-setup/route.js +62 -62
- package/standalone/apps/frontend/.next/server/app/[locale]/auth/mcp-setup/route.js.nft.json +1 -1
- package/standalone/apps/frontend/.next/server/app/[locale]/auth/mcp-setup/route_client-reference-manifest.js +1 -1
- package/standalone/apps/frontend/.next/server/app/[locale]/auth/signin/page.js +25 -25
- package/standalone/apps/frontend/.next/server/app/[locale]/auth/signin/page.js.nft.json +1 -1
- package/standalone/apps/frontend/.next/server/app/[locale]/auth/signin/page_client-reference-manifest.js +1 -1
- package/standalone/apps/frontend/.next/server/app/[locale]/auth/signup/page.js +270 -270
- package/standalone/apps/frontend/.next/server/app/[locale]/auth/signup/page.js.nft.json +1 -1
- package/standalone/apps/frontend/.next/server/app/[locale]/auth/signup/page_client-reference-manifest.js +1 -1
- package/standalone/apps/frontend/.next/server/app/[locale]/auth/welcome/page.js +250 -250
- package/standalone/apps/frontend/.next/server/app/[locale]/auth/welcome/page.js.nft.json +1 -1
- package/standalone/apps/frontend/.next/server/app/[locale]/auth/welcome/page_client-reference-manifest.js +1 -1
- package/standalone/apps/frontend/.next/server/app/[locale]/know/compose/page.js +46 -46
- package/standalone/apps/frontend/.next/server/app/[locale]/know/compose/page.js.nft.json +1 -1
- package/standalone/apps/frontend/.next/server/app/[locale]/know/compose/page_client-reference-manifest.js +1 -1
- package/standalone/apps/frontend/.next/server/app/[locale]/know/discover/page.js +18 -18
- package/standalone/apps/frontend/.next/server/app/[locale]/know/discover/page.js.nft.json +1 -1
- package/standalone/apps/frontend/.next/server/app/[locale]/know/discover/page_client-reference-manifest.js +1 -1
- package/standalone/apps/frontend/.next/server/app/[locale]/know/page.js +135 -135
- package/standalone/apps/frontend/.next/server/app/[locale]/know/page.js.nft.json +1 -1
- package/standalone/apps/frontend/.next/server/app/[locale]/know/page_client-reference-manifest.js +1 -1
- package/standalone/apps/frontend/.next/server/app/[locale]/know/resource/[id]/page.js +1454 -1454
- package/standalone/apps/frontend/.next/server/app/[locale]/know/resource/[id]/page.js.nft.json +1 -1
- package/standalone/apps/frontend/.next/server/app/[locale]/know/resource/[id]/page_client-reference-manifest.js +1 -1
- package/standalone/apps/frontend/.next/server/app/[locale]/moderate/entity-tags/page.js +1440 -1440
- package/standalone/apps/frontend/.next/server/app/[locale]/moderate/entity-tags/page.js.nft.json +1 -1
- package/standalone/apps/frontend/.next/server/app/[locale]/moderate/entity-tags/page_client-reference-manifest.js +1 -1
- package/standalone/apps/frontend/.next/server/app/[locale]/moderate/page.js +632 -632
- package/standalone/apps/frontend/.next/server/app/[locale]/moderate/page.js.nft.json +1 -1
- package/standalone/apps/frontend/.next/server/app/[locale]/moderate/page_client-reference-manifest.js +1 -1
- package/standalone/apps/frontend/.next/server/app/[locale]/moderate/recent/page.js +79 -79
- package/standalone/apps/frontend/.next/server/app/[locale]/moderate/recent/page.js.nft.json +1 -1
- package/standalone/apps/frontend/.next/server/app/[locale]/moderate/recent/page_client-reference-manifest.js +1 -1
- package/standalone/apps/frontend/.next/server/app/[locale]/moderate/tag-schemas/page.js +1613 -1613
- package/standalone/apps/frontend/.next/server/app/[locale]/moderate/tag-schemas/page.js.nft.json +1 -1
- package/standalone/apps/frontend/.next/server/app/[locale]/moderate/tag-schemas/page_client-reference-manifest.js +1 -1
- package/standalone/apps/frontend/.next/server/app/[locale]/page.js +262 -262
- package/standalone/apps/frontend/.next/server/app/[locale]/page.js.nft.json +1 -1
- package/standalone/apps/frontend/.next/server/app/[locale]/page_client-reference-manifest.js +1 -1
- package/standalone/apps/frontend/.next/server/app/[locale]/privacy/page.js +125 -125
- package/standalone/apps/frontend/.next/server/app/[locale]/privacy/page.js.nft.json +1 -1
- package/standalone/apps/frontend/.next/server/app/[locale]/privacy/page_client-reference-manifest.js +1 -1
- package/standalone/apps/frontend/.next/server/app/[locale]/terms/page.js +604 -604
- package/standalone/apps/frontend/.next/server/app/[locale]/terms/page.js.nft.json +1 -1
- package/standalone/apps/frontend/.next/server/app/[locale]/terms/page_client-reference-manifest.js +1 -1
- package/standalone/apps/frontend/.next/server/app/_not-found/page.js +358 -358
- package/standalone/apps/frontend/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/standalone/apps/frontend/.next/server/app/_not-found.html +1 -1
- package/standalone/apps/frontend/.next/server/app/_not-found.rsc +3 -3
- package/standalone/apps/frontend/.next/server/app/api/auth/[...nextauth]/route.js +113 -113
- package/standalone/apps/frontend/.next/server/app/api/auth/[...nextauth]/route.js.nft.json +1 -1
- package/standalone/apps/frontend/.next/server/app/api/auth/[...nextauth]/route_client-reference-manifest.js +1 -1
- package/standalone/apps/frontend/.next/server/app/api/cookies/consent/route.js +64 -64
- package/standalone/apps/frontend/.next/server/app/api/cookies/consent/route.js.nft.json +1 -1
- package/standalone/apps/frontend/.next/server/app/api/cookies/consent/route_client-reference-manifest.js +1 -1
- package/standalone/apps/frontend/.next/server/app/api/cookies/export/route.js +42 -42
- package/standalone/apps/frontend/.next/server/app/api/cookies/export/route.js.nft.json +1 -1
- package/standalone/apps/frontend/.next/server/app/api/cookies/export/route_client-reference-manifest.js +1 -1
- package/standalone/apps/frontend/.next/server/app/api/resources/[id]/route.js +111 -111
- package/standalone/apps/frontend/.next/server/app/api/resources/[id]/route.js.nft.json +1 -1
- package/standalone/apps/frontend/.next/server/app/api/resources/[id]/route_client-reference-manifest.js +1 -1
- package/standalone/apps/frontend/.next/server/app-paths-manifest.json +8 -8
- package/standalone/apps/frontend/.next/server/chunks/1037.js +4 -4
- package/standalone/apps/frontend/.next/server/chunks/1854.js +55 -55
- package/standalone/apps/frontend/.next/server/chunks/1940.js +388 -388
- package/standalone/apps/frontend/.next/server/chunks/{5137.js → 5015.js} +20 -20
- package/standalone/apps/frontend/.next/server/chunks/{4331.js → 5919.js} +12 -12
- package/standalone/apps/frontend/.next/server/chunks/7912.js +195 -195
- package/standalone/apps/frontend/.next/server/chunks/{255.js → 8387.js} +127 -127
- package/standalone/apps/frontend/.next/server/middleware-build-manifest.js +1 -1
- package/standalone/apps/frontend/.next/server/middleware-manifest.json +5 -5
- package/standalone/apps/frontend/.next/server/next-font-manifest.js +1 -1
- package/standalone/apps/frontend/.next/server/next-font-manifest.json +1 -1
- package/standalone/apps/frontend/.next/server/pages/404.html +1 -1
- package/standalone/apps/frontend/.next/server/pages/500.html +1 -1
- package/standalone/apps/frontend/.next/server/server-reference-manifest.json +1 -1
- package/standalone/apps/frontend/.next/server/src/middleware.js +10636 -10636
- package/standalone/apps/frontend/.next/static/chunks/app/[locale]/about/page-28023b5ae5e22ad9.js +1 -0
- package/standalone/apps/frontend/.next/static/chunks/app/[locale]/admin/devops/{page-a9093490466b2b37.js → page-da9614b9f1606d7b.js} +1 -1
- package/standalone/apps/frontend/.next/static/chunks/app/[locale]/admin/{layout-5af3f431ec0b3338.js → layout-62ef934e6bcc18b1.js} +1 -1
- package/standalone/apps/frontend/.next/static/chunks/app/[locale]/admin/page-fc5e1da86912c64f.js +1 -0
- package/standalone/apps/frontend/.next/static/chunks/app/[locale]/admin/security/page-8031d11e8dccef6c.js +1 -0
- package/standalone/apps/frontend/.next/static/chunks/app/[locale]/admin/users/{page-1952f839f1e5aec3.js → page-a978206777229291.js} +1 -1
- package/standalone/apps/frontend/.next/static/chunks/app/[locale]/auth/error/{page-c72ec26a8cc98e35.js → page-4e5ee1553c6d8ebe.js} +1 -1
- package/standalone/apps/frontend/.next/static/chunks/app/[locale]/auth/mcp-setup/route-e1d196e7f8d38edd.js +1 -0
- package/standalone/apps/frontend/.next/static/chunks/app/[locale]/auth/signin/{page-180f998c19826597.js → page-c878d25b0ae5069c.js} +1 -1
- package/standalone/apps/frontend/.next/static/chunks/app/[locale]/auth/signup/{page-f1ccc995126a89a8.js → page-1292f2664ce93b63.js} +1 -1
- package/standalone/apps/frontend/.next/static/chunks/app/[locale]/auth/welcome/{page-f57e39b176753cc4.js → page-7e79cf1f705618db.js} +1 -1
- package/standalone/apps/frontend/.next/static/chunks/app/[locale]/know/compose/{page-9b4223dae15c8d0c.js → page-7c16ece328eb4a91.js} +1 -1
- package/standalone/apps/frontend/.next/static/chunks/app/[locale]/know/discover/{page-926f8f5f5569695e.js → page-f9d0032f45241437.js} +1 -1
- package/standalone/apps/frontend/.next/static/chunks/app/[locale]/know/{layout-5ab3b200e60ffd91.js → layout-83fe577a1460d915.js} +1 -1
- package/standalone/apps/frontend/.next/static/chunks/app/[locale]/know/{page-55d3c0928a59e55f.js → page-5349aaee3976e1bb.js} +1 -1
- package/standalone/apps/frontend/.next/static/chunks/app/[locale]/know/resource/[id]/page-4cb67f9bf8be8f1a.js +1 -0
- package/standalone/apps/frontend/.next/static/chunks/app/[locale]/{layout-a298c8dc1488a191.js → layout-2f6c82f89ff0fb38.js} +1 -1
- package/standalone/apps/frontend/.next/static/chunks/app/[locale]/moderate/entity-tags/page-f76e2312764ebe0c.js +1 -0
- package/standalone/apps/frontend/.next/static/chunks/app/[locale]/moderate/{layout-fceb080211969ed7.js → layout-63abc0b7153c03d3.js} +1 -1
- package/standalone/apps/frontend/.next/static/chunks/app/[locale]/moderate/{page-3d971aeb0ca1324a.js → page-7bc1b2215ffcdde0.js} +1 -1
- package/standalone/apps/frontend/.next/static/chunks/app/[locale]/moderate/recent/{page-3a7a7a375c4338f5.js → page-a00695b21e364495.js} +1 -1
- package/standalone/apps/frontend/.next/static/chunks/app/[locale]/moderate/tag-schemas/{page-47f0c2c1cfb3e969.js → page-874ddff1c67dd96a.js} +1 -1
- package/standalone/apps/frontend/.next/static/chunks/app/[locale]/{not-found-cd4d3962209aaa67.js → not-found-9338290efe925a85.js} +1 -1
- package/standalone/apps/frontend/.next/static/chunks/app/[locale]/{page-e6857bdeef2ade5e.js → page-46fad01f54cffcaf.js} +1 -1
- package/standalone/apps/frontend/.next/static/chunks/app/[locale]/privacy/{page-2018e48e55ecea79.js → page-7034c8af05b702cd.js} +1 -1
- package/standalone/apps/frontend/.next/static/chunks/app/[locale]/terms/{page-87dc1af32b067913.js → page-fbfecd018ce6acdd.js} +1 -1
- package/standalone/apps/frontend/.next/static/chunks/app/api/auth/[...nextauth]/route-24502971e8577474.js +1 -0
- package/standalone/apps/frontend/.next/static/chunks/app/api/cookies/consent/route-680f8e085df19751.js +1 -0
- package/standalone/apps/frontend/.next/static/chunks/app/api/cookies/export/route-5c5bd56c39187fd1.js +1 -0
- package/standalone/apps/frontend/.next/static/chunks/app/api/resources/[id]/{route-41d8347af9354a15.js → route-e5f4f3f1353c7a86.js} +1 -1
- package/standalone/apps/frontend/.next/static/chunks/app/{error-092a0e51a706052b.js → error-4ec2f52abc66bc6c.js} +1 -1
- package/standalone/apps/frontend/.next/static/chunks/app/global-error-c894441824fc03d1.js +1 -0
- package/standalone/apps/frontend/.next/static/chunks/{common-cafbbd01b1c3775d.js → common-d8e3aad4ef182cd5.js} +1 -1
- package/standalone/apps/frontend/.next/static/chunks/main-app-4616290e0bdaf4ae.js +1 -0
- package/standalone/apps/frontend/package.json +3 -3
- package/standalone/apps/frontend/server.js +1 -1
- package/standalone/node_modules/@img/{sharp-libvips-darwin-arm64/lib/libvips-cpp.8.17.3.dylib → sharp-libvips-linux-x64/lib/libvips-cpp.so.8.17.3} +0 -0
- package/standalone/node_modules/@img/{sharp-libvips-darwin-arm64 → sharp-libvips-linux-x64}/package.json +11 -5
- package/standalone/node_modules/@img/sharp-libvips-linuxmusl-x64/lib/index.js +1 -0
- package/standalone/node_modules/@img/sharp-libvips-linuxmusl-x64/lib/libvips-cpp.so.8.17.3 +0 -0
- package/standalone/node_modules/@img/sharp-libvips-linuxmusl-x64/package.json +42 -0
- package/standalone/node_modules/@img/sharp-libvips-linuxmusl-x64/versions.json +30 -0
- package/standalone/node_modules/@img/sharp-linux-x64/lib/sharp-linux-x64.node +0 -0
- package/standalone/node_modules/@img/{sharp-darwin-arm64 → sharp-linux-x64}/package.json +13 -7
- package/standalone/node_modules/@img/sharp-linuxmusl-x64/LICENSE +191 -0
- package/standalone/node_modules/@img/sharp-linuxmusl-x64/lib/sharp-linuxmusl-x64.node +0 -0
- package/standalone/node_modules/@img/sharp-linuxmusl-x64/package.json +46 -0
- package/standalone/package.json +4 -2
- package/standalone/packages/core/package.json +1 -1
- package/standalone/apps/frontend/.next/static/chunks/app/[locale]/about/page-d8aed1a2b6034adb.js +0 -1
- package/standalone/apps/frontend/.next/static/chunks/app/[locale]/admin/page-b8a11ecf0fc92f87.js +0 -1
- package/standalone/apps/frontend/.next/static/chunks/app/[locale]/admin/security/page-d36785d6e4d45d3a.js +0 -1
- package/standalone/apps/frontend/.next/static/chunks/app/[locale]/auth/mcp-setup/route-d3c1c9e26edf790a.js +0 -1
- package/standalone/apps/frontend/.next/static/chunks/app/[locale]/know/resource/[id]/page-0de67bf833ae4a3f.js +0 -1
- package/standalone/apps/frontend/.next/static/chunks/app/[locale]/moderate/entity-tags/page-a245859e2ddd4e05.js +0 -1
- package/standalone/apps/frontend/.next/static/chunks/app/api/auth/[...nextauth]/route-7469fd42a9044d71.js +0 -1
- package/standalone/apps/frontend/.next/static/chunks/app/api/cookies/consent/route-b6458d3daaa96918.js +0 -1
- package/standalone/apps/frontend/.next/static/chunks/app/api/cookies/export/route-78e35b60a682d097.js +0 -1
- package/standalone/apps/frontend/.next/static/chunks/app/global-error-6d117072fb9faa75.js +0 -1
- package/standalone/apps/frontend/.next/static/chunks/main-app-49c62e2894aa25dd.js +0 -1
- package/standalone/apps/frontend/public/android-chrome-192x192.png +0 -0
- package/standalone/apps/frontend/public/android-chrome-512x512.png +0 -0
- package/standalone/apps/frontend/public/apple-touch-icon.png +0 -0
- package/standalone/apps/frontend/public/favicon-128x128.png +0 -0
- package/standalone/apps/frontend/public/favicon-16x16.png +0 -0
- package/standalone/apps/frontend/public/favicon-32x32.png +0 -0
- package/standalone/apps/frontend/public/favicon-48x48.png +0 -0
- package/standalone/apps/frontend/public/favicon-64x64.png +0 -0
- package/standalone/apps/frontend/public/favicon-96x96.png +0 -0
- package/standalone/apps/frontend/public/favicon.ico +0 -0
- package/standalone/apps/frontend/public/favicon.svg +0 -47
- package/standalone/apps/frontend/public/site.webmanifest +0 -19
- package/standalone/node_modules/@img/sharp-darwin-arm64/lib/sharp-darwin-arm64.node +0 -0
- /package/standalone/apps/frontend/.next/static/{OpFkYY-cw7w7h5hHBfiKG → guJTVgKDvrNJVGaUPYdEy}/_buildManifest.js +0 -0
- /package/standalone/apps/frontend/.next/static/{OpFkYY-cw7w7h5hHBfiKG → guJTVgKDvrNJVGaUPYdEy}/_ssgManifest.js +0 -0
- /package/standalone/node_modules/@img/{sharp-libvips-darwin-arm64 → sharp-libvips-linux-x64}/lib/index.js +0 -0
- /package/standalone/node_modules/@img/{sharp-libvips-darwin-arm64 → sharp-libvips-linux-x64}/versions.json +0 -0
- /package/standalone/node_modules/@img/{sharp-darwin-arm64 → sharp-linux-x64}/LICENSE +0 -0
|
@@ -10,14 +10,6 @@ exports.modules = {
|
|
|
10
10
|
"use strict";
|
|
11
11
|
module.exports = require("next/dist/shared/lib/router/utils/app-paths");
|
|
12
12
|
|
|
13
|
-
/***/ }),
|
|
14
|
-
|
|
15
|
-
/***/ 1703:
|
|
16
|
-
/***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
|
|
17
|
-
|
|
18
|
-
Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 75555));
|
|
19
|
-
|
|
20
|
-
|
|
21
13
|
/***/ }),
|
|
22
14
|
|
|
23
15
|
/***/ 3295:
|
|
@@ -304,1148 +296,511 @@ var routing = __webpack_require__(1915);
|
|
|
304
296
|
|
|
305
297
|
/***/ }),
|
|
306
298
|
|
|
307
|
-
/***/
|
|
299
|
+
/***/ 3919:
|
|
308
300
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
309
301
|
|
|
310
302
|
"use strict";
|
|
311
|
-
__webpack_require__.r(__webpack_exports__);
|
|
312
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
313
|
-
/* harmony export */ GlobalError: () => (/* reexport safe */ _Users_pingel_git_repos_github_com_The_AI_Alliance_semiont_apps_frontend_src_app_global_error_tsx__WEBPACK_IMPORTED_MODULE_25__["default"]),
|
|
314
|
-
/* harmony export */ __next_app__: () => (/* binding */ __next_app__),
|
|
315
|
-
/* harmony export */ handler: () => (/* binding */ handler),
|
|
316
|
-
/* harmony export */ pages: () => (/* binding */ pages),
|
|
317
|
-
/* harmony export */ routeModule: () => (/* binding */ routeModule),
|
|
318
|
-
/* harmony export */ tree: () => (/* binding */ tree)
|
|
319
|
-
/* harmony export */ });
|
|
320
|
-
/* harmony import */ var next_dist_server_route_modules_app_page_module_compiled__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(73653);
|
|
321
|
-
/* harmony import */ var next_dist_server_route_modules_app_page_module_compiled__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_route_modules_app_page_module_compiled__WEBPACK_IMPORTED_MODULE_0__);
|
|
322
|
-
/* harmony import */ var next_dist_server_route_kind__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(97714);
|
|
323
|
-
/* harmony import */ var next_dist_server_instrumentation_utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(85250);
|
|
324
|
-
/* harmony import */ var next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(37587);
|
|
325
|
-
/* harmony import */ var next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_3__);
|
|
326
|
-
/* harmony import */ var next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(22369);
|
|
327
|
-
/* harmony import */ var next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__);
|
|
328
|
-
/* harmony import */ var next_dist_server_lib_trace_constants__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(1889);
|
|
329
|
-
/* harmony import */ var next_dist_server_lib_trace_constants__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_lib_trace_constants__WEBPACK_IMPORTED_MODULE_5__);
|
|
330
|
-
/* harmony import */ var next_dist_server_app_render_interop_default__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(96232);
|
|
331
|
-
/* harmony import */ var next_dist_server_app_render_strip_flight_headers__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(22841);
|
|
332
|
-
/* harmony import */ var next_dist_server_base_http_node__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(46537);
|
|
333
|
-
/* harmony import */ var next_dist_server_base_http_node__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_base_http_node__WEBPACK_IMPORTED_MODULE_8__);
|
|
334
|
-
/* harmony import */ var next_dist_server_lib_experimental_ppr__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(46027);
|
|
335
|
-
/* harmony import */ var next_dist_server_lib_experimental_ppr__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_lib_experimental_ppr__WEBPACK_IMPORTED_MODULE_9__);
|
|
336
|
-
/* harmony import */ var next_dist_server_request_fallback_params__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(78559);
|
|
337
|
-
/* harmony import */ var next_dist_server_app_render_encryption_utils__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(75928);
|
|
338
|
-
/* harmony import */ var next_dist_server_app_render_encryption_utils__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_app_render_encryption_utils__WEBPACK_IMPORTED_MODULE_11__);
|
|
339
|
-
/* harmony import */ var next_dist_server_lib_streaming_metadata__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(19374);
|
|
340
|
-
/* harmony import */ var next_dist_server_lib_streaming_metadata__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_lib_streaming_metadata__WEBPACK_IMPORTED_MODULE_12__);
|
|
341
|
-
/* harmony import */ var next_dist_server_app_render_action_utils__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(65971);
|
|
342
|
-
/* harmony import */ var next_dist_server_app_render_action_utils__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_app_render_action_utils__WEBPACK_IMPORTED_MODULE_13__);
|
|
343
|
-
/* harmony import */ var next_dist_shared_lib_router_utils_app_paths__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(261);
|
|
344
|
-
/* harmony import */ var next_dist_shared_lib_router_utils_app_paths__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(next_dist_shared_lib_router_utils_app_paths__WEBPACK_IMPORTED_MODULE_14__);
|
|
345
|
-
/* harmony import */ var next_dist_server_lib_server_action_request_meta__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(79898);
|
|
346
|
-
/* harmony import */ var next_dist_server_lib_server_action_request_meta__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_lib_server_action_request_meta__WEBPACK_IMPORTED_MODULE_15__);
|
|
347
|
-
/* harmony import */ var next_dist_client_components_app_router_headers__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(32967);
|
|
348
|
-
/* harmony import */ var next_dist_client_components_app_router_headers__WEBPACK_IMPORTED_MODULE_16___default = /*#__PURE__*/__webpack_require__.n(next_dist_client_components_app_router_headers__WEBPACK_IMPORTED_MODULE_16__);
|
|
349
|
-
/* harmony import */ var next_dist_shared_lib_router_utils_is_bot__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(26713);
|
|
350
|
-
/* harmony import */ var next_dist_shared_lib_router_utils_is_bot__WEBPACK_IMPORTED_MODULE_17___default = /*#__PURE__*/__webpack_require__.n(next_dist_shared_lib_router_utils_is_bot__WEBPACK_IMPORTED_MODULE_17__);
|
|
351
|
-
/* harmony import */ var next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(40139);
|
|
352
|
-
/* harmony import */ var next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_18___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_18__);
|
|
353
|
-
/* harmony import */ var next_dist_lib_fallback__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(14248);
|
|
354
|
-
/* harmony import */ var next_dist_lib_fallback__WEBPACK_IMPORTED_MODULE_19___default = /*#__PURE__*/__webpack_require__.n(next_dist_lib_fallback__WEBPACK_IMPORTED_MODULE_19__);
|
|
355
|
-
/* harmony import */ var next_dist_server_render_result__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(59580);
|
|
356
|
-
/* harmony import */ var next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(57749);
|
|
357
|
-
/* harmony import */ var next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_21___default = /*#__PURE__*/__webpack_require__.n(next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_21__);
|
|
358
|
-
/* harmony import */ var next_dist_server_stream_utils_encoded_tags__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(53123);
|
|
359
|
-
/* harmony import */ var next_dist_server_send_payload__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(89745);
|
|
360
|
-
/* harmony import */ var next_dist_server_send_payload__WEBPACK_IMPORTED_MODULE_23___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_send_payload__WEBPACK_IMPORTED_MODULE_23__);
|
|
361
|
-
/* harmony import */ var next_dist_shared_lib_no_fallback_error_external__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(86439);
|
|
362
|
-
/* harmony import */ var next_dist_shared_lib_no_fallback_error_external__WEBPACK_IMPORTED_MODULE_24___default = /*#__PURE__*/__webpack_require__.n(next_dist_shared_lib_no_fallback_error_external__WEBPACK_IMPORTED_MODULE_24__);
|
|
363
|
-
/* harmony import */ var _Users_pingel_git_repos_github_com_The_AI_Alliance_semiont_apps_frontend_src_app_global_error_tsx__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(90488);
|
|
364
|
-
/* harmony import */ var next_dist_server_app_render_entry_base__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(18283);
|
|
365
|
-
/* harmony import */ var next_dist_server_app_render_entry_base__WEBPACK_IMPORTED_MODULE_26___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_app_render_entry_base__WEBPACK_IMPORTED_MODULE_26__);
|
|
366
|
-
/* harmony import */ var next_dist_client_components_redirect_status_code__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(39818);
|
|
367
|
-
/* harmony import */ var next_dist_client_components_redirect_status_code__WEBPACK_IMPORTED_MODULE_27___default = /*#__PURE__*/__webpack_require__.n(next_dist_client_components_redirect_status_code__WEBPACK_IMPORTED_MODULE_27__);
|
|
368
|
-
/* harmony reexport (unknown) */ var __WEBPACK_REEXPORT_OBJECT__ = {};
|
|
369
|
-
/* harmony reexport (unknown) */ for(const __WEBPACK_IMPORT_KEY__ in next_dist_server_app_render_entry_base__WEBPACK_IMPORTED_MODULE_26__) if(["default","tree","pages","GlobalError","__next_app__","routeModule","handler"].indexOf(__WEBPACK_IMPORT_KEY__) < 0) __WEBPACK_REEXPORT_OBJECT__[__WEBPACK_IMPORT_KEY__] = () => next_dist_server_app_render_entry_base__WEBPACK_IMPORTED_MODULE_26__[__WEBPACK_IMPORT_KEY__]
|
|
370
|
-
/* harmony reexport (unknown) */ __webpack_require__.d(__webpack_exports__, __WEBPACK_REEXPORT_OBJECT__);
|
|
371
|
-
const module0 = () => Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 47570));
|
|
372
|
-
const module1 = () => Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 26412));
|
|
373
|
-
const module2 = () => Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 90488));
|
|
374
|
-
const module3 = () => Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 33506));
|
|
375
|
-
const module4 = () => Promise.resolve(/* import() eager */).then(__webpack_require__.t.bind(__webpack_require__, 15034, 23));
|
|
376
|
-
const module5 = () => Promise.resolve(/* import() eager */).then(__webpack_require__.t.bind(__webpack_require__, 54693, 23));
|
|
377
|
-
const module6 = () => Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 82778));
|
|
378
|
-
const module7 = () => Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 71743));
|
|
379
|
-
const module8 = () => Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 75555));
|
|
380
|
-
const page9 = () => Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 19948));
|
|
381
303
|
|
|
304
|
+
// EXPORTS
|
|
305
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
306
|
+
As: () => (/* binding */ useAuth)
|
|
307
|
+
});
|
|
382
308
|
|
|
309
|
+
// UNUSED EXPORTS: usePermissions, useUserPreferences
|
|
383
310
|
|
|
311
|
+
// EXTERNAL MODULE: ../../node_modules/next-auth/react/index.js
|
|
312
|
+
var react = __webpack_require__(16422);
|
|
313
|
+
// EXTERNAL MODULE: ../../node_modules/next/dist/server/route-modules/app-page/vendored/ssr/react.js
|
|
314
|
+
var ssr_react = __webpack_require__(31768);
|
|
315
|
+
// EXTERNAL MODULE: ../../packages/api-client/dist/index.js
|
|
316
|
+
var dist = __webpack_require__(19208);
|
|
317
|
+
;// __barrel_optimize__?names=JWTTokenSchema,validateData!=!../../packages/api-client/dist/index.js
|
|
384
318
|
|
|
385
319
|
|
|
320
|
+
;// ./src/hooks/useAuth.ts
|
|
321
|
+
/* __next_internal_client_entry_do_not_use__ useAuth,useUserPreferences,usePermissions auto */
|
|
386
322
|
|
|
387
323
|
|
|
324
|
+
/**
|
|
325
|
+
* Enhanced authentication hook with validation and user information
|
|
326
|
+
*/ function useAuth() {
|
|
327
|
+
const { data: session, status } = (0,react.useSession)();
|
|
328
|
+
const authInfo = (0,ssr_react.useMemo)(()=>{
|
|
329
|
+
const isLoading = status === 'loading';
|
|
330
|
+
const isAuthenticated = !!session?.user;
|
|
331
|
+
// Validate backend token if present
|
|
332
|
+
const hasValidBackendToken = session?.backendToken ? (0,dist/* validateData */.lv)(dist/* JWTTokenSchema */.k3, session.backendToken).success : false;
|
|
333
|
+
return {
|
|
334
|
+
// Session data
|
|
335
|
+
session,
|
|
336
|
+
user: session?.user,
|
|
337
|
+
backendUser: session?.backendUser,
|
|
338
|
+
// Status flags
|
|
339
|
+
isLoading,
|
|
340
|
+
isAuthenticated,
|
|
341
|
+
hasValidBackendToken,
|
|
342
|
+
// Computed properties
|
|
343
|
+
userDomain: session?.backendUser?.domain || session?.user?.email?.split('@')[1],
|
|
344
|
+
displayName: session?.user?.name || session?.user?.email?.split('@')[0] || 'User',
|
|
345
|
+
avatarUrl: session?.user?.image,
|
|
346
|
+
isAdmin: session?.backendUser?.isAdmin || false,
|
|
347
|
+
isModerator: session?.backendUser?.isModerator || false,
|
|
348
|
+
// Combined auth status
|
|
349
|
+
isFullyAuthenticated: isAuthenticated && hasValidBackendToken
|
|
350
|
+
};
|
|
351
|
+
}, [
|
|
352
|
+
session,
|
|
353
|
+
status
|
|
354
|
+
]);
|
|
355
|
+
return authInfo;
|
|
356
|
+
}
|
|
357
|
+
/**
|
|
358
|
+
* Hook for getting user preferences and settings
|
|
359
|
+
*/ function useUserPreferences() {
|
|
360
|
+
const { session } = useAuth();
|
|
361
|
+
return useMemo(()=>{
|
|
362
|
+
// In the future, this could fetch user preferences from backend
|
|
363
|
+
// For now, return defaults
|
|
364
|
+
return {
|
|
365
|
+
theme: 'system',
|
|
366
|
+
language: 'en',
|
|
367
|
+
timezone: Intl.DateTimeFormat().resolvedOptions().timeZone,
|
|
368
|
+
emailNotifications: true
|
|
369
|
+
};
|
|
370
|
+
}, [
|
|
371
|
+
session
|
|
372
|
+
]);
|
|
373
|
+
}
|
|
374
|
+
/**
|
|
375
|
+
* Hook for checking user permissions (future expansion)
|
|
376
|
+
*/ function usePermissions() {
|
|
377
|
+
const { backendUser, isFullyAuthenticated } = useAuth();
|
|
378
|
+
return useMemo(()=>{
|
|
379
|
+
if (!isFullyAuthenticated || !backendUser) {
|
|
380
|
+
return {
|
|
381
|
+
canRead: false,
|
|
382
|
+
canWrite: false,
|
|
383
|
+
canAdmin: false,
|
|
384
|
+
canManageUsers: false
|
|
385
|
+
};
|
|
386
|
+
}
|
|
387
|
+
// Basic permissions - in the future this would come from backend
|
|
388
|
+
return {
|
|
389
|
+
canRead: true,
|
|
390
|
+
canWrite: true,
|
|
391
|
+
canAdmin: false,
|
|
392
|
+
canManageUsers: false
|
|
393
|
+
};
|
|
394
|
+
}, [
|
|
395
|
+
backendUser,
|
|
396
|
+
isFullyAuthenticated
|
|
397
|
+
]);
|
|
398
|
+
}
|
|
388
399
|
|
|
389
400
|
|
|
401
|
+
/***/ }),
|
|
390
402
|
|
|
403
|
+
/***/ 10846:
|
|
404
|
+
/***/ ((module) => {
|
|
391
405
|
|
|
406
|
+
"use strict";
|
|
407
|
+
module.exports = require("next/dist/compiled/next-server/app-page.runtime.prod.js");
|
|
392
408
|
|
|
409
|
+
/***/ }),
|
|
393
410
|
|
|
411
|
+
/***/ 19121:
|
|
412
|
+
/***/ ((module) => {
|
|
394
413
|
|
|
414
|
+
"use strict";
|
|
415
|
+
module.exports = require("next/dist/server/app-render/action-async-storage.external.js");
|
|
395
416
|
|
|
417
|
+
/***/ }),
|
|
396
418
|
|
|
419
|
+
/***/ 19771:
|
|
420
|
+
/***/ ((module) => {
|
|
397
421
|
|
|
422
|
+
"use strict";
|
|
423
|
+
module.exports = require("process");
|
|
398
424
|
|
|
425
|
+
/***/ }),
|
|
399
426
|
|
|
427
|
+
/***/ 19948:
|
|
428
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
400
429
|
|
|
430
|
+
"use strict";
|
|
431
|
+
__webpack_require__.r(__webpack_exports__);
|
|
432
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
433
|
+
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
434
|
+
/* harmony export */ });
|
|
435
|
+
/* harmony import */ var react_server_dom_webpack_server__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(25459);
|
|
436
|
+
/* harmony import */ var react_server_dom_webpack_server__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react_server_dom_webpack_server__WEBPACK_IMPORTED_MODULE_0__);
|
|
437
|
+
// This file is generated by the Webpack next-flight-loader.
|
|
401
438
|
|
|
439
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ((0,react_server_dom_webpack_server__WEBPACK_IMPORTED_MODULE_0__.registerClientReference)(
|
|
440
|
+
function() { throw new Error("Attempted to call the default export of \"/home/runner/work/semiont/semiont/apps/frontend/src/app/[locale]/moderate/entity-tags/page.tsx\" from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component."); },
|
|
441
|
+
"/home/runner/work/semiont/semiont/apps/frontend/src/app/[locale]/moderate/entity-tags/page.tsx",
|
|
442
|
+
"default",
|
|
443
|
+
));
|
|
402
444
|
|
|
403
445
|
|
|
446
|
+
/***/ }),
|
|
404
447
|
|
|
448
|
+
/***/ 20400:
|
|
449
|
+
/***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
|
|
405
450
|
|
|
406
|
-
|
|
407
|
-
// module.
|
|
408
|
-
const tree = {
|
|
409
|
-
children: [
|
|
410
|
-
'',
|
|
411
|
-
{
|
|
412
|
-
children: [
|
|
413
|
-
'[locale]',
|
|
414
|
-
{
|
|
415
|
-
children: [
|
|
416
|
-
'moderate',
|
|
417
|
-
{
|
|
418
|
-
children: [
|
|
419
|
-
'entity-tags',
|
|
420
|
-
{
|
|
421
|
-
children: ['__PAGE__', {}, {
|
|
422
|
-
page: [page9, "/Users/pingel/git_repos/github.com/The-AI-Alliance/semiont/apps/frontend/src/app/[locale]/moderate/entity-tags/page.tsx"],
|
|
423
|
-
|
|
424
|
-
}]
|
|
425
|
-
},
|
|
426
|
-
{
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
}
|
|
430
|
-
]
|
|
431
|
-
},
|
|
432
|
-
{
|
|
433
|
-
'layout': [module8, "/Users/pingel/git_repos/github.com/The-AI-Alliance/semiont/apps/frontend/src/app/[locale]/moderate/layout.tsx"],
|
|
434
|
-
|
|
435
|
-
}
|
|
436
|
-
]
|
|
437
|
-
},
|
|
438
|
-
{
|
|
439
|
-
'layout': [module6, "/Users/pingel/git_repos/github.com/The-AI-Alliance/semiont/apps/frontend/src/app/[locale]/layout.tsx"],
|
|
440
|
-
'not-found': [module7, "/Users/pingel/git_repos/github.com/The-AI-Alliance/semiont/apps/frontend/src/app/[locale]/not-found.tsx"],
|
|
441
|
-
|
|
442
|
-
}
|
|
443
|
-
]
|
|
444
|
-
},
|
|
445
|
-
{
|
|
446
|
-
'layout': [module0, "/Users/pingel/git_repos/github.com/The-AI-Alliance/semiont/apps/frontend/src/app/layout.tsx"],
|
|
447
|
-
'error': [module1, "/Users/pingel/git_repos/github.com/The-AI-Alliance/semiont/apps/frontend/src/app/error.tsx"],
|
|
448
|
-
'global-error': [module2, "/Users/pingel/git_repos/github.com/The-AI-Alliance/semiont/apps/frontend/src/app/global-error.tsx"],
|
|
449
|
-
'not-found': [module3, "/Users/pingel/git_repos/github.com/The-AI-Alliance/semiont/apps/frontend/src/app/not-found.tsx"],
|
|
450
|
-
'forbidden': [module4, "next/dist/client/components/builtin/forbidden.js"],
|
|
451
|
-
'unauthorized': [module5, "next/dist/client/components/builtin/unauthorized.js"],
|
|
452
|
-
|
|
453
|
-
}
|
|
454
|
-
]
|
|
455
|
-
}.children;
|
|
456
|
-
const pages = ["/Users/pingel/git_repos/github.com/The-AI-Alliance/semiont/apps/frontend/src/app/[locale]/moderate/entity-tags/page.tsx"];
|
|
451
|
+
Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 71642));
|
|
457
452
|
|
|
458
453
|
|
|
454
|
+
/***/ }),
|
|
459
455
|
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
const __next_app__ = {
|
|
463
|
-
require: __next_app_require__,
|
|
464
|
-
loadChunk: __next_app_load_chunk__
|
|
465
|
-
};
|
|
456
|
+
/***/ 26713:
|
|
457
|
+
/***/ ((module) => {
|
|
466
458
|
|
|
459
|
+
"use strict";
|
|
460
|
+
module.exports = require("next/dist/shared/lib/router/utils/is-bot");
|
|
467
461
|
|
|
462
|
+
/***/ }),
|
|
468
463
|
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
464
|
+
/***/ 28354:
|
|
465
|
+
/***/ ((module) => {
|
|
466
|
+
|
|
467
|
+
"use strict";
|
|
468
|
+
module.exports = require("util");
|
|
469
|
+
|
|
470
|
+
/***/ }),
|
|
471
|
+
|
|
472
|
+
/***/ 29294:
|
|
473
|
+
/***/ ((module) => {
|
|
474
|
+
|
|
475
|
+
"use strict";
|
|
476
|
+
module.exports = require("next/dist/server/app-render/work-async-storage.external.js");
|
|
477
|
+
|
|
478
|
+
/***/ }),
|
|
479
|
+
|
|
480
|
+
/***/ 33873:
|
|
481
|
+
/***/ ((module) => {
|
|
482
|
+
|
|
483
|
+
"use strict";
|
|
484
|
+
module.exports = require("path");
|
|
485
|
+
|
|
486
|
+
/***/ }),
|
|
487
|
+
|
|
488
|
+
/***/ 39659:
|
|
489
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
490
|
+
|
|
491
|
+
"use strict";
|
|
492
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
493
|
+
/* harmony export */ Ef3: () => (/* reexport safe */ _home_runner_work_semiont_semiont_packages_react_ui_dist_index_mjs__WEBPACK_IMPORTED_MODULE_0__.LeftSidebar),
|
|
494
|
+
/* harmony export */ ffs: () => (/* reexport safe */ _home_runner_work_semiont_semiont_packages_react_ui_dist_index_mjs__WEBPACK_IMPORTED_MODULE_0__.AuthTokenProvider),
|
|
495
|
+
/* harmony export */ pqI: () => (/* reexport safe */ _home_runner_work_semiont_semiont_packages_react_ui_dist_index_mjs__WEBPACK_IMPORTED_MODULE_0__.ApiClientProvider),
|
|
496
|
+
/* harmony export */ wi6: () => (/* reexport safe */ _home_runner_work_semiont_semiont_packages_react_ui_dist_index_mjs__WEBPACK_IMPORTED_MODULE_0__.Footer)
|
|
497
|
+
/* harmony export */ });
|
|
498
|
+
/* harmony import */ var _home_runner_work_semiont_semiont_packages_react_ui_dist_index_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(30658);
|
|
499
|
+
|
|
500
|
+
|
|
501
|
+
|
|
502
|
+
/***/ }),
|
|
503
|
+
|
|
504
|
+
/***/ 41025:
|
|
505
|
+
/***/ ((module) => {
|
|
506
|
+
|
|
507
|
+
"use strict";
|
|
508
|
+
module.exports = require("next/dist/server/app-render/dynamic-access-async-storage.external.js");
|
|
509
|
+
|
|
510
|
+
/***/ }),
|
|
511
|
+
|
|
512
|
+
/***/ 41857:
|
|
513
|
+
/***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
|
|
514
|
+
|
|
515
|
+
Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 19948));
|
|
516
|
+
|
|
517
|
+
|
|
518
|
+
/***/ }),
|
|
519
|
+
|
|
520
|
+
/***/ 56610:
|
|
521
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
522
|
+
|
|
523
|
+
"use strict";
|
|
524
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
525
|
+
/* harmony export */ C$z: () => (/* reexport safe */ _home_runner_work_semiont_semiont_packages_react_ui_dist_index_mjs__WEBPACK_IMPORTED_MODULE_0__.useEventSubscriptions),
|
|
526
|
+
/* harmony export */ DPo: () => (/* reexport safe */ _home_runner_work_semiont_semiont_packages_react_ui_dist_index_mjs__WEBPACK_IMPORTED_MODULE_0__.useTheme),
|
|
527
|
+
/* harmony export */ cvF: () => (/* reexport safe */ _home_runner_work_semiont_semiont_packages_react_ui_dist_index_mjs__WEBPACK_IMPORTED_MODULE_0__.useLineNumbers),
|
|
528
|
+
/* harmony export */ ySJ: () => (/* reexport safe */ _home_runner_work_semiont_semiont_packages_react_ui_dist_index_mjs__WEBPACK_IMPORTED_MODULE_0__.usePanelBrowse)
|
|
529
|
+
/* harmony export */ });
|
|
530
|
+
/* harmony import */ var _home_runner_work_semiont_semiont_packages_react_ui_dist_index_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(30658);
|
|
531
|
+
|
|
532
|
+
|
|
533
|
+
|
|
534
|
+
/***/ }),
|
|
535
|
+
|
|
536
|
+
/***/ 62256:
|
|
537
|
+
/***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
|
|
538
|
+
|
|
539
|
+
Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 75555));
|
|
540
|
+
|
|
541
|
+
|
|
542
|
+
/***/ }),
|
|
543
|
+
|
|
544
|
+
/***/ 63033:
|
|
545
|
+
/***/ ((module) => {
|
|
546
|
+
|
|
547
|
+
"use strict";
|
|
548
|
+
module.exports = require("next/dist/server/app-render/work-unit-async-storage.external.js");
|
|
549
|
+
|
|
550
|
+
/***/ }),
|
|
551
|
+
|
|
552
|
+
/***/ 71642:
|
|
553
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
554
|
+
|
|
555
|
+
"use strict";
|
|
556
|
+
// ESM COMPAT FLAG
|
|
557
|
+
__webpack_require__.r(__webpack_exports__);
|
|
558
|
+
|
|
559
|
+
// EXPORTS
|
|
560
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
561
|
+
"default": () => (/* binding */ ModerateLayout)
|
|
485
562
|
});
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
563
|
+
|
|
564
|
+
// EXTERNAL MODULE: ../../node_modules/next/dist/server/route-modules/app-page/vendored/ssr/react-jsx-runtime.js
|
|
565
|
+
var react_jsx_runtime = __webpack_require__(78157);
|
|
566
|
+
// EXTERNAL MODULE: ../../node_modules/next/dist/server/route-modules/app-page/vendored/ssr/react.js
|
|
567
|
+
var react = __webpack_require__(31768);
|
|
568
|
+
// EXTERNAL MODULE: ../../node_modules/next-intl/dist/esm/production/react-client/index.js
|
|
569
|
+
var react_client = __webpack_require__(72668);
|
|
570
|
+
// EXTERNAL MODULE: ../../node_modules/next-auth/react/index.js
|
|
571
|
+
var next_auth_react = __webpack_require__(16422);
|
|
572
|
+
// EXTERNAL MODULE: __barrel_optimize__?names=ApiClientProvider,AuthTokenProvider,Footer,LeftSidebar!=!../../packages/react-ui/dist/index.mjs
|
|
573
|
+
var dist = __webpack_require__(39659);
|
|
574
|
+
// EXTERNAL MODULE: ./src/i18n/routing.ts
|
|
575
|
+
var routing = __webpack_require__(1915);
|
|
576
|
+
// EXTERNAL MODULE: __barrel_optimize__?names=SimpleNavigation,useEventSubscriptions!=!../../packages/react-ui/dist/index.mjs
|
|
577
|
+
var react_ui_dist = __webpack_require__(93346);
|
|
578
|
+
;// ../../node_modules/@heroicons/react/24/outline/esm/ClockIcon.js
|
|
579
|
+
|
|
580
|
+
function ClockIcon({ title, titleId, ...props }, svgRef) {
|
|
581
|
+
return /*#__PURE__*/ react.createElement("svg", Object.assign({
|
|
582
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
583
|
+
fill: "none",
|
|
584
|
+
viewBox: "0 0 24 24",
|
|
585
|
+
strokeWidth: 1.5,
|
|
586
|
+
stroke: "currentColor",
|
|
587
|
+
"aria-hidden": "true",
|
|
588
|
+
"data-slot": "icon",
|
|
589
|
+
ref: svgRef,
|
|
590
|
+
"aria-labelledby": titleId
|
|
591
|
+
}, props), title ? /*#__PURE__*/ react.createElement("title", {
|
|
592
|
+
id: titleId
|
|
593
|
+
}, title) : null, /*#__PURE__*/ react.createElement("path", {
|
|
594
|
+
strokeLinecap: "round",
|
|
595
|
+
strokeLinejoin: "round",
|
|
596
|
+
d: "M12 6v6h4.5m4.5 0a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"
|
|
597
|
+
}));
|
|
598
|
+
}
|
|
599
|
+
const ForwardRef = /*#__PURE__*/ react.forwardRef(ClockIcon);
|
|
600
|
+
/* harmony default export */ const esm_ClockIcon = (ForwardRef);
|
|
601
|
+
|
|
602
|
+
;// ../../node_modules/@heroicons/react/24/outline/esm/TagIcon.js
|
|
603
|
+
|
|
604
|
+
function TagIcon({ title, titleId, ...props }, svgRef) {
|
|
605
|
+
return /*#__PURE__*/ react.createElement("svg", Object.assign({
|
|
606
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
607
|
+
fill: "none",
|
|
608
|
+
viewBox: "0 0 24 24",
|
|
609
|
+
strokeWidth: 1.5,
|
|
610
|
+
stroke: "currentColor",
|
|
611
|
+
"aria-hidden": "true",
|
|
612
|
+
"data-slot": "icon",
|
|
613
|
+
ref: svgRef,
|
|
614
|
+
"aria-labelledby": titleId
|
|
615
|
+
}, props), title ? /*#__PURE__*/ react.createElement("title", {
|
|
616
|
+
id: titleId
|
|
617
|
+
}, title) : null, /*#__PURE__*/ react.createElement("path", {
|
|
618
|
+
strokeLinecap: "round",
|
|
619
|
+
strokeLinejoin: "round",
|
|
620
|
+
d: "M9.568 3H5.25A2.25 2.25 0 0 0 3 5.25v4.318c0 .597.237 1.17.659 1.591l9.581 9.581c.699.699 1.78.872 2.607.33a18.095 18.095 0 0 0 5.223-5.223c.542-.827.369-1.908-.33-2.607L11.16 3.66A2.25 2.25 0 0 0 9.568 3Z"
|
|
621
|
+
}), /*#__PURE__*/ react.createElement("path", {
|
|
622
|
+
strokeLinecap: "round",
|
|
623
|
+
strokeLinejoin: "round",
|
|
624
|
+
d: "M6 6h.008v.008H6V6Z"
|
|
625
|
+
}));
|
|
626
|
+
}
|
|
627
|
+
const TagIcon_ForwardRef = /*#__PURE__*/ react.forwardRef(TagIcon);
|
|
628
|
+
/* harmony default export */ const esm_TagIcon = (TagIcon_ForwardRef);
|
|
629
|
+
|
|
630
|
+
;// ../../node_modules/@heroicons/react/24/outline/esm/BookOpenIcon.js
|
|
631
|
+
|
|
632
|
+
function BookOpenIcon({ title, titleId, ...props }, svgRef) {
|
|
633
|
+
return /*#__PURE__*/ react.createElement("svg", Object.assign({
|
|
634
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
635
|
+
fill: "none",
|
|
636
|
+
viewBox: "0 0 24 24",
|
|
637
|
+
strokeWidth: 1.5,
|
|
638
|
+
stroke: "currentColor",
|
|
639
|
+
"aria-hidden": "true",
|
|
640
|
+
"data-slot": "icon",
|
|
641
|
+
ref: svgRef,
|
|
642
|
+
"aria-labelledby": titleId
|
|
643
|
+
}, props), title ? /*#__PURE__*/ react.createElement("title", {
|
|
644
|
+
id: titleId
|
|
645
|
+
}, title) : null, /*#__PURE__*/ react.createElement("path", {
|
|
646
|
+
strokeLinecap: "round",
|
|
647
|
+
strokeLinejoin: "round",
|
|
648
|
+
d: "M12 6.042A8.967 8.967 0 0 0 6 3.75c-1.052 0-2.062.18-3 .512v14.25A8.987 8.987 0 0 1 6 18c2.305 0 4.408.867 6 2.292m0-14.25a8.966 8.966 0 0 1 6-2.292c1.052 0 2.062.18 3 .512v14.25A8.987 8.987 0 0 0 18 18a8.967 8.967 0 0 0-6 2.292m0-14.25v14.25"
|
|
649
|
+
}));
|
|
650
|
+
}
|
|
651
|
+
const BookOpenIcon_ForwardRef = /*#__PURE__*/ react.forwardRef(BookOpenIcon);
|
|
652
|
+
/* harmony default export */ const esm_BookOpenIcon = (BookOpenIcon_ForwardRef);
|
|
653
|
+
|
|
654
|
+
// EXTERNAL MODULE: ../../node_modules/@heroicons/react/24/outline/esm/ChevronLeftIcon.js
|
|
655
|
+
var ChevronLeftIcon = __webpack_require__(18689);
|
|
656
|
+
// EXTERNAL MODULE: ../../node_modules/@heroicons/react/24/outline/esm/Bars3Icon.js
|
|
657
|
+
var Bars3Icon = __webpack_require__(24768);
|
|
658
|
+
;// ./src/components/moderation/ModerationNavigation.tsx
|
|
659
|
+
/* __next_internal_client_entry_do_not_use__ ModerationNavigation auto */
|
|
660
|
+
|
|
661
|
+
|
|
662
|
+
|
|
663
|
+
|
|
664
|
+
|
|
665
|
+
|
|
666
|
+
function ModerationNavigation({ isCollapsed, toggleCollapsed, navigationMenu }) {
|
|
667
|
+
const t = (0,react_client/* useTranslations */.c)('Moderation');
|
|
668
|
+
const tSidebar = (0,react_client/* useTranslations */.c)('Sidebar');
|
|
669
|
+
const pathname = (0,routing/* usePathname */.a8)();
|
|
670
|
+
// Handle sidebar toggle events
|
|
671
|
+
const handleSidebarToggle = (0,react.useCallback)(()=>{
|
|
672
|
+
toggleCollapsed();
|
|
673
|
+
}, [
|
|
674
|
+
toggleCollapsed
|
|
675
|
+
]);
|
|
676
|
+
// Subscribe to sidebar toggle events
|
|
677
|
+
(0,react_ui_dist/* useEventSubscriptions */.C$z)({
|
|
678
|
+
'browse:sidebar-toggle': handleSidebarToggle
|
|
503
679
|
});
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
//
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
serverModuleMap: (0,next_dist_server_app_render_action_utils__WEBPACK_IMPORTED_MODULE_13__.createServerModuleMap)({
|
|
620
|
-
serverActionsManifest
|
|
680
|
+
const navigation = [
|
|
681
|
+
{
|
|
682
|
+
name: t('recentResources'),
|
|
683
|
+
href: '/moderate/recent',
|
|
684
|
+
icon: esm_ClockIcon,
|
|
685
|
+
description: t('recentResourcesDescription')
|
|
686
|
+
},
|
|
687
|
+
{
|
|
688
|
+
name: t('entityTags'),
|
|
689
|
+
href: '/moderate/entity-tags',
|
|
690
|
+
icon: esm_TagIcon,
|
|
691
|
+
description: t('entityTagsDescription')
|
|
692
|
+
},
|
|
693
|
+
{
|
|
694
|
+
name: t('tagSchemas'),
|
|
695
|
+
href: '/moderate/tag-schemas',
|
|
696
|
+
icon: esm_BookOpenIcon,
|
|
697
|
+
description: t('tagSchemasDescription')
|
|
698
|
+
}
|
|
699
|
+
];
|
|
700
|
+
return /*#__PURE__*/ (0,react_jsx_runtime.jsx)(react_ui_dist/* SimpleNavigation */.TbX, {
|
|
701
|
+
title: t('title'),
|
|
702
|
+
items: navigation,
|
|
703
|
+
currentPath: pathname,
|
|
704
|
+
LinkComponent: routing/* Link */.N_,
|
|
705
|
+
...navigationMenu && {
|
|
706
|
+
dropdownContent: navigationMenu
|
|
707
|
+
},
|
|
708
|
+
isCollapsed: isCollapsed,
|
|
709
|
+
icons: {
|
|
710
|
+
chevronLeft: ChevronLeftIcon/* default */.A,
|
|
711
|
+
bars: Bars3Icon/* default */.A
|
|
712
|
+
},
|
|
713
|
+
collapseSidebarLabel: tSidebar('collapseSidebar'),
|
|
714
|
+
expandSidebarLabel: tSidebar('expandSidebar')
|
|
715
|
+
});
|
|
716
|
+
}
|
|
717
|
+
|
|
718
|
+
// EXTERNAL MODULE: ./src/components/CookiePreferences.tsx
|
|
719
|
+
var CookiePreferences = __webpack_require__(76159);
|
|
720
|
+
// EXTERNAL MODULE: ./src/contexts/KeyboardShortcutsContext.tsx + 3 modules
|
|
721
|
+
var KeyboardShortcutsContext = __webpack_require__(99192);
|
|
722
|
+
// EXTERNAL MODULE: ./src/lib/routing.ts
|
|
723
|
+
var lib_routing = __webpack_require__(32302);
|
|
724
|
+
// EXTERNAL MODULE: ./src/hooks/useAuth.ts + 1 modules
|
|
725
|
+
var useAuth = __webpack_require__(3919);
|
|
726
|
+
;// ./src/app/[locale]/moderate/layout.tsx
|
|
727
|
+
/* __next_internal_client_entry_do_not_use__ default auto */
|
|
728
|
+
|
|
729
|
+
|
|
730
|
+
|
|
731
|
+
|
|
732
|
+
|
|
733
|
+
|
|
734
|
+
|
|
735
|
+
|
|
736
|
+
|
|
737
|
+
// Note: Authentication is handled by middleware.ts for all moderate routes
|
|
738
|
+
// This ensures centralized security and returns 404 for unauthorized users
|
|
739
|
+
function ModerateLayout({ children }) {
|
|
740
|
+
const t = (0,react_client/* useTranslations */.c)('Footer');
|
|
741
|
+
const tNav = (0,react_client/* useTranslations */.c)('Navigation');
|
|
742
|
+
const tHome = (0,react_client/* useTranslations */.c)('Home');
|
|
743
|
+
const keyboardContext = (0,react.useContext)(KeyboardShortcutsContext/* KeyboardShortcutsContext */.GZ);
|
|
744
|
+
const { isAuthenticated, isAdmin, isModerator } = (0,useAuth/* useAuth */.As)();
|
|
745
|
+
const { data: session } = (0,next_auth_react.useSession)();
|
|
746
|
+
// Extract auth token from session
|
|
747
|
+
const authToken = session?.backendToken || null;
|
|
748
|
+
// Middleware has already verified moderator/admin access
|
|
749
|
+
return /*#__PURE__*/ (0,react_jsx_runtime.jsx)(dist/* AuthTokenProvider */.ffs, {
|
|
750
|
+
token: authToken,
|
|
751
|
+
children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(dist/* ApiClientProvider */.pqI, {
|
|
752
|
+
baseUrl: "",
|
|
753
|
+
children: /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", {
|
|
754
|
+
className: "min-h-screen bg-gray-50 dark:bg-gray-900 flex flex-col",
|
|
755
|
+
children: [
|
|
756
|
+
/*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", {
|
|
757
|
+
className: "flex flex-1",
|
|
758
|
+
children: [
|
|
759
|
+
/*#__PURE__*/ (0,react_jsx_runtime.jsx)(dist/* LeftSidebar */.Ef3, {
|
|
760
|
+
Link: lib_routing/* Link */.N,
|
|
761
|
+
routes: lib_routing/* routes */.J,
|
|
762
|
+
t: tNav,
|
|
763
|
+
tHome: tHome,
|
|
764
|
+
brandingLink: "/",
|
|
765
|
+
collapsible: true,
|
|
766
|
+
storageKey: "moderation-sidebar-collapsed",
|
|
767
|
+
isAuthenticated: isAuthenticated,
|
|
768
|
+
isAdmin: isAdmin,
|
|
769
|
+
isModerator: isModerator,
|
|
770
|
+
children: (isCollapsed, toggleCollapsed, navigationMenu)=>/*#__PURE__*/ (0,react_jsx_runtime.jsx)(ModerationNavigation, {
|
|
771
|
+
isCollapsed: isCollapsed,
|
|
772
|
+
toggleCollapsed: toggleCollapsed,
|
|
773
|
+
navigationMenu: navigationMenu
|
|
774
|
+
})
|
|
775
|
+
}),
|
|
776
|
+
/*#__PURE__*/ (0,react_jsx_runtime.jsx)("main", {
|
|
777
|
+
className: "flex-1 p-6 flex flex-col",
|
|
778
|
+
children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", {
|
|
779
|
+
className: "max-w-7xl mx-auto flex-1 flex flex-col w-full",
|
|
780
|
+
children: children
|
|
781
|
+
})
|
|
782
|
+
})
|
|
783
|
+
]
|
|
784
|
+
}),
|
|
785
|
+
/*#__PURE__*/ (0,react_jsx_runtime.jsx)(dist/* Footer */.wi6, {
|
|
786
|
+
Link: lib_routing/* Link */.N,
|
|
787
|
+
routes: lib_routing/* routes */.J,
|
|
788
|
+
t: t,
|
|
789
|
+
CookiePreferences: CookiePreferences/* CookiePreferences */.f,
|
|
790
|
+
...keyboardContext?.openKeyboardHelp && {
|
|
791
|
+
onOpenKeyboardHelp: keyboardContext.openKeyboardHelp
|
|
792
|
+
}
|
|
793
|
+
})
|
|
794
|
+
]
|
|
621
795
|
})
|
|
622
|
-
})
|
|
623
|
-
}
|
|
624
|
-
|
|
625
|
-
const tracer = (0,next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_3__.getTracer)();
|
|
626
|
-
const activeSpan = tracer.getActiveScopeSpan();
|
|
627
|
-
try {
|
|
628
|
-
const varyHeader = routeModule.getVaryHeader(resolvedPathname, interceptionRoutePatterns);
|
|
629
|
-
res.setHeader('Vary', varyHeader);
|
|
630
|
-
const invokeRouteModule = async (span, context)=>{
|
|
631
|
-
const nextReq = new next_dist_server_base_http_node__WEBPACK_IMPORTED_MODULE_8__.NodeNextRequest(req);
|
|
632
|
-
const nextRes = new next_dist_server_base_http_node__WEBPACK_IMPORTED_MODULE_8__.NodeNextResponse(res);
|
|
633
|
-
// TODO: adapt for putting the RDC inside the postponed data
|
|
634
|
-
// If we're in dev, and this isn't a prefetch or a server action,
|
|
635
|
-
// we should seed the resume data cache.
|
|
636
|
-
if (false) {}
|
|
637
|
-
return routeModule.render(nextReq, nextRes, context).finally(()=>{
|
|
638
|
-
if (!span) return;
|
|
639
|
-
span.setAttributes({
|
|
640
|
-
'http.status_code': res.statusCode,
|
|
641
|
-
'next.rsc': false
|
|
642
|
-
});
|
|
643
|
-
const rootSpanAttributes = tracer.getRootSpanAttributes();
|
|
644
|
-
// We were unable to get attributes, probably OTEL is not enabled
|
|
645
|
-
if (!rootSpanAttributes) {
|
|
646
|
-
return;
|
|
647
|
-
}
|
|
648
|
-
if (rootSpanAttributes.get('next.span_type') !== next_dist_server_lib_trace_constants__WEBPACK_IMPORTED_MODULE_5__.BaseServerSpan.handleRequest) {
|
|
649
|
-
console.warn(`Unexpected root span type '${rootSpanAttributes.get('next.span_type')}'. Please report this Next.js issue https://github.com/vercel/next.js`);
|
|
650
|
-
return;
|
|
651
|
-
}
|
|
652
|
-
const route = rootSpanAttributes.get('next.route');
|
|
653
|
-
if (route) {
|
|
654
|
-
const name = `${method} ${route}`;
|
|
655
|
-
span.setAttributes({
|
|
656
|
-
'next.route': route,
|
|
657
|
-
'http.route': route,
|
|
658
|
-
'next.span_name': name
|
|
659
|
-
});
|
|
660
|
-
span.updateName(name);
|
|
661
|
-
} else {
|
|
662
|
-
span.updateName(`${method} ${req.url}`);
|
|
663
|
-
}
|
|
664
|
-
});
|
|
665
|
-
};
|
|
666
|
-
const doRender = async ({ span, postponed, fallbackRouteParams })=>{
|
|
667
|
-
const context = {
|
|
668
|
-
query,
|
|
669
|
-
params,
|
|
670
|
-
page: normalizedSrcPage,
|
|
671
|
-
sharedContext: {
|
|
672
|
-
buildId
|
|
673
|
-
},
|
|
674
|
-
serverComponentsHmrCache: (0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__.getRequestMeta)(req, 'serverComponentsHmrCache'),
|
|
675
|
-
fallbackRouteParams,
|
|
676
|
-
renderOpts: {
|
|
677
|
-
App: ()=>null,
|
|
678
|
-
Document: ()=>null,
|
|
679
|
-
pageConfig: {},
|
|
680
|
-
ComponentMod,
|
|
681
|
-
Component: (0,next_dist_server_app_render_interop_default__WEBPACK_IMPORTED_MODULE_6__/* .interopDefault */ .T)(ComponentMod),
|
|
682
|
-
params,
|
|
683
|
-
routeModule,
|
|
684
|
-
page: srcPage,
|
|
685
|
-
postponed,
|
|
686
|
-
shouldWaitOnAllReady,
|
|
687
|
-
serveStreamingMetadata,
|
|
688
|
-
supportsDynamicResponse: typeof postponed === 'string' || supportsDynamicResponse,
|
|
689
|
-
buildManifest,
|
|
690
|
-
nextFontManifest,
|
|
691
|
-
reactLoadableManifest,
|
|
692
|
-
subresourceIntegrityManifest,
|
|
693
|
-
serverActionsManifest,
|
|
694
|
-
clientReferenceManifest,
|
|
695
|
-
setIsrStatus: routerServerContext == null ? void 0 : routerServerContext.setIsrStatus,
|
|
696
|
-
dir: true ? (__webpack_require__(33873).join)(/* turbopackIgnore: true */ process.cwd(), routeModule.relativeProjectDir) : 0,
|
|
697
|
-
isDraftMode,
|
|
698
|
-
isRevalidate: isSSG && !postponed && !isDynamicRSCRequest,
|
|
699
|
-
botType,
|
|
700
|
-
isOnDemandRevalidate,
|
|
701
|
-
isPossibleServerAction,
|
|
702
|
-
assetPrefix: nextConfig.assetPrefix,
|
|
703
|
-
nextConfigOutput: nextConfig.output,
|
|
704
|
-
crossOrigin: nextConfig.crossOrigin,
|
|
705
|
-
trailingSlash: nextConfig.trailingSlash,
|
|
706
|
-
previewProps: prerenderManifest.preview,
|
|
707
|
-
deploymentId: nextConfig.deploymentId,
|
|
708
|
-
enableTainting: nextConfig.experimental.taint,
|
|
709
|
-
htmlLimitedBots: nextConfig.htmlLimitedBots,
|
|
710
|
-
devtoolSegmentExplorer: nextConfig.experimental.devtoolSegmentExplorer,
|
|
711
|
-
reactMaxHeadersLength: nextConfig.reactMaxHeadersLength,
|
|
712
|
-
multiZoneDraftMode,
|
|
713
|
-
incrementalCache: (0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__.getRequestMeta)(req, 'incrementalCache'),
|
|
714
|
-
cacheLifeProfiles: nextConfig.experimental.cacheLife,
|
|
715
|
-
basePath: nextConfig.basePath,
|
|
716
|
-
serverActions: nextConfig.experimental.serverActions,
|
|
717
|
-
...isDebugStaticShell || isDebugDynamicAccesses ? {
|
|
718
|
-
nextExport: true,
|
|
719
|
-
supportsDynamicResponse: false,
|
|
720
|
-
isStaticGeneration: true,
|
|
721
|
-
isRevalidate: true,
|
|
722
|
-
isDebugDynamicAccesses: isDebugDynamicAccesses
|
|
723
|
-
} : {},
|
|
724
|
-
experimental: {
|
|
725
|
-
isRoutePPREnabled,
|
|
726
|
-
expireTime: nextConfig.expireTime,
|
|
727
|
-
staleTimes: nextConfig.experimental.staleTimes,
|
|
728
|
-
cacheComponents: Boolean(nextConfig.experimental.cacheComponents),
|
|
729
|
-
clientSegmentCache: Boolean(nextConfig.experimental.clientSegmentCache),
|
|
730
|
-
clientParamParsing: Boolean(nextConfig.experimental.clientParamParsing),
|
|
731
|
-
dynamicOnHover: Boolean(nextConfig.experimental.dynamicOnHover),
|
|
732
|
-
inlineCss: Boolean(nextConfig.experimental.inlineCss),
|
|
733
|
-
authInterrupts: Boolean(nextConfig.experimental.authInterrupts),
|
|
734
|
-
clientTraceMetadata: nextConfig.experimental.clientTraceMetadata || []
|
|
735
|
-
},
|
|
736
|
-
waitUntil: ctx.waitUntil,
|
|
737
|
-
onClose: (cb)=>{
|
|
738
|
-
res.on('close', cb);
|
|
739
|
-
},
|
|
740
|
-
onAfterTaskError: ()=>{},
|
|
741
|
-
onInstrumentationRequestError: (error, _request, errorContext)=>routeModule.onRequestError(req, error, errorContext, routerServerContext),
|
|
742
|
-
err: (0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__.getRequestMeta)(req, 'invokeError'),
|
|
743
|
-
dev: routeModule.isDev
|
|
744
|
-
}
|
|
745
|
-
};
|
|
746
|
-
const result = await invokeRouteModule(span, context);
|
|
747
|
-
const { metadata } = result;
|
|
748
|
-
const { cacheControl, headers = {}, // Add any fetch tags that were on the page to the response headers.
|
|
749
|
-
fetchTags: cacheTags } = metadata;
|
|
750
|
-
if (cacheTags) {
|
|
751
|
-
headers[next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_21__.NEXT_CACHE_TAGS_HEADER] = cacheTags;
|
|
752
|
-
}
|
|
753
|
-
// Pull any fetch metrics from the render onto the request.
|
|
754
|
-
;
|
|
755
|
-
req.fetchMetrics = metadata.fetchMetrics;
|
|
756
|
-
// we don't throw static to dynamic errors in dev as isSSG
|
|
757
|
-
// is a best guess in dev since we don't have the prerender pass
|
|
758
|
-
// to know whether the path is actually static or not
|
|
759
|
-
if (isSSG && (cacheControl == null ? void 0 : cacheControl.revalidate) === 0 && !routeModule.isDev && !isRoutePPREnabled) {
|
|
760
|
-
const staticBailoutInfo = metadata.staticBailoutInfo;
|
|
761
|
-
const err = Object.defineProperty(new Error(`Page changed from static to dynamic at runtime ${resolvedPathname}${(staticBailoutInfo == null ? void 0 : staticBailoutInfo.description) ? `, reason: ${staticBailoutInfo.description}` : ``}` + `\nsee more here https://nextjs.org/docs/messages/app-static-to-dynamic-error`), "__NEXT_ERROR_CODE", {
|
|
762
|
-
value: "E132",
|
|
763
|
-
enumerable: false,
|
|
764
|
-
configurable: true
|
|
765
|
-
});
|
|
766
|
-
if (staticBailoutInfo == null ? void 0 : staticBailoutInfo.stack) {
|
|
767
|
-
const stack = staticBailoutInfo.stack;
|
|
768
|
-
err.stack = err.message + stack.substring(stack.indexOf('\n'));
|
|
769
|
-
}
|
|
770
|
-
throw err;
|
|
771
|
-
}
|
|
772
|
-
return {
|
|
773
|
-
value: {
|
|
774
|
-
kind: next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_18__.CachedRouteKind.APP_PAGE,
|
|
775
|
-
html: result,
|
|
776
|
-
headers,
|
|
777
|
-
rscData: metadata.flightData,
|
|
778
|
-
postponed: metadata.postponed,
|
|
779
|
-
status: metadata.statusCode,
|
|
780
|
-
segmentData: metadata.segmentData
|
|
781
|
-
},
|
|
782
|
-
cacheControl
|
|
783
|
-
};
|
|
784
|
-
};
|
|
785
|
-
const responseGenerator = async ({ hasResolved, previousCacheEntry, isRevalidating, span })=>{
|
|
786
|
-
const isProduction = routeModule.isDev === false;
|
|
787
|
-
const didRespond = hasResolved || res.writableEnded;
|
|
788
|
-
// skip on-demand revalidate if cache is not present and
|
|
789
|
-
// revalidate-if-generated is set
|
|
790
|
-
if (isOnDemandRevalidate && revalidateOnlyGenerated && !previousCacheEntry && !minimalMode) {
|
|
791
|
-
if (routerServerContext == null ? void 0 : routerServerContext.render404) {
|
|
792
|
-
await routerServerContext.render404(req, res);
|
|
793
|
-
} else {
|
|
794
|
-
res.statusCode = 404;
|
|
795
|
-
res.end('This page could not be found');
|
|
796
|
-
}
|
|
797
|
-
return null;
|
|
798
|
-
}
|
|
799
|
-
let fallbackMode;
|
|
800
|
-
if (prerenderInfo) {
|
|
801
|
-
fallbackMode = (0,next_dist_lib_fallback__WEBPACK_IMPORTED_MODULE_19__.parseFallbackField)(prerenderInfo.fallback);
|
|
802
|
-
}
|
|
803
|
-
// When serving a HTML bot request, we want to serve a blocking render and
|
|
804
|
-
// not the prerendered page. This ensures that the correct content is served
|
|
805
|
-
// to the bot in the head.
|
|
806
|
-
if (fallbackMode === next_dist_lib_fallback__WEBPACK_IMPORTED_MODULE_19__.FallbackMode.PRERENDER && (0,next_dist_shared_lib_router_utils_is_bot__WEBPACK_IMPORTED_MODULE_17__.isBot)(userAgent)) {
|
|
807
|
-
if (!isRoutePPREnabled || isHtmlBot) {
|
|
808
|
-
fallbackMode = next_dist_lib_fallback__WEBPACK_IMPORTED_MODULE_19__.FallbackMode.BLOCKING_STATIC_RENDER;
|
|
809
|
-
}
|
|
810
|
-
}
|
|
811
|
-
if ((previousCacheEntry == null ? void 0 : previousCacheEntry.isStale) === -1) {
|
|
812
|
-
isOnDemandRevalidate = true;
|
|
813
|
-
}
|
|
814
|
-
// TODO: adapt for PPR
|
|
815
|
-
// only allow on-demand revalidate for fallback: true/blocking
|
|
816
|
-
// or for prerendered fallback: false paths
|
|
817
|
-
if (isOnDemandRevalidate && (fallbackMode !== next_dist_lib_fallback__WEBPACK_IMPORTED_MODULE_19__.FallbackMode.NOT_FOUND || previousCacheEntry)) {
|
|
818
|
-
fallbackMode = next_dist_lib_fallback__WEBPACK_IMPORTED_MODULE_19__.FallbackMode.BLOCKING_STATIC_RENDER;
|
|
819
|
-
}
|
|
820
|
-
if (!minimalMode && fallbackMode !== next_dist_lib_fallback__WEBPACK_IMPORTED_MODULE_19__.FallbackMode.BLOCKING_STATIC_RENDER && staticPathKey && !didRespond && !isDraftMode && pageIsDynamic && (isProduction || !isPrerendered)) {
|
|
821
|
-
// if the page has dynamicParams: false and this pathname wasn't
|
|
822
|
-
// prerendered trigger the no fallback handling
|
|
823
|
-
if (// In development, fall through to render to handle missing
|
|
824
|
-
// getStaticPaths.
|
|
825
|
-
(isProduction || prerenderInfo) && // When fallback isn't present, abort this render so we 404
|
|
826
|
-
fallbackMode === next_dist_lib_fallback__WEBPACK_IMPORTED_MODULE_19__.FallbackMode.NOT_FOUND) {
|
|
827
|
-
throw new next_dist_shared_lib_no_fallback_error_external__WEBPACK_IMPORTED_MODULE_24__.NoFallbackError();
|
|
828
|
-
}
|
|
829
|
-
let fallbackResponse;
|
|
830
|
-
if (isRoutePPREnabled && !isRSCRequest) {
|
|
831
|
-
const cacheKey = typeof (prerenderInfo == null ? void 0 : prerenderInfo.fallback) === 'string' ? prerenderInfo.fallback : isProduction ? normalizedSrcPage : null;
|
|
832
|
-
// We use the response cache here to handle the revalidation and
|
|
833
|
-
// management of the fallback shell.
|
|
834
|
-
fallbackResponse = await routeModule.handleResponse({
|
|
835
|
-
cacheKey,
|
|
836
|
-
req,
|
|
837
|
-
nextConfig,
|
|
838
|
-
routeKind: next_dist_server_route_kind__WEBPACK_IMPORTED_MODULE_1__.RouteKind.APP_PAGE,
|
|
839
|
-
isFallback: true,
|
|
840
|
-
prerenderManifest,
|
|
841
|
-
isRoutePPREnabled,
|
|
842
|
-
responseGenerator: async ()=>doRender({
|
|
843
|
-
span,
|
|
844
|
-
// We pass `undefined` as rendering a fallback isn't resumed
|
|
845
|
-
// here.
|
|
846
|
-
postponed: undefined,
|
|
847
|
-
fallbackRouteParams: // If we're in production or we're debugging the fallback
|
|
848
|
-
// shell then we should postpone when dynamic params are
|
|
849
|
-
// accessed.
|
|
850
|
-
isProduction || isDebugFallbackShell ? (0,next_dist_server_request_fallback_params__WEBPACK_IMPORTED_MODULE_10__/* .getFallbackRouteParams */ .u)(normalizedSrcPage) : null
|
|
851
|
-
}),
|
|
852
|
-
waitUntil: ctx.waitUntil
|
|
853
|
-
});
|
|
854
|
-
// If the fallback response was set to null, then we should return null.
|
|
855
|
-
if (fallbackResponse === null) return null;
|
|
856
|
-
// Otherwise, if we did get a fallback response, we should return it.
|
|
857
|
-
if (fallbackResponse) {
|
|
858
|
-
// Remove the cache control from the response to prevent it from being
|
|
859
|
-
// used in the surrounding cache.
|
|
860
|
-
delete fallbackResponse.cacheControl;
|
|
861
|
-
return fallbackResponse;
|
|
862
|
-
}
|
|
863
|
-
}
|
|
864
|
-
}
|
|
865
|
-
// Only requests that aren't revalidating can be resumed. If we have the
|
|
866
|
-
// minimal postponed data, then we should resume the render with it.
|
|
867
|
-
const postponed = !isOnDemandRevalidate && !isRevalidating && minimalPostponed ? minimalPostponed : undefined;
|
|
868
|
-
// When we're in minimal mode, if we're trying to debug the static shell,
|
|
869
|
-
// we should just return nothing instead of resuming the dynamic render.
|
|
870
|
-
if ((isDebugStaticShell || isDebugDynamicAccesses) && typeof postponed !== 'undefined') {
|
|
871
|
-
return {
|
|
872
|
-
cacheControl: {
|
|
873
|
-
revalidate: 1,
|
|
874
|
-
expire: undefined
|
|
875
|
-
},
|
|
876
|
-
value: {
|
|
877
|
-
kind: next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_18__.CachedRouteKind.PAGES,
|
|
878
|
-
html: next_dist_server_render_result__WEBPACK_IMPORTED_MODULE_20__["default"].EMPTY,
|
|
879
|
-
pageData: {},
|
|
880
|
-
headers: undefined,
|
|
881
|
-
status: undefined
|
|
882
|
-
}
|
|
883
|
-
};
|
|
884
|
-
}
|
|
885
|
-
// If this is a dynamic route with PPR enabled and the default route
|
|
886
|
-
// matches were set, then we should pass the fallback route params to
|
|
887
|
-
// the renderer as this is a fallback revalidation request.
|
|
888
|
-
const fallbackRouteParams = pageIsDynamic && isRoutePPREnabled && ((0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__.getRequestMeta)(req, 'renderFallbackShell') || isDebugFallbackShell) ? (0,next_dist_server_request_fallback_params__WEBPACK_IMPORTED_MODULE_10__/* .getFallbackRouteParams */ .u)(pathname) : null;
|
|
889
|
-
// Perform the render.
|
|
890
|
-
return doRender({
|
|
891
|
-
span,
|
|
892
|
-
postponed,
|
|
893
|
-
fallbackRouteParams
|
|
894
|
-
});
|
|
895
|
-
};
|
|
896
|
-
const handleResponse = async (span)=>{
|
|
897
|
-
var _cacheEntry_value, _cachedData_headers;
|
|
898
|
-
const cacheEntry = await routeModule.handleResponse({
|
|
899
|
-
cacheKey: ssgCacheKey,
|
|
900
|
-
responseGenerator: (c)=>responseGenerator({
|
|
901
|
-
span,
|
|
902
|
-
...c
|
|
903
|
-
}),
|
|
904
|
-
routeKind: next_dist_server_route_kind__WEBPACK_IMPORTED_MODULE_1__.RouteKind.APP_PAGE,
|
|
905
|
-
isOnDemandRevalidate,
|
|
906
|
-
isRoutePPREnabled,
|
|
907
|
-
req,
|
|
908
|
-
nextConfig,
|
|
909
|
-
prerenderManifest,
|
|
910
|
-
waitUntil: ctx.waitUntil
|
|
911
|
-
});
|
|
912
|
-
if (isDraftMode) {
|
|
913
|
-
res.setHeader('Cache-Control', 'private, no-cache, no-store, max-age=0, must-revalidate');
|
|
914
|
-
}
|
|
915
|
-
// In dev, we should not cache pages for any reason.
|
|
916
|
-
if (routeModule.isDev) {
|
|
917
|
-
res.setHeader('Cache-Control', 'no-store, must-revalidate');
|
|
918
|
-
}
|
|
919
|
-
if (!cacheEntry) {
|
|
920
|
-
if (ssgCacheKey) {
|
|
921
|
-
// A cache entry might not be generated if a response is written
|
|
922
|
-
// in `getInitialProps` or `getServerSideProps`, but those shouldn't
|
|
923
|
-
// have a cache key. If we do have a cache key but we don't end up
|
|
924
|
-
// with a cache entry, then either Next.js or the application has a
|
|
925
|
-
// bug that needs fixing.
|
|
926
|
-
throw Object.defineProperty(new Error('invariant: cache entry required but not generated'), "__NEXT_ERROR_CODE", {
|
|
927
|
-
value: "E62",
|
|
928
|
-
enumerable: false,
|
|
929
|
-
configurable: true
|
|
930
|
-
});
|
|
931
|
-
}
|
|
932
|
-
return null;
|
|
933
|
-
}
|
|
934
|
-
if (((_cacheEntry_value = cacheEntry.value) == null ? void 0 : _cacheEntry_value.kind) !== next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_18__.CachedRouteKind.APP_PAGE) {
|
|
935
|
-
var _cacheEntry_value1;
|
|
936
|
-
throw Object.defineProperty(new Error(`Invariant app-page handler received invalid cache entry ${(_cacheEntry_value1 = cacheEntry.value) == null ? void 0 : _cacheEntry_value1.kind}`), "__NEXT_ERROR_CODE", {
|
|
937
|
-
value: "E707",
|
|
938
|
-
enumerable: false,
|
|
939
|
-
configurable: true
|
|
940
|
-
});
|
|
941
|
-
}
|
|
942
|
-
const didPostpone = typeof cacheEntry.value.postponed === 'string';
|
|
943
|
-
if (isSSG && // We don't want to send a cache header for requests that contain dynamic
|
|
944
|
-
// data. If this is a Dynamic RSC request or wasn't a Prefetch RSC
|
|
945
|
-
// request, then we should set the cache header.
|
|
946
|
-
!isDynamicRSCRequest && (!didPostpone || isPrefetchRSCRequest)) {
|
|
947
|
-
if (!minimalMode) {
|
|
948
|
-
// set x-nextjs-cache header to match the header
|
|
949
|
-
// we set for the image-optimizer
|
|
950
|
-
res.setHeader('x-nextjs-cache', isOnDemandRevalidate ? 'REVALIDATED' : cacheEntry.isMiss ? 'MISS' : cacheEntry.isStale ? 'STALE' : 'HIT');
|
|
951
|
-
}
|
|
952
|
-
// Set a header used by the client router to signal the response is static
|
|
953
|
-
// and should respect the `static` cache staleTime value.
|
|
954
|
-
res.setHeader(next_dist_client_components_app_router_headers__WEBPACK_IMPORTED_MODULE_16__.NEXT_IS_PRERENDER_HEADER, '1');
|
|
955
|
-
}
|
|
956
|
-
const { value: cachedData } = cacheEntry;
|
|
957
|
-
// Coerce the cache control parameter from the render.
|
|
958
|
-
let cacheControl;
|
|
959
|
-
// If this is a resume request in minimal mode it is streamed with dynamic
|
|
960
|
-
// content and should not be cached.
|
|
961
|
-
if (minimalPostponed) {
|
|
962
|
-
cacheControl = {
|
|
963
|
-
revalidate: 0,
|
|
964
|
-
expire: undefined
|
|
965
|
-
};
|
|
966
|
-
} else if (minimalMode && isRSCRequest && !isPrefetchRSCRequest && isRoutePPREnabled) {
|
|
967
|
-
cacheControl = {
|
|
968
|
-
revalidate: 0,
|
|
969
|
-
expire: undefined
|
|
970
|
-
};
|
|
971
|
-
} else if (!routeModule.isDev) {
|
|
972
|
-
// If this is a preview mode request, we shouldn't cache it
|
|
973
|
-
if (isDraftMode) {
|
|
974
|
-
cacheControl = {
|
|
975
|
-
revalidate: 0,
|
|
976
|
-
expire: undefined
|
|
977
|
-
};
|
|
978
|
-
} else if (!isSSG) {
|
|
979
|
-
if (!res.getHeader('Cache-Control')) {
|
|
980
|
-
cacheControl = {
|
|
981
|
-
revalidate: 0,
|
|
982
|
-
expire: undefined
|
|
983
|
-
};
|
|
984
|
-
}
|
|
985
|
-
} else if (cacheEntry.cacheControl) {
|
|
986
|
-
// If the cache entry has a cache control with a revalidate value that's
|
|
987
|
-
// a number, use it.
|
|
988
|
-
if (typeof cacheEntry.cacheControl.revalidate === 'number') {
|
|
989
|
-
var _cacheEntry_cacheControl;
|
|
990
|
-
if (cacheEntry.cacheControl.revalidate < 1) {
|
|
991
|
-
throw Object.defineProperty(new Error(`Invalid revalidate configuration provided: ${cacheEntry.cacheControl.revalidate} < 1`), "__NEXT_ERROR_CODE", {
|
|
992
|
-
value: "E22",
|
|
993
|
-
enumerable: false,
|
|
994
|
-
configurable: true
|
|
995
|
-
});
|
|
996
|
-
}
|
|
997
|
-
cacheControl = {
|
|
998
|
-
revalidate: cacheEntry.cacheControl.revalidate,
|
|
999
|
-
expire: ((_cacheEntry_cacheControl = cacheEntry.cacheControl) == null ? void 0 : _cacheEntry_cacheControl.expire) ?? nextConfig.expireTime
|
|
1000
|
-
};
|
|
1001
|
-
} else {
|
|
1002
|
-
cacheControl = {
|
|
1003
|
-
revalidate: next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_21__.CACHE_ONE_YEAR,
|
|
1004
|
-
expire: undefined
|
|
1005
|
-
};
|
|
1006
|
-
}
|
|
1007
|
-
}
|
|
1008
|
-
}
|
|
1009
|
-
cacheEntry.cacheControl = cacheControl;
|
|
1010
|
-
if (typeof segmentPrefetchHeader === 'string' && (cachedData == null ? void 0 : cachedData.kind) === next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_18__.CachedRouteKind.APP_PAGE && cachedData.segmentData) {
|
|
1011
|
-
var _cachedData_headers1;
|
|
1012
|
-
// This is a prefetch request issued by the client Segment Cache. These
|
|
1013
|
-
// should never reach the application layer (lambda). We should either
|
|
1014
|
-
// respond from the cache (HIT) or respond with 204 No Content (MISS).
|
|
1015
|
-
// Set a header to indicate that PPR is enabled for this route. This
|
|
1016
|
-
// lets the client distinguish between a regular cache miss and a cache
|
|
1017
|
-
// miss due to PPR being disabled. In other contexts this header is used
|
|
1018
|
-
// to indicate that the response contains dynamic data, but here we're
|
|
1019
|
-
// only using it to indicate that the feature is enabled — the segment
|
|
1020
|
-
// response itself contains whether the data is dynamic.
|
|
1021
|
-
res.setHeader(next_dist_client_components_app_router_headers__WEBPACK_IMPORTED_MODULE_16__.NEXT_DID_POSTPONE_HEADER, '2');
|
|
1022
|
-
// Add the cache tags header to the response if it exists and we're in
|
|
1023
|
-
// minimal mode while rendering a static page.
|
|
1024
|
-
const tags = (_cachedData_headers1 = cachedData.headers) == null ? void 0 : _cachedData_headers1[next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_21__.NEXT_CACHE_TAGS_HEADER];
|
|
1025
|
-
if (minimalMode && isSSG && tags && typeof tags === 'string') {
|
|
1026
|
-
res.setHeader(next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_21__.NEXT_CACHE_TAGS_HEADER, tags);
|
|
1027
|
-
}
|
|
1028
|
-
const matchedSegment = cachedData.segmentData.get(segmentPrefetchHeader);
|
|
1029
|
-
if (matchedSegment !== undefined) {
|
|
1030
|
-
// Cache hit
|
|
1031
|
-
return (0,next_dist_server_send_payload__WEBPACK_IMPORTED_MODULE_23__.sendRenderResult)({
|
|
1032
|
-
req,
|
|
1033
|
-
res,
|
|
1034
|
-
generateEtags: nextConfig.generateEtags,
|
|
1035
|
-
poweredByHeader: nextConfig.poweredByHeader,
|
|
1036
|
-
result: next_dist_server_render_result__WEBPACK_IMPORTED_MODULE_20__["default"].fromStatic(matchedSegment, next_dist_client_components_app_router_headers__WEBPACK_IMPORTED_MODULE_16__.RSC_CONTENT_TYPE_HEADER),
|
|
1037
|
-
cacheControl: cacheEntry.cacheControl
|
|
1038
|
-
});
|
|
1039
|
-
}
|
|
1040
|
-
// Cache miss. Either a cache entry for this route has not been generated
|
|
1041
|
-
// (which technically should not be possible when PPR is enabled, because
|
|
1042
|
-
// at a minimum there should always be a fallback entry) or there's no
|
|
1043
|
-
// match for the requested segment. Respond with a 204 No Content. We
|
|
1044
|
-
// don't bother to respond with 404, because these requests are only
|
|
1045
|
-
// issued as part of a prefetch.
|
|
1046
|
-
res.statusCode = 204;
|
|
1047
|
-
return (0,next_dist_server_send_payload__WEBPACK_IMPORTED_MODULE_23__.sendRenderResult)({
|
|
1048
|
-
req,
|
|
1049
|
-
res,
|
|
1050
|
-
generateEtags: nextConfig.generateEtags,
|
|
1051
|
-
poweredByHeader: nextConfig.poweredByHeader,
|
|
1052
|
-
result: next_dist_server_render_result__WEBPACK_IMPORTED_MODULE_20__["default"].EMPTY,
|
|
1053
|
-
cacheControl: cacheEntry.cacheControl
|
|
1054
|
-
});
|
|
1055
|
-
}
|
|
1056
|
-
// If there's a callback for `onCacheEntry`, call it with the cache entry
|
|
1057
|
-
// and the revalidate options.
|
|
1058
|
-
const onCacheEntry = (0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__.getRequestMeta)(req, 'onCacheEntry');
|
|
1059
|
-
if (onCacheEntry) {
|
|
1060
|
-
const finished = await onCacheEntry({
|
|
1061
|
-
...cacheEntry,
|
|
1062
|
-
// TODO: remove this when upstream doesn't
|
|
1063
|
-
// always expect this value to be "PAGE"
|
|
1064
|
-
value: {
|
|
1065
|
-
...cacheEntry.value,
|
|
1066
|
-
kind: 'PAGE'
|
|
1067
|
-
}
|
|
1068
|
-
}, {
|
|
1069
|
-
url: (0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__.getRequestMeta)(req, 'initURL')
|
|
1070
|
-
});
|
|
1071
|
-
if (finished) {
|
|
1072
|
-
// TODO: maybe we have to end the request?
|
|
1073
|
-
return null;
|
|
1074
|
-
}
|
|
1075
|
-
}
|
|
1076
|
-
// If the request has a postponed state and it's a resume request we
|
|
1077
|
-
// should error.
|
|
1078
|
-
if (didPostpone && minimalPostponed) {
|
|
1079
|
-
throw Object.defineProperty(new Error('Invariant: postponed state should not be present on a resume request'), "__NEXT_ERROR_CODE", {
|
|
1080
|
-
value: "E396",
|
|
1081
|
-
enumerable: false,
|
|
1082
|
-
configurable: true
|
|
1083
|
-
});
|
|
1084
|
-
}
|
|
1085
|
-
if (cachedData.headers) {
|
|
1086
|
-
const headers = {
|
|
1087
|
-
...cachedData.headers
|
|
1088
|
-
};
|
|
1089
|
-
if (!minimalMode || !isSSG) {
|
|
1090
|
-
delete headers[next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_21__.NEXT_CACHE_TAGS_HEADER];
|
|
1091
|
-
}
|
|
1092
|
-
for (let [key, value] of Object.entries(headers)){
|
|
1093
|
-
if (typeof value === 'undefined') continue;
|
|
1094
|
-
if (Array.isArray(value)) {
|
|
1095
|
-
for (const v of value){
|
|
1096
|
-
res.appendHeader(key, v);
|
|
1097
|
-
}
|
|
1098
|
-
} else if (typeof value === 'number') {
|
|
1099
|
-
value = value.toString();
|
|
1100
|
-
res.appendHeader(key, value);
|
|
1101
|
-
} else {
|
|
1102
|
-
res.appendHeader(key, value);
|
|
1103
|
-
}
|
|
1104
|
-
}
|
|
1105
|
-
}
|
|
1106
|
-
// Add the cache tags header to the response if it exists and we're in
|
|
1107
|
-
// minimal mode while rendering a static page.
|
|
1108
|
-
const tags = (_cachedData_headers = cachedData.headers) == null ? void 0 : _cachedData_headers[next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_21__.NEXT_CACHE_TAGS_HEADER];
|
|
1109
|
-
if (minimalMode && isSSG && tags && typeof tags === 'string') {
|
|
1110
|
-
res.setHeader(next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_21__.NEXT_CACHE_TAGS_HEADER, tags);
|
|
1111
|
-
}
|
|
1112
|
-
// If the request is a data request, then we shouldn't set the status code
|
|
1113
|
-
// from the response because it should always be 200. This should be gated
|
|
1114
|
-
// behind the experimental PPR flag.
|
|
1115
|
-
if (cachedData.status && (!isRSCRequest || !isRoutePPREnabled)) {
|
|
1116
|
-
res.statusCode = cachedData.status;
|
|
1117
|
-
}
|
|
1118
|
-
// Redirect information is encoded in RSC payload, so we don't need to use redirect status codes
|
|
1119
|
-
if (!minimalMode && cachedData.status && next_dist_client_components_redirect_status_code__WEBPACK_IMPORTED_MODULE_27__.RedirectStatusCode[cachedData.status] && isRSCRequest) {
|
|
1120
|
-
res.statusCode = 200;
|
|
1121
|
-
}
|
|
1122
|
-
// Mark that the request did postpone.
|
|
1123
|
-
if (didPostpone) {
|
|
1124
|
-
res.setHeader(next_dist_client_components_app_router_headers__WEBPACK_IMPORTED_MODULE_16__.NEXT_DID_POSTPONE_HEADER, '1');
|
|
1125
|
-
}
|
|
1126
|
-
// we don't go through this block when preview mode is true
|
|
1127
|
-
// as preview mode is a dynamic request (bypasses cache) and doesn't
|
|
1128
|
-
// generate both HTML and payloads in the same request so continue to just
|
|
1129
|
-
// return the generated payload
|
|
1130
|
-
if (isRSCRequest && !isDraftMode) {
|
|
1131
|
-
// If this is a dynamic RSC request, then stream the response.
|
|
1132
|
-
if (typeof cachedData.rscData === 'undefined') {
|
|
1133
|
-
if (cachedData.postponed) {
|
|
1134
|
-
throw Object.defineProperty(new Error('Invariant: Expected postponed to be undefined'), "__NEXT_ERROR_CODE", {
|
|
1135
|
-
value: "E372",
|
|
1136
|
-
enumerable: false,
|
|
1137
|
-
configurable: true
|
|
1138
|
-
});
|
|
1139
|
-
}
|
|
1140
|
-
return (0,next_dist_server_send_payload__WEBPACK_IMPORTED_MODULE_23__.sendRenderResult)({
|
|
1141
|
-
req,
|
|
1142
|
-
res,
|
|
1143
|
-
generateEtags: nextConfig.generateEtags,
|
|
1144
|
-
poweredByHeader: nextConfig.poweredByHeader,
|
|
1145
|
-
result: cachedData.html,
|
|
1146
|
-
// Dynamic RSC responses cannot be cached, even if they're
|
|
1147
|
-
// configured with `force-static` because we have no way of
|
|
1148
|
-
// distinguishing between `force-static` and pages that have no
|
|
1149
|
-
// postponed state.
|
|
1150
|
-
// TODO: distinguish `force-static` from pages with no postponed state (static)
|
|
1151
|
-
cacheControl: isDynamicRSCRequest ? {
|
|
1152
|
-
revalidate: 0,
|
|
1153
|
-
expire: undefined
|
|
1154
|
-
} : cacheEntry.cacheControl
|
|
1155
|
-
});
|
|
1156
|
-
}
|
|
1157
|
-
// As this isn't a prefetch request, we should serve the static flight
|
|
1158
|
-
// data.
|
|
1159
|
-
return (0,next_dist_server_send_payload__WEBPACK_IMPORTED_MODULE_23__.sendRenderResult)({
|
|
1160
|
-
req,
|
|
1161
|
-
res,
|
|
1162
|
-
generateEtags: nextConfig.generateEtags,
|
|
1163
|
-
poweredByHeader: nextConfig.poweredByHeader,
|
|
1164
|
-
result: next_dist_server_render_result__WEBPACK_IMPORTED_MODULE_20__["default"].fromStatic(cachedData.rscData, next_dist_client_components_app_router_headers__WEBPACK_IMPORTED_MODULE_16__.RSC_CONTENT_TYPE_HEADER),
|
|
1165
|
-
cacheControl: cacheEntry.cacheControl
|
|
1166
|
-
});
|
|
1167
|
-
}
|
|
1168
|
-
// This is a request for HTML data.
|
|
1169
|
-
let body = cachedData.html;
|
|
1170
|
-
// If there's no postponed state, we should just serve the HTML. This
|
|
1171
|
-
// should also be the case for a resume request because it's completed
|
|
1172
|
-
// as a server render (rather than a static render).
|
|
1173
|
-
if (!didPostpone || minimalMode || isRSCRequest) {
|
|
1174
|
-
// If we're in test mode, we should add a sentinel chunk to the response
|
|
1175
|
-
// that's between the static and dynamic parts so we can compare the
|
|
1176
|
-
// chunks and add assertions.
|
|
1177
|
-
if (false) {}
|
|
1178
|
-
return (0,next_dist_server_send_payload__WEBPACK_IMPORTED_MODULE_23__.sendRenderResult)({
|
|
1179
|
-
req,
|
|
1180
|
-
res,
|
|
1181
|
-
generateEtags: nextConfig.generateEtags,
|
|
1182
|
-
poweredByHeader: nextConfig.poweredByHeader,
|
|
1183
|
-
result: body,
|
|
1184
|
-
cacheControl: cacheEntry.cacheControl
|
|
1185
|
-
});
|
|
1186
|
-
}
|
|
1187
|
-
// If we're debugging the static shell or the dynamic API accesses, we
|
|
1188
|
-
// should just serve the HTML without resuming the render. The returned
|
|
1189
|
-
// HTML will be the static shell so all the Dynamic API's will be used
|
|
1190
|
-
// during static generation.
|
|
1191
|
-
if (isDebugStaticShell || isDebugDynamicAccesses) {
|
|
1192
|
-
// Since we're not resuming the render, we need to at least add the
|
|
1193
|
-
// closing body and html tags to create valid HTML.
|
|
1194
|
-
body.push(new ReadableStream({
|
|
1195
|
-
start (controller) {
|
|
1196
|
-
controller.enqueue(next_dist_server_stream_utils_encoded_tags__WEBPACK_IMPORTED_MODULE_22__.ENCODED_TAGS.CLOSED.BODY_AND_HTML);
|
|
1197
|
-
controller.close();
|
|
1198
|
-
}
|
|
1199
|
-
}));
|
|
1200
|
-
return (0,next_dist_server_send_payload__WEBPACK_IMPORTED_MODULE_23__.sendRenderResult)({
|
|
1201
|
-
req,
|
|
1202
|
-
res,
|
|
1203
|
-
generateEtags: nextConfig.generateEtags,
|
|
1204
|
-
poweredByHeader: nextConfig.poweredByHeader,
|
|
1205
|
-
result: body,
|
|
1206
|
-
cacheControl: {
|
|
1207
|
-
revalidate: 0,
|
|
1208
|
-
expire: undefined
|
|
1209
|
-
}
|
|
1210
|
-
});
|
|
1211
|
-
}
|
|
1212
|
-
// If we're in test mode, we should add a sentinel chunk to the response
|
|
1213
|
-
// that's between the static and dynamic parts so we can compare the
|
|
1214
|
-
// chunks and add assertions.
|
|
1215
|
-
if (false) {}
|
|
1216
|
-
// This request has postponed, so let's create a new transformer that the
|
|
1217
|
-
// dynamic data can pipe to that will attach the dynamic data to the end
|
|
1218
|
-
// of the response.
|
|
1219
|
-
const transformer = new TransformStream();
|
|
1220
|
-
body.push(transformer.readable);
|
|
1221
|
-
// Perform the render again, but this time, provide the postponed state.
|
|
1222
|
-
// We don't await because we want the result to start streaming now, and
|
|
1223
|
-
// we've already chained the transformer's readable to the render result.
|
|
1224
|
-
doRender({
|
|
1225
|
-
span,
|
|
1226
|
-
postponed: cachedData.postponed,
|
|
1227
|
-
// This is a resume render, not a fallback render, so we don't need to
|
|
1228
|
-
// set this.
|
|
1229
|
-
fallbackRouteParams: null
|
|
1230
|
-
}).then(async (result)=>{
|
|
1231
|
-
var _result_value;
|
|
1232
|
-
if (!result) {
|
|
1233
|
-
throw Object.defineProperty(new Error('Invariant: expected a result to be returned'), "__NEXT_ERROR_CODE", {
|
|
1234
|
-
value: "E463",
|
|
1235
|
-
enumerable: false,
|
|
1236
|
-
configurable: true
|
|
1237
|
-
});
|
|
1238
|
-
}
|
|
1239
|
-
if (((_result_value = result.value) == null ? void 0 : _result_value.kind) !== next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_18__.CachedRouteKind.APP_PAGE) {
|
|
1240
|
-
var _result_value1;
|
|
1241
|
-
throw Object.defineProperty(new Error(`Invariant: expected a page response, got ${(_result_value1 = result.value) == null ? void 0 : _result_value1.kind}`), "__NEXT_ERROR_CODE", {
|
|
1242
|
-
value: "E305",
|
|
1243
|
-
enumerable: false,
|
|
1244
|
-
configurable: true
|
|
1245
|
-
});
|
|
1246
|
-
}
|
|
1247
|
-
// Pipe the resume result to the transformer.
|
|
1248
|
-
await result.value.html.pipeTo(transformer.writable);
|
|
1249
|
-
}).catch((err)=>{
|
|
1250
|
-
// An error occurred during piping or preparing the render, abort
|
|
1251
|
-
// the transformers writer so we can terminate the stream.
|
|
1252
|
-
transformer.writable.abort(err).catch((e)=>{
|
|
1253
|
-
console.error("couldn't abort transformer", e);
|
|
1254
|
-
});
|
|
1255
|
-
});
|
|
1256
|
-
return (0,next_dist_server_send_payload__WEBPACK_IMPORTED_MODULE_23__.sendRenderResult)({
|
|
1257
|
-
req,
|
|
1258
|
-
res,
|
|
1259
|
-
generateEtags: nextConfig.generateEtags,
|
|
1260
|
-
poweredByHeader: nextConfig.poweredByHeader,
|
|
1261
|
-
result: body,
|
|
1262
|
-
// We don't want to cache the response if it has postponed data because
|
|
1263
|
-
// the response being sent to the client it's dynamic parts are streamed
|
|
1264
|
-
// to the client on the same request.
|
|
1265
|
-
cacheControl: {
|
|
1266
|
-
revalidate: 0,
|
|
1267
|
-
expire: undefined
|
|
1268
|
-
}
|
|
1269
|
-
});
|
|
1270
|
-
};
|
|
1271
|
-
// TODO: activeSpan code path is for when wrapped by
|
|
1272
|
-
// next-server can be removed when this is no longer used
|
|
1273
|
-
if (activeSpan) {
|
|
1274
|
-
await handleResponse(activeSpan);
|
|
1275
|
-
} else {
|
|
1276
|
-
return await tracer.withPropagatedContext(req.headers, ()=>tracer.trace(next_dist_server_lib_trace_constants__WEBPACK_IMPORTED_MODULE_5__.BaseServerSpan.handleRequest, {
|
|
1277
|
-
spanName: `${method} ${req.url}`,
|
|
1278
|
-
kind: next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_3__.SpanKind.SERVER,
|
|
1279
|
-
attributes: {
|
|
1280
|
-
'http.method': method,
|
|
1281
|
-
'http.target': req.url
|
|
1282
|
-
}
|
|
1283
|
-
}, handleResponse));
|
|
1284
|
-
}
|
|
1285
|
-
} catch (err) {
|
|
1286
|
-
if (!(err instanceof next_dist_shared_lib_no_fallback_error_external__WEBPACK_IMPORTED_MODULE_24__.NoFallbackError)) {
|
|
1287
|
-
await routeModule.onRequestError(req, err, {
|
|
1288
|
-
routerKind: 'App Router',
|
|
1289
|
-
routePath: srcPage,
|
|
1290
|
-
routeType: 'render',
|
|
1291
|
-
revalidateReason: (0,next_dist_server_instrumentation_utils__WEBPACK_IMPORTED_MODULE_2__/* .getRevalidateReason */ .c)({
|
|
1292
|
-
isRevalidate: isSSG,
|
|
1293
|
-
isOnDemandRevalidate
|
|
1294
|
-
})
|
|
1295
|
-
}, routerServerContext);
|
|
1296
|
-
}
|
|
1297
|
-
// rethrow so that we can handle serving error page
|
|
1298
|
-
throw err;
|
|
1299
|
-
}
|
|
1300
|
-
}
|
|
1301
|
-
// TODO: omit this from production builds, only test builds should include it
|
|
1302
|
-
/**
|
|
1303
|
-
* Creates a readable stream that emits a PPR boundary sentinel.
|
|
1304
|
-
*
|
|
1305
|
-
* @returns A readable stream that emits a PPR boundary sentinel.
|
|
1306
|
-
*/ function createPPRBoundarySentinel() {
|
|
1307
|
-
return new ReadableStream({
|
|
1308
|
-
start (controller) {
|
|
1309
|
-
controller.enqueue(new TextEncoder().encode('<!-- PPR_BOUNDARY_SENTINEL -->'));
|
|
1310
|
-
controller.close();
|
|
1311
|
-
}
|
|
1312
|
-
});
|
|
1313
|
-
}
|
|
1314
|
-
|
|
1315
|
-
//# sourceMappingURL=app-page.js.map
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
/***/ }),
|
|
1319
|
-
|
|
1320
|
-
/***/ 3919:
|
|
1321
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
1322
|
-
|
|
1323
|
-
"use strict";
|
|
1324
|
-
|
|
1325
|
-
// EXPORTS
|
|
1326
|
-
__webpack_require__.d(__webpack_exports__, {
|
|
1327
|
-
As: () => (/* binding */ useAuth)
|
|
1328
|
-
});
|
|
1329
|
-
|
|
1330
|
-
// UNUSED EXPORTS: usePermissions, useUserPreferences
|
|
1331
|
-
|
|
1332
|
-
// EXTERNAL MODULE: ../../node_modules/next-auth/react/index.js
|
|
1333
|
-
var react = __webpack_require__(16422);
|
|
1334
|
-
// EXTERNAL MODULE: ../../node_modules/next/dist/server/route-modules/app-page/vendored/ssr/react.js
|
|
1335
|
-
var ssr_react = __webpack_require__(31768);
|
|
1336
|
-
// EXTERNAL MODULE: ../../packages/api-client/dist/index.js
|
|
1337
|
-
var dist = __webpack_require__(19208);
|
|
1338
|
-
;// __barrel_optimize__?names=JWTTokenSchema,validateData!=!../../packages/api-client/dist/index.js
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
;// ./src/hooks/useAuth.ts
|
|
1342
|
-
/* __next_internal_client_entry_do_not_use__ useAuth,useUserPreferences,usePermissions auto */
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
/**
|
|
1346
|
-
* Enhanced authentication hook with validation and user information
|
|
1347
|
-
*/ function useAuth() {
|
|
1348
|
-
const { data: session, status } = (0,react.useSession)();
|
|
1349
|
-
const authInfo = (0,ssr_react.useMemo)(()=>{
|
|
1350
|
-
const isLoading = status === 'loading';
|
|
1351
|
-
const isAuthenticated = !!session?.user;
|
|
1352
|
-
// Validate backend token if present
|
|
1353
|
-
const hasValidBackendToken = session?.backendToken ? (0,dist/* validateData */.lv)(dist/* JWTTokenSchema */.k3, session.backendToken).success : false;
|
|
1354
|
-
return {
|
|
1355
|
-
// Session data
|
|
1356
|
-
session,
|
|
1357
|
-
user: session?.user,
|
|
1358
|
-
backendUser: session?.backendUser,
|
|
1359
|
-
// Status flags
|
|
1360
|
-
isLoading,
|
|
1361
|
-
isAuthenticated,
|
|
1362
|
-
hasValidBackendToken,
|
|
1363
|
-
// Computed properties
|
|
1364
|
-
userDomain: session?.backendUser?.domain || session?.user?.email?.split('@')[1],
|
|
1365
|
-
displayName: session?.user?.name || session?.user?.email?.split('@')[0] || 'User',
|
|
1366
|
-
avatarUrl: session?.user?.image,
|
|
1367
|
-
isAdmin: session?.backendUser?.isAdmin || false,
|
|
1368
|
-
isModerator: session?.backendUser?.isModerator || false,
|
|
1369
|
-
// Combined auth status
|
|
1370
|
-
isFullyAuthenticated: isAuthenticated && hasValidBackendToken
|
|
1371
|
-
};
|
|
1372
|
-
}, [
|
|
1373
|
-
session,
|
|
1374
|
-
status
|
|
1375
|
-
]);
|
|
1376
|
-
return authInfo;
|
|
1377
|
-
}
|
|
1378
|
-
/**
|
|
1379
|
-
* Hook for getting user preferences and settings
|
|
1380
|
-
*/ function useUserPreferences() {
|
|
1381
|
-
const { session } = useAuth();
|
|
1382
|
-
return useMemo(()=>{
|
|
1383
|
-
// In the future, this could fetch user preferences from backend
|
|
1384
|
-
// For now, return defaults
|
|
1385
|
-
return {
|
|
1386
|
-
theme: 'system',
|
|
1387
|
-
language: 'en',
|
|
1388
|
-
timezone: Intl.DateTimeFormat().resolvedOptions().timeZone,
|
|
1389
|
-
emailNotifications: true
|
|
1390
|
-
};
|
|
1391
|
-
}, [
|
|
1392
|
-
session
|
|
1393
|
-
]);
|
|
1394
|
-
}
|
|
1395
|
-
/**
|
|
1396
|
-
* Hook for checking user permissions (future expansion)
|
|
1397
|
-
*/ function usePermissions() {
|
|
1398
|
-
const { backendUser, isFullyAuthenticated } = useAuth();
|
|
1399
|
-
return useMemo(()=>{
|
|
1400
|
-
if (!isFullyAuthenticated || !backendUser) {
|
|
1401
|
-
return {
|
|
1402
|
-
canRead: false,
|
|
1403
|
-
canWrite: false,
|
|
1404
|
-
canAdmin: false,
|
|
1405
|
-
canManageUsers: false
|
|
1406
|
-
};
|
|
1407
|
-
}
|
|
1408
|
-
// Basic permissions - in the future this would come from backend
|
|
1409
|
-
return {
|
|
1410
|
-
canRead: true,
|
|
1411
|
-
canWrite: true,
|
|
1412
|
-
canAdmin: false,
|
|
1413
|
-
canManageUsers: false
|
|
1414
|
-
};
|
|
1415
|
-
}, [
|
|
1416
|
-
backendUser,
|
|
1417
|
-
isFullyAuthenticated
|
|
1418
|
-
]);
|
|
1419
|
-
}
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
/***/ }),
|
|
1423
|
-
|
|
1424
|
-
/***/ 10846:
|
|
1425
|
-
/***/ ((module) => {
|
|
1426
|
-
|
|
1427
|
-
"use strict";
|
|
1428
|
-
module.exports = require("next/dist/compiled/next-server/app-page.runtime.prod.js");
|
|
1429
|
-
|
|
1430
|
-
/***/ }),
|
|
1431
|
-
|
|
1432
|
-
/***/ 19121:
|
|
1433
|
-
/***/ ((module) => {
|
|
1434
|
-
|
|
1435
|
-
"use strict";
|
|
1436
|
-
module.exports = require("next/dist/server/app-render/action-async-storage.external.js");
|
|
1437
|
-
|
|
1438
|
-
/***/ }),
|
|
1439
|
-
|
|
1440
|
-
/***/ 19771:
|
|
1441
|
-
/***/ ((module) => {
|
|
796
|
+
})
|
|
797
|
+
});
|
|
798
|
+
}
|
|
1442
799
|
|
|
1443
|
-
"use strict";
|
|
1444
|
-
module.exports = require("process");
|
|
1445
800
|
|
|
1446
801
|
/***/ }),
|
|
1447
802
|
|
|
1448
|
-
/***/
|
|
803
|
+
/***/ 75555:
|
|
1449
804
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
1450
805
|
|
|
1451
806
|
"use strict";
|
|
@@ -1458,386 +813,1031 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
1458
813
|
// This file is generated by the Webpack next-flight-loader.
|
|
1459
814
|
|
|
1460
815
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ((0,react_server_dom_webpack_server__WEBPACK_IMPORTED_MODULE_0__.registerClientReference)(
|
|
1461
|
-
function() { throw new Error("Attempted to call the default export of \"/
|
|
1462
|
-
"/
|
|
816
|
+
function() { throw new Error("Attempted to call the default export of \"/home/runner/work/semiont/semiont/apps/frontend/src/app/[locale]/moderate/layout.tsx\" from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component."); },
|
|
817
|
+
"/home/runner/work/semiont/semiont/apps/frontend/src/app/[locale]/moderate/layout.tsx",
|
|
1463
818
|
"default",
|
|
1464
819
|
));
|
|
1465
820
|
|
|
1466
821
|
|
|
1467
822
|
/***/ }),
|
|
1468
823
|
|
|
1469
|
-
/***/
|
|
1470
|
-
/***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
|
|
1471
|
-
|
|
1472
|
-
Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 19948));
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
/***/ }),
|
|
1476
|
-
|
|
1477
|
-
/***/ 26713:
|
|
1478
|
-
/***/ ((module) => {
|
|
1479
|
-
|
|
1480
|
-
"use strict";
|
|
1481
|
-
module.exports = require("next/dist/shared/lib/router/utils/is-bot");
|
|
1482
|
-
|
|
1483
|
-
/***/ }),
|
|
1484
|
-
|
|
1485
|
-
/***/ 28354:
|
|
1486
|
-
/***/ ((module) => {
|
|
1487
|
-
|
|
1488
|
-
"use strict";
|
|
1489
|
-
module.exports = require("util");
|
|
1490
|
-
|
|
1491
|
-
/***/ }),
|
|
1492
|
-
|
|
1493
|
-
/***/ 29294:
|
|
1494
|
-
/***/ ((module) => {
|
|
1495
|
-
|
|
1496
|
-
"use strict";
|
|
1497
|
-
module.exports = require("next/dist/server/app-render/work-async-storage.external.js");
|
|
1498
|
-
|
|
1499
|
-
/***/ }),
|
|
1500
|
-
|
|
1501
|
-
/***/ 31967:
|
|
824
|
+
/***/ 78305:
|
|
1502
825
|
/***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
|
|
1503
826
|
|
|
1504
|
-
Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__,
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
/***/ }),
|
|
1508
|
-
|
|
1509
|
-
/***/ 33873:
|
|
1510
|
-
/***/ ((module) => {
|
|
827
|
+
Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 90589));
|
|
1511
828
|
|
|
1512
|
-
"use strict";
|
|
1513
|
-
module.exports = require("path");
|
|
1514
829
|
|
|
1515
830
|
/***/ }),
|
|
1516
831
|
|
|
1517
|
-
/***/
|
|
832
|
+
/***/ 79377:
|
|
1518
833
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
1519
834
|
|
|
1520
835
|
"use strict";
|
|
836
|
+
__webpack_require__.r(__webpack_exports__);
|
|
1521
837
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
1522
|
-
/* harmony export */
|
|
1523
|
-
/* harmony export */
|
|
1524
|
-
/* harmony export */
|
|
1525
|
-
/* harmony export */
|
|
838
|
+
/* harmony export */ GlobalError: () => (/* reexport safe */ _home_runner_work_semiont_semiont_apps_frontend_src_app_global_error_tsx__WEBPACK_IMPORTED_MODULE_25__["default"]),
|
|
839
|
+
/* harmony export */ __next_app__: () => (/* binding */ __next_app__),
|
|
840
|
+
/* harmony export */ handler: () => (/* binding */ handler),
|
|
841
|
+
/* harmony export */ pages: () => (/* binding */ pages),
|
|
842
|
+
/* harmony export */ routeModule: () => (/* binding */ routeModule),
|
|
843
|
+
/* harmony export */ tree: () => (/* binding */ tree)
|
|
1526
844
|
/* harmony export */ });
|
|
1527
|
-
/* harmony import */ var
|
|
845
|
+
/* harmony import */ var next_dist_server_route_modules_app_page_module_compiled__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(73653);
|
|
846
|
+
/* harmony import */ var next_dist_server_route_modules_app_page_module_compiled__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_route_modules_app_page_module_compiled__WEBPACK_IMPORTED_MODULE_0__);
|
|
847
|
+
/* harmony import */ var next_dist_server_route_kind__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(97714);
|
|
848
|
+
/* harmony import */ var next_dist_server_instrumentation_utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(85250);
|
|
849
|
+
/* harmony import */ var next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(37587);
|
|
850
|
+
/* harmony import */ var next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_3__);
|
|
851
|
+
/* harmony import */ var next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(22369);
|
|
852
|
+
/* harmony import */ var next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__);
|
|
853
|
+
/* harmony import */ var next_dist_server_lib_trace_constants__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(1889);
|
|
854
|
+
/* harmony import */ var next_dist_server_lib_trace_constants__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_lib_trace_constants__WEBPACK_IMPORTED_MODULE_5__);
|
|
855
|
+
/* harmony import */ var next_dist_server_app_render_interop_default__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(96232);
|
|
856
|
+
/* harmony import */ var next_dist_server_app_render_strip_flight_headers__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(22841);
|
|
857
|
+
/* harmony import */ var next_dist_server_base_http_node__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(46537);
|
|
858
|
+
/* harmony import */ var next_dist_server_base_http_node__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_base_http_node__WEBPACK_IMPORTED_MODULE_8__);
|
|
859
|
+
/* harmony import */ var next_dist_server_lib_experimental_ppr__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(46027);
|
|
860
|
+
/* harmony import */ var next_dist_server_lib_experimental_ppr__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_lib_experimental_ppr__WEBPACK_IMPORTED_MODULE_9__);
|
|
861
|
+
/* harmony import */ var next_dist_server_request_fallback_params__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(78559);
|
|
862
|
+
/* harmony import */ var next_dist_server_app_render_encryption_utils__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(75928);
|
|
863
|
+
/* harmony import */ var next_dist_server_app_render_encryption_utils__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_app_render_encryption_utils__WEBPACK_IMPORTED_MODULE_11__);
|
|
864
|
+
/* harmony import */ var next_dist_server_lib_streaming_metadata__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(19374);
|
|
865
|
+
/* harmony import */ var next_dist_server_lib_streaming_metadata__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_lib_streaming_metadata__WEBPACK_IMPORTED_MODULE_12__);
|
|
866
|
+
/* harmony import */ var next_dist_server_app_render_action_utils__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(65971);
|
|
867
|
+
/* harmony import */ var next_dist_server_app_render_action_utils__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_app_render_action_utils__WEBPACK_IMPORTED_MODULE_13__);
|
|
868
|
+
/* harmony import */ var next_dist_shared_lib_router_utils_app_paths__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(261);
|
|
869
|
+
/* harmony import */ var next_dist_shared_lib_router_utils_app_paths__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(next_dist_shared_lib_router_utils_app_paths__WEBPACK_IMPORTED_MODULE_14__);
|
|
870
|
+
/* harmony import */ var next_dist_server_lib_server_action_request_meta__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(79898);
|
|
871
|
+
/* harmony import */ var next_dist_server_lib_server_action_request_meta__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_lib_server_action_request_meta__WEBPACK_IMPORTED_MODULE_15__);
|
|
872
|
+
/* harmony import */ var next_dist_client_components_app_router_headers__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(32967);
|
|
873
|
+
/* harmony import */ var next_dist_client_components_app_router_headers__WEBPACK_IMPORTED_MODULE_16___default = /*#__PURE__*/__webpack_require__.n(next_dist_client_components_app_router_headers__WEBPACK_IMPORTED_MODULE_16__);
|
|
874
|
+
/* harmony import */ var next_dist_shared_lib_router_utils_is_bot__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(26713);
|
|
875
|
+
/* harmony import */ var next_dist_shared_lib_router_utils_is_bot__WEBPACK_IMPORTED_MODULE_17___default = /*#__PURE__*/__webpack_require__.n(next_dist_shared_lib_router_utils_is_bot__WEBPACK_IMPORTED_MODULE_17__);
|
|
876
|
+
/* harmony import */ var next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(40139);
|
|
877
|
+
/* harmony import */ var next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_18___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_18__);
|
|
878
|
+
/* harmony import */ var next_dist_lib_fallback__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(14248);
|
|
879
|
+
/* harmony import */ var next_dist_lib_fallback__WEBPACK_IMPORTED_MODULE_19___default = /*#__PURE__*/__webpack_require__.n(next_dist_lib_fallback__WEBPACK_IMPORTED_MODULE_19__);
|
|
880
|
+
/* harmony import */ var next_dist_server_render_result__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(59580);
|
|
881
|
+
/* harmony import */ var next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(57749);
|
|
882
|
+
/* harmony import */ var next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_21___default = /*#__PURE__*/__webpack_require__.n(next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_21__);
|
|
883
|
+
/* harmony import */ var next_dist_server_stream_utils_encoded_tags__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(53123);
|
|
884
|
+
/* harmony import */ var next_dist_server_send_payload__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(89745);
|
|
885
|
+
/* harmony import */ var next_dist_server_send_payload__WEBPACK_IMPORTED_MODULE_23___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_send_payload__WEBPACK_IMPORTED_MODULE_23__);
|
|
886
|
+
/* harmony import */ var next_dist_shared_lib_no_fallback_error_external__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(86439);
|
|
887
|
+
/* harmony import */ var next_dist_shared_lib_no_fallback_error_external__WEBPACK_IMPORTED_MODULE_24___default = /*#__PURE__*/__webpack_require__.n(next_dist_shared_lib_no_fallback_error_external__WEBPACK_IMPORTED_MODULE_24__);
|
|
888
|
+
/* harmony import */ var _home_runner_work_semiont_semiont_apps_frontend_src_app_global_error_tsx__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(90488);
|
|
889
|
+
/* harmony import */ var next_dist_server_app_render_entry_base__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(18283);
|
|
890
|
+
/* harmony import */ var next_dist_server_app_render_entry_base__WEBPACK_IMPORTED_MODULE_26___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_app_render_entry_base__WEBPACK_IMPORTED_MODULE_26__);
|
|
891
|
+
/* harmony import */ var next_dist_client_components_redirect_status_code__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(39818);
|
|
892
|
+
/* harmony import */ var next_dist_client_components_redirect_status_code__WEBPACK_IMPORTED_MODULE_27___default = /*#__PURE__*/__webpack_require__.n(next_dist_client_components_redirect_status_code__WEBPACK_IMPORTED_MODULE_27__);
|
|
893
|
+
/* harmony reexport (unknown) */ var __WEBPACK_REEXPORT_OBJECT__ = {};
|
|
894
|
+
/* harmony reexport (unknown) */ for(const __WEBPACK_IMPORT_KEY__ in next_dist_server_app_render_entry_base__WEBPACK_IMPORTED_MODULE_26__) if(["default","tree","pages","GlobalError","__next_app__","routeModule","handler"].indexOf(__WEBPACK_IMPORT_KEY__) < 0) __WEBPACK_REEXPORT_OBJECT__[__WEBPACK_IMPORT_KEY__] = () => next_dist_server_app_render_entry_base__WEBPACK_IMPORTED_MODULE_26__[__WEBPACK_IMPORT_KEY__]
|
|
895
|
+
/* harmony reexport (unknown) */ __webpack_require__.d(__webpack_exports__, __WEBPACK_REEXPORT_OBJECT__);
|
|
896
|
+
const module0 = () => Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 47570));
|
|
897
|
+
const module1 = () => Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 26412));
|
|
898
|
+
const module2 = () => Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 90488));
|
|
899
|
+
const module3 = () => Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 33506));
|
|
900
|
+
const module4 = () => Promise.resolve(/* import() eager */).then(__webpack_require__.t.bind(__webpack_require__, 15034, 23));
|
|
901
|
+
const module5 = () => Promise.resolve(/* import() eager */).then(__webpack_require__.t.bind(__webpack_require__, 54693, 23));
|
|
902
|
+
const module6 = () => Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 82778));
|
|
903
|
+
const module7 = () => Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 71743));
|
|
904
|
+
const module8 = () => Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 75555));
|
|
905
|
+
const page9 = () => Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 19948));
|
|
1528
906
|
|
|
1529
907
|
|
|
1530
908
|
|
|
1531
|
-
/***/ }),
|
|
1532
909
|
|
|
1533
|
-
/***/ 41025:
|
|
1534
|
-
/***/ ((module) => {
|
|
1535
910
|
|
|
1536
|
-
"use strict";
|
|
1537
|
-
module.exports = require("next/dist/server/app-render/dynamic-access-async-storage.external.js");
|
|
1538
911
|
|
|
1539
|
-
/***/ }),
|
|
1540
912
|
|
|
1541
|
-
/***/ 56610:
|
|
1542
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
1543
913
|
|
|
1544
|
-
"use strict";
|
|
1545
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
1546
|
-
/* harmony export */ C$z: () => (/* reexport safe */ _Users_pingel_git_repos_github_com_The_AI_Alliance_semiont_packages_react_ui_dist_index_mjs__WEBPACK_IMPORTED_MODULE_0__.useEventSubscriptions),
|
|
1547
|
-
/* harmony export */ DPo: () => (/* reexport safe */ _Users_pingel_git_repos_github_com_The_AI_Alliance_semiont_packages_react_ui_dist_index_mjs__WEBPACK_IMPORTED_MODULE_0__.useTheme),
|
|
1548
|
-
/* harmony export */ cvF: () => (/* reexport safe */ _Users_pingel_git_repos_github_com_The_AI_Alliance_semiont_packages_react_ui_dist_index_mjs__WEBPACK_IMPORTED_MODULE_0__.useLineNumbers),
|
|
1549
|
-
/* harmony export */ ySJ: () => (/* reexport safe */ _Users_pingel_git_repos_github_com_The_AI_Alliance_semiont_packages_react_ui_dist_index_mjs__WEBPACK_IMPORTED_MODULE_0__.usePanelBrowse)
|
|
1550
|
-
/* harmony export */ });
|
|
1551
|
-
/* harmony import */ var _Users_pingel_git_repos_github_com_The_AI_Alliance_semiont_packages_react_ui_dist_index_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(30658);
|
|
1552
914
|
|
|
1553
915
|
|
|
1554
916
|
|
|
1555
|
-
/***/ }),
|
|
1556
917
|
|
|
1557
|
-
/***/ 63033:
|
|
1558
|
-
/***/ ((module) => {
|
|
1559
918
|
|
|
1560
|
-
"use strict";
|
|
1561
|
-
module.exports = require("next/dist/server/app-render/work-unit-async-storage.external.js");
|
|
1562
919
|
|
|
1563
|
-
/***/ }),
|
|
1564
920
|
|
|
1565
|
-
/***/ 71642:
|
|
1566
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
1567
921
|
|
|
1568
|
-
"use strict";
|
|
1569
|
-
// ESM COMPAT FLAG
|
|
1570
|
-
__webpack_require__.r(__webpack_exports__);
|
|
1571
922
|
|
|
1572
|
-
// EXPORTS
|
|
1573
|
-
__webpack_require__.d(__webpack_exports__, {
|
|
1574
|
-
"default": () => (/* binding */ ModerateLayout)
|
|
1575
|
-
});
|
|
1576
923
|
|
|
1577
|
-
// EXTERNAL MODULE: ../../node_modules/next/dist/server/route-modules/app-page/vendored/ssr/react-jsx-runtime.js
|
|
1578
|
-
var react_jsx_runtime = __webpack_require__(78157);
|
|
1579
|
-
// EXTERNAL MODULE: ../../node_modules/next/dist/server/route-modules/app-page/vendored/ssr/react.js
|
|
1580
|
-
var react = __webpack_require__(31768);
|
|
1581
|
-
// EXTERNAL MODULE: ../../node_modules/next-intl/dist/esm/production/react-client/index.js
|
|
1582
|
-
var react_client = __webpack_require__(72668);
|
|
1583
|
-
// EXTERNAL MODULE: ../../node_modules/next-auth/react/index.js
|
|
1584
|
-
var next_auth_react = __webpack_require__(16422);
|
|
1585
|
-
// EXTERNAL MODULE: __barrel_optimize__?names=ApiClientProvider,AuthTokenProvider,Footer,LeftSidebar!=!../../packages/react-ui/dist/index.mjs
|
|
1586
|
-
var dist = __webpack_require__(39659);
|
|
1587
|
-
// EXTERNAL MODULE: ./src/i18n/routing.ts
|
|
1588
|
-
var routing = __webpack_require__(1915);
|
|
1589
|
-
// EXTERNAL MODULE: __barrel_optimize__?names=SimpleNavigation,useEventSubscriptions!=!../../packages/react-ui/dist/index.mjs
|
|
1590
|
-
var react_ui_dist = __webpack_require__(93346);
|
|
1591
|
-
;// ../../node_modules/@heroicons/react/24/outline/esm/ClockIcon.js
|
|
1592
924
|
|
|
1593
|
-
function ClockIcon({ title, titleId, ...props }, svgRef) {
|
|
1594
|
-
return /*#__PURE__*/ react.createElement("svg", Object.assign({
|
|
1595
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
1596
|
-
fill: "none",
|
|
1597
|
-
viewBox: "0 0 24 24",
|
|
1598
|
-
strokeWidth: 1.5,
|
|
1599
|
-
stroke: "currentColor",
|
|
1600
|
-
"aria-hidden": "true",
|
|
1601
|
-
"data-slot": "icon",
|
|
1602
|
-
ref: svgRef,
|
|
1603
|
-
"aria-labelledby": titleId
|
|
1604
|
-
}, props), title ? /*#__PURE__*/ react.createElement("title", {
|
|
1605
|
-
id: titleId
|
|
1606
|
-
}, title) : null, /*#__PURE__*/ react.createElement("path", {
|
|
1607
|
-
strokeLinecap: "round",
|
|
1608
|
-
strokeLinejoin: "round",
|
|
1609
|
-
d: "M12 6v6h4.5m4.5 0a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"
|
|
1610
|
-
}));
|
|
1611
|
-
}
|
|
1612
|
-
const ForwardRef = /*#__PURE__*/ react.forwardRef(ClockIcon);
|
|
1613
|
-
/* harmony default export */ const esm_ClockIcon = (ForwardRef);
|
|
1614
925
|
|
|
1615
|
-
;// ../../node_modules/@heroicons/react/24/outline/esm/TagIcon.js
|
|
1616
926
|
|
|
1617
|
-
function TagIcon({ title, titleId, ...props }, svgRef) {
|
|
1618
|
-
return /*#__PURE__*/ react.createElement("svg", Object.assign({
|
|
1619
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
1620
|
-
fill: "none",
|
|
1621
|
-
viewBox: "0 0 24 24",
|
|
1622
|
-
strokeWidth: 1.5,
|
|
1623
|
-
stroke: "currentColor",
|
|
1624
|
-
"aria-hidden": "true",
|
|
1625
|
-
"data-slot": "icon",
|
|
1626
|
-
ref: svgRef,
|
|
1627
|
-
"aria-labelledby": titleId
|
|
1628
|
-
}, props), title ? /*#__PURE__*/ react.createElement("title", {
|
|
1629
|
-
id: titleId
|
|
1630
|
-
}, title) : null, /*#__PURE__*/ react.createElement("path", {
|
|
1631
|
-
strokeLinecap: "round",
|
|
1632
|
-
strokeLinejoin: "round",
|
|
1633
|
-
d: "M9.568 3H5.25A2.25 2.25 0 0 0 3 5.25v4.318c0 .597.237 1.17.659 1.591l9.581 9.581c.699.699 1.78.872 2.607.33a18.095 18.095 0 0 0 5.223-5.223c.542-.827.369-1.908-.33-2.607L11.16 3.66A2.25 2.25 0 0 0 9.568 3Z"
|
|
1634
|
-
}), /*#__PURE__*/ react.createElement("path", {
|
|
1635
|
-
strokeLinecap: "round",
|
|
1636
|
-
strokeLinejoin: "round",
|
|
1637
|
-
d: "M6 6h.008v.008H6V6Z"
|
|
1638
|
-
}));
|
|
1639
|
-
}
|
|
1640
|
-
const TagIcon_ForwardRef = /*#__PURE__*/ react.forwardRef(TagIcon);
|
|
1641
|
-
/* harmony default export */ const esm_TagIcon = (TagIcon_ForwardRef);
|
|
1642
927
|
|
|
1643
|
-
;// ../../node_modules/@heroicons/react/24/outline/esm/BookOpenIcon.js
|
|
1644
928
|
|
|
1645
|
-
function BookOpenIcon({ title, titleId, ...props }, svgRef) {
|
|
1646
|
-
return /*#__PURE__*/ react.createElement("svg", Object.assign({
|
|
1647
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
1648
|
-
fill: "none",
|
|
1649
|
-
viewBox: "0 0 24 24",
|
|
1650
|
-
strokeWidth: 1.5,
|
|
1651
|
-
stroke: "currentColor",
|
|
1652
|
-
"aria-hidden": "true",
|
|
1653
|
-
"data-slot": "icon",
|
|
1654
|
-
ref: svgRef,
|
|
1655
|
-
"aria-labelledby": titleId
|
|
1656
|
-
}, props), title ? /*#__PURE__*/ react.createElement("title", {
|
|
1657
|
-
id: titleId
|
|
1658
|
-
}, title) : null, /*#__PURE__*/ react.createElement("path", {
|
|
1659
|
-
strokeLinecap: "round",
|
|
1660
|
-
strokeLinejoin: "round",
|
|
1661
|
-
d: "M12 6.042A8.967 8.967 0 0 0 6 3.75c-1.052 0-2.062.18-3 .512v14.25A8.987 8.987 0 0 1 6 18c2.305 0 4.408.867 6 2.292m0-14.25a8.966 8.966 0 0 1 6-2.292c1.052 0 2.062.18 3 .512v14.25A8.987 8.987 0 0 0 18 18a8.967 8.967 0 0 0-6 2.292m0-14.25v14.25"
|
|
1662
|
-
}));
|
|
1663
|
-
}
|
|
1664
|
-
const BookOpenIcon_ForwardRef = /*#__PURE__*/ react.forwardRef(BookOpenIcon);
|
|
1665
|
-
/* harmony default export */ const esm_BookOpenIcon = (BookOpenIcon_ForwardRef);
|
|
1666
929
|
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
//
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
|
|
930
|
+
|
|
931
|
+
// We inject the tree and pages here so that we can use them in the route
|
|
932
|
+
// module.
|
|
933
|
+
const tree = {
|
|
934
|
+
children: [
|
|
935
|
+
'',
|
|
936
|
+
{
|
|
937
|
+
children: [
|
|
938
|
+
'[locale]',
|
|
939
|
+
{
|
|
940
|
+
children: [
|
|
941
|
+
'moderate',
|
|
942
|
+
{
|
|
943
|
+
children: [
|
|
944
|
+
'entity-tags',
|
|
945
|
+
{
|
|
946
|
+
children: ['__PAGE__', {}, {
|
|
947
|
+
page: [page9, "/home/runner/work/semiont/semiont/apps/frontend/src/app/[locale]/moderate/entity-tags/page.tsx"],
|
|
948
|
+
|
|
949
|
+
}]
|
|
950
|
+
},
|
|
951
|
+
{
|
|
952
|
+
|
|
953
|
+
|
|
954
|
+
}
|
|
955
|
+
]
|
|
956
|
+
},
|
|
957
|
+
{
|
|
958
|
+
'layout': [module8, "/home/runner/work/semiont/semiont/apps/frontend/src/app/[locale]/moderate/layout.tsx"],
|
|
959
|
+
|
|
960
|
+
}
|
|
961
|
+
]
|
|
962
|
+
},
|
|
963
|
+
{
|
|
964
|
+
'layout': [module6, "/home/runner/work/semiont/semiont/apps/frontend/src/app/[locale]/layout.tsx"],
|
|
965
|
+
'not-found': [module7, "/home/runner/work/semiont/semiont/apps/frontend/src/app/[locale]/not-found.tsx"],
|
|
966
|
+
|
|
967
|
+
}
|
|
968
|
+
]
|
|
969
|
+
},
|
|
970
|
+
{
|
|
971
|
+
'layout': [module0, "/home/runner/work/semiont/semiont/apps/frontend/src/app/layout.tsx"],
|
|
972
|
+
'error': [module1, "/home/runner/work/semiont/semiont/apps/frontend/src/app/error.tsx"],
|
|
973
|
+
'global-error': [module2, "/home/runner/work/semiont/semiont/apps/frontend/src/app/global-error.tsx"],
|
|
974
|
+
'not-found': [module3, "/home/runner/work/semiont/semiont/apps/frontend/src/app/not-found.tsx"],
|
|
975
|
+
'forbidden': [module4, "next/dist/client/components/builtin/forbidden.js"],
|
|
976
|
+
'unauthorized': [module5, "next/dist/client/components/builtin/unauthorized.js"],
|
|
977
|
+
|
|
978
|
+
}
|
|
979
|
+
]
|
|
980
|
+
}.children;
|
|
981
|
+
const pages = ["/home/runner/work/semiont/semiont/apps/frontend/src/app/[locale]/moderate/entity-tags/page.tsx"];
|
|
1673
982
|
|
|
1674
983
|
|
|
1675
984
|
|
|
985
|
+
const __next_app_require__ = __webpack_require__
|
|
986
|
+
const __next_app_load_chunk__ = () => Promise.resolve()
|
|
987
|
+
const __next_app__ = {
|
|
988
|
+
require: __next_app_require__,
|
|
989
|
+
loadChunk: __next_app_load_chunk__
|
|
990
|
+
};
|
|
1676
991
|
|
|
1677
992
|
|
|
1678
993
|
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
|
|
1685
|
-
|
|
1686
|
-
|
|
1687
|
-
|
|
1688
|
-
|
|
1689
|
-
|
|
1690
|
-
|
|
1691
|
-
|
|
994
|
+
// Create and export the route module that will be consumed.
|
|
995
|
+
const routeModule = new next_dist_server_route_modules_app_page_module_compiled__WEBPACK_IMPORTED_MODULE_0__.AppPageRouteModule({
|
|
996
|
+
definition: {
|
|
997
|
+
kind: next_dist_server_route_kind__WEBPACK_IMPORTED_MODULE_1__.RouteKind.APP_PAGE,
|
|
998
|
+
page: "/[locale]/moderate/entity-tags/page",
|
|
999
|
+
pathname: "/[locale]/moderate/entity-tags",
|
|
1000
|
+
// The following aren't used in production.
|
|
1001
|
+
bundlePath: '',
|
|
1002
|
+
filename: '',
|
|
1003
|
+
appPaths: []
|
|
1004
|
+
},
|
|
1005
|
+
userland: {
|
|
1006
|
+
loaderTree: tree
|
|
1007
|
+
},
|
|
1008
|
+
distDir: ".next" || 0,
|
|
1009
|
+
relativeProjectDir: false || ''
|
|
1010
|
+
});
|
|
1011
|
+
async function handler(req, res, ctx) {
|
|
1012
|
+
var _this;
|
|
1013
|
+
let srcPage = "/[locale]/moderate/entity-tags/page";
|
|
1014
|
+
// turbopack doesn't normalize `/index` in the page name
|
|
1015
|
+
// so we need to to process dynamic routes properly
|
|
1016
|
+
// TODO: fix turbopack providing differing value from webpack
|
|
1017
|
+
if (false) {} else if (srcPage === '/index') {
|
|
1018
|
+
// we always normalize /index specifically
|
|
1019
|
+
srcPage = '/';
|
|
1020
|
+
}
|
|
1021
|
+
const multiZoneDraftMode = false;
|
|
1022
|
+
const initialPostponed = (0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__.getRequestMeta)(req, 'postponed');
|
|
1023
|
+
// TODO: replace with more specific flags
|
|
1024
|
+
const minimalMode = (0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__.getRequestMeta)(req, 'minimalMode');
|
|
1025
|
+
const prepareResult = await routeModule.prepare(req, res, {
|
|
1026
|
+
srcPage,
|
|
1027
|
+
multiZoneDraftMode
|
|
1692
1028
|
});
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
|
|
1029
|
+
if (!prepareResult) {
|
|
1030
|
+
res.statusCode = 400;
|
|
1031
|
+
res.end('Bad Request');
|
|
1032
|
+
ctx.waitUntil == null ? void 0 : ctx.waitUntil.call(ctx, Promise.resolve());
|
|
1033
|
+
return null;
|
|
1034
|
+
}
|
|
1035
|
+
const { buildId, query, params, parsedUrl, pageIsDynamic, buildManifest, nextFontManifest, reactLoadableManifest, serverActionsManifest, clientReferenceManifest, subresourceIntegrityManifest, prerenderManifest, isDraftMode, resolvedPathname, revalidateOnlyGenerated, routerServerContext, nextConfig, interceptionRoutePatterns } = prepareResult;
|
|
1036
|
+
const pathname = parsedUrl.pathname || '/';
|
|
1037
|
+
const normalizedSrcPage = (0,next_dist_shared_lib_router_utils_app_paths__WEBPACK_IMPORTED_MODULE_14__.normalizeAppPath)(srcPage);
|
|
1038
|
+
let { isOnDemandRevalidate } = prepareResult;
|
|
1039
|
+
const prerenderInfo = routeModule.match(pathname, prerenderManifest);
|
|
1040
|
+
const isPrerendered = !!prerenderManifest.routes[resolvedPathname];
|
|
1041
|
+
let isSSG = Boolean(prerenderInfo || isPrerendered || prerenderManifest.routes[normalizedSrcPage]);
|
|
1042
|
+
const userAgent = req.headers['user-agent'] || '';
|
|
1043
|
+
const botType = (0,next_dist_shared_lib_router_utils_is_bot__WEBPACK_IMPORTED_MODULE_17__.getBotType)(userAgent);
|
|
1044
|
+
const isHtmlBot = (0,next_dist_server_lib_streaming_metadata__WEBPACK_IMPORTED_MODULE_12__.isHtmlBotRequest)(req);
|
|
1045
|
+
/**
|
|
1046
|
+
* If true, this indicates that the request being made is for an app
|
|
1047
|
+
* prefetch request.
|
|
1048
|
+
*/ const isPrefetchRSCRequest = (0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__.getRequestMeta)(req, 'isPrefetchRSCRequest') ?? req.headers[next_dist_client_components_app_router_headers__WEBPACK_IMPORTED_MODULE_16__.NEXT_ROUTER_PREFETCH_HEADER] === '1' // exclude runtime prefetches, which use '2'
|
|
1049
|
+
;
|
|
1050
|
+
// NOTE: Don't delete headers[RSC] yet, it still needs to be used in renderToHTML later
|
|
1051
|
+
const isRSCRequest = (0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__.getRequestMeta)(req, 'isRSCRequest') ?? Boolean(req.headers[next_dist_client_components_app_router_headers__WEBPACK_IMPORTED_MODULE_16__.RSC_HEADER]);
|
|
1052
|
+
const isPossibleServerAction = (0,next_dist_server_lib_server_action_request_meta__WEBPACK_IMPORTED_MODULE_15__.getIsPossibleServerAction)(req);
|
|
1053
|
+
/**
|
|
1054
|
+
* If the route being rendered is an app page, and the ppr feature has been
|
|
1055
|
+
* enabled, then the given route _could_ support PPR.
|
|
1056
|
+
*/ const couldSupportPPR = (0,next_dist_server_lib_experimental_ppr__WEBPACK_IMPORTED_MODULE_9__.checkIsAppPPREnabled)(nextConfig.experimental.ppr);
|
|
1057
|
+
// When enabled, this will allow the use of the `?__nextppronly` query to
|
|
1058
|
+
// enable debugging of the static shell.
|
|
1059
|
+
const hasDebugStaticShellQuery = false && 0;
|
|
1060
|
+
// When enabled, this will allow the use of the `?__nextppronly` query
|
|
1061
|
+
// to enable debugging of the fallback shell.
|
|
1062
|
+
const hasDebugFallbackShellQuery = hasDebugStaticShellQuery && query.__nextppronly === 'fallback';
|
|
1063
|
+
// This page supports PPR if it is marked as being `PARTIALLY_STATIC` in the
|
|
1064
|
+
// prerender manifest and this is an app page.
|
|
1065
|
+
const isRoutePPREnabled = couldSupportPPR && (((_this = prerenderManifest.routes[normalizedSrcPage] ?? prerenderManifest.dynamicRoutes[normalizedSrcPage]) == null ? void 0 : _this.renderingMode) === 'PARTIALLY_STATIC' || // Ideally we'd want to check the appConfig to see if this page has PPR
|
|
1066
|
+
// enabled or not, but that would require plumbing the appConfig through
|
|
1067
|
+
// to the server during development. We assume that the page supports it
|
|
1068
|
+
// but only during development.
|
|
1069
|
+
hasDebugStaticShellQuery && (routeModule.isDev === true || (routerServerContext == null ? void 0 : routerServerContext.experimentalTestProxy) === true));
|
|
1070
|
+
const isDebugStaticShell = hasDebugStaticShellQuery && isRoutePPREnabled;
|
|
1071
|
+
// We should enable debugging dynamic accesses when the static shell
|
|
1072
|
+
// debugging has been enabled and we're also in development mode.
|
|
1073
|
+
const isDebugDynamicAccesses = isDebugStaticShell && routeModule.isDev === true;
|
|
1074
|
+
const isDebugFallbackShell = hasDebugFallbackShellQuery && isRoutePPREnabled;
|
|
1075
|
+
// If we're in minimal mode, then try to get the postponed information from
|
|
1076
|
+
// the request metadata. If available, use it for resuming the postponed
|
|
1077
|
+
// render.
|
|
1078
|
+
const minimalPostponed = isRoutePPREnabled ? initialPostponed : undefined;
|
|
1079
|
+
// If PPR is enabled, and this is a RSC request (but not a prefetch), then
|
|
1080
|
+
// we can use this fact to only generate the flight data for the request
|
|
1081
|
+
// because we can't cache the HTML (as it's also dynamic).
|
|
1082
|
+
const isDynamicRSCRequest = isRoutePPREnabled && isRSCRequest && !isPrefetchRSCRequest;
|
|
1083
|
+
// Need to read this before it's stripped by stripFlightHeaders. We don't
|
|
1084
|
+
// need to transfer it to the request meta because it's only read
|
|
1085
|
+
// within this function; the static segment data should have already been
|
|
1086
|
+
// generated, so we will always either return a static response or a 404.
|
|
1087
|
+
const segmentPrefetchHeader = (0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__.getRequestMeta)(req, 'segmentPrefetchRSCRequest');
|
|
1088
|
+
// TODO: investigate existing bug with shouldServeStreamingMetadata always
|
|
1089
|
+
// being true for a revalidate due to modifying the base-server this.renderOpts
|
|
1090
|
+
// when fixing this to correct logic it causes hydration issue since we set
|
|
1091
|
+
// serveStreamingMetadata to true during export
|
|
1092
|
+
let serveStreamingMetadata = !userAgent ? true : (0,next_dist_server_lib_streaming_metadata__WEBPACK_IMPORTED_MODULE_12__.shouldServeStreamingMetadata)(userAgent, nextConfig.htmlLimitedBots);
|
|
1093
|
+
if (isHtmlBot && isRoutePPREnabled) {
|
|
1094
|
+
isSSG = false;
|
|
1095
|
+
serveStreamingMetadata = false;
|
|
1096
|
+
}
|
|
1097
|
+
// In development, we always want to generate dynamic HTML.
|
|
1098
|
+
let supportsDynamicResponse = // If we're in development, we always support dynamic HTML, unless it's
|
|
1099
|
+
// a data request, in which case we only produce static HTML.
|
|
1100
|
+
routeModule.isDev === true || // If this is not SSG or does not have static paths, then it supports
|
|
1101
|
+
// dynamic HTML.
|
|
1102
|
+
!isSSG || // If this request has provided postponed data, it supports dynamic
|
|
1103
|
+
// HTML.
|
|
1104
|
+
typeof initialPostponed === 'string' || // If this is a dynamic RSC request, then this render supports dynamic
|
|
1105
|
+
// HTML (it's dynamic).
|
|
1106
|
+
isDynamicRSCRequest;
|
|
1107
|
+
// When html bots request PPR page, perform the full dynamic rendering.
|
|
1108
|
+
const shouldWaitOnAllReady = isHtmlBot && isRoutePPREnabled;
|
|
1109
|
+
let ssgCacheKey = null;
|
|
1110
|
+
if (!isDraftMode && isSSG && !supportsDynamicResponse && !isPossibleServerAction && !minimalPostponed && !isDynamicRSCRequest) {
|
|
1111
|
+
ssgCacheKey = resolvedPathname;
|
|
1112
|
+
}
|
|
1113
|
+
// the staticPathKey differs from ssgCacheKey since
|
|
1114
|
+
// ssgCacheKey is null in dev since we're always in "dynamic"
|
|
1115
|
+
// mode in dev to bypass the cache, but we still need to honor
|
|
1116
|
+
// dynamicParams = false in dev mode
|
|
1117
|
+
let staticPathKey = ssgCacheKey;
|
|
1118
|
+
if (!staticPathKey && routeModule.isDev) {
|
|
1119
|
+
staticPathKey = resolvedPathname;
|
|
1120
|
+
}
|
|
1121
|
+
// If this is a request for an app path that should be statically generated
|
|
1122
|
+
// and we aren't in the edge runtime, strip the flight headers so it will
|
|
1123
|
+
// generate the static response.
|
|
1124
|
+
if (!routeModule.isDev && !isDraftMode && isSSG && isRSCRequest && !isDynamicRSCRequest) {
|
|
1125
|
+
(0,next_dist_server_app_render_strip_flight_headers__WEBPACK_IMPORTED_MODULE_7__/* .stripFlightHeaders */ .d)(req.headers);
|
|
1126
|
+
}
|
|
1127
|
+
const ComponentMod = {
|
|
1128
|
+
...next_dist_server_app_render_entry_base__WEBPACK_IMPORTED_MODULE_26__,
|
|
1129
|
+
tree,
|
|
1130
|
+
pages,
|
|
1131
|
+
GlobalError: _home_runner_work_semiont_semiont_apps_frontend_src_app_global_error_tsx__WEBPACK_IMPORTED_MODULE_25__["default"],
|
|
1132
|
+
handler,
|
|
1133
|
+
routeModule,
|
|
1134
|
+
__next_app__
|
|
1135
|
+
};
|
|
1136
|
+
// Before rendering (which initializes component tree modules), we have to
|
|
1137
|
+
// set the reference manifests to our global store so Server Action's
|
|
1138
|
+
// encryption util can access to them at the top level of the page module.
|
|
1139
|
+
if (serverActionsManifest && clientReferenceManifest) {
|
|
1140
|
+
(0,next_dist_server_app_render_encryption_utils__WEBPACK_IMPORTED_MODULE_11__.setReferenceManifestsSingleton)({
|
|
1141
|
+
page: srcPage,
|
|
1142
|
+
clientReferenceManifest,
|
|
1143
|
+
serverActionsManifest,
|
|
1144
|
+
serverModuleMap: (0,next_dist_server_app_render_action_utils__WEBPACK_IMPORTED_MODULE_13__.createServerModuleMap)({
|
|
1145
|
+
serverActionsManifest
|
|
1146
|
+
})
|
|
1147
|
+
});
|
|
1148
|
+
}
|
|
1149
|
+
const method = req.method || 'GET';
|
|
1150
|
+
const tracer = (0,next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_3__.getTracer)();
|
|
1151
|
+
const activeSpan = tracer.getActiveScopeSpan();
|
|
1152
|
+
try {
|
|
1153
|
+
const varyHeader = routeModule.getVaryHeader(resolvedPathname, interceptionRoutePatterns);
|
|
1154
|
+
res.setHeader('Vary', varyHeader);
|
|
1155
|
+
const invokeRouteModule = async (span, context)=>{
|
|
1156
|
+
const nextReq = new next_dist_server_base_http_node__WEBPACK_IMPORTED_MODULE_8__.NodeNextRequest(req);
|
|
1157
|
+
const nextRes = new next_dist_server_base_http_node__WEBPACK_IMPORTED_MODULE_8__.NodeNextResponse(res);
|
|
1158
|
+
// TODO: adapt for putting the RDC inside the postponed data
|
|
1159
|
+
// If we're in dev, and this isn't a prefetch or a server action,
|
|
1160
|
+
// we should seed the resume data cache.
|
|
1161
|
+
if (false) {}
|
|
1162
|
+
return routeModule.render(nextReq, nextRes, context).finally(()=>{
|
|
1163
|
+
if (!span) return;
|
|
1164
|
+
span.setAttributes({
|
|
1165
|
+
'http.status_code': res.statusCode,
|
|
1166
|
+
'next.rsc': false
|
|
1167
|
+
});
|
|
1168
|
+
const rootSpanAttributes = tracer.getRootSpanAttributes();
|
|
1169
|
+
// We were unable to get attributes, probably OTEL is not enabled
|
|
1170
|
+
if (!rootSpanAttributes) {
|
|
1171
|
+
return;
|
|
1172
|
+
}
|
|
1173
|
+
if (rootSpanAttributes.get('next.span_type') !== next_dist_server_lib_trace_constants__WEBPACK_IMPORTED_MODULE_5__.BaseServerSpan.handleRequest) {
|
|
1174
|
+
console.warn(`Unexpected root span type '${rootSpanAttributes.get('next.span_type')}'. Please report this Next.js issue https://github.com/vercel/next.js`);
|
|
1175
|
+
return;
|
|
1176
|
+
}
|
|
1177
|
+
const route = rootSpanAttributes.get('next.route');
|
|
1178
|
+
if (route) {
|
|
1179
|
+
const name = `${method} ${route}`;
|
|
1180
|
+
span.setAttributes({
|
|
1181
|
+
'next.route': route,
|
|
1182
|
+
'http.route': route,
|
|
1183
|
+
'next.span_name': name
|
|
1184
|
+
});
|
|
1185
|
+
span.updateName(name);
|
|
1186
|
+
} else {
|
|
1187
|
+
span.updateName(`${method} ${req.url}`);
|
|
1188
|
+
}
|
|
1189
|
+
});
|
|
1190
|
+
};
|
|
1191
|
+
const doRender = async ({ span, postponed, fallbackRouteParams })=>{
|
|
1192
|
+
const context = {
|
|
1193
|
+
query,
|
|
1194
|
+
params,
|
|
1195
|
+
page: normalizedSrcPage,
|
|
1196
|
+
sharedContext: {
|
|
1197
|
+
buildId
|
|
1198
|
+
},
|
|
1199
|
+
serverComponentsHmrCache: (0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__.getRequestMeta)(req, 'serverComponentsHmrCache'),
|
|
1200
|
+
fallbackRouteParams,
|
|
1201
|
+
renderOpts: {
|
|
1202
|
+
App: ()=>null,
|
|
1203
|
+
Document: ()=>null,
|
|
1204
|
+
pageConfig: {},
|
|
1205
|
+
ComponentMod,
|
|
1206
|
+
Component: (0,next_dist_server_app_render_interop_default__WEBPACK_IMPORTED_MODULE_6__/* .interopDefault */ .T)(ComponentMod),
|
|
1207
|
+
params,
|
|
1208
|
+
routeModule,
|
|
1209
|
+
page: srcPage,
|
|
1210
|
+
postponed,
|
|
1211
|
+
shouldWaitOnAllReady,
|
|
1212
|
+
serveStreamingMetadata,
|
|
1213
|
+
supportsDynamicResponse: typeof postponed === 'string' || supportsDynamicResponse,
|
|
1214
|
+
buildManifest,
|
|
1215
|
+
nextFontManifest,
|
|
1216
|
+
reactLoadableManifest,
|
|
1217
|
+
subresourceIntegrityManifest,
|
|
1218
|
+
serverActionsManifest,
|
|
1219
|
+
clientReferenceManifest,
|
|
1220
|
+
setIsrStatus: routerServerContext == null ? void 0 : routerServerContext.setIsrStatus,
|
|
1221
|
+
dir: true ? (__webpack_require__(33873).join)(/* turbopackIgnore: true */ process.cwd(), routeModule.relativeProjectDir) : 0,
|
|
1222
|
+
isDraftMode,
|
|
1223
|
+
isRevalidate: isSSG && !postponed && !isDynamicRSCRequest,
|
|
1224
|
+
botType,
|
|
1225
|
+
isOnDemandRevalidate,
|
|
1226
|
+
isPossibleServerAction,
|
|
1227
|
+
assetPrefix: nextConfig.assetPrefix,
|
|
1228
|
+
nextConfigOutput: nextConfig.output,
|
|
1229
|
+
crossOrigin: nextConfig.crossOrigin,
|
|
1230
|
+
trailingSlash: nextConfig.trailingSlash,
|
|
1231
|
+
previewProps: prerenderManifest.preview,
|
|
1232
|
+
deploymentId: nextConfig.deploymentId,
|
|
1233
|
+
enableTainting: nextConfig.experimental.taint,
|
|
1234
|
+
htmlLimitedBots: nextConfig.htmlLimitedBots,
|
|
1235
|
+
devtoolSegmentExplorer: nextConfig.experimental.devtoolSegmentExplorer,
|
|
1236
|
+
reactMaxHeadersLength: nextConfig.reactMaxHeadersLength,
|
|
1237
|
+
multiZoneDraftMode,
|
|
1238
|
+
incrementalCache: (0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__.getRequestMeta)(req, 'incrementalCache'),
|
|
1239
|
+
cacheLifeProfiles: nextConfig.experimental.cacheLife,
|
|
1240
|
+
basePath: nextConfig.basePath,
|
|
1241
|
+
serverActions: nextConfig.experimental.serverActions,
|
|
1242
|
+
...isDebugStaticShell || isDebugDynamicAccesses ? {
|
|
1243
|
+
nextExport: true,
|
|
1244
|
+
supportsDynamicResponse: false,
|
|
1245
|
+
isStaticGeneration: true,
|
|
1246
|
+
isRevalidate: true,
|
|
1247
|
+
isDebugDynamicAccesses: isDebugDynamicAccesses
|
|
1248
|
+
} : {},
|
|
1249
|
+
experimental: {
|
|
1250
|
+
isRoutePPREnabled,
|
|
1251
|
+
expireTime: nextConfig.expireTime,
|
|
1252
|
+
staleTimes: nextConfig.experimental.staleTimes,
|
|
1253
|
+
cacheComponents: Boolean(nextConfig.experimental.cacheComponents),
|
|
1254
|
+
clientSegmentCache: Boolean(nextConfig.experimental.clientSegmentCache),
|
|
1255
|
+
clientParamParsing: Boolean(nextConfig.experimental.clientParamParsing),
|
|
1256
|
+
dynamicOnHover: Boolean(nextConfig.experimental.dynamicOnHover),
|
|
1257
|
+
inlineCss: Boolean(nextConfig.experimental.inlineCss),
|
|
1258
|
+
authInterrupts: Boolean(nextConfig.experimental.authInterrupts),
|
|
1259
|
+
clientTraceMetadata: nextConfig.experimental.clientTraceMetadata || []
|
|
1260
|
+
},
|
|
1261
|
+
waitUntil: ctx.waitUntil,
|
|
1262
|
+
onClose: (cb)=>{
|
|
1263
|
+
res.on('close', cb);
|
|
1264
|
+
},
|
|
1265
|
+
onAfterTaskError: ()=>{},
|
|
1266
|
+
onInstrumentationRequestError: (error, _request, errorContext)=>routeModule.onRequestError(req, error, errorContext, routerServerContext),
|
|
1267
|
+
err: (0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__.getRequestMeta)(req, 'invokeError'),
|
|
1268
|
+
dev: routeModule.isDev
|
|
1269
|
+
}
|
|
1270
|
+
};
|
|
1271
|
+
const result = await invokeRouteModule(span, context);
|
|
1272
|
+
const { metadata } = result;
|
|
1273
|
+
const { cacheControl, headers = {}, // Add any fetch tags that were on the page to the response headers.
|
|
1274
|
+
fetchTags: cacheTags } = metadata;
|
|
1275
|
+
if (cacheTags) {
|
|
1276
|
+
headers[next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_21__.NEXT_CACHE_TAGS_HEADER] = cacheTags;
|
|
1277
|
+
}
|
|
1278
|
+
// Pull any fetch metrics from the render onto the request.
|
|
1279
|
+
;
|
|
1280
|
+
req.fetchMetrics = metadata.fetchMetrics;
|
|
1281
|
+
// we don't throw static to dynamic errors in dev as isSSG
|
|
1282
|
+
// is a best guess in dev since we don't have the prerender pass
|
|
1283
|
+
// to know whether the path is actually static or not
|
|
1284
|
+
if (isSSG && (cacheControl == null ? void 0 : cacheControl.revalidate) === 0 && !routeModule.isDev && !isRoutePPREnabled) {
|
|
1285
|
+
const staticBailoutInfo = metadata.staticBailoutInfo;
|
|
1286
|
+
const err = Object.defineProperty(new Error(`Page changed from static to dynamic at runtime ${resolvedPathname}${(staticBailoutInfo == null ? void 0 : staticBailoutInfo.description) ? `, reason: ${staticBailoutInfo.description}` : ``}` + `\nsee more here https://nextjs.org/docs/messages/app-static-to-dynamic-error`), "__NEXT_ERROR_CODE", {
|
|
1287
|
+
value: "E132",
|
|
1288
|
+
enumerable: false,
|
|
1289
|
+
configurable: true
|
|
1290
|
+
});
|
|
1291
|
+
if (staticBailoutInfo == null ? void 0 : staticBailoutInfo.stack) {
|
|
1292
|
+
const stack = staticBailoutInfo.stack;
|
|
1293
|
+
err.stack = err.message + stack.substring(stack.indexOf('\n'));
|
|
1294
|
+
}
|
|
1295
|
+
throw err;
|
|
1296
|
+
}
|
|
1297
|
+
return {
|
|
1298
|
+
value: {
|
|
1299
|
+
kind: next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_18__.CachedRouteKind.APP_PAGE,
|
|
1300
|
+
html: result,
|
|
1301
|
+
headers,
|
|
1302
|
+
rscData: metadata.flightData,
|
|
1303
|
+
postponed: metadata.postponed,
|
|
1304
|
+
status: metadata.statusCode,
|
|
1305
|
+
segmentData: metadata.segmentData
|
|
1306
|
+
},
|
|
1307
|
+
cacheControl
|
|
1308
|
+
};
|
|
1309
|
+
};
|
|
1310
|
+
const responseGenerator = async ({ hasResolved, previousCacheEntry, isRevalidating, span })=>{
|
|
1311
|
+
const isProduction = routeModule.isDev === false;
|
|
1312
|
+
const didRespond = hasResolved || res.writableEnded;
|
|
1313
|
+
// skip on-demand revalidate if cache is not present and
|
|
1314
|
+
// revalidate-if-generated is set
|
|
1315
|
+
if (isOnDemandRevalidate && revalidateOnlyGenerated && !previousCacheEntry && !minimalMode) {
|
|
1316
|
+
if (routerServerContext == null ? void 0 : routerServerContext.render404) {
|
|
1317
|
+
await routerServerContext.render404(req, res);
|
|
1318
|
+
} else {
|
|
1319
|
+
res.statusCode = 404;
|
|
1320
|
+
res.end('This page could not be found');
|
|
1321
|
+
}
|
|
1322
|
+
return null;
|
|
1323
|
+
}
|
|
1324
|
+
let fallbackMode;
|
|
1325
|
+
if (prerenderInfo) {
|
|
1326
|
+
fallbackMode = (0,next_dist_lib_fallback__WEBPACK_IMPORTED_MODULE_19__.parseFallbackField)(prerenderInfo.fallback);
|
|
1327
|
+
}
|
|
1328
|
+
// When serving a HTML bot request, we want to serve a blocking render and
|
|
1329
|
+
// not the prerendered page. This ensures that the correct content is served
|
|
1330
|
+
// to the bot in the head.
|
|
1331
|
+
if (fallbackMode === next_dist_lib_fallback__WEBPACK_IMPORTED_MODULE_19__.FallbackMode.PRERENDER && (0,next_dist_shared_lib_router_utils_is_bot__WEBPACK_IMPORTED_MODULE_17__.isBot)(userAgent)) {
|
|
1332
|
+
if (!isRoutePPREnabled || isHtmlBot) {
|
|
1333
|
+
fallbackMode = next_dist_lib_fallback__WEBPACK_IMPORTED_MODULE_19__.FallbackMode.BLOCKING_STATIC_RENDER;
|
|
1334
|
+
}
|
|
1335
|
+
}
|
|
1336
|
+
if ((previousCacheEntry == null ? void 0 : previousCacheEntry.isStale) === -1) {
|
|
1337
|
+
isOnDemandRevalidate = true;
|
|
1338
|
+
}
|
|
1339
|
+
// TODO: adapt for PPR
|
|
1340
|
+
// only allow on-demand revalidate for fallback: true/blocking
|
|
1341
|
+
// or for prerendered fallback: false paths
|
|
1342
|
+
if (isOnDemandRevalidate && (fallbackMode !== next_dist_lib_fallback__WEBPACK_IMPORTED_MODULE_19__.FallbackMode.NOT_FOUND || previousCacheEntry)) {
|
|
1343
|
+
fallbackMode = next_dist_lib_fallback__WEBPACK_IMPORTED_MODULE_19__.FallbackMode.BLOCKING_STATIC_RENDER;
|
|
1344
|
+
}
|
|
1345
|
+
if (!minimalMode && fallbackMode !== next_dist_lib_fallback__WEBPACK_IMPORTED_MODULE_19__.FallbackMode.BLOCKING_STATIC_RENDER && staticPathKey && !didRespond && !isDraftMode && pageIsDynamic && (isProduction || !isPrerendered)) {
|
|
1346
|
+
// if the page has dynamicParams: false and this pathname wasn't
|
|
1347
|
+
// prerendered trigger the no fallback handling
|
|
1348
|
+
if (// In development, fall through to render to handle missing
|
|
1349
|
+
// getStaticPaths.
|
|
1350
|
+
(isProduction || prerenderInfo) && // When fallback isn't present, abort this render so we 404
|
|
1351
|
+
fallbackMode === next_dist_lib_fallback__WEBPACK_IMPORTED_MODULE_19__.FallbackMode.NOT_FOUND) {
|
|
1352
|
+
throw new next_dist_shared_lib_no_fallback_error_external__WEBPACK_IMPORTED_MODULE_24__.NoFallbackError();
|
|
1353
|
+
}
|
|
1354
|
+
let fallbackResponse;
|
|
1355
|
+
if (isRoutePPREnabled && !isRSCRequest) {
|
|
1356
|
+
const cacheKey = typeof (prerenderInfo == null ? void 0 : prerenderInfo.fallback) === 'string' ? prerenderInfo.fallback : isProduction ? normalizedSrcPage : null;
|
|
1357
|
+
// We use the response cache here to handle the revalidation and
|
|
1358
|
+
// management of the fallback shell.
|
|
1359
|
+
fallbackResponse = await routeModule.handleResponse({
|
|
1360
|
+
cacheKey,
|
|
1361
|
+
req,
|
|
1362
|
+
nextConfig,
|
|
1363
|
+
routeKind: next_dist_server_route_kind__WEBPACK_IMPORTED_MODULE_1__.RouteKind.APP_PAGE,
|
|
1364
|
+
isFallback: true,
|
|
1365
|
+
prerenderManifest,
|
|
1366
|
+
isRoutePPREnabled,
|
|
1367
|
+
responseGenerator: async ()=>doRender({
|
|
1368
|
+
span,
|
|
1369
|
+
// We pass `undefined` as rendering a fallback isn't resumed
|
|
1370
|
+
// here.
|
|
1371
|
+
postponed: undefined,
|
|
1372
|
+
fallbackRouteParams: // If we're in production or we're debugging the fallback
|
|
1373
|
+
// shell then we should postpone when dynamic params are
|
|
1374
|
+
// accessed.
|
|
1375
|
+
isProduction || isDebugFallbackShell ? (0,next_dist_server_request_fallback_params__WEBPACK_IMPORTED_MODULE_10__/* .getFallbackRouteParams */ .u)(normalizedSrcPage) : null
|
|
1376
|
+
}),
|
|
1377
|
+
waitUntil: ctx.waitUntil
|
|
1378
|
+
});
|
|
1379
|
+
// If the fallback response was set to null, then we should return null.
|
|
1380
|
+
if (fallbackResponse === null) return null;
|
|
1381
|
+
// Otherwise, if we did get a fallback response, we should return it.
|
|
1382
|
+
if (fallbackResponse) {
|
|
1383
|
+
// Remove the cache control from the response to prevent it from being
|
|
1384
|
+
// used in the surrounding cache.
|
|
1385
|
+
delete fallbackResponse.cacheControl;
|
|
1386
|
+
return fallbackResponse;
|
|
1387
|
+
}
|
|
1388
|
+
}
|
|
1389
|
+
}
|
|
1390
|
+
// Only requests that aren't revalidating can be resumed. If we have the
|
|
1391
|
+
// minimal postponed data, then we should resume the render with it.
|
|
1392
|
+
const postponed = !isOnDemandRevalidate && !isRevalidating && minimalPostponed ? minimalPostponed : undefined;
|
|
1393
|
+
// When we're in minimal mode, if we're trying to debug the static shell,
|
|
1394
|
+
// we should just return nothing instead of resuming the dynamic render.
|
|
1395
|
+
if ((isDebugStaticShell || isDebugDynamicAccesses) && typeof postponed !== 'undefined') {
|
|
1396
|
+
return {
|
|
1397
|
+
cacheControl: {
|
|
1398
|
+
revalidate: 1,
|
|
1399
|
+
expire: undefined
|
|
1400
|
+
},
|
|
1401
|
+
value: {
|
|
1402
|
+
kind: next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_18__.CachedRouteKind.PAGES,
|
|
1403
|
+
html: next_dist_server_render_result__WEBPACK_IMPORTED_MODULE_20__["default"].EMPTY,
|
|
1404
|
+
pageData: {},
|
|
1405
|
+
headers: undefined,
|
|
1406
|
+
status: undefined
|
|
1407
|
+
}
|
|
1408
|
+
};
|
|
1409
|
+
}
|
|
1410
|
+
// If this is a dynamic route with PPR enabled and the default route
|
|
1411
|
+
// matches were set, then we should pass the fallback route params to
|
|
1412
|
+
// the renderer as this is a fallback revalidation request.
|
|
1413
|
+
const fallbackRouteParams = pageIsDynamic && isRoutePPREnabled && ((0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__.getRequestMeta)(req, 'renderFallbackShell') || isDebugFallbackShell) ? (0,next_dist_server_request_fallback_params__WEBPACK_IMPORTED_MODULE_10__/* .getFallbackRouteParams */ .u)(pathname) : null;
|
|
1414
|
+
// Perform the render.
|
|
1415
|
+
return doRender({
|
|
1416
|
+
span,
|
|
1417
|
+
postponed,
|
|
1418
|
+
fallbackRouteParams
|
|
1419
|
+
});
|
|
1420
|
+
};
|
|
1421
|
+
const handleResponse = async (span)=>{
|
|
1422
|
+
var _cacheEntry_value, _cachedData_headers;
|
|
1423
|
+
const cacheEntry = await routeModule.handleResponse({
|
|
1424
|
+
cacheKey: ssgCacheKey,
|
|
1425
|
+
responseGenerator: (c)=>responseGenerator({
|
|
1426
|
+
span,
|
|
1427
|
+
...c
|
|
1428
|
+
}),
|
|
1429
|
+
routeKind: next_dist_server_route_kind__WEBPACK_IMPORTED_MODULE_1__.RouteKind.APP_PAGE,
|
|
1430
|
+
isOnDemandRevalidate,
|
|
1431
|
+
isRoutePPREnabled,
|
|
1432
|
+
req,
|
|
1433
|
+
nextConfig,
|
|
1434
|
+
prerenderManifest,
|
|
1435
|
+
waitUntil: ctx.waitUntil
|
|
1436
|
+
});
|
|
1437
|
+
if (isDraftMode) {
|
|
1438
|
+
res.setHeader('Cache-Control', 'private, no-cache, no-store, max-age=0, must-revalidate');
|
|
1439
|
+
}
|
|
1440
|
+
// In dev, we should not cache pages for any reason.
|
|
1441
|
+
if (routeModule.isDev) {
|
|
1442
|
+
res.setHeader('Cache-Control', 'no-store, must-revalidate');
|
|
1443
|
+
}
|
|
1444
|
+
if (!cacheEntry) {
|
|
1445
|
+
if (ssgCacheKey) {
|
|
1446
|
+
// A cache entry might not be generated if a response is written
|
|
1447
|
+
// in `getInitialProps` or `getServerSideProps`, but those shouldn't
|
|
1448
|
+
// have a cache key. If we do have a cache key but we don't end up
|
|
1449
|
+
// with a cache entry, then either Next.js or the application has a
|
|
1450
|
+
// bug that needs fixing.
|
|
1451
|
+
throw Object.defineProperty(new Error('invariant: cache entry required but not generated'), "__NEXT_ERROR_CODE", {
|
|
1452
|
+
value: "E62",
|
|
1453
|
+
enumerable: false,
|
|
1454
|
+
configurable: true
|
|
1455
|
+
});
|
|
1456
|
+
}
|
|
1457
|
+
return null;
|
|
1458
|
+
}
|
|
1459
|
+
if (((_cacheEntry_value = cacheEntry.value) == null ? void 0 : _cacheEntry_value.kind) !== next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_18__.CachedRouteKind.APP_PAGE) {
|
|
1460
|
+
var _cacheEntry_value1;
|
|
1461
|
+
throw Object.defineProperty(new Error(`Invariant app-page handler received invalid cache entry ${(_cacheEntry_value1 = cacheEntry.value) == null ? void 0 : _cacheEntry_value1.kind}`), "__NEXT_ERROR_CODE", {
|
|
1462
|
+
value: "E707",
|
|
1463
|
+
enumerable: false,
|
|
1464
|
+
configurable: true
|
|
1465
|
+
});
|
|
1466
|
+
}
|
|
1467
|
+
const didPostpone = typeof cacheEntry.value.postponed === 'string';
|
|
1468
|
+
if (isSSG && // We don't want to send a cache header for requests that contain dynamic
|
|
1469
|
+
// data. If this is a Dynamic RSC request or wasn't a Prefetch RSC
|
|
1470
|
+
// request, then we should set the cache header.
|
|
1471
|
+
!isDynamicRSCRequest && (!didPostpone || isPrefetchRSCRequest)) {
|
|
1472
|
+
if (!minimalMode) {
|
|
1473
|
+
// set x-nextjs-cache header to match the header
|
|
1474
|
+
// we set for the image-optimizer
|
|
1475
|
+
res.setHeader('x-nextjs-cache', isOnDemandRevalidate ? 'REVALIDATED' : cacheEntry.isMiss ? 'MISS' : cacheEntry.isStale ? 'STALE' : 'HIT');
|
|
1476
|
+
}
|
|
1477
|
+
// Set a header used by the client router to signal the response is static
|
|
1478
|
+
// and should respect the `static` cache staleTime value.
|
|
1479
|
+
res.setHeader(next_dist_client_components_app_router_headers__WEBPACK_IMPORTED_MODULE_16__.NEXT_IS_PRERENDER_HEADER, '1');
|
|
1480
|
+
}
|
|
1481
|
+
const { value: cachedData } = cacheEntry;
|
|
1482
|
+
// Coerce the cache control parameter from the render.
|
|
1483
|
+
let cacheControl;
|
|
1484
|
+
// If this is a resume request in minimal mode it is streamed with dynamic
|
|
1485
|
+
// content and should not be cached.
|
|
1486
|
+
if (minimalPostponed) {
|
|
1487
|
+
cacheControl = {
|
|
1488
|
+
revalidate: 0,
|
|
1489
|
+
expire: undefined
|
|
1490
|
+
};
|
|
1491
|
+
} else if (minimalMode && isRSCRequest && !isPrefetchRSCRequest && isRoutePPREnabled) {
|
|
1492
|
+
cacheControl = {
|
|
1493
|
+
revalidate: 0,
|
|
1494
|
+
expire: undefined
|
|
1495
|
+
};
|
|
1496
|
+
} else if (!routeModule.isDev) {
|
|
1497
|
+
// If this is a preview mode request, we shouldn't cache it
|
|
1498
|
+
if (isDraftMode) {
|
|
1499
|
+
cacheControl = {
|
|
1500
|
+
revalidate: 0,
|
|
1501
|
+
expire: undefined
|
|
1502
|
+
};
|
|
1503
|
+
} else if (!isSSG) {
|
|
1504
|
+
if (!res.getHeader('Cache-Control')) {
|
|
1505
|
+
cacheControl = {
|
|
1506
|
+
revalidate: 0,
|
|
1507
|
+
expire: undefined
|
|
1508
|
+
};
|
|
1509
|
+
}
|
|
1510
|
+
} else if (cacheEntry.cacheControl) {
|
|
1511
|
+
// If the cache entry has a cache control with a revalidate value that's
|
|
1512
|
+
// a number, use it.
|
|
1513
|
+
if (typeof cacheEntry.cacheControl.revalidate === 'number') {
|
|
1514
|
+
var _cacheEntry_cacheControl;
|
|
1515
|
+
if (cacheEntry.cacheControl.revalidate < 1) {
|
|
1516
|
+
throw Object.defineProperty(new Error(`Invalid revalidate configuration provided: ${cacheEntry.cacheControl.revalidate} < 1`), "__NEXT_ERROR_CODE", {
|
|
1517
|
+
value: "E22",
|
|
1518
|
+
enumerable: false,
|
|
1519
|
+
configurable: true
|
|
1520
|
+
});
|
|
1521
|
+
}
|
|
1522
|
+
cacheControl = {
|
|
1523
|
+
revalidate: cacheEntry.cacheControl.revalidate,
|
|
1524
|
+
expire: ((_cacheEntry_cacheControl = cacheEntry.cacheControl) == null ? void 0 : _cacheEntry_cacheControl.expire) ?? nextConfig.expireTime
|
|
1525
|
+
};
|
|
1526
|
+
} else {
|
|
1527
|
+
cacheControl = {
|
|
1528
|
+
revalidate: next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_21__.CACHE_ONE_YEAR,
|
|
1529
|
+
expire: undefined
|
|
1530
|
+
};
|
|
1531
|
+
}
|
|
1532
|
+
}
|
|
1533
|
+
}
|
|
1534
|
+
cacheEntry.cacheControl = cacheControl;
|
|
1535
|
+
if (typeof segmentPrefetchHeader === 'string' && (cachedData == null ? void 0 : cachedData.kind) === next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_18__.CachedRouteKind.APP_PAGE && cachedData.segmentData) {
|
|
1536
|
+
var _cachedData_headers1;
|
|
1537
|
+
// This is a prefetch request issued by the client Segment Cache. These
|
|
1538
|
+
// should never reach the application layer (lambda). We should either
|
|
1539
|
+
// respond from the cache (HIT) or respond with 204 No Content (MISS).
|
|
1540
|
+
// Set a header to indicate that PPR is enabled for this route. This
|
|
1541
|
+
// lets the client distinguish between a regular cache miss and a cache
|
|
1542
|
+
// miss due to PPR being disabled. In other contexts this header is used
|
|
1543
|
+
// to indicate that the response contains dynamic data, but here we're
|
|
1544
|
+
// only using it to indicate that the feature is enabled — the segment
|
|
1545
|
+
// response itself contains whether the data is dynamic.
|
|
1546
|
+
res.setHeader(next_dist_client_components_app_router_headers__WEBPACK_IMPORTED_MODULE_16__.NEXT_DID_POSTPONE_HEADER, '2');
|
|
1547
|
+
// Add the cache tags header to the response if it exists and we're in
|
|
1548
|
+
// minimal mode while rendering a static page.
|
|
1549
|
+
const tags = (_cachedData_headers1 = cachedData.headers) == null ? void 0 : _cachedData_headers1[next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_21__.NEXT_CACHE_TAGS_HEADER];
|
|
1550
|
+
if (minimalMode && isSSG && tags && typeof tags === 'string') {
|
|
1551
|
+
res.setHeader(next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_21__.NEXT_CACHE_TAGS_HEADER, tags);
|
|
1552
|
+
}
|
|
1553
|
+
const matchedSegment = cachedData.segmentData.get(segmentPrefetchHeader);
|
|
1554
|
+
if (matchedSegment !== undefined) {
|
|
1555
|
+
// Cache hit
|
|
1556
|
+
return (0,next_dist_server_send_payload__WEBPACK_IMPORTED_MODULE_23__.sendRenderResult)({
|
|
1557
|
+
req,
|
|
1558
|
+
res,
|
|
1559
|
+
generateEtags: nextConfig.generateEtags,
|
|
1560
|
+
poweredByHeader: nextConfig.poweredByHeader,
|
|
1561
|
+
result: next_dist_server_render_result__WEBPACK_IMPORTED_MODULE_20__["default"].fromStatic(matchedSegment, next_dist_client_components_app_router_headers__WEBPACK_IMPORTED_MODULE_16__.RSC_CONTENT_TYPE_HEADER),
|
|
1562
|
+
cacheControl: cacheEntry.cacheControl
|
|
1563
|
+
});
|
|
1564
|
+
}
|
|
1565
|
+
// Cache miss. Either a cache entry for this route has not been generated
|
|
1566
|
+
// (which technically should not be possible when PPR is enabled, because
|
|
1567
|
+
// at a minimum there should always be a fallback entry) or there's no
|
|
1568
|
+
// match for the requested segment. Respond with a 204 No Content. We
|
|
1569
|
+
// don't bother to respond with 404, because these requests are only
|
|
1570
|
+
// issued as part of a prefetch.
|
|
1571
|
+
res.statusCode = 204;
|
|
1572
|
+
return (0,next_dist_server_send_payload__WEBPACK_IMPORTED_MODULE_23__.sendRenderResult)({
|
|
1573
|
+
req,
|
|
1574
|
+
res,
|
|
1575
|
+
generateEtags: nextConfig.generateEtags,
|
|
1576
|
+
poweredByHeader: nextConfig.poweredByHeader,
|
|
1577
|
+
result: next_dist_server_render_result__WEBPACK_IMPORTED_MODULE_20__["default"].EMPTY,
|
|
1578
|
+
cacheControl: cacheEntry.cacheControl
|
|
1579
|
+
});
|
|
1580
|
+
}
|
|
1581
|
+
// If there's a callback for `onCacheEntry`, call it with the cache entry
|
|
1582
|
+
// and the revalidate options.
|
|
1583
|
+
const onCacheEntry = (0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__.getRequestMeta)(req, 'onCacheEntry');
|
|
1584
|
+
if (onCacheEntry) {
|
|
1585
|
+
const finished = await onCacheEntry({
|
|
1586
|
+
...cacheEntry,
|
|
1587
|
+
// TODO: remove this when upstream doesn't
|
|
1588
|
+
// always expect this value to be "PAGE"
|
|
1589
|
+
value: {
|
|
1590
|
+
...cacheEntry.value,
|
|
1591
|
+
kind: 'PAGE'
|
|
1592
|
+
}
|
|
1593
|
+
}, {
|
|
1594
|
+
url: (0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__.getRequestMeta)(req, 'initURL')
|
|
1595
|
+
});
|
|
1596
|
+
if (finished) {
|
|
1597
|
+
// TODO: maybe we have to end the request?
|
|
1598
|
+
return null;
|
|
1599
|
+
}
|
|
1600
|
+
}
|
|
1601
|
+
// If the request has a postponed state and it's a resume request we
|
|
1602
|
+
// should error.
|
|
1603
|
+
if (didPostpone && minimalPostponed) {
|
|
1604
|
+
throw Object.defineProperty(new Error('Invariant: postponed state should not be present on a resume request'), "__NEXT_ERROR_CODE", {
|
|
1605
|
+
value: "E396",
|
|
1606
|
+
enumerable: false,
|
|
1607
|
+
configurable: true
|
|
1608
|
+
});
|
|
1609
|
+
}
|
|
1610
|
+
if (cachedData.headers) {
|
|
1611
|
+
const headers = {
|
|
1612
|
+
...cachedData.headers
|
|
1613
|
+
};
|
|
1614
|
+
if (!minimalMode || !isSSG) {
|
|
1615
|
+
delete headers[next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_21__.NEXT_CACHE_TAGS_HEADER];
|
|
1616
|
+
}
|
|
1617
|
+
for (let [key, value] of Object.entries(headers)){
|
|
1618
|
+
if (typeof value === 'undefined') continue;
|
|
1619
|
+
if (Array.isArray(value)) {
|
|
1620
|
+
for (const v of value){
|
|
1621
|
+
res.appendHeader(key, v);
|
|
1622
|
+
}
|
|
1623
|
+
} else if (typeof value === 'number') {
|
|
1624
|
+
value = value.toString();
|
|
1625
|
+
res.appendHeader(key, value);
|
|
1626
|
+
} else {
|
|
1627
|
+
res.appendHeader(key, value);
|
|
1628
|
+
}
|
|
1629
|
+
}
|
|
1630
|
+
}
|
|
1631
|
+
// Add the cache tags header to the response if it exists and we're in
|
|
1632
|
+
// minimal mode while rendering a static page.
|
|
1633
|
+
const tags = (_cachedData_headers = cachedData.headers) == null ? void 0 : _cachedData_headers[next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_21__.NEXT_CACHE_TAGS_HEADER];
|
|
1634
|
+
if (minimalMode && isSSG && tags && typeof tags === 'string') {
|
|
1635
|
+
res.setHeader(next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_21__.NEXT_CACHE_TAGS_HEADER, tags);
|
|
1636
|
+
}
|
|
1637
|
+
// If the request is a data request, then we shouldn't set the status code
|
|
1638
|
+
// from the response because it should always be 200. This should be gated
|
|
1639
|
+
// behind the experimental PPR flag.
|
|
1640
|
+
if (cachedData.status && (!isRSCRequest || !isRoutePPREnabled)) {
|
|
1641
|
+
res.statusCode = cachedData.status;
|
|
1642
|
+
}
|
|
1643
|
+
// Redirect information is encoded in RSC payload, so we don't need to use redirect status codes
|
|
1644
|
+
if (!minimalMode && cachedData.status && next_dist_client_components_redirect_status_code__WEBPACK_IMPORTED_MODULE_27__.RedirectStatusCode[cachedData.status] && isRSCRequest) {
|
|
1645
|
+
res.statusCode = 200;
|
|
1646
|
+
}
|
|
1647
|
+
// Mark that the request did postpone.
|
|
1648
|
+
if (didPostpone) {
|
|
1649
|
+
res.setHeader(next_dist_client_components_app_router_headers__WEBPACK_IMPORTED_MODULE_16__.NEXT_DID_POSTPONE_HEADER, '1');
|
|
1650
|
+
}
|
|
1651
|
+
// we don't go through this block when preview mode is true
|
|
1652
|
+
// as preview mode is a dynamic request (bypasses cache) and doesn't
|
|
1653
|
+
// generate both HTML and payloads in the same request so continue to just
|
|
1654
|
+
// return the generated payload
|
|
1655
|
+
if (isRSCRequest && !isDraftMode) {
|
|
1656
|
+
// If this is a dynamic RSC request, then stream the response.
|
|
1657
|
+
if (typeof cachedData.rscData === 'undefined') {
|
|
1658
|
+
if (cachedData.postponed) {
|
|
1659
|
+
throw Object.defineProperty(new Error('Invariant: Expected postponed to be undefined'), "__NEXT_ERROR_CODE", {
|
|
1660
|
+
value: "E372",
|
|
1661
|
+
enumerable: false,
|
|
1662
|
+
configurable: true
|
|
1663
|
+
});
|
|
1664
|
+
}
|
|
1665
|
+
return (0,next_dist_server_send_payload__WEBPACK_IMPORTED_MODULE_23__.sendRenderResult)({
|
|
1666
|
+
req,
|
|
1667
|
+
res,
|
|
1668
|
+
generateEtags: nextConfig.generateEtags,
|
|
1669
|
+
poweredByHeader: nextConfig.poweredByHeader,
|
|
1670
|
+
result: cachedData.html,
|
|
1671
|
+
// Dynamic RSC responses cannot be cached, even if they're
|
|
1672
|
+
// configured with `force-static` because we have no way of
|
|
1673
|
+
// distinguishing between `force-static` and pages that have no
|
|
1674
|
+
// postponed state.
|
|
1675
|
+
// TODO: distinguish `force-static` from pages with no postponed state (static)
|
|
1676
|
+
cacheControl: isDynamicRSCRequest ? {
|
|
1677
|
+
revalidate: 0,
|
|
1678
|
+
expire: undefined
|
|
1679
|
+
} : cacheEntry.cacheControl
|
|
1680
|
+
});
|
|
1681
|
+
}
|
|
1682
|
+
// As this isn't a prefetch request, we should serve the static flight
|
|
1683
|
+
// data.
|
|
1684
|
+
return (0,next_dist_server_send_payload__WEBPACK_IMPORTED_MODULE_23__.sendRenderResult)({
|
|
1685
|
+
req,
|
|
1686
|
+
res,
|
|
1687
|
+
generateEtags: nextConfig.generateEtags,
|
|
1688
|
+
poweredByHeader: nextConfig.poweredByHeader,
|
|
1689
|
+
result: next_dist_server_render_result__WEBPACK_IMPORTED_MODULE_20__["default"].fromStatic(cachedData.rscData, next_dist_client_components_app_router_headers__WEBPACK_IMPORTED_MODULE_16__.RSC_CONTENT_TYPE_HEADER),
|
|
1690
|
+
cacheControl: cacheEntry.cacheControl
|
|
1691
|
+
});
|
|
1692
|
+
}
|
|
1693
|
+
// This is a request for HTML data.
|
|
1694
|
+
let body = cachedData.html;
|
|
1695
|
+
// If there's no postponed state, we should just serve the HTML. This
|
|
1696
|
+
// should also be the case for a resume request because it's completed
|
|
1697
|
+
// as a server render (rather than a static render).
|
|
1698
|
+
if (!didPostpone || minimalMode || isRSCRequest) {
|
|
1699
|
+
// If we're in test mode, we should add a sentinel chunk to the response
|
|
1700
|
+
// that's between the static and dynamic parts so we can compare the
|
|
1701
|
+
// chunks and add assertions.
|
|
1702
|
+
if (false) {}
|
|
1703
|
+
return (0,next_dist_server_send_payload__WEBPACK_IMPORTED_MODULE_23__.sendRenderResult)({
|
|
1704
|
+
req,
|
|
1705
|
+
res,
|
|
1706
|
+
generateEtags: nextConfig.generateEtags,
|
|
1707
|
+
poweredByHeader: nextConfig.poweredByHeader,
|
|
1708
|
+
result: body,
|
|
1709
|
+
cacheControl: cacheEntry.cacheControl
|
|
1710
|
+
});
|
|
1711
|
+
}
|
|
1712
|
+
// If we're debugging the static shell or the dynamic API accesses, we
|
|
1713
|
+
// should just serve the HTML without resuming the render. The returned
|
|
1714
|
+
// HTML will be the static shell so all the Dynamic API's will be used
|
|
1715
|
+
// during static generation.
|
|
1716
|
+
if (isDebugStaticShell || isDebugDynamicAccesses) {
|
|
1717
|
+
// Since we're not resuming the render, we need to at least add the
|
|
1718
|
+
// closing body and html tags to create valid HTML.
|
|
1719
|
+
body.push(new ReadableStream({
|
|
1720
|
+
start (controller) {
|
|
1721
|
+
controller.enqueue(next_dist_server_stream_utils_encoded_tags__WEBPACK_IMPORTED_MODULE_22__.ENCODED_TAGS.CLOSED.BODY_AND_HTML);
|
|
1722
|
+
controller.close();
|
|
1723
|
+
}
|
|
1724
|
+
}));
|
|
1725
|
+
return (0,next_dist_server_send_payload__WEBPACK_IMPORTED_MODULE_23__.sendRenderResult)({
|
|
1726
|
+
req,
|
|
1727
|
+
res,
|
|
1728
|
+
generateEtags: nextConfig.generateEtags,
|
|
1729
|
+
poweredByHeader: nextConfig.poweredByHeader,
|
|
1730
|
+
result: body,
|
|
1731
|
+
cacheControl: {
|
|
1732
|
+
revalidate: 0,
|
|
1733
|
+
expire: undefined
|
|
1734
|
+
}
|
|
1735
|
+
});
|
|
1736
|
+
}
|
|
1737
|
+
// If we're in test mode, we should add a sentinel chunk to the response
|
|
1738
|
+
// that's between the static and dynamic parts so we can compare the
|
|
1739
|
+
// chunks and add assertions.
|
|
1740
|
+
if (false) {}
|
|
1741
|
+
// This request has postponed, so let's create a new transformer that the
|
|
1742
|
+
// dynamic data can pipe to that will attach the dynamic data to the end
|
|
1743
|
+
// of the response.
|
|
1744
|
+
const transformer = new TransformStream();
|
|
1745
|
+
body.push(transformer.readable);
|
|
1746
|
+
// Perform the render again, but this time, provide the postponed state.
|
|
1747
|
+
// We don't await because we want the result to start streaming now, and
|
|
1748
|
+
// we've already chained the transformer's readable to the render result.
|
|
1749
|
+
doRender({
|
|
1750
|
+
span,
|
|
1751
|
+
postponed: cachedData.postponed,
|
|
1752
|
+
// This is a resume render, not a fallback render, so we don't need to
|
|
1753
|
+
// set this.
|
|
1754
|
+
fallbackRouteParams: null
|
|
1755
|
+
}).then(async (result)=>{
|
|
1756
|
+
var _result_value;
|
|
1757
|
+
if (!result) {
|
|
1758
|
+
throw Object.defineProperty(new Error('Invariant: expected a result to be returned'), "__NEXT_ERROR_CODE", {
|
|
1759
|
+
value: "E463",
|
|
1760
|
+
enumerable: false,
|
|
1761
|
+
configurable: true
|
|
1762
|
+
});
|
|
1763
|
+
}
|
|
1764
|
+
if (((_result_value = result.value) == null ? void 0 : _result_value.kind) !== next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_18__.CachedRouteKind.APP_PAGE) {
|
|
1765
|
+
var _result_value1;
|
|
1766
|
+
throw Object.defineProperty(new Error(`Invariant: expected a page response, got ${(_result_value1 = result.value) == null ? void 0 : _result_value1.kind}`), "__NEXT_ERROR_CODE", {
|
|
1767
|
+
value: "E305",
|
|
1768
|
+
enumerable: false,
|
|
1769
|
+
configurable: true
|
|
1770
|
+
});
|
|
1771
|
+
}
|
|
1772
|
+
// Pipe the resume result to the transformer.
|
|
1773
|
+
await result.value.html.pipeTo(transformer.writable);
|
|
1774
|
+
}).catch((err)=>{
|
|
1775
|
+
// An error occurred during piping or preparing the render, abort
|
|
1776
|
+
// the transformers writer so we can terminate the stream.
|
|
1777
|
+
transformer.writable.abort(err).catch((e)=>{
|
|
1778
|
+
console.error("couldn't abort transformer", e);
|
|
1779
|
+
});
|
|
1780
|
+
});
|
|
1781
|
+
return (0,next_dist_server_send_payload__WEBPACK_IMPORTED_MODULE_23__.sendRenderResult)({
|
|
1782
|
+
req,
|
|
1783
|
+
res,
|
|
1784
|
+
generateEtags: nextConfig.generateEtags,
|
|
1785
|
+
poweredByHeader: nextConfig.poweredByHeader,
|
|
1786
|
+
result: body,
|
|
1787
|
+
// We don't want to cache the response if it has postponed data because
|
|
1788
|
+
// the response being sent to the client it's dynamic parts are streamed
|
|
1789
|
+
// to the client on the same request.
|
|
1790
|
+
cacheControl: {
|
|
1791
|
+
revalidate: 0,
|
|
1792
|
+
expire: undefined
|
|
1793
|
+
}
|
|
1794
|
+
});
|
|
1795
|
+
};
|
|
1796
|
+
// TODO: activeSpan code path is for when wrapped by
|
|
1797
|
+
// next-server can be removed when this is no longer used
|
|
1798
|
+
if (activeSpan) {
|
|
1799
|
+
await handleResponse(activeSpan);
|
|
1800
|
+
} else {
|
|
1801
|
+
return await tracer.withPropagatedContext(req.headers, ()=>tracer.trace(next_dist_server_lib_trace_constants__WEBPACK_IMPORTED_MODULE_5__.BaseServerSpan.handleRequest, {
|
|
1802
|
+
spanName: `${method} ${req.url}`,
|
|
1803
|
+
kind: next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_3__.SpanKind.SERVER,
|
|
1804
|
+
attributes: {
|
|
1805
|
+
'http.method': method,
|
|
1806
|
+
'http.target': req.url
|
|
1807
|
+
}
|
|
1808
|
+
}, handleResponse));
|
|
1711
1809
|
}
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
expandSidebarLabel: tSidebar('expandSidebar')
|
|
1728
|
-
});
|
|
1810
|
+
} catch (err) {
|
|
1811
|
+
if (!(err instanceof next_dist_shared_lib_no_fallback_error_external__WEBPACK_IMPORTED_MODULE_24__.NoFallbackError)) {
|
|
1812
|
+
await routeModule.onRequestError(req, err, {
|
|
1813
|
+
routerKind: 'App Router',
|
|
1814
|
+
routePath: srcPage,
|
|
1815
|
+
routeType: 'render',
|
|
1816
|
+
revalidateReason: (0,next_dist_server_instrumentation_utils__WEBPACK_IMPORTED_MODULE_2__/* .getRevalidateReason */ .c)({
|
|
1817
|
+
isRevalidate: isSSG,
|
|
1818
|
+
isOnDemandRevalidate
|
|
1819
|
+
})
|
|
1820
|
+
}, routerServerContext);
|
|
1821
|
+
}
|
|
1822
|
+
// rethrow so that we can handle serving error page
|
|
1823
|
+
throw err;
|
|
1824
|
+
}
|
|
1729
1825
|
}
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
|
|
1742
|
-
|
|
1743
|
-
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
// Note: Authentication is handled by middleware.ts for all moderate routes
|
|
1751
|
-
// This ensures centralized security and returns 404 for unauthorized users
|
|
1752
|
-
function ModerateLayout({ children }) {
|
|
1753
|
-
const t = (0,react_client/* useTranslations */.c)('Footer');
|
|
1754
|
-
const tNav = (0,react_client/* useTranslations */.c)('Navigation');
|
|
1755
|
-
const tHome = (0,react_client/* useTranslations */.c)('Home');
|
|
1756
|
-
const keyboardContext = (0,react.useContext)(KeyboardShortcutsContext/* KeyboardShortcutsContext */.GZ);
|
|
1757
|
-
const { isAuthenticated, isAdmin, isModerator } = (0,useAuth/* useAuth */.As)();
|
|
1758
|
-
const { data: session } = (0,next_auth_react.useSession)();
|
|
1759
|
-
// Extract auth token from session
|
|
1760
|
-
const authToken = session?.backendToken || null;
|
|
1761
|
-
// Middleware has already verified moderator/admin access
|
|
1762
|
-
return /*#__PURE__*/ (0,react_jsx_runtime.jsx)(dist/* AuthTokenProvider */.ffs, {
|
|
1763
|
-
token: authToken,
|
|
1764
|
-
children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(dist/* ApiClientProvider */.pqI, {
|
|
1765
|
-
baseUrl: "",
|
|
1766
|
-
children: /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", {
|
|
1767
|
-
className: "min-h-screen bg-gray-50 dark:bg-gray-900 flex flex-col",
|
|
1768
|
-
children: [
|
|
1769
|
-
/*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", {
|
|
1770
|
-
className: "flex flex-1",
|
|
1771
|
-
children: [
|
|
1772
|
-
/*#__PURE__*/ (0,react_jsx_runtime.jsx)(dist/* LeftSidebar */.Ef3, {
|
|
1773
|
-
Link: lib_routing/* Link */.N,
|
|
1774
|
-
routes: lib_routing/* routes */.J,
|
|
1775
|
-
t: tNav,
|
|
1776
|
-
tHome: tHome,
|
|
1777
|
-
brandingLink: "/",
|
|
1778
|
-
collapsible: true,
|
|
1779
|
-
storageKey: "moderation-sidebar-collapsed",
|
|
1780
|
-
isAuthenticated: isAuthenticated,
|
|
1781
|
-
isAdmin: isAdmin,
|
|
1782
|
-
isModerator: isModerator,
|
|
1783
|
-
children: (isCollapsed, toggleCollapsed, navigationMenu)=>/*#__PURE__*/ (0,react_jsx_runtime.jsx)(ModerationNavigation, {
|
|
1784
|
-
isCollapsed: isCollapsed,
|
|
1785
|
-
toggleCollapsed: toggleCollapsed,
|
|
1786
|
-
navigationMenu: navigationMenu
|
|
1787
|
-
})
|
|
1788
|
-
}),
|
|
1789
|
-
/*#__PURE__*/ (0,react_jsx_runtime.jsx)("main", {
|
|
1790
|
-
className: "flex-1 p-6 flex flex-col",
|
|
1791
|
-
children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", {
|
|
1792
|
-
className: "max-w-7xl mx-auto flex-1 flex flex-col w-full",
|
|
1793
|
-
children: children
|
|
1794
|
-
})
|
|
1795
|
-
})
|
|
1796
|
-
]
|
|
1797
|
-
}),
|
|
1798
|
-
/*#__PURE__*/ (0,react_jsx_runtime.jsx)(dist/* Footer */.wi6, {
|
|
1799
|
-
Link: lib_routing/* Link */.N,
|
|
1800
|
-
routes: lib_routing/* routes */.J,
|
|
1801
|
-
t: t,
|
|
1802
|
-
CookiePreferences: CookiePreferences/* CookiePreferences */.f,
|
|
1803
|
-
...keyboardContext?.openKeyboardHelp && {
|
|
1804
|
-
onOpenKeyboardHelp: keyboardContext.openKeyboardHelp
|
|
1805
|
-
}
|
|
1806
|
-
})
|
|
1807
|
-
]
|
|
1808
|
-
})
|
|
1809
|
-
})
|
|
1826
|
+
// TODO: omit this from production builds, only test builds should include it
|
|
1827
|
+
/**
|
|
1828
|
+
* Creates a readable stream that emits a PPR boundary sentinel.
|
|
1829
|
+
*
|
|
1830
|
+
* @returns A readable stream that emits a PPR boundary sentinel.
|
|
1831
|
+
*/ function createPPRBoundarySentinel() {
|
|
1832
|
+
return new ReadableStream({
|
|
1833
|
+
start (controller) {
|
|
1834
|
+
controller.enqueue(new TextEncoder().encode('<!-- PPR_BOUNDARY_SENTINEL -->'));
|
|
1835
|
+
controller.close();
|
|
1836
|
+
}
|
|
1810
1837
|
});
|
|
1811
1838
|
}
|
|
1812
1839
|
|
|
1813
|
-
|
|
1814
|
-
/***/ }),
|
|
1815
|
-
|
|
1816
|
-
/***/ 72570:
|
|
1817
|
-
/***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
|
|
1818
|
-
|
|
1819
|
-
Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 90589));
|
|
1820
|
-
|
|
1821
|
-
|
|
1822
|
-
/***/ }),
|
|
1823
|
-
|
|
1824
|
-
/***/ 75555:
|
|
1825
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
1826
|
-
|
|
1827
|
-
"use strict";
|
|
1828
|
-
__webpack_require__.r(__webpack_exports__);
|
|
1829
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
1830
|
-
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
1831
|
-
/* harmony export */ });
|
|
1832
|
-
/* harmony import */ var react_server_dom_webpack_server__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(25459);
|
|
1833
|
-
/* harmony import */ var react_server_dom_webpack_server__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react_server_dom_webpack_server__WEBPACK_IMPORTED_MODULE_0__);
|
|
1834
|
-
// This file is generated by the Webpack next-flight-loader.
|
|
1835
|
-
|
|
1836
|
-
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ((0,react_server_dom_webpack_server__WEBPACK_IMPORTED_MODULE_0__.registerClientReference)(
|
|
1837
|
-
function() { throw new Error("Attempted to call the default export of \"/Users/pingel/git_repos/github.com/The-AI-Alliance/semiont/apps/frontend/src/app/[locale]/moderate/layout.tsx\" from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component."); },
|
|
1838
|
-
"/Users/pingel/git_repos/github.com/The-AI-Alliance/semiont/apps/frontend/src/app/[locale]/moderate/layout.tsx",
|
|
1839
|
-
"default",
|
|
1840
|
-
));
|
|
1840
|
+
//# sourceMappingURL=app-page.js.map
|
|
1841
1841
|
|
|
1842
1842
|
|
|
1843
1843
|
/***/ }),
|
|
@@ -2021,10 +2021,10 @@ function EntityTagsPageWrapper() {
|
|
|
2021
2021
|
|
|
2022
2022
|
"use strict";
|
|
2023
2023
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
2024
|
-
/* harmony export */ C$z: () => (/* reexport safe */
|
|
2025
|
-
/* harmony export */ TbX: () => (/* reexport safe */
|
|
2024
|
+
/* harmony export */ C$z: () => (/* reexport safe */ _home_runner_work_semiont_semiont_packages_react_ui_dist_index_mjs__WEBPACK_IMPORTED_MODULE_0__.useEventSubscriptions),
|
|
2025
|
+
/* harmony export */ TbX: () => (/* reexport safe */ _home_runner_work_semiont_semiont_packages_react_ui_dist_index_mjs__WEBPACK_IMPORTED_MODULE_0__.SimpleNavigation)
|
|
2026
2026
|
/* harmony export */ });
|
|
2027
|
-
/* harmony import */ var
|
|
2027
|
+
/* harmony import */ var _home_runner_work_semiont_semiont_packages_react_ui_dist_index_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(30658);
|
|
2028
2028
|
|
|
2029
2029
|
|
|
2030
2030
|
|
|
@@ -2037,7 +2037,7 @@ function EntityTagsPageWrapper() {
|
|
|
2037
2037
|
var __webpack_require__ = require("../../../../webpack-runtime.js");
|
|
2038
2038
|
__webpack_require__.C(exports);
|
|
2039
2039
|
var __webpack_exec__ = (moduleId) => (__webpack_require__(__webpack_require__.s = moduleId))
|
|
2040
|
-
var __webpack_exports__ = __webpack_require__.X(0, [4725,1854,1940,1037,4729,7912,
|
|
2040
|
+
var __webpack_exports__ = __webpack_require__.X(0, [4725,1854,1940,1037,4729,7912,8387,580], () => (__webpack_exec__(79377)));
|
|
2041
2041
|
module.exports = __webpack_exports__;
|
|
2042
2042
|
|
|
2043
2043
|
})();
|