alepha
Version:
Easy-to-use modern TypeScript framework for building many kind of applications.
1,193 lines • 407 kB
JavaScript
import { r as __require, t as __commonJSMin } from "./rolldown-runtime-Bl3dcgcQ.js";
import { $module, Alepha } from "alepha";
import { AlephaLogger } from "alepha/logger";
import { AlephaContext } from "alepha/react";
import { jsx } from "react/jsx-runtime";
//#region ../../../../node_modules/@testing-library/react/dist/act-compat.js
var require_act_compat = /* @__PURE__ */ __commonJSMin(((exports) => {
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = void 0;
exports.getIsReactActEnvironment = getIsReactActEnvironment;
exports.setReactActEnvironment = setIsReactActEnvironment;
var React$1 = _interopRequireWildcard(__require("react"));
var DeprecatedReactTestUtils = _interopRequireWildcard(__require("react-dom/test-utils"));
function _interopRequireWildcard(e, t) {
if ("function" == typeof WeakMap) var r = /* @__PURE__ */ new WeakMap(), n = /* @__PURE__ */ new WeakMap();
return (_interopRequireWildcard = function(e, t) {
if (!t && e && e.__esModule) return e;
var o, i, f = {
__proto__: null,
default: e
};
if (null === e || "object" != typeof e && "function" != typeof e) return f;
if (o = t ? n : r) {
if (o.has(e)) return o.get(e);
o.set(e, f);
}
for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]);
return f;
})(e, t);
}
const reactAct = typeof React$1.act === "function" ? React$1.act : DeprecatedReactTestUtils.act;
function getGlobalThis() {
/* istanbul ignore else */
if (typeof globalThis !== "undefined") return globalThis;
/* istanbul ignore next */
if (typeof self !== "undefined") return self;
/* istanbul ignore next */
if (typeof window !== "undefined") return window;
/* istanbul ignore next */
if (typeof global !== "undefined") return global;
/* istanbul ignore next */
throw new Error("unable to locate global object");
}
function setIsReactActEnvironment(isReactActEnvironment) {
getGlobalThis().IS_REACT_ACT_ENVIRONMENT = isReactActEnvironment;
}
function getIsReactActEnvironment() {
return getGlobalThis().IS_REACT_ACT_ENVIRONMENT;
}
function withGlobalActEnvironment(actImplementation) {
return (callback) => {
const previousActEnvironment = getIsReactActEnvironment();
setIsReactActEnvironment(true);
try {
let callbackNeedsToBeAwaited = false;
const actResult = actImplementation(() => {
const result = callback();
if (result !== null && typeof result === "object" && typeof result.then === "function") callbackNeedsToBeAwaited = true;
return result;
});
if (callbackNeedsToBeAwaited) {
const thenable = actResult;
return { then: (resolve, reject) => {
thenable.then((returnValue) => {
setIsReactActEnvironment(previousActEnvironment);
resolve(returnValue);
}, (error) => {
setIsReactActEnvironment(previousActEnvironment);
reject(error);
});
} };
} else {
setIsReactActEnvironment(previousActEnvironment);
return actResult;
}
} catch (error) {
setIsReactActEnvironment(previousActEnvironment);
throw error;
}
};
}
exports.default = withGlobalActEnvironment(reactAct);
}));
//#endregion
//#region ../../../../node_modules/@babel/runtime/helpers/interopRequireDefault.js
var require_interopRequireDefault = /* @__PURE__ */ __commonJSMin(((exports, module) => {
function _interopRequireDefault(e) {
return e && e.__esModule ? e : { "default": e };
}
module.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports["default"] = module.exports;
}));
//#endregion
//#region ../../../../node_modules/pretty-format/node_modules/ansi-styles/index.js
var require_ansi_styles = /* @__PURE__ */ __commonJSMin(((exports, module) => {
const ANSI_BACKGROUND_OFFSET = 10;
const wrapAnsi256 = (offset = 0) => (code) => `\u001B[${38 + offset};5;${code}m`;
const wrapAnsi16m = (offset = 0) => (red, green, blue) => `\u001B[${38 + offset};2;${red};${green};${blue}m`;
function assembleStyles() {
const codes = /* @__PURE__ */ new Map();
const styles = {
modifier: {
reset: [0, 0],
bold: [1, 22],
dim: [2, 22],
italic: [3, 23],
underline: [4, 24],
overline: [53, 55],
inverse: [7, 27],
hidden: [8, 28],
strikethrough: [9, 29]
},
color: {
black: [30, 39],
red: [31, 39],
green: [32, 39],
yellow: [33, 39],
blue: [34, 39],
magenta: [35, 39],
cyan: [36, 39],
white: [37, 39],
blackBright: [90, 39],
redBright: [91, 39],
greenBright: [92, 39],
yellowBright: [93, 39],
blueBright: [94, 39],
magentaBright: [95, 39],
cyanBright: [96, 39],
whiteBright: [97, 39]
},
bgColor: {
bgBlack: [40, 49],
bgRed: [41, 49],
bgGreen: [42, 49],
bgYellow: [43, 49],
bgBlue: [44, 49],
bgMagenta: [45, 49],
bgCyan: [46, 49],
bgWhite: [47, 49],
bgBlackBright: [100, 49],
bgRedBright: [101, 49],
bgGreenBright: [102, 49],
bgYellowBright: [103, 49],
bgBlueBright: [104, 49],
bgMagentaBright: [105, 49],
bgCyanBright: [106, 49],
bgWhiteBright: [107, 49]
}
};
styles.color.gray = styles.color.blackBright;
styles.bgColor.bgGray = styles.bgColor.bgBlackBright;
styles.color.grey = styles.color.blackBright;
styles.bgColor.bgGrey = styles.bgColor.bgBlackBright;
for (const [groupName, group] of Object.entries(styles)) {
for (const [styleName, style] of Object.entries(group)) {
styles[styleName] = {
open: `\u001B[${style[0]}m`,
close: `\u001B[${style[1]}m`
};
group[styleName] = styles[styleName];
codes.set(style[0], style[1]);
}
Object.defineProperty(styles, groupName, {
value: group,
enumerable: false
});
}
Object.defineProperty(styles, "codes", {
value: codes,
enumerable: false
});
styles.color.close = "\x1B[39m";
styles.bgColor.close = "\x1B[49m";
styles.color.ansi256 = wrapAnsi256();
styles.color.ansi16m = wrapAnsi16m();
styles.bgColor.ansi256 = wrapAnsi256(ANSI_BACKGROUND_OFFSET);
styles.bgColor.ansi16m = wrapAnsi16m(ANSI_BACKGROUND_OFFSET);
Object.defineProperties(styles, {
rgbToAnsi256: {
value: (red, green, blue) => {
if (red === green && green === blue) {
if (red < 8) return 16;
if (red > 248) return 231;
return Math.round((red - 8) / 247 * 24) + 232;
}
return 16 + 36 * Math.round(red / 255 * 5) + 6 * Math.round(green / 255 * 5) + Math.round(blue / 255 * 5);
},
enumerable: false
},
hexToRgb: {
value: (hex) => {
const matches = /(?<colorString>[a-f\d]{6}|[a-f\d]{3})/i.exec(hex.toString(16));
if (!matches) return [
0,
0,
0
];
let { colorString } = matches.groups;
if (colorString.length === 3) colorString = colorString.split("").map((character) => character + character).join("");
const integer = Number.parseInt(colorString, 16);
return [
integer >> 16 & 255,
integer >> 8 & 255,
integer & 255
];
},
enumerable: false
},
hexToAnsi256: {
value: (hex) => styles.rgbToAnsi256(...styles.hexToRgb(hex)),
enumerable: false
}
});
return styles;
}
Object.defineProperty(module, "exports", {
enumerable: true,
get: assembleStyles
});
}));
//#endregion
//#region ../../../../node_modules/pretty-format/build/collections.js
var require_collections = /* @__PURE__ */ __commonJSMin(((exports) => {
Object.defineProperty(exports, "__esModule", { value: true });
exports.printIteratorEntries = printIteratorEntries;
exports.printIteratorValues = printIteratorValues;
exports.printListItems = printListItems;
exports.printObjectProperties = printObjectProperties;
/**
* Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*/
const getKeysOfEnumerableProperties = (object, compareKeys) => {
const keys = Object.keys(object).sort(compareKeys);
if (Object.getOwnPropertySymbols) Object.getOwnPropertySymbols(object).forEach((symbol) => {
if (Object.getOwnPropertyDescriptor(object, symbol).enumerable) keys.push(symbol);
});
return keys;
};
/**
* Return entries (for example, of a map)
* with spacing, indentation, and comma
* without surrounding punctuation (for example, braces)
*/
function printIteratorEntries(iterator, config, indentation, depth, refs, printer, separator = ": ") {
let result = "";
let current = iterator.next();
if (!current.done) {
result += config.spacingOuter;
const indentationNext = indentation + config.indent;
while (!current.done) {
const name = printer(current.value[0], config, indentationNext, depth, refs);
const value = printer(current.value[1], config, indentationNext, depth, refs);
result += indentationNext + name + separator + value;
current = iterator.next();
if (!current.done) result += "," + config.spacingInner;
else if (!config.min) result += ",";
}
result += config.spacingOuter + indentation;
}
return result;
}
/**
* Return values (for example, of a set)
* with spacing, indentation, and comma
* without surrounding punctuation (braces or brackets)
*/
function printIteratorValues(iterator, config, indentation, depth, refs, printer) {
let result = "";
let current = iterator.next();
if (!current.done) {
result += config.spacingOuter;
const indentationNext = indentation + config.indent;
while (!current.done) {
result += indentationNext + printer(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;
}
/**
* Return items (for example, of an array)
* with spacing, indentation, and comma
* without surrounding punctuation (for example, brackets)
**/
function printListItems(list, config, indentation, depth, refs, printer) {
let result = "";
if (list.length) {
result += config.spacingOuter;
const indentationNext = indentation + config.indent;
for (let i = 0; i < list.length; i++) {
result += indentationNext;
if (i in list) result += printer(list[i], config, indentationNext, depth, refs);
if (i < list.length - 1) result += "," + config.spacingInner;
else if (!config.min) result += ",";
}
result += config.spacingOuter + indentation;
}
return result;
}
/**
* Return properties of an object
* with spacing, indentation, and comma
* without surrounding punctuation (for example, braces)
*/
function printObjectProperties(val, config, indentation, depth, refs, printer) {
let result = "";
const keys = getKeysOfEnumerableProperties(val, config.compareKeys);
if (keys.length) {
result += config.spacingOuter;
const indentationNext = indentation + config.indent;
for (let i = 0; i < keys.length; i++) {
const key = keys[i];
const name = printer(key, config, indentationNext, depth, refs);
const value = printer(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;
}
}));
//#endregion
//#region ../../../../node_modules/pretty-format/build/plugins/AsymmetricMatcher.js
var require_AsymmetricMatcher = /* @__PURE__ */ __commonJSMin(((exports) => {
Object.defineProperty(exports, "__esModule", { value: true });
exports.test = exports.serialize = exports.default = void 0;
var _collections = require_collections();
var global = (function() {
if (typeof globalThis !== "undefined") return globalThis;
else if (typeof global !== "undefined") return global;
else if (typeof self !== "undefined") return self;
else if (typeof window !== "undefined") return window;
else return Function("return this")();
})();
var Symbol = global["jest-symbol-do-not-touch"] || global.Symbol;
const asymmetricMatcher = typeof Symbol === "function" && Symbol.for ? Symbol.for("jest.asymmetricMatcher") : 1267621;
const SPACE = " ";
const serialize = (val, config, indentation, depth, refs, printer) => {
const stringedValue = val.toString();
if (stringedValue === "ArrayContaining" || stringedValue === "ArrayNotContaining") {
if (++depth > config.maxDepth) return "[" + stringedValue + "]";
return stringedValue + " [" + (0, _collections.printListItems)(val.sample, config, indentation, depth, refs, printer) + "]";
}
if (stringedValue === "ObjectContaining" || stringedValue === "ObjectNotContaining") {
if (++depth > config.maxDepth) return "[" + stringedValue + "]";
return stringedValue + " {" + (0, _collections.printObjectProperties)(val.sample, config, indentation, depth, refs, printer) + "}";
}
if (stringedValue === "StringMatching" || stringedValue === "StringNotMatching") return stringedValue + SPACE + printer(val.sample, config, indentation, depth, refs);
if (stringedValue === "StringContaining" || stringedValue === "StringNotContaining") return stringedValue + SPACE + printer(val.sample, config, indentation, depth, refs);
return val.toAsymmetricMatcher();
};
exports.serialize = serialize;
const test = (val) => val && val.$$typeof === asymmetricMatcher;
exports.test = test;
exports.default = {
serialize,
test
};
}));
//#endregion
//#region ../../../../node_modules/ansi-regex/index.js
var require_ansi_regex = /* @__PURE__ */ __commonJSMin(((exports, module) => {
module.exports = ({ onlyFirst = false } = {}) => {
const pattern = ["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)", "(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");
return new RegExp(pattern, onlyFirst ? void 0 : "g");
};
}));
//#endregion
//#region ../../../../node_modules/pretty-format/build/plugins/ConvertAnsi.js
var require_ConvertAnsi = /* @__PURE__ */ __commonJSMin(((exports) => {
Object.defineProperty(exports, "__esModule", { value: true });
exports.test = exports.serialize = exports.default = void 0;
var _ansiRegex = _interopRequireDefault(require_ansi_regex());
var _ansiStyles = _interopRequireDefault(require_ansi_styles());
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : { default: obj };
}
/**
* Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
const toHumanReadableAnsi = (text) => text.replace((0, _ansiRegex.default)(), (match) => {
switch (match) {
case _ansiStyles.default.red.close:
case _ansiStyles.default.green.close:
case _ansiStyles.default.cyan.close:
case _ansiStyles.default.gray.close:
case _ansiStyles.default.white.close:
case _ansiStyles.default.yellow.close:
case _ansiStyles.default.bgRed.close:
case _ansiStyles.default.bgGreen.close:
case _ansiStyles.default.bgYellow.close:
case _ansiStyles.default.inverse.close:
case _ansiStyles.default.dim.close:
case _ansiStyles.default.bold.close:
case _ansiStyles.default.reset.open:
case _ansiStyles.default.reset.close: return "</>";
case _ansiStyles.default.red.open: return "<red>";
case _ansiStyles.default.green.open: return "<green>";
case _ansiStyles.default.cyan.open: return "<cyan>";
case _ansiStyles.default.gray.open: return "<gray>";
case _ansiStyles.default.white.open: return "<white>";
case _ansiStyles.default.yellow.open: return "<yellow>";
case _ansiStyles.default.bgRed.open: return "<bgRed>";
case _ansiStyles.default.bgGreen.open: return "<bgGreen>";
case _ansiStyles.default.bgYellow.open: return "<bgYellow>";
case _ansiStyles.default.inverse.open: return "<inverse>";
case _ansiStyles.default.dim.open: return "<dim>";
case _ansiStyles.default.bold.open: return "<bold>";
default: return "";
}
});
const test = (val) => typeof val === "string" && !!val.match((0, _ansiRegex.default)());
exports.test = test;
const serialize = (val, config, indentation, depth, refs, printer) => printer(toHumanReadableAnsi(val), config, indentation, depth, refs);
exports.serialize = serialize;
exports.default = {
serialize,
test
};
}));
//#endregion
//#region ../../../../node_modules/pretty-format/build/plugins/DOMCollection.js
var require_DOMCollection = /* @__PURE__ */ __commonJSMin(((exports) => {
Object.defineProperty(exports, "__esModule", { value: true });
exports.test = exports.serialize = exports.default = void 0;
var _collections = require_collections();
/**
* Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
const SPACE = " ";
const OBJECT_NAMES = ["DOMStringMap", "NamedNodeMap"];
const ARRAY_REGEXP = /^(HTML\w*Collection|NodeList)$/;
const testName = (name) => OBJECT_NAMES.indexOf(name) !== -1 || ARRAY_REGEXP.test(name);
const test = (val) => val && val.constructor && !!val.constructor.name && testName(val.constructor.name);
exports.test = test;
const isNamedNodeMap = (collection) => collection.constructor.name === "NamedNodeMap";
const serialize = (collection, config, indentation, depth, refs, printer) => {
const name = collection.constructor.name;
if (++depth > config.maxDepth) return "[" + name + "]";
return (config.min ? "" : name + SPACE) + (OBJECT_NAMES.indexOf(name) !== -1 ? "{" + (0, _collections.printObjectProperties)(isNamedNodeMap(collection) ? Array.from(collection).reduce((props, attribute) => {
props[attribute.name] = attribute.value;
return props;
}, {}) : { ...collection }, config, indentation, depth, refs, printer) + "}" : "[" + (0, _collections.printListItems)(Array.from(collection), config, indentation, depth, refs, printer) + "]");
};
exports.serialize = serialize;
exports.default = {
serialize,
test
};
}));
//#endregion
//#region ../../../../node_modules/pretty-format/build/plugins/lib/escapeHTML.js
var require_escapeHTML = /* @__PURE__ */ __commonJSMin(((exports) => {
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = escapeHTML;
/**
* Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
function escapeHTML(str) {
return str.replace(/</g, "<").replace(/>/g, ">");
}
}));
//#endregion
//#region ../../../../node_modules/pretty-format/build/plugins/lib/markup.js
var require_markup = /* @__PURE__ */ __commonJSMin(((exports) => {
Object.defineProperty(exports, "__esModule", { value: true });
exports.printText = exports.printProps = exports.printElementAsLeaf = exports.printElement = exports.printComment = exports.printChildren = void 0;
var _escapeHTML = _interopRequireDefault(require_escapeHTML());
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : { default: obj };
}
/**
* Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
const printProps = (keys, props, config, indentation, depth, refs, printer) => {
const indentationNext = indentation + config.indent;
const colors = config.colors;
return keys.map((key) => {
const value = props[key];
let printed = printer(value, config, indentationNext, depth, refs);
if (typeof value !== "string") {
if (printed.indexOf("\n") !== -1) 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("");
};
exports.printProps = printProps;
const printChildren = (children, config, indentation, depth, refs, printer) => children.map((child) => config.spacingOuter + indentation + (typeof child === "string" ? printText(child, config) : printer(child, config, indentation, depth, refs))).join("");
exports.printChildren = printChildren;
const printText = (text, config) => {
const contentColor = config.colors.content;
return contentColor.open + (0, _escapeHTML.default)(text) + contentColor.close;
};
exports.printText = printText;
const printComment = (comment, config) => {
const commentColor = config.colors.comment;
return commentColor.open + "<!--" + (0, _escapeHTML.default)(comment) + "-->" + commentColor.close;
};
exports.printComment = printComment;
const 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;
};
exports.printElement = printElement;
const printElementAsLeaf = (type, config) => {
const tagColor = config.colors.tag;
return tagColor.open + "<" + type + tagColor.close + " …" + tagColor.open + " />" + tagColor.close;
};
exports.printElementAsLeaf = printElementAsLeaf;
}));
//#endregion
//#region ../../../../node_modules/pretty-format/build/plugins/DOMElement.js
var require_DOMElement = /* @__PURE__ */ __commonJSMin(((exports) => {
Object.defineProperty(exports, "__esModule", { value: true });
exports.test = exports.serialize = exports.default = void 0;
var _markup = require_markup();
/**
* Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
const ELEMENT_NODE = 1;
const TEXT_NODE = 3;
const COMMENT_NODE = 8;
const FRAGMENT_NODE = 11;
const ELEMENT_REGEXP = /^((HTML|SVG)\w*)?Element$/;
const testHasAttribute = (val) => {
try {
return typeof val.hasAttribute === "function" && val.hasAttribute("is");
} catch {
return false;
}
};
const 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";
};
const test = (val) => {
var _val$constructor;
return (val === null || val === void 0 ? void 0 : (_val$constructor = val.constructor) === null || _val$constructor === void 0 ? void 0 : _val$constructor.name) && testNode(val);
};
exports.test = test;
function nodeIsText(node) {
return node.nodeType === TEXT_NODE;
}
function nodeIsComment(node) {
return node.nodeType === COMMENT_NODE;
}
function nodeIsFragment(node) {
return node.nodeType === FRAGMENT_NODE;
}
const serialize = (node, config, indentation, depth, refs, printer) => {
if (nodeIsText(node)) return (0, _markup.printText)(node.data, config);
if (nodeIsComment(node)) return (0, _markup.printComment)(node.data, config);
const type = nodeIsFragment(node) ? "DocumentFragment" : node.tagName.toLowerCase();
if (++depth > config.maxDepth) return (0, _markup.printElementAsLeaf)(type, config);
return (0, _markup.printElement)(type, (0, _markup.printProps)(nodeIsFragment(node) ? [] : Array.from(node.attributes).map((attr) => attr.name).sort(), nodeIsFragment(node) ? {} : Array.from(node.attributes).reduce((props, attribute) => {
props[attribute.name] = attribute.value;
return props;
}, {}), config, indentation + config.indent, depth, refs, printer), (0, _markup.printChildren)(Array.prototype.slice.call(node.childNodes || node.children), config, indentation + config.indent, depth, refs, printer), config, indentation);
};
exports.serialize = serialize;
exports.default = {
serialize,
test
};
}));
//#endregion
//#region ../../../../node_modules/pretty-format/build/plugins/Immutable.js
var require_Immutable = /* @__PURE__ */ __commonJSMin(((exports) => {
Object.defineProperty(exports, "__esModule", { value: true });
exports.test = exports.serialize = exports.default = void 0;
var _collections = require_collections();
/**
* Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
const IS_ITERABLE_SENTINEL = "@@__IMMUTABLE_ITERABLE__@@";
const IS_LIST_SENTINEL = "@@__IMMUTABLE_LIST__@@";
const IS_KEYED_SENTINEL = "@@__IMMUTABLE_KEYED__@@";
const IS_MAP_SENTINEL = "@@__IMMUTABLE_MAP__@@";
const IS_ORDERED_SENTINEL = "@@__IMMUTABLE_ORDERED__@@";
const IS_RECORD_SENTINEL = "@@__IMMUTABLE_RECORD__@@";
const IS_SEQ_SENTINEL = "@@__IMMUTABLE_SEQ__@@";
const IS_SET_SENTINEL = "@@__IMMUTABLE_SET__@@";
const IS_STACK_SENTINEL = "@@__IMMUTABLE_STACK__@@";
const getImmutableName = (name) => "Immutable." + name;
const printAsLeaf = (name) => "[" + name + "]";
const LAZY = "…";
const printImmutableEntries = (val, config, indentation, depth, refs, printer, type) => ++depth > config.maxDepth ? printAsLeaf(getImmutableName(type)) : getImmutableName(type) + " {" + (0, _collections.printIteratorEntries)(val.entries(), config, indentation, depth, refs, printer) + "}";
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
};
} };
}
const printImmutableRecord = (val, config, indentation, depth, refs, printer) => {
const name = getImmutableName(val._name || "Record");
return ++depth > config.maxDepth ? printAsLeaf(name) : name + " {" + (0, _collections.printIteratorEntries)(getRecordEntries(val), config, indentation, depth, refs, printer) + "}";
};
const printImmutableSeq = (val, config, indentation, depth, refs, printer) => {
const name = getImmutableName("Seq");
if (++depth > config.maxDepth) return printAsLeaf(name);
if (val[IS_KEYED_SENTINEL]) return name + " {" + (val._iter || val._object ? (0, _collections.printIteratorEntries)(val.entries(), config, indentation, depth, refs, printer) : LAZY) + "}";
return name + " [" + (val._iter || val._array || val._collection || val._iterable ? (0, _collections.printIteratorValues)(val.values(), config, indentation, depth, refs, printer) : LAZY) + "]";
};
const printImmutableValues = (val, config, indentation, depth, refs, printer, type) => ++depth > config.maxDepth ? printAsLeaf(getImmutableName(type)) : getImmutableName(type) + " [" + (0, _collections.printIteratorValues)(val.values(), config, indentation, depth, refs, printer) + "]";
const serialize = (val, config, indentation, depth, refs, printer) => {
if (val[IS_MAP_SENTINEL]) return printImmutableEntries(val, config, indentation, depth, refs, printer, val[IS_ORDERED_SENTINEL] ? "OrderedMap" : "Map");
if (val[IS_LIST_SENTINEL]) return printImmutableValues(val, config, indentation, depth, refs, printer, "List");
if (val[IS_SET_SENTINEL]) return printImmutableValues(val, config, indentation, depth, refs, printer, val[IS_ORDERED_SENTINEL] ? "OrderedSet" : "Set");
if (val[IS_STACK_SENTINEL]) return printImmutableValues(val, config, indentation, depth, refs, printer, "Stack");
if (val[IS_SEQ_SENTINEL]) return printImmutableSeq(val, config, indentation, depth, refs, printer);
return printImmutableRecord(val, config, indentation, depth, refs, printer);
};
exports.serialize = serialize;
const test = (val) => val && (val[IS_ITERABLE_SENTINEL] === true || val[IS_RECORD_SENTINEL] === true);
exports.test = test;
exports.default = {
serialize,
test
};
}));
//#endregion
//#region ../../../../node_modules/pretty-format/node_modules/react-is/cjs/react-is.production.min.js
/** @license React v17.0.2
* react-is.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
var require_react_is_production_min = /* @__PURE__ */ __commonJSMin(((exports) => {
var b = 60103;
var c = 60106;
var d = 60107;
var e = 60108;
var f = 60114;
var g = 60109;
var h = 60110;
var k = 60112;
var l = 60113;
var m = 60120;
var n = 60115;
var p = 60116;
var q = 60121;
var r = 60122;
var u = 60117;
var v = 60129;
var w = 60131;
if ("function" === typeof Symbol && Symbol.for) {
var x = Symbol.for;
b = x("react.element");
c = x("react.portal");
d = x("react.fragment");
e = x("react.strict_mode");
f = x("react.profiler");
g = x("react.provider");
h = x("react.context");
k = x("react.forward_ref");
l = x("react.suspense");
m = x("react.suspense_list");
n = x("react.memo");
p = x("react.lazy");
q = x("react.block");
r = x("react.server.block");
u = x("react.fundamental");
v = x("react.debug_trace_mode");
w = x("react.legacy_hidden");
}
function y(a) {
if ("object" === typeof a && null !== a) {
var t = a.$$typeof;
switch (t) {
case b: switch (a = a.type, a) {
case d:
case f:
case e:
case l:
case m: return a;
default: switch (a = a && a.$$typeof, a) {
case h:
case k:
case p:
case n:
case g: return a;
default: return t;
}
}
case c: return t;
}
}
}
var z = g;
var A = b;
var B = k;
var C = d;
var D = p;
var E = n;
var F = c;
var G = f;
var H = e;
var I = l;
exports.ContextConsumer = h;
exports.ContextProvider = z;
exports.Element = A;
exports.ForwardRef = B;
exports.Fragment = C;
exports.Lazy = D;
exports.Memo = E;
exports.Portal = F;
exports.Profiler = G;
exports.StrictMode = H;
exports.Suspense = I;
exports.isAsyncMode = function() {
return !1;
};
exports.isConcurrentMode = function() {
return !1;
};
exports.isContextConsumer = function(a) {
return y(a) === h;
};
exports.isContextProvider = function(a) {
return y(a) === g;
};
exports.isElement = function(a) {
return "object" === typeof a && null !== a && a.$$typeof === b;
};
exports.isForwardRef = function(a) {
return y(a) === k;
};
exports.isFragment = function(a) {
return y(a) === d;
};
exports.isLazy = function(a) {
return y(a) === p;
};
exports.isMemo = function(a) {
return y(a) === n;
};
exports.isPortal = function(a) {
return y(a) === c;
};
exports.isProfiler = function(a) {
return y(a) === f;
};
exports.isStrictMode = function(a) {
return y(a) === e;
};
exports.isSuspense = function(a) {
return y(a) === l;
};
exports.isValidElementType = function(a) {
return "string" === typeof a || "function" === typeof a || a === d || a === f || a === v || a === e || a === l || a === m || a === w || "object" === typeof a && null !== a && (a.$$typeof === p || a.$$typeof === n || a.$$typeof === g || a.$$typeof === h || a.$$typeof === k || a.$$typeof === u || a.$$typeof === q || a[0] === r) ? !0 : !1;
};
exports.typeOf = y;
}));
//#endregion
//#region ../../../../node_modules/pretty-format/node_modules/react-is/cjs/react-is.development.js
/** @license React v17.0.2
* react-is.development.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
var require_react_is_development = /* @__PURE__ */ __commonJSMin(((exports) => {
if (process.env.NODE_ENV !== "production") (function() {
"use strict";
var REACT_ELEMENT_TYPE = 60103;
var REACT_PORTAL_TYPE = 60106;
var REACT_FRAGMENT_TYPE = 60107;
var REACT_STRICT_MODE_TYPE = 60108;
var REACT_PROFILER_TYPE = 60114;
var REACT_PROVIDER_TYPE = 60109;
var REACT_CONTEXT_TYPE = 60110;
var REACT_FORWARD_REF_TYPE = 60112;
var REACT_SUSPENSE_TYPE = 60113;
var REACT_SUSPENSE_LIST_TYPE = 60120;
var REACT_MEMO_TYPE = 60115;
var REACT_LAZY_TYPE = 60116;
var REACT_BLOCK_TYPE = 60121;
var REACT_SERVER_BLOCK_TYPE = 60122;
var REACT_FUNDAMENTAL_TYPE = 60117;
var REACT_DEBUG_TRACING_MODE_TYPE = 60129;
var REACT_LEGACY_HIDDEN_TYPE = 60131;
if (typeof Symbol === "function" && Symbol.for) {
var symbolFor = Symbol.for;
REACT_ELEMENT_TYPE = symbolFor("react.element");
REACT_PORTAL_TYPE = symbolFor("react.portal");
REACT_FRAGMENT_TYPE = symbolFor("react.fragment");
REACT_STRICT_MODE_TYPE = symbolFor("react.strict_mode");
REACT_PROFILER_TYPE = symbolFor("react.profiler");
REACT_PROVIDER_TYPE = symbolFor("react.provider");
REACT_CONTEXT_TYPE = symbolFor("react.context");
REACT_FORWARD_REF_TYPE = symbolFor("react.forward_ref");
REACT_SUSPENSE_TYPE = symbolFor("react.suspense");
REACT_SUSPENSE_LIST_TYPE = symbolFor("react.suspense_list");
REACT_MEMO_TYPE = symbolFor("react.memo");
REACT_LAZY_TYPE = symbolFor("react.lazy");
REACT_BLOCK_TYPE = symbolFor("react.block");
REACT_SERVER_BLOCK_TYPE = symbolFor("react.server.block");
REACT_FUNDAMENTAL_TYPE = symbolFor("react.fundamental");
symbolFor("react.scope");
symbolFor("react.opaque.id");
REACT_DEBUG_TRACING_MODE_TYPE = symbolFor("react.debug_trace_mode");
symbolFor("react.offscreen");
REACT_LEGACY_HIDDEN_TYPE = symbolFor("react.legacy_hidden");
}
var enableScopeAPI = false;
function isValidElementType(type) {
if (typeof type === "string" || typeof type === "function") return true;
if (type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || type === REACT_DEBUG_TRACING_MODE_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || type === REACT_LEGACY_HIDDEN_TYPE || enableScopeAPI) 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 || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_BLOCK_TYPE || type[0] === REACT_SERVER_BLOCK_TYPE) return true;
}
return false;
}
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_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;
}
}
}
var ContextConsumer = REACT_CONTEXT_TYPE;
var ContextProvider = REACT_PROVIDER_TYPE;
var Element = 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 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;
}
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;
}
function isContextConsumer(object) {
return typeOf(object) === REACT_CONTEXT_TYPE;
}
function isContextProvider(object) {
return typeOf(object) === REACT_PROVIDER_TYPE;
}
function isElement(object) {
return typeof object === "object" && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
}
function isForwardRef(object) {
return typeOf(object) === REACT_FORWARD_REF_TYPE;
}
function isFragment(object) {
return typeOf(object) === REACT_FRAGMENT_TYPE;
}
function isLazy(object) {
return typeOf(object) === REACT_LAZY_TYPE;
}
function isMemo(object) {
return typeOf(object) === REACT_MEMO_TYPE;
}
function isPortal(object) {
return typeOf(object) === REACT_PORTAL_TYPE;
}
function isProfiler(object) {
return typeOf(object) === REACT_PROFILER_TYPE;
}
function isStrictMode(object) {
return typeOf(object) === REACT_STRICT_MODE_TYPE;
}
function isSuspense(object) {
return typeOf(object) === REACT_SUSPENSE_TYPE;
}
exports.ContextConsumer = ContextConsumer;
exports.ContextProvider = ContextProvider;
exports.Element = Element;
exports.ForwardRef = ForwardRef;
exports.Fragment = Fragment;
exports.Lazy = Lazy;
exports.Memo = Memo;
exports.Portal = Portal;
exports.Profiler = Profiler;
exports.StrictMode = StrictMode;
exports.Suspense = Suspense;
exports.isAsyncMode = isAsyncMode;
exports.isConcurrentMode = isConcurrentMode;
exports.isContextConsumer = isContextConsumer;
exports.isContextProvider = isContextProvider;
exports.isElement = isElement;
exports.isForwardRef = isForwardRef;
exports.isFragment = isFragment;
exports.isLazy = isLazy;
exports.isMemo = isMemo;
exports.isPortal = isPortal;
exports.isProfiler = isProfiler;
exports.isStrictMode = isStrictMode;
exports.isSuspense = isSuspense;
exports.isValidElementType = isValidElementType;
exports.typeOf = typeOf;
})();
}));
//#endregion
//#region ../../../../node_modules/pretty-format/node_modules/react-is/index.js
var require_react_is = /* @__PURE__ */ __commonJSMin(((exports, module) => {
if (process.env.NODE_ENV === "production") module.exports = require_react_is_production_min();
else module.exports = require_react_is_development();
}));
//#endregion
//#region ../../../../node_modules/pretty-format/build/plugins/ReactElement.js
var require_ReactElement = /* @__PURE__ */ __commonJSMin(((exports) => {
Object.defineProperty(exports, "__esModule", { value: true });
exports.test = exports.serialize = exports.default = void 0;
var ReactIs = _interopRequireWildcard(require_react_is());
var _markup = require_markup();
function _getRequireWildcardCache(nodeInterop) {
if (typeof WeakMap !== "function") return null;
var cacheBabelInterop = /* @__PURE__ */ new WeakMap();
var cacheNodeInterop = /* @__PURE__ */ new WeakMap();
return (_getRequireWildcardCache = function(nodeInterop) {
return nodeInterop ? cacheNodeInterop : cacheBabelInterop;
})(nodeInterop);
}
function _interopRequireWildcard(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 = {};
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;
}
/**
* Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
const getChildren = (arg, children = []) => {
if (Array.isArray(arg)) arg.forEach((item) => {
getChildren(item, children);
});
else if (arg != null && arg !== false) children.push(arg);
return children;
};
const 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(" + functionName + ")" : "ForwardRef";
}
if (ReactIs.isMemo(element)) {
const functionName = type.displayName || type.type.displayName || type.type.name || "";
return functionName !== "" ? "Memo(" + functionName + ")" : "Memo";
}
}
return "UNDEFINED";
};
const getPropKeys = (element) => {
const { props } = element;
return Object.keys(props).filter((key) => key !== "children" && props[key] !== void 0).sort();
};
const serialize = (element, config, indentation, depth, refs, printer) => ++depth > config.maxDepth ? (0, _markup.printElementAsLeaf)(getType(element), config) : (0, _markup.printElement)(getType(element), (0, _markup.printProps)(getPropKeys(element), element.props, config, indentation + config.indent, depth, refs, printer), (0, _markup.printChildren)(getChildren(element.props.children), config, indentation + config.indent, depth, refs, printer), config, indentation);
exports.serialize = serialize;
const test = (val) => val != null && ReactIs.isElement(val);
exports.test = test;
exports.default = {
serialize,
test
};
}));
//#endregion
//#region ../../../../node_modules/pretty-format/build/plugins/ReactTestComponent.js
var require_ReactTestComponent = /* @__PURE__ */ __commonJSMin(((exports) => {
Object.defineProperty(exports, "__esModule", { value: true });
exports.test = exports.serialize = exports.default = void 0;
var _markup = require_markup();
var global = (function() {
if (typeof globalThis !== "undefined") return globalThis;
else if (typeof global !== "undefined") return global;
else if (typeof self !== "undefined") return self;
else if (typeof window !== "undefined") return window;
else return Function("return this")();
})();
var Symbol = global["jest-symbol-do-not-touch"] || global.Symbol;
const testSymbol = typeof Symbol === "function" && Symbol.for ? Symbol.for("react.test.json") : 245830487;
const getPropKeys = (object) => {
const { props } = object;
return props ? Object.keys(props).filter((key) => props[key] !== void 0).sort() : [];
};
const serialize = (object, config, indentation, depth, refs, printer) => ++depth > config.maxDepth ? (0, _markup.printElementAsLeaf)(object.type, config) : (0, _markup.printElement)(object.type, object.props ? (0, _markup.printProps)(getPropKeys(object), object.props, config, indentation + config.indent, depth, refs, printer) : "", object.children ? (0, _markup.printChildren)(object.children, config, indentation + config.indent, depth, refs, printer) : "", config, indentation);
exports.serialize = serialize;
const test = (val) => val && val.$$typeof === testSymbol;
exports.test = test;
exports.default = {
serialize,
test
};
}));
//#endregion
//#region ../../../../node_modules/pretty-format/build/index.js
var require_build = /* @__PURE__ */ __commonJSMin(((exports) => {
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = exports.DEFAULT_OPTIONS = void 0;
exports.format = format;
exports.plugins = void 0;
var _ansiStyles = _interopRequireDefault(require_ansi_styles());
var _collections = require_collections();
var _AsymmetricMatcher = _interopRequireDefault(require_AsymmetricMatcher());
var _ConvertAnsi = _interopRequireDefault(require_ConvertAnsi());
var _DOMCollection = _interopRequireDefault(require_DOMCollection());
var _DOMElement = _interopRequireDefault(require_DOMElement());
var _Immutable = _interopRequireDefault(require_Immutable());
var _ReactElement = _interopRequireDefault(require_ReactElement());
var _ReactTestComponent = _interopRequireDefault(require_ReactTestComponent());
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : { default: obj };
}
/**
* Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
const toString = Object.prototype.toString;
const toISOString = Date.prototype.toISOString;
const errorToString = Error.prototype.toString;
const regExpToString = RegExp.prototype.toString;
/**
* Explicitly comparing typeof constructor to function avoids undefined as name
* when mock identity-obj-proxy returns the key as the value for any key.
*/
const getConstructorName = (val) => typeof val.constructor === "function" && val.constructor.name || "Object";
/** Is val is equal to global window object? Works even if it does not exist :) */
const isWindow = (val) => typeof window !== "undefined" && val === window;
const SYMBOL_REGEXP = /^Symbol\((.*)\)(.*)$/;
const NEWLINE_REGEXP = /\n/gi;
var PrettyFormatPluginError = class extends Error {
constructor(message, stack) {
super(message);
this.stack = stack;
this.name = this.constructor.name;
}
};
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]";
}
function printNumber(val) {
return Object.is(val, -0) ? "-0" : String(val);
}
function printBigInt(val) {
return String(`${val}n`);
}
function printFunction(val, printFunctionName) {
if (!printFunctionName) return "[Function]";
return "[Function " + (val.name || "anonymous") + "]";
}
function printSymbol(val) {
return String(val).replace(SYMBOL_REGEXP, "Symbol($1)");
}
function printError(val) {
return "[" + errorToString.call(val) + "]";
}
/**
* The first port of call for printing an object, handles most of the
* data-types in JS.
*/
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.replace(/"|\\/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 isNaN(+val) ? "Date { NaN }" : toISOString.call(val);
if (toStringed === "[object Error]") return printError(val);
if (toStringed === "[object RegExp]") {
if (escapeRegex) return regExpToString.call(val).replace(/[\\^$*+?.()|[\]{}]/g, "\\$&");
return regExpToString.call(val);
}
if (val instanceof Error) return printError(val);
return null;
}
/**
* Handles more complex objects ( such as objects with circular references.
* maps and sets etc )
*/
function printComplexValue(val, config, indentation, depth, refs, hasCalledToJSON) {
if (refs.indexOf(val) !== -1) return "[Circular]";
refs = refs.slice();
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 ") + "[" + (0, _collections.printListItems)(val, config, indentation, depth, refs, printer) + "]";
if (isToStringedArrayType(toStringed)) return hitMaxDepth ?