@liner-fe/illust 0.1.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/.gitignore +1 -0
- package/CHANGELOG.md +7 -0
- package/config/tsup/tsup.config.ts +19 -0
- package/lib/index.d.ts +31 -0
- package/lib/index.js +3064 -0
- package/package.json +28 -0
- package/src/components/index.tsx +49 -0
- package/src/constants/name.ts +78 -0
- package/src/constants/path.ts +4 -0
- package/src/constants/size.ts +35 -0
- package/src/hooks/useIllust.ts +27 -0
- package/src/index.ts +2 -0
- package/src/types/illust.ts +5 -0
- package/src/utils/illust.ts +10 -0
- package/tsconfig.build.json +35 -0
- package/tsconfig.json +29 -0
package/lib/index.js
ADDED
|
@@ -0,0 +1,3064 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
9
|
+
var __commonJS = (cb, mod) => function __require() {
|
|
10
|
+
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
11
|
+
};
|
|
12
|
+
var __export = (target, all) => {
|
|
13
|
+
for (var name in all)
|
|
14
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
15
|
+
};
|
|
16
|
+
var __copyProps = (to, from, except, desc) => {
|
|
17
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
18
|
+
for (let key of __getOwnPropNames(from))
|
|
19
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
20
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
21
|
+
}
|
|
22
|
+
return to;
|
|
23
|
+
};
|
|
24
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
25
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
26
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
27
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
28
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
29
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
30
|
+
mod
|
|
31
|
+
));
|
|
32
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
33
|
+
|
|
34
|
+
// ../../node_modules/@swc/helpers/cjs/_interop_require_default.cjs
|
|
35
|
+
var require_interop_require_default = __commonJS({
|
|
36
|
+
"../../node_modules/@swc/helpers/cjs/_interop_require_default.cjs"(exports) {
|
|
37
|
+
"use strict";
|
|
38
|
+
function _interop_require_default(obj) {
|
|
39
|
+
return obj && obj.__esModule ? obj : { default: obj };
|
|
40
|
+
}
|
|
41
|
+
__name(_interop_require_default, "_interop_require_default");
|
|
42
|
+
exports._ = _interop_require_default;
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
// ../../node_modules/next/dist/shared/lib/utils/warn-once.js
|
|
47
|
+
var require_warn_once = __commonJS({
|
|
48
|
+
"../../node_modules/next/dist/shared/lib/utils/warn-once.js"(exports) {
|
|
49
|
+
"use strict";
|
|
50
|
+
Object.defineProperty(exports, "__esModule", {
|
|
51
|
+
value: true
|
|
52
|
+
});
|
|
53
|
+
Object.defineProperty(exports, "warnOnce", {
|
|
54
|
+
enumerable: true,
|
|
55
|
+
get: /* @__PURE__ */ __name(function() {
|
|
56
|
+
return warnOnce;
|
|
57
|
+
}, "get")
|
|
58
|
+
});
|
|
59
|
+
var warnOnce = /* @__PURE__ */ __name((_) => {
|
|
60
|
+
}, "warnOnce");
|
|
61
|
+
if (process.env.NODE_ENV !== "production") {
|
|
62
|
+
const warnings = /* @__PURE__ */ new Set();
|
|
63
|
+
warnOnce = /* @__PURE__ */ __name((msg) => {
|
|
64
|
+
if (!warnings.has(msg)) {
|
|
65
|
+
console.warn(msg);
|
|
66
|
+
}
|
|
67
|
+
warnings.add(msg);
|
|
68
|
+
}, "warnOnce");
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
});
|
|
72
|
+
|
|
73
|
+
// ../../node_modules/next/dist/shared/lib/image-blur-svg.js
|
|
74
|
+
var require_image_blur_svg = __commonJS({
|
|
75
|
+
"../../node_modules/next/dist/shared/lib/image-blur-svg.js"(exports) {
|
|
76
|
+
"use strict";
|
|
77
|
+
Object.defineProperty(exports, "__esModule", {
|
|
78
|
+
value: true
|
|
79
|
+
});
|
|
80
|
+
Object.defineProperty(exports, "getImageBlurSvg", {
|
|
81
|
+
enumerable: true,
|
|
82
|
+
get: /* @__PURE__ */ __name(function() {
|
|
83
|
+
return getImageBlurSvg;
|
|
84
|
+
}, "get")
|
|
85
|
+
});
|
|
86
|
+
function getImageBlurSvg(param) {
|
|
87
|
+
let { widthInt, heightInt, blurWidth, blurHeight, blurDataURL, objectFit } = param;
|
|
88
|
+
const std = 20;
|
|
89
|
+
const svgWidth = blurWidth ? blurWidth * 40 : widthInt;
|
|
90
|
+
const svgHeight = blurHeight ? blurHeight * 40 : heightInt;
|
|
91
|
+
const viewBox = svgWidth && svgHeight ? "viewBox='0 0 " + svgWidth + " " + svgHeight + "'" : "";
|
|
92
|
+
const preserveAspectRatio = viewBox ? "none" : objectFit === "contain" ? "xMidYMid" : objectFit === "cover" ? "xMidYMid slice" : "none";
|
|
93
|
+
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='" + preserveAspectRatio + "' style='filter: url(%23b);' href='" + blurDataURL + "'/%3E%3C/svg%3E";
|
|
94
|
+
}
|
|
95
|
+
__name(getImageBlurSvg, "getImageBlurSvg");
|
|
96
|
+
}
|
|
97
|
+
});
|
|
98
|
+
|
|
99
|
+
// ../../node_modules/next/dist/shared/lib/image-config.js
|
|
100
|
+
var require_image_config = __commonJS({
|
|
101
|
+
"../../node_modules/next/dist/shared/lib/image-config.js"(exports) {
|
|
102
|
+
"use strict";
|
|
103
|
+
Object.defineProperty(exports, "__esModule", {
|
|
104
|
+
value: true
|
|
105
|
+
});
|
|
106
|
+
function _export(target, all) {
|
|
107
|
+
for (var name in all) Object.defineProperty(target, name, {
|
|
108
|
+
enumerable: true,
|
|
109
|
+
get: all[name]
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
__name(_export, "_export");
|
|
113
|
+
_export(exports, {
|
|
114
|
+
VALID_LOADERS: /* @__PURE__ */ __name(function() {
|
|
115
|
+
return VALID_LOADERS;
|
|
116
|
+
}, "VALID_LOADERS"),
|
|
117
|
+
imageConfigDefault: /* @__PURE__ */ __name(function() {
|
|
118
|
+
return imageConfigDefault;
|
|
119
|
+
}, "imageConfigDefault")
|
|
120
|
+
});
|
|
121
|
+
var VALID_LOADERS = [
|
|
122
|
+
"default",
|
|
123
|
+
"imgix",
|
|
124
|
+
"cloudinary",
|
|
125
|
+
"akamai",
|
|
126
|
+
"custom"
|
|
127
|
+
];
|
|
128
|
+
var imageConfigDefault = {
|
|
129
|
+
deviceSizes: [
|
|
130
|
+
640,
|
|
131
|
+
750,
|
|
132
|
+
828,
|
|
133
|
+
1080,
|
|
134
|
+
1200,
|
|
135
|
+
1920,
|
|
136
|
+
2048,
|
|
137
|
+
3840
|
|
138
|
+
],
|
|
139
|
+
imageSizes: [
|
|
140
|
+
16,
|
|
141
|
+
32,
|
|
142
|
+
48,
|
|
143
|
+
64,
|
|
144
|
+
96,
|
|
145
|
+
128,
|
|
146
|
+
256,
|
|
147
|
+
384
|
|
148
|
+
],
|
|
149
|
+
path: "/_next/image",
|
|
150
|
+
loader: "default",
|
|
151
|
+
loaderFile: "",
|
|
152
|
+
domains: [],
|
|
153
|
+
disableStaticImages: false,
|
|
154
|
+
minimumCacheTTL: 60,
|
|
155
|
+
formats: [
|
|
156
|
+
"image/webp"
|
|
157
|
+
],
|
|
158
|
+
dangerouslyAllowSVG: false,
|
|
159
|
+
contentSecurityPolicy: "script-src 'none'; frame-src 'none'; sandbox;",
|
|
160
|
+
contentDispositionType: "attachment",
|
|
161
|
+
localPatterns: void 0,
|
|
162
|
+
remotePatterns: [],
|
|
163
|
+
qualities: void 0,
|
|
164
|
+
unoptimized: false
|
|
165
|
+
};
|
|
166
|
+
}
|
|
167
|
+
});
|
|
168
|
+
|
|
169
|
+
// ../../node_modules/next/dist/shared/lib/get-img-props.js
|
|
170
|
+
var require_get_img_props = __commonJS({
|
|
171
|
+
"../../node_modules/next/dist/shared/lib/get-img-props.js"(exports) {
|
|
172
|
+
"use strict";
|
|
173
|
+
Object.defineProperty(exports, "__esModule", {
|
|
174
|
+
value: true
|
|
175
|
+
});
|
|
176
|
+
Object.defineProperty(exports, "getImgProps", {
|
|
177
|
+
enumerable: true,
|
|
178
|
+
get: /* @__PURE__ */ __name(function() {
|
|
179
|
+
return getImgProps;
|
|
180
|
+
}, "get")
|
|
181
|
+
});
|
|
182
|
+
var _warnonce = require_warn_once();
|
|
183
|
+
var _imageblursvg = require_image_blur_svg();
|
|
184
|
+
var _imageconfig = require_image_config();
|
|
185
|
+
var VALID_LOADING_VALUES = [
|
|
186
|
+
"lazy",
|
|
187
|
+
"eager",
|
|
188
|
+
void 0
|
|
189
|
+
];
|
|
190
|
+
function isStaticRequire(src) {
|
|
191
|
+
return src.default !== void 0;
|
|
192
|
+
}
|
|
193
|
+
__name(isStaticRequire, "isStaticRequire");
|
|
194
|
+
function isStaticImageData(src) {
|
|
195
|
+
return src.src !== void 0;
|
|
196
|
+
}
|
|
197
|
+
__name(isStaticImageData, "isStaticImageData");
|
|
198
|
+
function isStaticImport(src) {
|
|
199
|
+
return !!src && typeof src === "object" && (isStaticRequire(src) || isStaticImageData(src));
|
|
200
|
+
}
|
|
201
|
+
__name(isStaticImport, "isStaticImport");
|
|
202
|
+
var allImgs = /* @__PURE__ */ new Map();
|
|
203
|
+
var perfObserver;
|
|
204
|
+
function getInt(x) {
|
|
205
|
+
if (typeof x === "undefined") {
|
|
206
|
+
return x;
|
|
207
|
+
}
|
|
208
|
+
if (typeof x === "number") {
|
|
209
|
+
return Number.isFinite(x) ? x : NaN;
|
|
210
|
+
}
|
|
211
|
+
if (typeof x === "string" && /^[0-9]+$/.test(x)) {
|
|
212
|
+
return parseInt(x, 10);
|
|
213
|
+
}
|
|
214
|
+
return NaN;
|
|
215
|
+
}
|
|
216
|
+
__name(getInt, "getInt");
|
|
217
|
+
function getWidths(param, width, sizes) {
|
|
218
|
+
let { deviceSizes, allSizes } = param;
|
|
219
|
+
if (sizes) {
|
|
220
|
+
const viewportWidthRe = /(^|\s)(1?\d?\d)vw/g;
|
|
221
|
+
const percentSizes = [];
|
|
222
|
+
for (let match; match = viewportWidthRe.exec(sizes); match) {
|
|
223
|
+
percentSizes.push(parseInt(match[2]));
|
|
224
|
+
}
|
|
225
|
+
if (percentSizes.length) {
|
|
226
|
+
const smallestRatio = Math.min(...percentSizes) * 0.01;
|
|
227
|
+
return {
|
|
228
|
+
widths: allSizes.filter((s) => s >= deviceSizes[0] * smallestRatio),
|
|
229
|
+
kind: "w"
|
|
230
|
+
};
|
|
231
|
+
}
|
|
232
|
+
return {
|
|
233
|
+
widths: allSizes,
|
|
234
|
+
kind: "w"
|
|
235
|
+
};
|
|
236
|
+
}
|
|
237
|
+
if (typeof width !== "number") {
|
|
238
|
+
return {
|
|
239
|
+
widths: deviceSizes,
|
|
240
|
+
kind: "w"
|
|
241
|
+
};
|
|
242
|
+
}
|
|
243
|
+
const widths = [
|
|
244
|
+
...new Set(
|
|
245
|
+
// > This means that most OLED screens that say they are 3x resolution,
|
|
246
|
+
// > are actually 3x in the green color, but only 1.5x in the red and
|
|
247
|
+
// > blue colors. Showing a 3x resolution image in the app vs a 2x
|
|
248
|
+
// > resolution image will be visually the same, though the 3x image
|
|
249
|
+
// > takes significantly more data. Even true 3x resolution screens are
|
|
250
|
+
// > wasteful as the human eye cannot see that level of detail without
|
|
251
|
+
// > something like a magnifying glass.
|
|
252
|
+
// https://blog.twitter.com/engineering/en_us/topics/infrastructure/2019/capping-image-fidelity-on-ultra-high-resolution-devices.html
|
|
253
|
+
[
|
|
254
|
+
width,
|
|
255
|
+
width * 2
|
|
256
|
+
/*, width * 3*/
|
|
257
|
+
].map((w) => allSizes.find((p) => p >= w) || allSizes[allSizes.length - 1])
|
|
258
|
+
)
|
|
259
|
+
];
|
|
260
|
+
return {
|
|
261
|
+
widths,
|
|
262
|
+
kind: "x"
|
|
263
|
+
};
|
|
264
|
+
}
|
|
265
|
+
__name(getWidths, "getWidths");
|
|
266
|
+
function generateImgAttrs(param) {
|
|
267
|
+
let { config, src, unoptimized, width, quality, sizes, loader } = param;
|
|
268
|
+
if (unoptimized) {
|
|
269
|
+
return {
|
|
270
|
+
src,
|
|
271
|
+
srcSet: void 0,
|
|
272
|
+
sizes: void 0
|
|
273
|
+
};
|
|
274
|
+
}
|
|
275
|
+
const { widths, kind } = getWidths(config, width, sizes);
|
|
276
|
+
const last = widths.length - 1;
|
|
277
|
+
return {
|
|
278
|
+
sizes: !sizes && kind === "w" ? "100vw" : sizes,
|
|
279
|
+
srcSet: widths.map((w, i) => loader({
|
|
280
|
+
config,
|
|
281
|
+
src,
|
|
282
|
+
quality,
|
|
283
|
+
width: w
|
|
284
|
+
}) + " " + (kind === "w" ? w : i + 1) + kind).join(", "),
|
|
285
|
+
// It's intended to keep `src` the last attribute because React updates
|
|
286
|
+
// attributes in order. If we keep `src` the first one, Safari will
|
|
287
|
+
// immediately start to fetch `src`, before `sizes` and `srcSet` are even
|
|
288
|
+
// updated by React. That causes multiple unnecessary requests if `srcSet`
|
|
289
|
+
// and `sizes` are defined.
|
|
290
|
+
// This bug cannot be reproduced in Chrome or Firefox.
|
|
291
|
+
src: loader({
|
|
292
|
+
config,
|
|
293
|
+
src,
|
|
294
|
+
quality,
|
|
295
|
+
width: widths[last]
|
|
296
|
+
})
|
|
297
|
+
};
|
|
298
|
+
}
|
|
299
|
+
__name(generateImgAttrs, "generateImgAttrs");
|
|
300
|
+
function getImgProps(param, _state) {
|
|
301
|
+
let { src, sizes, unoptimized = false, priority = false, loading, className, quality, width, height, fill = false, style, overrideSrc, onLoad, onLoadingComplete, placeholder = "empty", blurDataURL, fetchPriority, decoding = "async", layout, objectFit, objectPosition, lazyBoundary, lazyRoot, ...rest } = param;
|
|
302
|
+
const { imgConf, showAltText, blurComplete, defaultLoader } = _state;
|
|
303
|
+
let config;
|
|
304
|
+
let c = imgConf || _imageconfig.imageConfigDefault;
|
|
305
|
+
if ("allSizes" in c) {
|
|
306
|
+
config = c;
|
|
307
|
+
} else {
|
|
308
|
+
var _c_qualities;
|
|
309
|
+
const allSizes = [
|
|
310
|
+
...c.deviceSizes,
|
|
311
|
+
...c.imageSizes
|
|
312
|
+
].sort((a, b) => a - b);
|
|
313
|
+
const deviceSizes = c.deviceSizes.sort((a, b) => a - b);
|
|
314
|
+
const qualities = (_c_qualities = c.qualities) == null ? void 0 : _c_qualities.sort((a, b) => a - b);
|
|
315
|
+
config = {
|
|
316
|
+
...c,
|
|
317
|
+
allSizes,
|
|
318
|
+
deviceSizes,
|
|
319
|
+
qualities
|
|
320
|
+
};
|
|
321
|
+
}
|
|
322
|
+
if (typeof defaultLoader === "undefined") {
|
|
323
|
+
throw Object.defineProperty(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", {
|
|
324
|
+
value: "E163",
|
|
325
|
+
enumerable: false,
|
|
326
|
+
configurable: true
|
|
327
|
+
});
|
|
328
|
+
}
|
|
329
|
+
let loader = rest.loader || defaultLoader;
|
|
330
|
+
delete rest.loader;
|
|
331
|
+
delete rest.srcSet;
|
|
332
|
+
const isDefaultLoader = "__next_img_default" in loader;
|
|
333
|
+
if (isDefaultLoader) {
|
|
334
|
+
if (config.loader === "custom") {
|
|
335
|
+
throw Object.defineProperty(new Error('Image with src "' + src + '" is missing "loader" prop.\nRead more: https://nextjs.org/docs/messages/next-image-missing-loader'), "__NEXT_ERROR_CODE", {
|
|
336
|
+
value: "E252",
|
|
337
|
+
enumerable: false,
|
|
338
|
+
configurable: true
|
|
339
|
+
});
|
|
340
|
+
}
|
|
341
|
+
} else {
|
|
342
|
+
const customImageLoader = loader;
|
|
343
|
+
loader = /* @__PURE__ */ __name((obj) => {
|
|
344
|
+
const { config: _, ...opts } = obj;
|
|
345
|
+
return customImageLoader(opts);
|
|
346
|
+
}, "loader");
|
|
347
|
+
}
|
|
348
|
+
if (layout) {
|
|
349
|
+
if (layout === "fill") {
|
|
350
|
+
fill = true;
|
|
351
|
+
}
|
|
352
|
+
const layoutToStyle = {
|
|
353
|
+
intrinsic: {
|
|
354
|
+
maxWidth: "100%",
|
|
355
|
+
height: "auto"
|
|
356
|
+
},
|
|
357
|
+
responsive: {
|
|
358
|
+
width: "100%",
|
|
359
|
+
height: "auto"
|
|
360
|
+
}
|
|
361
|
+
};
|
|
362
|
+
const layoutToSizes = {
|
|
363
|
+
responsive: "100vw",
|
|
364
|
+
fill: "100vw"
|
|
365
|
+
};
|
|
366
|
+
const layoutStyle = layoutToStyle[layout];
|
|
367
|
+
if (layoutStyle) {
|
|
368
|
+
style = {
|
|
369
|
+
...style,
|
|
370
|
+
...layoutStyle
|
|
371
|
+
};
|
|
372
|
+
}
|
|
373
|
+
const layoutSizes = layoutToSizes[layout];
|
|
374
|
+
if (layoutSizes && !sizes) {
|
|
375
|
+
sizes = layoutSizes;
|
|
376
|
+
}
|
|
377
|
+
}
|
|
378
|
+
let staticSrc = "";
|
|
379
|
+
let widthInt = getInt(width);
|
|
380
|
+
let heightInt = getInt(height);
|
|
381
|
+
let blurWidth;
|
|
382
|
+
let blurHeight;
|
|
383
|
+
if (isStaticImport(src)) {
|
|
384
|
+
const staticImageData = isStaticRequire(src) ? src.default : src;
|
|
385
|
+
if (!staticImageData.src) {
|
|
386
|
+
throw Object.defineProperty(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", {
|
|
387
|
+
value: "E460",
|
|
388
|
+
enumerable: false,
|
|
389
|
+
configurable: true
|
|
390
|
+
});
|
|
391
|
+
}
|
|
392
|
+
if (!staticImageData.height || !staticImageData.width) {
|
|
393
|
+
throw Object.defineProperty(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", {
|
|
394
|
+
value: "E48",
|
|
395
|
+
enumerable: false,
|
|
396
|
+
configurable: true
|
|
397
|
+
});
|
|
398
|
+
}
|
|
399
|
+
blurWidth = staticImageData.blurWidth;
|
|
400
|
+
blurHeight = staticImageData.blurHeight;
|
|
401
|
+
blurDataURL = blurDataURL || staticImageData.blurDataURL;
|
|
402
|
+
staticSrc = staticImageData.src;
|
|
403
|
+
if (!fill) {
|
|
404
|
+
if (!widthInt && !heightInt) {
|
|
405
|
+
widthInt = staticImageData.width;
|
|
406
|
+
heightInt = staticImageData.height;
|
|
407
|
+
} else if (widthInt && !heightInt) {
|
|
408
|
+
const ratio2 = widthInt / staticImageData.width;
|
|
409
|
+
heightInt = Math.round(staticImageData.height * ratio2);
|
|
410
|
+
} else if (!widthInt && heightInt) {
|
|
411
|
+
const ratio2 = heightInt / staticImageData.height;
|
|
412
|
+
widthInt = Math.round(staticImageData.width * ratio2);
|
|
413
|
+
}
|
|
414
|
+
}
|
|
415
|
+
}
|
|
416
|
+
src = typeof src === "string" ? src : staticSrc;
|
|
417
|
+
let isLazy = !priority && (loading === "lazy" || typeof loading === "undefined");
|
|
418
|
+
if (!src || src.startsWith("data:") || src.startsWith("blob:")) {
|
|
419
|
+
unoptimized = true;
|
|
420
|
+
isLazy = false;
|
|
421
|
+
}
|
|
422
|
+
if (config.unoptimized) {
|
|
423
|
+
unoptimized = true;
|
|
424
|
+
}
|
|
425
|
+
if (isDefaultLoader && !config.dangerouslyAllowSVG && src.split("?", 1)[0].endsWith(".svg")) {
|
|
426
|
+
unoptimized = true;
|
|
427
|
+
}
|
|
428
|
+
const qualityInt = getInt(quality);
|
|
429
|
+
if (process.env.NODE_ENV !== "production") {
|
|
430
|
+
if (config.output === "export" && isDefaultLoader && !unoptimized) {
|
|
431
|
+
throw Object.defineProperty(new Error("Image Optimization using the default loader is not compatible with `{ output: 'export' }`.\n Possible solutions:\n - Remove `{ output: 'export' }` and run \"next start\" to run server mode including the Image Optimization API.\n - Configure `{ images: { unoptimized: true } }` in `next.config.js` to disable the Image Optimization API.\n Read more: https://nextjs.org/docs/messages/export-image-api"), "__NEXT_ERROR_CODE", {
|
|
432
|
+
value: "E500",
|
|
433
|
+
enumerable: false,
|
|
434
|
+
configurable: true
|
|
435
|
+
});
|
|
436
|
+
}
|
|
437
|
+
if (!src) {
|
|
438
|
+
unoptimized = true;
|
|
439
|
+
} else {
|
|
440
|
+
if (fill) {
|
|
441
|
+
if (width) {
|
|
442
|
+
throw Object.defineProperty(new Error('Image with src "' + src + '" has both "width" and "fill" properties. Only one should be used.'), "__NEXT_ERROR_CODE", {
|
|
443
|
+
value: "E96",
|
|
444
|
+
enumerable: false,
|
|
445
|
+
configurable: true
|
|
446
|
+
});
|
|
447
|
+
}
|
|
448
|
+
if (height) {
|
|
449
|
+
throw Object.defineProperty(new Error('Image with src "' + src + '" has both "height" and "fill" properties. Only one should be used.'), "__NEXT_ERROR_CODE", {
|
|
450
|
+
value: "E115",
|
|
451
|
+
enumerable: false,
|
|
452
|
+
configurable: true
|
|
453
|
+
});
|
|
454
|
+
}
|
|
455
|
+
if ((style == null ? void 0 : style.position) && style.position !== "absolute") {
|
|
456
|
+
throw Object.defineProperty(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", {
|
|
457
|
+
value: "E216",
|
|
458
|
+
enumerable: false,
|
|
459
|
+
configurable: true
|
|
460
|
+
});
|
|
461
|
+
}
|
|
462
|
+
if ((style == null ? void 0 : style.width) && style.width !== "100%") {
|
|
463
|
+
throw Object.defineProperty(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", {
|
|
464
|
+
value: "E73",
|
|
465
|
+
enumerable: false,
|
|
466
|
+
configurable: true
|
|
467
|
+
});
|
|
468
|
+
}
|
|
469
|
+
if ((style == null ? void 0 : style.height) && style.height !== "100%") {
|
|
470
|
+
throw Object.defineProperty(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", {
|
|
471
|
+
value: "E404",
|
|
472
|
+
enumerable: false,
|
|
473
|
+
configurable: true
|
|
474
|
+
});
|
|
475
|
+
}
|
|
476
|
+
} else {
|
|
477
|
+
if (typeof widthInt === "undefined") {
|
|
478
|
+
throw Object.defineProperty(new Error('Image with src "' + src + '" is missing required "width" property.'), "__NEXT_ERROR_CODE", {
|
|
479
|
+
value: "E451",
|
|
480
|
+
enumerable: false,
|
|
481
|
+
configurable: true
|
|
482
|
+
});
|
|
483
|
+
} else if (isNaN(widthInt)) {
|
|
484
|
+
throw Object.defineProperty(new Error('Image with src "' + src + '" has invalid "width" property. Expected a numeric value in pixels but received "' + width + '".'), "__NEXT_ERROR_CODE", {
|
|
485
|
+
value: "E66",
|
|
486
|
+
enumerable: false,
|
|
487
|
+
configurable: true
|
|
488
|
+
});
|
|
489
|
+
}
|
|
490
|
+
if (typeof heightInt === "undefined") {
|
|
491
|
+
throw Object.defineProperty(new Error('Image with src "' + src + '" is missing required "height" property.'), "__NEXT_ERROR_CODE", {
|
|
492
|
+
value: "E397",
|
|
493
|
+
enumerable: false,
|
|
494
|
+
configurable: true
|
|
495
|
+
});
|
|
496
|
+
} else if (isNaN(heightInt)) {
|
|
497
|
+
throw Object.defineProperty(new Error('Image with src "' + src + '" has invalid "height" property. Expected a numeric value in pixels but received "' + height + '".'), "__NEXT_ERROR_CODE", {
|
|
498
|
+
value: "E444",
|
|
499
|
+
enumerable: false,
|
|
500
|
+
configurable: true
|
|
501
|
+
});
|
|
502
|
+
}
|
|
503
|
+
if (/^[\x00-\x20]/.test(src)) {
|
|
504
|
+
throw Object.defineProperty(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", {
|
|
505
|
+
value: "E176",
|
|
506
|
+
enumerable: false,
|
|
507
|
+
configurable: true
|
|
508
|
+
});
|
|
509
|
+
}
|
|
510
|
+
if (/[\x00-\x20]$/.test(src)) {
|
|
511
|
+
throw Object.defineProperty(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", {
|
|
512
|
+
value: "E21",
|
|
513
|
+
enumerable: false,
|
|
514
|
+
configurable: true
|
|
515
|
+
});
|
|
516
|
+
}
|
|
517
|
+
}
|
|
518
|
+
}
|
|
519
|
+
if (!VALID_LOADING_VALUES.includes(loading)) {
|
|
520
|
+
throw Object.defineProperty(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", {
|
|
521
|
+
value: "E357",
|
|
522
|
+
enumerable: false,
|
|
523
|
+
configurable: true
|
|
524
|
+
});
|
|
525
|
+
}
|
|
526
|
+
if (priority && loading === "lazy") {
|
|
527
|
+
throw Object.defineProperty(new Error('Image with src "' + src + `" has both "priority" and "loading='lazy'" properties. Only one should be used.`), "__NEXT_ERROR_CODE", {
|
|
528
|
+
value: "E218",
|
|
529
|
+
enumerable: false,
|
|
530
|
+
configurable: true
|
|
531
|
+
});
|
|
532
|
+
}
|
|
533
|
+
if (placeholder !== "empty" && placeholder !== "blur" && !placeholder.startsWith("data:image/")) {
|
|
534
|
+
throw Object.defineProperty(new Error('Image with src "' + src + '" has invalid "placeholder" property "' + placeholder + '".'), "__NEXT_ERROR_CODE", {
|
|
535
|
+
value: "E431",
|
|
536
|
+
enumerable: false,
|
|
537
|
+
configurable: true
|
|
538
|
+
});
|
|
539
|
+
}
|
|
540
|
+
if (placeholder !== "empty") {
|
|
541
|
+
if (widthInt && heightInt && widthInt * heightInt < 1600) {
|
|
542
|
+
(0, _warnonce.warnOnce)('Image with src "' + src + '" is smaller than 40x40. Consider removing the "placeholder" property to improve performance.');
|
|
543
|
+
}
|
|
544
|
+
}
|
|
545
|
+
if (placeholder === "blur" && !blurDataURL) {
|
|
546
|
+
const VALID_BLUR_EXT = [
|
|
547
|
+
"jpeg",
|
|
548
|
+
"png",
|
|
549
|
+
"webp",
|
|
550
|
+
"avif"
|
|
551
|
+
];
|
|
552
|
+
throw Object.defineProperty(new Error('Image with src "' + src + `" has "placeholder='blur'" property but is missing the "blurDataURL" property.
|
|
553
|
+
Possible solutions:
|
|
554
|
+
- Add a "blurDataURL" property, the contents should be a small Data URL to represent the image
|
|
555
|
+
- Change the "src" property to a static import with one of the supported file types: ` + VALID_BLUR_EXT.join(",") + ' (animated images not supported)\n - Remove the "placeholder" property, effectively no blur effect\n Read more: https://nextjs.org/docs/messages/placeholder-blur-data-url'), "__NEXT_ERROR_CODE", {
|
|
556
|
+
value: "E371",
|
|
557
|
+
enumerable: false,
|
|
558
|
+
configurable: true
|
|
559
|
+
});
|
|
560
|
+
}
|
|
561
|
+
if ("ref" in rest) {
|
|
562
|
+
(0, _warnonce.warnOnce)('Image with src "' + src + '" is using unsupported "ref" property. Consider using the "onLoad" property instead.');
|
|
563
|
+
}
|
|
564
|
+
if (!unoptimized && !isDefaultLoader) {
|
|
565
|
+
const urlStr = loader({
|
|
566
|
+
config,
|
|
567
|
+
src,
|
|
568
|
+
width: widthInt || 400,
|
|
569
|
+
quality: qualityInt || 75
|
|
570
|
+
});
|
|
571
|
+
let url;
|
|
572
|
+
try {
|
|
573
|
+
url = new URL(urlStr);
|
|
574
|
+
} catch (err) {
|
|
575
|
+
}
|
|
576
|
+
if (urlStr === src || url && url.pathname === src && !url.search) {
|
|
577
|
+
(0, _warnonce.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');
|
|
578
|
+
}
|
|
579
|
+
}
|
|
580
|
+
if (onLoadingComplete) {
|
|
581
|
+
(0, _warnonce.warnOnce)('Image with src "' + src + '" is using deprecated "onLoadingComplete" property. Please use the "onLoad" property instead.');
|
|
582
|
+
}
|
|
583
|
+
for (const [legacyKey, legacyValue] of Object.entries({
|
|
584
|
+
layout,
|
|
585
|
+
objectFit,
|
|
586
|
+
objectPosition,
|
|
587
|
+
lazyBoundary,
|
|
588
|
+
lazyRoot
|
|
589
|
+
})) {
|
|
590
|
+
if (legacyValue) {
|
|
591
|
+
(0, _warnonce.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');
|
|
592
|
+
}
|
|
593
|
+
}
|
|
594
|
+
if (typeof window !== "undefined" && !perfObserver && window.PerformanceObserver) {
|
|
595
|
+
perfObserver = new PerformanceObserver((entryList) => {
|
|
596
|
+
for (const entry of entryList.getEntries()) {
|
|
597
|
+
var _entry_element;
|
|
598
|
+
const imgSrc = (entry == null ? void 0 : (_entry_element = entry.element) == null ? void 0 : _entry_element.src) || "";
|
|
599
|
+
const lcpImage = allImgs.get(imgSrc);
|
|
600
|
+
if (lcpImage && !lcpImage.priority && lcpImage.placeholder === "empty" && !lcpImage.src.startsWith("data:") && !lcpImage.src.startsWith("blob:")) {
|
|
601
|
+
(0, _warnonce.warnOnce)('Image with src "' + lcpImage.src + '" was detected as the Largest Contentful Paint (LCP). Please add the "priority" property if this image is above the fold.\nRead more: https://nextjs.org/docs/api-reference/next/image#priority');
|
|
602
|
+
}
|
|
603
|
+
}
|
|
604
|
+
});
|
|
605
|
+
try {
|
|
606
|
+
perfObserver.observe({
|
|
607
|
+
type: "largest-contentful-paint",
|
|
608
|
+
buffered: true
|
|
609
|
+
});
|
|
610
|
+
} catch (err) {
|
|
611
|
+
console.error(err);
|
|
612
|
+
}
|
|
613
|
+
}
|
|
614
|
+
}
|
|
615
|
+
const imgStyle = Object.assign(fill ? {
|
|
616
|
+
position: "absolute",
|
|
617
|
+
height: "100%",
|
|
618
|
+
width: "100%",
|
|
619
|
+
left: 0,
|
|
620
|
+
top: 0,
|
|
621
|
+
right: 0,
|
|
622
|
+
bottom: 0,
|
|
623
|
+
objectFit,
|
|
624
|
+
objectPosition
|
|
625
|
+
} : {}, showAltText ? {} : {
|
|
626
|
+
color: "transparent"
|
|
627
|
+
}, style);
|
|
628
|
+
const backgroundImage = !blurComplete && placeholder !== "empty" ? placeholder === "blur" ? 'url("data:image/svg+xml;charset=utf-8,' + (0, _imageblursvg.getImageBlurSvg)({
|
|
629
|
+
widthInt,
|
|
630
|
+
heightInt,
|
|
631
|
+
blurWidth,
|
|
632
|
+
blurHeight,
|
|
633
|
+
blurDataURL: blurDataURL || "",
|
|
634
|
+
objectFit: imgStyle.objectFit
|
|
635
|
+
}) + '")' : 'url("' + placeholder + '")' : null;
|
|
636
|
+
let placeholderStyle = backgroundImage ? {
|
|
637
|
+
backgroundSize: imgStyle.objectFit || "cover",
|
|
638
|
+
backgroundPosition: imgStyle.objectPosition || "50% 50%",
|
|
639
|
+
backgroundRepeat: "no-repeat",
|
|
640
|
+
backgroundImage
|
|
641
|
+
} : {};
|
|
642
|
+
if (process.env.NODE_ENV === "development") {
|
|
643
|
+
if (placeholderStyle.backgroundImage && placeholder === "blur" && (blurDataURL == null ? void 0 : blurDataURL.startsWith("/"))) {
|
|
644
|
+
placeholderStyle.backgroundImage = 'url("' + blurDataURL + '")';
|
|
645
|
+
}
|
|
646
|
+
}
|
|
647
|
+
const imgAttributes = generateImgAttrs({
|
|
648
|
+
config,
|
|
649
|
+
src,
|
|
650
|
+
unoptimized,
|
|
651
|
+
width: widthInt,
|
|
652
|
+
quality: qualityInt,
|
|
653
|
+
sizes,
|
|
654
|
+
loader
|
|
655
|
+
});
|
|
656
|
+
if (process.env.NODE_ENV !== "production") {
|
|
657
|
+
if (typeof window !== "undefined") {
|
|
658
|
+
let fullUrl;
|
|
659
|
+
try {
|
|
660
|
+
fullUrl = new URL(imgAttributes.src);
|
|
661
|
+
} catch (e) {
|
|
662
|
+
fullUrl = new URL(imgAttributes.src, window.location.href);
|
|
663
|
+
}
|
|
664
|
+
allImgs.set(fullUrl.href, {
|
|
665
|
+
src,
|
|
666
|
+
priority,
|
|
667
|
+
placeholder
|
|
668
|
+
});
|
|
669
|
+
}
|
|
670
|
+
}
|
|
671
|
+
const props = {
|
|
672
|
+
...rest,
|
|
673
|
+
loading: isLazy ? "lazy" : loading,
|
|
674
|
+
fetchPriority,
|
|
675
|
+
width: widthInt,
|
|
676
|
+
height: heightInt,
|
|
677
|
+
decoding,
|
|
678
|
+
className,
|
|
679
|
+
style: {
|
|
680
|
+
...imgStyle,
|
|
681
|
+
...placeholderStyle
|
|
682
|
+
},
|
|
683
|
+
sizes: imgAttributes.sizes,
|
|
684
|
+
srcSet: imgAttributes.srcSet,
|
|
685
|
+
src: overrideSrc || imgAttributes.src
|
|
686
|
+
};
|
|
687
|
+
const meta = {
|
|
688
|
+
unoptimized,
|
|
689
|
+
priority,
|
|
690
|
+
placeholder,
|
|
691
|
+
fill
|
|
692
|
+
};
|
|
693
|
+
return {
|
|
694
|
+
props,
|
|
695
|
+
meta
|
|
696
|
+
};
|
|
697
|
+
}
|
|
698
|
+
__name(getImgProps, "getImgProps");
|
|
699
|
+
}
|
|
700
|
+
});
|
|
701
|
+
|
|
702
|
+
// ../../node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs
|
|
703
|
+
var require_interop_require_wildcard = __commonJS({
|
|
704
|
+
"../../node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs"(exports) {
|
|
705
|
+
"use strict";
|
|
706
|
+
function _getRequireWildcardCache(nodeInterop) {
|
|
707
|
+
if (typeof WeakMap !== "function") return null;
|
|
708
|
+
var cacheBabelInterop = /* @__PURE__ */ new WeakMap();
|
|
709
|
+
var cacheNodeInterop = /* @__PURE__ */ new WeakMap();
|
|
710
|
+
return (_getRequireWildcardCache = /* @__PURE__ */ __name(function(nodeInterop2) {
|
|
711
|
+
return nodeInterop2 ? cacheNodeInterop : cacheBabelInterop;
|
|
712
|
+
}, "_getRequireWildcardCache"))(nodeInterop);
|
|
713
|
+
}
|
|
714
|
+
__name(_getRequireWildcardCache, "_getRequireWildcardCache");
|
|
715
|
+
function _interop_require_wildcard(obj, nodeInterop) {
|
|
716
|
+
if (!nodeInterop && obj && obj.__esModule) return obj;
|
|
717
|
+
if (obj === null || typeof obj !== "object" && typeof obj !== "function") return { default: obj };
|
|
718
|
+
var cache = _getRequireWildcardCache(nodeInterop);
|
|
719
|
+
if (cache && cache.has(obj)) return cache.get(obj);
|
|
720
|
+
var newObj = { __proto__: null };
|
|
721
|
+
var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
|
|
722
|
+
for (var key in obj) {
|
|
723
|
+
if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
724
|
+
var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
|
|
725
|
+
if (desc && (desc.get || desc.set)) Object.defineProperty(newObj, key, desc);
|
|
726
|
+
else newObj[key] = obj[key];
|
|
727
|
+
}
|
|
728
|
+
}
|
|
729
|
+
newObj.default = obj;
|
|
730
|
+
if (cache) cache.set(obj, newObj);
|
|
731
|
+
return newObj;
|
|
732
|
+
}
|
|
733
|
+
__name(_interop_require_wildcard, "_interop_require_wildcard");
|
|
734
|
+
exports._ = _interop_require_wildcard;
|
|
735
|
+
}
|
|
736
|
+
});
|
|
737
|
+
|
|
738
|
+
// ../../node_modules/next/dist/shared/lib/side-effect.js
|
|
739
|
+
var require_side_effect = __commonJS({
|
|
740
|
+
"../../node_modules/next/dist/shared/lib/side-effect.js"(exports) {
|
|
741
|
+
"use strict";
|
|
742
|
+
Object.defineProperty(exports, "__esModule", {
|
|
743
|
+
value: true
|
|
744
|
+
});
|
|
745
|
+
Object.defineProperty(exports, "default", {
|
|
746
|
+
enumerable: true,
|
|
747
|
+
get: /* @__PURE__ */ __name(function() {
|
|
748
|
+
return SideEffect;
|
|
749
|
+
}, "get")
|
|
750
|
+
});
|
|
751
|
+
var _react = require("react");
|
|
752
|
+
var isServer = typeof window === "undefined";
|
|
753
|
+
var useClientOnlyLayoutEffect = isServer ? () => {
|
|
754
|
+
} : _react.useLayoutEffect;
|
|
755
|
+
var useClientOnlyEffect = isServer ? () => {
|
|
756
|
+
} : _react.useEffect;
|
|
757
|
+
function SideEffect(props) {
|
|
758
|
+
const { headManager, reduceComponentsToState } = props;
|
|
759
|
+
function emitChange() {
|
|
760
|
+
if (headManager && headManager.mountedInstances) {
|
|
761
|
+
const headElements = _react.Children.toArray(Array.from(headManager.mountedInstances).filter(Boolean));
|
|
762
|
+
headManager.updateHead(reduceComponentsToState(headElements, props));
|
|
763
|
+
}
|
|
764
|
+
}
|
|
765
|
+
__name(emitChange, "emitChange");
|
|
766
|
+
if (isServer) {
|
|
767
|
+
var _headManager_mountedInstances;
|
|
768
|
+
headManager == null ? void 0 : (_headManager_mountedInstances = headManager.mountedInstances) == null ? void 0 : _headManager_mountedInstances.add(props.children);
|
|
769
|
+
emitChange();
|
|
770
|
+
}
|
|
771
|
+
useClientOnlyLayoutEffect(() => {
|
|
772
|
+
var _headManager_mountedInstances2;
|
|
773
|
+
headManager == null ? void 0 : (_headManager_mountedInstances2 = headManager.mountedInstances) == null ? void 0 : _headManager_mountedInstances2.add(props.children);
|
|
774
|
+
return () => {
|
|
775
|
+
var _headManager_mountedInstances3;
|
|
776
|
+
headManager == null ? void 0 : (_headManager_mountedInstances3 = headManager.mountedInstances) == null ? void 0 : _headManager_mountedInstances3.delete(props.children);
|
|
777
|
+
};
|
|
778
|
+
});
|
|
779
|
+
useClientOnlyLayoutEffect(() => {
|
|
780
|
+
if (headManager) {
|
|
781
|
+
headManager._pendingUpdate = emitChange;
|
|
782
|
+
}
|
|
783
|
+
return () => {
|
|
784
|
+
if (headManager) {
|
|
785
|
+
headManager._pendingUpdate = emitChange;
|
|
786
|
+
}
|
|
787
|
+
};
|
|
788
|
+
});
|
|
789
|
+
useClientOnlyEffect(() => {
|
|
790
|
+
if (headManager && headManager._pendingUpdate) {
|
|
791
|
+
headManager._pendingUpdate();
|
|
792
|
+
headManager._pendingUpdate = null;
|
|
793
|
+
}
|
|
794
|
+
return () => {
|
|
795
|
+
if (headManager && headManager._pendingUpdate) {
|
|
796
|
+
headManager._pendingUpdate();
|
|
797
|
+
headManager._pendingUpdate = null;
|
|
798
|
+
}
|
|
799
|
+
};
|
|
800
|
+
});
|
|
801
|
+
return null;
|
|
802
|
+
}
|
|
803
|
+
__name(SideEffect, "SideEffect");
|
|
804
|
+
}
|
|
805
|
+
});
|
|
806
|
+
|
|
807
|
+
// ../../node_modules/next/dist/shared/lib/amp-context.shared-runtime.js
|
|
808
|
+
var require_amp_context_shared_runtime = __commonJS({
|
|
809
|
+
"../../node_modules/next/dist/shared/lib/amp-context.shared-runtime.js"(exports) {
|
|
810
|
+
"use strict";
|
|
811
|
+
Object.defineProperty(exports, "__esModule", {
|
|
812
|
+
value: true
|
|
813
|
+
});
|
|
814
|
+
Object.defineProperty(exports, "AmpStateContext", {
|
|
815
|
+
enumerable: true,
|
|
816
|
+
get: /* @__PURE__ */ __name(function() {
|
|
817
|
+
return AmpStateContext;
|
|
818
|
+
}, "get")
|
|
819
|
+
});
|
|
820
|
+
var _interop_require_default = require_interop_require_default();
|
|
821
|
+
var _react = /* @__PURE__ */ _interop_require_default._(require("react"));
|
|
822
|
+
var AmpStateContext = _react.default.createContext({});
|
|
823
|
+
if (process.env.NODE_ENV !== "production") {
|
|
824
|
+
AmpStateContext.displayName = "AmpStateContext";
|
|
825
|
+
}
|
|
826
|
+
}
|
|
827
|
+
});
|
|
828
|
+
|
|
829
|
+
// ../../node_modules/next/dist/shared/lib/head-manager-context.shared-runtime.js
|
|
830
|
+
var require_head_manager_context_shared_runtime = __commonJS({
|
|
831
|
+
"../../node_modules/next/dist/shared/lib/head-manager-context.shared-runtime.js"(exports) {
|
|
832
|
+
"use strict";
|
|
833
|
+
Object.defineProperty(exports, "__esModule", {
|
|
834
|
+
value: true
|
|
835
|
+
});
|
|
836
|
+
Object.defineProperty(exports, "HeadManagerContext", {
|
|
837
|
+
enumerable: true,
|
|
838
|
+
get: /* @__PURE__ */ __name(function() {
|
|
839
|
+
return HeadManagerContext;
|
|
840
|
+
}, "get")
|
|
841
|
+
});
|
|
842
|
+
var _interop_require_default = require_interop_require_default();
|
|
843
|
+
var _react = /* @__PURE__ */ _interop_require_default._(require("react"));
|
|
844
|
+
var HeadManagerContext = _react.default.createContext({});
|
|
845
|
+
if (process.env.NODE_ENV !== "production") {
|
|
846
|
+
HeadManagerContext.displayName = "HeadManagerContext";
|
|
847
|
+
}
|
|
848
|
+
}
|
|
849
|
+
});
|
|
850
|
+
|
|
851
|
+
// ../../node_modules/next/dist/shared/lib/amp-mode.js
|
|
852
|
+
var require_amp_mode = __commonJS({
|
|
853
|
+
"../../node_modules/next/dist/shared/lib/amp-mode.js"(exports) {
|
|
854
|
+
"use strict";
|
|
855
|
+
Object.defineProperty(exports, "__esModule", {
|
|
856
|
+
value: true
|
|
857
|
+
});
|
|
858
|
+
Object.defineProperty(exports, "isInAmpMode", {
|
|
859
|
+
enumerable: true,
|
|
860
|
+
get: /* @__PURE__ */ __name(function() {
|
|
861
|
+
return isInAmpMode;
|
|
862
|
+
}, "get")
|
|
863
|
+
});
|
|
864
|
+
function isInAmpMode(param) {
|
|
865
|
+
let { ampFirst = false, hybrid = false, hasQuery = false } = param === void 0 ? {} : param;
|
|
866
|
+
return ampFirst || hybrid && hasQuery;
|
|
867
|
+
}
|
|
868
|
+
__name(isInAmpMode, "isInAmpMode");
|
|
869
|
+
}
|
|
870
|
+
});
|
|
871
|
+
|
|
872
|
+
// ../../node_modules/next/dist/shared/lib/head.js
|
|
873
|
+
var require_head = __commonJS({
|
|
874
|
+
"../../node_modules/next/dist/shared/lib/head.js"(exports, module2) {
|
|
875
|
+
"use strict";
|
|
876
|
+
"use client";
|
|
877
|
+
Object.defineProperty(exports, "__esModule", {
|
|
878
|
+
value: true
|
|
879
|
+
});
|
|
880
|
+
function _export(target, all) {
|
|
881
|
+
for (var name in all) Object.defineProperty(target, name, {
|
|
882
|
+
enumerable: true,
|
|
883
|
+
get: all[name]
|
|
884
|
+
});
|
|
885
|
+
}
|
|
886
|
+
__name(_export, "_export");
|
|
887
|
+
_export(exports, {
|
|
888
|
+
default: /* @__PURE__ */ __name(function() {
|
|
889
|
+
return _default;
|
|
890
|
+
}, "default"),
|
|
891
|
+
defaultHead: /* @__PURE__ */ __name(function() {
|
|
892
|
+
return defaultHead;
|
|
893
|
+
}, "defaultHead")
|
|
894
|
+
});
|
|
895
|
+
var _interop_require_default = require_interop_require_default();
|
|
896
|
+
var _interop_require_wildcard = require_interop_require_wildcard();
|
|
897
|
+
var _jsxruntime = require("react/jsx-runtime");
|
|
898
|
+
var _react = /* @__PURE__ */ _interop_require_wildcard._(require("react"));
|
|
899
|
+
var _sideeffect = /* @__PURE__ */ _interop_require_default._(require_side_effect());
|
|
900
|
+
var _ampcontextsharedruntime = require_amp_context_shared_runtime();
|
|
901
|
+
var _headmanagercontextsharedruntime = require_head_manager_context_shared_runtime();
|
|
902
|
+
var _ampmode = require_amp_mode();
|
|
903
|
+
var _warnonce = require_warn_once();
|
|
904
|
+
function defaultHead(inAmpMode) {
|
|
905
|
+
if (inAmpMode === void 0) inAmpMode = false;
|
|
906
|
+
const head = [
|
|
907
|
+
/* @__PURE__ */ (0, _jsxruntime.jsx)("meta", {
|
|
908
|
+
charSet: "utf-8"
|
|
909
|
+
}, "charset")
|
|
910
|
+
];
|
|
911
|
+
if (!inAmpMode) {
|
|
912
|
+
head.push(/* @__PURE__ */ (0, _jsxruntime.jsx)("meta", {
|
|
913
|
+
name: "viewport",
|
|
914
|
+
content: "width=device-width"
|
|
915
|
+
}, "viewport"));
|
|
916
|
+
}
|
|
917
|
+
return head;
|
|
918
|
+
}
|
|
919
|
+
__name(defaultHead, "defaultHead");
|
|
920
|
+
function onlyReactElement(list, child) {
|
|
921
|
+
if (typeof child === "string" || typeof child === "number") {
|
|
922
|
+
return list;
|
|
923
|
+
}
|
|
924
|
+
if (child.type === _react.default.Fragment) {
|
|
925
|
+
return list.concat(
|
|
926
|
+
// @ts-expect-error @types/react does not remove fragments but this could also return ReactPortal[]
|
|
927
|
+
_react.default.Children.toArray(child.props.children).reduce(
|
|
928
|
+
// @ts-expect-error @types/react does not remove fragments but this could also return ReactPortal[]
|
|
929
|
+
(fragmentList, fragmentChild) => {
|
|
930
|
+
if (typeof fragmentChild === "string" || typeof fragmentChild === "number") {
|
|
931
|
+
return fragmentList;
|
|
932
|
+
}
|
|
933
|
+
return fragmentList.concat(fragmentChild);
|
|
934
|
+
},
|
|
935
|
+
[]
|
|
936
|
+
)
|
|
937
|
+
);
|
|
938
|
+
}
|
|
939
|
+
return list.concat(child);
|
|
940
|
+
}
|
|
941
|
+
__name(onlyReactElement, "onlyReactElement");
|
|
942
|
+
var METATYPES = [
|
|
943
|
+
"name",
|
|
944
|
+
"httpEquiv",
|
|
945
|
+
"charSet",
|
|
946
|
+
"itemProp"
|
|
947
|
+
];
|
|
948
|
+
function unique() {
|
|
949
|
+
const keys = /* @__PURE__ */ new Set();
|
|
950
|
+
const tags = /* @__PURE__ */ new Set();
|
|
951
|
+
const metaTypes = /* @__PURE__ */ new Set();
|
|
952
|
+
const metaCategories = {};
|
|
953
|
+
return (h) => {
|
|
954
|
+
let isUnique = true;
|
|
955
|
+
let hasKey = false;
|
|
956
|
+
if (h.key && typeof h.key !== "number" && h.key.indexOf("$") > 0) {
|
|
957
|
+
hasKey = true;
|
|
958
|
+
const key = h.key.slice(h.key.indexOf("$") + 1);
|
|
959
|
+
if (keys.has(key)) {
|
|
960
|
+
isUnique = false;
|
|
961
|
+
} else {
|
|
962
|
+
keys.add(key);
|
|
963
|
+
}
|
|
964
|
+
}
|
|
965
|
+
switch (h.type) {
|
|
966
|
+
case "title":
|
|
967
|
+
case "base":
|
|
968
|
+
if (tags.has(h.type)) {
|
|
969
|
+
isUnique = false;
|
|
970
|
+
} else {
|
|
971
|
+
tags.add(h.type);
|
|
972
|
+
}
|
|
973
|
+
break;
|
|
974
|
+
case "meta":
|
|
975
|
+
for (let i = 0, len = METATYPES.length; i < len; i++) {
|
|
976
|
+
const metatype = METATYPES[i];
|
|
977
|
+
if (!h.props.hasOwnProperty(metatype)) continue;
|
|
978
|
+
if (metatype === "charSet") {
|
|
979
|
+
if (metaTypes.has(metatype)) {
|
|
980
|
+
isUnique = false;
|
|
981
|
+
} else {
|
|
982
|
+
metaTypes.add(metatype);
|
|
983
|
+
}
|
|
984
|
+
} else {
|
|
985
|
+
const category = h.props[metatype];
|
|
986
|
+
const categories = metaCategories[metatype] || /* @__PURE__ */ new Set();
|
|
987
|
+
if ((metatype !== "name" || !hasKey) && categories.has(category)) {
|
|
988
|
+
isUnique = false;
|
|
989
|
+
} else {
|
|
990
|
+
categories.add(category);
|
|
991
|
+
metaCategories[metatype] = categories;
|
|
992
|
+
}
|
|
993
|
+
}
|
|
994
|
+
}
|
|
995
|
+
break;
|
|
996
|
+
}
|
|
997
|
+
return isUnique;
|
|
998
|
+
};
|
|
999
|
+
}
|
|
1000
|
+
__name(unique, "unique");
|
|
1001
|
+
function reduceComponents(headChildrenElements, props) {
|
|
1002
|
+
const { inAmpMode } = props;
|
|
1003
|
+
return headChildrenElements.reduce(onlyReactElement, []).reverse().concat(defaultHead(inAmpMode).reverse()).filter(unique()).reverse().map((c, i) => {
|
|
1004
|
+
const key = c.key || i;
|
|
1005
|
+
if (process.env.NODE_ENV !== "development" && process.env.__NEXT_OPTIMIZE_FONTS && !inAmpMode) {
|
|
1006
|
+
if (c.type === "link" && c.props["href"] && // TODO(prateekbh@): Replace this with const from `constants` when the tree shaking works.
|
|
1007
|
+
[
|
|
1008
|
+
"https://fonts.googleapis.com/css",
|
|
1009
|
+
"https://use.typekit.net/"
|
|
1010
|
+
].some((url) => c.props["href"].startsWith(url))) {
|
|
1011
|
+
const newProps = {
|
|
1012
|
+
...c.props || {}
|
|
1013
|
+
};
|
|
1014
|
+
newProps["data-href"] = newProps["href"];
|
|
1015
|
+
newProps["href"] = void 0;
|
|
1016
|
+
newProps["data-optimized-fonts"] = true;
|
|
1017
|
+
return /* @__PURE__ */ _react.default.cloneElement(c, newProps);
|
|
1018
|
+
}
|
|
1019
|
+
}
|
|
1020
|
+
if (process.env.NODE_ENV === "development") {
|
|
1021
|
+
if (c.type === "script" && c.props["type"] !== "application/ld+json") {
|
|
1022
|
+
const srcMessage = c.props["src"] ? '<script> tag with src="' + c.props["src"] + '"' : "inline <script>";
|
|
1023
|
+
(0, _warnonce.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");
|
|
1024
|
+
} else if (c.type === "link" && c.props["rel"] === "stylesheet") {
|
|
1025
|
+
(0, _warnonce.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');
|
|
1026
|
+
}
|
|
1027
|
+
}
|
|
1028
|
+
return /* @__PURE__ */ _react.default.cloneElement(c, {
|
|
1029
|
+
key
|
|
1030
|
+
});
|
|
1031
|
+
});
|
|
1032
|
+
}
|
|
1033
|
+
__name(reduceComponents, "reduceComponents");
|
|
1034
|
+
function Head(param) {
|
|
1035
|
+
let { children } = param;
|
|
1036
|
+
const ampState = (0, _react.useContext)(_ampcontextsharedruntime.AmpStateContext);
|
|
1037
|
+
const headManager = (0, _react.useContext)(_headmanagercontextsharedruntime.HeadManagerContext);
|
|
1038
|
+
return /* @__PURE__ */ (0, _jsxruntime.jsx)(_sideeffect.default, {
|
|
1039
|
+
reduceComponentsToState: reduceComponents,
|
|
1040
|
+
headManager,
|
|
1041
|
+
inAmpMode: (0, _ampmode.isInAmpMode)(ampState),
|
|
1042
|
+
children
|
|
1043
|
+
});
|
|
1044
|
+
}
|
|
1045
|
+
__name(Head, "Head");
|
|
1046
|
+
var _default = Head;
|
|
1047
|
+
if ((typeof exports.default === "function" || typeof exports.default === "object" && exports.default !== null) && typeof exports.default.__esModule === "undefined") {
|
|
1048
|
+
Object.defineProperty(exports.default, "__esModule", { value: true });
|
|
1049
|
+
Object.assign(exports.default, exports);
|
|
1050
|
+
module2.exports = exports.default;
|
|
1051
|
+
}
|
|
1052
|
+
}
|
|
1053
|
+
});
|
|
1054
|
+
|
|
1055
|
+
// ../../node_modules/next/dist/shared/lib/image-config-context.shared-runtime.js
|
|
1056
|
+
var require_image_config_context_shared_runtime = __commonJS({
|
|
1057
|
+
"../../node_modules/next/dist/shared/lib/image-config-context.shared-runtime.js"(exports) {
|
|
1058
|
+
"use strict";
|
|
1059
|
+
Object.defineProperty(exports, "__esModule", {
|
|
1060
|
+
value: true
|
|
1061
|
+
});
|
|
1062
|
+
Object.defineProperty(exports, "ImageConfigContext", {
|
|
1063
|
+
enumerable: true,
|
|
1064
|
+
get: /* @__PURE__ */ __name(function() {
|
|
1065
|
+
return ImageConfigContext;
|
|
1066
|
+
}, "get")
|
|
1067
|
+
});
|
|
1068
|
+
var _interop_require_default = require_interop_require_default();
|
|
1069
|
+
var _react = /* @__PURE__ */ _interop_require_default._(require("react"));
|
|
1070
|
+
var _imageconfig = require_image_config();
|
|
1071
|
+
var ImageConfigContext = _react.default.createContext(_imageconfig.imageConfigDefault);
|
|
1072
|
+
if (process.env.NODE_ENV !== "production") {
|
|
1073
|
+
ImageConfigContext.displayName = "ImageConfigContext";
|
|
1074
|
+
}
|
|
1075
|
+
}
|
|
1076
|
+
});
|
|
1077
|
+
|
|
1078
|
+
// ../../node_modules/next/dist/shared/lib/router-context.shared-runtime.js
|
|
1079
|
+
var require_router_context_shared_runtime = __commonJS({
|
|
1080
|
+
"../../node_modules/next/dist/shared/lib/router-context.shared-runtime.js"(exports) {
|
|
1081
|
+
"use strict";
|
|
1082
|
+
Object.defineProperty(exports, "__esModule", {
|
|
1083
|
+
value: true
|
|
1084
|
+
});
|
|
1085
|
+
Object.defineProperty(exports, "RouterContext", {
|
|
1086
|
+
enumerable: true,
|
|
1087
|
+
get: /* @__PURE__ */ __name(function() {
|
|
1088
|
+
return RouterContext;
|
|
1089
|
+
}, "get")
|
|
1090
|
+
});
|
|
1091
|
+
var _interop_require_default = require_interop_require_default();
|
|
1092
|
+
var _react = /* @__PURE__ */ _interop_require_default._(require("react"));
|
|
1093
|
+
var RouterContext = _react.default.createContext(null);
|
|
1094
|
+
if (process.env.NODE_ENV !== "production") {
|
|
1095
|
+
RouterContext.displayName = "RouterContext";
|
|
1096
|
+
}
|
|
1097
|
+
}
|
|
1098
|
+
});
|
|
1099
|
+
|
|
1100
|
+
// ../../node_modules/next/dist/compiled/picomatch/index.js
|
|
1101
|
+
var require_picomatch = __commonJS({
|
|
1102
|
+
"../../node_modules/next/dist/compiled/picomatch/index.js"(exports, module2) {
|
|
1103
|
+
"use strict";
|
|
1104
|
+
(() => {
|
|
1105
|
+
"use strict";
|
|
1106
|
+
var t = { 170: (t2, e2, u2) => {
|
|
1107
|
+
const n = u2(510);
|
|
1108
|
+
const isWindows = /* @__PURE__ */ __name(() => {
|
|
1109
|
+
if (typeof navigator !== "undefined" && navigator.platform) {
|
|
1110
|
+
const t3 = navigator.platform.toLowerCase();
|
|
1111
|
+
return t3 === "win32" || t3 === "windows";
|
|
1112
|
+
}
|
|
1113
|
+
if (typeof process !== "undefined" && process.platform) {
|
|
1114
|
+
return process.platform === "win32";
|
|
1115
|
+
}
|
|
1116
|
+
return false;
|
|
1117
|
+
}, "isWindows");
|
|
1118
|
+
function picomatch(t3, e3, u3 = false) {
|
|
1119
|
+
if (e3 && (e3.windows === null || e3.windows === void 0)) {
|
|
1120
|
+
e3 = { ...e3, windows: isWindows() };
|
|
1121
|
+
}
|
|
1122
|
+
return n(t3, e3, u3);
|
|
1123
|
+
}
|
|
1124
|
+
__name(picomatch, "picomatch");
|
|
1125
|
+
Object.assign(picomatch, n);
|
|
1126
|
+
t2.exports = picomatch;
|
|
1127
|
+
}, 154: (t2) => {
|
|
1128
|
+
const e2 = "\\\\/";
|
|
1129
|
+
const u2 = `[^${e2}]`;
|
|
1130
|
+
const n = "\\.";
|
|
1131
|
+
const o = "\\+";
|
|
1132
|
+
const s = "\\?";
|
|
1133
|
+
const r = "\\/";
|
|
1134
|
+
const a = "(?=.)";
|
|
1135
|
+
const i = "[^/]";
|
|
1136
|
+
const c = `(?:${r}|$)`;
|
|
1137
|
+
const p = `(?:^|${r})`;
|
|
1138
|
+
const l = `${n}{1,2}${c}`;
|
|
1139
|
+
const f = `(?!${n})`;
|
|
1140
|
+
const A = `(?!${p}${l})`;
|
|
1141
|
+
const _ = `(?!${n}{0,1}${c})`;
|
|
1142
|
+
const R = `(?!${l})`;
|
|
1143
|
+
const E = `[^.${r}]`;
|
|
1144
|
+
const h = `${i}*?`;
|
|
1145
|
+
const g = "/";
|
|
1146
|
+
const b = { DOT_LITERAL: n, PLUS_LITERAL: o, QMARK_LITERAL: s, SLASH_LITERAL: r, ONE_CHAR: a, QMARK: i, END_ANCHOR: c, DOTS_SLASH: l, NO_DOT: f, NO_DOTS: A, NO_DOT_SLASH: _, NO_DOTS_SLASH: R, QMARK_NO_DOT: E, STAR: h, START_ANCHOR: p, SEP: g };
|
|
1147
|
+
const C = { ...b, SLASH_LITERAL: `[${e2}]`, QMARK: u2, STAR: `${u2}*?`, DOTS_SLASH: `${n}{1,2}(?:[${e2}]|$)`, NO_DOT: `(?!${n})`, NO_DOTS: `(?!(?:^|[${e2}])${n}{1,2}(?:[${e2}]|$))`, NO_DOT_SLASH: `(?!${n}{0,1}(?:[${e2}]|$))`, NO_DOTS_SLASH: `(?!${n}{1,2}(?:[${e2}]|$))`, QMARK_NO_DOT: `[^.${e2}]`, START_ANCHOR: `(?:^|[${e2}])`, END_ANCHOR: `(?:[${e2}]|$)`, SEP: "\\" };
|
|
1148
|
+
const y = { alnum: "a-zA-Z0-9", alpha: "a-zA-Z", ascii: "\\x00-\\x7F", blank: " \\t", cntrl: "\\x00-\\x1F\\x7F", digit: "0-9", graph: "\\x21-\\x7E", lower: "a-z", print: "\\x20-\\x7E ", punct: "\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~", space: " \\t\\r\\n\\v\\f", upper: "A-Z", word: "A-Za-z0-9_", xdigit: "A-Fa-f0-9" };
|
|
1149
|
+
t2.exports = { MAX_LENGTH: 1024 * 64, POSIX_REGEX_SOURCE: y, REGEX_BACKSLASH: /\\(?![*+?^${}(|)[\]])/g, REGEX_NON_SPECIAL_CHARS: /^[^@![\].,$*+?^{}()|\\/]+/, REGEX_SPECIAL_CHARS: /[-*+?.^${}(|)[\]]/, REGEX_SPECIAL_CHARS_BACKREF: /(\\?)((\W)(\3*))/g, REGEX_SPECIAL_CHARS_GLOBAL: /([-*+?.^${}(|)[\]])/g, REGEX_REMOVE_BACKSLASH: /(?:\[.*?[^\\]\]|\\(?=.))/g, REPLACEMENTS: { "***": "*", "**/**": "**", "**/**/**": "**" }, CHAR_0: 48, CHAR_9: 57, CHAR_UPPERCASE_A: 65, CHAR_LOWERCASE_A: 97, CHAR_UPPERCASE_Z: 90, CHAR_LOWERCASE_Z: 122, CHAR_LEFT_PARENTHESES: 40, CHAR_RIGHT_PARENTHESES: 41, CHAR_ASTERISK: 42, CHAR_AMPERSAND: 38, CHAR_AT: 64, CHAR_BACKWARD_SLASH: 92, CHAR_CARRIAGE_RETURN: 13, CHAR_CIRCUMFLEX_ACCENT: 94, CHAR_COLON: 58, CHAR_COMMA: 44, CHAR_DOT: 46, CHAR_DOUBLE_QUOTE: 34, CHAR_EQUAL: 61, CHAR_EXCLAMATION_MARK: 33, CHAR_FORM_FEED: 12, CHAR_FORWARD_SLASH: 47, CHAR_GRAVE_ACCENT: 96, CHAR_HASH: 35, CHAR_HYPHEN_MINUS: 45, CHAR_LEFT_ANGLE_BRACKET: 60, CHAR_LEFT_CURLY_BRACE: 123, CHAR_LEFT_SQUARE_BRACKET: 91, CHAR_LINE_FEED: 10, CHAR_NO_BREAK_SPACE: 160, CHAR_PERCENT: 37, CHAR_PLUS: 43, CHAR_QUESTION_MARK: 63, CHAR_RIGHT_ANGLE_BRACKET: 62, CHAR_RIGHT_CURLY_BRACE: 125, CHAR_RIGHT_SQUARE_BRACKET: 93, CHAR_SEMICOLON: 59, CHAR_SINGLE_QUOTE: 39, CHAR_SPACE: 32, CHAR_TAB: 9, CHAR_UNDERSCORE: 95, CHAR_VERTICAL_LINE: 124, CHAR_ZERO_WIDTH_NOBREAK_SPACE: 65279, extglobChars(t3) {
|
|
1150
|
+
return { "!": { type: "negate", open: "(?:(?!(?:", close: `))${t3.STAR})` }, "?": { type: "qmark", open: "(?:", close: ")?" }, "+": { type: "plus", open: "(?:", close: ")+" }, "*": { type: "star", open: "(?:", close: ")*" }, "@": { type: "at", open: "(?:", close: ")" } };
|
|
1151
|
+
}, globChars(t3) {
|
|
1152
|
+
return t3 === true ? C : b;
|
|
1153
|
+
} };
|
|
1154
|
+
}, 697: (t2, e2, u2) => {
|
|
1155
|
+
const n = u2(154);
|
|
1156
|
+
const o = u2(96);
|
|
1157
|
+
const { MAX_LENGTH: s, POSIX_REGEX_SOURCE: r, REGEX_NON_SPECIAL_CHARS: a, REGEX_SPECIAL_CHARS_BACKREF: i, REPLACEMENTS: c } = n;
|
|
1158
|
+
const expandRange = /* @__PURE__ */ __name((t3, e3) => {
|
|
1159
|
+
if (typeof e3.expandRange === "function") {
|
|
1160
|
+
return e3.expandRange(...t3, e3);
|
|
1161
|
+
}
|
|
1162
|
+
t3.sort();
|
|
1163
|
+
const u3 = `[${t3.join("-")}]`;
|
|
1164
|
+
try {
|
|
1165
|
+
new RegExp(u3);
|
|
1166
|
+
} catch (e4) {
|
|
1167
|
+
return t3.map((t4) => o.escapeRegex(t4)).join("..");
|
|
1168
|
+
}
|
|
1169
|
+
return u3;
|
|
1170
|
+
}, "expandRange");
|
|
1171
|
+
const syntaxError = /* @__PURE__ */ __name((t3, e3) => `Missing ${t3}: "${e3}" - use "\\\\${e3}" to match literal characters`, "syntaxError");
|
|
1172
|
+
const parse = /* @__PURE__ */ __name((t3, e3) => {
|
|
1173
|
+
if (typeof t3 !== "string") {
|
|
1174
|
+
throw new TypeError("Expected a string");
|
|
1175
|
+
}
|
|
1176
|
+
t3 = c[t3] || t3;
|
|
1177
|
+
const u3 = { ...e3 };
|
|
1178
|
+
const p = typeof u3.maxLength === "number" ? Math.min(s, u3.maxLength) : s;
|
|
1179
|
+
let l = t3.length;
|
|
1180
|
+
if (l > p) {
|
|
1181
|
+
throw new SyntaxError(`Input length: ${l}, exceeds maximum allowed length: ${p}`);
|
|
1182
|
+
}
|
|
1183
|
+
const f = { type: "bos", value: "", output: u3.prepend || "" };
|
|
1184
|
+
const A = [f];
|
|
1185
|
+
const _ = u3.capture ? "" : "?:";
|
|
1186
|
+
const R = n.globChars(u3.windows);
|
|
1187
|
+
const E = n.extglobChars(R);
|
|
1188
|
+
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;
|
|
1189
|
+
const globstar = /* @__PURE__ */ __name((t4) => `(${_}(?:(?!${L}${t4.dot ? y : h}).)*?)`, "globstar");
|
|
1190
|
+
const T = u3.dot ? "" : $;
|
|
1191
|
+
const O = u3.dot ? H : v;
|
|
1192
|
+
let k = u3.bash === true ? globstar(u3) : d;
|
|
1193
|
+
if (u3.capture) {
|
|
1194
|
+
k = `(${k})`;
|
|
1195
|
+
}
|
|
1196
|
+
if (typeof u3.noext === "boolean") {
|
|
1197
|
+
u3.noextglob = u3.noext;
|
|
1198
|
+
}
|
|
1199
|
+
const m = { input: t3, index: -1, start: 0, dot: u3.dot === true, consumed: "", output: "", prefix: "", backtrack: false, negated: false, brackets: 0, braces: 0, parens: 0, quotes: 0, globstar: false, tokens: A };
|
|
1200
|
+
t3 = o.removePrefix(t3, m);
|
|
1201
|
+
l = t3.length;
|
|
1202
|
+
const w = [];
|
|
1203
|
+
const N = [];
|
|
1204
|
+
const I = [];
|
|
1205
|
+
let B = f;
|
|
1206
|
+
let G;
|
|
1207
|
+
const eos = /* @__PURE__ */ __name(() => m.index === l - 1, "eos");
|
|
1208
|
+
const D = m.peek = (e4 = 1) => t3[m.index + e4];
|
|
1209
|
+
const M = m.advance = () => t3[++m.index] || "";
|
|
1210
|
+
const remaining = /* @__PURE__ */ __name(() => t3.slice(m.index + 1), "remaining");
|
|
1211
|
+
const consume = /* @__PURE__ */ __name((t4 = "", e4 = 0) => {
|
|
1212
|
+
m.consumed += t4;
|
|
1213
|
+
m.index += e4;
|
|
1214
|
+
}, "consume");
|
|
1215
|
+
const append = /* @__PURE__ */ __name((t4) => {
|
|
1216
|
+
m.output += t4.output != null ? t4.output : t4.value;
|
|
1217
|
+
consume(t4.value);
|
|
1218
|
+
}, "append");
|
|
1219
|
+
const negate = /* @__PURE__ */ __name(() => {
|
|
1220
|
+
let t4 = 1;
|
|
1221
|
+
while (D() === "!" && (D(2) !== "(" || D(3) === "?")) {
|
|
1222
|
+
M();
|
|
1223
|
+
m.start++;
|
|
1224
|
+
t4++;
|
|
1225
|
+
}
|
|
1226
|
+
if (t4 % 2 === 0) {
|
|
1227
|
+
return false;
|
|
1228
|
+
}
|
|
1229
|
+
m.negated = true;
|
|
1230
|
+
m.start++;
|
|
1231
|
+
return true;
|
|
1232
|
+
}, "negate");
|
|
1233
|
+
const increment = /* @__PURE__ */ __name((t4) => {
|
|
1234
|
+
m[t4]++;
|
|
1235
|
+
I.push(t4);
|
|
1236
|
+
}, "increment");
|
|
1237
|
+
const decrement = /* @__PURE__ */ __name((t4) => {
|
|
1238
|
+
m[t4]--;
|
|
1239
|
+
I.pop();
|
|
1240
|
+
}, "decrement");
|
|
1241
|
+
const push = /* @__PURE__ */ __name((t4) => {
|
|
1242
|
+
if (B.type === "globstar") {
|
|
1243
|
+
const e4 = m.braces > 0 && (t4.type === "comma" || t4.type === "brace");
|
|
1244
|
+
const u4 = t4.extglob === true || w.length && (t4.type === "pipe" || t4.type === "paren");
|
|
1245
|
+
if (t4.type !== "slash" && t4.type !== "paren" && !e4 && !u4) {
|
|
1246
|
+
m.output = m.output.slice(0, -B.output.length);
|
|
1247
|
+
B.type = "star";
|
|
1248
|
+
B.value = "*";
|
|
1249
|
+
B.output = k;
|
|
1250
|
+
m.output += B.output;
|
|
1251
|
+
}
|
|
1252
|
+
}
|
|
1253
|
+
if (w.length && t4.type !== "paren") {
|
|
1254
|
+
w[w.length - 1].inner += t4.value;
|
|
1255
|
+
}
|
|
1256
|
+
if (t4.value || t4.output) append(t4);
|
|
1257
|
+
if (B && B.type === "text" && t4.type === "text") {
|
|
1258
|
+
B.output = (B.output || B.value) + t4.value;
|
|
1259
|
+
B.value += t4.value;
|
|
1260
|
+
return;
|
|
1261
|
+
}
|
|
1262
|
+
t4.prev = B;
|
|
1263
|
+
A.push(t4);
|
|
1264
|
+
B = t4;
|
|
1265
|
+
}, "push");
|
|
1266
|
+
const extglobOpen = /* @__PURE__ */ __name((t4, e4) => {
|
|
1267
|
+
const n2 = { ...E[e4], conditions: 1, inner: "" };
|
|
1268
|
+
n2.prev = B;
|
|
1269
|
+
n2.parens = m.parens;
|
|
1270
|
+
n2.output = m.output;
|
|
1271
|
+
const o2 = (u3.capture ? "(" : "") + n2.open;
|
|
1272
|
+
increment("parens");
|
|
1273
|
+
push({ type: t4, value: e4, output: m.output ? "" : C });
|
|
1274
|
+
push({ type: "paren", extglob: true, value: M(), output: o2 });
|
|
1275
|
+
w.push(n2);
|
|
1276
|
+
}, "extglobOpen");
|
|
1277
|
+
const extglobClose = /* @__PURE__ */ __name((t4) => {
|
|
1278
|
+
let n2 = t4.close + (u3.capture ? ")" : "");
|
|
1279
|
+
let o2;
|
|
1280
|
+
if (t4.type === "negate") {
|
|
1281
|
+
let s2 = k;
|
|
1282
|
+
if (t4.inner && t4.inner.length > 1 && t4.inner.includes("/")) {
|
|
1283
|
+
s2 = globstar(u3);
|
|
1284
|
+
}
|
|
1285
|
+
if (s2 !== k || eos() || /^\)+$/.test(remaining())) {
|
|
1286
|
+
n2 = t4.close = `)$))${s2}`;
|
|
1287
|
+
}
|
|
1288
|
+
if (t4.inner.includes("*") && (o2 = remaining()) && /^\.[^\\/.]+$/.test(o2)) {
|
|
1289
|
+
const u4 = parse(o2, { ...e3, fastpaths: false }).output;
|
|
1290
|
+
n2 = t4.close = `)${u4})${s2})`;
|
|
1291
|
+
}
|
|
1292
|
+
if (t4.prev.type === "bos") {
|
|
1293
|
+
m.negatedExtglob = true;
|
|
1294
|
+
}
|
|
1295
|
+
}
|
|
1296
|
+
push({ type: "paren", extglob: true, value: G, output: n2 });
|
|
1297
|
+
decrement("parens");
|
|
1298
|
+
}, "extglobClose");
|
|
1299
|
+
if (u3.fastpaths !== false && !/(^[*!]|[/()[\]{}"])/.test(t3)) {
|
|
1300
|
+
let n2 = false;
|
|
1301
|
+
let s2 = t3.replace(i, (t4, e4, u4, o2, s3, r2) => {
|
|
1302
|
+
if (o2 === "\\") {
|
|
1303
|
+
n2 = true;
|
|
1304
|
+
return t4;
|
|
1305
|
+
}
|
|
1306
|
+
if (o2 === "?") {
|
|
1307
|
+
if (e4) {
|
|
1308
|
+
return e4 + o2 + (s3 ? H.repeat(s3.length) : "");
|
|
1309
|
+
}
|
|
1310
|
+
if (r2 === 0) {
|
|
1311
|
+
return O + (s3 ? H.repeat(s3.length) : "");
|
|
1312
|
+
}
|
|
1313
|
+
return H.repeat(u4.length);
|
|
1314
|
+
}
|
|
1315
|
+
if (o2 === ".") {
|
|
1316
|
+
return h.repeat(u4.length);
|
|
1317
|
+
}
|
|
1318
|
+
if (o2 === "*") {
|
|
1319
|
+
if (e4) {
|
|
1320
|
+
return e4 + o2 + (s3 ? k : "");
|
|
1321
|
+
}
|
|
1322
|
+
return k;
|
|
1323
|
+
}
|
|
1324
|
+
return e4 ? t4 : `\\${t4}`;
|
|
1325
|
+
});
|
|
1326
|
+
if (n2 === true) {
|
|
1327
|
+
if (u3.unescape === true) {
|
|
1328
|
+
s2 = s2.replace(/\\/g, "");
|
|
1329
|
+
} else {
|
|
1330
|
+
s2 = s2.replace(/\\+/g, (t4) => t4.length % 2 === 0 ? "\\\\" : t4 ? "\\" : "");
|
|
1331
|
+
}
|
|
1332
|
+
}
|
|
1333
|
+
if (s2 === t3 && u3.contains === true) {
|
|
1334
|
+
m.output = t3;
|
|
1335
|
+
return m;
|
|
1336
|
+
}
|
|
1337
|
+
m.output = o.wrapOutput(s2, m, e3);
|
|
1338
|
+
return m;
|
|
1339
|
+
}
|
|
1340
|
+
while (!eos()) {
|
|
1341
|
+
G = M();
|
|
1342
|
+
if (G === "\0") {
|
|
1343
|
+
continue;
|
|
1344
|
+
}
|
|
1345
|
+
if (G === "\\") {
|
|
1346
|
+
const t4 = D();
|
|
1347
|
+
if (t4 === "/" && u3.bash !== true) {
|
|
1348
|
+
continue;
|
|
1349
|
+
}
|
|
1350
|
+
if (t4 === "." || t4 === ";") {
|
|
1351
|
+
continue;
|
|
1352
|
+
}
|
|
1353
|
+
if (!t4) {
|
|
1354
|
+
G += "\\";
|
|
1355
|
+
push({ type: "text", value: G });
|
|
1356
|
+
continue;
|
|
1357
|
+
}
|
|
1358
|
+
const e5 = /^\\+/.exec(remaining());
|
|
1359
|
+
let n3 = 0;
|
|
1360
|
+
if (e5 && e5[0].length > 2) {
|
|
1361
|
+
n3 = e5[0].length;
|
|
1362
|
+
m.index += n3;
|
|
1363
|
+
if (n3 % 2 !== 0) {
|
|
1364
|
+
G += "\\";
|
|
1365
|
+
}
|
|
1366
|
+
}
|
|
1367
|
+
if (u3.unescape === true) {
|
|
1368
|
+
G = M();
|
|
1369
|
+
} else {
|
|
1370
|
+
G += M();
|
|
1371
|
+
}
|
|
1372
|
+
if (m.brackets === 0) {
|
|
1373
|
+
push({ type: "text", value: G });
|
|
1374
|
+
continue;
|
|
1375
|
+
}
|
|
1376
|
+
}
|
|
1377
|
+
if (m.brackets > 0 && (G !== "]" || B.value === "[" || B.value === "[^")) {
|
|
1378
|
+
if (u3.posix !== false && G === ":") {
|
|
1379
|
+
const t4 = B.value.slice(1);
|
|
1380
|
+
if (t4.includes("[")) {
|
|
1381
|
+
B.posix = true;
|
|
1382
|
+
if (t4.includes(":")) {
|
|
1383
|
+
const t5 = B.value.lastIndexOf("[");
|
|
1384
|
+
const e5 = B.value.slice(0, t5);
|
|
1385
|
+
const u4 = B.value.slice(t5 + 2);
|
|
1386
|
+
const n3 = r[u4];
|
|
1387
|
+
if (n3) {
|
|
1388
|
+
B.value = e5 + n3;
|
|
1389
|
+
m.backtrack = true;
|
|
1390
|
+
M();
|
|
1391
|
+
if (!f.output && A.indexOf(B) === 1) {
|
|
1392
|
+
f.output = C;
|
|
1393
|
+
}
|
|
1394
|
+
continue;
|
|
1395
|
+
}
|
|
1396
|
+
}
|
|
1397
|
+
}
|
|
1398
|
+
}
|
|
1399
|
+
if (G === "[" && D() !== ":" || G === "-" && D() === "]") {
|
|
1400
|
+
G = `\\${G}`;
|
|
1401
|
+
}
|
|
1402
|
+
if (G === "]" && (B.value === "[" || B.value === "[^")) {
|
|
1403
|
+
G = `\\${G}`;
|
|
1404
|
+
}
|
|
1405
|
+
if (u3.posix === true && G === "!" && B.value === "[") {
|
|
1406
|
+
G = "^";
|
|
1407
|
+
}
|
|
1408
|
+
B.value += G;
|
|
1409
|
+
append({ value: G });
|
|
1410
|
+
continue;
|
|
1411
|
+
}
|
|
1412
|
+
if (m.quotes === 1 && G !== '"') {
|
|
1413
|
+
G = o.escapeRegex(G);
|
|
1414
|
+
B.value += G;
|
|
1415
|
+
append({ value: G });
|
|
1416
|
+
continue;
|
|
1417
|
+
}
|
|
1418
|
+
if (G === '"') {
|
|
1419
|
+
m.quotes = m.quotes === 1 ? 0 : 1;
|
|
1420
|
+
if (u3.keepQuotes === true) {
|
|
1421
|
+
push({ type: "text", value: G });
|
|
1422
|
+
}
|
|
1423
|
+
continue;
|
|
1424
|
+
}
|
|
1425
|
+
if (G === "(") {
|
|
1426
|
+
increment("parens");
|
|
1427
|
+
push({ type: "paren", value: G });
|
|
1428
|
+
continue;
|
|
1429
|
+
}
|
|
1430
|
+
if (G === ")") {
|
|
1431
|
+
if (m.parens === 0 && u3.strictBrackets === true) {
|
|
1432
|
+
throw new SyntaxError(syntaxError("opening", "("));
|
|
1433
|
+
}
|
|
1434
|
+
const t4 = w[w.length - 1];
|
|
1435
|
+
if (t4 && m.parens === t4.parens + 1) {
|
|
1436
|
+
extglobClose(w.pop());
|
|
1437
|
+
continue;
|
|
1438
|
+
}
|
|
1439
|
+
push({ type: "paren", value: G, output: m.parens ? ")" : "\\)" });
|
|
1440
|
+
decrement("parens");
|
|
1441
|
+
continue;
|
|
1442
|
+
}
|
|
1443
|
+
if (G === "[") {
|
|
1444
|
+
if (u3.nobracket === true || !remaining().includes("]")) {
|
|
1445
|
+
if (u3.nobracket !== true && u3.strictBrackets === true) {
|
|
1446
|
+
throw new SyntaxError(syntaxError("closing", "]"));
|
|
1447
|
+
}
|
|
1448
|
+
G = `\\${G}`;
|
|
1449
|
+
} else {
|
|
1450
|
+
increment("brackets");
|
|
1451
|
+
}
|
|
1452
|
+
push({ type: "bracket", value: G });
|
|
1453
|
+
continue;
|
|
1454
|
+
}
|
|
1455
|
+
if (G === "]") {
|
|
1456
|
+
if (u3.nobracket === true || B && B.type === "bracket" && B.value.length === 1) {
|
|
1457
|
+
push({ type: "text", value: G, output: `\\${G}` });
|
|
1458
|
+
continue;
|
|
1459
|
+
}
|
|
1460
|
+
if (m.brackets === 0) {
|
|
1461
|
+
if (u3.strictBrackets === true) {
|
|
1462
|
+
throw new SyntaxError(syntaxError("opening", "["));
|
|
1463
|
+
}
|
|
1464
|
+
push({ type: "text", value: G, output: `\\${G}` });
|
|
1465
|
+
continue;
|
|
1466
|
+
}
|
|
1467
|
+
decrement("brackets");
|
|
1468
|
+
const t4 = B.value.slice(1);
|
|
1469
|
+
if (B.posix !== true && t4[0] === "^" && !t4.includes("/")) {
|
|
1470
|
+
G = `/${G}`;
|
|
1471
|
+
}
|
|
1472
|
+
B.value += G;
|
|
1473
|
+
append({ value: G });
|
|
1474
|
+
if (u3.literalBrackets === false || o.hasRegexChars(t4)) {
|
|
1475
|
+
continue;
|
|
1476
|
+
}
|
|
1477
|
+
const e5 = o.escapeRegex(B.value);
|
|
1478
|
+
m.output = m.output.slice(0, -B.value.length);
|
|
1479
|
+
if (u3.literalBrackets === true) {
|
|
1480
|
+
m.output += e5;
|
|
1481
|
+
B.value = e5;
|
|
1482
|
+
continue;
|
|
1483
|
+
}
|
|
1484
|
+
B.value = `(${_}${e5}|${B.value})`;
|
|
1485
|
+
m.output += B.value;
|
|
1486
|
+
continue;
|
|
1487
|
+
}
|
|
1488
|
+
if (G === "{" && u3.nobrace !== true) {
|
|
1489
|
+
increment("braces");
|
|
1490
|
+
const t4 = { type: "brace", value: G, output: "(", outputIndex: m.output.length, tokensIndex: m.tokens.length };
|
|
1491
|
+
N.push(t4);
|
|
1492
|
+
push(t4);
|
|
1493
|
+
continue;
|
|
1494
|
+
}
|
|
1495
|
+
if (G === "}") {
|
|
1496
|
+
const t4 = N[N.length - 1];
|
|
1497
|
+
if (u3.nobrace === true || !t4) {
|
|
1498
|
+
push({ type: "text", value: G, output: G });
|
|
1499
|
+
continue;
|
|
1500
|
+
}
|
|
1501
|
+
let e5 = ")";
|
|
1502
|
+
if (t4.dots === true) {
|
|
1503
|
+
const t5 = A.slice();
|
|
1504
|
+
const n3 = [];
|
|
1505
|
+
for (let e6 = t5.length - 1; e6 >= 0; e6--) {
|
|
1506
|
+
A.pop();
|
|
1507
|
+
if (t5[e6].type === "brace") {
|
|
1508
|
+
break;
|
|
1509
|
+
}
|
|
1510
|
+
if (t5[e6].type !== "dots") {
|
|
1511
|
+
n3.unshift(t5[e6].value);
|
|
1512
|
+
}
|
|
1513
|
+
}
|
|
1514
|
+
e5 = expandRange(n3, u3);
|
|
1515
|
+
m.backtrack = true;
|
|
1516
|
+
}
|
|
1517
|
+
if (t4.comma !== true && t4.dots !== true) {
|
|
1518
|
+
const u4 = m.output.slice(0, t4.outputIndex);
|
|
1519
|
+
const n3 = m.tokens.slice(t4.tokensIndex);
|
|
1520
|
+
t4.value = t4.output = "\\{";
|
|
1521
|
+
G = e5 = "\\}";
|
|
1522
|
+
m.output = u4;
|
|
1523
|
+
for (const t5 of n3) {
|
|
1524
|
+
m.output += t5.output || t5.value;
|
|
1525
|
+
}
|
|
1526
|
+
}
|
|
1527
|
+
push({ type: "brace", value: G, output: e5 });
|
|
1528
|
+
decrement("braces");
|
|
1529
|
+
N.pop();
|
|
1530
|
+
continue;
|
|
1531
|
+
}
|
|
1532
|
+
if (G === "|") {
|
|
1533
|
+
if (w.length > 0) {
|
|
1534
|
+
w[w.length - 1].conditions++;
|
|
1535
|
+
}
|
|
1536
|
+
push({ type: "text", value: G });
|
|
1537
|
+
continue;
|
|
1538
|
+
}
|
|
1539
|
+
if (G === ",") {
|
|
1540
|
+
let t4 = G;
|
|
1541
|
+
const e5 = N[N.length - 1];
|
|
1542
|
+
if (e5 && I[I.length - 1] === "braces") {
|
|
1543
|
+
e5.comma = true;
|
|
1544
|
+
t4 = "|";
|
|
1545
|
+
}
|
|
1546
|
+
push({ type: "comma", value: G, output: t4 });
|
|
1547
|
+
continue;
|
|
1548
|
+
}
|
|
1549
|
+
if (G === "/") {
|
|
1550
|
+
if (B.type === "dot" && m.index === m.start + 1) {
|
|
1551
|
+
m.start = m.index + 1;
|
|
1552
|
+
m.consumed = "";
|
|
1553
|
+
m.output = "";
|
|
1554
|
+
A.pop();
|
|
1555
|
+
B = f;
|
|
1556
|
+
continue;
|
|
1557
|
+
}
|
|
1558
|
+
push({ type: "slash", value: G, output: b });
|
|
1559
|
+
continue;
|
|
1560
|
+
}
|
|
1561
|
+
if (G === ".") {
|
|
1562
|
+
if (m.braces > 0 && B.type === "dot") {
|
|
1563
|
+
if (B.value === ".") B.output = h;
|
|
1564
|
+
const t4 = N[N.length - 1];
|
|
1565
|
+
B.type = "dots";
|
|
1566
|
+
B.output += G;
|
|
1567
|
+
B.value += G;
|
|
1568
|
+
t4.dots = true;
|
|
1569
|
+
continue;
|
|
1570
|
+
}
|
|
1571
|
+
if (m.braces + m.parens === 0 && B.type !== "bos" && B.type !== "slash") {
|
|
1572
|
+
push({ type: "text", value: G, output: h });
|
|
1573
|
+
continue;
|
|
1574
|
+
}
|
|
1575
|
+
push({ type: "dot", value: G, output: h });
|
|
1576
|
+
continue;
|
|
1577
|
+
}
|
|
1578
|
+
if (G === "?") {
|
|
1579
|
+
const t4 = B && B.value === "(";
|
|
1580
|
+
if (!t4 && u3.noextglob !== true && D() === "(" && D(2) !== "?") {
|
|
1581
|
+
extglobOpen("qmark", G);
|
|
1582
|
+
continue;
|
|
1583
|
+
}
|
|
1584
|
+
if (B && B.type === "paren") {
|
|
1585
|
+
const t5 = D();
|
|
1586
|
+
let e5 = G;
|
|
1587
|
+
if (B.value === "(" && !/[!=<:]/.test(t5) || t5 === "<" && !/<([!=]|\w+>)/.test(remaining())) {
|
|
1588
|
+
e5 = `\\${G}`;
|
|
1589
|
+
}
|
|
1590
|
+
push({ type: "text", value: G, output: e5 });
|
|
1591
|
+
continue;
|
|
1592
|
+
}
|
|
1593
|
+
if (u3.dot !== true && (B.type === "slash" || B.type === "bos")) {
|
|
1594
|
+
push({ type: "qmark", value: G, output: v });
|
|
1595
|
+
continue;
|
|
1596
|
+
}
|
|
1597
|
+
push({ type: "qmark", value: G, output: H });
|
|
1598
|
+
continue;
|
|
1599
|
+
}
|
|
1600
|
+
if (G === "!") {
|
|
1601
|
+
if (u3.noextglob !== true && D() === "(") {
|
|
1602
|
+
if (D(2) !== "?" || !/[!=<:]/.test(D(3))) {
|
|
1603
|
+
extglobOpen("negate", G);
|
|
1604
|
+
continue;
|
|
1605
|
+
}
|
|
1606
|
+
}
|
|
1607
|
+
if (u3.nonegate !== true && m.index === 0) {
|
|
1608
|
+
negate();
|
|
1609
|
+
continue;
|
|
1610
|
+
}
|
|
1611
|
+
}
|
|
1612
|
+
if (G === "+") {
|
|
1613
|
+
if (u3.noextglob !== true && D() === "(" && D(2) !== "?") {
|
|
1614
|
+
extglobOpen("plus", G);
|
|
1615
|
+
continue;
|
|
1616
|
+
}
|
|
1617
|
+
if (B && B.value === "(" || u3.regex === false) {
|
|
1618
|
+
push({ type: "plus", value: G, output: g });
|
|
1619
|
+
continue;
|
|
1620
|
+
}
|
|
1621
|
+
if (B && (B.type === "bracket" || B.type === "paren" || B.type === "brace") || m.parens > 0) {
|
|
1622
|
+
push({ type: "plus", value: G });
|
|
1623
|
+
continue;
|
|
1624
|
+
}
|
|
1625
|
+
push({ type: "plus", value: g });
|
|
1626
|
+
continue;
|
|
1627
|
+
}
|
|
1628
|
+
if (G === "@") {
|
|
1629
|
+
if (u3.noextglob !== true && D() === "(" && D(2) !== "?") {
|
|
1630
|
+
push({ type: "at", extglob: true, value: G, output: "" });
|
|
1631
|
+
continue;
|
|
1632
|
+
}
|
|
1633
|
+
push({ type: "text", value: G });
|
|
1634
|
+
continue;
|
|
1635
|
+
}
|
|
1636
|
+
if (G !== "*") {
|
|
1637
|
+
if (G === "$" || G === "^") {
|
|
1638
|
+
G = `\\${G}`;
|
|
1639
|
+
}
|
|
1640
|
+
const t4 = a.exec(remaining());
|
|
1641
|
+
if (t4) {
|
|
1642
|
+
G += t4[0];
|
|
1643
|
+
m.index += t4[0].length;
|
|
1644
|
+
}
|
|
1645
|
+
push({ type: "text", value: G });
|
|
1646
|
+
continue;
|
|
1647
|
+
}
|
|
1648
|
+
if (B && (B.type === "globstar" || B.star === true)) {
|
|
1649
|
+
B.type = "star";
|
|
1650
|
+
B.star = true;
|
|
1651
|
+
B.value += G;
|
|
1652
|
+
B.output = k;
|
|
1653
|
+
m.backtrack = true;
|
|
1654
|
+
m.globstar = true;
|
|
1655
|
+
consume(G);
|
|
1656
|
+
continue;
|
|
1657
|
+
}
|
|
1658
|
+
let e4 = remaining();
|
|
1659
|
+
if (u3.noextglob !== true && /^\([^?]/.test(e4)) {
|
|
1660
|
+
extglobOpen("star", G);
|
|
1661
|
+
continue;
|
|
1662
|
+
}
|
|
1663
|
+
if (B.type === "star") {
|
|
1664
|
+
if (u3.noglobstar === true) {
|
|
1665
|
+
consume(G);
|
|
1666
|
+
continue;
|
|
1667
|
+
}
|
|
1668
|
+
const n3 = B.prev;
|
|
1669
|
+
const o2 = n3.prev;
|
|
1670
|
+
const s2 = n3.type === "slash" || n3.type === "bos";
|
|
1671
|
+
const r2 = o2 && (o2.type === "star" || o2.type === "globstar");
|
|
1672
|
+
if (u3.bash === true && (!s2 || e4[0] && e4[0] !== "/")) {
|
|
1673
|
+
push({ type: "star", value: G, output: "" });
|
|
1674
|
+
continue;
|
|
1675
|
+
}
|
|
1676
|
+
const a2 = m.braces > 0 && (n3.type === "comma" || n3.type === "brace");
|
|
1677
|
+
const i2 = w.length && (n3.type === "pipe" || n3.type === "paren");
|
|
1678
|
+
if (!s2 && n3.type !== "paren" && !a2 && !i2) {
|
|
1679
|
+
push({ type: "star", value: G, output: "" });
|
|
1680
|
+
continue;
|
|
1681
|
+
}
|
|
1682
|
+
while (e4.slice(0, 3) === "/**") {
|
|
1683
|
+
const u4 = t3[m.index + 4];
|
|
1684
|
+
if (u4 && u4 !== "/") {
|
|
1685
|
+
break;
|
|
1686
|
+
}
|
|
1687
|
+
e4 = e4.slice(3);
|
|
1688
|
+
consume("/**", 3);
|
|
1689
|
+
}
|
|
1690
|
+
if (n3.type === "bos" && eos()) {
|
|
1691
|
+
B.type = "globstar";
|
|
1692
|
+
B.value += G;
|
|
1693
|
+
B.output = globstar(u3);
|
|
1694
|
+
m.output = B.output;
|
|
1695
|
+
m.globstar = true;
|
|
1696
|
+
consume(G);
|
|
1697
|
+
continue;
|
|
1698
|
+
}
|
|
1699
|
+
if (n3.type === "slash" && n3.prev.type !== "bos" && !r2 && eos()) {
|
|
1700
|
+
m.output = m.output.slice(0, -(n3.output + B.output).length);
|
|
1701
|
+
n3.output = `(?:${n3.output}`;
|
|
1702
|
+
B.type = "globstar";
|
|
1703
|
+
B.output = globstar(u3) + (u3.strictSlashes ? ")" : "|$)");
|
|
1704
|
+
B.value += G;
|
|
1705
|
+
m.globstar = true;
|
|
1706
|
+
m.output += n3.output + B.output;
|
|
1707
|
+
consume(G);
|
|
1708
|
+
continue;
|
|
1709
|
+
}
|
|
1710
|
+
if (n3.type === "slash" && n3.prev.type !== "bos" && e4[0] === "/") {
|
|
1711
|
+
const t4 = e4[1] !== void 0 ? "|$" : "";
|
|
1712
|
+
m.output = m.output.slice(0, -(n3.output + B.output).length);
|
|
1713
|
+
n3.output = `(?:${n3.output}`;
|
|
1714
|
+
B.type = "globstar";
|
|
1715
|
+
B.output = `${globstar(u3)}${b}|${b}${t4})`;
|
|
1716
|
+
B.value += G;
|
|
1717
|
+
m.output += n3.output + B.output;
|
|
1718
|
+
m.globstar = true;
|
|
1719
|
+
consume(G + M());
|
|
1720
|
+
push({ type: "slash", value: "/", output: "" });
|
|
1721
|
+
continue;
|
|
1722
|
+
}
|
|
1723
|
+
if (n3.type === "bos" && e4[0] === "/") {
|
|
1724
|
+
B.type = "globstar";
|
|
1725
|
+
B.value += G;
|
|
1726
|
+
B.output = `(?:^|${b}|${globstar(u3)}${b})`;
|
|
1727
|
+
m.output = B.output;
|
|
1728
|
+
m.globstar = true;
|
|
1729
|
+
consume(G + M());
|
|
1730
|
+
push({ type: "slash", value: "/", output: "" });
|
|
1731
|
+
continue;
|
|
1732
|
+
}
|
|
1733
|
+
m.output = m.output.slice(0, -B.output.length);
|
|
1734
|
+
B.type = "globstar";
|
|
1735
|
+
B.output = globstar(u3);
|
|
1736
|
+
B.value += G;
|
|
1737
|
+
m.output += B.output;
|
|
1738
|
+
m.globstar = true;
|
|
1739
|
+
consume(G);
|
|
1740
|
+
continue;
|
|
1741
|
+
}
|
|
1742
|
+
const n2 = { type: "star", value: G, output: k };
|
|
1743
|
+
if (u3.bash === true) {
|
|
1744
|
+
n2.output = ".*?";
|
|
1745
|
+
if (B.type === "bos" || B.type === "slash") {
|
|
1746
|
+
n2.output = T + n2.output;
|
|
1747
|
+
}
|
|
1748
|
+
push(n2);
|
|
1749
|
+
continue;
|
|
1750
|
+
}
|
|
1751
|
+
if (B && (B.type === "bracket" || B.type === "paren") && u3.regex === true) {
|
|
1752
|
+
n2.output = G;
|
|
1753
|
+
push(n2);
|
|
1754
|
+
continue;
|
|
1755
|
+
}
|
|
1756
|
+
if (m.index === m.start || B.type === "slash" || B.type === "dot") {
|
|
1757
|
+
if (B.type === "dot") {
|
|
1758
|
+
m.output += x;
|
|
1759
|
+
B.output += x;
|
|
1760
|
+
} else if (u3.dot === true) {
|
|
1761
|
+
m.output += S;
|
|
1762
|
+
B.output += S;
|
|
1763
|
+
} else {
|
|
1764
|
+
m.output += T;
|
|
1765
|
+
B.output += T;
|
|
1766
|
+
}
|
|
1767
|
+
if (D() !== "*") {
|
|
1768
|
+
m.output += C;
|
|
1769
|
+
B.output += C;
|
|
1770
|
+
}
|
|
1771
|
+
}
|
|
1772
|
+
push(n2);
|
|
1773
|
+
}
|
|
1774
|
+
while (m.brackets > 0) {
|
|
1775
|
+
if (u3.strictBrackets === true) throw new SyntaxError(syntaxError("closing", "]"));
|
|
1776
|
+
m.output = o.escapeLast(m.output, "[");
|
|
1777
|
+
decrement("brackets");
|
|
1778
|
+
}
|
|
1779
|
+
while (m.parens > 0) {
|
|
1780
|
+
if (u3.strictBrackets === true) throw new SyntaxError(syntaxError("closing", ")"));
|
|
1781
|
+
m.output = o.escapeLast(m.output, "(");
|
|
1782
|
+
decrement("parens");
|
|
1783
|
+
}
|
|
1784
|
+
while (m.braces > 0) {
|
|
1785
|
+
if (u3.strictBrackets === true) throw new SyntaxError(syntaxError("closing", "}"));
|
|
1786
|
+
m.output = o.escapeLast(m.output, "{");
|
|
1787
|
+
decrement("braces");
|
|
1788
|
+
}
|
|
1789
|
+
if (u3.strictSlashes !== true && (B.type === "star" || B.type === "bracket")) {
|
|
1790
|
+
push({ type: "maybe_slash", value: "", output: `${b}?` });
|
|
1791
|
+
}
|
|
1792
|
+
if (m.backtrack === true) {
|
|
1793
|
+
m.output = "";
|
|
1794
|
+
for (const t4 of m.tokens) {
|
|
1795
|
+
m.output += t4.output != null ? t4.output : t4.value;
|
|
1796
|
+
if (t4.suffix) {
|
|
1797
|
+
m.output += t4.suffix;
|
|
1798
|
+
}
|
|
1799
|
+
}
|
|
1800
|
+
}
|
|
1801
|
+
return m;
|
|
1802
|
+
}, "parse");
|
|
1803
|
+
parse.fastpaths = (t3, e3) => {
|
|
1804
|
+
const u3 = { ...e3 };
|
|
1805
|
+
const r2 = typeof u3.maxLength === "number" ? Math.min(s, u3.maxLength) : s;
|
|
1806
|
+
const a2 = t3.length;
|
|
1807
|
+
if (a2 > r2) {
|
|
1808
|
+
throw new SyntaxError(`Input length: ${a2}, exceeds maximum allowed length: ${r2}`);
|
|
1809
|
+
}
|
|
1810
|
+
t3 = c[t3] || t3;
|
|
1811
|
+
const { DOT_LITERAL: i2, 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(u3.windows);
|
|
1812
|
+
const g = u3.dot ? _ : A;
|
|
1813
|
+
const b = u3.dot ? R : A;
|
|
1814
|
+
const C = u3.capture ? "" : "?:";
|
|
1815
|
+
const y = { negated: false, prefix: "" };
|
|
1816
|
+
let $ = u3.bash === true ? ".*?" : E;
|
|
1817
|
+
if (u3.capture) {
|
|
1818
|
+
$ = `(${$})`;
|
|
1819
|
+
}
|
|
1820
|
+
const globstar = /* @__PURE__ */ __name((t4) => {
|
|
1821
|
+
if (t4.noglobstar === true) return $;
|
|
1822
|
+
return `(${C}(?:(?!${h}${t4.dot ? f : i2}).)*?)`;
|
|
1823
|
+
}, "globstar");
|
|
1824
|
+
const create = /* @__PURE__ */ __name((t4) => {
|
|
1825
|
+
switch (t4) {
|
|
1826
|
+
case "*":
|
|
1827
|
+
return `${g}${l}${$}`;
|
|
1828
|
+
case ".*":
|
|
1829
|
+
return `${i2}${l}${$}`;
|
|
1830
|
+
case "*.*":
|
|
1831
|
+
return `${g}${$}${i2}${l}${$}`;
|
|
1832
|
+
case "*/*":
|
|
1833
|
+
return `${g}${$}${p}${l}${b}${$}`;
|
|
1834
|
+
case "**":
|
|
1835
|
+
return g + globstar(u3);
|
|
1836
|
+
case "**/*":
|
|
1837
|
+
return `(?:${g}${globstar(u3)}${p})?${b}${l}${$}`;
|
|
1838
|
+
case "**/*.*":
|
|
1839
|
+
return `(?:${g}${globstar(u3)}${p})?${b}${$}${i2}${l}${$}`;
|
|
1840
|
+
case "**/.*":
|
|
1841
|
+
return `(?:${g}${globstar(u3)}${p})?${i2}${l}${$}`;
|
|
1842
|
+
default: {
|
|
1843
|
+
const e4 = /^(.*?)\.(\w+)$/.exec(t4);
|
|
1844
|
+
if (!e4) return;
|
|
1845
|
+
const u4 = create(e4[1]);
|
|
1846
|
+
if (!u4) return;
|
|
1847
|
+
return u4 + i2 + e4[2];
|
|
1848
|
+
}
|
|
1849
|
+
}
|
|
1850
|
+
}, "create");
|
|
1851
|
+
const x = o.removePrefix(t3, y);
|
|
1852
|
+
let S = create(x);
|
|
1853
|
+
if (S && u3.strictSlashes !== true) {
|
|
1854
|
+
S += `${p}?`;
|
|
1855
|
+
}
|
|
1856
|
+
return S;
|
|
1857
|
+
};
|
|
1858
|
+
t2.exports = parse;
|
|
1859
|
+
}, 510: (t2, e2, u2) => {
|
|
1860
|
+
const n = u2(716);
|
|
1861
|
+
const o = u2(697);
|
|
1862
|
+
const s = u2(96);
|
|
1863
|
+
const r = u2(154);
|
|
1864
|
+
const isObject = /* @__PURE__ */ __name((t3) => t3 && typeof t3 === "object" && !Array.isArray(t3), "isObject");
|
|
1865
|
+
const picomatch = /* @__PURE__ */ __name((t3, e3, u3 = false) => {
|
|
1866
|
+
if (Array.isArray(t3)) {
|
|
1867
|
+
const n3 = t3.map((t4) => picomatch(t4, e3, u3));
|
|
1868
|
+
const arrayMatcher = /* @__PURE__ */ __name((t4) => {
|
|
1869
|
+
for (const e4 of n3) {
|
|
1870
|
+
const u4 = e4(t4);
|
|
1871
|
+
if (u4) return u4;
|
|
1872
|
+
}
|
|
1873
|
+
return false;
|
|
1874
|
+
}, "arrayMatcher");
|
|
1875
|
+
return arrayMatcher;
|
|
1876
|
+
}
|
|
1877
|
+
const n2 = isObject(t3) && t3.tokens && t3.input;
|
|
1878
|
+
if (t3 === "" || typeof t3 !== "string" && !n2) {
|
|
1879
|
+
throw new TypeError("Expected pattern to be a non-empty string");
|
|
1880
|
+
}
|
|
1881
|
+
const o2 = e3 || {};
|
|
1882
|
+
const s2 = o2.windows;
|
|
1883
|
+
const r2 = n2 ? picomatch.compileRe(t3, e3) : picomatch.makeRe(t3, e3, false, true);
|
|
1884
|
+
const a = r2.state;
|
|
1885
|
+
delete r2.state;
|
|
1886
|
+
let isIgnored = /* @__PURE__ */ __name(() => false, "isIgnored");
|
|
1887
|
+
if (o2.ignore) {
|
|
1888
|
+
const t4 = { ...e3, ignore: null, onMatch: null, onResult: null };
|
|
1889
|
+
isIgnored = picomatch(o2.ignore, t4, u3);
|
|
1890
|
+
}
|
|
1891
|
+
const matcher = /* @__PURE__ */ __name((u4, n3 = false) => {
|
|
1892
|
+
const { isMatch: i, match: c, output: p } = picomatch.test(u4, r2, e3, { glob: t3, posix: s2 });
|
|
1893
|
+
const l = { glob: t3, state: a, regex: r2, posix: s2, input: u4, output: p, match: c, isMatch: i };
|
|
1894
|
+
if (typeof o2.onResult === "function") {
|
|
1895
|
+
o2.onResult(l);
|
|
1896
|
+
}
|
|
1897
|
+
if (i === false) {
|
|
1898
|
+
l.isMatch = false;
|
|
1899
|
+
return n3 ? l : false;
|
|
1900
|
+
}
|
|
1901
|
+
if (isIgnored(u4)) {
|
|
1902
|
+
if (typeof o2.onIgnore === "function") {
|
|
1903
|
+
o2.onIgnore(l);
|
|
1904
|
+
}
|
|
1905
|
+
l.isMatch = false;
|
|
1906
|
+
return n3 ? l : false;
|
|
1907
|
+
}
|
|
1908
|
+
if (typeof o2.onMatch === "function") {
|
|
1909
|
+
o2.onMatch(l);
|
|
1910
|
+
}
|
|
1911
|
+
return n3 ? l : true;
|
|
1912
|
+
}, "matcher");
|
|
1913
|
+
if (u3) {
|
|
1914
|
+
matcher.state = a;
|
|
1915
|
+
}
|
|
1916
|
+
return matcher;
|
|
1917
|
+
}, "picomatch");
|
|
1918
|
+
picomatch.test = (t3, e3, u3, { glob: n2, posix: o2 } = {}) => {
|
|
1919
|
+
if (typeof t3 !== "string") {
|
|
1920
|
+
throw new TypeError("Expected input to be a string");
|
|
1921
|
+
}
|
|
1922
|
+
if (t3 === "") {
|
|
1923
|
+
return { isMatch: false, output: "" };
|
|
1924
|
+
}
|
|
1925
|
+
const r2 = u3 || {};
|
|
1926
|
+
const a = r2.format || (o2 ? s.toPosixSlashes : null);
|
|
1927
|
+
let i = t3 === n2;
|
|
1928
|
+
let c = i && a ? a(t3) : t3;
|
|
1929
|
+
if (i === false) {
|
|
1930
|
+
c = a ? a(t3) : t3;
|
|
1931
|
+
i = c === n2;
|
|
1932
|
+
}
|
|
1933
|
+
if (i === false || r2.capture === true) {
|
|
1934
|
+
if (r2.matchBase === true || r2.basename === true) {
|
|
1935
|
+
i = picomatch.matchBase(t3, e3, u3, o2);
|
|
1936
|
+
} else {
|
|
1937
|
+
i = e3.exec(c);
|
|
1938
|
+
}
|
|
1939
|
+
}
|
|
1940
|
+
return { isMatch: Boolean(i), match: i, output: c };
|
|
1941
|
+
};
|
|
1942
|
+
picomatch.matchBase = (t3, e3, u3) => {
|
|
1943
|
+
const n2 = e3 instanceof RegExp ? e3 : picomatch.makeRe(e3, u3);
|
|
1944
|
+
return n2.test(s.basename(t3));
|
|
1945
|
+
};
|
|
1946
|
+
picomatch.isMatch = (t3, e3, u3) => picomatch(e3, u3)(t3);
|
|
1947
|
+
picomatch.parse = (t3, e3) => {
|
|
1948
|
+
if (Array.isArray(t3)) return t3.map((t4) => picomatch.parse(t4, e3));
|
|
1949
|
+
return o(t3, { ...e3, fastpaths: false });
|
|
1950
|
+
};
|
|
1951
|
+
picomatch.scan = (t3, e3) => n(t3, e3);
|
|
1952
|
+
picomatch.compileRe = (t3, e3, u3 = false, n2 = false) => {
|
|
1953
|
+
if (u3 === true) {
|
|
1954
|
+
return t3.output;
|
|
1955
|
+
}
|
|
1956
|
+
const o2 = e3 || {};
|
|
1957
|
+
const s2 = o2.contains ? "" : "^";
|
|
1958
|
+
const r2 = o2.contains ? "" : "$";
|
|
1959
|
+
let a = `${s2}(?:${t3.output})${r2}`;
|
|
1960
|
+
if (t3 && t3.negated === true) {
|
|
1961
|
+
a = `^(?!${a}).*$`;
|
|
1962
|
+
}
|
|
1963
|
+
const i = picomatch.toRegex(a, e3);
|
|
1964
|
+
if (n2 === true) {
|
|
1965
|
+
i.state = t3;
|
|
1966
|
+
}
|
|
1967
|
+
return i;
|
|
1968
|
+
};
|
|
1969
|
+
picomatch.makeRe = (t3, e3 = {}, u3 = false, n2 = false) => {
|
|
1970
|
+
if (!t3 || typeof t3 !== "string") {
|
|
1971
|
+
throw new TypeError("Expected a non-empty string");
|
|
1972
|
+
}
|
|
1973
|
+
let s2 = { negated: false, fastpaths: true };
|
|
1974
|
+
if (e3.fastpaths !== false && (t3[0] === "." || t3[0] === "*")) {
|
|
1975
|
+
s2.output = o.fastpaths(t3, e3);
|
|
1976
|
+
}
|
|
1977
|
+
if (!s2.output) {
|
|
1978
|
+
s2 = o(t3, e3);
|
|
1979
|
+
}
|
|
1980
|
+
return picomatch.compileRe(s2, e3, u3, n2);
|
|
1981
|
+
};
|
|
1982
|
+
picomatch.toRegex = (t3, e3) => {
|
|
1983
|
+
try {
|
|
1984
|
+
const u3 = e3 || {};
|
|
1985
|
+
return new RegExp(t3, u3.flags || (u3.nocase ? "i" : ""));
|
|
1986
|
+
} catch (t4) {
|
|
1987
|
+
if (e3 && e3.debug === true) throw t4;
|
|
1988
|
+
return /$^/;
|
|
1989
|
+
}
|
|
1990
|
+
};
|
|
1991
|
+
picomatch.constants = r;
|
|
1992
|
+
t2.exports = picomatch;
|
|
1993
|
+
}, 716: (t2, e2, u2) => {
|
|
1994
|
+
const n = u2(96);
|
|
1995
|
+
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 } = u2(154);
|
|
1996
|
+
const isPathSeparator = /* @__PURE__ */ __name((t3) => t3 === p || t3 === r, "isPathSeparator");
|
|
1997
|
+
const depth = /* @__PURE__ */ __name((t3) => {
|
|
1998
|
+
if (t3.isPrefix !== true) {
|
|
1999
|
+
t3.depth = t3.isGlobstar ? Infinity : 1;
|
|
2000
|
+
}
|
|
2001
|
+
}, "depth");
|
|
2002
|
+
const scan = /* @__PURE__ */ __name((t3, e3) => {
|
|
2003
|
+
const u3 = e3 || {};
|
|
2004
|
+
const b = t3.length - 1;
|
|
2005
|
+
const C = u3.parts === true || u3.scanToEnd === true;
|
|
2006
|
+
const y = [];
|
|
2007
|
+
const $ = [];
|
|
2008
|
+
const x = [];
|
|
2009
|
+
let S = t3;
|
|
2010
|
+
let H = -1;
|
|
2011
|
+
let v = 0;
|
|
2012
|
+
let d = 0;
|
|
2013
|
+
let L = false;
|
|
2014
|
+
let T = false;
|
|
2015
|
+
let O = false;
|
|
2016
|
+
let k = false;
|
|
2017
|
+
let m = false;
|
|
2018
|
+
let w = false;
|
|
2019
|
+
let N = false;
|
|
2020
|
+
let I = false;
|
|
2021
|
+
let B = false;
|
|
2022
|
+
let G = false;
|
|
2023
|
+
let D = 0;
|
|
2024
|
+
let M;
|
|
2025
|
+
let P;
|
|
2026
|
+
let K = { value: "", depth: 0, isGlob: false };
|
|
2027
|
+
const eos = /* @__PURE__ */ __name(() => H >= b, "eos");
|
|
2028
|
+
const peek = /* @__PURE__ */ __name(() => S.charCodeAt(H + 1), "peek");
|
|
2029
|
+
const advance = /* @__PURE__ */ __name(() => {
|
|
2030
|
+
M = P;
|
|
2031
|
+
return S.charCodeAt(++H);
|
|
2032
|
+
}, "advance");
|
|
2033
|
+
while (H < b) {
|
|
2034
|
+
P = advance();
|
|
2035
|
+
let t4;
|
|
2036
|
+
if (P === r) {
|
|
2037
|
+
N = K.backslashes = true;
|
|
2038
|
+
P = advance();
|
|
2039
|
+
if (P === l) {
|
|
2040
|
+
w = true;
|
|
2041
|
+
}
|
|
2042
|
+
continue;
|
|
2043
|
+
}
|
|
2044
|
+
if (w === true || P === l) {
|
|
2045
|
+
D++;
|
|
2046
|
+
while (eos() !== true && (P = advance())) {
|
|
2047
|
+
if (P === r) {
|
|
2048
|
+
N = K.backslashes = true;
|
|
2049
|
+
advance();
|
|
2050
|
+
continue;
|
|
2051
|
+
}
|
|
2052
|
+
if (P === l) {
|
|
2053
|
+
D++;
|
|
2054
|
+
continue;
|
|
2055
|
+
}
|
|
2056
|
+
if (w !== true && P === i && (P = advance()) === i) {
|
|
2057
|
+
L = K.isBrace = true;
|
|
2058
|
+
O = K.isGlob = true;
|
|
2059
|
+
G = true;
|
|
2060
|
+
if (C === true) {
|
|
2061
|
+
continue;
|
|
2062
|
+
}
|
|
2063
|
+
break;
|
|
2064
|
+
}
|
|
2065
|
+
if (w !== true && P === a) {
|
|
2066
|
+
L = K.isBrace = true;
|
|
2067
|
+
O = K.isGlob = true;
|
|
2068
|
+
G = true;
|
|
2069
|
+
if (C === true) {
|
|
2070
|
+
continue;
|
|
2071
|
+
}
|
|
2072
|
+
break;
|
|
2073
|
+
}
|
|
2074
|
+
if (P === E) {
|
|
2075
|
+
D--;
|
|
2076
|
+
if (D === 0) {
|
|
2077
|
+
w = false;
|
|
2078
|
+
L = K.isBrace = true;
|
|
2079
|
+
G = true;
|
|
2080
|
+
break;
|
|
2081
|
+
}
|
|
2082
|
+
}
|
|
2083
|
+
}
|
|
2084
|
+
if (C === true) {
|
|
2085
|
+
continue;
|
|
2086
|
+
}
|
|
2087
|
+
break;
|
|
2088
|
+
}
|
|
2089
|
+
if (P === p) {
|
|
2090
|
+
y.push(H);
|
|
2091
|
+
$.push(K);
|
|
2092
|
+
K = { value: "", depth: 0, isGlob: false };
|
|
2093
|
+
if (G === true) continue;
|
|
2094
|
+
if (M === i && H === v + 1) {
|
|
2095
|
+
v += 2;
|
|
2096
|
+
continue;
|
|
2097
|
+
}
|
|
2098
|
+
d = H + 1;
|
|
2099
|
+
continue;
|
|
2100
|
+
}
|
|
2101
|
+
if (u3.noext !== true) {
|
|
2102
|
+
const t5 = P === _ || P === s || P === o || P === R || P === c;
|
|
2103
|
+
if (t5 === true && peek() === f) {
|
|
2104
|
+
O = K.isGlob = true;
|
|
2105
|
+
k = K.isExtglob = true;
|
|
2106
|
+
G = true;
|
|
2107
|
+
if (P === c && H === v) {
|
|
2108
|
+
B = true;
|
|
2109
|
+
}
|
|
2110
|
+
if (C === true) {
|
|
2111
|
+
while (eos() !== true && (P = advance())) {
|
|
2112
|
+
if (P === r) {
|
|
2113
|
+
N = K.backslashes = true;
|
|
2114
|
+
P = advance();
|
|
2115
|
+
continue;
|
|
2116
|
+
}
|
|
2117
|
+
if (P === h) {
|
|
2118
|
+
O = K.isGlob = true;
|
|
2119
|
+
G = true;
|
|
2120
|
+
break;
|
|
2121
|
+
}
|
|
2122
|
+
}
|
|
2123
|
+
continue;
|
|
2124
|
+
}
|
|
2125
|
+
break;
|
|
2126
|
+
}
|
|
2127
|
+
}
|
|
2128
|
+
if (P === o) {
|
|
2129
|
+
if (M === o) m = K.isGlobstar = true;
|
|
2130
|
+
O = K.isGlob = true;
|
|
2131
|
+
G = true;
|
|
2132
|
+
if (C === true) {
|
|
2133
|
+
continue;
|
|
2134
|
+
}
|
|
2135
|
+
break;
|
|
2136
|
+
}
|
|
2137
|
+
if (P === R) {
|
|
2138
|
+
O = K.isGlob = true;
|
|
2139
|
+
G = true;
|
|
2140
|
+
if (C === true) {
|
|
2141
|
+
continue;
|
|
2142
|
+
}
|
|
2143
|
+
break;
|
|
2144
|
+
}
|
|
2145
|
+
if (P === A) {
|
|
2146
|
+
while (eos() !== true && (t4 = advance())) {
|
|
2147
|
+
if (t4 === r) {
|
|
2148
|
+
N = K.backslashes = true;
|
|
2149
|
+
advance();
|
|
2150
|
+
continue;
|
|
2151
|
+
}
|
|
2152
|
+
if (t4 === g) {
|
|
2153
|
+
T = K.isBracket = true;
|
|
2154
|
+
O = K.isGlob = true;
|
|
2155
|
+
G = true;
|
|
2156
|
+
break;
|
|
2157
|
+
}
|
|
2158
|
+
}
|
|
2159
|
+
if (C === true) {
|
|
2160
|
+
continue;
|
|
2161
|
+
}
|
|
2162
|
+
break;
|
|
2163
|
+
}
|
|
2164
|
+
if (u3.nonegate !== true && P === c && H === v) {
|
|
2165
|
+
I = K.negated = true;
|
|
2166
|
+
v++;
|
|
2167
|
+
continue;
|
|
2168
|
+
}
|
|
2169
|
+
if (u3.noparen !== true && P === f) {
|
|
2170
|
+
O = K.isGlob = true;
|
|
2171
|
+
if (C === true) {
|
|
2172
|
+
while (eos() !== true && (P = advance())) {
|
|
2173
|
+
if (P === f) {
|
|
2174
|
+
N = K.backslashes = true;
|
|
2175
|
+
P = advance();
|
|
2176
|
+
continue;
|
|
2177
|
+
}
|
|
2178
|
+
if (P === h) {
|
|
2179
|
+
G = true;
|
|
2180
|
+
break;
|
|
2181
|
+
}
|
|
2182
|
+
}
|
|
2183
|
+
continue;
|
|
2184
|
+
}
|
|
2185
|
+
break;
|
|
2186
|
+
}
|
|
2187
|
+
if (O === true) {
|
|
2188
|
+
G = true;
|
|
2189
|
+
if (C === true) {
|
|
2190
|
+
continue;
|
|
2191
|
+
}
|
|
2192
|
+
break;
|
|
2193
|
+
}
|
|
2194
|
+
}
|
|
2195
|
+
if (u3.noext === true) {
|
|
2196
|
+
k = false;
|
|
2197
|
+
O = false;
|
|
2198
|
+
}
|
|
2199
|
+
let U = S;
|
|
2200
|
+
let X = "";
|
|
2201
|
+
let F = "";
|
|
2202
|
+
if (v > 0) {
|
|
2203
|
+
X = S.slice(0, v);
|
|
2204
|
+
S = S.slice(v);
|
|
2205
|
+
d -= v;
|
|
2206
|
+
}
|
|
2207
|
+
if (U && O === true && d > 0) {
|
|
2208
|
+
U = S.slice(0, d);
|
|
2209
|
+
F = S.slice(d);
|
|
2210
|
+
} else if (O === true) {
|
|
2211
|
+
U = "";
|
|
2212
|
+
F = S;
|
|
2213
|
+
} else {
|
|
2214
|
+
U = S;
|
|
2215
|
+
}
|
|
2216
|
+
if (U && U !== "" && U !== "/" && U !== S) {
|
|
2217
|
+
if (isPathSeparator(U.charCodeAt(U.length - 1))) {
|
|
2218
|
+
U = U.slice(0, -1);
|
|
2219
|
+
}
|
|
2220
|
+
}
|
|
2221
|
+
if (u3.unescape === true) {
|
|
2222
|
+
if (F) F = n.removeBackslashes(F);
|
|
2223
|
+
if (U && N === true) {
|
|
2224
|
+
U = n.removeBackslashes(U);
|
|
2225
|
+
}
|
|
2226
|
+
}
|
|
2227
|
+
const Q = { prefix: X, input: t3, start: v, base: U, glob: F, isBrace: L, isBracket: T, isGlob: O, isExtglob: k, isGlobstar: m, negated: I, negatedExtglob: B };
|
|
2228
|
+
if (u3.tokens === true) {
|
|
2229
|
+
Q.maxDepth = 0;
|
|
2230
|
+
if (!isPathSeparator(P)) {
|
|
2231
|
+
$.push(K);
|
|
2232
|
+
}
|
|
2233
|
+
Q.tokens = $;
|
|
2234
|
+
}
|
|
2235
|
+
if (u3.parts === true || u3.tokens === true) {
|
|
2236
|
+
let e4;
|
|
2237
|
+
for (let n2 = 0; n2 < y.length; n2++) {
|
|
2238
|
+
const o2 = e4 ? e4 + 1 : v;
|
|
2239
|
+
const s2 = y[n2];
|
|
2240
|
+
const r2 = t3.slice(o2, s2);
|
|
2241
|
+
if (u3.tokens) {
|
|
2242
|
+
if (n2 === 0 && v !== 0) {
|
|
2243
|
+
$[n2].isPrefix = true;
|
|
2244
|
+
$[n2].value = X;
|
|
2245
|
+
} else {
|
|
2246
|
+
$[n2].value = r2;
|
|
2247
|
+
}
|
|
2248
|
+
depth($[n2]);
|
|
2249
|
+
Q.maxDepth += $[n2].depth;
|
|
2250
|
+
}
|
|
2251
|
+
if (n2 !== 0 || r2 !== "") {
|
|
2252
|
+
x.push(r2);
|
|
2253
|
+
}
|
|
2254
|
+
e4 = s2;
|
|
2255
|
+
}
|
|
2256
|
+
if (e4 && e4 + 1 < t3.length) {
|
|
2257
|
+
const n2 = t3.slice(e4 + 1);
|
|
2258
|
+
x.push(n2);
|
|
2259
|
+
if (u3.tokens) {
|
|
2260
|
+
$[$.length - 1].value = n2;
|
|
2261
|
+
depth($[$.length - 1]);
|
|
2262
|
+
Q.maxDepth += $[$.length - 1].depth;
|
|
2263
|
+
}
|
|
2264
|
+
}
|
|
2265
|
+
Q.slashes = y;
|
|
2266
|
+
Q.parts = x;
|
|
2267
|
+
}
|
|
2268
|
+
return Q;
|
|
2269
|
+
}, "scan");
|
|
2270
|
+
t2.exports = scan;
|
|
2271
|
+
}, 96: (t2, e2, u2) => {
|
|
2272
|
+
const { REGEX_BACKSLASH: n, REGEX_REMOVE_BACKSLASH: o, REGEX_SPECIAL_CHARS: s, REGEX_SPECIAL_CHARS_GLOBAL: r } = u2(154);
|
|
2273
|
+
e2.isObject = (t3) => t3 !== null && typeof t3 === "object" && !Array.isArray(t3);
|
|
2274
|
+
e2.hasRegexChars = (t3) => s.test(t3);
|
|
2275
|
+
e2.isRegexChar = (t3) => t3.length === 1 && e2.hasRegexChars(t3);
|
|
2276
|
+
e2.escapeRegex = (t3) => t3.replace(r, "\\$1");
|
|
2277
|
+
e2.toPosixSlashes = (t3) => t3.replace(n, "/");
|
|
2278
|
+
e2.removeBackslashes = (t3) => t3.replace(o, (t4) => t4 === "\\" ? "" : t4);
|
|
2279
|
+
e2.escapeLast = (t3, u3, n2) => {
|
|
2280
|
+
const o2 = t3.lastIndexOf(u3, n2);
|
|
2281
|
+
if (o2 === -1) return t3;
|
|
2282
|
+
if (t3[o2 - 1] === "\\") return e2.escapeLast(t3, u3, o2 - 1);
|
|
2283
|
+
return `${t3.slice(0, o2)}\\${t3.slice(o2)}`;
|
|
2284
|
+
};
|
|
2285
|
+
e2.removePrefix = (t3, e3 = {}) => {
|
|
2286
|
+
let u3 = t3;
|
|
2287
|
+
if (u3.startsWith("./")) {
|
|
2288
|
+
u3 = u3.slice(2);
|
|
2289
|
+
e3.prefix = "./";
|
|
2290
|
+
}
|
|
2291
|
+
return u3;
|
|
2292
|
+
};
|
|
2293
|
+
e2.wrapOutput = (t3, e3 = {}, u3 = {}) => {
|
|
2294
|
+
const n2 = u3.contains ? "" : "^";
|
|
2295
|
+
const o2 = u3.contains ? "" : "$";
|
|
2296
|
+
let s2 = `${n2}(?:${t3})${o2}`;
|
|
2297
|
+
if (e3.negated === true) {
|
|
2298
|
+
s2 = `(?:^(?!${s2}).*$)`;
|
|
2299
|
+
}
|
|
2300
|
+
return s2;
|
|
2301
|
+
};
|
|
2302
|
+
e2.basename = (t3, { windows: e3 } = {}) => {
|
|
2303
|
+
const u3 = t3.split(e3 ? /[\\/]/ : "/");
|
|
2304
|
+
const n2 = u3[u3.length - 1];
|
|
2305
|
+
if (n2 === "") {
|
|
2306
|
+
return u3[u3.length - 2];
|
|
2307
|
+
}
|
|
2308
|
+
return n2;
|
|
2309
|
+
};
|
|
2310
|
+
} };
|
|
2311
|
+
var e = {};
|
|
2312
|
+
function __nccwpck_require__(u2) {
|
|
2313
|
+
var n = e[u2];
|
|
2314
|
+
if (n !== void 0) {
|
|
2315
|
+
return n.exports;
|
|
2316
|
+
}
|
|
2317
|
+
var o = e[u2] = { exports: {} };
|
|
2318
|
+
var s = true;
|
|
2319
|
+
try {
|
|
2320
|
+
t[u2](o, o.exports, __nccwpck_require__);
|
|
2321
|
+
s = false;
|
|
2322
|
+
} finally {
|
|
2323
|
+
if (s) delete e[u2];
|
|
2324
|
+
}
|
|
2325
|
+
return o.exports;
|
|
2326
|
+
}
|
|
2327
|
+
__name(__nccwpck_require__, "__nccwpck_require__");
|
|
2328
|
+
if (typeof __nccwpck_require__ !== "undefined") __nccwpck_require__.ab = __dirname + "/";
|
|
2329
|
+
var u = __nccwpck_require__(170);
|
|
2330
|
+
module2.exports = u;
|
|
2331
|
+
})();
|
|
2332
|
+
}
|
|
2333
|
+
});
|
|
2334
|
+
|
|
2335
|
+
// ../../node_modules/next/dist/shared/lib/match-local-pattern.js
|
|
2336
|
+
var require_match_local_pattern = __commonJS({
|
|
2337
|
+
"../../node_modules/next/dist/shared/lib/match-local-pattern.js"(exports) {
|
|
2338
|
+
"use strict";
|
|
2339
|
+
Object.defineProperty(exports, "__esModule", {
|
|
2340
|
+
value: true
|
|
2341
|
+
});
|
|
2342
|
+
function _export(target, all) {
|
|
2343
|
+
for (var name in all) Object.defineProperty(target, name, {
|
|
2344
|
+
enumerable: true,
|
|
2345
|
+
get: all[name]
|
|
2346
|
+
});
|
|
2347
|
+
}
|
|
2348
|
+
__name(_export, "_export");
|
|
2349
|
+
_export(exports, {
|
|
2350
|
+
hasLocalMatch: /* @__PURE__ */ __name(function() {
|
|
2351
|
+
return hasLocalMatch;
|
|
2352
|
+
}, "hasLocalMatch"),
|
|
2353
|
+
matchLocalPattern: /* @__PURE__ */ __name(function() {
|
|
2354
|
+
return matchLocalPattern;
|
|
2355
|
+
}, "matchLocalPattern")
|
|
2356
|
+
});
|
|
2357
|
+
var _picomatch = require_picomatch();
|
|
2358
|
+
function matchLocalPattern(pattern, url) {
|
|
2359
|
+
if (pattern.search !== void 0) {
|
|
2360
|
+
if (pattern.search !== url.search) {
|
|
2361
|
+
return false;
|
|
2362
|
+
}
|
|
2363
|
+
}
|
|
2364
|
+
var _pattern_pathname;
|
|
2365
|
+
if (!(0, _picomatch.makeRe)((_pattern_pathname = pattern.pathname) != null ? _pattern_pathname : "**", {
|
|
2366
|
+
dot: true
|
|
2367
|
+
}).test(url.pathname)) {
|
|
2368
|
+
return false;
|
|
2369
|
+
}
|
|
2370
|
+
return true;
|
|
2371
|
+
}
|
|
2372
|
+
__name(matchLocalPattern, "matchLocalPattern");
|
|
2373
|
+
function hasLocalMatch(localPatterns, urlPathAndQuery) {
|
|
2374
|
+
if (!localPatterns) {
|
|
2375
|
+
return true;
|
|
2376
|
+
}
|
|
2377
|
+
const url = new URL(urlPathAndQuery, "http://n");
|
|
2378
|
+
return localPatterns.some((p) => matchLocalPattern(p, url));
|
|
2379
|
+
}
|
|
2380
|
+
__name(hasLocalMatch, "hasLocalMatch");
|
|
2381
|
+
}
|
|
2382
|
+
});
|
|
2383
|
+
|
|
2384
|
+
// ../../node_modules/next/dist/shared/lib/match-remote-pattern.js
|
|
2385
|
+
var require_match_remote_pattern = __commonJS({
|
|
2386
|
+
"../../node_modules/next/dist/shared/lib/match-remote-pattern.js"(exports) {
|
|
2387
|
+
"use strict";
|
|
2388
|
+
Object.defineProperty(exports, "__esModule", {
|
|
2389
|
+
value: true
|
|
2390
|
+
});
|
|
2391
|
+
function _export(target, all) {
|
|
2392
|
+
for (var name in all) Object.defineProperty(target, name, {
|
|
2393
|
+
enumerable: true,
|
|
2394
|
+
get: all[name]
|
|
2395
|
+
});
|
|
2396
|
+
}
|
|
2397
|
+
__name(_export, "_export");
|
|
2398
|
+
_export(exports, {
|
|
2399
|
+
hasRemoteMatch: /* @__PURE__ */ __name(function() {
|
|
2400
|
+
return hasRemoteMatch;
|
|
2401
|
+
}, "hasRemoteMatch"),
|
|
2402
|
+
matchRemotePattern: /* @__PURE__ */ __name(function() {
|
|
2403
|
+
return matchRemotePattern;
|
|
2404
|
+
}, "matchRemotePattern")
|
|
2405
|
+
});
|
|
2406
|
+
var _picomatch = require_picomatch();
|
|
2407
|
+
function matchRemotePattern(pattern, url) {
|
|
2408
|
+
if (pattern.protocol !== void 0) {
|
|
2409
|
+
const actualProto = url.protocol.slice(0, -1);
|
|
2410
|
+
if (pattern.protocol !== actualProto) {
|
|
2411
|
+
return false;
|
|
2412
|
+
}
|
|
2413
|
+
}
|
|
2414
|
+
if (pattern.port !== void 0) {
|
|
2415
|
+
if (pattern.port !== url.port) {
|
|
2416
|
+
return false;
|
|
2417
|
+
}
|
|
2418
|
+
}
|
|
2419
|
+
if (pattern.hostname === void 0) {
|
|
2420
|
+
throw Object.defineProperty(new Error("Pattern should define hostname but found\n" + JSON.stringify(pattern)), "__NEXT_ERROR_CODE", {
|
|
2421
|
+
value: "E410",
|
|
2422
|
+
enumerable: false,
|
|
2423
|
+
configurable: true
|
|
2424
|
+
});
|
|
2425
|
+
} else {
|
|
2426
|
+
if (!(0, _picomatch.makeRe)(pattern.hostname).test(url.hostname)) {
|
|
2427
|
+
return false;
|
|
2428
|
+
}
|
|
2429
|
+
}
|
|
2430
|
+
if (pattern.search !== void 0) {
|
|
2431
|
+
if (pattern.search !== url.search) {
|
|
2432
|
+
return false;
|
|
2433
|
+
}
|
|
2434
|
+
}
|
|
2435
|
+
var _pattern_pathname;
|
|
2436
|
+
if (!(0, _picomatch.makeRe)((_pattern_pathname = pattern.pathname) != null ? _pattern_pathname : "**", {
|
|
2437
|
+
dot: true
|
|
2438
|
+
}).test(url.pathname)) {
|
|
2439
|
+
return false;
|
|
2440
|
+
}
|
|
2441
|
+
return true;
|
|
2442
|
+
}
|
|
2443
|
+
__name(matchRemotePattern, "matchRemotePattern");
|
|
2444
|
+
function hasRemoteMatch(domains, remotePatterns, url) {
|
|
2445
|
+
return domains.some((domain) => url.hostname === domain) || remotePatterns.some((p) => matchRemotePattern(p, url));
|
|
2446
|
+
}
|
|
2447
|
+
__name(hasRemoteMatch, "hasRemoteMatch");
|
|
2448
|
+
}
|
|
2449
|
+
});
|
|
2450
|
+
|
|
2451
|
+
// ../../node_modules/next/dist/shared/lib/image-loader.js
|
|
2452
|
+
var require_image_loader = __commonJS({
|
|
2453
|
+
"../../node_modules/next/dist/shared/lib/image-loader.js"(exports) {
|
|
2454
|
+
"use strict";
|
|
2455
|
+
Object.defineProperty(exports, "__esModule", {
|
|
2456
|
+
value: true
|
|
2457
|
+
});
|
|
2458
|
+
Object.defineProperty(exports, "default", {
|
|
2459
|
+
enumerable: true,
|
|
2460
|
+
get: /* @__PURE__ */ __name(function() {
|
|
2461
|
+
return _default;
|
|
2462
|
+
}, "get")
|
|
2463
|
+
});
|
|
2464
|
+
var DEFAULT_Q = 75;
|
|
2465
|
+
function defaultLoader(param) {
|
|
2466
|
+
let { config, src, width, quality } = param;
|
|
2467
|
+
var _config_qualities;
|
|
2468
|
+
if (process.env.NODE_ENV !== "production") {
|
|
2469
|
+
const missingValues = [];
|
|
2470
|
+
if (!src) missingValues.push("src");
|
|
2471
|
+
if (!width) missingValues.push("width");
|
|
2472
|
+
if (missingValues.length > 0) {
|
|
2473
|
+
throw Object.defineProperty(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({
|
|
2474
|
+
src,
|
|
2475
|
+
width,
|
|
2476
|
+
quality
|
|
2477
|
+
})), "__NEXT_ERROR_CODE", {
|
|
2478
|
+
value: "E188",
|
|
2479
|
+
enumerable: false,
|
|
2480
|
+
configurable: true
|
|
2481
|
+
});
|
|
2482
|
+
}
|
|
2483
|
+
if (src.startsWith("//")) {
|
|
2484
|
+
throw Object.defineProperty(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", {
|
|
2485
|
+
value: "E360",
|
|
2486
|
+
enumerable: false,
|
|
2487
|
+
configurable: true
|
|
2488
|
+
});
|
|
2489
|
+
}
|
|
2490
|
+
if (src.startsWith("/") && config.localPatterns) {
|
|
2491
|
+
if (process.env.NODE_ENV !== "test" && // micromatch isn't compatible with edge runtime
|
|
2492
|
+
process.env.NEXT_RUNTIME !== "edge") {
|
|
2493
|
+
const { hasLocalMatch } = require_match_local_pattern();
|
|
2494
|
+
if (!hasLocalMatch(config.localPatterns, src)) {
|
|
2495
|
+
throw Object.defineProperty(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", {
|
|
2496
|
+
value: "E426",
|
|
2497
|
+
enumerable: false,
|
|
2498
|
+
configurable: true
|
|
2499
|
+
});
|
|
2500
|
+
}
|
|
2501
|
+
}
|
|
2502
|
+
}
|
|
2503
|
+
if (!src.startsWith("/") && (config.domains || config.remotePatterns)) {
|
|
2504
|
+
let parsedSrc;
|
|
2505
|
+
try {
|
|
2506
|
+
parsedSrc = new URL(src);
|
|
2507
|
+
} catch (err) {
|
|
2508
|
+
console.error(err);
|
|
2509
|
+
throw Object.defineProperty(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", {
|
|
2510
|
+
value: "E63",
|
|
2511
|
+
enumerable: false,
|
|
2512
|
+
configurable: true
|
|
2513
|
+
});
|
|
2514
|
+
}
|
|
2515
|
+
if (process.env.NODE_ENV !== "test" && // micromatch isn't compatible with edge runtime
|
|
2516
|
+
process.env.NEXT_RUNTIME !== "edge") {
|
|
2517
|
+
const { hasRemoteMatch } = require_match_remote_pattern();
|
|
2518
|
+
if (!hasRemoteMatch(config.domains, config.remotePatterns, parsedSrc)) {
|
|
2519
|
+
throw Object.defineProperty(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", {
|
|
2520
|
+
value: "E231",
|
|
2521
|
+
enumerable: false,
|
|
2522
|
+
configurable: true
|
|
2523
|
+
});
|
|
2524
|
+
}
|
|
2525
|
+
}
|
|
2526
|
+
}
|
|
2527
|
+
if (quality && config.qualities && !config.qualities.includes(quality)) {
|
|
2528
|
+
throw Object.defineProperty(new Error("Invalid quality prop (" + quality + ") on `next/image` does not match `images.qualities` configured in your `next.config.js`\nSee more info: https://nextjs.org/docs/messages/next-image-unconfigured-qualities"), "__NEXT_ERROR_CODE", {
|
|
2529
|
+
value: "E623",
|
|
2530
|
+
enumerable: false,
|
|
2531
|
+
configurable: true
|
|
2532
|
+
});
|
|
2533
|
+
}
|
|
2534
|
+
}
|
|
2535
|
+
const q = quality || ((_config_qualities = config.qualities) == null ? void 0 : _config_qualities.reduce((prev, cur) => Math.abs(cur - DEFAULT_Q) < Math.abs(prev - DEFAULT_Q) ? cur : prev)) || DEFAULT_Q;
|
|
2536
|
+
return config.path + "?url=" + encodeURIComponent(src) + "&w=" + width + "&q=" + q + (src.startsWith("/_next/static/media/") && process.env.NEXT_DEPLOYMENT_ID ? "&dpl=" + process.env.NEXT_DEPLOYMENT_ID : "");
|
|
2537
|
+
}
|
|
2538
|
+
__name(defaultLoader, "defaultLoader");
|
|
2539
|
+
defaultLoader.__next_img_default = true;
|
|
2540
|
+
var _default = defaultLoader;
|
|
2541
|
+
}
|
|
2542
|
+
});
|
|
2543
|
+
|
|
2544
|
+
// ../../node_modules/next/dist/client/use-merged-ref.js
|
|
2545
|
+
var require_use_merged_ref = __commonJS({
|
|
2546
|
+
"../../node_modules/next/dist/client/use-merged-ref.js"(exports, module2) {
|
|
2547
|
+
"use strict";
|
|
2548
|
+
Object.defineProperty(exports, "__esModule", {
|
|
2549
|
+
value: true
|
|
2550
|
+
});
|
|
2551
|
+
Object.defineProperty(exports, "useMergedRef", {
|
|
2552
|
+
enumerable: true,
|
|
2553
|
+
get: /* @__PURE__ */ __name(function() {
|
|
2554
|
+
return useMergedRef;
|
|
2555
|
+
}, "get")
|
|
2556
|
+
});
|
|
2557
|
+
var _react = require("react");
|
|
2558
|
+
function useMergedRef(refA, refB) {
|
|
2559
|
+
const cleanupA = (0, _react.useRef)(null);
|
|
2560
|
+
const cleanupB = (0, _react.useRef)(null);
|
|
2561
|
+
return (0, _react.useCallback)((current) => {
|
|
2562
|
+
if (current === null) {
|
|
2563
|
+
const cleanupFnA = cleanupA.current;
|
|
2564
|
+
if (cleanupFnA) {
|
|
2565
|
+
cleanupA.current = null;
|
|
2566
|
+
cleanupFnA();
|
|
2567
|
+
}
|
|
2568
|
+
const cleanupFnB = cleanupB.current;
|
|
2569
|
+
if (cleanupFnB) {
|
|
2570
|
+
cleanupB.current = null;
|
|
2571
|
+
cleanupFnB();
|
|
2572
|
+
}
|
|
2573
|
+
} else {
|
|
2574
|
+
if (refA) {
|
|
2575
|
+
cleanupA.current = applyRef(refA, current);
|
|
2576
|
+
}
|
|
2577
|
+
if (refB) {
|
|
2578
|
+
cleanupB.current = applyRef(refB, current);
|
|
2579
|
+
}
|
|
2580
|
+
}
|
|
2581
|
+
}, [
|
|
2582
|
+
refA,
|
|
2583
|
+
refB
|
|
2584
|
+
]);
|
|
2585
|
+
}
|
|
2586
|
+
__name(useMergedRef, "useMergedRef");
|
|
2587
|
+
function applyRef(refA, current) {
|
|
2588
|
+
if (typeof refA === "function") {
|
|
2589
|
+
const cleanup = refA(current);
|
|
2590
|
+
if (typeof cleanup === "function") {
|
|
2591
|
+
return cleanup;
|
|
2592
|
+
} else {
|
|
2593
|
+
return () => refA(null);
|
|
2594
|
+
}
|
|
2595
|
+
} else {
|
|
2596
|
+
refA.current = current;
|
|
2597
|
+
return () => {
|
|
2598
|
+
refA.current = null;
|
|
2599
|
+
};
|
|
2600
|
+
}
|
|
2601
|
+
}
|
|
2602
|
+
__name(applyRef, "applyRef");
|
|
2603
|
+
if ((typeof exports.default === "function" || typeof exports.default === "object" && exports.default !== null) && typeof exports.default.__esModule === "undefined") {
|
|
2604
|
+
Object.defineProperty(exports.default, "__esModule", { value: true });
|
|
2605
|
+
Object.assign(exports.default, exports);
|
|
2606
|
+
module2.exports = exports.default;
|
|
2607
|
+
}
|
|
2608
|
+
}
|
|
2609
|
+
});
|
|
2610
|
+
|
|
2611
|
+
// ../../node_modules/next/dist/client/image-component.js
|
|
2612
|
+
var require_image_component = __commonJS({
|
|
2613
|
+
"../../node_modules/next/dist/client/image-component.js"(exports, module2) {
|
|
2614
|
+
"use strict";
|
|
2615
|
+
"use client";
|
|
2616
|
+
Object.defineProperty(exports, "__esModule", {
|
|
2617
|
+
value: true
|
|
2618
|
+
});
|
|
2619
|
+
Object.defineProperty(exports, "Image", {
|
|
2620
|
+
enumerable: true,
|
|
2621
|
+
get: /* @__PURE__ */ __name(function() {
|
|
2622
|
+
return Image2;
|
|
2623
|
+
}, "get")
|
|
2624
|
+
});
|
|
2625
|
+
var _interop_require_default = require_interop_require_default();
|
|
2626
|
+
var _interop_require_wildcard = require_interop_require_wildcard();
|
|
2627
|
+
var _jsxruntime = require("react/jsx-runtime");
|
|
2628
|
+
var _react = /* @__PURE__ */ _interop_require_wildcard._(require("react"));
|
|
2629
|
+
var _reactdom = /* @__PURE__ */ _interop_require_default._(require("react-dom"));
|
|
2630
|
+
var _head = /* @__PURE__ */ _interop_require_default._(require_head());
|
|
2631
|
+
var _getimgprops = require_get_img_props();
|
|
2632
|
+
var _imageconfig = require_image_config();
|
|
2633
|
+
var _imageconfigcontextsharedruntime = require_image_config_context_shared_runtime();
|
|
2634
|
+
var _warnonce = require_warn_once();
|
|
2635
|
+
var _routercontextsharedruntime = require_router_context_shared_runtime();
|
|
2636
|
+
var _imageloader = /* @__PURE__ */ _interop_require_default._(require_image_loader());
|
|
2637
|
+
var _usemergedref = require_use_merged_ref();
|
|
2638
|
+
var configEnv = process.env.__NEXT_IMAGE_OPTS;
|
|
2639
|
+
if (typeof window === "undefined") {
|
|
2640
|
+
;
|
|
2641
|
+
globalThis.__NEXT_IMAGE_IMPORTED = true;
|
|
2642
|
+
}
|
|
2643
|
+
function handleLoading(img, placeholder, onLoadRef, onLoadingCompleteRef, setBlurComplete, unoptimized, sizesInput) {
|
|
2644
|
+
const src = img == null ? void 0 : img.src;
|
|
2645
|
+
if (!img || img["data-loaded-src"] === src) {
|
|
2646
|
+
return;
|
|
2647
|
+
}
|
|
2648
|
+
img["data-loaded-src"] = src;
|
|
2649
|
+
const p = "decode" in img ? img.decode() : Promise.resolve();
|
|
2650
|
+
p.catch(() => {
|
|
2651
|
+
}).then(() => {
|
|
2652
|
+
if (!img.parentElement || !img.isConnected) {
|
|
2653
|
+
return;
|
|
2654
|
+
}
|
|
2655
|
+
if (placeholder !== "empty") {
|
|
2656
|
+
setBlurComplete(true);
|
|
2657
|
+
}
|
|
2658
|
+
if (onLoadRef == null ? void 0 : onLoadRef.current) {
|
|
2659
|
+
const event = new Event("load");
|
|
2660
|
+
Object.defineProperty(event, "target", {
|
|
2661
|
+
writable: false,
|
|
2662
|
+
value: img
|
|
2663
|
+
});
|
|
2664
|
+
let prevented = false;
|
|
2665
|
+
let stopped = false;
|
|
2666
|
+
onLoadRef.current({
|
|
2667
|
+
...event,
|
|
2668
|
+
nativeEvent: event,
|
|
2669
|
+
currentTarget: img,
|
|
2670
|
+
target: img,
|
|
2671
|
+
isDefaultPrevented: /* @__PURE__ */ __name(() => prevented, "isDefaultPrevented"),
|
|
2672
|
+
isPropagationStopped: /* @__PURE__ */ __name(() => stopped, "isPropagationStopped"),
|
|
2673
|
+
persist: /* @__PURE__ */ __name(() => {
|
|
2674
|
+
}, "persist"),
|
|
2675
|
+
preventDefault: /* @__PURE__ */ __name(() => {
|
|
2676
|
+
prevented = true;
|
|
2677
|
+
event.preventDefault();
|
|
2678
|
+
}, "preventDefault"),
|
|
2679
|
+
stopPropagation: /* @__PURE__ */ __name(() => {
|
|
2680
|
+
stopped = true;
|
|
2681
|
+
event.stopPropagation();
|
|
2682
|
+
}, "stopPropagation")
|
|
2683
|
+
});
|
|
2684
|
+
}
|
|
2685
|
+
if (onLoadingCompleteRef == null ? void 0 : onLoadingCompleteRef.current) {
|
|
2686
|
+
onLoadingCompleteRef.current(img);
|
|
2687
|
+
}
|
|
2688
|
+
if (process.env.NODE_ENV !== "production") {
|
|
2689
|
+
const origSrc = new URL(src, "http://n").searchParams.get("url") || src;
|
|
2690
|
+
if (img.getAttribute("data-nimg") === "fill") {
|
|
2691
|
+
if (!unoptimized && (!sizesInput || sizesInput === "100vw")) {
|
|
2692
|
+
let widthViewportRatio = img.getBoundingClientRect().width / window.innerWidth;
|
|
2693
|
+
if (widthViewportRatio < 0.6) {
|
|
2694
|
+
if (sizesInput === "100vw") {
|
|
2695
|
+
(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');
|
|
2696
|
+
} else {
|
|
2697
|
+
(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');
|
|
2698
|
+
}
|
|
2699
|
+
}
|
|
2700
|
+
}
|
|
2701
|
+
if (img.parentElement) {
|
|
2702
|
+
const { position } = window.getComputedStyle(img.parentElement);
|
|
2703
|
+
const valid = [
|
|
2704
|
+
"absolute",
|
|
2705
|
+
"fixed",
|
|
2706
|
+
"relative"
|
|
2707
|
+
];
|
|
2708
|
+
if (!valid.includes(position)) {
|
|
2709
|
+
(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(",") + ".");
|
|
2710
|
+
}
|
|
2711
|
+
}
|
|
2712
|
+
if (img.height === 0) {
|
|
2713
|
+
(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.');
|
|
2714
|
+
}
|
|
2715
|
+
}
|
|
2716
|
+
const heightModified = img.height.toString() !== img.getAttribute("height");
|
|
2717
|
+
const widthModified = img.width.toString() !== img.getAttribute("width");
|
|
2718
|
+
if (heightModified && !widthModified || !heightModified && widthModified) {
|
|
2719
|
+
(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.`);
|
|
2720
|
+
}
|
|
2721
|
+
}
|
|
2722
|
+
});
|
|
2723
|
+
}
|
|
2724
|
+
__name(handleLoading, "handleLoading");
|
|
2725
|
+
function getDynamicProps(fetchPriority) {
|
|
2726
|
+
if (Boolean(_react.use)) {
|
|
2727
|
+
return {
|
|
2728
|
+
fetchPriority
|
|
2729
|
+
};
|
|
2730
|
+
}
|
|
2731
|
+
return {
|
|
2732
|
+
fetchpriority: fetchPriority
|
|
2733
|
+
};
|
|
2734
|
+
}
|
|
2735
|
+
__name(getDynamicProps, "getDynamicProps");
|
|
2736
|
+
var ImageElement = /* @__PURE__ */ (0, _react.forwardRef)((param, forwardedRef) => {
|
|
2737
|
+
let { src, srcSet, sizes, height, width, decoding, className, style, fetchPriority, placeholder, loading, unoptimized, fill, onLoadRef, onLoadingCompleteRef, setBlurComplete, setShowAltText, sizesInput, onLoad, onError, ...rest } = param;
|
|
2738
|
+
const ownRef = (0, _react.useCallback)((img) => {
|
|
2739
|
+
if (!img) {
|
|
2740
|
+
return;
|
|
2741
|
+
}
|
|
2742
|
+
if (onError) {
|
|
2743
|
+
img.src = img.src;
|
|
2744
|
+
}
|
|
2745
|
+
if (process.env.NODE_ENV !== "production") {
|
|
2746
|
+
if (!src) {
|
|
2747
|
+
console.error('Image is missing required "src" property:', img);
|
|
2748
|
+
}
|
|
2749
|
+
if (img.getAttribute("alt") === null) {
|
|
2750
|
+
console.error('Image is missing required "alt" property. Please add Alternative Text to describe the image for screen readers and search engines.');
|
|
2751
|
+
}
|
|
2752
|
+
}
|
|
2753
|
+
if (img.complete) {
|
|
2754
|
+
handleLoading(img, placeholder, onLoadRef, onLoadingCompleteRef, setBlurComplete, unoptimized, sizesInput);
|
|
2755
|
+
}
|
|
2756
|
+
}, [
|
|
2757
|
+
src,
|
|
2758
|
+
placeholder,
|
|
2759
|
+
onLoadRef,
|
|
2760
|
+
onLoadingCompleteRef,
|
|
2761
|
+
setBlurComplete,
|
|
2762
|
+
onError,
|
|
2763
|
+
unoptimized,
|
|
2764
|
+
sizesInput
|
|
2765
|
+
]);
|
|
2766
|
+
const ref = (0, _usemergedref.useMergedRef)(forwardedRef, ownRef);
|
|
2767
|
+
return /* @__PURE__ */ (0, _jsxruntime.jsx)("img", {
|
|
2768
|
+
...rest,
|
|
2769
|
+
...getDynamicProps(fetchPriority),
|
|
2770
|
+
// It's intended to keep `loading` before `src` because React updates
|
|
2771
|
+
// props in order which causes Safari/Firefox to not lazy load properly.
|
|
2772
|
+
// See https://github.com/facebook/react/issues/25883
|
|
2773
|
+
loading,
|
|
2774
|
+
width,
|
|
2775
|
+
height,
|
|
2776
|
+
decoding,
|
|
2777
|
+
"data-nimg": fill ? "fill" : "1",
|
|
2778
|
+
className,
|
|
2779
|
+
style,
|
|
2780
|
+
// It's intended to keep `src` the last attribute because React updates
|
|
2781
|
+
// attributes in order. If we keep `src` the first one, Safari will
|
|
2782
|
+
// immediately start to fetch `src`, before `sizes` and `srcSet` are even
|
|
2783
|
+
// updated by React. That causes multiple unnecessary requests if `srcSet`
|
|
2784
|
+
// and `sizes` are defined.
|
|
2785
|
+
// This bug cannot be reproduced in Chrome or Firefox.
|
|
2786
|
+
sizes,
|
|
2787
|
+
srcSet,
|
|
2788
|
+
src,
|
|
2789
|
+
ref,
|
|
2790
|
+
onLoad: /* @__PURE__ */ __name((event) => {
|
|
2791
|
+
const img = event.currentTarget;
|
|
2792
|
+
handleLoading(img, placeholder, onLoadRef, onLoadingCompleteRef, setBlurComplete, unoptimized, sizesInput);
|
|
2793
|
+
}, "onLoad"),
|
|
2794
|
+
onError: /* @__PURE__ */ __name((event) => {
|
|
2795
|
+
setShowAltText(true);
|
|
2796
|
+
if (placeholder !== "empty") {
|
|
2797
|
+
setBlurComplete(true);
|
|
2798
|
+
}
|
|
2799
|
+
if (onError) {
|
|
2800
|
+
onError(event);
|
|
2801
|
+
}
|
|
2802
|
+
}, "onError")
|
|
2803
|
+
});
|
|
2804
|
+
});
|
|
2805
|
+
function ImagePreload(param) {
|
|
2806
|
+
let { isAppRouter, imgAttributes } = param;
|
|
2807
|
+
const opts = {
|
|
2808
|
+
as: "image",
|
|
2809
|
+
imageSrcSet: imgAttributes.srcSet,
|
|
2810
|
+
imageSizes: imgAttributes.sizes,
|
|
2811
|
+
crossOrigin: imgAttributes.crossOrigin,
|
|
2812
|
+
referrerPolicy: imgAttributes.referrerPolicy,
|
|
2813
|
+
...getDynamicProps(imgAttributes.fetchPriority)
|
|
2814
|
+
};
|
|
2815
|
+
if (isAppRouter && _reactdom.default.preload) {
|
|
2816
|
+
_reactdom.default.preload(
|
|
2817
|
+
imgAttributes.src,
|
|
2818
|
+
// @ts-expect-error TODO: upgrade to `@types/react-dom@18.3.x`
|
|
2819
|
+
opts
|
|
2820
|
+
);
|
|
2821
|
+
return null;
|
|
2822
|
+
}
|
|
2823
|
+
return /* @__PURE__ */ (0, _jsxruntime.jsx)(_head.default, {
|
|
2824
|
+
children: /* @__PURE__ */ (0, _jsxruntime.jsx)("link", {
|
|
2825
|
+
rel: "preload",
|
|
2826
|
+
// Note how we omit the `href` attribute, as it would only be relevant
|
|
2827
|
+
// for browsers that do not support `imagesrcset`, and in those cases
|
|
2828
|
+
// it would cause the incorrect image to be preloaded.
|
|
2829
|
+
//
|
|
2830
|
+
// https://html.spec.whatwg.org/multipage/semantics.html#attr-link-imagesrcset
|
|
2831
|
+
href: imgAttributes.srcSet ? void 0 : imgAttributes.src,
|
|
2832
|
+
...opts
|
|
2833
|
+
}, "__nimg-" + imgAttributes.src + imgAttributes.srcSet + imgAttributes.sizes)
|
|
2834
|
+
});
|
|
2835
|
+
}
|
|
2836
|
+
__name(ImagePreload, "ImagePreload");
|
|
2837
|
+
var Image2 = /* @__PURE__ */ (0, _react.forwardRef)((props, forwardedRef) => {
|
|
2838
|
+
const pagesRouter = (0, _react.useContext)(_routercontextsharedruntime.RouterContext);
|
|
2839
|
+
const isAppRouter = !pagesRouter;
|
|
2840
|
+
const configContext = (0, _react.useContext)(_imageconfigcontextsharedruntime.ImageConfigContext);
|
|
2841
|
+
const config = (0, _react.useMemo)(() => {
|
|
2842
|
+
var _c_qualities;
|
|
2843
|
+
const c = configEnv || configContext || _imageconfig.imageConfigDefault;
|
|
2844
|
+
const allSizes = [
|
|
2845
|
+
...c.deviceSizes,
|
|
2846
|
+
...c.imageSizes
|
|
2847
|
+
].sort((a, b) => a - b);
|
|
2848
|
+
const deviceSizes = c.deviceSizes.sort((a, b) => a - b);
|
|
2849
|
+
const qualities = (_c_qualities = c.qualities) == null ? void 0 : _c_qualities.sort((a, b) => a - b);
|
|
2850
|
+
return {
|
|
2851
|
+
...c,
|
|
2852
|
+
allSizes,
|
|
2853
|
+
deviceSizes,
|
|
2854
|
+
qualities
|
|
2855
|
+
};
|
|
2856
|
+
}, [
|
|
2857
|
+
configContext
|
|
2858
|
+
]);
|
|
2859
|
+
const { onLoad, onLoadingComplete } = props;
|
|
2860
|
+
const onLoadRef = (0, _react.useRef)(onLoad);
|
|
2861
|
+
(0, _react.useEffect)(() => {
|
|
2862
|
+
onLoadRef.current = onLoad;
|
|
2863
|
+
}, [
|
|
2864
|
+
onLoad
|
|
2865
|
+
]);
|
|
2866
|
+
const onLoadingCompleteRef = (0, _react.useRef)(onLoadingComplete);
|
|
2867
|
+
(0, _react.useEffect)(() => {
|
|
2868
|
+
onLoadingCompleteRef.current = onLoadingComplete;
|
|
2869
|
+
}, [
|
|
2870
|
+
onLoadingComplete
|
|
2871
|
+
]);
|
|
2872
|
+
const [blurComplete, setBlurComplete] = (0, _react.useState)(false);
|
|
2873
|
+
const [showAltText, setShowAltText] = (0, _react.useState)(false);
|
|
2874
|
+
const { props: imgAttributes, meta: imgMeta } = (0, _getimgprops.getImgProps)(props, {
|
|
2875
|
+
defaultLoader: _imageloader.default,
|
|
2876
|
+
imgConf: config,
|
|
2877
|
+
blurComplete,
|
|
2878
|
+
showAltText
|
|
2879
|
+
});
|
|
2880
|
+
return /* @__PURE__ */ (0, _jsxruntime.jsxs)(_jsxruntime.Fragment, {
|
|
2881
|
+
children: [
|
|
2882
|
+
/* @__PURE__ */ (0, _jsxruntime.jsx)(ImageElement, {
|
|
2883
|
+
...imgAttributes,
|
|
2884
|
+
unoptimized: imgMeta.unoptimized,
|
|
2885
|
+
placeholder: imgMeta.placeholder,
|
|
2886
|
+
fill: imgMeta.fill,
|
|
2887
|
+
onLoadRef,
|
|
2888
|
+
onLoadingCompleteRef,
|
|
2889
|
+
setBlurComplete,
|
|
2890
|
+
setShowAltText,
|
|
2891
|
+
sizesInput: props.sizes,
|
|
2892
|
+
ref: forwardedRef
|
|
2893
|
+
}),
|
|
2894
|
+
imgMeta.priority ? /* @__PURE__ */ (0, _jsxruntime.jsx)(ImagePreload, {
|
|
2895
|
+
isAppRouter,
|
|
2896
|
+
imgAttributes
|
|
2897
|
+
}) : null
|
|
2898
|
+
]
|
|
2899
|
+
});
|
|
2900
|
+
});
|
|
2901
|
+
if ((typeof exports.default === "function" || typeof exports.default === "object" && exports.default !== null) && typeof exports.default.__esModule === "undefined") {
|
|
2902
|
+
Object.defineProperty(exports.default, "__esModule", { value: true });
|
|
2903
|
+
Object.assign(exports.default, exports);
|
|
2904
|
+
module2.exports = exports.default;
|
|
2905
|
+
}
|
|
2906
|
+
}
|
|
2907
|
+
});
|
|
2908
|
+
|
|
2909
|
+
// ../../node_modules/next/dist/shared/lib/image-external.js
|
|
2910
|
+
var require_image_external = __commonJS({
|
|
2911
|
+
"../../node_modules/next/dist/shared/lib/image-external.js"(exports) {
|
|
2912
|
+
"use strict";
|
|
2913
|
+
Object.defineProperty(exports, "__esModule", {
|
|
2914
|
+
value: true
|
|
2915
|
+
});
|
|
2916
|
+
function _export(target, all) {
|
|
2917
|
+
for (var name in all) Object.defineProperty(target, name, {
|
|
2918
|
+
enumerable: true,
|
|
2919
|
+
get: all[name]
|
|
2920
|
+
});
|
|
2921
|
+
}
|
|
2922
|
+
__name(_export, "_export");
|
|
2923
|
+
_export(exports, {
|
|
2924
|
+
default: /* @__PURE__ */ __name(function() {
|
|
2925
|
+
return _default;
|
|
2926
|
+
}, "default"),
|
|
2927
|
+
getImageProps: /* @__PURE__ */ __name(function() {
|
|
2928
|
+
return getImageProps;
|
|
2929
|
+
}, "getImageProps")
|
|
2930
|
+
});
|
|
2931
|
+
var _interop_require_default = require_interop_require_default();
|
|
2932
|
+
var _getimgprops = require_get_img_props();
|
|
2933
|
+
var _imagecomponent = require_image_component();
|
|
2934
|
+
var _imageloader = /* @__PURE__ */ _interop_require_default._(require_image_loader());
|
|
2935
|
+
function getImageProps(imgProps) {
|
|
2936
|
+
const { props } = (0, _getimgprops.getImgProps)(imgProps, {
|
|
2937
|
+
defaultLoader: _imageloader.default,
|
|
2938
|
+
// This is replaced by webpack define plugin
|
|
2939
|
+
imgConf: process.env.__NEXT_IMAGE_OPTS
|
|
2940
|
+
});
|
|
2941
|
+
for (const [key, value] of Object.entries(props)) {
|
|
2942
|
+
if (value === void 0) {
|
|
2943
|
+
delete props[key];
|
|
2944
|
+
}
|
|
2945
|
+
}
|
|
2946
|
+
return {
|
|
2947
|
+
props
|
|
2948
|
+
};
|
|
2949
|
+
}
|
|
2950
|
+
__name(getImageProps, "getImageProps");
|
|
2951
|
+
var _default = _imagecomponent.Image;
|
|
2952
|
+
}
|
|
2953
|
+
});
|
|
2954
|
+
|
|
2955
|
+
// ../../node_modules/next/image.js
|
|
2956
|
+
var require_image = __commonJS({
|
|
2957
|
+
"../../node_modules/next/image.js"(exports, module2) {
|
|
2958
|
+
"use strict";
|
|
2959
|
+
module2.exports = require_image_external();
|
|
2960
|
+
}
|
|
2961
|
+
});
|
|
2962
|
+
|
|
2963
|
+
// src/index.ts
|
|
2964
|
+
var index_exports = {};
|
|
2965
|
+
__export(index_exports, {
|
|
2966
|
+
Illust: () => Illust,
|
|
2967
|
+
prefetchIllust: () => prefetchIllust
|
|
2968
|
+
});
|
|
2969
|
+
module.exports = __toCommonJS(index_exports);
|
|
2970
|
+
|
|
2971
|
+
// src/constants/size.ts
|
|
2972
|
+
var ratio = {
|
|
2973
|
+
"4:3": { width: 180, height: 135 },
|
|
2974
|
+
"1:1": { width: 250, height: 250 }
|
|
2975
|
+
};
|
|
2976
|
+
var illustSize = {
|
|
2977
|
+
"hero-gift": ratio["1:1"],
|
|
2978
|
+
"hero-search": ratio["1:1"],
|
|
2979
|
+
"mini-documents-2": ratio["1:1"],
|
|
2980
|
+
"mini-documents-3": ratio["1:1"],
|
|
2981
|
+
"mini-documents-4": ratio["1:1"],
|
|
2982
|
+
"mini-documents-5": ratio["1:1"],
|
|
2983
|
+
"mini-documents": ratio["1:1"],
|
|
2984
|
+
"mini-egg": ratio["1:1"],
|
|
2985
|
+
"mini-gift": ratio["1:1"],
|
|
2986
|
+
"mini-graduation_hat": ratio["1:1"],
|
|
2987
|
+
"mini-search": ratio["1:1"],
|
|
2988
|
+
"mini-ticket": ratio["1:1"],
|
|
2989
|
+
"mini-window": ratio["1:1"],
|
|
2990
|
+
"spot-catch_star": ratio["4:3"],
|
|
2991
|
+
"spot-clap": ratio["4:3"],
|
|
2992
|
+
"spot-empty": ratio["4:3"],
|
|
2993
|
+
"spot-no_search": ratio["4:3"],
|
|
2994
|
+
"spot-search-2": ratio["4:3"],
|
|
2995
|
+
"spot-search-3": ratio["4:3"],
|
|
2996
|
+
"spot-search-4": ratio["4:3"],
|
|
2997
|
+
"spot-search-5": ratio["4:3"],
|
|
2998
|
+
"spot-search": ratio["4:3"],
|
|
2999
|
+
"spot-write": ratio["4:3"],
|
|
3000
|
+
"spot-gift": ratio["4:3"],
|
|
3001
|
+
"mini-empty": ratio["1:1"],
|
|
3002
|
+
"spot-team": ratio["4:3"]
|
|
3003
|
+
};
|
|
3004
|
+
|
|
3005
|
+
// src/components/index.tsx
|
|
3006
|
+
var import_image = __toESM(require_image());
|
|
3007
|
+
|
|
3008
|
+
// src/constants/path.ts
|
|
3009
|
+
var ILLUST = "https://assets.getliner.com/common/illust";
|
|
3010
|
+
var DARK_MODE_ILLUST_PREFIX = `${ILLUST}/dark/`;
|
|
3011
|
+
var LIGHT_MODE_ILLUST_PREFIX = `${ILLUST}/light/`;
|
|
3012
|
+
|
|
3013
|
+
// src/hooks/useIllust.ts
|
|
3014
|
+
var import_design_token = require("@liner-fe/design-token");
|
|
3015
|
+
var useIllust = /* @__PURE__ */ __name(({ darkSrc, src }) => {
|
|
3016
|
+
const { isDarkMode } = (0, import_design_token.useDarkTheme)();
|
|
3017
|
+
const sourcePrefix = (() => {
|
|
3018
|
+
if (isDarkMode) {
|
|
3019
|
+
if (darkSrc?.inverse) {
|
|
3020
|
+
return LIGHT_MODE_ILLUST_PREFIX;
|
|
3021
|
+
}
|
|
3022
|
+
return DARK_MODE_ILLUST_PREFIX;
|
|
3023
|
+
}
|
|
3024
|
+
if (src.inverse === false) {
|
|
3025
|
+
return DARK_MODE_ILLUST_PREFIX;
|
|
3026
|
+
}
|
|
3027
|
+
return LIGHT_MODE_ILLUST_PREFIX;
|
|
3028
|
+
})();
|
|
3029
|
+
const currentSourceByColorTheme = isDarkMode ? darkSrc?.name || src.name : src.name;
|
|
3030
|
+
return { sourcePrefix, currentSourceByColorTheme, isDarkMode };
|
|
3031
|
+
}, "useIllust");
|
|
3032
|
+
|
|
3033
|
+
// src/components/index.tsx
|
|
3034
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
3035
|
+
var Illust = /* @__PURE__ */ __name((props) => {
|
|
3036
|
+
const { src, width, margin } = props;
|
|
3037
|
+
const { sourcePrefix, currentSourceByColorTheme } = useIllust({
|
|
3038
|
+
darkSrc: src.dark,
|
|
3039
|
+
src: src.light
|
|
3040
|
+
});
|
|
3041
|
+
const aspectRatio = illustSize[currentSourceByColorTheme] ? illustSize[currentSourceByColorTheme].width / illustSize[currentSourceByColorTheme].height : void 0;
|
|
3042
|
+
const css = {
|
|
3043
|
+
width,
|
|
3044
|
+
margin
|
|
3045
|
+
};
|
|
3046
|
+
const source = `${sourcePrefix}${currentSourceByColorTheme}.webp`;
|
|
3047
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { style: css, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
3048
|
+
import_image.default,
|
|
3049
|
+
{
|
|
3050
|
+
...props,
|
|
3051
|
+
alt: currentSourceByColorTheme,
|
|
3052
|
+
src: source,
|
|
3053
|
+
width,
|
|
3054
|
+
height: aspectRatio ? width / aspectRatio : width,
|
|
3055
|
+
unoptimized: true
|
|
3056
|
+
}
|
|
3057
|
+
) });
|
|
3058
|
+
}, "Illust");
|
|
3059
|
+
|
|
3060
|
+
// src/utils/illust.ts
|
|
3061
|
+
var prefetchIllust = /* @__PURE__ */ __name(async ({
|
|
3062
|
+
name,
|
|
3063
|
+
isDark = false
|
|
3064
|
+
}) => await fetch(`${ILLUST}${isDark ? "/dark/" : "/light/"}${name}.webp`), "prefetchIllust");
|