storybook
Version:
Storybook: Develop, document, and test UI components in isolation
1,206 lines (1,203 loc) • 148 kB
JavaScript
import {
__name
} from "./chunk-MM7DTO55.js";
// ../node_modules/tinyrainbow/dist/chunk-BVHSVHOK.js
var f = {
reset: [0, 0],
bold: [1, 22, "\x1B[22m\x1B[1m"],
dim: [2, 22, "\x1B[22m\x1B[2m"],
italic: [3, 23],
underline: [4, 24],
inverse: [7, 27],
hidden: [8, 28],
strikethrough: [9, 29],
black: [30, 39],
red: [31, 39],
green: [32, 39],
yellow: [33, 39],
blue: [34, 39],
magenta: [35, 39],
cyan: [36, 39],
white: [37, 39],
gray: [90, 39],
bgBlack: [40, 49],
bgRed: [41, 49],
bgGreen: [42, 49],
bgYellow: [43, 49],
bgBlue: [44, 49],
bgMagenta: [45, 49],
bgCyan: [46, 49],
bgWhite: [47, 49],
blackBright: [90, 39],
redBright: [91, 39],
greenBright: [92, 39],
yellowBright: [93, 39],
blueBright: [94, 39],
magentaBright: [95, 39],
cyanBright: [96, 39],
whiteBright: [97, 39],
bgBlackBright: [100, 49],
bgRedBright: [101, 49],
bgGreenBright: [102, 49],
bgYellowBright: [103, 49],
bgBlueBright: [104, 49],
bgMagentaBright: [105, 49],
bgCyanBright: [106, 49],
bgWhiteBright: [107, 49]
};
var h = Object.entries(f);
function a(n) {
return String(n);
}
__name(a, "a");
a.open = "";
a.close = "";
var B = h.reduce(
(n, [e]) => (n[e] = a, n),
{ isColorSupported: false }
);
function C(n = false) {
let e = typeof process != "undefined" ? process : void 0, i = (e == null ? void 0 : e.env) || {}, g = (e == null ? void 0 : e.argv) || [];
return !("NO_COLOR" in i || g.includes("--no-color")) && ("FORCE_COLOR" in i || g.includes("--color") || (e == null ? void 0 : e.platform) === "win32" || n && i.TERM !== "dumb" || "CI" in i) || typeof window != "undefined" && !!window.chrome;
}
__name(C, "C");
function p(n = false) {
let e = C(n), i = /* @__PURE__ */ __name((r, t, c, o) => {
let l = "", s2 = 0;
do
l += r.substring(s2, o) + c, s2 = o + t.length, o = r.indexOf(t, s2);
while (~o);
return l + r.substring(s2);
}, "i"), g = /* @__PURE__ */ __name((r, t, c = r) => {
let o = /* @__PURE__ */ __name((l) => {
let s2 = String(l), b = s2.indexOf(t, r.length);
return ~b ? r + i(s2, t, c, b) + t : r + s2 + t;
}, "o");
return o.open = r, o.close = t, o;
}, "g"), u = {
isColorSupported: e
}, d = /* @__PURE__ */ __name((r) => `\x1B[${r}m`, "d");
for (let [r, t] of h)
u[r] = e ? g(
d(t[0]),
d(t[1]),
t[2]
) : a;
return u;
}
__name(p, "p");
// ../node_modules/tinyrainbow/dist/browser.js
var s = p();
// ../node_modules/@vitest/pretty-format/dist/index.js
function _mergeNamespaces(n, m2) {
m2.forEach(function(e) {
e && typeof e !== "string" && !Array.isArray(e) && Object.keys(e).forEach(function(k) {
if (k !== "default" && !(k in n)) {
var d = Object.getOwnPropertyDescriptor(e, k);
Object.defineProperty(n, k, d.get ? d : {
enumerable: true,
get: /* @__PURE__ */ __name(function() {
return e[k];
}, "get")
});
}
});
});
return Object.freeze(n);
}
__name(_mergeNamespaces, "_mergeNamespaces");
function getKeysOfEnumerableProperties(object, compareKeys) {
const rawKeys = Object.keys(object);
const keys = compareKeys === null ? rawKeys : rawKeys.sort(compareKeys);
if (Object.getOwnPropertySymbols) {
for (const symbol of Object.getOwnPropertySymbols(object)) {
if (Object.getOwnPropertyDescriptor(object, symbol).enumerable) {
keys.push(symbol);
}
}
}
return keys;
}
__name(getKeysOfEnumerableProperties, "getKeysOfEnumerableProperties");
function printIteratorEntries(iterator, config, indentation, depth, refs, printer2, separator = ": ") {
let result = "";
let width = 0;
let current = iterator.next();
if (!current.done) {
result += config.spacingOuter;
const indentationNext = indentation + config.indent;
while (!current.done) {
result += indentationNext;
if (width++ === config.maxWidth) {
result += "\u2026";
break;
}
const name = printer2(current.value[0], config, indentationNext, depth, refs);
const value = printer2(current.value[1], config, indentationNext, depth, refs);
result += name + separator + value;
current = iterator.next();
if (!current.done) {
result += `,${config.spacingInner}`;
} else if (!config.min) {
result += ",";
}
}
result += config.spacingOuter + indentation;
}
return result;
}
__name(printIteratorEntries, "printIteratorEntries");
function printIteratorValues(iterator, config, indentation, depth, refs, printer2) {
let result = "";
let width = 0;
let current = iterator.next();
if (!current.done) {
result += config.spacingOuter;
const indentationNext = indentation + config.indent;
while (!current.done) {
result += indentationNext;
if (width++ === config.maxWidth) {
result += "\u2026";
break;
}
result += printer2(current.value, config, indentationNext, depth, refs);
current = iterator.next();
if (!current.done) {
result += `,${config.spacingInner}`;
} else if (!config.min) {
result += ",";
}
}
result += config.spacingOuter + indentation;
}
return result;
}
__name(printIteratorValues, "printIteratorValues");
function printListItems(list, config, indentation, depth, refs, printer2) {
let result = "";
list = list instanceof ArrayBuffer ? new DataView(list) : list;
const isDataView = /* @__PURE__ */ __name((l) => l instanceof DataView, "isDataView");
const length = isDataView(list) ? list.byteLength : list.length;
if (length > 0) {
result += config.spacingOuter;
const indentationNext = indentation + config.indent;
for (let i = 0; i < length; i++) {
result += indentationNext;
if (i === config.maxWidth) {
result += "\u2026";
break;
}
if (isDataView(list) || i in list) {
result += printer2(isDataView(list) ? list.getInt8(i) : list[i], config, indentationNext, depth, refs);
}
if (i < length - 1) {
result += `,${config.spacingInner}`;
} else if (!config.min) {
result += ",";
}
}
result += config.spacingOuter + indentation;
}
return result;
}
__name(printListItems, "printListItems");
function printObjectProperties(val, config, indentation, depth, refs, printer2) {
let result = "";
const keys = getKeysOfEnumerableProperties(val, config.compareKeys);
if (keys.length > 0) {
result += config.spacingOuter;
const indentationNext = indentation + config.indent;
for (let i = 0; i < keys.length; i++) {
const key = keys[i];
const name = printer2(key, config, indentationNext, depth, refs);
const value = printer2(val[key], config, indentationNext, depth, refs);
result += `${indentationNext + name}: ${value}`;
if (i < keys.length - 1) {
result += `,${config.spacingInner}`;
} else if (!config.min) {
result += ",";
}
}
result += config.spacingOuter + indentation;
}
return result;
}
__name(printObjectProperties, "printObjectProperties");
var asymmetricMatcher = typeof Symbol === "function" && Symbol.for ? Symbol.for("jest.asymmetricMatcher") : 1267621;
var SPACE$2 = " ";
var serialize$5 = /* @__PURE__ */ __name((val, config, indentation, depth, refs, printer2) => {
const stringedValue = val.toString();
if (stringedValue === "ArrayContaining" || stringedValue === "ArrayNotContaining") {
if (++depth > config.maxDepth) {
return `[${stringedValue}]`;
}
return `${stringedValue + SPACE$2}[${printListItems(val.sample, config, indentation, depth, refs, printer2)}]`;
}
if (stringedValue === "ObjectContaining" || stringedValue === "ObjectNotContaining") {
if (++depth > config.maxDepth) {
return `[${stringedValue}]`;
}
return `${stringedValue + SPACE$2}{${printObjectProperties(val.sample, config, indentation, depth, refs, printer2)}}`;
}
if (stringedValue === "StringMatching" || stringedValue === "StringNotMatching") {
return stringedValue + SPACE$2 + printer2(val.sample, config, indentation, depth, refs);
}
if (stringedValue === "StringContaining" || stringedValue === "StringNotContaining") {
return stringedValue + SPACE$2 + printer2(val.sample, config, indentation, depth, refs);
}
if (typeof val.toAsymmetricMatcher !== "function") {
throw new TypeError(`Asymmetric matcher ${val.constructor.name} does not implement toAsymmetricMatcher()`);
}
return val.toAsymmetricMatcher();
}, "serialize$5");
var test$5 = /* @__PURE__ */ __name((val) => val && val.$$typeof === asymmetricMatcher, "test$5");
var plugin$5 = {
serialize: serialize$5,
test: test$5
};
var SPACE$1 = " ";
var OBJECT_NAMES = /* @__PURE__ */ new Set(["DOMStringMap", "NamedNodeMap"]);
var ARRAY_REGEXP = /^(?:HTML\w*Collection|NodeList)$/;
function testName(name) {
return OBJECT_NAMES.has(name) || ARRAY_REGEXP.test(name);
}
__name(testName, "testName");
var test$4 = /* @__PURE__ */ __name((val) => val && val.constructor && !!val.constructor.name && testName(val.constructor.name), "test$4");
function isNamedNodeMap(collection) {
return collection.constructor.name === "NamedNodeMap";
}
__name(isNamedNodeMap, "isNamedNodeMap");
var serialize$4 = /* @__PURE__ */ __name((collection, config, indentation, depth, refs, printer2) => {
const name = collection.constructor.name;
if (++depth > config.maxDepth) {
return `[${name}]`;
}
return (config.min ? "" : name + SPACE$1) + (OBJECT_NAMES.has(name) ? `{${printObjectProperties(isNamedNodeMap(collection) ? [...collection].reduce((props, attribute) => {
props[attribute.name] = attribute.value;
return props;
}, {}) : { ...collection }, config, indentation, depth, refs, printer2)}}` : `[${printListItems([...collection], config, indentation, depth, refs, printer2)}]`);
}, "serialize$4");
var plugin$4 = {
serialize: serialize$4,
test: test$4
};
function escapeHTML(str) {
return str.replaceAll("<", "<").replaceAll(">", ">");
}
__name(escapeHTML, "escapeHTML");
function printProps(keys, props, config, indentation, depth, refs, printer2) {
const indentationNext = indentation + config.indent;
const colors = config.colors;
return keys.map((key) => {
const value = props[key];
let printed = printer2(value, config, indentationNext, depth, refs);
if (typeof value !== "string") {
if (printed.includes("\n")) {
printed = config.spacingOuter + indentationNext + printed + config.spacingOuter + indentation;
}
printed = `{${printed}}`;
}
return `${config.spacingInner + indentation + colors.prop.open + key + colors.prop.close}=${colors.value.open}${printed}${colors.value.close}`;
}).join("");
}
__name(printProps, "printProps");
function printChildren(children, config, indentation, depth, refs, printer2) {
return children.map((child) => config.spacingOuter + indentation + (typeof child === "string" ? printText(child, config) : printer2(child, config, indentation, depth, refs))).join("");
}
__name(printChildren, "printChildren");
function printText(text, config) {
const contentColor = config.colors.content;
return contentColor.open + escapeHTML(text) + contentColor.close;
}
__name(printText, "printText");
function printComment(comment, config) {
const commentColor = config.colors.comment;
return `${commentColor.open}<!--${escapeHTML(comment)}-->${commentColor.close}`;
}
__name(printComment, "printComment");
function printElement(type, printedProps, printedChildren, config, indentation) {
const tagColor = config.colors.tag;
return `${tagColor.open}<${type}${printedProps && tagColor.close + printedProps + config.spacingOuter + indentation + tagColor.open}${printedChildren ? `>${tagColor.close}${printedChildren}${config.spacingOuter}${indentation}${tagColor.open}</${type}` : `${printedProps && !config.min ? "" : " "}/`}>${tagColor.close}`;
}
__name(printElement, "printElement");
function printElementAsLeaf(type, config) {
const tagColor = config.colors.tag;
return `${tagColor.open}<${type}${tagColor.close} \u2026${tagColor.open} />${tagColor.close}`;
}
__name(printElementAsLeaf, "printElementAsLeaf");
var ELEMENT_NODE = 1;
var TEXT_NODE = 3;
var COMMENT_NODE = 8;
var FRAGMENT_NODE = 11;
var ELEMENT_REGEXP = /^(?:(?:HTML|SVG)\w*)?Element$/;
function testHasAttribute(val) {
try {
return typeof val.hasAttribute === "function" && val.hasAttribute("is");
} catch {
return false;
}
}
__name(testHasAttribute, "testHasAttribute");
function testNode(val) {
const constructorName = val.constructor.name;
const { nodeType, tagName } = val;
const isCustomElement = typeof tagName === "string" && tagName.includes("-") || testHasAttribute(val);
return nodeType === ELEMENT_NODE && (ELEMENT_REGEXP.test(constructorName) || isCustomElement) || nodeType === TEXT_NODE && constructorName === "Text" || nodeType === COMMENT_NODE && constructorName === "Comment" || nodeType === FRAGMENT_NODE && constructorName === "DocumentFragment";
}
__name(testNode, "testNode");
var test$3 = /* @__PURE__ */ __name((val) => {
var _val$constructor;
return (val === null || val === void 0 || (_val$constructor = val.constructor) === null || _val$constructor === void 0 ? void 0 : _val$constructor.name) && testNode(val);
}, "test$3");
function nodeIsText(node) {
return node.nodeType === TEXT_NODE;
}
__name(nodeIsText, "nodeIsText");
function nodeIsComment(node) {
return node.nodeType === COMMENT_NODE;
}
__name(nodeIsComment, "nodeIsComment");
function nodeIsFragment(node) {
return node.nodeType === FRAGMENT_NODE;
}
__name(nodeIsFragment, "nodeIsFragment");
var serialize$3 = /* @__PURE__ */ __name((node, config, indentation, depth, refs, printer2) => {
if (nodeIsText(node)) {
return printText(node.data, config);
}
if (nodeIsComment(node)) {
return printComment(node.data, config);
}
const type = nodeIsFragment(node) ? "DocumentFragment" : node.tagName.toLowerCase();
if (++depth > config.maxDepth) {
return printElementAsLeaf(type, config);
}
return printElement(type, printProps(nodeIsFragment(node) ? [] : Array.from(node.attributes, (attr) => attr.name).sort(), nodeIsFragment(node) ? {} : [...node.attributes].reduce((props, attribute) => {
props[attribute.name] = attribute.value;
return props;
}, {}), config, indentation + config.indent, depth, refs, printer2), printChildren(Array.prototype.slice.call(node.childNodes || node.children), config, indentation + config.indent, depth, refs, printer2), config, indentation);
}, "serialize$3");
var plugin$3 = {
serialize: serialize$3,
test: test$3
};
var IS_ITERABLE_SENTINEL = "@@__IMMUTABLE_ITERABLE__@@";
var IS_LIST_SENTINEL = "@@__IMMUTABLE_LIST__@@";
var IS_KEYED_SENTINEL = "@@__IMMUTABLE_KEYED__@@";
var IS_MAP_SENTINEL = "@@__IMMUTABLE_MAP__@@";
var IS_ORDERED_SENTINEL = "@@__IMMUTABLE_ORDERED__@@";
var IS_RECORD_SENTINEL = "@@__IMMUTABLE_RECORD__@@";
var IS_SEQ_SENTINEL = "@@__IMMUTABLE_SEQ__@@";
var IS_SET_SENTINEL = "@@__IMMUTABLE_SET__@@";
var IS_STACK_SENTINEL = "@@__IMMUTABLE_STACK__@@";
var getImmutableName = /* @__PURE__ */ __name((name) => `Immutable.${name}`, "getImmutableName");
var printAsLeaf = /* @__PURE__ */ __name((name) => `[${name}]`, "printAsLeaf");
var SPACE = " ";
var LAZY = "\u2026";
function printImmutableEntries(val, config, indentation, depth, refs, printer2, type) {
return ++depth > config.maxDepth ? printAsLeaf(getImmutableName(type)) : `${getImmutableName(type) + SPACE}{${printIteratorEntries(val.entries(), config, indentation, depth, refs, printer2)}}`;
}
__name(printImmutableEntries, "printImmutableEntries");
function getRecordEntries(val) {
let i = 0;
return { next() {
if (i < val._keys.length) {
const key = val._keys[i++];
return {
done: false,
value: [key, val.get(key)]
};
}
return {
done: true,
value: void 0
};
} };
}
__name(getRecordEntries, "getRecordEntries");
function printImmutableRecord(val, config, indentation, depth, refs, printer2) {
const name = getImmutableName(val._name || "Record");
return ++depth > config.maxDepth ? printAsLeaf(name) : `${name + SPACE}{${printIteratorEntries(getRecordEntries(val), config, indentation, depth, refs, printer2)}}`;
}
__name(printImmutableRecord, "printImmutableRecord");
function printImmutableSeq(val, config, indentation, depth, refs, printer2) {
const name = getImmutableName("Seq");
if (++depth > config.maxDepth) {
return printAsLeaf(name);
}
if (val[IS_KEYED_SENTINEL]) {
return `${name + SPACE}{${val._iter || val._object ? printIteratorEntries(val.entries(), config, indentation, depth, refs, printer2) : LAZY}}`;
}
return `${name + SPACE}[${val._iter || val._array || val._collection || val._iterable ? printIteratorValues(val.values(), config, indentation, depth, refs, printer2) : LAZY}]`;
}
__name(printImmutableSeq, "printImmutableSeq");
function printImmutableValues(val, config, indentation, depth, refs, printer2, type) {
return ++depth > config.maxDepth ? printAsLeaf(getImmutableName(type)) : `${getImmutableName(type) + SPACE}[${printIteratorValues(val.values(), config, indentation, depth, refs, printer2)}]`;
}
__name(printImmutableValues, "printImmutableValues");
var serialize$2 = /* @__PURE__ */ __name((val, config, indentation, depth, refs, printer2) => {
if (val[IS_MAP_SENTINEL]) {
return printImmutableEntries(val, config, indentation, depth, refs, printer2, val[IS_ORDERED_SENTINEL] ? "OrderedMap" : "Map");
}
if (val[IS_LIST_SENTINEL]) {
return printImmutableValues(val, config, indentation, depth, refs, printer2, "List");
}
if (val[IS_SET_SENTINEL]) {
return printImmutableValues(val, config, indentation, depth, refs, printer2, val[IS_ORDERED_SENTINEL] ? "OrderedSet" : "Set");
}
if (val[IS_STACK_SENTINEL]) {
return printImmutableValues(val, config, indentation, depth, refs, printer2, "Stack");
}
if (val[IS_SEQ_SENTINEL]) {
return printImmutableSeq(val, config, indentation, depth, refs, printer2);
}
return printImmutableRecord(val, config, indentation, depth, refs, printer2);
}, "serialize$2");
var test$2 = /* @__PURE__ */ __name((val) => val && (val[IS_ITERABLE_SENTINEL] === true || val[IS_RECORD_SENTINEL] === true), "test$2");
var plugin$2 = {
serialize: serialize$2,
test: test$2
};
function getDefaultExportFromCjs(x) {
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
}
__name(getDefaultExportFromCjs, "getDefaultExportFromCjs");
var reactIs$1 = { exports: {} };
var reactIs_production = {};
var hasRequiredReactIs_production;
function requireReactIs_production() {
if (hasRequiredReactIs_production) return reactIs_production;
hasRequiredReactIs_production = 1;
var REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"), REACT_PORTAL_TYPE = Symbol.for("react.portal"), REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"), REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"), REACT_PROFILER_TYPE = Symbol.for("react.profiler");
var REACT_CONSUMER_TYPE = Symbol.for("react.consumer"), REACT_CONTEXT_TYPE = Symbol.for("react.context"), REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"), REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"), REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"), REACT_MEMO_TYPE = Symbol.for("react.memo"), REACT_LAZY_TYPE = Symbol.for("react.lazy"), REACT_VIEW_TRANSITION_TYPE = Symbol.for("react.view_transition"), REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference");
function typeOf(object) {
if ("object" === typeof object && null !== object) {
var $$typeof = object.$$typeof;
switch ($$typeof) {
case REACT_ELEMENT_TYPE:
switch (object = object.type, object) {
case REACT_FRAGMENT_TYPE:
case REACT_PROFILER_TYPE:
case REACT_STRICT_MODE_TYPE:
case REACT_SUSPENSE_TYPE:
case REACT_SUSPENSE_LIST_TYPE:
case REACT_VIEW_TRANSITION_TYPE:
return object;
default:
switch (object = object && object.$$typeof, object) {
case REACT_CONTEXT_TYPE:
case REACT_FORWARD_REF_TYPE:
case REACT_LAZY_TYPE:
case REACT_MEMO_TYPE:
return object;
case REACT_CONSUMER_TYPE:
return object;
default:
return $$typeof;
}
}
case REACT_PORTAL_TYPE:
return $$typeof;
}
}
}
__name(typeOf, "typeOf");
reactIs_production.ContextConsumer = REACT_CONSUMER_TYPE;
reactIs_production.ContextProvider = REACT_CONTEXT_TYPE;
reactIs_production.Element = REACT_ELEMENT_TYPE;
reactIs_production.ForwardRef = REACT_FORWARD_REF_TYPE;
reactIs_production.Fragment = REACT_FRAGMENT_TYPE;
reactIs_production.Lazy = REACT_LAZY_TYPE;
reactIs_production.Memo = REACT_MEMO_TYPE;
reactIs_production.Portal = REACT_PORTAL_TYPE;
reactIs_production.Profiler = REACT_PROFILER_TYPE;
reactIs_production.StrictMode = REACT_STRICT_MODE_TYPE;
reactIs_production.Suspense = REACT_SUSPENSE_TYPE;
reactIs_production.SuspenseList = REACT_SUSPENSE_LIST_TYPE;
reactIs_production.isContextConsumer = function(object) {
return typeOf(object) === REACT_CONSUMER_TYPE;
};
reactIs_production.isContextProvider = function(object) {
return typeOf(object) === REACT_CONTEXT_TYPE;
};
reactIs_production.isElement = function(object) {
return "object" === typeof object && null !== object && object.$$typeof === REACT_ELEMENT_TYPE;
};
reactIs_production.isForwardRef = function(object) {
return typeOf(object) === REACT_FORWARD_REF_TYPE;
};
reactIs_production.isFragment = function(object) {
return typeOf(object) === REACT_FRAGMENT_TYPE;
};
reactIs_production.isLazy = function(object) {
return typeOf(object) === REACT_LAZY_TYPE;
};
reactIs_production.isMemo = function(object) {
return typeOf(object) === REACT_MEMO_TYPE;
};
reactIs_production.isPortal = function(object) {
return typeOf(object) === REACT_PORTAL_TYPE;
};
reactIs_production.isProfiler = function(object) {
return typeOf(object) === REACT_PROFILER_TYPE;
};
reactIs_production.isStrictMode = function(object) {
return typeOf(object) === REACT_STRICT_MODE_TYPE;
};
reactIs_production.isSuspense = function(object) {
return typeOf(object) === REACT_SUSPENSE_TYPE;
};
reactIs_production.isSuspenseList = function(object) {
return typeOf(object) === REACT_SUSPENSE_LIST_TYPE;
};
reactIs_production.isValidElementType = function(type) {
return "string" === typeof type || "function" === typeof type || type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || "object" === typeof type && null !== type && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_CONSUMER_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_CLIENT_REFERENCE || void 0 !== type.getModuleId) ? true : false;
};
reactIs_production.typeOf = typeOf;
return reactIs_production;
}
__name(requireReactIs_production, "requireReactIs_production");
var reactIs_development$1 = {};
var hasRequiredReactIs_development$1;
function requireReactIs_development$1() {
if (hasRequiredReactIs_development$1) return reactIs_development$1;
hasRequiredReactIs_development$1 = 1;
"production" !== process.env.NODE_ENV && function() {
function typeOf(object) {
if ("object" === typeof object && null !== object) {
var $$typeof = object.$$typeof;
switch ($$typeof) {
case REACT_ELEMENT_TYPE:
switch (object = object.type, object) {
case REACT_FRAGMENT_TYPE:
case REACT_PROFILER_TYPE:
case REACT_STRICT_MODE_TYPE:
case REACT_SUSPENSE_TYPE:
case REACT_SUSPENSE_LIST_TYPE:
case REACT_VIEW_TRANSITION_TYPE:
return object;
default:
switch (object = object && object.$$typeof, object) {
case REACT_CONTEXT_TYPE:
case REACT_FORWARD_REF_TYPE:
case REACT_LAZY_TYPE:
case REACT_MEMO_TYPE:
return object;
case REACT_CONSUMER_TYPE:
return object;
default:
return $$typeof;
}
}
case REACT_PORTAL_TYPE:
return $$typeof;
}
}
}
__name(typeOf, "typeOf");
var REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"), REACT_PORTAL_TYPE = Symbol.for("react.portal"), REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"), REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"), REACT_PROFILER_TYPE = Symbol.for("react.profiler");
var REACT_CONSUMER_TYPE = Symbol.for("react.consumer"), REACT_CONTEXT_TYPE = Symbol.for("react.context"), REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"), REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"), REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"), REACT_MEMO_TYPE = Symbol.for("react.memo"), REACT_LAZY_TYPE = Symbol.for("react.lazy"), REACT_VIEW_TRANSITION_TYPE = Symbol.for("react.view_transition"), REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference");
reactIs_development$1.ContextConsumer = REACT_CONSUMER_TYPE;
reactIs_development$1.ContextProvider = REACT_CONTEXT_TYPE;
reactIs_development$1.Element = REACT_ELEMENT_TYPE;
reactIs_development$1.ForwardRef = REACT_FORWARD_REF_TYPE;
reactIs_development$1.Fragment = REACT_FRAGMENT_TYPE;
reactIs_development$1.Lazy = REACT_LAZY_TYPE;
reactIs_development$1.Memo = REACT_MEMO_TYPE;
reactIs_development$1.Portal = REACT_PORTAL_TYPE;
reactIs_development$1.Profiler = REACT_PROFILER_TYPE;
reactIs_development$1.StrictMode = REACT_STRICT_MODE_TYPE;
reactIs_development$1.Suspense = REACT_SUSPENSE_TYPE;
reactIs_development$1.SuspenseList = REACT_SUSPENSE_LIST_TYPE;
reactIs_development$1.isContextConsumer = function(object) {
return typeOf(object) === REACT_CONSUMER_TYPE;
};
reactIs_development$1.isContextProvider = function(object) {
return typeOf(object) === REACT_CONTEXT_TYPE;
};
reactIs_development$1.isElement = function(object) {
return "object" === typeof object && null !== object && object.$$typeof === REACT_ELEMENT_TYPE;
};
reactIs_development$1.isForwardRef = function(object) {
return typeOf(object) === REACT_FORWARD_REF_TYPE;
};
reactIs_development$1.isFragment = function(object) {
return typeOf(object) === REACT_FRAGMENT_TYPE;
};
reactIs_development$1.isLazy = function(object) {
return typeOf(object) === REACT_LAZY_TYPE;
};
reactIs_development$1.isMemo = function(object) {
return typeOf(object) === REACT_MEMO_TYPE;
};
reactIs_development$1.isPortal = function(object) {
return typeOf(object) === REACT_PORTAL_TYPE;
};
reactIs_development$1.isProfiler = function(object) {
return typeOf(object) === REACT_PROFILER_TYPE;
};
reactIs_development$1.isStrictMode = function(object) {
return typeOf(object) === REACT_STRICT_MODE_TYPE;
};
reactIs_development$1.isSuspense = function(object) {
return typeOf(object) === REACT_SUSPENSE_TYPE;
};
reactIs_development$1.isSuspenseList = function(object) {
return typeOf(object) === REACT_SUSPENSE_LIST_TYPE;
};
reactIs_development$1.isValidElementType = function(type) {
return "string" === typeof type || "function" === typeof type || type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || "object" === typeof type && null !== type && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_CONSUMER_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_CLIENT_REFERENCE || void 0 !== type.getModuleId) ? true : false;
};
reactIs_development$1.typeOf = typeOf;
}();
return reactIs_development$1;
}
__name(requireReactIs_development$1, "requireReactIs_development$1");
var hasRequiredReactIs$1;
function requireReactIs$1() {
if (hasRequiredReactIs$1) return reactIs$1.exports;
hasRequiredReactIs$1 = 1;
if (process.env.NODE_ENV === "production") {
reactIs$1.exports = requireReactIs_production();
} else {
reactIs$1.exports = requireReactIs_development$1();
}
return reactIs$1.exports;
}
__name(requireReactIs$1, "requireReactIs$1");
var reactIsExports$1 = requireReactIs$1();
var index$1 = getDefaultExportFromCjs(reactIsExports$1);
var ReactIs19 = _mergeNamespaces({
__proto__: null,
default: index$1
}, [reactIsExports$1]);
var reactIs = { exports: {} };
var reactIs_production_min = {};
var hasRequiredReactIs_production_min;
function requireReactIs_production_min() {
if (hasRequiredReactIs_production_min) return reactIs_production_min;
hasRequiredReactIs_production_min = 1;
var b = Symbol.for("react.element"), c = Symbol.for("react.portal"), d = Symbol.for("react.fragment"), e = Symbol.for("react.strict_mode"), f2 = Symbol.for("react.profiler"), g = Symbol.for("react.provider"), h2 = Symbol.for("react.context"), k = Symbol.for("react.server_context"), l = Symbol.for("react.forward_ref"), m2 = Symbol.for("react.suspense"), n = Symbol.for("react.suspense_list"), p2 = Symbol.for("react.memo"), q = Symbol.for("react.lazy"), t = Symbol.for("react.offscreen"), u;
u = Symbol.for("react.module.reference");
function v(a2) {
if ("object" === typeof a2 && null !== a2) {
var r = a2.$$typeof;
switch (r) {
case b:
switch (a2 = a2.type, a2) {
case d:
case f2:
case e:
case m2:
case n:
return a2;
default:
switch (a2 = a2 && a2.$$typeof, a2) {
case k:
case h2:
case l:
case q:
case p2:
case g:
return a2;
default:
return r;
}
}
case c:
return r;
}
}
}
__name(v, "v");
reactIs_production_min.ContextConsumer = h2;
reactIs_production_min.ContextProvider = g;
reactIs_production_min.Element = b;
reactIs_production_min.ForwardRef = l;
reactIs_production_min.Fragment = d;
reactIs_production_min.Lazy = q;
reactIs_production_min.Memo = p2;
reactIs_production_min.Portal = c;
reactIs_production_min.Profiler = f2;
reactIs_production_min.StrictMode = e;
reactIs_production_min.Suspense = m2;
reactIs_production_min.SuspenseList = n;
reactIs_production_min.isAsyncMode = function() {
return false;
};
reactIs_production_min.isConcurrentMode = function() {
return false;
};
reactIs_production_min.isContextConsumer = function(a2) {
return v(a2) === h2;
};
reactIs_production_min.isContextProvider = function(a2) {
return v(a2) === g;
};
reactIs_production_min.isElement = function(a2) {
return "object" === typeof a2 && null !== a2 && a2.$$typeof === b;
};
reactIs_production_min.isForwardRef = function(a2) {
return v(a2) === l;
};
reactIs_production_min.isFragment = function(a2) {
return v(a2) === d;
};
reactIs_production_min.isLazy = function(a2) {
return v(a2) === q;
};
reactIs_production_min.isMemo = function(a2) {
return v(a2) === p2;
};
reactIs_production_min.isPortal = function(a2) {
return v(a2) === c;
};
reactIs_production_min.isProfiler = function(a2) {
return v(a2) === f2;
};
reactIs_production_min.isStrictMode = function(a2) {
return v(a2) === e;
};
reactIs_production_min.isSuspense = function(a2) {
return v(a2) === m2;
};
reactIs_production_min.isSuspenseList = function(a2) {
return v(a2) === n;
};
reactIs_production_min.isValidElementType = function(a2) {
return "string" === typeof a2 || "function" === typeof a2 || a2 === d || a2 === f2 || a2 === e || a2 === m2 || a2 === n || a2 === t || "object" === typeof a2 && null !== a2 && (a2.$$typeof === q || a2.$$typeof === p2 || a2.$$typeof === g || a2.$$typeof === h2 || a2.$$typeof === l || a2.$$typeof === u || void 0 !== a2.getModuleId) ? true : false;
};
reactIs_production_min.typeOf = v;
return reactIs_production_min;
}
__name(requireReactIs_production_min, "requireReactIs_production_min");
var reactIs_development = {};
var hasRequiredReactIs_development;
function requireReactIs_development() {
if (hasRequiredReactIs_development) return reactIs_development;
hasRequiredReactIs_development = 1;
if (process.env.NODE_ENV !== "production") {
(function() {
var REACT_ELEMENT_TYPE = Symbol.for("react.element");
var REACT_PORTAL_TYPE = Symbol.for("react.portal");
var REACT_FRAGMENT_TYPE = Symbol.for("react.fragment");
var REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode");
var REACT_PROFILER_TYPE = Symbol.for("react.profiler");
var REACT_PROVIDER_TYPE = Symbol.for("react.provider");
var REACT_CONTEXT_TYPE = Symbol.for("react.context");
var REACT_SERVER_CONTEXT_TYPE = Symbol.for("react.server_context");
var REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref");
var REACT_SUSPENSE_TYPE = Symbol.for("react.suspense");
var REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list");
var REACT_MEMO_TYPE = Symbol.for("react.memo");
var REACT_LAZY_TYPE = Symbol.for("react.lazy");
var REACT_OFFSCREEN_TYPE = Symbol.for("react.offscreen");
var enableScopeAPI = false;
var enableCacheElement = false;
var enableTransitionTracing = false;
var enableLegacyHidden = false;
var enableDebugTracing = false;
var REACT_MODULE_REFERENCE;
{
REACT_MODULE_REFERENCE = Symbol.for("react.module.reference");
}
function isValidElementType(type) {
if (typeof type === "string" || typeof type === "function") {
return true;
}
if (type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || enableDebugTracing || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || enableLegacyHidden || type === REACT_OFFSCREEN_TYPE || enableScopeAPI || enableCacheElement || enableTransitionTracing) {
return true;
}
if (typeof type === "object" && type !== null) {
if (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || // This needs to include all possible module reference object
// types supported by any Flight configuration anywhere since
// we don't know which Flight build this will end up being used
// with.
type.$$typeof === REACT_MODULE_REFERENCE || type.getModuleId !== void 0) {
return true;
}
}
return false;
}
__name(isValidElementType, "isValidElementType");
function typeOf(object) {
if (typeof object === "object" && object !== null) {
var $$typeof = object.$$typeof;
switch ($$typeof) {
case REACT_ELEMENT_TYPE:
var type = object.type;
switch (type) {
case REACT_FRAGMENT_TYPE:
case REACT_PROFILER_TYPE:
case REACT_STRICT_MODE_TYPE:
case REACT_SUSPENSE_TYPE:
case REACT_SUSPENSE_LIST_TYPE:
return type;
default:
var $$typeofType = type && type.$$typeof;
switch ($$typeofType) {
case REACT_SERVER_CONTEXT_TYPE:
case REACT_CONTEXT_TYPE:
case REACT_FORWARD_REF_TYPE:
case REACT_LAZY_TYPE:
case REACT_MEMO_TYPE:
case REACT_PROVIDER_TYPE:
return $$typeofType;
default:
return $$typeof;
}
}
case REACT_PORTAL_TYPE:
return $$typeof;
}
}
return void 0;
}
__name(typeOf, "typeOf");
var ContextConsumer = REACT_CONTEXT_TYPE;
var ContextProvider = REACT_PROVIDER_TYPE;
var Element2 = REACT_ELEMENT_TYPE;
var ForwardRef = REACT_FORWARD_REF_TYPE;
var Fragment = REACT_FRAGMENT_TYPE;
var Lazy = REACT_LAZY_TYPE;
var Memo = REACT_MEMO_TYPE;
var Portal = REACT_PORTAL_TYPE;
var Profiler = REACT_PROFILER_TYPE;
var StrictMode = REACT_STRICT_MODE_TYPE;
var Suspense = REACT_SUSPENSE_TYPE;
var SuspenseList = REACT_SUSPENSE_LIST_TYPE;
var hasWarnedAboutDeprecatedIsAsyncMode = false;
var hasWarnedAboutDeprecatedIsConcurrentMode = false;
function isAsyncMode(object) {
{
if (!hasWarnedAboutDeprecatedIsAsyncMode) {
hasWarnedAboutDeprecatedIsAsyncMode = true;
console["warn"]("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 18+.");
}
}
return false;
}
__name(isAsyncMode, "isAsyncMode");
function isConcurrentMode(object) {
{
if (!hasWarnedAboutDeprecatedIsConcurrentMode) {
hasWarnedAboutDeprecatedIsConcurrentMode = true;
console["warn"]("The ReactIs.isConcurrentMode() alias has been deprecated, and will be removed in React 18+.");
}
}
return false;
}
__name(isConcurrentMode, "isConcurrentMode");
function isContextConsumer(object) {
return typeOf(object) === REACT_CONTEXT_TYPE;
}
__name(isContextConsumer, "isContextConsumer");
function isContextProvider(object) {
return typeOf(object) === REACT_PROVIDER_TYPE;
}
__name(isContextProvider, "isContextProvider");
function isElement(object) {
return typeof object === "object" && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
}
__name(isElement, "isElement");
function isForwardRef(object) {
return typeOf(object) === REACT_FORWARD_REF_TYPE;
}
__name(isForwardRef, "isForwardRef");
function isFragment(object) {
return typeOf(object) === REACT_FRAGMENT_TYPE;
}
__name(isFragment, "isFragment");
function isLazy(object) {
return typeOf(object) === REACT_LAZY_TYPE;
}
__name(isLazy, "isLazy");
function isMemo(object) {
return typeOf(object) === REACT_MEMO_TYPE;
}
__name(isMemo, "isMemo");
function isPortal(object) {
return typeOf(object) === REACT_PORTAL_TYPE;
}
__name(isPortal, "isPortal");
function isProfiler(object) {
return typeOf(object) === REACT_PROFILER_TYPE;
}
__name(isProfiler, "isProfiler");
function isStrictMode(object) {
return typeOf(object) === REACT_STRICT_MODE_TYPE;
}
__name(isStrictMode, "isStrictMode");
function isSuspense(object) {
return typeOf(object) === REACT_SUSPENSE_TYPE;
}
__name(isSuspense, "isSuspense");
function isSuspenseList(object) {
return typeOf(object) === REACT_SUSPENSE_LIST_TYPE;
}
__name(isSuspenseList, "isSuspenseList");
reactIs_development.ContextConsumer = ContextConsumer;
reactIs_development.ContextProvider = ContextProvider;
reactIs_development.Element = Element2;
reactIs_development.ForwardRef = ForwardRef;
reactIs_development.Fragment = Fragment;
reactIs_development.Lazy = Lazy;
reactIs_development.Memo = Memo;
reactIs_development.Portal = Portal;
reactIs_development.Profiler = Profiler;
reactIs_development.StrictMode = StrictMode;
reactIs_development.Suspense = Suspense;
reactIs_development.SuspenseList = SuspenseList;
reactIs_development.isAsyncMode = isAsyncMode;
reactIs_development.isConcurrentMode = isConcurrentMode;
reactIs_development.isContextConsumer = isContextConsumer;
reactIs_development.isContextProvider = isContextProvider;
reactIs_development.isElement = isElement;
reactIs_development.isForwardRef = isForwardRef;
reactIs_development.isFragment = isFragment;
reactIs_development.isLazy = isLazy;
reactIs_development.isMemo = isMemo;
reactIs_development.isPortal = isPortal;
reactIs_development.isProfiler = isProfiler;
reactIs_development.isStrictMode = isStrictMode;
reactIs_development.isSuspense = isSuspense;
reactIs_development.isSuspenseList = isSuspenseList;
reactIs_development.isValidElementType = isValidElementType;
reactIs_development.typeOf = typeOf;
})();
}
return reactIs_development;
}
__name(requireReactIs_development, "requireReactIs_development");
var hasRequiredReactIs;
function requireReactIs() {
if (hasRequiredReactIs) return reactIs.exports;
hasRequiredReactIs = 1;
if (process.env.NODE_ENV === "production") {
reactIs.exports = requireReactIs_production_min();
} else {
reactIs.exports = requireReactIs_development();
}
return reactIs.exports;
}
__name(requireReactIs, "requireReactIs");
var reactIsExports = requireReactIs();
var index = getDefaultExportFromCjs(reactIsExports);
var ReactIs18 = _mergeNamespaces({
__proto__: null,
default: index
}, [reactIsExports]);
var reactIsMethods = [
"isAsyncMode",
"isConcurrentMode",
"isContextConsumer",
"isContextProvider",
"isElement",
"isForwardRef",
"isFragment",
"isLazy",
"isMemo",
"isPortal",
"isProfiler",
"isStrictMode",
"isSuspense",
"isSuspenseList",
"isValidElementType"
];
var ReactIs = Object.fromEntries(reactIsMethods.map((m2) => [m2, (v) => ReactIs18[m2](v) || ReactIs19[m2](v)]));
function getChildren(arg, children = []) {
if (Array.isArray(arg)) {
for (const item of arg) {
getChildren(item, children);
}
} else if (arg != null && arg !== false && arg !== "") {
children.push(arg);
}
return children;
}
__name(getChildren, "getChildren");
function getType(element) {
const type = element.type;
if (typeof type === "string") {
return type;
}
if (typeof type === "function") {
return type.displayName || type.name || "Unknown";
}
if (ReactIs.isFragment(element)) {
return "React.Fragment";
}
if (ReactIs.isSuspense(element)) {
return "React.Suspense";
}
if (typeof type === "object" && type !== null) {
if (ReactIs.isContextProvider(element)) {
return "Context.Provider";
}
if (ReactIs.isContextConsumer(element)) {
return "Context.Consumer";
}
if (ReactIs.isForwardRef(element)) {
if (type.displayName) {
return type.displayName;
}
const functionName = type.render.displayName || type.render.name || "";
return functionName === "" ? "ForwardRef" : `ForwardRef(${functionName})`;
}
if (ReactIs.isMemo(element)) {
const functionName = type.displayName || type.type.displayName || type.type.name || "";
return functionName === "" ? "Memo" : `Memo(${functionName})`;
}
}
return "UNDEFINED";
}
__name(getType, "getType");
function getPropKeys$1(element) {
const { props } = element;
return Object.keys(props).filter((key) => key !== "children" && props[key] !== void 0).sort();
}
__name(getPropKeys$1, "getPropKeys$1");
var serialize$1 = /* @__PURE__ */ __name((element, config, indentation, depth, refs, printer2) => ++depth > config.maxDepth ? printElementAsLeaf(getType(element), config) : printElement(getType(element), printProps(getPropKeys$1(element), element.props, config, indentation + config.indent, depth, refs, printer2), printChildren(getChildren(element.props.children), config, indentation + config.indent, depth, refs, printer2), config, indentation), "serialize$1");
var test$1 = /* @__PURE__ */ __name((val) => val != null && ReactIs.isElement(val), "test$1");
var plugin$1 = {
serialize: serialize$1,
test: test$1
};
var testSymbol = typeof Symbol === "function" && Symbol.for ? Symbol.for("react.test.json") : 245830487;
function getPropKeys(object) {
const { props } = object;
return props ? Object.keys(props).filter((key) => props[key] !== void 0).sort() : [];
}
__name(getPropKeys, "getPropKeys");
var serialize = /* @__PURE__ */ __name((object, config, indentation, depth, refs, printer2) => ++depth > config.maxDepth ? printElementAsLeaf(object.type, config) : printElement(object.type, object.props ? printProps(getPropKeys(object), object.props, config, indentation + config.indent, depth, refs, printer2) : "", object.children ? printChildren(object.children, config, indentation + config.indent, depth, refs, printer2) : "", config, indentation), "serialize");
var test = /* @__PURE__ */ __name((val) => val && val.$$typeof === testSymbol, "test");
var plugin = {
serialize,
test
};
var toString = Object.prototype.toString;
var toISOString = Date.prototype.toISOString;
var errorToString = Error.prototype.toString;
var regExpToString = RegExp.prototype.toString;
function getConstructorName(val) {
return typeof val.constructor === "function" && val.constructor.name || "Object";
}
__name(getConstructorName, "getConstructorName");
function isWindow(val) {
return typeof window !== "undefined" && val === window;
}
__name(isWindow, "isWindow");
var SYMBOL_REGEXP = /^Symbol\((.*)\)(.*)$/;
var NEWLINE_REGEXP = /\n/g;
var _PrettyFormatPluginError = class _PrettyFormatPluginError extends Error {
constructor(message, stack) {
super(message);
this.stack = stack;
this.name = this.constructor.name;
}
};
__name(_PrettyFormatPluginError, "PrettyFormatPluginError");
var PrettyFormatPluginError = _PrettyFormatPluginError;
function isToStringedArrayType(toStringed) {
return toStringed === "[object Array]" || toStringed === "[object ArrayBuffer]" || toStringed === "[object DataView]" || toStringed === "[object Float32Array]" || toStringed === "[object Float64Array]" || toStringed === "[object Int8Array]" || toStringed === "[object Int16Array]" || toStringed === "[object Int32Array]" || toStringed === "[object Uint8Array]" || toStringed === "[object Uint8ClampedArray]" || toStringed === "[object Uint16Array]" || toStringed === "[object Uint32Array]";
}
__name(isToStringedArrayType, "isToStringedArrayType");
function printNumber(val) {
return Object.is(val, -0) ? "-0" : String(val);
}
__name(printNumber, "printNumber");
function printBigInt(val) {
return String(`${val}n`);
}
__name(printBigInt, "printBigInt");
function printFunction(val, printFunctionName) {
if (!printFunctionName) {
return "[Function]";
}
return `[Function ${val.name || "anonymous"}]`;
}
__name(printFunction, "printFunction");
function printSymbol(val) {
return String(val).replace(SYMBOL_REGEXP, "Symbol($1)");
}
__name(printSymbol, "printSymbol");
function printError(val) {
return `[${errorToString.call(val)}]`;
}
__name(printError, "printError");
function printBasicValue(val, printFunctionName, escapeRegex, escapeString) {
if (val === true || val === false) {
return `${val}`;
}
if (val === void 0) {
return "undefined";
}
if (val === null) {
return "null";
}
const typeOf = typeof val;
if (typeOf === "number") {
return printNumber(val);
}
if (typeOf === "bigint") {
return printBigInt(val);
}
if (typeOf === "string") {
if (escapeString) {
return `"${val.replaceAll(/"|\\/g, "\\$&")}"`;
}
return `"${val}"`;
}
if (typeOf === "function") {
return printFunction(val, printFunctionName);
}
if (typeOf === "symbol") {
return printSymbol(val);
}
const toStringed = toString.call(val);
if (toStringed === "[object WeakMap]") {
return "WeakMap {}";
}
if (toStringed === "[object WeakSet]") {
return "WeakSet {}";
}
if (toStringed === "[object Function]" || toStringed === "[object GeneratorFunction]") {
return printFunction(val, printFunctionName);
}
if (toStringed === "[object Symbol]") {
return printSymbol(val);
}
if (toStringed === "[object Date]") {
return Number.isNaN(+val) ? "Date { NaN }" : toISOString.call(val);
}
if (toStringed === "[object Error]") {
return printError(val);
}
if (toStringed === "[object RegExp]") {
if (escapeRegex) {
return regExpToString.call(val).replaceAll(/[$()*+.?[\\\]^{|}]/g, "\\$&");
}
return regExpToString.call(val);
}
if (val instanceof Error) {
return printError(val);
}
return null;
}
__name(printBasicValue, "printBasicValue");
function printComplexValue(val, config, indentation, depth, refs, hasCalledToJSON) {
if (refs.includes(val)) {
return "[Circular]";
}
refs = [...refs];
refs.push(val);
const hitMaxDepth = ++depth > config.maxDepth;
const min = config.min;
if (config.callToJSON && !hitMaxDepth && val.toJSON && typeof val.toJSON === "function" && !hasCalledToJSON) {
return printer(val.toJSON(), config, indentation, depth, refs, true);
}
const toStringed = toString.call(val);
if (toStringed === "[object Arguments]") {
return hitMaxDepth ? "[Arguments]" : `${min ? "" : "Arguments "}[${printListItems(val, config, indentation, depth, refs, printer)}]`;
}
if (