var __defProp = Object.defineProperty;
var __publicField = (obj, key, value) => {
  if (typeof key !== "symbol")
    key += "";
  if (key in obj)
    return __defProp(obj, key, {enumerable: true, configurable: true, writable: true, value});
  return obj[key] = value;
};
import require$$2 from "/-/graceful-fs@v4.2.11-cXsltBXAT4B70ZlXsfIM/dist=es2019,mode=imports/optimized/graceful-fs.js";
import require$$3 from "/-/semver@v7.7.4-j2XY86JLdtb0IPFzbwXO/dist=es2019,mode=imports/optimized/semver.js";
import * as synckit from "/-/synckit@v0.11.12-S9EfLxcCTfEv3FuvvmXz/dist=es2019,mode=imports/optimized/synckit.js";
import require$$5 from "/-/chalk@v4.1.2-ph75OinuhcFcBbDGU374/dist=es2019,mode=imports/optimized/chalk.js";
import require$$6 from "/new/@jest/transform@v30.3.0/dist=es2019,mode=imports?from=@jest/transform";
import require$$7 from "/-/jest-util@v30.3.0-ceLc228BLjI7sNpXMqQ8/dist=es2019,mode=imports/optimized/jest-util.js";
import require$$8 from "/new/@jest/snapshot-utils@v30.3.0/dist=es2019,mode=imports?from=@jest/snapshot-utils";
import require$$9 from "/-/jest-message-util@v30.3.0-ohP5u720I0ml5m9d15N5/dist=es2019,mode=imports/optimized/jest-message-util.js";
import require$$10 from "/-/pretty-format@v30.3.0-vYHFi1rGwrcRqLVVjNfy/dist=es2019,mode=imports/optimized/pretty-format.js";
import require$$11 from "/new/@jest/expect-utils@v30.3.0/dist=es2019,mode=imports?from=@jest/expect-utils";
import require$$12 from "/-/@jest/get-type@v30.1.0-JPx304S5U4ckCrIAMjqf/dist=es2019,mode=imports/optimized/@jest/get-type.js";
import require$$13 from "/new/jest-diff@v30.3.0/dist=es2019,mode=imports?from=jest-diff";
import require$$14 from "/-/jest-matcher-utils@v30.3.0-yRFD2NDTzEr020F3cm76/dist=es2019,mode=imports/optimized/jest-matcher-utils.js";
function getDefaultExportFromCjs(x) {
  return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
}
function createCommonjsModule(fn, basedir, module) {
  return module = {
    path: basedir,
    exports: {},
    require: function(path2, base) {
      return commonjsRequire(path2, base === void 0 || base === null ? module.path : base);
    }
  }, fn(module, module.exports), module.exports;
}
function getDefaultExportFromNamespaceIfNotNamed(n) {
  return n && Object.prototype.hasOwnProperty.call(n, "default") && Object.keys(n).length === 1 ? n["default"] : n;
}
function commonjsRequire() {
  throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs");
}
function normalizeArray(parts, allowAboveRoot) {
  var up = 0;
  for (var i = parts.length - 1; i >= 0; i--) {
    var last = parts[i];
    if (last === ".") {
      parts.splice(i, 1);
    } else if (last === "..") {
      parts.splice(i, 1);
      up++;
    } else if (up) {
      parts.splice(i, 1);
      up--;
    }
  }
  if (allowAboveRoot) {
    for (; up--; up) {
      parts.unshift("..");
    }
  }
  return parts;
}
var splitPathRe = /^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/;
var splitPath = function(filename) {
  return splitPathRe.exec(filename).slice(1);
};
function resolve() {
  var resolvedPath = "", resolvedAbsolute = false;
  for (var i = arguments.length - 1; i >= -1 && !resolvedAbsolute; i--) {
    var path2 = i >= 0 ? arguments[i] : "/";
    if (typeof path2 !== "string") {
      throw new TypeError("Arguments to path.resolve must be strings");
    } else if (!path2) {
      continue;
    }
    resolvedPath = path2 + "/" + resolvedPath;
    resolvedAbsolute = path2.charAt(0) === "/";
  }
  resolvedPath = normalizeArray(filter(resolvedPath.split("/"), function(p) {
    return !!p;
  }), !resolvedAbsolute).join("/");
  return (resolvedAbsolute ? "/" : "") + resolvedPath || ".";
}
function normalize(path2) {
  var isPathAbsolute = isAbsolute(path2), trailingSlash = substr(path2, -1) === "/";
  path2 = normalizeArray(filter(path2.split("/"), function(p) {
    return !!p;
  }), !isPathAbsolute).join("/");
  if (!path2 && !isPathAbsolute) {
    path2 = ".";
  }
  if (path2 && trailingSlash) {
    path2 += "/";
  }
  return (isPathAbsolute ? "/" : "") + path2;
}
function isAbsolute(path2) {
  return path2.charAt(0) === "/";
}
function join() {
  var paths = Array.prototype.slice.call(arguments, 0);
  return normalize(filter(paths, function(p, index) {
    if (typeof p !== "string") {
      throw new TypeError("Arguments to path.join must be strings");
    }
    return p;
  }).join("/"));
}
function relative(from2, to) {
  from2 = resolve(from2).substr(1);
  to = resolve(to).substr(1);
  function trim(arr) {
    var start = 0;
    for (; start < arr.length; start++) {
      if (arr[start] !== "")
        break;
    }
    var end = arr.length - 1;
    for (; end >= 0; end--) {
      if (arr[end] !== "")
        break;
    }
    if (start > end)
      return [];
    return arr.slice(start, end - start + 1);
  }
  var fromParts = trim(from2.split("/"));
  var toParts = trim(to.split("/"));
  var length = Math.min(fromParts.length, toParts.length);
  var samePartsLength = length;
  for (var i = 0; i < length; i++) {
    if (fromParts[i] !== toParts[i]) {
      samePartsLength = i;
      break;
    }
  }
  var outputParts = [];
  for (var i = samePartsLength; i < fromParts.length; i++) {
    outputParts.push("..");
  }
  outputParts = outputParts.concat(toParts.slice(samePartsLength));
  return outputParts.join("/");
}
var sep = "/";
var delimiter = ":";
function dirname(path2) {
  var result = splitPath(path2), root = result[0], dir = result[1];
  if (!root && !dir) {
    return ".";
  }
  if (dir) {
    dir = dir.substr(0, dir.length - 1);
  }
  return root + dir;
}
function basename(path2, ext) {
  var f = splitPath(path2)[2];
  if (ext && f.substr(-1 * ext.length) === ext) {
    f = f.substr(0, f.length - ext.length);
  }
  return f;
}
function extname(path2) {
  return splitPath(path2)[3];
}
var path = {
  extname,
  basename,
  dirname,
  sep,
  delimiter,
  relative,
  join,
  isAbsolute,
  normalize,
  resolve
};
function filter(xs, f) {
  if (xs.filter)
    return xs.filter(f);
  var res = [];
  for (var i = 0; i < xs.length; i++) {
    if (f(xs[i], i, xs))
      res.push(xs[i]);
  }
  return res;
}
var substr = "ab".substr(-1) === "b" ? function(str, start, len) {
  return str.substr(start, len);
} : function(str, start, len) {
  if (start < 0)
    start = str.length + start;
  return str.substr(start, len);
};
var path$1 = /* @__PURE__ */ Object.freeze({
  __proto__: null,
  resolve,
  normalize,
  isAbsolute,
  join,
  relative,
  sep,
  delimiter,
  dirname,
  basename,
  extname,
  default: path
});
var global$1 = typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {};
var lookup = [];
var revLookup = [];
var Arr = typeof Uint8Array !== "undefined" ? Uint8Array : Array;
var inited = false;
function init() {
  inited = true;
  var code = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
  for (var i = 0, len = code.length; i < len; ++i) {
    lookup[i] = code[i];
    revLookup[code.charCodeAt(i)] = i;
  }
  revLookup["-".charCodeAt(0)] = 62;
  revLookup["_".charCodeAt(0)] = 63;
}
function toByteArray(b64) {
  if (!inited) {
    init();
  }
  var i, j, l, tmp, placeHolders, arr;
  var len = b64.length;
  if (len % 4 > 0) {
    throw new Error("Invalid string. Length must be a multiple of 4");
  }
  placeHolders = b64[len - 2] === "=" ? 2 : b64[len - 1] === "=" ? 1 : 0;
  arr = new Arr(len * 3 / 4 - placeHolders);
  l = placeHolders > 0 ? len - 4 : len;
  var L = 0;
  for (i = 0, j = 0; i < l; i += 4, j += 3) {
    tmp = revLookup[b64.charCodeAt(i)] << 18 | revLookup[b64.charCodeAt(i + 1)] << 12 | revLookup[b64.charCodeAt(i + 2)] << 6 | revLookup[b64.charCodeAt(i + 3)];
    arr[L++] = tmp >> 16 & 255;
    arr[L++] = tmp >> 8 & 255;
    arr[L++] = tmp & 255;
  }
  if (placeHolders === 2) {
    tmp = revLookup[b64.charCodeAt(i)] << 2 | revLookup[b64.charCodeAt(i + 1)] >> 4;
    arr[L++] = tmp & 255;
  } else if (placeHolders === 1) {
    tmp = revLookup[b64.charCodeAt(i)] << 10 | revLookup[b64.charCodeAt(i + 1)] << 4 | revLookup[b64.charCodeAt(i + 2)] >> 2;
    arr[L++] = tmp >> 8 & 255;
    arr[L++] = tmp & 255;
  }
  return arr;
}
function tripletToBase64(num) {
  return lookup[num >> 18 & 63] + lookup[num >> 12 & 63] + lookup[num >> 6 & 63] + lookup[num & 63];
}
function encodeChunk(uint8, start, end) {
  var tmp;
  var output = [];
  for (var i = start; i < end; i += 3) {
    tmp = (uint8[i] << 16) + (uint8[i + 1] << 8) + uint8[i + 2];
    output.push(tripletToBase64(tmp));
  }
  return output.join("");
}
function fromByteArray(uint8) {
  if (!inited) {
    init();
  }
  var tmp;
  var len = uint8.length;
  var extraBytes = len % 3;
  var output = "";
  var parts = [];
  var maxChunkLength = 16383;
  for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {
    parts.push(encodeChunk(uint8, i, i + maxChunkLength > len2 ? len2 : i + maxChunkLength));
  }
  if (extraBytes === 1) {
    tmp = uint8[len - 1];
    output += lookup[tmp >> 2];
    output += lookup[tmp << 4 & 63];
    output += "==";
  } else if (extraBytes === 2) {
    tmp = (uint8[len - 2] << 8) + uint8[len - 1];
    output += lookup[tmp >> 10];
    output += lookup[tmp >> 4 & 63];
    output += lookup[tmp << 2 & 63];
    output += "=";
  }
  parts.push(output);
  return parts.join("");
}
function read(buffer, offset, isLE, mLen, nBytes) {
  var e, m;
  var eLen = nBytes * 8 - mLen - 1;
  var eMax = (1 << eLen) - 1;
  var eBias = eMax >> 1;
  var nBits = -7;
  var i = isLE ? nBytes - 1 : 0;
  var d = isLE ? -1 : 1;
  var s = buffer[offset + i];
  i += d;
  e = s & (1 << -nBits) - 1;
  s >>= -nBits;
  nBits += eLen;
  for (; nBits > 0; e = e * 256 + buffer[offset + i], i += d, nBits -= 8) {
  }
  m = e & (1 << -nBits) - 1;
  e >>= -nBits;
  nBits += mLen;
  for (; nBits > 0; m = m * 256 + buffer[offset + i], i += d, nBits -= 8) {
  }
  if (e === 0) {
    e = 1 - eBias;
  } else if (e === eMax) {
    return m ? NaN : (s ? -1 : 1) * Infinity;
  } else {
    m = m + Math.pow(2, mLen);
    e = e - eBias;
  }
  return (s ? -1 : 1) * m * Math.pow(2, e - mLen);
}
function write(buffer, value, offset, isLE, mLen, nBytes) {
  var e, m, c;
  var eLen = nBytes * 8 - mLen - 1;
  var eMax = (1 << eLen) - 1;
  var eBias = eMax >> 1;
  var rt = mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0;
  var i = isLE ? 0 : nBytes - 1;
  var d = isLE ? 1 : -1;
  var s = value < 0 || value === 0 && 1 / value < 0 ? 1 : 0;
  value = Math.abs(value);
  if (isNaN(value) || value === Infinity) {
    m = isNaN(value) ? 1 : 0;
    e = eMax;
  } else {
    e = Math.floor(Math.log(value) / Math.LN2);
    if (value * (c = Math.pow(2, -e)) < 1) {
      e--;
      c *= 2;
    }
    if (e + eBias >= 1) {
      value += rt / c;
    } else {
      value += rt * Math.pow(2, 1 - eBias);
    }
    if (value * c >= 2) {
      e++;
      c /= 2;
    }
    if (e + eBias >= eMax) {
      m = 0;
      e = eMax;
    } else if (e + eBias >= 1) {
      m = (value * c - 1) * Math.pow(2, mLen);
      e = e + eBias;
    } else {
      m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen);
      e = 0;
    }
  }
  for (; mLen >= 8; buffer[offset + i] = m & 255, i += d, m /= 256, mLen -= 8) {
  }
  e = e << mLen | m;
  eLen += mLen;
  for (; eLen > 0; buffer[offset + i] = e & 255, i += d, e /= 256, eLen -= 8) {
  }
  buffer[offset + i - d] |= s * 128;
}
var toString = {}.toString;
var isArray = Array.isArray || function(arr) {
  return toString.call(arr) == "[object Array]";
};
/*!
 * The buffer module from node.js, for the browser.
 *
 * @author   Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
 * @license  MIT
 */
