maquinaweb-ui 2.45.0 → 2.45.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/SystemSwitcherClient-BdrsMlaF.js +3482 -0
- package/dist/SystemSwitcherClient-BdrsMlaF.js.map +1 -0
- package/dist/{button-gwL9KI3Y.js → button-DnQZXb45.js} +2 -2
- package/dist/{button-gwL9KI3Y.js.map → button-DnQZXb45.js.map} +1 -1
- package/dist/container-animation.d.ts +2 -2
- package/dist/container-animation.js +1 -1
- package/dist/date-field.d.ts +2 -2
- package/dist/date-field.d.ts.map +1 -1
- package/dist/date-field.js +6 -6
- package/dist/{input-help-D1JqF0YH.js → input-help-BqUOABJL.js} +3 -3
- package/dist/{input-help-D1JqF0YH.js.map → input-help-BqUOABJL.js.map} +1 -1
- package/dist/input-suggest.d.ts +3 -3
- package/dist/input-suggest.d.ts.map +1 -1
- package/dist/input-suggest.js +6 -6
- package/dist/{input-Bs61WBGW.js → input-t_PMoxhA.js} +2 -2
- package/dist/{input-Bs61WBGW.js.map → input-t_PMoxhA.js.map} +1 -1
- package/dist/{label-Bkg7B2j8.js → label-Dups7OHw.js} +2 -2
- package/dist/{label-Bkg7B2j8.js.map → label-Dups7OHw.js.map} +1 -1
- package/dist/page-header.d.ts +2 -2
- package/dist/page-header.js +3 -3
- package/dist/{popover-BQgd_AEd.js → popover-QIIEGl4K.js} +2 -2
- package/dist/{popover-BQgd_AEd.js.map → popover-QIIEGl4K.js.map} +1 -1
- package/dist/remote-selector.d.ts +3 -3
- package/dist/remote-selector.js +6 -6
- package/dist/{scroll-area-C1kW_eA9.js → scroll-area-DF-8-fNu.js} +2 -2
- package/dist/{scroll-area-C1kW_eA9.js.map → scroll-area-DF-8-fNu.js.map} +1 -1
- package/dist/split-text-poor.d.ts.map +1 -1
- package/dist/split-text-poor.js +1 -1
- package/dist/system-switcher-client.d.ts +24 -0
- package/dist/system-switcher-client.d.ts.map +1 -0
- package/dist/system-switcher-client.js +5 -0
- package/dist/system-switcher.d.ts +4 -23
- package/dist/system-switcher.d.ts.map +1 -1
- package/dist/system-switcher.js +11 -3486
- package/dist/system-switcher.js.map +1 -1
- package/dist/text-field.d.ts +1 -1
- package/dist/text-field.js +4 -4
- package/dist/toggle-field.d.ts +2 -2
- package/dist/toggle-field.js +2 -2
- package/dist/{utils-C8_amEgK.js → utils-VsyQIiNl.js} +1 -1
- package/dist/{utils-C8_amEgK.js.map → utils-VsyQIiNl.js.map} +1 -1
- package/dist/{with-mask-Chm8kVE1.d.ts → with-mask-BLZS7b9k.d.ts} +1 -1
- package/dist/with-mask-BLZS7b9k.d.ts.map +1 -0
- package/package.json +5 -1
- package/dist/with-mask-Chm8kVE1.d.ts.map +0 -1
|
@@ -0,0 +1,3482 @@
|
|
|
1
|
+
import { n as PopoverContent, r as PopoverTrigger, t as Popover } from "./popover-QIIEGl4K.js";
|
|
2
|
+
import { createRequire } from "node:module";
|
|
3
|
+
import { useState } from "react";
|
|
4
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
import { ChevronsUpDown, Lock } from "lucide-react";
|
|
6
|
+
|
|
7
|
+
//#region rolldown:runtime
|
|
8
|
+
var __create = Object.create;
|
|
9
|
+
var __defProp = Object.defineProperty;
|
|
10
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
11
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
12
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
13
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
14
|
+
var __commonJS = (cb, mod) => function() {
|
|
15
|
+
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
16
|
+
};
|
|
17
|
+
var __copyProps = (to, from, except, desc) => {
|
|
18
|
+
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
19
|
+
key = keys[i];
|
|
20
|
+
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
21
|
+
get: ((k) => from[k]).bind(null, key),
|
|
22
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
return to;
|
|
26
|
+
};
|
|
27
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
28
|
+
value: mod,
|
|
29
|
+
enumerable: true
|
|
30
|
+
}) : target, mod));
|
|
31
|
+
var __require = /* @__PURE__ */ createRequire(import.meta.url);
|
|
32
|
+
|
|
33
|
+
//#endregion
|
|
34
|
+
//#region node_modules/@swc/helpers/cjs/_interop_require_default.cjs
|
|
35
|
+
var require__interop_require_default = /* @__PURE__ */ __commonJS({ "node_modules/@swc/helpers/cjs/_interop_require_default.cjs": ((exports) => {
|
|
36
|
+
function _interop_require_default$3(obj) {
|
|
37
|
+
return obj && obj.__esModule ? obj : { default: obj };
|
|
38
|
+
}
|
|
39
|
+
exports._ = _interop_require_default$3;
|
|
40
|
+
}) });
|
|
41
|
+
|
|
42
|
+
//#endregion
|
|
43
|
+
//#region node_modules/next/dist/shared/lib/utils/warn-once.js
|
|
44
|
+
var require_warn_once = /* @__PURE__ */ __commonJS({ "node_modules/next/dist/shared/lib/utils/warn-once.js": ((exports) => {
|
|
45
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
46
|
+
Object.defineProperty(exports, "warnOnce", {
|
|
47
|
+
enumerable: true,
|
|
48
|
+
get: function() {
|
|
49
|
+
return warnOnce;
|
|
50
|
+
}
|
|
51
|
+
});
|
|
52
|
+
let warnOnce = (_) => {};
|
|
53
|
+
if (process.env.NODE_ENV !== "production") {
|
|
54
|
+
const warnings = /* @__PURE__ */ new Set();
|
|
55
|
+
warnOnce = (msg) => {
|
|
56
|
+
if (!warnings.has(msg)) console.warn(msg);
|
|
57
|
+
warnings.add(msg);
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
}) });
|
|
61
|
+
|
|
62
|
+
//#endregion
|
|
63
|
+
//#region node_modules/next/dist/shared/lib/deployment-id.js
|
|
64
|
+
var require_deployment_id = /* @__PURE__ */ __commonJS({ "node_modules/next/dist/shared/lib/deployment-id.js": ((exports) => {
|
|
65
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
66
|
+
function _export$5(target, all) {
|
|
67
|
+
for (var name in all) Object.defineProperty(target, name, {
|
|
68
|
+
enumerable: true,
|
|
69
|
+
get: all[name]
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
_export$5(exports, {
|
|
73
|
+
getDeploymentId: function() {
|
|
74
|
+
return getDeploymentId;
|
|
75
|
+
},
|
|
76
|
+
getDeploymentIdQueryOrEmptyString: function() {
|
|
77
|
+
return getDeploymentIdQueryOrEmptyString;
|
|
78
|
+
}
|
|
79
|
+
});
|
|
80
|
+
let deploymentId;
|
|
81
|
+
if (typeof window !== "undefined") {
|
|
82
|
+
deploymentId = document.documentElement.dataset.dplId;
|
|
83
|
+
delete document.documentElement.dataset.dplId;
|
|
84
|
+
} else deploymentId = process.env.NEXT_DEPLOYMENT_ID || void 0;
|
|
85
|
+
function getDeploymentId() {
|
|
86
|
+
return deploymentId;
|
|
87
|
+
}
|
|
88
|
+
function getDeploymentIdQueryOrEmptyString() {
|
|
89
|
+
if (deploymentId) return `?dpl=${deploymentId}`;
|
|
90
|
+
return "";
|
|
91
|
+
}
|
|
92
|
+
}) });
|
|
93
|
+
|
|
94
|
+
//#endregion
|
|
95
|
+
//#region node_modules/next/dist/shared/lib/image-blur-svg.js
|
|
96
|
+
var require_image_blur_svg = /* @__PURE__ */ __commonJS({ "node_modules/next/dist/shared/lib/image-blur-svg.js": ((exports) => {
|
|
97
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
98
|
+
Object.defineProperty(exports, "getImageBlurSvg", {
|
|
99
|
+
enumerable: true,
|
|
100
|
+
get: function() {
|
|
101
|
+
return getImageBlurSvg;
|
|
102
|
+
}
|
|
103
|
+
});
|
|
104
|
+
function getImageBlurSvg({ widthInt, heightInt, blurWidth, blurHeight, blurDataURL, objectFit }) {
|
|
105
|
+
const std = 20;
|
|
106
|
+
const svgWidth = blurWidth ? blurWidth * 40 : widthInt;
|
|
107
|
+
const svgHeight = blurHeight ? blurHeight * 40 : heightInt;
|
|
108
|
+
const viewBox = svgWidth && svgHeight ? `viewBox='0 0 ${svgWidth} ${svgHeight}'` : "";
|
|
109
|
+
return `%3Csvg xmlns='http://www.w3.org/2000/svg' ${viewBox}%3E%3Cfilter id='b' color-interpolation-filters='sRGB'%3E%3CfeGaussianBlur stdDeviation='${std}'/%3E%3CfeColorMatrix values='1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 100 -1' result='s'/%3E%3CfeFlood x='0' y='0' width='100%25' height='100%25'/%3E%3CfeComposite operator='out' in='s'/%3E%3CfeComposite in2='SourceGraphic'/%3E%3CfeGaussianBlur stdDeviation='${std}'/%3E%3C/filter%3E%3Cimage width='100%25' height='100%25' x='0' y='0' preserveAspectRatio='${viewBox ? "none" : objectFit === "contain" ? "xMidYMid" : objectFit === "cover" ? "xMidYMid slice" : "none"}' style='filter: url(%23b);' href='${blurDataURL}'/%3E%3C/svg%3E`;
|
|
110
|
+
}
|
|
111
|
+
}) });
|
|
112
|
+
|
|
113
|
+
//#endregion
|
|
114
|
+
//#region node_modules/next/dist/shared/lib/image-config.js
|
|
115
|
+
var require_image_config = /* @__PURE__ */ __commonJS({ "node_modules/next/dist/shared/lib/image-config.js": ((exports) => {
|
|
116
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
117
|
+
function _export$4(target, all) {
|
|
118
|
+
for (var name in all) Object.defineProperty(target, name, {
|
|
119
|
+
enumerable: true,
|
|
120
|
+
get: all[name]
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
_export$4(exports, {
|
|
124
|
+
VALID_LOADERS: function() {
|
|
125
|
+
return VALID_LOADERS;
|
|
126
|
+
},
|
|
127
|
+
imageConfigDefault: function() {
|
|
128
|
+
return imageConfigDefault;
|
|
129
|
+
}
|
|
130
|
+
});
|
|
131
|
+
const VALID_LOADERS = [
|
|
132
|
+
"default",
|
|
133
|
+
"imgix",
|
|
134
|
+
"cloudinary",
|
|
135
|
+
"akamai",
|
|
136
|
+
"custom"
|
|
137
|
+
];
|
|
138
|
+
const imageConfigDefault = {
|
|
139
|
+
deviceSizes: [
|
|
140
|
+
640,
|
|
141
|
+
750,
|
|
142
|
+
828,
|
|
143
|
+
1080,
|
|
144
|
+
1200,
|
|
145
|
+
1920,
|
|
146
|
+
2048,
|
|
147
|
+
3840
|
|
148
|
+
],
|
|
149
|
+
imageSizes: [
|
|
150
|
+
32,
|
|
151
|
+
48,
|
|
152
|
+
64,
|
|
153
|
+
96,
|
|
154
|
+
128,
|
|
155
|
+
256,
|
|
156
|
+
384
|
|
157
|
+
],
|
|
158
|
+
path: "/_next/image",
|
|
159
|
+
loader: "default",
|
|
160
|
+
loaderFile: "",
|
|
161
|
+
domains: [],
|
|
162
|
+
disableStaticImages: false,
|
|
163
|
+
minimumCacheTTL: 14400,
|
|
164
|
+
formats: ["image/webp"],
|
|
165
|
+
maximumRedirects: 3,
|
|
166
|
+
maximumResponseBody: 5e7,
|
|
167
|
+
dangerouslyAllowLocalIP: false,
|
|
168
|
+
dangerouslyAllowSVG: false,
|
|
169
|
+
contentSecurityPolicy: `script-src 'none'; frame-src 'none'; sandbox;`,
|
|
170
|
+
contentDispositionType: "attachment",
|
|
171
|
+
localPatterns: void 0,
|
|
172
|
+
remotePatterns: [],
|
|
173
|
+
qualities: [75],
|
|
174
|
+
unoptimized: false,
|
|
175
|
+
customCacheHandler: false
|
|
176
|
+
};
|
|
177
|
+
}) });
|
|
178
|
+
|
|
179
|
+
//#endregion
|
|
180
|
+
//#region node_modules/next/dist/shared/lib/get-img-props.js
|
|
181
|
+
var require_get_img_props = /* @__PURE__ */ __commonJS({ "node_modules/next/dist/shared/lib/get-img-props.js": ((exports) => {
|
|
182
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
183
|
+
Object.defineProperty(exports, "getImgProps", {
|
|
184
|
+
enumerable: true,
|
|
185
|
+
get: function() {
|
|
186
|
+
return getImgProps;
|
|
187
|
+
}
|
|
188
|
+
});
|
|
189
|
+
const _warnonce$2 = require_warn_once();
|
|
190
|
+
const _deploymentid$1 = require_deployment_id();
|
|
191
|
+
const _imageblursvg = require_image_blur_svg();
|
|
192
|
+
const _imageconfig$2 = require_image_config();
|
|
193
|
+
const VALID_LOADING_VALUES = [
|
|
194
|
+
"lazy",
|
|
195
|
+
"eager",
|
|
196
|
+
void 0
|
|
197
|
+
];
|
|
198
|
+
const INVALID_BACKGROUND_SIZE_VALUES = [
|
|
199
|
+
"-moz-initial",
|
|
200
|
+
"fill",
|
|
201
|
+
"none",
|
|
202
|
+
"scale-down",
|
|
203
|
+
void 0
|
|
204
|
+
];
|
|
205
|
+
function isStaticRequire(src) {
|
|
206
|
+
return src.default !== void 0;
|
|
207
|
+
}
|
|
208
|
+
function isStaticImageData(src) {
|
|
209
|
+
return src.src !== void 0;
|
|
210
|
+
}
|
|
211
|
+
function isStaticImport(src) {
|
|
212
|
+
return !!src && typeof src === "object" && (isStaticRequire(src) || isStaticImageData(src));
|
|
213
|
+
}
|
|
214
|
+
const allImgs = /* @__PURE__ */ new Map();
|
|
215
|
+
let perfObserver;
|
|
216
|
+
function getInt(x) {
|
|
217
|
+
if (typeof x === "undefined") return x;
|
|
218
|
+
if (typeof x === "number") return Number.isFinite(x) ? x : NaN;
|
|
219
|
+
if (typeof x === "string" && /^[0-9]+$/.test(x)) return parseInt(x, 10);
|
|
220
|
+
return NaN;
|
|
221
|
+
}
|
|
222
|
+
function getWidths({ deviceSizes, allSizes }, width, sizes) {
|
|
223
|
+
if (sizes) {
|
|
224
|
+
const viewportWidthRe = /(^|\s)(1?\d?\d)vw/g;
|
|
225
|
+
const percentSizes = [];
|
|
226
|
+
for (let match; match = viewportWidthRe.exec(sizes);) percentSizes.push(parseInt(match[2]));
|
|
227
|
+
if (percentSizes.length) {
|
|
228
|
+
const smallestRatio = Math.min(...percentSizes) * .01;
|
|
229
|
+
return {
|
|
230
|
+
widths: allSizes.filter((s) => s >= deviceSizes[0] * smallestRatio),
|
|
231
|
+
kind: "w"
|
|
232
|
+
};
|
|
233
|
+
}
|
|
234
|
+
return {
|
|
235
|
+
widths: allSizes,
|
|
236
|
+
kind: "w"
|
|
237
|
+
};
|
|
238
|
+
}
|
|
239
|
+
if (typeof width !== "number") return {
|
|
240
|
+
widths: deviceSizes,
|
|
241
|
+
kind: "w"
|
|
242
|
+
};
|
|
243
|
+
return {
|
|
244
|
+
widths: [...new Set([width, width * 2].map((w) => allSizes.find((p) => p >= w) || allSizes[allSizes.length - 1]))],
|
|
245
|
+
kind: "x"
|
|
246
|
+
};
|
|
247
|
+
}
|
|
248
|
+
function generateImgAttrs({ config, src, unoptimized, width, quality, sizes, loader }) {
|
|
249
|
+
if (unoptimized) {
|
|
250
|
+
const deploymentId$1 = (0, _deploymentid$1.getDeploymentId)();
|
|
251
|
+
if (src.startsWith("/") && !src.startsWith("//") && deploymentId$1) {
|
|
252
|
+
const sep = src.includes("?") ? "&" : "?";
|
|
253
|
+
src = `${src}${sep}dpl=${deploymentId$1}`;
|
|
254
|
+
}
|
|
255
|
+
return {
|
|
256
|
+
src,
|
|
257
|
+
srcSet: void 0,
|
|
258
|
+
sizes: void 0
|
|
259
|
+
};
|
|
260
|
+
}
|
|
261
|
+
const { widths, kind } = getWidths(config, width, sizes);
|
|
262
|
+
const last = widths.length - 1;
|
|
263
|
+
return {
|
|
264
|
+
sizes: !sizes && kind === "w" ? "100vw" : sizes,
|
|
265
|
+
srcSet: widths.map((w, i) => `${loader({
|
|
266
|
+
config,
|
|
267
|
+
src,
|
|
268
|
+
quality,
|
|
269
|
+
width: w
|
|
270
|
+
})} ${kind === "w" ? w : i + 1}${kind}`).join(", "),
|
|
271
|
+
src: loader({
|
|
272
|
+
config,
|
|
273
|
+
src,
|
|
274
|
+
quality,
|
|
275
|
+
width: widths[last]
|
|
276
|
+
})
|
|
277
|
+
};
|
|
278
|
+
}
|
|
279
|
+
function getImgProps({ src, sizes, unoptimized = false, priority = false, preload = false, loading, className, quality, width, height, fill = false, style, overrideSrc, onLoad, onLoadingComplete, placeholder = "empty", blurDataURL, fetchPriority, decoding = "async", layout, objectFit, objectPosition, lazyBoundary, lazyRoot,...rest }, _state) {
|
|
280
|
+
const { imgConf, showAltText, blurComplete, defaultLoader: defaultLoader$1 } = _state;
|
|
281
|
+
let config;
|
|
282
|
+
let c = imgConf || _imageconfig$2.imageConfigDefault;
|
|
283
|
+
if ("allSizes" in c) config = c;
|
|
284
|
+
else {
|
|
285
|
+
const allSizes = [...c.deviceSizes, ...c.imageSizes].sort((a, b) => a - b);
|
|
286
|
+
const deviceSizes = c.deviceSizes.sort((a, b) => a - b);
|
|
287
|
+
const qualities = c.qualities?.sort((a, b) => a - b);
|
|
288
|
+
config = {
|
|
289
|
+
...c,
|
|
290
|
+
allSizes,
|
|
291
|
+
deviceSizes,
|
|
292
|
+
qualities
|
|
293
|
+
};
|
|
294
|
+
}
|
|
295
|
+
if (typeof defaultLoader$1 === "undefined") throw Object.defineProperty(/* @__PURE__ */ new Error("images.loaderFile detected but the file is missing default export.\nRead more: https://nextjs.org/docs/messages/invalid-images-config"), "__NEXT_ERROR_CODE", {
|
|
296
|
+
value: "E163",
|
|
297
|
+
enumerable: false,
|
|
298
|
+
configurable: true
|
|
299
|
+
});
|
|
300
|
+
let loader = rest.loader || defaultLoader$1;
|
|
301
|
+
delete rest.loader;
|
|
302
|
+
delete rest.srcSet;
|
|
303
|
+
const isDefaultLoader = "__next_img_default" in loader;
|
|
304
|
+
if (isDefaultLoader) {
|
|
305
|
+
if (config.loader === "custom") throw Object.defineProperty(/* @__PURE__ */ new Error(`Image with src "${src}" is missing "loader" prop.\nRead more: https://nextjs.org/docs/messages/next-image-missing-loader`), "__NEXT_ERROR_CODE", {
|
|
306
|
+
value: "E252",
|
|
307
|
+
enumerable: false,
|
|
308
|
+
configurable: true
|
|
309
|
+
});
|
|
310
|
+
} else {
|
|
311
|
+
const customImageLoader = loader;
|
|
312
|
+
loader = (obj) => {
|
|
313
|
+
const { config: _,...opts } = obj;
|
|
314
|
+
return customImageLoader(opts);
|
|
315
|
+
};
|
|
316
|
+
}
|
|
317
|
+
if (layout) {
|
|
318
|
+
if (layout === "fill") fill = true;
|
|
319
|
+
const layoutToStyle = {
|
|
320
|
+
intrinsic: {
|
|
321
|
+
maxWidth: "100%",
|
|
322
|
+
height: "auto"
|
|
323
|
+
},
|
|
324
|
+
responsive: {
|
|
325
|
+
width: "100%",
|
|
326
|
+
height: "auto"
|
|
327
|
+
}
|
|
328
|
+
};
|
|
329
|
+
const layoutToSizes = {
|
|
330
|
+
responsive: "100vw",
|
|
331
|
+
fill: "100vw"
|
|
332
|
+
};
|
|
333
|
+
const layoutStyle = layoutToStyle[layout];
|
|
334
|
+
if (layoutStyle) style = {
|
|
335
|
+
...style,
|
|
336
|
+
...layoutStyle
|
|
337
|
+
};
|
|
338
|
+
const layoutSizes = layoutToSizes[layout];
|
|
339
|
+
if (layoutSizes && !sizes) sizes = layoutSizes;
|
|
340
|
+
}
|
|
341
|
+
let staticSrc = "";
|
|
342
|
+
let widthInt = getInt(width);
|
|
343
|
+
let heightInt = getInt(height);
|
|
344
|
+
let blurWidth;
|
|
345
|
+
let blurHeight;
|
|
346
|
+
if (isStaticImport(src)) {
|
|
347
|
+
const staticImageData = isStaticRequire(src) ? src.default : src;
|
|
348
|
+
if (!staticImageData.src) throw Object.defineProperty(/* @__PURE__ */ new Error(`An object should only be passed to the image component src parameter if it comes from a static image import. It must include src. Received ${JSON.stringify(staticImageData)}`), "__NEXT_ERROR_CODE", {
|
|
349
|
+
value: "E460",
|
|
350
|
+
enumerable: false,
|
|
351
|
+
configurable: true
|
|
352
|
+
});
|
|
353
|
+
if (!staticImageData.height || !staticImageData.width) throw Object.defineProperty(/* @__PURE__ */ new Error(`An object should only be passed to the image component src parameter if it comes from a static image import. It must include height and width. Received ${JSON.stringify(staticImageData)}`), "__NEXT_ERROR_CODE", {
|
|
354
|
+
value: "E48",
|
|
355
|
+
enumerable: false,
|
|
356
|
+
configurable: true
|
|
357
|
+
});
|
|
358
|
+
blurWidth = staticImageData.blurWidth;
|
|
359
|
+
blurHeight = staticImageData.blurHeight;
|
|
360
|
+
blurDataURL = blurDataURL || staticImageData.blurDataURL;
|
|
361
|
+
staticSrc = staticImageData.src;
|
|
362
|
+
if (!fill) {
|
|
363
|
+
if (!widthInt && !heightInt) {
|
|
364
|
+
widthInt = staticImageData.width;
|
|
365
|
+
heightInt = staticImageData.height;
|
|
366
|
+
} else if (widthInt && !heightInt) {
|
|
367
|
+
const ratio = widthInt / staticImageData.width;
|
|
368
|
+
heightInt = Math.round(staticImageData.height * ratio);
|
|
369
|
+
} else if (!widthInt && heightInt) {
|
|
370
|
+
const ratio = heightInt / staticImageData.height;
|
|
371
|
+
widthInt = Math.round(staticImageData.width * ratio);
|
|
372
|
+
}
|
|
373
|
+
}
|
|
374
|
+
}
|
|
375
|
+
src = typeof src === "string" ? src : staticSrc;
|
|
376
|
+
let isLazy = !priority && !preload && (loading === "lazy" || typeof loading === "undefined");
|
|
377
|
+
if (!src || src.startsWith("data:") || src.startsWith("blob:")) {
|
|
378
|
+
unoptimized = true;
|
|
379
|
+
isLazy = false;
|
|
380
|
+
}
|
|
381
|
+
if (config.unoptimized) unoptimized = true;
|
|
382
|
+
if (isDefaultLoader && !config.dangerouslyAllowSVG && src.split("?", 1)[0].endsWith(".svg")) unoptimized = true;
|
|
383
|
+
const qualityInt = getInt(quality);
|
|
384
|
+
if (process.env.NODE_ENV !== "production") {
|
|
385
|
+
if (config.output === "export" && isDefaultLoader && !unoptimized) throw Object.defineProperty(/* @__PURE__ */ new Error(`Image Optimization using the default loader is not compatible with \`{ output: 'export' }\`.
|
|
386
|
+
Possible solutions:
|
|
387
|
+
- Remove \`{ output: 'export' }\` and run "next start" to run server mode including the Image Optimization API.
|
|
388
|
+
- Configure \`{ images: { unoptimized: true } }\` in \`next.config.js\` to disable the Image Optimization API.
|
|
389
|
+
Read more: https://nextjs.org/docs/messages/export-image-api`), "__NEXT_ERROR_CODE", {
|
|
390
|
+
value: "E500",
|
|
391
|
+
enumerable: false,
|
|
392
|
+
configurable: true
|
|
393
|
+
});
|
|
394
|
+
if (!src) unoptimized = true;
|
|
395
|
+
else if (fill) {
|
|
396
|
+
if (width) throw Object.defineProperty(/* @__PURE__ */ new Error(`Image with src "${src}" has both "width" and "fill" properties. Only one should be used.`), "__NEXT_ERROR_CODE", {
|
|
397
|
+
value: "E96",
|
|
398
|
+
enumerable: false,
|
|
399
|
+
configurable: true
|
|
400
|
+
});
|
|
401
|
+
if (height) throw Object.defineProperty(/* @__PURE__ */ new Error(`Image with src "${src}" has both "height" and "fill" properties. Only one should be used.`), "__NEXT_ERROR_CODE", {
|
|
402
|
+
value: "E115",
|
|
403
|
+
enumerable: false,
|
|
404
|
+
configurable: true
|
|
405
|
+
});
|
|
406
|
+
if (style?.position && style.position !== "absolute") throw Object.defineProperty(/* @__PURE__ */ new Error(`Image with src "${src}" has both "fill" and "style.position" properties. Images with "fill" always use position absolute - it cannot be modified.`), "__NEXT_ERROR_CODE", {
|
|
407
|
+
value: "E216",
|
|
408
|
+
enumerable: false,
|
|
409
|
+
configurable: true
|
|
410
|
+
});
|
|
411
|
+
if (style?.width && style.width !== "100%") throw Object.defineProperty(/* @__PURE__ */ new Error(`Image with src "${src}" has both "fill" and "style.width" properties. Images with "fill" always use width 100% - it cannot be modified.`), "__NEXT_ERROR_CODE", {
|
|
412
|
+
value: "E73",
|
|
413
|
+
enumerable: false,
|
|
414
|
+
configurable: true
|
|
415
|
+
});
|
|
416
|
+
if (style?.height && style.height !== "100%") throw Object.defineProperty(/* @__PURE__ */ new Error(`Image with src "${src}" has both "fill" and "style.height" properties. Images with "fill" always use height 100% - it cannot be modified.`), "__NEXT_ERROR_CODE", {
|
|
417
|
+
value: "E404",
|
|
418
|
+
enumerable: false,
|
|
419
|
+
configurable: true
|
|
420
|
+
});
|
|
421
|
+
} else {
|
|
422
|
+
if (typeof widthInt === "undefined") throw Object.defineProperty(/* @__PURE__ */ new Error(`Image with src "${src}" is missing required "width" property.`), "__NEXT_ERROR_CODE", {
|
|
423
|
+
value: "E451",
|
|
424
|
+
enumerable: false,
|
|
425
|
+
configurable: true
|
|
426
|
+
});
|
|
427
|
+
else if (isNaN(widthInt)) throw Object.defineProperty(/* @__PURE__ */ new Error(`Image with src "${src}" has invalid "width" property. Expected a numeric value in pixels but received "${width}".`), "__NEXT_ERROR_CODE", {
|
|
428
|
+
value: "E66",
|
|
429
|
+
enumerable: false,
|
|
430
|
+
configurable: true
|
|
431
|
+
});
|
|
432
|
+
if (typeof heightInt === "undefined") throw Object.defineProperty(/* @__PURE__ */ new Error(`Image with src "${src}" is missing required "height" property.`), "__NEXT_ERROR_CODE", {
|
|
433
|
+
value: "E397",
|
|
434
|
+
enumerable: false,
|
|
435
|
+
configurable: true
|
|
436
|
+
});
|
|
437
|
+
else if (isNaN(heightInt)) throw Object.defineProperty(/* @__PURE__ */ new Error(`Image with src "${src}" has invalid "height" property. Expected a numeric value in pixels but received "${height}".`), "__NEXT_ERROR_CODE", {
|
|
438
|
+
value: "E444",
|
|
439
|
+
enumerable: false,
|
|
440
|
+
configurable: true
|
|
441
|
+
});
|
|
442
|
+
if (/^[\x00-\x20]/.test(src)) throw Object.defineProperty(/* @__PURE__ */ new Error(`Image with src "${src}" cannot start with a space or control character. Use src.trimStart() to remove it or encodeURIComponent(src) to keep it.`), "__NEXT_ERROR_CODE", {
|
|
443
|
+
value: "E176",
|
|
444
|
+
enumerable: false,
|
|
445
|
+
configurable: true
|
|
446
|
+
});
|
|
447
|
+
if (/[\x00-\x20]$/.test(src)) throw Object.defineProperty(/* @__PURE__ */ new Error(`Image with src "${src}" cannot end with a space or control character. Use src.trimEnd() to remove it or encodeURIComponent(src) to keep it.`), "__NEXT_ERROR_CODE", {
|
|
448
|
+
value: "E21",
|
|
449
|
+
enumerable: false,
|
|
450
|
+
configurable: true
|
|
451
|
+
});
|
|
452
|
+
}
|
|
453
|
+
if (!VALID_LOADING_VALUES.includes(loading)) throw Object.defineProperty(/* @__PURE__ */ new Error(`Image with src "${src}" has invalid "loading" property. Provided "${loading}" should be one of ${VALID_LOADING_VALUES.map(String).join(",")}.`), "__NEXT_ERROR_CODE", {
|
|
454
|
+
value: "E357",
|
|
455
|
+
enumerable: false,
|
|
456
|
+
configurable: true
|
|
457
|
+
});
|
|
458
|
+
if (priority && loading === "lazy") throw Object.defineProperty(/* @__PURE__ */ new Error(`Image with src "${src}" has both "priority" and "loading='lazy'" properties. Only one should be used.`), "__NEXT_ERROR_CODE", {
|
|
459
|
+
value: "E218",
|
|
460
|
+
enumerable: false,
|
|
461
|
+
configurable: true
|
|
462
|
+
});
|
|
463
|
+
if (preload && loading === "lazy") throw Object.defineProperty(/* @__PURE__ */ new Error(`Image with src "${src}" has both "preload" and "loading='lazy'" properties. Only one should be used.`), "__NEXT_ERROR_CODE", {
|
|
464
|
+
value: "E803",
|
|
465
|
+
enumerable: false,
|
|
466
|
+
configurable: true
|
|
467
|
+
});
|
|
468
|
+
if (preload && priority) throw Object.defineProperty(/* @__PURE__ */ new Error(`Image with src "${src}" has both "preload" and "priority" properties. Only "preload" should be used.`), "__NEXT_ERROR_CODE", {
|
|
469
|
+
value: "E802",
|
|
470
|
+
enumerable: false,
|
|
471
|
+
configurable: true
|
|
472
|
+
});
|
|
473
|
+
if (placeholder !== "empty" && placeholder !== "blur" && !placeholder.startsWith("data:image/")) throw Object.defineProperty(/* @__PURE__ */ new Error(`Image with src "${src}" has invalid "placeholder" property "${placeholder}".`), "__NEXT_ERROR_CODE", {
|
|
474
|
+
value: "E431",
|
|
475
|
+
enumerable: false,
|
|
476
|
+
configurable: true
|
|
477
|
+
});
|
|
478
|
+
if (placeholder !== "empty") {
|
|
479
|
+
if (widthInt && heightInt && widthInt * heightInt < 1600) (0, _warnonce$2.warnOnce)(`Image with src "${src}" is smaller than 40x40. Consider removing the "placeholder" property to improve performance.`);
|
|
480
|
+
}
|
|
481
|
+
if (qualityInt && config.qualities && !config.qualities.includes(qualityInt)) (0, _warnonce$2.warnOnce)(`Image with src "${src}" is using quality "${qualityInt}" which is not configured in images.qualities [${config.qualities.join(", ")}]. Please update your config to [${[...config.qualities, qualityInt].sort().join(", ")}].\nRead more: https://nextjs.org/docs/messages/next-image-unconfigured-qualities`);
|
|
482
|
+
if (placeholder === "blur" && !blurDataURL) throw Object.defineProperty(/* @__PURE__ */ new Error(`Image with src "${src}" has "placeholder='blur'" property but is missing the "blurDataURL" property.
|
|
483
|
+
Possible solutions:
|
|
484
|
+
- Add a "blurDataURL" property, the contents should be a small Data URL to represent the image
|
|
485
|
+
- Change the "src" property to a static import with one of the supported file types: ${[
|
|
486
|
+
"jpeg",
|
|
487
|
+
"png",
|
|
488
|
+
"webp",
|
|
489
|
+
"avif"
|
|
490
|
+
].join(",")} (animated images not supported)
|
|
491
|
+
- Remove the "placeholder" property, effectively no blur effect
|
|
492
|
+
Read more: https://nextjs.org/docs/messages/placeholder-blur-data-url`), "__NEXT_ERROR_CODE", {
|
|
493
|
+
value: "E371",
|
|
494
|
+
enumerable: false,
|
|
495
|
+
configurable: true
|
|
496
|
+
});
|
|
497
|
+
if ("ref" in rest) (0, _warnonce$2.warnOnce)(`Image with src "${src}" is using unsupported "ref" property. Consider using the "onLoad" property instead.`);
|
|
498
|
+
if (!unoptimized && !isDefaultLoader) {
|
|
499
|
+
const urlStr = loader({
|
|
500
|
+
config,
|
|
501
|
+
src,
|
|
502
|
+
width: widthInt || 400,
|
|
503
|
+
quality: qualityInt || 75
|
|
504
|
+
});
|
|
505
|
+
let url;
|
|
506
|
+
try {
|
|
507
|
+
url = new URL(urlStr);
|
|
508
|
+
} catch (err) {}
|
|
509
|
+
if (urlStr === src || url && url.pathname === src && !url.search) (0, _warnonce$2.warnOnce)(`Image with src "${src}" has a "loader" property that does not implement width. Please implement it or use the "unoptimized" property instead.\nRead more: https://nextjs.org/docs/messages/next-image-missing-loader-width`);
|
|
510
|
+
}
|
|
511
|
+
if (onLoadingComplete) (0, _warnonce$2.warnOnce)(`Image with src "${src}" is using deprecated "onLoadingComplete" property. Please use the "onLoad" property instead.`);
|
|
512
|
+
for (const [legacyKey, legacyValue] of Object.entries({
|
|
513
|
+
layout,
|
|
514
|
+
objectFit,
|
|
515
|
+
objectPosition,
|
|
516
|
+
lazyBoundary,
|
|
517
|
+
lazyRoot
|
|
518
|
+
})) if (legacyValue) (0, _warnonce$2.warnOnce)(`Image with src "${src}" has legacy prop "${legacyKey}". Did you forget to run the codemod?\nRead more: https://nextjs.org/docs/messages/next-image-upgrade-to-13`);
|
|
519
|
+
if (typeof window !== "undefined" && !perfObserver && window.PerformanceObserver) {
|
|
520
|
+
perfObserver = new PerformanceObserver((entryList) => {
|
|
521
|
+
for (const entry of entryList.getEntries()) {
|
|
522
|
+
const imgSrc = entry?.element?.src || "";
|
|
523
|
+
const lcpImage = allImgs.get(imgSrc);
|
|
524
|
+
if (lcpImage && lcpImage.loading === "lazy" && lcpImage.placeholder === "empty" && !lcpImage.src.startsWith("data:") && !lcpImage.src.startsWith("blob:")) (0, _warnonce$2.warnOnce)(`Image with src "${lcpImage.src}" was detected as the Largest Contentful Paint (LCP). Please add the \`loading="eager"\` property if this image is above the fold.\nRead more: https://nextjs.org/docs/app/api-reference/components/image#loading`);
|
|
525
|
+
}
|
|
526
|
+
});
|
|
527
|
+
try {
|
|
528
|
+
perfObserver.observe({
|
|
529
|
+
type: "largest-contentful-paint",
|
|
530
|
+
buffered: true
|
|
531
|
+
});
|
|
532
|
+
} catch (err) {
|
|
533
|
+
console.error(err);
|
|
534
|
+
}
|
|
535
|
+
}
|
|
536
|
+
}
|
|
537
|
+
const imgStyle = Object.assign(fill ? {
|
|
538
|
+
position: "absolute",
|
|
539
|
+
height: "100%",
|
|
540
|
+
width: "100%",
|
|
541
|
+
left: 0,
|
|
542
|
+
top: 0,
|
|
543
|
+
right: 0,
|
|
544
|
+
bottom: 0,
|
|
545
|
+
objectFit,
|
|
546
|
+
objectPosition
|
|
547
|
+
} : {}, showAltText ? {} : { color: "transparent" }, style);
|
|
548
|
+
const backgroundImage = !blurComplete && placeholder !== "empty" ? placeholder === "blur" ? `url("data:image/svg+xml;charset=utf-8,${(0, _imageblursvg.getImageBlurSvg)({
|
|
549
|
+
widthInt,
|
|
550
|
+
heightInt,
|
|
551
|
+
blurWidth,
|
|
552
|
+
blurHeight,
|
|
553
|
+
blurDataURL: blurDataURL || "",
|
|
554
|
+
objectFit: imgStyle.objectFit
|
|
555
|
+
})}")` : `url("${placeholder}")` : null;
|
|
556
|
+
const backgroundSize = !INVALID_BACKGROUND_SIZE_VALUES.includes(imgStyle.objectFit) ? imgStyle.objectFit : imgStyle.objectFit === "fill" ? "100% 100%" : "cover";
|
|
557
|
+
let placeholderStyle = backgroundImage ? {
|
|
558
|
+
backgroundSize,
|
|
559
|
+
backgroundPosition: imgStyle.objectPosition || "50% 50%",
|
|
560
|
+
backgroundRepeat: "no-repeat",
|
|
561
|
+
backgroundImage
|
|
562
|
+
} : {};
|
|
563
|
+
if (process.env.NODE_ENV === "development") {
|
|
564
|
+
if (placeholderStyle.backgroundImage && placeholder === "blur" && blurDataURL?.startsWith("/")) placeholderStyle.backgroundImage = `url("${blurDataURL}")`;
|
|
565
|
+
}
|
|
566
|
+
const imgAttributes = generateImgAttrs({
|
|
567
|
+
config,
|
|
568
|
+
src,
|
|
569
|
+
unoptimized,
|
|
570
|
+
width: widthInt,
|
|
571
|
+
quality: qualityInt,
|
|
572
|
+
sizes,
|
|
573
|
+
loader
|
|
574
|
+
});
|
|
575
|
+
const loadingFinal = isLazy ? "lazy" : loading;
|
|
576
|
+
if (process.env.NODE_ENV !== "production") {
|
|
577
|
+
if (typeof window !== "undefined") {
|
|
578
|
+
let fullUrl;
|
|
579
|
+
try {
|
|
580
|
+
fullUrl = new URL(imgAttributes.src);
|
|
581
|
+
} catch (e) {
|
|
582
|
+
fullUrl = new URL(imgAttributes.src, window.location.href);
|
|
583
|
+
}
|
|
584
|
+
allImgs.set(fullUrl.href, {
|
|
585
|
+
src,
|
|
586
|
+
loading: loadingFinal,
|
|
587
|
+
placeholder
|
|
588
|
+
});
|
|
589
|
+
}
|
|
590
|
+
}
|
|
591
|
+
return {
|
|
592
|
+
props: {
|
|
593
|
+
...rest,
|
|
594
|
+
loading: loadingFinal,
|
|
595
|
+
fetchPriority,
|
|
596
|
+
width: widthInt,
|
|
597
|
+
height: heightInt,
|
|
598
|
+
decoding,
|
|
599
|
+
className,
|
|
600
|
+
style: {
|
|
601
|
+
...imgStyle,
|
|
602
|
+
...placeholderStyle
|
|
603
|
+
},
|
|
604
|
+
sizes: imgAttributes.sizes,
|
|
605
|
+
srcSet: imgAttributes.srcSet,
|
|
606
|
+
src: overrideSrc || imgAttributes.src
|
|
607
|
+
},
|
|
608
|
+
meta: {
|
|
609
|
+
unoptimized,
|
|
610
|
+
preload: preload || priority,
|
|
611
|
+
placeholder,
|
|
612
|
+
fill
|
|
613
|
+
}
|
|
614
|
+
};
|
|
615
|
+
}
|
|
616
|
+
}) });
|
|
617
|
+
|
|
618
|
+
//#endregion
|
|
619
|
+
//#region node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs
|
|
620
|
+
var require__interop_require_wildcard = /* @__PURE__ */ __commonJS({ "node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs": ((exports) => {
|
|
621
|
+
function _getRequireWildcardCache(nodeInterop) {
|
|
622
|
+
if (typeof WeakMap !== "function") return null;
|
|
623
|
+
var cacheBabelInterop = /* @__PURE__ */ new WeakMap();
|
|
624
|
+
var cacheNodeInterop = /* @__PURE__ */ new WeakMap();
|
|
625
|
+
return (_getRequireWildcardCache = function(nodeInterop$1) {
|
|
626
|
+
return nodeInterop$1 ? cacheNodeInterop : cacheBabelInterop;
|
|
627
|
+
})(nodeInterop);
|
|
628
|
+
}
|
|
629
|
+
function _interop_require_wildcard$2(obj, nodeInterop) {
|
|
630
|
+
if (!nodeInterop && obj && obj.__esModule) return obj;
|
|
631
|
+
if (obj === null || typeof obj !== "object" && typeof obj !== "function") return { default: obj };
|
|
632
|
+
var cache = _getRequireWildcardCache(nodeInterop);
|
|
633
|
+
if (cache && cache.has(obj)) return cache.get(obj);
|
|
634
|
+
var newObj = { __proto__: null };
|
|
635
|
+
var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
|
|
636
|
+
for (var key in obj) if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
637
|
+
var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
|
|
638
|
+
if (desc && (desc.get || desc.set)) Object.defineProperty(newObj, key, desc);
|
|
639
|
+
else newObj[key] = obj[key];
|
|
640
|
+
}
|
|
641
|
+
newObj.default = obj;
|
|
642
|
+
if (cache) cache.set(obj, newObj);
|
|
643
|
+
return newObj;
|
|
644
|
+
}
|
|
645
|
+
exports._ = _interop_require_wildcard$2;
|
|
646
|
+
}) });
|
|
647
|
+
|
|
648
|
+
//#endregion
|
|
649
|
+
//#region node_modules/next/dist/shared/lib/side-effect.js
|
|
650
|
+
var require_side_effect = /* @__PURE__ */ __commonJS({ "node_modules/next/dist/shared/lib/side-effect.js": ((exports) => {
|
|
651
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
652
|
+
Object.defineProperty(exports, "default", {
|
|
653
|
+
enumerable: true,
|
|
654
|
+
get: function() {
|
|
655
|
+
return SideEffect;
|
|
656
|
+
}
|
|
657
|
+
});
|
|
658
|
+
const _react$4 = __require("react");
|
|
659
|
+
const isServer = typeof window === "undefined";
|
|
660
|
+
const useClientOnlyLayoutEffect = isServer ? () => {} : _react$4.useLayoutEffect;
|
|
661
|
+
const useClientOnlyEffect = isServer ? () => {} : _react$4.useEffect;
|
|
662
|
+
function SideEffect(props) {
|
|
663
|
+
const { headManager, reduceComponentsToState } = props;
|
|
664
|
+
function emitChange() {
|
|
665
|
+
if (headManager && headManager.mountedInstances) {
|
|
666
|
+
const headElements = _react$4.Children.toArray(Array.from(headManager.mountedInstances).filter(Boolean));
|
|
667
|
+
headManager.updateHead(reduceComponentsToState(headElements));
|
|
668
|
+
}
|
|
669
|
+
}
|
|
670
|
+
if (isServer) {
|
|
671
|
+
headManager?.mountedInstances?.add(props.children);
|
|
672
|
+
emitChange();
|
|
673
|
+
}
|
|
674
|
+
useClientOnlyLayoutEffect(() => {
|
|
675
|
+
headManager?.mountedInstances?.add(props.children);
|
|
676
|
+
return () => {
|
|
677
|
+
headManager?.mountedInstances?.delete(props.children);
|
|
678
|
+
};
|
|
679
|
+
});
|
|
680
|
+
useClientOnlyLayoutEffect(() => {
|
|
681
|
+
if (headManager) headManager._pendingUpdate = emitChange;
|
|
682
|
+
return () => {
|
|
683
|
+
if (headManager) headManager._pendingUpdate = emitChange;
|
|
684
|
+
};
|
|
685
|
+
});
|
|
686
|
+
useClientOnlyEffect(() => {
|
|
687
|
+
if (headManager && headManager._pendingUpdate) {
|
|
688
|
+
headManager._pendingUpdate();
|
|
689
|
+
headManager._pendingUpdate = null;
|
|
690
|
+
}
|
|
691
|
+
return () => {
|
|
692
|
+
if (headManager && headManager._pendingUpdate) {
|
|
693
|
+
headManager._pendingUpdate();
|
|
694
|
+
headManager._pendingUpdate = null;
|
|
695
|
+
}
|
|
696
|
+
};
|
|
697
|
+
});
|
|
698
|
+
return null;
|
|
699
|
+
}
|
|
700
|
+
}) });
|
|
701
|
+
|
|
702
|
+
//#endregion
|
|
703
|
+
//#region node_modules/next/dist/shared/lib/head-manager-context.shared-runtime.js
|
|
704
|
+
var require_head_manager_context_shared_runtime = /* @__PURE__ */ __commonJS({ "node_modules/next/dist/shared/lib/head-manager-context.shared-runtime.js": ((exports) => {
|
|
705
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
706
|
+
Object.defineProperty(exports, "HeadManagerContext", {
|
|
707
|
+
enumerable: true,
|
|
708
|
+
get: function() {
|
|
709
|
+
return HeadManagerContext;
|
|
710
|
+
}
|
|
711
|
+
});
|
|
712
|
+
const HeadManagerContext = (/* @__PURE__ */ require__interop_require_default()._(__require("react"))).default.createContext({});
|
|
713
|
+
if (process.env.NODE_ENV !== "production") HeadManagerContext.displayName = "HeadManagerContext";
|
|
714
|
+
}) });
|
|
715
|
+
|
|
716
|
+
//#endregion
|
|
717
|
+
//#region node_modules/next/dist/shared/lib/head.js
|
|
718
|
+
var require_head = /* @__PURE__ */ __commonJS({ "node_modules/next/dist/shared/lib/head.js": ((exports, module) => {
|
|
719
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
720
|
+
function _export$3(target, all) {
|
|
721
|
+
for (var name in all) Object.defineProperty(target, name, {
|
|
722
|
+
enumerable: true,
|
|
723
|
+
get: all[name]
|
|
724
|
+
});
|
|
725
|
+
}
|
|
726
|
+
_export$3(exports, {
|
|
727
|
+
default: function() {
|
|
728
|
+
return _default$2;
|
|
729
|
+
},
|
|
730
|
+
defaultHead: function() {
|
|
731
|
+
return defaultHead;
|
|
732
|
+
}
|
|
733
|
+
});
|
|
734
|
+
const _interop_require_default$2 = require__interop_require_default();
|
|
735
|
+
const _interop_require_wildcard$1 = require__interop_require_wildcard();
|
|
736
|
+
const _jsxruntime$1 = __require("react/jsx-runtime");
|
|
737
|
+
const _react$3 = /* @__PURE__ */ _interop_require_wildcard$1._(__require("react"));
|
|
738
|
+
const _sideeffect = /* @__PURE__ */ _interop_require_default$2._(require_side_effect());
|
|
739
|
+
const _headmanagercontextsharedruntime = require_head_manager_context_shared_runtime();
|
|
740
|
+
const _warnonce$1 = require_warn_once();
|
|
741
|
+
function defaultHead() {
|
|
742
|
+
return [/* @__PURE__ */ (0, _jsxruntime$1.jsx)("meta", { charSet: "utf-8" }, "charset"), /* @__PURE__ */ (0, _jsxruntime$1.jsx)("meta", {
|
|
743
|
+
name: "viewport",
|
|
744
|
+
content: "width=device-width"
|
|
745
|
+
}, "viewport")];
|
|
746
|
+
}
|
|
747
|
+
function onlyReactElement(list, child) {
|
|
748
|
+
if (typeof child === "string" || typeof child === "number") return list;
|
|
749
|
+
if (child.type === _react$3.default.Fragment) return list.concat(_react$3.default.Children.toArray(child.props.children).reduce((fragmentList, fragmentChild) => {
|
|
750
|
+
if (typeof fragmentChild === "string" || typeof fragmentChild === "number") return fragmentList;
|
|
751
|
+
return fragmentList.concat(fragmentChild);
|
|
752
|
+
}, []));
|
|
753
|
+
return list.concat(child);
|
|
754
|
+
}
|
|
755
|
+
const METATYPES = [
|
|
756
|
+
"name",
|
|
757
|
+
"httpEquiv",
|
|
758
|
+
"charSet",
|
|
759
|
+
"itemProp"
|
|
760
|
+
];
|
|
761
|
+
function unique() {
|
|
762
|
+
const keys = /* @__PURE__ */ new Set();
|
|
763
|
+
const tags = /* @__PURE__ */ new Set();
|
|
764
|
+
const metaTypes = /* @__PURE__ */ new Set();
|
|
765
|
+
const metaCategories = {};
|
|
766
|
+
return (h) => {
|
|
767
|
+
let isUnique = true;
|
|
768
|
+
let hasKey = false;
|
|
769
|
+
if (h.key && typeof h.key !== "number" && h.key.indexOf("$") > 0) {
|
|
770
|
+
hasKey = true;
|
|
771
|
+
const key = h.key.slice(h.key.indexOf("$") + 1);
|
|
772
|
+
if (keys.has(key)) isUnique = false;
|
|
773
|
+
else keys.add(key);
|
|
774
|
+
}
|
|
775
|
+
switch (h.type) {
|
|
776
|
+
case "title":
|
|
777
|
+
case "base":
|
|
778
|
+
if (tags.has(h.type)) isUnique = false;
|
|
779
|
+
else tags.add(h.type);
|
|
780
|
+
break;
|
|
781
|
+
case "meta":
|
|
782
|
+
for (let i = 0, len = METATYPES.length; i < len; i++) {
|
|
783
|
+
const metatype = METATYPES[i];
|
|
784
|
+
if (!h.props.hasOwnProperty(metatype)) continue;
|
|
785
|
+
if (metatype === "charSet") if (metaTypes.has(metatype)) isUnique = false;
|
|
786
|
+
else metaTypes.add(metatype);
|
|
787
|
+
else {
|
|
788
|
+
const category = h.props[metatype];
|
|
789
|
+
const categories = metaCategories[metatype] || /* @__PURE__ */ new Set();
|
|
790
|
+
if ((metatype !== "name" || !hasKey) && categories.has(category)) isUnique = false;
|
|
791
|
+
else {
|
|
792
|
+
categories.add(category);
|
|
793
|
+
metaCategories[metatype] = categories;
|
|
794
|
+
}
|
|
795
|
+
}
|
|
796
|
+
}
|
|
797
|
+
break;
|
|
798
|
+
}
|
|
799
|
+
return isUnique;
|
|
800
|
+
};
|
|
801
|
+
}
|
|
802
|
+
/**
|
|
803
|
+
*
|
|
804
|
+
* @param headChildrenElements List of children of <Head>
|
|
805
|
+
*/ function reduceComponents(headChildrenElements) {
|
|
806
|
+
return headChildrenElements.reduce(onlyReactElement, []).reverse().concat(defaultHead().reverse()).filter(unique()).reverse().map((c, i) => {
|
|
807
|
+
const key = c.key || i;
|
|
808
|
+
if (process.env.NODE_ENV === "development") {
|
|
809
|
+
if (c.type === "script" && c.props["type"] !== "application/ld+json") {
|
|
810
|
+
const srcMessage = c.props["src"] ? `<script> tag with src="${c.props["src"]}"` : `inline <script>`;
|
|
811
|
+
(0, _warnonce$1.warnOnce)(`Do not add <script> tags using next/head (see ${srcMessage}). Use next/script instead. \nSee more info here: https://nextjs.org/docs/messages/no-script-tags-in-head-component`);
|
|
812
|
+
} else if (c.type === "link" && c.props["rel"] === "stylesheet") (0, _warnonce$1.warnOnce)(`Do not add stylesheets using next/head (see <link rel="stylesheet"> tag with href="${c.props["href"]}"). Use Document instead. \nSee more info here: https://nextjs.org/docs/messages/no-stylesheets-in-head-component`);
|
|
813
|
+
}
|
|
814
|
+
return /* @__PURE__ */ _react$3.default.cloneElement(c, { key });
|
|
815
|
+
});
|
|
816
|
+
}
|
|
817
|
+
/**
|
|
818
|
+
* This component injects elements to `<head>` of your page.
|
|
819
|
+
* To avoid duplicated `tags` in `<head>` you can use the `key` property, which will make sure every tag is only rendered once.
|
|
820
|
+
*/ function Head({ children }) {
|
|
821
|
+
const headManager = (0, _react$3.useContext)(_headmanagercontextsharedruntime.HeadManagerContext);
|
|
822
|
+
return /* @__PURE__ */ (0, _jsxruntime$1.jsx)(_sideeffect.default, {
|
|
823
|
+
reduceComponentsToState: reduceComponents,
|
|
824
|
+
headManager,
|
|
825
|
+
children
|
|
826
|
+
});
|
|
827
|
+
}
|
|
828
|
+
const _default$2 = Head;
|
|
829
|
+
if ((typeof exports.default === "function" || typeof exports.default === "object" && exports.default !== null) && typeof exports.default.__esModule === "undefined") {
|
|
830
|
+
Object.defineProperty(exports.default, "__esModule", { value: true });
|
|
831
|
+
Object.assign(exports.default, exports);
|
|
832
|
+
module.exports = exports.default;
|
|
833
|
+
}
|
|
834
|
+
}) });
|
|
835
|
+
|
|
836
|
+
//#endregion
|
|
837
|
+
//#region node_modules/next/dist/shared/lib/image-config-context.shared-runtime.js
|
|
838
|
+
var require_image_config_context_shared_runtime = /* @__PURE__ */ __commonJS({ "node_modules/next/dist/shared/lib/image-config-context.shared-runtime.js": ((exports) => {
|
|
839
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
840
|
+
Object.defineProperty(exports, "ImageConfigContext", {
|
|
841
|
+
enumerable: true,
|
|
842
|
+
get: function() {
|
|
843
|
+
return ImageConfigContext;
|
|
844
|
+
}
|
|
845
|
+
});
|
|
846
|
+
const _react$2 = /* @__PURE__ */ require__interop_require_default()._(__require("react"));
|
|
847
|
+
const _imageconfig$1 = require_image_config();
|
|
848
|
+
const ImageConfigContext = _react$2.default.createContext(_imageconfig$1.imageConfigDefault);
|
|
849
|
+
if (process.env.NODE_ENV !== "production") ImageConfigContext.displayName = "ImageConfigContext";
|
|
850
|
+
}) });
|
|
851
|
+
|
|
852
|
+
//#endregion
|
|
853
|
+
//#region node_modules/next/dist/shared/lib/router-context.shared-runtime.js
|
|
854
|
+
var require_router_context_shared_runtime = /* @__PURE__ */ __commonJS({ "node_modules/next/dist/shared/lib/router-context.shared-runtime.js": ((exports) => {
|
|
855
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
856
|
+
Object.defineProperty(exports, "RouterContext", {
|
|
857
|
+
enumerable: true,
|
|
858
|
+
get: function() {
|
|
859
|
+
return RouterContext;
|
|
860
|
+
}
|
|
861
|
+
});
|
|
862
|
+
const RouterContext = (/* @__PURE__ */ require__interop_require_default()._(__require("react"))).default.createContext(null);
|
|
863
|
+
if (process.env.NODE_ENV !== "production") RouterContext.displayName = "RouterContext";
|
|
864
|
+
}) });
|
|
865
|
+
|
|
866
|
+
//#endregion
|
|
867
|
+
//#region node_modules/next/dist/shared/lib/find-closest-quality.js
|
|
868
|
+
var require_find_closest_quality = /* @__PURE__ */ __commonJS({ "node_modules/next/dist/shared/lib/find-closest-quality.js": ((exports) => {
|
|
869
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
870
|
+
Object.defineProperty(exports, "findClosestQuality", {
|
|
871
|
+
enumerable: true,
|
|
872
|
+
get: function() {
|
|
873
|
+
return findClosestQuality;
|
|
874
|
+
}
|
|
875
|
+
});
|
|
876
|
+
function findClosestQuality(quality, config) {
|
|
877
|
+
const q = quality || 75;
|
|
878
|
+
if (!config?.qualities?.length) return q;
|
|
879
|
+
return config.qualities.reduce((prev, cur) => Math.abs(cur - q) < Math.abs(prev - q) ? cur : prev, config.qualities[0]);
|
|
880
|
+
}
|
|
881
|
+
}) });
|
|
882
|
+
|
|
883
|
+
//#endregion
|
|
884
|
+
//#region node_modules/next/dist/compiled/picomatch/index.js
|
|
885
|
+
var require_picomatch = /* @__PURE__ */ __commonJS({ "node_modules/next/dist/compiled/picomatch/index.js": ((exports, module) => {
|
|
886
|
+
(() => {
|
|
887
|
+
var t = {
|
|
888
|
+
170: (t$1, e$1, u$1) => {
|
|
889
|
+
const n = u$1(510);
|
|
890
|
+
const isWindows = () => {
|
|
891
|
+
if (typeof navigator !== "undefined" && navigator.platform) {
|
|
892
|
+
const t$2 = navigator.platform.toLowerCase();
|
|
893
|
+
return t$2 === "win32" || t$2 === "windows";
|
|
894
|
+
}
|
|
895
|
+
if (typeof process !== "undefined" && process.platform) return process.platform === "win32";
|
|
896
|
+
return false;
|
|
897
|
+
};
|
|
898
|
+
function picomatch(t$2, e$2, u$2 = false) {
|
|
899
|
+
if (e$2 && (e$2.windows === null || e$2.windows === void 0)) e$2 = {
|
|
900
|
+
...e$2,
|
|
901
|
+
windows: isWindows()
|
|
902
|
+
};
|
|
903
|
+
return n(t$2, e$2, u$2);
|
|
904
|
+
}
|
|
905
|
+
Object.assign(picomatch, n);
|
|
906
|
+
t$1.exports = picomatch;
|
|
907
|
+
},
|
|
908
|
+
154: (t$1) => {
|
|
909
|
+
const e$1 = "\\\\/";
|
|
910
|
+
const u$1 = `[^${e$1}]`;
|
|
911
|
+
const n = "\\.";
|
|
912
|
+
const o = "\\+";
|
|
913
|
+
const s = "\\?";
|
|
914
|
+
const r = "\\/";
|
|
915
|
+
const a = "(?=.)";
|
|
916
|
+
const i = "[^/]";
|
|
917
|
+
const c = `(?:${r}|$)`;
|
|
918
|
+
const p = `(?:^|${r})`;
|
|
919
|
+
const l = `${n}{1,2}${c}`;
|
|
920
|
+
const b = {
|
|
921
|
+
DOT_LITERAL: n,
|
|
922
|
+
PLUS_LITERAL: o,
|
|
923
|
+
QMARK_LITERAL: s,
|
|
924
|
+
SLASH_LITERAL: r,
|
|
925
|
+
ONE_CHAR: a,
|
|
926
|
+
QMARK: i,
|
|
927
|
+
END_ANCHOR: c,
|
|
928
|
+
DOTS_SLASH: l,
|
|
929
|
+
NO_DOT: `(?!${n})`,
|
|
930
|
+
NO_DOTS: `(?!${p}${l})`,
|
|
931
|
+
NO_DOT_SLASH: `(?!${n}{0,1}${c})`,
|
|
932
|
+
NO_DOTS_SLASH: `(?!${l})`,
|
|
933
|
+
QMARK_NO_DOT: `[^.${r}]`,
|
|
934
|
+
STAR: `${i}*?`,
|
|
935
|
+
START_ANCHOR: p,
|
|
936
|
+
SEP: "/"
|
|
937
|
+
};
|
|
938
|
+
const C = {
|
|
939
|
+
...b,
|
|
940
|
+
SLASH_LITERAL: `[${e$1}]`,
|
|
941
|
+
QMARK: u$1,
|
|
942
|
+
STAR: `${u$1}*?`,
|
|
943
|
+
DOTS_SLASH: `${n}{1,2}(?:[${e$1}]|$)`,
|
|
944
|
+
NO_DOT: `(?!${n})`,
|
|
945
|
+
NO_DOTS: `(?!(?:^|[${e$1}])${n}{1,2}(?:[${e$1}]|$))`,
|
|
946
|
+
NO_DOT_SLASH: `(?!${n}{0,1}(?:[${e$1}]|$))`,
|
|
947
|
+
NO_DOTS_SLASH: `(?!${n}{1,2}(?:[${e$1}]|$))`,
|
|
948
|
+
QMARK_NO_DOT: `[^.${e$1}]`,
|
|
949
|
+
START_ANCHOR: `(?:^|[${e$1}])`,
|
|
950
|
+
END_ANCHOR: `(?:[${e$1}]|$)`,
|
|
951
|
+
SEP: "\\"
|
|
952
|
+
};
|
|
953
|
+
t$1.exports = {
|
|
954
|
+
MAX_LENGTH: 1024 * 64,
|
|
955
|
+
POSIX_REGEX_SOURCE: {
|
|
956
|
+
alnum: "a-zA-Z0-9",
|
|
957
|
+
alpha: "a-zA-Z",
|
|
958
|
+
ascii: "\\x00-\\x7F",
|
|
959
|
+
blank: " \\t",
|
|
960
|
+
cntrl: "\\x00-\\x1F\\x7F",
|
|
961
|
+
digit: "0-9",
|
|
962
|
+
graph: "\\x21-\\x7E",
|
|
963
|
+
lower: "a-z",
|
|
964
|
+
print: "\\x20-\\x7E ",
|
|
965
|
+
punct: "\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",
|
|
966
|
+
space: " \\t\\r\\n\\v\\f",
|
|
967
|
+
upper: "A-Z",
|
|
968
|
+
word: "A-Za-z0-9_",
|
|
969
|
+
xdigit: "A-Fa-f0-9"
|
|
970
|
+
},
|
|
971
|
+
REGEX_BACKSLASH: /\\(?![*+?^${}(|)[\]])/g,
|
|
972
|
+
REGEX_NON_SPECIAL_CHARS: /^[^@![\].,$*+?^{}()|\\/]+/,
|
|
973
|
+
REGEX_SPECIAL_CHARS: /[-*+?.^${}(|)[\]]/,
|
|
974
|
+
REGEX_SPECIAL_CHARS_BACKREF: /(\\?)((\W)(\3*))/g,
|
|
975
|
+
REGEX_SPECIAL_CHARS_GLOBAL: /([-*+?.^${}(|)[\]])/g,
|
|
976
|
+
REGEX_REMOVE_BACKSLASH: /(?:\[.*?[^\\]\]|\\(?=.))/g,
|
|
977
|
+
REPLACEMENTS: {
|
|
978
|
+
"***": "*",
|
|
979
|
+
"**/**": "**",
|
|
980
|
+
"**/**/**": "**"
|
|
981
|
+
},
|
|
982
|
+
CHAR_0: 48,
|
|
983
|
+
CHAR_9: 57,
|
|
984
|
+
CHAR_UPPERCASE_A: 65,
|
|
985
|
+
CHAR_LOWERCASE_A: 97,
|
|
986
|
+
CHAR_UPPERCASE_Z: 90,
|
|
987
|
+
CHAR_LOWERCASE_Z: 122,
|
|
988
|
+
CHAR_LEFT_PARENTHESES: 40,
|
|
989
|
+
CHAR_RIGHT_PARENTHESES: 41,
|
|
990
|
+
CHAR_ASTERISK: 42,
|
|
991
|
+
CHAR_AMPERSAND: 38,
|
|
992
|
+
CHAR_AT: 64,
|
|
993
|
+
CHAR_BACKWARD_SLASH: 92,
|
|
994
|
+
CHAR_CARRIAGE_RETURN: 13,
|
|
995
|
+
CHAR_CIRCUMFLEX_ACCENT: 94,
|
|
996
|
+
CHAR_COLON: 58,
|
|
997
|
+
CHAR_COMMA: 44,
|
|
998
|
+
CHAR_DOT: 46,
|
|
999
|
+
CHAR_DOUBLE_QUOTE: 34,
|
|
1000
|
+
CHAR_EQUAL: 61,
|
|
1001
|
+
CHAR_EXCLAMATION_MARK: 33,
|
|
1002
|
+
CHAR_FORM_FEED: 12,
|
|
1003
|
+
CHAR_FORWARD_SLASH: 47,
|
|
1004
|
+
CHAR_GRAVE_ACCENT: 96,
|
|
1005
|
+
CHAR_HASH: 35,
|
|
1006
|
+
CHAR_HYPHEN_MINUS: 45,
|
|
1007
|
+
CHAR_LEFT_ANGLE_BRACKET: 60,
|
|
1008
|
+
CHAR_LEFT_CURLY_BRACE: 123,
|
|
1009
|
+
CHAR_LEFT_SQUARE_BRACKET: 91,
|
|
1010
|
+
CHAR_LINE_FEED: 10,
|
|
1011
|
+
CHAR_NO_BREAK_SPACE: 160,
|
|
1012
|
+
CHAR_PERCENT: 37,
|
|
1013
|
+
CHAR_PLUS: 43,
|
|
1014
|
+
CHAR_QUESTION_MARK: 63,
|
|
1015
|
+
CHAR_RIGHT_ANGLE_BRACKET: 62,
|
|
1016
|
+
CHAR_RIGHT_CURLY_BRACE: 125,
|
|
1017
|
+
CHAR_RIGHT_SQUARE_BRACKET: 93,
|
|
1018
|
+
CHAR_SEMICOLON: 59,
|
|
1019
|
+
CHAR_SINGLE_QUOTE: 39,
|
|
1020
|
+
CHAR_SPACE: 32,
|
|
1021
|
+
CHAR_TAB: 9,
|
|
1022
|
+
CHAR_UNDERSCORE: 95,
|
|
1023
|
+
CHAR_VERTICAL_LINE: 124,
|
|
1024
|
+
CHAR_ZERO_WIDTH_NOBREAK_SPACE: 65279,
|
|
1025
|
+
extglobChars(t$2) {
|
|
1026
|
+
return {
|
|
1027
|
+
"!": {
|
|
1028
|
+
type: "negate",
|
|
1029
|
+
open: "(?:(?!(?:",
|
|
1030
|
+
close: `))${t$2.STAR})`
|
|
1031
|
+
},
|
|
1032
|
+
"?": {
|
|
1033
|
+
type: "qmark",
|
|
1034
|
+
open: "(?:",
|
|
1035
|
+
close: ")?"
|
|
1036
|
+
},
|
|
1037
|
+
"+": {
|
|
1038
|
+
type: "plus",
|
|
1039
|
+
open: "(?:",
|
|
1040
|
+
close: ")+"
|
|
1041
|
+
},
|
|
1042
|
+
"*": {
|
|
1043
|
+
type: "star",
|
|
1044
|
+
open: "(?:",
|
|
1045
|
+
close: ")*"
|
|
1046
|
+
},
|
|
1047
|
+
"@": {
|
|
1048
|
+
type: "at",
|
|
1049
|
+
open: "(?:",
|
|
1050
|
+
close: ")"
|
|
1051
|
+
}
|
|
1052
|
+
};
|
|
1053
|
+
},
|
|
1054
|
+
globChars(t$2) {
|
|
1055
|
+
return t$2 === true ? C : b;
|
|
1056
|
+
}
|
|
1057
|
+
};
|
|
1058
|
+
},
|
|
1059
|
+
697: (t$1, e$1, u$1) => {
|
|
1060
|
+
const n = u$1(154);
|
|
1061
|
+
const o = u$1(96);
|
|
1062
|
+
const { MAX_LENGTH: s, POSIX_REGEX_SOURCE: r, REGEX_NON_SPECIAL_CHARS: a, REGEX_SPECIAL_CHARS_BACKREF: i, REPLACEMENTS: c } = n;
|
|
1063
|
+
const expandRange = (t$2, e$2) => {
|
|
1064
|
+
if (typeof e$2.expandRange === "function") return e$2.expandRange(...t$2, e$2);
|
|
1065
|
+
t$2.sort();
|
|
1066
|
+
const u$2 = `[${t$2.join("-")}]`;
|
|
1067
|
+
try {
|
|
1068
|
+
new RegExp(u$2);
|
|
1069
|
+
} catch (e$3) {
|
|
1070
|
+
return t$2.map(((t$3) => o.escapeRegex(t$3))).join("..");
|
|
1071
|
+
}
|
|
1072
|
+
return u$2;
|
|
1073
|
+
};
|
|
1074
|
+
const syntaxError = (t$2, e$2) => `Missing ${t$2}: "${e$2}" - use "\\\\${e$2}" to match literal characters`;
|
|
1075
|
+
const parse = (t$2, e$2) => {
|
|
1076
|
+
if (typeof t$2 !== "string") throw new TypeError("Expected a string");
|
|
1077
|
+
t$2 = c[t$2] || t$2;
|
|
1078
|
+
const u$2 = { ...e$2 };
|
|
1079
|
+
const p = typeof u$2.maxLength === "number" ? Math.min(s, u$2.maxLength) : s;
|
|
1080
|
+
let l = t$2.length;
|
|
1081
|
+
if (l > p) throw new SyntaxError(`Input length: ${l}, exceeds maximum allowed length: ${p}`);
|
|
1082
|
+
const f = {
|
|
1083
|
+
type: "bos",
|
|
1084
|
+
value: "",
|
|
1085
|
+
output: u$2.prepend || ""
|
|
1086
|
+
};
|
|
1087
|
+
const A = [f];
|
|
1088
|
+
const _ = u$2.capture ? "" : "?:";
|
|
1089
|
+
const R = n.globChars(u$2.windows);
|
|
1090
|
+
const E = n.extglobChars(R);
|
|
1091
|
+
const { DOT_LITERAL: h, PLUS_LITERAL: g, SLASH_LITERAL: b, ONE_CHAR: C, DOTS_SLASH: y, NO_DOT: $, NO_DOT_SLASH: x, NO_DOTS_SLASH: S, QMARK: H, QMARK_NO_DOT: v, STAR: d, START_ANCHOR: L } = R;
|
|
1092
|
+
const globstar = (t$3) => `(${_}(?:(?!${L}${t$3.dot ? y : h}).)*?)`;
|
|
1093
|
+
const T = u$2.dot ? "" : $;
|
|
1094
|
+
const O = u$2.dot ? H : v;
|
|
1095
|
+
let k = u$2.bash === true ? globstar(u$2) : d;
|
|
1096
|
+
if (u$2.capture) k = `(${k})`;
|
|
1097
|
+
if (typeof u$2.noext === "boolean") u$2.noextglob = u$2.noext;
|
|
1098
|
+
const m = {
|
|
1099
|
+
input: t$2,
|
|
1100
|
+
index: -1,
|
|
1101
|
+
start: 0,
|
|
1102
|
+
dot: u$2.dot === true,
|
|
1103
|
+
consumed: "",
|
|
1104
|
+
output: "",
|
|
1105
|
+
prefix: "",
|
|
1106
|
+
backtrack: false,
|
|
1107
|
+
negated: false,
|
|
1108
|
+
brackets: 0,
|
|
1109
|
+
braces: 0,
|
|
1110
|
+
parens: 0,
|
|
1111
|
+
quotes: 0,
|
|
1112
|
+
globstar: false,
|
|
1113
|
+
tokens: A
|
|
1114
|
+
};
|
|
1115
|
+
t$2 = o.removePrefix(t$2, m);
|
|
1116
|
+
l = t$2.length;
|
|
1117
|
+
const w = [];
|
|
1118
|
+
const N = [];
|
|
1119
|
+
const I = [];
|
|
1120
|
+
let B = f;
|
|
1121
|
+
let G;
|
|
1122
|
+
const eos = () => m.index === l - 1;
|
|
1123
|
+
const D = m.peek = (e$3 = 1) => t$2[m.index + e$3];
|
|
1124
|
+
const M = m.advance = () => t$2[++m.index] || "";
|
|
1125
|
+
const remaining = () => t$2.slice(m.index + 1);
|
|
1126
|
+
const consume = (t$3 = "", e$3 = 0) => {
|
|
1127
|
+
m.consumed += t$3;
|
|
1128
|
+
m.index += e$3;
|
|
1129
|
+
};
|
|
1130
|
+
const append = (t$3) => {
|
|
1131
|
+
m.output += t$3.output != null ? t$3.output : t$3.value;
|
|
1132
|
+
consume(t$3.value);
|
|
1133
|
+
};
|
|
1134
|
+
const negate = () => {
|
|
1135
|
+
let t$3 = 1;
|
|
1136
|
+
while (D() === "!" && (D(2) !== "(" || D(3) === "?")) {
|
|
1137
|
+
M();
|
|
1138
|
+
m.start++;
|
|
1139
|
+
t$3++;
|
|
1140
|
+
}
|
|
1141
|
+
if (t$3 % 2 === 0) return false;
|
|
1142
|
+
m.negated = true;
|
|
1143
|
+
m.start++;
|
|
1144
|
+
return true;
|
|
1145
|
+
};
|
|
1146
|
+
const increment = (t$3) => {
|
|
1147
|
+
m[t$3]++;
|
|
1148
|
+
I.push(t$3);
|
|
1149
|
+
};
|
|
1150
|
+
const decrement = (t$3) => {
|
|
1151
|
+
m[t$3]--;
|
|
1152
|
+
I.pop();
|
|
1153
|
+
};
|
|
1154
|
+
const push = (t$3) => {
|
|
1155
|
+
if (B.type === "globstar") {
|
|
1156
|
+
const e$3 = m.braces > 0 && (t$3.type === "comma" || t$3.type === "brace");
|
|
1157
|
+
const u$3 = t$3.extglob === true || w.length && (t$3.type === "pipe" || t$3.type === "paren");
|
|
1158
|
+
if (t$3.type !== "slash" && t$3.type !== "paren" && !e$3 && !u$3) {
|
|
1159
|
+
m.output = m.output.slice(0, -B.output.length);
|
|
1160
|
+
B.type = "star";
|
|
1161
|
+
B.value = "*";
|
|
1162
|
+
B.output = k;
|
|
1163
|
+
m.output += B.output;
|
|
1164
|
+
}
|
|
1165
|
+
}
|
|
1166
|
+
if (w.length && t$3.type !== "paren") w[w.length - 1].inner += t$3.value;
|
|
1167
|
+
if (t$3.value || t$3.output) append(t$3);
|
|
1168
|
+
if (B && B.type === "text" && t$3.type === "text") {
|
|
1169
|
+
B.output = (B.output || B.value) + t$3.value;
|
|
1170
|
+
B.value += t$3.value;
|
|
1171
|
+
return;
|
|
1172
|
+
}
|
|
1173
|
+
t$3.prev = B;
|
|
1174
|
+
A.push(t$3);
|
|
1175
|
+
B = t$3;
|
|
1176
|
+
};
|
|
1177
|
+
const extglobOpen = (t$3, e$3) => {
|
|
1178
|
+
const n$1 = {
|
|
1179
|
+
...E[e$3],
|
|
1180
|
+
conditions: 1,
|
|
1181
|
+
inner: ""
|
|
1182
|
+
};
|
|
1183
|
+
n$1.prev = B;
|
|
1184
|
+
n$1.parens = m.parens;
|
|
1185
|
+
n$1.output = m.output;
|
|
1186
|
+
const o$1 = (u$2.capture ? "(" : "") + n$1.open;
|
|
1187
|
+
increment("parens");
|
|
1188
|
+
push({
|
|
1189
|
+
type: t$3,
|
|
1190
|
+
value: e$3,
|
|
1191
|
+
output: m.output ? "" : C
|
|
1192
|
+
});
|
|
1193
|
+
push({
|
|
1194
|
+
type: "paren",
|
|
1195
|
+
extglob: true,
|
|
1196
|
+
value: M(),
|
|
1197
|
+
output: o$1
|
|
1198
|
+
});
|
|
1199
|
+
w.push(n$1);
|
|
1200
|
+
};
|
|
1201
|
+
const extglobClose = (t$3) => {
|
|
1202
|
+
let n$1 = t$3.close + (u$2.capture ? ")" : "");
|
|
1203
|
+
let o$1;
|
|
1204
|
+
if (t$3.type === "negate") {
|
|
1205
|
+
let s$1 = k;
|
|
1206
|
+
if (t$3.inner && t$3.inner.length > 1 && t$3.inner.includes("/")) s$1 = globstar(u$2);
|
|
1207
|
+
if (s$1 !== k || eos() || /^\)+$/.test(remaining())) n$1 = t$3.close = `)$))${s$1}`;
|
|
1208
|
+
if (t$3.inner.includes("*") && (o$1 = remaining()) && /^\.[^\\/.]+$/.test(o$1)) n$1 = t$3.close = `)${parse(o$1, {
|
|
1209
|
+
...e$2,
|
|
1210
|
+
fastpaths: false
|
|
1211
|
+
}).output})${s$1})`;
|
|
1212
|
+
if (t$3.prev.type === "bos") m.negatedExtglob = true;
|
|
1213
|
+
}
|
|
1214
|
+
push({
|
|
1215
|
+
type: "paren",
|
|
1216
|
+
extglob: true,
|
|
1217
|
+
value: G,
|
|
1218
|
+
output: n$1
|
|
1219
|
+
});
|
|
1220
|
+
decrement("parens");
|
|
1221
|
+
};
|
|
1222
|
+
if (u$2.fastpaths !== false && !/(^[*!]|[/()[\]{}"])/.test(t$2)) {
|
|
1223
|
+
let n$1 = false;
|
|
1224
|
+
let s$1 = t$2.replace(i, ((t$3, e$3, u$3, o$1, s$2, r$1) => {
|
|
1225
|
+
if (o$1 === "\\") {
|
|
1226
|
+
n$1 = true;
|
|
1227
|
+
return t$3;
|
|
1228
|
+
}
|
|
1229
|
+
if (o$1 === "?") {
|
|
1230
|
+
if (e$3) return e$3 + o$1 + (s$2 ? H.repeat(s$2.length) : "");
|
|
1231
|
+
if (r$1 === 0) return O + (s$2 ? H.repeat(s$2.length) : "");
|
|
1232
|
+
return H.repeat(u$3.length);
|
|
1233
|
+
}
|
|
1234
|
+
if (o$1 === ".") return h.repeat(u$3.length);
|
|
1235
|
+
if (o$1 === "*") {
|
|
1236
|
+
if (e$3) return e$3 + o$1 + (s$2 ? k : "");
|
|
1237
|
+
return k;
|
|
1238
|
+
}
|
|
1239
|
+
return e$3 ? t$3 : `\\${t$3}`;
|
|
1240
|
+
}));
|
|
1241
|
+
if (n$1 === true) if (u$2.unescape === true) s$1 = s$1.replace(/\\/g, "");
|
|
1242
|
+
else s$1 = s$1.replace(/\\+/g, ((t$3) => t$3.length % 2 === 0 ? "\\\\" : t$3 ? "\\" : ""));
|
|
1243
|
+
if (s$1 === t$2 && u$2.contains === true) {
|
|
1244
|
+
m.output = t$2;
|
|
1245
|
+
return m;
|
|
1246
|
+
}
|
|
1247
|
+
m.output = o.wrapOutput(s$1, m, e$2);
|
|
1248
|
+
return m;
|
|
1249
|
+
}
|
|
1250
|
+
while (!eos()) {
|
|
1251
|
+
G = M();
|
|
1252
|
+
if (G === "\0") continue;
|
|
1253
|
+
if (G === "\\") {
|
|
1254
|
+
const t$3 = D();
|
|
1255
|
+
if (t$3 === "/" && u$2.bash !== true) continue;
|
|
1256
|
+
if (t$3 === "." || t$3 === ";") continue;
|
|
1257
|
+
if (!t$3) {
|
|
1258
|
+
G += "\\";
|
|
1259
|
+
push({
|
|
1260
|
+
type: "text",
|
|
1261
|
+
value: G
|
|
1262
|
+
});
|
|
1263
|
+
continue;
|
|
1264
|
+
}
|
|
1265
|
+
const e$4 = /^\\+/.exec(remaining());
|
|
1266
|
+
let n$2 = 0;
|
|
1267
|
+
if (e$4 && e$4[0].length > 2) {
|
|
1268
|
+
n$2 = e$4[0].length;
|
|
1269
|
+
m.index += n$2;
|
|
1270
|
+
if (n$2 % 2 !== 0) G += "\\";
|
|
1271
|
+
}
|
|
1272
|
+
if (u$2.unescape === true) G = M();
|
|
1273
|
+
else G += M();
|
|
1274
|
+
if (m.brackets === 0) {
|
|
1275
|
+
push({
|
|
1276
|
+
type: "text",
|
|
1277
|
+
value: G
|
|
1278
|
+
});
|
|
1279
|
+
continue;
|
|
1280
|
+
}
|
|
1281
|
+
}
|
|
1282
|
+
if (m.brackets > 0 && (G !== "]" || B.value === "[" || B.value === "[^")) {
|
|
1283
|
+
if (u$2.posix !== false && G === ":") {
|
|
1284
|
+
const t$3 = B.value.slice(1);
|
|
1285
|
+
if (t$3.includes("[")) {
|
|
1286
|
+
B.posix = true;
|
|
1287
|
+
if (t$3.includes(":")) {
|
|
1288
|
+
const t$4 = B.value.lastIndexOf("[");
|
|
1289
|
+
const e$4 = B.value.slice(0, t$4);
|
|
1290
|
+
const n$2 = r[B.value.slice(t$4 + 2)];
|
|
1291
|
+
if (n$2) {
|
|
1292
|
+
B.value = e$4 + n$2;
|
|
1293
|
+
m.backtrack = true;
|
|
1294
|
+
M();
|
|
1295
|
+
if (!f.output && A.indexOf(B) === 1) f.output = C;
|
|
1296
|
+
continue;
|
|
1297
|
+
}
|
|
1298
|
+
}
|
|
1299
|
+
}
|
|
1300
|
+
}
|
|
1301
|
+
if (G === "[" && D() !== ":" || G === "-" && D() === "]") G = `\\${G}`;
|
|
1302
|
+
if (G === "]" && (B.value === "[" || B.value === "[^")) G = `\\${G}`;
|
|
1303
|
+
if (u$2.posix === true && G === "!" && B.value === "[") G = "^";
|
|
1304
|
+
B.value += G;
|
|
1305
|
+
append({ value: G });
|
|
1306
|
+
continue;
|
|
1307
|
+
}
|
|
1308
|
+
if (m.quotes === 1 && G !== "\"") {
|
|
1309
|
+
G = o.escapeRegex(G);
|
|
1310
|
+
B.value += G;
|
|
1311
|
+
append({ value: G });
|
|
1312
|
+
continue;
|
|
1313
|
+
}
|
|
1314
|
+
if (G === "\"") {
|
|
1315
|
+
m.quotes = m.quotes === 1 ? 0 : 1;
|
|
1316
|
+
if (u$2.keepQuotes === true) push({
|
|
1317
|
+
type: "text",
|
|
1318
|
+
value: G
|
|
1319
|
+
});
|
|
1320
|
+
continue;
|
|
1321
|
+
}
|
|
1322
|
+
if (G === "(") {
|
|
1323
|
+
increment("parens");
|
|
1324
|
+
push({
|
|
1325
|
+
type: "paren",
|
|
1326
|
+
value: G
|
|
1327
|
+
});
|
|
1328
|
+
continue;
|
|
1329
|
+
}
|
|
1330
|
+
if (G === ")") {
|
|
1331
|
+
if (m.parens === 0 && u$2.strictBrackets === true) throw new SyntaxError(syntaxError("opening", "("));
|
|
1332
|
+
const t$3 = w[w.length - 1];
|
|
1333
|
+
if (t$3 && m.parens === t$3.parens + 1) {
|
|
1334
|
+
extglobClose(w.pop());
|
|
1335
|
+
continue;
|
|
1336
|
+
}
|
|
1337
|
+
push({
|
|
1338
|
+
type: "paren",
|
|
1339
|
+
value: G,
|
|
1340
|
+
output: m.parens ? ")" : "\\)"
|
|
1341
|
+
});
|
|
1342
|
+
decrement("parens");
|
|
1343
|
+
continue;
|
|
1344
|
+
}
|
|
1345
|
+
if (G === "[") {
|
|
1346
|
+
if (u$2.nobracket === true || !remaining().includes("]")) {
|
|
1347
|
+
if (u$2.nobracket !== true && u$2.strictBrackets === true) throw new SyntaxError(syntaxError("closing", "]"));
|
|
1348
|
+
G = `\\${G}`;
|
|
1349
|
+
} else increment("brackets");
|
|
1350
|
+
push({
|
|
1351
|
+
type: "bracket",
|
|
1352
|
+
value: G
|
|
1353
|
+
});
|
|
1354
|
+
continue;
|
|
1355
|
+
}
|
|
1356
|
+
if (G === "]") {
|
|
1357
|
+
if (u$2.nobracket === true || B && B.type === "bracket" && B.value.length === 1) {
|
|
1358
|
+
push({
|
|
1359
|
+
type: "text",
|
|
1360
|
+
value: G,
|
|
1361
|
+
output: `\\${G}`
|
|
1362
|
+
});
|
|
1363
|
+
continue;
|
|
1364
|
+
}
|
|
1365
|
+
if (m.brackets === 0) {
|
|
1366
|
+
if (u$2.strictBrackets === true) throw new SyntaxError(syntaxError("opening", "["));
|
|
1367
|
+
push({
|
|
1368
|
+
type: "text",
|
|
1369
|
+
value: G,
|
|
1370
|
+
output: `\\${G}`
|
|
1371
|
+
});
|
|
1372
|
+
continue;
|
|
1373
|
+
}
|
|
1374
|
+
decrement("brackets");
|
|
1375
|
+
const t$3 = B.value.slice(1);
|
|
1376
|
+
if (B.posix !== true && t$3[0] === "^" && !t$3.includes("/")) G = `/${G}`;
|
|
1377
|
+
B.value += G;
|
|
1378
|
+
append({ value: G });
|
|
1379
|
+
if (u$2.literalBrackets === false || o.hasRegexChars(t$3)) continue;
|
|
1380
|
+
const e$4 = o.escapeRegex(B.value);
|
|
1381
|
+
m.output = m.output.slice(0, -B.value.length);
|
|
1382
|
+
if (u$2.literalBrackets === true) {
|
|
1383
|
+
m.output += e$4;
|
|
1384
|
+
B.value = e$4;
|
|
1385
|
+
continue;
|
|
1386
|
+
}
|
|
1387
|
+
B.value = `(${_}${e$4}|${B.value})`;
|
|
1388
|
+
m.output += B.value;
|
|
1389
|
+
continue;
|
|
1390
|
+
}
|
|
1391
|
+
if (G === "{" && u$2.nobrace !== true) {
|
|
1392
|
+
increment("braces");
|
|
1393
|
+
const t$3 = {
|
|
1394
|
+
type: "brace",
|
|
1395
|
+
value: G,
|
|
1396
|
+
output: "(",
|
|
1397
|
+
outputIndex: m.output.length,
|
|
1398
|
+
tokensIndex: m.tokens.length
|
|
1399
|
+
};
|
|
1400
|
+
N.push(t$3);
|
|
1401
|
+
push(t$3);
|
|
1402
|
+
continue;
|
|
1403
|
+
}
|
|
1404
|
+
if (G === "}") {
|
|
1405
|
+
const t$3 = N[N.length - 1];
|
|
1406
|
+
if (u$2.nobrace === true || !t$3) {
|
|
1407
|
+
push({
|
|
1408
|
+
type: "text",
|
|
1409
|
+
value: G,
|
|
1410
|
+
output: G
|
|
1411
|
+
});
|
|
1412
|
+
continue;
|
|
1413
|
+
}
|
|
1414
|
+
let e$4 = ")";
|
|
1415
|
+
if (t$3.dots === true) {
|
|
1416
|
+
const t$4 = A.slice();
|
|
1417
|
+
const n$2 = [];
|
|
1418
|
+
for (let e$5 = t$4.length - 1; e$5 >= 0; e$5--) {
|
|
1419
|
+
A.pop();
|
|
1420
|
+
if (t$4[e$5].type === "brace") break;
|
|
1421
|
+
if (t$4[e$5].type !== "dots") n$2.unshift(t$4[e$5].value);
|
|
1422
|
+
}
|
|
1423
|
+
e$4 = expandRange(n$2, u$2);
|
|
1424
|
+
m.backtrack = true;
|
|
1425
|
+
}
|
|
1426
|
+
if (t$3.comma !== true && t$3.dots !== true) {
|
|
1427
|
+
const u$3 = m.output.slice(0, t$3.outputIndex);
|
|
1428
|
+
const n$2 = m.tokens.slice(t$3.tokensIndex);
|
|
1429
|
+
t$3.value = t$3.output = "\\{";
|
|
1430
|
+
G = e$4 = "\\}";
|
|
1431
|
+
m.output = u$3;
|
|
1432
|
+
for (const t$4 of n$2) m.output += t$4.output || t$4.value;
|
|
1433
|
+
}
|
|
1434
|
+
push({
|
|
1435
|
+
type: "brace",
|
|
1436
|
+
value: G,
|
|
1437
|
+
output: e$4
|
|
1438
|
+
});
|
|
1439
|
+
decrement("braces");
|
|
1440
|
+
N.pop();
|
|
1441
|
+
continue;
|
|
1442
|
+
}
|
|
1443
|
+
if (G === "|") {
|
|
1444
|
+
if (w.length > 0) w[w.length - 1].conditions++;
|
|
1445
|
+
push({
|
|
1446
|
+
type: "text",
|
|
1447
|
+
value: G
|
|
1448
|
+
});
|
|
1449
|
+
continue;
|
|
1450
|
+
}
|
|
1451
|
+
if (G === ",") {
|
|
1452
|
+
let t$3 = G;
|
|
1453
|
+
const e$4 = N[N.length - 1];
|
|
1454
|
+
if (e$4 && I[I.length - 1] === "braces") {
|
|
1455
|
+
e$4.comma = true;
|
|
1456
|
+
t$3 = "|";
|
|
1457
|
+
}
|
|
1458
|
+
push({
|
|
1459
|
+
type: "comma",
|
|
1460
|
+
value: G,
|
|
1461
|
+
output: t$3
|
|
1462
|
+
});
|
|
1463
|
+
continue;
|
|
1464
|
+
}
|
|
1465
|
+
if (G === "/") {
|
|
1466
|
+
if (B.type === "dot" && m.index === m.start + 1) {
|
|
1467
|
+
m.start = m.index + 1;
|
|
1468
|
+
m.consumed = "";
|
|
1469
|
+
m.output = "";
|
|
1470
|
+
A.pop();
|
|
1471
|
+
B = f;
|
|
1472
|
+
continue;
|
|
1473
|
+
}
|
|
1474
|
+
push({
|
|
1475
|
+
type: "slash",
|
|
1476
|
+
value: G,
|
|
1477
|
+
output: b
|
|
1478
|
+
});
|
|
1479
|
+
continue;
|
|
1480
|
+
}
|
|
1481
|
+
if (G === ".") {
|
|
1482
|
+
if (m.braces > 0 && B.type === "dot") {
|
|
1483
|
+
if (B.value === ".") B.output = h;
|
|
1484
|
+
const t$3 = N[N.length - 1];
|
|
1485
|
+
B.type = "dots";
|
|
1486
|
+
B.output += G;
|
|
1487
|
+
B.value += G;
|
|
1488
|
+
t$3.dots = true;
|
|
1489
|
+
continue;
|
|
1490
|
+
}
|
|
1491
|
+
if (m.braces + m.parens === 0 && B.type !== "bos" && B.type !== "slash") {
|
|
1492
|
+
push({
|
|
1493
|
+
type: "text",
|
|
1494
|
+
value: G,
|
|
1495
|
+
output: h
|
|
1496
|
+
});
|
|
1497
|
+
continue;
|
|
1498
|
+
}
|
|
1499
|
+
push({
|
|
1500
|
+
type: "dot",
|
|
1501
|
+
value: G,
|
|
1502
|
+
output: h
|
|
1503
|
+
});
|
|
1504
|
+
continue;
|
|
1505
|
+
}
|
|
1506
|
+
if (G === "?") {
|
|
1507
|
+
if (!(B && B.value === "(") && u$2.noextglob !== true && D() === "(" && D(2) !== "?") {
|
|
1508
|
+
extglobOpen("qmark", G);
|
|
1509
|
+
continue;
|
|
1510
|
+
}
|
|
1511
|
+
if (B && B.type === "paren") {
|
|
1512
|
+
const t$3 = D();
|
|
1513
|
+
let e$4 = G;
|
|
1514
|
+
if (B.value === "(" && !/[!=<:]/.test(t$3) || t$3 === "<" && !/<([!=]|\w+>)/.test(remaining())) e$4 = `\\${G}`;
|
|
1515
|
+
push({
|
|
1516
|
+
type: "text",
|
|
1517
|
+
value: G,
|
|
1518
|
+
output: e$4
|
|
1519
|
+
});
|
|
1520
|
+
continue;
|
|
1521
|
+
}
|
|
1522
|
+
if (u$2.dot !== true && (B.type === "slash" || B.type === "bos")) {
|
|
1523
|
+
push({
|
|
1524
|
+
type: "qmark",
|
|
1525
|
+
value: G,
|
|
1526
|
+
output: v
|
|
1527
|
+
});
|
|
1528
|
+
continue;
|
|
1529
|
+
}
|
|
1530
|
+
push({
|
|
1531
|
+
type: "qmark",
|
|
1532
|
+
value: G,
|
|
1533
|
+
output: H
|
|
1534
|
+
});
|
|
1535
|
+
continue;
|
|
1536
|
+
}
|
|
1537
|
+
if (G === "!") {
|
|
1538
|
+
if (u$2.noextglob !== true && D() === "(") {
|
|
1539
|
+
if (D(2) !== "?" || !/[!=<:]/.test(D(3))) {
|
|
1540
|
+
extglobOpen("negate", G);
|
|
1541
|
+
continue;
|
|
1542
|
+
}
|
|
1543
|
+
}
|
|
1544
|
+
if (u$2.nonegate !== true && m.index === 0) {
|
|
1545
|
+
negate();
|
|
1546
|
+
continue;
|
|
1547
|
+
}
|
|
1548
|
+
}
|
|
1549
|
+
if (G === "+") {
|
|
1550
|
+
if (u$2.noextglob !== true && D() === "(" && D(2) !== "?") {
|
|
1551
|
+
extglobOpen("plus", G);
|
|
1552
|
+
continue;
|
|
1553
|
+
}
|
|
1554
|
+
if (B && B.value === "(" || u$2.regex === false) {
|
|
1555
|
+
push({
|
|
1556
|
+
type: "plus",
|
|
1557
|
+
value: G,
|
|
1558
|
+
output: g
|
|
1559
|
+
});
|
|
1560
|
+
continue;
|
|
1561
|
+
}
|
|
1562
|
+
if (B && (B.type === "bracket" || B.type === "paren" || B.type === "brace") || m.parens > 0) {
|
|
1563
|
+
push({
|
|
1564
|
+
type: "plus",
|
|
1565
|
+
value: G
|
|
1566
|
+
});
|
|
1567
|
+
continue;
|
|
1568
|
+
}
|
|
1569
|
+
push({
|
|
1570
|
+
type: "plus",
|
|
1571
|
+
value: g
|
|
1572
|
+
});
|
|
1573
|
+
continue;
|
|
1574
|
+
}
|
|
1575
|
+
if (G === "@") {
|
|
1576
|
+
if (u$2.noextglob !== true && D() === "(" && D(2) !== "?") {
|
|
1577
|
+
push({
|
|
1578
|
+
type: "at",
|
|
1579
|
+
extglob: true,
|
|
1580
|
+
value: G,
|
|
1581
|
+
output: ""
|
|
1582
|
+
});
|
|
1583
|
+
continue;
|
|
1584
|
+
}
|
|
1585
|
+
push({
|
|
1586
|
+
type: "text",
|
|
1587
|
+
value: G
|
|
1588
|
+
});
|
|
1589
|
+
continue;
|
|
1590
|
+
}
|
|
1591
|
+
if (G !== "*") {
|
|
1592
|
+
if (G === "$" || G === "^") G = `\\${G}`;
|
|
1593
|
+
const t$3 = a.exec(remaining());
|
|
1594
|
+
if (t$3) {
|
|
1595
|
+
G += t$3[0];
|
|
1596
|
+
m.index += t$3[0].length;
|
|
1597
|
+
}
|
|
1598
|
+
push({
|
|
1599
|
+
type: "text",
|
|
1600
|
+
value: G
|
|
1601
|
+
});
|
|
1602
|
+
continue;
|
|
1603
|
+
}
|
|
1604
|
+
if (B && (B.type === "globstar" || B.star === true)) {
|
|
1605
|
+
B.type = "star";
|
|
1606
|
+
B.star = true;
|
|
1607
|
+
B.value += G;
|
|
1608
|
+
B.output = k;
|
|
1609
|
+
m.backtrack = true;
|
|
1610
|
+
m.globstar = true;
|
|
1611
|
+
consume(G);
|
|
1612
|
+
continue;
|
|
1613
|
+
}
|
|
1614
|
+
let e$3 = remaining();
|
|
1615
|
+
if (u$2.noextglob !== true && /^\([^?]/.test(e$3)) {
|
|
1616
|
+
extglobOpen("star", G);
|
|
1617
|
+
continue;
|
|
1618
|
+
}
|
|
1619
|
+
if (B.type === "star") {
|
|
1620
|
+
if (u$2.noglobstar === true) {
|
|
1621
|
+
consume(G);
|
|
1622
|
+
continue;
|
|
1623
|
+
}
|
|
1624
|
+
const n$2 = B.prev;
|
|
1625
|
+
const o$1 = n$2.prev;
|
|
1626
|
+
const s$1 = n$2.type === "slash" || n$2.type === "bos";
|
|
1627
|
+
const r$1 = o$1 && (o$1.type === "star" || o$1.type === "globstar");
|
|
1628
|
+
if (u$2.bash === true && (!s$1 || e$3[0] && e$3[0] !== "/")) {
|
|
1629
|
+
push({
|
|
1630
|
+
type: "star",
|
|
1631
|
+
value: G,
|
|
1632
|
+
output: ""
|
|
1633
|
+
});
|
|
1634
|
+
continue;
|
|
1635
|
+
}
|
|
1636
|
+
const a$1 = m.braces > 0 && (n$2.type === "comma" || n$2.type === "brace");
|
|
1637
|
+
const i$1 = w.length && (n$2.type === "pipe" || n$2.type === "paren");
|
|
1638
|
+
if (!s$1 && n$2.type !== "paren" && !a$1 && !i$1) {
|
|
1639
|
+
push({
|
|
1640
|
+
type: "star",
|
|
1641
|
+
value: G,
|
|
1642
|
+
output: ""
|
|
1643
|
+
});
|
|
1644
|
+
continue;
|
|
1645
|
+
}
|
|
1646
|
+
while (e$3.slice(0, 3) === "/**") {
|
|
1647
|
+
const u$3 = t$2[m.index + 4];
|
|
1648
|
+
if (u$3 && u$3 !== "/") break;
|
|
1649
|
+
e$3 = e$3.slice(3);
|
|
1650
|
+
consume("/**", 3);
|
|
1651
|
+
}
|
|
1652
|
+
if (n$2.type === "bos" && eos()) {
|
|
1653
|
+
B.type = "globstar";
|
|
1654
|
+
B.value += G;
|
|
1655
|
+
B.output = globstar(u$2);
|
|
1656
|
+
m.output = B.output;
|
|
1657
|
+
m.globstar = true;
|
|
1658
|
+
consume(G);
|
|
1659
|
+
continue;
|
|
1660
|
+
}
|
|
1661
|
+
if (n$2.type === "slash" && n$2.prev.type !== "bos" && !r$1 && eos()) {
|
|
1662
|
+
m.output = m.output.slice(0, -(n$2.output + B.output).length);
|
|
1663
|
+
n$2.output = `(?:${n$2.output}`;
|
|
1664
|
+
B.type = "globstar";
|
|
1665
|
+
B.output = globstar(u$2) + (u$2.strictSlashes ? ")" : "|$)");
|
|
1666
|
+
B.value += G;
|
|
1667
|
+
m.globstar = true;
|
|
1668
|
+
m.output += n$2.output + B.output;
|
|
1669
|
+
consume(G);
|
|
1670
|
+
continue;
|
|
1671
|
+
}
|
|
1672
|
+
if (n$2.type === "slash" && n$2.prev.type !== "bos" && e$3[0] === "/") {
|
|
1673
|
+
const t$3 = e$3[1] !== void 0 ? "|$" : "";
|
|
1674
|
+
m.output = m.output.slice(0, -(n$2.output + B.output).length);
|
|
1675
|
+
n$2.output = `(?:${n$2.output}`;
|
|
1676
|
+
B.type = "globstar";
|
|
1677
|
+
B.output = `${globstar(u$2)}${b}|${b}${t$3})`;
|
|
1678
|
+
B.value += G;
|
|
1679
|
+
m.output += n$2.output + B.output;
|
|
1680
|
+
m.globstar = true;
|
|
1681
|
+
consume(G + M());
|
|
1682
|
+
push({
|
|
1683
|
+
type: "slash",
|
|
1684
|
+
value: "/",
|
|
1685
|
+
output: ""
|
|
1686
|
+
});
|
|
1687
|
+
continue;
|
|
1688
|
+
}
|
|
1689
|
+
if (n$2.type === "bos" && e$3[0] === "/") {
|
|
1690
|
+
B.type = "globstar";
|
|
1691
|
+
B.value += G;
|
|
1692
|
+
B.output = `(?:^|${b}|${globstar(u$2)}${b})`;
|
|
1693
|
+
m.output = B.output;
|
|
1694
|
+
m.globstar = true;
|
|
1695
|
+
consume(G + M());
|
|
1696
|
+
push({
|
|
1697
|
+
type: "slash",
|
|
1698
|
+
value: "/",
|
|
1699
|
+
output: ""
|
|
1700
|
+
});
|
|
1701
|
+
continue;
|
|
1702
|
+
}
|
|
1703
|
+
m.output = m.output.slice(0, -B.output.length);
|
|
1704
|
+
B.type = "globstar";
|
|
1705
|
+
B.output = globstar(u$2);
|
|
1706
|
+
B.value += G;
|
|
1707
|
+
m.output += B.output;
|
|
1708
|
+
m.globstar = true;
|
|
1709
|
+
consume(G);
|
|
1710
|
+
continue;
|
|
1711
|
+
}
|
|
1712
|
+
const n$1 = {
|
|
1713
|
+
type: "star",
|
|
1714
|
+
value: G,
|
|
1715
|
+
output: k
|
|
1716
|
+
};
|
|
1717
|
+
if (u$2.bash === true) {
|
|
1718
|
+
n$1.output = ".*?";
|
|
1719
|
+
if (B.type === "bos" || B.type === "slash") n$1.output = T + n$1.output;
|
|
1720
|
+
push(n$1);
|
|
1721
|
+
continue;
|
|
1722
|
+
}
|
|
1723
|
+
if (B && (B.type === "bracket" || B.type === "paren") && u$2.regex === true) {
|
|
1724
|
+
n$1.output = G;
|
|
1725
|
+
push(n$1);
|
|
1726
|
+
continue;
|
|
1727
|
+
}
|
|
1728
|
+
if (m.index === m.start || B.type === "slash" || B.type === "dot") {
|
|
1729
|
+
if (B.type === "dot") {
|
|
1730
|
+
m.output += x;
|
|
1731
|
+
B.output += x;
|
|
1732
|
+
} else if (u$2.dot === true) {
|
|
1733
|
+
m.output += S;
|
|
1734
|
+
B.output += S;
|
|
1735
|
+
} else {
|
|
1736
|
+
m.output += T;
|
|
1737
|
+
B.output += T;
|
|
1738
|
+
}
|
|
1739
|
+
if (D() !== "*") {
|
|
1740
|
+
m.output += C;
|
|
1741
|
+
B.output += C;
|
|
1742
|
+
}
|
|
1743
|
+
}
|
|
1744
|
+
push(n$1);
|
|
1745
|
+
}
|
|
1746
|
+
while (m.brackets > 0) {
|
|
1747
|
+
if (u$2.strictBrackets === true) throw new SyntaxError(syntaxError("closing", "]"));
|
|
1748
|
+
m.output = o.escapeLast(m.output, "[");
|
|
1749
|
+
decrement("brackets");
|
|
1750
|
+
}
|
|
1751
|
+
while (m.parens > 0) {
|
|
1752
|
+
if (u$2.strictBrackets === true) throw new SyntaxError(syntaxError("closing", ")"));
|
|
1753
|
+
m.output = o.escapeLast(m.output, "(");
|
|
1754
|
+
decrement("parens");
|
|
1755
|
+
}
|
|
1756
|
+
while (m.braces > 0) {
|
|
1757
|
+
if (u$2.strictBrackets === true) throw new SyntaxError(syntaxError("closing", "}"));
|
|
1758
|
+
m.output = o.escapeLast(m.output, "{");
|
|
1759
|
+
decrement("braces");
|
|
1760
|
+
}
|
|
1761
|
+
if (u$2.strictSlashes !== true && (B.type === "star" || B.type === "bracket")) push({
|
|
1762
|
+
type: "maybe_slash",
|
|
1763
|
+
value: "",
|
|
1764
|
+
output: `${b}?`
|
|
1765
|
+
});
|
|
1766
|
+
if (m.backtrack === true) {
|
|
1767
|
+
m.output = "";
|
|
1768
|
+
for (const t$3 of m.tokens) {
|
|
1769
|
+
m.output += t$3.output != null ? t$3.output : t$3.value;
|
|
1770
|
+
if (t$3.suffix) m.output += t$3.suffix;
|
|
1771
|
+
}
|
|
1772
|
+
}
|
|
1773
|
+
return m;
|
|
1774
|
+
};
|
|
1775
|
+
parse.fastpaths = (t$2, e$2) => {
|
|
1776
|
+
const u$2 = { ...e$2 };
|
|
1777
|
+
const r$1 = typeof u$2.maxLength === "number" ? Math.min(s, u$2.maxLength) : s;
|
|
1778
|
+
const a$1 = t$2.length;
|
|
1779
|
+
if (a$1 > r$1) throw new SyntaxError(`Input length: ${a$1}, exceeds maximum allowed length: ${r$1}`);
|
|
1780
|
+
t$2 = c[t$2] || t$2;
|
|
1781
|
+
const { DOT_LITERAL: i$1, SLASH_LITERAL: p, ONE_CHAR: l, DOTS_SLASH: f, NO_DOT: A, NO_DOTS: _, NO_DOTS_SLASH: R, STAR: E, START_ANCHOR: h } = n.globChars(u$2.windows);
|
|
1782
|
+
const g = u$2.dot ? _ : A;
|
|
1783
|
+
const b = u$2.dot ? R : A;
|
|
1784
|
+
const C = u$2.capture ? "" : "?:";
|
|
1785
|
+
const y = {
|
|
1786
|
+
negated: false,
|
|
1787
|
+
prefix: ""
|
|
1788
|
+
};
|
|
1789
|
+
let $ = u$2.bash === true ? ".*?" : E;
|
|
1790
|
+
if (u$2.capture) $ = `(${$})`;
|
|
1791
|
+
const globstar = (t$3) => {
|
|
1792
|
+
if (t$3.noglobstar === true) return $;
|
|
1793
|
+
return `(${C}(?:(?!${h}${t$3.dot ? f : i$1}).)*?)`;
|
|
1794
|
+
};
|
|
1795
|
+
const create = (t$3) => {
|
|
1796
|
+
switch (t$3) {
|
|
1797
|
+
case "*": return `${g}${l}${$}`;
|
|
1798
|
+
case ".*": return `${i$1}${l}${$}`;
|
|
1799
|
+
case "*.*": return `${g}${$}${i$1}${l}${$}`;
|
|
1800
|
+
case "*/*": return `${g}${$}${p}${l}${b}${$}`;
|
|
1801
|
+
case "**": return g + globstar(u$2);
|
|
1802
|
+
case "**/*": return `(?:${g}${globstar(u$2)}${p})?${b}${l}${$}`;
|
|
1803
|
+
case "**/*.*": return `(?:${g}${globstar(u$2)}${p})?${b}${$}${i$1}${l}${$}`;
|
|
1804
|
+
case "**/.*": return `(?:${g}${globstar(u$2)}${p})?${i$1}${l}${$}`;
|
|
1805
|
+
default: {
|
|
1806
|
+
const e$3 = /^(.*?)\.(\w+)$/.exec(t$3);
|
|
1807
|
+
if (!e$3) return;
|
|
1808
|
+
const u$3 = create(e$3[1]);
|
|
1809
|
+
if (!u$3) return;
|
|
1810
|
+
return u$3 + i$1 + e$3[2];
|
|
1811
|
+
}
|
|
1812
|
+
}
|
|
1813
|
+
};
|
|
1814
|
+
let S = create(o.removePrefix(t$2, y));
|
|
1815
|
+
if (S && u$2.strictSlashes !== true) S += `${p}?`;
|
|
1816
|
+
return S;
|
|
1817
|
+
};
|
|
1818
|
+
t$1.exports = parse;
|
|
1819
|
+
},
|
|
1820
|
+
510: (t$1, e$1, u$1) => {
|
|
1821
|
+
const n = u$1(716);
|
|
1822
|
+
const o = u$1(697);
|
|
1823
|
+
const s = u$1(96);
|
|
1824
|
+
const r = u$1(154);
|
|
1825
|
+
const isObject = (t$2) => t$2 && typeof t$2 === "object" && !Array.isArray(t$2);
|
|
1826
|
+
const picomatch = (t$2, e$2, u$2 = false) => {
|
|
1827
|
+
if (Array.isArray(t$2)) {
|
|
1828
|
+
const n$2 = t$2.map(((t$3) => picomatch(t$3, e$2, u$2)));
|
|
1829
|
+
const arrayMatcher = (t$3) => {
|
|
1830
|
+
for (const e$3 of n$2) {
|
|
1831
|
+
const u$3 = e$3(t$3);
|
|
1832
|
+
if (u$3) return u$3;
|
|
1833
|
+
}
|
|
1834
|
+
return false;
|
|
1835
|
+
};
|
|
1836
|
+
return arrayMatcher;
|
|
1837
|
+
}
|
|
1838
|
+
const n$1 = isObject(t$2) && t$2.tokens && t$2.input;
|
|
1839
|
+
if (t$2 === "" || typeof t$2 !== "string" && !n$1) throw new TypeError("Expected pattern to be a non-empty string");
|
|
1840
|
+
const o$1 = e$2 || {};
|
|
1841
|
+
const s$1 = o$1.windows;
|
|
1842
|
+
const r$1 = n$1 ? picomatch.compileRe(t$2, e$2) : picomatch.makeRe(t$2, e$2, false, true);
|
|
1843
|
+
const a = r$1.state;
|
|
1844
|
+
delete r$1.state;
|
|
1845
|
+
let isIgnored = () => false;
|
|
1846
|
+
if (o$1.ignore) {
|
|
1847
|
+
const t$3 = {
|
|
1848
|
+
...e$2,
|
|
1849
|
+
ignore: null,
|
|
1850
|
+
onMatch: null,
|
|
1851
|
+
onResult: null
|
|
1852
|
+
};
|
|
1853
|
+
isIgnored = picomatch(o$1.ignore, t$3, u$2);
|
|
1854
|
+
}
|
|
1855
|
+
const matcher = (u$3, n$2 = false) => {
|
|
1856
|
+
const { isMatch: i, match: c, output: p } = picomatch.test(u$3, r$1, e$2, {
|
|
1857
|
+
glob: t$2,
|
|
1858
|
+
posix: s$1
|
|
1859
|
+
});
|
|
1860
|
+
const l = {
|
|
1861
|
+
glob: t$2,
|
|
1862
|
+
state: a,
|
|
1863
|
+
regex: r$1,
|
|
1864
|
+
posix: s$1,
|
|
1865
|
+
input: u$3,
|
|
1866
|
+
output: p,
|
|
1867
|
+
match: c,
|
|
1868
|
+
isMatch: i
|
|
1869
|
+
};
|
|
1870
|
+
if (typeof o$1.onResult === "function") o$1.onResult(l);
|
|
1871
|
+
if (i === false) {
|
|
1872
|
+
l.isMatch = false;
|
|
1873
|
+
return n$2 ? l : false;
|
|
1874
|
+
}
|
|
1875
|
+
if (isIgnored(u$3)) {
|
|
1876
|
+
if (typeof o$1.onIgnore === "function") o$1.onIgnore(l);
|
|
1877
|
+
l.isMatch = false;
|
|
1878
|
+
return n$2 ? l : false;
|
|
1879
|
+
}
|
|
1880
|
+
if (typeof o$1.onMatch === "function") o$1.onMatch(l);
|
|
1881
|
+
return n$2 ? l : true;
|
|
1882
|
+
};
|
|
1883
|
+
if (u$2) matcher.state = a;
|
|
1884
|
+
return matcher;
|
|
1885
|
+
};
|
|
1886
|
+
picomatch.test = (t$2, e$2, u$2, { glob: n$1, posix: o$1 } = {}) => {
|
|
1887
|
+
if (typeof t$2 !== "string") throw new TypeError("Expected input to be a string");
|
|
1888
|
+
if (t$2 === "") return {
|
|
1889
|
+
isMatch: false,
|
|
1890
|
+
output: ""
|
|
1891
|
+
};
|
|
1892
|
+
const r$1 = u$2 || {};
|
|
1893
|
+
const a = r$1.format || (o$1 ? s.toPosixSlashes : null);
|
|
1894
|
+
let i = t$2 === n$1;
|
|
1895
|
+
let c = i && a ? a(t$2) : t$2;
|
|
1896
|
+
if (i === false) {
|
|
1897
|
+
c = a ? a(t$2) : t$2;
|
|
1898
|
+
i = c === n$1;
|
|
1899
|
+
}
|
|
1900
|
+
if (i === false || r$1.capture === true) if (r$1.matchBase === true || r$1.basename === true) i = picomatch.matchBase(t$2, e$2, u$2, o$1);
|
|
1901
|
+
else i = e$2.exec(c);
|
|
1902
|
+
return {
|
|
1903
|
+
isMatch: Boolean(i),
|
|
1904
|
+
match: i,
|
|
1905
|
+
output: c
|
|
1906
|
+
};
|
|
1907
|
+
};
|
|
1908
|
+
picomatch.matchBase = (t$2, e$2, u$2) => {
|
|
1909
|
+
return (e$2 instanceof RegExp ? e$2 : picomatch.makeRe(e$2, u$2)).test(s.basename(t$2));
|
|
1910
|
+
};
|
|
1911
|
+
picomatch.isMatch = (t$2, e$2, u$2) => picomatch(e$2, u$2)(t$2);
|
|
1912
|
+
picomatch.parse = (t$2, e$2) => {
|
|
1913
|
+
if (Array.isArray(t$2)) return t$2.map(((t$3) => picomatch.parse(t$3, e$2)));
|
|
1914
|
+
return o(t$2, {
|
|
1915
|
+
...e$2,
|
|
1916
|
+
fastpaths: false
|
|
1917
|
+
});
|
|
1918
|
+
};
|
|
1919
|
+
picomatch.scan = (t$2, e$2) => n(t$2, e$2);
|
|
1920
|
+
picomatch.compileRe = (t$2, e$2, u$2 = false, n$1 = false) => {
|
|
1921
|
+
if (u$2 === true) return t$2.output;
|
|
1922
|
+
const o$1 = e$2 || {};
|
|
1923
|
+
const s$1 = o$1.contains ? "" : "^";
|
|
1924
|
+
const r$1 = o$1.contains ? "" : "$";
|
|
1925
|
+
let a = `${s$1}(?:${t$2.output})${r$1}`;
|
|
1926
|
+
if (t$2 && t$2.negated === true) a = `^(?!${a}).*$`;
|
|
1927
|
+
const i = picomatch.toRegex(a, e$2);
|
|
1928
|
+
if (n$1 === true) i.state = t$2;
|
|
1929
|
+
return i;
|
|
1930
|
+
};
|
|
1931
|
+
picomatch.makeRe = (t$2, e$2 = {}, u$2 = false, n$1 = false) => {
|
|
1932
|
+
if (!t$2 || typeof t$2 !== "string") throw new TypeError("Expected a non-empty string");
|
|
1933
|
+
let s$1 = {
|
|
1934
|
+
negated: false,
|
|
1935
|
+
fastpaths: true
|
|
1936
|
+
};
|
|
1937
|
+
if (e$2.fastpaths !== false && (t$2[0] === "." || t$2[0] === "*")) s$1.output = o.fastpaths(t$2, e$2);
|
|
1938
|
+
if (!s$1.output) s$1 = o(t$2, e$2);
|
|
1939
|
+
return picomatch.compileRe(s$1, e$2, u$2, n$1);
|
|
1940
|
+
};
|
|
1941
|
+
picomatch.toRegex = (t$2, e$2) => {
|
|
1942
|
+
try {
|
|
1943
|
+
const u$2 = e$2 || {};
|
|
1944
|
+
return new RegExp(t$2, u$2.flags || (u$2.nocase ? "i" : ""));
|
|
1945
|
+
} catch (t$3) {
|
|
1946
|
+
if (e$2 && e$2.debug === true) throw t$3;
|
|
1947
|
+
return /$^/;
|
|
1948
|
+
}
|
|
1949
|
+
};
|
|
1950
|
+
picomatch.constants = r;
|
|
1951
|
+
t$1.exports = picomatch;
|
|
1952
|
+
},
|
|
1953
|
+
716: (t$1, e$1, u$1) => {
|
|
1954
|
+
const n = u$1(96);
|
|
1955
|
+
const { CHAR_ASTERISK: o, CHAR_AT: s, CHAR_BACKWARD_SLASH: r, CHAR_COMMA: a, CHAR_DOT: i, CHAR_EXCLAMATION_MARK: c, CHAR_FORWARD_SLASH: p, CHAR_LEFT_CURLY_BRACE: l, CHAR_LEFT_PARENTHESES: f, CHAR_LEFT_SQUARE_BRACKET: A, CHAR_PLUS: _, CHAR_QUESTION_MARK: R, CHAR_RIGHT_CURLY_BRACE: E, CHAR_RIGHT_PARENTHESES: h, CHAR_RIGHT_SQUARE_BRACKET: g } = u$1(154);
|
|
1956
|
+
const isPathSeparator = (t$2) => t$2 === p || t$2 === r;
|
|
1957
|
+
const depth = (t$2) => {
|
|
1958
|
+
if (t$2.isPrefix !== true) t$2.depth = t$2.isGlobstar ? Infinity : 1;
|
|
1959
|
+
};
|
|
1960
|
+
const scan = (t$2, e$2) => {
|
|
1961
|
+
const u$2 = e$2 || {};
|
|
1962
|
+
const b = t$2.length - 1;
|
|
1963
|
+
const C = u$2.parts === true || u$2.scanToEnd === true;
|
|
1964
|
+
const y = [];
|
|
1965
|
+
const $ = [];
|
|
1966
|
+
const x = [];
|
|
1967
|
+
let S = t$2;
|
|
1968
|
+
let H = -1;
|
|
1969
|
+
let v = 0;
|
|
1970
|
+
let d = 0;
|
|
1971
|
+
let L = false;
|
|
1972
|
+
let T = false;
|
|
1973
|
+
let O = false;
|
|
1974
|
+
let k = false;
|
|
1975
|
+
let m = false;
|
|
1976
|
+
let w = false;
|
|
1977
|
+
let N = false;
|
|
1978
|
+
let I = false;
|
|
1979
|
+
let B = false;
|
|
1980
|
+
let G = false;
|
|
1981
|
+
let D = 0;
|
|
1982
|
+
let M;
|
|
1983
|
+
let P;
|
|
1984
|
+
let K = {
|
|
1985
|
+
value: "",
|
|
1986
|
+
depth: 0,
|
|
1987
|
+
isGlob: false
|
|
1988
|
+
};
|
|
1989
|
+
const eos = () => H >= b;
|
|
1990
|
+
const peek = () => S.charCodeAt(H + 1);
|
|
1991
|
+
const advance = () => {
|
|
1992
|
+
M = P;
|
|
1993
|
+
return S.charCodeAt(++H);
|
|
1994
|
+
};
|
|
1995
|
+
while (H < b) {
|
|
1996
|
+
P = advance();
|
|
1997
|
+
let t$3;
|
|
1998
|
+
if (P === r) {
|
|
1999
|
+
N = K.backslashes = true;
|
|
2000
|
+
P = advance();
|
|
2001
|
+
if (P === l) w = true;
|
|
2002
|
+
continue;
|
|
2003
|
+
}
|
|
2004
|
+
if (w === true || P === l) {
|
|
2005
|
+
D++;
|
|
2006
|
+
while (eos() !== true && (P = advance())) {
|
|
2007
|
+
if (P === r) {
|
|
2008
|
+
N = K.backslashes = true;
|
|
2009
|
+
advance();
|
|
2010
|
+
continue;
|
|
2011
|
+
}
|
|
2012
|
+
if (P === l) {
|
|
2013
|
+
D++;
|
|
2014
|
+
continue;
|
|
2015
|
+
}
|
|
2016
|
+
if (w !== true && P === i && (P = advance()) === i) {
|
|
2017
|
+
L = K.isBrace = true;
|
|
2018
|
+
O = K.isGlob = true;
|
|
2019
|
+
G = true;
|
|
2020
|
+
if (C === true) continue;
|
|
2021
|
+
break;
|
|
2022
|
+
}
|
|
2023
|
+
if (w !== true && P === a) {
|
|
2024
|
+
L = K.isBrace = true;
|
|
2025
|
+
O = K.isGlob = true;
|
|
2026
|
+
G = true;
|
|
2027
|
+
if (C === true) continue;
|
|
2028
|
+
break;
|
|
2029
|
+
}
|
|
2030
|
+
if (P === E) {
|
|
2031
|
+
D--;
|
|
2032
|
+
if (D === 0) {
|
|
2033
|
+
w = false;
|
|
2034
|
+
L = K.isBrace = true;
|
|
2035
|
+
G = true;
|
|
2036
|
+
break;
|
|
2037
|
+
}
|
|
2038
|
+
}
|
|
2039
|
+
}
|
|
2040
|
+
if (C === true) continue;
|
|
2041
|
+
break;
|
|
2042
|
+
}
|
|
2043
|
+
if (P === p) {
|
|
2044
|
+
y.push(H);
|
|
2045
|
+
$.push(K);
|
|
2046
|
+
K = {
|
|
2047
|
+
value: "",
|
|
2048
|
+
depth: 0,
|
|
2049
|
+
isGlob: false
|
|
2050
|
+
};
|
|
2051
|
+
if (G === true) continue;
|
|
2052
|
+
if (M === i && H === v + 1) {
|
|
2053
|
+
v += 2;
|
|
2054
|
+
continue;
|
|
2055
|
+
}
|
|
2056
|
+
d = H + 1;
|
|
2057
|
+
continue;
|
|
2058
|
+
}
|
|
2059
|
+
if (u$2.noext !== true) {
|
|
2060
|
+
if ((P === _ || P === s || P === o || P === R || P === c) === true && peek() === f) {
|
|
2061
|
+
O = K.isGlob = true;
|
|
2062
|
+
k = K.isExtglob = true;
|
|
2063
|
+
G = true;
|
|
2064
|
+
if (P === c && H === v) B = true;
|
|
2065
|
+
if (C === true) {
|
|
2066
|
+
while (eos() !== true && (P = advance())) {
|
|
2067
|
+
if (P === r) {
|
|
2068
|
+
N = K.backslashes = true;
|
|
2069
|
+
P = advance();
|
|
2070
|
+
continue;
|
|
2071
|
+
}
|
|
2072
|
+
if (P === h) {
|
|
2073
|
+
O = K.isGlob = true;
|
|
2074
|
+
G = true;
|
|
2075
|
+
break;
|
|
2076
|
+
}
|
|
2077
|
+
}
|
|
2078
|
+
continue;
|
|
2079
|
+
}
|
|
2080
|
+
break;
|
|
2081
|
+
}
|
|
2082
|
+
}
|
|
2083
|
+
if (P === o) {
|
|
2084
|
+
if (M === o) m = K.isGlobstar = true;
|
|
2085
|
+
O = K.isGlob = true;
|
|
2086
|
+
G = true;
|
|
2087
|
+
if (C === true) continue;
|
|
2088
|
+
break;
|
|
2089
|
+
}
|
|
2090
|
+
if (P === R) {
|
|
2091
|
+
O = K.isGlob = true;
|
|
2092
|
+
G = true;
|
|
2093
|
+
if (C === true) continue;
|
|
2094
|
+
break;
|
|
2095
|
+
}
|
|
2096
|
+
if (P === A) {
|
|
2097
|
+
while (eos() !== true && (t$3 = advance())) {
|
|
2098
|
+
if (t$3 === r) {
|
|
2099
|
+
N = K.backslashes = true;
|
|
2100
|
+
advance();
|
|
2101
|
+
continue;
|
|
2102
|
+
}
|
|
2103
|
+
if (t$3 === g) {
|
|
2104
|
+
T = K.isBracket = true;
|
|
2105
|
+
O = K.isGlob = true;
|
|
2106
|
+
G = true;
|
|
2107
|
+
break;
|
|
2108
|
+
}
|
|
2109
|
+
}
|
|
2110
|
+
if (C === true) continue;
|
|
2111
|
+
break;
|
|
2112
|
+
}
|
|
2113
|
+
if (u$2.nonegate !== true && P === c && H === v) {
|
|
2114
|
+
I = K.negated = true;
|
|
2115
|
+
v++;
|
|
2116
|
+
continue;
|
|
2117
|
+
}
|
|
2118
|
+
if (u$2.noparen !== true && P === f) {
|
|
2119
|
+
O = K.isGlob = true;
|
|
2120
|
+
if (C === true) {
|
|
2121
|
+
while (eos() !== true && (P = advance())) {
|
|
2122
|
+
if (P === f) {
|
|
2123
|
+
N = K.backslashes = true;
|
|
2124
|
+
P = advance();
|
|
2125
|
+
continue;
|
|
2126
|
+
}
|
|
2127
|
+
if (P === h) {
|
|
2128
|
+
G = true;
|
|
2129
|
+
break;
|
|
2130
|
+
}
|
|
2131
|
+
}
|
|
2132
|
+
continue;
|
|
2133
|
+
}
|
|
2134
|
+
break;
|
|
2135
|
+
}
|
|
2136
|
+
if (O === true) {
|
|
2137
|
+
G = true;
|
|
2138
|
+
if (C === true) continue;
|
|
2139
|
+
break;
|
|
2140
|
+
}
|
|
2141
|
+
}
|
|
2142
|
+
if (u$2.noext === true) {
|
|
2143
|
+
k = false;
|
|
2144
|
+
O = false;
|
|
2145
|
+
}
|
|
2146
|
+
let U = S;
|
|
2147
|
+
let X$1 = "";
|
|
2148
|
+
let F = "";
|
|
2149
|
+
if (v > 0) {
|
|
2150
|
+
X$1 = S.slice(0, v);
|
|
2151
|
+
S = S.slice(v);
|
|
2152
|
+
d -= v;
|
|
2153
|
+
}
|
|
2154
|
+
if (U && O === true && d > 0) {
|
|
2155
|
+
U = S.slice(0, d);
|
|
2156
|
+
F = S.slice(d);
|
|
2157
|
+
} else if (O === true) {
|
|
2158
|
+
U = "";
|
|
2159
|
+
F = S;
|
|
2160
|
+
} else U = S;
|
|
2161
|
+
if (U && U !== "" && U !== "/" && U !== S) {
|
|
2162
|
+
if (isPathSeparator(U.charCodeAt(U.length - 1))) U = U.slice(0, -1);
|
|
2163
|
+
}
|
|
2164
|
+
if (u$2.unescape === true) {
|
|
2165
|
+
if (F) F = n.removeBackslashes(F);
|
|
2166
|
+
if (U && N === true) U = n.removeBackslashes(U);
|
|
2167
|
+
}
|
|
2168
|
+
const Q = {
|
|
2169
|
+
prefix: X$1,
|
|
2170
|
+
input: t$2,
|
|
2171
|
+
start: v,
|
|
2172
|
+
base: U,
|
|
2173
|
+
glob: F,
|
|
2174
|
+
isBrace: L,
|
|
2175
|
+
isBracket: T,
|
|
2176
|
+
isGlob: O,
|
|
2177
|
+
isExtglob: k,
|
|
2178
|
+
isGlobstar: m,
|
|
2179
|
+
negated: I,
|
|
2180
|
+
negatedExtglob: B
|
|
2181
|
+
};
|
|
2182
|
+
if (u$2.tokens === true) {
|
|
2183
|
+
Q.maxDepth = 0;
|
|
2184
|
+
if (!isPathSeparator(P)) $.push(K);
|
|
2185
|
+
Q.tokens = $;
|
|
2186
|
+
}
|
|
2187
|
+
if (u$2.parts === true || u$2.tokens === true) {
|
|
2188
|
+
let e$3;
|
|
2189
|
+
for (let n$1 = 0; n$1 < y.length; n$1++) {
|
|
2190
|
+
const o$1 = e$3 ? e$3 + 1 : v;
|
|
2191
|
+
const s$1 = y[n$1];
|
|
2192
|
+
const r$1 = t$2.slice(o$1, s$1);
|
|
2193
|
+
if (u$2.tokens) {
|
|
2194
|
+
if (n$1 === 0 && v !== 0) {
|
|
2195
|
+
$[n$1].isPrefix = true;
|
|
2196
|
+
$[n$1].value = X$1;
|
|
2197
|
+
} else $[n$1].value = r$1;
|
|
2198
|
+
depth($[n$1]);
|
|
2199
|
+
Q.maxDepth += $[n$1].depth;
|
|
2200
|
+
}
|
|
2201
|
+
if (n$1 !== 0 || r$1 !== "") x.push(r$1);
|
|
2202
|
+
e$3 = s$1;
|
|
2203
|
+
}
|
|
2204
|
+
if (e$3 && e$3 + 1 < t$2.length) {
|
|
2205
|
+
const n$1 = t$2.slice(e$3 + 1);
|
|
2206
|
+
x.push(n$1);
|
|
2207
|
+
if (u$2.tokens) {
|
|
2208
|
+
$[$.length - 1].value = n$1;
|
|
2209
|
+
depth($[$.length - 1]);
|
|
2210
|
+
Q.maxDepth += $[$.length - 1].depth;
|
|
2211
|
+
}
|
|
2212
|
+
}
|
|
2213
|
+
Q.slashes = y;
|
|
2214
|
+
Q.parts = x;
|
|
2215
|
+
}
|
|
2216
|
+
return Q;
|
|
2217
|
+
};
|
|
2218
|
+
t$1.exports = scan;
|
|
2219
|
+
},
|
|
2220
|
+
96: (t$1, e$1, u$1) => {
|
|
2221
|
+
const { REGEX_BACKSLASH: n, REGEX_REMOVE_BACKSLASH: o, REGEX_SPECIAL_CHARS: s, REGEX_SPECIAL_CHARS_GLOBAL: r } = u$1(154);
|
|
2222
|
+
e$1.isObject = (t$2) => t$2 !== null && typeof t$2 === "object" && !Array.isArray(t$2);
|
|
2223
|
+
e$1.hasRegexChars = (t$2) => s.test(t$2);
|
|
2224
|
+
e$1.isRegexChar = (t$2) => t$2.length === 1 && e$1.hasRegexChars(t$2);
|
|
2225
|
+
e$1.escapeRegex = (t$2) => t$2.replace(r, "\\$1");
|
|
2226
|
+
e$1.toPosixSlashes = (t$2) => t$2.replace(n, "/");
|
|
2227
|
+
e$1.removeBackslashes = (t$2) => t$2.replace(o, ((t$3) => t$3 === "\\" ? "" : t$3));
|
|
2228
|
+
e$1.escapeLast = (t$2, u$2, n$1) => {
|
|
2229
|
+
const o$1 = t$2.lastIndexOf(u$2, n$1);
|
|
2230
|
+
if (o$1 === -1) return t$2;
|
|
2231
|
+
if (t$2[o$1 - 1] === "\\") return e$1.escapeLast(t$2, u$2, o$1 - 1);
|
|
2232
|
+
return `${t$2.slice(0, o$1)}\\${t$2.slice(o$1)}`;
|
|
2233
|
+
};
|
|
2234
|
+
e$1.removePrefix = (t$2, e$2 = {}) => {
|
|
2235
|
+
let u$2 = t$2;
|
|
2236
|
+
if (u$2.startsWith("./")) {
|
|
2237
|
+
u$2 = u$2.slice(2);
|
|
2238
|
+
e$2.prefix = "./";
|
|
2239
|
+
}
|
|
2240
|
+
return u$2;
|
|
2241
|
+
};
|
|
2242
|
+
e$1.wrapOutput = (t$2, e$2 = {}, u$2 = {}) => {
|
|
2243
|
+
let s$1 = `${u$2.contains ? "" : "^"}(?:${t$2})${u$2.contains ? "" : "$"}`;
|
|
2244
|
+
if (e$2.negated === true) s$1 = `(?:^(?!${s$1}).*$)`;
|
|
2245
|
+
return s$1;
|
|
2246
|
+
};
|
|
2247
|
+
e$1.basename = (t$2, { windows: e$2 } = {}) => {
|
|
2248
|
+
const u$2 = t$2.split(e$2 ? /[\\/]/ : "/");
|
|
2249
|
+
const n$1 = u$2[u$2.length - 1];
|
|
2250
|
+
if (n$1 === "") return u$2[u$2.length - 2];
|
|
2251
|
+
return n$1;
|
|
2252
|
+
};
|
|
2253
|
+
}
|
|
2254
|
+
};
|
|
2255
|
+
var e = {};
|
|
2256
|
+
function __nccwpck_require__(u$1) {
|
|
2257
|
+
var n = e[u$1];
|
|
2258
|
+
if (n !== void 0) return n.exports;
|
|
2259
|
+
var o = e[u$1] = { exports: {} };
|
|
2260
|
+
var s = true;
|
|
2261
|
+
try {
|
|
2262
|
+
t[u$1](o, o.exports, __nccwpck_require__);
|
|
2263
|
+
s = false;
|
|
2264
|
+
} finally {
|
|
2265
|
+
if (s) delete e[u$1];
|
|
2266
|
+
}
|
|
2267
|
+
return o.exports;
|
|
2268
|
+
}
|
|
2269
|
+
if (typeof __nccwpck_require__ !== "undefined") __nccwpck_require__.ab = __dirname + "/";
|
|
2270
|
+
var u = __nccwpck_require__(170);
|
|
2271
|
+
module.exports = u;
|
|
2272
|
+
})();
|
|
2273
|
+
}) });
|
|
2274
|
+
|
|
2275
|
+
//#endregion
|
|
2276
|
+
//#region node_modules/next/dist/shared/lib/match-local-pattern.js
|
|
2277
|
+
var require_match_local_pattern = /* @__PURE__ */ __commonJS({ "node_modules/next/dist/shared/lib/match-local-pattern.js": ((exports) => {
|
|
2278
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2279
|
+
function _export$2(target, all) {
|
|
2280
|
+
for (var name in all) Object.defineProperty(target, name, {
|
|
2281
|
+
enumerable: true,
|
|
2282
|
+
get: all[name]
|
|
2283
|
+
});
|
|
2284
|
+
}
|
|
2285
|
+
_export$2(exports, {
|
|
2286
|
+
hasLocalMatch: function() {
|
|
2287
|
+
return hasLocalMatch;
|
|
2288
|
+
},
|
|
2289
|
+
matchLocalPattern: function() {
|
|
2290
|
+
return matchLocalPattern;
|
|
2291
|
+
}
|
|
2292
|
+
});
|
|
2293
|
+
const _picomatch$1 = require_picomatch();
|
|
2294
|
+
function matchLocalPattern(pattern, url) {
|
|
2295
|
+
if (pattern.search !== void 0) {
|
|
2296
|
+
if (pattern.search !== url.search) return false;
|
|
2297
|
+
}
|
|
2298
|
+
if (!(0, _picomatch$1.makeRe)(pattern.pathname ?? "**", { dot: true }).test(url.pathname)) return false;
|
|
2299
|
+
return true;
|
|
2300
|
+
}
|
|
2301
|
+
function hasLocalMatch(localPatterns, urlPathAndQuery) {
|
|
2302
|
+
if (!localPatterns) return true;
|
|
2303
|
+
const url = new URL(urlPathAndQuery, "http://n");
|
|
2304
|
+
return localPatterns.some((p) => matchLocalPattern(p, url));
|
|
2305
|
+
}
|
|
2306
|
+
}) });
|
|
2307
|
+
|
|
2308
|
+
//#endregion
|
|
2309
|
+
//#region node_modules/next/dist/shared/lib/match-remote-pattern.js
|
|
2310
|
+
var require_match_remote_pattern = /* @__PURE__ */ __commonJS({ "node_modules/next/dist/shared/lib/match-remote-pattern.js": ((exports) => {
|
|
2311
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2312
|
+
function _export$1(target, all) {
|
|
2313
|
+
for (var name in all) Object.defineProperty(target, name, {
|
|
2314
|
+
enumerable: true,
|
|
2315
|
+
get: all[name]
|
|
2316
|
+
});
|
|
2317
|
+
}
|
|
2318
|
+
_export$1(exports, {
|
|
2319
|
+
hasRemoteMatch: function() {
|
|
2320
|
+
return hasRemoteMatch;
|
|
2321
|
+
},
|
|
2322
|
+
matchRemotePattern: function() {
|
|
2323
|
+
return matchRemotePattern;
|
|
2324
|
+
}
|
|
2325
|
+
});
|
|
2326
|
+
const _picomatch = require_picomatch();
|
|
2327
|
+
function matchRemotePattern(pattern, url) {
|
|
2328
|
+
if (pattern.protocol !== void 0) {
|
|
2329
|
+
if (pattern.protocol.replace(/:$/, "") !== url.protocol.replace(/:$/, "")) return false;
|
|
2330
|
+
}
|
|
2331
|
+
if (pattern.port !== void 0) {
|
|
2332
|
+
if (pattern.port !== url.port) return false;
|
|
2333
|
+
}
|
|
2334
|
+
if (pattern.hostname === void 0) throw Object.defineProperty(/* @__PURE__ */ new Error(`Pattern should define hostname but found\n${JSON.stringify(pattern)}`), "__NEXT_ERROR_CODE", {
|
|
2335
|
+
value: "E410",
|
|
2336
|
+
enumerable: false,
|
|
2337
|
+
configurable: true
|
|
2338
|
+
});
|
|
2339
|
+
else if (!(0, _picomatch.makeRe)(pattern.hostname).test(url.hostname)) return false;
|
|
2340
|
+
if (pattern.search !== void 0) {
|
|
2341
|
+
if (pattern.search !== url.search) return false;
|
|
2342
|
+
}
|
|
2343
|
+
if (!(0, _picomatch.makeRe)(pattern.pathname ?? "**", { dot: true }).test(url.pathname)) return false;
|
|
2344
|
+
return true;
|
|
2345
|
+
}
|
|
2346
|
+
function hasRemoteMatch(domains, remotePatterns, url) {
|
|
2347
|
+
return domains.some((domain) => url.hostname === domain) || remotePatterns.some((p) => matchRemotePattern(p, url));
|
|
2348
|
+
}
|
|
2349
|
+
}) });
|
|
2350
|
+
|
|
2351
|
+
//#endregion
|
|
2352
|
+
//#region node_modules/next/dist/shared/lib/image-loader.js
|
|
2353
|
+
var require_image_loader = /* @__PURE__ */ __commonJS({ "node_modules/next/dist/shared/lib/image-loader.js": ((exports) => {
|
|
2354
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2355
|
+
Object.defineProperty(exports, "default", {
|
|
2356
|
+
enumerable: true,
|
|
2357
|
+
get: function() {
|
|
2358
|
+
return _default$1;
|
|
2359
|
+
}
|
|
2360
|
+
});
|
|
2361
|
+
const _findclosestquality = require_find_closest_quality();
|
|
2362
|
+
const _deploymentid = require_deployment_id();
|
|
2363
|
+
function defaultLoader({ config, src, width, quality }) {
|
|
2364
|
+
if (process.env.NODE_ENV !== "production") {
|
|
2365
|
+
const missingValues = [];
|
|
2366
|
+
if (!src) missingValues.push("src");
|
|
2367
|
+
if (!width) missingValues.push("width");
|
|
2368
|
+
if (missingValues.length > 0) throw Object.defineProperty(/* @__PURE__ */ new Error(`Next Image Optimization requires ${missingValues.join(", ")} to be provided. Make sure you pass them as props to the \`next/image\` component. Received: ${JSON.stringify({
|
|
2369
|
+
src,
|
|
2370
|
+
width,
|
|
2371
|
+
quality
|
|
2372
|
+
})}`), "__NEXT_ERROR_CODE", {
|
|
2373
|
+
value: "E188",
|
|
2374
|
+
enumerable: false,
|
|
2375
|
+
configurable: true
|
|
2376
|
+
});
|
|
2377
|
+
}
|
|
2378
|
+
let deploymentId$1 = (0, _deploymentid.getDeploymentId)();
|
|
2379
|
+
if (src.startsWith("/")) {
|
|
2380
|
+
const srcUrl = new URL(src, "http://n");
|
|
2381
|
+
const srcDpl = srcUrl.searchParams.get("dpl");
|
|
2382
|
+
if (srcDpl) {
|
|
2383
|
+
deploymentId$1 = srcDpl;
|
|
2384
|
+
srcUrl.searchParams.delete("dpl");
|
|
2385
|
+
src = srcUrl.href.slice(8);
|
|
2386
|
+
}
|
|
2387
|
+
}
|
|
2388
|
+
if (src.startsWith("/") && src.includes("?") && config.localPatterns?.length === 1 && config.localPatterns[0].pathname === "**" && config.localPatterns[0].search === "") throw Object.defineProperty(/* @__PURE__ */ new Error(`Image with src "${src}" is using a query string which is not configured in images.localPatterns.\nRead more: https://nextjs.org/docs/messages/next-image-unconfigured-localpatterns`), "__NEXT_ERROR_CODE", {
|
|
2389
|
+
value: "E871",
|
|
2390
|
+
enumerable: false,
|
|
2391
|
+
configurable: true
|
|
2392
|
+
});
|
|
2393
|
+
if (process.env.NODE_ENV !== "production") {
|
|
2394
|
+
if (src.startsWith("//")) throw Object.defineProperty(/* @__PURE__ */ new Error(`Failed to parse src "${src}" on \`next/image\`, protocol-relative URL (//) must be changed to an absolute URL (http:// or https://)`), "__NEXT_ERROR_CODE", {
|
|
2395
|
+
value: "E360",
|
|
2396
|
+
enumerable: false,
|
|
2397
|
+
configurable: true
|
|
2398
|
+
});
|
|
2399
|
+
if (src.startsWith("/") && config.localPatterns) {
|
|
2400
|
+
if (process.env.NODE_ENV !== "test" && process.env.NEXT_RUNTIME !== "edge") {
|
|
2401
|
+
const { hasLocalMatch: hasLocalMatch$1 } = require_match_local_pattern();
|
|
2402
|
+
if (!hasLocalMatch$1(config.localPatterns, src)) throw Object.defineProperty(/* @__PURE__ */ new Error(`Invalid src prop (${src}) on \`next/image\` does not match \`images.localPatterns\` configured in your \`next.config.js\`\nSee more info: https://nextjs.org/docs/messages/next-image-unconfigured-localpatterns`), "__NEXT_ERROR_CODE", {
|
|
2403
|
+
value: "E426",
|
|
2404
|
+
enumerable: false,
|
|
2405
|
+
configurable: true
|
|
2406
|
+
});
|
|
2407
|
+
}
|
|
2408
|
+
}
|
|
2409
|
+
if (!src.startsWith("/") && (config.domains || config.remotePatterns)) {
|
|
2410
|
+
let parsedSrc;
|
|
2411
|
+
try {
|
|
2412
|
+
parsedSrc = new URL(src);
|
|
2413
|
+
} catch (err) {
|
|
2414
|
+
console.error(err);
|
|
2415
|
+
throw Object.defineProperty(/* @__PURE__ */ new Error(`Failed to parse src "${src}" on \`next/image\`, if using relative image it must start with a leading slash "/" or be an absolute URL (http:// or https://)`), "__NEXT_ERROR_CODE", {
|
|
2416
|
+
value: "E63",
|
|
2417
|
+
enumerable: false,
|
|
2418
|
+
configurable: true
|
|
2419
|
+
});
|
|
2420
|
+
}
|
|
2421
|
+
if (process.env.NODE_ENV !== "test" && process.env.NEXT_RUNTIME !== "edge") {
|
|
2422
|
+
const { hasRemoteMatch: hasRemoteMatch$1 } = require_match_remote_pattern();
|
|
2423
|
+
if (!hasRemoteMatch$1(config.domains, config.remotePatterns, parsedSrc)) throw Object.defineProperty(/* @__PURE__ */ new Error(`Invalid src prop (${src}) on \`next/image\`, hostname "${parsedSrc.hostname}" is not configured under images in your \`next.config.js\`\nSee more info: https://nextjs.org/docs/messages/next-image-unconfigured-host`), "__NEXT_ERROR_CODE", {
|
|
2424
|
+
value: "E231",
|
|
2425
|
+
enumerable: false,
|
|
2426
|
+
configurable: true
|
|
2427
|
+
});
|
|
2428
|
+
}
|
|
2429
|
+
}
|
|
2430
|
+
}
|
|
2431
|
+
const q = (0, _findclosestquality.findClosestQuality)(quality, config);
|
|
2432
|
+
return `${config.path}?url=${encodeURIComponent(src)}&w=${width}&q=${q}${src.startsWith("/") && deploymentId$1 ? `&dpl=${deploymentId$1}` : ""}`;
|
|
2433
|
+
}
|
|
2434
|
+
defaultLoader.__next_img_default = true;
|
|
2435
|
+
const _default$1 = defaultLoader;
|
|
2436
|
+
}) });
|
|
2437
|
+
|
|
2438
|
+
//#endregion
|
|
2439
|
+
//#region node_modules/next/dist/client/use-merged-ref.js
|
|
2440
|
+
var require_use_merged_ref = /* @__PURE__ */ __commonJS({ "node_modules/next/dist/client/use-merged-ref.js": ((exports, module) => {
|
|
2441
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2442
|
+
Object.defineProperty(exports, "useMergedRef", {
|
|
2443
|
+
enumerable: true,
|
|
2444
|
+
get: function() {
|
|
2445
|
+
return useMergedRef;
|
|
2446
|
+
}
|
|
2447
|
+
});
|
|
2448
|
+
const _react$1 = __require("react");
|
|
2449
|
+
function useMergedRef(refA, refB) {
|
|
2450
|
+
const cleanupA = (0, _react$1.useRef)(null);
|
|
2451
|
+
const cleanupB = (0, _react$1.useRef)(null);
|
|
2452
|
+
return (0, _react$1.useCallback)((current) => {
|
|
2453
|
+
if (current === null) {
|
|
2454
|
+
const cleanupFnA = cleanupA.current;
|
|
2455
|
+
if (cleanupFnA) {
|
|
2456
|
+
cleanupA.current = null;
|
|
2457
|
+
cleanupFnA();
|
|
2458
|
+
}
|
|
2459
|
+
const cleanupFnB = cleanupB.current;
|
|
2460
|
+
if (cleanupFnB) {
|
|
2461
|
+
cleanupB.current = null;
|
|
2462
|
+
cleanupFnB();
|
|
2463
|
+
}
|
|
2464
|
+
} else {
|
|
2465
|
+
if (refA) cleanupA.current = applyRef(refA, current);
|
|
2466
|
+
if (refB) cleanupB.current = applyRef(refB, current);
|
|
2467
|
+
}
|
|
2468
|
+
}, [refA, refB]);
|
|
2469
|
+
}
|
|
2470
|
+
function applyRef(refA, current) {
|
|
2471
|
+
if (typeof refA === "function") {
|
|
2472
|
+
const cleanup = refA(current);
|
|
2473
|
+
if (typeof cleanup === "function") return cleanup;
|
|
2474
|
+
else return () => refA(null);
|
|
2475
|
+
} else {
|
|
2476
|
+
refA.current = current;
|
|
2477
|
+
return () => {
|
|
2478
|
+
refA.current = null;
|
|
2479
|
+
};
|
|
2480
|
+
}
|
|
2481
|
+
}
|
|
2482
|
+
if ((typeof exports.default === "function" || typeof exports.default === "object" && exports.default !== null) && typeof exports.default.__esModule === "undefined") {
|
|
2483
|
+
Object.defineProperty(exports.default, "__esModule", { value: true });
|
|
2484
|
+
Object.assign(exports.default, exports);
|
|
2485
|
+
module.exports = exports.default;
|
|
2486
|
+
}
|
|
2487
|
+
}) });
|
|
2488
|
+
|
|
2489
|
+
//#endregion
|
|
2490
|
+
//#region node_modules/next/dist/client/image-component.js
|
|
2491
|
+
var require_image_component = /* @__PURE__ */ __commonJS({ "node_modules/next/dist/client/image-component.js": ((exports, module) => {
|
|
2492
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2493
|
+
Object.defineProperty(exports, "Image", {
|
|
2494
|
+
enumerable: true,
|
|
2495
|
+
get: function() {
|
|
2496
|
+
return Image$1;
|
|
2497
|
+
}
|
|
2498
|
+
});
|
|
2499
|
+
const _interop_require_default$1 = require__interop_require_default();
|
|
2500
|
+
const _interop_require_wildcard = require__interop_require_wildcard();
|
|
2501
|
+
const _jsxruntime = __require("react/jsx-runtime");
|
|
2502
|
+
const _react = /* @__PURE__ */ _interop_require_wildcard._(__require("react"));
|
|
2503
|
+
const _reactdom = /* @__PURE__ */ _interop_require_default$1._(__require("react-dom"));
|
|
2504
|
+
const _head = /* @__PURE__ */ _interop_require_default$1._(require_head());
|
|
2505
|
+
const _getimgprops$1 = require_get_img_props();
|
|
2506
|
+
const _imageconfig = require_image_config();
|
|
2507
|
+
const _imageconfigcontextsharedruntime = require_image_config_context_shared_runtime();
|
|
2508
|
+
const _warnonce = require_warn_once();
|
|
2509
|
+
const _routercontextsharedruntime = require_router_context_shared_runtime();
|
|
2510
|
+
const _imageloader$1 = /* @__PURE__ */ _interop_require_default$1._(require_image_loader());
|
|
2511
|
+
const _usemergedref = require_use_merged_ref();
|
|
2512
|
+
const configEnv = process.env.__NEXT_IMAGE_OPTS;
|
|
2513
|
+
if (typeof window === "undefined") globalThis.__NEXT_IMAGE_IMPORTED = true;
|
|
2514
|
+
function handleLoading(img, placeholder, onLoadRef, onLoadingCompleteRef, setBlurComplete, unoptimized, sizesInput) {
|
|
2515
|
+
const src = img?.src;
|
|
2516
|
+
if (!img || img["data-loaded-src"] === src) return;
|
|
2517
|
+
img["data-loaded-src"] = src;
|
|
2518
|
+
("decode" in img ? img.decode() : Promise.resolve()).catch(() => {}).then(() => {
|
|
2519
|
+
if (!img.parentElement || !img.isConnected) return;
|
|
2520
|
+
if (placeholder !== "empty") setBlurComplete(true);
|
|
2521
|
+
if (onLoadRef?.current) {
|
|
2522
|
+
const event = new Event("load");
|
|
2523
|
+
Object.defineProperty(event, "target", {
|
|
2524
|
+
writable: false,
|
|
2525
|
+
value: img
|
|
2526
|
+
});
|
|
2527
|
+
let prevented = false;
|
|
2528
|
+
let stopped = false;
|
|
2529
|
+
onLoadRef.current({
|
|
2530
|
+
...event,
|
|
2531
|
+
nativeEvent: event,
|
|
2532
|
+
currentTarget: img,
|
|
2533
|
+
target: img,
|
|
2534
|
+
isDefaultPrevented: () => prevented,
|
|
2535
|
+
isPropagationStopped: () => stopped,
|
|
2536
|
+
persist: () => {},
|
|
2537
|
+
preventDefault: () => {
|
|
2538
|
+
prevented = true;
|
|
2539
|
+
event.preventDefault();
|
|
2540
|
+
},
|
|
2541
|
+
stopPropagation: () => {
|
|
2542
|
+
stopped = true;
|
|
2543
|
+
event.stopPropagation();
|
|
2544
|
+
}
|
|
2545
|
+
});
|
|
2546
|
+
}
|
|
2547
|
+
if (onLoadingCompleteRef?.current) onLoadingCompleteRef.current(img);
|
|
2548
|
+
if (process.env.NODE_ENV !== "production") {
|
|
2549
|
+
const origSrc = new URL(src, "http://n").searchParams.get("url") || src;
|
|
2550
|
+
if (img.getAttribute("data-nimg") === "fill") {
|
|
2551
|
+
if (!unoptimized && (!sizesInput || sizesInput === "100vw")) {
|
|
2552
|
+
if (img.getBoundingClientRect().width / window.innerWidth < .6) if (sizesInput === "100vw") (0, _warnonce.warnOnce)(`Image with src "${origSrc}" has "fill" prop and "sizes" prop of "100vw", but image is not rendered at full viewport width. Please adjust "sizes" to improve page performance. Read more: https://nextjs.org/docs/api-reference/next/image#sizes`);
|
|
2553
|
+
else (0, _warnonce.warnOnce)(`Image with src "${origSrc}" has "fill" but is missing "sizes" prop. Please add it to improve page performance. Read more: https://nextjs.org/docs/api-reference/next/image#sizes`);
|
|
2554
|
+
}
|
|
2555
|
+
if (img.parentElement) {
|
|
2556
|
+
const { position } = window.getComputedStyle(img.parentElement);
|
|
2557
|
+
const valid = [
|
|
2558
|
+
"absolute",
|
|
2559
|
+
"fixed",
|
|
2560
|
+
"relative"
|
|
2561
|
+
];
|
|
2562
|
+
if (!valid.includes(position)) (0, _warnonce.warnOnce)(`Image with src "${origSrc}" has "fill" and parent element with invalid "position". Provided "${position}" should be one of ${valid.map(String).join(",")}.`);
|
|
2563
|
+
}
|
|
2564
|
+
if (img.height === 0) (0, _warnonce.warnOnce)(`Image with src "${origSrc}" has "fill" and a height value of 0. This is likely because the parent element of the image has not been styled to have a set height.`);
|
|
2565
|
+
}
|
|
2566
|
+
const heightModified = img.height.toString() !== img.getAttribute("height");
|
|
2567
|
+
const widthModified = img.width.toString() !== img.getAttribute("width");
|
|
2568
|
+
if (heightModified && !widthModified || !heightModified && widthModified) (0, _warnonce.warnOnce)(`Image with src "${origSrc}" has either width or height modified, but not the other. If you use CSS to change the size of your image, also include the styles 'width: "auto"' or 'height: "auto"' to maintain the aspect ratio.`);
|
|
2569
|
+
}
|
|
2570
|
+
});
|
|
2571
|
+
}
|
|
2572
|
+
function getDynamicProps(fetchPriority) {
|
|
2573
|
+
if (Boolean(_react.use)) return { fetchPriority };
|
|
2574
|
+
return { fetchpriority: fetchPriority };
|
|
2575
|
+
}
|
|
2576
|
+
const ImageElement = /* @__PURE__ */ (0, _react.forwardRef)(({ src, srcSet, sizes, height, width, decoding, className, style, fetchPriority, placeholder, loading, unoptimized, fill, onLoadRef, onLoadingCompleteRef, setBlurComplete, setShowAltText, sizesInput, onLoad, onError,...rest }, forwardedRef) => {
|
|
2577
|
+
const ownRef = (0, _react.useCallback)((img) => {
|
|
2578
|
+
if (!img) return;
|
|
2579
|
+
if (onError) img.src = img.src;
|
|
2580
|
+
if (process.env.NODE_ENV !== "production") {
|
|
2581
|
+
if (!src) console.error(`Image is missing required "src" property:`, img);
|
|
2582
|
+
if (img.getAttribute("alt") === null) console.error(`Image is missing required "alt" property. Please add Alternative Text to describe the image for screen readers and search engines.`);
|
|
2583
|
+
}
|
|
2584
|
+
if (img.complete) handleLoading(img, placeholder, onLoadRef, onLoadingCompleteRef, setBlurComplete, unoptimized, sizesInput);
|
|
2585
|
+
}, [
|
|
2586
|
+
src,
|
|
2587
|
+
placeholder,
|
|
2588
|
+
onLoadRef,
|
|
2589
|
+
onLoadingCompleteRef,
|
|
2590
|
+
setBlurComplete,
|
|
2591
|
+
onError,
|
|
2592
|
+
unoptimized,
|
|
2593
|
+
sizesInput
|
|
2594
|
+
]);
|
|
2595
|
+
const ref = (0, _usemergedref.useMergedRef)(forwardedRef, ownRef);
|
|
2596
|
+
return /* @__PURE__ */ (0, _jsxruntime.jsx)("img", {
|
|
2597
|
+
...rest,
|
|
2598
|
+
...getDynamicProps(fetchPriority),
|
|
2599
|
+
loading,
|
|
2600
|
+
width,
|
|
2601
|
+
height,
|
|
2602
|
+
decoding,
|
|
2603
|
+
"data-nimg": fill ? "fill" : "1",
|
|
2604
|
+
className,
|
|
2605
|
+
style,
|
|
2606
|
+
sizes,
|
|
2607
|
+
srcSet,
|
|
2608
|
+
src,
|
|
2609
|
+
ref,
|
|
2610
|
+
onLoad: (event) => {
|
|
2611
|
+
const img = event.currentTarget;
|
|
2612
|
+
handleLoading(img, placeholder, onLoadRef, onLoadingCompleteRef, setBlurComplete, unoptimized, sizesInput);
|
|
2613
|
+
},
|
|
2614
|
+
onError: (event) => {
|
|
2615
|
+
setShowAltText(true);
|
|
2616
|
+
if (placeholder !== "empty") setBlurComplete(true);
|
|
2617
|
+
if (onError) onError(event);
|
|
2618
|
+
}
|
|
2619
|
+
});
|
|
2620
|
+
});
|
|
2621
|
+
function ImagePreload({ isAppRouter, imgAttributes }) {
|
|
2622
|
+
const opts = {
|
|
2623
|
+
as: "image",
|
|
2624
|
+
imageSrcSet: imgAttributes.srcSet,
|
|
2625
|
+
imageSizes: imgAttributes.sizes,
|
|
2626
|
+
crossOrigin: imgAttributes.crossOrigin,
|
|
2627
|
+
referrerPolicy: imgAttributes.referrerPolicy,
|
|
2628
|
+
...getDynamicProps(imgAttributes.fetchPriority)
|
|
2629
|
+
};
|
|
2630
|
+
if (isAppRouter && _reactdom.default.preload) {
|
|
2631
|
+
_reactdom.default.preload(imgAttributes.src, opts);
|
|
2632
|
+
return null;
|
|
2633
|
+
}
|
|
2634
|
+
return /* @__PURE__ */ (0, _jsxruntime.jsx)(_head.default, { children: /* @__PURE__ */ (0, _jsxruntime.jsx)("link", {
|
|
2635
|
+
rel: "preload",
|
|
2636
|
+
href: imgAttributes.srcSet ? void 0 : imgAttributes.src,
|
|
2637
|
+
...opts
|
|
2638
|
+
}, "__nimg-" + imgAttributes.src + imgAttributes.srcSet + imgAttributes.sizes) });
|
|
2639
|
+
}
|
|
2640
|
+
const Image$1 = /* @__PURE__ */ (0, _react.forwardRef)((props, forwardedRef) => {
|
|
2641
|
+
const isAppRouter = !(0, _react.useContext)(_routercontextsharedruntime.RouterContext);
|
|
2642
|
+
const configContext = (0, _react.useContext)(_imageconfigcontextsharedruntime.ImageConfigContext);
|
|
2643
|
+
const config = (0, _react.useMemo)(() => {
|
|
2644
|
+
const c = configEnv || configContext || _imageconfig.imageConfigDefault;
|
|
2645
|
+
const allSizes = [...c.deviceSizes, ...c.imageSizes].sort((a, b) => a - b);
|
|
2646
|
+
const deviceSizes = c.deviceSizes.sort((a, b) => a - b);
|
|
2647
|
+
const qualities = c.qualities?.sort((a, b) => a - b);
|
|
2648
|
+
return {
|
|
2649
|
+
...c,
|
|
2650
|
+
allSizes,
|
|
2651
|
+
deviceSizes,
|
|
2652
|
+
qualities,
|
|
2653
|
+
localPatterns: typeof window === "undefined" ? configContext?.localPatterns : c.localPatterns
|
|
2654
|
+
};
|
|
2655
|
+
}, [configContext]);
|
|
2656
|
+
const { onLoad, onLoadingComplete } = props;
|
|
2657
|
+
const onLoadRef = (0, _react.useRef)(onLoad);
|
|
2658
|
+
(0, _react.useEffect)(() => {
|
|
2659
|
+
onLoadRef.current = onLoad;
|
|
2660
|
+
}, [onLoad]);
|
|
2661
|
+
const onLoadingCompleteRef = (0, _react.useRef)(onLoadingComplete);
|
|
2662
|
+
(0, _react.useEffect)(() => {
|
|
2663
|
+
onLoadingCompleteRef.current = onLoadingComplete;
|
|
2664
|
+
}, [onLoadingComplete]);
|
|
2665
|
+
const [blurComplete, setBlurComplete] = (0, _react.useState)(false);
|
|
2666
|
+
const [showAltText, setShowAltText] = (0, _react.useState)(false);
|
|
2667
|
+
const { props: imgAttributes, meta: imgMeta } = (0, _getimgprops$1.getImgProps)(props, {
|
|
2668
|
+
defaultLoader: _imageloader$1.default,
|
|
2669
|
+
imgConf: config,
|
|
2670
|
+
blurComplete,
|
|
2671
|
+
showAltText
|
|
2672
|
+
});
|
|
2673
|
+
return /* @__PURE__ */ (0, _jsxruntime.jsxs)(_jsxruntime.Fragment, { children: [/* @__PURE__ */ (0, _jsxruntime.jsx)(ImageElement, {
|
|
2674
|
+
...imgAttributes,
|
|
2675
|
+
unoptimized: imgMeta.unoptimized,
|
|
2676
|
+
placeholder: imgMeta.placeholder,
|
|
2677
|
+
fill: imgMeta.fill,
|
|
2678
|
+
onLoadRef,
|
|
2679
|
+
onLoadingCompleteRef,
|
|
2680
|
+
setBlurComplete,
|
|
2681
|
+
setShowAltText,
|
|
2682
|
+
sizesInput: props.sizes,
|
|
2683
|
+
ref: forwardedRef
|
|
2684
|
+
}), imgMeta.preload ? /* @__PURE__ */ (0, _jsxruntime.jsx)(ImagePreload, {
|
|
2685
|
+
isAppRouter,
|
|
2686
|
+
imgAttributes
|
|
2687
|
+
}) : null] });
|
|
2688
|
+
});
|
|
2689
|
+
if ((typeof exports.default === "function" || typeof exports.default === "object" && exports.default !== null) && typeof exports.default.__esModule === "undefined") {
|
|
2690
|
+
Object.defineProperty(exports.default, "__esModule", { value: true });
|
|
2691
|
+
Object.assign(exports.default, exports);
|
|
2692
|
+
module.exports = exports.default;
|
|
2693
|
+
}
|
|
2694
|
+
}) });
|
|
2695
|
+
|
|
2696
|
+
//#endregion
|
|
2697
|
+
//#region node_modules/next/dist/shared/lib/image-external.js
|
|
2698
|
+
var require_image_external = /* @__PURE__ */ __commonJS({ "node_modules/next/dist/shared/lib/image-external.js": ((exports) => {
|
|
2699
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2700
|
+
function _export(target, all) {
|
|
2701
|
+
for (var name in all) Object.defineProperty(target, name, {
|
|
2702
|
+
enumerable: true,
|
|
2703
|
+
get: all[name]
|
|
2704
|
+
});
|
|
2705
|
+
}
|
|
2706
|
+
_export(exports, {
|
|
2707
|
+
default: function() {
|
|
2708
|
+
return _default;
|
|
2709
|
+
},
|
|
2710
|
+
getImageProps: function() {
|
|
2711
|
+
return getImageProps;
|
|
2712
|
+
}
|
|
2713
|
+
});
|
|
2714
|
+
const _interop_require_default = require__interop_require_default();
|
|
2715
|
+
const _getimgprops = require_get_img_props();
|
|
2716
|
+
const _imagecomponent = require_image_component();
|
|
2717
|
+
const _imageloader = /* @__PURE__ */ _interop_require_default._(require_image_loader());
|
|
2718
|
+
function getImageProps(imgProps) {
|
|
2719
|
+
const { props } = (0, _getimgprops.getImgProps)(imgProps, {
|
|
2720
|
+
defaultLoader: _imageloader.default,
|
|
2721
|
+
imgConf: process.env.__NEXT_IMAGE_OPTS
|
|
2722
|
+
});
|
|
2723
|
+
for (const [key, value] of Object.entries(props)) if (value === void 0) delete props[key];
|
|
2724
|
+
return { props };
|
|
2725
|
+
}
|
|
2726
|
+
const _default = _imagecomponent.Image;
|
|
2727
|
+
}) });
|
|
2728
|
+
|
|
2729
|
+
//#endregion
|
|
2730
|
+
//#region node_modules/next/image.js
|
|
2731
|
+
var require_image = /* @__PURE__ */ __commonJS({ "node_modules/next/image.js": ((exports, module) => {
|
|
2732
|
+
module.exports = require_image_external();
|
|
2733
|
+
}) });
|
|
2734
|
+
|
|
2735
|
+
//#endregion
|
|
2736
|
+
//#region node_modules/cookies-next/lib/common/types.js
|
|
2737
|
+
var require_types = /* @__PURE__ */ __commonJS({ "node_modules/cookies-next/lib/common/types.js": ((exports) => {
|
|
2738
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2739
|
+
}) });
|
|
2740
|
+
|
|
2741
|
+
//#endregion
|
|
2742
|
+
//#region node_modules/cookie/dist/index.js
|
|
2743
|
+
var require_dist = /* @__PURE__ */ __commonJS({ "node_modules/cookie/dist/index.js": ((exports) => {
|
|
2744
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2745
|
+
exports.parseCookie = parseCookie;
|
|
2746
|
+
exports.parse = parseCookie;
|
|
2747
|
+
exports.stringifyCookie = stringifyCookie;
|
|
2748
|
+
exports.stringifySetCookie = stringifySetCookie;
|
|
2749
|
+
exports.serialize = stringifySetCookie;
|
|
2750
|
+
exports.parseSetCookie = parseSetCookie;
|
|
2751
|
+
exports.stringifySetCookie = stringifySetCookie;
|
|
2752
|
+
exports.serialize = stringifySetCookie;
|
|
2753
|
+
/**
|
|
2754
|
+
* RegExp to match cookie-name in RFC 6265 sec 4.1.1
|
|
2755
|
+
* This refers out to the obsoleted definition of token in RFC 2616 sec 2.2
|
|
2756
|
+
* which has been replaced by the token definition in RFC 7230 appendix B.
|
|
2757
|
+
*
|
|
2758
|
+
* cookie-name = token
|
|
2759
|
+
* token = 1*tchar
|
|
2760
|
+
* tchar = "!" / "#" / "$" / "%" / "&" / "'" /
|
|
2761
|
+
* "*" / "+" / "-" / "." / "^" / "_" /
|
|
2762
|
+
* "`" / "|" / "~" / DIGIT / ALPHA
|
|
2763
|
+
*
|
|
2764
|
+
* Note: Allowing more characters - https://github.com/jshttp/cookie/issues/191
|
|
2765
|
+
* Allow same range as cookie value, except `=`, which delimits end of name.
|
|
2766
|
+
*/
|
|
2767
|
+
const cookieNameRegExp = /^[\u0021-\u003A\u003C\u003E-\u007E]+$/;
|
|
2768
|
+
/**
|
|
2769
|
+
* RegExp to match cookie-value in RFC 6265 sec 4.1.1
|
|
2770
|
+
*
|
|
2771
|
+
* cookie-value = *cookie-octet / ( DQUOTE *cookie-octet DQUOTE )
|
|
2772
|
+
* cookie-octet = %x21 / %x23-2B / %x2D-3A / %x3C-5B / %x5D-7E
|
|
2773
|
+
* ; US-ASCII characters excluding CTLs,
|
|
2774
|
+
* ; whitespace DQUOTE, comma, semicolon,
|
|
2775
|
+
* ; and backslash
|
|
2776
|
+
*
|
|
2777
|
+
* Allowing more characters: https://github.com/jshttp/cookie/issues/191
|
|
2778
|
+
* Comma, backslash, and DQUOTE are not part of the parsing algorithm.
|
|
2779
|
+
*/
|
|
2780
|
+
const cookieValueRegExp = /^[\u0021-\u003A\u003C-\u007E]*$/;
|
|
2781
|
+
/**
|
|
2782
|
+
* RegExp to match domain-value in RFC 6265 sec 4.1.1
|
|
2783
|
+
*
|
|
2784
|
+
* domain-value = <subdomain>
|
|
2785
|
+
* ; defined in [RFC1034], Section 3.5, as
|
|
2786
|
+
* ; enhanced by [RFC1123], Section 2.1
|
|
2787
|
+
* <subdomain> = <label> | <subdomain> "." <label>
|
|
2788
|
+
* <label> = <let-dig> [ [ <ldh-str> ] <let-dig> ]
|
|
2789
|
+
* Labels must be 63 characters or less.
|
|
2790
|
+
* 'let-dig' not 'letter' in the first char, per RFC1123
|
|
2791
|
+
* <ldh-str> = <let-dig-hyp> | <let-dig-hyp> <ldh-str>
|
|
2792
|
+
* <let-dig-hyp> = <let-dig> | "-"
|
|
2793
|
+
* <let-dig> = <letter> | <digit>
|
|
2794
|
+
* <letter> = any one of the 52 alphabetic characters A through Z in
|
|
2795
|
+
* upper case and a through z in lower case
|
|
2796
|
+
* <digit> = any one of the ten digits 0 through 9
|
|
2797
|
+
*
|
|
2798
|
+
* Keep support for leading dot: https://github.com/jshttp/cookie/issues/173
|
|
2799
|
+
*
|
|
2800
|
+
* > (Note that a leading %x2E ("."), if present, is ignored even though that
|
|
2801
|
+
* character is not permitted, but a trailing %x2E ("."), if present, will
|
|
2802
|
+
* cause the user agent to ignore the attribute.)
|
|
2803
|
+
*/
|
|
2804
|
+
const domainValueRegExp = /^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i;
|
|
2805
|
+
/**
|
|
2806
|
+
* RegExp to match path-value in RFC 6265 sec 4.1.1
|
|
2807
|
+
*
|
|
2808
|
+
* path-value = <any CHAR except CTLs or ";">
|
|
2809
|
+
* CHAR = %x01-7F
|
|
2810
|
+
* ; defined in RFC 5234 appendix B.1
|
|
2811
|
+
*/
|
|
2812
|
+
const pathValueRegExp = /^[\u0020-\u003A\u003D-\u007E]*$/;
|
|
2813
|
+
/**
|
|
2814
|
+
* RegExp to match max-age-value in RFC 6265 sec 5.6.2
|
|
2815
|
+
*/
|
|
2816
|
+
const maxAgeRegExp = /^-?\d+$/;
|
|
2817
|
+
const __toString = Object.prototype.toString;
|
|
2818
|
+
const NullObject = /* @__PURE__ */ (() => {
|
|
2819
|
+
const C = function() {};
|
|
2820
|
+
C.prototype = Object.create(null);
|
|
2821
|
+
return C;
|
|
2822
|
+
})();
|
|
2823
|
+
/**
|
|
2824
|
+
* Parse a `Cookie` header.
|
|
2825
|
+
*
|
|
2826
|
+
* Parse the given cookie header string into an object
|
|
2827
|
+
* The object has the various cookies as keys(names) => values
|
|
2828
|
+
*/
|
|
2829
|
+
function parseCookie(str, options) {
|
|
2830
|
+
const obj = new NullObject();
|
|
2831
|
+
const len = str.length;
|
|
2832
|
+
if (len < 2) return obj;
|
|
2833
|
+
const dec = options?.decode || decode$1;
|
|
2834
|
+
let index = 0;
|
|
2835
|
+
do {
|
|
2836
|
+
const eqIdx = eqIndex(str, index, len);
|
|
2837
|
+
if (eqIdx === -1) break;
|
|
2838
|
+
const endIdx = endIndex(str, index, len);
|
|
2839
|
+
if (eqIdx > endIdx) {
|
|
2840
|
+
index = str.lastIndexOf(";", eqIdx - 1) + 1;
|
|
2841
|
+
continue;
|
|
2842
|
+
}
|
|
2843
|
+
const key = valueSlice(str, index, eqIdx);
|
|
2844
|
+
if (obj[key] === void 0) obj[key] = dec(valueSlice(str, eqIdx + 1, endIdx));
|
|
2845
|
+
index = endIdx + 1;
|
|
2846
|
+
} while (index < len);
|
|
2847
|
+
return obj;
|
|
2848
|
+
}
|
|
2849
|
+
/**
|
|
2850
|
+
* Stringifies an object into an HTTP `Cookie` header.
|
|
2851
|
+
*/
|
|
2852
|
+
function stringifyCookie(cookie, options) {
|
|
2853
|
+
const enc = options?.encode || encodeURIComponent;
|
|
2854
|
+
const cookieStrings = [];
|
|
2855
|
+
for (const name of Object.keys(cookie)) {
|
|
2856
|
+
const val = cookie[name];
|
|
2857
|
+
if (val === void 0) continue;
|
|
2858
|
+
if (!cookieNameRegExp.test(name)) throw new TypeError(`cookie name is invalid: ${name}`);
|
|
2859
|
+
const value = enc(val);
|
|
2860
|
+
if (!cookieValueRegExp.test(value)) throw new TypeError(`cookie val is invalid: ${val}`);
|
|
2861
|
+
cookieStrings.push(`${name}=${value}`);
|
|
2862
|
+
}
|
|
2863
|
+
return cookieStrings.join("; ");
|
|
2864
|
+
}
|
|
2865
|
+
function stringifySetCookie(_name, _val, _opts) {
|
|
2866
|
+
const cookie = typeof _name === "object" ? _name : {
|
|
2867
|
+
..._opts,
|
|
2868
|
+
name: _name,
|
|
2869
|
+
value: String(_val)
|
|
2870
|
+
};
|
|
2871
|
+
const enc = (typeof _val === "object" ? _val : _opts)?.encode || encodeURIComponent;
|
|
2872
|
+
if (!cookieNameRegExp.test(cookie.name)) throw new TypeError(`argument name is invalid: ${cookie.name}`);
|
|
2873
|
+
const value = cookie.value ? enc(cookie.value) : "";
|
|
2874
|
+
if (!cookieValueRegExp.test(value)) throw new TypeError(`argument val is invalid: ${cookie.value}`);
|
|
2875
|
+
let str = cookie.name + "=" + value;
|
|
2876
|
+
if (cookie.maxAge !== void 0) {
|
|
2877
|
+
if (!Number.isInteger(cookie.maxAge)) throw new TypeError(`option maxAge is invalid: ${cookie.maxAge}`);
|
|
2878
|
+
str += "; Max-Age=" + cookie.maxAge;
|
|
2879
|
+
}
|
|
2880
|
+
if (cookie.domain) {
|
|
2881
|
+
if (!domainValueRegExp.test(cookie.domain)) throw new TypeError(`option domain is invalid: ${cookie.domain}`);
|
|
2882
|
+
str += "; Domain=" + cookie.domain;
|
|
2883
|
+
}
|
|
2884
|
+
if (cookie.path) {
|
|
2885
|
+
if (!pathValueRegExp.test(cookie.path)) throw new TypeError(`option path is invalid: ${cookie.path}`);
|
|
2886
|
+
str += "; Path=" + cookie.path;
|
|
2887
|
+
}
|
|
2888
|
+
if (cookie.expires) {
|
|
2889
|
+
if (!isDate(cookie.expires) || !Number.isFinite(cookie.expires.valueOf())) throw new TypeError(`option expires is invalid: ${cookie.expires}`);
|
|
2890
|
+
str += "; Expires=" + cookie.expires.toUTCString();
|
|
2891
|
+
}
|
|
2892
|
+
if (cookie.httpOnly) str += "; HttpOnly";
|
|
2893
|
+
if (cookie.secure) str += "; Secure";
|
|
2894
|
+
if (cookie.partitioned) str += "; Partitioned";
|
|
2895
|
+
if (cookie.priority) switch (typeof cookie.priority === "string" ? cookie.priority.toLowerCase() : void 0) {
|
|
2896
|
+
case "low":
|
|
2897
|
+
str += "; Priority=Low";
|
|
2898
|
+
break;
|
|
2899
|
+
case "medium":
|
|
2900
|
+
str += "; Priority=Medium";
|
|
2901
|
+
break;
|
|
2902
|
+
case "high":
|
|
2903
|
+
str += "; Priority=High";
|
|
2904
|
+
break;
|
|
2905
|
+
default: throw new TypeError(`option priority is invalid: ${cookie.priority}`);
|
|
2906
|
+
}
|
|
2907
|
+
if (cookie.sameSite) switch (typeof cookie.sameSite === "string" ? cookie.sameSite.toLowerCase() : cookie.sameSite) {
|
|
2908
|
+
case true:
|
|
2909
|
+
case "strict":
|
|
2910
|
+
str += "; SameSite=Strict";
|
|
2911
|
+
break;
|
|
2912
|
+
case "lax":
|
|
2913
|
+
str += "; SameSite=Lax";
|
|
2914
|
+
break;
|
|
2915
|
+
case "none":
|
|
2916
|
+
str += "; SameSite=None";
|
|
2917
|
+
break;
|
|
2918
|
+
default: throw new TypeError(`option sameSite is invalid: ${cookie.sameSite}`);
|
|
2919
|
+
}
|
|
2920
|
+
return str;
|
|
2921
|
+
}
|
|
2922
|
+
/**
|
|
2923
|
+
* Deserialize a `Set-Cookie` header into an object.
|
|
2924
|
+
*
|
|
2925
|
+
* deserialize('foo=bar; httpOnly')
|
|
2926
|
+
* => { name: 'foo', value: 'bar', httpOnly: true }
|
|
2927
|
+
*/
|
|
2928
|
+
function parseSetCookie(str, options) {
|
|
2929
|
+
const dec = options?.decode || decode$1;
|
|
2930
|
+
const len = str.length;
|
|
2931
|
+
const endIdx = endIndex(str, 0, len);
|
|
2932
|
+
const eqIdx = eqIndex(str, 0, endIdx);
|
|
2933
|
+
const setCookie$2 = eqIdx === -1 ? {
|
|
2934
|
+
name: "",
|
|
2935
|
+
value: dec(valueSlice(str, 0, endIdx))
|
|
2936
|
+
} : {
|
|
2937
|
+
name: valueSlice(str, 0, eqIdx),
|
|
2938
|
+
value: dec(valueSlice(str, eqIdx + 1, endIdx))
|
|
2939
|
+
};
|
|
2940
|
+
let index = endIdx + 1;
|
|
2941
|
+
while (index < len) {
|
|
2942
|
+
const endIdx$1 = endIndex(str, index, len);
|
|
2943
|
+
const eqIdx$1 = eqIndex(str, index, endIdx$1);
|
|
2944
|
+
const attr = eqIdx$1 === -1 ? valueSlice(str, index, endIdx$1) : valueSlice(str, index, eqIdx$1);
|
|
2945
|
+
const val = eqIdx$1 === -1 ? void 0 : valueSlice(str, eqIdx$1 + 1, endIdx$1);
|
|
2946
|
+
switch (attr.toLowerCase()) {
|
|
2947
|
+
case "httponly":
|
|
2948
|
+
setCookie$2.httpOnly = true;
|
|
2949
|
+
break;
|
|
2950
|
+
case "secure":
|
|
2951
|
+
setCookie$2.secure = true;
|
|
2952
|
+
break;
|
|
2953
|
+
case "partitioned":
|
|
2954
|
+
setCookie$2.partitioned = true;
|
|
2955
|
+
break;
|
|
2956
|
+
case "domain":
|
|
2957
|
+
setCookie$2.domain = val;
|
|
2958
|
+
break;
|
|
2959
|
+
case "path":
|
|
2960
|
+
setCookie$2.path = val;
|
|
2961
|
+
break;
|
|
2962
|
+
case "max-age":
|
|
2963
|
+
if (val && maxAgeRegExp.test(val)) setCookie$2.maxAge = Number(val);
|
|
2964
|
+
break;
|
|
2965
|
+
case "expires":
|
|
2966
|
+
if (!val) break;
|
|
2967
|
+
const date = new Date(val);
|
|
2968
|
+
if (Number.isFinite(date.valueOf())) setCookie$2.expires = date;
|
|
2969
|
+
break;
|
|
2970
|
+
case "priority":
|
|
2971
|
+
if (!val) break;
|
|
2972
|
+
const priority = val.toLowerCase();
|
|
2973
|
+
if (priority === "low" || priority === "medium" || priority === "high") setCookie$2.priority = priority;
|
|
2974
|
+
break;
|
|
2975
|
+
case "samesite":
|
|
2976
|
+
if (!val) break;
|
|
2977
|
+
const sameSite = val.toLowerCase();
|
|
2978
|
+
if (sameSite === "lax" || sameSite === "strict" || sameSite === "none") setCookie$2.sameSite = sameSite;
|
|
2979
|
+
break;
|
|
2980
|
+
}
|
|
2981
|
+
index = endIdx$1 + 1;
|
|
2982
|
+
}
|
|
2983
|
+
return setCookie$2;
|
|
2984
|
+
}
|
|
2985
|
+
/**
|
|
2986
|
+
* Find the `;` character between `min` and `len` in str.
|
|
2987
|
+
*/
|
|
2988
|
+
function endIndex(str, min, len) {
|
|
2989
|
+
const index = str.indexOf(";", min);
|
|
2990
|
+
return index === -1 ? len : index;
|
|
2991
|
+
}
|
|
2992
|
+
/**
|
|
2993
|
+
* Find the `=` character between `min` and `max` in str.
|
|
2994
|
+
*/
|
|
2995
|
+
function eqIndex(str, min, max) {
|
|
2996
|
+
const index = str.indexOf("=", min);
|
|
2997
|
+
return index < max ? index : -1;
|
|
2998
|
+
}
|
|
2999
|
+
/**
|
|
3000
|
+
* Slice out a value between startPod to max.
|
|
3001
|
+
*/
|
|
3002
|
+
function valueSlice(str, min, max) {
|
|
3003
|
+
let start = min;
|
|
3004
|
+
let end = max;
|
|
3005
|
+
do {
|
|
3006
|
+
const code = str.charCodeAt(start);
|
|
3007
|
+
if (code !== 32 && code !== 9) break;
|
|
3008
|
+
} while (++start < end);
|
|
3009
|
+
while (end > start) {
|
|
3010
|
+
const code = str.charCodeAt(end - 1);
|
|
3011
|
+
if (code !== 32 && code !== 9) break;
|
|
3012
|
+
end--;
|
|
3013
|
+
}
|
|
3014
|
+
return str.slice(start, end);
|
|
3015
|
+
}
|
|
3016
|
+
/**
|
|
3017
|
+
* URL-decode string value. Optimized to skip native call when no %.
|
|
3018
|
+
*/
|
|
3019
|
+
function decode$1(str) {
|
|
3020
|
+
if (str.indexOf("%") === -1) return str;
|
|
3021
|
+
try {
|
|
3022
|
+
return decodeURIComponent(str);
|
|
3023
|
+
} catch (e) {
|
|
3024
|
+
return str;
|
|
3025
|
+
}
|
|
3026
|
+
}
|
|
3027
|
+
/**
|
|
3028
|
+
* Determine if value is a Date.
|
|
3029
|
+
*/
|
|
3030
|
+
function isDate(val) {
|
|
3031
|
+
return __toString.call(val) === "[object Date]";
|
|
3032
|
+
}
|
|
3033
|
+
}) });
|
|
3034
|
+
|
|
3035
|
+
//#endregion
|
|
3036
|
+
//#region node_modules/cookies-next/lib/common/utils.js
|
|
3037
|
+
var require_utils = /* @__PURE__ */ __commonJS({ "node_modules/cookies-next/lib/common/utils.js": ((exports) => {
|
|
3038
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3039
|
+
exports.getRenderPhase = exports.isClientSide = exports.decode = exports.stringify = void 0;
|
|
3040
|
+
var stringify = function(value) {
|
|
3041
|
+
try {
|
|
3042
|
+
if (typeof value === "string") return value;
|
|
3043
|
+
return JSON.stringify(value);
|
|
3044
|
+
} catch (e) {
|
|
3045
|
+
return value;
|
|
3046
|
+
}
|
|
3047
|
+
};
|
|
3048
|
+
exports.stringify = stringify;
|
|
3049
|
+
var decode = function(str) {
|
|
3050
|
+
if (!str) return str;
|
|
3051
|
+
return str.replace(/(%[0-9A-Z]{2})+/g, decodeURIComponent);
|
|
3052
|
+
};
|
|
3053
|
+
exports.decode = decode;
|
|
3054
|
+
var isClientSide = function(options) {
|
|
3055
|
+
return !(options === null || options === void 0 ? void 0 : options.req) && !(options === null || options === void 0 ? void 0 : options.res) && !(options && "cookies" in options && (options === null || options === void 0 ? void 0 : options.cookies));
|
|
3056
|
+
};
|
|
3057
|
+
exports.isClientSide = isClientSide;
|
|
3058
|
+
var getRenderPhase = function() {
|
|
3059
|
+
return typeof window === "undefined" ? "server" : "client";
|
|
3060
|
+
};
|
|
3061
|
+
exports.getRenderPhase = getRenderPhase;
|
|
3062
|
+
}) });
|
|
3063
|
+
|
|
3064
|
+
//#endregion
|
|
3065
|
+
//#region node_modules/cookies-next/lib/client/cookie-functions.js
|
|
3066
|
+
var require_cookie_functions = /* @__PURE__ */ __commonJS({ "node_modules/cookies-next/lib/client/cookie-functions.js": ((exports) => {
|
|
3067
|
+
var __assign$1 = exports && exports.__assign || function() {
|
|
3068
|
+
__assign$1 = Object.assign || function(t) {
|
|
3069
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
3070
|
+
s = arguments[i];
|
|
3071
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
3072
|
+
}
|
|
3073
|
+
return t;
|
|
3074
|
+
};
|
|
3075
|
+
return __assign$1.apply(this, arguments);
|
|
3076
|
+
};
|
|
3077
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3078
|
+
exports.revalidateCookies = exports.hasCookie = exports.deleteCookie = exports.setCookie = exports.getCookie = exports.getCookies = void 0;
|
|
3079
|
+
var cookie_1 = require_dist();
|
|
3080
|
+
var utils_1$1 = require_utils();
|
|
3081
|
+
var ensureClientSide = function(options) {
|
|
3082
|
+
if (!(0, utils_1$1.isClientSide)(options)) throw new Error("You are trying to access cookies on the server side. Please, use the server-side import with `cookies-next/server` instead.");
|
|
3083
|
+
};
|
|
3084
|
+
var getCookies = function(_options) {
|
|
3085
|
+
ensureClientSide(_options);
|
|
3086
|
+
if ((0, utils_1$1.getRenderPhase)() === "server") return;
|
|
3087
|
+
var cookies = {};
|
|
3088
|
+
var documentCookies = document.cookie ? document.cookie.split("; ") : [];
|
|
3089
|
+
for (var i = 0, len = documentCookies.length; i < len; i++) {
|
|
3090
|
+
var cookieParts = documentCookies[i].split("=");
|
|
3091
|
+
var cookie = cookieParts.slice(1).join("=");
|
|
3092
|
+
var name_1 = cookieParts[0];
|
|
3093
|
+
cookies[name_1] = cookie;
|
|
3094
|
+
}
|
|
3095
|
+
return cookies;
|
|
3096
|
+
};
|
|
3097
|
+
exports.getCookies = getCookies;
|
|
3098
|
+
var getCookie = function(key, options) {
|
|
3099
|
+
ensureClientSide(options);
|
|
3100
|
+
var _cookies = getCookies(options);
|
|
3101
|
+
var value = _cookies === null || _cookies === void 0 ? void 0 : _cookies[key];
|
|
3102
|
+
if (value === void 0) return void 0;
|
|
3103
|
+
return (0, utils_1$1.decode)(value);
|
|
3104
|
+
};
|
|
3105
|
+
exports.getCookie = getCookie;
|
|
3106
|
+
var setCookie$1 = function(key, data, options) {
|
|
3107
|
+
ensureClientSide(options);
|
|
3108
|
+
if ((0, utils_1$1.getRenderPhase)() === "server") return;
|
|
3109
|
+
var _cookieOptions = options || {};
|
|
3110
|
+
var cookieStr = (0, cookie_1.serialize)(key, (0, utils_1$1.stringify)(data), __assign$1({ path: "/" }, _cookieOptions));
|
|
3111
|
+
document.cookie = cookieStr;
|
|
3112
|
+
};
|
|
3113
|
+
exports.setCookie = setCookie$1;
|
|
3114
|
+
var deleteCookie = function(key, options) {
|
|
3115
|
+
ensureClientSide(options);
|
|
3116
|
+
setCookie$1(key, "", __assign$1(__assign$1({}, options), { maxAge: -1 }));
|
|
3117
|
+
};
|
|
3118
|
+
exports.deleteCookie = deleteCookie;
|
|
3119
|
+
var hasCookie = function(key, options) {
|
|
3120
|
+
ensureClientSide(options);
|
|
3121
|
+
if (!key) return false;
|
|
3122
|
+
var cookies = getCookies(options);
|
|
3123
|
+
if (!cookies) return false;
|
|
3124
|
+
return Object.prototype.hasOwnProperty.call(cookies, key);
|
|
3125
|
+
};
|
|
3126
|
+
exports.hasCookie = hasCookie;
|
|
3127
|
+
var revalidateCookies = function(onChange, previousCookies) {
|
|
3128
|
+
ensureClientSide();
|
|
3129
|
+
if ((0, utils_1$1.getRenderPhase)() === "server") return;
|
|
3130
|
+
var currentCookies = getCookies();
|
|
3131
|
+
if (Object.keys(__assign$1(__assign$1({}, currentCookies), previousCookies)).some(function(key) {
|
|
3132
|
+
return (currentCookies === null || currentCookies === void 0 ? void 0 : currentCookies[key]) !== (previousCookies === null || previousCookies === void 0 ? void 0 : previousCookies[key]);
|
|
3133
|
+
})) {
|
|
3134
|
+
onChange(currentCookies);
|
|
3135
|
+
previousCookies = currentCookies;
|
|
3136
|
+
}
|
|
3137
|
+
};
|
|
3138
|
+
exports.revalidateCookies = revalidateCookies;
|
|
3139
|
+
}) });
|
|
3140
|
+
|
|
3141
|
+
//#endregion
|
|
3142
|
+
//#region node_modules/cookies-next/lib/client/context.js
|
|
3143
|
+
var require_context = /* @__PURE__ */ __commonJS({ "node_modules/cookies-next/lib/client/context.js": ((exports) => {
|
|
3144
|
+
var __assign = exports && exports.__assign || function() {
|
|
3145
|
+
__assign = Object.assign || function(t) {
|
|
3146
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
3147
|
+
s = arguments[i];
|
|
3148
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
3149
|
+
}
|
|
3150
|
+
return t;
|
|
3151
|
+
};
|
|
3152
|
+
return __assign.apply(this, arguments);
|
|
3153
|
+
};
|
|
3154
|
+
var __createBinding$1 = exports && exports.__createBinding || (Object.create ? (function(o, m, k, k2) {
|
|
3155
|
+
if (k2 === void 0) k2 = k;
|
|
3156
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
3157
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) desc = {
|
|
3158
|
+
enumerable: true,
|
|
3159
|
+
get: function() {
|
|
3160
|
+
return m[k];
|
|
3161
|
+
}
|
|
3162
|
+
};
|
|
3163
|
+
Object.defineProperty(o, k2, desc);
|
|
3164
|
+
}) : (function(o, m, k, k2) {
|
|
3165
|
+
if (k2 === void 0) k2 = k;
|
|
3166
|
+
o[k2] = m[k];
|
|
3167
|
+
}));
|
|
3168
|
+
var __setModuleDefault = exports && exports.__setModuleDefault || (Object.create ? (function(o, v) {
|
|
3169
|
+
Object.defineProperty(o, "default", {
|
|
3170
|
+
enumerable: true,
|
|
3171
|
+
value: v
|
|
3172
|
+
});
|
|
3173
|
+
}) : function(o, v) {
|
|
3174
|
+
o["default"] = v;
|
|
3175
|
+
});
|
|
3176
|
+
var __importStar = exports && exports.__importStar || function(mod) {
|
|
3177
|
+
if (mod && mod.__esModule) return mod;
|
|
3178
|
+
var result = {};
|
|
3179
|
+
if (mod != null) {
|
|
3180
|
+
for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding$1(result, mod, k);
|
|
3181
|
+
}
|
|
3182
|
+
__setModuleDefault(result, mod);
|
|
3183
|
+
return result;
|
|
3184
|
+
};
|
|
3185
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3186
|
+
exports.CookieProvider = exports.CookieContext = void 0;
|
|
3187
|
+
var react_1$1 = __importStar(__require("react"));
|
|
3188
|
+
var _1 = require_client();
|
|
3189
|
+
var utils_1 = require_utils();
|
|
3190
|
+
exports.CookieContext = (0, react_1$1.createContext)(null);
|
|
3191
|
+
function CookieProvider(_a) {
|
|
3192
|
+
var children = _a.children, pollingOptions = _a.pollingOptions;
|
|
3193
|
+
var _b = (0, react_1$1.useState)({}), cookies = _b[0], setCookies = _b[1];
|
|
3194
|
+
(0, react_1$1.useEffect)(function() {
|
|
3195
|
+
var initialCookies = (0, _1.getCookies)();
|
|
3196
|
+
if (!initialCookies) return;
|
|
3197
|
+
setCookies(initialCookies);
|
|
3198
|
+
}, []);
|
|
3199
|
+
(0, _1.useCookiesPolling)(function(newCookies) {
|
|
3200
|
+
if (newCookies) setCookies(newCookies);
|
|
3201
|
+
}, pollingOptions);
|
|
3202
|
+
var value = (0, react_1$1.useMemo)(function() {
|
|
3203
|
+
return {
|
|
3204
|
+
cookies,
|
|
3205
|
+
set: function(key, data) {
|
|
3206
|
+
setCookies(function(prev) {
|
|
3207
|
+
var _a$1;
|
|
3208
|
+
return __assign(__assign({}, prev), (_a$1 = {}, _a$1[key] = encodeURIComponent((0, utils_1.stringify)(data)), _a$1));
|
|
3209
|
+
});
|
|
3210
|
+
},
|
|
3211
|
+
get: function(key) {
|
|
3212
|
+
return cookies === null || cookies === void 0 ? void 0 : cookies[key];
|
|
3213
|
+
},
|
|
3214
|
+
getAll: function() {
|
|
3215
|
+
return cookies;
|
|
3216
|
+
},
|
|
3217
|
+
has: function(key) {
|
|
3218
|
+
return cookies.hasOwnProperty(key);
|
|
3219
|
+
},
|
|
3220
|
+
delete: function(key) {
|
|
3221
|
+
if (!cookies.hasOwnProperty(key)) return;
|
|
3222
|
+
setCookies(function(prev) {
|
|
3223
|
+
var newCookies = __assign({}, prev);
|
|
3224
|
+
delete newCookies[key];
|
|
3225
|
+
return newCookies;
|
|
3226
|
+
});
|
|
3227
|
+
},
|
|
3228
|
+
revalidateCookiesState: function() {
|
|
3229
|
+
(0, _1.revalidateCookies)(function(newCookies) {
|
|
3230
|
+
if (!newCookies) return;
|
|
3231
|
+
setCookies(newCookies);
|
|
3232
|
+
}, cookies);
|
|
3233
|
+
}
|
|
3234
|
+
};
|
|
3235
|
+
}, [cookies]);
|
|
3236
|
+
return react_1$1.default.createElement(exports.CookieContext.Provider, { value }, children);
|
|
3237
|
+
}
|
|
3238
|
+
exports.CookieProvider = CookieProvider;
|
|
3239
|
+
}) });
|
|
3240
|
+
|
|
3241
|
+
//#endregion
|
|
3242
|
+
//#region node_modules/cookies-next/lib/client/hooks.js
|
|
3243
|
+
var require_hooks = /* @__PURE__ */ __commonJS({ "node_modules/cookies-next/lib/client/hooks.js": ((exports) => {
|
|
3244
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3245
|
+
exports.useRevalidateCookiesState = exports.useReactiveHasCookie = exports.useReactiveDeleteCookie = exports.useReactiveSetCookie = exports.useReactiveGetCookie = exports.useReactiveGetCookies = exports.useReactiveCookiesNext = exports.useCookiesNext = exports.useHasCookie = exports.useDeleteCookie = exports.useSetCookie = exports.useGetCookie = exports.useGetCookies = exports.useCookiesPolling = void 0;
|
|
3246
|
+
var context_1$1 = require_context();
|
|
3247
|
+
var react_1 = __require("react");
|
|
3248
|
+
var cookie_functions_1 = require_cookie_functions();
|
|
3249
|
+
var useWrappedCookieFn = function(cookieFnCb) {
|
|
3250
|
+
var _a = (0, react_1.useState)(false), isMounted = _a[0], setIsMounted = _a[1];
|
|
3251
|
+
(0, react_1.useEffect)(function() {
|
|
3252
|
+
setIsMounted(true);
|
|
3253
|
+
}, []);
|
|
3254
|
+
return isMounted ? cookieFnCb : (function() {});
|
|
3255
|
+
};
|
|
3256
|
+
var useCookieContext = function() {
|
|
3257
|
+
var context = (0, react_1.useContext)(context_1$1.CookieContext);
|
|
3258
|
+
if (!context) throw new Error("useCookieContext must be used within a CookieProvider");
|
|
3259
|
+
return context;
|
|
3260
|
+
};
|
|
3261
|
+
var useCookiesPolling = function(onChange, pollingOptions) {
|
|
3262
|
+
var _a = pollingOptions || {}, _b = _a.intervalMs, intervalMs = _b === void 0 ? 1e3 : _b, _c = _a.enabled, enabled = _c === void 0 ? false : _c;
|
|
3263
|
+
(0, react_1.useEffect)(function() {
|
|
3264
|
+
if (!enabled) return;
|
|
3265
|
+
var previousCookies = (0, cookie_functions_1.getCookies)();
|
|
3266
|
+
var interval = setInterval(function() {
|
|
3267
|
+
(0, cookie_functions_1.revalidateCookies)(onChange, previousCookies);
|
|
3268
|
+
}, intervalMs);
|
|
3269
|
+
return function() {
|
|
3270
|
+
return clearInterval(interval);
|
|
3271
|
+
};
|
|
3272
|
+
}, [onChange, intervalMs]);
|
|
3273
|
+
};
|
|
3274
|
+
exports.useCookiesPolling = useCookiesPolling;
|
|
3275
|
+
var useGetCookies = function() {
|
|
3276
|
+
return useWrappedCookieFn(cookie_functions_1.getCookies);
|
|
3277
|
+
};
|
|
3278
|
+
exports.useGetCookies = useGetCookies;
|
|
3279
|
+
var useGetCookie = function() {
|
|
3280
|
+
return useWrappedCookieFn(cookie_functions_1.getCookie);
|
|
3281
|
+
};
|
|
3282
|
+
exports.useGetCookie = useGetCookie;
|
|
3283
|
+
var useHasCookie = function() {
|
|
3284
|
+
return useWrappedCookieFn(cookie_functions_1.hasCookie);
|
|
3285
|
+
};
|
|
3286
|
+
exports.useHasCookie = useHasCookie;
|
|
3287
|
+
var useSetCookie = function() {
|
|
3288
|
+
return useWrappedCookieFn(cookie_functions_1.setCookie);
|
|
3289
|
+
};
|
|
3290
|
+
exports.useSetCookie = useSetCookie;
|
|
3291
|
+
var useDeleteCookie = function() {
|
|
3292
|
+
return useWrappedCookieFn(cookie_functions_1.deleteCookie);
|
|
3293
|
+
};
|
|
3294
|
+
exports.useDeleteCookie = useDeleteCookie;
|
|
3295
|
+
var useCookiesNext = function() {
|
|
3296
|
+
return {
|
|
3297
|
+
getCookies: useGetCookies(),
|
|
3298
|
+
getCookie: useGetCookie(),
|
|
3299
|
+
hasCookie: useHasCookie(),
|
|
3300
|
+
setCookie: useSetCookie(),
|
|
3301
|
+
deleteCookie: useDeleteCookie()
|
|
3302
|
+
};
|
|
3303
|
+
};
|
|
3304
|
+
exports.useCookiesNext = useCookiesNext;
|
|
3305
|
+
var useReactiveGetCookies = function() {
|
|
3306
|
+
var context = useCookieContext();
|
|
3307
|
+
return function() {
|
|
3308
|
+
return context === null || context === void 0 ? void 0 : context.getAll();
|
|
3309
|
+
};
|
|
3310
|
+
};
|
|
3311
|
+
exports.useReactiveGetCookies = useReactiveGetCookies;
|
|
3312
|
+
var useReactiveGetCookie = function() {
|
|
3313
|
+
var context = useCookieContext();
|
|
3314
|
+
return function(key) {
|
|
3315
|
+
return context === null || context === void 0 ? void 0 : context.get(key);
|
|
3316
|
+
};
|
|
3317
|
+
};
|
|
3318
|
+
exports.useReactiveGetCookie = useReactiveGetCookie;
|
|
3319
|
+
var useReactiveSetCookie = function() {
|
|
3320
|
+
var context = useCookieContext();
|
|
3321
|
+
return function(key, data, options) {
|
|
3322
|
+
context === null || context === void 0 || context.set(key, data);
|
|
3323
|
+
return (0, cookie_functions_1.setCookie)(key, data, options);
|
|
3324
|
+
};
|
|
3325
|
+
};
|
|
3326
|
+
exports.useReactiveSetCookie = useReactiveSetCookie;
|
|
3327
|
+
var useReactiveDeleteCookie = function() {
|
|
3328
|
+
var context = useCookieContext();
|
|
3329
|
+
return function(key, options) {
|
|
3330
|
+
context === null || context === void 0 || context.delete(key);
|
|
3331
|
+
return (0, cookie_functions_1.deleteCookie)(key, options);
|
|
3332
|
+
};
|
|
3333
|
+
};
|
|
3334
|
+
exports.useReactiveDeleteCookie = useReactiveDeleteCookie;
|
|
3335
|
+
var useReactiveHasCookie = function() {
|
|
3336
|
+
var context = useCookieContext();
|
|
3337
|
+
return function(key) {
|
|
3338
|
+
return context === null || context === void 0 ? void 0 : context.has(key);
|
|
3339
|
+
};
|
|
3340
|
+
};
|
|
3341
|
+
exports.useReactiveHasCookie = useReactiveHasCookie;
|
|
3342
|
+
var useRevalidateCookiesState = function() {
|
|
3343
|
+
var context = useCookieContext();
|
|
3344
|
+
return function() {
|
|
3345
|
+
context === null || context === void 0 || context.revalidateCookiesState();
|
|
3346
|
+
};
|
|
3347
|
+
};
|
|
3348
|
+
exports.useRevalidateCookiesState = useRevalidateCookiesState;
|
|
3349
|
+
var useReactiveCookiesNext = function() {
|
|
3350
|
+
return {
|
|
3351
|
+
getCookies: useReactiveGetCookies(),
|
|
3352
|
+
getCookie: useReactiveGetCookie(),
|
|
3353
|
+
hasCookie: useReactiveHasCookie(),
|
|
3354
|
+
setCookie: useReactiveSetCookie(),
|
|
3355
|
+
deleteCookie: useReactiveDeleteCookie(),
|
|
3356
|
+
revalidateCookiesState: useRevalidateCookiesState()
|
|
3357
|
+
};
|
|
3358
|
+
};
|
|
3359
|
+
exports.useReactiveCookiesNext = useReactiveCookiesNext;
|
|
3360
|
+
}) });
|
|
3361
|
+
|
|
3362
|
+
//#endregion
|
|
3363
|
+
//#region node_modules/cookies-next/lib/client/index.js
|
|
3364
|
+
var require_client = /* @__PURE__ */ __commonJS({ "node_modules/cookies-next/lib/client/index.js": ((exports) => {
|
|
3365
|
+
var __createBinding = exports && exports.__createBinding || (Object.create ? (function(o, m, k, k2) {
|
|
3366
|
+
if (k2 === void 0) k2 = k;
|
|
3367
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
3368
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) desc = {
|
|
3369
|
+
enumerable: true,
|
|
3370
|
+
get: function() {
|
|
3371
|
+
return m[k];
|
|
3372
|
+
}
|
|
3373
|
+
};
|
|
3374
|
+
Object.defineProperty(o, k2, desc);
|
|
3375
|
+
}) : (function(o, m, k, k2) {
|
|
3376
|
+
if (k2 === void 0) k2 = k;
|
|
3377
|
+
o[k2] = m[k];
|
|
3378
|
+
}));
|
|
3379
|
+
var __exportStar = exports && exports.__exportStar || function(m, exports$1) {
|
|
3380
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports$1, p)) __createBinding(exports$1, m, p);
|
|
3381
|
+
};
|
|
3382
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3383
|
+
exports.CookiesNextProvider = void 0;
|
|
3384
|
+
__exportStar(require_types(), exports);
|
|
3385
|
+
__exportStar(require_cookie_functions(), exports);
|
|
3386
|
+
var context_1 = require_context();
|
|
3387
|
+
Object.defineProperty(exports, "CookiesNextProvider", {
|
|
3388
|
+
enumerable: true,
|
|
3389
|
+
get: function() {
|
|
3390
|
+
return context_1.CookieProvider;
|
|
3391
|
+
}
|
|
3392
|
+
});
|
|
3393
|
+
__exportStar(require_hooks(), exports);
|
|
3394
|
+
}) });
|
|
3395
|
+
|
|
3396
|
+
//#endregion
|
|
3397
|
+
//#region src/components/system-switcher/SystemSwitcherClient.tsx
|
|
3398
|
+
var import_image = /* @__PURE__ */ __toESM(require_image());
|
|
3399
|
+
var import_client = /* @__PURE__ */ __toESM(require_client());
|
|
3400
|
+
function SystemSwitcherClient({ systems, currentSystemId }) {
|
|
3401
|
+
const [open, setOpen] = useState(false);
|
|
3402
|
+
if (!systems?.length) return null;
|
|
3403
|
+
let currentSystem = systems.find((s) => s.id === currentSystemId);
|
|
3404
|
+
if (!currentSystem) {
|
|
3405
|
+
if (typeof window !== "undefined") {
|
|
3406
|
+
const host = window.location.host;
|
|
3407
|
+
currentSystem = systems.find((s) => s.domains?.some((d) => host.includes(d.name)));
|
|
3408
|
+
}
|
|
3409
|
+
if (!currentSystem) currentSystem = systems[0];
|
|
3410
|
+
}
|
|
3411
|
+
const handleSelect = (system) => {
|
|
3412
|
+
if (system.has_access === false) {
|
|
3413
|
+
if (system.landing_page_url) window.open(system.landing_page_url, "_blank");
|
|
3414
|
+
return;
|
|
3415
|
+
}
|
|
3416
|
+
if (system.id === currentSystem?.id) {
|
|
3417
|
+
setOpen(false);
|
|
3418
|
+
return;
|
|
3419
|
+
}
|
|
3420
|
+
(0, import_client.setCookie)("admin_system", system.id.toString(), { maxAge: 3600 * 24 * 365 });
|
|
3421
|
+
setOpen(false);
|
|
3422
|
+
const domainName = system.domains?.[0]?.name;
|
|
3423
|
+
if (domainName && typeof window !== "undefined" && !window.location.host.includes(domainName)) {
|
|
3424
|
+
const url = domainName.startsWith("http") ? domainName : `https://${domainName}`;
|
|
3425
|
+
window.location.href = url;
|
|
3426
|
+
} else window.location.reload();
|
|
3427
|
+
};
|
|
3428
|
+
return /* @__PURE__ */ jsxs(Popover, {
|
|
3429
|
+
open,
|
|
3430
|
+
onOpenChange: setOpen,
|
|
3431
|
+
children: [/* @__PURE__ */ jsx(PopoverTrigger, {
|
|
3432
|
+
asChild: true,
|
|
3433
|
+
children: /* @__PURE__ */ jsxs("button", {
|
|
3434
|
+
className: "flex flex-row items-center justify-between gap-2.5 rounded-lg bg-primary/5 px-3 h-[42px] hover:bg-primary/10 transition-colors w-[180px] outline-none border border-transparent data-[state=open]:rounded-b-none data-[state=open]:border-border data-[state=open]:border-b-transparent data-[state=open]:bg-primary/5 relative z-10",
|
|
3435
|
+
children: [/* @__PURE__ */ jsx("div", {
|
|
3436
|
+
className: "flex-1 overflow-hidden flex items-center justify-start h-full",
|
|
3437
|
+
children: currentSystem?.logo ? /* @__PURE__ */ jsx(import_image.default, {
|
|
3438
|
+
src: currentSystem.logo,
|
|
3439
|
+
alt: currentSystem.name,
|
|
3440
|
+
width: 80,
|
|
3441
|
+
height: 80,
|
|
3442
|
+
className: "h-[20px] w-auto max-w-[124px] object-contain object-left shrink-0"
|
|
3443
|
+
}) : /* @__PURE__ */ jsx("span", {
|
|
3444
|
+
className: "font-semibold text-primary truncate text-sm",
|
|
3445
|
+
children: currentSystem?.name || "Selecione"
|
|
3446
|
+
})
|
|
3447
|
+
}), /* @__PURE__ */ jsx(ChevronsUpDown, { className: "h-4 w-4 text-muted-foreground shrink-0" })]
|
|
3448
|
+
})
|
|
3449
|
+
}), /* @__PURE__ */ jsxs(PopoverContent, {
|
|
3450
|
+
align: "start",
|
|
3451
|
+
sideOffset: -1,
|
|
3452
|
+
className: "w-(--radix-popover-trigger-width) rounded-b-lg rounded-t-none p-2 shadow-md border border-border border-solid [border-top-style:dashed] bg-background",
|
|
3453
|
+
children: [/* @__PURE__ */ jsx("div", {
|
|
3454
|
+
className: "text-muted-foreground text-xs px-2 py-1.5 font-medium mb-0.5",
|
|
3455
|
+
children: "Outros Sistemas"
|
|
3456
|
+
}), /* @__PURE__ */ jsx("div", {
|
|
3457
|
+
className: "flex flex-col gap-0.5",
|
|
3458
|
+
children: systems.filter((s) => s.id !== currentSystem?.id).map((system) => /* @__PURE__ */ jsxs("button", {
|
|
3459
|
+
onClick: () => handleSelect(system),
|
|
3460
|
+
className: "flex w-full flex-row items-center justify-between rounded-md px-2 py-2 transition-colors hover:bg-accent disabled:opacity-50",
|
|
3461
|
+
children: [/* @__PURE__ */ jsx("div", {
|
|
3462
|
+
className: "flex-1 overflow-hidden flex items-center justify-start h-6",
|
|
3463
|
+
children: system.logo ? /* @__PURE__ */ jsx(import_image.default, {
|
|
3464
|
+
src: system.logo,
|
|
3465
|
+
alt: system.name,
|
|
3466
|
+
width: 80,
|
|
3467
|
+
height: 80,
|
|
3468
|
+
className: "h-[18px] w-auto max-w-[130px] object-contain object-left shrink-0"
|
|
3469
|
+
}) : /* @__PURE__ */ jsx("span", {
|
|
3470
|
+
className: "font-medium text-foreground truncate text-sm pt-0.5",
|
|
3471
|
+
children: system.name
|
|
3472
|
+
})
|
|
3473
|
+
}), system.has_access === false && /* @__PURE__ */ jsx(Lock, { className: "h-3.5 w-3.5 text-muted-foreground opacity-60 shrink-0 ml-2" })]
|
|
3474
|
+
}, system.id))
|
|
3475
|
+
})]
|
|
3476
|
+
})]
|
|
3477
|
+
});
|
|
3478
|
+
}
|
|
3479
|
+
|
|
3480
|
+
//#endregion
|
|
3481
|
+
export { __toESM as i, __commonJS as n, __require as r, SystemSwitcherClient as t };
|
|
3482
|
+
//# sourceMappingURL=SystemSwitcherClient-BdrsMlaF.js.map
|