@equinor/cpl-top-bar-react 1.0.7 → 2.0.1

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/dist/index.mjs CHANGED
@@ -1,2546 +1,3 @@
1
- var __getOwnPropNames = Object.getOwnPropertyNames;
2
- var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
3
- get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
4
- }) : x)(function(x) {
5
- if (typeof require !== "undefined") return require.apply(this, arguments);
6
- throw Error('Dynamic require of "' + x + '" is not supported');
7
- });
8
- var __commonJS = (cb, mod) => function __require2() {
9
- return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
10
- };
11
-
12
- // ../../node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs
13
- var require_interop_require_wildcard = __commonJS({
14
- "../../node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs"(exports) {
15
- "use strict";
16
- function _getRequireWildcardCache(nodeInterop) {
17
- if (typeof WeakMap !== "function") return null;
18
- var cacheBabelInterop = /* @__PURE__ */ new WeakMap();
19
- var cacheNodeInterop = /* @__PURE__ */ new WeakMap();
20
- return (_getRequireWildcardCache = function(nodeInterop2) {
21
- return nodeInterop2 ? cacheNodeInterop : cacheBabelInterop;
22
- })(nodeInterop);
23
- }
24
- function _interop_require_wildcard(obj, nodeInterop) {
25
- if (!nodeInterop && obj && obj.__esModule) return obj;
26
- if (obj === null || typeof obj !== "object" && typeof obj !== "function") return { default: obj };
27
- var cache = _getRequireWildcardCache(nodeInterop);
28
- if (cache && cache.has(obj)) return cache.get(obj);
29
- var newObj = { __proto__: null };
30
- var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
31
- for (var key in obj) {
32
- if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
33
- var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
34
- if (desc && (desc.get || desc.set)) Object.defineProperty(newObj, key, desc);
35
- else newObj[key] = obj[key];
36
- }
37
- }
38
- newObj.default = obj;
39
- if (cache) cache.set(obj, newObj);
40
- return newObj;
41
- }
42
- exports._ = _interop_require_wildcard;
43
- }
44
- });
45
-
46
- // ../../node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_interop_require_default.cjs
47
- var require_interop_require_default = __commonJS({
48
- "../../node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_interop_require_default.cjs"(exports) {
49
- "use strict";
50
- function _interop_require_default(obj) {
51
- return obj && obj.__esModule ? obj : { default: obj };
52
- }
53
- exports._ = _interop_require_default;
54
- }
55
- });
56
-
57
- // ../../node_modules/.pnpm/next@16.1.6_@babel+core@7.29.0_@playwright+test@1.58.2_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/next/dist/shared/lib/app-router-context.shared-runtime.js
58
- var require_app_router_context_shared_runtime = __commonJS({
59
- "../../node_modules/.pnpm/next@16.1.6_@babel+core@7.29.0_@playwright+test@1.58.2_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/next/dist/shared/lib/app-router-context.shared-runtime.js"(exports) {
60
- "use strict";
61
- "use client";
62
- Object.defineProperty(exports, "__esModule", {
63
- value: true
64
- });
65
- function _export(target, all) {
66
- for (var name in all) Object.defineProperty(target, name, {
67
- enumerable: true,
68
- get: all[name]
69
- });
70
- }
71
- _export(exports, {
72
- AppRouterContext: function() {
73
- return AppRouterContext;
74
- },
75
- GlobalLayoutRouterContext: function() {
76
- return GlobalLayoutRouterContext;
77
- },
78
- LayoutRouterContext: function() {
79
- return LayoutRouterContext;
80
- },
81
- MissingSlotContext: function() {
82
- return MissingSlotContext;
83
- },
84
- TemplateContext: function() {
85
- return TemplateContext;
86
- }
87
- });
88
- var _interop_require_default = require_interop_require_default();
89
- var _react = /* @__PURE__ */ _interop_require_default._(__require("react"));
90
- var AppRouterContext = _react.default.createContext(null);
91
- var LayoutRouterContext = _react.default.createContext(null);
92
- var GlobalLayoutRouterContext = _react.default.createContext(null);
93
- var TemplateContext = _react.default.createContext(null);
94
- if (process.env.NODE_ENV !== "production") {
95
- AppRouterContext.displayName = "AppRouterContext";
96
- LayoutRouterContext.displayName = "LayoutRouterContext";
97
- GlobalLayoutRouterContext.displayName = "GlobalLayoutRouterContext";
98
- TemplateContext.displayName = "TemplateContext";
99
- }
100
- var MissingSlotContext = _react.default.createContext(/* @__PURE__ */ new Set());
101
- }
102
- });
103
-
104
- // ../../node_modules/.pnpm/next@16.1.6_@babel+core@7.29.0_@playwright+test@1.58.2_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/next/dist/client/components/readonly-url-search-params.js
105
- var require_readonly_url_search_params = __commonJS({
106
- "../../node_modules/.pnpm/next@16.1.6_@babel+core@7.29.0_@playwright+test@1.58.2_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/next/dist/client/components/readonly-url-search-params.js"(exports, module) {
107
- "use strict";
108
- Object.defineProperty(exports, "__esModule", {
109
- value: true
110
- });
111
- Object.defineProperty(exports, "ReadonlyURLSearchParams", {
112
- enumerable: true,
113
- get: function() {
114
- return ReadonlyURLSearchParams;
115
- }
116
- });
117
- var ReadonlyURLSearchParamsError = class extends Error {
118
- constructor() {
119
- super("Method unavailable on `ReadonlyURLSearchParams`. Read more: https://nextjs.org/docs/app/api-reference/functions/use-search-params#updating-searchparams");
120
- }
121
- };
122
- var ReadonlyURLSearchParams = class extends URLSearchParams {
123
- /** @deprecated Method unavailable on `ReadonlyURLSearchParams`. Read more: https://nextjs.org/docs/app/api-reference/functions/use-search-params#updating-searchparams */
124
- append() {
125
- throw new ReadonlyURLSearchParamsError();
126
- }
127
- /** @deprecated Method unavailable on `ReadonlyURLSearchParams`. Read more: https://nextjs.org/docs/app/api-reference/functions/use-search-params#updating-searchparams */
128
- delete() {
129
- throw new ReadonlyURLSearchParamsError();
130
- }
131
- /** @deprecated Method unavailable on `ReadonlyURLSearchParams`. Read more: https://nextjs.org/docs/app/api-reference/functions/use-search-params#updating-searchparams */
132
- set() {
133
- throw new ReadonlyURLSearchParamsError();
134
- }
135
- /** @deprecated Method unavailable on `ReadonlyURLSearchParams`. Read more: https://nextjs.org/docs/app/api-reference/functions/use-search-params#updating-searchparams */
136
- sort() {
137
- throw new ReadonlyURLSearchParamsError();
138
- }
139
- };
140
- if ((typeof exports.default === "function" || typeof exports.default === "object" && exports.default !== null) && typeof exports.default.__esModule === "undefined") {
141
- Object.defineProperty(exports.default, "__esModule", { value: true });
142
- Object.assign(exports.default, exports);
143
- module.exports = exports.default;
144
- }
145
- }
146
- });
147
-
148
- // ../../node_modules/.pnpm/next@16.1.6_@babel+core@7.29.0_@playwright+test@1.58.2_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/next/dist/shared/lib/hooks-client-context.shared-runtime.js
149
- var require_hooks_client_context_shared_runtime = __commonJS({
150
- "../../node_modules/.pnpm/next@16.1.6_@babel+core@7.29.0_@playwright+test@1.58.2_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/next/dist/shared/lib/hooks-client-context.shared-runtime.js"(exports) {
151
- "use strict";
152
- "use client";
153
- Object.defineProperty(exports, "__esModule", {
154
- value: true
155
- });
156
- function _export(target, all) {
157
- for (var name in all) Object.defineProperty(target, name, {
158
- enumerable: true,
159
- get: all[name]
160
- });
161
- }
162
- _export(exports, {
163
- NavigationPromisesContext: function() {
164
- return NavigationPromisesContext;
165
- },
166
- PathParamsContext: function() {
167
- return PathParamsContext;
168
- },
169
- PathnameContext: function() {
170
- return PathnameContext;
171
- },
172
- ReadonlyURLSearchParams: function() {
173
- return _readonlyurlsearchparams.ReadonlyURLSearchParams;
174
- },
175
- SearchParamsContext: function() {
176
- return SearchParamsContext;
177
- },
178
- createDevToolsInstrumentedPromise: function() {
179
- return createDevToolsInstrumentedPromise;
180
- }
181
- });
182
- var _react = __require("react");
183
- var _readonlyurlsearchparams = require_readonly_url_search_params();
184
- var SearchParamsContext = (0, _react.createContext)(null);
185
- var PathnameContext = (0, _react.createContext)(null);
186
- var PathParamsContext = (0, _react.createContext)(null);
187
- var NavigationPromisesContext = (0, _react.createContext)(null);
188
- function createDevToolsInstrumentedPromise(displayName, value) {
189
- const promise = Promise.resolve(value);
190
- promise.status = "fulfilled";
191
- promise.value = value;
192
- promise.displayName = `${displayName} (SSR)`;
193
- return promise;
194
- }
195
- if (process.env.NODE_ENV !== "production") {
196
- SearchParamsContext.displayName = "SearchParamsContext";
197
- PathnameContext.displayName = "PathnameContext";
198
- PathParamsContext.displayName = "PathParamsContext";
199
- NavigationPromisesContext.displayName = "NavigationPromisesContext";
200
- }
201
- }
202
- });
203
-
204
- // ../../node_modules/.pnpm/next@16.1.6_@babel+core@7.29.0_@playwright+test@1.58.2_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/next/dist/shared/lib/segment.js
205
- var require_segment = __commonJS({
206
- "../../node_modules/.pnpm/next@16.1.6_@babel+core@7.29.0_@playwright+test@1.58.2_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/next/dist/shared/lib/segment.js"(exports) {
207
- "use strict";
208
- Object.defineProperty(exports, "__esModule", {
209
- value: true
210
- });
211
- function _export(target, all) {
212
- for (var name in all) Object.defineProperty(target, name, {
213
- enumerable: true,
214
- get: all[name]
215
- });
216
- }
217
- _export(exports, {
218
- DEFAULT_SEGMENT_KEY: function() {
219
- return DEFAULT_SEGMENT_KEY;
220
- },
221
- NOT_FOUND_SEGMENT_KEY: function() {
222
- return NOT_FOUND_SEGMENT_KEY;
223
- },
224
- PAGE_SEGMENT_KEY: function() {
225
- return PAGE_SEGMENT_KEY;
226
- },
227
- addSearchParamsIfPageSegment: function() {
228
- return addSearchParamsIfPageSegment;
229
- },
230
- computeSelectedLayoutSegment: function() {
231
- return computeSelectedLayoutSegment;
232
- },
233
- getSegmentValue: function() {
234
- return getSegmentValue;
235
- },
236
- getSelectedLayoutSegmentPath: function() {
237
- return getSelectedLayoutSegmentPath;
238
- },
239
- isGroupSegment: function() {
240
- return isGroupSegment;
241
- },
242
- isParallelRouteSegment: function() {
243
- return isParallelRouteSegment;
244
- }
245
- });
246
- function getSegmentValue(segment) {
247
- return Array.isArray(segment) ? segment[1] : segment;
248
- }
249
- function isGroupSegment(segment) {
250
- return segment[0] === "(" && segment.endsWith(")");
251
- }
252
- function isParallelRouteSegment(segment) {
253
- return segment.startsWith("@") && segment !== "@children";
254
- }
255
- function addSearchParamsIfPageSegment(segment, searchParams) {
256
- const isPageSegment = segment.includes(PAGE_SEGMENT_KEY);
257
- if (isPageSegment) {
258
- const stringifiedQuery = JSON.stringify(searchParams);
259
- return stringifiedQuery !== "{}" ? PAGE_SEGMENT_KEY + "?" + stringifiedQuery : PAGE_SEGMENT_KEY;
260
- }
261
- return segment;
262
- }
263
- function computeSelectedLayoutSegment(segments, parallelRouteKey) {
264
- if (!segments || segments.length === 0) {
265
- return null;
266
- }
267
- const rawSegment = parallelRouteKey === "children" ? segments[0] : segments[segments.length - 1];
268
- return rawSegment === DEFAULT_SEGMENT_KEY ? null : rawSegment;
269
- }
270
- function getSelectedLayoutSegmentPath(tree, parallelRouteKey, first = true, segmentPath = []) {
271
- let node;
272
- if (first) {
273
- node = tree[1][parallelRouteKey];
274
- } else {
275
- const parallelRoutes = tree[1];
276
- node = parallelRoutes.children ?? Object.values(parallelRoutes)[0];
277
- }
278
- if (!node) return segmentPath;
279
- const segment = node[0];
280
- let segmentValue = getSegmentValue(segment);
281
- if (!segmentValue || segmentValue.startsWith(PAGE_SEGMENT_KEY)) {
282
- return segmentPath;
283
- }
284
- segmentPath.push(segmentValue);
285
- return getSelectedLayoutSegmentPath(node, parallelRouteKey, false, segmentPath);
286
- }
287
- var PAGE_SEGMENT_KEY = "__PAGE__";
288
- var DEFAULT_SEGMENT_KEY = "__DEFAULT__";
289
- var NOT_FOUND_SEGMENT_KEY = "/_not-found";
290
- }
291
- });
292
-
293
- // ../../node_modules/.pnpm/next@16.1.6_@babel+core@7.29.0_@playwright+test@1.58.2_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/next/dist/shared/lib/server-inserted-html.shared-runtime.js
294
- var require_server_inserted_html_shared_runtime = __commonJS({
295
- "../../node_modules/.pnpm/next@16.1.6_@babel+core@7.29.0_@playwright+test@1.58.2_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/next/dist/shared/lib/server-inserted-html.shared-runtime.js"(exports) {
296
- "use strict";
297
- "use client";
298
- Object.defineProperty(exports, "__esModule", {
299
- value: true
300
- });
301
- function _export(target, all) {
302
- for (var name in all) Object.defineProperty(target, name, {
303
- enumerable: true,
304
- get: all[name]
305
- });
306
- }
307
- _export(exports, {
308
- ServerInsertedHTMLContext: function() {
309
- return ServerInsertedHTMLContext;
310
- },
311
- useServerInsertedHTML: function() {
312
- return useServerInsertedHTML;
313
- }
314
- });
315
- var _interop_require_wildcard = require_interop_require_wildcard();
316
- var _react = /* @__PURE__ */ _interop_require_wildcard._(__require("react"));
317
- var ServerInsertedHTMLContext = /* @__PURE__ */ _react.default.createContext(null);
318
- function useServerInsertedHTML(callback) {
319
- const addInsertedServerHTMLCallback = (0, _react.useContext)(ServerInsertedHTMLContext);
320
- if (addInsertedServerHTMLCallback) {
321
- addInsertedServerHTMLCallback(callback);
322
- }
323
- }
324
- }
325
- });
326
-
327
- // ../../node_modules/.pnpm/next@16.1.6_@babel+core@7.29.0_@playwright+test@1.58.2_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/next/dist/client/components/unrecognized-action-error.js
328
- var require_unrecognized_action_error = __commonJS({
329
- "../../node_modules/.pnpm/next@16.1.6_@babel+core@7.29.0_@playwright+test@1.58.2_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/next/dist/client/components/unrecognized-action-error.js"(exports, module) {
330
- "use strict";
331
- Object.defineProperty(exports, "__esModule", {
332
- value: true
333
- });
334
- function _export(target, all) {
335
- for (var name in all) Object.defineProperty(target, name, {
336
- enumerable: true,
337
- get: all[name]
338
- });
339
- }
340
- _export(exports, {
341
- UnrecognizedActionError: function() {
342
- return UnrecognizedActionError;
343
- },
344
- unstable_isUnrecognizedActionError: function() {
345
- return unstable_isUnrecognizedActionError;
346
- }
347
- });
348
- var UnrecognizedActionError = class extends Error {
349
- constructor(...args) {
350
- super(...args);
351
- this.name = "UnrecognizedActionError";
352
- }
353
- };
354
- function unstable_isUnrecognizedActionError(error) {
355
- return !!(error && typeof error === "object" && error instanceof UnrecognizedActionError);
356
- }
357
- if ((typeof exports.default === "function" || typeof exports.default === "object" && exports.default !== null) && typeof exports.default.__esModule === "undefined") {
358
- Object.defineProperty(exports.default, "__esModule", { value: true });
359
- Object.assign(exports.default, exports);
360
- module.exports = exports.default;
361
- }
362
- }
363
- });
364
-
365
- // ../../node_modules/.pnpm/next@16.1.6_@babel+core@7.29.0_@playwright+test@1.58.2_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/next/dist/client/components/redirect-status-code.js
366
- var require_redirect_status_code = __commonJS({
367
- "../../node_modules/.pnpm/next@16.1.6_@babel+core@7.29.0_@playwright+test@1.58.2_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/next/dist/client/components/redirect-status-code.js"(exports, module) {
368
- "use strict";
369
- Object.defineProperty(exports, "__esModule", {
370
- value: true
371
- });
372
- Object.defineProperty(exports, "RedirectStatusCode", {
373
- enumerable: true,
374
- get: function() {
375
- return RedirectStatusCode;
376
- }
377
- });
378
- var RedirectStatusCode = /* @__PURE__ */ (function(RedirectStatusCode2) {
379
- RedirectStatusCode2[RedirectStatusCode2["SeeOther"] = 303] = "SeeOther";
380
- RedirectStatusCode2[RedirectStatusCode2["TemporaryRedirect"] = 307] = "TemporaryRedirect";
381
- RedirectStatusCode2[RedirectStatusCode2["PermanentRedirect"] = 308] = "PermanentRedirect";
382
- return RedirectStatusCode2;
383
- })({});
384
- if ((typeof exports.default === "function" || typeof exports.default === "object" && exports.default !== null) && typeof exports.default.__esModule === "undefined") {
385
- Object.defineProperty(exports.default, "__esModule", { value: true });
386
- Object.assign(exports.default, exports);
387
- module.exports = exports.default;
388
- }
389
- }
390
- });
391
-
392
- // ../../node_modules/.pnpm/next@16.1.6_@babel+core@7.29.0_@playwright+test@1.58.2_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/next/dist/client/components/redirect-error.js
393
- var require_redirect_error = __commonJS({
394
- "../../node_modules/.pnpm/next@16.1.6_@babel+core@7.29.0_@playwright+test@1.58.2_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/next/dist/client/components/redirect-error.js"(exports, module) {
395
- "use strict";
396
- Object.defineProperty(exports, "__esModule", {
397
- value: true
398
- });
399
- function _export(target, all) {
400
- for (var name in all) Object.defineProperty(target, name, {
401
- enumerable: true,
402
- get: all[name]
403
- });
404
- }
405
- _export(exports, {
406
- REDIRECT_ERROR_CODE: function() {
407
- return REDIRECT_ERROR_CODE;
408
- },
409
- RedirectType: function() {
410
- return RedirectType;
411
- },
412
- isRedirectError: function() {
413
- return isRedirectError;
414
- }
415
- });
416
- var _redirectstatuscode = require_redirect_status_code();
417
- var REDIRECT_ERROR_CODE = "NEXT_REDIRECT";
418
- var RedirectType = /* @__PURE__ */ (function(RedirectType2) {
419
- RedirectType2["push"] = "push";
420
- RedirectType2["replace"] = "replace";
421
- return RedirectType2;
422
- })({});
423
- function isRedirectError(error) {
424
- if (typeof error !== "object" || error === null || !("digest" in error) || typeof error.digest !== "string") {
425
- return false;
426
- }
427
- const digest = error.digest.split(";");
428
- const [errorCode, type] = digest;
429
- const destination = digest.slice(2, -2).join(";");
430
- const status = digest.at(-2);
431
- const statusCode = Number(status);
432
- return errorCode === REDIRECT_ERROR_CODE && (type === "replace" || type === "push") && typeof destination === "string" && !isNaN(statusCode) && statusCode in _redirectstatuscode.RedirectStatusCode;
433
- }
434
- if ((typeof exports.default === "function" || typeof exports.default === "object" && exports.default !== null) && typeof exports.default.__esModule === "undefined") {
435
- Object.defineProperty(exports.default, "__esModule", { value: true });
436
- Object.assign(exports.default, exports);
437
- module.exports = exports.default;
438
- }
439
- }
440
- });
441
-
442
- // ../../node_modules/.pnpm/next@16.1.6_@babel+core@7.29.0_@playwright+test@1.58.2_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/next/dist/server/app-render/async-local-storage.js
443
- var require_async_local_storage = __commonJS({
444
- "../../node_modules/.pnpm/next@16.1.6_@babel+core@7.29.0_@playwright+test@1.58.2_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/next/dist/server/app-render/async-local-storage.js"(exports) {
445
- "use strict";
446
- Object.defineProperty(exports, "__esModule", {
447
- value: true
448
- });
449
- function _export(target, all) {
450
- for (var name in all) Object.defineProperty(target, name, {
451
- enumerable: true,
452
- get: all[name]
453
- });
454
- }
455
- _export(exports, {
456
- bindSnapshot: function() {
457
- return bindSnapshot;
458
- },
459
- createAsyncLocalStorage: function() {
460
- return createAsyncLocalStorage;
461
- },
462
- createSnapshot: function() {
463
- return createSnapshot;
464
- }
465
- });
466
- var sharedAsyncLocalStorageNotAvailableError = Object.defineProperty(new Error("Invariant: AsyncLocalStorage accessed in runtime where it is not available"), "__NEXT_ERROR_CODE", {
467
- value: "E504",
468
- enumerable: false,
469
- configurable: true
470
- });
471
- var FakeAsyncLocalStorage = class {
472
- disable() {
473
- throw sharedAsyncLocalStorageNotAvailableError;
474
- }
475
- getStore() {
476
- return void 0;
477
- }
478
- run() {
479
- throw sharedAsyncLocalStorageNotAvailableError;
480
- }
481
- exit() {
482
- throw sharedAsyncLocalStorageNotAvailableError;
483
- }
484
- enterWith() {
485
- throw sharedAsyncLocalStorageNotAvailableError;
486
- }
487
- static bind(fn) {
488
- return fn;
489
- }
490
- };
491
- var maybeGlobalAsyncLocalStorage = typeof globalThis !== "undefined" && globalThis.AsyncLocalStorage;
492
- function createAsyncLocalStorage() {
493
- if (maybeGlobalAsyncLocalStorage) {
494
- return new maybeGlobalAsyncLocalStorage();
495
- }
496
- return new FakeAsyncLocalStorage();
497
- }
498
- function bindSnapshot(fn) {
499
- if (maybeGlobalAsyncLocalStorage) {
500
- return maybeGlobalAsyncLocalStorage.bind(fn);
501
- }
502
- return FakeAsyncLocalStorage.bind(fn);
503
- }
504
- function createSnapshot() {
505
- if (maybeGlobalAsyncLocalStorage) {
506
- return maybeGlobalAsyncLocalStorage.snapshot();
507
- }
508
- return function(fn, ...args) {
509
- return fn(...args);
510
- };
511
- }
512
- }
513
- });
514
-
515
- // ../../node_modules/.pnpm/next@16.1.6_@babel+core@7.29.0_@playwright+test@1.58.2_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/next/dist/server/app-render/action-async-storage-instance.js
516
- var require_action_async_storage_instance = __commonJS({
517
- "../../node_modules/.pnpm/next@16.1.6_@babel+core@7.29.0_@playwright+test@1.58.2_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/next/dist/server/app-render/action-async-storage-instance.js"(exports) {
518
- "use strict";
519
- Object.defineProperty(exports, "__esModule", {
520
- value: true
521
- });
522
- Object.defineProperty(exports, "actionAsyncStorageInstance", {
523
- enumerable: true,
524
- get: function() {
525
- return actionAsyncStorageInstance;
526
- }
527
- });
528
- var _asynclocalstorage = require_async_local_storage();
529
- var actionAsyncStorageInstance = (0, _asynclocalstorage.createAsyncLocalStorage)();
530
- }
531
- });
532
-
533
- // ../../node_modules/.pnpm/next@16.1.6_@babel+core@7.29.0_@playwright+test@1.58.2_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/next/dist/server/app-render/action-async-storage.external.js
534
- var require_action_async_storage_external = __commonJS({
535
- "../../node_modules/.pnpm/next@16.1.6_@babel+core@7.29.0_@playwright+test@1.58.2_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/next/dist/server/app-render/action-async-storage.external.js"(exports) {
536
- "use strict";
537
- Object.defineProperty(exports, "__esModule", {
538
- value: true
539
- });
540
- Object.defineProperty(exports, "actionAsyncStorage", {
541
- enumerable: true,
542
- get: function() {
543
- return _actionasyncstorageinstance.actionAsyncStorageInstance;
544
- }
545
- });
546
- var _actionasyncstorageinstance = require_action_async_storage_instance();
547
- }
548
- });
549
-
550
- // ../../node_modules/.pnpm/next@16.1.6_@babel+core@7.29.0_@playwright+test@1.58.2_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/next/dist/client/components/redirect.js
551
- var require_redirect = __commonJS({
552
- "../../node_modules/.pnpm/next@16.1.6_@babel+core@7.29.0_@playwright+test@1.58.2_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/next/dist/client/components/redirect.js"(exports, module) {
553
- "use strict";
554
- Object.defineProperty(exports, "__esModule", {
555
- value: true
556
- });
557
- function _export(target, all) {
558
- for (var name in all) Object.defineProperty(target, name, {
559
- enumerable: true,
560
- get: all[name]
561
- });
562
- }
563
- _export(exports, {
564
- getRedirectError: function() {
565
- return getRedirectError;
566
- },
567
- getRedirectStatusCodeFromError: function() {
568
- return getRedirectStatusCodeFromError;
569
- },
570
- getRedirectTypeFromError: function() {
571
- return getRedirectTypeFromError;
572
- },
573
- getURLFromRedirectError: function() {
574
- return getURLFromRedirectError;
575
- },
576
- permanentRedirect: function() {
577
- return permanentRedirect;
578
- },
579
- redirect: function() {
580
- return redirect;
581
- }
582
- });
583
- var _redirectstatuscode = require_redirect_status_code();
584
- var _redirecterror = require_redirect_error();
585
- var actionAsyncStorage = typeof window === "undefined" ? require_action_async_storage_external().actionAsyncStorage : void 0;
586
- function getRedirectError(url, type, statusCode = _redirectstatuscode.RedirectStatusCode.TemporaryRedirect) {
587
- const error = Object.defineProperty(new Error(_redirecterror.REDIRECT_ERROR_CODE), "__NEXT_ERROR_CODE", {
588
- value: "E394",
589
- enumerable: false,
590
- configurable: true
591
- });
592
- error.digest = `${_redirecterror.REDIRECT_ERROR_CODE};${type};${url};${statusCode};`;
593
- return error;
594
- }
595
- function redirect(url, type) {
596
- type ??= actionAsyncStorage?.getStore()?.isAction ? _redirecterror.RedirectType.push : _redirecterror.RedirectType.replace;
597
- throw getRedirectError(url, type, _redirectstatuscode.RedirectStatusCode.TemporaryRedirect);
598
- }
599
- function permanentRedirect(url, type = _redirecterror.RedirectType.replace) {
600
- throw getRedirectError(url, type, _redirectstatuscode.RedirectStatusCode.PermanentRedirect);
601
- }
602
- function getURLFromRedirectError(error) {
603
- if (!(0, _redirecterror.isRedirectError)(error)) return null;
604
- return error.digest.split(";").slice(2, -2).join(";");
605
- }
606
- function getRedirectTypeFromError(error) {
607
- if (!(0, _redirecterror.isRedirectError)(error)) {
608
- throw Object.defineProperty(new Error("Not a redirect error"), "__NEXT_ERROR_CODE", {
609
- value: "E260",
610
- enumerable: false,
611
- configurable: true
612
- });
613
- }
614
- return error.digest.split(";", 2)[1];
615
- }
616
- function getRedirectStatusCodeFromError(error) {
617
- if (!(0, _redirecterror.isRedirectError)(error)) {
618
- throw Object.defineProperty(new Error("Not a redirect error"), "__NEXT_ERROR_CODE", {
619
- value: "E260",
620
- enumerable: false,
621
- configurable: true
622
- });
623
- }
624
- return Number(error.digest.split(";").at(-2));
625
- }
626
- if ((typeof exports.default === "function" || typeof exports.default === "object" && exports.default !== null) && typeof exports.default.__esModule === "undefined") {
627
- Object.defineProperty(exports.default, "__esModule", { value: true });
628
- Object.assign(exports.default, exports);
629
- module.exports = exports.default;
630
- }
631
- }
632
- });
633
-
634
- // ../../node_modules/.pnpm/next@16.1.6_@babel+core@7.29.0_@playwright+test@1.58.2_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/next/dist/client/components/http-access-fallback/http-access-fallback.js
635
- var require_http_access_fallback = __commonJS({
636
- "../../node_modules/.pnpm/next@16.1.6_@babel+core@7.29.0_@playwright+test@1.58.2_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/next/dist/client/components/http-access-fallback/http-access-fallback.js"(exports, module) {
637
- "use strict";
638
- Object.defineProperty(exports, "__esModule", {
639
- value: true
640
- });
641
- function _export(target, all) {
642
- for (var name in all) Object.defineProperty(target, name, {
643
- enumerable: true,
644
- get: all[name]
645
- });
646
- }
647
- _export(exports, {
648
- HTTPAccessErrorStatus: function() {
649
- return HTTPAccessErrorStatus;
650
- },
651
- HTTP_ERROR_FALLBACK_ERROR_CODE: function() {
652
- return HTTP_ERROR_FALLBACK_ERROR_CODE;
653
- },
654
- getAccessFallbackErrorTypeByStatus: function() {
655
- return getAccessFallbackErrorTypeByStatus;
656
- },
657
- getAccessFallbackHTTPStatus: function() {
658
- return getAccessFallbackHTTPStatus;
659
- },
660
- isHTTPAccessFallbackError: function() {
661
- return isHTTPAccessFallbackError;
662
- }
663
- });
664
- var HTTPAccessErrorStatus = {
665
- NOT_FOUND: 404,
666
- FORBIDDEN: 403,
667
- UNAUTHORIZED: 401
668
- };
669
- var ALLOWED_CODES = new Set(Object.values(HTTPAccessErrorStatus));
670
- var HTTP_ERROR_FALLBACK_ERROR_CODE = "NEXT_HTTP_ERROR_FALLBACK";
671
- function isHTTPAccessFallbackError(error) {
672
- if (typeof error !== "object" || error === null || !("digest" in error) || typeof error.digest !== "string") {
673
- return false;
674
- }
675
- const [prefix, httpStatus] = error.digest.split(";");
676
- return prefix === HTTP_ERROR_FALLBACK_ERROR_CODE && ALLOWED_CODES.has(Number(httpStatus));
677
- }
678
- function getAccessFallbackHTTPStatus(error) {
679
- const httpStatus = error.digest.split(";")[1];
680
- return Number(httpStatus);
681
- }
682
- function getAccessFallbackErrorTypeByStatus(status) {
683
- switch (status) {
684
- case 401:
685
- return "unauthorized";
686
- case 403:
687
- return "forbidden";
688
- case 404:
689
- return "not-found";
690
- default:
691
- return;
692
- }
693
- }
694
- if ((typeof exports.default === "function" || typeof exports.default === "object" && exports.default !== null) && typeof exports.default.__esModule === "undefined") {
695
- Object.defineProperty(exports.default, "__esModule", { value: true });
696
- Object.assign(exports.default, exports);
697
- module.exports = exports.default;
698
- }
699
- }
700
- });
701
-
702
- // ../../node_modules/.pnpm/next@16.1.6_@babel+core@7.29.0_@playwright+test@1.58.2_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/next/dist/client/components/not-found.js
703
- var require_not_found = __commonJS({
704
- "../../node_modules/.pnpm/next@16.1.6_@babel+core@7.29.0_@playwright+test@1.58.2_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/next/dist/client/components/not-found.js"(exports, module) {
705
- "use strict";
706
- Object.defineProperty(exports, "__esModule", {
707
- value: true
708
- });
709
- Object.defineProperty(exports, "notFound", {
710
- enumerable: true,
711
- get: function() {
712
- return notFound;
713
- }
714
- });
715
- var _httpaccessfallback = require_http_access_fallback();
716
- var DIGEST = `${_httpaccessfallback.HTTP_ERROR_FALLBACK_ERROR_CODE};404`;
717
- function notFound() {
718
- const error = Object.defineProperty(new Error(DIGEST), "__NEXT_ERROR_CODE", {
719
- value: "E394",
720
- enumerable: false,
721
- configurable: true
722
- });
723
- error.digest = DIGEST;
724
- throw error;
725
- }
726
- if ((typeof exports.default === "function" || typeof exports.default === "object" && exports.default !== null) && typeof exports.default.__esModule === "undefined") {
727
- Object.defineProperty(exports.default, "__esModule", { value: true });
728
- Object.assign(exports.default, exports);
729
- module.exports = exports.default;
730
- }
731
- }
732
- });
733
-
734
- // ../../node_modules/.pnpm/next@16.1.6_@babel+core@7.29.0_@playwright+test@1.58.2_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/next/dist/client/components/forbidden.js
735
- var require_forbidden = __commonJS({
736
- "../../node_modules/.pnpm/next@16.1.6_@babel+core@7.29.0_@playwright+test@1.58.2_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/next/dist/client/components/forbidden.js"(exports, module) {
737
- "use strict";
738
- Object.defineProperty(exports, "__esModule", {
739
- value: true
740
- });
741
- Object.defineProperty(exports, "forbidden", {
742
- enumerable: true,
743
- get: function() {
744
- return forbidden;
745
- }
746
- });
747
- var _httpaccessfallback = require_http_access_fallback();
748
- var DIGEST = `${_httpaccessfallback.HTTP_ERROR_FALLBACK_ERROR_CODE};403`;
749
- function forbidden() {
750
- if (!process.env.__NEXT_EXPERIMENTAL_AUTH_INTERRUPTS) {
751
- throw Object.defineProperty(new Error(`\`forbidden()\` is experimental and only allowed to be enabled when \`experimental.authInterrupts\` is enabled.`), "__NEXT_ERROR_CODE", {
752
- value: "E488",
753
- enumerable: false,
754
- configurable: true
755
- });
756
- }
757
- const error = Object.defineProperty(new Error(DIGEST), "__NEXT_ERROR_CODE", {
758
- value: "E394",
759
- enumerable: false,
760
- configurable: true
761
- });
762
- error.digest = DIGEST;
763
- throw error;
764
- }
765
- if ((typeof exports.default === "function" || typeof exports.default === "object" && exports.default !== null) && typeof exports.default.__esModule === "undefined") {
766
- Object.defineProperty(exports.default, "__esModule", { value: true });
767
- Object.assign(exports.default, exports);
768
- module.exports = exports.default;
769
- }
770
- }
771
- });
772
-
773
- // ../../node_modules/.pnpm/next@16.1.6_@babel+core@7.29.0_@playwright+test@1.58.2_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/next/dist/client/components/unauthorized.js
774
- var require_unauthorized = __commonJS({
775
- "../../node_modules/.pnpm/next@16.1.6_@babel+core@7.29.0_@playwright+test@1.58.2_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/next/dist/client/components/unauthorized.js"(exports, module) {
776
- "use strict";
777
- Object.defineProperty(exports, "__esModule", {
778
- value: true
779
- });
780
- Object.defineProperty(exports, "unauthorized", {
781
- enumerable: true,
782
- get: function() {
783
- return unauthorized;
784
- }
785
- });
786
- var _httpaccessfallback = require_http_access_fallback();
787
- var DIGEST = `${_httpaccessfallback.HTTP_ERROR_FALLBACK_ERROR_CODE};401`;
788
- function unauthorized() {
789
- if (!process.env.__NEXT_EXPERIMENTAL_AUTH_INTERRUPTS) {
790
- throw Object.defineProperty(new Error(`\`unauthorized()\` is experimental and only allowed to be used when \`experimental.authInterrupts\` is enabled.`), "__NEXT_ERROR_CODE", {
791
- value: "E411",
792
- enumerable: false,
793
- configurable: true
794
- });
795
- }
796
- const error = Object.defineProperty(new Error(DIGEST), "__NEXT_ERROR_CODE", {
797
- value: "E394",
798
- enumerable: false,
799
- configurable: true
800
- });
801
- error.digest = DIGEST;
802
- throw error;
803
- }
804
- if ((typeof exports.default === "function" || typeof exports.default === "object" && exports.default !== null) && typeof exports.default.__esModule === "undefined") {
805
- Object.defineProperty(exports.default, "__esModule", { value: true });
806
- Object.assign(exports.default, exports);
807
- module.exports = exports.default;
808
- }
809
- }
810
- });
811
-
812
- // ../../node_modules/.pnpm/next@16.1.6_@babel+core@7.29.0_@playwright+test@1.58.2_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/next/dist/server/dynamic-rendering-utils.js
813
- var require_dynamic_rendering_utils = __commonJS({
814
- "../../node_modules/.pnpm/next@16.1.6_@babel+core@7.29.0_@playwright+test@1.58.2_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/next/dist/server/dynamic-rendering-utils.js"(exports) {
815
- "use strict";
816
- Object.defineProperty(exports, "__esModule", {
817
- value: true
818
- });
819
- function _export(target, all) {
820
- for (var name in all) Object.defineProperty(target, name, {
821
- enumerable: true,
822
- get: all[name]
823
- });
824
- }
825
- _export(exports, {
826
- isHangingPromiseRejectionError: function() {
827
- return isHangingPromiseRejectionError;
828
- },
829
- makeDevtoolsIOAwarePromise: function() {
830
- return makeDevtoolsIOAwarePromise;
831
- },
832
- makeHangingPromise: function() {
833
- return makeHangingPromise;
834
- }
835
- });
836
- function isHangingPromiseRejectionError(err) {
837
- if (typeof err !== "object" || err === null || !("digest" in err)) {
838
- return false;
839
- }
840
- return err.digest === HANGING_PROMISE_REJECTION;
841
- }
842
- var HANGING_PROMISE_REJECTION = "HANGING_PROMISE_REJECTION";
843
- var HangingPromiseRejectionError = class extends Error {
844
- constructor(route, expression) {
845
- super(`During prerendering, ${expression} rejects when the prerender is complete. Typically these errors are handled by React but if you move ${expression} to a different context by using \`setTimeout\`, \`after\`, or similar functions you may observe this error and you should handle it in that context. This occurred at route "${route}".`), this.route = route, this.expression = expression, this.digest = HANGING_PROMISE_REJECTION;
846
- }
847
- };
848
- var abortListenersBySignal = /* @__PURE__ */ new WeakMap();
849
- function makeHangingPromise(signal, route, expression) {
850
- if (signal.aborted) {
851
- return Promise.reject(new HangingPromiseRejectionError(route, expression));
852
- } else {
853
- const hangingPromise = new Promise((_, reject) => {
854
- const boundRejection = reject.bind(null, new HangingPromiseRejectionError(route, expression));
855
- let currentListeners = abortListenersBySignal.get(signal);
856
- if (currentListeners) {
857
- currentListeners.push(boundRejection);
858
- } else {
859
- const listeners = [
860
- boundRejection
861
- ];
862
- abortListenersBySignal.set(signal, listeners);
863
- signal.addEventListener("abort", () => {
864
- for (let i = 0; i < listeners.length; i++) {
865
- listeners[i]();
866
- }
867
- }, {
868
- once: true
869
- });
870
- }
871
- });
872
- hangingPromise.catch(ignoreReject);
873
- return hangingPromise;
874
- }
875
- }
876
- function ignoreReject() {
877
- }
878
- function makeDevtoolsIOAwarePromise(underlying, requestStore, stage) {
879
- if (requestStore.stagedRendering) {
880
- return requestStore.stagedRendering.delayUntilStage(stage, void 0, underlying);
881
- }
882
- return new Promise((resolve) => {
883
- setTimeout(() => {
884
- resolve(underlying);
885
- }, 0);
886
- });
887
- }
888
- }
889
- });
890
-
891
- // ../../node_modules/.pnpm/next@16.1.6_@babel+core@7.29.0_@playwright+test@1.58.2_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/next/dist/server/lib/router-utils/is-postpone.js
892
- var require_is_postpone = __commonJS({
893
- "../../node_modules/.pnpm/next@16.1.6_@babel+core@7.29.0_@playwright+test@1.58.2_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/next/dist/server/lib/router-utils/is-postpone.js"(exports) {
894
- "use strict";
895
- Object.defineProperty(exports, "__esModule", {
896
- value: true
897
- });
898
- Object.defineProperty(exports, "isPostpone", {
899
- enumerable: true,
900
- get: function() {
901
- return isPostpone;
902
- }
903
- });
904
- var REACT_POSTPONE_TYPE = /* @__PURE__ */ Symbol.for("react.postpone");
905
- function isPostpone(error) {
906
- return typeof error === "object" && error !== null && error.$$typeof === REACT_POSTPONE_TYPE;
907
- }
908
- }
909
- });
910
-
911
- // ../../node_modules/.pnpm/next@16.1.6_@babel+core@7.29.0_@playwright+test@1.58.2_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/next/dist/shared/lib/lazy-dynamic/bailout-to-csr.js
912
- var require_bailout_to_csr = __commonJS({
913
- "../../node_modules/.pnpm/next@16.1.6_@babel+core@7.29.0_@playwright+test@1.58.2_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/next/dist/shared/lib/lazy-dynamic/bailout-to-csr.js"(exports) {
914
- "use strict";
915
- Object.defineProperty(exports, "__esModule", {
916
- value: true
917
- });
918
- function _export(target, all) {
919
- for (var name in all) Object.defineProperty(target, name, {
920
- enumerable: true,
921
- get: all[name]
922
- });
923
- }
924
- _export(exports, {
925
- BailoutToCSRError: function() {
926
- return BailoutToCSRError;
927
- },
928
- isBailoutToCSRError: function() {
929
- return isBailoutToCSRError;
930
- }
931
- });
932
- var BAILOUT_TO_CSR = "BAILOUT_TO_CLIENT_SIDE_RENDERING";
933
- var BailoutToCSRError = class extends Error {
934
- constructor(reason) {
935
- super(`Bail out to client-side rendering: ${reason}`), this.reason = reason, this.digest = BAILOUT_TO_CSR;
936
- }
937
- };
938
- function isBailoutToCSRError(err) {
939
- if (typeof err !== "object" || err === null || !("digest" in err)) {
940
- return false;
941
- }
942
- return err.digest === BAILOUT_TO_CSR;
943
- }
944
- }
945
- });
946
-
947
- // ../../node_modules/.pnpm/next@16.1.6_@babel+core@7.29.0_@playwright+test@1.58.2_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/next/dist/client/components/is-next-router-error.js
948
- var require_is_next_router_error = __commonJS({
949
- "../../node_modules/.pnpm/next@16.1.6_@babel+core@7.29.0_@playwright+test@1.58.2_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/next/dist/client/components/is-next-router-error.js"(exports, module) {
950
- "use strict";
951
- Object.defineProperty(exports, "__esModule", {
952
- value: true
953
- });
954
- Object.defineProperty(exports, "isNextRouterError", {
955
- enumerable: true,
956
- get: function() {
957
- return isNextRouterError;
958
- }
959
- });
960
- var _httpaccessfallback = require_http_access_fallback();
961
- var _redirecterror = require_redirect_error();
962
- function isNextRouterError(error) {
963
- return (0, _redirecterror.isRedirectError)(error) || (0, _httpaccessfallback.isHTTPAccessFallbackError)(error);
964
- }
965
- if ((typeof exports.default === "function" || typeof exports.default === "object" && exports.default !== null) && typeof exports.default.__esModule === "undefined") {
966
- Object.defineProperty(exports.default, "__esModule", { value: true });
967
- Object.assign(exports.default, exports);
968
- module.exports = exports.default;
969
- }
970
- }
971
- });
972
-
973
- // ../../node_modules/.pnpm/next@16.1.6_@babel+core@7.29.0_@playwright+test@1.58.2_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/next/dist/client/components/hooks-server-context.js
974
- var require_hooks_server_context = __commonJS({
975
- "../../node_modules/.pnpm/next@16.1.6_@babel+core@7.29.0_@playwright+test@1.58.2_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/next/dist/client/components/hooks-server-context.js"(exports, module) {
976
- "use strict";
977
- Object.defineProperty(exports, "__esModule", {
978
- value: true
979
- });
980
- function _export(target, all) {
981
- for (var name in all) Object.defineProperty(target, name, {
982
- enumerable: true,
983
- get: all[name]
984
- });
985
- }
986
- _export(exports, {
987
- DynamicServerError: function() {
988
- return DynamicServerError;
989
- },
990
- isDynamicServerError: function() {
991
- return isDynamicServerError;
992
- }
993
- });
994
- var DYNAMIC_ERROR_CODE = "DYNAMIC_SERVER_USAGE";
995
- var DynamicServerError = class extends Error {
996
- constructor(description) {
997
- super(`Dynamic server usage: ${description}`), this.description = description, this.digest = DYNAMIC_ERROR_CODE;
998
- }
999
- };
1000
- function isDynamicServerError(err) {
1001
- if (typeof err !== "object" || err === null || !("digest" in err) || typeof err.digest !== "string") {
1002
- return false;
1003
- }
1004
- return err.digest === DYNAMIC_ERROR_CODE;
1005
- }
1006
- if ((typeof exports.default === "function" || typeof exports.default === "object" && exports.default !== null) && typeof exports.default.__esModule === "undefined") {
1007
- Object.defineProperty(exports.default, "__esModule", { value: true });
1008
- Object.assign(exports.default, exports);
1009
- module.exports = exports.default;
1010
- }
1011
- }
1012
- });
1013
-
1014
- // ../../node_modules/.pnpm/next@16.1.6_@babel+core@7.29.0_@playwright+test@1.58.2_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/next/dist/client/components/static-generation-bailout.js
1015
- var require_static_generation_bailout = __commonJS({
1016
- "../../node_modules/.pnpm/next@16.1.6_@babel+core@7.29.0_@playwright+test@1.58.2_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/next/dist/client/components/static-generation-bailout.js"(exports, module) {
1017
- "use strict";
1018
- Object.defineProperty(exports, "__esModule", {
1019
- value: true
1020
- });
1021
- function _export(target, all) {
1022
- for (var name in all) Object.defineProperty(target, name, {
1023
- enumerable: true,
1024
- get: all[name]
1025
- });
1026
- }
1027
- _export(exports, {
1028
- StaticGenBailoutError: function() {
1029
- return StaticGenBailoutError;
1030
- },
1031
- isStaticGenBailoutError: function() {
1032
- return isStaticGenBailoutError;
1033
- }
1034
- });
1035
- var NEXT_STATIC_GEN_BAILOUT = "NEXT_STATIC_GEN_BAILOUT";
1036
- var StaticGenBailoutError = class extends Error {
1037
- constructor(...args) {
1038
- super(...args), this.code = NEXT_STATIC_GEN_BAILOUT;
1039
- }
1040
- };
1041
- function isStaticGenBailoutError(error) {
1042
- if (typeof error !== "object" || error === null || !("code" in error)) {
1043
- return false;
1044
- }
1045
- return error.code === NEXT_STATIC_GEN_BAILOUT;
1046
- }
1047
- if ((typeof exports.default === "function" || typeof exports.default === "object" && exports.default !== null) && typeof exports.default.__esModule === "undefined") {
1048
- Object.defineProperty(exports.default, "__esModule", { value: true });
1049
- Object.assign(exports.default, exports);
1050
- module.exports = exports.default;
1051
- }
1052
- }
1053
- });
1054
-
1055
- // ../../node_modules/.pnpm/next@16.1.6_@babel+core@7.29.0_@playwright+test@1.58.2_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/next/dist/server/app-render/work-unit-async-storage-instance.js
1056
- var require_work_unit_async_storage_instance = __commonJS({
1057
- "../../node_modules/.pnpm/next@16.1.6_@babel+core@7.29.0_@playwright+test@1.58.2_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/next/dist/server/app-render/work-unit-async-storage-instance.js"(exports) {
1058
- "use strict";
1059
- Object.defineProperty(exports, "__esModule", {
1060
- value: true
1061
- });
1062
- Object.defineProperty(exports, "workUnitAsyncStorageInstance", {
1063
- enumerable: true,
1064
- get: function() {
1065
- return workUnitAsyncStorageInstance;
1066
- }
1067
- });
1068
- var _asynclocalstorage = require_async_local_storage();
1069
- var workUnitAsyncStorageInstance = (0, _asynclocalstorage.createAsyncLocalStorage)();
1070
- }
1071
- });
1072
-
1073
- // ../../node_modules/.pnpm/next@16.1.6_@babel+core@7.29.0_@playwright+test@1.58.2_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/next/dist/client/components/app-router-headers.js
1074
- var require_app_router_headers = __commonJS({
1075
- "../../node_modules/.pnpm/next@16.1.6_@babel+core@7.29.0_@playwright+test@1.58.2_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/next/dist/client/components/app-router-headers.js"(exports, module) {
1076
- "use strict";
1077
- Object.defineProperty(exports, "__esModule", {
1078
- value: true
1079
- });
1080
- function _export(target, all) {
1081
- for (var name in all) Object.defineProperty(target, name, {
1082
- enumerable: true,
1083
- get: all[name]
1084
- });
1085
- }
1086
- _export(exports, {
1087
- ACTION_HEADER: function() {
1088
- return ACTION_HEADER;
1089
- },
1090
- FLIGHT_HEADERS: function() {
1091
- return FLIGHT_HEADERS;
1092
- },
1093
- NEXT_ACTION_NOT_FOUND_HEADER: function() {
1094
- return NEXT_ACTION_NOT_FOUND_HEADER;
1095
- },
1096
- NEXT_ACTION_REVALIDATED_HEADER: function() {
1097
- return NEXT_ACTION_REVALIDATED_HEADER;
1098
- },
1099
- NEXT_DID_POSTPONE_HEADER: function() {
1100
- return NEXT_DID_POSTPONE_HEADER;
1101
- },
1102
- NEXT_HMR_REFRESH_HASH_COOKIE: function() {
1103
- return NEXT_HMR_REFRESH_HASH_COOKIE;
1104
- },
1105
- NEXT_HMR_REFRESH_HEADER: function() {
1106
- return NEXT_HMR_REFRESH_HEADER;
1107
- },
1108
- NEXT_HTML_REQUEST_ID_HEADER: function() {
1109
- return NEXT_HTML_REQUEST_ID_HEADER;
1110
- },
1111
- NEXT_IS_PRERENDER_HEADER: function() {
1112
- return NEXT_IS_PRERENDER_HEADER;
1113
- },
1114
- NEXT_REQUEST_ID_HEADER: function() {
1115
- return NEXT_REQUEST_ID_HEADER;
1116
- },
1117
- NEXT_REWRITTEN_PATH_HEADER: function() {
1118
- return NEXT_REWRITTEN_PATH_HEADER;
1119
- },
1120
- NEXT_REWRITTEN_QUERY_HEADER: function() {
1121
- return NEXT_REWRITTEN_QUERY_HEADER;
1122
- },
1123
- NEXT_ROUTER_PREFETCH_HEADER: function() {
1124
- return NEXT_ROUTER_PREFETCH_HEADER;
1125
- },
1126
- NEXT_ROUTER_SEGMENT_PREFETCH_HEADER: function() {
1127
- return NEXT_ROUTER_SEGMENT_PREFETCH_HEADER;
1128
- },
1129
- NEXT_ROUTER_STALE_TIME_HEADER: function() {
1130
- return NEXT_ROUTER_STALE_TIME_HEADER;
1131
- },
1132
- NEXT_ROUTER_STATE_TREE_HEADER: function() {
1133
- return NEXT_ROUTER_STATE_TREE_HEADER;
1134
- },
1135
- NEXT_RSC_UNION_QUERY: function() {
1136
- return NEXT_RSC_UNION_QUERY;
1137
- },
1138
- NEXT_URL: function() {
1139
- return NEXT_URL;
1140
- },
1141
- RSC_CONTENT_TYPE_HEADER: function() {
1142
- return RSC_CONTENT_TYPE_HEADER;
1143
- },
1144
- RSC_HEADER: function() {
1145
- return RSC_HEADER;
1146
- }
1147
- });
1148
- var RSC_HEADER = "rsc";
1149
- var ACTION_HEADER = "next-action";
1150
- var NEXT_ROUTER_STATE_TREE_HEADER = "next-router-state-tree";
1151
- var NEXT_ROUTER_PREFETCH_HEADER = "next-router-prefetch";
1152
- var NEXT_ROUTER_SEGMENT_PREFETCH_HEADER = "next-router-segment-prefetch";
1153
- var NEXT_HMR_REFRESH_HEADER = "next-hmr-refresh";
1154
- var NEXT_HMR_REFRESH_HASH_COOKIE = "__next_hmr_refresh_hash__";
1155
- var NEXT_URL = "next-url";
1156
- var RSC_CONTENT_TYPE_HEADER = "text/x-component";
1157
- var FLIGHT_HEADERS = [
1158
- RSC_HEADER,
1159
- NEXT_ROUTER_STATE_TREE_HEADER,
1160
- NEXT_ROUTER_PREFETCH_HEADER,
1161
- NEXT_HMR_REFRESH_HEADER,
1162
- NEXT_ROUTER_SEGMENT_PREFETCH_HEADER
1163
- ];
1164
- var NEXT_RSC_UNION_QUERY = "_rsc";
1165
- var NEXT_ROUTER_STALE_TIME_HEADER = "x-nextjs-stale-time";
1166
- var NEXT_DID_POSTPONE_HEADER = "x-nextjs-postponed";
1167
- var NEXT_REWRITTEN_PATH_HEADER = "x-nextjs-rewritten-path";
1168
- var NEXT_REWRITTEN_QUERY_HEADER = "x-nextjs-rewritten-query";
1169
- var NEXT_IS_PRERENDER_HEADER = "x-nextjs-prerender";
1170
- var NEXT_ACTION_NOT_FOUND_HEADER = "x-nextjs-action-not-found";
1171
- var NEXT_REQUEST_ID_HEADER = "x-nextjs-request-id";
1172
- var NEXT_HTML_REQUEST_ID_HEADER = "x-nextjs-html-request-id";
1173
- var NEXT_ACTION_REVALIDATED_HEADER = "x-action-revalidated";
1174
- if ((typeof exports.default === "function" || typeof exports.default === "object" && exports.default !== null) && typeof exports.default.__esModule === "undefined") {
1175
- Object.defineProperty(exports.default, "__esModule", { value: true });
1176
- Object.assign(exports.default, exports);
1177
- module.exports = exports.default;
1178
- }
1179
- }
1180
- });
1181
-
1182
- // ../../node_modules/.pnpm/next@16.1.6_@babel+core@7.29.0_@playwright+test@1.58.2_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/next/dist/shared/lib/invariant-error.js
1183
- var require_invariant_error = __commonJS({
1184
- "../../node_modules/.pnpm/next@16.1.6_@babel+core@7.29.0_@playwright+test@1.58.2_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/next/dist/shared/lib/invariant-error.js"(exports) {
1185
- "use strict";
1186
- Object.defineProperty(exports, "__esModule", {
1187
- value: true
1188
- });
1189
- Object.defineProperty(exports, "InvariantError", {
1190
- enumerable: true,
1191
- get: function() {
1192
- return InvariantError;
1193
- }
1194
- });
1195
- var InvariantError = class extends Error {
1196
- constructor(message, options) {
1197
- super(`Invariant: ${message.endsWith(".") ? message : message + "."} This is a bug in Next.js.`, options);
1198
- this.name = "InvariantError";
1199
- }
1200
- };
1201
- }
1202
- });
1203
-
1204
- // ../../node_modules/.pnpm/next@16.1.6_@babel+core@7.29.0_@playwright+test@1.58.2_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/next/dist/server/app-render/work-unit-async-storage.external.js
1205
- var require_work_unit_async_storage_external = __commonJS({
1206
- "../../node_modules/.pnpm/next@16.1.6_@babel+core@7.29.0_@playwright+test@1.58.2_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/next/dist/server/app-render/work-unit-async-storage.external.js"(exports) {
1207
- "use strict";
1208
- Object.defineProperty(exports, "__esModule", {
1209
- value: true
1210
- });
1211
- function _export(target, all) {
1212
- for (var name in all) Object.defineProperty(target, name, {
1213
- enumerable: true,
1214
- get: all[name]
1215
- });
1216
- }
1217
- _export(exports, {
1218
- getCacheSignal: function() {
1219
- return getCacheSignal;
1220
- },
1221
- getDraftModeProviderForCacheScope: function() {
1222
- return getDraftModeProviderForCacheScope;
1223
- },
1224
- getHmrRefreshHash: function() {
1225
- return getHmrRefreshHash;
1226
- },
1227
- getPrerenderResumeDataCache: function() {
1228
- return getPrerenderResumeDataCache;
1229
- },
1230
- getRenderResumeDataCache: function() {
1231
- return getRenderResumeDataCache;
1232
- },
1233
- getRuntimeStagePromise: function() {
1234
- return getRuntimeStagePromise;
1235
- },
1236
- getServerComponentsHmrCache: function() {
1237
- return getServerComponentsHmrCache;
1238
- },
1239
- isHmrRefresh: function() {
1240
- return isHmrRefresh;
1241
- },
1242
- throwForMissingRequestStore: function() {
1243
- return throwForMissingRequestStore;
1244
- },
1245
- throwInvariantForMissingStore: function() {
1246
- return throwInvariantForMissingStore;
1247
- },
1248
- workUnitAsyncStorage: function() {
1249
- return _workunitasyncstorageinstance.workUnitAsyncStorageInstance;
1250
- }
1251
- });
1252
- var _workunitasyncstorageinstance = require_work_unit_async_storage_instance();
1253
- var _approuterheaders = require_app_router_headers();
1254
- var _invarianterror = require_invariant_error();
1255
- function throwForMissingRequestStore(callingExpression) {
1256
- throw Object.defineProperty(new Error(`\`${callingExpression}\` was called outside a request scope. Read more: https://nextjs.org/docs/messages/next-dynamic-api-wrong-context`), "__NEXT_ERROR_CODE", {
1257
- value: "E251",
1258
- enumerable: false,
1259
- configurable: true
1260
- });
1261
- }
1262
- function throwInvariantForMissingStore() {
1263
- throw Object.defineProperty(new _invarianterror.InvariantError("Expected workUnitAsyncStorage to have a store."), "__NEXT_ERROR_CODE", {
1264
- value: "E696",
1265
- enumerable: false,
1266
- configurable: true
1267
- });
1268
- }
1269
- function getPrerenderResumeDataCache(workUnitStore) {
1270
- switch (workUnitStore.type) {
1271
- case "prerender":
1272
- case "prerender-runtime":
1273
- case "prerender-ppr":
1274
- return workUnitStore.prerenderResumeDataCache;
1275
- case "prerender-client":
1276
- return workUnitStore.prerenderResumeDataCache;
1277
- case "request": {
1278
- if (workUnitStore.prerenderResumeDataCache) {
1279
- return workUnitStore.prerenderResumeDataCache;
1280
- }
1281
- }
1282
- case "prerender-legacy":
1283
- case "cache":
1284
- case "private-cache":
1285
- case "unstable-cache":
1286
- return null;
1287
- default:
1288
- return workUnitStore;
1289
- }
1290
- }
1291
- function getRenderResumeDataCache(workUnitStore) {
1292
- switch (workUnitStore.type) {
1293
- case "request":
1294
- case "prerender":
1295
- case "prerender-runtime":
1296
- case "prerender-client":
1297
- if (workUnitStore.renderResumeDataCache) {
1298
- return workUnitStore.renderResumeDataCache;
1299
- }
1300
- // fallthrough
1301
- case "prerender-ppr":
1302
- return workUnitStore.prerenderResumeDataCache ?? null;
1303
- case "cache":
1304
- case "private-cache":
1305
- case "unstable-cache":
1306
- case "prerender-legacy":
1307
- return null;
1308
- default:
1309
- return workUnitStore;
1310
- }
1311
- }
1312
- function getHmrRefreshHash(workStore, workUnitStore) {
1313
- if (workStore.dev) {
1314
- switch (workUnitStore.type) {
1315
- case "cache":
1316
- case "private-cache":
1317
- case "prerender":
1318
- case "prerender-runtime":
1319
- return workUnitStore.hmrRefreshHash;
1320
- case "request":
1321
- var _workUnitStore_cookies_get;
1322
- return (_workUnitStore_cookies_get = workUnitStore.cookies.get(_approuterheaders.NEXT_HMR_REFRESH_HASH_COOKIE)) == null ? void 0 : _workUnitStore_cookies_get.value;
1323
- case "prerender-client":
1324
- case "prerender-ppr":
1325
- case "prerender-legacy":
1326
- case "unstable-cache":
1327
- break;
1328
- default:
1329
- workUnitStore;
1330
- }
1331
- }
1332
- return void 0;
1333
- }
1334
- function isHmrRefresh(workStore, workUnitStore) {
1335
- if (workStore.dev) {
1336
- switch (workUnitStore.type) {
1337
- case "cache":
1338
- case "private-cache":
1339
- case "request":
1340
- return workUnitStore.isHmrRefresh ?? false;
1341
- case "prerender":
1342
- case "prerender-client":
1343
- case "prerender-runtime":
1344
- case "prerender-ppr":
1345
- case "prerender-legacy":
1346
- case "unstable-cache":
1347
- break;
1348
- default:
1349
- workUnitStore;
1350
- }
1351
- }
1352
- return false;
1353
- }
1354
- function getServerComponentsHmrCache(workStore, workUnitStore) {
1355
- if (workStore.dev) {
1356
- switch (workUnitStore.type) {
1357
- case "cache":
1358
- case "private-cache":
1359
- case "request":
1360
- return workUnitStore.serverComponentsHmrCache;
1361
- case "prerender":
1362
- case "prerender-client":
1363
- case "prerender-runtime":
1364
- case "prerender-ppr":
1365
- case "prerender-legacy":
1366
- case "unstable-cache":
1367
- break;
1368
- default:
1369
- workUnitStore;
1370
- }
1371
- }
1372
- return void 0;
1373
- }
1374
- function getDraftModeProviderForCacheScope(workStore, workUnitStore) {
1375
- if (workStore.isDraftMode) {
1376
- switch (workUnitStore.type) {
1377
- case "cache":
1378
- case "private-cache":
1379
- case "unstable-cache":
1380
- case "prerender-runtime":
1381
- case "request":
1382
- return workUnitStore.draftMode;
1383
- case "prerender":
1384
- case "prerender-client":
1385
- case "prerender-ppr":
1386
- case "prerender-legacy":
1387
- break;
1388
- default:
1389
- workUnitStore;
1390
- }
1391
- }
1392
- return void 0;
1393
- }
1394
- function getCacheSignal(workUnitStore) {
1395
- switch (workUnitStore.type) {
1396
- case "prerender":
1397
- case "prerender-client":
1398
- case "prerender-runtime":
1399
- return workUnitStore.cacheSignal;
1400
- case "request": {
1401
- if (workUnitStore.cacheSignal) {
1402
- return workUnitStore.cacheSignal;
1403
- }
1404
- }
1405
- case "prerender-ppr":
1406
- case "prerender-legacy":
1407
- case "cache":
1408
- case "private-cache":
1409
- case "unstable-cache":
1410
- return null;
1411
- default:
1412
- return workUnitStore;
1413
- }
1414
- }
1415
- function getRuntimeStagePromise(workUnitStore) {
1416
- switch (workUnitStore.type) {
1417
- case "prerender-runtime":
1418
- case "private-cache":
1419
- return workUnitStore.runtimeStagePromise;
1420
- case "prerender":
1421
- case "prerender-client":
1422
- case "prerender-ppr":
1423
- case "prerender-legacy":
1424
- case "request":
1425
- case "cache":
1426
- case "unstable-cache":
1427
- return null;
1428
- default:
1429
- return workUnitStore;
1430
- }
1431
- }
1432
- }
1433
- });
1434
-
1435
- // ../../node_modules/.pnpm/next@16.1.6_@babel+core@7.29.0_@playwright+test@1.58.2_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/next/dist/server/app-render/work-async-storage-instance.js
1436
- var require_work_async_storage_instance = __commonJS({
1437
- "../../node_modules/.pnpm/next@16.1.6_@babel+core@7.29.0_@playwright+test@1.58.2_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/next/dist/server/app-render/work-async-storage-instance.js"(exports) {
1438
- "use strict";
1439
- Object.defineProperty(exports, "__esModule", {
1440
- value: true
1441
- });
1442
- Object.defineProperty(exports, "workAsyncStorageInstance", {
1443
- enumerable: true,
1444
- get: function() {
1445
- return workAsyncStorageInstance;
1446
- }
1447
- });
1448
- var _asynclocalstorage = require_async_local_storage();
1449
- var workAsyncStorageInstance = (0, _asynclocalstorage.createAsyncLocalStorage)();
1450
- }
1451
- });
1452
-
1453
- // ../../node_modules/.pnpm/next@16.1.6_@babel+core@7.29.0_@playwright+test@1.58.2_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/next/dist/server/app-render/work-async-storage.external.js
1454
- var require_work_async_storage_external = __commonJS({
1455
- "../../node_modules/.pnpm/next@16.1.6_@babel+core@7.29.0_@playwright+test@1.58.2_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/next/dist/server/app-render/work-async-storage.external.js"(exports) {
1456
- "use strict";
1457
- Object.defineProperty(exports, "__esModule", {
1458
- value: true
1459
- });
1460
- Object.defineProperty(exports, "workAsyncStorage", {
1461
- enumerable: true,
1462
- get: function() {
1463
- return _workasyncstorageinstance.workAsyncStorageInstance;
1464
- }
1465
- });
1466
- var _workasyncstorageinstance = require_work_async_storage_instance();
1467
- }
1468
- });
1469
-
1470
- // ../../node_modules/.pnpm/next@16.1.6_@babel+core@7.29.0_@playwright+test@1.58.2_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/next/dist/lib/framework/boundary-constants.js
1471
- var require_boundary_constants = __commonJS({
1472
- "../../node_modules/.pnpm/next@16.1.6_@babel+core@7.29.0_@playwright+test@1.58.2_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/next/dist/lib/framework/boundary-constants.js"(exports) {
1473
- "use strict";
1474
- Object.defineProperty(exports, "__esModule", {
1475
- value: true
1476
- });
1477
- function _export(target, all) {
1478
- for (var name in all) Object.defineProperty(target, name, {
1479
- enumerable: true,
1480
- get: all[name]
1481
- });
1482
- }
1483
- _export(exports, {
1484
- METADATA_BOUNDARY_NAME: function() {
1485
- return METADATA_BOUNDARY_NAME;
1486
- },
1487
- OUTLET_BOUNDARY_NAME: function() {
1488
- return OUTLET_BOUNDARY_NAME;
1489
- },
1490
- ROOT_LAYOUT_BOUNDARY_NAME: function() {
1491
- return ROOT_LAYOUT_BOUNDARY_NAME;
1492
- },
1493
- VIEWPORT_BOUNDARY_NAME: function() {
1494
- return VIEWPORT_BOUNDARY_NAME;
1495
- }
1496
- });
1497
- var METADATA_BOUNDARY_NAME = "__next_metadata_boundary__";
1498
- var VIEWPORT_BOUNDARY_NAME = "__next_viewport_boundary__";
1499
- var OUTLET_BOUNDARY_NAME = "__next_outlet_boundary__";
1500
- var ROOT_LAYOUT_BOUNDARY_NAME = "__next_root_layout_boundary__";
1501
- }
1502
- });
1503
-
1504
- // ../../node_modules/.pnpm/next@16.1.6_@babel+core@7.29.0_@playwright+test@1.58.2_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/next/dist/lib/scheduler.js
1505
- var require_scheduler = __commonJS({
1506
- "../../node_modules/.pnpm/next@16.1.6_@babel+core@7.29.0_@playwright+test@1.58.2_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/next/dist/lib/scheduler.js"(exports) {
1507
- "use strict";
1508
- Object.defineProperty(exports, "__esModule", {
1509
- value: true
1510
- });
1511
- function _export(target, all) {
1512
- for (var name in all) Object.defineProperty(target, name, {
1513
- enumerable: true,
1514
- get: all[name]
1515
- });
1516
- }
1517
- _export(exports, {
1518
- atLeastOneTask: function() {
1519
- return atLeastOneTask;
1520
- },
1521
- scheduleImmediate: function() {
1522
- return scheduleImmediate;
1523
- },
1524
- scheduleOnNextTick: function() {
1525
- return scheduleOnNextTick;
1526
- },
1527
- waitAtLeastOneReactRenderTask: function() {
1528
- return waitAtLeastOneReactRenderTask;
1529
- }
1530
- });
1531
- var scheduleOnNextTick = (cb) => {
1532
- Promise.resolve().then(() => {
1533
- if (process.env.NEXT_RUNTIME === "edge") {
1534
- setTimeout(cb, 0);
1535
- } else {
1536
- process.nextTick(cb);
1537
- }
1538
- });
1539
- };
1540
- var scheduleImmediate = (cb) => {
1541
- if (process.env.NEXT_RUNTIME === "edge") {
1542
- setTimeout(cb, 0);
1543
- } else {
1544
- setImmediate(cb);
1545
- }
1546
- };
1547
- function atLeastOneTask() {
1548
- return new Promise((resolve) => scheduleImmediate(resolve));
1549
- }
1550
- function waitAtLeastOneReactRenderTask() {
1551
- if (process.env.NEXT_RUNTIME === "edge") {
1552
- return new Promise((r) => setTimeout(r, 0));
1553
- } else {
1554
- return new Promise((r) => setImmediate(r));
1555
- }
1556
- }
1557
- }
1558
- });
1559
-
1560
- // ../../node_modules/.pnpm/next@16.1.6_@babel+core@7.29.0_@playwright+test@1.58.2_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/next/dist/server/app-render/dynamic-rendering.js
1561
- var require_dynamic_rendering = __commonJS({
1562
- "../../node_modules/.pnpm/next@16.1.6_@babel+core@7.29.0_@playwright+test@1.58.2_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/next/dist/server/app-render/dynamic-rendering.js"(exports) {
1563
- "use strict";
1564
- Object.defineProperty(exports, "__esModule", {
1565
- value: true
1566
- });
1567
- function _export(target, all) {
1568
- for (var name in all) Object.defineProperty(target, name, {
1569
- enumerable: true,
1570
- get: all[name]
1571
- });
1572
- }
1573
- _export(exports, {
1574
- Postpone: function() {
1575
- return Postpone;
1576
- },
1577
- PreludeState: function() {
1578
- return PreludeState;
1579
- },
1580
- abortAndThrowOnSynchronousRequestDataAccess: function() {
1581
- return abortAndThrowOnSynchronousRequestDataAccess;
1582
- },
1583
- abortOnSynchronousPlatformIOAccess: function() {
1584
- return abortOnSynchronousPlatformIOAccess;
1585
- },
1586
- accessedDynamicData: function() {
1587
- return accessedDynamicData;
1588
- },
1589
- annotateDynamicAccess: function() {
1590
- return annotateDynamicAccess;
1591
- },
1592
- consumeDynamicAccess: function() {
1593
- return consumeDynamicAccess;
1594
- },
1595
- createDynamicTrackingState: function() {
1596
- return createDynamicTrackingState;
1597
- },
1598
- createDynamicValidationState: function() {
1599
- return createDynamicValidationState;
1600
- },
1601
- createHangingInputAbortSignal: function() {
1602
- return createHangingInputAbortSignal;
1603
- },
1604
- createRenderInBrowserAbortSignal: function() {
1605
- return createRenderInBrowserAbortSignal;
1606
- },
1607
- delayUntilRuntimeStage: function() {
1608
- return delayUntilRuntimeStage;
1609
- },
1610
- formatDynamicAPIAccesses: function() {
1611
- return formatDynamicAPIAccesses;
1612
- },
1613
- getFirstDynamicReason: function() {
1614
- return getFirstDynamicReason;
1615
- },
1616
- getStaticShellDisallowedDynamicReasons: function() {
1617
- return getStaticShellDisallowedDynamicReasons;
1618
- },
1619
- isDynamicPostpone: function() {
1620
- return isDynamicPostpone;
1621
- },
1622
- isPrerenderInterruptedError: function() {
1623
- return isPrerenderInterruptedError;
1624
- },
1625
- logDisallowedDynamicError: function() {
1626
- return logDisallowedDynamicError;
1627
- },
1628
- markCurrentScopeAsDynamic: function() {
1629
- return markCurrentScopeAsDynamic;
1630
- },
1631
- postponeWithTracking: function() {
1632
- return postponeWithTracking;
1633
- },
1634
- throwIfDisallowedDynamic: function() {
1635
- return throwIfDisallowedDynamic;
1636
- },
1637
- throwToInterruptStaticGeneration: function() {
1638
- return throwToInterruptStaticGeneration;
1639
- },
1640
- trackAllowedDynamicAccess: function() {
1641
- return trackAllowedDynamicAccess;
1642
- },
1643
- trackDynamicDataInDynamicRender: function() {
1644
- return trackDynamicDataInDynamicRender;
1645
- },
1646
- trackDynamicHoleInRuntimeShell: function() {
1647
- return trackDynamicHoleInRuntimeShell;
1648
- },
1649
- trackDynamicHoleInStaticShell: function() {
1650
- return trackDynamicHoleInStaticShell;
1651
- },
1652
- useDynamicRouteParams: function() {
1653
- return useDynamicRouteParams;
1654
- },
1655
- useDynamicSearchParams: function() {
1656
- return useDynamicSearchParams;
1657
- }
1658
- });
1659
- var _react = /* @__PURE__ */ _interop_require_default(__require("react"));
1660
- var _hooksservercontext = require_hooks_server_context();
1661
- var _staticgenerationbailout = require_static_generation_bailout();
1662
- var _workunitasyncstorageexternal = require_work_unit_async_storage_external();
1663
- var _workasyncstorageexternal = require_work_async_storage_external();
1664
- var _dynamicrenderingutils = require_dynamic_rendering_utils();
1665
- var _boundaryconstants = require_boundary_constants();
1666
- var _scheduler = require_scheduler();
1667
- var _bailouttocsr = require_bailout_to_csr();
1668
- var _invarianterror = require_invariant_error();
1669
- function _interop_require_default(obj) {
1670
- return obj && obj.__esModule ? obj : {
1671
- default: obj
1672
- };
1673
- }
1674
- var hasPostpone = typeof _react.default.unstable_postpone === "function";
1675
- function createDynamicTrackingState(isDebugDynamicAccesses) {
1676
- return {
1677
- isDebugDynamicAccesses,
1678
- dynamicAccesses: [],
1679
- syncDynamicErrorWithStack: null
1680
- };
1681
- }
1682
- function createDynamicValidationState() {
1683
- return {
1684
- hasSuspenseAboveBody: false,
1685
- hasDynamicMetadata: false,
1686
- dynamicMetadata: null,
1687
- hasDynamicViewport: false,
1688
- hasAllowedDynamic: false,
1689
- dynamicErrors: []
1690
- };
1691
- }
1692
- function getFirstDynamicReason(trackingState) {
1693
- var _trackingState_dynamicAccesses_;
1694
- return (_trackingState_dynamicAccesses_ = trackingState.dynamicAccesses[0]) == null ? void 0 : _trackingState_dynamicAccesses_.expression;
1695
- }
1696
- function markCurrentScopeAsDynamic(store, workUnitStore, expression) {
1697
- if (workUnitStore) {
1698
- switch (workUnitStore.type) {
1699
- case "cache":
1700
- case "unstable-cache":
1701
- return;
1702
- case "private-cache":
1703
- return;
1704
- case "prerender-legacy":
1705
- case "prerender-ppr":
1706
- case "request":
1707
- break;
1708
- default:
1709
- workUnitStore;
1710
- }
1711
- }
1712
- if (store.forceDynamic || store.forceStatic) return;
1713
- if (store.dynamicShouldError) {
1714
- throw Object.defineProperty(new _staticgenerationbailout.StaticGenBailoutError(`Route ${store.route} with \`dynamic = "error"\` couldn't be rendered statically because it used \`${expression}\`. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`), "__NEXT_ERROR_CODE", {
1715
- value: "E553",
1716
- enumerable: false,
1717
- configurable: true
1718
- });
1719
- }
1720
- if (workUnitStore) {
1721
- switch (workUnitStore.type) {
1722
- case "prerender-ppr":
1723
- return postponeWithTracking(store.route, expression, workUnitStore.dynamicTracking);
1724
- case "prerender-legacy":
1725
- workUnitStore.revalidate = 0;
1726
- const err = Object.defineProperty(new _hooksservercontext.DynamicServerError(`Route ${store.route} couldn't be rendered statically because it used ${expression}. See more info here: https://nextjs.org/docs/messages/dynamic-server-error`), "__NEXT_ERROR_CODE", {
1727
- value: "E550",
1728
- enumerable: false,
1729
- configurable: true
1730
- });
1731
- store.dynamicUsageDescription = expression;
1732
- store.dynamicUsageStack = err.stack;
1733
- throw err;
1734
- case "request":
1735
- if (process.env.NODE_ENV !== "production") {
1736
- workUnitStore.usedDynamic = true;
1737
- }
1738
- break;
1739
- default:
1740
- workUnitStore;
1741
- }
1742
- }
1743
- }
1744
- function throwToInterruptStaticGeneration(expression, store, prerenderStore) {
1745
- const err = Object.defineProperty(new _hooksservercontext.DynamicServerError(`Route ${store.route} couldn't be rendered statically because it used \`${expression}\`. See more info here: https://nextjs.org/docs/messages/dynamic-server-error`), "__NEXT_ERROR_CODE", {
1746
- value: "E558",
1747
- enumerable: false,
1748
- configurable: true
1749
- });
1750
- prerenderStore.revalidate = 0;
1751
- store.dynamicUsageDescription = expression;
1752
- store.dynamicUsageStack = err.stack;
1753
- throw err;
1754
- }
1755
- function trackDynamicDataInDynamicRender(workUnitStore) {
1756
- switch (workUnitStore.type) {
1757
- case "cache":
1758
- case "unstable-cache":
1759
- return;
1760
- case "private-cache":
1761
- return;
1762
- case "prerender":
1763
- case "prerender-runtime":
1764
- case "prerender-legacy":
1765
- case "prerender-ppr":
1766
- case "prerender-client":
1767
- break;
1768
- case "request":
1769
- if (process.env.NODE_ENV !== "production") {
1770
- workUnitStore.usedDynamic = true;
1771
- }
1772
- break;
1773
- default:
1774
- workUnitStore;
1775
- }
1776
- }
1777
- function abortOnSynchronousDynamicDataAccess(route, expression, prerenderStore) {
1778
- const reason = `Route ${route} needs to bail out of prerendering at this point because it used ${expression}.`;
1779
- const error = createPrerenderInterruptedError(reason);
1780
- prerenderStore.controller.abort(error);
1781
- const dynamicTracking = prerenderStore.dynamicTracking;
1782
- if (dynamicTracking) {
1783
- dynamicTracking.dynamicAccesses.push({
1784
- // When we aren't debugging, we don't need to create another error for the
1785
- // stack trace.
1786
- stack: dynamicTracking.isDebugDynamicAccesses ? new Error().stack : void 0,
1787
- expression
1788
- });
1789
- }
1790
- }
1791
- function abortOnSynchronousPlatformIOAccess(route, expression, errorWithStack, prerenderStore) {
1792
- const dynamicTracking = prerenderStore.dynamicTracking;
1793
- abortOnSynchronousDynamicDataAccess(route, expression, prerenderStore);
1794
- if (dynamicTracking) {
1795
- if (dynamicTracking.syncDynamicErrorWithStack === null) {
1796
- dynamicTracking.syncDynamicErrorWithStack = errorWithStack;
1797
- }
1798
- }
1799
- }
1800
- function abortAndThrowOnSynchronousRequestDataAccess(route, expression, errorWithStack, prerenderStore) {
1801
- const prerenderSignal = prerenderStore.controller.signal;
1802
- if (prerenderSignal.aborted === false) {
1803
- abortOnSynchronousDynamicDataAccess(route, expression, prerenderStore);
1804
- const dynamicTracking = prerenderStore.dynamicTracking;
1805
- if (dynamicTracking) {
1806
- if (dynamicTracking.syncDynamicErrorWithStack === null) {
1807
- dynamicTracking.syncDynamicErrorWithStack = errorWithStack;
1808
- }
1809
- }
1810
- }
1811
- throw createPrerenderInterruptedError(`Route ${route} needs to bail out of prerendering at this point because it used ${expression}.`);
1812
- }
1813
- function Postpone({ reason, route }) {
1814
- const prerenderStore = _workunitasyncstorageexternal.workUnitAsyncStorage.getStore();
1815
- const dynamicTracking = prerenderStore && prerenderStore.type === "prerender-ppr" ? prerenderStore.dynamicTracking : null;
1816
- postponeWithTracking(route, reason, dynamicTracking);
1817
- }
1818
- function postponeWithTracking(route, expression, dynamicTracking) {
1819
- assertPostpone();
1820
- if (dynamicTracking) {
1821
- dynamicTracking.dynamicAccesses.push({
1822
- // When we aren't debugging, we don't need to create another error for the
1823
- // stack trace.
1824
- stack: dynamicTracking.isDebugDynamicAccesses ? new Error().stack : void 0,
1825
- expression
1826
- });
1827
- }
1828
- _react.default.unstable_postpone(createPostponeReason(route, expression));
1829
- }
1830
- function createPostponeReason(route, expression) {
1831
- return `Route ${route} needs to bail out of prerendering at this point because it used ${expression}. React throws this special object to indicate where. It should not be caught by your own try/catch. Learn more: https://nextjs.org/docs/messages/ppr-caught-error`;
1832
- }
1833
- function isDynamicPostpone(err) {
1834
- if (typeof err === "object" && err !== null && typeof err.message === "string") {
1835
- return isDynamicPostponeReason(err.message);
1836
- }
1837
- return false;
1838
- }
1839
- function isDynamicPostponeReason(reason) {
1840
- return reason.includes("needs to bail out of prerendering at this point because it used") && reason.includes("Learn more: https://nextjs.org/docs/messages/ppr-caught-error");
1841
- }
1842
- if (isDynamicPostponeReason(createPostponeReason("%%%", "^^^")) === false) {
1843
- throw Object.defineProperty(new Error("Invariant: isDynamicPostpone misidentified a postpone reason. This is a bug in Next.js"), "__NEXT_ERROR_CODE", {
1844
- value: "E296",
1845
- enumerable: false,
1846
- configurable: true
1847
- });
1848
- }
1849
- var NEXT_PRERENDER_INTERRUPTED = "NEXT_PRERENDER_INTERRUPTED";
1850
- function createPrerenderInterruptedError(message) {
1851
- const error = Object.defineProperty(new Error(message), "__NEXT_ERROR_CODE", {
1852
- value: "E394",
1853
- enumerable: false,
1854
- configurable: true
1855
- });
1856
- error.digest = NEXT_PRERENDER_INTERRUPTED;
1857
- return error;
1858
- }
1859
- function isPrerenderInterruptedError(error) {
1860
- return typeof error === "object" && error !== null && error.digest === NEXT_PRERENDER_INTERRUPTED && "name" in error && "message" in error && error instanceof Error;
1861
- }
1862
- function accessedDynamicData(dynamicAccesses) {
1863
- return dynamicAccesses.length > 0;
1864
- }
1865
- function consumeDynamicAccess(serverDynamic, clientDynamic) {
1866
- serverDynamic.dynamicAccesses.push(...clientDynamic.dynamicAccesses);
1867
- return serverDynamic.dynamicAccesses;
1868
- }
1869
- function formatDynamicAPIAccesses(dynamicAccesses) {
1870
- return dynamicAccesses.filter((access) => typeof access.stack === "string" && access.stack.length > 0).map(({ expression, stack }) => {
1871
- stack = stack.split("\n").slice(4).filter((line) => {
1872
- if (line.includes("node_modules/next/")) {
1873
- return false;
1874
- }
1875
- if (line.includes(" (<anonymous>)")) {
1876
- return false;
1877
- }
1878
- if (line.includes(" (node:")) {
1879
- return false;
1880
- }
1881
- return true;
1882
- }).join("\n");
1883
- return `Dynamic API Usage Debug - ${expression}:
1884
- ${stack}`;
1885
- });
1886
- }
1887
- function assertPostpone() {
1888
- if (!hasPostpone) {
1889
- throw Object.defineProperty(new Error(`Invariant: React.unstable_postpone is not defined. This suggests the wrong version of React was loaded. This is a bug in Next.js`), "__NEXT_ERROR_CODE", {
1890
- value: "E224",
1891
- enumerable: false,
1892
- configurable: true
1893
- });
1894
- }
1895
- }
1896
- function createRenderInBrowserAbortSignal() {
1897
- const controller = new AbortController();
1898
- controller.abort(Object.defineProperty(new _bailouttocsr.BailoutToCSRError("Render in Browser"), "__NEXT_ERROR_CODE", {
1899
- value: "E721",
1900
- enumerable: false,
1901
- configurable: true
1902
- }));
1903
- return controller.signal;
1904
- }
1905
- function createHangingInputAbortSignal(workUnitStore) {
1906
- switch (workUnitStore.type) {
1907
- case "prerender":
1908
- case "prerender-runtime":
1909
- const controller = new AbortController();
1910
- if (workUnitStore.cacheSignal) {
1911
- workUnitStore.cacheSignal.inputReady().then(() => {
1912
- controller.abort();
1913
- });
1914
- } else {
1915
- const runtimeStagePromise = (0, _workunitasyncstorageexternal.getRuntimeStagePromise)(workUnitStore);
1916
- if (runtimeStagePromise) {
1917
- runtimeStagePromise.then(() => (0, _scheduler.scheduleOnNextTick)(() => controller.abort()));
1918
- } else {
1919
- (0, _scheduler.scheduleOnNextTick)(() => controller.abort());
1920
- }
1921
- }
1922
- return controller.signal;
1923
- case "prerender-client":
1924
- case "prerender-ppr":
1925
- case "prerender-legacy":
1926
- case "request":
1927
- case "cache":
1928
- case "private-cache":
1929
- case "unstable-cache":
1930
- return void 0;
1931
- default:
1932
- workUnitStore;
1933
- }
1934
- }
1935
- function annotateDynamicAccess(expression, prerenderStore) {
1936
- const dynamicTracking = prerenderStore.dynamicTracking;
1937
- if (dynamicTracking) {
1938
- dynamicTracking.dynamicAccesses.push({
1939
- stack: dynamicTracking.isDebugDynamicAccesses ? new Error().stack : void 0,
1940
- expression
1941
- });
1942
- }
1943
- }
1944
- function useDynamicRouteParams(expression) {
1945
- const workStore = _workasyncstorageexternal.workAsyncStorage.getStore();
1946
- const workUnitStore = _workunitasyncstorageexternal.workUnitAsyncStorage.getStore();
1947
- if (workStore && workUnitStore) {
1948
- switch (workUnitStore.type) {
1949
- case "prerender-client":
1950
- case "prerender": {
1951
- const fallbackParams = workUnitStore.fallbackRouteParams;
1952
- if (fallbackParams && fallbackParams.size > 0) {
1953
- _react.default.use((0, _dynamicrenderingutils.makeHangingPromise)(workUnitStore.renderSignal, workStore.route, expression));
1954
- }
1955
- break;
1956
- }
1957
- case "prerender-ppr": {
1958
- const fallbackParams = workUnitStore.fallbackRouteParams;
1959
- if (fallbackParams && fallbackParams.size > 0) {
1960
- return postponeWithTracking(workStore.route, expression, workUnitStore.dynamicTracking);
1961
- }
1962
- break;
1963
- }
1964
- case "prerender-runtime":
1965
- throw Object.defineProperty(new _invarianterror.InvariantError(`\`${expression}\` was called during a runtime prerender. Next.js should be preventing ${expression} from being included in server components statically, but did not in this case.`), "__NEXT_ERROR_CODE", {
1966
- value: "E771",
1967
- enumerable: false,
1968
- configurable: true
1969
- });
1970
- case "cache":
1971
- case "private-cache":
1972
- throw Object.defineProperty(new _invarianterror.InvariantError(`\`${expression}\` was called inside a cache scope. Next.js should be preventing ${expression} from being included in server components statically, but did not in this case.`), "__NEXT_ERROR_CODE", {
1973
- value: "E745",
1974
- enumerable: false,
1975
- configurable: true
1976
- });
1977
- case "prerender-legacy":
1978
- case "request":
1979
- case "unstable-cache":
1980
- break;
1981
- default:
1982
- workUnitStore;
1983
- }
1984
- }
1985
- }
1986
- function useDynamicSearchParams(expression) {
1987
- const workStore = _workasyncstorageexternal.workAsyncStorage.getStore();
1988
- const workUnitStore = _workunitasyncstorageexternal.workUnitAsyncStorage.getStore();
1989
- if (!workStore) {
1990
- return;
1991
- }
1992
- if (!workUnitStore) {
1993
- (0, _workunitasyncstorageexternal.throwForMissingRequestStore)(expression);
1994
- }
1995
- switch (workUnitStore.type) {
1996
- case "prerender-client": {
1997
- _react.default.use((0, _dynamicrenderingutils.makeHangingPromise)(workUnitStore.renderSignal, workStore.route, expression));
1998
- break;
1999
- }
2000
- case "prerender-legacy":
2001
- case "prerender-ppr": {
2002
- if (workStore.forceStatic) {
2003
- return;
2004
- }
2005
- throw Object.defineProperty(new _bailouttocsr.BailoutToCSRError(expression), "__NEXT_ERROR_CODE", {
2006
- value: "E394",
2007
- enumerable: false,
2008
- configurable: true
2009
- });
2010
- }
2011
- case "prerender":
2012
- case "prerender-runtime":
2013
- throw Object.defineProperty(new _invarianterror.InvariantError(`\`${expression}\` was called from a Server Component. Next.js should be preventing ${expression} from being included in server components statically, but did not in this case.`), "__NEXT_ERROR_CODE", {
2014
- value: "E795",
2015
- enumerable: false,
2016
- configurable: true
2017
- });
2018
- case "cache":
2019
- case "unstable-cache":
2020
- case "private-cache":
2021
- throw Object.defineProperty(new _invarianterror.InvariantError(`\`${expression}\` was called inside a cache scope. Next.js should be preventing ${expression} from being included in server components statically, but did not in this case.`), "__NEXT_ERROR_CODE", {
2022
- value: "E745",
2023
- enumerable: false,
2024
- configurable: true
2025
- });
2026
- case "request":
2027
- return;
2028
- default:
2029
- workUnitStore;
2030
- }
2031
- }
2032
- var hasSuspenseRegex = /\n\s+at Suspense \(<anonymous>\)/;
2033
- var bodyAndImplicitTags = "body|div|main|section|article|aside|header|footer|nav|form|p|span|h1|h2|h3|h4|h5|h6";
2034
- var hasSuspenseBeforeRootLayoutWithoutBodyOrImplicitBodyRegex = new RegExp(`\\n\\s+at Suspense \\(<anonymous>\\)(?:(?!\\n\\s+at (?:${bodyAndImplicitTags}) \\(<anonymous>\\))[\\s\\S])*?\\n\\s+at ${_boundaryconstants.ROOT_LAYOUT_BOUNDARY_NAME} \\([^\\n]*\\)`);
2035
- var hasMetadataRegex = new RegExp(`\\n\\s+at ${_boundaryconstants.METADATA_BOUNDARY_NAME}[\\n\\s]`);
2036
- var hasViewportRegex = new RegExp(`\\n\\s+at ${_boundaryconstants.VIEWPORT_BOUNDARY_NAME}[\\n\\s]`);
2037
- var hasOutletRegex = new RegExp(`\\n\\s+at ${_boundaryconstants.OUTLET_BOUNDARY_NAME}[\\n\\s]`);
2038
- function trackAllowedDynamicAccess(workStore, componentStack, dynamicValidation, clientDynamic) {
2039
- if (hasOutletRegex.test(componentStack)) {
2040
- return;
2041
- } else if (hasMetadataRegex.test(componentStack)) {
2042
- dynamicValidation.hasDynamicMetadata = true;
2043
- return;
2044
- } else if (hasViewportRegex.test(componentStack)) {
2045
- dynamicValidation.hasDynamicViewport = true;
2046
- return;
2047
- } else if (hasSuspenseBeforeRootLayoutWithoutBodyOrImplicitBodyRegex.test(componentStack)) {
2048
- dynamicValidation.hasAllowedDynamic = true;
2049
- dynamicValidation.hasSuspenseAboveBody = true;
2050
- return;
2051
- } else if (hasSuspenseRegex.test(componentStack)) {
2052
- dynamicValidation.hasAllowedDynamic = true;
2053
- return;
2054
- } else if (clientDynamic.syncDynamicErrorWithStack) {
2055
- dynamicValidation.dynamicErrors.push(clientDynamic.syncDynamicErrorWithStack);
2056
- return;
2057
- } else {
2058
- const message = `Route "${workStore.route}": Uncached data was accessed outside of <Suspense>. This delays the entire page from rendering, resulting in a slow user experience. Learn more: https://nextjs.org/docs/messages/blocking-route`;
2059
- const error = createErrorWithComponentOrOwnerStack(message, componentStack);
2060
- dynamicValidation.dynamicErrors.push(error);
2061
- return;
2062
- }
2063
- }
2064
- function trackDynamicHoleInRuntimeShell(workStore, componentStack, dynamicValidation, clientDynamic) {
2065
- if (hasOutletRegex.test(componentStack)) {
2066
- return;
2067
- } else if (hasMetadataRegex.test(componentStack)) {
2068
- const message = `Route "${workStore.route}": Uncached data or \`connection()\` was accessed inside \`generateMetadata\`. Except for this instance, the page would have been entirely prerenderable which may have been the intended behavior. See more info here: https://nextjs.org/docs/messages/next-prerender-dynamic-metadata`;
2069
- const error = createErrorWithComponentOrOwnerStack(message, componentStack);
2070
- dynamicValidation.dynamicMetadata = error;
2071
- return;
2072
- } else if (hasViewportRegex.test(componentStack)) {
2073
- const message = `Route "${workStore.route}": Uncached data or \`connection()\` was accessed inside \`generateViewport\`. This delays the entire page from rendering, resulting in a slow user experience. Learn more: https://nextjs.org/docs/messages/next-prerender-dynamic-viewport`;
2074
- const error = createErrorWithComponentOrOwnerStack(message, componentStack);
2075
- dynamicValidation.dynamicErrors.push(error);
2076
- return;
2077
- } else if (hasSuspenseBeforeRootLayoutWithoutBodyOrImplicitBodyRegex.test(componentStack)) {
2078
- dynamicValidation.hasAllowedDynamic = true;
2079
- dynamicValidation.hasSuspenseAboveBody = true;
2080
- return;
2081
- } else if (hasSuspenseRegex.test(componentStack)) {
2082
- dynamicValidation.hasAllowedDynamic = true;
2083
- return;
2084
- } else if (clientDynamic.syncDynamicErrorWithStack) {
2085
- dynamicValidation.dynamicErrors.push(clientDynamic.syncDynamicErrorWithStack);
2086
- return;
2087
- } else {
2088
- const message = `Route "${workStore.route}": Uncached data or \`connection()\` was accessed outside of \`<Suspense>\`. This delays the entire page from rendering, resulting in a slow user experience. Learn more: https://nextjs.org/docs/messages/blocking-route`;
2089
- const error = createErrorWithComponentOrOwnerStack(message, componentStack);
2090
- dynamicValidation.dynamicErrors.push(error);
2091
- return;
2092
- }
2093
- }
2094
- function trackDynamicHoleInStaticShell(workStore, componentStack, dynamicValidation, clientDynamic) {
2095
- if (hasOutletRegex.test(componentStack)) {
2096
- return;
2097
- } else if (hasMetadataRegex.test(componentStack)) {
2098
- const message = `Route "${workStore.route}": Runtime data such as \`cookies()\`, \`headers()\`, \`params\`, or \`searchParams\` was accessed inside \`generateMetadata\` or you have file-based metadata such as icons that depend on dynamic params segments. Except for this instance, the page would have been entirely prerenderable which may have been the intended behavior. See more info here: https://nextjs.org/docs/messages/next-prerender-dynamic-metadata`;
2099
- const error = createErrorWithComponentOrOwnerStack(message, componentStack);
2100
- dynamicValidation.dynamicMetadata = error;
2101
- return;
2102
- } else if (hasViewportRegex.test(componentStack)) {
2103
- const message = `Route "${workStore.route}": Runtime data such as \`cookies()\`, \`headers()\`, \`params\`, or \`searchParams\` was accessed inside \`generateViewport\`. This delays the entire page from rendering, resulting in a slow user experience. Learn more: https://nextjs.org/docs/messages/next-prerender-dynamic-viewport`;
2104
- const error = createErrorWithComponentOrOwnerStack(message, componentStack);
2105
- dynamicValidation.dynamicErrors.push(error);
2106
- return;
2107
- } else if (hasSuspenseBeforeRootLayoutWithoutBodyOrImplicitBodyRegex.test(componentStack)) {
2108
- dynamicValidation.hasAllowedDynamic = true;
2109
- dynamicValidation.hasSuspenseAboveBody = true;
2110
- return;
2111
- } else if (hasSuspenseRegex.test(componentStack)) {
2112
- dynamicValidation.hasAllowedDynamic = true;
2113
- return;
2114
- } else if (clientDynamic.syncDynamicErrorWithStack) {
2115
- dynamicValidation.dynamicErrors.push(clientDynamic.syncDynamicErrorWithStack);
2116
- return;
2117
- } else {
2118
- const message = `Route "${workStore.route}": Runtime data such as \`cookies()\`, \`headers()\`, \`params\`, or \`searchParams\` was accessed outside of \`<Suspense>\`. This delays the entire page from rendering, resulting in a slow user experience. Learn more: https://nextjs.org/docs/messages/blocking-route`;
2119
- const error = createErrorWithComponentOrOwnerStack(message, componentStack);
2120
- dynamicValidation.dynamicErrors.push(error);
2121
- return;
2122
- }
2123
- }
2124
- function createErrorWithComponentOrOwnerStack(message, componentStack) {
2125
- const ownerStack = process.env.NODE_ENV !== "production" && _react.default.captureOwnerStack ? _react.default.captureOwnerStack() : null;
2126
- const error = Object.defineProperty(new Error(message), "__NEXT_ERROR_CODE", {
2127
- value: "E394",
2128
- enumerable: false,
2129
- configurable: true
2130
- });
2131
- error.stack = error.name + ": " + message + (ownerStack || componentStack);
2132
- return error;
2133
- }
2134
- var PreludeState = /* @__PURE__ */ (function(PreludeState2) {
2135
- PreludeState2[PreludeState2["Full"] = 0] = "Full";
2136
- PreludeState2[PreludeState2["Empty"] = 1] = "Empty";
2137
- PreludeState2[PreludeState2["Errored"] = 2] = "Errored";
2138
- return PreludeState2;
2139
- })({});
2140
- function logDisallowedDynamicError(workStore, error) {
2141
- console.error(error);
2142
- if (!workStore.dev) {
2143
- if (workStore.hasReadableErrorStacks) {
2144
- console.error(`To get a more detailed stack trace and pinpoint the issue, start the app in development mode by running \`next dev\`, then open "${workStore.route}" in your browser to investigate the error.`);
2145
- } else {
2146
- console.error(`To get a more detailed stack trace and pinpoint the issue, try one of the following:
2147
- - Start the app in development mode by running \`next dev\`, then open "${workStore.route}" in your browser to investigate the error.
2148
- - Rerun the production build with \`next build --debug-prerender\` to generate better stack traces.`);
2149
- }
2150
- }
2151
- }
2152
- function throwIfDisallowedDynamic(workStore, prelude, dynamicValidation, serverDynamic) {
2153
- if (serverDynamic.syncDynamicErrorWithStack) {
2154
- logDisallowedDynamicError(workStore, serverDynamic.syncDynamicErrorWithStack);
2155
- throw new _staticgenerationbailout.StaticGenBailoutError();
2156
- }
2157
- if (prelude !== 0) {
2158
- if (dynamicValidation.hasSuspenseAboveBody) {
2159
- return;
2160
- }
2161
- const dynamicErrors = dynamicValidation.dynamicErrors;
2162
- if (dynamicErrors.length > 0) {
2163
- for (let i = 0; i < dynamicErrors.length; i++) {
2164
- logDisallowedDynamicError(workStore, dynamicErrors[i]);
2165
- }
2166
- throw new _staticgenerationbailout.StaticGenBailoutError();
2167
- }
2168
- if (dynamicValidation.hasDynamicViewport) {
2169
- console.error(`Route "${workStore.route}" has a \`generateViewport\` that depends on Request data (\`cookies()\`, etc...) or uncached external data (\`fetch(...)\`, etc...) without explicitly allowing fully dynamic rendering. See more info here: https://nextjs.org/docs/messages/next-prerender-dynamic-viewport`);
2170
- throw new _staticgenerationbailout.StaticGenBailoutError();
2171
- }
2172
- if (prelude === 1) {
2173
- console.error(`Route "${workStore.route}" did not produce a static shell and Next.js was unable to determine a reason. This is a bug in Next.js.`);
2174
- throw new _staticgenerationbailout.StaticGenBailoutError();
2175
- }
2176
- } else {
2177
- if (dynamicValidation.hasAllowedDynamic === false && dynamicValidation.hasDynamicMetadata) {
2178
- console.error(`Route "${workStore.route}" has a \`generateMetadata\` that depends on Request data (\`cookies()\`, etc...) or uncached external data (\`fetch(...)\`, etc...) when the rest of the route does not. See more info here: https://nextjs.org/docs/messages/next-prerender-dynamic-metadata`);
2179
- throw new _staticgenerationbailout.StaticGenBailoutError();
2180
- }
2181
- }
2182
- }
2183
- function getStaticShellDisallowedDynamicReasons(workStore, prelude, dynamicValidation) {
2184
- if (dynamicValidation.hasSuspenseAboveBody) {
2185
- return [];
2186
- }
2187
- if (prelude !== 0) {
2188
- const dynamicErrors = dynamicValidation.dynamicErrors;
2189
- if (dynamicErrors.length > 0) {
2190
- return dynamicErrors;
2191
- }
2192
- if (prelude === 1) {
2193
- return [
2194
- Object.defineProperty(new _invarianterror.InvariantError(`Route "${workStore.route}" did not produce a static shell and Next.js was unable to determine a reason.`), "__NEXT_ERROR_CODE", {
2195
- value: "E936",
2196
- enumerable: false,
2197
- configurable: true
2198
- })
2199
- ];
2200
- }
2201
- } else {
2202
- if (dynamicValidation.hasAllowedDynamic === false && dynamicValidation.dynamicErrors.length === 0 && dynamicValidation.dynamicMetadata) {
2203
- return [
2204
- dynamicValidation.dynamicMetadata
2205
- ];
2206
- }
2207
- }
2208
- return [];
2209
- }
2210
- function delayUntilRuntimeStage(prerenderStore, result) {
2211
- if (prerenderStore.runtimeStagePromise) {
2212
- return prerenderStore.runtimeStagePromise.then(() => result);
2213
- }
2214
- return result;
2215
- }
2216
- }
2217
- });
2218
-
2219
- // ../../node_modules/.pnpm/next@16.1.6_@babel+core@7.29.0_@playwright+test@1.58.2_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/next/dist/client/components/unstable-rethrow.server.js
2220
- var require_unstable_rethrow_server = __commonJS({
2221
- "../../node_modules/.pnpm/next@16.1.6_@babel+core@7.29.0_@playwright+test@1.58.2_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/next/dist/client/components/unstable-rethrow.server.js"(exports, module) {
2222
- "use strict";
2223
- Object.defineProperty(exports, "__esModule", {
2224
- value: true
2225
- });
2226
- Object.defineProperty(exports, "unstable_rethrow", {
2227
- enumerable: true,
2228
- get: function() {
2229
- return unstable_rethrow;
2230
- }
2231
- });
2232
- var _dynamicrenderingutils = require_dynamic_rendering_utils();
2233
- var _ispostpone = require_is_postpone();
2234
- var _bailouttocsr = require_bailout_to_csr();
2235
- var _isnextroutererror = require_is_next_router_error();
2236
- var _dynamicrendering = require_dynamic_rendering();
2237
- var _hooksservercontext = require_hooks_server_context();
2238
- function unstable_rethrow(error) {
2239
- if ((0, _isnextroutererror.isNextRouterError)(error) || (0, _bailouttocsr.isBailoutToCSRError)(error) || (0, _hooksservercontext.isDynamicServerError)(error) || (0, _dynamicrendering.isDynamicPostpone)(error) || (0, _ispostpone.isPostpone)(error) || (0, _dynamicrenderingutils.isHangingPromiseRejectionError)(error) || (0, _dynamicrendering.isPrerenderInterruptedError)(error)) {
2240
- throw error;
2241
- }
2242
- if (error instanceof Error && "cause" in error) {
2243
- unstable_rethrow(error.cause);
2244
- }
2245
- }
2246
- if ((typeof exports.default === "function" || typeof exports.default === "object" && exports.default !== null) && typeof exports.default.__esModule === "undefined") {
2247
- Object.defineProperty(exports.default, "__esModule", { value: true });
2248
- Object.assign(exports.default, exports);
2249
- module.exports = exports.default;
2250
- }
2251
- }
2252
- });
2253
-
2254
- // ../../node_modules/.pnpm/next@16.1.6_@babel+core@7.29.0_@playwright+test@1.58.2_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/next/dist/client/components/unstable-rethrow.browser.js
2255
- var require_unstable_rethrow_browser = __commonJS({
2256
- "../../node_modules/.pnpm/next@16.1.6_@babel+core@7.29.0_@playwright+test@1.58.2_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/next/dist/client/components/unstable-rethrow.browser.js"(exports, module) {
2257
- "use strict";
2258
- Object.defineProperty(exports, "__esModule", {
2259
- value: true
2260
- });
2261
- Object.defineProperty(exports, "unstable_rethrow", {
2262
- enumerable: true,
2263
- get: function() {
2264
- return unstable_rethrow;
2265
- }
2266
- });
2267
- var _bailouttocsr = require_bailout_to_csr();
2268
- var _isnextroutererror = require_is_next_router_error();
2269
- function unstable_rethrow(error) {
2270
- if ((0, _isnextroutererror.isNextRouterError)(error) || (0, _bailouttocsr.isBailoutToCSRError)(error)) {
2271
- throw error;
2272
- }
2273
- if (error instanceof Error && "cause" in error) {
2274
- unstable_rethrow(error.cause);
2275
- }
2276
- }
2277
- if ((typeof exports.default === "function" || typeof exports.default === "object" && exports.default !== null) && typeof exports.default.__esModule === "undefined") {
2278
- Object.defineProperty(exports.default, "__esModule", { value: true });
2279
- Object.assign(exports.default, exports);
2280
- module.exports = exports.default;
2281
- }
2282
- }
2283
- });
2284
-
2285
- // ../../node_modules/.pnpm/next@16.1.6_@babel+core@7.29.0_@playwright+test@1.58.2_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/next/dist/client/components/unstable-rethrow.js
2286
- var require_unstable_rethrow = __commonJS({
2287
- "../../node_modules/.pnpm/next@16.1.6_@babel+core@7.29.0_@playwright+test@1.58.2_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/next/dist/client/components/unstable-rethrow.js"(exports, module) {
2288
- "use strict";
2289
- Object.defineProperty(exports, "__esModule", {
2290
- value: true
2291
- });
2292
- Object.defineProperty(exports, "unstable_rethrow", {
2293
- enumerable: true,
2294
- get: function() {
2295
- return unstable_rethrow;
2296
- }
2297
- });
2298
- var unstable_rethrow = typeof window === "undefined" ? require_unstable_rethrow_server().unstable_rethrow : require_unstable_rethrow_browser().unstable_rethrow;
2299
- if ((typeof exports.default === "function" || typeof exports.default === "object" && exports.default !== null) && typeof exports.default.__esModule === "undefined") {
2300
- Object.defineProperty(exports.default, "__esModule", { value: true });
2301
- Object.assign(exports.default, exports);
2302
- module.exports = exports.default;
2303
- }
2304
- }
2305
- });
2306
-
2307
- // ../../node_modules/.pnpm/next@16.1.6_@babel+core@7.29.0_@playwright+test@1.58.2_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/next/dist/client/components/navigation.react-server.js
2308
- var require_navigation_react_server = __commonJS({
2309
- "../../node_modules/.pnpm/next@16.1.6_@babel+core@7.29.0_@playwright+test@1.58.2_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/next/dist/client/components/navigation.react-server.js"(exports, module) {
2310
- "use strict";
2311
- Object.defineProperty(exports, "__esModule", {
2312
- value: true
2313
- });
2314
- function _export(target, all) {
2315
- for (var name in all) Object.defineProperty(target, name, {
2316
- enumerable: true,
2317
- get: all[name]
2318
- });
2319
- }
2320
- _export(exports, {
2321
- ReadonlyURLSearchParams: function() {
2322
- return _readonlyurlsearchparams.ReadonlyURLSearchParams;
2323
- },
2324
- RedirectType: function() {
2325
- return _redirecterror.RedirectType;
2326
- },
2327
- forbidden: function() {
2328
- return _forbidden.forbidden;
2329
- },
2330
- notFound: function() {
2331
- return _notfound.notFound;
2332
- },
2333
- permanentRedirect: function() {
2334
- return _redirect.permanentRedirect;
2335
- },
2336
- redirect: function() {
2337
- return _redirect.redirect;
2338
- },
2339
- unauthorized: function() {
2340
- return _unauthorized.unauthorized;
2341
- },
2342
- unstable_isUnrecognizedActionError: function() {
2343
- return unstable_isUnrecognizedActionError;
2344
- },
2345
- unstable_rethrow: function() {
2346
- return _unstablerethrow.unstable_rethrow;
2347
- }
2348
- });
2349
- var _readonlyurlsearchparams = require_readonly_url_search_params();
2350
- var _redirect = require_redirect();
2351
- var _redirecterror = require_redirect_error();
2352
- var _notfound = require_not_found();
2353
- var _forbidden = require_forbidden();
2354
- var _unauthorized = require_unauthorized();
2355
- var _unstablerethrow = require_unstable_rethrow();
2356
- function unstable_isUnrecognizedActionError() {
2357
- throw Object.defineProperty(new Error("`unstable_isUnrecognizedActionError` can only be used on the client."), "__NEXT_ERROR_CODE", {
2358
- value: "E776",
2359
- enumerable: false,
2360
- configurable: true
2361
- });
2362
- }
2363
- if ((typeof exports.default === "function" || typeof exports.default === "object" && exports.default !== null) && typeof exports.default.__esModule === "undefined") {
2364
- Object.defineProperty(exports.default, "__esModule", { value: true });
2365
- Object.assign(exports.default, exports);
2366
- module.exports = exports.default;
2367
- }
2368
- }
2369
- });
2370
-
2371
- // ../../node_modules/.pnpm/next@16.1.6_@babel+core@7.29.0_@playwright+test@1.58.2_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/next/dist/client/components/navigation.js
2372
- var require_navigation = __commonJS({
2373
- "../../node_modules/.pnpm/next@16.1.6_@babel+core@7.29.0_@playwright+test@1.58.2_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/next/dist/client/components/navigation.js"(exports, module) {
2374
- "use strict";
2375
- Object.defineProperty(exports, "__esModule", {
2376
- value: true
2377
- });
2378
- function _export(target, all) {
2379
- for (var name in all) Object.defineProperty(target, name, {
2380
- enumerable: true,
2381
- get: all[name]
2382
- });
2383
- }
2384
- _export(exports, {
2385
- // We need the same class that was used to instantiate the context value
2386
- // Otherwise instanceof checks will fail in usercode
2387
- ReadonlyURLSearchParams: function() {
2388
- return _hooksclientcontextsharedruntime.ReadonlyURLSearchParams;
2389
- },
2390
- RedirectType: function() {
2391
- return _navigationreactserver.RedirectType;
2392
- },
2393
- ServerInsertedHTMLContext: function() {
2394
- return _serverinsertedhtmlsharedruntime.ServerInsertedHTMLContext;
2395
- },
2396
- forbidden: function() {
2397
- return _navigationreactserver.forbidden;
2398
- },
2399
- notFound: function() {
2400
- return _navigationreactserver.notFound;
2401
- },
2402
- permanentRedirect: function() {
2403
- return _navigationreactserver.permanentRedirect;
2404
- },
2405
- redirect: function() {
2406
- return _navigationreactserver.redirect;
2407
- },
2408
- unauthorized: function() {
2409
- return _navigationreactserver.unauthorized;
2410
- },
2411
- unstable_isUnrecognizedActionError: function() {
2412
- return _unrecognizedactionerror.unstable_isUnrecognizedActionError;
2413
- },
2414
- unstable_rethrow: function() {
2415
- return _navigationreactserver.unstable_rethrow;
2416
- },
2417
- useParams: function() {
2418
- return useParams;
2419
- },
2420
- usePathname: function() {
2421
- return usePathname2;
2422
- },
2423
- useRouter: function() {
2424
- return useRouter;
2425
- },
2426
- useSearchParams: function() {
2427
- return useSearchParams;
2428
- },
2429
- useSelectedLayoutSegment: function() {
2430
- return useSelectedLayoutSegment;
2431
- },
2432
- useSelectedLayoutSegments: function() {
2433
- return useSelectedLayoutSegments;
2434
- },
2435
- useServerInsertedHTML: function() {
2436
- return _serverinsertedhtmlsharedruntime.useServerInsertedHTML;
2437
- }
2438
- });
2439
- var _interop_require_wildcard = require_interop_require_wildcard();
2440
- var _react = /* @__PURE__ */ _interop_require_wildcard._(__require("react"));
2441
- var _approutercontextsharedruntime = require_app_router_context_shared_runtime();
2442
- var _hooksclientcontextsharedruntime = require_hooks_client_context_shared_runtime();
2443
- var _segment = require_segment();
2444
- var _serverinsertedhtmlsharedruntime = require_server_inserted_html_shared_runtime();
2445
- var _unrecognizedactionerror = require_unrecognized_action_error();
2446
- var _navigationreactserver = require_navigation_react_server();
2447
- var useDynamicRouteParams = typeof window === "undefined" ? require_dynamic_rendering().useDynamicRouteParams : void 0;
2448
- var useDynamicSearchParams = typeof window === "undefined" ? require_dynamic_rendering().useDynamicSearchParams : void 0;
2449
- function useSearchParams() {
2450
- useDynamicSearchParams?.("useSearchParams()");
2451
- const searchParams = (0, _react.useContext)(_hooksclientcontextsharedruntime.SearchParamsContext);
2452
- const readonlySearchParams = (0, _react.useMemo)(() => {
2453
- if (!searchParams) {
2454
- return null;
2455
- }
2456
- return new _hooksclientcontextsharedruntime.ReadonlyURLSearchParams(searchParams);
2457
- }, [
2458
- searchParams
2459
- ]);
2460
- if (process.env.NODE_ENV !== "production" && "use" in _react.default) {
2461
- const navigationPromises = (0, _react.use)(_hooksclientcontextsharedruntime.NavigationPromisesContext);
2462
- if (navigationPromises) {
2463
- return (0, _react.use)(navigationPromises.searchParams);
2464
- }
2465
- }
2466
- return readonlySearchParams;
2467
- }
2468
- function usePathname2() {
2469
- useDynamicRouteParams?.("usePathname()");
2470
- const pathname = (0, _react.useContext)(_hooksclientcontextsharedruntime.PathnameContext);
2471
- if (process.env.NODE_ENV !== "production" && "use" in _react.default) {
2472
- const navigationPromises = (0, _react.use)(_hooksclientcontextsharedruntime.NavigationPromisesContext);
2473
- if (navigationPromises) {
2474
- return (0, _react.use)(navigationPromises.pathname);
2475
- }
2476
- }
2477
- return pathname;
2478
- }
2479
- function useRouter() {
2480
- const router = (0, _react.useContext)(_approutercontextsharedruntime.AppRouterContext);
2481
- if (router === null) {
2482
- throw Object.defineProperty(new Error("invariant expected app router to be mounted"), "__NEXT_ERROR_CODE", {
2483
- value: "E238",
2484
- enumerable: false,
2485
- configurable: true
2486
- });
2487
- }
2488
- return router;
2489
- }
2490
- function useParams() {
2491
- useDynamicRouteParams?.("useParams()");
2492
- const params = (0, _react.useContext)(_hooksclientcontextsharedruntime.PathParamsContext);
2493
- if (process.env.NODE_ENV !== "production" && "use" in _react.default) {
2494
- const navigationPromises = (0, _react.use)(_hooksclientcontextsharedruntime.NavigationPromisesContext);
2495
- if (navigationPromises) {
2496
- return (0, _react.use)(navigationPromises.params);
2497
- }
2498
- }
2499
- return params;
2500
- }
2501
- function useSelectedLayoutSegments(parallelRouteKey = "children") {
2502
- useDynamicRouteParams?.("useSelectedLayoutSegments()");
2503
- const context = (0, _react.useContext)(_approutercontextsharedruntime.LayoutRouterContext);
2504
- if (!context) return null;
2505
- if (process.env.NODE_ENV !== "production" && "use" in _react.default) {
2506
- const navigationPromises = (0, _react.use)(_hooksclientcontextsharedruntime.NavigationPromisesContext);
2507
- if (navigationPromises) {
2508
- const promise = navigationPromises.selectedLayoutSegmentsPromises?.get(parallelRouteKey);
2509
- if (promise) {
2510
- return (0, _react.use)(promise);
2511
- }
2512
- }
2513
- }
2514
- return (0, _segment.getSelectedLayoutSegmentPath)(context.parentTree, parallelRouteKey);
2515
- }
2516
- function useSelectedLayoutSegment(parallelRouteKey = "children") {
2517
- useDynamicRouteParams?.("useSelectedLayoutSegment()");
2518
- const navigationPromises = (0, _react.useContext)(_hooksclientcontextsharedruntime.NavigationPromisesContext);
2519
- const selectedLayoutSegments = useSelectedLayoutSegments(parallelRouteKey);
2520
- if (process.env.NODE_ENV !== "production" && navigationPromises && "use" in _react.default) {
2521
- const promise = navigationPromises.selectedLayoutSegmentPromises?.get(parallelRouteKey);
2522
- if (promise) {
2523
- return (0, _react.use)(promise);
2524
- }
2525
- }
2526
- return (0, _segment.computeSelectedLayoutSegment)(selectedLayoutSegments, parallelRouteKey);
2527
- }
2528
- if ((typeof exports.default === "function" || typeof exports.default === "object" && exports.default !== null) && typeof exports.default.__esModule === "undefined") {
2529
- Object.defineProperty(exports.default, "__esModule", { value: true });
2530
- Object.assign(exports.default, exports);
2531
- module.exports = exports.default;
2532
- }
2533
- }
2534
- });
2535
-
2536
- // ../../node_modules/.pnpm/next@16.1.6_@babel+core@7.29.0_@playwright+test@1.58.2_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/next/navigation.js
2537
- var require_navigation2 = __commonJS({
2538
- "../../node_modules/.pnpm/next@16.1.6_@babel+core@7.29.0_@playwright+test@1.58.2_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/next/navigation.js"(exports, module) {
2539
- "use strict";
2540
- module.exports = require_navigation();
2541
- }
2542
- });
2543
-
2544
1
  // src/FeedbackLink/FeedbackLink.tsx
