@upstash/workflow 0.2.2 → 0.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/express.js CHANGED
@@ -14484,46 +14484,6 @@ var require_text = __commonJS({
14484
14484
  }
14485
14485
  });
14486
14486
 
14487
- // node_modules/es-errors/index.js
14488
- var require_es_errors = __commonJS({
14489
- "node_modules/es-errors/index.js"(exports2, module2) {
14490
- "use strict";
14491
- module2.exports = Error;
14492
- }
14493
- });
14494
-
14495
- // node_modules/es-errors/eval.js
14496
- var require_eval = __commonJS({
14497
- "node_modules/es-errors/eval.js"(exports2, module2) {
14498
- "use strict";
14499
- module2.exports = EvalError;
14500
- }
14501
- });
14502
-
14503
- // node_modules/es-errors/range.js
14504
- var require_range = __commonJS({
14505
- "node_modules/es-errors/range.js"(exports2, module2) {
14506
- "use strict";
14507
- module2.exports = RangeError;
14508
- }
14509
- });
14510
-
14511
- // node_modules/es-errors/ref.js
14512
- var require_ref = __commonJS({
14513
- "node_modules/es-errors/ref.js"(exports2, module2) {
14514
- "use strict";
14515
- module2.exports = ReferenceError;
14516
- }
14517
- });
14518
-
14519
- // node_modules/es-errors/syntax.js
14520
- var require_syntax = __commonJS({
14521
- "node_modules/es-errors/syntax.js"(exports2, module2) {
14522
- "use strict";
14523
- module2.exports = SyntaxError;
14524
- }
14525
- });
14526
-
14527
14487
  // node_modules/es-errors/type.js