var INSPECT_MAX_BYTES = 50;
Buffer2.TYPED_ARRAY_SUPPORT = global$1.TYPED_ARRAY_SUPPORT !== void 0 ? global$1.TYPED_ARRAY_SUPPORT : true;
function kMaxLength() {
  return Buffer2.TYPED_ARRAY_SUPPORT ? 2147483647 : 1073741823;
}
function createBuffer(that, length) {
  if (kMaxLength() < length) {
    throw new RangeError("Invalid typed array length");
  }
  if (Buffer2.TYPED_ARRAY_SUPPORT) {
    that = new Uint8Array(length);
    that.__proto__ = Buffer2.prototype;
  } else {
    if (that === null) {
      that = new Buffer2(length);
    }
    that.length = length;
  }
  return that;
}
function Buffer2(arg, encodingOrOffset, length) {
  if (!Buffer2.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer2)) {
    return new Buffer2(arg, encodingOrOffset, length);
  }
  if (typeof arg === "number") {
    if (typeof encodingOrOffset === "string") {
      throw new Error("If encoding is specified then the first argument must be a string");
    }
    return allocUnsafe(this, arg);
  }
  return from(this, arg, encodingOrOffset, length);
}
Buffer2.poolSize = 8192;
Buffer2._augment = function(arr) {
  arr.__proto__ = Buffer2.prototype;
  return arr;
};
function from(that, value, encodingOrOffset, length) {
  if (typeof value === "number") {
    throw new TypeError('"value" argument must not be a number');
  }
  if (typeof ArrayBuffer !== "undefined" && value instanceof ArrayBuffer) {
    return fromArrayBuffer(that, value, encodingOrOffset, length);
  }
  if (typeof value === "string") {
    return fromString(that, value, encodingOrOffset);
  }
  return fromObject(that, value);
}
Buffer2.from = function(value, encodingOrOffset, length) {
  return from(null, value, encodingOrOffset, length);
};
if (Buffer2.TYPED_ARRAY_SUPPORT) {
  Buffer2.prototype.__proto__ = Uint8Array.prototype;
  Buffer2.__proto__ = Uint8Array;
}
function assertSize(size) {
  if (typeof size !== "number") {
    throw new TypeError('"size" argument must be a number');
  } else if (size < 0) {
    throw new RangeError('"size" argument must not be negative');
  }
}
function alloc(that, size, fill2, encoding) {
  assertSize(size);
  if (size <= 0) {
    return createBuffer(that, size);
  }
  if (fill2 !== void 0) {
    return typeof encoding === "string" ? createBuffer(that, size).fill(fill2, encoding) : createBuffer(that, size).fill(fill2);
  }
  return createBuffer(that, size);
}
Buffer2.alloc = function(size, fill2, encoding) {
  return alloc(null, size, fill2, encoding);
};
function allocUnsafe(that, size) {
  assertSize(size);
  that = createBuffer(that, size < 0 ? 0 : checked(size) | 0);
  if (!Buffer2.TYPED_ARRAY_SUPPORT) {
    for (var i = 0; i < size; ++i) {
      that[i] = 0;
    }
  }
  return that;
}
Buffer2.allocUnsafe = function(size) {
  return allocUnsafe(null, size);
};
Buffer2.allocUnsafeSlow = function(size) {
  return allocUnsafe(null, size);
};
function fromString(that, string, encoding) {
  if (typeof encoding !== "string" || encoding === "") {
    encoding = "utf8";
  }
  if (!Buffer2.isEncoding(encoding)) {
    throw new TypeError('"encoding" must be a valid string encoding');
  }
  var length = byteLength(string, encoding) | 0;
  that = createBuffer(that, length);
  var actual = that.write(string, encoding);
  if (actual !== length) {
    that = that.slice(0, actual);
  }
  return that;
}
function fromArrayLike(that, array) {
  var length = array.length < 0 ? 0 : checked(array.length) | 0;
  that = createBuffer(that, length);
  for (var i = 0; i < length; i += 1) {
    that[i] = array[i] & 255;
  }
  return that;
}
function fromArrayBuffer(that, array, byteOffset, length) {
  array.byteLength;
  if (byteOffset < 0 || array.byteLength < byteOffset) {
    throw new RangeError("'offset' is out of bounds");
  }
  if (array.byteLength < byteOffset + (length || 0)) {
    throw new RangeError("'length' is out of bounds");
  }
  if (byteOffset === void 0 && length === void 0) {
    array = new Uint8Array(array);
  } else if (length === void 0) {
    array = new Uint8Array(array, byteOffset);
  } else {
    array = new Uint8Array(array, byteOffset, length);
  }
  if (Buffer2.TYPED_ARRAY_SUPPORT) {
    that = array;
    that.__proto__ = Buffer2.prototype;
  } else {
    that = fromArrayLike(that, array);
  }
  return that;
}
function fromObject(that, obj) {
  if (internalIsBuffer(obj)) {
    var len = checked(obj.length) | 0;
    that = createBuffer(that, len);
    if (that.length === 0) {
      return that;
    }
    obj.copy(that, 0, 0, len);
    return that;
  }
  if (obj) {
    if (typeof ArrayBuffer !== "undefined" && obj.buffer instanceof ArrayBuffer || "length" in obj) {
      if (typeof obj.length !== "number" || isnan(obj.length)) {
        return createBuffer(that, 0);
      }
      return fromArrayLike(that, obj);
    }
    if (obj.type === "Buffer" && isArray(obj.data)) {
      return fromArrayLike(that, obj.data);
    }
  }
  throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.");
}
function checked(length) {
  if (length >= kMaxLength()) {
    throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x" + kMaxLength().toString(16) + " bytes");
  }
  return length | 0;
}
Buffer2.isBuffer = isBuffer;
function internalIsBuffer(b) {
  return !!(b != null && b._isBuffer);
}
Buffer2.compare = function compare(a, b) {
  if (!internalIsBuffer(a) || !internalIsBuffer(b)) {
    throw new TypeError("Arguments must be Buffers");
  }
  if (a === b)
    return 0;
  var x = a.length;
  var y = b.length;
  for (var i = 0, len = Math.min(x, y); i < len; ++i) {
    if (a[i] !== b[i]) {
      x = a[i];
      y = b[i];
      break;
    }
  }
  if (x < y)
    return -1;
  if (y < x)
    return 1;
  return 0;
};
Buffer2.isEncoding = function isEncoding(encoding) {
  switch (String(encoding).toLowerCase()) {
    case "hex":
    case "utf8":
    case "utf-8":
    case "ascii":
    case "latin1":
    case "binary":
    case "base64":
    case "ucs2":
    case "ucs-2":
    case "utf16le":
    case "utf-16le":
      return true;
    default:
      return false;
  }
};
Buffer2.concat = function concat(list, length) {
  if (!isArray(list)) {
    throw new TypeError('"list" argument must be an Array of Buffers');
  }
  if (list.length === 0) {
    return Buffer2.alloc(0);
  }
  var i;
  if (length === void 0) {
    length = 0;
    for (i = 0; i < list.length; ++i) {
      length += list[i].length;
    }
  }
  var buffer = Buffer2.allocUnsafe(length);
  var pos = 0;
  for (i = 0; i < list.length; ++i) {
    var buf = list[i];
    if (!internalIsBuffer(buf)) {
      throw new TypeError('"list" argument must be an Array of Buffers');
    }
    buf.copy(buffer, pos);
    pos += buf.length;
  }
  return buffer;
};
function byteLength(string, encoding) {
  if (internalIsBuffer(string)) {
    return string.length;
  }
  if (typeof ArrayBuffer !== "undefined" && typeof ArrayBuffer.isView === "function" && (ArrayBuffer.isView(string) || string instanceof ArrayBuffer)) {
    return string.byteLength;
  }
  if (typeof string !== "string") {
    string = "" + string;
  }
  var len = string.length;
  if (len === 0)
    return 0;
  var loweredCase = false;
  for (; ; ) {
    switch (encoding) {
      case "ascii":
      case "latin1":
      case "binary":
        return len;
      case "utf8":
      case "utf-8":
      case void 0:
        return utf8ToBytes(string).length;
      case "ucs2":
      case "ucs-2":
      case "utf16le":
      case "utf-16le":
        return len * 2;
      case "hex":
        return len >>> 1;
      case "base64":
        return base64ToBytes(string).length;
      default:
        if (loweredCase)
          return utf8ToBytes(string).length;
        encoding = ("" + encoding).toLowerCase();
        loweredCase = true;
    }
  }
}
Buffer2.byteLength = byteLength;
function slowToString(encoding, start, end) {
  var loweredCase = false;
  if (start === void 0 || start < 0) {
    start = 0;
  }
  if (start > this.length) {
    return "";
  }
  if (end === void 0 || end > this.length) {
    end = this.length;
  }
  if (end <= 0) {
    return "";
  }
  end >>>= 0;
  start >>>= 0;
  if (end <= start) {
    return "";
  }
  if (!encoding)
    encoding = "utf8";
  while (true) {
    switch (encoding) {
      case "hex":
        return hexSlice(this, start, end);
      case "utf8":
      case "utf-8":
        return utf8Slice(this, start, end);
      case "ascii":
        return asciiSlice(this, start, end);
      case "latin1":
      case "binary":
        return latin1Slice(this, start, end);
      case "base64":
        return base64Slice(this, start, end);
      case "ucs2":
      case "ucs-2":
      case "utf16le":
      case "utf-16le":
        return utf16leSlice(this, start, end);
      default:
        if (loweredCase)
          throw new TypeError("Unknown encoding: " + encoding);
        encoding = (encoding + "").toLowerCase();
        loweredCase = true;
    }
  }
}
Buffer2.prototype._isBuffer = true;
function swap(b, n, m) {
  var i = b[n];
  b[n] = b[m];
  b[m] = i;
}
Buffer2.prototype.swap16 = function swap16() {
  var len = this.length;
  if (len % 2 !== 0) {
    throw new RangeError("Buffer size must be a multiple of 16-bits");
  }
  for (var i = 0; i < len; i += 2) {
    swap(this, i, i + 1);
  }
  return this;
};
Buffer2.prototype.swap32 = function swap32() {
  var len = this.length;
  if (len % 4 !== 0) {
    throw new RangeError("Buffer size must be a multiple of 32-bits");
  }
  for (var i = 0; i < len; i += 4) {
    swap(this, i, i + 3);
    swap(this, i + 1, i + 2);
  }
  return this;
};
Buffer2.prototype.swap64 = function swap64() {
  var len = this.length;
  if (len % 8 !== 0) {
    throw new RangeError("Buffer size must be a multiple of 64-bits");
  }
  for (var i = 0; i < len; i += 8) {
    swap(this, i, i + 7);
    swap(this, i + 1, i + 6);
    swap(this, i + 2, i + 5);
    swap(this, i + 3, i + 4);
  }
  return this;
};
Buffer2.prototype.toString = function toString2() {
  var length = this.length | 0;
  if (length === 0)
    return "";
  if (arguments.length === 0)
    return utf8Slice(this, 0, length);
  return slowToString.apply(this, arguments);
};
Buffer2.prototype.equals = function equals(b) {
  if (!internalIsBuffer(b))
    throw new TypeError("Argument must be a Buffer");
  if (this === b)
    return true;
  return Buffer2.compare(this, b) === 0;
};
Buffer2.prototype.inspect = function inspect() {
  var str = "";
  var max = INSPECT_MAX_BYTES;
  if (this.length > 0) {
    str = this.toString("hex", 0, max).match(/.{2}/g).join(" ");
    if (this.length > max)
      str += " ... ";
  }
  return "<Buffer " + str + ">";
};
Buffer2.prototype.compare = function compare2(target, start, end, thisStart, thisEnd) {
  if (!internalIsBuffer(target)) {
    throw new TypeError("Argument must be a Buffer");
  }
  if (start === void 0) {
    start = 0;
  }
  if (end === void 0) {
    end = target ? target.length : 0;
  }
  if (thisStart === void 0) {
    thisStart = 0;
  }
  if (thisEnd === void 0) {
    thisEnd = this.length;
  }
  if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {
    throw new RangeError("out of range index");
  }
  if (thisStart >= thisEnd && start >= end) {
    return 0;
  }
  if (thisStart >= thisEnd) {
    return -1;
  }
  if (start >= end) {
    return 1;
  }
  start >>>= 0;
  end >>>= 0;
  thisStart >>>= 0;
  thisEnd >>>= 0;
  if (this === target)
    return 0;
  var x = thisEnd - thisStart;
  var y = end - start;
  var len = Math.min(x, y);
  var thisCopy = this.slice(thisStart, thisEnd);
  var targetCopy = target.slice(start, end);
  for (var i = 0; i < len; ++i) {
    if (thisCopy[i] !== targetCopy[i]) {
      x = thisCopy[i];
      y = targetCopy[i];
      break;
    }
  }
  if (x < y)
    return -1;
  if (y < x)
    return 1;
  return 0;
};
function bidirectionalIndexOf(buffer, val, byteOffset, encoding, dir) {
  if (buffer.length === 0)
    return -1;
  if (typeof byteOffset === "string") {
    encoding = byteOffset;
    byteOffset = 0;
  } else if (byteOffset > 2147483647) {
    byteOffset = 2147483647;
  } else if (byteOffset < -2147483648) {
    byteOffset = -2147483648;
  }
  byteOffset = +byteOffset;
  if (isNaN(byteOffset)) {
    byteOffset = dir ? 0 : buffer.length - 1;
  }
  if (byteOffset < 0)
    byteOffset = buffer.length + byteOffset;
  if (byteOffset >= buffer.length) {
    if (dir)
      return -1;
    else
      byteOffset = buffer.length - 1;
  } else if (byteOffset < 0) {
    if (dir)
      byteOffset = 0;
    else
      return -1;
  }
  if (typeof val === "string") {
    val = Buffer2.from(val, encoding);
  }
  if (internalIsBuffer(val)) {
    if (val.length === 0) {
      return -1;
    }
    return arrayIndexOf(buffer, val, byteOffset, encoding, dir);
  } else if (typeof val === "number") {
    val = val & 255;
    if (Buffer2.TYPED_ARRAY_SUPPORT && typeof Uint8Array.prototype.indexOf === "function") {
      if (dir) {
        return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset);
      } else {
        return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset);
      }
    }
    return arrayIndexOf(buffer, [val], byteOffset, encoding, dir);
  }
  throw new TypeError("val must be string, number or Buffer");
}
function arrayIndexOf(arr, val, byteOffset, encoding, dir) {
  var indexSize = 1;
  var arrLength = arr.length;
  var valLength = val.length;
  if (encoding !== void 0) {
    encoding = String(encoding).toLowerCase();
    if (encoding === "ucs2" || encoding === "ucs-2" || encoding === "utf16le" || encoding === "utf-16le") {
      if (arr.length < 2 || val.length < 2) {
        return -1;
      }
      indexSize = 2;
      arrLength /= 2;
      valLength /= 2;
      byteOffset /= 2;
    }
  }
  function read2(buf, i2) {
    if (indexSize === 1) {
      return buf[i2];
    } else {
      return buf.readUInt16BE(i2 * indexSize);
    }
  }
  var i;
  if (dir) {
    var foundIndex = -1;
    for (i = byteOffset; i < arrLength; i++) {
      if (read2(arr, i) === read2(val, foundIndex === -1 ? 0 : i - foundIndex)) {
        if (foundIndex === -1)
          foundIndex = i;
        if (i - foundIndex + 1 === valLength)
          return foundIndex * indexSize;
      } else {
        if (foundIndex !== -1)
          i -= i - foundIndex;
        foundIndex = -1;
      }
    }
  } else {
    if (byteOffset + valLength > arrLength)
      byteOffset = arrLength - valLength;
    for (i = byteOffset; i >= 0; i--) {
      var found = true;
      for (var j = 0; j < valLength; j++) {
        if (read2(arr, i + j) !== read2(val, j)) {
          found = false;
          break;
        }
      }
      if (found)
        return i;
    }
  }
  return -1;
}
Buffer2.prototype.includes = function includes(val, byteOffset, encoding) {
  return this.indexOf(val, byteOffset, encoding) !== -1;
};
Buffer2.prototype.indexOf = function indexOf(val, byteOffset, encoding) {
  return bidirectionalIndexOf(this, val, byteOffset, encoding, true);
};
Buffer2.prototype.lastIndexOf = function lastIndexOf(val, byteOffset, encoding) {
  return bidirectionalIndexOf(this, val, byteOffset, encoding, false);
};
function hexWrite(buf, string, offset, length) {
  offset = Number(offset) || 0;
  var remaining = buf.length - offset;
  if (!length) {
    length = remaining;
  } else {
    length = Number(length);
    if (length > remaining) {
      length = remaining;
    }
  }
  var strLen = string.length;
  if (strLen % 2 !== 0)
    throw new TypeError("Invalid hex string");
  if (length > strLen / 2) {
    length = strLen / 2;
  }
  for (var i = 0; i < length; ++i) {
    var parsed = parseInt(string.substr(i * 2, 2), 16);
    if (isNaN(parsed))
      return i;
    buf[offset + i] = parsed;
  }
  return i;
}
function utf8Write(buf, string, offset, length) {
  return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length);
}
function asciiWrite(buf, string, offset, length) {
  return blitBuffer(asciiToBytes(string), buf, offset, length);
}
function latin1Write(buf, string, offset, length) {
  return asciiWrite(buf, string, offset, length);
}
function base64Write(buf, string, offset, length) {
  return blitBuffer(base64ToBytes(string), buf, offset, length);
}
function ucs2Write(buf, string, offset, length) {
  return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length);
}
Buffer2.prototype.write = function write2(string, offset, length, encoding) {
  if (offset === void 0) {
    encoding = "utf8";
    length = this.length;
    offset = 0;
  } else if (length === void 0 && typeof offset === "string") {
    encoding = offset;
    length = this.length;
    offset = 0;
  } else if (isFinite(offset)) {
    offset = offset | 0;
    if (isFinite(length)) {
      length = length | 0;
      if (encoding === void 0)
        encoding = "utf8";
    } else {
      encoding = length;
      length = void 0;
    }
  } else {
    throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");
  }
  var remaining = this.length - offset;
  if (length === void 0 || length > remaining)
    length = remaining;
  if (string.length > 0 && (length < 0 || offset < 0) || offset > this.length) {
    throw new RangeError("Attempt to write outside buffer bounds");
  }
  if (!encoding)
    encoding = "utf8";
  var loweredCase = false;
  for (; ; ) {
    switch (encoding) {
      case "hex":
        return hexWrite(this, string, offset, length);
      case "utf8":
      case "utf-8":
        return utf8Write(this, string, offset, length);
      case "ascii":
        return asciiWrite(this, string, offset, length);
      case "latin1":
      case "binary":
        return latin1Write(this, string, offset, length);
      case "base64":
        return base64Write(this, string, offset, length);
      case "ucs2":
      case "ucs-2":
      case "utf16le":
      case "utf-16le":
        return ucs2Write(this, string, offset, length);
      default:
        if (loweredCase)
          throw new TypeError("Unknown encoding: " + encoding);
        encoding = ("" + encoding).toLowerCase();
        loweredCase = true;
    }
  }
};
Buffer2.prototype.toJSON = function toJSON() {
  return {
    type: "Buffer",
    data: Array.prototype.slice.call(this._arr || this, 0)
  };
};
function base64Slice(buf, start, end) {
  if (start === 0 && end === buf.length) {
    return fromByteArray(buf);
  } else {
    return fromByteArray(buf.slice(start, end));
  }
}
function utf8Slice(buf, start, end) {
  end = Math.min(buf.length, end);
  var res = [];
  var i = start;
  while (i < end) {
    var firstByte = buf[i];
    var codePoint = null;
    var bytesPerSequence = firstByte > 239 ? 4 : firstByte > 223 ? 3 : firstByte > 191 ? 2 : 1;
    if (i + bytesPerSequence <= end) {
      var secondByte, thirdByte, fourthByte, tempCodePoint;
      switch (bytesPerSequence) {
        case 1:
          if (firstByte < 128) {
            codePoint = firstByte;
          }
          break;
        case 2:
          secondByte = buf[i + 1];
          if ((secondByte & 192) === 128) {
            tempCodePoint = (firstByte & 31) << 6 | secondByte & 63;
            if (tempCodePoint > 127) {
              codePoint = tempCodePoint;
            }
          }
          break;
        case 3:
          secondByte = buf[i + 1];
          thirdByte = buf[i + 2];
          if ((secondByte & 192) === 128 && (thirdByte & 192) === 128) {
            tempCodePoint = (firstByte & 15) << 12 | (secondByte & 63) << 6 | thirdByte & 63;
            if (tempCodePoint > 2047 && (tempCodePoint < 55296 || tempCodePoint > 57343)) {
              codePoint = tempCodePoint;
            }
          }
          break;
        case 4:
          secondByte = buf[i + 1];
          thirdByte = buf[i + 2];
          fourthByte = buf[i + 3];
          if ((secondByte & 192) === 128 && (thirdByte & 192) === 128 && (fourthByte & 192) === 128) {
            tempCodePoint = (firstByte & 15) << 18 | (secondByte & 63) << 12 | (thirdByte & 63) << 6 | fourthByte & 63;
            if (tempCodePoint > 65535 && tempCodePoint < 1114112) {
              codePoint = tempCodePoint;
            }
          }
      }
    }
    if (codePoint === null) {
      codePoint = 65533;
      bytesPerSequence = 1;
    } else if (codePoint > 65535) {
      codePoint -= 65536;
      res.push(codePoint >>> 10 & 1023 | 55296);
      codePoint = 56320 | codePoint & 1023;
    }
    res.push(codePoint);
    i += bytesPerSequence;
  }
  return decodeCodePointsArray(res);
}
var MAX_ARGUMENTS_LENGTH = 4096;
function decodeCodePointsArray(codePoints) {
  var len = codePoints.length;
  if (len <= MAX_ARGUMENTS_LENGTH) {
    return String.fromCharCode.apply(String, codePoints);
  }
  var res = "";
  var i = 0;
  while (i < len) {
    res += String.fromCharCode.apply(String, codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH));
  }
  return res;
}
function asciiSlice(buf, start, end) {
  var ret = "";
  end = Math.min(buf.length, end);
  for (var i = start; i < end; ++i) {
    ret += String.fromCharCode(buf[i] & 127);
  }
  return ret;
}
function latin1Slice(buf, start, end) {
  var ret = "";
  end = Math.min(buf.length, end);
  for (var i = start; i < end; ++i) {
    ret += String.fromCharCode(buf[i]);
  }
  return ret;
}
function hexSlice(buf, start, end) {
  var len = buf.length;
  if (!start || start < 0)
    start = 0;
  if (!end || end < 0 || end > len)
    end = len;
  var out = "";
  for (var i = start; i < end; ++i) {
    out += toHex(buf[i]);
  }
  return out;
}
function utf16leSlice(buf, start, end) {
  var bytes = buf.slice(start, end);
  var res = "";
  for (var i = 0; i < bytes.length; i += 2) {
    res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256);
  }
  return res;
}
Buffer2.prototype.slice = function slice(start, end) {
  var len = this.length;
  start = ~~start;
  end = end === void 0 ? len : ~~end;
  if (start < 0) {
    start += len;
    if (start < 0)
      start = 0;
  } else if (start > len) {
    start = len;
  }
  if (end < 0) {
    end += len;
    if (end < 0)
      end = 0;
  } else if (end > len) {
    end = len;
  }
  if (end < start)
    end = start;
  var newBuf;
  if (Buffer2.TYPED_ARRAY_SUPPORT) {
    newBuf = this.subarray(start, end);
    newBuf.__proto__ = Buffer2.prototype;
  } else {
    var sliceLen = end - start;
    newBuf = new Buffer2(sliceLen, void 0);
    for (var i = 0; i < sliceLen; ++i) {
      newBuf[i] = this[i + start];
    }
  }
  return newBuf;
};
function checkOffset(offset, ext, length) {
  if (offset % 1 !== 0 || offset < 0)
    throw new RangeError("offset is not uint");
  if (offset + ext > length)
    throw new RangeError("Trying to access beyond buffer length");
}
Buffer2.prototype.readUIntLE = function readUIntLE(offset, byteLength2, noAssert) {
  offset = offset | 0;
  byteLength2 = byteLength2 | 0;
  if (!noAssert)
    checkOffset(offset, byteLength2, this.length);
  var val = this[offset];
  var mul = 1;
  var i = 0;
  while (++i < byteLength2 && (mul *= 256)) {
    val += this[offset + i] * mul;
  }
  return val;
};
Buffer2.prototype.readUIntBE = function readUIntBE(offset, byteLength2, noAssert) {
  offset = offset | 0;
  byteLength2 = byteLength2 | 0;
  if (!noAssert) {
    checkOffset(offset, byteLength2, this.length);
  }
  var val = this[offset + --byteLength2];
  var mul = 1;
  while (byteLength2 > 0 && (mul *= 256)) {
    val += this[offset + --byteLength2] * mul;
  }
  return val;
};
Buffer2.prototype.readUInt8 = function readUInt8(offset, noAssert) {
  if (!noAssert)
    checkOffset(offset, 1, this.length);
  return this[offset];
};
Buffer2.prototype.readUInt16LE = function readUInt16LE(offset, noAssert) {
  if (!noAssert)
    checkOffset(offset, 2, this.length);
  return this[offset] | this[offset + 1] << 8;
};
Buffer2.prototype.readUInt16BE = function readUInt16BE(offset, noAssert) {
  if (!noAssert)
    checkOffset(offset, 2, this.length);
  return this[offset] << 8 | this[offset + 1];
};
Buffer2.prototype.readUInt32LE = function readUInt32LE(offset, noAssert) {
  if (!noAssert)
    checkOffset(offset, 4, this.length);
  return (this[offset] | this[offset + 1] << 8 | this[offset + 2] << 16) + this[offset + 3] * 16777216;
};
Buffer2.prototype.readUInt32BE = function readUInt32BE(offset, noAssert) {
  if (!noAssert)
    checkOffset(offset, 4, this.length);
  return this[offset] * 16777216 + (this[offset + 1] << 16 | this[offset + 2] << 8 | this[offset + 3]);
};
Buffer2.prototype.readIntLE = function readIntLE(offset, byteLength2, noAssert) {
  offset = offset | 0;
  byteLength2 = byteLength2 | 0;
  if (!noAssert)
    checkOffset(offset, byteLength2, this.length);
  var val = this[offset];
  var mul = 1;
  var i = 0;
  while (++i < byteLength2 && (mul *= 256)) {
    val += this[offset + i] * mul;
  }
  mul *= 128;
  if (val >= mul)
    val -= Math.pow(2, 8 * byteLength2);
  return val;
};
Buffer2.prototype.readIntBE = function readIntBE(offset, byteLength2, noAssert) {
  offset = offset | 0;
  byteLength2 = byteLength2 | 0;
  if (!noAssert)
    checkOffset(offset, byteLength2, this.length);
  var i = byteLength2;
  var mul = 1;
  var val = this[offset + --i];
  while (i > 0 && (mul *= 256)) {
    val += this[offset + --i] * mul;
  }
  mul *= 128;
  if (val >= mul)
    val -= Math.pow(2, 8 * byteLength2);
  return val;
};
Buffer2.prototype.readInt8 = function readInt8(offset, noAssert) {
  if (!noAssert)
    checkOffset(offset, 1, this.length);
  if (!(this[offset] & 128))
    return this[offset];
  return (255 - this[offset] + 1) * -1;
};
Buffer2.prototype.readInt16LE = function readInt16LE(offset, noAssert) {
  if (!noAssert)
    checkOffset(offset, 2, this.length);
  var val = this[offset] | this[offset + 1] << 8;
  return val & 32768 ? val | 4294901760 : val;
};
Buffer2.prototype.readInt16BE = function readInt16BE(offset, noAssert) {
  if (!noAssert)
    checkOffset(offset, 2, this.length);
  var val = this[offset + 1] | this[offset] << 8;
  return val & 32768 ? val | 4294901760 : val;
};
Buffer2.prototype.readInt32LE = function readInt32LE(offset, noAssert) {
  if (!noAssert)
    checkOffset(offset, 4, this.length);
  return this[offset] | this[offset + 1] << 8 | this[offset + 2] << 16 | this[offset + 3] << 24;
};
Buffer2.prototype.readInt32BE = function readInt32BE(offset, noAssert) {
  if (!noAssert)
    checkOffset(offset, 4, this.length);
  return this[offset] << 24 | this[offset + 1] << 16 | this[offset + 2] << 8 | this[offset + 3];
};
Buffer2.prototype.readFloatLE = function readFloatLE(offset, noAssert) {
  if (!noAssert)
    checkOffset(offset, 4, this.length);
  return read(this, offset, true, 23, 4);
};
Buffer2.prototype.readFloatBE = function readFloatBE(offset, noAssert) {
  if (!noAssert)
    checkOffset(offset, 4, this.length);
  return read(this, offset, false, 23, 4);
};
Buffer2.prototype.readDoubleLE = function readDoubleLE(offset, noAssert) {
  if (!noAssert)
    checkOffset(offset, 8, this.length);
  return read(this, offset, true, 52, 8);
};
Buffer2.prototype.readDoubleBE = function readDoubleBE(offset, noAssert) {
  if (!noAssert)
    checkOffset(offset, 8, this.length);
  return read(this, offset, false, 52, 8);
};
function checkInt(buf, value, offset, ext, max, min) {
  if (!internalIsBuffer(buf))
    throw new TypeError('"buffer" argument must be a Buffer instance');
  if (value > max || value < min)
    throw new RangeError('"value" argument is out of bounds');
  if (offset + ext > buf.length)
    throw new RangeError("Index out of range");
}
Buffer2.prototype.writeUIntLE = function writeUIntLE(value, offset, byteLength2, noAssert) {
  value = +value;
  offset = offset | 0;
  byteLength2 = byteLength2 | 0;
  if (!noAssert) {
    var maxBytes = Math.pow(2, 8 * byteLength2) - 1;
    checkInt(this, value, offset, byteLength2, maxBytes, 0);
  }
  var mul = 1;
  var i = 0;
  this[offset] = value & 255;
  while (++i < byteLength2 && (mul *= 256)) {
    this[offset + i] = value / mul & 255;
  }
  return offset + byteLength2;
};
Buffer2.prototype.writeUIntBE = function writeUIntBE(value, offset, byteLength2, noAssert) {
  value = +value;
  offset = offset | 0;
  byteLength2 = byteLength2 | 0;
  if (!noAssert) {
    var maxBytes = Math.pow(2, 8 * byteLength2) - 1;
    checkInt(this, value, offset, byteLength2, maxBytes, 0);
  }
  var i = byteLength2 - 1;
  var mul = 1;
  this[offset + i] = value & 255;
  while (--i >= 0 && (mul *= 256)) {
    this[offset + i] = value / mul & 255;
  }
  return offset + byteLength2;
};
Buffer2.prototype.writeUInt8 = function writeUInt8(value, offset, noAssert) {
  value = +value;
  offset = offset | 0;
  if (!noAssert)
    checkInt(this, value, offset, 1, 255, 0);
  if (!Buffer2.TYPED_ARRAY_SUPPORT)
    value = Math.floor(value);
  this[offset] = value & 255;
  return offset + 1;
};
function objectWriteUInt16(buf, value, offset, littleEndian) {
  if (value < 0)
    value = 65535 + value + 1;
  for (var i = 0, j = Math.min(buf.length - offset, 2); i < j; ++i) {
    buf[offset + i] = (value & 255 << 8 * (littleEndian ? i : 1 - i)) >>> (littleEndian ? i : 1 - i) * 8;
  }
}
Buffer2.prototype.writeUInt16LE = function writeUInt16LE(value, offset, noAssert) {
  value = +value;
  offset = offset | 0;
  if (!noAssert)
    checkInt(this, value, offset, 2, 65535, 0);
  if (Buffer2.TYPED_ARRAY_SUPPORT) {
    this[offset] = value & 255;
    this[offset + 1] = value >>> 8;
  } else {
    objectWriteUInt16(this, value, offset, true);
  }
  return offset + 2;
};
Buffer2.prototype.writeUInt16BE = function writeUInt16BE(value, offset, noAssert) {
  value = +value;
  offset = offset | 0;
  if (!noAssert)
    checkInt(this, value, offset, 2, 65535, 0);
  if (Buffer2.TYPED_ARRAY_SUPPORT) {
    this[offset] = value >>> 8;
    this[offset + 1] = value & 255;
  } else {
    objectWriteUInt16(this, value, offset, false);
  }
  return offset + 2;
};
function objectWriteUInt32(buf, value, offset, littleEndian) {
  if (value < 0)
    value = 4294967295 + value + 1;
  for (var i = 0, j = Math.min(buf.length - offset, 4); i < j; ++i) {
    buf[offset + i] = value >>> (littleEndian ? i : 3 - i) * 8 & 255;
  }
}
Buffer2.prototype.writeUInt32LE = function writeUInt32LE(value, offset, noAssert) {
  value = +value;
  offset = offset | 0;
  if (!noAssert)
    checkInt(this, value, offset, 4, 4294967295, 0);
  if (Buffer2.TYPED_ARRAY_SUPPORT) {
    this[offset + 3] = value >>> 24;
    this[offset + 2] = value >>> 16;
    this[offset + 1] = value >>> 8;
    this[offset] = value & 255;
  } else {
    objectWriteUInt32(this, value, offset, true);
  }
  return offset + 4;
};
Buffer2.prototype.writeUInt32BE = function writeUInt32BE(value, offset, noAssert) {
  value = +value;
  offset = offset | 0;
  if (!noAssert)
    checkInt(this, value, offset, 4, 4294967295, 0);
  if (Buffer2.TYPED_ARRAY_SUPPORT) {
    this[offset] = value >>> 24;
    this[offset + 1] = value >>> 16;
    this[offset + 2] = value >>> 8;
    this[offset + 3] = value & 255;
  } else {
    objectWriteUInt32(this, value, offset, false);
  }
  return offset + 4;
};
Buffer2.prototype.writeIntLE = function writeIntLE(value, offset, byteLength2, noAssert) {
  value = +value;
  offset = offset | 0;
  if (!noAssert) {
    var limit = Math.pow(2, 8 * byteLength2 - 1);
    checkInt(this, value, offset, byteLength2, limit - 1, -limit);
  }
  var i = 0;
  var mul = 1;
  var sub = 0;
  this[offset] = value & 255;
  while (++i < byteLength2 && (mul *= 256)) {
    if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {
      sub = 1;
    }
    this[offset + i] = (value / mul >> 0) - sub & 255;
  }
  return offset + byteLength2;
};
Buffer2.prototype.writeIntBE = function writeIntBE(value, offset, byteLength2, noAssert) {
  value = +value;
  offset = offset | 0;
  if (!noAssert) {
    var limit = Math.pow(2, 8 * byteLength2 - 1);
    checkInt(this, value, offset, byteLength2, limit - 1, -limit);
  }
  var i = byteLength2 - 1;
  var mul = 1;
  var sub = 0;
  this[offset + i] = value & 255;
  while (--i >= 0 && (mul *= 256)) {
    if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {
      sub = 1;
    }
    this[offset + i] = (value / mul >> 0) - sub & 255;
  }
  return offset + byteLength2;
};
Buffer2.prototype.writeInt8 = function writeInt8(value, offset, noAssert) {
  value = +value;
  offset = offset | 0;
  if (!noAssert)
    checkInt(this, value, offset, 1, 127, -128);
  if (!Buffer2.TYPED_ARRAY_SUPPORT)
    value = Math.floor(value);
  if (value < 0)
    value = 255 + value + 1;
  this[offset] = value & 255;
  return offset + 1;
};
Buffer2.prototype.writeInt16LE = function writeInt16LE(value, offset, noAssert) {
  value = +value;
  offset = offset | 0;
  if (!noAssert)
    checkInt(this, value, offset, 2, 32767, -32768);
  if (Buffer2.TYPED_ARRAY_SUPPORT) {
    this[offset] = value & 255;
    this[offset + 1] = value >>> 8;
  } else {
    objectWriteUInt16(this, value, offset, true);
  }
  return offset + 2;
};
Buffer2.prototype.writeInt16BE = function writeInt16BE(value, offset, noAssert) {
  value = +value;
  offset = offset | 0;
  if (!noAssert)
    checkInt(this, value, offset, 2, 32767, -32768);
  if (Buffer2.TYPED_ARRAY_SUPPORT) {
    this[offset] = value >>> 8;
    this[offset + 1] = value & 255;
  } else {
    objectWriteUInt16(this, value, offset, false);
  }
  return offset + 2;
};
Buffer2.prototype.writeInt32LE = function writeInt32LE(value, offset, noAssert) {
  value = +value;
  offset = offset | 0;
  if (!noAssert)
    checkInt(this, value, offset, 4, 2147483647, -2147483648);
  if (Buffer2.TYPED_ARRAY_SUPPORT) {
    this[offset] = value & 255;
    this[offset + 1] = value >>> 8;
    this[offset + 2] = value >>> 16;
    this[offset + 3] = value >>> 24;
  } else {
    objectWriteUInt32(this, value, offset, true);
  }
  return offset + 4;
};
Buffer2.prototype.writeInt32BE = function writeInt32BE(value, offset, noAssert) {
  value = +value;
  offset = offset | 0;
  if (!noAssert)
    checkInt(this, value, offset, 4, 2147483647, -2147483648);
  if (value < 0)
    value = 4294967295 + value + 1;
  if (Buffer2.TYPED_ARRAY_SUPPORT) {
    this[offset] = value >>> 24;
    this[offset + 1] = value >>> 16;
    this[offset + 2] = value >>> 8;
    this[offset + 3] = value & 255;
  } else {
    objectWriteUInt32(this, value, offset, false);
  }
  return offset + 4;
};
function checkIEEE754(buf, value, offset, ext, max, min) {
  if (offset + ext > buf.length)
    throw new RangeError("Index out of range");
  if (offset < 0)
    throw new RangeError("Index out of range");
}
function writeFloat(buf, value, offset, littleEndian, noAssert) {
  if (!noAssert) {
    checkIEEE754(buf, value, offset, 4);
  }
  write(buf, value, offset, littleEndian, 23, 4);
  return offset + 4;
}
Buffer2.prototype.writeFloatLE = function writeFloatLE(value, offset, noAssert) {
  return writeFloat(this, value, offset, true, noAssert);
};
Buffer2.prototype.writeFloatBE = function writeFloatBE(value, offset, noAssert) {
  return writeFloat(this, value, offset, false, noAssert);
};
function writeDouble(buf, value, offset, littleEndian, noAssert) {
  if (!noAssert) {
    checkIEEE754(buf, value, offset, 8);
  }
  write(buf, value, offset, littleEndian, 52, 8);
  return offset + 8;
}
Buffer2.prototype.writeDoubleLE = function writeDoubleLE(value, offset, noAssert) {
  return writeDouble(this, value, offset, true, noAssert);
};
Buffer2.prototype.writeDoubleBE = function writeDoubleBE(value, offset, noAssert) {
  return writeDouble(this, value, offset, false, noAssert);
};
Buffer2.prototype.copy = function copy(target, targetStart, start, end) {
  if (!start)
    start = 0;
  if (!end && end !== 0)
    end = this.length;
  if (targetStart >= target.length)
    targetStart = target.length;
  if (!targetStart)
    targetStart = 0;
  if (end > 0 && end < start)
    end = start;
  if (end === start)
    return 0;
  if (target.length === 0 || this.length === 0)
    return 0;
  if (targetStart < 0) {
    throw new RangeError("targetStart out of bounds");
  }
  if (start < 0 || start >= this.length)
    throw new RangeError("sourceStart out of bounds");
  if (end < 0)
    throw new RangeError("sourceEnd out of bounds");
  if (end > this.length)
    end = this.length;
  if (target.length - targetStart < end - start) {
    end = target.length - targetStart + start;
  }
  var len = end - start;
  var i;
  if (this === target && start < targetStart && targetStart < end) {
    for (i = len - 1; i >= 0; --i) {
      target[i + targetStart] = this[i + start];
    }
  } else if (len < 1e3 || !Buffer2.TYPED_ARRAY_SUPPORT) {
    for (i = 0; i < len; ++i) {
      target[i + targetStart] = this[i + start];
    }
  } else {
    Uint8Array.prototype.set.call(target, this.subarray(start, start + len), targetStart);
  }
  return len;
};
Buffer2.prototype.fill = function fill(val, start, end, encoding) {
  if (typeof val === "string") {
    if (typeof start === "string") {
      encoding = start;
      start = 0;
      end = this.length;
    } else if (typeof end === "string") {
      encoding = end;
      end = this.length;
    }
    if (val.length === 1) {
      var code = val.charCodeAt(0);
      if (code < 256) {
        val = code;
      }
    }
    if (encoding !== void 0 && typeof encoding !== "string") {
      throw new TypeError("encoding must be a string");
    }
    if (typeof encoding === "string" && !Buffer2.isEncoding(encoding)) {
      throw new TypeError("Unknown encoding: " + encoding);
    }
  } else if (typeof val === "number") {
    val = val & 255;
  }
  if (start < 0 || this.length < start || this.length < end) {
    throw new RangeError("Out of range index");
  }
  if (end <= start) {
    return this;
  }
  start = start >>> 0;
  end = end === void 0 ? this.length : end >>> 0;
  if (!val)
    val = 0;
  var i;
  if (typeof val === "number") {
    for (i = start; i < end; ++i) {
      this[i] = val;
    }
  } else {
    var bytes = internalIsBuffer(val) ? val : utf8ToBytes(new Buffer2(val, encoding).toString());
    var len = bytes.length;
    for (i = 0; i < end - start; ++i) {
      this[i + start] = bytes[i % len];
    }
  }
  return this;
};
var INVALID_BASE64_RE = /[^+\/0-9A-Za-z-_]/g;
function base64clean(str) {
  str = stringtrim(str).replace(INVALID_BASE64_RE, "");
  if (str.length < 2)
    return "";
  while (str.length % 4 !== 0) {
    str = str + "=";
  }
  return str;
}
function stringtrim(str) {
  if (str.trim)
    return str.trim();
  return str.replace(/^\s+|\s+$/g, "");
}
function toHex(n) {
  if (n < 16)
    return "0" + n.toString(16);
  return n.toString(16);
}
function utf8ToBytes(string, units) {
  units = units || Infinity;
  var codePoint;
  var length = string.length;
  var leadSurrogate = null;
  var bytes = [];
  for (var i = 0; i < length; ++i) {
    codePoint = string.charCodeAt(i);
    if (codePoint > 55295 && codePoint < 57344) {
      if (!leadSurrogate) {
        if (codePoint > 56319) {
          if ((units -= 3) > -1)
            bytes.push(239, 191, 189);
          continue;
        } else if (i + 1 === length) {
          if ((units -= 3) > -1)
            bytes.push(239, 191, 189);
          continue;
        }
        leadSurrogate = codePoint;
        continue;
      }
      if (codePoint < 56320) {
        if ((units -= 3) > -1)
          bytes.push(239, 191, 189);
        leadSurrogate = codePoint;
        continue;
      }
      codePoint = (leadSurrogate - 55296 << 10 | codePoint - 56320) + 65536;
    } else if (leadSurrogate) {
      if ((units -= 3) > -1)
        bytes.push(239, 191, 189);
    }
    leadSurrogate = null;
    if (codePoint < 128) {
      if ((units -= 1) < 0)
        break;
      bytes.push(codePoint);
    } else if (codePoint < 2048) {
      if ((units -= 2) < 0)
        break;
      bytes.push(codePoint >> 6 | 192, codePoint & 63 | 128);
    } else if (codePoint < 65536) {
      if ((units -= 3) < 0)
        break;
      bytes.push(codePoint >> 12 | 224, codePoint >> 6 & 63 | 128, codePoint & 63 | 128);
    } else if (codePoint < 1114112) {
      if ((units -= 4) < 0)
        break;
      bytes.push(codePoint >> 18 | 240, codePoint >> 12 & 63 | 128, codePoint >> 6 & 63 | 128, codePoint & 63 | 128);
    } else {
      throw new Error("Invalid code point");
    }
  }
  return bytes;
}
function asciiToBytes(str) {
  var byteArray = [];
  for (var i = 0; i < str.length; ++i) {
    byteArray.push(str.charCodeAt(i) & 255);
  }
  return byteArray;
}
function utf16leToBytes(str, units) {
  var c, hi, lo;
  var byteArray = [];
  for (var i = 0; i < str.length; ++i) {
    if ((units -= 2) < 0)
      break;
    c = str.charCodeAt(i);
    hi = c >> 8;
    lo = c % 256;
    byteArray.push(lo);
    byteArray.push(hi);
  }
  return byteArray;
}
function base64ToBytes(str) {
  return toByteArray(base64clean(str));
}
function blitBuffer(src, dst, offset, length) {
  for (var i = 0; i < length; ++i) {
    if (i + offset >= dst.length || i >= src.length)
      break;
    dst[i + offset] = src[i];
  }
  return i;
}
function isnan(val) {
  return val !== val;
}
function isBuffer(obj) {
  return obj != null && (!!obj._isBuffer || isFastBuffer(obj) || isSlowBuffer(obj));
}
function isFastBuffer(obj) {
  return !!obj.constructor && typeof obj.constructor.isBuffer === "function" && obj.constructor.isBuffer(obj);
}
function isSlowBuffer(obj) {
  return typeof obj.readFloatLE === "function" && typeof obj.slice === "function" && isFastBuffer(obj.slice(0, 0));
}
var inherits;
if (typeof Object.create === "function") {
  inherits = function inherits2(ctor, superCtor) {
    ctor.super_ = superCtor;
    ctor.prototype = Object.create(superCtor.prototype, {
      constructor: {
        value: ctor,
        enumerable: false,
        writable: true,
        configurable: true
      }
    });
  };
} else {
  inherits = function inherits2(ctor, superCtor) {
    ctor.super_ = superCtor;
    var TempCtor = function() {
    };
    TempCtor.prototype = superCtor.prototype;
    ctor.prototype = new TempCtor();
    ctor.prototype.constructor = ctor;
  };
}
var inherits$1 = inherits;
var formatRegExp = /%[sdj%]/g;
function format(f) {
  if (!isString(f)) {
    var objects = [];
    for (var i = 0; i < arguments.length; i++) {
      objects.push(inspect2(arguments[i]));
    }
    return objects.join(" ");
  }
  var i = 1;
  var args = arguments;
  var len = args.length;
  var str = String(f).replace(formatRegExp, function(x2) {
    if (x2 === "%%")
      return "%";
    if (i >= len)
      return x2;
    switch (x2) {
      case "%s":
        return String(args[i++]);
      case "%d":
        return Number(args[i++]);
      case "%j":
        try {
          return JSON.stringify(args[i++]);
        } catch (_) {
          return "[Circular]";
        }
      default:
        return x2;
    }
  });
  for (var x = args[i]; i < len; x = args[++i]) {
    if (isNull(x) || !isObject(x)) {
      str += " " + x;
    } else {
      str += " " + inspect2(x);
    }
  }
  return str;
}
function deprecate(fn, msg) {
  if (isUndefined(global$1.process)) {
    return function() {
      return deprecate(fn, msg).apply(this, arguments);
    };
  }
  var warned = false;
  function deprecated() {
    if (!warned) {
      {
        console.error(msg);
      }
      warned = true;
    }
    return fn.apply(this, arguments);
  }
  return deprecated;
}
var debugs = {};
var debugEnviron;
function debuglog(set) {
  if (isUndefined(debugEnviron))
    debugEnviron = "";
  set = set.toUpperCase();
  if (!debugs[set]) {
    if (new RegExp("\\b" + set + "\\b", "i").test(debugEnviron)) {
      var pid = 0;
      debugs[set] = function() {
        var msg = format.apply(null, arguments);
        console.error("%s %d: %s", set, pid, msg);
      };
    } else {
      debugs[set] = function() {
      };
    }
  }
  return debugs[set];
}
function inspect2(obj, opts) {
  var ctx = {
    seen: [],
    stylize: stylizeNoColor
  };
  if (arguments.length >= 3)
    ctx.depth = arguments[2];
  if (arguments.length >= 4)
    ctx.colors = arguments[3];
  if (isBoolean(opts)) {
    ctx.showHidden = opts;
  } else if (opts) {
    _extend(ctx, opts);
  }
  if (isUndefined(ctx.showHidden))
    ctx.showHidden = false;
  if (isUndefined(ctx.depth))
    ctx.depth = 2;
  if (isUndefined(ctx.colors))
    ctx.colors = false;
  if (isUndefined(ctx.customInspect))
    ctx.customInspect = true;
  if (ctx.colors)
    ctx.stylize = stylizeWithColor;
  return formatValue(ctx, obj, ctx.depth);
}
inspect2.colors = {
  bold: [1, 22],
  italic: [3, 23],
  underline: [4, 24],
  inverse: [7, 27],
  white: [37, 39],
  grey: [90, 39],
  black: [30, 39],
  blue: [34, 39],
  cyan: [36, 39],
  green: [32, 39],
  magenta: [35, 39],
  red: [31, 39],
  yellow: [33, 39]
};
inspect2.styles = {
  special: "cyan",
  number: "yellow",
  boolean: "yellow",
  undefined: "grey",
  null: "bold",
  string: "green",
  date: "magenta",
  regexp: "red"
};
function stylizeWithColor(str, styleType) {
  var style = inspect2.styles[styleType];
  if (style) {
    return "[" + inspect2.colors[style][0] + "m" + str + "[" + inspect2.colors[style][1] + "m";
  } else {
    return str;
  }
}
function stylizeNoColor(str, styleType) {
  return str;
}
function arrayToHash(array) {
  var hash = {};
  array.forEach(function(val, idx) {
    hash[val] = true;
  });
  return hash;
}
function formatValue(ctx, value, recurseTimes) {
  if (ctx.customInspect && value && isFunction(value.inspect) && value.inspect !== inspect2 && !(value.constructor && value.constructor.prototype === value)) {
    var ret = value.inspect(recurseTimes, ctx);
    if (!isString(ret)) {
      ret = formatValue(ctx, ret, recurseTimes);
    }
    return ret;
  }
  var primitive = formatPrimitive(ctx, value);
  if (primitive) {
    return primitive;
  }
  var keys = Object.keys(value);
  var visibleKeys = arrayToHash(keys);
  if (ctx.showHidden) {
    keys = Object.getOwnPropertyNames(value);
  }
  if (isError(value) && (keys.indexOf("message") >= 0 || keys.indexOf("description") >= 0)) {
    return formatError(value);
  }
  if (keys.length === 0) {
    if (isFunction(value)) {
      var name = value.name ? ": " + value.name : "";
      return ctx.stylize("[Function" + name + "]", "special");
    }
    if (isRegExp(value)) {
      return ctx.stylize(RegExp.prototype.toString.call(value), "regexp");
    }
    if (isDate(value)) {
      return ctx.stylize(Date.prototype.toString.call(value), "date");
    }
    if (isError(value)) {
      return formatError(value);
    }
  }
  var base = "", array = false, braces = ["{", "}"];
  if (isArray$1(value)) {
    array = true;
    braces = ["[", "]"];
  }
  if (isFunction(value)) {
    var n = value.name ? ": " + value.name : "";
    base = " [Function" + n + "]";
  }
  if (isRegExp(value)) {
    base = " " + RegExp.prototype.toString.call(value);
  }
  if (isDate(value)) {
    base = " " + Date.prototype.toUTCString.call(value);
  }
  if (isError(value)) {
    base = " " + formatError(value);
  }
  if (keys.length === 0 && (!array || value.length == 0)) {
    return braces[0] + base + braces[1];
  }
  if (recurseTimes < 0) {
    if (isRegExp(value)) {
      return ctx.stylize(RegExp.prototype.toString.call(value), "regexp");
    } else {
      return ctx.stylize("[Object]", "special");
    }
  }
  ctx.seen.push(value);
  var output;
  if (array) {
    output = formatArray(ctx, value, recurseTimes, visibleKeys, keys);
  } else {
    output = keys.map(function(key) {
      return formatProperty(ctx, value, recurseTimes, visibleKeys, key, array);
    });
  }
  ctx.seen.pop();
  return reduceToSingleString(output, base, braces);
}
function formatPrimitive(ctx, value) {
  if (isUndefined(value))
    return ctx.stylize("undefined", "undefined");
  if (isString(value)) {
    var simple = "'" + JSON.stringify(value).replace(/^"|"$/g, "").replace(/'/g, "\\'").replace(/\\"/g, '"') + "'";
    return ctx.stylize(simple, "string");
  }
  if (isNumber(value))
    return ctx.stylize("" + value, "number");
  if (isBoolean(value))
    return ctx.stylize("" + value, "boolean");
  if (isNull(value))
    return ctx.stylize("null", "null");
}
function formatError(value) {
  return "[" + Error.prototype.toString.call(value) + "]";
}
function formatArray(ctx, value, recurseTimes, visibleKeys, keys) {
  var output = [];
  for (var i = 0, l = value.length; i < l; ++i) {
    if (hasOwnProperty(value, String(i))) {
      output.push(formatProperty(ctx, value, recurseTimes, visibleKeys, String(i), true));
    } else {
      output.push("");
    }
  }
  keys.forEach(function(key) {
    if (!key.match(/^\d+$/)) {
      output.push(formatProperty(ctx, value, recurseTimes, visibleKeys, key, true));
    }
  });
  return output;
}
function formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) {
  var name, str, desc;
  desc = Object.getOwnPropertyDescriptor(value, key) || {value: value[key]};
  if (desc.get) {
    if (desc.set) {
      str = ctx.stylize("[Getter/Setter]", "special");
    } else {
      str = ctx.stylize("[Getter]", "special");
    }
  } else {
    if (desc.set) {
      str = ctx.stylize("[Setter]", "special");
    }
  }
  if (!hasOwnProperty(visibleKeys, key)) {
    name = "[" + key + "]";
  }
  if (!str) {
    if (ctx.seen.indexOf(desc.value) < 0) {
      if (isNull(recurseTimes)) {
        str = formatValue(ctx, desc.value, null);
      } else {
        str = formatValue(ctx, desc.value, recurseTimes - 1);
      }
      if (str.indexOf("\n") > -1) {
        if (array) {
          str = str.split("\n").map(function(line) {
            return "  " + line;
          }).join("\n").substr(2);
        } else {
          str = "\n" + str.split("\n").map(function(line) {
            return "   " + line;
          }).join("\n");
        }
      }
    } else {
      str = ctx.stylize("[Circular]", "special");
    }
  }
  if (isUndefined(name)) {
    if (array && key.match(/^\d+$/)) {
      return str;
    }
    name = JSON.stringify("" + key);
    if (name.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)) {
      name = name.substr(1, name.length - 2);
      name = ctx.stylize(name, "name");
    } else {
      name = name.replace(/'/g, "\\'").replace(/\\"/g, '"').replace(/(^"|"$)/g, "'");
      name = ctx.stylize(name, "string");
    }
  }
  return name + ": " + str;
}
function reduceToSingleString(output, base, braces) {
  var length = output.reduce(function(prev, cur) {
    if (cur.indexOf("\n") >= 0)
      ;
    return prev + cur.replace(/\u001b\[\d\d?m/g, "").length + 1;
  }, 0);
  if (length > 60) {
    return braces[0] + (base === "" ? "" : base + "\n ") + " " + output.join(",\n  ") + " " + braces[1];
  }
  return braces[0] + base + " " + output.join(", ") + " " + braces[1];
}
function isArray$1(ar) {
  return Array.isArray(ar);
}
function isBoolean(arg) {
  return typeof arg === "boolean";
}
function isNull(arg) {
  return arg === null;
}
function isNullOrUndefined(arg) {
  return arg == null;
}
function isNumber(arg) {
  return typeof arg === "number";
}
function isString(arg) {
  return typeof arg === "string";
}
function isSymbol(arg) {
  return typeof arg === "symbol";
}
function isUndefined(arg) {
  return arg === void 0;
}
function isRegExp(re) {
  return isObject(re) && objectToString(re) === "[object RegExp]";
}
function isObject(arg) {
  return typeof arg === "object" && arg !== null;
}
function isDate(d) {
  return isObject(d) && objectToString(d) === "[object Date]";
}
function isError(e) {
  return isObject(e) && (objectToString(e) === "[object Error]" || e instanceof Error);
}
function isFunction(arg) {
  return typeof arg === "function";
}
function isPrimitive(arg) {
  return arg === null || typeof arg === "boolean" || typeof arg === "number" || typeof arg === "string" || typeof arg === "symbol" || typeof arg === "undefined";
}
function isBuffer$1(maybeBuf) {
  return Buffer2.isBuffer(maybeBuf);
}
function objectToString(o) {
  return Object.prototype.toString.call(o);
}
function pad(n) {
  return n < 10 ? "0" + n.toString(10) : n.toString(10);
}
var months = [
  "Jan",
  "Feb",
  "Mar",
  "Apr",
  "May",
  "Jun",
  "Jul",
  "Aug",
  "Sep",
  "Oct",
  "Nov",
  "Dec"
];
function timestamp() {
  var d = new Date();
  var time = [
    pad(d.getHours()),
    pad(d.getMinutes()),
    pad(d.getSeconds())
  ].join(":");
  return [d.getDate(), months[d.getMonth()], time].join(" ");
}
function log() {
  console.log("%s - %s", timestamp(), format.apply(null, arguments));
}
function _extend(origin, add) {
  if (!add || !isObject(add))
    return origin;
  var keys = Object.keys(add);
  var i = keys.length;
  while (i--) {
    origin[keys[i]] = add[keys[i]];
  }
  return origin;
}
function hasOwnProperty(obj, prop) {
  return Object.prototype.hasOwnProperty.call(obj, prop);
}
var util = {
  inherits: inherits$1,
  _extend,
  log,
  isBuffer: isBuffer$1,
  isPrimitive,
  isFunction,
  isError,
  isDate,
  isObject,
  isRegExp,
  isUndefined,
  isSymbol,
  isString,
  isNumber,
  isNullOrUndefined,
  isNull,
  isBoolean,
  isArray: isArray$1,
  inspect: inspect2,
  deprecate,
  format,
  debuglog
};
var util$1 = /* @__PURE__ */ Object.freeze({
  __proto__: null,
  format,
  deprecate,
  debuglog,
  inspect: inspect2,
  isArray: isArray$1,
  isBoolean,
  isNull,
  isNullOrUndefined,
  isNumber,
  isString,
  isSymbol,
  isUndefined,
  isRegExp,
  isObject,
  isDate,
  isError,
  isFunction,
  isPrimitive,
  isBuffer: isBuffer$1,
  log,
  inherits: inherits$1,
  _extend,
  default: util
});
var require$$4 = /* @__PURE__ */ getDefaultExportFromNamespaceIfNotNamed(synckit);
var build = createCommonjsModule(function(module) {
  /*!
   * /**
   *  * Copyright (c) Meta Platforms, Inc. and affiliates.
   *  *
   *  * This source code is licensed under the MIT license found in the
   *  * LICENSE file in the root directory of this source tree.
   *  * /
   */
  (() => {
    var __webpack_modules__ = {
      "./src/InlineSnapshots.ts"(__unused_webpack_module, exports, __webpack_require__2) {
        Object.defineProperty(exports, "__esModule", {
          value: true
        });
        exports.saveInlineSnapshots = saveInlineSnapshots;
        var path2 = _interopRequireWildcard(path$1);
        var _util = util$1;
        var fs = _interopRequireWildcard(require$$2);
        var semver2 = _interopRequireWildcard(require$$3);
        var _synckit = require$$4;
        var _utils = __webpack_require__2("./src/utils.ts");
        function _interopRequireWildcard(e, t) {
          if (typeof WeakMap == "function")
            var r = new WeakMap(), n = new WeakMap();
          return (_interopRequireWildcard = function(e2, t2) {
            if (!t2 && e2 && e2.__esModule)
              return e2;
            var o, i, f = {__proto__: null, default: e2};
            if (e2 === null || typeof e2 != "object" && typeof e2 != "function")
              return f;
            if (o = t2 ? n : r) {
              if (o.has(e2))
                return o.get(e2);
              o.set(e2, f);
            }
            for (const t3 in e2)
              t3 !== "default" && {}.hasOwnProperty.call(e2, t3) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e2, t3)) && (i.get || i.set) ? o(f, t3, i) : f[t3] = e2[t3]);
            return f;
          })(e, t);
        }
        var Symbol = globalThis["jest-symbol-do-not-touch"] || globalThis.Symbol;
        var jestWriteFile = globalThis[Symbol.for("jest-native-write-file")] || fs.writeFileSync;
        var Symbol = globalThis["jest-symbol-do-not-touch"] || globalThis.Symbol;
        const cachedPrettier = new Map();
        function saveInlineSnapshots(snapshots, rootDir, prettierPath) {
          let prettier = prettierPath ? cachedPrettier.get(`module|${prettierPath}`) : void 0;
          let workerFn = prettierPath ? cachedPrettier.get(`worker|${prettierPath}`) : void 0;
          if (prettierPath && !prettier) {
            try {
              prettier = commonjsRequire(require.resolve(prettierPath, {
                [Symbol.for("jest-resolve-outside-vm-option")]: true
              }));
              cachedPrettier.set(`module|${prettierPath}`, prettier);
              if (semver2.gte(prettier.version, "3.0.0")) {
                workerFn = (0, _synckit.createSyncFn)(require.resolve("./worker"));
                cachedPrettier.set(`worker|${prettierPath}`, workerFn);
              }
            } catch (error) {
              if (!_util.types.isNativeError(error)) {
                throw error;
              }
              if (error.code !== "MODULE_NOT_FOUND") {
                throw error;
              }
            }
          }
          const snapshotsByFile = (0, _utils.groupSnapshotsByFile)(snapshots);
          for (const sourceFilePath of Object.keys(snapshotsByFile)) {
            const {
              sourceFileWithSnapshots,
              snapshotMatcherNames,
              sourceFile
            } = (0, _utils.processInlineSnapshotsWithBabel)(snapshotsByFile[sourceFilePath], sourceFilePath, rootDir);
            let newSourceFile = sourceFileWithSnapshots;
            if (workerFn) {
              newSourceFile = workerFn(prettierPath, sourceFilePath, sourceFileWithSnapshots, snapshotMatcherNames);
            } else if (prettier && semver2.gte(prettier.version, "1.5.0")) {
              newSourceFile = runPrettier(prettier, sourceFilePath, sourceFileWithSnapshots, snapshotMatcherNames);
            }
            if (newSourceFile !== sourceFile) {
              jestWriteFile(sourceFilePath, newSourceFile);
            }
          }
        }
        const runPrettier = (prettier, sourceFilePath, sourceFileWithSnapshots, snapshotMatcherNames) => {
          const config = prettier.resolveConfig ? prettier.resolveConfig.sync(sourceFilePath, {
            editorconfig: true
          }) : null;
          const inferredParser = typeof (config == null ? void 0 : config.parser) === "string" && config.parser || (prettier.getFileInfo ? prettier.getFileInfo.sync(sourceFilePath).inferredParser : simpleDetectParser(sourceFilePath));
          if (!inferredParser) {
            throw new Error(`Could not infer Prettier parser for file ${sourceFilePath}`);
          }
          return prettier.format(prettier.format(sourceFileWithSnapshots, {
            ...config,
            filepath: sourceFilePath
          }), {
            ...config,
            filepath: sourceFilePath,
            parser: createFormattingParser(snapshotMatcherNames, inferredParser)
          });
        };
        const createFormattingParser = (snapshotMatcherNames, inferredParser) => (text, parsers, options) => {
          options.parser = inferredParser;
          const ast = parsers[inferredParser](text, options);
          (0, _utils.processPrettierAst)(ast, options, snapshotMatcherNames);
          return ast;
        };
        const simpleDetectParser = (filePath) => {
          const extname2 = path2.extname(filePath);
          if (/\.tsx?$/.test(extname2)) {
            return "typescript";
          }
          return "babel";
        };
      },
      "./src/SnapshotResolver.ts"(__unused_webpack_module, exports) {
        Object.defineProperty(exports, "__esModule", {
          value: true
        });
        exports.isSnapshotPath = exports.buildSnapshotResolver = exports.EXTENSION = exports.DOT_EXTENSION = void 0;
        var path2 = _interopRequireWildcard(path$1);
        var _chalk = _interopRequireDefault(require$$5);
        var _transform = require$$6;
        var _jestUtil = require$$7;
        function _interopRequireDefault(e) {
          return e && e.__esModule ? e : {default: e};
        }
        function _interopRequireWildcard(e, t) {
          if (typeof WeakMap == "function")
            var r = new WeakMap(), n = new WeakMap();
          return (_interopRequireWildcard = function(e2, t2) {
            if (!t2 && e2 && e2.__esModule)
              return e2;
            var o, i, f = {__proto__: null, default: e2};
            if (e2 === null || typeof e2 != "object" && typeof e2 != "function")
              return f;
            if (o = t2 ? n : r) {
              if (o.has(e2))
                return o.get(e2);
              o.set(e2, f);
            }
            for (const t3 in e2)
              t3 !== "default" && {}.hasOwnProperty.call(e2, t3) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e2, t3)) && (i.get || i.set) ? o(f, t3, i) : f[t3] = e2[t3]);
            return f;
          })(e, t);
        }
        const EXTENSION2 = exports.EXTENSION = "snap";
        const DOT_EXTENSION = exports.DOT_EXTENSION = `.${EXTENSION2}`;
        const isSnapshotPath2 = (path3) => path3.endsWith(DOT_EXTENSION);
        exports.isSnapshotPath = isSnapshotPath2;
        const cache = new Map();
        const buildSnapshotResolver2 = async (config, localRequire = (0, _transform.createTranspilingRequire)(config)) => {
          var _a;
          const key = config.rootDir;
          const resolver = (_a = cache.get(key)) != null ? _a : await createSnapshotResolver(await localRequire, config.snapshotResolver);
          cache.set(key, resolver);
          return resolver;
        };
        exports.buildSnapshotResolver = buildSnapshotResolver2;
        async function createSnapshotResolver(localRequire, snapshotResolverPath) {
          return typeof snapshotResolverPath === "string" ? createCustomSnapshotResolver(snapshotResolverPath, localRequire) : createDefaultSnapshotResolver();
        }
        function createDefaultSnapshotResolver() {
          return {
            resolveSnapshotPath: (testPath) => path2.join(path2.join(path2.dirname(testPath), "__snapshots__"), path2.basename(testPath) + DOT_EXTENSION),
            resolveTestPath: (snapshotPath) => path2.resolve(path2.dirname(snapshotPath), "..", path2.basename(snapshotPath, DOT_EXTENSION)),
            testPathForConsistencyCheck: path2.posix.join("consistency_check", "__tests__", "example.test.js")
          };
        }
        async function createCustomSnapshotResolver(snapshotResolverPath, localRequire) {
          const custom = (0, _jestUtil.interopRequireDefault)(await localRequire(snapshotResolverPath)).default;
          const keys = [["resolveSnapshotPath", "function"], ["resolveTestPath", "function"], ["testPathForConsistencyCheck", "string"]];
          for (const [propName, requiredType] of keys) {
            if (typeof custom[propName] !== requiredType) {
              throw new TypeError(mustImplement(propName, requiredType));
            }
          }
          const customResolver = {
            resolveSnapshotPath: (testPath) => custom.resolveSnapshotPath(testPath, DOT_EXTENSION),
            resolveTestPath: (snapshotPath) => custom.resolveTestPath(snapshotPath, DOT_EXTENSION),
            testPathForConsistencyCheck: custom.testPathForConsistencyCheck
          };
          verifyConsistentTransformations(customResolver);
          return customResolver;
        }
        function mustImplement(propName, requiredType) {
          return `${_chalk.default.bold(`Custom snapshot resolver must implement a \`${propName}\` as a ${requiredType}.`)}
