@helpwave/hightide
Version:
helpwave's component and theming library
1,200 lines (1,186 loc) • 433 kB
JavaScript
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
}) : x)(function(x) {
if (typeof require !== "undefined") return require.apply(this, arguments);
throw Error('Dynamic require of "' + x + '" is not supported');
});
var __commonJS = (cb, mod) => function __require2() {
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
// If the importer is in node compatibility mode or this is not an ESM
// file that has been converted to a CommonJS file using a Babel-
// compatible transform (i.e. "__esModule" has not been set), then set
// "default" to the CommonJS "module.exports" for node compatibility.
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
mod
));
// node_modules/@swc/helpers/cjs/_interop_require_default.cjs
var require_interop_require_default = __commonJS({
"node_modules/@swc/helpers/cjs/_interop_require_default.cjs"(exports) {
"use strict";
function _interop_require_default(obj) {
return obj && obj.__esModule ? obj : { default: obj };
}
exports._ = _interop_require_default;
}
});
// node_modules/next/dist/shared/lib/utils/warn-once.js
var require_warn_once = __commonJS({
"node_modules/next/dist/shared/lib/utils/warn-once.js"(exports) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "warnOnce", {
enumerable: true,
get: function() {
return warnOnce;
}
});
var warnOnce = (_) => {
};
if (process.env.NODE_ENV !== "production") {
const warnings = /* @__PURE__ */ new Set();
warnOnce = (msg) => {
if (!warnings.has(msg)) {
console.warn(msg);
}
warnings.add(msg);
};
}
}
});
// node_modules/next/dist/shared/lib/image-blur-svg.js
var require_image_blur_svg = __commonJS({
"node_modules/next/dist/shared/lib/image-blur-svg.js"(exports) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "getImageBlurSvg", {
enumerable: true,
get: function() {
return getImageBlurSvg;
}
});
function getImageBlurSvg(param) {
let { widthInt, heightInt, blurWidth, blurHeight, blurDataURL, objectFit } = param;
const std = 20;
const svgWidth = blurWidth ? blurWidth * 40 : widthInt;
const svgHeight = blurHeight ? blurHeight * 40 : heightInt;
const viewBox = svgWidth && svgHeight ? "viewBox='0 0 " + svgWidth + " " + svgHeight + "'" : "";
const preserveAspectRatio = viewBox ? "none" : objectFit === "contain" ? "xMidYMid" : objectFit === "cover" ? "xMidYMid slice" : "none";
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";
}
}
});
// node_modules/next/dist/shared/lib/image-config.js
var require_image_config = __commonJS({
"node_modules/next/dist/shared/lib/image-config.js"(exports) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
function _export(target, all) {
for (var name in all) Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
VALID_LOADERS: function() {
return VALID_LOADERS;
},
imageConfigDefault: function() {
return imageConfigDefault;
}
});
var VALID_LOADERS = [
"default",
"imgix",
"cloudinary",
"akamai",
"custom"
];
var imageConfigDefault = {
deviceSizes: [
640,
750,
828,
1080,
1200,
1920,
2048,
3840
],
imageSizes: [
16,
32,
48,
64,
96,
128,
256,
384
],
path: "/_next/image",
loader: "default",
loaderFile: "",
domains: [],
disableStaticImages: false,
minimumCacheTTL: 60,
formats: [
"image/webp"
],
dangerouslyAllowSVG: false,
contentSecurityPolicy: "script-src 'none'; frame-src 'none'; sandbox;",
contentDispositionType: "attachment",
localPatterns: void 0,
remotePatterns: [],
qualities: void 0,
unoptimized: false
};
}
});
// node_modules/next/dist/shared/lib/get-img-props.js
var require_get_img_props = __commonJS({
"node_modules/next/dist/shared/lib/get-img-props.js"(exports) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "getImgProps", {
enumerable: true,
get: function() {
return getImgProps;
}
});
var _warnonce = require_warn_once();
var _imageblursvg = require_image_blur_svg();
var _imageconfig = require_image_config();
var VALID_LOADING_VALUES = [
"lazy",
"eager",
void 0
];
var INVALID_BACKGROUND_SIZE_VALUES = [
"-moz-initial",
"fill",
"none",
"scale-down",
void 0
];
function isStaticRequire(src) {
return src.default !== void 0;
}
function isStaticImageData(src) {
return src.src !== void 0;
}
function isStaticImport(src) {
return !!src && typeof src === "object" && (isStaticRequire(src) || isStaticImageData(src));
}
var allImgs = /* @__PURE__ */ new Map();
var perfObserver;
function getInt(x) {
if (typeof x === "undefined") {
return x;
}
if (typeof x === "number") {
return Number.isFinite(x) ? x : NaN;
}
if (typeof x === "string" && /^[0-9]+$/.test(x)) {
return parseInt(x, 10);
}
return NaN;
}
function getWidths(param, width, sizes) {
let { deviceSizes, allSizes } = param;
if (sizes) {
const viewportWidthRe = /(^|\s)(1?\d?\d)vw/g;
const percentSizes = [];
for (let match; match = viewportWidthRe.exec(sizes); match) {
percentSizes.push(parseInt(match[2]));
}
if (percentSizes.length) {
const smallestRatio = Math.min(...percentSizes) * 0.01;
return {
widths: allSizes.filter((s) => s >= deviceSizes[0] * smallestRatio),
kind: "w"
};
}
return {
widths: allSizes,
kind: "w"
};
}
if (typeof width !== "number") {
return {
widths: deviceSizes,
kind: "w"
};
}
const widths = [
...new Set(
// > This means that most OLED screens that say they are 3x resolution,
// > are actually 3x in the green color, but only 1.5x in the red and
// > blue colors. Showing a 3x resolution image in the app vs a 2x
// > resolution image will be visually the same, though the 3x image
// > takes significantly more data. Even true 3x resolution screens are
// > wasteful as the human eye cannot see that level of detail without
// > something like a magnifying glass.
// https://blog.twitter.com/engineering/en_us/topics/infrastructure/2019/capping-image-fidelity-on-ultra-high-resolution-devices.html
[
width,
width * 2
/*, width * 3*/
].map((w) => allSizes.find((p) => p >= w) || allSizes[allSizes.length - 1])
)
];
return {
widths,
kind: "x"
};
}
function generateImgAttrs(param) {
let { config, src, unoptimized, width, quality, sizes, loader } = param;
if (unoptimized) {
return {
src,
srcSet: void 0,
sizes: void 0
};
}
const { widths, kind } = getWidths(config, width, sizes);
const last = widths.length - 1;
return {
sizes: !sizes && kind === "w" ? "100vw" : sizes,
srcSet: widths.map((w, i) => loader({
config,
src,
quality,
width: w
}) + " " + (kind === "w" ? w : i + 1) + kind).join(", "),
// It's intended to keep `src` the last attribute because React updates
// attributes in order. If we keep `src` the first one, Safari will
// immediately start to fetch `src`, before `sizes` and `srcSet` are even
// updated by React. That causes multiple unnecessary requests if `srcSet`
// and `sizes` are defined.
// This bug cannot be reproduced in Chrome or Firefox.
src: loader({
config,
src,
quality,
width: widths[last]
})
};
}
function getImgProps(param, _state) {
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;
const { imgConf, showAltText, blurComplete, defaultLoader } = _state;
let config;
let c = imgConf || _imageconfig.imageConfigDefault;
if ("allSizes" in c) {
config = c;
} else {
var _c_qualities;
const allSizes = [
...c.deviceSizes,
...c.imageSizes
].sort((a, b) => a - b);
const deviceSizes = c.deviceSizes.sort((a, b) => a - b);
const qualities = (_c_qualities = c.qualities) == null ? void 0 : _c_qualities.sort((a, b) => a - b);
config = {
...c,
allSizes,
deviceSizes,
qualities
};
}
if (typeof defaultLoader === "undefined") {
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", {
value: "E163",
enumerable: false,
configurable: true
});
}
let loader = rest.loader || defaultLoader;
delete rest.loader;
delete rest.srcSet;
const isDefaultLoader = "__next_img_default" in loader;
if (isDefaultLoader) {
if (config.loader === "custom") {
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", {
value: "E252",
enumerable: false,
configurable: true
});
}
} else {
const customImageLoader = loader;
loader = (obj) => {
const { config: _, ...opts } = obj;
return customImageLoader(opts);
};
}
if (layout) {
if (layout === "fill") {
fill = true;
}
const layoutToStyle = {
intrinsic: {
maxWidth: "100%",
height: "auto"
},
responsive: {
width: "100%",
height: "auto"
}
};
const layoutToSizes = {
responsive: "100vw",
fill: "100vw"
};
const layoutStyle = layoutToStyle[layout];
if (layoutStyle) {
style = {
...style,
...layoutStyle
};
}
const layoutSizes = layoutToSizes[layout];
if (layoutSizes && !sizes) {
sizes = layoutSizes;
}
}
let staticSrc = "";
let widthInt = getInt(width);
let heightInt = getInt(height);
let blurWidth;
let blurHeight;
if (isStaticImport(src)) {
const staticImageData = isStaticRequire(src) ? src.default : src;
if (!staticImageData.src) {
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", {
value: "E460",
enumerable: false,
configurable: true
});
}
if (!staticImageData.height || !staticImageData.width) {
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", {
value: "E48",
enumerable: false,
configurable: true
});
}
blurWidth = staticImageData.blurWidth;
blurHeight = staticImageData.blurHeight;
blurDataURL = blurDataURL || staticImageData.blurDataURL;
staticSrc = staticImageData.src;
if (!fill) {
if (!widthInt && !heightInt) {
widthInt = staticImageData.width;
heightInt = staticImageData.height;
} else if (widthInt && !heightInt) {
const ratio = widthInt / staticImageData.width;
heightInt = Math.round(staticImageData.height * ratio);
} else if (!widthInt && heightInt) {
const ratio = heightInt / staticImageData.height;
widthInt = Math.round(staticImageData.width * ratio);
}
}
}
src = typeof src === "string" ? src : staticSrc;
let isLazy = !priority && (loading === "lazy" || typeof loading === "undefined");
if (!src || src.startsWith("data:") || src.startsWith("blob:")) {
unoptimized = true;
isLazy = false;
}
if (config.unoptimized) {
unoptimized = true;
}
if (isDefaultLoader && !config.dangerouslyAllowSVG && src.split("?", 1)[0].endsWith(".svg")) {
unoptimized = true;
}
const qualityInt = getInt(quality);
if (process.env.NODE_ENV !== "production") {
if (config.output === "export" && isDefaultLoader && !unoptimized) {
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", {
value: "E500",
enumerable: false,
configurable: true
});
}
if (!src) {
unoptimized = true;
} else {
if (fill) {
if (width) {
throw Object.defineProperty(new Error('Image with src "' + src + '" has both "width" and "fill" properties. Only one should be used.'), "__NEXT_ERROR_CODE", {
value: "E96",
enumerable: false,
configurable: true
});
}
if (height) {
throw Object.defineProperty(new Error('Image with src "' + src + '" has both "height" and "fill" properties. Only one should be used.'), "__NEXT_ERROR_CODE", {
value: "E115",
enumerable: false,
configurable: true
});
}
if ((style == null ? void 0 : style.position) && style.position !== "absolute") {
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", {
value: "E216",
enumerable: false,
configurable: true
});
}
if ((style == null ? void 0 : style.width) && style.width !== "100%") {
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", {
value: "E73",
enumerable: false,
configurable: true
});
}
if ((style == null ? void 0 : style.height) && style.height !== "100%") {
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", {
value: "E404",
enumerable: false,
configurable: true
});
}
} else {
if (typeof widthInt === "undefined") {
throw Object.defineProperty(new Error('Image with src "' + src + '" is missing required "width" property.'), "__NEXT_ERROR_CODE", {
value: "E451",
enumerable: false,
configurable: true
});
} else if (isNaN(widthInt)) {
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", {
value: "E66",
enumerable: false,
configurable: true
});
}
if (typeof heightInt === "undefined") {
throw Object.defineProperty(new Error('Image with src "' + src + '" is missing required "height" property.'), "__NEXT_ERROR_CODE", {
value: "E397",
enumerable: false,
configurable: true
});
} else if (isNaN(heightInt)) {
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", {
value: "E444",
enumerable: false,
configurable: true
});
}
if (/^[\x00-\x20]/.test(src)) {
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", {
value: "E176",
enumerable: false,
configurable: true
});
}
if (/[\x00-\x20]$/.test(src)) {
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", {
value: "E21",
enumerable: false,
configurable: true
});
}
}
}
if (!VALID_LOADING_VALUES.includes(loading)) {
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", {
value: "E357",
enumerable: false,
configurable: true
});
}
if (priority && loading === "lazy") {
throw Object.defineProperty(new Error('Image with src "' + src + `" has both "priority" and "loading='lazy'" properties. Only one should be used.`), "__NEXT_ERROR_CODE", {
value: "E218",
enumerable: false,
configurable: true
});
}
if (placeholder !== "empty" && placeholder !== "blur" && !placeholder.startsWith("data:image/")) {
throw Object.defineProperty(new Error('Image with src "' + src + '" has invalid "placeholder" property "' + placeholder + '".'), "__NEXT_ERROR_CODE", {
value: "E431",
enumerable: false,
configurable: true
});
}
if (placeholder !== "empty") {
if (widthInt && heightInt && widthInt * heightInt < 1600) {
(0, _warnonce.warnOnce)('Image with src "' + src + '" is smaller than 40x40. Consider removing the "placeholder" property to improve performance.');
}
}
if (placeholder === "blur" && !blurDataURL) {
const VALID_BLUR_EXT = [
"jpeg",
"png",
"webp",
"avif"
];
throw Object.defineProperty(new Error('Image with src "' + src + `" has "placeholder='blur'" property but is missing the "blurDataURL" property.
Possible solutions:
- Add a "blurDataURL" property, the contents should be a small Data URL to represent the image
- 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", {
value: "E371",
enumerable: false,
configurable: true
});
}
if ("ref" in rest) {
(0, _warnonce.warnOnce)('Image with src "' + src + '" is using unsupported "ref" property. Consider using the "onLoad" property instead.');
}
if (!unoptimized && !isDefaultLoader) {
const urlStr = loader({
config,
src,
width: widthInt || 400,
quality: qualityInt || 75
});
let url;
try {
url = new URL(urlStr);
} catch (err) {
}
if (urlStr === src || url && url.pathname === src && !url.search) {
(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');
}
}
if (onLoadingComplete) {
(0, _warnonce.warnOnce)('Image with src "' + src + '" is using deprecated "onLoadingComplete" property. Please use the "onLoad" property instead.');
}
for (const [legacyKey, legacyValue] of Object.entries({
layout,
objectFit,
objectPosition,
lazyBoundary,
lazyRoot
})) {
if (legacyValue) {
(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');
}
}
if (typeof window !== "undefined" && !perfObserver && window.PerformanceObserver) {
perfObserver = new PerformanceObserver((entryList) => {
for (const entry of entryList.getEntries()) {
var _entry_element;
const imgSrc = (entry == null ? void 0 : (_entry_element = entry.element) == null ? void 0 : _entry_element.src) || "";
const lcpImage = allImgs.get(imgSrc);
if (lcpImage && !lcpImage.priority && lcpImage.placeholder === "empty" && !lcpImage.src.startsWith("data:") && !lcpImage.src.startsWith("blob:")) {
(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');
}
}
});
try {
perfObserver.observe({
type: "largest-contentful-paint",
buffered: true
});
} catch (err) {
console.error(err);
}
}
}
const imgStyle = Object.assign(fill ? {
position: "absolute",
height: "100%",
width: "100%",
left: 0,
top: 0,
right: 0,
bottom: 0,
objectFit,
objectPosition
} : {}, showAltText ? {} : {
color: "transparent"
}, style);
const backgroundImage = !blurComplete && placeholder !== "empty" ? placeholder === "blur" ? 'url("data:image/svg+xml;charset=utf-8,' + (0, _imageblursvg.getImageBlurSvg)({
widthInt,
heightInt,
blurWidth,
blurHeight,
blurDataURL: blurDataURL || "",
objectFit: imgStyle.objectFit
}) + '")' : 'url("' + placeholder + '")' : null;
const backgroundSize = !INVALID_BACKGROUND_SIZE_VALUES.includes(imgStyle.objectFit) ? imgStyle.objectFit : imgStyle.objectFit === "fill" ? "100% 100%" : "cover";
let placeholderStyle = backgroundImage ? {
backgroundSize,
backgroundPosition: imgStyle.objectPosition || "50% 50%",
backgroundRepeat: "no-repeat",
backgroundImage
} : {};
if (process.env.NODE_ENV === "development") {
if (placeholderStyle.backgroundImage && placeholder === "blur" && (blurDataURL == null ? void 0 : blurDataURL.startsWith("/"))) {
placeholderStyle.backgroundImage = 'url("' + blurDataURL + '")';
}
}
const imgAttributes = generateImgAttrs({
config,
src,
unoptimized,
width: widthInt,
quality: qualityInt,
sizes,
loader
});
if (process.env.NODE_ENV !== "production") {
if (typeof window !== "undefined") {
let fullUrl;
try {
fullUrl = new URL(imgAttributes.src);
} catch (e) {
fullUrl = new URL(imgAttributes.src, window.location.href);
}
allImgs.set(fullUrl.href, {
src,
priority,
placeholder
});
}
}
const props = {
...rest,
loading: isLazy ? "lazy" : loading,
fetchPriority,
width: widthInt,
height: heightInt,
decoding,
className,
style: {
...imgStyle,
...placeholderStyle
},
sizes: imgAttributes.sizes,
srcSet: imgAttributes.srcSet,
src: overrideSrc || imgAttributes.src
};
const meta = {
unoptimized,
priority,
placeholder,
fill
};
return {
props,
meta
};
}
}
});
// node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs
var require_interop_require_wildcard = __commonJS({
"node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs"(exports) {
"use strict";
function _getRequireWildcardCache(nodeInterop) {
if (typeof WeakMap !== "function") return null;
var cacheBabelInterop = /* @__PURE__ */ new WeakMap();
var cacheNodeInterop = /* @__PURE__ */ new WeakMap();
return (_getRequireWildcardCache = function(nodeInterop2) {
return nodeInterop2 ? cacheNodeInterop : cacheBabelInterop;
})(nodeInterop);
}
function _interop_require_wildcard(obj, nodeInterop) {
if (!nodeInterop && obj && obj.__esModule) return obj;
if (obj === null || typeof obj !== "object" && typeof obj !== "function") return { default: obj };
var cache = _getRequireWildcardCache(nodeInterop);
if (cache && cache.has(obj)) return cache.get(obj);
var newObj = { __proto__: null };
var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
for (var key in obj) {
if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
if (desc && (desc.get || desc.set)) Object.defineProperty(newObj, key, desc);
else newObj[key] = obj[key];
}
}
newObj.default = obj;
if (cache) cache.set(obj, newObj);
return newObj;
}
exports._ = _interop_require_wildcard;
}
});
// node_modules/next/dist/shared/lib/side-effect.js
var require_side_effect = __commonJS({
"node_modules/next/dist/shared/lib/side-effect.js"(exports) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "default", {
enumerable: true,
get: function() {
return SideEffect;
}
});
var _react = __require("react");
var isServer = typeof window === "undefined";
var useClientOnlyLayoutEffect = isServer ? () => {
} : _react.useLayoutEffect;
var useClientOnlyEffect = isServer ? () => {
} : _react.useEffect;
function SideEffect(props) {
const { headManager, reduceComponentsToState } = props;
function emitChange() {
if (headManager && headManager.mountedInstances) {
const headElements = _react.Children.toArray(Array.from(headManager.mountedInstances).filter(Boolean));
headManager.updateHead(reduceComponentsToState(headElements, props));
}
}
if (isServer) {
var _headManager_mountedInstances;
headManager == null ? void 0 : (_headManager_mountedInstances = headManager.mountedInstances) == null ? void 0 : _headManager_mountedInstances.add(props.children);
emitChange();
}
useClientOnlyLayoutEffect(() => {
var _headManager_mountedInstances2;
headManager == null ? void 0 : (_headManager_mountedInstances2 = headManager.mountedInstances) == null ? void 0 : _headManager_mountedInstances2.add(props.children);
return () => {
var _headManager_mountedInstances3;
headManager == null ? void 0 : (_headManager_mountedInstances3 = headManager.mountedInstances) == null ? void 0 : _headManager_mountedInstances3.delete(props.children);
};
});
useClientOnlyLayoutEffect(() => {
if (headManager) {
headManager._pendingUpdate = emitChange;
}
return () => {
if (headManager) {
headManager._pendingUpdate = emitChange;
}
};
});
useClientOnlyEffect(() => {
if (headManager && headManager._pendingUpdate) {
headManager._pendingUpdate();
headManager._pendingUpdate = null;
}
return () => {
if (headManager && headManager._pendingUpdate) {
headManager._pendingUpdate();
headManager._pendingUpdate = null;
}
};
});
return null;
}
}
});
// node_modules/next/dist/shared/lib/amp-context.shared-runtime.js
var require_amp_context_shared_runtime = __commonJS({
"node_modules/next/dist/shared/lib/amp-context.shared-runtime.js"(exports) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "AmpStateContext", {
enumerable: true,
get: function() {
return AmpStateContext;
}
});
var _interop_require_default = require_interop_require_default();
var _react = /* @__PURE__ */ _interop_require_default._(__require("react"));
var AmpStateContext = _react.default.createContext({});
if (process.env.NODE_ENV !== "production") {
AmpStateContext.displayName = "AmpStateContext";
}
}
});
// node_modules/next/dist/shared/lib/head-manager-context.shared-runtime.js
var require_head_manager_context_shared_runtime = __commonJS({
"node_modules/next/dist/shared/lib/head-manager-context.shared-runtime.js"(exports) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "HeadManagerContext", {
enumerable: true,
get: function() {
return HeadManagerContext;
}
});
var _interop_require_default = require_interop_require_default();
var _react = /* @__PURE__ */ _interop_require_default._(__require("react"));
var HeadManagerContext = _react.default.createContext({});
if (process.env.NODE_ENV !== "production") {
HeadManagerContext.displayName = "HeadManagerContext";
}
}
});
// node_modules/next/dist/shared/lib/amp-mode.js
var require_amp_mode = __commonJS({
"node_modules/next/dist/shared/lib/amp-mode.js"(exports) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "isInAmpMode", {
enumerable: true,
get: function() {
return isInAmpMode;
}
});
function isInAmpMode(param) {
let { ampFirst = false, hybrid = false, hasQuery = false } = param === void 0 ? {} : param;
return ampFirst || hybrid && hasQuery;
}
}
});
// node_modules/next/dist/shared/lib/head.js
var require_head = __commonJS({
"node_modules/next/dist/shared/lib/head.js"(exports, module) {
"use client";
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
function _export(target, all) {
for (var name in all) Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
default: function() {
return _default;
},
defaultHead: function() {
return defaultHead;
}
});
var _interop_require_default = require_interop_require_default();
var _interop_require_wildcard = require_interop_require_wildcard();
var _jsxruntime = __require("react/jsx-runtime");
var _react = /* @__PURE__ */ _interop_require_wildcard._(__require("react"));
var _sideeffect = /* @__PURE__ */ _interop_require_default._(require_side_effect());
var _ampcontextsharedruntime = require_amp_context_shared_runtime();
var _headmanagercontextsharedruntime = require_head_manager_context_shared_runtime();
var _ampmode = require_amp_mode();
var _warnonce = require_warn_once();
function defaultHead(inAmpMode) {
if (inAmpMode === void 0) inAmpMode = false;
const head = [
/* @__PURE__ */ (0, _jsxruntime.jsx)("meta", {
charSet: "utf-8"
}, "charset")
];
if (!inAmpMode) {
head.push(/* @__PURE__ */ (0, _jsxruntime.jsx)("meta", {
name: "viewport",
content: "width=device-width"
}, "viewport"));
}
return head;
}
function onlyReactElement(list, child) {
if (typeof child === "string" || typeof child === "number") {
return list;
}
if (child.type === _react.default.Fragment) {
return list.concat(
// @ts-expect-error @types/react does not remove fragments but this could also return ReactPortal[]
_react.default.Children.toArray(child.props.children).reduce(
// @ts-expect-error @types/react does not remove fragments but this could also return ReactPortal[]
(fragmentList, fragmentChild) => {
if (typeof fragmentChild === "string" || typeof fragmentChild === "number") {
return fragmentList;
}
return fragmentList.concat(fragmentChild);
},
[]
)
);
}
return list.concat(child);
}
var METATYPES = [
"name",
"httpEquiv",
"charSet",
"itemProp"
];
function unique() {
const keys = /* @__PURE__ */ new Set();
const tags = /* @__PURE__ */ new Set();
const metaTypes = /* @__PURE__ */ new Set();
const metaCategories = {};
return (h) => {
let isUnique = true;
let hasKey = false;
if (h.key && typeof h.key !== "number" && h.key.indexOf("$") > 0) {
hasKey = true;
const key = h.key.slice(h.key.indexOf("$") + 1);
if (keys.has(key)) {
isUnique = false;
} else {
keys.add(key);
}
}
switch (h.type) {
case "title":
case "base":
if (tags.has(h.type)) {
isUnique = false;
} else {
tags.add(h.type);
}
break;
case "meta":
for (let i = 0, len = METATYPES.length; i < len; i++) {
const metatype = METATYPES[i];
if (!h.props.hasOwnProperty(metatype)) continue;
if (metatype === "charSet") {
if (metaTypes.has(metatype)) {
isUnique = false;
} else {
metaTypes.add(metatype);
}
} else {
const category = h.props[metatype];
const categories = metaCategories[metatype] || /* @__PURE__ */ new Set();
if ((metatype !== "name" || !hasKey) && categories.has(category)) {
isUnique = false;
} else {
categories.add(category);
metaCategories[metatype] = categories;
}
}
}
break;
}
return isUnique;
};
}
function reduceComponents(headChildrenElements, props) {
const { inAmpMode } = props;
return headChildrenElements.reduce(onlyReactElement, []).reverse().concat(defaultHead(inAmpMode).reverse()).filter(unique()).reverse().map((c, i) => {
const key = c.key || i;
if (process.env.NODE_ENV !== "development" && process.env.__NEXT_OPTIMIZE_FONTS && !inAmpMode) {
if (c.type === "link" && c.props["href"] && // TODO(prateekbh@): Replace this with const from `constants` when the tree shaking works.
[
"https://fonts.googleapis.com/css",
"https://use.typekit.net/"
].some((url) => c.props["href"].startsWith(url))) {
const newProps = {
...c.props || {}
};
newProps["data-href"] = newProps["href"];
newProps["href"] = void 0;
newProps["data-optimized-fonts"] = true;
return /* @__PURE__ */ _react.default.cloneElement(c, newProps);
}
}
if (process.env.NODE_ENV === "development") {
if (c.type === "script" && c.props["type"] !== "application/ld+json") {
const srcMessage = c.props["src"] ? '<script> tag with src="' + c.props["src"] + '"' : "inline <script>";
(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");
} else if (c.type === "link" && c.props["rel"] === "stylesheet") {
(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');
}
}
return /* @__PURE__ */ _react.default.cloneElement(c, {
key
});
});
}
function Head(param) {
let { children } = param;
const ampState = (0, _react.useContext)(_ampcontextsharedruntime.AmpStateContext);
const headManager = (0, _react.useContext)(_headmanagercontextsharedruntime.HeadManagerContext);
return /* @__PURE__ */ (0, _jsxruntime.jsx)(_sideeffect.default, {
reduceComponentsToState: reduceComponents,
headManager,
inAmpMode: (0, _ampmode.isInAmpMode)(ampState),
children
});
}
var _default = Head;
if ((typeof exports.default === "function" || typeof exports.default === "object" && exports.default !== null) && typeof exports.default.__esModule === "undefined") {
Object.defineProperty(exports.default, "__esModule", { value: true });
Object.assign(exports.default, exports);
module.exports = exports.default;
}
}
});
// node_modules/next/dist/shared/lib/image-config-context.shared-runtime.js
var require_image_config_context_shared_runtime = __commonJS({
"node_modules/next/dist/shared/lib/image-config-context.shared-runtime.js"(exports) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "ImageConfigContext", {
enumerable: true,
get: function() {
return ImageConfigContext;
}
});
var _interop_require_default = require_interop_require_default();
var _react = /* @__PURE__ */ _interop_require_default._(__require("react"));
var _imageconfig = require_image_config();
var ImageConfigContext = _react.default.createContext(_imageconfig.imageConfigDefault);
if (process.env.NODE_ENV !== "production") {
ImageConfigContext.displayName = "ImageConfigContext";
}
}
});
// node_modules/next/dist/shared/lib/router-context.shared-runtime.js
var require_router_context_shared_runtime = __commonJS({
"node_modules/next/dist/shared/lib/router-context.shared-runtime.js"(exports) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "RouterContext", {
enumerable: true,
get: function() {
return RouterContext;
}
});
var _interop_require_default = require_interop_require_default();
var _react = /* @__PURE__ */ _interop_require_default._(__require("react"));
var RouterContext = _react.default.createContext(null);
if (process.env.NODE_ENV !== "production") {
RouterContext.displayName = "RouterContext";
}
}
});
// node_modules/next/dist/compiled/picomatch/index.js
var require_picomatch = __commonJS({
"node_modules/next/dist/compiled/picomatch/index.js"(exports, module) {
(() => {
"use strict";
var t = { 170: (t2, e2, u2) => {
const n = u2(510);
const isWindows = () => {
if (typeof navigator !== "undefined" && navigator.platform) {
const t3 = navigator.platform.toLowerCase();
return t3 === "win32" || t3 === "windows";
}
if (typeof process !== "undefined" && process.platform) {
return process.platform === "win32";
}
return false;
};
function picomatch(t3, e3, u3 = false) {
if (e3 && (e3.windows === null || e3.windows === void 0)) {
e3 = { ...e3, windows: isWindows() };
}
return n(t3, e3, u3);
}
Object.assign(picomatch, n);
t2.exports = picomatch;
}, 154: (t2) => {
const e2 = "\\\\/";
const u2 = `[^${e2}]`;
const n = "\\.";
const o = "\\+";
const s = "\\?";
const r = "\\/";
const a = "(?=.)";
const i = "[^/]";
const c = `(?:${r}|$)`;
const p = `(?:^|${r})`;
const l = `${n}{1,2}${c}`;
const f = `(?!${n})`;
const A = `(?!${p}${l})`;
const _ = `(?!${n}{0,1}${c})`;
const R = `(?!${l})`;
const E = `[^.${r}]`;
const h = `${i}*?`;
const g = "/";
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 };
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: "\\" };
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" };
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) {
return { "!": { type: "negate", open: "(?:(?!(?:", close: `))${t3.STAR})` }, "?": { type: "qmark", open: "(?:", close: ")?" }, "+": { type: "plus", open: "(?:", close: ")+" }, "*": { type: "star", open: "(?:", close: ")*" }, "@": { type: "at", open: "(?:", close: ")" } };
}, globChars(t3) {
return t3 === true ? C : b;
} };
}, 697: (t2, e2, u2) => {
const n = u2(154);
const o = u2(96);
const { MAX_LENGTH: s, POSIX_REGEX_SOURCE: r, REGEX_NON_SPECIAL_CHARS: a, REGEX_SPECIAL_CHARS_BACKREF: i, REPLACEMENTS: c } = n;
const expandRange = (t3, e3) => {
if (typeof e3.expandRange === "function") {
return e3.expandRange(...t3, e3);
}
t3.sort();
const u3 = `[${t3.join("-")}]`;
try {
new RegExp(u3);
} catch (e4) {
return t3.map((t4) => o.escapeRegex(t4)).join("..");
}
return u3;
};
const syntaxError = (t3, e3) => `Missing ${t3}: "${e3}" - use "\\\\${e3}" to match literal characters`;
const parse = (t3, e3) => {
if (typeof t3 !== "string") {
throw new TypeError("Expected a string");
}
t3 = c[t3] || t3;
const u3 = { ...e3 };
const p = typeof u3.maxLength === "number" ? Math.min(s, u3.maxLength) : s;
let l = t3.length;
if (l > p) {
throw new SyntaxError(`Input length: ${l}, exceeds maximum allowed length: ${p}`);
}
const f = { type: "bos", value: "", output: u3.prepend || "" };
const A = [f];
const _ = u3.capture ? "" : "?:";
const R = n.globChars(u3.windows);
const E = n.extglobChars(R);
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;
const globstar = (t4) => `(${_}(?:(?!${L}${t4.dot ? y : h}).)*?)`;
const T = u3.dot ? "" : $;
const O = u3.dot ? H : v;
let k = u3.bash === true ? globstar(u3) : d;
if (u3.capture) {
k = `(${k})`;
}
if (typeof u3.noext === "boolean") {
u3.noextglob = u3.noext;
}
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 };
t3 = o.removePrefix(t3, m);
l = t3.length;
const w = [];
const N = [];
const I = [];
let B = f;
let G;
const eos = () => m.index === l - 1;
const D = m.peek = (e4 = 1) => t3[m.index + e4];
const M = m.advance = () => t3[++m.index] || "";
const remaining = () => t3.slice(m.index + 1);
const consume = (t4 = "", e4 = 0) => {
m.consumed += t4;
m.index += e4;
};
const append = (t4) => {
m.output += t4.output != null ? t4.output :