playwright
Version:
A high-level API to automate web browsers
1,191 lines (1,183 loc) • 526 kB
JavaScript
"use strict";
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __commonJS = (cb, mod) => function __require() {
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
};
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
// If the importer is in node compatibility mode or this is not an ESM
// file that has been converted to a CommonJS file using a Babel-
// compatible transform (i.e. "__esModule" has not been set), then set
// "default" to the CommonJS "module.exports" for node compatibility.
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
mod
));
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// node_modules/@jest/get-type/build/index.js
var require_build = __commonJS({
"node_modules/@jest/get-type/build/index.js"(exports2, module2) {
(() => {
"use strict";
var __webpack_exports__ = {};
(() => {
var exports3 = __webpack_exports__;
Object.defineProperty(exports3, "__esModule", {
value: true
});
exports3.getType = getType2;
exports3.isPrimitive = void 0;
function getType2(value) {
if (value === void 0) {
return "undefined";
} else if (value === null) {
return "null";
} else if (Array.isArray(value)) {
return "array";
} else if (typeof value === "boolean") {
return "boolean";
} else if (typeof value === "function") {
return "function";
} else if (typeof value === "number") {
return "number";
} else if (typeof value === "string") {
return "string";
} else if (typeof value === "bigint") {
return "bigint";
} else if (typeof value === "object") {
if (value.constructor === RegExp) {
return "regexp";
} else if (value.constructor === Map) {
return "map";
} else if (value.constructor === Set) {
return "set";
} else if (value.constructor === Date) {
return "date";
}
return "object";
} else if (typeof value === "symbol") {
return "symbol";
}
throw new Error(`value of unknown type: ${value}`);
}
const isPrimitive2 = (value) => Object(value) !== value;
exports3.isPrimitive = isPrimitive2;
})();
module2.exports = __webpack_exports__;
})();
}
});
// node_modules/@jest/expect-utils/build/index.js
var require_build2 = __commonJS({
"node_modules/@jest/expect-utils/build/index.js"(exports2, module2) {
(() => {
"use strict";
var __webpack_modules__ = {
/***/
"./src/immutableUtils.ts": (
/***/
((__unused_webpack_module, exports3) => {
Object.defineProperty(exports3, "__esModule", {
value: true
});
exports3.isImmutableList = isImmutableList;
exports3.isImmutableOrderedKeyed = isImmutableOrderedKeyed;
exports3.isImmutableOrderedSet = isImmutableOrderedSet;
exports3.isImmutableRecord = isImmutableRecord;
exports3.isImmutableUnorderedKeyed = isImmutableUnorderedKeyed;
exports3.isImmutableUnorderedSet = isImmutableUnorderedSet;
const IS_KEYED_SENTINEL = "@@__IMMUTABLE_KEYED__@@";
const IS_SET_SENTINEL = "@@__IMMUTABLE_SET__@@";
const IS_LIST_SENTINEL = "@@__IMMUTABLE_LIST__@@";
const IS_ORDERED_SENTINEL = "@@__IMMUTABLE_ORDERED__@@";
const IS_RECORD_SYMBOL = "@@__IMMUTABLE_RECORD__@@";
function isObjectLiteral(source) {
return source != null && typeof source === "object" && !Array.isArray(source);
}
function isImmutableUnorderedKeyed(source) {
return Boolean(source && isObjectLiteral(source) && source[IS_KEYED_SENTINEL] && !source[IS_ORDERED_SENTINEL]);
}
function isImmutableUnorderedSet(source) {
return Boolean(source && isObjectLiteral(source) && source[IS_SET_SENTINEL] && !source[IS_ORDERED_SENTINEL]);
}
function isImmutableList(source) {
return Boolean(source && isObjectLiteral(source) && source[IS_LIST_SENTINEL]);
}
function isImmutableOrderedKeyed(source) {
return Boolean(source && isObjectLiteral(source) && source[IS_KEYED_SENTINEL] && source[IS_ORDERED_SENTINEL]);
}
function isImmutableOrderedSet(source) {
return Boolean(source && isObjectLiteral(source) && source[IS_SET_SENTINEL] && source[IS_ORDERED_SENTINEL]);
}
function isImmutableRecord(source) {
return Boolean(source && isObjectLiteral(source) && source[IS_RECORD_SYMBOL]);
}
})
),
/***/
"./src/index.ts": (
/***/
((__unused_webpack_module, exports3, __webpack_require__2) => {
Object.defineProperty(exports3, "__esModule", {
value: true
});
var _exportNames = {
equals: true,
isA: true
};
Object.defineProperty(exports3, "equals", {
enumerable: true,
get: function() {
return _jasmineUtils.equals;
}
});
Object.defineProperty(exports3, "isA", {
enumerable: true,
get: function() {
return _jasmineUtils.isA;
}
});
var _jasmineUtils = __webpack_require__2("./src/jasmineUtils.ts");
var _utils = __webpack_require__2("./src/utils.ts");
Object.keys(_utils).forEach(function(key) {
if (key === "default" || key === "__esModule") return;
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
if (key in exports3 && exports3[key] === _utils[key]) return;
Object.defineProperty(exports3, key, {
enumerable: true,
get: function() {
return _utils[key];
}
});
});
})
),
/***/
"./src/jasmineUtils.ts": (
/***/
((__unused_webpack_module, exports3) => {
Object.defineProperty(exports3, "__esModule", {
value: true
});
exports3.equals = void 0;
exports3.isA = isA2;
const equals2 = (a, b, customTesters, strictCheck) => {
customTesters = customTesters || [];
return eq(a, b, [], [], customTesters, strictCheck);
};
exports3.equals = equals2;
function isAsymmetric(obj) {
return !!obj && isA2("Function", obj.asymmetricMatch);
}
function asymmetricMatch(a, b) {
const asymmetricA = isAsymmetric(a);
const asymmetricB = isAsymmetric(b);
if (asymmetricA && asymmetricB) {
return void 0;
}
if (asymmetricA) {
return a.asymmetricMatch(b);
}
if (asymmetricB) {
return b.asymmetricMatch(a);
}
}
function eq(a, b, aStack, bStack, customTesters, strictCheck) {
let result = true;
const asymmetricResult = asymmetricMatch(a, b);
if (asymmetricResult !== void 0) {
return asymmetricResult;
}
const testerContext = {
equals: equals2
};
for (const item of customTesters) {
const customTesterResult = item.call(testerContext, a, b, customTesters);
if (customTesterResult !== void 0) {
return customTesterResult;
}
}
if (a instanceof Error && b instanceof Error) {
return a.message === b.message;
}
if (Object.is(a, b)) {
return true;
}
if (a === null || b === null) {
return false;
}
const className = Object.prototype.toString.call(a);
if (className !== Object.prototype.toString.call(b)) {
return false;
}
switch (className) {
case "[object Boolean]":
case "[object String]":
case "[object Number]":
if (typeof a !== typeof b) {
return false;
} else if (typeof a !== "object" && typeof b !== "object") {
return false;
} else {
return Object.is(a.valueOf(), b.valueOf());
}
case "[object Date]":
return +a === +b;
// RegExps are compared by their source patterns and flags.
case "[object RegExp]":
return a.source === b.source && a.flags === b.flags;
// URLs are compared by their href property which contains the entire url string.
case "[object URL]":
return a.href === b.href;
}
if (typeof a !== "object" || typeof b !== "object") {
return false;
}
if (isDomNode(a) && isDomNode(b)) {
return a.isEqualNode(b);
}
let length = aStack.length;
while (length--) {
if (aStack[length] === a) {
return bStack[length] === b;
} else if (bStack[length] === b) {
return false;
}
}
aStack.push(a);
bStack.push(b);
if (strictCheck && className === "[object Array]" && a.length !== b.length) {
return false;
}
const aKeys = keys(a, hasKey);
let key;
const bKeys = keys(b, hasKey);
if (!strictCheck) {
for (let index = 0; index !== bKeys.length; ++index) {
key = bKeys[index];
if ((isAsymmetric(b[key]) || b[key] === void 0) && !hasKey(a, key)) {
aKeys.push(key);
}
}
for (let index = 0; index !== aKeys.length; ++index) {
key = aKeys[index];
if ((isAsymmetric(a[key]) || a[key] === void 0) && !hasKey(b, key)) {
bKeys.push(key);
}
}
}
let size = aKeys.length;
if (bKeys.length !== size) {
return false;
}
while (size--) {
key = aKeys[size];
if (strictCheck) result = hasKey(b, key) && eq(a[key], b[key], aStack, bStack, customTesters, strictCheck);
else result = (hasKey(b, key) || isAsymmetric(a[key]) || a[key] === void 0) && eq(a[key], b[key], aStack, bStack, customTesters, strictCheck);
if (!result) {
return false;
}
}
aStack.pop();
bStack.pop();
return result;
}
function keys(obj, hasKey2) {
const keys2 = [];
for (const key in obj) {
if (hasKey2(obj, key)) {
keys2.push(key);
}
}
return [...keys2, ...Object.getOwnPropertySymbols(obj).filter((symbol) => Object.getOwnPropertyDescriptor(obj, symbol).enumerable)];
}
function hasKey(obj, key) {
return Object.prototype.hasOwnProperty.call(obj, key);
}
function isA2(typeName, value) {
return Object.prototype.toString.apply(value) === `[object ${typeName}]`;
}
function isDomNode(obj) {
return obj !== null && typeof obj === "object" && typeof obj.nodeType === "number" && typeof obj.nodeName === "string" && typeof obj.isEqualNode === "function";
}
})
),
/***/
"./src/utils.ts": (
/***/
((__unused_webpack_module, exports3, __webpack_require__2) => {
Object.defineProperty(exports3, "__esModule", {
value: true
});
exports3.arrayBufferEquality = void 0;
exports3.emptyObject = emptyObject2;
exports3.typeEquality = exports3.subsetEquality = exports3.sparseArrayEquality = exports3.pathAsArray = exports3.partition = exports3.iterableEquality = exports3.isOneline = exports3.isError = exports3.getPath = exports3.getObjectSubset = exports3.getObjectKeys = void 0;
var _getType = require_build();
var _immutableUtils = __webpack_require__2("./src/immutableUtils.ts");
var _jasmineUtils = __webpack_require__2("./src/jasmineUtils.ts");
var Symbol2 = globalThis["jest-symbol-do-not-touch"] || globalThis.Symbol;
const hasPropertyInObject = (object, key) => {
const shouldTerminate = !object || typeof object !== "object" || object === Object.prototype;
if (shouldTerminate) {
return false;
}
return Object.prototype.hasOwnProperty.call(object, key) || hasPropertyInObject(Object.getPrototypeOf(object), key);
};
const getObjectKeys2 = (object) => {
return [...Object.keys(object), ...Object.getOwnPropertySymbols(object).filter((s) => Object.getOwnPropertyDescriptor(object, s)?.enumerable)];
};
exports3.getObjectKeys = getObjectKeys2;
const getPath2 = (object, propertyPath) => {
if (!Array.isArray(propertyPath)) {
propertyPath = pathAsArray2(propertyPath);
}
if (propertyPath.length > 0) {
const lastProp = propertyPath.length === 1;
const prop = propertyPath[0];
const newObject = object[prop];
if (!lastProp && (newObject === null || newObject === void 0)) {
return {
hasEndProp: false,
lastTraversedObject: object,
traversedPath: []
};
}
const result = getPath2(newObject, propertyPath.slice(1));
if (result.lastTraversedObject === null) {
result.lastTraversedObject = object;
}
result.traversedPath.unshift(prop);
if (lastProp) {
result.endPropIsDefined = !(0, _getType.isPrimitive)(object) && prop in object;
result.hasEndProp = newObject !== void 0 || result.endPropIsDefined;
if (!result.hasEndProp) {
result.traversedPath.shift();
}
}
return result;
}
return {
lastTraversedObject: null,
traversedPath: [],
value: object
};
};
exports3.getPath = getPath2;
const getObjectSubset2 = (object, subset, customTesters = [], seenReferences = /* @__PURE__ */ new WeakMap()) => {
if (Array.isArray(object)) {
if (Array.isArray(subset) && subset.length === object.length) {
return subset.map((sub, i) => getObjectSubset2(object[i], sub, customTesters));
}
} else if (object instanceof Date) {
return object;
} else if (isObject2(object) && isObject2(subset)) {
if ((0, _jasmineUtils.equals)(object, subset, [...customTesters, iterableEquality2, subsetEquality2])) {
return subset;
}
const trimmed = {};
seenReferences.set(object, trimmed);
for (const key of getObjectKeys2(object).filter((key2) => hasPropertyInObject(subset, key2))) {
trimmed[key] = seenReferences.has(object[key]) ? seenReferences.get(object[key]) : getObjectSubset2(object[key], subset[key], customTesters, seenReferences);
}
if (getObjectKeys2(trimmed).length > 0) {
return trimmed;
}
}
return object;
};
exports3.getObjectSubset = getObjectSubset2;
const IteratorSymbol = Symbol2.iterator;
const hasIterator = (object) => !!(object != null && object[IteratorSymbol]);
const iterableEquality2 = (a, b, customTesters = [], aStack = [], bStack = []) => {
if (typeof a !== "object" || typeof b !== "object" || Array.isArray(a) || Array.isArray(b) || ArrayBuffer.isView(a) || ArrayBuffer.isView(b) || !hasIterator(a) || !hasIterator(b)) {
return void 0;
}
if (a.constructor !== b.constructor) {
return false;
}
let length = aStack.length;
while (length--) {
if (aStack[length] === a) {
return bStack[length] === b;
}
}
aStack.push(a);
bStack.push(b);
const iterableEqualityWithStack = (a2, b2) => iterableEquality2(a2, b2, [...filteredCustomTesters], [...aStack], [...bStack]);
const filteredCustomTesters = [...customTesters.filter((t) => t !== iterableEquality2), iterableEqualityWithStack];
if (a.size !== void 0) {
if (a.size !== b.size) {
return false;
} else if ((0, _jasmineUtils.isA)("Set", a) || (0, _immutableUtils.isImmutableUnorderedSet)(a)) {
let allFound = true;
for (const aValue of a) {
if (!b.has(aValue)) {
let has = false;
for (const bValue of b) {
const isEqual = (0, _jasmineUtils.equals)(aValue, bValue, filteredCustomTesters);
if (isEqual === true) {
has = true;
}
}
if (has === false) {
allFound = false;
break;
}
}
}
aStack.pop();
bStack.pop();
return allFound;
} else if ((0, _jasmineUtils.isA)("Map", a) || (0, _immutableUtils.isImmutableUnorderedKeyed)(a)) {
let allFound = true;
for (const aEntry of a) {
if (!b.has(aEntry[0]) || !(0, _jasmineUtils.equals)(aEntry[1], b.get(aEntry[0]), filteredCustomTesters)) {
let has = false;
for (const bEntry of b) {
const matchedKey = (0, _jasmineUtils.equals)(aEntry[0], bEntry[0], filteredCustomTesters);
let matchedValue = false;
if (matchedKey === true) {
matchedValue = (0, _jasmineUtils.equals)(aEntry[1], bEntry[1], filteredCustomTesters);
}
if (matchedValue === true) {
has = true;
}
}
if (has === false) {
allFound = false;
break;
}
}
}
aStack.pop();
bStack.pop();
return allFound;
}
}
const bIterator = b[IteratorSymbol]();
for (const aValue of a) {
const nextB = bIterator.next();
if (nextB.done || !(0, _jasmineUtils.equals)(aValue, nextB.value, filteredCustomTesters)) {
return false;
}
}
if (!bIterator.next().done) {
return false;
}
if (!(0, _immutableUtils.isImmutableList)(a) && !(0, _immutableUtils.isImmutableOrderedKeyed)(a) && !(0, _immutableUtils.isImmutableOrderedSet)(a) && !(0, _immutableUtils.isImmutableRecord)(a)) {
const aEntries = entries(a);
const bEntries = entries(b);
if (!(0, _jasmineUtils.equals)(aEntries, bEntries)) {
return false;
}
}
aStack.pop();
bStack.pop();
return true;
};
exports3.iterableEquality = iterableEquality2;
const entries = (obj) => {
if (!isObject2(obj)) return [];
const symbolProperties = Object.getOwnPropertySymbols(obj).filter((key) => key !== Symbol2.iterator).map((key) => [key, obj[key]]);
return [...symbolProperties, ...Object.entries(obj)];
};
const isObject2 = (a) => a !== null && typeof a === "object";
const isObjectWithKeys = (a) => isObject2(a) && !(a instanceof Error) && !Array.isArray(a) && !(a instanceof Date) && !(a instanceof Set) && !(a instanceof Map);
const subsetEquality2 = (object, subset, customTesters = []) => {
const filteredCustomTesters = customTesters.filter((t) => t !== subsetEquality2);
const subsetEqualityWithContext = (seenReferences = /* @__PURE__ */ new WeakMap()) => (object2, subset2) => {
if (!isObjectWithKeys(subset2)) {
return void 0;
}
if (seenReferences.has(subset2)) return void 0;
seenReferences.set(subset2, true);
const matchResult = getObjectKeys2(subset2).every((key) => {
if (isObjectWithKeys(subset2[key])) {
if (seenReferences.has(subset2[key])) {
return (0, _jasmineUtils.equals)(object2[key], subset2[key], filteredCustomTesters);
}
}
const result = object2 != null && hasPropertyInObject(object2, key) && (0, _jasmineUtils.equals)(object2[key], subset2[key], [...filteredCustomTesters, subsetEqualityWithContext(seenReferences)]);
seenReferences.delete(subset2[key]);
return result;
});
seenReferences.delete(subset2);
return matchResult;
};
return subsetEqualityWithContext()(object, subset);
};
exports3.subsetEquality = subsetEquality2;
const typeEquality2 = (a, b) => {
if (a == null || b == null || a.constructor === b.constructor || // Since Jest globals are different from Node globals,
// constructors are different even between arrays when comparing properties of mock objects.
// Both of them should be able to compare correctly when they are array-to-array.
// https://github.com/jestjs/jest/issues/2549
Array.isArray(a) && Array.isArray(b)) {
return void 0;
}
return false;
};
exports3.typeEquality = typeEquality2;
const arrayBufferEquality2 = (a, b) => {
let dataViewA = a;
let dataViewB = b;
if (isArrayBuffer(a) && isArrayBuffer(b)) {
dataViewA = new DataView(a);
dataViewB = new DataView(b);
} else if (ArrayBuffer.isView(a) && ArrayBuffer.isView(b)) {
dataViewA = new DataView(a.buffer, a.byteOffset, a.byteLength);
dataViewB = new DataView(b.buffer, b.byteOffset, b.byteLength);
}
if (!(dataViewA instanceof DataView && dataViewB instanceof DataView)) {
return void 0;
}
if (dataViewA.byteLength !== dataViewB.byteLength) {
return false;
}
for (let i = 0; i < dataViewA.byteLength; i++) {
if (dataViewA.getUint8(i) !== dataViewB.getUint8(i)) {
return false;
}
}
return true;
};
exports3.arrayBufferEquality = arrayBufferEquality2;
function isArrayBuffer(obj) {
return Object.prototype.toString.call(obj) === "[object ArrayBuffer]";
}
const sparseArrayEquality2 = (a, b, customTesters = []) => {
if (!Array.isArray(a) || !Array.isArray(b)) {
return void 0;
}
const aKeys = Object.keys(a);
const bKeys = Object.keys(b);
return (0, _jasmineUtils.equals)(a, b, customTesters.filter((t) => t !== sparseArrayEquality2), true) && (0, _jasmineUtils.equals)(aKeys, bKeys);
};
exports3.sparseArrayEquality = sparseArrayEquality2;
const partition2 = (items, predicate) => {
const result = [[], []];
for (const item of items) result[predicate(item) ? 0 : 1].push(item);
return result;
};
exports3.partition = partition2;
const pathAsArray2 = (propertyPath) => {
const properties = [];
if (propertyPath === "") {
properties.push("");
return properties;
}
const pattern = new RegExp("[^.[\\]]+|(?=(?:\\.)(?:\\.|$))", "g");
if (propertyPath[0] === ".") {
properties.push("");
}
propertyPath.replaceAll(pattern, (match) => {
properties.push(match);
return match;
});
return properties;
};
exports3.pathAsArray = pathAsArray2;
const isError2 = (value) => {
switch (Object.prototype.toString.call(value)) {
case "[object Error]":
case "[object Exception]":
case "[object DOMException]":
return true;
default:
return value instanceof Error;
}
};
exports3.isError = isError2;
function emptyObject2(obj) {
return obj && typeof obj === "object" ? Object.keys(obj).length === 0 : false;
}
const MULTILINE_REGEXP = /[\n\r]/;
const isOneline2 = (expected, received) => typeof expected === "string" && typeof received === "string" && (!MULTILINE_REGEXP.test(expected) || !MULTILINE_REGEXP.test(received));
exports3.isOneline = isOneline2;
})
)
/******/
};
var __webpack_module_cache__ = {};
function __webpack_require__(moduleId) {
var cachedModule = __webpack_module_cache__[moduleId];
if (cachedModule !== void 0) {
return cachedModule.exports;
}
var module3 = __webpack_module_cache__[moduleId] = {
/******/
// no module.id needed
/******/
// no module.loaded needed
/******/
exports: {}
/******/
};
__webpack_modules__[moduleId](module3, module3.exports, __webpack_require__);
return module3.exports;
}
var __webpack_exports__ = __webpack_require__("./src/index.ts");
module2.exports = __webpack_exports__;
})();
}
});
// node_modules/pretty-format/node_modules/react-is/cjs/react-is.production.min.js
var require_react_is_production_min = __commonJS({
"node_modules/pretty-format/node_modules/react-is/cjs/react-is.production.min.js"(exports2) {
"use strict";
var b = Symbol.for("react.element");
var c = Symbol.for("react.portal");
var d = Symbol.for("react.fragment");
var e = Symbol.for("react.strict_mode");
var f = Symbol.for("react.profiler");
var g = Symbol.for("react.provider");
var h = Symbol.for("react.context");
var k = Symbol.for("react.server_context");
var l = Symbol.for("react.forward_ref");
var m = Symbol.for("react.suspense");
var n = Symbol.for("react.suspense_list");
var p = Symbol.for("react.memo");
var q = Symbol.for("react.lazy");
var t = Symbol.for("react.offscreen");
var u;
u = Symbol.for("react.module.reference");
function v(a) {
if ("object" === typeof a && null !== a) {
var r = a.$$typeof;
switch (r) {
case b:
switch (a = a.type, a) {
case d:
case f:
case e:
case m:
case n:
return a;
default:
switch (a = a && a.$$typeof, a) {
case k:
case h:
case l:
case q:
case p:
case g:
return a;
default:
return r;
}
}
case c:
return r;
}
}
}
exports2.ContextConsumer = h;
exports2.ContextProvider = g;
exports2.Element = b;
exports2.ForwardRef = l;
exports2.Fragment = d;
exports2.Lazy = q;
exports2.Memo = p;
exports2.Portal = c;
exports2.Profiler = f;
exports2.StrictMode = e;
exports2.Suspense = m;
exports2.SuspenseList = n;
exports2.isAsyncMode = function() {
return false;
};
exports2.isConcurrentMode = function() {
return false;
};
exports2.isContextConsumer = function(a) {
return v(a) === h;
};
exports2.isContextProvider = function(a) {
return v(a) === g;
};
exports2.isElement = function(a) {
return "object" === typeof a && null !== a && a.$$typeof === b;
};
exports2.isForwardRef = function(a) {
return v(a) === l;
};
exports2.isFragment = function(a) {
return v(a) === d;
};
exports2.isLazy = function(a) {
return v(a) === q;
};
exports2.isMemo = function(a) {
return v(a) === p;
};
exports2.isPortal = function(a) {
return v(a) === c;
};
exports2.isProfiler = function(a) {
return v(a) === f;
};
exports2.isStrictMode = function(a) {
return v(a) === e;
};
exports2.isSuspense = function(a) {
return v(a) === m;
};
exports2.isSuspenseList = function(a) {
return v(a) === n;
};
exports2.isValidElementType = function(a) {
return "string" === typeof a || "function" === typeof a || a === d || a === f || a === e || a === m || a === n || a === t || "object" === typeof a && null !== a && (a.$$typeof === q || a.$$typeof === p || a.$$typeof === g || a.$$typeof === h || a.$$typeof === l || a.$$typeof === u || void 0 !== a.getModuleId) ? true : false;
};
exports2.typeOf = v;
}
});
// node_modules/pretty-format/node_modules/react-is/cjs/react-is.development.js
var require_react_is_development = __commonJS({
"node_modules/pretty-format/node_modules/react-is/cjs/react-is.development.js"(exports2) {
"use strict";
if (process.env.NODE_ENV !== "production") {
(function() {
"use strict";
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;
}
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;
}
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 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;
}
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;
}
function isSuspenseList(object) {
return typeOf(object) === REACT_SUSPENSE_LIST_TYPE;
}
exports2.ContextConsumer = ContextConsumer;
exports2.ContextProvider = ContextProvider;
exports2.Element = Element;
exports2.ForwardRef = ForwardRef;
exports2.Fragment = Fragment;
exports2.Lazy = Lazy;
exports2.Memo = Memo;
exports2.Portal = Portal;
exports2.Profiler = Profiler;
exports2.StrictMode = StrictMode;
exports2.Suspense = Suspense;
exports2.SuspenseList = SuspenseList;
exports2.isAsyncMode = isAsyncMode;
exports2.isConcurrentMode = isConcurrentMode;
exports2.isContextConsumer = isContextConsumer;
exports2.isContextProvider = isContextProvider;
exports2.isElement = isElement;
exports2.isForwardRef = isForwardRef;
exports2.isFragment = isFragment;
exports2.isLazy = isLazy;
exports2.isMemo = isMemo;
exports2.isPortal = isPortal;
exports2.isProfiler = isProfiler;
exports2.isStrictMode = isStrictMode;
exports2.isSuspense = isSuspense;
exports2.isSuspenseList = isSuspenseList;
exports2.isValidElementType = isValidElementType;
exports2.typeOf = typeOf;
})();
}
}
});
// node_modules/pretty-format/node_modules/react-is/index.js
var require_react_is = __commonJS({
"node_modules/pretty-format/node_modules/react-is/index.js"(exports2, module2) {
"use strict";
if (process.env.NODE_ENV === "production") {
module2.exports = require_react_is_production_min();
} else {
module2.exports = require_react_is_development();
}
}
});
// node_modules/pretty-format/node_modules/ansi-styles/index.js
var require_ansi_styles = __commonJS({
"node_modules/pretty-format/node_modules/ansi-styles/index.js"(exports2, module2) {
"use strict";
var ANSI_BACKGROUND_OFFSET = 10;
var wrapAnsi256 = (offset = 0) => (code) => `\x1B[${38 + offset};5;${code}m`;
var wrapAnsi16m = (offset = 0) => (red, green, blue) => `\x1B[${38 + offset};2;${red};${green};${blue}m`;
function assembleStyles() {
const codes = /* @__PURE__ */ new Map();
const styles = {
modifier: {
reset: [0, 0],
// 21 isn't widely supported and 22 does the same thing
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],
// Bright color
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],
// Bright color
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: `\x1B[${style[0]}m`,
close: `\x1B[${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(module2, "exports", {
enumerable: true,
get: assembleStyles
});
}
});
// node_modules/pretty-format/build/index.js
var require_build3 = __commonJS({
"node_modules/pretty-format/build/index.js"(exports2, module2) {
(() => {
"use strict";
var __webpack_modules__ = {
/***/
"./src/collections.ts": (
/***/
((__unused_webpack_module, exports3) => {
Object.defineProperty(exports3, "__esModule", {
value: true
});
exports3.printIteratorEntries = printIteratorEntries;
exports3.printIteratorValues = printIteratorValues;
exports3.printListItems = printListItems;
exports3.printObjectProperties = printObjectProperties;
const 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;
};
function printIteratorEntries(iterator, config, indentation, depth, refs, printer, 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 = printer(current.value[0], config, indentationNext, depth, refs);
const value = printer(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;
}
function printIteratorValues(iterator, config, indentation, depth, refs, printer) {
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 += 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;
}
function printListItems(list, config, indentation, depth, refs, printer) {
let result = "";
list = list instanceof ArrayBuffer ? new DataView(list) : list;
const isDataView = (l) => l instanceof DataView;
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 += printer(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;
}