Documentation: https://jestjs.io/docs/configuration#snapshotresolver-string`;
        }
        function verifyConsistentTransformations(custom) {
          const resolvedSnapshotPath = custom.resolveSnapshotPath(custom.testPathForConsistencyCheck);
          const resolvedTestPath = custom.resolveTestPath(resolvedSnapshotPath);
          if (resolvedTestPath !== custom.testPathForConsistencyCheck) {
            throw new Error(_chalk.default.bold(`Custom snapshot resolver functions must transform paths consistently, i.e. expects resolveTestPath(resolveSnapshotPath('${custom.testPathForConsistencyCheck}')) === ${resolvedTestPath}`));
          }
        }
      },
      "./src/State.ts"(__unused_webpack_module, exports, __webpack_require__2) {
        Object.defineProperty(exports, "__esModule", {
          value: true
        });
        exports["default"] = void 0;
        var fs = _interopRequireWildcard(require$$2);
        var _snapshotUtils = require$$8;
        var _jestMessageUtil = require$$9;
        var _InlineSnapshots = __webpack_require__2("./src/InlineSnapshots.ts");
        var _utils = __webpack_require__2("./src/utils.ts");
        function _interopRequireWildcard(e, t) {
          if (typeof WeakMap == "function")
            var r = new WeakMap(), n = new WeakMap();
          return (_interopRequireWildcard = function(e2, t2) {
            if (!t2 && e2 && e2.__esModule)
              return e2;
            var o, i, f = {__proto__: null, default: e2};
            if (e2 === null || typeof e2 != "object" && typeof e2 != "function")
              return f;
            if (o = t2 ? n : r) {
              if (o.has(e2))
                return o.get(e2);
              o.set(e2, f);
            }
            for (const t3 in e2)
              t3 !== "default" && {}.hasOwnProperty.call(e2, t3) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e2, t3)) && (i.get || i.set) ? o(f, t3, i) : f[t3] = e2[t3]);
            return f;
          })(e, t);
        }
        var Symbol = globalThis["jest-symbol-do-not-touch"] || globalThis.Symbol;
        var Symbol = globalThis["jest-symbol-do-not-touch"] || globalThis.Symbol;
        var jestExistsFile = globalThis[Symbol.for("jest-native-exists-file")] || fs.existsSync;
        class SnapshotState2 {
          constructor(snapshotPath, options) {
            __publicField(this, "_counters");
            __publicField(this, "_dirty");
            __publicField(this, "_index");
            __publicField(this, "_updateSnapshot");
            __publicField(this, "_snapshotData");
            __publicField(this, "_initialData");
            __publicField(this, "_snapshotPath");
            __publicField(this, "_inlineSnapshots");
            __publicField(this, "_uncheckedKeys");
            __publicField(this, "_prettierPath");
            __publicField(this, "_rootDir");
            __publicField(this, "snapshotFormat");
            __publicField(this, "added");
            __publicField(this, "expand");
            __publicField(this, "matched");
            __publicField(this, "unmatched");
            __publicField(this, "updated");
            var _a;
            this._snapshotPath = snapshotPath;
            const {
              data,
              dirty
            } = (0, _snapshotUtils.getSnapshotData)(this._snapshotPath, options.updateSnapshot);
            this._initialData = data;
            this._snapshotData = data;
            this._dirty = dirty;
            this._prettierPath = (_a = options.prettierPath) != null ? _a : null;
            this._inlineSnapshots = [];
            this._uncheckedKeys = new Set(Object.keys(this._snapshotData));
            this._counters = new Map();
            this._index = 0;
            this.expand = options.expand || false;
            this.added = 0;
            this.matched = 0;
            this.unmatched = 0;
            this._updateSnapshot = options.updateSnapshot;
            this.updated = 0;
            this.snapshotFormat = options.snapshotFormat;
            this._rootDir = options.rootDir;
          }
          markSnapshotsAsCheckedForTest(testName) {
            for (const uncheckedKey of this._uncheckedKeys) {
              if ((0, _snapshotUtils.keyToTestName)(uncheckedKey) === testName) {
                this._uncheckedKeys.delete(uncheckedKey);
              }
            }
          }
          _addSnapshot(key, receivedSerialized, options) {
            this._dirty = true;
            if (options.isInline) {
              const error = options.error || new Error();
              const lines = (0, _jestMessageUtil.getStackTraceLines)((0, _utils.removeLinesBeforeExternalMatcherTrap)(error.stack || ""));
              const frame = (0, _jestMessageUtil.getTopFrame)(lines);
              if (!frame) {
                throw new Error("Jest: Couldn't infer stack frame for inline snapshot.");
              }
              this._inlineSnapshots.push({
                frame,
                snapshot: receivedSerialized
              });
            } else {
              this._snapshotData[key] = receivedSerialized;
            }
          }
          clear() {
            this._snapshotData = this._initialData;
            this._inlineSnapshots = [];
            this._counters = new Map();
            this._index = 0;
            this.added = 0;
            this.matched = 0;
            this.unmatched = 0;
            this.updated = 0;
          }
          save() {
            const hasExternalSnapshots = Object.keys(this._snapshotData).length;
            const hasInlineSnapshots = this._inlineSnapshots.length;
            const isEmpty = !hasExternalSnapshots && !hasInlineSnapshots;
            const status = {
              deleted: false,
              saved: false
            };
            if ((this._dirty || this._uncheckedKeys.size > 0) && !isEmpty) {
              if (hasExternalSnapshots) {
                (0, _snapshotUtils.saveSnapshotFile)(this._snapshotData, this._snapshotPath);
              }
              if (hasInlineSnapshots) {
                (0, _InlineSnapshots.saveInlineSnapshots)(this._inlineSnapshots, this._rootDir, this._prettierPath);
              }
              status.saved = true;
            } else if (!hasExternalSnapshots && jestExistsFile(this._snapshotPath)) {
              if (this._updateSnapshot === "all") {
                fs.unlinkSync(this._snapshotPath);
              }
              status.deleted = true;
            }
            return status;
          }
          getUncheckedCount() {
            return this._uncheckedKeys.size || 0;
          }
          getUncheckedKeys() {
            return [...this._uncheckedKeys];
          }
          removeUncheckedKeys() {
            if (this._updateSnapshot === "all" && this._uncheckedKeys.size > 0) {
              this._dirty = true;
              for (const key of this._uncheckedKeys)
                delete this._snapshotData[key];
              this._uncheckedKeys.clear();
            }
          }
          match({
            testName,
            received,
            key,
            inlineSnapshot,
            isInline,
            error,
            testFailing = false
          }) {
            this._counters.set(testName, (this._counters.get(testName) || 0) + 1);
            const count = Number(this._counters.get(testName));
            if (!key) {
              key = (0, _snapshotUtils.testNameToKey)(testName, count);
            }
            if (!(isInline && this._snapshotData[key] !== void 0)) {
              this._uncheckedKeys.delete(key);
            }
            const receivedSerialized = (0, _utils.addExtraLineBreaks)((0, _utils.serialize)(received, void 0, this.snapshotFormat));
            const expected = isInline ? inlineSnapshot : this._snapshotData[key];
            const pass = expected === receivedSerialized;
            const hasSnapshot = expected !== void 0;
            const snapshotIsPersisted = isInline || fs.existsSync(this._snapshotPath);
            if (pass && !isInline) {
              this._snapshotData[key] = receivedSerialized;
            }
            if (testFailing) {
              if (hasSnapshot && !isInline) {
                this._addSnapshot(key, expected, {
                  error,
                  isInline
                });
              }
              return {
                actual: (0, _utils.removeExtraLineBreaks)(receivedSerialized),
                count,
                expected: expected === void 0 ? void 0 : (0, _utils.removeExtraLineBreaks)(expected),
                key,
                pass
              };
            }
            if (hasSnapshot && this._updateSnapshot === "all" || (!hasSnapshot || !snapshotIsPersisted) && (this._updateSnapshot === "new" || this._updateSnapshot === "all")) {
              if (this._updateSnapshot === "all") {
                if (pass) {
                  this.matched++;
                } else {
                  if (hasSnapshot) {
                    this.updated++;
                  } else {
                    this.added++;
                  }
                  this._addSnapshot(key, receivedSerialized, {
                    error,
                    isInline
                  });
                }
              } else {
                this._addSnapshot(key, receivedSerialized, {
                  error,
                  isInline
                });
                this.added++;
              }
              return {
                actual: "",
                count,
                expected: "",
                key,
                pass: true
              };
            } else {
              if (pass) {
                this.matched++;
                return {
                  actual: "",
                  count,
                  expected: "",
                  key,
                  pass: true
                };
              } else {
                this.unmatched++;
                return {
                  actual: (0, _utils.removeExtraLineBreaks)(receivedSerialized),
                  count,
                  expected: expected === void 0 ? void 0 : (0, _utils.removeExtraLineBreaks)(expected),
                  key,
                  pass: false
                };
              }
            }
          }
          fail(testName, _received, key) {
            this._counters.set(testName, (this._counters.get(testName) || 0) + 1);
            const count = Number(this._counters.get(testName));
            if (!key) {
              key = (0, _snapshotUtils.testNameToKey)(testName, count);
            }
            this._uncheckedKeys.delete(key);
            this.unmatched++;
            return key;
          }
        }
        exports["default"] = SnapshotState2;
      },
      "./src/colors.ts"(__unused_webpack_module, exports) {
        Object.defineProperty(exports, "__esModule", {
          value: true
        });
        exports.bForeground3 = exports.bForeground2 = exports.bBackground3 = exports.bBackground2 = exports.aForeground3 = exports.aForeground2 = exports.aBackground3 = exports.aBackground2 = void 0;
        const aForeground2 = exports.aForeground2 = 90;
        const aBackground2 = exports.aBackground2 = 225;
        const bForeground2 = exports.bForeground2 = 23;
        const bBackground2 = exports.bBackground2 = 195;
        const aForeground3 = exports.aForeground3 = [128, 0, 128];
        const aBackground3 = exports.aBackground3 = [255, 215, 255];
        const bForeground3 = exports.bForeground3 = [0, 95, 95];
        const bBackground3 = exports.bBackground3 = [215, 255, 255];
      },
      "./src/dedentLines.ts"(__unused_webpack_module, exports) {
        Object.defineProperty(exports, "__esModule", {
          value: true
        });
        exports.dedentLines = void 0;
        const getIndentationLength = (line) => {
          const result = /^( {2})+/.exec(line);
          return result === null ? 0 : result[0].length;
        };
        const dedentLine = (line) => line.slice(getIndentationLength(line));
        const hasUnmatchedDoubleQuoteMarks = (string) => {
          let n = 0;
          let i = string.indexOf('"', 0);
          while (i !== -1) {
            if (i === 0 || string[i - 1] !== "\\") {
              n += 1;
            }
            i = string.indexOf('"', i + 1);
          }
          return n % 2 !== 0;
        };
        const isFirstLineOfTag = (line) => /^( {2})*</.test(line);
        const dedentStartTag = (input, output) => {
          let line = input[output.length];
          output.push(dedentLine(line));
          if (line.includes(">")) {
            return true;
          }
          while (output.length < input.length) {
            line = input[output.length];
            if (hasUnmatchedDoubleQuoteMarks(line)) {
              return false;
            } else if (isFirstLineOfTag(line)) {
              if (!dedentMarkup(input, output)) {
                return false;
              }
            } else {
              output.push(dedentLine(line));
              if (line.includes(">")) {
                return true;
              }
            }
          }
          return false;
        };
        const dedentMarkup = (input, output) => {
          let line = input[output.length];
          if (!dedentStartTag(input, output)) {
            return false;
          }
          if (input[output.length - 1].includes("/>")) {
            return true;
          }
          let isText = false;
          const stack = [];
          stack.push(getIndentationLength(line));
          while (stack.length > 0 && output.length < input.length) {
            line = input[output.length];
            if (isFirstLineOfTag(line)) {
              if (line.includes("</")) {
                output.push(dedentLine(line));
                stack.pop();
              } else {
                if (!dedentStartTag(input, output)) {
                  return false;
                }
                if (!input[output.length - 1].includes("/>")) {
                  stack.push(getIndentationLength(line));
                }
              }
              isText = false;
            } else {
              if (isText) {
                return false;
              }
              const indentationLengthOfTag = stack.at(-1);
              output.push(line.slice(indentationLengthOfTag + 2));
              isText = true;
            }
          }
          return stack.length === 0;
        };
        const dedentLines = (input) => {
          const output = [];
          while (output.length < input.length) {
            const line = input[output.length];
            if (hasUnmatchedDoubleQuoteMarks(line)) {
              return null;
            } else if (isFirstLineOfTag(line)) {
              if (!dedentMarkup(input, output)) {
                return null;
              }
            } else {
              output.push(dedentLine(line));
            }
          }
          return output;
        };
        exports.dedentLines = dedentLines;
      },
      "./src/mockSerializer.ts"(__unused_webpack_module, exports) {
        Object.defineProperty(exports, "__esModule", {
          value: true
        });
        exports.test = exports.serialize = exports["default"] = void 0;
        const serialize = (val, config, indentation, depth, refs, printer) => {
          const name = val.getMockName();
          const nameString = name === "jest.fn()" ? "" : ` ${name}`;
          let callsString = "";
          if (val.mock.calls.length > 0) {
            const indentationNext = indentation + config.indent;
            callsString = ` {${config.spacingOuter}${indentationNext}"calls": ${printer(val.mock.calls, config, indentationNext, depth, refs)}${config.min ? ", " : ","}${config.spacingOuter}${indentationNext}"results": ${printer(val.mock.results, config, indentationNext, depth, refs)}${config.min ? "" : ","}${config.spacingOuter}${indentation}}`;
          }
          return `[MockFunction${nameString}]${callsString}`;
        };
        exports.serialize = serialize;
        const test = (val) => val && !!val._isMockFunction;
        exports.test = test;
        const plugin = {
          serialize,
          test
        };
        var _default = exports["default"] = plugin;
      },
      "./src/plugins.ts"(__unused_webpack_module, exports, __webpack_require__2) {
        Object.defineProperty(exports, "__esModule", {
          value: true
        });
        exports.getSerializers = exports.addSerializer = void 0;
        var _prettyFormat = require$$10;
        var _mockSerializer = _interopRequireDefault(__webpack_require__2("./src/mockSerializer.ts"));
        function _interopRequireDefault(e) {
          return e && e.__esModule ? e : {default: e};
        }
        const {
          DOMCollection,
          DOMElement,
          Immutable,
          ReactElement,
          ReactTestComponent,
          AsymmetricMatcher
        } = _prettyFormat.plugins;
        let PLUGINS = [ReactTestComponent, ReactElement, DOMElement, DOMCollection, Immutable, _mockSerializer.default, AsymmetricMatcher];
        const addSerializer2 = (plugin) => {
          PLUGINS = [plugin, ...PLUGINS];
        };
        exports.addSerializer = addSerializer2;
        const getSerializers2 = () => PLUGINS;
        exports.getSerializers = getSerializers2;
      },
      "./src/printSnapshot.ts"(__unused_webpack_module, exports, __webpack_require__2) {
        Object.defineProperty(exports, "__esModule", {
          value: true
        });
        exports.printSnapshotAndReceived = exports.printReceived = exports.printPropertiesAndReceived = exports.printExpected = exports.noColor = exports.matcherHintFromConfig = exports.getSnapshotColorForChalkInstance = exports.getReceivedColorForChalkInstance = exports.bReceivedColor = exports.aSnapshotColor = exports.SNAPSHOT_ARG = exports.PROPERTIES_ARG = exports.HINT_ARG = void 0;
        var _chalk = _interopRequireDefault(require$$5);
        var _expectUtils = require$$11;
        var _getType = require$$12;
        var _jestDiff = require$$13;
        var _jestMatcherUtils = require$$14;
        var _prettyFormat = require$$10;
        var _colors = __webpack_require__2("./src/colors.ts");
        var _dedentLines = __webpack_require__2("./src/dedentLines.ts");
        var _utils = __webpack_require__2("./src/utils.ts");
        function _interopRequireDefault(e) {
          return e && e.__esModule ? e : {default: e};
        }
        const getSnapshotColorForChalkInstance = (chalkInstance) => {
          const level = chalkInstance.level;
          if (level === 3) {
            return chalkInstance.rgb(_colors.aForeground3[0], _colors.aForeground3[1], _colors.aForeground3[2]).bgRgb(_colors.aBackground3[0], _colors.aBackground3[1], _colors.aBackground3[2]);
          }
          if (level === 2) {
            return chalkInstance.ansi256(_colors.aForeground2).bgAnsi256(_colors.aBackground2);
          }
          return chalkInstance.magenta.bgYellowBright;
        };
        exports.getSnapshotColorForChalkInstance = getSnapshotColorForChalkInstance;
        const getReceivedColorForChalkInstance = (chalkInstance) => {
          const level = chalkInstance.level;
          if (level === 3) {
            return chalkInstance.rgb(_colors.bForeground3[0], _colors.bForeground3[1], _colors.bForeground3[2]).bgRgb(_colors.bBackground3[0], _colors.bBackground3[1], _colors.bBackground3[2]);
          }
          if (level === 2) {
            return chalkInstance.ansi256(_colors.bForeground2).bgAnsi256(_colors.bBackground2);
          }
          return chalkInstance.cyan.bgWhiteBright;
        };
        exports.getReceivedColorForChalkInstance = getReceivedColorForChalkInstance;
        const aSnapshotColor = exports.aSnapshotColor = getSnapshotColorForChalkInstance(_chalk.default);
        const bReceivedColor = exports.bReceivedColor = getReceivedColorForChalkInstance(_chalk.default);
        const noColor = (string) => string;
        exports.noColor = noColor;
        const HINT_ARG = exports.HINT_ARG = "hint";
        const SNAPSHOT_ARG = exports.SNAPSHOT_ARG = "snapshot";
        const PROPERTIES_ARG = exports.PROPERTIES_ARG = "properties";
        const matcherHintFromConfig = ({
          context: {
            isNot,
            promise
          },
          hint,
          inlineSnapshot,
          matcherName,
          properties
        }, isUpdatable) => {
          const options = {
            isNot,
            promise
          };
          if (isUpdatable) {
            options.receivedColor = bReceivedColor;
          }
          let expectedArgument = "";
          if (typeof properties === "object") {
            expectedArgument = PROPERTIES_ARG;
            if (isUpdatable) {
              options.expectedColor = noColor;
            }
            if (typeof hint === "string" && hint.length > 0) {
              options.secondArgument = HINT_ARG;
              options.secondArgumentColor = _jestMatcherUtils.BOLD_WEIGHT;
            } else if (typeof inlineSnapshot === "string") {
              options.secondArgument = SNAPSHOT_ARG;
              if (isUpdatable) {
                options.secondArgumentColor = aSnapshotColor;
              } else {
                options.secondArgumentColor = noColor;
              }
            }
          } else {
            if (typeof hint === "string" && hint.length > 0) {
              expectedArgument = HINT_ARG;
              options.expectedColor = _jestMatcherUtils.BOLD_WEIGHT;
            } else if (typeof inlineSnapshot === "string") {
              expectedArgument = SNAPSHOT_ARG;
              if (isUpdatable) {
                options.expectedColor = aSnapshotColor;
              }
            }
          }
          return (0, _jestMatcherUtils.matcherHint)(matcherName, void 0, expectedArgument, options);
        };
        exports.matcherHintFromConfig = matcherHintFromConfig;
        const joinDiffs = (diffs, op, hasCommon) => diffs.reduce((reduced, diff) => reduced + (diff[0] === _jestDiff.DIFF_EQUAL ? diff[1] : diff[0] === op ? hasCommon ? (0, _jestMatcherUtils.INVERTED_COLOR)(diff[1]) : diff[1] : ""), "");
        const isLineDiffable = (received) => {
          const receivedType = (0, _getType.getType)(received);
          if ((0, _getType.isPrimitive)(received)) {
            return typeof received === "string";
          }
          if (receivedType === "date" || receivedType === "function" || receivedType === "regexp") {
            return false;
          }
          if (received instanceof Error) {
            return false;
          }
          if (receivedType === "object" && typeof received.asymmetricMatch === "function") {
            return false;
          }
          return true;
        };
        const printExpected = (val) => (0, _jestMatcherUtils.EXPECTED_COLOR)((0, _utils.minify)(val));
        exports.printExpected = printExpected;
        const printReceived = (val) => (0, _jestMatcherUtils.RECEIVED_COLOR)((0, _utils.minify)(val));
        exports.printReceived = printReceived;
        const printPropertiesAndReceived = (properties, received, expand) => {
          const aAnnotation = "Expected properties";
          const bAnnotation = "Received value";
          if (isLineDiffable(properties) && isLineDiffable(received)) {
            const {
              replacedExpected,
              replacedReceived
            } = (0, _jestMatcherUtils.replaceMatchedToAsymmetricMatcher)(properties, received, [], []);
            return (0, _jestDiff.diffLinesUnified)((0, _utils.serialize)(replacedExpected).split("\n"), (0, _utils.serialize)((0, _expectUtils.getObjectSubset)(replacedReceived, replacedExpected)).split("\n"), {
              aAnnotation,
              aColor: _jestMatcherUtils.EXPECTED_COLOR,
              bAnnotation,
              bColor: _jestMatcherUtils.RECEIVED_COLOR,
              changeLineTrailingSpaceColor: _chalk.default.bgYellow,
              commonLineTrailingSpaceColor: _chalk.default.bgYellow,
              emptyFirstOrLastLinePlaceholder: "\u21B5",
              expand,
              includeChangeCounts: true
            });
          }
          const printLabel = (0, _jestMatcherUtils.getLabelPrinter)(aAnnotation, bAnnotation);
          return `${printLabel(aAnnotation) + printExpected(properties)}
${printLabel(bAnnotation)}${printReceived(received)}`;
        };
        exports.printPropertiesAndReceived = printPropertiesAndReceived;
        const MAX_DIFF_STRING_LENGTH = 2e4;
        const printSnapshotAndReceived = (a, b, received, expand, snapshotFormat) => {
          const aAnnotation = "Snapshot";
          const bAnnotation = "Received";
          const aColor = aSnapshotColor;
          const bColor = bReceivedColor;
          const options = {
            aAnnotation,
            aColor,
            bAnnotation,
            bColor,
            changeLineTrailingSpaceColor: noColor,
            commonLineTrailingSpaceColor: _chalk.default.bgYellow,
            emptyFirstOrLastLinePlaceholder: "\u21B5",
            expand,
            includeChangeCounts: true
          };
          if (typeof received === "string") {
            if (a.length >= 2 && a.startsWith('"') && a.endsWith('"') && b === (0, _prettyFormat.format)(received)) {
              if (!a.includes("\n") && !b.includes("\n")) {
                let aQuoted = a;
                let bQuoted = b;
                if (a.length - 2 <= MAX_DIFF_STRING_LENGTH && b.length - 2 <= MAX_DIFF_STRING_LENGTH) {
                  const diffs = (0, _jestDiff.diffStringsRaw)(a.slice(1, -1), b.slice(1, -1), true);
                  const hasCommon = diffs.some((diff) => diff[0] === _jestDiff.DIFF_EQUAL);
                  aQuoted = `"${joinDiffs(diffs, _jestDiff.DIFF_DELETE, hasCommon)}"`;
                  bQuoted = `"${joinDiffs(diffs, _jestDiff.DIFF_INSERT, hasCommon)}"`;
                }
                const printLabel2 = (0, _jestMatcherUtils.getLabelPrinter)(aAnnotation, bAnnotation);
                return `${printLabel2(aAnnotation) + aColor(aQuoted)}
${printLabel2(bAnnotation)}${bColor(bQuoted)}`;
              }
              a = (0, _utils.deserializeString)(a);
              b = received;
            }
            return a.length <= MAX_DIFF_STRING_LENGTH && b.length <= MAX_DIFF_STRING_LENGTH ? (0, _jestDiff.diffStringsUnified)(a, b, options) : (0, _jestDiff.diffLinesUnified)(a.split("\n"), b.split("\n"), options);
          }
          if (isLineDiffable(received)) {
            const aLines2 = a.split("\n");
            const bLines2 = b.split("\n");
            const b0 = (0, _utils.serialize)(received, 0, snapshotFormat);
            if (b0 !== b) {
              const aLines0 = (0, _dedentLines.dedentLines)(aLines2);
              if (aLines0 !== null) {
                const bLines0 = b0.split("\n");
                return (0, _jestDiff.diffLinesUnified2)(aLines2, bLines2, aLines0, bLines0, options);
              }
            }
            return (0, _jestDiff.diffLinesUnified)(aLines2, bLines2, options);
          }
          const printLabel = (0, _jestMatcherUtils.getLabelPrinter)(aAnnotation, bAnnotation);
          return `${printLabel(aAnnotation) + aColor(a)}
${printLabel(bAnnotation)}${bColor(b)}`;
        };
        exports.printSnapshotAndReceived = printSnapshotAndReceived;
      },
      "./src/utils.ts"(__unused_webpack_module, exports, __webpack_require__2) {
        Object.defineProperty(exports, "__esModule", {
          value: true
        });
        exports.serialize = exports.removeLinesBeforeExternalMatcherTrap = exports.removeExtraLineBreaks = exports.processPrettierAst = exports.processInlineSnapshotsWithBabel = exports.minify = exports.groupSnapshotsByFile = exports.deserializeString = exports.deepMerge = exports.addExtraLineBreaks = void 0;
        var fs = _interopRequireWildcard(require$$2);
        var _snapshotUtils = require$$8;
        var _prettyFormat = require$$10;
        var _plugins = __webpack_require__2("./src/plugins.ts");
        function _interopRequireWildcard(e, t) {
          if (typeof WeakMap == "function")
            var r = new WeakMap(), n = new WeakMap();
          return (_interopRequireWildcard = function(e2, t2) {
            if (!t2 && e2 && e2.__esModule)
              return e2;
            var o, i, f = {__proto__: null, default: e2};
            if (e2 === null || typeof e2 != "object" && typeof e2 != "function")
              return f;
            if (o = t2 ? n : r) {
              if (o.has(e2))
                return o.get(e2);
              o.set(e2, f);
            }
            for (const t3 in e2)
              t3 !== "default" && {}.hasOwnProperty.call(e2, t3) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e2, t3)) && (i.get || i.set) ? o(f, t3, i) : f[t3] = e2[t3]);
            return f;
          })(e, t);
        }
        var Symbol = globalThis["jest-symbol-do-not-touch"] || globalThis.Symbol;
        var jestReadFile = globalThis[Symbol.for("jest-native-read-file")] || fs.readFileSync;
        var Symbol = globalThis["jest-symbol-do-not-touch"] || globalThis.Symbol;
        function isObject2(item) {
          return item != null && typeof item === "object" && !Array.isArray(item);
        }
        const addExtraLineBreaks = (string) => string.includes("\n") ? `
${string}
` : string;
        exports.addExtraLineBreaks = addExtraLineBreaks;
        const removeExtraLineBreaks = (string) => string.length > 2 && string.startsWith("\n") && string.endsWith("\n") ? string.slice(1, -1) : string;
        exports.removeExtraLineBreaks = removeExtraLineBreaks;
        const removeLinesBeforeExternalMatcherTrap = (stack) => {
          const lines = stack.split("\n");
          for (let i = 0; i < lines.length; i += 1) {
            if (lines[i].includes("__EXTERNAL_MATCHER_TRAP__")) {
              return lines.slice(i + 1).join("\n");
            }
          }
          return stack;
        };
        exports.removeLinesBeforeExternalMatcherTrap = removeLinesBeforeExternalMatcherTrap;
        const escapeRegex = true;
        const printFunctionName = false;
        const serialize = (val, indent2 = 2, formatOverrides = {}) => (0, _snapshotUtils.normalizeNewlines)((0, _prettyFormat.format)(val, {
          escapeRegex,
          indent: indent2,
          plugins: (0, _plugins.getSerializers)(),
          printFunctionName,
          ...formatOverrides
        }));
        exports.serialize = serialize;
        const minify = (val) => (0, _prettyFormat.format)(val, {
          escapeRegex,
          min: true,
          plugins: (0, _plugins.getSerializers)(),
          printFunctionName
        });
        exports.minify = minify;
        const deserializeString = (stringified) => stringified.slice(1, -1).replaceAll(/\\("|\\)/g, "$1");
        exports.deserializeString = deserializeString;
        const isAnyOrAnything = (input) => "$$typeof" in input && input.$$typeof === Symbol.for("jest.asymmetricMatcher") && ["Any", "Anything"].includes(input.constructor.name);
        const deepMergeArray = (target, source) => {
          const mergedOutput = [...target];
          for (const [index, sourceElement] of source.entries()) {
            const targetElement = mergedOutput[index];
            if (Array.isArray(target[index]) && Array.isArray(sourceElement)) {
              mergedOutput[index] = deepMergeArray(target[index], sourceElement);
            } else if (isObject2(targetElement) && !isAnyOrAnything(sourceElement)) {
              mergedOutput[index] = deepMerge(target[index], sourceElement);
            } else {
              mergedOutput[index] = sourceElement;
            }
          }
          return mergedOutput;
        };
        const deepMerge = (target, source) => {
          if (isObject2(target) && isObject2(source)) {
            const mergedOutput = {
              ...target
            };
            for (const key of Object.keys(source)) {
              if (isObject2(source[key]) && !source[key].$$typeof) {
                if (key in target) {
                  mergedOutput[key] = deepMerge(target[key], source[key]);
                } else {
                  Object.assign(mergedOutput, {
                    [key]: source[key]
                  });
                }
              } else if (Array.isArray(source[key])) {
                mergedOutput[key] = deepMergeArray(target[key], source[key]);
              } else {
                Object.assign(mergedOutput, {
                  [key]: source[key]
                });
              }
            }
            return mergedOutput;
          } else if (Array.isArray(target) && Array.isArray(source)) {
            return deepMergeArray(target, source);
          }
          return target;
        };
        exports.deepMerge = deepMerge;
        const indent = (snapshot, numIndents, indentation) => {
          const lines = snapshot.split("\n");
          if (lines.length >= 2 && lines[1].startsWith(indentation.repeat(numIndents + 1))) {
            return snapshot;
          }
          return lines.map((line, index) => {
            if (index === 0) {
              return line;
            } else if (index === lines.length - 1) {
              return indentation.repeat(numIndents) + line;
            } else {
              if (line === "") {
                return line;
              }
              return indentation.repeat(numIndents + 1) + line;
            }
          }).join("\n");
        };
        const generate = commonjsRequire(require.resolve("@babel/generator", {
          [Symbol.for("jest-resolve-outside-vm-option")]: true
        })).default;
        const {
          parseSync,
          types
        } = commonjsRequire(require.resolve("@babel/core", {
          [Symbol.for("jest-resolve-outside-vm-option")]: true
        }));
        const {
          isAwaitExpression,
          templateElement,
          templateLiteral,
          traverseFast,
          traverse
        } = types;
        const processInlineSnapshotsWithBabel = (snapshots, sourceFilePath, rootDir) => {
          const sourceFile = jestReadFile(sourceFilePath, "utf8");
          const presets = [require.resolve("babel-preset-current-node-syntax")];
          const plugins = [];
          if (/\.([cm]?ts|tsx)$/.test(sourceFilePath)) {
            plugins.push([
              require.resolve("@babel/plugin-syntax-typescript"),
              {
                isTSX: sourceFilePath.endsWith("x")
              },
              "TypeScript syntax plugin added by Jest snapshot"
            ]);
          }
          const snapshotMatcherNames = [];
          let ast = null;
          try {
            ast = parseSync(sourceFile, {
              filename: sourceFilePath,
              plugins,
              presets,
              root: rootDir
            });
          } catch (error) {
            if (error.message.includes("@babel/plugin-syntax-jsx")) {
              try {
                const jsxSyntaxPlugin = [
                  require.resolve("@babel/plugin-syntax-jsx"),
                  {},
                  "JSX syntax plugin added by Jest snapshot"
                ];
                ast = parseSync(sourceFile, {
                  filename: sourceFilePath,
                  plugins: [...plugins, jsxSyntaxPlugin],
                  presets,
                  root: rootDir
                });
              } catch {
                throw error;
              }
            } else {
              throw error;
            }
          }
          if (!ast) {
            throw new Error(`jest-snapshot: Failed to parse ${sourceFilePath}`);
          }
          traverseAst(snapshots, ast, snapshotMatcherNames);
          return {
            snapshotMatcherNames,
            sourceFile,
            sourceFileWithSnapshots: snapshots.reduceRight((sourceSoFar, nextSnapshot) => {
              const {
                node
              } = nextSnapshot;
              if (!node || typeof node.start !== "number" || typeof node.end !== "number") {
                throw new Error("Jest: no snapshot insert location found");
              }
              node.loc.end.line = node.loc.start.line;
              return sourceSoFar.slice(0, node.start) + generate(node, {
                retainLines: true
              }).code.trim() + sourceSoFar.slice(node.end);
            }, sourceFile)
          };
        };
        exports.processInlineSnapshotsWithBabel = processInlineSnapshotsWithBabel;
        const processPrettierAst = (ast, options, snapshotMatcherNames, keepNode) => {
          traverse(ast, (node, ancestors) => {
            var _a, _b;
            if (node.type !== "CallExpression")
              return;
            const {
              arguments: args,
              callee
            } = node;
            if (callee.type !== "MemberExpression" || callee.property.type !== "Identifier" || !snapshotMatcherNames.includes(callee.property.name) || !callee.loc || callee.computed) {
              return;
            }
            let snapshotIndex;
            let snapshot;
            for (const [i, node2] of args.entries()) {
              if (node2.type === "TemplateLiteral") {
                snapshotIndex = i;
                snapshot = node2.quasis[0].value.raw;
              }
            }
            if (snapshot === void 0) {
              return;
            }
            const parent = ancestors.at(-1).node;
            const startColumn = isAwaitExpression(parent) && parent.loc ? parent.loc.start.column : callee.loc.start.column;
            const useSpaces = !(options == null ? void 0 : options.useTabs);
            snapshot = indent(snapshot, Math.ceil(useSpaces ? startColumn / ((_a = options == null ? void 0 : options.tabWidth) != null ? _a : 1) : startColumn / 2), useSpaces ? " ".repeat((_b = options == null ? void 0 : options.tabWidth) != null ? _b : 1) : "	");
            if (keepNode) {
              args[snapshotIndex].quasis[0].value.raw = snapshot;
            } else {
              const replacementNode = templateLiteral([templateElement({
                raw: snapshot
              })], []);
              args[snapshotIndex] = replacementNode;
            }
          });
        };
        exports.processPrettierAst = processPrettierAst;
        const groupSnapshotsBy = (createKey) => (snapshots) => snapshots.reduce((object, inlineSnapshot) => {
          const key = createKey(inlineSnapshot);
          return {
            ...object,
            [key]: [...object[key] || [], inlineSnapshot]
          };
        }, {});
        const groupSnapshotsByFrame = groupSnapshotsBy(({
          frame: {
            line,
            column
          }
        }) => typeof line === "number" && typeof column === "number" ? `${line}:${column - 1}` : "");
        const groupSnapshotsByFile = exports.groupSnapshotsByFile = groupSnapshotsBy(({
          frame: {
            file
          }
        }) => file);
        const traverseAst = (snapshots, ast, snapshotMatcherNames) => {
          const groupedSnapshots = groupSnapshotsByFrame(snapshots);
          const remainingSnapshots = new Set(snapshots.map(({
            snapshot
          }) => snapshot));
          traverseFast(ast, (node) => {
            if (node.type !== "CallExpression")
              return;
            const {
              arguments: args,
              callee
            } = node;
            if (callee.type !== "MemberExpression" || callee.property.type !== "Identifier" || callee.property.loc == null) {
              return;
            }
            const {
              line,
              column
            } = callee.property.loc.start;
            const snapshotsForFrame = groupedSnapshots[`${line}:${column}`];
            if (!snapshotsForFrame) {
              return;
            }
            if (snapshotsForFrame.length > 1) {
              throw new Error("Jest: Multiple inline snapshots for the same call are not supported.");
            }
            const inlineSnapshot = snapshotsForFrame[0];
            inlineSnapshot.node = node;
            snapshotMatcherNames.push(callee.property.name);
            const snapshotIndex = args.findIndex(({
              type
            }) => type === "TemplateLiteral" || type === "StringLiteral");
            const {
              snapshot
            } = inlineSnapshot;
            remainingSnapshots.delete(snapshot);
            const replacementNode = templateLiteral([templateElement({
              raw: (0, _snapshotUtils.escapeBacktickString)(snapshot)
            })], []);
            if (snapshotIndex === -1) {
              args.push(replacementNode);
            } else {
              args[snapshotIndex] = replacementNode;
            }
          });
          if (remainingSnapshots.size > 0) {
            throw new Error("Jest: Couldn't locate all inline snapshots.");
          }
        };
      }
    };
    var __webpack_module_cache__ = {};
    function __webpack_require__(moduleId) {
      var cachedModule = __webpack_module_cache__[moduleId];
      if (cachedModule !== void 0) {
        return cachedModule.exports;
      }
      var module2 = __webpack_module_cache__[moduleId] = {
        exports: {}
      };
      __webpack_modules__[moduleId](module2, module2.exports, __webpack_require__);
      return module2.exports;
    }
    var __webpack_exports__ = {};
    (() => {
      var exports = __webpack_exports__;
      Object.defineProperty(exports, "__esModule", {
        value: true
      });
      Object.defineProperty(exports, "EXTENSION", {
        enumerable: true,
        get: function() {
          return _SnapshotResolver.EXTENSION;
        }
      });
      Object.defineProperty(exports, "SnapshotState", {
        enumerable: true,
        get: function() {
          return _State.default;
        }
      });
      Object.defineProperty(exports, "addSerializer", {
        enumerable: true,
        get: function() {
          return _plugins.addSerializer;
        }
      });
      Object.defineProperty(exports, "buildSnapshotResolver", {
        enumerable: true,
        get: function() {
          return _SnapshotResolver.buildSnapshotResolver;
        }
      });
      exports.cleanup = void 0;
      Object.defineProperty(exports, "getSerializers", {
        enumerable: true,
        get: function() {
          return _plugins.getSerializers;
        }
      });
      Object.defineProperty(exports, "isSnapshotPath", {
        enumerable: true,
        get: function() {
          return _SnapshotResolver.isSnapshotPath;
        }
      });
      exports.toThrowErrorMatchingSnapshot = exports.toThrowErrorMatchingInlineSnapshot = exports.toMatchSnapshot = exports.toMatchInlineSnapshot = void 0;
      var _util = util$1;
      var fs = _interopRequireWildcard(require$$2);
      var _snapshotUtils = require$$8;
      var _jestMatcherUtils = require$$14;
      var _SnapshotResolver = __webpack_require__("./src/SnapshotResolver.ts");
      var _printSnapshot = __webpack_require__("./src/printSnapshot.ts");
      var _utils = __webpack_require__("./src/utils.ts");
      var _plugins = __webpack_require__("./src/plugins.ts");
      var _State = _interopRequireDefault(__webpack_require__("./src/State.ts"));
      function _interopRequireDefault(e) {
        return e && e.__esModule ? e : {default: e};
      }
      function _interopRequireWildcard(e, t) {
        if (typeof WeakMap == "function")
          var r = new WeakMap(), n = new WeakMap();
        return (_interopRequireWildcard = function(e2, t2) {
          if (!t2 && e2 && e2.__esModule)
            return e2;
          var o, i, f = {__proto__: null, default: e2};
          if (e2 === null || typeof e2 != "object" && typeof e2 != "function")
            return f;
          if (o = t2 ? n : r) {
            if (o.has(e2))
              return o.get(e2);
            o.set(e2, f);
          }
          for (const t3 in e2)
            t3 !== "default" && {}.hasOwnProperty.call(e2, t3) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e2, t3)) && (i.get || i.set) ? o(f, t3, i) : f[t3] = e2[t3]);
          return f;
        })(e, t);
      }
      var src_Symbol = globalThis["jest-symbol-do-not-touch"] || globalThis.Symbol;
      var src_Symbol = globalThis["jest-symbol-do-not-touch"] || globalThis.Symbol;
      var jestExistsFile = globalThis[src_Symbol.for("jest-native-exists-file")] || fs.existsSync;
      const DID_NOT_THROW = "Received function did not throw";
      const NOT_SNAPSHOT_MATCHERS = `Snapshot matchers cannot be used with ${(0, _jestMatcherUtils.BOLD_WEIGHT)("not")}`;
      const INDENTATION_REGEX = /^([^\S\n]*)\S/m;
      const printSnapshotName = (concatenatedBlockNames = "", hint = "", count) => {
        const hasNames = concatenatedBlockNames.length > 0;
        const hasHint = hint.length > 0;
        return `Snapshot name: \`${hasNames ? (0, _snapshotUtils.escapeBacktickString)(concatenatedBlockNames) : ""}${hasNames && hasHint ? ": " : ""}${hasHint ? (0, _jestMatcherUtils.BOLD_WEIGHT)((0, _snapshotUtils.escapeBacktickString)(hint)) : ""} ${count}\``;
      };
      function stripAddedIndentation(inlineSnapshot) {
        const match = inlineSnapshot.match(INDENTATION_REGEX);
        if (!match || !match[1]) {
          return inlineSnapshot;
        }
        const indentation = match[1];
        const lines = inlineSnapshot.split("\n");
        if (lines.length <= 2) {
          return inlineSnapshot;
        }
        if (lines[0].trim() !== "" || lines.at(-1).trim() !== "") {
          return inlineSnapshot;
        }
        for (let i = 1; i < lines.length - 1; i++) {
          if (lines[i] !== "") {
            if (lines[i].indexOf(indentation) !== 0) {
              return inlineSnapshot;
            }
            lines[i] = lines[i].slice(indentation.length);
          }
        }
        lines[lines.length - 1] = "";
        inlineSnapshot = lines.join("\n");
        return inlineSnapshot;
      }
      const fileExists = (filePath, fileSystem) => fileSystem.exists(filePath) || jestExistsFile(filePath);
      const cleanup2 = (fileSystem, update, snapshotResolver, testPathIgnorePatterns) => {
        const pattern = `\\.${_SnapshotResolver.EXTENSION}$`;
        const files = fileSystem.matchFiles(pattern);
        let testIgnorePatternsRegex = null;
        if (testPathIgnorePatterns && testPathIgnorePatterns.length > 0) {
          testIgnorePatternsRegex = new RegExp(testPathIgnorePatterns.join("|"));
        }
        const list = files.filter((snapshotFile) => {
          const testPath = snapshotResolver.resolveTestPath(snapshotFile);
          if (testIgnorePatternsRegex && testIgnorePatternsRegex.test(testPath)) {
            return false;
          }
          if (!fileExists(testPath, fileSystem)) {
            if (update === "all") {
              fs.unlinkSync(snapshotFile);
            }
            return true;
          }
          return false;
        });
        return {
          filesRemoved: list.length,
          filesRemovedList: list
        };
      };
      exports.cleanup = cleanup2;
      const toMatchSnapshot2 = function(received, propertiesOrHint, hint) {
        const matcherName = "toMatchSnapshot";
        let properties;
        const length = arguments.length;
        if (length === 2 && typeof propertiesOrHint === "string") {
          hint = propertiesOrHint;
        } else if (length >= 2) {
          if (typeof propertiesOrHint !== "object" || propertiesOrHint === null) {
            const options = {
              isNot: this.isNot,
              promise: this.promise
            };
            let printedWithType = (0, _jestMatcherUtils.printWithType)("Expected properties", propertiesOrHint, _printSnapshot.printExpected);
            if (length === 3) {
              options.secondArgument = "hint";
              options.secondArgumentColor = _jestMatcherUtils.BOLD_WEIGHT;
              if (propertiesOrHint == null) {
                printedWithType += "\n\nTo provide a hint without properties: toMatchSnapshot('hint')";
              }
            }
            throw new Error((0, _jestMatcherUtils.matcherErrorMessage)((0, _jestMatcherUtils.matcherHint)(matcherName, void 0, _printSnapshot.PROPERTIES_ARG, options), `Expected ${(0, _jestMatcherUtils.EXPECTED_COLOR)("properties")} must be an object`, printedWithType));
          }
          properties = propertiesOrHint;
        }
        return _toMatchSnapshot({
          context: this,
          hint,
          isInline: false,
          matcherName,
          properties,
          received
        });
      };
      exports.toMatchSnapshot = toMatchSnapshot2;
      const toMatchInlineSnapshot2 = function(received, propertiesOrSnapshot, inlineSnapshot) {
        const matcherName = "toMatchInlineSnapshot";
        let properties;
        const length = arguments.length;
        if (length === 2 && typeof propertiesOrSnapshot === "string") {
          inlineSnapshot = propertiesOrSnapshot;
        } else if (length >= 2) {
          const options = {
            isNot: this.isNot,
            promise: this.promise
          };
          if (length === 3) {
            options.secondArgument = _printSnapshot.SNAPSHOT_ARG;
            options.secondArgumentColor = _printSnapshot.noColor;
          }
          if (typeof propertiesOrSnapshot !== "object" || propertiesOrSnapshot === null) {
            throw new Error((0, _jestMatcherUtils.matcherErrorMessage)((0, _jestMatcherUtils.matcherHint)(matcherName, void 0, _printSnapshot.PROPERTIES_ARG, options), `Expected ${(0, _jestMatcherUtils.EXPECTED_COLOR)("properties")} must be an object`, (0, _jestMatcherUtils.printWithType)("Expected properties", propertiesOrSnapshot, _printSnapshot.printExpected)));
          }
          if (length === 3 && typeof inlineSnapshot !== "string") {
            throw new Error((0, _jestMatcherUtils.matcherErrorMessage)((0, _jestMatcherUtils.matcherHint)(matcherName, void 0, _printSnapshot.PROPERTIES_ARG, options), "Inline snapshot must be a string", (0, _jestMatcherUtils.printWithType)("Inline snapshot", inlineSnapshot, _utils.serialize)));
          }
          properties = propertiesOrSnapshot;
        }
        return _toMatchSnapshot({
          context: this,
          inlineSnapshot: inlineSnapshot === void 0 ? void 0 : stripAddedIndentation(inlineSnapshot),
          isInline: true,
          matcherName,
          properties,
          received
        });
      };
      exports.toMatchInlineSnapshot = toMatchInlineSnapshot2;
      const _toMatchSnapshot = (config) => {
        var _a;
        const {
          context,
          hint,
          inlineSnapshot,
          isInline,
          matcherName,
          properties
        } = config;
        let {
          received
        } = config;
        const {
          testFailing = false
        } = context;
        if (!testFailing && context.dontThrow) {
          context.dontThrow();
        }
        const {
          currentConcurrentTestName,
          isNot,
          snapshotState
        } = context;
        const currentTestName = (_a = currentConcurrentTestName == null ? void 0 : currentConcurrentTestName()) != null ? _a : context.currentTestName;
        if (isNot) {
          throw new Error((0, _jestMatcherUtils.matcherErrorMessage)((0, _printSnapshot.matcherHintFromConfig)(config, false), NOT_SNAPSHOT_MATCHERS));
        }
        if (snapshotState == null) {
          throw new Error(`${(0, _printSnapshot.matcherHintFromConfig)(config, false)}

Snapshot state must be initialized

${(0, _jestMatcherUtils.printWithType)("Snapshot state", snapshotState, _jestMatcherUtils.stringify)}`);
        }
        const fullTestName = currentTestName && hint ? `${currentTestName}: ${hint}` : currentTestName || "";
        if (typeof properties === "object") {
          if (typeof received !== "object" || received === null) {
            throw new Error((0, _jestMatcherUtils.matcherErrorMessage)((0, _printSnapshot.matcherHintFromConfig)(config, false), `${(0, _jestMatcherUtils.RECEIVED_COLOR)("received")} value must be an object when the matcher has ${(0, _jestMatcherUtils.EXPECTED_COLOR)("properties")}`, (0, _jestMatcherUtils.printWithType)("Received", received, _printSnapshot.printReceived)));
          }
          const propertyPass = context.equals(received, properties, [context.utils.iterableEquality, context.utils.subsetEquality]);
          if (propertyPass) {
            received = (0, _utils.deepMerge)(received, properties);
          } else {
            const key = snapshotState.fail(fullTestName, received);
            const matched = /(\d+)$/.exec(key);
            const count2 = matched === null ? 1 : Number(matched[1]);
            const message2 = () => `${(0, _printSnapshot.matcherHintFromConfig)(config, false)}

${printSnapshotName(currentTestName, hint, count2)}

${(0, _printSnapshot.printPropertiesAndReceived)(properties, received, snapshotState.expand)}`;
            return {
              message: message2,
              name: matcherName,
              pass: false
            };
          }
        }
        const result = snapshotState.match({
          error: context.error,
          inlineSnapshot,
          isInline,
          received,
          testFailing,
          testName: fullTestName
        });
        const {
          actual,
          count,
          expected,
          pass
        } = result;
        if (pass) {
          return {
            message: () => "",
            pass: true
          };
        }
        const message = expected === void 0 ? () => `${(0, _printSnapshot.matcherHintFromConfig)(config, true)}

${printSnapshotName(currentTestName, hint, count)}

New snapshot was ${(0, _jestMatcherUtils.BOLD_WEIGHT)("not written")}. The update flag must be explicitly passed to write a new snapshot.

This is likely because this test is run in a continuous integration (CI) environment in which snapshots are not written by default.

Received:${actual.includes("\n") ? "\n" : " "}${(0, _printSnapshot.bReceivedColor)(actual)}` : () => `${(0, _printSnapshot.matcherHintFromConfig)(config, true)}

${printSnapshotName(currentTestName, hint, count)}

${(0, _printSnapshot.printSnapshotAndReceived)(expected, actual, received, snapshotState.expand, snapshotState.snapshotFormat)}`;
        return {
          actual,
          expected,
          message,
          name: matcherName,
          pass: false
        };
      };
      const toThrowErrorMatchingSnapshot2 = function(received, hint, fromPromise) {
        const matcherName = "toThrowErrorMatchingSnapshot";
        return _toThrowErrorMatchingSnapshot({
          context: this,
          hint,
          isInline: false,
          matcherName,
          received
        }, fromPromise);
      };
      exports.toThrowErrorMatchingSnapshot = toThrowErrorMatchingSnapshot2;
      const toThrowErrorMatchingInlineSnapshot2 = function(received, inlineSnapshot, fromPromise) {
        const matcherName = "toThrowErrorMatchingInlineSnapshot";
        if (inlineSnapshot !== void 0 && typeof inlineSnapshot !== "string") {
          const options = {
            expectedColor: _printSnapshot.noColor,
            isNot: this.isNot,
            promise: this.promise
          };
          throw new Error((0, _jestMatcherUtils.matcherErrorMessage)((0, _jestMatcherUtils.matcherHint)(matcherName, void 0, _printSnapshot.SNAPSHOT_ARG, options), "Inline snapshot must be a string", (0, _jestMatcherUtils.printWithType)("Inline snapshot", inlineSnapshot, _utils.serialize)));
        }
        return _toThrowErrorMatchingSnapshot({
          context: this,
          inlineSnapshot: inlineSnapshot === void 0 ? void 0 : stripAddedIndentation(inlineSnapshot),
          isInline: true,
          matcherName,
          received
        }, fromPromise);
      };
      exports.toThrowErrorMatchingInlineSnapshot = toThrowErrorMatchingInlineSnapshot2;
      const _toThrowErrorMatchingSnapshot = (config, fromPromise) => {
        var _a;
        const {
          context,
          hint,
          inlineSnapshot,
          isInline,
          matcherName,
          received
        } = config;
        (_a = context.dontThrow) == null ? void 0 : _a.call(context);
        const {
          isNot,
          promise
        } = context;
        if (!fromPromise) {
          if (typeof received !== "function") {
            const options = {
              isNot,
              promise
            };
            throw new Error((0, _jestMatcherUtils.matcherErrorMessage)((0, _jestMatcherUtils.matcherHint)(matcherName, void 0, "", options), `${(0, _jestMatcherUtils.RECEIVED_COLOR)("received")} value must be a function`, (0, _jestMatcherUtils.printWithType)("Received", received, _printSnapshot.printReceived)));
          }
        }
        if (isNot) {
          throw new Error((0, _jestMatcherUtils.matcherErrorMessage)((0, _printSnapshot.matcherHintFromConfig)(config, false), NOT_SNAPSHOT_MATCHERS));
        }
        let error;
        if (fromPromise) {
          error = received;
        } else {
          try {
            received();
          } catch (receivedError) {
            error = receivedError;
          }
        }
        if (error === void 0) {
          throw new Error(`${(0, _printSnapshot.matcherHintFromConfig)(config, false)}

${DID_NOT_THROW}`);
        }
        let message = error.message;
        while ("cause" in error) {
          error = error.cause;
          if (_util.types.isNativeError(error) || error instanceof Error) {
            message += `
Cause: ${error.message}`;
          } else {
            if (typeof error === "string") {
              message += `
Cause: ${error}`;
            }
            break;
          }
        }
        return _toMatchSnapshot({
          context,
          hint,
          inlineSnapshot,
          isInline,
          matcherName,
          received: message
        });
      };
    })();
    module.exports = __webpack_exports__;
  })();
});
var cjsModule = /* @__PURE__ */ getDefaultExportFromCjs(build);
const EXTENSION = cjsModule.EXTENSION;
const SnapshotState = cjsModule.SnapshotState;
const addSerializer = cjsModule.addSerializer;
const buildSnapshotResolver = cjsModule.buildSnapshotResolver;
const cleanup = cjsModule.cleanup;
const getSerializers = cjsModule.getSerializers;
const isSnapshotPath = cjsModule.isSnapshotPath;
const toMatchInlineSnapshot = cjsModule.toMatchInlineSnapshot;
const toMatchSnapshot = cjsModule.toMatchSnapshot;
const toThrowErrorMatchingInlineSnapshot = cjsModule.toThrowErrorMatchingInlineSnapshot;
const toThrowErrorMatchingSnapshot = cjsModule.toThrowErrorMatchingSnapshot;
export {EXTENSION, SnapshotState, addSerializer, buildSnapshotResolver, cleanup, getSerializers, isSnapshotPath, toMatchInlineSnapshot, toMatchSnapshot, toThrowErrorMatchingInlineSnapshot, toThrowErrorMatchingSnapshot};
export default null;
