next-recomponents 2.0.7 → 2.0.8

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.js CHANGED
@@ -5,9 +5,6 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
6
  var __getProtoOf = Object.getPrototypeOf;
7
7
  var __hasOwnProp = Object.prototype.hasOwnProperty;
8
- var __commonJS = (cb, mod) => function __require() {
9
- return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
10
- };
11
8
  var __export = (target, all) => {
12
9
  for (var name in all)
13
10
  __defProp(target, name, { get: all[name], enumerable: true });
@@ -30,3461 +27,6 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
30
27
  ));
31
28
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
32
29
 
33
- // ../../node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs
34
- var require_interop_require_wildcard = __commonJS({
35
- "../../node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs"(exports2) {
36
- "use strict";
37
- function _getRequireWildcardCache(nodeInterop) {
38
- if (typeof WeakMap !== "function") return null;
39
- var cacheBabelInterop = /* @__PURE__ */ new WeakMap();
40
- var cacheNodeInterop = /* @__PURE__ */ new WeakMap();
41
- return (_getRequireWildcardCache = function(nodeInterop2) {
42
- return nodeInterop2 ? cacheNodeInterop : cacheBabelInterop;
43
- })(nodeInterop);
44
- }
45
- function _interop_require_wildcard(obj, nodeInterop) {
46
- if (!nodeInterop && obj && obj.__esModule) return obj;
47
- if (obj === null || typeof obj !== "object" && typeof obj !== "function") return { default: obj };
48
- var cache = _getRequireWildcardCache(nodeInterop);
49
- if (cache && cache.has(obj)) return cache.get(obj);
50
- var newObj = { __proto__: null };
51
- var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
52
- for (var key in obj) {
53
- if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
54
- var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
55
- if (desc && (desc.get || desc.set)) Object.defineProperty(newObj, key, desc);
56
- else newObj[key] = obj[key];
57
- }
58
- }
59
- newObj.default = obj;
60
- if (cache) cache.set(obj, newObj);
61
- return newObj;
62
- }
63
- exports2._ = _interop_require_wildcard;
64
- }
65
- });
66
-
67
- // ../../node_modules/next/dist/shared/lib/router/utils/querystring.js
68
- var require_querystring = __commonJS({
69
- "../../node_modules/next/dist/shared/lib/router/utils/querystring.js"(exports2) {
70
- "use strict";
71
- Object.defineProperty(exports2, "__esModule", {
72
- value: true
73
- });
74
- function _export(target, all) {
75
- for (var name in all) Object.defineProperty(target, name, {
76
- enumerable: true,
77
- get: all[name]
78
- });
79
- }
80
- _export(exports2, {
81
- assign: function() {
82
- return assign;
83
- },
84
- searchParamsToUrlQuery: function() {
85
- return searchParamsToUrlQuery;
86
- },
87
- urlQueryToSearchParams: function() {
88
- return urlQueryToSearchParams;
89
- }
90
- });
91
- function searchParamsToUrlQuery(searchParams) {
92
- const query = {};
93
- for (const [key, value] of searchParams.entries()) {
94
- const existing = query[key];
95
- if (typeof existing === "undefined") {
96
- query[key] = value;
97
- } else if (Array.isArray(existing)) {
98
- existing.push(value);
99
- } else {
100
- query[key] = [
101
- existing,
102
- value
103
- ];
104
- }
105
- }
106
- return query;
107
- }
108
- function stringifyUrlQueryParam(param) {
109
- if (typeof param === "string") {
110
- return param;
111
- }
112
- if (typeof param === "number" && !isNaN(param) || typeof param === "boolean") {
113
- return String(param);
114
- } else {
115
- return "";
116
- }
117
- }
118
- function urlQueryToSearchParams(query) {
119
- const searchParams = new URLSearchParams();
120
- for (const [key, value] of Object.entries(query)) {
121
- if (Array.isArray(value)) {
122
- for (const item of value) {
123
- searchParams.append(key, stringifyUrlQueryParam(item));
124
- }
125
- } else {
126
- searchParams.set(key, stringifyUrlQueryParam(value));
127
- }
128
- }
129
- return searchParams;
130
- }
131
- function assign(target) {
132
- for (var _len = arguments.length, searchParamsList = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
133
- searchParamsList[_key - 1] = arguments[_key];
134
- }
135
- for (const searchParams of searchParamsList) {
136
- for (const key of searchParams.keys()) {
137
- target.delete(key);
138
- }
139
- for (const [key, value] of searchParams.entries()) {
140
- target.append(key, value);
141
- }
142
- }
143
- return target;
144
- }
145
- }
146
- });
147
-
148
- // ../../node_modules/next/dist/shared/lib/router/utils/format-url.js
149
- var require_format_url = __commonJS({
150
- "../../node_modules/next/dist/shared/lib/router/utils/format-url.js"(exports2) {
151
- "use strict";
152
- Object.defineProperty(exports2, "__esModule", {
153
- value: true
154
- });
155
- function _export(target, all) {
156
- for (var name in all) Object.defineProperty(target, name, {
157
- enumerable: true,
158
- get: all[name]
159
- });
160
- }
161
- _export(exports2, {
162
- formatUrl: function() {
163
- return formatUrl;
164
- },
165
- formatWithValidation: function() {
166
- return formatWithValidation;
167
- },
168
- urlObjectKeys: function() {
169
- return urlObjectKeys;
170
- }
171
- });
172
- var _interop_require_wildcard = require_interop_require_wildcard();
173
- var _querystring = /* @__PURE__ */ _interop_require_wildcard._(require_querystring());
174
- var slashedProtocols = /https?|ftp|gopher|file/;
175
- function formatUrl(urlObj) {
176
- let { auth, hostname } = urlObj;
177
- let protocol = urlObj.protocol || "";
178
- let pathname = urlObj.pathname || "";
179
- let hash = urlObj.hash || "";
180
- let query = urlObj.query || "";
181
- let host = false;
182
- auth = auth ? encodeURIComponent(auth).replace(/%3A/i, ":") + "@" : "";
183
- if (urlObj.host) {
184
- host = auth + urlObj.host;
185
- } else if (hostname) {
186
- host = auth + (~hostname.indexOf(":") ? "[" + hostname + "]" : hostname);
187
- if (urlObj.port) {
188
- host += ":" + urlObj.port;
189
- }
190
- }
191
- if (query && typeof query === "object") {
192
- query = String(_querystring.urlQueryToSearchParams(query));
193
- }
194
- let search = urlObj.search || query && "?" + query || "";
195
- if (protocol && !protocol.endsWith(":")) protocol += ":";
196
- if (urlObj.slashes || (!protocol || slashedProtocols.test(protocol)) && host !== false) {
197
- host = "//" + (host || "");
198
- if (pathname && pathname[0] !== "/") pathname = "/" + pathname;
199
- } else if (!host) {
200
- host = "";
201
- }
202
- if (hash && hash[0] !== "#") hash = "#" + hash;
203
- if (search && search[0] !== "?") search = "?" + search;
204
- pathname = pathname.replace(/[?#]/g, encodeURIComponent);
205
- search = search.replace("#", "%23");
206
- return "" + protocol + host + pathname + search + hash;
207
- }
208
- var urlObjectKeys = [
209
- "auth",
210
- "hash",
211
- "host",
212
- "hostname",
213
- "href",
214
- "path",
215
- "pathname",
216
- "port",
217
- "protocol",
218
- "query",
219
- "search",
220
- "slashes"
221
- ];
222
- function formatWithValidation(url) {
223
- if (process.env.NODE_ENV === "development") {
224
- if (url !== null && typeof url === "object") {
225
- Object.keys(url).forEach((key) => {
226
- if (!urlObjectKeys.includes(key)) {
227
- console.warn("Unknown key passed via urlObject into url.format: " + key);
228
- }
229
- });
230
- }
231
- }
232
- return formatUrl(url);
233
- }
234
- }
235
- });
236
-
237
- // ../../node_modules/next/dist/shared/lib/router/utils/omit.js
238
- var require_omit = __commonJS({
239
- "../../node_modules/next/dist/shared/lib/router/utils/omit.js"(exports2) {
240
- "use strict";
241
- Object.defineProperty(exports2, "__esModule", {
242
- value: true
243
- });
244
- Object.defineProperty(exports2, "omit", {
245
- enumerable: true,
246
- get: function() {
247
- return omit;
248
- }
249
- });
250
- function omit(object, keys2) {
251
- const omitted = {};
252
- Object.keys(object).forEach((key) => {
253
- if (!keys2.includes(key)) {
254
- omitted[key] = object[key];
255
- }
256
- });
257
- return omitted;
258
- }
259
- }
260
- });
261
-
262
- // ../../node_modules/next/dist/shared/lib/utils.js
263
- var require_utils = __commonJS({
264
- "../../node_modules/next/dist/shared/lib/utils.js"(exports2) {
265
- "use strict";
266
- Object.defineProperty(exports2, "__esModule", {
267
- value: true
268
- });
269
- function _export(target, all) {
270
- for (var name in all) Object.defineProperty(target, name, {
271
- enumerable: true,
272
- get: all[name]
273
- });
274
- }
275
- _export(exports2, {
276
- DecodeError: function() {
277
- return DecodeError;
278
- },
279
- MiddlewareNotFoundError: function() {
280
- return MiddlewareNotFoundError;
281
- },
282
- MissingStaticPage: function() {
283
- return MissingStaticPage;
284
- },
285
- NormalizeError: function() {
286
- return NormalizeError;
287
- },
288
- PageNotFoundError: function() {
289
- return PageNotFoundError;
290
- },
291
- SP: function() {
292
- return SP;
293
- },
294
- ST: function() {
295
- return ST;
296
- },
297
- WEB_VITALS: function() {
298
- return WEB_VITALS;
299
- },
300
- execOnce: function() {
301
- return execOnce;
302
- },
303
- getDisplayName: function() {
304
- return getDisplayName;
305
- },
306
- getLocationOrigin: function() {
307
- return getLocationOrigin;
308
- },
309
- getURL: function() {
310
- return getURL;
311
- },
312
- isAbsoluteUrl: function() {
313
- return isAbsoluteUrl;
314
- },
315
- isResSent: function() {
316
- return isResSent;
317
- },
318
- loadGetInitialProps: function() {
319
- return loadGetInitialProps;
320
- },
321
- normalizeRepeatedSlashes: function() {
322
- return normalizeRepeatedSlashes;
323
- },
324
- stringifyError: function() {
325
- return stringifyError;
326
- }
327
- });
328
- var WEB_VITALS = [
329
- "CLS",
330
- "FCP",
331
- "FID",
332
- "INP",
333
- "LCP",
334
- "TTFB"
335
- ];
336
- function execOnce(fn) {
337
- let used = false;
338
- let result;
339
- return function() {
340
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
341
- args[_key] = arguments[_key];
342
- }
343
- if (!used) {
344
- used = true;
345
- result = fn(...args);
346
- }
347
- return result;
348
- };
349
- }
350
- var ABSOLUTE_URL_REGEX = /^[a-zA-Z][a-zA-Z\d+\-.]*?:/;
351
- var isAbsoluteUrl = (url) => ABSOLUTE_URL_REGEX.test(url);
352
- function getLocationOrigin() {
353
- const { protocol, hostname, port } = window.location;
354
- return protocol + "//" + hostname + (port ? ":" + port : "");
355
- }
356
- function getURL() {
357
- const { href } = window.location;
358
- const origin = getLocationOrigin();
359
- return href.substring(origin.length);
360
- }
361
- function getDisplayName(Component) {
362
- return typeof Component === "string" ? Component : Component.displayName || Component.name || "Unknown";
363
- }
364
- function isResSent(res) {
365
- return res.finished || res.headersSent;
366
- }
367
- function normalizeRepeatedSlashes(url) {
368
- const urlParts = url.split("?");
369
- const urlNoQuery = urlParts[0];
370
- return urlNoQuery.replace(/\\/g, "/").replace(/\/\/+/g, "/") + (urlParts[1] ? "?" + urlParts.slice(1).join("?") : "");
371
- }
372
- async function loadGetInitialProps(App, ctx) {
373
- if (process.env.NODE_ENV !== "production") {
374
- var _App_prototype;
375
- if ((_App_prototype = App.prototype) == null ? void 0 : _App_prototype.getInitialProps) {
376
- const message = '"' + getDisplayName(App) + '.getInitialProps()" is defined as an instance method - visit https://nextjs.org/docs/messages/get-initial-props-as-an-instance-method for more information.';
377
- throw Object.defineProperty(new Error(message), "__NEXT_ERROR_CODE", {
378
- value: "E394",
379
- enumerable: false,
380
- configurable: true
381
- });
382
- }
383
- }
384
- const res = ctx.res || ctx.ctx && ctx.ctx.res;
385
- if (!App.getInitialProps) {
386
- if (ctx.ctx && ctx.Component) {
387
- return {
388
- pageProps: await loadGetInitialProps(ctx.Component, ctx.ctx)
389
- };
390
- }
391
- return {};
392
- }
393
- const props = await App.getInitialProps(ctx);
394
- if (res && isResSent(res)) {
395
- return props;
396
- }
397
- if (!props) {
398
- const message = '"' + getDisplayName(App) + '.getInitialProps()" should resolve to an object. But found "' + props + '" instead.';
399
- throw Object.defineProperty(new Error(message), "__NEXT_ERROR_CODE", {
400
- value: "E394",
401
- enumerable: false,
402
- configurable: true
403
- });
404
- }
405
- if (process.env.NODE_ENV !== "production") {
406
- if (Object.keys(props).length === 0 && !ctx.ctx) {
407
- console.warn("" + getDisplayName(App) + " returned an empty object from `getInitialProps`. This de-optimizes and prevents automatic static optimization. https://nextjs.org/docs/messages/empty-object-getInitialProps");
408
- }
409
- }
410
- return props;
411
- }
412
- var SP = typeof performance !== "undefined";
413
- var ST = SP && [
414
- "mark",
415
- "measure",
416
- "getEntriesByName"
417
- ].every((method) => typeof performance[method] === "function");
418
- var DecodeError = class extends Error {
419
- };
420
- var NormalizeError = class extends Error {
421
- };
422
- var PageNotFoundError = class extends Error {
423
- constructor(page) {
424
- super();
425
- this.code = "ENOENT";
426
- this.name = "PageNotFoundError";
427
- this.message = "Cannot find module for page: " + page;
428
- }
429
- };
430
- var MissingStaticPage = class extends Error {
431
- constructor(page, message) {
432
- super();
433
- this.message = "Failed to load static file for page: " + page + " " + message;
434
- }
435
- };
436
- var MiddlewareNotFoundError = class extends Error {
437
- constructor() {
438
- super();
439
- this.code = "ENOENT";
440
- this.message = "Cannot find the middleware module";
441
- }
442
- };
443
- function stringifyError(error) {
444
- return JSON.stringify({
445
- message: error.message,
446
- stack: error.stack
447
- });
448
- }
449
- }
450
- });
451
-
452
- // ../../node_modules/next/dist/shared/lib/router/utils/remove-trailing-slash.js
453
- var require_remove_trailing_slash = __commonJS({
454
- "../../node_modules/next/dist/shared/lib/router/utils/remove-trailing-slash.js"(exports2) {
455
- "use strict";
456
- Object.defineProperty(exports2, "__esModule", {
457
- value: true
458
- });
459
- Object.defineProperty(exports2, "removeTrailingSlash", {
460
- enumerable: true,
461
- get: function() {
462
- return removeTrailingSlash;
463
- }
464
- });
465
- function removeTrailingSlash(route) {
466
- return route.replace(/\/$/, "") || "/";
467
- }
468
- }
469
- });
470
-
471
- // ../../node_modules/next/dist/shared/lib/router/utils/parse-path.js
472
- var require_parse_path = __commonJS({
473
- "../../node_modules/next/dist/shared/lib/router/utils/parse-path.js"(exports2) {
474
- "use strict";
475
- Object.defineProperty(exports2, "__esModule", {
476
- value: true
477
- });
478
- Object.defineProperty(exports2, "parsePath", {
479
- enumerable: true,
480
- get: function() {
481
- return parsePath;
482
- }
483
- });
484
- function parsePath(path) {
485
- const hashIndex = path.indexOf("#");
486
- const queryIndex = path.indexOf("?");
487
- const hasQuery = queryIndex > -1 && (hashIndex < 0 || queryIndex < hashIndex);
488
- if (hasQuery || hashIndex > -1) {
489
- return {
490
- pathname: path.substring(0, hasQuery ? queryIndex : hashIndex),
491
- query: hasQuery ? path.substring(queryIndex, hashIndex > -1 ? hashIndex : void 0) : "",
492
- hash: hashIndex > -1 ? path.slice(hashIndex) : ""
493
- };
494
- }
495
- return {
496
- pathname: path,
497
- query: "",
498
- hash: ""
499
- };
500
- }
501
- }
502
- });
503
-
504
- // ../../node_modules/next/dist/client/normalize-trailing-slash.js
505
- var require_normalize_trailing_slash = __commonJS({
506
- "../../node_modules/next/dist/client/normalize-trailing-slash.js"(exports2, module2) {
507
- "use strict";
508
- Object.defineProperty(exports2, "__esModule", {
509
- value: true
510
- });
511
- Object.defineProperty(exports2, "normalizePathTrailingSlash", {
512
- enumerable: true,
513
- get: function() {
514
- return normalizePathTrailingSlash;
515
- }
516
- });
517
- var _removetrailingslash = require_remove_trailing_slash();
518
- var _parsepath = require_parse_path();
519
- var normalizePathTrailingSlash = (path) => {
520
- if (!path.startsWith("/") || process.env.__NEXT_MANUAL_TRAILING_SLASH) {
521
- return path;
522
- }
523
- const { pathname, query, hash } = (0, _parsepath.parsePath)(path);
524
- if (process.env.__NEXT_TRAILING_SLASH) {
525
- if (/\.[^/]+\/?$/.test(pathname)) {
526
- return "" + (0, _removetrailingslash.removeTrailingSlash)(pathname) + query + hash;
527
- } else if (pathname.endsWith("/")) {
528
- return "" + pathname + query + hash;
529
- } else {
530
- return pathname + "/" + query + hash;
531
- }
532
- }
533
- return "" + (0, _removetrailingslash.removeTrailingSlash)(pathname) + query + hash;
534
- };
535
- if ((typeof exports2.default === "function" || typeof exports2.default === "object" && exports2.default !== null) && typeof exports2.default.__esModule === "undefined") {
536
- Object.defineProperty(exports2.default, "__esModule", { value: true });
537
- Object.assign(exports2.default, exports2);
538
- module2.exports = exports2.default;
539
- }
540
- }
541
- });
542
-
543
- // ../../node_modules/next/dist/shared/lib/router/utils/path-has-prefix.js
544
- var require_path_has_prefix = __commonJS({
545
- "../../node_modules/next/dist/shared/lib/router/utils/path-has-prefix.js"(exports2) {
546
- "use strict";
547
- Object.defineProperty(exports2, "__esModule", {
548
- value: true
549
- });
550
- Object.defineProperty(exports2, "pathHasPrefix", {
551
- enumerable: true,
552
- get: function() {
553
- return pathHasPrefix;
554
- }
555
- });
556
- var _parsepath = require_parse_path();
557
- function pathHasPrefix(path, prefix) {
558
- if (typeof path !== "string") {
559
- return false;
560
- }
561
- const { pathname } = (0, _parsepath.parsePath)(path);
562
- return pathname === prefix || pathname.startsWith(prefix + "/");
563
- }
564
- }
565
- });
566
-
567
- // ../../node_modules/next/dist/client/has-base-path.js
568
- var require_has_base_path = __commonJS({
569
- "../../node_modules/next/dist/client/has-base-path.js"(exports2, module2) {
570
- "use strict";
571
- Object.defineProperty(exports2, "__esModule", {
572
- value: true
573
- });
574
- Object.defineProperty(exports2, "hasBasePath", {
575
- enumerable: true,
576
- get: function() {
577
- return hasBasePath;
578
- }
579
- });
580
- var _pathhasprefix = require_path_has_prefix();
581
- var basePath = process.env.__NEXT_ROUTER_BASEPATH || "";
582
- function hasBasePath(path) {
583
- return (0, _pathhasprefix.pathHasPrefix)(path, basePath);
584
- }
585
- if ((typeof exports2.default === "function" || typeof exports2.default === "object" && exports2.default !== null) && typeof exports2.default.__esModule === "undefined") {
586
- Object.defineProperty(exports2.default, "__esModule", { value: true });
587
- Object.assign(exports2.default, exports2);
588
- module2.exports = exports2.default;
589
- }
590
- }
591
- });
592
-
593
- // ../../node_modules/next/dist/shared/lib/router/utils/is-local-url.js
594
- var require_is_local_url = __commonJS({
595
- "../../node_modules/next/dist/shared/lib/router/utils/is-local-url.js"(exports2) {
596
- "use strict";
597
- Object.defineProperty(exports2, "__esModule", {
598
- value: true
599
- });
600
- Object.defineProperty(exports2, "isLocalURL", {
601
- enumerable: true,
602
- get: function() {
603
- return isLocalURL;
604
- }
605
- });
606
- var _utils = require_utils();
607
- var _hasbasepath = require_has_base_path();
608
- function isLocalURL(url) {
609
- if (!(0, _utils.isAbsoluteUrl)(url)) return true;
610
- try {
611
- const locationOrigin = (0, _utils.getLocationOrigin)();
612
- const resolved = new URL(url, locationOrigin);
613
- return resolved.origin === locationOrigin && (0, _hasbasepath.hasBasePath)(resolved.pathname);
614
- } catch (_) {
615
- return false;
616
- }
617
- }
618
- }
619
- });
620
-
621
- // ../../node_modules/next/dist/shared/lib/router/utils/sorted-routes.js
622
- var require_sorted_routes = __commonJS({
623
- "../../node_modules/next/dist/shared/lib/router/utils/sorted-routes.js"(exports2) {
624
- "use strict";
625
- Object.defineProperty(exports2, "__esModule", {
626
- value: true
627
- });
628
- function _export(target, all) {
629
- for (var name in all) Object.defineProperty(target, name, {
630
- enumerable: true,
631
- get: all[name]
632
- });
633
- }
634
- _export(exports2, {
635
- getSortedRouteObjects: function() {
636
- return getSortedRouteObjects;
637
- },
638
- getSortedRoutes: function() {
639
- return getSortedRoutes;
640
- }
641
- });
642
- var UrlNode = class _UrlNode {
643
- insert(urlPath) {
644
- this._insert(urlPath.split("/").filter(Boolean), [], false);
645
- }
646
- smoosh() {
647
- return this._smoosh();
648
- }
649
- _smoosh(prefix) {
650
- if (prefix === void 0) prefix = "/";
651
- const childrenPaths = [
652
- ...this.children.keys()
653
- ].sort();
654
- if (this.slugName !== null) {
655
- childrenPaths.splice(childrenPaths.indexOf("[]"), 1);
656
- }
657
- if (this.restSlugName !== null) {
658
- childrenPaths.splice(childrenPaths.indexOf("[...]"), 1);
659
- }
660
- if (this.optionalRestSlugName !== null) {
661
- childrenPaths.splice(childrenPaths.indexOf("[[...]]"), 1);
662
- }
663
- const routes = childrenPaths.map((c) => this.children.get(c)._smoosh("" + prefix + c + "/")).reduce((prev, curr) => [
664
- ...prev,
665
- ...curr
666
- ], []);
667
- if (this.slugName !== null) {
668
- routes.push(...this.children.get("[]")._smoosh(prefix + "[" + this.slugName + "]/"));
669
- }
670
- if (!this.placeholder) {
671
- const r = prefix === "/" ? "/" : prefix.slice(0, -1);
672
- if (this.optionalRestSlugName != null) {
673
- throw Object.defineProperty(new Error('You cannot define a route with the same specificity as a optional catch-all route ("' + r + '" and "' + r + "[[..." + this.optionalRestSlugName + ']]").'), "__NEXT_ERROR_CODE", {
674
- value: "E458",
675
- enumerable: false,
676
- configurable: true
677
- });
678
- }
679
- routes.unshift(r);
680
- }
681
- if (this.restSlugName !== null) {
682
- routes.push(...this.children.get("[...]")._smoosh(prefix + "[..." + this.restSlugName + "]/"));
683
- }
684
- if (this.optionalRestSlugName !== null) {
685
- routes.push(...this.children.get("[[...]]")._smoosh(prefix + "[[..." + this.optionalRestSlugName + "]]/"));
686
- }
687
- return routes;
688
- }
689
- _insert(urlPaths, slugNames, isCatchAll) {
690
- if (urlPaths.length === 0) {
691
- this.placeholder = false;
692
- return;
693
- }
694
- if (isCatchAll) {
695
- throw Object.defineProperty(new Error("Catch-all must be the last part of the URL."), "__NEXT_ERROR_CODE", {
696
- value: "E392",
697
- enumerable: false,
698
- configurable: true
699
- });
700
- }
701
- let nextSegment = urlPaths[0];
702
- if (nextSegment.startsWith("[") && nextSegment.endsWith("]")) {
703
- let handleSlug = function(previousSlug, nextSlug) {
704
- if (previousSlug !== null) {
705
- if (previousSlug !== nextSlug) {
706
- throw Object.defineProperty(new Error("You cannot use different slug names for the same dynamic path ('" + previousSlug + "' !== '" + nextSlug + "')."), "__NEXT_ERROR_CODE", {
707
- value: "E337",
708
- enumerable: false,
709
- configurable: true
710
- });
711
- }
712
- }
713
- slugNames.forEach((slug) => {
714
- if (slug === nextSlug) {
715
- throw Object.defineProperty(new Error('You cannot have the same slug name "' + nextSlug + '" repeat within a single dynamic path'), "__NEXT_ERROR_CODE", {
716
- value: "E247",
717
- enumerable: false,
718
- configurable: true
719
- });
720
- }
721
- if (slug.replace(/\W/g, "") === nextSegment.replace(/\W/g, "")) {
722
- throw Object.defineProperty(new Error('You cannot have the slug names "' + slug + '" and "' + nextSlug + '" differ only by non-word symbols within a single dynamic path'), "__NEXT_ERROR_CODE", {
723
- value: "E499",
724
- enumerable: false,
725
- configurable: true
726
- });
727
- }
728
- });
729
- slugNames.push(nextSlug);
730
- };
731
- let segmentName = nextSegment.slice(1, -1);
732
- let isOptional = false;
733
- if (segmentName.startsWith("[") && segmentName.endsWith("]")) {
734
- segmentName = segmentName.slice(1, -1);
735
- isOptional = true;
736
- }
737
- if (segmentName.startsWith("\u2026")) {
738
- throw Object.defineProperty(new Error("Detected a three-dot character ('\u2026') at ('" + segmentName + "'). Did you mean ('...')?"), "__NEXT_ERROR_CODE", {
739
- value: "E147",
740
- enumerable: false,
741
- configurable: true
742
- });
743
- }
744
- if (segmentName.startsWith("...")) {
745
- segmentName = segmentName.substring(3);
746
- isCatchAll = true;
747
- }
748
- if (segmentName.startsWith("[") || segmentName.endsWith("]")) {
749
- throw Object.defineProperty(new Error("Segment names may not start or end with extra brackets ('" + segmentName + "')."), "__NEXT_ERROR_CODE", {
750
- value: "E421",
751
- enumerable: false,
752
- configurable: true
753
- });
754
- }
755
- if (segmentName.startsWith(".")) {
756
- throw Object.defineProperty(new Error("Segment names may not start with erroneous periods ('" + segmentName + "')."), "__NEXT_ERROR_CODE", {
757
- value: "E288",
758
- enumerable: false,
759
- configurable: true
760
- });
761
- }
762
- if (isCatchAll) {
763
- if (isOptional) {
764
- if (this.restSlugName != null) {
765
- throw Object.defineProperty(new Error('You cannot use both an required and optional catch-all route at the same level ("[...' + this.restSlugName + ']" and "' + urlPaths[0] + '" ).'), "__NEXT_ERROR_CODE", {
766
- value: "E299",
767
- enumerable: false,
768
- configurable: true
769
- });
770
- }
771
- handleSlug(this.optionalRestSlugName, segmentName);
772
- this.optionalRestSlugName = segmentName;
773
- nextSegment = "[[...]]";
774
- } else {
775
- if (this.optionalRestSlugName != null) {
776
- throw Object.defineProperty(new Error('You cannot use both an optional and required catch-all route at the same level ("[[...' + this.optionalRestSlugName + ']]" and "' + urlPaths[0] + '").'), "__NEXT_ERROR_CODE", {
777
- value: "E300",
778
- enumerable: false,
779
- configurable: true
780
- });
781
- }
782
- handleSlug(this.restSlugName, segmentName);
783
- this.restSlugName = segmentName;
784
- nextSegment = "[...]";
785
- }
786
- } else {
787
- if (isOptional) {
788
- throw Object.defineProperty(new Error('Optional route parameters are not yet supported ("' + urlPaths[0] + '").'), "__NEXT_ERROR_CODE", {
789
- value: "E435",
790
- enumerable: false,
791
- configurable: true
792
- });
793
- }
794
- handleSlug(this.slugName, segmentName);
795
- this.slugName = segmentName;
796
- nextSegment = "[]";
797
- }
798
- }
799
- if (!this.children.has(nextSegment)) {
800
- this.children.set(nextSegment, new _UrlNode());
801
- }
802
- this.children.get(nextSegment)._insert(urlPaths.slice(1), slugNames, isCatchAll);
803
- }
804
- constructor() {
805
- this.placeholder = true;
806
- this.children = /* @__PURE__ */ new Map();
807
- this.slugName = null;
808
- this.restSlugName = null;
809
- this.optionalRestSlugName = null;
810
- }
811
- };
812
- function getSortedRoutes(normalizedPages) {
813
- const root = new UrlNode();
814
- normalizedPages.forEach((pagePath) => root.insert(pagePath));
815
- return root.smoosh();
816
- }
817
- function getSortedRouteObjects(objects, getter) {
818
- const indexes = {};
819
- const pathnames = [];
820
- for (let i = 0; i < objects.length; i++) {
821
- const pathname = getter(objects[i]);
822
- indexes[pathname] = i;
823
- pathnames[i] = pathname;
824
- }
825
- const sorted = getSortedRoutes(pathnames);
826
- return sorted.map((pathname) => objects[indexes[pathname]]);
827
- }
828
- }
829
- });
830
-
831
- // ../../node_modules/next/dist/shared/lib/page-path/ensure-leading-slash.js
832
- var require_ensure_leading_slash = __commonJS({
833
- "../../node_modules/next/dist/shared/lib/page-path/ensure-leading-slash.js"(exports2) {
834
- "use strict";
835
- Object.defineProperty(exports2, "__esModule", {
836
- value: true
837
- });
838
- Object.defineProperty(exports2, "ensureLeadingSlash", {
839
- enumerable: true,
840
- get: function() {
841
- return ensureLeadingSlash;
842
- }
843
- });
844
- function ensureLeadingSlash(path) {
845
- return path.startsWith("/") ? path : "/" + path;
846
- }
847
- }
848
- });
849
-
850
- // ../../node_modules/next/dist/shared/lib/segment.js
851
- var require_segment = __commonJS({
852
- "../../node_modules/next/dist/shared/lib/segment.js"(exports2) {
853
- "use strict";
854
- Object.defineProperty(exports2, "__esModule", {
855
- value: true
856
- });
857
- function _export(target, all) {
858
- for (var name in all) Object.defineProperty(target, name, {
859
- enumerable: true,
860
- get: all[name]
861
- });
862
- }
863
- _export(exports2, {
864
- DEFAULT_SEGMENT_KEY: function() {
865
- return DEFAULT_SEGMENT_KEY;
866
- },
867
- PAGE_SEGMENT_KEY: function() {
868
- return PAGE_SEGMENT_KEY;
869
- },
870
- addSearchParamsIfPageSegment: function() {
871
- return addSearchParamsIfPageSegment;
872
- },
873
- isGroupSegment: function() {
874
- return isGroupSegment;
875
- },
876
- isParallelRouteSegment: function() {
877
- return isParallelRouteSegment;
878
- }
879
- });
880
- function isGroupSegment(segment) {
881
- return segment[0] === "(" && segment.endsWith(")");
882
- }
883
- function isParallelRouteSegment(segment) {
884
- return segment.startsWith("@") && segment !== "@children";
885
- }
886
- function addSearchParamsIfPageSegment(segment, searchParams) {
887
- const isPageSegment = segment.includes(PAGE_SEGMENT_KEY);
888
- if (isPageSegment) {
889
- const stringifiedQuery = JSON.stringify(searchParams);
890
- return stringifiedQuery !== "{}" ? PAGE_SEGMENT_KEY + "?" + stringifiedQuery : PAGE_SEGMENT_KEY;
891
- }
892
- return segment;
893
- }
894
- var PAGE_SEGMENT_KEY = "__PAGE__";
895
- var DEFAULT_SEGMENT_KEY = "__DEFAULT__";
896
- }
897
- });
898
-
899
- // ../../node_modules/next/dist/shared/lib/router/utils/app-paths.js
900
- var require_app_paths = __commonJS({
901
- "../../node_modules/next/dist/shared/lib/router/utils/app-paths.js"(exports2) {
902
- "use strict";
903
- Object.defineProperty(exports2, "__esModule", {
904
- value: true
905
- });
906
- function _export(target, all) {
907
- for (var name in all) Object.defineProperty(target, name, {
908
- enumerable: true,
909
- get: all[name]
910
- });
911
- }
912
- _export(exports2, {
913
- normalizeAppPath: function() {
914
- return normalizeAppPath;
915
- },
916
- normalizeRscURL: function() {
917
- return normalizeRscURL;
918
- }
919
- });
920
- var _ensureleadingslash = require_ensure_leading_slash();
921
- var _segment = require_segment();
922
- function normalizeAppPath(route) {
923
- return (0, _ensureleadingslash.ensureLeadingSlash)(route.split("/").reduce((pathname, segment, index, segments) => {
924
- if (!segment) {
925
- return pathname;
926
- }
927
- if ((0, _segment.isGroupSegment)(segment)) {
928
- return pathname;
929
- }
930
- if (segment[0] === "@") {
931
- return pathname;
932
- }
933
- if ((segment === "page" || segment === "route") && index === segments.length - 1) {
934
- return pathname;
935
- }
936
- return pathname + "/" + segment;
937
- }, ""));
938
- }
939
- function normalizeRscURL(url) {
940
- return url.replace(
941
- /\.rsc($|\?)/,
942
- // $1 ensures `?` is preserved
943
- "$1"
944
- );
945
- }
946
- }
947
- });
948
-
949
- // ../../node_modules/next/dist/shared/lib/router/utils/interception-routes.js
950
- var require_interception_routes = __commonJS({
951
- "../../node_modules/next/dist/shared/lib/router/utils/interception-routes.js"(exports2) {
952
- "use strict";
953
- Object.defineProperty(exports2, "__esModule", {
954
- value: true
955
- });
956
- function _export(target, all) {
957
- for (var name in all) Object.defineProperty(target, name, {
958
- enumerable: true,
959
- get: all[name]
960
- });
961
- }
962
- _export(exports2, {
963
- INTERCEPTION_ROUTE_MARKERS: function() {
964
- return INTERCEPTION_ROUTE_MARKERS;
965
- },
966
- extractInterceptionRouteInformation: function() {
967
- return extractInterceptionRouteInformation;
968
- },
969
- isInterceptionRouteAppPath: function() {
970
- return isInterceptionRouteAppPath;
971
- }
972
- });
973
- var _apppaths = require_app_paths();
974
- var INTERCEPTION_ROUTE_MARKERS = [
975
- "(..)(..)",
976
- "(.)",
977
- "(..)",
978
- "(...)"
979
- ];
980
- function isInterceptionRouteAppPath(path) {
981
- return path.split("/").find((segment) => INTERCEPTION_ROUTE_MARKERS.find((m) => segment.startsWith(m))) !== void 0;
982
- }
983
- function extractInterceptionRouteInformation(path) {
984
- let interceptingRoute, marker, interceptedRoute;
985
- for (const segment of path.split("/")) {
986
- marker = INTERCEPTION_ROUTE_MARKERS.find((m) => segment.startsWith(m));
987
- if (marker) {
988
- ;
989
- [interceptingRoute, interceptedRoute] = path.split(marker, 2);
990
- break;
991
- }
992
- }
993
- if (!interceptingRoute || !marker || !interceptedRoute) {
994
- throw Object.defineProperty(new Error("Invalid interception route: " + path + ". Must be in the format /<intercepting route>/(..|...|..)(..)/<intercepted route>"), "__NEXT_ERROR_CODE", {
995
- value: "E269",
996
- enumerable: false,
997
- configurable: true
998
- });
999
- }
1000
- interceptingRoute = (0, _apppaths.normalizeAppPath)(interceptingRoute);
1001
- switch (marker) {
1002
- case "(.)":
1003
- if (interceptingRoute === "/") {
1004
- interceptedRoute = "/" + interceptedRoute;
1005
- } else {
1006
- interceptedRoute = interceptingRoute + "/" + interceptedRoute;
1007
- }
1008
- break;
1009
- case "(..)":
1010
- if (interceptingRoute === "/") {
1011
- throw Object.defineProperty(new Error("Invalid interception route: " + path + ". Cannot use (..) marker at the root level, use (.) instead."), "__NEXT_ERROR_CODE", {
1012
- value: "E207",
1013
- enumerable: false,
1014
- configurable: true
1015
- });
1016
- }
1017
- interceptedRoute = interceptingRoute.split("/").slice(0, -1).concat(interceptedRoute).join("/");
1018
- break;
1019
- case "(...)":
1020
- interceptedRoute = "/" + interceptedRoute;
1021
- break;
1022
- case "(..)(..)":
1023
- const splitInterceptingRoute = interceptingRoute.split("/");
1024
- if (splitInterceptingRoute.length <= 2) {
1025
- throw Object.defineProperty(new Error("Invalid interception route: " + path + ". Cannot use (..)(..) marker at the root level or one level up."), "__NEXT_ERROR_CODE", {
1026
- value: "E486",
1027
- enumerable: false,
1028
- configurable: true
1029
- });
1030
- }
1031
- interceptedRoute = splitInterceptingRoute.slice(0, -2).concat(interceptedRoute).join("/");
1032
- break;
1033
- default:
1034
- throw Object.defineProperty(new Error("Invariant: unexpected marker"), "__NEXT_ERROR_CODE", {
1035
- value: "E112",
1036
- enumerable: false,
1037
- configurable: true
1038
- });
1039
- }
1040
- return {
1041
- interceptingRoute,
1042
- interceptedRoute
1043
- };
1044
- }
1045
- }
1046
- });
1047
-
1048
- // ../../node_modules/next/dist/shared/lib/router/utils/is-dynamic.js
1049
- var require_is_dynamic = __commonJS({
1050
- "../../node_modules/next/dist/shared/lib/router/utils/is-dynamic.js"(exports2) {
1051
- "use strict";
1052
- Object.defineProperty(exports2, "__esModule", {
1053
- value: true
1054
- });
1055
- Object.defineProperty(exports2, "isDynamicRoute", {
1056
- enumerable: true,
1057
- get: function() {
1058
- return isDynamicRoute;
1059
- }
1060
- });
1061
- var _interceptionroutes = require_interception_routes();
1062
- var TEST_ROUTE = /\/[^/]*\[[^/]+\][^/]*(?=\/|$)/;
1063
- var TEST_STRICT_ROUTE = /\/\[[^/]+\](?=\/|$)/;
1064
- function isDynamicRoute(route, strict) {
1065
- if (strict === void 0) strict = true;
1066
- if ((0, _interceptionroutes.isInterceptionRouteAppPath)(route)) {
1067
- route = (0, _interceptionroutes.extractInterceptionRouteInformation)(route).interceptedRoute;
1068
- }
1069
- if (strict) {
1070
- return TEST_STRICT_ROUTE.test(route);
1071
- }
1072
- return TEST_ROUTE.test(route);
1073
- }
1074
- }
1075
- });
1076
-
1077
- // ../../node_modules/next/dist/shared/lib/router/utils/index.js
1078
- var require_utils2 = __commonJS({
1079
- "../../node_modules/next/dist/shared/lib/router/utils/index.js"(exports2) {
1080
- "use strict";
1081
- Object.defineProperty(exports2, "__esModule", {
1082
- value: true
1083
- });
1084
- function _export(target, all) {
1085
- for (var name in all) Object.defineProperty(target, name, {
1086
- enumerable: true,
1087
- get: all[name]
1088
- });
1089
- }
1090
- _export(exports2, {
1091
- getSortedRouteObjects: function() {
1092
- return _sortedroutes.getSortedRouteObjects;
1093
- },
1094
- getSortedRoutes: function() {
1095
- return _sortedroutes.getSortedRoutes;
1096
- },
1097
- isDynamicRoute: function() {
1098
- return _isdynamic.isDynamicRoute;
1099
- }
1100
- });
1101
- var _sortedroutes = require_sorted_routes();
1102
- var _isdynamic = require_is_dynamic();
1103
- }
1104
- });
1105
-
1106
- // ../../node_modules/next/dist/compiled/path-to-regexp/index.js
1107
- var require_path_to_regexp = __commonJS({
1108
- "../../node_modules/next/dist/compiled/path-to-regexp/index.js"(exports2, module2) {
1109
- "use strict";
1110
- (() => {
1111
- "use strict";
1112
- if (typeof __nccwpck_require__ !== "undefined") __nccwpck_require__.ab = __dirname + "/";
1113
- var e = {};
1114
- (() => {
1115
- var n = e;
1116
- Object.defineProperty(n, "__esModule", { value: true });
1117
- n.pathToRegexp = n.tokensToRegexp = n.regexpToFunction = n.match = n.tokensToFunction = n.compile = n.parse = void 0;
1118
- function lexer(e2) {
1119
- var n2 = [];
1120
- var r = 0;
1121
- while (r < e2.length) {
1122
- var t = e2[r];
1123
- if (t === "*" || t === "+" || t === "?") {
1124
- n2.push({ type: "MODIFIER", index: r, value: e2[r++] });
1125
- continue;
1126
- }
1127
- if (t === "\\") {
1128
- n2.push({ type: "ESCAPED_CHAR", index: r++, value: e2[r++] });
1129
- continue;
1130
- }
1131
- if (t === "{") {
1132
- n2.push({ type: "OPEN", index: r, value: e2[r++] });
1133
- continue;
1134
- }
1135
- if (t === "}") {
1136
- n2.push({ type: "CLOSE", index: r, value: e2[r++] });
1137
- continue;
1138
- }
1139
- if (t === ":") {
1140
- var a = "";
1141
- var i = r + 1;
1142
- while (i < e2.length) {
1143
- var o = e2.charCodeAt(i);
1144
- if (o >= 48 && o <= 57 || o >= 65 && o <= 90 || o >= 97 && o <= 122 || o === 95) {
1145
- a += e2[i++];
1146
- continue;
1147
- }
1148
- break;
1149
- }
1150
- if (!a) throw new TypeError("Missing parameter name at ".concat(r));
1151
- n2.push({ type: "NAME", index: r, value: a });
1152
- r = i;
1153
- continue;
1154
- }
1155
- if (t === "(") {
1156
- var c = 1;
1157
- var f = "";
1158
- var i = r + 1;
1159
- if (e2[i] === "?") {
1160
- throw new TypeError('Pattern cannot start with "?" at '.concat(i));
1161
- }
1162
- while (i < e2.length) {
1163
- if (e2[i] === "\\") {
1164
- f += e2[i++] + e2[i++];
1165
- continue;
1166
- }
1167
- if (e2[i] === ")") {
1168
- c--;
1169
- if (c === 0) {
1170
- i++;
1171
- break;
1172
- }
1173
- } else if (e2[i] === "(") {
1174
- c++;
1175
- if (e2[i + 1] !== "?") {
1176
- throw new TypeError("Capturing groups are not allowed at ".concat(i));
1177
- }
1178
- }
1179
- f += e2[i++];
1180
- }
1181
- if (c) throw new TypeError("Unbalanced pattern at ".concat(r));
1182
- if (!f) throw new TypeError("Missing pattern at ".concat(r));
1183
- n2.push({ type: "PATTERN", index: r, value: f });
1184
- r = i;
1185
- continue;
1186
- }
1187
- n2.push({ type: "CHAR", index: r, value: e2[r++] });
1188
- }
1189
- n2.push({ type: "END", index: r, value: "" });
1190
- return n2;
1191
- }
1192
- function parse(e2, n2) {
1193
- if (n2 === void 0) {
1194
- n2 = {};
1195
- }
1196
- var r = lexer(e2);
1197
- var t = n2.prefixes, a = t === void 0 ? "./" : t, i = n2.delimiter, o = i === void 0 ? "/#?" : i;
1198
- var c = [];
1199
- var f = 0;
1200
- var u = 0;
1201
- var p = "";
1202
- var tryConsume = function(e3) {
1203
- if (u < r.length && r[u].type === e3) return r[u++].value;
1204
- };
1205
- var mustConsume = function(e3) {
1206
- var n3 = tryConsume(e3);
1207
- if (n3 !== void 0) return n3;
1208
- var t2 = r[u], a2 = t2.type, i2 = t2.index;
1209
- throw new TypeError("Unexpected ".concat(a2, " at ").concat(i2, ", expected ").concat(e3));
1210
- };
1211
- var consumeText = function() {
1212
- var e3 = "";
1213
- var n3;
1214
- while (n3 = tryConsume("CHAR") || tryConsume("ESCAPED_CHAR")) {
1215
- e3 += n3;
1216
- }
1217
- return e3;
1218
- };
1219
- var isSafe = function(e3) {
1220
- for (var n3 = 0, r2 = o; n3 < r2.length; n3++) {
1221
- var t2 = r2[n3];
1222
- if (e3.indexOf(t2) > -1) return true;
1223
- }
1224
- return false;
1225
- };
1226
- var safePattern = function(e3) {
1227
- var n3 = c[c.length - 1];
1228
- var r2 = e3 || (n3 && typeof n3 === "string" ? n3 : "");
1229
- if (n3 && !r2) {
1230
- throw new TypeError('Must have text between two parameters, missing text after "'.concat(n3.name, '"'));
1231
- }
1232
- if (!r2 || isSafe(r2)) return "[^".concat(escapeString(o), "]+?");
1233
- return "(?:(?!".concat(escapeString(r2), ")[^").concat(escapeString(o), "])+?");
1234
- };
1235
- while (u < r.length) {
1236
- var v = tryConsume("CHAR");
1237
- var s = tryConsume("NAME");
1238
- var d = tryConsume("PATTERN");
1239
- if (s || d) {
1240
- var g = v || "";
1241
- if (a.indexOf(g) === -1) {
1242
- p += g;
1243
- g = "";
1244
- }
1245
- if (p) {
1246
- c.push(p);
1247
- p = "";
1248
- }
1249
- c.push({ name: s || f++, prefix: g, suffix: "", pattern: d || safePattern(g), modifier: tryConsume("MODIFIER") || "" });
1250
- continue;
1251
- }
1252
- var x = v || tryConsume("ESCAPED_CHAR");
1253
- if (x) {
1254
- p += x;
1255
- continue;
1256
- }
1257
- if (p) {
1258
- c.push(p);
1259
- p = "";
1260
- }
1261
- var h = tryConsume("OPEN");
1262
- if (h) {
1263
- var g = consumeText();
1264
- var l = tryConsume("NAME") || "";
1265
- var m = tryConsume("PATTERN") || "";
1266
- var T = consumeText();
1267
- mustConsume("CLOSE");
1268
- c.push({ name: l || (m ? f++ : ""), pattern: l && !m ? safePattern(g) : m, prefix: g, suffix: T, modifier: tryConsume("MODIFIER") || "" });
1269
- continue;
1270
- }
1271
- mustConsume("END");
1272
- }
1273
- return c;
1274
- }
1275
- n.parse = parse;
1276
- function compile(e2, n2) {
1277
- return tokensToFunction(parse(e2, n2), n2);
1278
- }
1279
- n.compile = compile;
1280
- function tokensToFunction(e2, n2) {
1281
- if (n2 === void 0) {
1282
- n2 = {};
1283
- }
1284
- var r = flags(n2);
1285
- var t = n2.encode, a = t === void 0 ? function(e3) {
1286
- return e3;
1287
- } : t, i = n2.validate, o = i === void 0 ? true : i;
1288
- var c = e2.map(function(e3) {
1289
- if (typeof e3 === "object") {
1290
- return new RegExp("^(?:".concat(e3.pattern, ")$"), r);
1291
- }
1292
- });
1293
- return function(n3) {
1294
- var r2 = "";
1295
- for (var t2 = 0; t2 < e2.length; t2++) {
1296
- var i2 = e2[t2];
1297
- if (typeof i2 === "string") {
1298
- r2 += i2;
1299
- continue;
1300
- }
1301
- var f = n3 ? n3[i2.name] : void 0;
1302
- var u = i2.modifier === "?" || i2.modifier === "*";
1303
- var p = i2.modifier === "*" || i2.modifier === "+";
1304
- if (Array.isArray(f)) {
1305
- if (!p) {
1306
- throw new TypeError('Expected "'.concat(i2.name, '" to not repeat, but got an array'));
1307
- }
1308
- if (f.length === 0) {
1309
- if (u) continue;
1310
- throw new TypeError('Expected "'.concat(i2.name, '" to not be empty'));
1311
- }
1312
- for (var v = 0; v < f.length; v++) {
1313
- var s = a(f[v], i2);
1314
- if (o && !c[t2].test(s)) {
1315
- throw new TypeError('Expected all "'.concat(i2.name, '" to match "').concat(i2.pattern, '", but got "').concat(s, '"'));
1316
- }
1317
- r2 += i2.prefix + s + i2.suffix;
1318
- }
1319
- continue;
1320
- }
1321
- if (typeof f === "string" || typeof f === "number") {
1322
- var s = a(String(f), i2);
1323
- if (o && !c[t2].test(s)) {
1324
- throw new TypeError('Expected "'.concat(i2.name, '" to match "').concat(i2.pattern, '", but got "').concat(s, '"'));
1325
- }
1326
- r2 += i2.prefix + s + i2.suffix;
1327
- continue;
1328
- }
1329
- if (u) continue;
1330
- var d = p ? "an array" : "a string";
1331
- throw new TypeError('Expected "'.concat(i2.name, '" to be ').concat(d));
1332
- }
1333
- return r2;
1334
- };
1335
- }
1336
- n.tokensToFunction = tokensToFunction;
1337
- function match(e2, n2) {
1338
- var r = [];
1339
- var t = pathToRegexp(e2, r, n2);
1340
- return regexpToFunction(t, r, n2);
1341
- }
1342
- n.match = match;
1343
- function regexpToFunction(e2, n2, r) {
1344
- if (r === void 0) {
1345
- r = {};
1346
- }
1347
- var t = r.decode, a = t === void 0 ? function(e3) {
1348
- return e3;
1349
- } : t;
1350
- return function(r2) {
1351
- var t2 = e2.exec(r2);
1352
- if (!t2) return false;
1353
- var i = t2[0], o = t2.index;
1354
- var c = /* @__PURE__ */ Object.create(null);
1355
- var _loop_1 = function(e3) {
1356
- if (t2[e3] === void 0) return "continue";
1357
- var r3 = n2[e3 - 1];
1358
- if (r3.modifier === "*" || r3.modifier === "+") {
1359
- c[r3.name] = t2[e3].split(r3.prefix + r3.suffix).map(function(e4) {
1360
- return a(e4, r3);
1361
- });
1362
- } else {
1363
- c[r3.name] = a(t2[e3], r3);
1364
- }
1365
- };
1366
- for (var f = 1; f < t2.length; f++) {
1367
- _loop_1(f);
1368
- }
1369
- return { path: i, index: o, params: c };
1370
- };
1371
- }
1372
- n.regexpToFunction = regexpToFunction;
1373
- function escapeString(e2) {
1374
- return e2.replace(/([.+*?=^!:${}()[\]|/\\])/g, "\\$1");
1375
- }
1376
- function flags(e2) {
1377
- return e2 && e2.sensitive ? "" : "i";
1378
- }
1379
- function regexpToRegexp(e2, n2) {
1380
- if (!n2) return e2;
1381
- var r = /\((?:\?<(.*?)>)?(?!\?)/g;
1382
- var t = 0;
1383
- var a = r.exec(e2.source);
1384
- while (a) {
1385
- n2.push({ name: a[1] || t++, prefix: "", suffix: "", modifier: "", pattern: "" });
1386
- a = r.exec(e2.source);
1387
- }
1388
- return e2;
1389
- }
1390
- function arrayToRegexp(e2, n2, r) {
1391
- var t = e2.map(function(e3) {
1392
- return pathToRegexp(e3, n2, r).source;
1393
- });
1394
- return new RegExp("(?:".concat(t.join("|"), ")"), flags(r));
1395
- }
1396
- function stringToRegexp(e2, n2, r) {
1397
- return tokensToRegexp(parse(e2, r), n2, r);
1398
- }
1399
- function tokensToRegexp(e2, n2, r) {
1400
- if (r === void 0) {
1401
- r = {};
1402
- }
1403
- var t = r.strict, a = t === void 0 ? false : t, i = r.start, o = i === void 0 ? true : i, c = r.end, f = c === void 0 ? true : c, u = r.encode, p = u === void 0 ? function(e3) {
1404
- return e3;
1405
- } : u, v = r.delimiter, s = v === void 0 ? "/#?" : v, d = r.endsWith, g = d === void 0 ? "" : d;
1406
- var x = "[".concat(escapeString(g), "]|$");
1407
- var h = "[".concat(escapeString(s), "]");
1408
- var l = o ? "^" : "";
1409
- for (var m = 0, T = e2; m < T.length; m++) {
1410
- var E = T[m];
1411
- if (typeof E === "string") {
1412
- l += escapeString(p(E));
1413
- } else {
1414
- var w = escapeString(p(E.prefix));
1415
- var y = escapeString(p(E.suffix));
1416
- if (E.pattern) {
1417
- if (n2) n2.push(E);
1418
- if (w || y) {
1419
- if (E.modifier === "+" || E.modifier === "*") {
1420
- var R = E.modifier === "*" ? "?" : "";
1421
- l += "(?:".concat(w, "((?:").concat(E.pattern, ")(?:").concat(y).concat(w, "(?:").concat(E.pattern, "))*)").concat(y, ")").concat(R);
1422
- } else {
1423
- l += "(?:".concat(w, "(").concat(E.pattern, ")").concat(y, ")").concat(E.modifier);
1424
- }
1425
- } else {
1426
- if (E.modifier === "+" || E.modifier === "*") {
1427
- throw new TypeError('Can not repeat "'.concat(E.name, '" without a prefix and suffix'));
1428
- }
1429
- l += "(".concat(E.pattern, ")").concat(E.modifier);
1430
- }
1431
- } else {
1432
- l += "(?:".concat(w).concat(y, ")").concat(E.modifier);
1433
- }
1434
- }
1435
- }
1436
- if (f) {
1437
- if (!a) l += "".concat(h, "?");
1438
- l += !r.endsWith ? "$" : "(?=".concat(x, ")");
1439
- } else {
1440
- var A = e2[e2.length - 1];
1441
- var _ = typeof A === "string" ? h.indexOf(A[A.length - 1]) > -1 : A === void 0;
1442
- if (!a) {
1443
- l += "(?:".concat(h, "(?=").concat(x, "))?");
1444
- }
1445
- if (!_) {
1446
- l += "(?=".concat(h, "|").concat(x, ")");
1447
- }
1448
- }
1449
- return new RegExp(l, flags(r));
1450
- }
1451
- n.tokensToRegexp = tokensToRegexp;
1452
- function pathToRegexp(e2, n2, r) {
1453
- if (e2 instanceof RegExp) return regexpToRegexp(e2, n2);
1454
- if (Array.isArray(e2)) return arrayToRegexp(e2, n2, r);
1455
- return stringToRegexp(e2, n2, r);
1456
- }
1457
- n.pathToRegexp = pathToRegexp;
1458
- })();
1459
- module2.exports = e;
1460
- })();
1461
- }
1462
- });
1463
-
1464
- // ../../node_modules/next/dist/lib/route-pattern-normalizer.js
1465
- var require_route_pattern_normalizer = __commonJS({
1466
- "../../node_modules/next/dist/lib/route-pattern-normalizer.js"(exports2) {
1467
- "use strict";
1468
- Object.defineProperty(exports2, "__esModule", {
1469
- value: true
1470
- });
1471
- function _export(target, all) {
1472
- for (var name in all) Object.defineProperty(target, name, {
1473
- enumerable: true,
1474
- get: all[name]
1475
- });
1476
- }
1477
- _export(exports2, {
1478
- hasAdjacentParameterIssues: function() {
1479
- return hasAdjacentParameterIssues;
1480
- },
1481
- normalizeAdjacentParameters: function() {
1482
- return normalizeAdjacentParameters;
1483
- },
1484
- normalizeTokensForRegexp: function() {
1485
- return normalizeTokensForRegexp;
1486
- },
1487
- stripParameterSeparators: function() {
1488
- return stripParameterSeparators;
1489
- }
1490
- });
1491
- var PARAM_SEPARATOR = "_NEXTSEP_";
1492
- function hasAdjacentParameterIssues(route) {
1493
- if (typeof route !== "string") return false;
1494
- if (/\/\(\.{1,3}\):[^/\s]+/.test(route)) {
1495
- return true;
1496
- }
1497
- if (/:[a-zA-Z_][a-zA-Z0-9_]*:[a-zA-Z_][a-zA-Z0-9_]*/.test(route)) {
1498
- return true;
1499
- }
1500
- return false;
1501
- }
1502
- function normalizeAdjacentParameters(route) {
1503
- let normalized = route;
1504
- normalized = normalized.replace(/(\([^)]*\)):([^/\s]+)/g, `$1${PARAM_SEPARATOR}:$2`);
1505
- normalized = normalized.replace(/:([^:/\s)]+)(?=:)/g, `:$1${PARAM_SEPARATOR}`);
1506
- return normalized;
1507
- }
1508
- function normalizeTokensForRegexp(tokens) {
1509
- return tokens.map((token) => {
1510
- if (typeof token === "object" && token !== null && // Not all token objects have 'modifier' property (e.g., simple text tokens)
1511
- "modifier" in token && // Only repeating modifiers (* or +) cause the validation error
1512
- // Other modifiers like '?' (optional) are fine
1513
- (token.modifier === "*" || token.modifier === "+") && // Token objects can have different shapes depending on route pattern
1514
- "prefix" in token && "suffix" in token && // Both prefix and suffix must be empty strings
1515
- // This is what causes the validation error in path-to-regexp
1516
- token.prefix === "" && token.suffix === "") {
1517
- return {
1518
- ...token,
1519
- prefix: "/"
1520
- };
1521
- }
1522
- return token;
1523
- });
1524
- }
1525
- function stripParameterSeparators(params) {
1526
- const cleaned = {};
1527
- for (const [key, value] of Object.entries(params)) {
1528
- if (typeof value === "string") {
1529
- cleaned[key] = value.replace(new RegExp(`^${PARAM_SEPARATOR}`), "");
1530
- } else if (Array.isArray(value)) {
1531
- cleaned[key] = value.map((item) => typeof item === "string" ? item.replace(new RegExp(`^${PARAM_SEPARATOR}`), "") : item);
1532
- } else {
1533
- cleaned[key] = value;
1534
- }
1535
- }
1536
- return cleaned;
1537
- }
1538
- }
1539
- });
1540
-
1541
- // ../../node_modules/next/dist/shared/lib/router/utils/route-match-utils.js
1542
- var require_route_match_utils = __commonJS({
1543
- "../../node_modules/next/dist/shared/lib/router/utils/route-match-utils.js"(exports2) {
1544
- "use strict";
1545
- Object.defineProperty(exports2, "__esModule", {
1546
- value: true
1547
- });
1548
- function _export(target, all) {
1549
- for (var name in all) Object.defineProperty(target, name, {
1550
- enumerable: true,
1551
- get: all[name]
1552
- });
1553
- }
1554
- _export(exports2, {
1555
- safeCompile: function() {
1556
- return safeCompile;
1557
- },
1558
- safePathToRegexp: function() {
1559
- return safePathToRegexp;
1560
- },
1561
- safeRegexpToFunction: function() {
1562
- return safeRegexpToFunction;
1563
- },
1564
- safeRouteMatcher: function() {
1565
- return safeRouteMatcher;
1566
- }
1567
- });
1568
- var _pathtoregexp = require_path_to_regexp();
1569
- var _routepatternnormalizer = require_route_pattern_normalizer();
1570
- function safePathToRegexp(route, keys2, options) {
1571
- if (typeof route !== "string") {
1572
- return (0, _pathtoregexp.pathToRegexp)(route, keys2, options);
1573
- }
1574
- const needsNormalization = (0, _routepatternnormalizer.hasAdjacentParameterIssues)(route);
1575
- const routeToUse = needsNormalization ? (0, _routepatternnormalizer.normalizeAdjacentParameters)(route) : route;
1576
- try {
1577
- return (0, _pathtoregexp.pathToRegexp)(routeToUse, keys2, options);
1578
- } catch (error) {
1579
- if (!needsNormalization) {
1580
- try {
1581
- const normalizedRoute = (0, _routepatternnormalizer.normalizeAdjacentParameters)(route);
1582
- return (0, _pathtoregexp.pathToRegexp)(normalizedRoute, keys2, options);
1583
- } catch (retryError) {
1584
- throw error;
1585
- }
1586
- }
1587
- throw error;
1588
- }
1589
- }
1590
- function safeCompile(route, options) {
1591
- const needsNormalization = (0, _routepatternnormalizer.hasAdjacentParameterIssues)(route);
1592
- const routeToUse = needsNormalization ? (0, _routepatternnormalizer.normalizeAdjacentParameters)(route) : route;
1593
- try {
1594
- return (0, _pathtoregexp.compile)(routeToUse, options);
1595
- } catch (error) {
1596
- if (!needsNormalization) {
1597
- try {
1598
- const normalizedRoute = (0, _routepatternnormalizer.normalizeAdjacentParameters)(route);
1599
- return (0, _pathtoregexp.compile)(normalizedRoute, options);
1600
- } catch (retryError) {
1601
- throw error;
1602
- }
1603
- }
1604
- throw error;
1605
- }
1606
- }
1607
- function safeRegexpToFunction(regexp, keys2) {
1608
- const originalMatcher = (0, _pathtoregexp.regexpToFunction)(regexp, keys2 || []);
1609
- return (pathname) => {
1610
- const result = originalMatcher(pathname);
1611
- if (!result) return false;
1612
- return {
1613
- ...result,
1614
- params: (0, _routepatternnormalizer.stripParameterSeparators)(result.params)
1615
- };
1616
- };
1617
- }
1618
- function safeRouteMatcher(matcherFn) {
1619
- return (pathname) => {
1620
- const result = matcherFn(pathname);
1621
- if (!result) return false;
1622
- return (0, _routepatternnormalizer.stripParameterSeparators)(result);
1623
- };
1624
- }
1625
- }
1626
- });
1627
-
1628
- // ../../node_modules/next/dist/shared/lib/router/utils/route-matcher.js
1629
- var require_route_matcher = __commonJS({
1630
- "../../node_modules/next/dist/shared/lib/router/utils/route-matcher.js"(exports2) {
1631
- "use strict";
1632
- Object.defineProperty(exports2, "__esModule", {
1633
- value: true
1634
- });
1635
- Object.defineProperty(exports2, "getRouteMatcher", {
1636
- enumerable: true,
1637
- get: function() {
1638
- return getRouteMatcher;
1639
- }
1640
- });
1641
- var _utils = require_utils();
1642
- var _routematchutils = require_route_match_utils();
1643
- function getRouteMatcher(param) {
1644
- let { re, groups } = param;
1645
- const rawMatcher = (pathname) => {
1646
- const routeMatch = re.exec(pathname);
1647
- if (!routeMatch) return false;
1648
- const decode = (param2) => {
1649
- try {
1650
- return decodeURIComponent(param2);
1651
- } catch (e) {
1652
- throw Object.defineProperty(new _utils.DecodeError("failed to decode param"), "__NEXT_ERROR_CODE", {
1653
- value: "E528",
1654
- enumerable: false,
1655
- configurable: true
1656
- });
1657
- }
1658
- };
1659
- const params = {};
1660
- for (const [key, group] of Object.entries(groups)) {
1661
- const match = routeMatch[group.pos];
1662
- if (match !== void 0) {
1663
- if (group.repeat) {
1664
- params[key] = match.split("/").map((entry) => decode(entry));
1665
- } else {
1666
- params[key] = decode(match);
1667
- }
1668
- }
1669
- }
1670
- return params;
1671
- };
1672
- return (0, _routematchutils.safeRouteMatcher)(rawMatcher);
1673
- }
1674
- }
1675
- });
1676
-
1677
- // ../../node_modules/next/dist/lib/constants.js
1678
- var require_constants = __commonJS({
1679
- "../../node_modules/next/dist/lib/constants.js"(exports2) {
1680
- "use strict";
1681
- Object.defineProperty(exports2, "__esModule", {
1682
- value: true
1683
- });
1684
- function _export(target, all) {
1685
- for (var name in all) Object.defineProperty(target, name, {
1686
- enumerable: true,
1687
- get: all[name]
1688
- });
1689
- }
1690
- _export(exports2, {
1691
- ACTION_SUFFIX: function() {
1692
- return ACTION_SUFFIX;
1693
- },
1694
- APP_DIR_ALIAS: function() {
1695
- return APP_DIR_ALIAS;
1696
- },
1697
- CACHE_ONE_YEAR: function() {
1698
- return CACHE_ONE_YEAR;
1699
- },
1700
- DOT_NEXT_ALIAS: function() {
1701
- return DOT_NEXT_ALIAS;
1702
- },
1703
- ESLINT_DEFAULT_DIRS: function() {
1704
- return ESLINT_DEFAULT_DIRS;
1705
- },
1706
- GSP_NO_RETURNED_VALUE: function() {
1707
- return GSP_NO_RETURNED_VALUE;
1708
- },
1709
- GSSP_COMPONENT_MEMBER_ERROR: function() {
1710
- return GSSP_COMPONENT_MEMBER_ERROR;
1711
- },
1712
- GSSP_NO_RETURNED_VALUE: function() {
1713
- return GSSP_NO_RETURNED_VALUE;
1714
- },
1715
- HTML_CONTENT_TYPE_HEADER: function() {
1716
- return HTML_CONTENT_TYPE_HEADER;
1717
- },
1718
- INFINITE_CACHE: function() {
1719
- return INFINITE_CACHE;
1720
- },
1721
- INSTRUMENTATION_HOOK_FILENAME: function() {
1722
- return INSTRUMENTATION_HOOK_FILENAME;
1723
- },
1724
- JSON_CONTENT_TYPE_HEADER: function() {
1725
- return JSON_CONTENT_TYPE_HEADER;
1726
- },
1727
- MATCHED_PATH_HEADER: function() {
1728
- return MATCHED_PATH_HEADER;
1729
- },
1730
- MIDDLEWARE_FILENAME: function() {
1731
- return MIDDLEWARE_FILENAME;
1732
- },
1733
- MIDDLEWARE_LOCATION_REGEXP: function() {
1734
- return MIDDLEWARE_LOCATION_REGEXP;
1735
- },
1736
- NEXT_BODY_SUFFIX: function() {
1737
- return NEXT_BODY_SUFFIX;
1738
- },
1739
- NEXT_CACHE_IMPLICIT_TAG_ID: function() {
1740
- return NEXT_CACHE_IMPLICIT_TAG_ID;
1741
- },
1742
- NEXT_CACHE_REVALIDATED_TAGS_HEADER: function() {
1743
- return NEXT_CACHE_REVALIDATED_TAGS_HEADER;
1744
- },
1745
- NEXT_CACHE_REVALIDATE_TAG_TOKEN_HEADER: function() {
1746
- return NEXT_CACHE_REVALIDATE_TAG_TOKEN_HEADER;
1747
- },
1748
- NEXT_CACHE_SOFT_TAG_MAX_LENGTH: function() {
1749
- return NEXT_CACHE_SOFT_TAG_MAX_LENGTH;
1750
- },
1751
- NEXT_CACHE_TAGS_HEADER: function() {
1752
- return NEXT_CACHE_TAGS_HEADER;
1753
- },
1754
- NEXT_CACHE_TAG_MAX_ITEMS: function() {
1755
- return NEXT_CACHE_TAG_MAX_ITEMS;
1756
- },
1757
- NEXT_CACHE_TAG_MAX_LENGTH: function() {
1758
- return NEXT_CACHE_TAG_MAX_LENGTH;
1759
- },
1760
- NEXT_DATA_SUFFIX: function() {
1761
- return NEXT_DATA_SUFFIX;
1762
- },
1763
- NEXT_INTERCEPTION_MARKER_PREFIX: function() {
1764
- return NEXT_INTERCEPTION_MARKER_PREFIX;
1765
- },
1766
- NEXT_META_SUFFIX: function() {
1767
- return NEXT_META_SUFFIX;
1768
- },
1769
- NEXT_QUERY_PARAM_PREFIX: function() {
1770
- return NEXT_QUERY_PARAM_PREFIX;
1771
- },
1772
- NEXT_RESUME_HEADER: function() {
1773
- return NEXT_RESUME_HEADER;
1774
- },
1775
- NON_STANDARD_NODE_ENV: function() {
1776
- return NON_STANDARD_NODE_ENV;
1777
- },
1778
- PAGES_DIR_ALIAS: function() {
1779
- return PAGES_DIR_ALIAS;
1780
- },
1781
- PRERENDER_REVALIDATE_HEADER: function() {
1782
- return PRERENDER_REVALIDATE_HEADER;
1783
- },
1784
- PRERENDER_REVALIDATE_ONLY_GENERATED_HEADER: function() {
1785
- return PRERENDER_REVALIDATE_ONLY_GENERATED_HEADER;
1786
- },
1787
- PUBLIC_DIR_MIDDLEWARE_CONFLICT: function() {
1788
- return PUBLIC_DIR_MIDDLEWARE_CONFLICT;
1789
- },
1790
- ROOT_DIR_ALIAS: function() {
1791
- return ROOT_DIR_ALIAS;
1792
- },
1793
- RSC_ACTION_CLIENT_WRAPPER_ALIAS: function() {
1794
- return RSC_ACTION_CLIENT_WRAPPER_ALIAS;
1795
- },
1796
- RSC_ACTION_ENCRYPTION_ALIAS: function() {
1797
- return RSC_ACTION_ENCRYPTION_ALIAS;
1798
- },
1799
- RSC_ACTION_PROXY_ALIAS: function() {
1800
- return RSC_ACTION_PROXY_ALIAS;
1801
- },
1802
- RSC_ACTION_VALIDATE_ALIAS: function() {
1803
- return RSC_ACTION_VALIDATE_ALIAS;
1804
- },
1805
- RSC_CACHE_WRAPPER_ALIAS: function() {
1806
- return RSC_CACHE_WRAPPER_ALIAS;
1807
- },
1808
- RSC_DYNAMIC_IMPORT_WRAPPER_ALIAS: function() {
1809
- return RSC_DYNAMIC_IMPORT_WRAPPER_ALIAS;
1810
- },
1811
- RSC_MOD_REF_PROXY_ALIAS: function() {
1812
- return RSC_MOD_REF_PROXY_ALIAS;
1813
- },
1814
- RSC_PREFETCH_SUFFIX: function() {
1815
- return RSC_PREFETCH_SUFFIX;
1816
- },
1817
- RSC_SEGMENTS_DIR_SUFFIX: function() {
1818
- return RSC_SEGMENTS_DIR_SUFFIX;
1819
- },
1820
- RSC_SEGMENT_SUFFIX: function() {
1821
- return RSC_SEGMENT_SUFFIX;
1822
- },
1823
- RSC_SUFFIX: function() {
1824
- return RSC_SUFFIX;
1825
- },
1826
- SERVER_PROPS_EXPORT_ERROR: function() {
1827
- return SERVER_PROPS_EXPORT_ERROR;
1828
- },
1829
- SERVER_PROPS_GET_INIT_PROPS_CONFLICT: function() {
1830
- return SERVER_PROPS_GET_INIT_PROPS_CONFLICT;
1831
- },
1832
- SERVER_PROPS_SSG_CONFLICT: function() {
1833
- return SERVER_PROPS_SSG_CONFLICT;
1834
- },
1835
- SERVER_RUNTIME: function() {
1836
- return SERVER_RUNTIME;
1837
- },
1838
- SSG_FALLBACK_EXPORT_ERROR: function() {
1839
- return SSG_FALLBACK_EXPORT_ERROR;
1840
- },
1841
- SSG_GET_INITIAL_PROPS_CONFLICT: function() {
1842
- return SSG_GET_INITIAL_PROPS_CONFLICT;
1843
- },
1844
- STATIC_STATUS_PAGE_GET_INITIAL_PROPS_ERROR: function() {
1845
- return STATIC_STATUS_PAGE_GET_INITIAL_PROPS_ERROR;
1846
- },
1847
- TEXT_PLAIN_CONTENT_TYPE_HEADER: function() {
1848
- return TEXT_PLAIN_CONTENT_TYPE_HEADER;
1849
- },
1850
- UNSTABLE_REVALIDATE_RENAME_ERROR: function() {
1851
- return UNSTABLE_REVALIDATE_RENAME_ERROR;
1852
- },
1853
- WEBPACK_LAYERS: function() {
1854
- return WEBPACK_LAYERS;
1855
- },
1856
- WEBPACK_RESOURCE_QUERIES: function() {
1857
- return WEBPACK_RESOURCE_QUERIES;
1858
- }
1859
- });
1860
- var TEXT_PLAIN_CONTENT_TYPE_HEADER = "text/plain";
1861
- var HTML_CONTENT_TYPE_HEADER = "text/html; charset=utf-8";
1862
- var JSON_CONTENT_TYPE_HEADER = "application/json; charset=utf-8";
1863
- var NEXT_QUERY_PARAM_PREFIX = "nxtP";
1864
- var NEXT_INTERCEPTION_MARKER_PREFIX = "nxtI";
1865
- var MATCHED_PATH_HEADER = "x-matched-path";
1866
- var PRERENDER_REVALIDATE_HEADER = "x-prerender-revalidate";
1867
- var PRERENDER_REVALIDATE_ONLY_GENERATED_HEADER = "x-prerender-revalidate-if-generated";
1868
- var RSC_PREFETCH_SUFFIX = ".prefetch.rsc";
1869
- var RSC_SEGMENTS_DIR_SUFFIX = ".segments";
1870
- var RSC_SEGMENT_SUFFIX = ".segment.rsc";
1871
- var RSC_SUFFIX = ".rsc";
1872
- var ACTION_SUFFIX = ".action";
1873
- var NEXT_DATA_SUFFIX = ".json";
1874
- var NEXT_META_SUFFIX = ".meta";
1875
- var NEXT_BODY_SUFFIX = ".body";
1876
- var NEXT_CACHE_TAGS_HEADER = "x-next-cache-tags";
1877
- var NEXT_CACHE_REVALIDATED_TAGS_HEADER = "x-next-revalidated-tags";
1878
- var NEXT_CACHE_REVALIDATE_TAG_TOKEN_HEADER = "x-next-revalidate-tag-token";
1879
- var NEXT_RESUME_HEADER = "next-resume";
1880
- var NEXT_CACHE_TAG_MAX_ITEMS = 128;
1881
- var NEXT_CACHE_TAG_MAX_LENGTH = 256;
1882
- var NEXT_CACHE_SOFT_TAG_MAX_LENGTH = 1024;
1883
- var NEXT_CACHE_IMPLICIT_TAG_ID = "_N_T_";
1884
- var CACHE_ONE_YEAR = 31536e3;
1885
- var INFINITE_CACHE = 4294967294;
1886
- var MIDDLEWARE_FILENAME = "middleware";
1887
- var MIDDLEWARE_LOCATION_REGEXP = `(?:src/)?${MIDDLEWARE_FILENAME}`;
1888
- var INSTRUMENTATION_HOOK_FILENAME = "instrumentation";
1889
- var PAGES_DIR_ALIAS = "private-next-pages";
1890
- var DOT_NEXT_ALIAS = "private-dot-next";
1891
- var ROOT_DIR_ALIAS = "private-next-root-dir";
1892
- var APP_DIR_ALIAS = "private-next-app-dir";
1893
- var RSC_MOD_REF_PROXY_ALIAS = "private-next-rsc-mod-ref-proxy";
1894
- var RSC_ACTION_VALIDATE_ALIAS = "private-next-rsc-action-validate";
1895
- var RSC_ACTION_PROXY_ALIAS = "private-next-rsc-server-reference";
1896
- var RSC_CACHE_WRAPPER_ALIAS = "private-next-rsc-cache-wrapper";
1897
- var RSC_DYNAMIC_IMPORT_WRAPPER_ALIAS = "private-next-rsc-track-dynamic-import";
1898
- var RSC_ACTION_ENCRYPTION_ALIAS = "private-next-rsc-action-encryption";
1899
- var RSC_ACTION_CLIENT_WRAPPER_ALIAS = "private-next-rsc-action-client-wrapper";
1900
- var PUBLIC_DIR_MIDDLEWARE_CONFLICT = `You can not have a '_next' folder inside of your public folder. This conflicts with the internal '/_next' route. https://nextjs.org/docs/messages/public-next-folder-conflict`;
1901
- var SSG_GET_INITIAL_PROPS_CONFLICT = `You can not use getInitialProps with getStaticProps. To use SSG, please remove your getInitialProps`;
1902
- var SERVER_PROPS_GET_INIT_PROPS_CONFLICT = `You can not use getInitialProps with getServerSideProps. Please remove getInitialProps.`;
1903
- var SERVER_PROPS_SSG_CONFLICT = `You can not use getStaticProps or getStaticPaths with getServerSideProps. To use SSG, please remove getServerSideProps`;
1904
- var STATIC_STATUS_PAGE_GET_INITIAL_PROPS_ERROR = `can not have getInitialProps/getServerSideProps, https://nextjs.org/docs/messages/404-get-initial-props`;
1905
- var SERVER_PROPS_EXPORT_ERROR = `pages with \`getServerSideProps\` can not be exported. See more info here: https://nextjs.org/docs/messages/gssp-export`;
1906
- var GSP_NO_RETURNED_VALUE = "Your `getStaticProps` function did not return an object. Did you forget to add a `return`?";
1907
- var GSSP_NO_RETURNED_VALUE = "Your `getServerSideProps` function did not return an object. Did you forget to add a `return`?";
1908
- var UNSTABLE_REVALIDATE_RENAME_ERROR = "The `unstable_revalidate` property is available for general use.\nPlease use `revalidate` instead.";
1909
- var GSSP_COMPONENT_MEMBER_ERROR = `can not be attached to a page's component and must be exported from the page. See more info here: https://nextjs.org/docs/messages/gssp-component-member`;
1910
- var NON_STANDARD_NODE_ENV = `You are using a non-standard "NODE_ENV" value in your environment. This creates inconsistencies in the project and is strongly advised against. Read more: https://nextjs.org/docs/messages/non-standard-node-env`;
1911
- var SSG_FALLBACK_EXPORT_ERROR = `Pages with \`fallback\` enabled in \`getStaticPaths\` can not be exported. See more info here: https://nextjs.org/docs/messages/ssg-fallback-true-export`;
1912
- var ESLINT_DEFAULT_DIRS = [
1913
- "app",
1914
- "pages",
1915
- "components",
1916
- "lib",
1917
- "src"
1918
- ];
1919
- var SERVER_RUNTIME = {
1920
- edge: "edge",
1921
- experimentalEdge: "experimental-edge",
1922
- nodejs: "nodejs"
1923
- };
1924
- var WEBPACK_LAYERS_NAMES = {
1925
- /**
1926
- * The layer for the shared code between the client and server bundles.
1927
- */
1928
- shared: "shared",
1929
- /**
1930
- * The layer for server-only runtime and picking up `react-server` export conditions.
1931
- * Including app router RSC pages and app router custom routes and metadata routes.
1932
- */
1933
- reactServerComponents: "rsc",
1934
- /**
1935
- * Server Side Rendering layer for app (ssr).
1936
- */
1937
- serverSideRendering: "ssr",
1938
- /**
1939
- * The browser client bundle layer for actions.
1940
- */
1941
- actionBrowser: "action-browser",
1942
- /**
1943
- * The Node.js bundle layer for the API routes.
1944
- */
1945
- apiNode: "api-node",
1946
- /**
1947
- * The Edge Lite bundle layer for the API routes.
1948
- */
1949
- apiEdge: "api-edge",
1950
- /**
1951
- * The layer for the middleware code.
1952
- */
1953
- middleware: "middleware",
1954
- /**
1955
- * The layer for the instrumentation hooks.
1956
- */
1957
- instrument: "instrument",
1958
- /**
1959
- * The layer for assets on the edge.
1960
- */
1961
- edgeAsset: "edge-asset",
1962
- /**
1963
- * The browser client bundle layer for App directory.
1964
- */
1965
- appPagesBrowser: "app-pages-browser",
1966
- /**
1967
- * The browser client bundle layer for Pages directory.
1968
- */
1969
- pagesDirBrowser: "pages-dir-browser",
1970
- /**
1971
- * The Edge Lite bundle layer for Pages directory.
1972
- */
1973
- pagesDirEdge: "pages-dir-edge",
1974
- /**
1975
- * The Node.js bundle layer for Pages directory.
1976
- */
1977
- pagesDirNode: "pages-dir-node"
1978
- };
1979
- var WEBPACK_LAYERS = {
1980
- ...WEBPACK_LAYERS_NAMES,
1981
- GROUP: {
1982
- builtinReact: [
1983
- WEBPACK_LAYERS_NAMES.reactServerComponents,
1984
- WEBPACK_LAYERS_NAMES.actionBrowser
1985
- ],
1986
- serverOnly: [
1987
- WEBPACK_LAYERS_NAMES.reactServerComponents,
1988
- WEBPACK_LAYERS_NAMES.actionBrowser,
1989
- WEBPACK_LAYERS_NAMES.instrument,
1990
- WEBPACK_LAYERS_NAMES.middleware
1991
- ],
1992
- neutralTarget: [
1993
- // pages api
1994
- WEBPACK_LAYERS_NAMES.apiNode,
1995
- WEBPACK_LAYERS_NAMES.apiEdge
1996
- ],
1997
- clientOnly: [
1998
- WEBPACK_LAYERS_NAMES.serverSideRendering,
1999
- WEBPACK_LAYERS_NAMES.appPagesBrowser
2000
- ],
2001
- bundled: [
2002
- WEBPACK_LAYERS_NAMES.reactServerComponents,
2003
- WEBPACK_LAYERS_NAMES.actionBrowser,
2004
- WEBPACK_LAYERS_NAMES.serverSideRendering,
2005
- WEBPACK_LAYERS_NAMES.appPagesBrowser,
2006
- WEBPACK_LAYERS_NAMES.shared,
2007
- WEBPACK_LAYERS_NAMES.instrument,
2008
- WEBPACK_LAYERS_NAMES.middleware
2009
- ],
2010
- appPages: [
2011
- // app router pages and layouts
2012
- WEBPACK_LAYERS_NAMES.reactServerComponents,
2013
- WEBPACK_LAYERS_NAMES.serverSideRendering,
2014
- WEBPACK_LAYERS_NAMES.appPagesBrowser,
2015
- WEBPACK_LAYERS_NAMES.actionBrowser
2016
- ]
2017
- }
2018
- };
2019
- var WEBPACK_RESOURCE_QUERIES = {
2020
- edgeSSREntry: "__next_edge_ssr_entry__",
2021
- metadata: "__next_metadata__",
2022
- metadataRoute: "__next_metadata_route__",
2023
- metadataImageMeta: "__next_metadata_image_meta__"
2024
- };
2025
- }
2026
- });
2027
-
2028
- // ../../node_modules/next/dist/shared/lib/escape-regexp.js
2029
- var require_escape_regexp = __commonJS({
2030
- "../../node_modules/next/dist/shared/lib/escape-regexp.js"(exports2) {
2031
- "use strict";
2032
- Object.defineProperty(exports2, "__esModule", {
2033
- value: true
2034
- });
2035
- Object.defineProperty(exports2, "escapeStringRegexp", {
2036
- enumerable: true,
2037
- get: function() {
2038
- return escapeStringRegexp;
2039
- }
2040
- });
2041
- var reHasRegExp = /[|\\{}()[\]^$+*?.-]/;
2042
- var reReplaceRegExp = /[|\\{}()[\]^$+*?.-]/g;
2043
- function escapeStringRegexp(str) {
2044
- if (reHasRegExp.test(str)) {
2045
- return str.replace(reReplaceRegExp, "\\$&");
2046
- }
2047
- return str;
2048
- }
2049
- }
2050
- });
2051
-
2052
- // ../../node_modules/next/dist/shared/lib/router/utils/get-dynamic-param.js
2053
- var require_get_dynamic_param = __commonJS({
2054
- "../../node_modules/next/dist/shared/lib/router/utils/get-dynamic-param.js"(exports2) {
2055
- "use strict";
2056
- Object.defineProperty(exports2, "__esModule", {
2057
- value: true
2058
- });
2059
- function _export(target, all) {
2060
- for (var name in all) Object.defineProperty(target, name, {
2061
- enumerable: true,
2062
- get: all[name]
2063
- });
2064
- }
2065
- _export(exports2, {
2066
- PARAMETER_PATTERN: function() {
2067
- return PARAMETER_PATTERN;
2068
- },
2069
- getDynamicParam: function() {
2070
- return getDynamicParam;
2071
- },
2072
- parseMatchedParameter: function() {
2073
- return parseMatchedParameter;
2074
- },
2075
- parseParameter: function() {
2076
- return parseParameter;
2077
- }
2078
- });
2079
- function getDynamicParam(params, segmentKey, dynamicParamType, pagePath, fallbackRouteParams) {
2080
- let value = params[segmentKey];
2081
- if (fallbackRouteParams && fallbackRouteParams.has(segmentKey)) {
2082
- value = fallbackRouteParams.get(segmentKey);
2083
- } else if (Array.isArray(value)) {
2084
- value = value.map((i) => encodeURIComponent(i));
2085
- } else if (typeof value === "string") {
2086
- value = encodeURIComponent(value);
2087
- }
2088
- if (!value) {
2089
- const isCatchall = dynamicParamType === "c";
2090
- const isOptionalCatchall = dynamicParamType === "oc";
2091
- if (isCatchall || isOptionalCatchall) {
2092
- if (isOptionalCatchall) {
2093
- return {
2094
- param: segmentKey,
2095
- value: null,
2096
- type: dynamicParamType,
2097
- treeSegment: [
2098
- segmentKey,
2099
- "",
2100
- dynamicParamType
2101
- ]
2102
- };
2103
- }
2104
- value = pagePath.split("/").slice(1).flatMap((pathSegment) => {
2105
- const param = parseParameter(pathSegment);
2106
- var _params_param_key;
2107
- return (_params_param_key = params[param.key]) != null ? _params_param_key : param.key;
2108
- });
2109
- return {
2110
- param: segmentKey,
2111
- value,
2112
- type: dynamicParamType,
2113
- // This value always has to be a string.
2114
- treeSegment: [
2115
- segmentKey,
2116
- value.join("/"),
2117
- dynamicParamType
2118
- ]
2119
- };
2120
- }
2121
- }
2122
- return {
2123
- param: segmentKey,
2124
- // The value that is passed to user code.
2125
- value,
2126
- // The value that is rendered in the router tree.
2127
- treeSegment: [
2128
- segmentKey,
2129
- Array.isArray(value) ? value.join("/") : value,
2130
- dynamicParamType
2131
- ],
2132
- type: dynamicParamType
2133
- };
2134
- }
2135
- var PARAMETER_PATTERN = /^([^[]*)\[((?:\[[^\]]*\])|[^\]]+)\](.*)$/;
2136
- function parseParameter(param) {
2137
- const match = param.match(PARAMETER_PATTERN);
2138
- if (!match) {
2139
- return parseMatchedParameter(param);
2140
- }
2141
- return parseMatchedParameter(match[2]);
2142
- }
2143
- function parseMatchedParameter(param) {
2144
- const optional = param.startsWith("[") && param.endsWith("]");
2145
- if (optional) {
2146
- param = param.slice(1, -1);
2147
- }
2148
- const repeat = param.startsWith("...");
2149
- if (repeat) {
2150
- param = param.slice(3);
2151
- }
2152
- return {
2153
- key: param,
2154
- repeat,
2155
- optional
2156
- };
2157
- }
2158
- }
2159
- });
2160
-
2161
- // ../../node_modules/next/dist/shared/lib/router/utils/route-regex.js
2162
- var require_route_regex = __commonJS({
2163
- "../../node_modules/next/dist/shared/lib/router/utils/route-regex.js"(exports2) {
2164
- "use strict";
2165
- Object.defineProperty(exports2, "__esModule", {
2166
- value: true
2167
- });
2168
- function _export(target, all) {
2169
- for (var name in all) Object.defineProperty(target, name, {
2170
- enumerable: true,
2171
- get: all[name]
2172
- });
2173
- }
2174
- _export(exports2, {
2175
- getNamedMiddlewareRegex: function() {
2176
- return getNamedMiddlewareRegex;
2177
- },
2178
- getNamedRouteRegex: function() {
2179
- return getNamedRouteRegex;
2180
- },
2181
- getRouteRegex: function() {
2182
- return getRouteRegex;
2183
- }
2184
- });
2185
- var _constants = require_constants();
2186
- var _interceptionroutes = require_interception_routes();
2187
- var _escaperegexp = require_escape_regexp();
2188
- var _removetrailingslash = require_remove_trailing_slash();
2189
- var _getdynamicparam = require_get_dynamic_param();
2190
- function getParametrizedRoute(route, includeSuffix, includePrefix) {
2191
- const groups = {};
2192
- let groupIndex = 1;
2193
- const segments = [];
2194
- for (const segment of (0, _removetrailingslash.removeTrailingSlash)(route).slice(1).split("/")) {
2195
- const markerMatch = _interceptionroutes.INTERCEPTION_ROUTE_MARKERS.find((m) => segment.startsWith(m));
2196
- const paramMatches = segment.match(_getdynamicparam.PARAMETER_PATTERN);
2197
- if (markerMatch && paramMatches && paramMatches[2]) {
2198
- const { key, optional, repeat } = (0, _getdynamicparam.parseMatchedParameter)(paramMatches[2]);
2199
- groups[key] = {
2200
- pos: groupIndex++,
2201
- repeat,
2202
- optional
2203
- };
2204
- segments.push("/" + (0, _escaperegexp.escapeStringRegexp)(markerMatch) + "([^/]+?)");
2205
- } else if (paramMatches && paramMatches[2]) {
2206
- const { key, repeat, optional } = (0, _getdynamicparam.parseMatchedParameter)(paramMatches[2]);
2207
- groups[key] = {
2208
- pos: groupIndex++,
2209
- repeat,
2210
- optional
2211
- };
2212
- if (includePrefix && paramMatches[1]) {
2213
- segments.push("/" + (0, _escaperegexp.escapeStringRegexp)(paramMatches[1]));
2214
- }
2215
- let s = repeat ? optional ? "(?:/(.+?))?" : "/(.+?)" : "/([^/]+?)";
2216
- if (includePrefix && paramMatches[1]) {
2217
- s = s.substring(1);
2218
- }
2219
- segments.push(s);
2220
- } else {
2221
- segments.push("/" + (0, _escaperegexp.escapeStringRegexp)(segment));
2222
- }
2223
- if (includeSuffix && paramMatches && paramMatches[3]) {
2224
- segments.push((0, _escaperegexp.escapeStringRegexp)(paramMatches[3]));
2225
- }
2226
- }
2227
- return {
2228
- parameterizedRoute: segments.join(""),
2229
- groups
2230
- };
2231
- }
2232
- function getRouteRegex(normalizedRoute, param) {
2233
- let { includeSuffix = false, includePrefix = false, excludeOptionalTrailingSlash = false } = param === void 0 ? {} : param;
2234
- const { parameterizedRoute, groups } = getParametrizedRoute(normalizedRoute, includeSuffix, includePrefix);
2235
- let re = parameterizedRoute;
2236
- if (!excludeOptionalTrailingSlash) {
2237
- re += "(?:/)?";
2238
- }
2239
- return {
2240
- re: new RegExp("^" + re + "$"),
2241
- groups
2242
- };
2243
- }
2244
- function buildGetSafeRouteKey() {
2245
- let i = 0;
2246
- return () => {
2247
- let routeKey = "";
2248
- let j = ++i;
2249
- while (j > 0) {
2250
- routeKey += String.fromCharCode(97 + (j - 1) % 26);
2251
- j = Math.floor((j - 1) / 26);
2252
- }
2253
- return routeKey;
2254
- };
2255
- }
2256
- function getSafeKeyFromSegment(param) {
2257
- let { interceptionMarker, getSafeRouteKey, segment, routeKeys, keyPrefix, backreferenceDuplicateKeys } = param;
2258
- const { key, optional, repeat } = (0, _getdynamicparam.parseMatchedParameter)(segment);
2259
- let cleanedKey = key.replace(/\W/g, "");
2260
- if (keyPrefix) {
2261
- cleanedKey = "" + keyPrefix + cleanedKey;
2262
- }
2263
- let invalidKey = false;
2264
- if (cleanedKey.length === 0 || cleanedKey.length > 30) {
2265
- invalidKey = true;
2266
- }
2267
- if (!isNaN(parseInt(cleanedKey.slice(0, 1)))) {
2268
- invalidKey = true;
2269
- }
2270
- if (invalidKey) {
2271
- cleanedKey = getSafeRouteKey();
2272
- }
2273
- const duplicateKey = cleanedKey in routeKeys;
2274
- if (keyPrefix) {
2275
- routeKeys[cleanedKey] = "" + keyPrefix + key;
2276
- } else {
2277
- routeKeys[cleanedKey] = key;
2278
- }
2279
- const interceptionPrefix = interceptionMarker ? (0, _escaperegexp.escapeStringRegexp)(interceptionMarker) : "";
2280
- let pattern;
2281
- if (duplicateKey && backreferenceDuplicateKeys) {
2282
- pattern = "\\k<" + cleanedKey + ">";
2283
- } else if (repeat) {
2284
- pattern = "(?<" + cleanedKey + ">.+?)";
2285
- } else {
2286
- pattern = "(?<" + cleanedKey + ">[^/]+?)";
2287
- }
2288
- return optional ? "(?:/" + interceptionPrefix + pattern + ")?" : "/" + interceptionPrefix + pattern;
2289
- }
2290
- function getNamedParametrizedRoute(route, prefixRouteKeys, includeSuffix, includePrefix, backreferenceDuplicateKeys) {
2291
- const getSafeRouteKey = buildGetSafeRouteKey();
2292
- const routeKeys = {};
2293
- const segments = [];
2294
- for (const segment of (0, _removetrailingslash.removeTrailingSlash)(route).slice(1).split("/")) {
2295
- const hasInterceptionMarker = _interceptionroutes.INTERCEPTION_ROUTE_MARKERS.some((m) => segment.startsWith(m));
2296
- const paramMatches = segment.match(_getdynamicparam.PARAMETER_PATTERN);
2297
- if (hasInterceptionMarker && paramMatches && paramMatches[2]) {
2298
- segments.push(getSafeKeyFromSegment({
2299
- getSafeRouteKey,
2300
- interceptionMarker: paramMatches[1],
2301
- segment: paramMatches[2],
2302
- routeKeys,
2303
- keyPrefix: prefixRouteKeys ? _constants.NEXT_INTERCEPTION_MARKER_PREFIX : void 0,
2304
- backreferenceDuplicateKeys
2305
- }));
2306
- } else if (paramMatches && paramMatches[2]) {
2307
- if (includePrefix && paramMatches[1]) {
2308
- segments.push("/" + (0, _escaperegexp.escapeStringRegexp)(paramMatches[1]));
2309
- }
2310
- let s = getSafeKeyFromSegment({
2311
- getSafeRouteKey,
2312
- segment: paramMatches[2],
2313
- routeKeys,
2314
- keyPrefix: prefixRouteKeys ? _constants.NEXT_QUERY_PARAM_PREFIX : void 0,
2315
- backreferenceDuplicateKeys
2316
- });
2317
- if (includePrefix && paramMatches[1]) {
2318
- s = s.substring(1);
2319
- }
2320
- segments.push(s);
2321
- } else {
2322
- segments.push("/" + (0, _escaperegexp.escapeStringRegexp)(segment));
2323
- }
2324
- if (includeSuffix && paramMatches && paramMatches[3]) {
2325
- segments.push((0, _escaperegexp.escapeStringRegexp)(paramMatches[3]));
2326
- }
2327
- }
2328
- return {
2329
- namedParameterizedRoute: segments.join(""),
2330
- routeKeys
2331
- };
2332
- }
2333
- function getNamedRouteRegex(normalizedRoute, options) {
2334
- var _options_includeSuffix, _options_includePrefix, _options_backreferenceDuplicateKeys;
2335
- const result = getNamedParametrizedRoute(normalizedRoute, options.prefixRouteKeys, (_options_includeSuffix = options.includeSuffix) != null ? _options_includeSuffix : false, (_options_includePrefix = options.includePrefix) != null ? _options_includePrefix : false, (_options_backreferenceDuplicateKeys = options.backreferenceDuplicateKeys) != null ? _options_backreferenceDuplicateKeys : false);
2336
- let namedRegex = result.namedParameterizedRoute;
2337
- if (!options.excludeOptionalTrailingSlash) {
2338
- namedRegex += "(?:/)?";
2339
- }
2340
- return {
2341
- ...getRouteRegex(normalizedRoute, options),
2342
- namedRegex: "^" + namedRegex + "$",
2343
- routeKeys: result.routeKeys
2344
- };
2345
- }
2346
- function getNamedMiddlewareRegex(normalizedRoute, options) {
2347
- const { parameterizedRoute } = getParametrizedRoute(normalizedRoute, false, false);
2348
- const { catchAll = true } = options;
2349
- if (parameterizedRoute === "/") {
2350
- let catchAllRegex = catchAll ? ".*" : "";
2351
- return {
2352
- namedRegex: "^/" + catchAllRegex + "$"
2353
- };
2354
- }
2355
- const { namedParameterizedRoute } = getNamedParametrizedRoute(normalizedRoute, false, false, false, false);
2356
- let catchAllGroupedRegex = catchAll ? "(?:(/.*)?)" : "";
2357
- return {
2358
- namedRegex: "^" + namedParameterizedRoute + catchAllGroupedRegex + "$"
2359
- };
2360
- }
2361
- }
2362
- });
2363
-
2364
- // ../../node_modules/next/dist/shared/lib/router/utils/interpolate-as.js
2365
- var require_interpolate_as = __commonJS({
2366
- "../../node_modules/next/dist/shared/lib/router/utils/interpolate-as.js"(exports2) {
2367
- "use strict";
2368
- Object.defineProperty(exports2, "__esModule", {
2369
- value: true
2370
- });
2371
- Object.defineProperty(exports2, "interpolateAs", {
2372
- enumerable: true,
2373
- get: function() {
2374
- return interpolateAs;
2375
- }
2376
- });
2377
- var _routematcher = require_route_matcher();
2378
- var _routeregex = require_route_regex();
2379
- function interpolateAs(route, asPathname, query) {
2380
- let interpolatedRoute = "";
2381
- const dynamicRegex = (0, _routeregex.getRouteRegex)(route);
2382
- const dynamicGroups = dynamicRegex.groups;
2383
- const dynamicMatches = (
2384
- // Try to match the dynamic route against the asPath
2385
- (asPathname !== route ? (0, _routematcher.getRouteMatcher)(dynamicRegex)(asPathname) : "") || // Fall back to reading the values from the href
2386
- // TODO: should this take priority; also need to change in the router.
2387
- query
2388
- );
2389
- interpolatedRoute = route;
2390
- const params = Object.keys(dynamicGroups);
2391
- if (!params.every((param) => {
2392
- let value = dynamicMatches[param] || "";
2393
- const { repeat, optional } = dynamicGroups[param];
2394
- let replaced = "[" + (repeat ? "..." : "") + param + "]";
2395
- if (optional) {
2396
- replaced = (!value ? "/" : "") + "[" + replaced + "]";
2397
- }
2398
- if (repeat && !Array.isArray(value)) value = [
2399
- value
2400
- ];
2401
- return (optional || param in dynamicMatches) && // Interpolate group into data URL if present
2402
- (interpolatedRoute = interpolatedRoute.replace(replaced, repeat ? value.map(
2403
- // these values should be fully encoded instead of just
2404
- // path delimiter escaped since they are being inserted
2405
- // into the URL and we expect URL encoded segments
2406
- // when parsing dynamic route params
2407
- (segment) => encodeURIComponent(segment)
2408
- ).join("/") : encodeURIComponent(value)) || "/");
2409
- })) {
2410
- interpolatedRoute = "";
2411
- }
2412
- return {
2413
- params,
2414
- result: interpolatedRoute
2415
- };
2416
- }
2417
- }
2418
- });
2419
-
2420
- // ../../node_modules/next/dist/client/resolve-href.js
2421
- var require_resolve_href = __commonJS({
2422
- "../../node_modules/next/dist/client/resolve-href.js"(exports2, module2) {
2423
- "use strict";
2424
- Object.defineProperty(exports2, "__esModule", {
2425
- value: true
2426
- });
2427
- Object.defineProperty(exports2, "resolveHref", {
2428
- enumerable: true,
2429
- get: function() {
2430
- return resolveHref;
2431
- }
2432
- });
2433
- var _querystring = require_querystring();
2434
- var _formaturl = require_format_url();
2435
- var _omit = require_omit();
2436
- var _utils = require_utils();
2437
- var _normalizetrailingslash = require_normalize_trailing_slash();
2438
- var _islocalurl = require_is_local_url();
2439
- var _utils1 = require_utils2();
2440
- var _interpolateas = require_interpolate_as();
2441
- var _routeregex = require_route_regex();
2442
- var _routematcher = require_route_matcher();
2443
- function resolveHref(router, href, resolveAs) {
2444
- let base;
2445
- let urlAsString = typeof href === "string" ? href : (0, _formaturl.formatWithValidation)(href);
2446
- const urlProtoMatch = urlAsString.match(/^[a-z][a-z0-9+.-]*:\/\//i);
2447
- const urlAsStringNoProto = urlProtoMatch ? urlAsString.slice(urlProtoMatch[0].length) : urlAsString;
2448
- const urlParts = urlAsStringNoProto.split("?", 1);
2449
- if ((urlParts[0] || "").match(/(\/\/|\\)/)) {
2450
- console.error("Invalid href '" + urlAsString + "' passed to next/router in page: '" + router.pathname + "'. Repeated forward-slashes (//) or backslashes \\ are not valid in the href.");
2451
- const normalizedUrl = (0, _utils.normalizeRepeatedSlashes)(urlAsStringNoProto);
2452
- urlAsString = (urlProtoMatch ? urlProtoMatch[0] : "") + normalizedUrl;
2453
- }
2454
- if (!(0, _islocalurl.isLocalURL)(urlAsString)) {
2455
- return resolveAs ? [
2456
- urlAsString
2457
- ] : urlAsString;
2458
- }
2459
- try {
2460
- let baseBase = urlAsString.startsWith("#") ? router.asPath : router.pathname;
2461
- if (urlAsString.startsWith("?")) {
2462
- baseBase = router.asPath;
2463
- if ((0, _utils1.isDynamicRoute)(router.pathname)) {
2464
- baseBase = router.pathname;
2465
- const routeRegex = (0, _routeregex.getRouteRegex)(router.pathname);
2466
- const match = (0, _routematcher.getRouteMatcher)(routeRegex)(router.asPath);
2467
- if (!match) {
2468
- baseBase = router.asPath;
2469
- }
2470
- }
2471
- }
2472
- base = new URL(baseBase, "http://n");
2473
- } catch (_) {
2474
- base = new URL("/", "http://n");
2475
- }
2476
- try {
2477
- const finalUrl = new URL(urlAsString, base);
2478
- finalUrl.pathname = (0, _normalizetrailingslash.normalizePathTrailingSlash)(finalUrl.pathname);
2479
- let interpolatedAs = "";
2480
- if ((0, _utils1.isDynamicRoute)(finalUrl.pathname) && finalUrl.searchParams && resolveAs) {
2481
- const query = (0, _querystring.searchParamsToUrlQuery)(finalUrl.searchParams);
2482
- const { result, params } = (0, _interpolateas.interpolateAs)(finalUrl.pathname, finalUrl.pathname, query);
2483
- if (result) {
2484
- interpolatedAs = (0, _formaturl.formatWithValidation)({
2485
- pathname: result,
2486
- hash: finalUrl.hash,
2487
- query: (0, _omit.omit)(query, params)
2488
- });
2489
- }
2490
- }
2491
- const resolvedHref = finalUrl.origin === base.origin ? finalUrl.href.slice(finalUrl.origin.length) : finalUrl.href;
2492
- return resolveAs ? [
2493
- resolvedHref,
2494
- interpolatedAs || resolvedHref
2495
- ] : resolvedHref;
2496
- } catch (_) {
2497
- return resolveAs ? [
2498
- urlAsString
2499
- ] : urlAsString;
2500
- }
2501
- }
2502
- if ((typeof exports2.default === "function" || typeof exports2.default === "object" && exports2.default !== null) && typeof exports2.default.__esModule === "undefined") {
2503
- Object.defineProperty(exports2.default, "__esModule", { value: true });
2504
- Object.assign(exports2.default, exports2);
2505
- module2.exports = exports2.default;
2506
- }
2507
- }
2508
- });
2509
-
2510
- // ../../node_modules/next/dist/shared/lib/router/utils/add-path-prefix.js
2511
- var require_add_path_prefix = __commonJS({
2512
- "../../node_modules/next/dist/shared/lib/router/utils/add-path-prefix.js"(exports2) {
2513
- "use strict";
2514
- Object.defineProperty(exports2, "__esModule", {
2515
- value: true
2516
- });
2517
- Object.defineProperty(exports2, "addPathPrefix", {
2518
- enumerable: true,
2519
- get: function() {
2520
- return addPathPrefix;
2521
- }
2522
- });
2523
- var _parsepath = require_parse_path();
2524
- function addPathPrefix(path, prefix) {
2525
- if (!path.startsWith("/") || !prefix) {
2526
- return path;
2527
- }
2528
- const { pathname, query, hash } = (0, _parsepath.parsePath)(path);
2529
- return "" + prefix + pathname + query + hash;
2530
- }
2531
- }
2532
- });
2533
-
2534
- // ../../node_modules/next/dist/shared/lib/router/utils/add-locale.js
2535
- var require_add_locale = __commonJS({
2536
- "../../node_modules/next/dist/shared/lib/router/utils/add-locale.js"(exports2) {
2537
- "use strict";
2538
- Object.defineProperty(exports2, "__esModule", {
2539
- value: true
2540
- });
2541
- Object.defineProperty(exports2, "addLocale", {
2542
- enumerable: true,
2543
- get: function() {
2544
- return addLocale;
2545
- }
2546
- });
2547
- var _addpathprefix = require_add_path_prefix();
2548
- var _pathhasprefix = require_path_has_prefix();
2549
- function addLocale(path, locale, defaultLocale, ignorePrefix) {
2550
- if (!locale || locale === defaultLocale) return path;
2551
- const lower = path.toLowerCase();
2552
- if (!ignorePrefix) {
2553
- if ((0, _pathhasprefix.pathHasPrefix)(lower, "/api")) return path;
2554
- if ((0, _pathhasprefix.pathHasPrefix)(lower, "/" + locale.toLowerCase())) return path;
2555
- }
2556
- return (0, _addpathprefix.addPathPrefix)(path, "/" + locale);
2557
- }
2558
- }
2559
- });
2560
-
2561
- // ../../node_modules/next/dist/client/add-locale.js
2562
- var require_add_locale2 = __commonJS({
2563
- "../../node_modules/next/dist/client/add-locale.js"(exports2, module2) {
2564
- "use strict";
2565
- Object.defineProperty(exports2, "__esModule", {
2566
- value: true
2567
- });
2568
- Object.defineProperty(exports2, "addLocale", {
2569
- enumerable: true,
2570
- get: function() {
2571
- return addLocale;
2572
- }
2573
- });
2574
- var _normalizetrailingslash = require_normalize_trailing_slash();
2575
- var addLocale = function(path) {
2576
- for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
2577
- args[_key - 1] = arguments[_key];
2578
- }
2579
- if (process.env.__NEXT_I18N_SUPPORT) {
2580
- return (0, _normalizetrailingslash.normalizePathTrailingSlash)(require_add_locale().addLocale(path, ...args));
2581
- }
2582
- return path;
2583
- };
2584
- if ((typeof exports2.default === "function" || typeof exports2.default === "object" && exports2.default !== null) && typeof exports2.default.__esModule === "undefined") {
2585
- Object.defineProperty(exports2.default, "__esModule", { value: true });
2586
- Object.assign(exports2.default, exports2);
2587
- module2.exports = exports2.default;
2588
- }
2589
- }
2590
- });
2591
-
2592
- // ../../node_modules/@swc/helpers/cjs/_interop_require_default.cjs
2593
- var require_interop_require_default = __commonJS({
2594
- "../../node_modules/@swc/helpers/cjs/_interop_require_default.cjs"(exports2) {
2595
- "use strict";
2596
- function _interop_require_default(obj) {
2597
- return obj && obj.__esModule ? obj : { default: obj };
2598
- }
2599
- exports2._ = _interop_require_default;
2600
- }
2601
- });
2602
-
2603
- // ../../node_modules/next/dist/shared/lib/router-context.shared-runtime.js
2604
- var require_router_context_shared_runtime = __commonJS({
2605
- "../../node_modules/next/dist/shared/lib/router-context.shared-runtime.js"(exports2) {
2606
- "use strict";
2607
- Object.defineProperty(exports2, "__esModule", {
2608
- value: true
2609
- });
2610
- Object.defineProperty(exports2, "RouterContext", {
2611
- enumerable: true,
2612
- get: function() {
2613
- return RouterContext;
2614
- }
2615
- });
2616
- var _interop_require_default = require_interop_require_default();
2617
- var _react = /* @__PURE__ */ _interop_require_default._(require("react"));
2618
- var RouterContext = _react.default.createContext(null);
2619
- if (process.env.NODE_ENV !== "production") {
2620
- RouterContext.displayName = "RouterContext";
2621
- }
2622
- }
2623
- });
2624
-
2625
- // ../../node_modules/next/dist/client/request-idle-callback.js
2626
- var require_request_idle_callback = __commonJS({
2627
- "../../node_modules/next/dist/client/request-idle-callback.js"(exports2, module2) {
2628
- "use strict";
2629
- Object.defineProperty(exports2, "__esModule", {
2630
- value: true
2631
- });
2632
- function _export(target, all) {
2633
- for (var name in all) Object.defineProperty(target, name, {
2634
- enumerable: true,
2635
- get: all[name]
2636
- });
2637
- }
2638
- _export(exports2, {
2639
- cancelIdleCallback: function() {
2640
- return cancelIdleCallback;
2641
- },
2642
- requestIdleCallback: function() {
2643
- return requestIdleCallback;
2644
- }
2645
- });
2646
- var requestIdleCallback = typeof self !== "undefined" && self.requestIdleCallback && self.requestIdleCallback.bind(window) || function(cb) {
2647
- let start = Date.now();
2648
- return self.setTimeout(function() {
2649
- cb({
2650
- didTimeout: false,
2651
- timeRemaining: function() {
2652
- return Math.max(0, 50 - (Date.now() - start));
2653
- }
2654
- });
2655
- }, 1);
2656
- };
2657
- var cancelIdleCallback = typeof self !== "undefined" && self.cancelIdleCallback && self.cancelIdleCallback.bind(window) || function(id) {
2658
- return clearTimeout(id);
2659
- };
2660
- if ((typeof exports2.default === "function" || typeof exports2.default === "object" && exports2.default !== null) && typeof exports2.default.__esModule === "undefined") {
2661
- Object.defineProperty(exports2.default, "__esModule", { value: true });
2662
- Object.assign(exports2.default, exports2);
2663
- module2.exports = exports2.default;
2664
- }
2665
- }
2666
- });
2667
-
2668
- // ../../node_modules/next/dist/client/use-intersection.js
2669
- var require_use_intersection = __commonJS({
2670
- "../../node_modules/next/dist/client/use-intersection.js"(exports2, module2) {
2671
- "use strict";
2672
- Object.defineProperty(exports2, "__esModule", {
2673
- value: true
2674
- });
2675
- Object.defineProperty(exports2, "useIntersection", {
2676
- enumerable: true,
2677
- get: function() {
2678
- return useIntersection;
2679
- }
2680
- });
2681
- var _react = require("react");
2682
- var _requestidlecallback = require_request_idle_callback();
2683
- var hasIntersectionObserver = typeof IntersectionObserver === "function";
2684
- var observers = /* @__PURE__ */ new Map();
2685
- var idList = [];
2686
- function createObserver(options) {
2687
- const id = {
2688
- root: options.root || null,
2689
- margin: options.rootMargin || ""
2690
- };
2691
- const existing = idList.find((obj) => obj.root === id.root && obj.margin === id.margin);
2692
- let instance;
2693
- if (existing) {
2694
- instance = observers.get(existing);
2695
- if (instance) {
2696
- return instance;
2697
- }
2698
- }
2699
- const elements = /* @__PURE__ */ new Map();
2700
- const observer = new IntersectionObserver((entries) => {
2701
- entries.forEach((entry) => {
2702
- const callback = elements.get(entry.target);
2703
- const isVisible = entry.isIntersecting || entry.intersectionRatio > 0;
2704
- if (callback && isVisible) {
2705
- callback(isVisible);
2706
- }
2707
- });
2708
- }, options);
2709
- instance = {
2710
- id,
2711
- observer,
2712
- elements
2713
- };
2714
- idList.push(id);
2715
- observers.set(id, instance);
2716
- return instance;
2717
- }
2718
- function observe(element, callback, options) {
2719
- const { id, observer, elements } = createObserver(options);
2720
- elements.set(element, callback);
2721
- observer.observe(element);
2722
- return function unobserve() {
2723
- elements.delete(element);
2724
- observer.unobserve(element);
2725
- if (elements.size === 0) {
2726
- observer.disconnect();
2727
- observers.delete(id);
2728
- const index = idList.findIndex((obj) => obj.root === id.root && obj.margin === id.margin);
2729
- if (index > -1) {
2730
- idList.splice(index, 1);
2731
- }
2732
- }
2733
- };
2734
- }
2735
- function useIntersection(param) {
2736
- let { rootRef, rootMargin, disabled } = param;
2737
- const isDisabled = disabled || !hasIntersectionObserver;
2738
- const [visible, setVisible] = (0, _react.useState)(false);
2739
- const elementRef = (0, _react.useRef)(null);
2740
- const setElement = (0, _react.useCallback)((element) => {
2741
- elementRef.current = element;
2742
- }, []);
2743
- (0, _react.useEffect)(() => {
2744
- if (hasIntersectionObserver) {
2745
- if (isDisabled || visible) return;
2746
- const element = elementRef.current;
2747
- if (element && element.tagName) {
2748
- const unobserve = observe(element, (isVisible) => isVisible && setVisible(isVisible), {
2749
- root: rootRef == null ? void 0 : rootRef.current,
2750
- rootMargin
2751
- });
2752
- return unobserve;
2753
- }
2754
- } else {
2755
- if (!visible) {
2756
- const idleCallback = (0, _requestidlecallback.requestIdleCallback)(() => setVisible(true));
2757
- return () => (0, _requestidlecallback.cancelIdleCallback)(idleCallback);
2758
- }
2759
- }
2760
- }, [
2761
- isDisabled,
2762
- rootMargin,
2763
- rootRef,
2764
- visible,
2765
- elementRef.current
2766
- ]);
2767
- const resetVisible = (0, _react.useCallback)(() => {
2768
- setVisible(false);
2769
- }, []);
2770
- return [
2771
- setElement,
2772
- visible,
2773
- resetVisible
2774
- ];
2775
- }
2776
- if ((typeof exports2.default === "function" || typeof exports2.default === "object" && exports2.default !== null) && typeof exports2.default.__esModule === "undefined") {
2777
- Object.defineProperty(exports2.default, "__esModule", { value: true });
2778
- Object.assign(exports2.default, exports2);
2779
- module2.exports = exports2.default;
2780
- }
2781
- }
2782
- });
2783
-
2784
- // ../../node_modules/next/dist/shared/lib/i18n/normalize-locale-path.js
2785
- var require_normalize_locale_path = __commonJS({
2786
- "../../node_modules/next/dist/shared/lib/i18n/normalize-locale-path.js"(exports2) {
2787
- "use strict";
2788
- Object.defineProperty(exports2, "__esModule", {
2789
- value: true
2790
- });
2791
- Object.defineProperty(exports2, "normalizeLocalePath", {
2792
- enumerable: true,
2793
- get: function() {
2794
- return normalizeLocalePath;
2795
- }
2796
- });
2797
- var cache = /* @__PURE__ */ new WeakMap();
2798
- function normalizeLocalePath(pathname, locales) {
2799
- if (!locales) return {
2800
- pathname
2801
- };
2802
- let lowercasedLocales = cache.get(locales);
2803
- if (!lowercasedLocales) {
2804
- lowercasedLocales = locales.map((locale) => locale.toLowerCase());
2805
- cache.set(locales, lowercasedLocales);
2806
- }
2807
- let detectedLocale;
2808
- const segments = pathname.split("/", 2);
2809
- if (!segments[1]) return {
2810
- pathname
2811
- };
2812
- const segment = segments[1].toLowerCase();
2813
- const index = lowercasedLocales.indexOf(segment);
2814
- if (index < 0) return {
2815
- pathname
2816
- };
2817
- detectedLocale = locales[index];
2818
- pathname = pathname.slice(detectedLocale.length + 1) || "/";
2819
- return {
2820
- pathname,
2821
- detectedLocale
2822
- };
2823
- }
2824
- }
2825
- });
2826
-
2827
- // ../../node_modules/next/dist/client/normalize-locale-path.js
2828
- var require_normalize_locale_path2 = __commonJS({
2829
- "../../node_modules/next/dist/client/normalize-locale-path.js"(exports2, module2) {
2830
- "use strict";
2831
- Object.defineProperty(exports2, "__esModule", {
2832
- value: true
2833
- });
2834
- Object.defineProperty(exports2, "normalizeLocalePath", {
2835
- enumerable: true,
2836
- get: function() {
2837
- return normalizeLocalePath;
2838
- }
2839
- });
2840
- var normalizeLocalePath = (pathname, locales) => {
2841
- if (process.env.__NEXT_I18N_SUPPORT) {
2842
- return require_normalize_locale_path().normalizeLocalePath(pathname, locales);
2843
- }
2844
- return {
2845
- pathname,
2846
- detectedLocale: void 0
2847
- };
2848
- };
2849
- if ((typeof exports2.default === "function" || typeof exports2.default === "object" && exports2.default !== null) && typeof exports2.default.__esModule === "undefined") {
2850
- Object.defineProperty(exports2.default, "__esModule", { value: true });
2851
- Object.assign(exports2.default, exports2);
2852
- module2.exports = exports2.default;
2853
- }
2854
- }
2855
- });
2856
-
2857
- // ../../node_modules/next/dist/shared/lib/i18n/detect-domain-locale.js
2858
- var require_detect_domain_locale = __commonJS({
2859
- "../../node_modules/next/dist/shared/lib/i18n/detect-domain-locale.js"(exports2) {
2860
- "use strict";
2861
- Object.defineProperty(exports2, "__esModule", {
2862
- value: true
2863
- });
2864
- Object.defineProperty(exports2, "detectDomainLocale", {
2865
- enumerable: true,
2866
- get: function() {
2867
- return detectDomainLocale;
2868
- }
2869
- });
2870
- function detectDomainLocale(domainItems, hostname, detectedLocale) {
2871
- if (!domainItems) return;
2872
- if (detectedLocale) {
2873
- detectedLocale = detectedLocale.toLowerCase();
2874
- }
2875
- for (const item of domainItems) {
2876
- var _item_domain, _item_locales;
2877
- const domainHostname = (_item_domain = item.domain) == null ? void 0 : _item_domain.split(":", 1)[0].toLowerCase();
2878
- if (hostname === domainHostname || detectedLocale === item.defaultLocale.toLowerCase() || ((_item_locales = item.locales) == null ? void 0 : _item_locales.some((locale) => locale.toLowerCase() === detectedLocale))) {
2879
- return item;
2880
- }
2881
- }
2882
- }
2883
- }
2884
- });
2885
-
2886
- // ../../node_modules/next/dist/client/detect-domain-locale.js
2887
- var require_detect_domain_locale2 = __commonJS({
2888
- "../../node_modules/next/dist/client/detect-domain-locale.js"(exports2, module2) {
2889
- "use strict";
2890
- Object.defineProperty(exports2, "__esModule", {
2891
- value: true
2892
- });
2893
- Object.defineProperty(exports2, "detectDomainLocale", {
2894
- enumerable: true,
2895
- get: function() {
2896
- return detectDomainLocale;
2897
- }
2898
- });
2899
- var detectDomainLocale = function() {
2900
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
2901
- args[_key] = arguments[_key];
2902
- }
2903
- if (process.env.__NEXT_I18N_SUPPORT) {
2904
- return require_detect_domain_locale().detectDomainLocale(...args);
2905
- }
2906
- };
2907
- if ((typeof exports2.default === "function" || typeof exports2.default === "object" && exports2.default !== null) && typeof exports2.default.__esModule === "undefined") {
2908
- Object.defineProperty(exports2.default, "__esModule", { value: true });
2909
- Object.assign(exports2.default, exports2);
2910
- module2.exports = exports2.default;
2911
- }
2912
- }
2913
- });
2914
-
2915
- // ../../node_modules/next/dist/client/get-domain-locale.js
2916
- var require_get_domain_locale = __commonJS({
2917
- "../../node_modules/next/dist/client/get-domain-locale.js"(exports2, module2) {
2918
- "use strict";
2919
- Object.defineProperty(exports2, "__esModule", {
2920
- value: true
2921
- });
2922
- Object.defineProperty(exports2, "getDomainLocale", {
2923
- enumerable: true,
2924
- get: function() {
2925
- return getDomainLocale;
2926
- }
2927
- });
2928
- var _normalizetrailingslash = require_normalize_trailing_slash();
2929
- var basePath = process.env.__NEXT_ROUTER_BASEPATH || "";
2930
- function getDomainLocale(path, locale, locales, domainLocales) {
2931
- if (process.env.__NEXT_I18N_SUPPORT) {
2932
- const normalizeLocalePath = require_normalize_locale_path2().normalizeLocalePath;
2933
- const detectDomainLocale = require_detect_domain_locale2().detectDomainLocale;
2934
- const target = locale || normalizeLocalePath(path, locales).detectedLocale;
2935
- const domain = detectDomainLocale(domainLocales, void 0, target);
2936
- if (domain) {
2937
- const proto = "http" + (domain.http ? "" : "s") + "://";
2938
- const finalLocale = target === domain.defaultLocale ? "" : "/" + target;
2939
- return "" + proto + domain.domain + (0, _normalizetrailingslash.normalizePathTrailingSlash)("" + basePath + finalLocale + path);
2940
- }
2941
- return false;
2942
- } else {
2943
- return false;
2944
- }
2945
- }
2946
- if ((typeof exports2.default === "function" || typeof exports2.default === "object" && exports2.default !== null) && typeof exports2.default.__esModule === "undefined") {
2947
- Object.defineProperty(exports2.default, "__esModule", { value: true });
2948
- Object.assign(exports2.default, exports2);
2949
- module2.exports = exports2.default;
2950
- }
2951
- }
2952
- });
2953
-
2954
- // ../../node_modules/next/dist/client/add-base-path.js
2955
- var require_add_base_path = __commonJS({
2956
- "../../node_modules/next/dist/client/add-base-path.js"(exports2, module2) {
2957
- "use strict";
2958
- Object.defineProperty(exports2, "__esModule", {
2959
- value: true
2960
- });
2961
- Object.defineProperty(exports2, "addBasePath", {
2962
- enumerable: true,
2963
- get: function() {
2964
- return addBasePath;
2965
- }
2966
- });
2967
- var _addpathprefix = require_add_path_prefix();
2968
- var _normalizetrailingslash = require_normalize_trailing_slash();
2969
- var basePath = process.env.__NEXT_ROUTER_BASEPATH || "";
2970
- function addBasePath(path, required) {
2971
- return (0, _normalizetrailingslash.normalizePathTrailingSlash)(process.env.__NEXT_MANUAL_CLIENT_BASE_PATH && !required ? path : (0, _addpathprefix.addPathPrefix)(path, basePath));
2972
- }
2973
- if ((typeof exports2.default === "function" || typeof exports2.default === "object" && exports2.default !== null) && typeof exports2.default.__esModule === "undefined") {
2974
- Object.defineProperty(exports2.default, "__esModule", { value: true });
2975
- Object.assign(exports2.default, exports2);
2976
- module2.exports = exports2.default;
2977
- }
2978
- }
2979
- });
2980
-
2981
- // ../../node_modules/next/dist/client/use-merged-ref.js
2982
- var require_use_merged_ref = __commonJS({
2983
- "../../node_modules/next/dist/client/use-merged-ref.js"(exports2, module2) {
2984
- "use strict";
2985
- Object.defineProperty(exports2, "__esModule", {
2986
- value: true
2987
- });
2988
- Object.defineProperty(exports2, "useMergedRef", {
2989
- enumerable: true,
2990
- get: function() {
2991
- return useMergedRef;
2992
- }
2993
- });
2994
- var _react = require("react");
2995
- function useMergedRef(refA, refB) {
2996
- const cleanupA = (0, _react.useRef)(null);
2997
- const cleanupB = (0, _react.useRef)(null);
2998
- return (0, _react.useCallback)((current) => {
2999
- if (current === null) {
3000
- const cleanupFnA = cleanupA.current;
3001
- if (cleanupFnA) {
3002
- cleanupA.current = null;
3003
- cleanupFnA();
3004
- }
3005
- const cleanupFnB = cleanupB.current;
3006
- if (cleanupFnB) {
3007
- cleanupB.current = null;
3008
- cleanupFnB();
3009
- }
3010
- } else {
3011
- if (refA) {
3012
- cleanupA.current = applyRef(refA, current);
3013
- }
3014
- if (refB) {
3015
- cleanupB.current = applyRef(refB, current);
3016
- }
3017
- }
3018
- }, [
3019
- refA,
3020
- refB
3021
- ]);
3022
- }
3023
- function applyRef(refA, current) {
3024
- if (typeof refA === "function") {
3025
- const cleanup = refA(current);
3026
- if (typeof cleanup === "function") {
3027
- return cleanup;
3028
- } else {
3029
- return () => refA(null);
3030
- }
3031
- } else {
3032
- refA.current = current;
3033
- return () => {
3034
- refA.current = null;
3035
- };
3036
- }
3037
- }
3038
- if ((typeof exports2.default === "function" || typeof exports2.default === "object" && exports2.default !== null) && typeof exports2.default.__esModule === "undefined") {
3039
- Object.defineProperty(exports2.default, "__esModule", { value: true });
3040
- Object.assign(exports2.default, exports2);
3041
- module2.exports = exports2.default;
3042
- }
3043
- }
3044
- });
3045
-
3046
- // ../../node_modules/next/dist/shared/lib/utils/error-once.js
3047
- var require_error_once = __commonJS({
3048
- "../../node_modules/next/dist/shared/lib/utils/error-once.js"(exports2) {
3049
- "use strict";
3050
- Object.defineProperty(exports2, "__esModule", {
3051
- value: true
3052
- });
3053
- Object.defineProperty(exports2, "errorOnce", {
3054
- enumerable: true,
3055
- get: function() {
3056
- return errorOnce;
3057
- }
3058
- });
3059
- var errorOnce = (_) => {
3060
- };
3061
- if (process.env.NODE_ENV !== "production") {
3062
- const errors = /* @__PURE__ */ new Set();
3063
- errorOnce = (msg) => {
3064
- if (!errors.has(msg)) {
3065
- console.error(msg);
3066
- }
3067
- errors.add(msg);
3068
- };
3069
- }
3070
- }
3071
- });
3072
-
3073
- // ../../node_modules/next/dist/client/link.js
3074
- var require_link = __commonJS({
3075
- "../../node_modules/next/dist/client/link.js"(exports2, module2) {
3076
- "use strict";
3077
- "use client";
3078
- Object.defineProperty(exports2, "__esModule", {
3079
- value: true
3080
- });
3081
- function _export(target, all) {
3082
- for (var name in all) Object.defineProperty(target, name, {
3083
- enumerable: true,
3084
- get: all[name]
3085
- });
3086
- }
3087
- _export(exports2, {
3088
- default: function() {
3089
- return _default;
3090
- },
3091
- useLinkStatus: function() {
3092
- return useLinkStatus;
3093
- }
3094
- });
3095
- var _interop_require_wildcard = require_interop_require_wildcard();
3096
- var _jsxruntime = require("react/jsx-runtime");
3097
- var _react = /* @__PURE__ */ _interop_require_wildcard._(require("react"));
3098
- var _resolvehref = require_resolve_href();
3099
- var _islocalurl = require_is_local_url();
3100
- var _formaturl = require_format_url();
3101
- var _utils = require_utils();
3102
- var _addlocale = require_add_locale2();
3103
- var _routercontextsharedruntime = require_router_context_shared_runtime();
3104
- var _useintersection = require_use_intersection();
3105
- var _getdomainlocale = require_get_domain_locale();
3106
- var _addbasepath = require_add_base_path();
3107
- var _usemergedref = require_use_merged_ref();
3108
- var _erroronce = require_error_once();
3109
- var prefetched = /* @__PURE__ */ new Set();
3110
- function prefetch(router, href, as, options) {
3111
- if (typeof window === "undefined") {
3112
- return;
3113
- }
3114
- if (!(0, _islocalurl.isLocalURL)(href)) {
3115
- return;
3116
- }
3117
- if (!options.bypassPrefetchedCheck) {
3118
- const locale = (
3119
- // Let the link's locale prop override the default router locale.
3120
- typeof options.locale !== "undefined" ? options.locale : "locale" in router ? router.locale : void 0
3121
- );
3122
- const prefetchedKey = href + "%" + as + "%" + locale;
3123
- if (prefetched.has(prefetchedKey)) {
3124
- return;
3125
- }
3126
- prefetched.add(prefetchedKey);
3127
- }
3128
- router.prefetch(href, as, options).catch((err) => {
3129
- if (process.env.NODE_ENV !== "production") {
3130
- throw err;
3131
- }
3132
- });
3133
- }
3134
- function isModifiedEvent(event) {
3135
- const eventTarget = event.currentTarget;
3136
- const target = eventTarget.getAttribute("target");
3137
- return target && target !== "_self" || event.metaKey || event.ctrlKey || event.shiftKey || event.altKey || // triggers resource download
3138
- event.nativeEvent && event.nativeEvent.which === 2;
3139
- }
3140
- function linkClicked(e, router, href, as, replace, shallow, scroll, locale, onNavigate) {
3141
- const { nodeName } = e.currentTarget;
3142
- const isAnchorNodeName = nodeName.toUpperCase() === "A";
3143
- if (isAnchorNodeName && isModifiedEvent(e) || e.currentTarget.hasAttribute("download")) {
3144
- return;
3145
- }
3146
- if (!(0, _islocalurl.isLocalURL)(href)) {
3147
- if (replace) {
3148
- e.preventDefault();
3149
- location.replace(href);
3150
- }
3151
- return;
3152
- }
3153
- e.preventDefault();
3154
- const navigate = () => {
3155
- if (onNavigate) {
3156
- let isDefaultPrevented = false;
3157
- onNavigate({
3158
- preventDefault: () => {
3159
- isDefaultPrevented = true;
3160
- }
3161
- });
3162
- if (isDefaultPrevented) {
3163
- return;
3164
- }
3165
- }
3166
- const routerScroll = scroll != null ? scroll : true;
3167
- if ("beforePopState" in router) {
3168
- router[replace ? "replace" : "push"](href, as, {
3169
- shallow,
3170
- locale,
3171
- scroll: routerScroll
3172
- });
3173
- } else {
3174
- router[replace ? "replace" : "push"](as || href, {
3175
- scroll: routerScroll
3176
- });
3177
- }
3178
- };
3179
- navigate();
3180
- }
3181
- function formatStringOrUrl(urlObjOrString) {
3182
- if (typeof urlObjOrString === "string") {
3183
- return urlObjOrString;
3184
- }
3185
- return (0, _formaturl.formatUrl)(urlObjOrString);
3186
- }
3187
- var Link2 = /* @__PURE__ */ _react.default.forwardRef(function LinkComponent(props, forwardedRef) {
3188
- let children;
3189
- const { href: hrefProp, as: asProp, children: childrenProp, prefetch: prefetchProp = null, passHref, replace, shallow, scroll, locale, onClick, onNavigate, onMouseEnter: onMouseEnterProp, onTouchStart: onTouchStartProp, legacyBehavior = false, ...restProps } = props;
3190
- children = childrenProp;
3191
- if (legacyBehavior && (typeof children === "string" || typeof children === "number")) {
3192
- children = /* @__PURE__ */ (0, _jsxruntime.jsx)("a", {
3193
- children
3194
- });
3195
- }
3196
- const router = _react.default.useContext(_routercontextsharedruntime.RouterContext);
3197
- const prefetchEnabled = prefetchProp !== false;
3198
- if (process.env.NODE_ENV !== "production") {
3199
- let createPropError = function(args) {
3200
- return Object.defineProperty(new Error("Failed prop type: The prop `" + args.key + "` expects a " + args.expected + " in `<Link>`, but got `" + args.actual + "` instead." + (typeof window !== "undefined" ? "\nOpen your browser's console to view the Component stack trace." : "")), "__NEXT_ERROR_CODE", {
3201
- value: "E319",
3202
- enumerable: false,
3203
- configurable: true
3204
- });
3205
- };
3206
- const requiredPropsGuard = {
3207
- href: true
3208
- };
3209
- const requiredProps = Object.keys(requiredPropsGuard);
3210
- requiredProps.forEach((key) => {
3211
- if (key === "href") {
3212
- if (props[key] == null || typeof props[key] !== "string" && typeof props[key] !== "object") {
3213
- throw createPropError({
3214
- key,
3215
- expected: "`string` or `object`",
3216
- actual: props[key] === null ? "null" : typeof props[key]
3217
- });
3218
- }
3219
- } else {
3220
- const _ = key;
3221
- }
3222
- });
3223
- const optionalPropsGuard = {
3224
- as: true,
3225
- replace: true,
3226
- scroll: true,
3227
- shallow: true,
3228
- passHref: true,
3229
- prefetch: true,
3230
- locale: true,
3231
- onClick: true,
3232
- onMouseEnter: true,
3233
- onTouchStart: true,
3234
- legacyBehavior: true,
3235
- onNavigate: true
3236
- };
3237
- const optionalProps = Object.keys(optionalPropsGuard);
3238
- optionalProps.forEach((key) => {
3239
- const valType = typeof props[key];
3240
- if (key === "as") {
3241
- if (props[key] && valType !== "string" && valType !== "object") {
3242
- throw createPropError({
3243
- key,
3244
- expected: "`string` or `object`",
3245
- actual: valType
3246
- });
3247
- }
3248
- } else if (key === "locale") {
3249
- if (props[key] && valType !== "string") {
3250
- throw createPropError({
3251
- key,
3252
- expected: "`string`",
3253
- actual: valType
3254
- });
3255
- }
3256
- } else if (key === "onClick" || key === "onMouseEnter" || key === "onTouchStart" || key === "onNavigate") {
3257
- if (props[key] && valType !== "function") {
3258
- throw createPropError({
3259
- key,
3260
- expected: "`function`",
3261
- actual: valType
3262
- });
3263
- }
3264
- } else if (key === "replace" || key === "scroll" || key === "shallow" || key === "passHref" || key === "legacyBehavior") {
3265
- if (props[key] != null && valType !== "boolean") {
3266
- throw createPropError({
3267
- key,
3268
- expected: "`boolean`",
3269
- actual: valType
3270
- });
3271
- }
3272
- } else if (key === "prefetch") {
3273
- if (props[key] != null && valType !== "boolean" && props[key] !== "auto") {
3274
- throw createPropError({
3275
- key,
3276
- expected: '`boolean | "auto"`',
3277
- actual: valType
3278
- });
3279
- }
3280
- } else {
3281
- const _ = key;
3282
- }
3283
- });
3284
- }
3285
- const { href, as } = _react.default.useMemo(() => {
3286
- if (!router) {
3287
- const resolvedHref2 = formatStringOrUrl(hrefProp);
3288
- return {
3289
- href: resolvedHref2,
3290
- as: asProp ? formatStringOrUrl(asProp) : resolvedHref2
3291
- };
3292
- }
3293
- const [resolvedHref, resolvedAs] = (0, _resolvehref.resolveHref)(router, hrefProp, true);
3294
- return {
3295
- href: resolvedHref,
3296
- as: asProp ? (0, _resolvehref.resolveHref)(router, asProp) : resolvedAs || resolvedHref
3297
- };
3298
- }, [
3299
- router,
3300
- hrefProp,
3301
- asProp
3302
- ]);
3303
- const previousHref = _react.default.useRef(href);
3304
- const previousAs = _react.default.useRef(as);
3305
- let child;
3306
- if (legacyBehavior) {
3307
- if (process.env.NODE_ENV === "development") {
3308
- if (onClick) {
3309
- console.warn('"onClick" was passed to <Link> with `href` of `' + hrefProp + '` but "legacyBehavior" was set. The legacy behavior requires onClick be set on the child of next/link');
3310
- }
3311
- if (onMouseEnterProp) {
3312
- console.warn('"onMouseEnter" was passed to <Link> with `href` of `' + hrefProp + '` but "legacyBehavior" was set. The legacy behavior requires onMouseEnter be set on the child of next/link');
3313
- }
3314
- try {
3315
- child = _react.default.Children.only(children);
3316
- } catch (err) {
3317
- if (!children) {
3318
- throw Object.defineProperty(new Error("No children were passed to <Link> with `href` of `" + hrefProp + "` but one child is required https://nextjs.org/docs/messages/link-no-children"), "__NEXT_ERROR_CODE", {
3319
- value: "E320",
3320
- enumerable: false,
3321
- configurable: true
3322
- });
3323
- }
3324
- throw Object.defineProperty(new Error("Multiple children were passed to <Link> with `href` of `" + hrefProp + "` but only one child is supported https://nextjs.org/docs/messages/link-multiple-children" + (typeof window !== "undefined" ? " \nOpen your browser's console to view the Component stack trace." : "")), "__NEXT_ERROR_CODE", {
3325
- value: "E266",
3326
- enumerable: false,
3327
- configurable: true
3328
- });
3329
- }
3330
- } else {
3331
- child = _react.default.Children.only(children);
3332
- }
3333
- } else {
3334
- if (process.env.NODE_ENV === "development") {
3335
- if ((children == null ? void 0 : children.type) === "a") {
3336
- throw Object.defineProperty(new Error("Invalid <Link> with <a> child. Please remove <a> or use <Link legacyBehavior>.\nLearn more: https://nextjs.org/docs/messages/invalid-new-link-with-extra-anchor"), "__NEXT_ERROR_CODE", {
3337
- value: "E209",
3338
- enumerable: false,
3339
- configurable: true
3340
- });
3341
- }
3342
- }
3343
- }
3344
- const childRef = legacyBehavior ? child && typeof child === "object" && child.ref : forwardedRef;
3345
- const [setIntersectionRef, isVisible, resetVisible] = (0, _useintersection.useIntersection)({
3346
- rootMargin: "200px"
3347
- });
3348
- const setIntersectionWithResetRef = _react.default.useCallback((el) => {
3349
- if (previousAs.current !== as || previousHref.current !== href) {
3350
- resetVisible();
3351
- previousAs.current = as;
3352
- previousHref.current = href;
3353
- }
3354
- setIntersectionRef(el);
3355
- }, [
3356
- as,
3357
- href,
3358
- resetVisible,
3359
- setIntersectionRef
3360
- ]);
3361
- const setRef = (0, _usemergedref.useMergedRef)(setIntersectionWithResetRef, childRef);
3362
- _react.default.useEffect(() => {
3363
- if (process.env.NODE_ENV !== "production") {
3364
- return;
3365
- }
3366
- if (!router) {
3367
- return;
3368
- }
3369
- if (!isVisible || !prefetchEnabled) {
3370
- return;
3371
- }
3372
- prefetch(router, href, as, {
3373
- locale
3374
- });
3375
- }, [
3376
- as,
3377
- href,
3378
- isVisible,
3379
- locale,
3380
- prefetchEnabled,
3381
- router == null ? void 0 : router.locale,
3382
- router
3383
- ]);
3384
- const childProps = {
3385
- ref: setRef,
3386
- onClick(e) {
3387
- if (process.env.NODE_ENV !== "production") {
3388
- if (!e) {
3389
- throw Object.defineProperty(new Error('Component rendered inside next/link has to pass click event to "onClick" prop.'), "__NEXT_ERROR_CODE", {
3390
- value: "E312",
3391
- enumerable: false,
3392
- configurable: true
3393
- });
3394
- }
3395
- }
3396
- if (!legacyBehavior && typeof onClick === "function") {
3397
- onClick(e);
3398
- }
3399
- if (legacyBehavior && child.props && typeof child.props.onClick === "function") {
3400
- child.props.onClick(e);
3401
- }
3402
- if (!router) {
3403
- return;
3404
- }
3405
- if (e.defaultPrevented) {
3406
- return;
3407
- }
3408
- linkClicked(e, router, href, as, replace, shallow, scroll, locale, onNavigate);
3409
- },
3410
- onMouseEnter(e) {
3411
- if (!legacyBehavior && typeof onMouseEnterProp === "function") {
3412
- onMouseEnterProp(e);
3413
- }
3414
- if (legacyBehavior && child.props && typeof child.props.onMouseEnter === "function") {
3415
- child.props.onMouseEnter(e);
3416
- }
3417
- if (!router) {
3418
- return;
3419
- }
3420
- prefetch(router, href, as, {
3421
- locale,
3422
- priority: true,
3423
- // @see {https://github.com/vercel/next.js/discussions/40268?sort=top#discussioncomment-3572642}
3424
- bypassPrefetchedCheck: true
3425
- });
3426
- },
3427
- onTouchStart: process.env.__NEXT_LINK_NO_TOUCH_START ? void 0 : function onTouchStart(e) {
3428
- if (!legacyBehavior && typeof onTouchStartProp === "function") {
3429
- onTouchStartProp(e);
3430
- }
3431
- if (legacyBehavior && child.props && typeof child.props.onTouchStart === "function") {
3432
- child.props.onTouchStart(e);
3433
- }
3434
- if (!router) {
3435
- return;
3436
- }
3437
- prefetch(router, href, as, {
3438
- locale,
3439
- priority: true,
3440
- // @see {https://github.com/vercel/next.js/discussions/40268?sort=top#discussioncomment-3572642}
3441
- bypassPrefetchedCheck: true
3442
- });
3443
- }
3444
- };
3445
- if ((0, _utils.isAbsoluteUrl)(as)) {
3446
- childProps.href = as;
3447
- } else if (!legacyBehavior || passHref || child.type === "a" && !("href" in child.props)) {
3448
- const curLocale = typeof locale !== "undefined" ? locale : router == null ? void 0 : router.locale;
3449
- const localeDomain = (router == null ? void 0 : router.isLocaleDomain) && (0, _getdomainlocale.getDomainLocale)(as, curLocale, router == null ? void 0 : router.locales, router == null ? void 0 : router.domainLocales);
3450
- childProps.href = localeDomain || (0, _addbasepath.addBasePath)((0, _addlocale.addLocale)(as, curLocale, router == null ? void 0 : router.defaultLocale));
3451
- }
3452
- if (legacyBehavior) {
3453
- if (process.env.NODE_ENV === "development") {
3454
- (0, _erroronce.errorOnce)("`legacyBehavior` is deprecated and will be removed in a future release. A codemod is available to upgrade your components:\n\nnpx @next/codemod@latest new-link .\n\nLearn more: https://nextjs.org/docs/app/building-your-application/upgrading/codemods#remove-a-tags-from-link-components");
3455
- }
3456
- return /* @__PURE__ */ _react.default.cloneElement(child, childProps);
3457
- }
3458
- return /* @__PURE__ */ (0, _jsxruntime.jsx)("a", {
3459
- ...restProps,
3460
- ...childProps,
3461
- children
3462
- });
3463
- });
3464
- var LinkStatusContext = /* @__PURE__ */ (0, _react.createContext)({
3465
- // We do not support link status in the Pages Router, so we always return false
3466
- pending: false
3467
- });
3468
- var useLinkStatus = () => {
3469
- return (0, _react.useContext)(LinkStatusContext);
3470
- };
3471
- var _default = Link2;
3472
- if ((typeof exports2.default === "function" || typeof exports2.default === "object" && exports2.default !== null) && typeof exports2.default.__esModule === "undefined") {
3473
- Object.defineProperty(exports2.default, "__esModule", { value: true });
3474
- Object.assign(exports2.default, exports2);
3475
- module2.exports = exports2.default;
3476
- }
3477
- }
3478
- });
3479
-
3480
- // ../../node_modules/next/link.js
3481
- var require_link2 = __commonJS({
3482
- "../../node_modules/next/link.js"(exports2, module2) {
3483
- "use strict";
3484
- module2.exports = require_link();
3485
- }
3486
- });
3487
-
3488
30
  // src/index.tsx