2545
2
  import { Icon as Icon2 } from "@equinor/eds-core-react";
2546
3
  import { email } from "@equinor/eds-icons";
@@ -2644,180 +101,172 @@ function FeedbackLink({ link, subject, body }) {
2644
101
  );
2645
102
  }
2646
103
 
2647
- // src/SideMenu/components/MenuHeader.tsx
2648
- import { tokens as tokens2 } from "@equinor/eds-tokens";
2649
- import { styled as styled2 } from "styled-components";
2650
- import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
2651
- function MenuHeader({ appName, icon }) {
2652
- return /* @__PURE__ */ jsx3(LogoWrapper, { children: /* @__PURE__ */ jsxs3(LogoStyle, { children: [
2653
- icon,
2654
- /* @__PURE__ */ jsx3("span", { children: appName })
2655
- ] }) });
2656
- }
2657
- var LogoWrapper = styled2.div`
2658
- padding: 0 ${tokens2.spacings.comfortable.medium} ${tokens2.spacings.comfortable.small}
2659
- ${tokens2.spacings.comfortable.medium};
2660
- text-align: center;
2661
- font-weight: 500;
2662
- `;
2663
- var LogoStyle = styled2.div`
2664
- align-items: center;
2665
- display: flex;
2666
- flex-direction: column;
2667
- gap: ${tokens2.spacings.comfortable.small};
2668
- justify-content: center;
2669
- text-align: center;
2670
- `;
2671
-
2672
104
  // src/SideMenu/SideMenu.tsx