14528
14488
  var require_type = __commonJS({
14529
14489
  "node_modules/es-errors/type.js"(exports2, module2) {
@@ -14532,1369 +14492,1536 @@ var require_type = __commonJS({
14532
14492
  }
14533
14493
  });
14534
14494
 
14535
- // node_modules/es-errors/uri.js
14536
- var require_uri = __commonJS({
14537
- "node_modules/es-errors/uri.js"(exports2, module2) {
14495
+ // node_modules/object-inspect/util.inspect.js
14496
+ var require_util_inspect = __commonJS({
14497
+ "node_modules/object-inspect/util.inspect.js"(exports2, module2) {
14538
14498
  "use strict";
14539
- module2.exports = URIError;
14499
+ module2.exports = require("util").inspect;
14540
14500
  }
14541
14501
  });
14542
14502
 
14543
- // node_modules/has-symbols/shams.js
14544
- var require_shams = __commonJS({
14545
- "node_modules/has-symbols/shams.js"(exports2, module2) {
14503
+ // node_modules/object-inspect/index.js
14504
+ var require_object_inspect = __commonJS({
14505
+ "node_modules/object-inspect/index.js"(exports2, module2) {
14546
14506
  "use strict";
14547
- module2.exports = function hasSymbols() {
14548
- if (typeof Symbol !== "function" || typeof Object.getOwnPropertySymbols !== "function") {
14549
- return false;
14507
+ var hasMap = typeof Map === "function" && Map.prototype;
14508
+ var mapSizeDescriptor = Object.getOwnPropertyDescriptor && hasMap ? Object.getOwnPropertyDescriptor(Map.prototype, "size") : null;
14509
+ var mapSize = hasMap && mapSizeDescriptor && typeof mapSizeDescriptor.get === "function" ? mapSizeDescriptor.get : null;
14510
+ var mapForEach = hasMap && Map.prototype.forEach;
14511
+ var hasSet = typeof Set === "function" && Set.prototype;
14512
+ var setSizeDescriptor = Object.getOwnPropertyDescriptor && hasSet ? Object.getOwnPropertyDescriptor(Set.prototype, "size") : null;
14513
+ var setSize = hasSet && setSizeDescriptor && typeof setSizeDescriptor.get === "function" ? setSizeDescriptor.get : null;
14514
+ var setForEach = hasSet && Set.prototype.forEach;
14515
+ var hasWeakMap = typeof WeakMap === "function" && WeakMap.prototype;
14516
+ var weakMapHas = hasWeakMap ? WeakMap.prototype.has : null;
14517
+ var hasWeakSet = typeof WeakSet === "function" && WeakSet.prototype;
14518
+ var weakSetHas = hasWeakSet ? WeakSet.prototype.has : null;
14519
+ var hasWeakRef = typeof WeakRef === "function" && WeakRef.prototype;
14520
+ var weakRefDeref = hasWeakRef ? WeakRef.prototype.deref : null;
14521
+ var booleanValueOf = Boolean.prototype.valueOf;
14522
+ var objectToString = Object.prototype.toString;
14523
+ var functionToString = Function.prototype.toString;
14524
+ var $match = String.prototype.match;
14525
+ var $slice = String.prototype.slice;
14526
+ var $replace = String.prototype.replace;
14527
+ var $toUpperCase = String.prototype.toUpperCase;
14528
+ var $toLowerCase = String.prototype.toLowerCase;
14529
+ var $test = RegExp.prototype.test;
14530
+ var $concat = Array.prototype.concat;
14531
+ var $join = Array.prototype.join;
14532
+ var $arrSlice = Array.prototype.slice;
14533
+ var $floor = Math.floor;
14534
+ var bigIntValueOf = typeof BigInt === "function" ? BigInt.prototype.valueOf : null;
14535
+ var gOPS = Object.getOwnPropertySymbols;
14536
+ var symToString = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? Symbol.prototype.toString : null;
14537
+ var hasShammedSymbols = typeof Symbol === "function" && typeof Symbol.iterator === "object";
14538
+ var toStringTag = typeof Symbol === "function" && Symbol.toStringTag && (typeof Symbol.toStringTag === hasShammedSymbols ? "object" : "symbol") ? Symbol.toStringTag : null;
14539
+ var isEnumerable = Object.prototype.propertyIsEnumerable;
14540
+ var gPO = (typeof Reflect === "function" ? Reflect.getPrototypeOf : Object.getPrototypeOf) || ([].__proto__ === Array.prototype ? function(O) {
14541
+ return O.__proto__;
14542
+ } : null);
14543
+ function addNumericSeparator(num, str) {
14544
+ if (num === Infinity || num === -Infinity || num !== num || num && num > -1e3 && num < 1e3 || $test.call(/e/, str)) {
14545
+ return str;
14550
14546
  }
14551
- if (typeof Symbol.iterator === "symbol") {
14552
- return true;
14547
+ var sepRegex = /[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;
14548
+ if (typeof num === "number") {
14549
+ var int = num < 0 ? -$floor(-num) : $floor(num);
14550
+ if (int !== num) {
14551
+ var intStr = String(int);
14552
+ var dec = $slice.call(str, intStr.length + 1);
14553
+ return $replace.call(intStr, sepRegex, "$&_") + "." + $replace.call($replace.call(dec, /([0-9]{3})/g, "$&_"), /_$/, "");
14554
+ }
14553
14555
  }
14554
- var obj = {};
14555
- var sym = Symbol("test");
14556
- var symObj = Object(sym);
14557
- if (typeof sym === "string") {
14558
- return false;
14556
+ return $replace.call(str, sepRegex, "$&_");
14557
+ }
14558
+ var utilInspect = require_util_inspect();
14559
+ var inspectCustom = utilInspect.custom;
14560
+ var inspectSymbol = isSymbol(inspectCustom) ? inspectCustom : null;
14561
+ var quotes = {
14562
+ __proto__: null,
14563
+ "double": '"',
14564
+ single: "'"
14565
+ };
14566
+ var quoteREs = {
14567
+ __proto__: null,
14568
+ "double": /(["\\])/g,
14569
+ single: /(['\\])/g
14570
+ };
14571
+ module2.exports = function inspect_(obj, options, depth, seen) {
14572
+ var opts = options || {};
14573
+ if (has(opts, "quoteStyle") && !has(quotes, opts.quoteStyle)) {
14574
+ throw new TypeError('option "quoteStyle" must be "single" or "double"');
14559
14575
  }
14560
- if (Object.prototype.toString.call(sym) !== "[object Symbol]") {
14561
- return false;
14576
+ if (has(opts, "maxStringLength") && (typeof opts.maxStringLength === "number" ? opts.maxStringLength < 0 && opts.maxStringLength !== Infinity : opts.maxStringLength !== null)) {
14577
+ throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');
14562
14578
  }
14563
- if (Object.prototype.toString.call(symObj) !== "[object Symbol]") {
14564
- return false;
14579
+ var customInspect = has(opts, "customInspect") ? opts.customInspect : true;
14580
+ if (typeof customInspect !== "boolean" && customInspect !== "symbol") {
14581
+ throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");
14565
14582
  }
14566
- var symVal = 42;
14567
- obj[sym] = symVal;
14568
- for (sym in obj) {
14569
- return false;
14583
+ if (has(opts, "indent") && opts.indent !== null && opts.indent !== " " && !(parseInt(opts.indent, 10) === opts.indent && opts.indent > 0)) {
14584
+ throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');
14570
14585
  }
14571
- if (typeof Object.keys === "function" && Object.keys(obj).length !== 0) {
14572
- return false;
14586
+ if (has(opts, "numericSeparator") && typeof opts.numericSeparator !== "boolean") {
14587
+ throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');
14573
14588
  }
14574
- if (typeof Object.getOwnPropertyNames === "function" && Object.getOwnPropertyNames(obj).length !== 0) {
14575
- return false;
14589
+ var numericSeparator = opts.numericSeparator;
14590
+ if (typeof obj === "undefined") {
14591
+ return "undefined";
14576
14592
  }
14577
- var syms = Object.getOwnPropertySymbols(obj);
14578
- if (syms.length !== 1 || syms[0] !== sym) {
14579
- return false;
14593
+ if (obj === null) {
14594
+ return "null";
14580
14595
  }
14581
- if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) {
14582
- return false;
14596
+ if (typeof obj === "boolean") {
14597
+ return obj ? "true" : "false";
14583
14598
  }
14584
- if (typeof Object.getOwnPropertyDescriptor === "function") {
14585
- var descriptor = Object.getOwnPropertyDescriptor(obj, sym);
14586
- if (descriptor.value !== symVal || descriptor.enumerable !== true) {
14587
- return false;
14599
+ if (typeof obj === "string") {
14600
+ return inspectString(obj, opts);
14601
+ }
14602
+ if (typeof obj === "number") {
14603
+ if (obj === 0) {
14604
+ return Infinity / obj > 0 ? "0" : "-0";
14588
14605
  }
14606
+ var str = String(obj);
14607
+ return numericSeparator ? addNumericSeparator(obj, str) : str;
14589
14608
  }
14590
- return true;
14591
- };
14592
- }
14593
- });
14594
-
14595
- // node_modules/has-symbols/index.js
14596
- var require_has_symbols = __commonJS({
14597
- "node_modules/has-symbols/index.js"(exports2, module2) {
14598
- "use strict";
14599
- var origSymbol = typeof Symbol !== "undefined" && Symbol;
14600
- var hasSymbolSham = require_shams();
14601
- module2.exports = function hasNativeSymbols() {
14602
- if (typeof origSymbol !== "function") {
14603
- return false;
14609
+ if (typeof obj === "bigint") {
14610
+ var bigIntStr = String(obj) + "n";
14611
+ return numericSeparator ? addNumericSeparator(obj, bigIntStr) : bigIntStr;
14604
14612
  }
14605
- if (typeof Symbol !== "function") {
14606
- return false;
14613
+ var maxDepth = typeof opts.depth === "undefined" ? 5 : opts.depth;
14614
+ if (typeof depth === "undefined") {
14615
+ depth = 0;
14607
14616
  }
14608
- if (typeof origSymbol("foo") !== "symbol") {
14609
- return false;
14617
+ if (depth >= maxDepth && maxDepth > 0 && typeof obj === "object") {
14618
+ return isArray(obj) ? "[Array]" : "[Object]";
14610
14619
  }
14611
- if (typeof Symbol("bar") !== "symbol") {
14612
- return false;
14620
+ var indent = getIndent(opts, depth);
14621
+ if (typeof seen === "undefined") {
14622
+ seen = [];
14623
+ } else if (indexOf(seen, obj) >= 0) {
14624
+ return "[Circular]";
14613
14625
  }
14614
- return hasSymbolSham();
14615
- };
14616
- }
14617
- });
14618
-
14619
- // node_modules/has-proto/index.js
14620
- var require_has_proto = __commonJS({
14621
- "node_modules/has-proto/index.js"(exports2, module2) {
14622
- "use strict";
14623
- var test = {
14624
- __proto__: null,
14625
- foo: {}
14626
- };
14627
- var $Object = Object;
14628
- module2.exports = function hasProto() {
14629
- return { __proto__: test }.foo === test.foo && !(test instanceof $Object);
14630
- };
14631
- }
14632
- });
14633
-
14634
- // node_modules/function-bind/implementation.js
14635
- var require_implementation = __commonJS({
14636
- "node_modules/function-bind/implementation.js"(exports2, module2) {
14637
- "use strict";
14638
- var ERROR_MESSAGE = "Function.prototype.bind called on incompatible ";
14639
- var toStr = Object.prototype.toString;
14640
- var max = Math.max;
14641
- var funcType = "[object Function]";
14642
- var concatty = function concatty2(a, b) {
14643
- var arr = [];
14644
- for (var i = 0; i < a.length; i += 1) {
14645
- arr[i] = a[i];
14626
+ function inspect(value, from, noIndent) {
14627
+ if (from) {
14628
+ seen = $arrSlice.call(seen);
14629
+ seen.push(from);
14630
+ }
14631
+ if (noIndent) {
14632
+ var newOpts = {
14633
+ depth: opts.depth
14634
+ };
14635
+ if (has(opts, "quoteStyle")) {
14636
+ newOpts.quoteStyle = opts.quoteStyle;
14637
+ }
14638
+ return inspect_(value, newOpts, depth + 1, seen);
14639
+ }
14640
+ return inspect_(value, opts, depth + 1, seen);
14646
14641
  }
14647
- for (var j = 0; j < b.length; j += 1) {
14648
- arr[j + a.length] = b[j];
14642
+ if (typeof obj === "function" && !isRegExp(obj)) {
14643
+ var name = nameOf(obj);
14644
+ var keys = arrObjKeys(obj, inspect);
14645
+ return "[Function" + (name ? ": " + name : " (anonymous)") + "]" + (keys.length > 0 ? " { " + $join.call(keys, ", ") + " }" : "");
14649
14646
  }
14650
- return arr;
14651
- };
14652
- var slicy = function slicy2(arrLike, offset) {
14653
- var arr = [];
14654
- for (var i = offset || 0, j = 0; i < arrLike.length; i += 1, j += 1) {
14655
- arr[j] = arrLike[i];
14647
+ if (isSymbol(obj)) {
14648
+ var symString = hasShammedSymbols ? $replace.call(String(obj), /^(Symbol\(.*\))_[^)]*$/, "$1") : symToString.call(obj);
14649
+ return typeof obj === "object" && !hasShammedSymbols ? markBoxed(symString) : symString;
14656
14650
  }
14657
- return arr;
14658
- };
14659
- var joiny = function(arr, joiner) {
14660
- var str = "";
14661
- for (var i = 0; i < arr.length; i += 1) {
14662
- str += arr[i];
14663
- if (i + 1 < arr.length) {
14664
- str += joiner;
14651
+ if (isElement(obj)) {
14652
+ var s = "<" + $toLowerCase.call(String(obj.nodeName));
14653
+ var attrs = obj.attributes || [];
14654
+ for (var i = 0; i < attrs.length; i++) {
14655
+ s += " " + attrs[i].name + "=" + wrapQuotes(quote(attrs[i].value), "double", opts);
14656
+ }
14657
+ s += ">";
14658
+ if (obj.childNodes && obj.childNodes.length) {
14659
+ s += "...";
14665
14660
  }
14661
+ s += "</" + $toLowerCase.call(String(obj.nodeName)) + ">";
14662
+ return s;
14666
14663
  }
14667
- return str;
14668
- };
14669
- module2.exports = function bind(that) {
14670
- var target = this;
14671
- if (typeof target !== "function" || toStr.apply(target) !== funcType) {
14672
- throw new TypeError(ERROR_MESSAGE + target);
14664
+ if (isArray(obj)) {
14665
+ if (obj.length === 0) {
14666
+ return "[]";
14667
+ }
14668
+ var xs = arrObjKeys(obj, inspect);
14669
+ if (indent && !singleLineValues(xs)) {
14670
+ return "[" + indentedJoin(xs, indent) + "]";
14671
+ }
14672
+ return "[ " + $join.call(xs, ", ") + " ]";
14673
14673
  }
14674
- var args = slicy(arguments, 1);
14675
- var bound;
14676
- var binder = function() {
14677
- if (this instanceof bound) {
14678
- var result = target.apply(
14679
- this,
14680
- concatty(args, arguments)
14681
- );
14682
- if (Object(result) === result) {
14683
- return result;
14684
- }
14685
- return this;
14674
+ if (isError(obj)) {
14675
+ var parts = arrObjKeys(obj, inspect);
14676
+ if (!("cause" in Error.prototype) && "cause" in obj && !isEnumerable.call(obj, "cause")) {
14677
+ return "{ [" + String(obj) + "] " + $join.call($concat.call("[cause]: " + inspect(obj.cause), parts), ", ") + " }";
14686
14678
  }
14687
- return target.apply(
14688
- that,
14689
- concatty(args, arguments)
14690
- );
14691
- };
14692
- var boundLength = max(0, target.length - args.length);
14693
- var boundArgs = [];
14694
- for (var i = 0; i < boundLength; i++) {
14695
- boundArgs[i] = "$" + i;
14679
+ if (parts.length === 0) {
14680
+ return "[" + String(obj) + "]";
14681
+ }
14682
+ return "{ [" + String(obj) + "] " + $join.call(parts, ", ") + " }";
14696
14683
  }
14697
- bound = Function("binder", "return function (" + joiny(boundArgs, ",") + "){ return binder.apply(this,arguments); }")(binder);
14698
- if (target.prototype) {
14699
- var Empty = function Empty2() {
14700
- };
14701
- Empty.prototype = target.prototype;
14702
- bound.prototype = new Empty();
14703
- Empty.prototype = null;
14684
+ if (typeof obj === "object" && customInspect) {
14685
+ if (inspectSymbol && typeof obj[inspectSymbol] === "function" && utilInspect) {
14686
+ return utilInspect(obj, { depth: maxDepth - depth });
14687
+ } else if (customInspect !== "symbol" && typeof obj.inspect === "function") {
14688
+ return obj.inspect();
14689
+ }
14704
14690
  }
14705
- return bound;
14691
+ if (isMap(obj)) {
14692
+ var mapParts = [];
14693
+ if (mapForEach) {
14694
+ mapForEach.call(obj, function(value, key) {
14695
+ mapParts.push(inspect(key, obj, true) + " => " + inspect(value, obj));
14696
+ });
14697
+ }
14698
+ return collectionOf("Map", mapSize.call(obj), mapParts, indent);
14699
+ }
14700
+ if (isSet(obj)) {
14701
+ var setParts = [];
14702
+ if (setForEach) {
14703
+ setForEach.call(obj, function(value) {
14704
+ setParts.push(inspect(value, obj));
14705
+ });
14706
+ }
14707
+ return collectionOf("Set", setSize.call(obj), setParts, indent);
14708
+ }
14709
+ if (isWeakMap(obj)) {
14710
+ return weakCollectionOf("WeakMap");
14711
+ }
14712
+ if (isWeakSet(obj)) {
14713
+ return weakCollectionOf("WeakSet");
14714
+ }
14715
+ if (isWeakRef(obj)) {
14716
+ return weakCollectionOf("WeakRef");
14717
+ }
14718
+ if (isNumber(obj)) {
14719
+ return markBoxed(inspect(Number(obj)));
14720
+ }
14721
+ if (isBigInt(obj)) {
14722
+ return markBoxed(inspect(bigIntValueOf.call(obj)));
14723
+ }
14724
+ if (isBoolean(obj)) {
14725
+ return markBoxed(booleanValueOf.call(obj));
14726
+ }
14727
+ if (isString(obj)) {
14728
+ return markBoxed(inspect(String(obj)));
14729
+ }
14730
+ if (typeof window !== "undefined" && obj === window) {
14731
+ return "{ [object Window] }";
14732
+ }
14733
+ if (typeof globalThis !== "undefined" && obj === globalThis || typeof global !== "undefined" && obj === global) {
14734
+ return "{ [object globalThis] }";
14735
+ }
14736
+ if (!isDate(obj) && !isRegExp(obj)) {
14737
+ var ys = arrObjKeys(obj, inspect);
14738
+ var isPlainObject = gPO ? gPO(obj) === Object.prototype : obj instanceof Object || obj.constructor === Object;
14739
+ var protoTag = obj instanceof Object ? "" : "null prototype";
14740
+ var stringTag = !isPlainObject && toStringTag && Object(obj) === obj && toStringTag in obj ? $slice.call(toStr(obj), 8, -1) : protoTag ? "Object" : "";
14741
+ var constructorTag = isPlainObject || typeof obj.constructor !== "function" ? "" : obj.constructor.name ? obj.constructor.name + " " : "";
14742
+ var tag = constructorTag + (stringTag || protoTag ? "[" + $join.call($concat.call([], stringTag || [], protoTag || []), ": ") + "] " : "");
14743
+ if (ys.length === 0) {
14744
+ return tag + "{}";
14745
+ }
14746
+ if (indent) {
14747
+ return tag + "{" + indentedJoin(ys, indent) + "}";
14748
+ }
14749
+ return tag + "{ " + $join.call(ys, ", ") + " }";
14750
+ }
14751
+ return String(obj);
14706
14752
  };
14707
- }
14708
- });
14709
-
14710
- // node_modules/function-bind/index.js
14711
- var require_function_bind = __commonJS({
14712
- "node_modules/function-bind/index.js"(exports2, module2) {
14713
- "use strict";
14714
- var implementation = require_implementation();
14715
- module2.exports = Function.prototype.bind || implementation;
14716
- }
14717
- });
14718
-
14719
- // node_modules/hasown/index.js
14720
- var require_hasown = __commonJS({
14721
- "node_modules/hasown/index.js"(exports2, module2) {
14722
- "use strict";
14723
- var call = Function.prototype.call;
14724
- var $hasOwn = Object.prototype.hasOwnProperty;
14725
- var bind = require_function_bind();
14726
- module2.exports = bind.call(call, $hasOwn);
14727
- }
14728
- });
14729
-
14730
- // node_modules/get-intrinsic/index.js
14731
- var require_get_intrinsic = __commonJS({
14732
- "node_modules/get-intrinsic/index.js"(exports2, module2) {
14733
- "use strict";
14734
- var undefined2;
14735
- var $Error = require_es_errors();
14736
- var $EvalError = require_eval();
14737
- var $RangeError = require_range();
14738
- var $ReferenceError = require_ref();
14739
- var $SyntaxError = require_syntax();
14740
- var $TypeError = require_type();
14741
- var $URIError = require_uri();
14742
- var $Function = Function;
14743
- var getEvalledConstructor = function(expressionSyntax) {
14753
+ function wrapQuotes(s, defaultStyle, opts) {
14754
+ var style = opts.quoteStyle || defaultStyle;
14755
+ var quoteChar = quotes[style];
14756
+ return quoteChar + s + quoteChar;
14757
+ }
14758
+ function quote(s) {
14759
+ return $replace.call(String(s), /"/g, "&quot;");
14760
+ }
14761
+ function isArray(obj) {
14762
+ return toStr(obj) === "[object Array]" && (!toStringTag || !(typeof obj === "object" && toStringTag in obj));
14763
+ }
14764
+ function isDate(obj) {
14765
+ return toStr(obj) === "[object Date]" && (!toStringTag || !(typeof obj === "object" && toStringTag in obj));
14766
+ }
14767
+ function isRegExp(obj) {
14768
+ return toStr(obj) === "[object RegExp]" && (!toStringTag || !(typeof obj === "object" && toStringTag in obj));
14769
+ }
14770
+ function isError(obj) {
14771
+ return toStr(obj) === "[object Error]" && (!toStringTag || !(typeof obj === "object" && toStringTag in obj));
14772
+ }
14773
+ function isString(obj) {
14774
+ return toStr(obj) === "[object String]" && (!toStringTag || !(typeof obj === "object" && toStringTag in obj));
14775
+ }
14776
+ function isNumber(obj) {
14777
+ return toStr(obj) === "[object Number]" && (!toStringTag || !(typeof obj === "object" && toStringTag in obj));
14778
+ }
14779
+ function isBoolean(obj) {
14780
+ return toStr(obj) === "[object Boolean]" && (!toStringTag || !(typeof obj === "object" && toStringTag in obj));
14781
+ }
14782
+ function isSymbol(obj) {
14783
+ if (hasShammedSymbols) {
14784
+ return obj && typeof obj === "object" && obj instanceof Symbol;
14785
+ }
14786
+ if (typeof obj === "symbol") {
14787
+ return true;
14788
+ }
14789
+ if (!obj || typeof obj !== "object" || !symToString) {
14790
+ return false;
14791
+ }
14744
14792
  try {
14745
- return $Function('"use strict"; return (' + expressionSyntax + ").constructor;")();
14793
+ symToString.call(obj);
14794
+ return true;
14746
14795
  } catch (e) {
14747
14796
  }
14748
- };
14749
- var $gOPD = Object.getOwnPropertyDescriptor;
14750
- if ($gOPD) {
14797
+ return false;
14798
+ }
14799
+ function isBigInt(obj) {
14800
+ if (!obj || typeof obj !== "object" || !bigIntValueOf) {
14801
+ return false;
14802
+ }
14751
14803
  try {
14752
- $gOPD({}, "");
14804
+ bigIntValueOf.call(obj);
14805
+ return true;
14753
14806
  } catch (e) {
14754
- $gOPD = null;
14755
14807
  }
14808
+ return false;
14756
14809
  }
14757
- var throwTypeError = function() {
14758
- throw new $TypeError();
14810
+ var hasOwn = Object.prototype.hasOwnProperty || function(key) {
14811
+ return key in this;
14759
14812
  };
14760
- var ThrowTypeError = $gOPD ? function() {
14761
- try {
14762
- arguments.callee;
14763
- return throwTypeError;
14764
- } catch (calleeThrows) {
14765
- try {
14766
- return $gOPD(arguments, "callee").get;
14767
- } catch (gOPDthrows) {
14768
- return throwTypeError;
14769
- }
14770
- }
14771
- }() : throwTypeError;
14772
- var hasSymbols = require_has_symbols()();
14773
- var hasProto = require_has_proto()();
14774
- var getProto = Object.getPrototypeOf || (hasProto ? function(x) {
14775
- return x.__proto__;
14776
- } : null);
14777
- var needsEval = {};
14778
- var TypedArray = typeof Uint8Array === "undefined" || !getProto ? undefined2 : getProto(Uint8Array);
14779
- var INTRINSICS = {
14780
- __proto__: null,
14781
- "%AggregateError%": typeof AggregateError === "undefined" ? undefined2 : AggregateError,
14782
- "%Array%": Array,
14783
- "%ArrayBuffer%": typeof ArrayBuffer === "undefined" ? undefined2 : ArrayBuffer,
14784
- "%ArrayIteratorPrototype%": hasSymbols && getProto ? getProto([][Symbol.iterator]()) : undefined2,
14785
- "%AsyncFromSyncIteratorPrototype%": undefined2,
14786
- "%AsyncFunction%": needsEval,
14787
- "%AsyncGenerator%": needsEval,
14788
- "%AsyncGeneratorFunction%": needsEval,
14789
- "%AsyncIteratorPrototype%": needsEval,
14790
- "%Atomics%": typeof Atomics === "undefined" ? undefined2 : Atomics,
14791
- "%BigInt%": typeof BigInt === "undefined" ? undefined2 : BigInt,
14792
- "%BigInt64Array%": typeof BigInt64Array === "undefined" ? undefined2 : BigInt64Array,
14793
- "%BigUint64Array%": typeof BigUint64Array === "undefined" ? undefined2 : BigUint64Array,
14794
- "%Boolean%": Boolean,
14795
- "%DataView%": typeof DataView === "undefined" ? undefined2 : DataView,
14796
- "%Date%": Date,
14797
- "%decodeURI%": decodeURI,
14798
- "%decodeURIComponent%": decodeURIComponent,
14799
- "%encodeURI%": encodeURI,
14800
- "%encodeURIComponent%": encodeURIComponent,
14801
- "%Error%": $Error,
14802
- "%eval%": eval,
14803
- // eslint-disable-line no-eval
14804
- "%EvalError%": $EvalError,
14805
- "%Float32Array%": typeof Float32Array === "undefined" ? undefined2 : Float32Array,
14806
- "%Float64Array%": typeof Float64Array === "undefined" ? undefined2 : Float64Array,
14807
- "%FinalizationRegistry%": typeof FinalizationRegistry === "undefined" ? undefined2 : FinalizationRegistry,
14808
- "%Function%": $Function,
14809
- "%GeneratorFunction%": needsEval,
14810
- "%Int8Array%": typeof Int8Array === "undefined" ? undefined2 : Int8Array,
14811
- "%Int16Array%": typeof Int16Array === "undefined" ? undefined2 : Int16Array,
14812
- "%Int32Array%": typeof Int32Array === "undefined" ? undefined2 : Int32Array,
14813
- "%isFinite%": isFinite,
14814
- "%isNaN%": isNaN,
14815
- "%IteratorPrototype%": hasSymbols && getProto ? getProto(getProto([][Symbol.iterator]())) : undefined2,
14816
- "%JSON%": typeof JSON === "object" ? JSON : undefined2,
14817
- "%Map%": typeof Map === "undefined" ? undefined2 : Map,
14818
- "%MapIteratorPrototype%": typeof Map === "undefined" || !hasSymbols || !getProto ? undefined2 : getProto((/* @__PURE__ */ new Map())[Symbol.iterator]()),
14819
- "%Math%": Math,
14820
- "%Number%": Number,
14821
- "%Object%": Object,
14822
- "%parseFloat%": parseFloat,
14823
- "%parseInt%": parseInt,
14824
- "%Promise%": typeof Promise === "undefined" ? undefined2 : Promise,
14825
- "%Proxy%": typeof Proxy === "undefined" ? undefined2 : Proxy,
14826
- "%RangeError%": $RangeError,
14827
- "%ReferenceError%": $ReferenceError,
14828
- "%Reflect%": typeof Reflect === "undefined" ? undefined2 : Reflect,
14829
- "%RegExp%": RegExp,
14830
- "%Set%": typeof Set === "undefined" ? undefined2 : Set,
14831
- "%SetIteratorPrototype%": typeof Set === "undefined" || !hasSymbols || !getProto ? undefined2 : getProto((/* @__PURE__ */ new Set())[Symbol.iterator]()),
14832
- "%SharedArrayBuffer%": typeof SharedArrayBuffer === "undefined" ? undefined2 : SharedArrayBuffer,
14833
- "%String%": String,
14834
- "%StringIteratorPrototype%": hasSymbols && getProto ? getProto(""[Symbol.iterator]()) : undefined2,
14835
- "%Symbol%": hasSymbols ? Symbol : undefined2,
14836
- "%SyntaxError%": $SyntaxError,
14837
- "%ThrowTypeError%": ThrowTypeError,
14838
- "%TypedArray%": TypedArray,
14839
- "%TypeError%": $TypeError,
14840
- "%Uint8Array%": typeof Uint8Array === "undefined" ? undefined2 : Uint8Array,
14841
- "%Uint8ClampedArray%": typeof Uint8ClampedArray === "undefined" ? undefined2 : Uint8ClampedArray,
14842
- "%Uint16Array%": typeof Uint16Array === "undefined" ? undefined2 : Uint16Array,
14843
- "%Uint32Array%": typeof Uint32Array === "undefined" ? undefined2 : Uint32Array,
14844
- "%URIError%": $URIError,
14845
- "%WeakMap%": typeof WeakMap === "undefined" ? undefined2 : WeakMap,
14846
- "%WeakRef%": typeof WeakRef === "undefined" ? undefined2 : WeakRef,
14847
- "%WeakSet%": typeof WeakSet === "undefined" ? undefined2 : WeakSet
14848
- };
14849
- if (getProto) {
14850
- try {
14851
- null.error;
14852
- } catch (e) {
14853
- errorProto = getProto(getProto(e));
14854
- INTRINSICS["%Error.prototype%"] = errorProto;
14855
- }
14813
+ function has(obj, key) {
14814
+ return hasOwn.call(obj, key);
14856
14815
  }
14857
- var errorProto;
14858
- var doEval = function doEval2(name) {
14859
- var value;
14860
- if (name === "%AsyncFunction%") {
14861
- value = getEvalledConstructor("async function () {}");
14862
- } else if (name === "%GeneratorFunction%") {
14863
- value = getEvalledConstructor("function* () {}");
14864
- } else if (name === "%AsyncGeneratorFunction%") {
14865
- value = getEvalledConstructor("async function* () {}");
14866
- } else if (name === "%AsyncGenerator%") {
14867
- var fn = doEval2("%AsyncGeneratorFunction%");
14868
- if (fn) {
14869
- value = fn.prototype;
14870
- }
14871
- } else if (name === "%AsyncIteratorPrototype%") {
14872
- var gen = doEval2("%AsyncGenerator%");
14873
- if (gen && getProto) {
14874
- value = getProto(gen.prototype);
14875
- }
14876
- }
14877
- INTRINSICS[name] = value;
14878
- return value;
14879
- };
14880
- var LEGACY_ALIASES = {
14881
- __proto__: null,
14882
- "%ArrayBufferPrototype%": ["ArrayBuffer", "prototype"],
14883
- "%ArrayPrototype%": ["Array", "prototype"],
14884
- "%ArrayProto_entries%": ["Array", "prototype", "entries"],
14885
- "%ArrayProto_forEach%": ["Array", "prototype", "forEach"],
14886
- "%ArrayProto_keys%": ["Array", "prototype", "keys"],
14887
- "%ArrayProto_values%": ["Array", "prototype", "values"],
14888
- "%AsyncFunctionPrototype%": ["AsyncFunction", "prototype"],
14889
- "%AsyncGenerator%": ["AsyncGeneratorFunction", "prototype"],
14890
- "%AsyncGeneratorPrototype%": ["AsyncGeneratorFunction", "prototype", "prototype"],
14891
- "%BooleanPrototype%": ["Boolean", "prototype"],
14892
- "%DataViewPrototype%": ["DataView", "prototype"],
14893
- "%DatePrototype%": ["Date", "prototype"],
14894
- "%ErrorPrototype%": ["Error", "prototype"],
14895
- "%EvalErrorPrototype%": ["EvalError", "prototype"],
14896
- "%Float32ArrayPrototype%": ["Float32Array", "prototype"],
14897
- "%Float64ArrayPrototype%": ["Float64Array", "prototype"],
14898
- "%FunctionPrototype%": ["Function", "prototype"],
14899
- "%Generator%": ["GeneratorFunction", "prototype"],
14900
- "%GeneratorPrototype%": ["GeneratorFunction", "prototype", "prototype"],
14901
- "%Int8ArrayPrototype%": ["Int8Array", "prototype"],
14902
- "%Int16ArrayPrototype%": ["Int16Array", "prototype"],
14903
- "%Int32ArrayPrototype%": ["Int32Array", "prototype"],
14904
- "%JSONParse%": ["JSON", "parse"],
14905
- "%JSONStringify%": ["JSON", "stringify"],
14906
- "%MapPrototype%": ["Map", "prototype"],
14907
- "%NumberPrototype%": ["Number", "prototype"],
14908
- "%ObjectPrototype%": ["Object", "prototype"],
14909
- "%ObjProto_toString%": ["Object", "prototype", "toString"],
14910
- "%ObjProto_valueOf%": ["Object", "prototype", "valueOf"],
14911
- "%PromisePrototype%": ["Promise", "prototype"],
14912
- "%PromiseProto_then%": ["Promise", "prototype", "then"],
14913
- "%Promise_all%": ["Promise", "all"],
14914
- "%Promise_reject%": ["Promise", "reject"],
14915
- "%Promise_resolve%": ["Promise", "resolve"],
14916
- "%RangeErrorPrototype%": ["RangeError", "prototype"],
14917
- "%ReferenceErrorPrototype%": ["ReferenceError", "prototype"],
14918
- "%RegExpPrototype%": ["RegExp", "prototype"],
14919
- "%SetPrototype%": ["Set", "prototype"],
14920
- "%SharedArrayBufferPrototype%": ["SharedArrayBuffer", "prototype"],
14921
- "%StringPrototype%": ["String", "prototype"],
14922
- "%SymbolPrototype%": ["Symbol", "prototype"],
14923
- "%SyntaxErrorPrototype%": ["SyntaxError", "prototype"],
14924
- "%TypedArrayPrototype%": ["TypedArray", "prototype"],
14925
- "%TypeErrorPrototype%": ["TypeError", "prototype"],
14926
- "%Uint8ArrayPrototype%": ["Uint8Array", "prototype"],
14927
- "%Uint8ClampedArrayPrototype%": ["Uint8ClampedArray", "prototype"],
14928
- "%Uint16ArrayPrototype%": ["Uint16Array", "prototype"],
14929
- "%Uint32ArrayPrototype%": ["Uint32Array", "prototype"],
14930
- "%URIErrorPrototype%": ["URIError", "prototype"],
14931
- "%WeakMapPrototype%": ["WeakMap", "prototype"],
14932
- "%WeakSetPrototype%": ["WeakSet", "prototype"]
14933
- };
14934
- var bind = require_function_bind();
14935
- var hasOwn = require_hasown();
14936
- var $concat = bind.call(Function.call, Array.prototype.concat);
14937
- var $spliceApply = bind.call(Function.apply, Array.prototype.splice);
14938
- var $replace = bind.call(Function.call, String.prototype.replace);
14939
- var $strSlice = bind.call(Function.call, String.prototype.slice);
14940
- var $exec = bind.call(Function.call, RegExp.prototype.exec);
14941
- var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g;
14942
- var reEscapeChar = /\\(\\)?/g;
14943
- var stringToPath = function stringToPath2(string) {
14944
- var first = $strSlice(string, 0, 1);
14945
- var last = $strSlice(string, -1);
14946
- if (first === "%" && last !== "%") {
14947
- throw new $SyntaxError("invalid intrinsic syntax, expected closing `%`");
14948
- } else if (last === "%" && first !== "%") {
14949
- throw new $SyntaxError("invalid intrinsic syntax, expected opening `%`");
14950
- }
14951
- var result = [];
14952
- $replace(string, rePropName, function(match, number, quote, subString) {
14953
- result[result.length] = quote ? $replace(subString, reEscapeChar, "$1") : number || match;
14954
- });
14955
- return result;
14956
- };
14957
- var getBaseIntrinsic = function getBaseIntrinsic2(name, allowMissing) {
14958
- var intrinsicName = name;
14959
- var alias;
14960
- if (hasOwn(LEGACY_ALIASES, intrinsicName)) {
14961
- alias = LEGACY_ALIASES[intrinsicName];
14962
- intrinsicName = "%" + alias[0] + "%";
14963
- }
14964
- if (hasOwn(INTRINSICS, intrinsicName)) {
14965
- var value = INTRINSICS[intrinsicName];
14966
- if (value === needsEval) {
14967
- value = doEval(intrinsicName);
14968
- }
14969
- if (typeof value === "undefined" && !allowMissing) {
14970
- throw new $TypeError("intrinsic " + name + " exists, but is not available. Please file an issue!");
14971
- }
14972
- return {
14973
- alias,
14974
- name: intrinsicName,
14975
- value
14976
- };
14977
- }
14978
- throw new $SyntaxError("intrinsic " + name + " does not exist!");
14979
- };
14980
- module2.exports = function GetIntrinsic(name, allowMissing) {
14981
- if (typeof name !== "string" || name.length === 0) {
14982
- throw new $TypeError("intrinsic name must be a non-empty string");
14983
- }
14984
- if (arguments.length > 1 && typeof allowMissing !== "boolean") {
14985
- throw new $TypeError('"allowMissing" argument must be a boolean');
14816
+ function toStr(obj) {
14817
+ return objectToString.call(obj);
14818
+ }
14819
+ function nameOf(f) {
14820
+ if (f.name) {
14821
+ return f.name;
14986
14822
  }
14987
- if ($exec(/^%?[^%]*%?$/, name) === null) {
14988
- throw new $SyntaxError("`%` may not be present anywhere but at the beginning and end of the intrinsic name");
14823
+ var m = $match.call(functionToString.call(f), /^function\s*([\w$]+)/);
14824
+ if (m) {
14825
+ return m[1];
14989
14826
  }
14990
- var parts = stringToPath(name);
14991
- var intrinsicBaseName = parts.length > 0 ? parts[0] : "";
14992
- var intrinsic = getBaseIntrinsic("%" + intrinsicBaseName + "%", allowMissing);
14993
- var intrinsicRealName = intrinsic.name;
14994
- var value = intrinsic.value;
14995
- var skipFurtherCaching = false;
14996
- var alias = intrinsic.alias;
14997
- if (alias) {
14998
- intrinsicBaseName = alias[0];
14999
- $spliceApply(parts, $concat([0, 1], alias));
14827
+ return null;
14828
+ }
14829
+ function indexOf(xs, x) {
14830
+ if (xs.indexOf) {
14831
+ return xs.indexOf(x);
15000
14832
  }
15001
- for (var i = 1, isOwn = true; i < parts.length; i += 1) {
15002
- var part = parts[i];
15003
- var first = $strSlice(part, 0, 1);
15004
- var last = $strSlice(part, -1);
15005
- if ((first === '"' || first === "'" || first === "`" || (last === '"' || last === "'" || last === "`")) && first !== last) {
15006
- throw new $SyntaxError("property names with quotes must have matching quotes");
15007
- }
15008
- if (part === "constructor" || !isOwn) {
15009
- skipFurtherCaching = true;
15010
- }
15011
- intrinsicBaseName += "." + part;
15012
- intrinsicRealName = "%" + intrinsicBaseName + "%";
15013
- if (hasOwn(INTRINSICS, intrinsicRealName)) {
15014
- value = INTRINSICS[intrinsicRealName];
15015
- } else if (value != null) {
15016
- if (!(part in value)) {
15017
- if (!allowMissing) {
15018
- throw new $TypeError("base intrinsic for " + name + " exists, but the property is not available.");
15019
- }
15020
- return void 0;
15021
- }
15022
- if ($gOPD && i + 1 >= parts.length) {
15023
- var desc = $gOPD(value, part);
15024
- isOwn = !!desc;
15025
- if (isOwn && "get" in desc && !("originalValue" in desc.get)) {
15026
- value = desc.get;
15027
- } else {
15028
- value = value[part];
15029
- }
15030
- } else {
15031
- isOwn = hasOwn(value, part);
15032
- value = value[part];
15033
- }
15034
- if (isOwn && !skipFurtherCaching) {
15035
- INTRINSICS[intrinsicRealName] = value;
15036
- }
14833
+ for (var i = 0, l = xs.length; i < l; i++) {
14834
+ if (xs[i] === x) {
14835
+ return i;
15037
14836
  }
15038
14837
  }
15039
- return value;
15040
- };
15041
- }
15042
- });
15043
-
15044
- // node_modules/es-define-property/index.js
15045
- var require_es_define_property = __commonJS({
15046
- "node_modules/es-define-property/index.js"(exports2, module2) {
15047
- "use strict";
15048
- var GetIntrinsic = require_get_intrinsic();
15049
- var $defineProperty = GetIntrinsic("%Object.defineProperty%", true) || false;
15050
- if ($defineProperty) {
15051
- try {
15052
- $defineProperty({}, "a", { value: 1 });
15053
- } catch (e) {
15054
- $defineProperty = false;
15055
- }
15056
- }
15057
- module2.exports = $defineProperty;
15058
- }
15059
- });
15060
-
15061
- // node_modules/gopd/index.js
15062
- var require_gopd = __commonJS({
15063
- "node_modules/gopd/index.js"(exports2, module2) {
15064
- "use strict";
15065
- var GetIntrinsic = require_get_intrinsic();
15066
- var $gOPD = GetIntrinsic("%Object.getOwnPropertyDescriptor%", true);
15067
- if ($gOPD) {
15068
- try {
15069
- $gOPD([], "length");
15070
- } catch (e) {
15071
- $gOPD = null;
15072
- }
14838
+ return -1;
15073
14839
  }
15074
- module2.exports = $gOPD;
15075
- }
15076
- });
15077
-
15078
- // node_modules/define-data-property/index.js
15079
- var require_define_data_property = __commonJS({
15080
- "node_modules/define-data-property/index.js"(exports2, module2) {
15081
- "use strict";
15082
- var $defineProperty = require_es_define_property();
15083
- var $SyntaxError = require_syntax();
15084
- var $TypeError = require_type();
15085
- var gopd = require_gopd();
15086
- module2.exports = function defineDataProperty(obj, property, value) {
15087
- if (!obj || typeof obj !== "object" && typeof obj !== "function") {
15088
- throw new $TypeError("`obj` must be an object or a function`");
15089
- }
15090
- if (typeof property !== "string" && typeof property !== "symbol") {
15091
- throw new $TypeError("`property` must be a string or a symbol`");
15092
- }
15093
- if (arguments.length > 3 && typeof arguments[3] !== "boolean" && arguments[3] !== null) {
15094
- throw new $TypeError("`nonEnumerable`, if provided, must be a boolean or null");
15095
- }
15096
- if (arguments.length > 4 && typeof arguments[4] !== "boolean" && arguments[4] !== null) {
15097
- throw new $TypeError("`nonWritable`, if provided, must be a boolean or null");
15098
- }
15099
- if (arguments.length > 5 && typeof arguments[5] !== "boolean" && arguments[5] !== null) {
15100
- throw new $TypeError("`nonConfigurable`, if provided, must be a boolean or null");
15101
- }
15102
- if (arguments.length > 6 && typeof arguments[6] !== "boolean") {
15103
- throw new $TypeError("`loose`, if provided, must be a boolean");
15104
- }
15105
- var nonEnumerable = arguments.length > 3 ? arguments[3] : null;
15106
- var nonWritable = arguments.length > 4 ? arguments[4] : null;
15107
- var nonConfigurable = arguments.length > 5 ? arguments[5] : null;
15108
- var loose = arguments.length > 6 ? arguments[6] : false;
15109
- var desc = !!gopd && gopd(obj, property);
15110
- if ($defineProperty) {
15111
- $defineProperty(obj, property, {
15112
- configurable: nonConfigurable === null && desc ? desc.configurable : !nonConfigurable,
15113
- enumerable: nonEnumerable === null && desc ? desc.enumerable : !nonEnumerable,
15114
- value,
15115
- writable: nonWritable === null && desc ? desc.writable : !nonWritable
15116
- });
15117
- } else if (loose || !nonEnumerable && !nonWritable && !nonConfigurable) {
15118
- obj[property] = value;
15119
- } else {
15120
- throw new $SyntaxError("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");
15121
- }
15122
- };
15123
- }
15124
- });
15125
-
15126
- // node_modules/has-property-descriptors/index.js
15127
- var require_has_property_descriptors = __commonJS({
15128
- "node_modules/has-property-descriptors/index.js"(exports2, module2) {
15129
- "use strict";
15130
- var $defineProperty = require_es_define_property();
15131
- var hasPropertyDescriptors = function hasPropertyDescriptors2() {
15132
- return !!$defineProperty;
15133
- };
15134
- hasPropertyDescriptors.hasArrayLengthDefineBug = function hasArrayLengthDefineBug() {
15135
- if (!$defineProperty) {
15136
- return null;
14840
+ function isMap(x) {
14841
+ if (!mapSize || !x || typeof x !== "object") {
14842
+ return false;
15137
14843
  }
15138
14844
  try {
15139
- return $defineProperty([], "length", { value: 1 }).length !== 1;
15140
- } catch (e) {
15141
- return true;
15142
- }
15143
- };
15144
- module2.exports = hasPropertyDescriptors;
15145
- }
15146
- });
15147
-
15148
- // node_modules/set-function-length/index.js
15149
- var require_set_function_length = __commonJS({
15150
- "node_modules/set-function-length/index.js"(exports2, module2) {
15151
- "use strict";
15152
- var GetIntrinsic = require_get_intrinsic();
15153
- var define = require_define_data_property();
15154
- var hasDescriptors = require_has_property_descriptors()();
15155
- var gOPD = require_gopd();
15156
- var $TypeError = require_type();
15157
- var $floor = GetIntrinsic("%Math.floor%");
15158
- module2.exports = function setFunctionLength(fn, length) {
15159
- if (typeof fn !== "function") {
15160
- throw new $TypeError("`fn` is not a function");
15161
- }
15162
- if (typeof length !== "number" || length < 0 || length > 4294967295 || $floor(length) !== length) {
15163
- throw new $TypeError("`length` must be a positive 32-bit integer");
15164
- }
15165
- var loose = arguments.length > 2 && !!arguments[2];
15166
- var functionLengthIsConfigurable = true;
15167
- var functionLengthIsWritable = true;
15168
- if ("length" in fn && gOPD) {
15169
- var desc = gOPD(fn, "length");
15170
- if (desc && !desc.configurable) {
15171
- functionLengthIsConfigurable = false;
15172
- }
15173
- if (desc && !desc.writable) {
15174
- functionLengthIsWritable = false;
15175
- }
15176
- }
15177
- if (functionLengthIsConfigurable || functionLengthIsWritable || !loose) {
15178
- if (hasDescriptors) {
15179
- define(
15180
- /** @type {Parameters<define>[0]} */
15181
- fn,
15182
- "length",
15183
- length,
15184
- true,
15185
- true
15186
- );
15187
- } else {
15188
- define(
15189
- /** @type {Parameters<define>[0]} */
15190
- fn,
15191
- "length",
15192
- length
15193
- );
14845
+ mapSize.call(x);
14846
+ try {
14847
+ setSize.call(x);
14848
+ } catch (s) {
14849
+ return true;
15194
14850
  }
14851
+ return x instanceof Map;
14852
+ } catch (e) {
15195
14853
  }
15196
- return fn;
15197
- };
15198
- }
15199
- });
15200
-
15201
- // node_modules/call-bind/index.js
15202
- var require_call_bind = __commonJS({
15203
- "node_modules/call-bind/index.js"(exports2, module2) {
15204
- "use strict";
15205
- var bind = require_function_bind();
15206
- var GetIntrinsic = require_get_intrinsic();
15207
- var setFunctionLength = require_set_function_length();
15208
- var $TypeError = require_type();
15209
- var $apply = GetIntrinsic("%Function.prototype.apply%");
15210
- var $call = GetIntrinsic("%Function.prototype.call%");
15211
- var $reflectApply = GetIntrinsic("%Reflect.apply%", true) || bind.call($call, $apply);
15212
- var $defineProperty = require_es_define_property();
15213
- var $max = GetIntrinsic("%Math.max%");
15214
- module2.exports = function callBind(originalFunction) {
15215
- if (typeof originalFunction !== "function") {
15216
- throw new $TypeError("a function is required");
15217
- }
15218
- var func = $reflectApply(bind, $call, arguments);
15219
- return setFunctionLength(
15220
- func,
15221
- 1 + $max(0, originalFunction.length - (arguments.length - 1)),
15222
- true
15223
- );
15224
- };
15225
- var applyBind = function applyBind2() {
15226
- return $reflectApply(bind, $apply, arguments);
15227
- };
15228
- if ($defineProperty) {
15229
- $defineProperty(module2.exports, "apply", { value: applyBind });
15230
- } else {
15231
- module2.exports.apply = applyBind;
14854
+ return false;
15232
14855
  }
15233
- }
15234
- });
15235
-
15236
- // node_modules/call-bind/callBound.js
15237
- var require_callBound = __commonJS({
15238
- "node_modules/call-bind/callBound.js"(exports2, module2) {
15239
- "use strict";
15240
- var GetIntrinsic = require_get_intrinsic();
15241
- var callBind = require_call_bind();
15242
- var $indexOf = callBind(GetIntrinsic("String.prototype.indexOf"));
15243
- module2.exports = function callBoundIntrinsic(name, allowMissing) {
15244
- var intrinsic = GetIntrinsic(name, !!allowMissing);
15245
- if (typeof intrinsic === "function" && $indexOf(name, ".prototype.") > -1) {
15246
- return callBind(intrinsic);
15247
- }
15248
- return intrinsic;
15249
- };
15250
- }
15251
- });
15252
-
15253
- // node_modules/object-inspect/util.inspect.js
15254
- var require_util_inspect = __commonJS({
15255
- "node_modules/object-inspect/util.inspect.js"(exports2, module2) {
15256
- "use strict";
15257
- module2.exports = require("util").inspect;
15258
- }
15259
- });
15260
-
15261
- // node_modules/object-inspect/index.js
15262
- var require_object_inspect = __commonJS({
15263
- "node_modules/object-inspect/index.js"(exports2, module2) {
15264
- "use strict";
15265
- var hasMap = typeof Map === "function" && Map.prototype;
15266
- var mapSizeDescriptor = Object.getOwnPropertyDescriptor && hasMap ? Object.getOwnPropertyDescriptor(Map.prototype, "size") : null;
15267
- var mapSize = hasMap && mapSizeDescriptor && typeof mapSizeDescriptor.get === "function" ? mapSizeDescriptor.get : null;
15268
- var mapForEach = hasMap && Map.prototype.forEach;
15269
- var hasSet = typeof Set === "function" && Set.prototype;
15270
- var setSizeDescriptor = Object.getOwnPropertyDescriptor && hasSet ? Object.getOwnPropertyDescriptor(Set.prototype, "size") : null;
15271
- var setSize = hasSet && setSizeDescriptor && typeof setSizeDescriptor.get === "function" ? setSizeDescriptor.get : null;
15272
- var setForEach = hasSet && Set.prototype.forEach;
15273
- var hasWeakMap = typeof WeakMap === "function" && WeakMap.prototype;
15274
- var weakMapHas = hasWeakMap ? WeakMap.prototype.has : null;
15275
- var hasWeakSet = typeof WeakSet === "function" && WeakSet.prototype;
15276
- var weakSetHas = hasWeakSet ? WeakSet.prototype.has : null;
15277
- var hasWeakRef = typeof WeakRef === "function" && WeakRef.prototype;
15278
- var weakRefDeref = hasWeakRef ? WeakRef.prototype.deref : null;
15279
- var booleanValueOf = Boolean.prototype.valueOf;
15280
- var objectToString = Object.prototype.toString;
15281
- var functionToString = Function.prototype.toString;
15282
- var $match = String.prototype.match;
15283
- var $slice = String.prototype.slice;
15284
- var $replace = String.prototype.replace;
15285
- var $toUpperCase = String.prototype.toUpperCase;
15286
- var $toLowerCase = String.prototype.toLowerCase;
15287
- var $test = RegExp.prototype.test;
15288
- var $concat = Array.prototype.concat;
15289
- var $join = Array.prototype.join;
15290
- var $arrSlice = Array.prototype.slice;
15291
- var $floor = Math.floor;
15292
- var bigIntValueOf = typeof BigInt === "function" ? BigInt.prototype.valueOf : null;
15293
- var gOPS = Object.getOwnPropertySymbols;
15294
- var symToString = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? Symbol.prototype.toString : null;
15295
- var hasShammedSymbols = typeof Symbol === "function" && typeof Symbol.iterator === "object";
15296
- var toStringTag = typeof Symbol === "function" && Symbol.toStringTag && (typeof Symbol.toStringTag === hasShammedSymbols ? "object" : "symbol") ? Symbol.toStringTag : null;
15297
- var isEnumerable = Object.prototype.propertyIsEnumerable;
15298
- var gPO = (typeof Reflect === "function" ? Reflect.getPrototypeOf : Object.getPrototypeOf) || ([].__proto__ === Array.prototype ? function(O) {
15299
- return O.__proto__;
15300
- } : null);
15301
- function addNumericSeparator(num, str) {
15302
- if (num === Infinity || num === -Infinity || num !== num || num && num > -1e3 && num < 1e3 || $test.call(/e/, str)) {
15303
- return str;
14856
+ function isWeakMap(x) {
14857
+ if (!weakMapHas || !x || typeof x !== "object") {
14858
+ return false;
15304
14859
  }
15305
- var sepRegex = /[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;
15306
- if (typeof num === "number") {
15307
- var int = num < 0 ? -$floor(-num) : $floor(num);
15308
- if (int !== num) {
15309
- var intStr = String(int);
15310
- var dec = $slice.call(str, intStr.length + 1);
15311
- return $replace.call(intStr, sepRegex, "$&_") + "." + $replace.call($replace.call(dec, /([0-9]{3})/g, "$&_"), /_$/, "");
14860
+ try {
14861
+ weakMapHas.call(x, weakMapHas);
14862
+ try {
14863
+ weakSetHas.call(x, weakSetHas);
14864
+ } catch (s) {
14865
+ return true;
15312
14866
  }
14867
+ return x instanceof WeakMap;
14868
+ } catch (e) {
15313
14869
  }
15314
- return $replace.call(str, sepRegex, "$&_");
15315
- }
15316
- var utilInspect = require_util_inspect();
15317
- var inspectCustom = utilInspect.custom;
15318
- var inspectSymbol = isSymbol(inspectCustom) ? inspectCustom : null;
15319
- var quotes = {
15320
- __proto__: null,
15321
- "double": '"',
15322
- single: "'"
15323
- };
15324
- var quoteREs = {
15325
- __proto__: null,
15326
- "double": /(["\\])/g,
15327
- single: /(['\\])/g
15328
- };
15329
- module2.exports = function inspect_(obj, options, depth, seen) {
15330
- var opts = options || {};
15331
- if (has(opts, "quoteStyle") && !has(quotes, opts.quoteStyle)) {
15332
- throw new TypeError('option "quoteStyle" must be "single" or "double"');
15333
- }
15334
- if (has(opts, "maxStringLength") && (typeof opts.maxStringLength === "number" ? opts.maxStringLength < 0 && opts.maxStringLength !== Infinity : opts.maxStringLength !== null)) {
15335
- throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');
15336
- }
15337
- var customInspect = has(opts, "customInspect") ? opts.customInspect : true;
15338
- if (typeof customInspect !== "boolean" && customInspect !== "symbol") {
15339
- throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");
15340
- }
15341
- if (has(opts, "indent") && opts.indent !== null && opts.indent !== " " && !(parseInt(opts.indent, 10) === opts.indent && opts.indent > 0)) {
15342
- throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');
15343
- }
15344
- if (has(opts, "numericSeparator") && typeof opts.numericSeparator !== "boolean") {
15345
- throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');
14870
+ return false;
14871
+ }
14872
+ function isWeakRef(x) {
14873
+ if (!weakRefDeref || !x || typeof x !== "object") {
14874
+ return false;
15346
14875
  }
15347
- var numericSeparator = opts.numericSeparator;
15348
- if (typeof obj === "undefined") {
15349
- return "undefined";
14876
+ try {
14877
+ weakRefDeref.call(x);
14878
+ return true;
14879
+ } catch (e) {
15350
14880
  }
15351
- if (obj === null) {
15352
- return "null";
14881
+ return false;
14882
+ }
14883
+ function isSet(x) {
14884
+ if (!setSize || !x || typeof x !== "object") {
14885
+ return false;
15353
14886
  }
15354
- if (typeof obj === "boolean") {
15355
- return obj ? "true" : "false";
14887
+ try {
14888
+ setSize.call(x);
14889
+ try {
14890
+ mapSize.call(x);
14891
+ } catch (m) {
14892
+ return true;
14893
+ }
14894
+ return x instanceof Set;
14895
+ } catch (e) {
15356
14896
  }
15357
- if (typeof obj === "string") {
15358
- return inspectString(obj, opts);
14897
+ return false;
14898
+ }
14899
+ function isWeakSet(x) {
14900
+ if (!weakSetHas || !x || typeof x !== "object") {
14901
+ return false;
15359
14902
  }
15360
- if (typeof obj === "number") {
15361
- if (obj === 0) {
15362
- return Infinity / obj > 0 ? "0" : "-0";
14903
+ try {
14904
+ weakSetHas.call(x, weakSetHas);
14905
+ try {
14906
+ weakMapHas.call(x, weakMapHas);
14907
+ } catch (s) {
14908
+ return true;
15363
14909
  }
15364
- var str = String(obj);
15365
- return numericSeparator ? addNumericSeparator(obj, str) : str;
14910
+ return x instanceof WeakSet;
14911
+ } catch (e) {
15366
14912
  }
15367
- if (typeof obj === "bigint") {
15368
- var bigIntStr = String(obj) + "n";
15369
- return numericSeparator ? addNumericSeparator(obj, bigIntStr) : bigIntStr;
14913
+ return false;
14914
+ }
14915
+ function isElement(x) {
14916
+ if (!x || typeof x !== "object") {
14917
+ return false;
15370
14918
  }
15371
- var maxDepth = typeof opts.depth === "undefined" ? 5 : opts.depth;
15372
- if (typeof depth === "undefined") {
15373
- depth = 0;
14919
+ if (typeof HTMLElement !== "undefined" && x instanceof HTMLElement) {
14920
+ return true;
15374
14921
  }
15375
- if (depth >= maxDepth && maxDepth > 0 && typeof obj === "object") {
15376
- return isArray(obj) ? "[Array]" : "[Object]";
14922
+ return typeof x.nodeName === "string" && typeof x.getAttribute === "function";
14923
+ }
14924
+ function inspectString(str, opts) {
14925
+ if (str.length > opts.maxStringLength) {
14926
+ var remaining = str.length - opts.maxStringLength;
14927
+ var trailer = "... " + remaining + " more character" + (remaining > 1 ? "s" : "");
14928
+ return inspectString($slice.call(str, 0, opts.maxStringLength), opts) + trailer;
15377
14929
  }
15378
- var indent = getIndent(opts, depth);
15379
- if (typeof seen === "undefined") {
15380
- seen = [];
15381
- } else if (indexOf(seen, obj) >= 0) {
15382
- return "[Circular]";
14930
+ var quoteRE = quoteREs[opts.quoteStyle || "single"];
14931
+ quoteRE.lastIndex = 0;
14932
+ var s = $replace.call($replace.call(str, quoteRE, "\\$1"), /[\x00-\x1f]/g, lowbyte);
14933
+ return wrapQuotes(s, "single", opts);
14934
+ }
14935
+ function lowbyte(c) {
14936
+ var n = c.charCodeAt(0);
14937
+ var x = {
14938
+ 8: "b",
14939
+ 9: "t",
14940
+ 10: "n",
14941
+ 12: "f",
14942
+ 13: "r"
14943
+ }[n];
14944
+ if (x) {
14945
+ return "\\" + x;
15383
14946
  }
15384
- function inspect(value, from, noIndent) {
15385
- if (from) {
15386
- seen = $arrSlice.call(seen);
15387
- seen.push(from);
15388
- }
15389
- if (noIndent) {
15390
- var newOpts = {
15391
- depth: opts.depth
15392
- };
15393
- if (has(opts, "quoteStyle")) {
15394
- newOpts.quoteStyle = opts.quoteStyle;
15395
- }
15396
- return inspect_(value, newOpts, depth + 1, seen);
14947
+ return "\\x" + (n < 16 ? "0" : "") + $toUpperCase.call(n.toString(16));
14948
+ }
14949
+ function markBoxed(str) {
14950
+ return "Object(" + str + ")";
14951
+ }
14952
+ function weakCollectionOf(type) {
14953
+ return type + " { ? }";
14954
+ }
14955
+ function collectionOf(type, size, entries, indent) {
14956
+ var joinedEntries = indent ? indentedJoin(entries, indent) : $join.call(entries, ", ");
14957
+ return type + " (" + size + ") {" + joinedEntries + "}";
14958
+ }
14959
+ function singleLineValues(xs) {
14960
+ for (var i = 0; i < xs.length; i++) {
14961
+ if (indexOf(xs[i], "\n") >= 0) {
14962
+ return false;
15397
14963
  }
15398
- return inspect_(value, opts, depth + 1, seen);
15399
14964
  }
15400
- if (typeof obj === "function" && !isRegExp(obj)) {
15401
- var name = nameOf(obj);
15402
- var keys = arrObjKeys(obj, inspect);
15403
- return "[Function" + (name ? ": " + name : " (anonymous)") + "]" + (keys.length > 0 ? " { " + $join.call(keys, ", ") + " }" : "");
14965
+ return true;
14966
+ }
14967
+ function getIndent(opts, depth) {
14968
+ var baseIndent;
14969
+ if (opts.indent === " ") {
14970
+ baseIndent = " ";
14971
+ } else if (typeof opts.indent === "number" && opts.indent > 0) {
14972
+ baseIndent = $join.call(Array(opts.indent + 1), " ");
14973
+ } else {
14974
+ return null;
15404
14975
  }
15405
- if (isSymbol(obj)) {
15406
- var symString = hasShammedSymbols ? $replace.call(String(obj), /^(Symbol\(.*\))_[^)]*$/, "$1") : symToString.call(obj);
15407
- return typeof obj === "object" && !hasShammedSymbols ? markBoxed(symString) : symString;
14976
+ return {
14977
+ base: baseIndent,
14978
+ prev: $join.call(Array(depth + 1), baseIndent)
14979
+ };
14980
+ }
14981
+ function indentedJoin(xs, indent) {
14982
+ if (xs.length === 0) {
14983
+ return "";
15408
14984
  }
15409
- if (isElement(obj)) {
15410
- var s = "<" + $toLowerCase.call(String(obj.nodeName));
15411
- var attrs = obj.attributes || [];
15412
- for (var i = 0; i < attrs.length; i++) {
15413
- s += " " + attrs[i].name + "=" + wrapQuotes(quote(attrs[i].value), "double", opts);
14985
+ var lineJoiner = "\n" + indent.prev + indent.base;
14986
+ return lineJoiner + $join.call(xs, "," + lineJoiner) + "\n" + indent.prev;
14987
+ }
14988
+ function arrObjKeys(obj, inspect) {
14989
+ var isArr = isArray(obj);
14990
+ var xs = [];
14991
+ if (isArr) {
14992
+ xs.length = obj.length;
14993
+ for (var i = 0; i < obj.length; i++) {
14994
+ xs[i] = has(obj, i) ? inspect(obj[i], obj) : "";
15414
14995
  }
15415
- s += ">";
15416
- if (obj.childNodes && obj.childNodes.length) {
15417
- s += "...";
14996
+ }
14997
+ var syms = typeof gOPS === "function" ? gOPS(obj) : [];
14998
+ var symMap;
14999
+ if (hasShammedSymbols) {
15000
+ symMap = {};
15001
+ for (var k = 0; k < syms.length; k++) {
15002
+ symMap["$" + syms[k]] = syms[k];
15418
15003
  }
15419
- s += "</" + $toLowerCase.call(String(obj.nodeName)) + ">";
15420
- return s;
15421
15004
  }
15422
- if (isArray(obj)) {
15423
- if (obj.length === 0) {
15424
- return "[]";
15005
+ for (var key in obj) {
15006
+ if (!has(obj, key)) {
15007
+ continue;
15425
15008
  }
15426
- var xs = arrObjKeys(obj, inspect);
15427
- if (indent && !singleLineValues(xs)) {
15428
- return "[" + indentedJoin(xs, indent) + "]";
15009
+ if (isArr && String(Number(key)) === key && key < obj.length) {
15010
+ continue;
15011
+ }
15012
+ if (hasShammedSymbols && symMap["$" + key] instanceof Symbol) {
15013
+ continue;
15014
+ } else if ($test.call(/[^\w$]/, key)) {
15015
+ xs.push(inspect(key, obj) + ": " + inspect(obj[key], obj));
15016
+ } else {
15017
+ xs.push(key + ": " + inspect(obj[key], obj));
15429
15018
  }
15430
- return "[ " + $join.call(xs, ", ") + " ]";
15431
15019
  }
15432
- if (isError(obj)) {
15433
- var parts = arrObjKeys(obj, inspect);
15434
- if (!("cause" in Error.prototype) && "cause" in obj && !isEnumerable.call(obj, "cause")) {
15435
- return "{ [" + String(obj) + "] " + $join.call($concat.call("[cause]: " + inspect(obj.cause), parts), ", ") + " }";
15020
+ if (typeof gOPS === "function") {
15021
+ for (var j = 0; j < syms.length; j++) {
15022
+ if (isEnumerable.call(obj, syms[j])) {
15023
+ xs.push("[" + inspect(syms[j]) + "]: " + inspect(obj[syms[j]], obj));
15024
+ }
15436
15025
  }
15437
- if (parts.length === 0) {
15438
- return "[" + String(obj) + "]";
15026
+ }
15027
+ return xs;
15028
+ }
15029
+ }
15030
+ });
15031
+
15032
+ // node_modules/side-channel-list/index.js
15033
+ var require_side_channel_list = __commonJS({
15034
+ "node_modules/side-channel-list/index.js"(exports2, module2) {
15035
+ "use strict";
15036
+ var inspect = require_object_inspect();
15037
+ var $TypeError = require_type();
15038
+ var listGetNode = function(list, key, isDelete) {
15039
+ var prev = list;
15040
+ var curr;
15041
+ for (; (curr = prev.next) != null; prev = curr) {
15042
+ if (curr.key === key) {
15043
+ prev.next = curr.next;
15044
+ if (!isDelete) {
15045
+ curr.next = /** @type {NonNullable<typeof list.next>} */
15046
+ list.next;
15047
+ list.next = curr;
15048
+ }
15049
+ return curr;
15439
15050
  }
15440
- return "{ [" + String(obj) + "] " + $join.call(parts, ", ") + " }";
15441
15051
  }
15442
- if (typeof obj === "object" && customInspect) {
15443
- if (inspectSymbol && typeof obj[inspectSymbol] === "function" && utilInspect) {
15444
- return utilInspect(obj, { depth: maxDepth - depth });
15445
- } else if (customInspect !== "symbol" && typeof obj.inspect === "function") {
15446
- return obj.inspect();
15052
+ };
15053
+ var listGet = function(objects, key) {
15054
+ if (!objects) {
15055
+ return void 0;
15056
+ }
15057
+ var node = listGetNode(objects, key);
15058
+ return node && node.value;
15059
+ };
15060
+ var listSet = function(objects, key, value) {
15061
+ var node = listGetNode(objects, key);
15062
+ if (node) {
15063
+ node.value = value;
15064
+ } else {
15065
+ objects.next = /** @type {import('./list.d.ts').ListNode<typeof value, typeof key>} */
15066
+ {
15067
+ // eslint-disable-line no-param-reassign, no-extra-parens
15068
+ key,
15069
+ next: objects.next,
15070
+ value
15071
+ };
15072
+ }
15073
+ };
15074
+ var listHas = function(objects, key) {
15075
+ if (!objects) {
15076
+ return false;
15077
+ }
15078
+ return !!listGetNode(objects, key);
15079
+ };
15080
+ var listDelete = function(objects, key) {
15081
+ if (objects) {
15082
+ return listGetNode(objects, key, true);
15083
+ }
15084
+ };
15085
+ module2.exports = function getSideChannelList() {
15086
+ var $o;
15087
+ var channel = {
15088
+ assert: function(key) {
15089
+ if (!channel.has(key)) {
15090
+ throw new $TypeError("Side channel does not contain " + inspect(key));
15091
+ }
15092
+ },
15093
+ "delete": function(key) {
15094
+ var root = $o && $o.next;
15095
+ var deletedNode = listDelete($o, key);
15096
+ if (deletedNode && root && root === deletedNode) {
15097
+ $o = void 0;
15098
+ }
15099
+ return !!deletedNode;
15100
+ },
15101
+ get: function(key) {
15102
+ return listGet($o, key);
15103
+ },
15104
+ has: function(key) {
15105
+ return listHas($o, key);
15106
+ },
15107
+ set: function(key, value) {
15108
+ if (!$o) {
15109
+ $o = {
15110
+ next: void 0
15111
+ };
15112
+ }
15113
+ listSet(
15114
+ /** @type {NonNullable<typeof $o>} */
15115
+ $o,
15116
+ key,
15117
+ value
15118
+ );
15447
15119
  }
15120
+ };
15121
+ return channel;
15122
+ };
15123
+ }
15124
+ });
15125
+
15126
+ // node_modules/es-object-atoms/index.js
15127
+ var require_es_object_atoms = __commonJS({
15128
+ "node_modules/es-object-atoms/index.js"(exports2, module2) {
15129
+ "use strict";
15130
+ module2.exports = Object;
15131
+ }
15132
+ });
15133
+
15134
+ // node_modules/es-errors/index.js
15135
+ var require_es_errors = __commonJS({
15136
+ "node_modules/es-errors/index.js"(exports2, module2) {
15137
+ "use strict";
15138
+ module2.exports = Error;
15139
+ }
15140
+ });
15141
+
15142
+ // node_modules/es-errors/eval.js
15143
+ var require_eval = __commonJS({
15144
+ "node_modules/es-errors/eval.js"(exports2, module2) {
15145
+ "use strict";
15146
+ module2.exports = EvalError;
15147
+ }
15148
+ });
15149
+
15150
+ // node_modules/es-errors/range.js
15151
+ var require_range = __commonJS({
15152
+ "node_modules/es-errors/range.js"(exports2, module2) {
15153
+ "use strict";
15154
+ module2.exports = RangeError;
15155
+ }
15156
+ });
15157
+
15158
+ // node_modules/es-errors/ref.js
15159
+ var require_ref = __commonJS({
15160
+ "node_modules/es-errors/ref.js"(exports2, module2) {
15161
+ "use strict";
15162
+ module2.exports = ReferenceError;
15163
+ }
15164
+ });
15165
+
15166
+ // node_modules/es-errors/syntax.js
15167
+ var require_syntax = __commonJS({
15168
+ "node_modules/es-errors/syntax.js"(exports2, module2) {
15169
+ "use strict";
15170
+ module2.exports = SyntaxError;
15171
+ }
15172
+ });
15173
+
15174
+ // node_modules/es-errors/uri.js
15175
+ var require_uri = __commonJS({
15176
+ "node_modules/es-errors/uri.js"(exports2, module2) {
15177
+ "use strict";
15178
+ module2.exports = URIError;
15179
+ }
15180
+ });
15181
+
15182
+ // node_modules/math-intrinsics/abs.js
15183
+ var require_abs = __commonJS({
15184
+ "node_modules/math-intrinsics/abs.js"(exports2, module2) {
15185
+ "use strict";
15186
+ module2.exports = Math.abs;
15187
+ }
15188
+ });
15189
+
15190
+ // node_modules/math-intrinsics/floor.js
15191
+ var require_floor = __commonJS({
15192
+ "node_modules/math-intrinsics/floor.js"(exports2, module2) {
15193
+ "use strict";
15194
+ module2.exports = Math.floor;
15195
+ }
15196
+ });
15197
+
15198
+ // node_modules/math-intrinsics/max.js
15199
+ var require_max = __commonJS({
15200
+ "node_modules/math-intrinsics/max.js"(exports2, module2) {
15201
+ "use strict";
15202
+ module2.exports = Math.max;
15203
+ }
15204
+ });
15205
+
15206
+ // node_modules/math-intrinsics/min.js
15207
+ var require_min = __commonJS({
15208
+ "node_modules/math-intrinsics/min.js"(exports2, module2) {
15209
+ "use strict";
15210
+ module2.exports = Math.min;
15211
+ }
15212
+ });
15213
+
15214
+ // node_modules/math-intrinsics/pow.js
15215
+ var require_pow = __commonJS({
15216
+ "node_modules/math-intrinsics/pow.js"(exports2, module2) {
15217
+ "use strict";
15218
+ module2.exports = Math.pow;
15219
+ }
15220
+ });
15221
+
15222
+ // node_modules/gopd/gOPD.js
15223
+ var require_gOPD = __commonJS({
15224
+ "node_modules/gopd/gOPD.js"(exports2, module2) {
15225
+ "use strict";
15226
+ module2.exports = Object.getOwnPropertyDescriptor;
15227
+ }
15228
+ });
15229
+
15230
+ // node_modules/gopd/index.js
15231
+ var require_gopd = __commonJS({
15232
+ "node_modules/gopd/index.js"(exports2, module2) {
15233
+ "use strict";
15234
+ var $gOPD = require_gOPD();
15235
+ if ($gOPD) {
15236
+ try {
15237
+ $gOPD([], "length");
15238
+ } catch (e) {
15239
+ $gOPD = null;
15448
15240
  }
15449
- if (isMap(obj)) {
15450
- var mapParts = [];
15451
- if (mapForEach) {
15452
- mapForEach.call(obj, function(value, key) {
15453
- mapParts.push(inspect(key, obj, true) + " => " + inspect(value, obj));
15454
- });
15455
- }
15456
- return collectionOf("Map", mapSize.call(obj), mapParts, indent);
15241
+ }
15242
+ module2.exports = $gOPD;
15243
+ }
15244
+ });
15245
+
15246
+ // node_modules/es-define-property/index.js
15247
+ var require_es_define_property = __commonJS({
15248
+ "node_modules/es-define-property/index.js"(exports2, module2) {
15249
+ "use strict";
15250
+ var $defineProperty = Object.defineProperty || false;
15251
+ if ($defineProperty) {
15252
+ try {
15253
+ $defineProperty({}, "a", { value: 1 });
15254
+ } catch (e) {
15255
+ $defineProperty = false;
15457
15256
  }
15458
- if (isSet(obj)) {
15459
- var setParts = [];
15460
- if (setForEach) {
15461
- setForEach.call(obj, function(value) {
15462
- setParts.push(inspect(value, obj));
15463
- });
15464
- }
15465
- return collectionOf("Set", setSize.call(obj), setParts, indent);
15257
+ }
15258
+ module2.exports = $defineProperty;
15259
+ }
15260
+ });
15261
+
15262
+ // node_modules/has-symbols/shams.js
15263
+ var require_shams = __commonJS({
15264
+ "node_modules/has-symbols/shams.js"(exports2, module2) {
15265
+ "use strict";
15266
+ module2.exports = function hasSymbols() {
15267
+ if (typeof Symbol !== "function" || typeof Object.getOwnPropertySymbols !== "function") {
15268
+ return false;
15466
15269
  }
15467
- if (isWeakMap(obj)) {
15468
- return weakCollectionOf("WeakMap");
15270
+ if (typeof Symbol.iterator === "symbol") {
15271
+ return true;
15469
15272
  }
15470
- if (isWeakSet(obj)) {
15471
- return weakCollectionOf("WeakSet");
15273
+ var obj = {};
15274
+ var sym = Symbol("test");
15275
+ var symObj = Object(sym);
15276
+ if (typeof sym === "string") {
15277
+ return false;
15472
15278
  }
15473
- if (isWeakRef(obj)) {
15474
- return weakCollectionOf("WeakRef");
15279
+ if (Object.prototype.toString.call(sym) !== "[object Symbol]") {
15280
+ return false;
15475
15281
  }
15476
- if (isNumber(obj)) {
15477
- return markBoxed(inspect(Number(obj)));
15282
+ if (Object.prototype.toString.call(symObj) !== "[object Symbol]") {
15283
+ return false;
15478
15284
  }
15479
- if (isBigInt(obj)) {
15480
- return markBoxed(inspect(bigIntValueOf.call(obj)));
15285
+ var symVal = 42;
15286
+ obj[sym] = symVal;
15287
+ for (var _ in obj) {
15288
+ return false;
15481
15289
  }
15482
- if (isBoolean(obj)) {
15483
- return markBoxed(booleanValueOf.call(obj));
15290
+ if (typeof Object.keys === "function" && Object.keys(obj).length !== 0) {
15291
+ return false;
15484
15292
  }
15485
- if (isString(obj)) {
15486
- return markBoxed(inspect(String(obj)));
15293
+ if (typeof Object.getOwnPropertyNames === "function" && Object.getOwnPropertyNames(obj).length !== 0) {
15294
+ return false;
15487
15295
  }
15488
- if (typeof window !== "undefined" && obj === window) {
15489
- return "{ [object Window] }";
15296
+ var syms = Object.getOwnPropertySymbols(obj);
15297
+ if (syms.length !== 1 || syms[0] !== sym) {
15298
+ return false;
15490
15299
  }
15491
- if (typeof globalThis !== "undefined" && obj === globalThis || typeof global !== "undefined" && obj === global) {
15492
- return "{ [object globalThis] }";
15300
+ if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) {
15301
+ return false;
15493
15302
  }
15494
- if (!isDate(obj) && !isRegExp(obj)) {
15495
- var ys = arrObjKeys(obj, inspect);
15496
- var isPlainObject = gPO ? gPO(obj) === Object.prototype : obj instanceof Object || obj.constructor === Object;
15497
- var protoTag = obj instanceof Object ? "" : "null prototype";
15498
- var stringTag = !isPlainObject && toStringTag && Object(obj) === obj && toStringTag in obj ? $slice.call(toStr(obj), 8, -1) : protoTag ? "Object" : "";
15499
- var constructorTag = isPlainObject || typeof obj.constructor !== "function" ? "" : obj.constructor.name ? obj.constructor.name + " " : "";
15500
- var tag = constructorTag + (stringTag || protoTag ? "[" + $join.call($concat.call([], stringTag || [], protoTag || []), ": ") + "] " : "");
15501
- if (ys.length === 0) {
15502
- return tag + "{}";
15503
- }
15504
- if (indent) {
15505
- return tag + "{" + indentedJoin(ys, indent) + "}";
15303
+ if (typeof Object.getOwnPropertyDescriptor === "function") {
15304
+ var descriptor = (
15305
+ /** @type {PropertyDescriptor} */
15306
+ Object.getOwnPropertyDescriptor(obj, sym)
15307
+ );
15308
+ if (descriptor.value !== symVal || descriptor.enumerable !== true) {
15309
+ return false;
15506
15310
  }
15507
- return tag + "{ " + $join.call(ys, ", ") + " }";
15508
15311
  }
15509
- return String(obj);
15312
+ return true;
15510
15313
  };
15511
- function wrapQuotes(s, defaultStyle, opts) {
15512
- var style = opts.quoteStyle || defaultStyle;
15513
- var quoteChar = quotes[style];
15514
- return quoteChar + s + quoteChar;
15515
- }
15516
- function quote(s) {
15517
- return $replace.call(String(s), /"/g, "&quot;");
15518
- }
15519
- function isArray(obj) {
15520
- return toStr(obj) === "[object Array]" && (!toStringTag || !(typeof obj === "object" && toStringTag in obj));
15521
- }
15522
- function isDate(obj) {
15523
- return toStr(obj) === "[object Date]" && (!toStringTag || !(typeof obj === "object" && toStringTag in obj));
15524
- }
15525
- function isRegExp(obj) {
15526
- return toStr(obj) === "[object RegExp]" && (!toStringTag || !(typeof obj === "object" && toStringTag in obj));
15527
- }
15528
- function isError(obj) {
15529
- return toStr(obj) === "[object Error]" && (!toStringTag || !(typeof obj === "object" && toStringTag in obj));
15530
- }
15531
- function isString(obj) {
15532
- return toStr(obj) === "[object String]" && (!toStringTag || !(typeof obj === "object" && toStringTag in obj));
15533
- }
15534
- function isNumber(obj) {
15535
- return toStr(obj) === "[object Number]" && (!toStringTag || !(typeof obj === "object" && toStringTag in obj));
15536
- }
15537
- function isBoolean(obj) {
15538
- return toStr(obj) === "[object Boolean]" && (!toStringTag || !(typeof obj === "object" && toStringTag in obj));
15539
- }
15540
- function isSymbol(obj) {
15541
- if (hasShammedSymbols) {
15542
- return obj && typeof obj === "object" && obj instanceof Symbol;
15543
- }
15544
- if (typeof obj === "symbol") {
15545
- return true;
15314
+ }
15315
+ });
15316
+
15317
+ // node_modules/has-symbols/index.js
15318
+ var require_has_symbols = __commonJS({
15319
+ "node_modules/has-symbols/index.js"(exports2, module2) {
15320
+ "use strict";
15321
+ var origSymbol = typeof Symbol !== "undefined" && Symbol;
15322
+ var hasSymbolSham = require_shams();
15323
+ module2.exports = function hasNativeSymbols() {
15324
+ if (typeof origSymbol !== "function") {
15325
+ return false;
15546
15326
  }
15547
- if (!obj || typeof obj !== "object" || !symToString) {
15327
+ if (typeof Symbol !== "function") {
15548
15328
  return false;
15549
15329
  }
15550
- try {
15551
- symToString.call(obj);
15552
- return true;
15553
- } catch (e) {
15330
+ if (typeof origSymbol("foo") !== "symbol") {
15331
+ return false;
15554
15332
  }
15555
- return false;
15556
- }
15557
- function isBigInt(obj) {
15558
- if (!obj || typeof obj !== "object" || !bigIntValueOf) {
15333
+ if (typeof Symbol("bar") !== "symbol") {
15559
15334
  return false;
15560
15335
  }
15561
- try {
15562
- bigIntValueOf.call(obj);
15563
- return true;
15564
- } catch (e) {
15336
+ return hasSymbolSham();
15337
+ };
15338
+ }
15339
+ });
15340
+
15341
+ // node_modules/function-bind/implementation.js
15342
+ var require_implementation = __commonJS({
15343
+ "node_modules/function-bind/implementation.js"(exports2, module2) {
15344
+ "use strict";
15345
+ var ERROR_MESSAGE = "Function.prototype.bind called on incompatible ";
15346
+ var toStr = Object.prototype.toString;
15347
+ var max = Math.max;
15348
+ var funcType = "[object Function]";
15349
+ var concatty = function concatty2(a, b) {
15350
+ var arr = [];
15351
+ for (var i = 0; i < a.length; i += 1) {
15352
+ arr[i] = a[i];
15565
15353
  }
15566
- return false;
15567
- }
15568
- var hasOwn = Object.prototype.hasOwnProperty || function(key) {
15569
- return key in this;
15354
+ for (var j = 0; j < b.length; j += 1) {
15355
+ arr[j + a.length] = b[j];
15356
+ }
15357
+ return arr;
15570
15358
  };
15571
- function has(obj, key) {
15572
- return hasOwn.call(obj, key);
15573
- }
15574
- function toStr(obj) {
15575
- return objectToString.call(obj);
15576
- }
15577
- function nameOf(f) {
15578
- if (f.name) {
15579
- return f.name;
15359
+ var slicy = function slicy2(arrLike, offset) {
15360
+ var arr = [];
15361
+ for (var i = offset || 0, j = 0; i < arrLike.length; i += 1, j += 1) {
15362
+ arr[j] = arrLike[i];
15580
15363
  }
15581
- var m = $match.call(functionToString.call(f), /^function\s*([\w$]+)/);
15582
- if (m) {
15583
- return m[1];
15364
+ return arr;
15365
+ };
15366
+ var joiny = function(arr, joiner) {
15367
+ var str = "";
15368
+ for (var i = 0; i < arr.length; i += 1) {
15369
+ str += arr[i];
15370
+ if (i + 1 < arr.length) {
15371
+ str += joiner;
15372
+ }
15584
15373
  }
15585
- return null;
15586
- }
15587
- function indexOf(xs, x) {
15588
- if (xs.indexOf) {
15589
- return xs.indexOf(x);
15374
+ return str;
15375
+ };
15376
+ module2.exports = function bind(that) {
15377
+ var target = this;
15378
+ if (typeof target !== "function" || toStr.apply(target) !== funcType) {
15379
+ throw new TypeError(ERROR_MESSAGE + target);
15590
15380
  }
15591
- for (var i = 0, l = xs.length; i < l; i++) {
15592
- if (xs[i] === x) {
15593
- return i;
15381
+ var args = slicy(arguments, 1);
15382
+ var bound;
15383
+ var binder = function() {
15384
+ if (this instanceof bound) {
15385
+ var result = target.apply(
15386
+ this,
15387
+ concatty(args, arguments)
15388
+ );
15389
+ if (Object(result) === result) {
15390
+ return result;
15391
+ }
15392
+ return this;
15594
15393
  }
15394
+ return target.apply(
15395
+ that,
15396
+ concatty(args, arguments)
15397
+ );
15398
+ };
15399
+ var boundLength = max(0, target.length - args.length);
15400
+ var boundArgs = [];
15401
+ for (var i = 0; i < boundLength; i++) {
15402
+ boundArgs[i] = "$" + i;
15403
+ }
15404
+ bound = Function("binder", "return function (" + joiny(boundArgs, ",") + "){ return binder.apply(this,arguments); }")(binder);
15405
+ if (target.prototype) {
15406
+ var Empty = function Empty2() {
15407
+ };
15408
+ Empty.prototype = target.prototype;
15409
+ bound.prototype = new Empty();
15410
+ Empty.prototype = null;
15411
+ }
15412
+ return bound;
15413
+ };
15414
+ }
15415
+ });
15416
+
15417
+ // node_modules/function-bind/index.js
15418
+ var require_function_bind = __commonJS({
15419
+ "node_modules/function-bind/index.js"(exports2, module2) {
15420
+ "use strict";
15421
+ var implementation = require_implementation();
15422
+ module2.exports = Function.prototype.bind || implementation;
15423
+ }
15424
+ });
15425
+
15426
+ // node_modules/call-bind-apply-helpers/functionCall.js
15427
+ var require_functionCall = __commonJS({
15428
+ "node_modules/call-bind-apply-helpers/functionCall.js"(exports2, module2) {
15429
+ "use strict";
15430
+ module2.exports = Function.prototype.call;
15431
+ }
15432
+ });
15433
+
15434
+ // node_modules/call-bind-apply-helpers/functionApply.js
15435
+ var require_functionApply = __commonJS({
15436
+ "node_modules/call-bind-apply-helpers/functionApply.js"(exports2, module2) {
15437
+ "use strict";
15438
+ module2.exports = Function.prototype.apply;
15439
+ }
15440
+ });
15441
+
15442
+ // node_modules/call-bind-apply-helpers/reflectApply.js
15443
+ var require_reflectApply = __commonJS({
15444
+ "node_modules/call-bind-apply-helpers/reflectApply.js"(exports2, module2) {
15445
+ "use strict";
15446
+ module2.exports = typeof Reflect !== "undefined" && Reflect && Reflect.apply;
15447
+ }
15448
+ });
15449
+
15450
+ // node_modules/call-bind-apply-helpers/actualApply.js
15451
+ var require_actualApply = __commonJS({
15452
+ "node_modules/call-bind-apply-helpers/actualApply.js"(exports2, module2) {
15453
+ "use strict";
15454
+ var bind = require_function_bind();
15455
+ var $apply = require_functionApply();
15456
+ var $call = require_functionCall();
15457
+ var $reflectApply = require_reflectApply();
15458
+ module2.exports = $reflectApply || bind.call($call, $apply);
15459
+ }
15460
+ });
15461
+
15462
+ // node_modules/call-bind-apply-helpers/index.js
15463
+ var require_call_bind_apply_helpers = __commonJS({
15464
+ "node_modules/call-bind-apply-helpers/index.js"(exports2, module2) {
15465
+ "use strict";
15466
+ var bind = require_function_bind();
15467
+ var $TypeError = require_type();
15468
+ var $call = require_functionCall();
15469
+ var $actualApply = require_actualApply();
15470
+ module2.exports = function callBindBasic(args) {
15471
+ if (args.length < 1 || typeof args[0] !== "function") {
15472
+ throw new $TypeError("a function is required");
15473
+ }
15474
+ return $actualApply(bind, $call, args);
15475
+ };
15476
+ }
15477
+ });
15478
+
15479
+ // node_modules/dunder-proto/get.js
15480
+ var require_get = __commonJS({
15481
+ "node_modules/dunder-proto/get.js"(exports2, module2) {
15482
+ "use strict";
15483
+ var callBind = require_call_bind_apply_helpers();
15484
+ var gOPD = require_gopd();
15485
+ var hasProtoAccessor;
15486
+ try {
15487
+ hasProtoAccessor = /** @type {{ __proto__?: typeof Array.prototype }} */
15488
+ [].__proto__ === Array.prototype;
15489
+ } catch (e) {
15490
+ if (!e || typeof e !== "object" || !("code" in e) || e.code !== "ERR_PROTO_ACCESS") {
15491
+ throw e;
15595
15492
  }
15596
- return -1;
15597
15493
  }
15598
- function isMap(x) {
15599
- if (!mapSize || !x || typeof x !== "object") {
15600
- return false;
15494
+ var desc = !!hasProtoAccessor && gOPD && gOPD(
15495
+ Object.prototype,
15496
+ /** @type {keyof typeof Object.prototype} */
15497
+ "__proto__"
15498
+ );
15499
+ var $Object = Object;
15500
+ var $getPrototypeOf = $Object.getPrototypeOf;
15501
+ module2.exports = desc && typeof desc.get === "function" ? callBind([desc.get]) : typeof $getPrototypeOf === "function" ? (
15502
+ /** @type {import('./get')} */
15503
+ function getDunder(value) {
15504
+ return $getPrototypeOf(value == null ? value : $Object(value));
15601
15505
  }
15506
+ ) : false;
15507
+ }
15508
+ });
15509
+
15510
+ // node_modules/hasown/index.js
15511
+ var require_hasown = __commonJS({
15512
+ "node_modules/hasown/index.js"(exports2, module2) {
15513
+ "use strict";
15514
+ var call = Function.prototype.call;
15515
+ var $hasOwn = Object.prototype.hasOwnProperty;
15516
+ var bind = require_function_bind();
15517
+ module2.exports = bind.call(call, $hasOwn);
15518
+ }
15519
+ });
15520
+
15521
+ // node_modules/get-intrinsic/index.js
15522
+ var require_get_intrinsic = __commonJS({
15523
+ "node_modules/get-intrinsic/index.js"(exports2, module2) {
15524
+ "use strict";
15525
+ var undefined2;
15526
+ var $Object = require_es_object_atoms();
15527
+ var $Error = require_es_errors();
15528
+ var $EvalError = require_eval();
15529
+ var $RangeError = require_range();
15530
+ var $ReferenceError = require_ref();
15531
+ var $SyntaxError = require_syntax();
15532
+ var $TypeError = require_type();
15533
+ var $URIError = require_uri();
15534
+ var abs = require_abs();
15535
+ var floor = require_floor();
15536
+ var max = require_max();
15537
+ var min = require_min();
15538
+ var pow = require_pow();
15539
+ var $Function = Function;
15540
+ var getEvalledConstructor = function(expressionSyntax) {
15602
15541
  try {
15603
- mapSize.call(x);
15604
- try {
15605
- setSize.call(x);
15606
- } catch (s) {
15607
- return true;
15608
- }
15609
- return x instanceof Map;
15542
+ return $Function('"use strict"; return (' + expressionSyntax + ").constructor;")();
15610
15543
  } catch (e) {
15611
15544
  }
15612
- return false;
15613
- }
15614
- function isWeakMap(x) {
15615
- if (!weakMapHas || !x || typeof x !== "object") {
15616
- return false;
15617
- }
15545
+ };
15546
+ var $gOPD = require_gopd();
15547
+ var $defineProperty = require_es_define_property();
15548
+ var throwTypeError = function() {
15549
+ throw new $TypeError();
15550
+ };
15551
+ var ThrowTypeError = $gOPD ? function() {
15618
15552
  try {
15619
- weakMapHas.call(x, weakMapHas);
15553
+ arguments.callee;
15554
+ return throwTypeError;
15555
+ } catch (calleeThrows) {
15620
15556
  try {
15621
- weakSetHas.call(x, weakSetHas);
15622
- } catch (s) {
15623
- return true;
15557
+ return $gOPD(arguments, "callee").get;
15558
+ } catch (gOPDthrows) {
15559
+ return throwTypeError;
15624
15560
  }
15625
- return x instanceof WeakMap;
15626
- } catch (e) {
15627
- }
15628
- return false;
15629
- }
15630
- function isWeakRef(x) {
15631
- if (!weakRefDeref || !x || typeof x !== "object") {
15632
- return false;
15633
15561
  }
15562
+ }() : throwTypeError;
15563
+ var hasSymbols = require_has_symbols()();
15564
+ var getDunderProto = require_get();
15565
+ var getProto = typeof Reflect === "function" && Reflect.getPrototypeOf || $Object.getPrototypeOf || getDunderProto;
15566
+ var $apply = require_functionApply();
15567
+ var $call = require_functionCall();
15568
+ var needsEval = {};
15569
+ var TypedArray = typeof Uint8Array === "undefined" || !getProto ? undefined2 : getProto(Uint8Array);
15570
+ var INTRINSICS = {
15571
+ __proto__: null,
15572
+ "%AggregateError%": typeof AggregateError === "undefined" ? undefined2 : AggregateError,
15573
+ "%Array%": Array,
15574
+ "%ArrayBuffer%": typeof ArrayBuffer === "undefined" ? undefined2 : ArrayBuffer,
15575
+ "%ArrayIteratorPrototype%": hasSymbols && getProto ? getProto([][Symbol.iterator]()) : undefined2,
15576
+ "%AsyncFromSyncIteratorPrototype%": undefined2,
15577
+ "%AsyncFunction%": needsEval,
15578
+ "%AsyncGenerator%": needsEval,
15579
+ "%AsyncGeneratorFunction%": needsEval,
15580
+ "%AsyncIteratorPrototype%": needsEval,
15581
+ "%Atomics%": typeof Atomics === "undefined" ? undefined2 : Atomics,
15582
+ "%BigInt%": typeof BigInt === "undefined" ? undefined2 : BigInt,
15583
+ "%BigInt64Array%": typeof BigInt64Array === "undefined" ? undefined2 : BigInt64Array,
15584
+ "%BigUint64Array%": typeof BigUint64Array === "undefined" ? undefined2 : BigUint64Array,
15585
+ "%Boolean%": Boolean,
15586
+ "%DataView%": typeof DataView === "undefined" ? undefined2 : DataView,
15587
+ "%Date%": Date,
15588
+ "%decodeURI%": decodeURI,
15589
+ "%decodeURIComponent%": decodeURIComponent,
15590
+ "%encodeURI%": encodeURI,
15591
+ "%encodeURIComponent%": encodeURIComponent,
15592
+ "%Error%": $Error,
15593
+ "%eval%": eval,
15594
+ // eslint-disable-line no-eval
15595
+ "%EvalError%": $EvalError,
15596
+ "%Float32Array%": typeof Float32Array === "undefined" ? undefined2 : Float32Array,
15597
+ "%Float64Array%": typeof Float64Array === "undefined" ? undefined2 : Float64Array,
15598
+ "%FinalizationRegistry%": typeof FinalizationRegistry === "undefined" ? undefined2 : FinalizationRegistry,
15599
+ "%Function%": $Function,
15600
+ "%GeneratorFunction%": needsEval,
15601
+ "%Int8Array%": typeof Int8Array === "undefined" ? undefined2 : Int8Array,
15602
+ "%Int16Array%": typeof Int16Array === "undefined" ? undefined2 : Int16Array,
15603
+ "%Int32Array%": typeof Int32Array === "undefined" ? undefined2 : Int32Array,
15604
+ "%isFinite%": isFinite,
15605
+ "%isNaN%": isNaN,
15606
+ "%IteratorPrototype%": hasSymbols && getProto ? getProto(getProto([][Symbol.iterator]())) : undefined2,
15607
+ "%JSON%": typeof JSON === "object" ? JSON : undefined2,
15608
+ "%Map%": typeof Map === "undefined" ? undefined2 : Map,
15609
+ "%MapIteratorPrototype%": typeof Map === "undefined" || !hasSymbols || !getProto ? undefined2 : getProto((/* @__PURE__ */ new Map())[Symbol.iterator]()),
15610
+ "%Math%": Math,
15611
+ "%Number%": Number,
15612
+ "%Object%": $Object,
15613
+ "%Object.getOwnPropertyDescriptor%": $gOPD,
15614
+ "%parseFloat%": parseFloat,
15615
+ "%parseInt%": parseInt,
15616
+ "%Promise%": typeof Promise === "undefined" ? undefined2 : Promise,
15617
+ "%Proxy%": typeof Proxy === "undefined" ? undefined2 : Proxy,
15618
+ "%RangeError%": $RangeError,
15619
+ "%ReferenceError%": $ReferenceError,
15620
+ "%Reflect%": typeof Reflect === "undefined" ? undefined2 : Reflect,
15621
+ "%RegExp%": RegExp,
15622
+ "%Set%": typeof Set === "undefined" ? undefined2 : Set,
15623
+ "%SetIteratorPrototype%": typeof Set === "undefined" || !hasSymbols || !getProto ? undefined2 : getProto((/* @__PURE__ */ new Set())[Symbol.iterator]()),
15624
+ "%SharedArrayBuffer%": typeof SharedArrayBuffer === "undefined" ? undefined2 : SharedArrayBuffer,
15625
+ "%String%": String,
15626
+ "%StringIteratorPrototype%": hasSymbols && getProto ? getProto(""[Symbol.iterator]()) : undefined2,
15627
+ "%Symbol%": hasSymbols ? Symbol : undefined2,
15628
+ "%SyntaxError%": $SyntaxError,
15629
+ "%ThrowTypeError%": ThrowTypeError,
15630
+ "%TypedArray%": TypedArray,
15631
+ "%TypeError%": $TypeError,
15632
+ "%Uint8Array%": typeof Uint8Array === "undefined" ? undefined2 : Uint8Array,
15633
+ "%Uint8ClampedArray%": typeof Uint8ClampedArray === "undefined" ? undefined2 : Uint8ClampedArray,
15634
+ "%Uint16Array%": typeof Uint16Array === "undefined" ? undefined2 : Uint16Array,
15635
+ "%Uint32Array%": typeof Uint32Array === "undefined" ? undefined2 : Uint32Array,
15636
+ "%URIError%": $URIError,
15637
+ "%WeakMap%": typeof WeakMap === "undefined" ? undefined2 : WeakMap,
15638
+ "%WeakRef%": typeof WeakRef === "undefined" ? undefined2 : WeakRef,
15639
+ "%WeakSet%": typeof WeakSet === "undefined" ? undefined2 : WeakSet,
15640
+ "%Function.prototype.call%": $call,
15641
+ "%Function.prototype.apply%": $apply,
15642
+ "%Object.defineProperty%": $defineProperty,
15643
+ "%Math.abs%": abs,
15644
+ "%Math.floor%": floor,
15645
+ "%Math.max%": max,
15646
+ "%Math.min%": min,
15647
+ "%Math.pow%": pow
15648
+ };
15649
+ if (getProto) {
15634
15650
  try {
15635
- weakRefDeref.call(x);
15636
- return true;
15651
+ null.error;
15637
15652
  } catch (e) {
15653
+ errorProto = getProto(getProto(e));
15654
+ INTRINSICS["%Error.prototype%"] = errorProto;
15638
15655
  }
15639
- return false;
15640
15656
  }
15641
- function isSet(x) {
15642
- if (!setSize || !x || typeof x !== "object") {
15643
- return false;
15644
- }
15645
- try {
15646
- setSize.call(x);
15647
- try {
15648
- mapSize.call(x);
15649
- } catch (m) {
15650
- return true;
15657
+ var errorProto;
15658
+ var doEval = function doEval2(name) {
15659
+ var value;
15660
+ if (name === "%AsyncFunction%") {
15661
+ value = getEvalledConstructor("async function () {}");
15662
+ } else if (name === "%GeneratorFunction%") {
15663
+ value = getEvalledConstructor("function* () {}");
15664
+ } else if (name === "%AsyncGeneratorFunction%") {
15665
+ value = getEvalledConstructor("async function* () {}");
15666
+ } else if (name === "%AsyncGenerator%") {
15667
+ var fn = doEval2("%AsyncGeneratorFunction%");
15668
+ if (fn) {
15669
+ value = fn.prototype;
15651
15670
  }
15652
- return x instanceof Set;
15653
- } catch (e) {
15654
- }
15655
- return false;
15656
- }
15657
- function isWeakSet(x) {
15658
- if (!weakSetHas || !x || typeof x !== "object") {
15659
- return false;
15660
- }
15661
- try {
15662
- weakSetHas.call(x, weakSetHas);
15663
- try {
15664
- weakMapHas.call(x, weakMapHas);
15665
- } catch (s) {
15666
- return true;
15671
+ } else if (name === "%AsyncIteratorPrototype%") {
15672
+ var gen = doEval2("%AsyncGenerator%");
15673
+ if (gen && getProto) {
15674
+ value = getProto(gen.prototype);
15667
15675
  }
15668
- return x instanceof WeakSet;
15669
- } catch (e) {
15670
- }
15671
- return false;
15672
- }
15673
- function isElement(x) {
15674
- if (!x || typeof x !== "object") {
15675
- return false;
15676
- }
15677
- if (typeof HTMLElement !== "undefined" && x instanceof HTMLElement) {
15678
- return true;
15679
15676
  }
15680
- return typeof x.nodeName === "string" && typeof x.getAttribute === "function";
15681
- }
15682
- function inspectString(str, opts) {
15683
- if (str.length > opts.maxStringLength) {
15684
- var remaining = str.length - opts.maxStringLength;
15685
- var trailer = "... " + remaining + " more character" + (remaining > 1 ? "s" : "");
15686
- return inspectString($slice.call(str, 0, opts.maxStringLength), opts) + trailer;
15677
+ INTRINSICS[name] = value;
15678
+ return value;
15679
+ };
15680
+ var LEGACY_ALIASES = {
15681
+ __proto__: null,
15682
+ "%ArrayBufferPrototype%": ["ArrayBuffer", "prototype"],
15683
+ "%ArrayPrototype%": ["Array", "prototype"],
15684
+ "%ArrayProto_entries%": ["Array", "prototype", "entries"],
15685
+ "%ArrayProto_forEach%": ["Array", "prototype", "forEach"],
15686
+ "%ArrayProto_keys%": ["Array", "prototype", "keys"],
15687
+ "%ArrayProto_values%": ["Array", "prototype", "values"],
15688
+ "%AsyncFunctionPrototype%": ["AsyncFunction", "prototype"],
15689
+ "%AsyncGenerator%": ["AsyncGeneratorFunction", "prototype"],
15690
+ "%AsyncGeneratorPrototype%": ["AsyncGeneratorFunction", "prototype", "prototype"],
15691
+ "%BooleanPrototype%": ["Boolean", "prototype"],
15692
+ "%DataViewPrototype%": ["DataView", "prototype"],
15693
+ "%DatePrototype%": ["Date", "prototype"],
15694
+ "%ErrorPrototype%": ["Error", "prototype"],
15695
+ "%EvalErrorPrototype%": ["EvalError", "prototype"],
15696
+ "%Float32ArrayPrototype%": ["Float32Array", "prototype"],
15697
+ "%Float64ArrayPrototype%": ["Float64Array", "prototype"],
15698
+ "%FunctionPrototype%": ["Function", "prototype"],
15699
+ "%Generator%": ["GeneratorFunction", "prototype"],
15700
+ "%GeneratorPrototype%": ["GeneratorFunction", "prototype", "prototype"],
15701
+ "%Int8ArrayPrototype%": ["Int8Array", "prototype"],
15702
+ "%Int16ArrayPrototype%": ["Int16Array", "prototype"],
15703
+ "%Int32ArrayPrototype%": ["Int32Array", "prototype"],
15704
+ "%JSONParse%": ["JSON", "parse"],
15705
+ "%JSONStringify%": ["JSON", "stringify"],
15706
+ "%MapPrototype%": ["Map", "prototype"],
15707
+ "%NumberPrototype%": ["Number", "prototype"],
15708
+ "%ObjectPrototype%": ["Object", "prototype"],
15709
+ "%ObjProto_toString%": ["Object", "prototype", "toString"],
15710
+ "%ObjProto_valueOf%": ["Object", "prototype", "valueOf"],
15711
+ "%PromisePrototype%": ["Promise", "prototype"],
15712
+ "%PromiseProto_then%": ["Promise", "prototype", "then"],
15713
+ "%Promise_all%": ["Promise", "all"],
15714
+ "%Promise_reject%": ["Promise", "reject"],
15715
+ "%Promise_resolve%": ["Promise", "resolve"],
15716
+ "%RangeErrorPrototype%": ["RangeError", "prototype"],
15717
+ "%ReferenceErrorPrototype%": ["ReferenceError", "prototype"],
15718
+ "%RegExpPrototype%": ["RegExp", "prototype"],
15719
+ "%SetPrototype%": ["Set", "prototype"],
15720
+ "%SharedArrayBufferPrototype%": ["SharedArrayBuffer", "prototype"],
15721
+ "%StringPrototype%": ["String", "prototype"],
15722
+ "%SymbolPrototype%": ["Symbol", "prototype"],
15723
+ "%SyntaxErrorPrototype%": ["SyntaxError", "prototype"],
15724
+ "%TypedArrayPrototype%": ["TypedArray", "prototype"],
15725
+ "%TypeErrorPrototype%": ["TypeError", "prototype"],
15726
+ "%Uint8ArrayPrototype%": ["Uint8Array", "prototype"],
15727
+ "%Uint8ClampedArrayPrototype%": ["Uint8ClampedArray", "prototype"],
15728
+ "%Uint16ArrayPrototype%": ["Uint16Array", "prototype"],
15729
+ "%Uint32ArrayPrototype%": ["Uint32Array", "prototype"],
15730
+ "%URIErrorPrototype%": ["URIError", "prototype"],
15731
+ "%WeakMapPrototype%": ["WeakMap", "prototype"],
15732
+ "%WeakSetPrototype%": ["WeakSet", "prototype"]
15733
+ };
15734
+ var bind = require_function_bind();
15735
+ var hasOwn = require_hasown();
15736
+ var $concat = bind.call($call, Array.prototype.concat);
15737
+ var $spliceApply = bind.call($apply, Array.prototype.splice);
15738
+ var $replace = bind.call($call, String.prototype.replace);
15739
+ var $strSlice = bind.call($call, String.prototype.slice);
15740
+ var $exec = bind.call($call, RegExp.prototype.exec);
15741
+ var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g;
15742
+ var reEscapeChar = /\\(\\)?/g;
15743
+ var stringToPath = function stringToPath2(string) {
15744
+ var first = $strSlice(string, 0, 1);
15745
+ var last = $strSlice(string, -1);
15746
+ if (first === "%" && last !== "%") {
15747
+ throw new $SyntaxError("invalid intrinsic syntax, expected closing `%`");
15748
+ } else if (last === "%" && first !== "%") {
15749
+ throw new $SyntaxError("invalid intrinsic syntax, expected opening `%`");
15687
15750
  }
15688
- var quoteRE = quoteREs[opts.quoteStyle || "single"];
15689
- quoteRE.lastIndex = 0;
15690
- var s = $replace.call($replace.call(str, quoteRE, "\\$1"), /[\x00-\x1f]/g, lowbyte);
15691
- return wrapQuotes(s, "single", opts);
15692
- }
15693
- function lowbyte(c) {
15694
- var n = c.charCodeAt(0);
15695
- var x = {
15696
- 8: "b",
15697
- 9: "t",
15698
- 10: "n",
15699
- 12: "f",
15700
- 13: "r"
15701
- }[n];
15702
- if (x) {
15703
- return "\\" + x;
15751
+ var result = [];
15752
+ $replace(string, rePropName, function(match, number, quote, subString) {
15753
+ result[result.length] = quote ? $replace(subString, reEscapeChar, "$1") : number || match;
15754
+ });
15755
+ return result;
15756
+ };
15757
+ var getBaseIntrinsic = function getBaseIntrinsic2(name, allowMissing) {
15758
+ var intrinsicName = name;
15759
+ var alias;
15760
+ if (hasOwn(LEGACY_ALIASES, intrinsicName)) {
15761
+ alias = LEGACY_ALIASES[intrinsicName];
15762
+ intrinsicName = "%" + alias[0] + "%";
15704
15763
  }
15705
- return "\\x" + (n < 16 ? "0" : "") + $toUpperCase.call(n.toString(16));
15706
- }
15707
- function markBoxed(str) {
15708
- return "Object(" + str + ")";
15709
- }
15710
- function weakCollectionOf(type) {
15711
- return type + " { ? }";
15712
- }
15713
- function collectionOf(type, size, entries, indent) {
15714
- var joinedEntries = indent ? indentedJoin(entries, indent) : $join.call(entries, ", ");
15715
- return type + " (" + size + ") {" + joinedEntries + "}";
15716
- }
15717
- function singleLineValues(xs) {
15718
- for (var i = 0; i < xs.length; i++) {
15719
- if (indexOf(xs[i], "\n") >= 0) {
15720
- return false;
15764
+ if (hasOwn(INTRINSICS, intrinsicName)) {
15765
+ var value = INTRINSICS[intrinsicName];
15766
+ if (value === needsEval) {
15767
+ value = doEval(intrinsicName);
15721
15768
  }
15769
+ if (typeof value === "undefined" && !allowMissing) {
15770
+ throw new $TypeError("intrinsic " + name + " exists, but is not available. Please file an issue!");
15771
+ }
15772
+ return {
15773
+ alias,
15774
+ name: intrinsicName,
15775
+ value
15776
+ };
15722
15777
  }
15723
- return true;
15724
- }
15725
- function getIndent(opts, depth) {
15726
- var baseIndent;
15727
- if (opts.indent === " ") {
15728
- baseIndent = " ";
15729
- } else if (typeof opts.indent === "number" && opts.indent > 0) {
15730
- baseIndent = $join.call(Array(opts.indent + 1), " ");
15731
- } else {
15732
- return null;
15778
+ throw new $SyntaxError("intrinsic " + name + " does not exist!");
15779
+ };
15780
+ module2.exports = function GetIntrinsic(name, allowMissing) {
15781
+ if (typeof name !== "string" || name.length === 0) {
15782
+ throw new $TypeError("intrinsic name must be a non-empty string");
15733
15783
  }
15734
- return {
15735
- base: baseIndent,
15736
- prev: $join.call(Array(depth + 1), baseIndent)
15737
- };
15738
- }
15739
- function indentedJoin(xs, indent) {
15740
- if (xs.length === 0) {
15741
- return "";
15784
+ if (arguments.length > 1 && typeof allowMissing !== "boolean") {
15785
+ throw new $TypeError('"allowMissing" argument must be a boolean');
15742
15786
  }
15743
- var lineJoiner = "\n" + indent.prev + indent.base;
15744
- return lineJoiner + $join.call(xs, "," + lineJoiner) + "\n" + indent.prev;
15745
- }
15746
- function arrObjKeys(obj, inspect) {
15747
- var isArr = isArray(obj);
15748
- var xs = [];
15749
- if (isArr) {
15750
- xs.length = obj.length;
15751
- for (var i = 0; i < obj.length; i++) {
15752
- xs[i] = has(obj, i) ? inspect(obj[i], obj) : "";
15753
- }
15787
+ if ($exec(/^%?[^%]*%?$/, name) === null) {
15788
+ throw new $SyntaxError("`%` may not be present anywhere but at the beginning and end of the intrinsic name");
15754
15789
  }
15755
- var syms = typeof gOPS === "function" ? gOPS(obj) : [];
15756
- var symMap;
15757
- if (hasShammedSymbols) {
15758
- symMap = {};
15759
- for (var k = 0; k < syms.length; k++) {
15760
- symMap["$" + syms[k]] = syms[k];
15761
- }
15790
+ var parts = stringToPath(name);
15791
+ var intrinsicBaseName = parts.length > 0 ? parts[0] : "";
15792
+ var intrinsic = getBaseIntrinsic("%" + intrinsicBaseName + "%", allowMissing);
15793
+ var intrinsicRealName = intrinsic.name;
15794
+ var value = intrinsic.value;
15795
+ var skipFurtherCaching = false;
15796
+ var alias = intrinsic.alias;
15797
+ if (alias) {
15798
+ intrinsicBaseName = alias[0];
15799
+ $spliceApply(parts, $concat([0, 1], alias));
15762
15800
  }
15763
- for (var key in obj) {
15764
- if (!has(obj, key)) {
15765
- continue;
15766
- }
15767
- if (isArr && String(Number(key)) === key && key < obj.length) {
15768
- continue;
15801
+ for (var i = 1, isOwn = true; i < parts.length; i += 1) {
15802
+ var part = parts[i];
15803
+ var first = $strSlice(part, 0, 1);
15804
+ var last = $strSlice(part, -1);
15805
+ if ((first === '"' || first === "'" || first === "`" || (last === '"' || last === "'" || last === "`")) && first !== last) {
15806
+ throw new $SyntaxError("property names with quotes must have matching quotes");
15769
15807
  }
15770
- if (hasShammedSymbols && symMap["$" + key] instanceof Symbol) {
15771
- continue;
15772
- } else if ($test.call(/[^\w$]/, key)) {
15773
- xs.push(inspect(key, obj) + ": " + inspect(obj[key], obj));
15774
- } else {
15775
- xs.push(key + ": " + inspect(obj[key], obj));
15808
+ if (part === "constructor" || !isOwn) {
15809
+ skipFurtherCaching = true;
15776
15810
  }
15777
- }
15778
- if (typeof gOPS === "function") {
15779
- for (var j = 0; j < syms.length; j++) {
15780
- if (isEnumerable.call(obj, syms[j])) {
15781
- xs.push("[" + inspect(syms[j]) + "]: " + inspect(obj[syms[j]], obj));
15811
+ intrinsicBaseName += "." + part;
15812
+ intrinsicRealName = "%" + intrinsicBaseName + "%";
15813
+ if (hasOwn(INTRINSICS, intrinsicRealName)) {
15814
+ value = INTRINSICS[intrinsicRealName];
15815
+ } else if (value != null) {
15816
+ if (!(part in value)) {
15817
+ if (!allowMissing) {
15818
+ throw new $TypeError("base intrinsic for " + name + " exists, but the property is not available.");
15819
+ }
15820
+ return void 0;
15821
+ }
15822
+ if ($gOPD && i + 1 >= parts.length) {
15823
+ var desc = $gOPD(value, part);
15824
+ isOwn = !!desc;
15825
+ if (isOwn && "get" in desc && !("originalValue" in desc.get)) {
15826
+ value = desc.get;
15827
+ } else {
15828
+ value = value[part];
15829
+ }
15830
+ } else {
15831
+ isOwn = hasOwn(value, part);
15832
+ value = value[part];
15833
+ }
15834
+ if (isOwn && !skipFurtherCaching) {
15835
+ INTRINSICS[intrinsicRealName] = value;
15782
15836
  }
15783
15837
  }
15784
15838
  }
15785
- return xs;
15786
- }
15839
+ return value;
15840
+ };
15787
15841
  }
15788
15842
  });
15789
15843
 
15790
- // node_modules/side-channel/index.js
15791
- var require_side_channel = __commonJS({
15792
- "node_modules/side-channel/index.js"(exports2, module2) {
15844
+ // node_modules/call-bound/index.js
15845
+ var require_call_bound = __commonJS({
15846
+ "node_modules/call-bound/index.js"(exports2, module2) {
15847
+ "use strict";
15848
+ var GetIntrinsic = require_get_intrinsic();
15849
+ var callBindBasic = require_call_bind_apply_helpers();
15850
+ var $indexOf = callBindBasic([GetIntrinsic("%String.prototype.indexOf%")]);
15851
+ module2.exports = function callBoundIntrinsic(name, allowMissing) {
15852
+ var intrinsic = (
15853
+ /** @type {Parameters<typeof callBindBasic>[0][0]} */
15854
+ GetIntrinsic(name, !!allowMissing)
15855
+ );
15856
+ if (typeof intrinsic === "function" && $indexOf(name, ".prototype.") > -1) {
15857
+ return callBindBasic([intrinsic]);
15858
+ }
15859
+ return intrinsic;
15860
+ };
15861
+ }
15862
+ });
15863
+
15864
+ // node_modules/side-channel-map/index.js
15865
+ var require_side_channel_map = __commonJS({
15866
+ "node_modules/side-channel-map/index.js"(exports2, module2) {
15793
15867
  "use strict";
15794
15868
  var GetIntrinsic = require_get_intrinsic();
15795
- var callBound = require_callBound();
15869
+ var callBound = require_call_bound();
15796
15870
  var inspect = require_object_inspect();
15797
15871
  var $TypeError = require_type();
15798
- var $WeakMap = GetIntrinsic("%WeakMap%", true);
15799
15872
  var $Map = GetIntrinsic("%Map%", true);
15800
- var $weakMapGet = callBound("WeakMap.prototype.get", true);
15801
- var $weakMapSet = callBound("WeakMap.prototype.set", true);
15802
- var $weakMapHas = callBound("WeakMap.prototype.has", true);
15803
15873
  var $mapGet = callBound("Map.prototype.get", true);
15804
15874
  var $mapSet = callBound("Map.prototype.set", true);
15805
15875
  var $mapHas = callBound("Map.prototype.has", true);
15806
- var listGetNode = function(list, key) {
15807
- var prev = list;
15808
- var curr;
15809
- for (; (curr = prev.next) !== null; prev = curr) {
15810
- if (curr.key === key) {
15811
- prev.next = curr.next;
15812
- curr.next = /** @type {NonNullable<typeof list.next>} */
15813
- list.next;
15814
- list.next = curr;
15815
- return curr;
15816
- }
15817
- }
15818
- };
15819
- var listGet = function(objects, key) {
15820
- var node = listGetNode(objects, key);
15821
- return node && node.value;
15822
- };
15823
- var listSet = function(objects, key, value) {
15824
- var node = listGetNode(objects, key);
15825
- if (node) {
15826
- node.value = value;
15827
- } else {
15828
- objects.next = /** @type {import('.').ListNode<typeof value>} */
15829
- {
15830
- // eslint-disable-line no-param-reassign, no-extra-parens
15831
- key,
15832
- next: objects.next,
15833
- value
15834
- };
15835
- }
15836
- };
15837
- var listHas = function(objects, key) {
15838
- return !!listGetNode(objects, key);
15839
- };
15840
- module2.exports = function getSideChannel() {
15841
- var $wm;
15876
+ var $mapDelete = callBound("Map.prototype.delete", true);
15877
+ var $mapSize = callBound("Map.prototype.size", true);
15878
+ module2.exports = !!$Map && /** @type {Exclude<import('.'), false>} */
15879
+ function getSideChannelMap() {
15842
15880
  var $m;
15843
- var $o;
15844
15881
  var channel = {
15845
15882
  assert: function(key) {
15846
15883
  if (!channel.has(key)) {
15847
15884
  throw new $TypeError("Side channel does not contain " + inspect(key));
15848
15885
  }
15849
15886
  },
15850
- get: function(key) {
15851
- if ($WeakMap && key && (typeof key === "object" || typeof key === "function")) {
15852
- if ($wm) {
15853
- return $weakMapGet($wm, key);
15854
- }
15855
- } else if ($Map) {
15856
- if ($m) {
15857
- return $mapGet($m, key);
15858
- }
15859
- } else {
15860
- if ($o) {
15861
- return listGet($o, key);
15887
+ "delete": function(key) {
15888
+ if ($m) {
15889
+ var result = $mapDelete($m, key);
15890
+ if ($mapSize($m) === 0) {
15891
+ $m = void 0;
15862
15892
  }
15893
+ return result;
15894
+ }
15895
+ return false;
15896
+ },
15897
+ get: function(key) {
15898
+ if ($m) {
15899
+ return $mapGet($m, key);
15863
15900
  }
15864
15901
  },
15865
15902
  has: function(key) {
15866
- if ($WeakMap && key && (typeof key === "object" || typeof key === "function")) {
15867
- if ($wm) {
15868
- return $weakMapHas($wm, key);
15869
- }
15870
- } else if ($Map) {
15871
- if ($m) {
15872
- return $mapHas($m, key);
15873
- }
15874
- } else {
15875
- if ($o) {
15876
- return listHas($o, key);
15877
- }
15903
+ if ($m) {
15904
+ return $mapHas($m, key);
15878
15905
  }
15879
15906
  return false;
15880
15907
  },
15881
15908
  set: function(key, value) {
15882
- if ($WeakMap && key && (typeof key === "object" || typeof key === "function")) {
15883
- if (!$wm) {
15884
- $wm = new $WeakMap();
15909
+ if (!$m) {
15910
+ $m = new $Map();
15911
+ }
15912
+ $mapSet($m, key, value);
15913
+ }
15914
+ };
15915
+ return channel;
15916
+ };
15917
+ }
15918
+ });
15919
+
15920
+ // node_modules/side-channel-weakmap/index.js
15921
+ var require_side_channel_weakmap = __commonJS({
15922
+ "node_modules/side-channel-weakmap/index.js"(exports2, module2) {
15923
+ "use strict";
15924
+ var GetIntrinsic = require_get_intrinsic();
15925
+ var callBound = require_call_bound();
15926
+ var inspect = require_object_inspect();
15927
+ var getSideChannelMap = require_side_channel_map();
15928
+ var $TypeError = require_type();
15929
+ var $WeakMap = GetIntrinsic("%WeakMap%", true);
15930
+ var $weakMapGet = callBound("WeakMap.prototype.get", true);
15931
+ var $weakMapSet = callBound("WeakMap.prototype.set", true);
15932
+ var $weakMapHas = callBound("WeakMap.prototype.has", true);
15933
+ var $weakMapDelete = callBound("WeakMap.prototype.delete", true);
15934
+ module2.exports = $WeakMap ? (
15935
+ /** @type {Exclude<import('.'), false>} */
15936
+ function getSideChannelWeakMap() {
15937
+ var $wm;
15938
+ var $m;
15939
+ var channel = {
15940
+ assert: function(key) {
15941
+ if (!channel.has(key)) {
15942
+ throw new $TypeError("Side channel does not contain " + inspect(key));
15943
+ }
15944
+ },
15945
+ "delete": function(key) {
15946
+ if ($WeakMap && key && (typeof key === "object" || typeof key === "function")) {
15947
+ if ($wm) {
15948
+ return $weakMapDelete($wm, key);
15949
+ }
15950
+ } else if (getSideChannelMap) {
15951
+ if ($m) {
15952
+ return $m["delete"](key);
15953
+ }
15885
15954
  }
15886
- $weakMapSet($wm, key, value);
15887
- } else if ($Map) {
15888
- if (!$m) {
15889
- $m = new $Map();
15955
+ return false;
15956
+ },
15957
+ get: function(key) {
15958
+ if ($WeakMap && key && (typeof key === "object" || typeof key === "function")) {
15959
+ if ($wm) {
15960
+ return $weakMapGet($wm, key);
15961
+ }
15890
15962
  }
15891
- $mapSet($m, key, value);
15892
- } else {
15893
- if (!$o) {
15894
- $o = { key: {}, next: null };
15963
+ return $m && $m.get(key);
15964
+ },
15965
+ has: function(key) {
15966
+ if ($WeakMap && key && (typeof key === "object" || typeof key === "function")) {
15967
+ if ($wm) {
15968
+ return $weakMapHas($wm, key);
15969
+ }
15970
+ }
15971
+ return !!$m && $m.has(key);
15972
+ },
15973
+ set: function(key, value) {
15974
+ if ($WeakMap && key && (typeof key === "object" || typeof key === "function")) {
15975
+ if (!$wm) {
15976
+ $wm = new $WeakMap();
15977
+ }
15978
+ $weakMapSet($wm, key, value);
15979
+ } else if (getSideChannelMap) {
15980
+ if (!$m) {
15981
+ $m = getSideChannelMap();
15982
+ }
15983
+ $m.set(key, value);
15895
15984
  }
15896
- listSet($o, key, value);
15897
15985
  }
15986
+ };
15987
+ return channel;
15988
+ }
15989
+ ) : getSideChannelMap;
15990
+ }
15991
+ });
15992
+
15993
+ // node_modules/side-channel/index.js
15994
+ var require_side_channel = __commonJS({
15995
+ "node_modules/side-channel/index.js"(exports2, module2) {
15996
+ "use strict";
15997
+ var $TypeError = require_type();
15998
+ var inspect = require_object_inspect();
15999
+ var getSideChannelList = require_side_channel_list();
16000
+ var getSideChannelMap = require_side_channel_map();
16001
+ var getSideChannelWeakMap = require_side_channel_weakmap();
16002
+ var makeChannel = getSideChannelWeakMap || getSideChannelMap || getSideChannelList;
16003
+ module2.exports = function getSideChannel() {
16004
+ var $channelData;
16005
+ var channel = {
16006
+ assert: function(key) {
16007
+ if (!channel.has(key)) {
16008
+ throw new $TypeError("Side channel does not contain " + inspect(key));
16009
+ }
16010
+ },
16011
+ "delete": function(key) {
16012
+ return !!$channelData && $channelData["delete"](key);
16013
+ },
16014
+ get: function(key) {
16015
+ return $channelData && $channelData.get(key);
16016
+ },
16017
+ has: function(key) {
16018
+ return !!$channelData && $channelData.has(key);
16019
+ },
16020
+ set: function(key, value) {
16021
+ if (!$channelData) {
16022
+ $channelData = makeChannel();
16023
+ }
16024
+ $channelData.set(key, value);
15898
16025
  }
15899
16026
  };
15900
16027
  return channel;
@@ -18161,20 +18288,29 @@ var require_path_to_regexp = __commonJS({
18161
18288
  });
18162
18289
  return new RegExp(path.join("|"), flags);
18163
18290
  }
18291
+ if (typeof path !== "string") {
18292
+ throw new TypeError("path must be a string, array of strings, or regular expression");
18293
+ }
18164
18294
  path = path.replace(
18165
18295
  /\\.|(\/)?(\.)?:(\w+)(\(.*?\))?(\*)?(\?)?|[.*]|\/\(/g,
18166
18296
  function(match, slash, format, key, capture, star, optional, offset) {
18167
- pos = offset + match.length;
18168
18297
  if (match[0] === "\\") {
18169
18298
  backtrack += match;
18299
+ pos += 2;
18170
18300
  return match;
18171
18301
  }
18172
18302
  if (match === ".") {
18173
18303
  backtrack += "\\.";
18174
18304
  extraOffset += 1;
18305
+ pos += 1;
18175
18306
  return "\\.";
18176
18307
  }
18177
- backtrack = slash || format ? "" : path.slice(pos, offset);
18308
+ if (slash || format) {
18309
+ backtrack = "";
18310
+ } else {
18311
+ backtrack += path.slice(pos, offset);
18312
+ }
18313
+ pos = offset + match.length;
18178
18314
  if (match === "*") {
18179
18315
  extraOffset += 3;
18180
18316
  return "(.*)";
@@ -24997,6 +25133,127 @@ var sortSteps = (steps) => {
24997
25133
  return [...steps].sort((step, stepOther) => getStepId(step) - getStepId(stepOther));
24998
25134
  };
24999
25135
 
25136
+ // src/context/api/anthropic.ts
25137
+ var import_qstash4 = require("@upstash/qstash");
25138
+
25139
+ // src/context/provider.ts
25140
+ var getProviderInfo = (api) => {
25141
+ if (!api.provider) {
25142
+ throw new WorkflowError("A Provider must be provided.");
25143
+ }
25144
+ if (api.provider.owner === "upstash") {
25145
+ throw new WorkflowError("Upstash provider isn't supported.");
25146
+ }
25147
+ const { name, provider, ...parameters } = api;
25148
+ if (!provider.baseUrl) throw new TypeError("baseUrl cannot be empty or undefined!");
25149
+ if (!provider.token) throw new TypeError("token cannot be empty or undefined!");
25150
+ if (provider.apiKind !== name) {
25151
+ throw new TypeError(`Unexpected api name. Expected '${provider.apiKind}', received ${name}`);
25152
+ }
25153
+ const providerInfo = {
25154
+ url: provider.getUrl(),
25155
+ baseUrl: provider.baseUrl,
25156
+ route: provider.getRoute(),
25157
+ appendHeaders: provider.getHeaders(parameters),
25158
+ owner: provider.owner,
25159
+ method: provider.method
25160
+ };
25161
+ return provider.onFinish(providerInfo, parameters);
25162
+ };
25163
+
25164
+ // src/context/api/base.ts
25165
+ var BaseWorkflowApi = class {
25166
+ context;
25167
+ constructor({ context }) {
25168
+ this.context = context;
25169
+ }
25170
+ /**
25171
+ * context.call which uses a QStash API
25172
+ *
25173
+ * @param stepName
25174
+ * @param settings
25175
+ * @returns
25176
+ */
25177
+ async callApi(stepName, settings) {
25178
+ const { url, appendHeaders, method } = getProviderInfo(settings.api);
25179
+ const { method: userMethod, body, headers = {}, retries = 0, timeout } = settings;
25180
+ return await this.context.call(stepName, {
25181
+ url,
25182
+ method: userMethod ?? method,
25183
+ body,
25184
+ headers: {
25185
+ ...appendHeaders,
25186
+ ...headers
25187
+ },
25188
+ retries,
25189
+ timeout
25190
+ });
25191
+ }
25192
+ };
25193
+
25194
+ // src/context/api/anthropic.ts
25195
+ var AnthropicAPI = class extends BaseWorkflowApi {
25196
+ async call(stepName, settings) {
25197
+ const { token, operation, ...parameters } = settings;
25198
+ return await this.callApi(stepName, {
25199
+ api: {
25200
+ name: "llm",
25201
+ provider: (0, import_qstash4.anthropic)({ token })
25202
+ },
25203
+ ...parameters
25204
+ });
25205
+ }
25206
+ };
25207
+
25208
+ // src/context/api/openai.ts
25209
+ var import_qstash5 = require("@upstash/qstash");
25210
+ var OpenAIAPI = class extends BaseWorkflowApi {
25211
+ async call(stepName, settings) {
25212
+ const { token, organization, operation, ...parameters } = settings;
25213
+ return await this.callApi(stepName, {
25214
+ api: {
25215
+ name: "llm",
25216
+ provider: (0, import_qstash5.openai)({ token, organization })
25217
+ },
25218
+ ...parameters
25219
+ });
25220
+ }
25221
+ };
25222
+
25223
+ // src/context/api/resend.ts
25224
+ var import_qstash6 = require("@upstash/qstash");
25225
+ var ResendAPI = class extends BaseWorkflowApi {
25226
+ async call(stepName, settings) {
25227
+ const { token, batch = false, ...parameters } = settings;
25228
+ return await this.callApi(stepName, {
25229
+ api: {
25230
+ name: "email",
25231
+ provider: (0, import_qstash6.resend)({ token, batch })
25232
+ },
25233
+ ...parameters
25234
+ });
25235
+ }
25236
+ };
25237
+
25238
+ // src/context/api/index.ts
25239
+ var WorkflowApi = class extends BaseWorkflowApi {
25240
+ get openai() {
25241
+ return new OpenAIAPI({
25242
+ context: this.context
25243
+ });
25244
+ }
25245
+ get resend() {
25246
+ return new ResendAPI({
25247
+ context: this.context
25248
+ });
25249
+ }
25250
+ get anthropic() {
25251
+ return new AnthropicAPI({
25252
+ context: this.context
25253
+ });
25254
+ }
25255
+ };
25256
+
25000
25257
  // src/context/context.ts
25001
25258
  var WorkflowContext = class {
25002
25259
  executor;
@@ -25376,6 +25633,11 @@ var WorkflowContext = class {
25376
25633
  async addStep(step) {
25377
25634
  return await this.executor.addStep(step);
25378
25635
  }
25636
+ get api() {
25637
+ return new WorkflowApi({
25638
+ context: this
25639
+ });
25640
+ }
25379
25641
  };
25380
25642
 
25381
25643
  // src/logger.ts
@@ -25453,7 +25715,7 @@ function decodeBase64(base64) {
25453
25715
  }
25454
25716
 
25455
25717
  // src/serve/authorization.ts
25456
- var import_qstash4 = require("@upstash/qstash");
25718
+ var import_qstash7 = require("@upstash/qstash");
25457
25719
  var DisabledWorkflowContext = class _DisabledWorkflowContext extends WorkflowContext {
25458
25720
  static disabledMessage = "disabled-qstash-worklfow-run";
25459
25721
  /**
@@ -25484,7 +25746,7 @@ var DisabledWorkflowContext = class _DisabledWorkflowContext extends WorkflowCon
25484
25746
  */
25485
25747
  static async tryAuthentication(routeFunction, context) {
25486
25748
  const disabledContext = new _DisabledWorkflowContext({
25487
- qstashClient: new import_qstash4.Client({
25749
+ qstashClient: new import_qstash7.Client({
25488
25750
  baseUrl: "disabled-client",
25489
25751
  token: "disabled-client"
25490
25752
  }),
@@ -25698,15 +25960,15 @@ var handleFailure = async (request, requestPayload, qstashClient, initialPayload
25698
25960
  };
25699
25961
 
25700
25962
  // src/serve/options.ts
25701
- var import_qstash5 = require("@upstash/qstash");
25702
- var import_qstash6 = require("@upstash/qstash");
25963
+ var import_qstash8 = require("@upstash/qstash");
25964
+ var import_qstash9 = require("@upstash/qstash");
25703
25965
  var processOptions = (options) => {
25704
25966
  const environment = options?.env ?? (typeof process === "undefined" ? {} : process.env);
25705
25967
  const receiverEnvironmentVariablesSet = Boolean(
25706
25968
  environment.QSTASH_CURRENT_SIGNING_KEY && environment.QSTASH_NEXT_SIGNING_KEY
25707
25969
  );
25708
25970
  return {
25709
- qstashClient: new import_qstash6.Client({
25971
+ qstashClient: new import_qstash9.Client({
25710
25972
  baseUrl: environment.QSTASH_URL,
25711
25973
  token: environment.QSTASH_TOKEN
25712
25974
  }),
@@ -25740,7 +26002,7 @@ var processOptions = (options) => {
25740
26002
  throw error;
25741
26003
  }
25742
26004
  },
25743
- receiver: receiverEnvironmentVariablesSet ? new import_qstash5.Receiver({
26005
+ receiver: receiverEnvironmentVariablesSet ? new import_qstash8.Receiver({
25744
26006
  currentSigningKey: environment.QSTASH_CURRENT_SIGNING_KEY,
25745
26007
  nextSigningKey: environment.QSTASH_NEXT_SIGNING_KEY
25746
26008
  }) : void 0,