3489
31
  var index_exports = {};
3490
32
  __export(index_exports, {
@@ -3656,7 +198,7 @@ function ArrowDownIcon() {
3656
198
  }
3657
199
 
3658
200
  // src/container/index.tsx
3659
- var import_link = __toESM(require_link2());
201
+ var import_link = __toESM(require("next/link"));
3660
202
  var import_jsx_runtime4 = require("react/jsx-runtime");
3661
203
  function Container({
3662
204
  children,
@@ -38009,6 +34551,7 @@ function Table3({
38009
34551
  }
38010
34552
 
38011
34553
  // src/pop/index.tsx
34554
+ var import_entrypoints = require("next/dist/server/route-modules/app-page/vendored/rsc/entrypoints");
38012
34555
  var import_react16 = require("react");
38013
34556
  var import_jsx_runtime28 = require("react/jsx-runtime");
38014
34557
  var COLOR_CONFIG = {
@@ -38089,6 +34632,18 @@ function usePopup() {
38089
34632
  });
38090
34633
  });
38091
34634
  }
34635
+ function modal(content, color = "primary") {
34636
+ return new Promise((resolve) => {
34637
+ setPopup({
34638
+ type: "modal",
34639
+ message: content,
34640
+ visible: true,
34641
+ inputValue: "",
34642
+ onConfirm: () => resolve(),
34643
+ color
34644
+ });
34645
+ });
34646
+ }
38092
34647
  function confirm(message, color = "primary") {
38093
34648
  return new Promise((resolve) => {
38094
34649
  setPopup({
@@ -38154,7 +34709,7 @@ function usePopup() {
38154
34709
  children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: `text-xl font-bold ${c.iconText}`, children: c.label })
38155
34710
  }
38156
34711
  ),
38157
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("p", { className: "text-gray-800 text-[15px] font-medium leading-snug", children: popup.message })
34712
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("p", { className: "text-gray-800 text-[15px] font-medium leading-snug", children: popup.type == "modal" && import_entrypoints.React.isValidElement(popup.message) ? import_entrypoints.React.cloneElement(popup.message, { hide: close }) : popup.message })
38158
34713
  ] }),
38159
34714
  popup.type === "prompt" && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "px-8 pb-2", children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
38160
34715
  "input",
@@ -38174,7 +34729,7 @@ function usePopup() {
38174
34729
  }
38175
34730
  ) }),
38176
34731
  /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: `border-t ${c.border} mx-0 mt-4` }),
38177
- /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "flex gap-2 px-6 py-4 justify-end", children: [
34732
+ popup.type != "modal" && /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "flex gap-2 px-6 py-4 justify-end", children: [
38178
34733
  (popup.type === "confirm" || popup.type === "prompt") && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
38179
34734
  "button",
38180
34735
  {