2673
- import { Button as Button2, Divider, Icon as Icon4, Typography as Typography2 } from "@equinor/eds-core-react";
105
+ import { Button as Button2, Icon as Icon4 } from "@equinor/eds-core-react";
2674
106
  import { collapse } from "@equinor/eds-icons";
2675
- import { tokens as tokens5 } from "@equinor/eds-tokens";
2676
- import { useCallback, useEffect, useMemo, useRef, useState } from "react";
2677
- import styled5 from "styled-components";
2678
-
2679
- // src/SideMenu/components/MenuList.tsx
2680
- import { Accordion } from "@equinor/eds-core-react";
2681
- import { tokens as tokens4 } from "@equinor/eds-tokens";
2682
- import { styled as styled4 } from "styled-components";
2683
-
2684
- // src/SideMenu/components/MenuLink.tsx
2685
- import { Icon as Icon3 } from "@equinor/eds-core-react";
2686
- import { external_link as external_link2 } from "@equinor/eds-icons";
2687
- import { tokens as tokens3 } from "@equinor/eds-tokens";
2688
- import { styled as styled3 } from "styled-components";
2689
107
 
2690
- // src/SideMenu/useAppUrlByNameAndEnvironment.ts
2691
- function useAppUrlByNameAndEnvironment(appName, currentEnvironment, appUrls) {
2692
- if (!currentEnvironment || !appName) return "";
2693
- if (currentEnvironment === "local") {
2694
- currentEnvironment = "dev";
108
+ // src/SideMenu/context.ts
109
+ import { createContext, useContext } from "react";
110
+ var SideMenuContext = createContext({
111
+ onOverflowCheck: () => {
2695
112
  }
2696
- const configByEnvironment = appUrls[appName] ?? {};
2697
- const appUrlInCurrentEnvironment = configByEnvironment[currentEnvironment];
2698
- return appUrlInCurrentEnvironment || "";
113
+ });
114
+ function useSideMenuContext() {
115
+ return useContext(SideMenuContext);
2699
116
  }
2700
117
 
2701
- // src/SideMenu/components/MenuLink.tsx
2702
- import { jsx as jsx4, jsxs as jsxs4 } from "react/jsx-runtime";
2703
- var usePathname;
2704
- try {
2705
- usePathname = require_navigation2().usePathname;
2706
- } catch {
2707
- }
2708
- function MenuLink({
2709
- item,
2710
- environment,
2711
- appUrls,
2712
- linkComponent: LinkComponent
2713
- }) {
2714
- const urlByNameAndEnvironment = useAppUrlByNameAndEnvironment(item.appName, environment, appUrls) ?? "";
2715
- const url = item?.url ?? urlByNameAndEnvironment;
2716
- const nextPathName = usePathname?.();
2717
- let isActive = !item.external && nextPathName == item.url;
2718
- const linkContent = /* @__PURE__ */ jsxs4("span", { children: [
2719
- item.name,
2720
- item.external && /* @__PURE__ */ jsx4(Icon3, { data: external_link2, size: 16 })
2721
- ] });
2722
- if (item.external) {
2723
- return /* @__PURE__ */ jsx4(StyledLink2, { href: url, target: "_blank", rel: "noopener noreferrer", children: linkContent });
2724
- }
2725
- if (LinkComponent) {
2726
- return /* @__PURE__ */ jsx4(
2727
- StyledLink2,
2728
- {
2729
- as: LinkComponent,
2730
- to: url,
2731
- href: url,
2732
- $active: isActive,
2733
- children: linkContent
2734
- }
2735
- );
2736
- }
2737
- isActive = typeof window !== "undefined" ? window.location.pathname === item.url : false;
2738
- return /* @__PURE__ */ jsx4(StyledLink2, { href: url, $active: isActive, children: linkContent });
2739
- }
2740
- var StyledLink2 = styled3.a`
2741
- text-decoration: none;
2742
- padding: 12px 16px 12px 19px;
2743
- display: inline-block;
2744
- width: 100%;
2745
- color: ${tokens3.colors.interactive.secondary__resting.rgba};
2746
- background-color: ${({ $active }) => $active ? tokens3.colors.interactive.primary__selected_highlight.rgba : "transparent"};
2747
- font-weight: ${({ $active }) => $active ? 700 : 400};
2748
- font-size: 0.875rem;
118
+ // src/SideMenu/SideMenu.styles.ts
119
+ import { tokens as tokens2 } from "@equinor/eds-tokens";
120
+ import styled2 from "styled-components";
121
+ var Sidebar = styled2.div`
122
+ width: ${({ $isOpen, $width }) => $isOpen ? $width : "0px"};
123
+ opacity: ${({ $isOpen }) => $isOpen ? 1 : 0};
124
+ transition:
125
+ width 0.5s,
126
+ opacity 0.5s;
127
+ height: 100%;
128
+ overflow: hidden;
129
+ position: relative;
130
+ z-index: 0;
2749
131
 
2750
- &:hover {
2751
- //TODO: check hover color for dark theme with designer when back
2752
- background: var(--cpl-sidebar-hover-color);
132
+ ul {
133
+ list-style-type: none;
134
+ margin: 0;
135
+ padding: 0;
2753
136
  }
2754
137
 
2755
- &:focus-visible {
2756
- outline-offset: -2px;
138
+ *,
139
+ *::before,
140
+ *::after {
141
+ box-sizing: border-box;
2757
142
  }
143
+ `;
144
+ var InnerWrapper = styled2.div`
145
+ overflow: auto;
146
+ background: var(--cpl-ui-background-temporary-nav);
147
+ padding: 0;
148
+ height: 100%;
149
+ width: ${({ $width }) => $width};
150
+ position: fixed;
151
+ display: flex;
152
+ flex-direction: column;
153
+ justify-content: flex-start;
154
+ border-right: 1px solid var(--cpl-sidebar-border-color);
155
+ border-bottom: 1px solid var(--cpl-sidebar-border-color);
156
+ `;
157
+ var StickyCloseButton = styled2.div`
158
+ z-index: 10;
159
+ position: sticky;
160
+ top: 0;
161
+ display: flex;
162
+ justify-content: flex-end;
163
+ padding: ${tokens2.spacings.comfortable.xx_small};
164
+ background-color: var(--cpl-ui-background-temporary-nav);
165
+ border-bottom: ${({ $showBorder }) => $showBorder ? "1px solid var(--cpl-divider-color)" : "0"};
166
+ `;
2758
167
 
2759
- span {
2760
- align-items: center;
2761
- display: flex;
2762
- gap: 1rem;
2763
- justify-content: space-between;
2764
- font-size: 0.875rem;
2765
- }
168
+ // src/SideMenu/useSideMenuScroll.ts
169
+ import { useCallback, useEffect, useRef, useState } from "react";
170
+ function useSideMenuScroll({
171
+ isOpen,
172
+ scrollToActiveGroup
173
+ }) {
174
+ const containerRef = useRef(null);
175
+ const stickyRef = useRef(null);
176
+ const [hasOverflow, setHasOverflow] = useState(false);
177
+ const [scrolledDown, setScrolledDown] = useState(false);
178
+ const checkOverflow = useCallback(() => {
179
+ requestAnimationFrame(() => {
180
+ const el = containerRef.current;
181
+ if (el) setHasOverflow(el.scrollHeight > el.clientHeight);
182
+ });
183
+ }, []);
184
+ const handleScroll = useCallback(() => {
185
+ const el = containerRef.current;
186
+ if (el) setScrolledDown(el.scrollTop > 0);
187
+ }, []);
188
+ useEffect(() => {
189
+ checkOverflow();
190
+ window.addEventListener("resize", checkOverflow);
191
+ return () => window.removeEventListener("resize", checkOverflow);
192
+ }, [checkOverflow]);
193
+ useEffect(() => {
194
+ const el = containerRef.current;
195
+ if (!el) return;
196
+ el.addEventListener("scroll", handleScroll);
197
+ handleScroll();
198
+ return () => el.removeEventListener("scroll", handleScroll);
199
+ }, [handleScroll]);
200
+ useEffect(() => {
201
+ if (!isOpen || !scrollToActiveGroup) return;
202
+ requestAnimationFrame(() => {
203
+ const el = containerRef.current;
204
+ if (!el) return;
205
+ const activeGroup = el.querySelector('[data-active-catalogue="true"]');
206
+ if (!activeGroup) return;
207
+ const stickyHeight = stickyRef.current?.offsetHeight ?? 0;
208
+ el.scrollTo({ top: activeGroup.offsetTop - stickyHeight, behavior: "smooth" });
209
+ });
210
+ }, [isOpen, scrollToActiveGroup]);
211
+ return { containerRef, stickyRef, hasOverflow, scrolledDown, checkOverflow };
212
+ }
2766
213
 
2767
- span svg {
2768
- opacity: 60%;
2769
- }
214
+ // src/SideMenu/components/SideMenuDivider.tsx
215
+ import { Divider } from "@equinor/eds-core-react";
216
+ import styled3 from "styled-components";
217
+ import { jsx as jsx3 } from "react/jsx-runtime";
218
+ function SideMenuDivider() {
219
+ return /* @__PURE__ */ jsx3(StyledDivider, {});
220
+ }
221
+ var StyledDivider = styled3(Divider)`
222
+ background-color: var(--cpl-divider-color);
223
+ margin-top: 0px;
224
+ margin-bottom: 0px;
225
+ min-height: 1px;
2770
226
  `;
2771
227
 
2772
- // src/SideMenu/components/MenuList.tsx
2773
- import { jsx as jsx5, jsxs as jsxs5 } from "react/jsx-runtime";
2774
- function MenuList({
2775
- items,
2776
- currentEnvironment,
2777
- appUrls,
2778
- onToggleMenuGroup,
2779
- linkComponent
2780
- }) {
2781
- return /* @__PURE__ */ jsx5("ul", { children: items.map((menuItem) => {
2782
- if (isMenuItemGroup(menuItem)) {
2783
- return /* @__PURE__ */ jsx5("li", { "data-active-catalogue": String(menuItem.isExpanded), children: /* @__PURE__ */ jsx5(Accordion, { children: /* @__PURE__ */ jsxs5(AccordionItem, { isExpanded: menuItem.isExpanded, children: [
2784
- /* @__PURE__ */ jsx5(Accordion.Header, { onToggle: onToggleMenuGroup, children: menuItem.title }),
2785
- /* @__PURE__ */ jsx5(Accordion.Panel, { "aria-label": `Links for ${menuItem.title}`, children: /* @__PURE__ */ jsx5("ul", { children: menuItem.items.map((item) => /* @__PURE__ */ jsx5("li", { children: /* @__PURE__ */ jsx5(
2786
- MenuLink,
2787
- {
2788
- item,
2789
- environment: currentEnvironment,
2790
- appUrls,
2791
- linkComponent
2792
- }
2793
- ) }, menuItem.title + "-" + item.name)) }) })
2794
- ] }, menuItem.title) }, menuItem.title) }, menuItem.title);
2795
- } else {
2796
- return /* @__PURE__ */ jsx5("li", { children: /* @__PURE__ */ jsx5(
2797
- MenuLink,
2798
- {
2799
- item: menuItem,
2800
- environment: currentEnvironment,
2801
- appUrls,
2802
- linkComponent
2803
- }
2804
- ) }, menuItem.name);
2805
- }
2806
- }) });
228
+ // src/SideMenu/components/SideMenuFooter.tsx
229
+ import styled4 from "styled-components";
230
+ import { jsx as jsx4 } from "react/jsx-runtime";
231
+ function SideMenuFooter({ children }) {
232
+ return /* @__PURE__ */ jsx4(Footer, { children });
2807
233
  }
2808
- function isMenuItemGroup(item) {
2809
- return typeof item === "object" && "title" in item && "items" in item;
234
+ var Footer = styled4.div`
235
+ margin-top: auto;
236
+ padding: 8px 0;
237
+ `;
238
+
239
+ // src/SideMenu/components/SideMenuGroup.tsx
240
+ import { Accordion } from "@equinor/eds-core-react";
241
+ import { tokens as tokens3 } from "@equinor/eds-tokens";
242
+ import { useEffect as useEffect2, useState as useState2 } from "react";
243
+ import styled5 from "styled-components";
244
+ import { jsx as jsx5, jsxs as jsxs3 } from "react/jsx-runtime";
245
+ function SideMenuGroup({ title, children, defaultExpanded = false, active = false }) {
246
+ const { onOverflowCheck } = useSideMenuContext();
247
+ const [isExpanded, setIsExpanded] = useState2(defaultExpanded);
248
+ useEffect2(() => {
249
+ setIsExpanded(defaultExpanded);
250
+ }, [defaultExpanded]);
251
+ function handleToggle() {
252
+ setIsExpanded((prev) => !prev);
253
+ onOverflowCheck();
254
+ }
255
+ return /* @__PURE__ */ jsx5("li", { "data-active-catalogue": active ? "true" : void 0, children: /* @__PURE__ */ jsx5(Accordion, { children: /* @__PURE__ */ jsxs3(StyledAccordionItem, { isExpanded, children: [
256
+ /* @__PURE__ */ jsx5(Accordion.Header, { onToggle: handleToggle, children: title }),
257
+ /* @__PURE__ */ jsx5(Accordion.Panel, { "aria-label": `Links for ${title}`, children: /* @__PURE__ */ jsx5("ul", { children }) })
258
+ ] }) }) });
2810
259
  }
2811
- var AccordionItem = styled4(Accordion.Item)`
260
+ var StyledAccordionItem = styled5(Accordion.Item)`
2812
261
  a {
2813
262
  display: block;
2814
- padding: 12px ${tokens4.spacings.comfortable.medium} 12px ${tokens4.spacings.comfortable.x_large};
263
+ padding: 12px ${tokens3.spacings.comfortable.medium} 12px ${tokens3.spacings.comfortable.x_large};
2815
264
  }
2816
265
 
2817
266
  h2 {
2818
267
  background: transparent;
2819
268
  border: 0;
2820
- color: ${tokens4.colors.interactive.secondary__resting.rgba};
269
+ color: var(--cpl-text-color, ${tokens3.colors.interactive.secondary__resting.rgba});
2821
270
  }
2822
271
 
2823
272
  h2 + div {
@@ -2830,13 +279,13 @@ var AccordionItem = styled4(Accordion.Item)`
2830
279
  h2 button svg {
2831
280
  width: 14px;
2832
281
  height: 14px;
2833
- margin-right: ${tokens4.spacings.comfortable.x_small};
282
+ margin-right: ${tokens3.spacings.comfortable.x_small};
2834
283
  transform: rotate(-90deg);
2835
- fill: ${tokens4.colors.interactive.secondary__resting.rgba};
284
+ fill: var(--cpl-text-color, ${tokens3.colors.interactive.secondary__resting.rgba});
2836
285
  }
2837
286
 
2838
287
  h2 button span {
2839
- color: ${tokens4.colors.interactive.secondary__resting.rgba};
288
+ color: var(--cpl-text-color, ${tokens3.colors.interactive.secondary__resting.rgba});
2840
289
  font-weight: 700;
2841
290
  font-size: 0.875rem;
2842
291
  }
@@ -2855,196 +304,185 @@ var AccordionItem = styled4(Accordion.Item)`
2855
304
  }
2856
305
  `;
2857
306
 
2858
- // src/SideMenu/SideMenu.tsx
2859
- import { Fragment, jsx as jsx6, jsxs as jsxs6 } from "react/jsx-runtime";
2860
- function SideMenu({
2861
- isOpen,
2862
- onToggle,
2863
- mainMenuItems,
2864
- logoElement,
2865
- versionInfo,
2866
- currentEnvironment,
2867
- titleOtherMenuItems,
2868
- otherMenuItems,
2869
- appUrls,
2870
- linkComponent
2871
- }) {
2872
- const width = "268px";
2873
- const [hasOverflow, setHasOverflow] = useState(false);
2874
- const [scrolledDown, setScrolledDown] = useState(false);
2875
- const containerRef = useRef(null);
2876
- const mainMenuItemsWithActiveCatalogue = useMemo(() => {
2877
- const pathname = typeof window !== "undefined" ? window.location.pathname : void 0;
2878
- if (!pathname) {
2879
- return;
2880
- }
2881
- return mainMenuItems.map((menuItem) => {
2882
- if ("items" in menuItem) {
2883
- return {
2884
- ...menuItem,
2885
- isExpanded: menuItem.items.some((item) => pathname === item.url)
2886
- };
2887
- }
2888
- return menuItem;
2889
- });
2890
- }, [mainMenuItems]);
2891
- useEffect(() => {
2892
- const container = containerRef.current;
2893
- if (!container) {
2894
- return;
2895
- }
2896
- const activeCatalogueElement = container.querySelector(
2897
- '[data-active-catalogue="true"]'
2898
- );
2899
- if (activeCatalogueElement) {
2900
- activeCatalogueElement.scrollIntoView({ behavior: "smooth", block: "start" });
2901
- }
2902
- }, [mainMenuItemsWithActiveCatalogue]);
2903
- const checkOverflow = useCallback(() => {
2904
- requestAnimationFrame(() => {
2905
- const element = containerRef.current;
2906
- if (element) {
2907
- setHasOverflow(element.scrollHeight > element.clientHeight);
2908
- }
2909
- });
2910
- }, []);
2911
- const handleScroll = useCallback(() => {
2912
- const element = containerRef.current;
2913
- if (element) {
2914
- setScrolledDown(element.scrollTop > 0);
2915
- }
2916
- }, []);
2917
- useEffect(() => {
2918
- checkOverflow();
2919
- window.addEventListener("resize", checkOverflow);
2920
- return () => window.removeEventListener("resize", checkOverflow);
2921
- }, [checkOverflow]);
2922
- useEffect(() => {
2923
- const element = containerRef.current;
2924
- if (element) {
2925
- element.addEventListener("scroll", handleScroll);
2926
- handleScroll();
2927
- return () => element.removeEventListener("scroll", handleScroll);
2928
- }
2929
- }, [handleScroll]);
2930
- return /* @__PURE__ */ jsx6(Sidebar, { $isOpen: isOpen, $width: isOpen ? width : "", children: /* @__PURE__ */ jsxs6(InnerWrapper, { ref: containerRef, $width: width, children: [
2931
- /* @__PURE__ */ jsxs6("div", { children: [
2932
- /* @__PURE__ */ jsx6(StickyCloseButton, { $showBorder: hasOverflow && scrolledDown, children: /* @__PURE__ */ jsx6(
2933
- Button2,
2934
- {
2935
- variant: "ghost_icon",
2936
- color: "secondary",
2937
- "aria-label": "Toggle side menu",
2938
- onClick: () => onToggle(!isOpen),
2939
- children: /* @__PURE__ */ jsx6(Icon4, { data: collapse, size: 24 })
2940
- }
2941
- ) }),
2942
- logoElement,
2943
- /* @__PURE__ */ jsxs6("nav", { children: [
2944
- /* @__PURE__ */ jsx6(
2945
- MenuList,
2946
- {
2947
- items: mainMenuItemsWithActiveCatalogue ?? [],
2948
- currentEnvironment,
2949
- appUrls,
2950
- onToggleMenuGroup: checkOverflow,
2951
- linkComponent
2952
- }
2953
- ),
2954
- otherMenuItems && otherMenuItems.length > 0 && /* @__PURE__ */ jsxs6(Fragment, { children: [
2955
- /* @__PURE__ */ jsx6(StyledDivider, {}),
2956
- /* @__PURE__ */ jsxs6("div", { children: [
2957
- /* @__PURE__ */ jsx6(
2958
- Typography2,
2959
- {
2960
- variant: "label",
2961
- group: "navigation",
2962
- as: "h2",
2963
- style: {
2964
- color: tokens5.colors.interactive.secondary__resting.rgba,
2965
- padding: "12px 19px 4px 19px"
2966
- },
2967
- children: titleOtherMenuItems?.toUpperCase() ?? "OTHER SOLUTIONS"
2968
- }
2969
- ),
2970
- /* @__PURE__ */ jsx6(
2971
- MenuList,
2972
- {
2973
- items: otherMenuItems,
2974
- currentEnvironment,
2975
- appUrls,
2976
- onToggleMenuGroup: checkOverflow
2977
- }
2978
- )
2979
- ] })
2980
- ] })
2981
- ] }),
2982
- /* @__PURE__ */ jsx6(StyledDivider, {})
2983
- ] }),
2984
- versionInfo
307
+ // src/SideMenu/components/SideMenuHeader.tsx
308
+ import { tokens as tokens4 } from "@equinor/eds-tokens";
309
+ import { styled as styled6 } from "styled-components";
310
+ import { jsx as jsx6, jsxs as jsxs4 } from "react/jsx-runtime";
311
+ function SideMenuHeader({ title, icon }) {
312
+ return /* @__PURE__ */ jsx6(Wrapper, { children: /* @__PURE__ */ jsxs4(Inner, { children: [
313
+ icon,
314
+ /* @__PURE__ */ jsx6("span", { children: title })
2985
315
  ] }) });
2986
316
  }
2987
- var StyledDivider = styled5(Divider)`
2988
- background-color: var(--cpl-divider-color);
2989
- margin: 8px 0;
317
+ var Wrapper = styled6.div`
318
+ padding: 0 ${tokens4.spacings.comfortable.medium} ${tokens4.spacings.comfortable.small}
319
+ ${tokens4.spacings.comfortable.medium};
320
+ text-align: center;
321
+ font-weight: 500;
322
+ `;
323
+ var Inner = styled6.div`
324
+ align-items: center;
325
+ display: flex;
326
+ flex-direction: column;
327
+ gap: ${tokens4.spacings.comfortable.small};
328
+ justify-content: center;
329
+ text-align: center;
2990
330
  `;
2991
- var Sidebar = styled5.div`
2992
- width: ${(props) => props.$isOpen ? props.$width : "0px"};
2993
- opacity: ${(props) => props.$isOpen ? 1 : 0};
2994
- transition:
2995
- width 0.5s,
2996
- opacity 0.5s;
2997
- height: 100%;
2998
- overflow: hidden;
2999
- position: relative;
3000
- z-index: 0;
3001
331
 
3002
- ul {
3003
- list-style-type: none;
3004
- margin: 0;
3005
- padding: 0;
332
+ // src/SideMenu/components/SideMenuItem.tsx
333
+ import { Icon as Icon3 } from "@equinor/eds-core-react";
334
+ import { external_link as external_link2 } from "@equinor/eds-icons";
335
+ import { tokens as tokens5 } from "@equinor/eds-tokens";
336
+ import styled7 from "styled-components";
337
+ import { jsx as jsx7, jsxs as jsxs5 } from "react/jsx-runtime";
338
+ function SideMenuItem({
339
+ children,
340
+ href = "",
341
+ external = false,
342
+ active,
343
+ as
344
+ }) {
345
+ const { linkComponent } = useSideMenuContext();
346
+ const LinkComponent = as ?? linkComponent;
347
+ const isActive = external ? false : active ?? false;
348
+ const linkContent = /* @__PURE__ */ jsxs5("span", { children: [
349
+ children,
350
+ external && /* @__PURE__ */ jsx7(Icon3, { data: external_link2, size: 16 })
351
+ ] });
352
+ if (external) {
353
+ return /* @__PURE__ */ jsx7("li", { children: /* @__PURE__ */ jsx7(StyledLink2, { href, target: "_blank", rel: "noopener noreferrer", children: linkContent }) });
354
+ }
355
+ if (LinkComponent) {
356
+ return /* @__PURE__ */ jsx7("li", { children: /* @__PURE__ */ jsx7(
357
+ StyledLink2,
358
+ {
359
+ as: LinkComponent,
360
+ to: href,
361
+ href,
362
+ $active: isActive,
363
+ children: linkContent
364
+ }
365
+ ) });
3006
366
  }
367
+ return /* @__PURE__ */ jsx7("li", { children: /* @__PURE__ */ jsx7(StyledLink2, { href, $active: isActive, children: linkContent }) });
368
+ }
369
+ var StyledLink2 = styled7.a`
370
+ text-decoration: none;
371
+ padding: 12px 16px 12px 19px;
372
+ display: inline-block;
373
+ width: 100%;
374
+ color: var(--cpl-text-color, ${tokens5.colors.interactive.secondary__resting.rgba});
375
+ background-color: ${({ $active }) => $active ? tokens5.colors.interactive.primary__selected_highlight.rgba : "transparent"};
376
+ font-weight: ${({ $active }) => $active ? 700 : 400};
377
+ font-size: 0.875rem;
3007
378
 
3008
- *,
3009
- *::before,
3010
- *::after {
3011
- box-sizing: border-box;
379
+ &:hover {
380
+ background: var(--cpl-sidebar-hover-color);
381
+ }
382
+
383
+ &:focus-visible {
384
+ outline-offset: -2px;
385
+ }
386
+
387
+ span {
388
+ align-items: center;
389
+ display: flex;
390
+ gap: 1rem;
391
+ justify-content: space-between;
392
+ font-size: 0.875rem;
393
+ }
394
+
395
+ span svg {
396
+ opacity: 60%;
3012
397
  }
3013
398
  `;
3014
- var InnerWrapper = styled5.div`
3015
- overflow: auto;
3016
- background: var(--cpl-ui-background-temporary-nav);
3017
- padding: 0;
3018
- height: 100%;
3019
- width: ${(props) => props.$width};
3020
- position: fixed;
3021
- display: flex;
3022
- flex-direction: column;
3023
- justify-content: space-between;
3024
- border-right: 1px solid var(--cpl-sidebar-border-color);
3025
- border-bottom: 1px solid var(--cpl-sidebar-border-color);
399
+
400
+ // src/SideMenu/components/SideMenuSection.tsx
401
+ import { tokens as tokens6 } from "@equinor/eds-tokens";
402
+ import styled8 from "styled-components";
403
+ import { jsx as jsx8, jsxs as jsxs6 } from "react/jsx-runtime";
404
+ function SideMenuSection({ children, label, style, className }) {
405
+ return /* @__PURE__ */ jsxs6(SectionWrapper, { style, className, children: [
406
+ label && /* @__PURE__ */ jsx8(SectionLabel, { as: "h2", children: label }),
407
+ /* @__PURE__ */ jsx8("ul", { children })
408
+ ] });
409
+ }
410
+ var SectionWrapper = styled8.nav`
411
+ background: transparent;
412
+ padding: 8px 0;
3026
413
  `;
3027
- var StickyCloseButton = styled5.div`
3028
- z-index: 10;
3029
- position: sticky;
3030
- top: 0;
414
+ var SectionLabel = styled8.p`
415
+ color: var(--cpl-text-color, ${tokens6.colors.interactive.secondary__resting.rgba});
416
+ padding: 12px 19px 4px 19px;
3031
417
  display: flex;
3032
- justify-content: flex-end;
3033
- padding: ${tokens5.spacings.comfortable.xx_small};
3034
- background-color: var(--cpl-ui-background-temporary-nav);
3035
- border-bottom: ${({ $showBorder }) => $showBorder ? "1px solid var(--cpl-divider-color)" : "0"};
418
+ align-items: center;
419
+ gap: 6px;
420
+ font-size: 0.75rem;
421
+ font-weight: 500;
422
+ letter-spacing: 0.1em;
423
+ text-transform: uppercase;
424
+ margin: 0;
3036
425
  `;
3037
426
 
427
+ // src/SideMenu/SideMenu.tsx
428
+ import { jsx as jsx9, jsxs as jsxs7 } from "react/jsx-runtime";
429
+ function SideMenu({
430
+ isOpen,
431
+ onToggle,
432
+ children,
433
+ linkComponent,
434
+ width = "268px",
435
+ scrollToActiveGroup = false
436
+ }) {
437
+ const { containerRef, stickyRef, hasOverflow, scrolledDown, checkOverflow } = useSideMenuScroll({
438
+ isOpen,
439
+ scrollToActiveGroup
440
+ });
441
+ return /* @__PURE__ */ jsx9(SideMenuContext.Provider, { value: { linkComponent, onOverflowCheck: checkOverflow }, children: /* @__PURE__ */ jsx9(Sidebar, { $isOpen: isOpen, $width: isOpen ? width : "", children: /* @__PURE__ */ jsxs7(InnerWrapper, { ref: containerRef, $width: width, children: [
442
+ /* @__PURE__ */ jsx9(StickyCloseButton, { ref: stickyRef, $showBorder: hasOverflow && scrolledDown, children: /* @__PURE__ */ jsx9(
443
+ Button2,
444
+ {
445
+ variant: "ghost_icon",
446
+ color: "secondary",
447
+ "aria-label": "Toggle side menu",
448
+ onClick: () => onToggle(!isOpen),
449
+ children: /* @__PURE__ */ jsx9(Icon4, { data: collapse, size: 24 })
450
+ }
451
+ ) }),
452
+ children
453
+ ] }) }) });
454
+ }
455
+ SideMenu.Header = SideMenuHeader;
456
+ SideMenu.Section = SideMenuSection;
457
+ SideMenu.Group = SideMenuGroup;
458
+ SideMenu.Item = SideMenuItem;
459
+ SideMenu.Divider = SideMenuDivider;
460
+ SideMenu.Footer = SideMenuFooter;
461
+
462
+ // src/SideMenu/renderMenuItems.tsx
463
+ import React from "react";
464
+ import { jsx as jsx10 } from "react/jsx-runtime";
465
+ function renderMenuItems(items, options = {}) {
466
+ const { getUrl = (item) => item.url ?? "", pathname = "" } = options;
467
+ return items.map((group, index) => {
468
+ if (group.title) {
469
+ const isActive = group.items.some((child) => getUrl(child) === pathname);
470
+ return /* @__PURE__ */ jsx10(SideMenuGroup, { title: group.title, defaultExpanded: isActive, active: isActive, children: group.items.map((child) => /* @__PURE__ */ jsx10(SideMenuItem, { href: getUrl(child), external: child.external, active: getUrl(child) === pathname, children: child.name }, child.name)) }, group.title);
471
+ }
472
+ return /* @__PURE__ */ jsx10(React.Fragment, { children: group.items.map((child) => /* @__PURE__ */ jsx10(SideMenuItem, { href: getUrl(child), external: child.external, active: getUrl(child) === pathname, children: child.name }, child.name)) }, index);
473
+ });
474
+ }
475
+
3038
476
  // src/UserMenu/UserMenu.tsx
3039
477
  import { Button as Button3, Icon as Icon5, Menu } from "@equinor/eds-core-react";
3040
478
  import { log_out, settings } from "@equinor/eds-icons";
3041
- import { tokens as tokens6 } from "@equinor/eds-tokens";
3042
- import { useState as useState2 } from "react";
3043
- import styled6 from "styled-components";
3044
- import { Fragment as Fragment2, jsx as jsx7, jsxs as jsxs7 } from "react/jsx-runtime";
479
+ import { tokens as tokens7 } from "@equinor/eds-tokens";
480
+ import { useState as useState3 } from "react";
481
+ import styled9 from "styled-components";
482
+ import { Fragment, jsx as jsx11, jsxs as jsxs8 } from "react/jsx-runtime";
3045
483
  function UserMenu({ user, logout, settingsLink, children }) {
3046
- const [isOpen, setIsOpen] = useState2(false);
3047
- const [anchorEl, setAnchorEl] = useState2(null);
484
+ const [isOpen, setIsOpen] = useState3(false);
485
+ const [anchorEl, setAnchorEl] = useState3(null);
3048
486
  const openMenu = () => {
3049
487
  setIsOpen(true);
3050
488
  };
@@ -3053,20 +491,20 @@ function UserMenu({ user, logout, settingsLink, children }) {
3053
491
  };
3054
492
  const LogOutMenuItem = () => {
3055
493
  if (typeof logout === "string") {
3056
- return /* @__PURE__ */ jsxs7(Menu.Item, { as: "a", href: logout, className: "menu-item", id: "logout-button", children: [
3057
- /* @__PURE__ */ jsx7(Icon5, { data: log_out }),
3058
- /* @__PURE__ */ jsx7("span", { children: "Log out" })
494
+ return /* @__PURE__ */ jsxs8(Menu.Item, { as: "a", href: logout, className: "menu-item", id: "logout-button", children: [
495
+ /* @__PURE__ */ jsx11(Icon5, { data: log_out }),
496
+ /* @__PURE__ */ jsx11("span", { children: "Log out" })
3059
497
  ] });
3060
498
  } else {
3061
- return /* @__PURE__ */ jsxs7(Menu.Item, { as: "button", onClick: logout, className: "menu-item", id: "logout-button", children: [
3062
- /* @__PURE__ */ jsx7(Icon5, { data: log_out }),
3063
- /* @__PURE__ */ jsx7("span", { children: "Log out" })
499
+ return /* @__PURE__ */ jsxs8(Menu.Item, { as: "button", onClick: logout, className: "menu-item", id: "logout-button", children: [
500
+ /* @__PURE__ */ jsx11(Icon5, { data: log_out }),
501
+ /* @__PURE__ */ jsx11("span", { children: "Log out" })
3064
502
  ] });
3065
503
  }
3066
504
  };
3067
505
  const firstLetter = user?.email?.[0]?.toUpperCase() ?? "-";
3068
- return /* @__PURE__ */ jsxs7(Fragment2, { children: [
3069
- /* @__PURE__ */ jsx7(
506
+ return /* @__PURE__ */ jsxs8(Fragment, { children: [
507
+ /* @__PURE__ */ jsx11(
3070
508
  StyledUserButton,
3071
509
  {
3072
510
  id: "user-button",
@@ -3079,7 +517,7 @@ function UserMenu({ user, logout, settingsLink, children }) {
3079
517
  children: firstLetter
3080
518
  }
3081
519
  ),
3082
- /* @__PURE__ */ jsxs7(
520
+ /* @__PURE__ */ jsxs8(
3083
521
  MenuWrapper,
3084
522
  {
3085
523
  id: "user-menu",
@@ -3089,16 +527,16 @@ function UserMenu({ user, logout, settingsLink, children }) {
3089
527
  anchorEl,
3090
528
  style: { padding: 0, paddingBottom: 2 },
3091
529
  children: [
3092
- /* @__PURE__ */ jsxs7(IconAndTextWrapper, { children: [
3093
- /* @__PURE__ */ jsx7(LetterCircle, { children: firstLetter }),
3094
- isOpen && /* @__PURE__ */ jsxs7("div", { children: [
3095
- /* @__PURE__ */ jsx7("div", { style: { fontWeight: "bold", lineHeight: 0.9, marginBottom: 2 }, children: user?.name ?? "-" }),
3096
- /* @__PURE__ */ jsx7("div", { children: user?.email ?? "-" })
530
+ /* @__PURE__ */ jsxs8(IconAndTextWrapper, { children: [
531
+ /* @__PURE__ */ jsx11(LetterCircle, { children: firstLetter }),
532
+ isOpen && /* @__PURE__ */ jsxs8("div", { children: [
533
+ /* @__PURE__ */ jsx11("div", { style: { fontWeight: "bold", lineHeight: 0.9, marginBottom: 2 }, children: user?.name ?? "-" }),
534
+ /* @__PURE__ */ jsx11("div", { children: user?.email ?? "-" })
3097
535
  ] })
3098
536
  ] }),
3099
- settingsLink && /* @__PURE__ */ jsxs7(Menu.Item, { as: "a", href: settingsLink, className: "menu-item", children: [
3100
- /* @__PURE__ */ jsx7(Icon5, { data: settings }),
3101
- /* @__PURE__ */ jsx7("span", { children: "Settings" })
537
+ settingsLink && /* @__PURE__ */ jsxs8(Menu.Item, { as: "a", href: settingsLink, className: "menu-item", children: [
538
+ /* @__PURE__ */ jsx11(Icon5, { data: settings }),
539
+ /* @__PURE__ */ jsx11("span", { children: "Settings" })
3102
540
  ] }),
3103
541
  LogOutMenuItem(),
3104
542
  children
@@ -3107,25 +545,25 @@ function UserMenu({ user, logout, settingsLink, children }) {
3107
545
  )
3108
546
  ] });
3109
547
  }
3110
- var MenuWrapper = styled6(Menu)`
3111
- border-radius: ${tokens6.shape.corners.borderRadius};
3112
- margin-top: ${tokens6.spacings.comfortable.small};
3113
- margin-bottom: -${tokens6.spacings.comfortable.small};
3114
- padding-bottom: ${tokens6.spacings.comfortable.small};
548
+ var MenuWrapper = styled9(Menu)`
549
+ border-radius: ${tokens7.shape.corners.borderRadius};
550
+ margin-top: ${tokens7.spacings.comfortable.small};
551
+ margin-bottom: -${tokens7.spacings.comfortable.small};
552
+ padding-bottom: ${tokens7.spacings.comfortable.small};
3115
553
  padding-left: 0;
3116
554
  padding-right: 0;
3117
- padding-top: ${tokens6.spacings.comfortable.small};
555
+ padding-top: ${tokens7.spacings.comfortable.small};
3118
556
  width: 315px;
3119
557
 
3120
558
  background: var(--cpl-ui-background-temporary-nav, #fff);
3121
- color: ${tokens6.colors.text.static_icons__default.rgba};
559
+ color: ${tokens7.colors.text.static_icons__default.rgba};
3122
560
 
3123
561
  .menu-item {
3124
562
  align-items: center;
3125
563
  display: flex;
3126
- gap: ${tokens6.spacings.comfortable.medium};
564
+ gap: ${tokens7.spacings.comfortable.medium};
3127
565
  opacity: 0.85;
3128
- padding: ${tokens6.spacings.comfortable.small} ${tokens6.spacings.comfortable.large};
566
+ padding: ${tokens7.spacings.comfortable.small} ${tokens7.spacings.comfortable.large};
3129
567
 
3130
568
  svg {
3131
569
  opacity: 0.7;
@@ -3140,7 +578,7 @@ var MenuWrapper = styled6(Menu)`
3140
578
  }
3141
579
  }
3142
580
  `;
3143
- var LetterCircle = styled6.span`
581
+ var LetterCircle = styled9.span`
3144
582
  align-items: center;
3145
583
  border-radius: 1000px;
3146
584
  display: flex;
@@ -3149,16 +587,16 @@ var LetterCircle = styled6.span`
3149
587
  height: 32px;
3150
588
  justify-content: center;
3151
589
  width: 32px;
3152
- background-color: ${tokens6.colors.interactive.primary__resting.rgba};
3153
- color: ${tokens6.colors.text.static_icons__primary_white.rgba};
590
+ background-color: ${tokens7.colors.interactive.primary__resting.rgba};
591
+ color: ${tokens7.colors.text.static_icons__primary_white.rgba};
3154
592
  `;
3155
- var StyledUserButton = styled6(Button3)`
593
+ var StyledUserButton = styled9(Button3)`
3156
594
  margin-left: 12px;
3157
595
  font-weight: bold;
3158
596
  width: 32px;
3159
597
  height: 32px;
3160
598
  `;
3161
- var IconAndTextWrapper = styled6(Menu.Item)`
599
+ var IconAndTextWrapper = styled9(Menu.Item)`
3162
600
  display: flex;
3163
601
  gap: 12px;
3164
602
  padding: 12px 20px;
@@ -3173,10 +611,15 @@ var IconAndTextWrapper = styled6(Menu.Item)`
3173
611
  `;
3174
612
  export {
3175
613
  FeedbackLink,
3176
- MenuHeader,
3177
614
  SideMenu,
615
+ SideMenuDivider,
616
+ SideMenuFooter,
617
+ SideMenuGroup,
618
+ SideMenuHeader,
619
+ SideMenuItem,
620
+ SideMenuSection,
3178
621
  StyledLink,
3179
622
  TopBar,
3180
623
  UserMenu,
3181
- useAppUrlByNameAndEnvironment
624
+ renderMenuItems
3182
625
  };