appwrite-cli 13.4.0 → 13.5.0

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.
Files changed (39) hide show
  1. package/CHANGELOG.md +5 -0
  2. package/README.md +2 -2
  3. package/dist/bundle-win-arm64.mjs +1183 -2231
  4. package/dist/cli.cjs +1183 -2231
  5. package/dist/index.cjs +109626 -0
  6. package/dist/index.d.ts +1 -0
  7. package/dist/index.d.ts.map +1 -1
  8. package/dist/index.js +762 -1832
  9. package/dist/lib/commands/generators/base.d.ts +16 -5
  10. package/dist/lib/commands/generators/base.d.ts.map +1 -1
  11. package/dist/lib/commands/generators/typescript/databases.d.ts.map +1 -1
  12. package/dist/lib/commands/push.d.ts +1 -0
  13. package/dist/lib/commands/push.d.ts.map +1 -1
  14. package/dist/lib/commands/utils/attributes.d.ts +3 -1
  15. package/dist/lib/commands/utils/attributes.d.ts.map +1 -1
  16. package/dist/lib/commands/utils/pools.d.ts +3 -1
  17. package/dist/lib/commands/utils/pools.d.ts.map +1 -1
  18. package/dist/lib/constants.d.ts +1 -1
  19. package/dist/lib/json.d.ts.map +1 -1
  20. package/dist/lib/utils.d.ts +1 -0
  21. package/dist/lib/utils.d.ts.map +1 -1
  22. package/docs/examples/projects/create-schedule.md +7 -0
  23. package/docs/examples/projects/get-schedule.md +5 -0
  24. package/docs/examples/projects/list-schedules.md +4 -0
  25. package/index.ts +1 -0
  26. package/install.ps1 +2 -2
  27. package/install.sh +1 -1
  28. package/lib/commands/generators/base.ts +30 -9
  29. package/lib/commands/generators/typescript/databases.ts +12 -18
  30. package/lib/commands/push.ts +276 -201
  31. package/lib/commands/services/migrations.ts +1 -1
  32. package/lib/commands/services/projects.ts +51 -0
  33. package/lib/commands/utils/attributes.ts +9 -6
  34. package/lib/commands/utils/pools.ts +9 -6
  35. package/lib/constants.ts +1 -1
  36. package/lib/json.ts +8 -6
  37. package/lib/utils.ts +15 -0
  38. package/package.json +19 -5
  39. package/scoop/appwrite.config.json +3 -3
package/dist/index.js CHANGED
@@ -19605,7 +19605,6 @@ var require_safe_buffer = __commonJS({
19605
19605
  function SafeBuffer(arg, encodingOrOffset, length) {
19606
19606
  return Buffer2(arg, encodingOrOffset, length);
19607
19607
  }
19608
- SafeBuffer.prototype = Object.create(Buffer2.prototype);
19609
19608
  copyProps(Buffer2, SafeBuffer);
19610
19609
  SafeBuffer.from = function(arg, encodingOrOffset, length) {
19611
19610
  if (typeof arg === "number") {
@@ -52608,14 +52607,14 @@ var require_undici = __commonJS({
52608
52607
  }
52609
52608
  });
52610
52609
 
52611
- // node_modules/json-bigint/node_modules/bignumber.js/bignumber.js
52610
+ // node_modules/bignumber.js/bignumber.js
52612
52611
  var require_bignumber = __commonJS({
52613
- "node_modules/json-bigint/node_modules/bignumber.js/bignumber.js"(exports, module) {
52612
+ "node_modules/bignumber.js/bignumber.js"(exports, module) {
52614
52613
  (function(globalObject) {
52615
52614
  "use strict";
52616
- var BigNumber2, isNumeric = /^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i, mathceil = Math.ceil, mathfloor = Math.floor, bignumberError = "[BigNumber Error] ", tooManyDigits = bignumberError + "Number primitive has more than 15 significant digits: ", BASE = 1e14, LOG_BASE = 14, MAX_SAFE_INTEGER = 9007199254740991, POWS_TEN = [1, 10, 100, 1e3, 1e4, 1e5, 1e6, 1e7, 1e8, 1e9, 1e10, 1e11, 1e12, 1e13], SQRT_BASE = 1e7, MAX = 1e9;
52615
+ var BigNumber, isNumeric = /^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i, mathceil = Math.ceil, mathfloor = Math.floor, bignumberError = "[BigNumber Error] ", tooManyDigits = bignumberError + "Number primitive has more than 15 significant digits: ", BASE = 1e14, LOG_BASE = 14, MAX_SAFE_INTEGER = 9007199254740991, POWS_TEN = [1, 10, 100, 1e3, 1e4, 1e5, 1e6, 1e7, 1e8, 1e9, 1e10, 1e11, 1e12, 1e13], SQRT_BASE = 1e7, MAX = 1e9;
52617
52616
  function clone2(configObject) {
52618
- var div, convertBase, parseNumeric, P = BigNumber3.prototype = { constructor: BigNumber3, toString: null, valueOf: null }, ONE = new BigNumber3(1), DECIMAL_PLACES = 20, ROUNDING_MODE = 4, TO_EXP_NEG = -7, TO_EXP_POS = 21, MIN_EXP = -1e7, MAX_EXP = 1e7, CRYPTO = false, MODULO_MODE = 1, POW_PRECISION = 0, FORMAT = {
52617
+ var div, convertBase, parseNumeric, P = BigNumber2.prototype = { constructor: BigNumber2, toString: null, valueOf: null }, ONE = new BigNumber2(1), DECIMAL_PLACES = 20, ROUNDING_MODE = 4, TO_EXP_NEG = -7, TO_EXP_POS = 21, MIN_EXP = -1e7, MAX_EXP = 1e7, CRYPTO = false, MODULO_MODE = 1, POW_PRECISION = 0, FORMAT = {
52619
52618
  prefix: "",
52620
52619
  groupSize: 3,
52621
52620
  secondaryGroupSize: 0,
@@ -52626,9 +52625,9 @@ var require_bignumber = __commonJS({
52626
52625
  // non-breaking space
52627
52626
  suffix: ""
52628
52627
  }, ALPHABET = "0123456789abcdefghijklmnopqrstuvwxyz", alphabetHasNormalDecimalDigits = true;
52629
- function BigNumber3(v, b) {
52628
+ function BigNumber2(v, b) {
52630
52629
  var alphabet, c, caseChanged, e, i, isNum, len, str, x = this;
52631
- if (!(x instanceof BigNumber3)) return new BigNumber3(v, b);
52630
+ if (!(x instanceof BigNumber2)) return new BigNumber2(v, b);
52632
52631
  if (b == null) {
52633
52632
  if (v && v._isBigNumber === true) {
52634
52633
  x.s = v.s;
@@ -52670,14 +52669,14 @@ var require_bignumber = __commonJS({
52670
52669
  } else {
52671
52670
  intCheck(b, 2, ALPHABET.length, "Base");
52672
52671
  if (b == 10 && alphabetHasNormalDecimalDigits) {
52673
- x = new BigNumber3(v);
52672
+ x = new BigNumber2(v);
52674
52673
  return round(x, DECIMAL_PLACES + x.e + 1, ROUNDING_MODE);
52675
52674
  }
52676
52675
  str = String(v);
52677
52676
  if (isNum = typeof v == "number") {
52678
52677
  if (v * 0 != 0) return parseNumeric(x, str, isNum, b);
52679
52678
  x.s = 1 / v < 0 ? (str = str.slice(1), -1) : 1;
52680
- if (BigNumber3.DEBUG && str.replace(/^0\.0*|\./, "").length > 15) {
52679
+ if (BigNumber2.DEBUG && str.replace(/^0\.0*|\./, "").length > 15) {
52681
52680
  throw Error(tooManyDigits + v);
52682
52681
  }
52683
52682
  } else {
@@ -52712,7 +52711,7 @@ var require_bignumber = __commonJS({
52712
52711
  for (len = str.length; str.charCodeAt(--len) === 48; ) ;
52713
52712
  if (str = str.slice(i, ++len)) {
52714
52713
  len -= i;
52715
- if (isNum && BigNumber3.DEBUG && len > 15 && (v > MAX_SAFE_INTEGER || v !== mathfloor(v))) {
52714
+ if (isNum && BigNumber2.DEBUG && len > 15 && (v > MAX_SAFE_INTEGER || v !== mathfloor(v))) {
52716
52715
  throw Error(tooManyDigits + x.s * v);
52717
52716
  }
52718
52717
  if ((e = e - i - 1) > MAX_EXP) {
@@ -52740,18 +52739,18 @@ var require_bignumber = __commonJS({
52740
52739
  x.c = [x.e = 0];
52741
52740
  }
52742
52741
  }
52743
- BigNumber3.clone = clone2;
52744
- BigNumber3.ROUND_UP = 0;
52745
- BigNumber3.ROUND_DOWN = 1;
52746
- BigNumber3.ROUND_CEIL = 2;
52747
- BigNumber3.ROUND_FLOOR = 3;
52748
- BigNumber3.ROUND_HALF_UP = 4;
52749
- BigNumber3.ROUND_HALF_DOWN = 5;
52750
- BigNumber3.ROUND_HALF_EVEN = 6;
52751
- BigNumber3.ROUND_HALF_CEIL = 7;
52752
- BigNumber3.ROUND_HALF_FLOOR = 8;
52753
- BigNumber3.EUCLID = 9;
52754
- BigNumber3.config = BigNumber3.set = function(obj) {
52742
+ BigNumber2.clone = clone2;
52743
+ BigNumber2.ROUND_UP = 0;
52744
+ BigNumber2.ROUND_DOWN = 1;
52745
+ BigNumber2.ROUND_CEIL = 2;
52746
+ BigNumber2.ROUND_FLOOR = 3;
52747
+ BigNumber2.ROUND_HALF_UP = 4;
52748
+ BigNumber2.ROUND_HALF_DOWN = 5;
52749
+ BigNumber2.ROUND_HALF_EVEN = 6;
52750
+ BigNumber2.ROUND_HALF_CEIL = 7;
52751
+ BigNumber2.ROUND_HALF_FLOOR = 8;
52752
+ BigNumber2.EUCLID = 9;
52753
+ BigNumber2.config = BigNumber2.set = function(obj) {
52755
52754
  var p, v;
52756
52755
  if (obj != null) {
52757
52756
  if (typeof obj == "object") {
@@ -52850,9 +52849,9 @@ var require_bignumber = __commonJS({
52850
52849
  ALPHABET
52851
52850
  };
52852
52851
  };
52853
- BigNumber3.isBigNumber = function(v) {
52852
+ BigNumber2.isBigNumber = function(v) {
52854
52853
  if (!v || v._isBigNumber !== true) return false;
52855
- if (!BigNumber3.DEBUG) return true;
52854
+ if (!BigNumber2.DEBUG) return true;
52856
52855
  var i, n, c = v.c, e = v.e, s = v.s;
52857
52856
  out: if ({}.toString.call(c) == "[object Array]") {
52858
52857
  if ((s === 1 || s === -1) && e >= -MAX && e <= MAX && e === mathfloor(e)) {
@@ -52875,13 +52874,13 @@ var require_bignumber = __commonJS({
52875
52874
  }
52876
52875
  throw Error(bignumberError + "Invalid BigNumber: " + v);
52877
52876
  };
52878
- BigNumber3.maximum = BigNumber3.max = function() {
52877
+ BigNumber2.maximum = BigNumber2.max = function() {
52879
52878
  return maxOrMin(arguments, -1);
52880
52879
  };
52881
- BigNumber3.minimum = BigNumber3.min = function() {
52880
+ BigNumber2.minimum = BigNumber2.min = function() {
52882
52881
  return maxOrMin(arguments, 1);
52883
52882
  };
52884
- BigNumber3.random = (function() {
52883
+ BigNumber2.random = (function() {
52885
52884
  var pow2_53 = 9007199254740992;
52886
52885
  var random53bitInt = Math.random() * pow2_53 & 2097151 ? function() {
52887
52886
  return mathfloor(Math.random() * pow2_53);
@@ -52889,7 +52888,7 @@ var require_bignumber = __commonJS({
52889
52888
  return (Math.random() * 1073741824 | 0) * 8388608 + (Math.random() * 8388608 | 0);
52890
52889
  };
52891
52890
  return function(dp) {
52892
- var a, b, e, k, v, i = 0, c = [], rand = new BigNumber3(ONE);
52891
+ var a, b, e, k, v, i = 0, c = [], rand = new BigNumber2(ONE);
52893
52892
  if (dp == null) dp = DECIMAL_PLACES;
52894
52893
  else intCheck(dp, 0, MAX);
52895
52894
  k = mathceil(dp / LOG_BASE);
@@ -52950,8 +52949,8 @@ var require_bignumber = __commonJS({
52950
52949
  return rand;
52951
52950
  };
52952
52951
  })();
52953
- BigNumber3.sum = function() {
52954
- var i = 1, args = arguments, sum = new BigNumber3(args[0]);
52952
+ BigNumber2.sum = function() {
52953
+ var i = 1, args = arguments, sum = new BigNumber2(args[0]);
52955
52954
  for (; i < args.length; ) sum = sum.plus(args[i++]);
52956
52955
  return sum;
52957
52956
  };
@@ -52978,7 +52977,7 @@ var require_bignumber = __commonJS({
52978
52977
  k = POW_PRECISION;
52979
52978
  POW_PRECISION = 0;
52980
52979
  str = str.replace(".", "");
52981
- y = new BigNumber3(baseIn);
52980
+ y = new BigNumber2(baseIn);
52982
52981
  x = y.pow(str.length - i);
52983
52982
  POW_PRECISION = k;
52984
52983
  y.c = toBaseOut(
@@ -53069,7 +53068,7 @@ var require_bignumber = __commonJS({
53069
53068
  return function(x, y, dp, rm, base) {
53070
53069
  var cmp, e, i, more, n, prod, prodL, q, qc, rem, remL, rem0, xi, xL, yc0, yL, yz, s = x.s == y.s ? 1 : -1, xc = x.c, yc = y.c;
53071
53070
  if (!xc || !xc[0] || !yc || !yc[0]) {
53072
- return new BigNumber3(
53071
+ return new BigNumber2(
53073
53072
  // Return NaN if either NaN, or both Infinity or 0.
53074
53073
  !x.s || !y.s || (xc ? yc && xc[0] == yc[0] : !yc) ? NaN : (
53075
53074
  // Return ±0 if x is ±0 or y is ±Infinity, or return ±Infinity as y is ±0.
@@ -53077,7 +53076,7 @@ var require_bignumber = __commonJS({
53077
53076
  )
53078
53077
  );
53079
53078
  }
53080
- q = new BigNumber3(s);
53079
+ q = new BigNumber2(s);
53081
53080
  qc = q.c = [];
53082
53081
  e = x.e - y.e;
53083
53082
  s = dp + e + 1;
@@ -53182,7 +53181,7 @@ var require_bignumber = __commonJS({
53182
53181
  str = coeffToString(n.c);
53183
53182
  str = id == 1 || id == 2 && (ne <= TO_EXP_NEG || ne >= TO_EXP_POS) ? toExponential(str, ne) : toFixedPoint(str, ne, "0");
53184
53183
  } else {
53185
- n = round(new BigNumber3(n), i, rm);
53184
+ n = round(new BigNumber2(n), i, rm);
53186
53185
  e = n.e;
53187
53186
  str = coeffToString(n.c);
53188
53187
  len = str.length;
@@ -53206,9 +53205,9 @@ var require_bignumber = __commonJS({
53206
53205
  return n.s < 0 && c0 ? "-" + str : str;
53207
53206
  }
53208
53207
  function maxOrMin(args, n) {
53209
- var k, y, i = 1, x = new BigNumber3(args[0]);
53208
+ var k, y, i = 1, x = new BigNumber2(args[0]);
53210
53209
  for (; i < args.length; i++) {
53211
- y = new BigNumber3(args[i]);
53210
+ y = new BigNumber2(args[i]);
53212
53211
  if (!y.s || (k = compare(x, y)) === n || k === 0 && x.s === n) {
53213
53212
  x = y;
53214
53213
  }
@@ -53245,9 +53244,9 @@ var require_bignumber = __commonJS({
53245
53244
  base = b;
53246
53245
  s = s.replace(dotAfter, "$1").replace(dotBefore, "0.$1");
53247
53246
  }
53248
- if (str != s) return new BigNumber3(s, base);
53247
+ if (str != s) return new BigNumber2(s, base);
53249
53248
  }
53250
- if (BigNumber3.DEBUG) {
53249
+ if (BigNumber2.DEBUG) {
53251
53250
  throw Error(bignumberError + "Not a" + (b ? " base " + b : "") + " number: " + str);
53252
53251
  }
53253
53252
  x.s = null;
@@ -53349,12 +53348,12 @@ var require_bignumber = __commonJS({
53349
53348
  return n.s < 0 ? "-" + str : str;
53350
53349
  }
53351
53350
  P.absoluteValue = P.abs = function() {
53352
- var x = new BigNumber3(this);
53351
+ var x = new BigNumber2(this);
53353
53352
  if (x.s < 0) x.s = 1;
53354
53353
  return x;
53355
53354
  };
53356
53355
  P.comparedTo = function(y, b) {
53357
- return compare(this, new BigNumber3(y, b));
53356
+ return compare(this, new BigNumber2(y, b));
53358
53357
  };
53359
53358
  P.decimalPlaces = P.dp = function(dp, rm) {
53360
53359
  var c, n, v, x = this;
@@ -53362,7 +53361,7 @@ var require_bignumber = __commonJS({
53362
53361
  intCheck(dp, 0, MAX);
53363
53362
  if (rm == null) rm = ROUNDING_MODE;
53364
53363
  else intCheck(rm, 0, 8);
53365
- return round(new BigNumber3(x), dp + x.e + 1, rm);
53364
+ return round(new BigNumber2(x), dp + x.e + 1, rm);
53366
53365
  }
53367
53366
  if (!(c = x.c)) return null;
53368
53367
  n = ((v = c.length - 1) - bitFloor(this.e / LOG_BASE)) * LOG_BASE;
@@ -53371,44 +53370,44 @@ var require_bignumber = __commonJS({
53371
53370
  return n;
53372
53371
  };
53373
53372
  P.dividedBy = P.div = function(y, b) {
53374
- return div(this, new BigNumber3(y, b), DECIMAL_PLACES, ROUNDING_MODE);
53373
+ return div(this, new BigNumber2(y, b), DECIMAL_PLACES, ROUNDING_MODE);
53375
53374
  };
53376
53375
  P.dividedToIntegerBy = P.idiv = function(y, b) {
53377
- return div(this, new BigNumber3(y, b), 0, 1);
53376
+ return div(this, new BigNumber2(y, b), 0, 1);
53378
53377
  };
53379
53378
  P.exponentiatedBy = P.pow = function(n, m) {
53380
53379
  var half, isModExp, i, k, more, nIsBig, nIsNeg, nIsOdd, y, x = this;
53381
- n = new BigNumber3(n);
53380
+ n = new BigNumber2(n);
53382
53381
  if (n.c && !n.isInteger()) {
53383
53382
  throw Error(bignumberError + "Exponent not an integer: " + valueOf(n));
53384
53383
  }
53385
- if (m != null) m = new BigNumber3(m);
53384
+ if (m != null) m = new BigNumber2(m);
53386
53385
  nIsBig = n.e > 14;
53387
53386
  if (!x.c || !x.c[0] || x.c[0] == 1 && !x.e && x.c.length == 1 || !n.c || !n.c[0]) {
53388
- y = new BigNumber3(Math.pow(+valueOf(x), nIsBig ? n.s * (2 - isOdd(n)) : +valueOf(n)));
53387
+ y = new BigNumber2(Math.pow(+valueOf(x), nIsBig ? n.s * (2 - isOdd(n)) : +valueOf(n)));
53389
53388
  return m ? y.mod(m) : y;
53390
53389
  }
53391
53390
  nIsNeg = n.s < 0;
53392
53391
  if (m) {
53393
- if (m.c ? !m.c[0] : !m.s) return new BigNumber3(NaN);
53392
+ if (m.c ? !m.c[0] : !m.s) return new BigNumber2(NaN);
53394
53393
  isModExp = !nIsNeg && x.isInteger() && m.isInteger();
53395
53394
  if (isModExp) x = x.mod(m);
53396
53395
  } else if (n.e > 9 && (x.e > 0 || x.e < -1 || (x.e == 0 ? x.c[0] > 1 || nIsBig && x.c[1] >= 24e7 : x.c[0] < 8e13 || nIsBig && x.c[0] <= 9999975e7))) {
53397
53396
  k = x.s < 0 && isOdd(n) ? -0 : 0;
53398
53397
  if (x.e > -1) k = 1 / k;
53399
- return new BigNumber3(nIsNeg ? 1 / k : k);
53398
+ return new BigNumber2(nIsNeg ? 1 / k : k);
53400
53399
  } else if (POW_PRECISION) {
53401
53400
  k = mathceil(POW_PRECISION / LOG_BASE + 2);
53402
53401
  }
53403
53402
  if (nIsBig) {
53404
- half = new BigNumber3(0.5);
53403
+ half = new BigNumber2(0.5);
53405
53404
  if (nIsNeg) n.s = 1;
53406
53405
  nIsOdd = isOdd(n);
53407
53406
  } else {
53408
53407
  i = Math.abs(+valueOf(n));
53409
53408
  nIsOdd = i % 2;
53410
53409
  }
53411
- y = new BigNumber3(ONE);
53410
+ y = new BigNumber2(ONE);
53412
53411
  for (; ; ) {
53413
53412
  if (nIsOdd) {
53414
53413
  y = y.times(x);
@@ -53446,31 +53445,31 @@ var require_bignumber = __commonJS({
53446
53445
  return m ? y.mod(m) : k ? round(y, POW_PRECISION, ROUNDING_MODE, more) : y;
53447
53446
  };
53448
53447
  P.integerValue = function(rm) {
53449
- var n = new BigNumber3(this);
53448
+ var n = new BigNumber2(this);
53450
53449
  if (rm == null) rm = ROUNDING_MODE;
53451
53450
  else intCheck(rm, 0, 8);
53452
53451
  return round(n, n.e + 1, rm);
53453
53452
  };
53454
53453
  P.isEqualTo = P.eq = function(y, b) {
53455
- return compare(this, new BigNumber3(y, b)) === 0;
53454
+ return compare(this, new BigNumber2(y, b)) === 0;
53456
53455
  };
53457
53456
  P.isFinite = function() {
53458
53457
  return !!this.c;
53459
53458
  };
53460
53459
  P.isGreaterThan = P.gt = function(y, b) {
53461
- return compare(this, new BigNumber3(y, b)) > 0;
53460
+ return compare(this, new BigNumber2(y, b)) > 0;
53462
53461
  };
53463
53462
  P.isGreaterThanOrEqualTo = P.gte = function(y, b) {
53464
- return (b = compare(this, new BigNumber3(y, b))) === 1 || b === 0;
53463
+ return (b = compare(this, new BigNumber2(y, b))) === 1 || b === 0;
53465
53464
  };
53466
53465
  P.isInteger = function() {
53467
53466
  return !!this.c && bitFloor(this.e / LOG_BASE) > this.c.length - 2;
53468
53467
  };
53469
53468
  P.isLessThan = P.lt = function(y, b) {
53470
- return compare(this, new BigNumber3(y, b)) < 0;
53469
+ return compare(this, new BigNumber2(y, b)) < 0;
53471
53470
  };
53472
53471
  P.isLessThanOrEqualTo = P.lte = function(y, b) {
53473
- return (b = compare(this, new BigNumber3(y, b))) === -1 || b === 0;
53472
+ return (b = compare(this, new BigNumber2(y, b))) === -1 || b === 0;
53474
53473
  };
53475
53474
  P.isNaN = function() {
53476
53475
  return !this.s;
@@ -53486,18 +53485,18 @@ var require_bignumber = __commonJS({
53486
53485
  };
53487
53486
  P.minus = function(y, b) {
53488
53487
  var i, j, t, xLTy, x = this, a = x.s;
53489
- y = new BigNumber3(y, b);
53488
+ y = new BigNumber2(y, b);
53490
53489
  b = y.s;
53491
- if (!a || !b) return new BigNumber3(NaN);
53490
+ if (!a || !b) return new BigNumber2(NaN);
53492
53491
  if (a != b) {
53493
53492
  y.s = -b;
53494
53493
  return x.plus(y);
53495
53494
  }
53496
53495
  var xe = x.e / LOG_BASE, ye = y.e / LOG_BASE, xc = x.c, yc = y.c;
53497
53496
  if (!xe || !ye) {
53498
- if (!xc || !yc) return xc ? (y.s = -b, y) : new BigNumber3(yc ? x : NaN);
53497
+ if (!xc || !yc) return xc ? (y.s = -b, y) : new BigNumber2(yc ? x : NaN);
53499
53498
  if (!xc[0] || !yc[0]) {
53500
- return yc[0] ? (y.s = -b, y) : new BigNumber3(xc[0] ? x : (
53499
+ return yc[0] ? (y.s = -b, y) : new BigNumber2(xc[0] ? x : (
53501
53500
  // IEEE 754 (2008) 6.3: n - n = -0 when rounding to -Infinity
53502
53501
  ROUNDING_MODE == 3 ? -0 : 0
53503
53502
  ));
@@ -53553,11 +53552,11 @@ var require_bignumber = __commonJS({
53553
53552
  };
53554
53553
  P.modulo = P.mod = function(y, b) {
53555
53554
  var q, s, x = this;
53556
- y = new BigNumber3(y, b);
53555
+ y = new BigNumber2(y, b);
53557
53556
  if (!x.c || !y.s || y.c && !y.c[0]) {
53558
- return new BigNumber3(NaN);
53557
+ return new BigNumber2(NaN);
53559
53558
  } else if (!y.c || x.c && !x.c[0]) {
53560
- return new BigNumber3(x);
53559
+ return new BigNumber2(x);
53561
53560
  }
53562
53561
  if (MODULO_MODE == 9) {
53563
53562
  s = y.s;
@@ -53573,7 +53572,7 @@ var require_bignumber = __commonJS({
53573
53572
  return y;
53574
53573
  };
53575
53574
  P.multipliedBy = P.times = function(y, b) {
53576
- var c, e, i, j, k, m, xcL, xlo, xhi, ycL, ylo, yhi, zc, base, sqrtBase, x = this, xc = x.c, yc = (y = new BigNumber3(y, b)).c;
53575
+ var c, e, i, j, k, m, xcL, xlo, xhi, ycL, ylo, yhi, zc, base, sqrtBase, x = this, xc = x.c, yc = (y = new BigNumber2(y, b)).c;
53577
53576
  if (!xc || !yc || !xc[0] || !yc[0]) {
53578
53577
  if (!x.s || !y.s || xc && !xc[0] && !yc || yc && !yc[0] && !xc) {
53579
53578
  y.c = y.e = y.s = null;
@@ -53625,23 +53624,23 @@ var require_bignumber = __commonJS({
53625
53624
  return normalise(y, zc, e);
53626
53625
  };
53627
53626
  P.negated = function() {
53628
- var x = new BigNumber3(this);
53627
+ var x = new BigNumber2(this);
53629
53628
  x.s = -x.s || null;
53630
53629
  return x;
53631
53630
  };
53632
53631
  P.plus = function(y, b) {
53633
53632
  var t, x = this, a = x.s;
53634
- y = new BigNumber3(y, b);
53633
+ y = new BigNumber2(y, b);
53635
53634
  b = y.s;
53636
- if (!a || !b) return new BigNumber3(NaN);
53635
+ if (!a || !b) return new BigNumber2(NaN);
53637
53636
  if (a != b) {
53638
53637
  y.s = -b;
53639
53638
  return x.minus(y);
53640
53639
  }
53641
53640
  var xe = x.e / LOG_BASE, ye = y.e / LOG_BASE, xc = x.c, yc = y.c;
53642
53641
  if (!xe || !ye) {
53643
- if (!xc || !yc) return new BigNumber3(a / 0);
53644
- if (!xc[0] || !yc[0]) return yc[0] ? y : new BigNumber3(xc[0] ? x : a * 0);
53642
+ if (!xc || !yc) return new BigNumber2(a / 0);
53643
+ if (!xc[0] || !yc[0]) return yc[0] ? y : new BigNumber2(xc[0] ? x : a * 0);
53645
53644
  }
53646
53645
  xe = bitFloor(xe);
53647
53646
  ye = bitFloor(ye);
@@ -53682,7 +53681,7 @@ var require_bignumber = __commonJS({
53682
53681
  intCheck(sd, 1, MAX);
53683
53682
  if (rm == null) rm = ROUNDING_MODE;
53684
53683
  else intCheck(rm, 0, 8);
53685
- return round(new BigNumber3(x), sd, rm);
53684
+ return round(new BigNumber2(x), sd, rm);
53686
53685
  }
53687
53686
  if (!(c = x.c)) return null;
53688
53687
  v = c.length - 1;
@@ -53699,9 +53698,9 @@ var require_bignumber = __commonJS({
53699
53698
  return this.times("1e" + k);
53700
53699
  };
53701
53700
  P.squareRoot = P.sqrt = function() {
53702
- var m, n, r, rep, t, x = this, c = x.c, s = x.s, e = x.e, dp = DECIMAL_PLACES + 4, half = new BigNumber3("0.5");
53701
+ var m, n, r, rep, t, x = this, c = x.c, s = x.s, e = x.e, dp = DECIMAL_PLACES + 4, half = new BigNumber2("0.5");
53703
53702
  if (s !== 1 || !c || !c[0]) {
53704
- return new BigNumber3(!s || s < 0 && (!c || c[0]) ? NaN : c ? x : 1 / 0);
53703
+ return new BigNumber2(!s || s < 0 && (!c || c[0]) ? NaN : c ? x : 1 / 0);
53705
53704
  }
53706
53705
  s = Math.sqrt(+valueOf(x));
53707
53706
  if (s == 0 || s == 1 / 0) {
@@ -53715,9 +53714,9 @@ var require_bignumber = __commonJS({
53715
53714
  n = s.toExponential();
53716
53715
  n = n.slice(0, n.indexOf("e") + 1) + e;
53717
53716
  }
53718
- r = new BigNumber3(n);
53717
+ r = new BigNumber2(n);
53719
53718
  } else {
53720
- r = new BigNumber3(s + "");
53719
+ r = new BigNumber2(s + "");
53721
53720
  }
53722
53721
  if (r.c[0]) {
53723
53722
  e = r.e;
@@ -53807,22 +53806,22 @@ var require_bignumber = __commonJS({
53807
53806
  P.toFraction = function(md) {
53808
53807
  var d, d0, d1, d2, e, exp, n, n0, n1, q, r, s, x = this, xc = x.c;
53809
53808
  if (md != null) {
53810
- n = new BigNumber3(md);
53809
+ n = new BigNumber2(md);
53811
53810
  if (!n.isInteger() && (n.c || n.s !== 1) || n.lt(ONE)) {
53812
53811
  throw Error(bignumberError + "Argument " + (n.isInteger() ? "out of range: " : "not an integer: ") + valueOf(n));
53813
53812
  }
53814
53813
  }
53815
- if (!xc) return new BigNumber3(x);
53816
- d = new BigNumber3(ONE);
53817
- n1 = d0 = new BigNumber3(ONE);
53818
- d1 = n0 = new BigNumber3(ONE);
53814
+ if (!xc) return new BigNumber2(x);
53815
+ d = new BigNumber2(ONE);
53816
+ n1 = d0 = new BigNumber2(ONE);
53817
+ d1 = n0 = new BigNumber2(ONE);
53819
53818
  s = coeffToString(xc);
53820
53819
  e = d.e = s.length - x.e - 1;
53821
53820
  d.c[0] = POWS_TEN[(exp = e % LOG_BASE) < 0 ? LOG_BASE + exp : exp];
53822
53821
  md = !md || n.comparedTo(d) > 0 ? e > 0 ? d : n1 : n;
53823
53822
  exp = MAX_EXP;
53824
53823
  MAX_EXP = 1 / 0;
53825
- n = new BigNumber3(s);
53824
+ n = new BigNumber2(s);
53826
53825
  n0.c[0] = 0;
53827
53826
  for (; ; ) {
53828
53827
  q = div(n, d, 0, 1);
@@ -53866,7 +53865,7 @@ var require_bignumber = __commonJS({
53866
53865
  if (b == null) {
53867
53866
  str = e <= TO_EXP_NEG || e >= TO_EXP_POS ? toExponential(coeffToString(n.c), e) : toFixedPoint(coeffToString(n.c), e, "0");
53868
53867
  } else if (b === 10 && alphabetHasNormalDecimalDigits) {
53869
- n = round(new BigNumber3(n), DECIMAL_PLACES + e + 1, ROUNDING_MODE);
53868
+ n = round(new BigNumber2(n), DECIMAL_PLACES + e + 1, ROUNDING_MODE);
53870
53869
  str = toFixedPoint(coeffToString(n.c), n.e, "0");
53871
53870
  } else {
53872
53871
  intCheck(b, 2, ALPHABET.length, "Base");
@@ -53880,8 +53879,8 @@ var require_bignumber = __commonJS({
53880
53879
  return valueOf(this);
53881
53880
  };
53882
53881
  P._isBigNumber = true;
53883
- if (configObject != null) BigNumber3.set(configObject);
53884
- return BigNumber3;
53882
+ if (configObject != null) BigNumber2.set(configObject);
53883
+ return BigNumber2;
53885
53884
  }
53886
53885
  function bitFloor(n) {
53887
53886
  var i = n | 0;
@@ -53941,19 +53940,19 @@ var require_bignumber = __commonJS({
53941
53940
  }
53942
53941
  return str;
53943
53942
  }
53944
- BigNumber2 = clone2();
53945
- BigNumber2["default"] = BigNumber2.BigNumber = BigNumber2;
53943
+ BigNumber = clone2();
53944
+ BigNumber["default"] = BigNumber.BigNumber = BigNumber;
53946
53945
  if (typeof define == "function" && define.amd) {
53947
53946
  define(function() {
53948
- return BigNumber2;
53947
+ return BigNumber;
53949
53948
  });
53950
53949
  } else if (typeof module != "undefined" && module.exports) {
53951
- module.exports = BigNumber2;
53950
+ module.exports = BigNumber;
53952
53951
  } else {
53953
53952
  if (!globalObject) {
53954
53953
  globalObject = typeof self != "undefined" && self ? self : window;
53955
53954
  }
53956
- globalObject.BigNumber = BigNumber2;
53955
+ globalObject.BigNumber = BigNumber;
53957
53956
  }
53958
53957
  })(exports);
53959
53958
  }
@@ -53962,7 +53961,7 @@ var require_bignumber = __commonJS({
53962
53961
  // node_modules/json-bigint/lib/stringify.js
53963
53962
  var require_stringify = __commonJS({
53964
53963
  "node_modules/json-bigint/lib/stringify.js"(exports, module) {
53965
- var BigNumber2 = require_bignumber();
53964
+ var BigNumber = require_bignumber();
53966
53965
  var JSON2 = module.exports;
53967
53966
  (function() {
53968
53967
  "use strict";
@@ -53987,7 +53986,7 @@ var require_stringify = __commonJS({
53987
53986
  }) + '"' : '"' + string4 + '"';
53988
53987
  }
53989
53988
  function str(key, holder) {
53990
- var i, k, v, length, mind = gap, partial2, value = holder[key], isBigNumber2 = value != null && (value instanceof BigNumber2 || BigNumber2.isBigNumber(value));
53989
+ var i, k, v, length, mind = gap, partial2, value = holder[key], isBigNumber3 = value != null && (value instanceof BigNumber || BigNumber.isBigNumber(value));
53991
53990
  if (value && typeof value === "object" && typeof value.toJSON === "function") {
53992
53991
  value = value.toJSON(key);
53993
53992
  }
@@ -53996,7 +53995,7 @@ var require_stringify = __commonJS({
53996
53995
  }
53997
53996
  switch (typeof value) {
53998
53997
  case "string":
53999
- if (isBigNumber2) {
53998
+ if (isBigNumber3) {
54000
53999
  return value;
54001
54000
  } else {
54002
54001
  return quote(value);
@@ -54074,7 +54073,7 @@ var require_stringify = __commonJS({
54074
54073
  // node_modules/json-bigint/lib/parse.js
54075
54074
  var require_parse2 = __commonJS({
54076
54075
  "node_modules/json-bigint/lib/parse.js"(exports, module) {
54077
- var BigNumber2 = null;
54076
+ var BigNumber = null;
54078
54077
  var suspectProtoRx = /(?:_|\\u005[Ff])(?:_|\\u005[Ff])(?:p|\\u0070)(?:r|\\u0072)(?:o|\\u006[Ff])(?:t|\\u0074)(?:o|\\u006[Ff])(?:_|\\u005[Ff])(?:_|\\u005[Ff])/;
54079
54078
  var suspectConstructorRx = /(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)/;
54080
54079
  var json_parse = function(options) {
@@ -54174,11 +54173,11 @@ var require_parse2 = __commonJS({
54174
54173
  if (!isFinite(number5)) {
54175
54174
  error49("Bad number");
54176
54175
  } else {
54177
- if (BigNumber2 == null) BigNumber2 = require_bignumber();
54176
+ if (BigNumber == null) BigNumber = require_bignumber();
54178
54177
  if (string5.length > 15)
54179
- return _options.storeAsString ? string5 : _options.useNativeBigInt ? BigInt(string5) : new BigNumber2(string5);
54178
+ return _options.storeAsString ? string5 : _options.useNativeBigInt ? BigInt(string5) : new BigNumber(string5);
54180
54179
  else
54181
- return !_options.alwaysParseAsBig ? number5 : _options.useNativeBigInt ? BigInt(number5) : new BigNumber2(number5);
54180
+ return !_options.alwaysParseAsBig ? number5 : _options.useNativeBigInt ? BigInt(number5) : new BigNumber(number5);
54182
54181
  }
54183
54182
  }, string4 = function() {
54184
54183
  var hex3, i, string5 = "", uffff;
@@ -61546,1554 +61545,223 @@ var require_unpack = __commonJS({
61546
61545
  const mode = entry.mode & 4095 || this.fmode;
61547
61546
  const oner = (er) => {
61548
61547
  let closeError;
61549
- try {
61550
- fs8.closeSync(fd);
61551
- } catch (e) {
61552
- closeError = e;
61553
- }
61554
- if (er || closeError) {
61555
- this[ONERROR](er || closeError, entry);
61556
- }
61557
- done();
61558
- };
61559
- let fd;
61560
- try {
61561
- fd = fs8.openSync(entry.absolute, getFlag(entry.size), mode);
61562
- } catch (er) {
61563
- return oner(er);
61564
- }
61565
- const tx = this.transform ? this.transform(entry) || entry : entry;
61566
- if (tx !== entry) {
61567
- tx.on("error", (er) => this[ONERROR](er, entry));
61568
- entry.pipe(tx);
61569
- }
61570
- tx.on("data", (chunk) => {
61571
- try {
61572
- fs8.writeSync(fd, chunk, 0, chunk.length);
61573
- } catch (er) {
61574
- oner(er);
61575
- }
61576
- });
61577
- tx.on("end", (_) => {
61578
- let er = null;
61579
- if (entry.mtime && !this.noMtime) {
61580
- const atime = entry.atime || /* @__PURE__ */ new Date();
61581
- const mtime = entry.mtime;
61582
- try {
61583
- fs8.futimesSync(fd, atime, mtime);
61584
- } catch (futimeser) {
61585
- try {
61586
- fs8.utimesSync(entry.absolute, atime, mtime);
61587
- } catch (utimeser) {
61588
- er = futimeser;
61589
- }
61590
- }
61591
- }
61592
- if (this[DOCHOWN](entry)) {
61593
- const uid = this[UID](entry);
61594
- const gid = this[GID](entry);
61595
- try {
61596
- fs8.fchownSync(fd, uid, gid);
61597
- } catch (fchowner) {
61598
- try {
61599
- fs8.chownSync(entry.absolute, uid, gid);
61600
- } catch (chowner) {
61601
- er = er || fchowner;
61602
- }
61603
- }
61604
- }
61605
- oner(er);
61606
- });
61607
- }
61608
- [DIRECTORY](entry, done) {
61609
- const mode = entry.mode & 4095 || this.dmode;
61610
- const er = this[MKDIR](entry.absolute, mode);
61611
- if (er) {
61612
- this[ONERROR](er, entry);
61613
- done();
61614
- return;
61615
- }
61616
- if (entry.mtime && !this.noMtime) {
61617
- try {
61618
- fs8.utimesSync(entry.absolute, entry.atime || /* @__PURE__ */ new Date(), entry.mtime);
61619
- } catch (er2) {
61620
- }
61621
- }
61622
- if (this[DOCHOWN](entry)) {
61623
- try {
61624
- fs8.chownSync(entry.absolute, this[UID](entry), this[GID](entry));
61625
- } catch (er2) {
61626
- }
61627
- }
61628
- done();
61629
- entry.resume();
61630
- }
61631
- [MKDIR](dir, mode) {
61632
- try {
61633
- return mkdir.sync(normPath(dir), {
61634
- uid: this.uid,
61635
- gid: this.gid,
61636
- processUid: this.processUid,
61637
- processGid: this.processGid,
61638
- umask: this.processUmask,
61639
- preserve: this.preservePaths,
61640
- unlink: this.unlink,
61641
- cache: this.dirCache,
61642
- cwd: this.cwd,
61643
- mode
61644
- });
61645
- } catch (er) {
61646
- return er;
61647
- }
61648
- }
61649
- [LINK](entry, linkpath, link, done) {
61650
- try {
61651
- fs8[link + "Sync"](linkpath, entry.absolute);
61652
- done();
61653
- entry.resume();
61654
- } catch (er) {
61655
- return this[ONERROR](er, entry);
61656
- }
61657
- }
61658
- };
61659
- Unpack.Sync = UnpackSync;
61660
- module.exports = Unpack;
61661
- }
61662
- });
61663
-
61664
- // node_modules/tar/lib/extract.js
61665
- var require_extract = __commonJS({
61666
- "node_modules/tar/lib/extract.js"(exports, module) {
61667
- "use strict";
61668
- var hlo = require_high_level_opt();
61669
- var Unpack = require_unpack();
61670
- var fs8 = __require("fs");
61671
- var fsm = require_fs_minipass();
61672
- var path7 = __require("path");
61673
- var stripSlash = require_strip_trailing_slashes();
61674
- module.exports = (opt_, files, cb) => {
61675
- if (typeof opt_ === "function") {
61676
- cb = opt_, files = null, opt_ = {};
61677
- } else if (Array.isArray(opt_)) {
61678
- files = opt_, opt_ = {};
61679
- }
61680
- if (typeof files === "function") {
61681
- cb = files, files = null;
61682
- }
61683
- if (!files) {
61684
- files = [];
61685
- } else {
61686
- files = Array.from(files);
61687
- }
61688
- const opt = hlo(opt_);
61689
- if (opt.sync && typeof cb === "function") {
61690
- throw new TypeError("callback not supported for sync tar functions");
61691
- }
61692
- if (!opt.file && typeof cb === "function") {
61693
- throw new TypeError("callback only supported with file option");
61694
- }
61695
- if (files.length) {
61696
- filesFilter(opt, files);
61697
- }
61698
- return opt.file && opt.sync ? extractFileSync(opt) : opt.file ? extractFile(opt, cb) : opt.sync ? extractSync(opt) : extract(opt);
61699
- };
61700
- var filesFilter = (opt, files) => {
61701
- const map2 = new Map(files.map((f) => [stripSlash(f), true]));
61702
- const filter = opt.filter;
61703
- const mapHas = (file2, r) => {
61704
- const root = r || path7.parse(file2).root || ".";
61705
- const ret = file2 === root ? false : map2.has(file2) ? map2.get(file2) : mapHas(path7.dirname(file2), root);
61706
- map2.set(file2, ret);
61707
- return ret;
61708
- };
61709
- opt.filter = filter ? (file2, entry) => filter(file2, entry) && mapHas(stripSlash(file2)) : (file2) => mapHas(stripSlash(file2));
61710
- };
61711
- var extractFileSync = (opt) => {
61712
- const u = new Unpack.Sync(opt);
61713
- const file2 = opt.file;
61714
- const stat = fs8.statSync(file2);
61715
- const readSize = opt.maxReadSize || 16 * 1024 * 1024;
61716
- const stream = new fsm.ReadStreamSync(file2, {
61717
- readSize,
61718
- size: stat.size
61719
- });
61720
- stream.pipe(u);
61721
- };
61722
- var extractFile = (opt, cb) => {
61723
- const u = new Unpack(opt);
61724
- const readSize = opt.maxReadSize || 16 * 1024 * 1024;
61725
- const file2 = opt.file;
61726
- const p = new Promise((resolve3, reject) => {
61727
- u.on("error", reject);
61728
- u.on("close", resolve3);
61729
- fs8.stat(file2, (er, stat) => {
61730
- if (er) {
61731
- reject(er);
61732
- } else {
61733
- const stream = new fsm.ReadStream(file2, {
61734
- readSize,
61735
- size: stat.size
61736
- });
61737
- stream.on("error", reject);
61738
- stream.pipe(u);
61739
- }
61740
- });
61741
- });
61742
- return cb ? p.then(cb, cb) : p;
61743
- };
61744
- var extractSync = (opt) => new Unpack.Sync(opt);
61745
- var extract = (opt) => new Unpack(opt);
61746
- }
61747
- });
61748
-
61749
- // node_modules/tar/index.js
61750
- var require_tar = __commonJS({
61751
- "node_modules/tar/index.js"(exports) {
61752
- "use strict";
61753
- exports.c = exports.create = require_create();
61754
- exports.r = exports.replace = require_replace();
61755
- exports.t = exports.list = require_list2();
61756
- exports.u = exports.update = require_update();
61757
- exports.x = exports.extract = require_extract();
61758
- exports.Pack = require_pack();
61759
- exports.Unpack = require_unpack();
61760
- exports.Parse = require_parse3();
61761
- exports.ReadEntry = require_read_entry();
61762
- exports.WriteEntry = require_write_entry();
61763
- exports.Header = require_header();
61764
- exports.Pax = require_pax();
61765
- exports.types = require_types2();
61766
- }
61767
- });
61768
-
61769
- // node_modules/bignumber.js/bignumber.js
61770
- var require_bignumber2 = __commonJS({
61771
- "node_modules/bignumber.js/bignumber.js"(exports, module) {
61772
- (function(globalObject) {
61773
- "use strict";
61774
- var BigNumber2, isNumeric = /^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i, mathceil = Math.ceil, mathfloor = Math.floor, bignumberError = "[BigNumber Error] ", tooManyDigits = bignumberError + "Number primitive has more than 15 significant digits: ", BASE = 1e14, LOG_BASE = 14, MAX_SAFE_INTEGER = 9007199254740991, POWS_TEN = [1, 10, 100, 1e3, 1e4, 1e5, 1e6, 1e7, 1e8, 1e9, 1e10, 1e11, 1e12, 1e13], SQRT_BASE = 1e7, MAX = 1e9;
61775
- function clone2(configObject) {
61776
- var div, convertBase, parseNumeric, P = BigNumber3.prototype = { constructor: BigNumber3, toString: null, valueOf: null }, ONE = new BigNumber3(1), DECIMAL_PLACES = 20, ROUNDING_MODE = 4, TO_EXP_NEG = -7, TO_EXP_POS = 21, MIN_EXP = -1e7, MAX_EXP = 1e7, CRYPTO = false, MODULO_MODE = 1, POW_PRECISION = 0, FORMAT = {
61777
- prefix: "",
61778
- groupSize: 3,
61779
- secondaryGroupSize: 0,
61780
- groupSeparator: ",",
61781
- decimalSeparator: ".",
61782
- fractionGroupSize: 0,
61783
- fractionGroupSeparator: "\xA0",
61784
- // non-breaking space
61785
- suffix: ""
61786
- }, ALPHABET = "0123456789abcdefghijklmnopqrstuvwxyz";
61787
- function BigNumber3(v, b) {
61788
- var alphabet, c, caseChanged, e, i, isNum, len, str, x = this;
61789
- if (!(x instanceof BigNumber3)) return new BigNumber3(v, b);
61790
- if (b == null) {
61791
- if (v && v._isBigNumber === true) {
61792
- x.s = v.s;
61793
- if (!v.c || v.e > MAX_EXP) {
61794
- x.c = x.e = null;
61795
- } else if (v.e < MIN_EXP) {
61796
- x.c = [x.e = 0];
61797
- } else {
61798
- x.e = v.e;
61799
- x.c = v.c.slice();
61800
- }
61801
- return;
61802
- }
61803
- if ((isNum = typeof v == "number") && v * 0 == 0) {
61804
- x.s = 1 / v < 0 ? (v = -v, -1) : 1;
61805
- if (v === ~~v) {
61806
- for (e = 0, i = v; i >= 10; i /= 10, e++) ;
61807
- if (e > MAX_EXP) {
61808
- x.c = x.e = null;
61809
- } else {
61810
- x.e = e;
61811
- x.c = [v];
61812
- }
61813
- return;
61814
- }
61815
- str = String(v);
61816
- } else {
61817
- if (!isNumeric.test(str = String(v))) return parseNumeric(x, str, isNum);
61818
- x.s = str.charCodeAt(0) == 45 ? (str = str.slice(1), -1) : 1;
61819
- }
61820
- if ((e = str.indexOf(".")) > -1) str = str.replace(".", "");
61821
- if ((i = str.search(/e/i)) > 0) {
61822
- if (e < 0) e = i;
61823
- e += +str.slice(i + 1);
61824
- str = str.substring(0, i);
61825
- } else if (e < 0) {
61826
- e = str.length;
61827
- }
61828
- } else {
61829
- intCheck(b, 2, ALPHABET.length, "Base");
61830
- if (b == 10) {
61831
- x = new BigNumber3(v);
61832
- return round(x, DECIMAL_PLACES + x.e + 1, ROUNDING_MODE);
61833
- }
61834
- str = String(v);
61835
- if (isNum = typeof v == "number") {
61836
- if (v * 0 != 0) return parseNumeric(x, str, isNum, b);
61837
- x.s = 1 / v < 0 ? (str = str.slice(1), -1) : 1;
61838
- if (BigNumber3.DEBUG && str.replace(/^0\.0*|\./, "").length > 15) {
61839
- throw Error(tooManyDigits + v);
61840
- }
61841
- } else {
61842
- x.s = str.charCodeAt(0) === 45 ? (str = str.slice(1), -1) : 1;
61843
- }
61844
- alphabet = ALPHABET.slice(0, b);
61845
- e = i = 0;
61846
- for (len = str.length; i < len; i++) {
61847
- if (alphabet.indexOf(c = str.charAt(i)) < 0) {
61848
- if (c == ".") {
61849
- if (i > e) {
61850
- e = len;
61851
- continue;
61852
- }
61853
- } else if (!caseChanged) {
61854
- if (str == str.toUpperCase() && (str = str.toLowerCase()) || str == str.toLowerCase() && (str = str.toUpperCase())) {
61855
- caseChanged = true;
61856
- i = -1;
61857
- e = 0;
61858
- continue;
61859
- }
61860
- }
61861
- return parseNumeric(x, String(v), isNum, b);
61862
- }
61863
- }
61864
- isNum = false;
61865
- str = convertBase(str, b, 10, x.s);
61866
- if ((e = str.indexOf(".")) > -1) str = str.replace(".", "");
61867
- else e = str.length;
61868
- }
61869
- for (i = 0; str.charCodeAt(i) === 48; i++) ;
61870
- for (len = str.length; str.charCodeAt(--len) === 48; ) ;
61871
- if (str = str.slice(i, ++len)) {
61872
- len -= i;
61873
- if (isNum && BigNumber3.DEBUG && len > 15 && (v > MAX_SAFE_INTEGER || v !== mathfloor(v))) {
61874
- throw Error(tooManyDigits + x.s * v);
61875
- }
61876
- if ((e = e - i - 1) > MAX_EXP) {
61877
- x.c = x.e = null;
61878
- } else if (e < MIN_EXP) {
61879
- x.c = [x.e = 0];
61880
- } else {
61881
- x.e = e;
61882
- x.c = [];
61883
- i = (e + 1) % LOG_BASE;
61884
- if (e < 0) i += LOG_BASE;
61885
- if (i < len) {
61886
- if (i) x.c.push(+str.slice(0, i));
61887
- for (len -= LOG_BASE; i < len; ) {
61888
- x.c.push(+str.slice(i, i += LOG_BASE));
61889
- }
61890
- i = LOG_BASE - (str = str.slice(i)).length;
61891
- } else {
61892
- i -= len;
61893
- }
61894
- for (; i--; str += "0") ;
61895
- x.c.push(+str);
61896
- }
61897
- } else {
61898
- x.c = [x.e = 0];
61899
- }
61900
- }
61901
- BigNumber3.clone = clone2;
61902
- BigNumber3.ROUND_UP = 0;
61903
- BigNumber3.ROUND_DOWN = 1;
61904
- BigNumber3.ROUND_CEIL = 2;
61905
- BigNumber3.ROUND_FLOOR = 3;
61906
- BigNumber3.ROUND_HALF_UP = 4;
61907
- BigNumber3.ROUND_HALF_DOWN = 5;
61908
- BigNumber3.ROUND_HALF_EVEN = 6;
61909
- BigNumber3.ROUND_HALF_CEIL = 7;
61910
- BigNumber3.ROUND_HALF_FLOOR = 8;
61911
- BigNumber3.EUCLID = 9;
61912
- BigNumber3.config = BigNumber3.set = function(obj) {
61913
- var p, v;
61914
- if (obj != null) {
61915
- if (typeof obj == "object") {
61916
- if (obj.hasOwnProperty(p = "DECIMAL_PLACES")) {
61917
- v = obj[p];
61918
- intCheck(v, 0, MAX, p);
61919
- DECIMAL_PLACES = v;
61920
- }
61921
- if (obj.hasOwnProperty(p = "ROUNDING_MODE")) {
61922
- v = obj[p];
61923
- intCheck(v, 0, 8, p);
61924
- ROUNDING_MODE = v;
61925
- }
61926
- if (obj.hasOwnProperty(p = "EXPONENTIAL_AT")) {
61927
- v = obj[p];
61928
- if (v && v.pop) {
61929
- intCheck(v[0], -MAX, 0, p);
61930
- intCheck(v[1], 0, MAX, p);
61931
- TO_EXP_NEG = v[0];
61932
- TO_EXP_POS = v[1];
61933
- } else {
61934
- intCheck(v, -MAX, MAX, p);
61935
- TO_EXP_NEG = -(TO_EXP_POS = v < 0 ? -v : v);
61936
- }
61937
- }
61938
- if (obj.hasOwnProperty(p = "RANGE")) {
61939
- v = obj[p];
61940
- if (v && v.pop) {
61941
- intCheck(v[0], -MAX, -1, p);
61942
- intCheck(v[1], 1, MAX, p);
61943
- MIN_EXP = v[0];
61944
- MAX_EXP = v[1];
61945
- } else {
61946
- intCheck(v, -MAX, MAX, p);
61947
- if (v) {
61948
- MIN_EXP = -(MAX_EXP = v < 0 ? -v : v);
61949
- } else {
61950
- throw Error(bignumberError + p + " cannot be zero: " + v);
61951
- }
61952
- }
61953
- }
61954
- if (obj.hasOwnProperty(p = "CRYPTO")) {
61955
- v = obj[p];
61956
- if (v === !!v) {
61957
- if (v) {
61958
- if (typeof crypto != "undefined" && crypto && (crypto.getRandomValues || crypto.randomBytes)) {
61959
- CRYPTO = v;
61960
- } else {
61961
- CRYPTO = !v;
61962
- throw Error(bignumberError + "crypto unavailable");
61963
- }
61964
- } else {
61965
- CRYPTO = v;
61966
- }
61967
- } else {
61968
- throw Error(bignumberError + p + " not true or false: " + v);
61969
- }
61970
- }
61971
- if (obj.hasOwnProperty(p = "MODULO_MODE")) {
61972
- v = obj[p];
61973
- intCheck(v, 0, 9, p);
61974
- MODULO_MODE = v;
61975
- }
61976
- if (obj.hasOwnProperty(p = "POW_PRECISION")) {
61977
- v = obj[p];
61978
- intCheck(v, 0, MAX, p);
61979
- POW_PRECISION = v;
61980
- }
61981
- if (obj.hasOwnProperty(p = "FORMAT")) {
61982
- v = obj[p];
61983
- if (typeof v == "object") FORMAT = v;
61984
- else throw Error(bignumberError + p + " not an object: " + v);
61985
- }
61986
- if (obj.hasOwnProperty(p = "ALPHABET")) {
61987
- v = obj[p];
61988
- if (typeof v == "string" && !/^.$|[+-.\s]|(.).*\1/.test(v)) {
61989
- ALPHABET = v;
61990
- } else {
61991
- throw Error(bignumberError + p + " invalid: " + v);
61992
- }
61993
- }
61994
- } else {
61995
- throw Error(bignumberError + "Object expected: " + obj);
61996
- }
61997
- }
61998
- return {
61999
- DECIMAL_PLACES,
62000
- ROUNDING_MODE,
62001
- EXPONENTIAL_AT: [TO_EXP_NEG, TO_EXP_POS],
62002
- RANGE: [MIN_EXP, MAX_EXP],
62003
- CRYPTO,
62004
- MODULO_MODE,
62005
- POW_PRECISION,
62006
- FORMAT,
62007
- ALPHABET
62008
- };
62009
- };
62010
- BigNumber3.isBigNumber = function(v) {
62011
- if (!v || v._isBigNumber !== true) return false;
62012
- if (!BigNumber3.DEBUG) return true;
62013
- var i, n, c = v.c, e = v.e, s = v.s;
62014
- out: if ({}.toString.call(c) == "[object Array]") {
62015
- if ((s === 1 || s === -1) && e >= -MAX && e <= MAX && e === mathfloor(e)) {
62016
- if (c[0] === 0) {
62017
- if (e === 0 && c.length === 1) return true;
62018
- break out;
62019
- }
62020
- i = (e + 1) % LOG_BASE;
62021
- if (i < 1) i += LOG_BASE;
62022
- if (String(c[0]).length == i) {
62023
- for (i = 0; i < c.length; i++) {
62024
- n = c[i];
62025
- if (n < 0 || n >= BASE || n !== mathfloor(n)) break out;
62026
- }
62027
- if (n !== 0) return true;
62028
- }
62029
- }
62030
- } else if (c === null && e === null && (s === null || s === 1 || s === -1)) {
62031
- return true;
62032
- }
62033
- throw Error(bignumberError + "Invalid BigNumber: " + v);
62034
- };
62035
- BigNumber3.maximum = BigNumber3.max = function() {
62036
- return maxOrMin(arguments, P.lt);
62037
- };
62038
- BigNumber3.minimum = BigNumber3.min = function() {
62039
- return maxOrMin(arguments, P.gt);
62040
- };
62041
- BigNumber3.random = (function() {
62042
- var pow2_53 = 9007199254740992;
62043
- var random53bitInt = Math.random() * pow2_53 & 2097151 ? function() {
62044
- return mathfloor(Math.random() * pow2_53);
62045
- } : function() {
62046
- return (Math.random() * 1073741824 | 0) * 8388608 + (Math.random() * 8388608 | 0);
62047
- };
62048
- return function(dp) {
62049
- var a, b, e, k, v, i = 0, c = [], rand = new BigNumber3(ONE);
62050
- if (dp == null) dp = DECIMAL_PLACES;
62051
- else intCheck(dp, 0, MAX);
62052
- k = mathceil(dp / LOG_BASE);
62053
- if (CRYPTO) {
62054
- if (crypto.getRandomValues) {
62055
- a = crypto.getRandomValues(new Uint32Array(k *= 2));
62056
- for (; i < k; ) {
62057
- v = a[i] * 131072 + (a[i + 1] >>> 11);
62058
- if (v >= 9e15) {
62059
- b = crypto.getRandomValues(new Uint32Array(2));
62060
- a[i] = b[0];
62061
- a[i + 1] = b[1];
62062
- } else {
62063
- c.push(v % 1e14);
62064
- i += 2;
62065
- }
62066
- }
62067
- i = k / 2;
62068
- } else if (crypto.randomBytes) {
62069
- a = crypto.randomBytes(k *= 7);
62070
- for (; i < k; ) {
62071
- v = (a[i] & 31) * 281474976710656 + a[i + 1] * 1099511627776 + a[i + 2] * 4294967296 + a[i + 3] * 16777216 + (a[i + 4] << 16) + (a[i + 5] << 8) + a[i + 6];
62072
- if (v >= 9e15) {
62073
- crypto.randomBytes(7).copy(a, i);
62074
- } else {
62075
- c.push(v % 1e14);
62076
- i += 7;
62077
- }
62078
- }
62079
- i = k / 7;
62080
- } else {
62081
- CRYPTO = false;
62082
- throw Error(bignumberError + "crypto unavailable");
62083
- }
62084
- }
62085
- if (!CRYPTO) {
62086
- for (; i < k; ) {
62087
- v = random53bitInt();
62088
- if (v < 9e15) c[i++] = v % 1e14;
62089
- }
62090
- }
62091
- k = c[--i];
62092
- dp %= LOG_BASE;
62093
- if (k && dp) {
62094
- v = POWS_TEN[LOG_BASE - dp];
62095
- c[i] = mathfloor(k / v) * v;
62096
- }
62097
- for (; c[i] === 0; c.pop(), i--) ;
62098
- if (i < 0) {
62099
- c = [e = 0];
62100
- } else {
62101
- for (e = -1; c[0] === 0; c.splice(0, 1), e -= LOG_BASE) ;
62102
- for (i = 1, v = c[0]; v >= 10; v /= 10, i++) ;
62103
- if (i < LOG_BASE) e -= LOG_BASE - i;
62104
- }
62105
- rand.e = e;
62106
- rand.c = c;
62107
- return rand;
62108
- };
62109
- })();
62110
- BigNumber3.sum = function() {
62111
- var i = 1, args = arguments, sum = new BigNumber3(args[0]);
62112
- for (; i < args.length; ) sum = sum.plus(args[i++]);
62113
- return sum;
62114
- };
62115
- convertBase = /* @__PURE__ */ (function() {
62116
- var decimal = "0123456789";
62117
- function toBaseOut(str, baseIn, baseOut, alphabet) {
62118
- var j, arr = [0], arrL, i = 0, len = str.length;
62119
- for (; i < len; ) {
62120
- for (arrL = arr.length; arrL--; arr[arrL] *= baseIn) ;
62121
- arr[0] += alphabet.indexOf(str.charAt(i++));
62122
- for (j = 0; j < arr.length; j++) {
62123
- if (arr[j] > baseOut - 1) {
62124
- if (arr[j + 1] == null) arr[j + 1] = 0;
62125
- arr[j + 1] += arr[j] / baseOut | 0;
62126
- arr[j] %= baseOut;
62127
- }
62128
- }
62129
- }
62130
- return arr.reverse();
62131
- }
62132
- return function(str, baseIn, baseOut, sign, callerIsToString) {
62133
- var alphabet, d, e, k, r, x, xc, y, i = str.indexOf("."), dp = DECIMAL_PLACES, rm = ROUNDING_MODE;
62134
- if (i >= 0) {
62135
- k = POW_PRECISION;
62136
- POW_PRECISION = 0;
62137
- str = str.replace(".", "");
62138
- y = new BigNumber3(baseIn);
62139
- x = y.pow(str.length - i);
62140
- POW_PRECISION = k;
62141
- y.c = toBaseOut(
62142
- toFixedPoint(coeffToString(x.c), x.e, "0"),
62143
- 10,
62144
- baseOut,
62145
- decimal
62146
- );
62147
- y.e = y.c.length;
62148
- }
62149
- xc = toBaseOut(str, baseIn, baseOut, callerIsToString ? (alphabet = ALPHABET, decimal) : (alphabet = decimal, ALPHABET));
62150
- e = k = xc.length;
62151
- for (; xc[--k] == 0; xc.pop()) ;
62152
- if (!xc[0]) return alphabet.charAt(0);
62153
- if (i < 0) {
62154
- --e;
62155
- } else {
62156
- x.c = xc;
62157
- x.e = e;
62158
- x.s = sign;
62159
- x = div(x, y, dp, rm, baseOut);
62160
- xc = x.c;
62161
- r = x.r;
62162
- e = x.e;
62163
- }
62164
- d = e + dp + 1;
62165
- i = xc[d];
62166
- k = baseOut / 2;
62167
- r = r || d < 0 || xc[d + 1] != null;
62168
- r = rm < 4 ? (i != null || r) && (rm == 0 || rm == (x.s < 0 ? 3 : 2)) : i > k || i == k && (rm == 4 || r || rm == 6 && xc[d - 1] & 1 || rm == (x.s < 0 ? 8 : 7));
62169
- if (d < 1 || !xc[0]) {
62170
- str = r ? toFixedPoint(alphabet.charAt(1), -dp, alphabet.charAt(0)) : alphabet.charAt(0);
62171
- } else {
62172
- xc.length = d;
62173
- if (r) {
62174
- for (--baseOut; ++xc[--d] > baseOut; ) {
62175
- xc[d] = 0;
62176
- if (!d) {
62177
- ++e;
62178
- xc = [1].concat(xc);
62179
- }
62180
- }
62181
- }
62182
- for (k = xc.length; !xc[--k]; ) ;
62183
- for (i = 0, str = ""; i <= k; str += alphabet.charAt(xc[i++])) ;
62184
- str = toFixedPoint(str, e, alphabet.charAt(0));
62185
- }
62186
- return str;
62187
- };
62188
- })();
62189
- div = /* @__PURE__ */ (function() {
62190
- function multiply(x, k, base) {
62191
- var m, temp, xlo, xhi, carry = 0, i = x.length, klo = k % SQRT_BASE, khi = k / SQRT_BASE | 0;
62192
- for (x = x.slice(); i--; ) {
62193
- xlo = x[i] % SQRT_BASE;
62194
- xhi = x[i] / SQRT_BASE | 0;
62195
- m = khi * xlo + xhi * klo;
62196
- temp = klo * xlo + m % SQRT_BASE * SQRT_BASE + carry;
62197
- carry = (temp / base | 0) + (m / SQRT_BASE | 0) + khi * xhi;
62198
- x[i] = temp % base;
62199
- }
62200
- if (carry) x = [carry].concat(x);
62201
- return x;
62202
- }
62203
- function compare2(a, b, aL, bL) {
62204
- var i, cmp;
62205
- if (aL != bL) {
62206
- cmp = aL > bL ? 1 : -1;
62207
- } else {
62208
- for (i = cmp = 0; i < aL; i++) {
62209
- if (a[i] != b[i]) {
62210
- cmp = a[i] > b[i] ? 1 : -1;
62211
- break;
62212
- }
62213
- }
62214
- }
62215
- return cmp;
62216
- }
62217
- function subtract(a, b, aL, base) {
62218
- var i = 0;
62219
- for (; aL--; ) {
62220
- a[aL] -= i;
62221
- i = a[aL] < b[aL] ? 1 : 0;
62222
- a[aL] = i * base + a[aL] - b[aL];
62223
- }
62224
- for (; !a[0] && a.length > 1; a.splice(0, 1)) ;
62225
- }
62226
- return function(x, y, dp, rm, base) {
62227
- var cmp, e, i, more, n, prod, prodL, q, qc, rem, remL, rem0, xi, xL, yc0, yL, yz, s = x.s == y.s ? 1 : -1, xc = x.c, yc = y.c;
62228
- if (!xc || !xc[0] || !yc || !yc[0]) {
62229
- return new BigNumber3(
62230
- // Return NaN if either NaN, or both Infinity or 0.
62231
- !x.s || !y.s || (xc ? yc && xc[0] == yc[0] : !yc) ? NaN : (
62232
- // Return ±0 if x is ±0 or y is ±Infinity, or return ±Infinity as y is ±0.
62233
- xc && xc[0] == 0 || !yc ? s * 0 : s / 0
62234
- )
62235
- );
62236
- }
62237
- q = new BigNumber3(s);
62238
- qc = q.c = [];
62239
- e = x.e - y.e;
62240
- s = dp + e + 1;
62241
- if (!base) {
62242
- base = BASE;
62243
- e = bitFloor(x.e / LOG_BASE) - bitFloor(y.e / LOG_BASE);
62244
- s = s / LOG_BASE | 0;
62245
- }
62246
- for (i = 0; yc[i] == (xc[i] || 0); i++) ;
62247
- if (yc[i] > (xc[i] || 0)) e--;
62248
- if (s < 0) {
62249
- qc.push(1);
62250
- more = true;
62251
- } else {
62252
- xL = xc.length;
62253
- yL = yc.length;
62254
- i = 0;
62255
- s += 2;
62256
- n = mathfloor(base / (yc[0] + 1));
62257
- if (n > 1) {
62258
- yc = multiply(yc, n, base);
62259
- xc = multiply(xc, n, base);
62260
- yL = yc.length;
62261
- xL = xc.length;
62262
- }
62263
- xi = yL;
62264
- rem = xc.slice(0, yL);
62265
- remL = rem.length;
62266
- for (; remL < yL; rem[remL++] = 0) ;
62267
- yz = yc.slice();
62268
- yz = [0].concat(yz);
62269
- yc0 = yc[0];
62270
- if (yc[1] >= base / 2) yc0++;
62271
- do {
62272
- n = 0;
62273
- cmp = compare2(yc, rem, yL, remL);
62274
- if (cmp < 0) {
62275
- rem0 = rem[0];
62276
- if (yL != remL) rem0 = rem0 * base + (rem[1] || 0);
62277
- n = mathfloor(rem0 / yc0);
62278
- if (n > 1) {
62279
- if (n >= base) n = base - 1;
62280
- prod = multiply(yc, n, base);
62281
- prodL = prod.length;
62282
- remL = rem.length;
62283
- while (compare2(prod, rem, prodL, remL) == 1) {
62284
- n--;
62285
- subtract(prod, yL < prodL ? yz : yc, prodL, base);
62286
- prodL = prod.length;
62287
- cmp = 1;
62288
- }
62289
- } else {
62290
- if (n == 0) {
62291
- cmp = n = 1;
62292
- }
62293
- prod = yc.slice();
62294
- prodL = prod.length;
62295
- }
62296
- if (prodL < remL) prod = [0].concat(prod);
62297
- subtract(rem, prod, remL, base);
62298
- remL = rem.length;
62299
- if (cmp == -1) {
62300
- while (compare2(yc, rem, yL, remL) < 1) {
62301
- n++;
62302
- subtract(rem, yL < remL ? yz : yc, remL, base);
62303
- remL = rem.length;
62304
- }
62305
- }
62306
- } else if (cmp === 0) {
62307
- n++;
62308
- rem = [0];
62309
- }
62310
- qc[i++] = n;
62311
- if (rem[0]) {
62312
- rem[remL++] = xc[xi] || 0;
62313
- } else {
62314
- rem = [xc[xi]];
62315
- remL = 1;
62316
- }
62317
- } while ((xi++ < xL || rem[0] != null) && s--);
62318
- more = rem[0] != null;
62319
- if (!qc[0]) qc.splice(0, 1);
62320
- }
62321
- if (base == BASE) {
62322
- for (i = 1, s = qc[0]; s >= 10; s /= 10, i++) ;
62323
- round(q, dp + (q.e = i + e * LOG_BASE - 1) + 1, rm, more);
62324
- } else {
62325
- q.e = e;
62326
- q.r = +more;
62327
- }
62328
- return q;
62329
- };
62330
- })();
62331
- function format(n, i, rm, id) {
62332
- var c0, e, ne, len, str;
62333
- if (rm == null) rm = ROUNDING_MODE;
62334
- else intCheck(rm, 0, 8);
62335
- if (!n.c) return n.toString();
62336
- c0 = n.c[0];
62337
- ne = n.e;
62338
- if (i == null) {
62339
- str = coeffToString(n.c);
62340
- str = id == 1 || id == 2 && (ne <= TO_EXP_NEG || ne >= TO_EXP_POS) ? toExponential(str, ne) : toFixedPoint(str, ne, "0");
62341
- } else {
62342
- n = round(new BigNumber3(n), i, rm);
62343
- e = n.e;
62344
- str = coeffToString(n.c);
62345
- len = str.length;
62346
- if (id == 1 || id == 2 && (i <= e || e <= TO_EXP_NEG)) {
62347
- for (; len < i; str += "0", len++) ;
62348
- str = toExponential(str, e);
62349
- } else {
62350
- i -= ne;
62351
- str = toFixedPoint(str, e, "0");
62352
- if (e + 1 > len) {
62353
- if (--i > 0) for (str += "."; i--; str += "0") ;
62354
- } else {
62355
- i += e - len;
62356
- if (i > 0) {
62357
- if (e + 1 == len) str += ".";
62358
- for (; i--; str += "0") ;
62359
- }
62360
- }
62361
- }
62362
- }
62363
- return n.s < 0 && c0 ? "-" + str : str;
62364
- }
62365
- function maxOrMin(args, method) {
62366
- var n, i = 1, m = new BigNumber3(args[0]);
62367
- for (; i < args.length; i++) {
62368
- n = new BigNumber3(args[i]);
62369
- if (!n.s) {
62370
- m = n;
62371
- break;
62372
- } else if (method.call(m, n)) {
62373
- m = n;
62374
- }
62375
- }
62376
- return m;
62377
- }
62378
- function normalise(n, c, e) {
62379
- var i = 1, j = c.length;
62380
- for (; !c[--j]; c.pop()) ;
62381
- for (j = c[0]; j >= 10; j /= 10, i++) ;
62382
- if ((e = i + e * LOG_BASE - 1) > MAX_EXP) {
62383
- n.c = n.e = null;
62384
- } else if (e < MIN_EXP) {
62385
- n.c = [n.e = 0];
62386
- } else {
62387
- n.e = e;
62388
- n.c = c;
62389
- }
62390
- return n;
62391
- }
62392
- parseNumeric = /* @__PURE__ */ (function() {
62393
- var basePrefix = /^(-?)0([xbo])(?=\w[\w.]*$)/i, dotAfter = /^([^.]+)\.$/, dotBefore = /^\.([^.]+)$/, isInfinityOrNaN = /^-?(Infinity|NaN)$/, whitespaceOrPlus = /^\s*\+(?=[\w.])|^\s+|\s+$/g;
62394
- return function(x, str, isNum, b) {
62395
- var base, s = isNum ? str : str.replace(whitespaceOrPlus, "");
62396
- if (isInfinityOrNaN.test(s)) {
62397
- x.s = isNaN(s) ? null : s < 0 ? -1 : 1;
62398
- } else {
62399
- if (!isNum) {
62400
- s = s.replace(basePrefix, function(m, p1, p2) {
62401
- base = (p2 = p2.toLowerCase()) == "x" ? 16 : p2 == "b" ? 2 : 8;
62402
- return !b || b == base ? p1 : m;
62403
- });
62404
- if (b) {
62405
- base = b;
62406
- s = s.replace(dotAfter, "$1").replace(dotBefore, "0.$1");
62407
- }
62408
- if (str != s) return new BigNumber3(s, base);
62409
- }
62410
- if (BigNumber3.DEBUG) {
62411
- throw Error(bignumberError + "Not a" + (b ? " base " + b : "") + " number: " + str);
62412
- }
62413
- x.s = null;
62414
- }
62415
- x.c = x.e = null;
62416
- };
62417
- })();
62418
- function round(x, sd, rm, r) {
62419
- var d, i, j, k, n, ni, rd, xc = x.c, pows10 = POWS_TEN;
62420
- if (xc) {
62421
- out: {
62422
- for (d = 1, k = xc[0]; k >= 10; k /= 10, d++) ;
62423
- i = sd - d;
62424
- if (i < 0) {
62425
- i += LOG_BASE;
62426
- j = sd;
62427
- n = xc[ni = 0];
62428
- rd = n / pows10[d - j - 1] % 10 | 0;
62429
- } else {
62430
- ni = mathceil((i + 1) / LOG_BASE);
62431
- if (ni >= xc.length) {
62432
- if (r) {
62433
- for (; xc.length <= ni; xc.push(0)) ;
62434
- n = rd = 0;
62435
- d = 1;
62436
- i %= LOG_BASE;
62437
- j = i - LOG_BASE + 1;
62438
- } else {
62439
- break out;
62440
- }
62441
- } else {
62442
- n = k = xc[ni];
62443
- for (d = 1; k >= 10; k /= 10, d++) ;
62444
- i %= LOG_BASE;
62445
- j = i - LOG_BASE + d;
62446
- rd = j < 0 ? 0 : n / pows10[d - j - 1] % 10 | 0;
62447
- }
62448
- }
62449
- r = r || sd < 0 || // Are there any non-zero digits after the rounding digit?
62450
- // The expression n % pows10[d - j - 1] returns all digits of n to the right
62451
- // of the digit at j, e.g. if n is 908714 and j is 2, the expression gives 714.
62452
- xc[ni + 1] != null || (j < 0 ? n : n % pows10[d - j - 1]);
62453
- r = rm < 4 ? (rd || r) && (rm == 0 || rm == (x.s < 0 ? 3 : 2)) : rd > 5 || rd == 5 && (rm == 4 || r || rm == 6 && // Check whether the digit to the left of the rounding digit is odd.
62454
- (i > 0 ? j > 0 ? n / pows10[d - j] : 0 : xc[ni - 1]) % 10 & 1 || rm == (x.s < 0 ? 8 : 7));
62455
- if (sd < 1 || !xc[0]) {
62456
- xc.length = 0;
62457
- if (r) {
62458
- sd -= x.e + 1;
62459
- xc[0] = pows10[(LOG_BASE - sd % LOG_BASE) % LOG_BASE];
62460
- x.e = -sd || 0;
62461
- } else {
62462
- xc[0] = x.e = 0;
62463
- }
62464
- return x;
62465
- }
62466
- if (i == 0) {
62467
- xc.length = ni;
62468
- k = 1;
62469
- ni--;
62470
- } else {
62471
- xc.length = ni + 1;
62472
- k = pows10[LOG_BASE - i];
62473
- xc[ni] = j > 0 ? mathfloor(n / pows10[d - j] % pows10[j]) * k : 0;
62474
- }
62475
- if (r) {
62476
- for (; ; ) {
62477
- if (ni == 0) {
62478
- for (i = 1, j = xc[0]; j >= 10; j /= 10, i++) ;
62479
- j = xc[0] += k;
62480
- for (k = 1; j >= 10; j /= 10, k++) ;
62481
- if (i != k) {
62482
- x.e++;
62483
- if (xc[0] == BASE) xc[0] = 1;
62484
- }
62485
- break;
62486
- } else {
62487
- xc[ni] += k;
62488
- if (xc[ni] != BASE) break;
62489
- xc[ni--] = 0;
62490
- k = 1;
62491
- }
62492
- }
62493
- }
62494
- for (i = xc.length; xc[--i] === 0; xc.pop()) ;
62495
- }
62496
- if (x.e > MAX_EXP) {
62497
- x.c = x.e = null;
62498
- } else if (x.e < MIN_EXP) {
62499
- x.c = [x.e = 0];
62500
- }
62501
- }
62502
- return x;
62503
- }
62504
- function valueOf(n) {
62505
- var str, e = n.e;
62506
- if (e === null) return n.toString();
62507
- str = coeffToString(n.c);
62508
- str = e <= TO_EXP_NEG || e >= TO_EXP_POS ? toExponential(str, e) : toFixedPoint(str, e, "0");
62509
- return n.s < 0 ? "-" + str : str;
62510
- }
62511
- P.absoluteValue = P.abs = function() {
62512
- var x = new BigNumber3(this);
62513
- if (x.s < 0) x.s = 1;
62514
- return x;
62515
- };
62516
- P.comparedTo = function(y, b) {
62517
- return compare(this, new BigNumber3(y, b));
62518
- };
62519
- P.decimalPlaces = P.dp = function(dp, rm) {
62520
- var c, n, v, x = this;
62521
- if (dp != null) {
62522
- intCheck(dp, 0, MAX);
62523
- if (rm == null) rm = ROUNDING_MODE;
62524
- else intCheck(rm, 0, 8);
62525
- return round(new BigNumber3(x), dp + x.e + 1, rm);
62526
- }
62527
- if (!(c = x.c)) return null;
62528
- n = ((v = c.length - 1) - bitFloor(this.e / LOG_BASE)) * LOG_BASE;
62529
- if (v = c[v]) for (; v % 10 == 0; v /= 10, n--) ;
62530
- if (n < 0) n = 0;
62531
- return n;
62532
- };
62533
- P.dividedBy = P.div = function(y, b) {
62534
- return div(this, new BigNumber3(y, b), DECIMAL_PLACES, ROUNDING_MODE);
62535
- };
62536
- P.dividedToIntegerBy = P.idiv = function(y, b) {
62537
- return div(this, new BigNumber3(y, b), 0, 1);
62538
- };
62539
- P.exponentiatedBy = P.pow = function(n, m) {
62540
- var half, isModExp, i, k, more, nIsBig, nIsNeg, nIsOdd, y, x = this;
62541
- n = new BigNumber3(n);
62542
- if (n.c && !n.isInteger()) {
62543
- throw Error(bignumberError + "Exponent not an integer: " + valueOf(n));
62544
- }
62545
- if (m != null) m = new BigNumber3(m);
62546
- nIsBig = n.e > 14;
62547
- if (!x.c || !x.c[0] || x.c[0] == 1 && !x.e && x.c.length == 1 || !n.c || !n.c[0]) {
62548
- y = new BigNumber3(Math.pow(+valueOf(x), nIsBig ? 2 - isOdd(n) : +valueOf(n)));
62549
- return m ? y.mod(m) : y;
62550
- }
62551
- nIsNeg = n.s < 0;
62552
- if (m) {
62553
- if (m.c ? !m.c[0] : !m.s) return new BigNumber3(NaN);
62554
- isModExp = !nIsNeg && x.isInteger() && m.isInteger();
62555
- if (isModExp) x = x.mod(m);
62556
- } else if (n.e > 9 && (x.e > 0 || x.e < -1 || (x.e == 0 ? x.c[0] > 1 || nIsBig && x.c[1] >= 24e7 : x.c[0] < 8e13 || nIsBig && x.c[0] <= 9999975e7))) {
62557
- k = x.s < 0 && isOdd(n) ? -0 : 0;
62558
- if (x.e > -1) k = 1 / k;
62559
- return new BigNumber3(nIsNeg ? 1 / k : k);
62560
- } else if (POW_PRECISION) {
62561
- k = mathceil(POW_PRECISION / LOG_BASE + 2);
62562
- }
62563
- if (nIsBig) {
62564
- half = new BigNumber3(0.5);
62565
- if (nIsNeg) n.s = 1;
62566
- nIsOdd = isOdd(n);
62567
- } else {
62568
- i = Math.abs(+valueOf(n));
62569
- nIsOdd = i % 2;
62570
- }
62571
- y = new BigNumber3(ONE);
62572
- for (; ; ) {
62573
- if (nIsOdd) {
62574
- y = y.times(x);
62575
- if (!y.c) break;
62576
- if (k) {
62577
- if (y.c.length > k) y.c.length = k;
62578
- } else if (isModExp) {
62579
- y = y.mod(m);
62580
- }
62581
- }
62582
- if (i) {
62583
- i = mathfloor(i / 2);
62584
- if (i === 0) break;
62585
- nIsOdd = i % 2;
62586
- } else {
62587
- n = n.times(half);
62588
- round(n, n.e + 1, 1);
62589
- if (n.e > 14) {
62590
- nIsOdd = isOdd(n);
62591
- } else {
62592
- i = +valueOf(n);
62593
- if (i === 0) break;
62594
- nIsOdd = i % 2;
62595
- }
62596
- }
62597
- x = x.times(x);
62598
- if (k) {
62599
- if (x.c && x.c.length > k) x.c.length = k;
62600
- } else if (isModExp) {
62601
- x = x.mod(m);
62602
- }
62603
- }
62604
- if (isModExp) return y;
62605
- if (nIsNeg) y = ONE.div(y);
62606
- return m ? y.mod(m) : k ? round(y, POW_PRECISION, ROUNDING_MODE, more) : y;
62607
- };
62608
- P.integerValue = function(rm) {
62609
- var n = new BigNumber3(this);
62610
- if (rm == null) rm = ROUNDING_MODE;
62611
- else intCheck(rm, 0, 8);
62612
- return round(n, n.e + 1, rm);
62613
- };
62614
- P.isEqualTo = P.eq = function(y, b) {
62615
- return compare(this, new BigNumber3(y, b)) === 0;
62616
- };
62617
- P.isFinite = function() {
62618
- return !!this.c;
62619
- };
62620
- P.isGreaterThan = P.gt = function(y, b) {
62621
- return compare(this, new BigNumber3(y, b)) > 0;
62622
- };
62623
- P.isGreaterThanOrEqualTo = P.gte = function(y, b) {
62624
- return (b = compare(this, new BigNumber3(y, b))) === 1 || b === 0;
62625
- };
62626
- P.isInteger = function() {
62627
- return !!this.c && bitFloor(this.e / LOG_BASE) > this.c.length - 2;
62628
- };
62629
- P.isLessThan = P.lt = function(y, b) {
62630
- return compare(this, new BigNumber3(y, b)) < 0;
62631
- };
62632
- P.isLessThanOrEqualTo = P.lte = function(y, b) {
62633
- return (b = compare(this, new BigNumber3(y, b))) === -1 || b === 0;
62634
- };
62635
- P.isNaN = function() {
62636
- return !this.s;
62637
- };
62638
- P.isNegative = function() {
62639
- return this.s < 0;
62640
- };
62641
- P.isPositive = function() {
62642
- return this.s > 0;
62643
- };
62644
- P.isZero = function() {
62645
- return !!this.c && this.c[0] == 0;
62646
- };
62647
- P.minus = function(y, b) {
62648
- var i, j, t, xLTy, x = this, a = x.s;
62649
- y = new BigNumber3(y, b);
62650
- b = y.s;
62651
- if (!a || !b) return new BigNumber3(NaN);
62652
- if (a != b) {
62653
- y.s = -b;
62654
- return x.plus(y);
62655
- }
62656
- var xe = x.e / LOG_BASE, ye = y.e / LOG_BASE, xc = x.c, yc = y.c;
62657
- if (!xe || !ye) {
62658
- if (!xc || !yc) return xc ? (y.s = -b, y) : new BigNumber3(yc ? x : NaN);
62659
- if (!xc[0] || !yc[0]) {
62660
- return yc[0] ? (y.s = -b, y) : new BigNumber3(xc[0] ? x : (
62661
- // IEEE 754 (2008) 6.3: n - n = -0 when rounding to -Infinity
62662
- ROUNDING_MODE == 3 ? -0 : 0
62663
- ));
62664
- }
62665
- }
62666
- xe = bitFloor(xe);
62667
- ye = bitFloor(ye);
62668
- xc = xc.slice();
62669
- if (a = xe - ye) {
62670
- if (xLTy = a < 0) {
62671
- a = -a;
62672
- t = xc;
62673
- } else {
62674
- ye = xe;
62675
- t = yc;
62676
- }
62677
- t.reverse();
62678
- for (b = a; b--; t.push(0)) ;
62679
- t.reverse();
62680
- } else {
62681
- j = (xLTy = (a = xc.length) < (b = yc.length)) ? a : b;
62682
- for (a = b = 0; b < j; b++) {
62683
- if (xc[b] != yc[b]) {
62684
- xLTy = xc[b] < yc[b];
62685
- break;
62686
- }
62687
- }
62688
- }
62689
- if (xLTy) t = xc, xc = yc, yc = t, y.s = -y.s;
62690
- b = (j = yc.length) - (i = xc.length);
62691
- if (b > 0) for (; b--; xc[i++] = 0) ;
62692
- b = BASE - 1;
62693
- for (; j > a; ) {
62694
- if (xc[--j] < yc[j]) {
62695
- for (i = j; i && !xc[--i]; xc[i] = b) ;
62696
- --xc[i];
62697
- xc[j] += BASE;
62698
- }
62699
- xc[j] -= yc[j];
62700
- }
62701
- for (; xc[0] == 0; xc.splice(0, 1), --ye) ;
62702
- if (!xc[0]) {
62703
- y.s = ROUNDING_MODE == 3 ? -1 : 1;
62704
- y.c = [y.e = 0];
62705
- return y;
62706
- }
62707
- return normalise(y, xc, ye);
62708
- };
62709
- P.modulo = P.mod = function(y, b) {
62710
- var q, s, x = this;
62711
- y = new BigNumber3(y, b);
62712
- if (!x.c || !y.s || y.c && !y.c[0]) {
62713
- return new BigNumber3(NaN);
62714
- } else if (!y.c || x.c && !x.c[0]) {
62715
- return new BigNumber3(x);
62716
- }
62717
- if (MODULO_MODE == 9) {
62718
- s = y.s;
62719
- y.s = 1;
62720
- q = div(x, y, 0, 3);
62721
- y.s = s;
62722
- q.s *= s;
62723
- } else {
62724
- q = div(x, y, 0, MODULO_MODE);
62725
- }
62726
- y = x.minus(q.times(y));
62727
- if (!y.c[0] && MODULO_MODE == 1) y.s = x.s;
62728
- return y;
62729
- };
62730
- P.multipliedBy = P.times = function(y, b) {
62731
- var c, e, i, j, k, m, xcL, xlo, xhi, ycL, ylo, yhi, zc, base, sqrtBase, x = this, xc = x.c, yc = (y = new BigNumber3(y, b)).c;
62732
- if (!xc || !yc || !xc[0] || !yc[0]) {
62733
- if (!x.s || !y.s || xc && !xc[0] && !yc || yc && !yc[0] && !xc) {
62734
- y.c = y.e = y.s = null;
62735
- } else {
62736
- y.s *= x.s;
62737
- if (!xc || !yc) {
62738
- y.c = y.e = null;
62739
- } else {
62740
- y.c = [0];
62741
- y.e = 0;
62742
- }
62743
- }
62744
- return y;
62745
- }
62746
- e = bitFloor(x.e / LOG_BASE) + bitFloor(y.e / LOG_BASE);
62747
- y.s *= x.s;
62748
- xcL = xc.length;
62749
- ycL = yc.length;
62750
- if (xcL < ycL) zc = xc, xc = yc, yc = zc, i = xcL, xcL = ycL, ycL = i;
62751
- for (i = xcL + ycL, zc = []; i--; zc.push(0)) ;
62752
- base = BASE;
62753
- sqrtBase = SQRT_BASE;
62754
- for (i = ycL; --i >= 0; ) {
62755
- c = 0;
62756
- ylo = yc[i] % sqrtBase;
62757
- yhi = yc[i] / sqrtBase | 0;
62758
- for (k = xcL, j = i + k; j > i; ) {
62759
- xlo = xc[--k] % sqrtBase;
62760
- xhi = xc[k] / sqrtBase | 0;
62761
- m = yhi * xlo + xhi * ylo;
62762
- xlo = ylo * xlo + m % sqrtBase * sqrtBase + zc[j] + c;
62763
- c = (xlo / base | 0) + (m / sqrtBase | 0) + yhi * xhi;
62764
- zc[j--] = xlo % base;
62765
- }
62766
- zc[j] = c;
62767
- }
62768
- if (c) {
62769
- ++e;
62770
- } else {
62771
- zc.splice(0, 1);
62772
- }
62773
- return normalise(y, zc, e);
62774
- };
62775
- P.negated = function() {
62776
- var x = new BigNumber3(this);
62777
- x.s = -x.s || null;
62778
- return x;
62779
- };
62780
- P.plus = function(y, b) {
62781
- var t, x = this, a = x.s;
62782
- y = new BigNumber3(y, b);
62783
- b = y.s;
62784
- if (!a || !b) return new BigNumber3(NaN);
62785
- if (a != b) {
62786
- y.s = -b;
62787
- return x.minus(y);
62788
- }
62789
- var xe = x.e / LOG_BASE, ye = y.e / LOG_BASE, xc = x.c, yc = y.c;
62790
- if (!xe || !ye) {
62791
- if (!xc || !yc) return new BigNumber3(a / 0);
62792
- if (!xc[0] || !yc[0]) return yc[0] ? y : new BigNumber3(xc[0] ? x : a * 0);
62793
- }
62794
- xe = bitFloor(xe);
62795
- ye = bitFloor(ye);
62796
- xc = xc.slice();
62797
- if (a = xe - ye) {
62798
- if (a > 0) {
62799
- ye = xe;
62800
- t = yc;
62801
- } else {
62802
- a = -a;
62803
- t = xc;
62804
- }
62805
- t.reverse();
62806
- for (; a--; t.push(0)) ;
62807
- t.reverse();
62808
- }
62809
- a = xc.length;
62810
- b = yc.length;
62811
- if (a - b < 0) t = yc, yc = xc, xc = t, b = a;
62812
- for (a = 0; b; ) {
62813
- a = (xc[--b] = xc[b] + yc[b] + a) / BASE | 0;
62814
- xc[b] = BASE === xc[b] ? 0 : xc[b] % BASE;
62815
- }
62816
- if (a) {
62817
- xc = [a].concat(xc);
62818
- ++ye;
62819
- }
62820
- return normalise(y, xc, ye);
62821
- };
62822
- P.precision = P.sd = function(sd, rm) {
62823
- var c, n, v, x = this;
62824
- if (sd != null && sd !== !!sd) {
62825
- intCheck(sd, 1, MAX);
62826
- if (rm == null) rm = ROUNDING_MODE;
62827
- else intCheck(rm, 0, 8);
62828
- return round(new BigNumber3(x), sd, rm);
62829
- }
62830
- if (!(c = x.c)) return null;
62831
- v = c.length - 1;
62832
- n = v * LOG_BASE + 1;
62833
- if (v = c[v]) {
62834
- for (; v % 10 == 0; v /= 10, n--) ;
62835
- for (v = c[0]; v >= 10; v /= 10, n++) ;
62836
- }
62837
- if (sd && x.e + 1 > n) n = x.e + 1;
62838
- return n;
62839
- };
62840
- P.shiftedBy = function(k) {
62841
- intCheck(k, -MAX_SAFE_INTEGER, MAX_SAFE_INTEGER);
62842
- return this.times("1e" + k);
62843
- };
62844
- P.squareRoot = P.sqrt = function() {
62845
- var m, n, r, rep, t, x = this, c = x.c, s = x.s, e = x.e, dp = DECIMAL_PLACES + 4, half = new BigNumber3("0.5");
62846
- if (s !== 1 || !c || !c[0]) {
62847
- return new BigNumber3(!s || s < 0 && (!c || c[0]) ? NaN : c ? x : 1 / 0);
62848
- }
62849
- s = Math.sqrt(+valueOf(x));
62850
- if (s == 0 || s == 1 / 0) {
62851
- n = coeffToString(c);
62852
- if ((n.length + e) % 2 == 0) n += "0";
62853
- s = Math.sqrt(+n);
62854
- e = bitFloor((e + 1) / 2) - (e < 0 || e % 2);
62855
- if (s == 1 / 0) {
62856
- n = "1e" + e;
62857
- } else {
62858
- n = s.toExponential();
62859
- n = n.slice(0, n.indexOf("e") + 1) + e;
62860
- }
62861
- r = new BigNumber3(n);
62862
- } else {
62863
- r = new BigNumber3(s + "");
62864
- }
62865
- if (r.c[0]) {
62866
- e = r.e;
62867
- s = e + dp;
62868
- if (s < 3) s = 0;
62869
- for (; ; ) {
62870
- t = r;
62871
- r = half.times(t.plus(div(x, t, dp, 1)));
62872
- if (coeffToString(t.c).slice(0, s) === (n = coeffToString(r.c)).slice(0, s)) {
62873
- if (r.e < e) --s;
62874
- n = n.slice(s - 3, s + 1);
62875
- if (n == "9999" || !rep && n == "4999") {
62876
- if (!rep) {
62877
- round(t, t.e + DECIMAL_PLACES + 2, 0);
62878
- if (t.times(t).eq(x)) {
62879
- r = t;
62880
- break;
62881
- }
62882
- }
62883
- dp += 4;
62884
- s += 4;
62885
- rep = 1;
62886
- } else {
62887
- if (!+n || !+n.slice(1) && n.charAt(0) == "5") {
62888
- round(r, r.e + DECIMAL_PLACES + 2, 1);
62889
- m = !r.times(r).eq(x);
62890
- }
62891
- break;
62892
- }
62893
- }
62894
- }
62895
- }
62896
- return round(r, r.e + DECIMAL_PLACES + 1, ROUNDING_MODE, m);
62897
- };
62898
- P.toExponential = function(dp, rm) {
62899
- if (dp != null) {
62900
- intCheck(dp, 0, MAX);
62901
- dp++;
62902
- }
62903
- return format(this, dp, rm, 1);
62904
- };
62905
- P.toFixed = function(dp, rm) {
62906
- if (dp != null) {
62907
- intCheck(dp, 0, MAX);
62908
- dp = dp + this.e + 1;
62909
- }
62910
- return format(this, dp, rm);
62911
- };
62912
- P.toFormat = function(dp, rm, format2) {
62913
- var str, x = this;
62914
- if (format2 == null) {
62915
- if (dp != null && rm && typeof rm == "object") {
62916
- format2 = rm;
62917
- rm = null;
62918
- } else if (dp && typeof dp == "object") {
62919
- format2 = dp;
62920
- dp = rm = null;
62921
- } else {
62922
- format2 = FORMAT;
62923
- }
62924
- } else if (typeof format2 != "object") {
62925
- throw Error(bignumberError + "Argument not an object: " + format2);
62926
- }
62927
- str = x.toFixed(dp, rm);
62928
- if (x.c) {
62929
- var i, arr = str.split("."), g1 = +format2.groupSize, g2 = +format2.secondaryGroupSize, groupSeparator = format2.groupSeparator || "", intPart = arr[0], fractionPart = arr[1], isNeg = x.s < 0, intDigits = isNeg ? intPart.slice(1) : intPart, len = intDigits.length;
62930
- if (g2) i = g1, g1 = g2, g2 = i, len -= i;
62931
- if (g1 > 0 && len > 0) {
62932
- i = len % g1 || g1;
62933
- intPart = intDigits.substr(0, i);
62934
- for (; i < len; i += g1) intPart += groupSeparator + intDigits.substr(i, g1);
62935
- if (g2 > 0) intPart += groupSeparator + intDigits.slice(i);
62936
- if (isNeg) intPart = "-" + intPart;
62937
- }
62938
- str = fractionPart ? intPart + (format2.decimalSeparator || "") + ((g2 = +format2.fractionGroupSize) ? fractionPart.replace(
62939
- new RegExp("\\d{" + g2 + "}\\B", "g"),
62940
- "$&" + (format2.fractionGroupSeparator || "")
62941
- ) : fractionPart) : intPart;
62942
- }
62943
- return (format2.prefix || "") + str + (format2.suffix || "");
62944
- };
62945
- P.toFraction = function(md) {
62946
- var d, d0, d1, d2, e, exp, n, n0, n1, q, r, s, x = this, xc = x.c;
62947
- if (md != null) {
62948
- n = new BigNumber3(md);
62949
- if (!n.isInteger() && (n.c || n.s !== 1) || n.lt(ONE)) {
62950
- throw Error(bignumberError + "Argument " + (n.isInteger() ? "out of range: " : "not an integer: ") + valueOf(n));
62951
- }
62952
- }
62953
- if (!xc) return new BigNumber3(x);
62954
- d = new BigNumber3(ONE);
62955
- n1 = d0 = new BigNumber3(ONE);
62956
- d1 = n0 = new BigNumber3(ONE);
62957
- s = coeffToString(xc);
62958
- e = d.e = s.length - x.e - 1;
62959
- d.c[0] = POWS_TEN[(exp = e % LOG_BASE) < 0 ? LOG_BASE + exp : exp];
62960
- md = !md || n.comparedTo(d) > 0 ? e > 0 ? d : n1 : n;
62961
- exp = MAX_EXP;
62962
- MAX_EXP = 1 / 0;
62963
- n = new BigNumber3(s);
62964
- n0.c[0] = 0;
62965
- for (; ; ) {
62966
- q = div(n, d, 0, 1);
62967
- d2 = d0.plus(q.times(d1));
62968
- if (d2.comparedTo(md) == 1) break;
62969
- d0 = d1;
62970
- d1 = d2;
62971
- n1 = n0.plus(q.times(d2 = n1));
62972
- n0 = d2;
62973
- d = n.minus(q.times(d2 = d));
62974
- n = d2;
62975
- }
62976
- d2 = div(md.minus(d0), d1, 0, 1);
62977
- n0 = n0.plus(d2.times(n1));
62978
- d0 = d0.plus(d2.times(d1));
62979
- n0.s = n1.s = x.s;
62980
- e = e * 2;
62981
- r = div(n1, d1, e, ROUNDING_MODE).minus(x).abs().comparedTo(
62982
- div(n0, d0, e, ROUNDING_MODE).minus(x).abs()
62983
- ) < 1 ? [n1, d1] : [n0, d0];
62984
- MAX_EXP = exp;
62985
- return r;
62986
- };
62987
- P.toNumber = function() {
62988
- return +valueOf(this);
62989
- };
62990
- P.toPrecision = function(sd, rm) {
62991
- if (sd != null) intCheck(sd, 1, MAX);
62992
- return format(this, sd, rm, 2);
61548
+ try {
61549
+ fs8.closeSync(fd);
61550
+ } catch (e) {
61551
+ closeError = e;
61552
+ }
61553
+ if (er || closeError) {
61554
+ this[ONERROR](er || closeError, entry);
61555
+ }
61556
+ done();
62993
61557
  };
62994
- P.toString = function(b) {
62995
- var str, n = this, s = n.s, e = n.e;
62996
- if (e === null) {
62997
- if (s) {
62998
- str = "Infinity";
62999
- if (s < 0) str = "-" + str;
63000
- } else {
63001
- str = "NaN";
61558
+ let fd;
61559
+ try {
61560
+ fd = fs8.openSync(entry.absolute, getFlag(entry.size), mode);
61561
+ } catch (er) {
61562
+ return oner(er);
61563
+ }
61564
+ const tx = this.transform ? this.transform(entry) || entry : entry;
61565
+ if (tx !== entry) {
61566
+ tx.on("error", (er) => this[ONERROR](er, entry));
61567
+ entry.pipe(tx);
61568
+ }
61569
+ tx.on("data", (chunk) => {
61570
+ try {
61571
+ fs8.writeSync(fd, chunk, 0, chunk.length);
61572
+ } catch (er) {
61573
+ oner(er);
61574
+ }
61575
+ });
61576
+ tx.on("end", (_) => {
61577
+ let er = null;
61578
+ if (entry.mtime && !this.noMtime) {
61579
+ const atime = entry.atime || /* @__PURE__ */ new Date();
61580
+ const mtime = entry.mtime;
61581
+ try {
61582
+ fs8.futimesSync(fd, atime, mtime);
61583
+ } catch (futimeser) {
61584
+ try {
61585
+ fs8.utimesSync(entry.absolute, atime, mtime);
61586
+ } catch (utimeser) {
61587
+ er = futimeser;
61588
+ }
63002
61589
  }
63003
- } else {
63004
- if (b == null) {
63005
- str = e <= TO_EXP_NEG || e >= TO_EXP_POS ? toExponential(coeffToString(n.c), e) : toFixedPoint(coeffToString(n.c), e, "0");
63006
- } else if (b === 10) {
63007
- n = round(new BigNumber3(n), DECIMAL_PLACES + e + 1, ROUNDING_MODE);
63008
- str = toFixedPoint(coeffToString(n.c), n.e, "0");
63009
- } else {
63010
- intCheck(b, 2, ALPHABET.length, "Base");
63011
- str = convertBase(toFixedPoint(coeffToString(n.c), e, "0"), 10, b, s, true);
61590
+ }
61591
+ if (this[DOCHOWN](entry)) {
61592
+ const uid = this[UID](entry);
61593
+ const gid = this[GID](entry);
61594
+ try {
61595
+ fs8.fchownSync(fd, uid, gid);
61596
+ } catch (fchowner) {
61597
+ try {
61598
+ fs8.chownSync(entry.absolute, uid, gid);
61599
+ } catch (chowner) {
61600
+ er = er || fchowner;
61601
+ }
63012
61602
  }
63013
- if (s < 0 && n.c[0]) str = "-" + str;
63014
61603
  }
63015
- return str;
63016
- };
63017
- P.valueOf = P.toJSON = function() {
63018
- return valueOf(this);
63019
- };
63020
- P._isBigNumber = true;
63021
- if (configObject != null) BigNumber3.set(configObject);
63022
- return BigNumber3;
63023
- }
63024
- function bitFloor(n) {
63025
- var i = n | 0;
63026
- return n > 0 || n === i ? i : i - 1;
61604
+ oner(er);
61605
+ });
63027
61606
  }
63028
- function coeffToString(a) {
63029
- var s, z3, i = 1, j = a.length, r = a[0] + "";
63030
- for (; i < j; ) {
63031
- s = a[i++] + "";
63032
- z3 = LOG_BASE - s.length;
63033
- for (; z3--; s = "0" + s) ;
63034
- r += s;
61607
+ [DIRECTORY](entry, done) {
61608
+ const mode = entry.mode & 4095 || this.dmode;
61609
+ const er = this[MKDIR](entry.absolute, mode);
61610
+ if (er) {
61611
+ this[ONERROR](er, entry);
61612
+ done();
61613
+ return;
63035
61614
  }
63036
- for (j = r.length; r.charCodeAt(--j) === 48; ) ;
63037
- return r.slice(0, j + 1 || 1);
63038
- }
63039
- function compare(x, y) {
63040
- var a, b, xc = x.c, yc = y.c, i = x.s, j = y.s, k = x.e, l = y.e;
63041
- if (!i || !j) return null;
63042
- a = xc && !xc[0];
63043
- b = yc && !yc[0];
63044
- if (a || b) return a ? b ? 0 : -j : i;
63045
- if (i != j) return i;
63046
- a = i < 0;
63047
- b = k == l;
63048
- if (!xc || !yc) return b ? 0 : !xc ^ a ? 1 : -1;
63049
- if (!b) return k > l ^ a ? 1 : -1;
63050
- j = (k = xc.length) < (l = yc.length) ? k : l;
63051
- for (i = 0; i < j; i++) if (xc[i] != yc[i]) return xc[i] > yc[i] ^ a ? 1 : -1;
63052
- return k == l ? 0 : k > l ^ a ? 1 : -1;
61615
+ if (entry.mtime && !this.noMtime) {
61616
+ try {
61617
+ fs8.utimesSync(entry.absolute, entry.atime || /* @__PURE__ */ new Date(), entry.mtime);
61618
+ } catch (er2) {
61619
+ }
61620
+ }
61621
+ if (this[DOCHOWN](entry)) {
61622
+ try {
61623
+ fs8.chownSync(entry.absolute, this[UID](entry), this[GID](entry));
61624
+ } catch (er2) {
61625
+ }
61626
+ }
61627
+ done();
61628
+ entry.resume();
63053
61629
  }
63054
- function intCheck(n, min, max, name) {
63055
- if (n < min || n > max || n !== mathfloor(n)) {
63056
- throw Error(bignumberError + (name || "Argument") + (typeof n == "number" ? n < min || n > max ? " out of range: " : " not an integer: " : " not a primitive number: ") + String(n));
61630
+ [MKDIR](dir, mode) {
61631
+ try {
61632
+ return mkdir.sync(normPath(dir), {
61633
+ uid: this.uid,
61634
+ gid: this.gid,
61635
+ processUid: this.processUid,
61636
+ processGid: this.processGid,
61637
+ umask: this.processUmask,
61638
+ preserve: this.preservePaths,
61639
+ unlink: this.unlink,
61640
+ cache: this.dirCache,
61641
+ cwd: this.cwd,
61642
+ mode
61643
+ });
61644
+ } catch (er) {
61645
+ return er;
63057
61646
  }
63058
61647
  }
63059
- function isOdd(n) {
63060
- var k = n.c.length - 1;
63061
- return bitFloor(n.e / LOG_BASE) == k && n.c[k] % 2 != 0;
61648
+ [LINK](entry, linkpath, link, done) {
61649
+ try {
61650
+ fs8[link + "Sync"](linkpath, entry.absolute);
61651
+ done();
61652
+ entry.resume();
61653
+ } catch (er) {
61654
+ return this[ONERROR](er, entry);
61655
+ }
63062
61656
  }
63063
- function toExponential(str, e) {
63064
- return (str.length > 1 ? str.charAt(0) + "." + str.slice(1) : str) + (e < 0 ? "e" : "e+") + e;
61657
+ };
61658
+ Unpack.Sync = UnpackSync;
61659
+ module.exports = Unpack;
61660
+ }
61661
+ });
61662
+
61663
+ // node_modules/tar/lib/extract.js
61664
+ var require_extract = __commonJS({
61665
+ "node_modules/tar/lib/extract.js"(exports, module) {
61666
+ "use strict";
61667
+ var hlo = require_high_level_opt();
61668
+ var Unpack = require_unpack();
61669
+ var fs8 = __require("fs");
61670
+ var fsm = require_fs_minipass();
61671
+ var path7 = __require("path");
61672
+ var stripSlash = require_strip_trailing_slashes();
61673
+ module.exports = (opt_, files, cb) => {
61674
+ if (typeof opt_ === "function") {
61675
+ cb = opt_, files = null, opt_ = {};
61676
+ } else if (Array.isArray(opt_)) {
61677
+ files = opt_, opt_ = {};
63065
61678
  }
63066
- function toFixedPoint(str, e, z3) {
63067
- var len, zs;
63068
- if (e < 0) {
63069
- for (zs = z3 + "."; ++e; zs += z3) ;
63070
- str = zs + str;
63071
- } else {
63072
- len = str.length;
63073
- if (++e > len) {
63074
- for (zs = z3, e -= len; --e; zs += z3) ;
63075
- str += zs;
63076
- } else if (e < len) {
63077
- str = str.slice(0, e) + "." + str.slice(e);
63078
- }
63079
- }
63080
- return str;
61679
+ if (typeof files === "function") {
61680
+ cb = files, files = null;
63081
61681
  }
63082
- BigNumber2 = clone2();
63083
- BigNumber2["default"] = BigNumber2.BigNumber = BigNumber2;
63084
- if (typeof define == "function" && define.amd) {
63085
- define(function() {
63086
- return BigNumber2;
63087
- });
63088
- } else if (typeof module != "undefined" && module.exports) {
63089
- module.exports = BigNumber2;
61682
+ if (!files) {
61683
+ files = [];
63090
61684
  } else {
63091
- if (!globalObject) {
63092
- globalObject = typeof self != "undefined" && self ? self : window;
63093
- }
63094
- globalObject.BigNumber = BigNumber2;
61685
+ files = Array.from(files);
63095
61686
  }
63096
- })(exports);
61687
+ const opt = hlo(opt_);
61688
+ if (opt.sync && typeof cb === "function") {
61689
+ throw new TypeError("callback not supported for sync tar functions");
61690
+ }
61691
+ if (!opt.file && typeof cb === "function") {
61692
+ throw new TypeError("callback only supported with file option");
61693
+ }
61694
+ if (files.length) {
61695
+ filesFilter(opt, files);
61696
+ }
61697
+ return opt.file && opt.sync ? extractFileSync(opt) : opt.file ? extractFile(opt, cb) : opt.sync ? extractSync(opt) : extract(opt);
61698
+ };
61699
+ var filesFilter = (opt, files) => {
61700
+ const map2 = new Map(files.map((f) => [stripSlash(f), true]));
61701
+ const filter = opt.filter;
61702
+ const mapHas = (file2, r) => {
61703
+ const root = r || path7.parse(file2).root || ".";
61704
+ const ret = file2 === root ? false : map2.has(file2) ? map2.get(file2) : mapHas(path7.dirname(file2), root);
61705
+ map2.set(file2, ret);
61706
+ return ret;
61707
+ };
61708
+ opt.filter = filter ? (file2, entry) => filter(file2, entry) && mapHas(stripSlash(file2)) : (file2) => mapHas(stripSlash(file2));
61709
+ };
61710
+ var extractFileSync = (opt) => {
61711
+ const u = new Unpack.Sync(opt);
61712
+ const file2 = opt.file;
61713
+ const stat = fs8.statSync(file2);
61714
+ const readSize = opt.maxReadSize || 16 * 1024 * 1024;
61715
+ const stream = new fsm.ReadStreamSync(file2, {
61716
+ readSize,
61717
+ size: stat.size
61718
+ });
61719
+ stream.pipe(u);
61720
+ };
61721
+ var extractFile = (opt, cb) => {
61722
+ const u = new Unpack(opt);
61723
+ const readSize = opt.maxReadSize || 16 * 1024 * 1024;
61724
+ const file2 = opt.file;
61725
+ const p = new Promise((resolve3, reject) => {
61726
+ u.on("error", reject);
61727
+ u.on("close", resolve3);
61728
+ fs8.stat(file2, (er, stat) => {
61729
+ if (er) {
61730
+ reject(er);
61731
+ } else {
61732
+ const stream = new fsm.ReadStream(file2, {
61733
+ readSize,
61734
+ size: stat.size
61735
+ });
61736
+ stream.on("error", reject);
61737
+ stream.pipe(u);
61738
+ }
61739
+ });
61740
+ });
61741
+ return cb ? p.then(cb, cb) : p;
61742
+ };
61743
+ var extractSync = (opt) => new Unpack.Sync(opt);
61744
+ var extract = (opt) => new Unpack(opt);
61745
+ }
61746
+ });
61747
+
61748
+ // node_modules/tar/index.js
61749
+ var require_tar = __commonJS({
61750
+ "node_modules/tar/index.js"(exports) {
61751
+ "use strict";
61752
+ exports.c = exports.create = require_create();
61753
+ exports.r = exports.replace = require_replace();
61754
+ exports.t = exports.list = require_list2();
61755
+ exports.u = exports.update = require_update();
61756
+ exports.x = exports.extract = require_extract();
61757
+ exports.Pack = require_pack();
61758
+ exports.Unpack = require_unpack();
61759
+ exports.Parse = require_parse3();
61760
+ exports.ReadEntry = require_read_entry();
61761
+ exports.WriteEntry = require_write_entry();
61762
+ exports.Header = require_header();
61763
+ exports.Pax = require_pax();
61764
+ exports.types = require_types2();
63097
61765
  }
63098
61766
  });
63099
61767
 
@@ -70688,7 +69356,7 @@ var id_default = ID;
70688
69356
  // lib/constants.ts
70689
69357
  var SDK_TITLE = "Appwrite";
70690
69358
  var SDK_TITLE_LOWER = "appwrite";
70691
- var SDK_VERSION = "13.4.0";
69359
+ var SDK_VERSION = "13.5.0";
70692
69360
  var SDK_LOGO = "\n _ _ _ ___ __ _____\n /_\\ _ __ _ ____ ___ __(_) |_ ___ / __\\ / / \\_ \\\n //_\\\\| '_ \\| '_ \\ \\ /\\ / / '__| | __/ _ \\ / / / / / /\\/\n / _ \\ |_) | |_) \\ V V /| | | | || __/ / /___/ /___/\\/ /_\n \\_/ \\_/ .__/| .__/ \\_/\\_/ |_| |_|\\__\\___| \\____/\\____/\\____/\n |_| |_|\n\n";
70693
69361
  var EXECUTABLE_NAME = "appwrite";
70694
69362
  var NPM_PACKAGE_NAME = "appwrite-cli";
@@ -84931,6 +83599,14 @@ function isCloud() {
84931
83599
  const hostname3 = new URL(endpoint).hostname;
84932
83600
  return hostname3.endsWith("appwrite.io");
84933
83601
  }
83602
+ function arrayEqualsUnordered(left, right) {
83603
+ const a = Array.isArray(left) ? [...left].map((item) => String(item)).sort() : [];
83604
+ const b = Array.isArray(right) ? [...right].map((item) => String(item)).sort() : [];
83605
+ if (a.length !== b.length) {
83606
+ return false;
83607
+ }
83608
+ return a.every((value, index) => value === b[index]);
83609
+ }
84934
83610
  function filterBySchema(data, schema) {
84935
83611
  const allowedKeys = Object.keys(schema.shape);
84936
83612
  const result = {};
@@ -86069,7 +84745,6 @@ import path from "path";
86069
84745
 
86070
84746
  // node_modules/@appwrite.io/console/dist/esm/sdk.js
86071
84747
  var import_json_bigint2 = __toESM(require_json_bigint(), 1);
86072
- var import_bignumber = __toESM(require_bignumber2(), 1);
86073
84748
  function __awaiter(thisArg, _arguments, P, generator) {
86074
84749
  function adopt(value) {
86075
84750
  return value instanceof P ? value : new P(function(resolve3) {
@@ -86189,8 +84864,11 @@ var JSONbigParser2 = (0, import_json_bigint2.default)({ storeAsString: false });
86189
84864
  var JSONbigSerializer2 = (0, import_json_bigint2.default)({ useNativeBigInt: true });
86190
84865
  var MAX_SAFE2 = BigInt(Number.MAX_SAFE_INTEGER);
86191
84866
  var MIN_SAFE2 = BigInt(Number.MIN_SAFE_INTEGER);
84867
+ function isBigNumber2(value) {
84868
+ return value !== null && typeof value === "object" && value._isBigNumber === true && typeof value.isInteger === "function" && typeof value.toFixed === "function" && typeof value.toNumber === "function";
84869
+ }
86192
84870
  function reviver2(_key, value) {
86193
- if (import_bignumber.default.isBigNumber(value)) {
84871
+ if (isBigNumber2(value)) {
86194
84872
  if (value.isInteger()) {
86195
84873
  const str = value.toFixed();
86196
84874
  const bi = BigInt(str);
@@ -86244,7 +84922,7 @@ var Client = class _Client {
86244
84922
  "x-sdk-name": "Console",
86245
84923
  "x-sdk-platform": "console",
86246
84924
  "x-sdk-language": "web",
86247
- "x-sdk-version": "2.3.1",
84925
+ "x-sdk-version": "3.0.0",
86248
84926
  "X-Appwrite-Response-Format": "1.8.0"
86249
84927
  };
86250
84928
  this.realtime = {
@@ -96743,6 +95421,114 @@ var Projects = class {
96743
95421
  };
96744
95422
  return this.client.call("delete", uri, apiHeaders, payload);
96745
95423
  }
95424
+ listSchedules(paramsOrFirst, ...rest) {
95425
+ let params;
95426
+ if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
95427
+ params = paramsOrFirst || {};
95428
+ } else {
95429
+ params = {
95430
+ projectId: paramsOrFirst,
95431
+ queries: rest[0],
95432
+ total: rest[1]
95433
+ };
95434
+ }
95435
+ const projectId = params.projectId;
95436
+ const queries = params.queries;
95437
+ const total = params.total;
95438
+ if (typeof projectId === "undefined") {
95439
+ throw new AppwriteException('Missing required parameter: "projectId"');
95440
+ }
95441
+ const apiPath = "/projects/{projectId}/schedules".replace("{projectId}", projectId);
95442
+ const payload = {};
95443
+ if (typeof queries !== "undefined") {
95444
+ payload["queries"] = queries;
95445
+ }
95446
+ if (typeof total !== "undefined") {
95447
+ payload["total"] = total;
95448
+ }
95449
+ const uri = new URL(this.client.config.endpoint + apiPath);
95450
+ const apiHeaders = {};
95451
+ return this.client.call("get", uri, apiHeaders, payload);
95452
+ }
95453
+ createSchedule(paramsOrFirst, ...rest) {
95454
+ let params;
95455
+ if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
95456
+ params = paramsOrFirst || {};
95457
+ } else {
95458
+ params = {
95459
+ projectId: paramsOrFirst,
95460
+ resourceType: rest[0],
95461
+ resourceId: rest[1],
95462
+ schedule: rest[2],
95463
+ active: rest[3],
95464
+ data: rest[4]
95465
+ };
95466
+ }
95467
+ const projectId = params.projectId;
95468
+ const resourceType = params.resourceType;
95469
+ const resourceId = params.resourceId;
95470
+ const schedule = params.schedule;
95471
+ const active = params.active;
95472
+ const data = params.data;
95473
+ if (typeof projectId === "undefined") {
95474
+ throw new AppwriteException('Missing required parameter: "projectId"');
95475
+ }
95476
+ if (typeof resourceType === "undefined") {
95477
+ throw new AppwriteException('Missing required parameter: "resourceType"');
95478
+ }
95479
+ if (typeof resourceId === "undefined") {
95480
+ throw new AppwriteException('Missing required parameter: "resourceId"');
95481
+ }
95482
+ if (typeof schedule === "undefined") {
95483
+ throw new AppwriteException('Missing required parameter: "schedule"');
95484
+ }
95485
+ const apiPath = "/projects/{projectId}/schedules".replace("{projectId}", projectId);
95486
+ const payload = {};
95487
+ if (typeof resourceType !== "undefined") {
95488
+ payload["resourceType"] = resourceType;
95489
+ }
95490
+ if (typeof resourceId !== "undefined") {
95491
+ payload["resourceId"] = resourceId;
95492
+ }
95493
+ if (typeof schedule !== "undefined") {
95494
+ payload["schedule"] = schedule;
95495
+ }
95496
+ if (typeof active !== "undefined") {
95497
+ payload["active"] = active;
95498
+ }
95499
+ if (typeof data !== "undefined") {
95500
+ payload["data"] = data;
95501
+ }
95502
+ const uri = new URL(this.client.config.endpoint + apiPath);
95503
+ const apiHeaders = {
95504
+ "content-type": "application/json"
95505
+ };
95506
+ return this.client.call("post", uri, apiHeaders, payload);
95507
+ }
95508
+ getSchedule(paramsOrFirst, ...rest) {
95509
+ let params;
95510
+ if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
95511
+ params = paramsOrFirst || {};
95512
+ } else {
95513
+ params = {
95514
+ projectId: paramsOrFirst,
95515
+ scheduleId: rest[0]
95516
+ };
95517
+ }
95518
+ const projectId = params.projectId;
95519
+ const scheduleId = params.scheduleId;
95520
+ if (typeof projectId === "undefined") {
95521
+ throw new AppwriteException('Missing required parameter: "projectId"');
95522
+ }
95523
+ if (typeof scheduleId === "undefined") {
95524
+ throw new AppwriteException('Missing required parameter: "scheduleId"');
95525
+ }
95526
+ const apiPath = "/projects/{projectId}/schedules/{scheduleId}".replace("{projectId}", projectId).replace("{scheduleId}", scheduleId);
95527
+ const payload = {};
95528
+ const uri = new URL(this.client.config.endpoint + apiPath);
95529
+ const apiHeaders = {};
95530
+ return this.client.call("get", uri, apiHeaders, payload);
95531
+ }
96746
95532
  updateServiceStatus(paramsOrFirst, ...rest) {
96747
95533
  let params;
96748
95534
  if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
@@ -103443,6 +102229,8 @@ var Scopes;
103443
102229
  Scopes2["TargetsWrite"] = "targets.write";
103444
102230
  Scopes2["RulesRead"] = "rules.read";
103445
102231
  Scopes2["RulesWrite"] = "rules.write";
102232
+ Scopes2["SchedulesRead"] = "schedules.read";
102233
+ Scopes2["SchedulesWrite"] = "schedules.write";
103446
102234
  Scopes2["MigrationsRead"] = "migrations.read";
103447
102235
  Scopes2["MigrationsWrite"] = "migrations.write";
103448
102236
  Scopes2["VcsRead"] = "vcs.read";
@@ -103512,8 +102300,6 @@ var OAuthProvider;
103512
102300
  OAuthProvider2["Yandex"] = "yandex";
103513
102301
  OAuthProvider2["Zoho"] = "zoho";
103514
102302
  OAuthProvider2["Zoom"] = "zoom";
103515
- OAuthProvider2["GithubImagine"] = "githubImagine";
103516
- OAuthProvider2["GoogleImagine"] = "googleImagine";
103517
102303
  })(OAuthProvider || (OAuthProvider = {}));
103518
102304
  var Browser;
103519
102305
  (function(Browser2) {
@@ -104277,24 +103063,35 @@ var Runtime;
104277
103063
  Runtime2["Node200"] = "node-20.0";
104278
103064
  Runtime2["Node210"] = "node-21.0";
104279
103065
  Runtime2["Node22"] = "node-22";
103066
+ Runtime2["Node23"] = "node-23";
103067
+ Runtime2["Node24"] = "node-24";
103068
+ Runtime2["Node25"] = "node-25";
104280
103069
  Runtime2["Php80"] = "php-8.0";
104281
103070
  Runtime2["Php81"] = "php-8.1";
104282
103071
  Runtime2["Php82"] = "php-8.2";
104283
103072
  Runtime2["Php83"] = "php-8.3";
103073
+ Runtime2["Php84"] = "php-8.4";
104284
103074
  Runtime2["Ruby30"] = "ruby-3.0";
104285
103075
  Runtime2["Ruby31"] = "ruby-3.1";
104286
103076
  Runtime2["Ruby32"] = "ruby-3.2";
104287
103077
  Runtime2["Ruby33"] = "ruby-3.3";
103078
+ Runtime2["Ruby34"] = "ruby-3.4";
103079
+ Runtime2["Ruby40"] = "ruby-4.0";
104288
103080
  Runtime2["Python38"] = "python-3.8";
104289
103081
  Runtime2["Python39"] = "python-3.9";
104290
103082
  Runtime2["Python310"] = "python-3.10";
104291
103083
  Runtime2["Python311"] = "python-3.11";
104292
103084
  Runtime2["Python312"] = "python-3.12";
103085
+ Runtime2["Python313"] = "python-3.13";
103086
+ Runtime2["Python314"] = "python-3.14";
104293
103087
  Runtime2["Pythonml311"] = "python-ml-3.11";
104294
103088
  Runtime2["Pythonml312"] = "python-ml-3.12";
103089
+ Runtime2["Pythonml313"] = "python-ml-3.13";
104295
103090
  Runtime2["Deno140"] = "deno-1.40";
104296
103091
  Runtime2["Deno146"] = "deno-1.46";
104297
103092
  Runtime2["Deno20"] = "deno-2.0";
103093
+ Runtime2["Deno25"] = "deno-2.5";
103094
+ Runtime2["Deno26"] = "deno-2.6";
104298
103095
  Runtime2["Dart215"] = "dart-2.15";
104299
103096
  Runtime2["Dart216"] = "dart-2.16";
104300
103097
  Runtime2["Dart217"] = "dart-2.17";
@@ -104310,25 +103107,34 @@ var Runtime;
104310
103107
  Runtime2["Dotnet60"] = "dotnet-6.0";
104311
103108
  Runtime2["Dotnet70"] = "dotnet-7.0";
104312
103109
  Runtime2["Dotnet80"] = "dotnet-8.0";
103110
+ Runtime2["Dotnet10"] = "dotnet-10";
104313
103111
  Runtime2["Java80"] = "java-8.0";
104314
103112
  Runtime2["Java110"] = "java-11.0";
104315
103113
  Runtime2["Java170"] = "java-17.0";
104316
103114
  Runtime2["Java180"] = "java-18.0";
104317
103115
  Runtime2["Java210"] = "java-21.0";
104318
103116
  Runtime2["Java22"] = "java-22";
103117
+ Runtime2["Java25"] = "java-25";
104319
103118
  Runtime2["Swift55"] = "swift-5.5";
104320
103119
  Runtime2["Swift58"] = "swift-5.8";
104321
103120
  Runtime2["Swift59"] = "swift-5.9";
104322
103121
  Runtime2["Swift510"] = "swift-5.10";
103122
+ Runtime2["Swift62"] = "swift-6.2";
104323
103123
  Runtime2["Kotlin16"] = "kotlin-1.6";
104324
103124
  Runtime2["Kotlin18"] = "kotlin-1.8";
104325
103125
  Runtime2["Kotlin19"] = "kotlin-1.9";
104326
103126
  Runtime2["Kotlin20"] = "kotlin-2.0";
103127
+ Runtime2["Kotlin23"] = "kotlin-2.3";
104327
103128
  Runtime2["Cpp17"] = "cpp-17";
104328
103129
  Runtime2["Cpp20"] = "cpp-20";
104329
103130
  Runtime2["Bun10"] = "bun-1.0";
104330
103131
  Runtime2["Bun11"] = "bun-1.1";
103132
+ Runtime2["Bun12"] = "bun-1.2";
103133
+ Runtime2["Bun13"] = "bun-1.3";
104331
103134
  Runtime2["Go123"] = "go-1.23";
103135
+ Runtime2["Go124"] = "go-1.24";
103136
+ Runtime2["Go125"] = "go-1.25";
103137
+ Runtime2["Go126"] = "go-1.26";
104332
103138
  Runtime2["Static1"] = "static-1";
104333
103139
  Runtime2["Flutter324"] = "flutter-3.24";
104334
103140
  Runtime2["Flutter327"] = "flutter-3.27";
@@ -104346,24 +103152,35 @@ var Runtimes;
104346
103152
  Runtimes2["Node200"] = "node-20.0";
104347
103153
  Runtimes2["Node210"] = "node-21.0";
104348
103154
  Runtimes2["Node22"] = "node-22";
103155
+ Runtimes2["Node23"] = "node-23";
103156
+ Runtimes2["Node24"] = "node-24";
103157
+ Runtimes2["Node25"] = "node-25";
104349
103158
  Runtimes2["Php80"] = "php-8.0";
104350
103159
  Runtimes2["Php81"] = "php-8.1";
104351
103160
  Runtimes2["Php82"] = "php-8.2";
104352
103161
  Runtimes2["Php83"] = "php-8.3";
103162
+ Runtimes2["Php84"] = "php-8.4";
104353
103163
  Runtimes2["Ruby30"] = "ruby-3.0";
104354
103164
  Runtimes2["Ruby31"] = "ruby-3.1";
104355
103165
  Runtimes2["Ruby32"] = "ruby-3.2";
104356
103166
  Runtimes2["Ruby33"] = "ruby-3.3";
103167
+ Runtimes2["Ruby34"] = "ruby-3.4";
103168
+ Runtimes2["Ruby40"] = "ruby-4.0";
104357
103169
  Runtimes2["Python38"] = "python-3.8";
104358
103170
  Runtimes2["Python39"] = "python-3.9";
104359
103171
  Runtimes2["Python310"] = "python-3.10";
104360
103172
  Runtimes2["Python311"] = "python-3.11";
104361
103173
  Runtimes2["Python312"] = "python-3.12";
103174
+ Runtimes2["Python313"] = "python-3.13";
103175
+ Runtimes2["Python314"] = "python-3.14";
104362
103176
  Runtimes2["Pythonml311"] = "python-ml-3.11";
104363
103177
  Runtimes2["Pythonml312"] = "python-ml-3.12";
103178
+ Runtimes2["Pythonml313"] = "python-ml-3.13";
104364
103179
  Runtimes2["Deno140"] = "deno-1.40";
104365
103180
  Runtimes2["Deno146"] = "deno-1.46";
104366
103181
  Runtimes2["Deno20"] = "deno-2.0";
103182
+ Runtimes2["Deno25"] = "deno-2.5";
103183
+ Runtimes2["Deno26"] = "deno-2.6";
104367
103184
  Runtimes2["Dart215"] = "dart-2.15";
104368
103185
  Runtimes2["Dart216"] = "dart-2.16";
104369
103186
  Runtimes2["Dart217"] = "dart-2.17";
@@ -104379,25 +103196,34 @@ var Runtimes;
104379
103196
  Runtimes2["Dotnet60"] = "dotnet-6.0";
104380
103197
  Runtimes2["Dotnet70"] = "dotnet-7.0";
104381
103198
  Runtimes2["Dotnet80"] = "dotnet-8.0";
103199
+ Runtimes2["Dotnet10"] = "dotnet-10";
104382
103200
  Runtimes2["Java80"] = "java-8.0";
104383
103201
  Runtimes2["Java110"] = "java-11.0";
104384
103202
  Runtimes2["Java170"] = "java-17.0";
104385
103203
  Runtimes2["Java180"] = "java-18.0";
104386
103204
  Runtimes2["Java210"] = "java-21.0";
104387
103205
  Runtimes2["Java22"] = "java-22";
103206
+ Runtimes2["Java25"] = "java-25";
104388
103207
  Runtimes2["Swift55"] = "swift-5.5";
104389
103208
  Runtimes2["Swift58"] = "swift-5.8";
104390
103209
  Runtimes2["Swift59"] = "swift-5.9";
104391
103210
  Runtimes2["Swift510"] = "swift-5.10";
103211
+ Runtimes2["Swift62"] = "swift-6.2";
104392
103212
  Runtimes2["Kotlin16"] = "kotlin-1.6";
104393
103213
  Runtimes2["Kotlin18"] = "kotlin-1.8";
104394
103214
  Runtimes2["Kotlin19"] = "kotlin-1.9";
104395
103215
  Runtimes2["Kotlin20"] = "kotlin-2.0";
103216
+ Runtimes2["Kotlin23"] = "kotlin-2.3";
104396
103217
  Runtimes2["Cpp17"] = "cpp-17";
104397
103218
  Runtimes2["Cpp20"] = "cpp-20";
104398
103219
  Runtimes2["Bun10"] = "bun-1.0";
104399
103220
  Runtimes2["Bun11"] = "bun-1.1";
103221
+ Runtimes2["Bun12"] = "bun-1.2";
103222
+ Runtimes2["Bun13"] = "bun-1.3";
104400
103223
  Runtimes2["Go123"] = "go-1.23";
103224
+ Runtimes2["Go124"] = "go-1.24";
103225
+ Runtimes2["Go125"] = "go-1.25";
103226
+ Runtimes2["Go126"] = "go-1.26";
104401
103227
  Runtimes2["Static1"] = "static-1";
104402
103228
  Runtimes2["Flutter324"] = "flutter-3.24";
104403
103229
  Runtimes2["Flutter327"] = "flutter-3.27";
@@ -104534,6 +103360,13 @@ var PlatformType;
104534
103360
  PlatformType2["Reactnativeios"] = "react-native-ios";
104535
103361
  PlatformType2["Reactnativeandroid"] = "react-native-android";
104536
103362
  })(PlatformType || (PlatformType = {}));
103363
+ var ResourceType;
103364
+ (function(ResourceType2) {
103365
+ ResourceType2["Function"] = "function";
103366
+ ResourceType2["Execution"] = "execution";
103367
+ ResourceType2["Message"] = "message";
103368
+ ResourceType2["Backup"] = "backup";
103369
+ })(ResourceType || (ResourceType = {}));
104537
103370
  var ApiService;
104538
103371
  (function(ApiService3) {
104539
103372
  ApiService3["Account"] = "account";
@@ -104558,12 +103391,12 @@ var SMTPSecure;
104558
103391
  var EmailTemplateType;
104559
103392
  (function(EmailTemplateType2) {
104560
103393
  EmailTemplateType2["Verification"] = "verification";
104561
- EmailTemplateType2["Magicsession"] = "magicsession";
103394
+ EmailTemplateType2["MagicSession"] = "magicSession";
104562
103395
  EmailTemplateType2["Recovery"] = "recovery";
104563
103396
  EmailTemplateType2["Invitation"] = "invitation";
104564
- EmailTemplateType2["Mfachallenge"] = "mfachallenge";
104565
- EmailTemplateType2["Sessionalert"] = "sessionalert";
104566
- EmailTemplateType2["Otpsession"] = "otpsession";
103397
+ EmailTemplateType2["MfaChallenge"] = "mfaChallenge";
103398
+ EmailTemplateType2["SessionAlert"] = "sessionAlert";
103399
+ EmailTemplateType2["OtpSession"] = "otpSession";
104567
103400
  })(EmailTemplateType || (EmailTemplateType = {}));
104568
103401
  var EmailTemplateLocale;
104569
103402
  (function(EmailTemplateLocale2) {
@@ -104704,7 +103537,7 @@ var SmsTemplateType;
104704
103537
  SmsTemplateType2["Verification"] = "verification";
104705
103538
  SmsTemplateType2["Login"] = "login";
104706
103539
  SmsTemplateType2["Invitation"] = "invitation";
104707
- SmsTemplateType2["Mfachallenge"] = "mfachallenge";
103540
+ SmsTemplateType2["MfaChallenge"] = "mfaChallenge";
104708
103541
  })(SmsTemplateType || (SmsTemplateType = {}));
104709
103542
  var SmsTemplateLocale;
104710
103543
  (function(SmsTemplateLocale2) {
@@ -104879,24 +103712,35 @@ var BuildRuntime;
104879
103712
  BuildRuntime2["Node200"] = "node-20.0";
104880
103713
  BuildRuntime2["Node210"] = "node-21.0";
104881
103714
  BuildRuntime2["Node22"] = "node-22";
103715
+ BuildRuntime2["Node23"] = "node-23";
103716
+ BuildRuntime2["Node24"] = "node-24";
103717
+ BuildRuntime2["Node25"] = "node-25";
104882
103718
  BuildRuntime2["Php80"] = "php-8.0";
104883
103719
  BuildRuntime2["Php81"] = "php-8.1";
104884
103720
  BuildRuntime2["Php82"] = "php-8.2";
104885
103721
  BuildRuntime2["Php83"] = "php-8.3";
103722
+ BuildRuntime2["Php84"] = "php-8.4";
104886
103723
  BuildRuntime2["Ruby30"] = "ruby-3.0";
104887
103724
  BuildRuntime2["Ruby31"] = "ruby-3.1";
104888
103725
  BuildRuntime2["Ruby32"] = "ruby-3.2";
104889
103726
  BuildRuntime2["Ruby33"] = "ruby-3.3";
103727
+ BuildRuntime2["Ruby34"] = "ruby-3.4";
103728
+ BuildRuntime2["Ruby40"] = "ruby-4.0";
104890
103729
  BuildRuntime2["Python38"] = "python-3.8";
104891
103730
  BuildRuntime2["Python39"] = "python-3.9";
104892
103731
  BuildRuntime2["Python310"] = "python-3.10";
104893
103732
  BuildRuntime2["Python311"] = "python-3.11";
104894
103733
  BuildRuntime2["Python312"] = "python-3.12";
103734
+ BuildRuntime2["Python313"] = "python-3.13";
103735
+ BuildRuntime2["Python314"] = "python-3.14";
104895
103736
  BuildRuntime2["Pythonml311"] = "python-ml-3.11";
104896
103737
  BuildRuntime2["Pythonml312"] = "python-ml-3.12";
103738
+ BuildRuntime2["Pythonml313"] = "python-ml-3.13";
104897
103739
  BuildRuntime2["Deno140"] = "deno-1.40";
104898
103740
  BuildRuntime2["Deno146"] = "deno-1.46";
104899
103741
  BuildRuntime2["Deno20"] = "deno-2.0";
103742
+ BuildRuntime2["Deno25"] = "deno-2.5";
103743
+ BuildRuntime2["Deno26"] = "deno-2.6";
104900
103744
  BuildRuntime2["Dart215"] = "dart-2.15";
104901
103745
  BuildRuntime2["Dart216"] = "dart-2.16";
104902
103746
  BuildRuntime2["Dart217"] = "dart-2.17";
@@ -104912,25 +103756,34 @@ var BuildRuntime;
104912
103756
  BuildRuntime2["Dotnet60"] = "dotnet-6.0";
104913
103757
  BuildRuntime2["Dotnet70"] = "dotnet-7.0";
104914
103758
  BuildRuntime2["Dotnet80"] = "dotnet-8.0";
103759
+ BuildRuntime2["Dotnet10"] = "dotnet-10";
104915
103760
  BuildRuntime2["Java80"] = "java-8.0";
104916
103761
  BuildRuntime2["Java110"] = "java-11.0";
104917
103762
  BuildRuntime2["Java170"] = "java-17.0";
104918
103763
  BuildRuntime2["Java180"] = "java-18.0";
104919
103764
  BuildRuntime2["Java210"] = "java-21.0";
104920
103765
  BuildRuntime2["Java22"] = "java-22";
103766
+ BuildRuntime2["Java25"] = "java-25";
104921
103767
  BuildRuntime2["Swift55"] = "swift-5.5";
104922
103768
  BuildRuntime2["Swift58"] = "swift-5.8";
104923
103769
  BuildRuntime2["Swift59"] = "swift-5.9";
104924
103770
  BuildRuntime2["Swift510"] = "swift-5.10";
103771
+ BuildRuntime2["Swift62"] = "swift-6.2";
104925
103772
  BuildRuntime2["Kotlin16"] = "kotlin-1.6";
104926
103773
  BuildRuntime2["Kotlin18"] = "kotlin-1.8";
104927
103774
  BuildRuntime2["Kotlin19"] = "kotlin-1.9";
104928
103775
  BuildRuntime2["Kotlin20"] = "kotlin-2.0";
103776
+ BuildRuntime2["Kotlin23"] = "kotlin-2.3";
104929
103777
  BuildRuntime2["Cpp17"] = "cpp-17";
104930
103778
  BuildRuntime2["Cpp20"] = "cpp-20";
104931
103779
  BuildRuntime2["Bun10"] = "bun-1.0";
104932
103780
  BuildRuntime2["Bun11"] = "bun-1.1";
103781
+ BuildRuntime2["Bun12"] = "bun-1.2";
103782
+ BuildRuntime2["Bun13"] = "bun-1.3";
104933
103783
  BuildRuntime2["Go123"] = "go-1.23";
103784
+ BuildRuntime2["Go124"] = "go-1.24";
103785
+ BuildRuntime2["Go125"] = "go-1.25";
103786
+ BuildRuntime2["Go126"] = "go-1.26";
104934
103787
  BuildRuntime2["Static1"] = "static-1";
104935
103788
  BuildRuntime2["Flutter324"] = "flutter-3.24";
104936
103789
  BuildRuntime2["Flutter327"] = "flutter-3.27";
@@ -105105,10 +103958,23 @@ var package_default = {
105105
103958
  type: "module",
105106
103959
  homepage: "https://appwrite.io/support",
105107
103960
  description: "Appwrite is an open-source self-hosted backend server that abstracts and simplifies complex and repetitive development tasks behind a very simple REST API",
105108
- version: "13.4.0",
103961
+ version: "13.5.0",
105109
103962
  license: "BSD-3-Clause",
105110
- main: "dist/index.js",
103963
+ main: "dist/index.cjs",
103964
+ module: "dist/index.js",
105111
103965
  types: "dist/index.d.ts",
103966
+ exports: {
103967
+ ".": {
103968
+ import: {
103969
+ types: "./dist/index.d.ts",
103970
+ default: "./dist/index.js"
103971
+ },
103972
+ require: {
103973
+ types: "./dist/index.d.ts",
103974
+ default: "./dist/index.cjs"
103975
+ }
103976
+ }
103977
+ },
105112
103978
  bin: {
105113
103979
  appwrite: "dist/cli.cjs"
105114
103980
  },
@@ -105119,8 +103985,9 @@ var package_default = {
105119
103985
  scripts: {
105120
103986
  build: "npm run build:types && npm run build:runtime",
105121
103987
  "build:types": "tsc -p tsconfig.json --emitDeclarationOnly",
105122
- "build:runtime": "npm run build:lib:runtime && npm run build:cli",
105123
- "build:lib:runtime": "esbuild index.ts --bundle --platform=node --target=node18 --format=esm --loader:.hbs=text --outfile=dist/index.js",
103988
+ "build:runtime": "npm run build:lib:esm && npm run build:lib:cjs && npm run build:cli",
103989
+ "build:lib:esm": "esbuild index.ts --bundle --platform=node --target=node18 --format=esm --loader:.hbs=text --outfile=dist/index.js",
103990
+ "build:lib:cjs": "esbuild index.ts --bundle --platform=node --target=node18 --format=cjs --loader:.hbs=text --outfile=dist/index.cjs",
105124
103991
  "build:cli": "esbuild cli.ts --bundle --platform=node --target=node18 --format=cjs --loader:.hbs=text --external:fsevents --outfile=dist/cli.cjs",
105125
103992
  format: 'prettier --write "**/*.{js,ts,json,md}"',
105126
103993
  generate: "tsx scripts/generate-commands.ts",
@@ -105134,7 +104001,7 @@ var package_default = {
105134
104001
  "windows-arm64": "esbuild cli.ts --bundle --loader:.hbs=text --platform=node --target=node18 --format=esm --external:fsevents --outfile=dist/bundle-win-arm64.mjs && pkg dist/bundle-win-arm64.mjs -t node18-win-arm64 -o build/appwrite-cli-win-arm64.exe"
105135
104002
  },
105136
104003
  dependencies: {
105137
- "@appwrite.io/console": "^2.3.1",
104004
+ "@appwrite.io/console": "^3.0.0",
105138
104005
  chalk: "4.1.2",
105139
104006
  chokidar: "^3.6.0",
105140
104007
  "cli-progress": "^3.12.0",
@@ -106060,7 +104927,9 @@ var Pools = class {
106060
104927
  // Milliseconds
106061
104928
  pollMaxDebounces = 30;
106062
104929
  POLL_DEFAULT_VALUE = 30;
106063
- constructor(pollMaxDebounces) {
104930
+ client;
104931
+ constructor(pollMaxDebounces, client) {
104932
+ this.client = client;
106064
104933
  if (pollMaxDebounces) {
106065
104934
  this.pollMaxDebounces = pollMaxDebounces;
106066
104935
  }
@@ -106069,7 +104938,7 @@ var Pools = class {
106069
104938
  if (iteration > this.pollMaxDebounces) {
106070
104939
  return false;
106071
104940
  }
106072
- const databasesService = await getDatabasesService();
104941
+ const databasesService = await getDatabasesService(this.client);
106073
104942
  const response = await databasesService.listAttributes(
106074
104943
  databaseId,
106075
104944
  collectionId,
@@ -106095,7 +104964,7 @@ var Pools = class {
106095
104964
  if (iteration > this.pollMaxDebounces) {
106096
104965
  return false;
106097
104966
  }
106098
- const databasesService = await getDatabasesService();
104967
+ const databasesService = await getDatabasesService(this.client);
106099
104968
  const response = await databasesService.listIndexes(
106100
104969
  databaseId,
106101
104970
  collectionId,
@@ -106132,7 +105001,7 @@ var Pools = class {
106132
105001
  }
106133
105002
  const { attributes } = await paginate(
106134
105003
  async (args) => {
106135
- const databasesService = await getDatabasesService();
105004
+ const databasesService = await getDatabasesService(this.client);
106136
105005
  return await databasesService.listAttributes({
106137
105006
  databaseId: args.databaseId,
106138
105007
  collectionId: args.collectionId,
@@ -106175,7 +105044,7 @@ var Pools = class {
106175
105044
  }
106176
105045
  const { attributes } = await paginate(
106177
105046
  async (args) => {
106178
- const databasesService = await getDatabasesService();
105047
+ const databasesService = await getDatabasesService(this.client);
106179
105048
  return await databasesService.listAttributes(
106180
105049
  args.databaseId,
106181
105050
  args.collectionId,
@@ -106224,7 +105093,7 @@ var Pools = class {
106224
105093
  }
106225
105094
  const { indexes } = await paginate(
106226
105095
  async (args) => {
106227
- const databasesService = await getDatabasesService();
105096
+ const databasesService = await getDatabasesService(this.client);
106228
105097
  return await databasesService.listIndexes(
106229
105098
  args.databaseId,
106230
105099
  args.collectionId,
@@ -106290,8 +105159,10 @@ var questionPushChangesConfirmation2 = [
106290
105159
  var Attributes = class {
106291
105160
  pools;
106292
105161
  skipConfirmation;
106293
- constructor(pools, skipConfirmation = false) {
106294
- this.pools = pools || new Pools();
105162
+ client;
105163
+ constructor(pools, skipConfirmation = false, client) {
105164
+ this.client = client;
105165
+ this.pools = pools || new Pools(void 0, client);
106295
105166
  this.skipConfirmation = skipConfirmation;
106296
105167
  }
106297
105168
  getConfirmation = async () => {
@@ -106379,7 +105250,7 @@ var Attributes = class {
106379
105250
  };
106380
105251
  };
106381
105252
  createAttribute = async (databaseId, collectionId, attribute) => {
106382
- const databasesService = await getDatabasesService();
105253
+ const databasesService = await getDatabasesService(this.client);
106383
105254
  switch (attribute.type) {
106384
105255
  case "string":
106385
105256
  switch (attribute.format) {
@@ -106549,7 +105420,7 @@ var Attributes = class {
106549
105420
  }
106550
105421
  };
106551
105422
  updateAttribute = async (databaseId, collectionId, attribute) => {
106552
- const databasesService = await getDatabasesService();
105423
+ const databasesService = await getDatabasesService(this.client);
106553
105424
  switch (attribute.type) {
106554
105425
  case "string":
106555
105426
  switch (attribute.format) {
@@ -106703,7 +105574,7 @@ var Attributes = class {
106703
105574
  log(
106704
105575
  `Deleting ${isIndex ? "index" : "attribute"} ${attribute.key} of ${collection.name} ( ${collection["$id"]} )`
106705
105576
  );
106706
- const databasesService = await getDatabasesService();
105577
+ const databasesService = await getDatabasesService(this.client);
106707
105578
  if (isIndex) {
106708
105579
  await databasesService.deleteIndex(
106709
105580
  collection["databaseId"],
@@ -106858,7 +105729,7 @@ var Attributes = class {
106858
105729
  };
106859
105730
  createIndexes = async (indexes, collection) => {
106860
105731
  log(`Creating indexes ...`);
106861
- const databasesService = await getDatabasesService();
105732
+ const databasesService = await getDatabasesService(this.client);
106862
105733
  for (let index of indexes) {
106863
105734
  await databasesService.createIndex({
106864
105735
  databaseId: collection["databaseId"],
@@ -107227,158 +106098,169 @@ var Push = class {
107227
106098
  }
107228
106099
  }
107229
106100
  async pushResources(config2, options = { all: true, skipDeprecated: true }) {
107230
- const { skipDeprecated = true } = options;
107231
- const results = {};
107232
- const allErrors = [];
107233
- const shouldPushAll = options.all === true;
107234
- if ((shouldPushAll || options.settings) && (config2.projectName || config2.settings)) {
107235
- try {
107236
- this.log("Pushing settings ...");
107237
- await this.pushSettings({
107238
- projectId: config2.projectId,
107239
- projectName: config2.projectName,
107240
- settings: config2.settings
107241
- });
107242
- this.success(
107243
- `Successfully pushed ${import_chalk7.default.bold("all")} project settings.`
107244
- );
107245
- results.settings = { success: true };
107246
- } catch (e) {
107247
- allErrors.push(e);
107248
- results.settings = { success: false, error: e.message };
107249
- }
106101
+ const previousForce = cliConfig.force;
106102
+ if (options.force !== void 0) {
106103
+ cliConfig.force = options.force;
107250
106104
  }
107251
- if ((shouldPushAll || options.buckets) && config2.buckets && config2.buckets.length > 0) {
107252
- try {
107253
- this.log("Pushing buckets ...");
107254
- const result = await this.pushBuckets(config2.buckets);
107255
- this.success(
107256
- `Successfully pushed ${import_chalk7.default.bold(result.successfullyPushed)} buckets.`
107257
- );
107258
- results.buckets = result;
107259
- allErrors.push(...result.errors);
107260
- } catch (e) {
107261
- allErrors.push(e);
107262
- results.buckets = { successfullyPushed: 0, errors: [e] };
106105
+ try {
106106
+ const { skipDeprecated = true } = options;
106107
+ const results = {};
106108
+ const allErrors = [];
106109
+ const shouldPushAll = options.all === true;
106110
+ if ((shouldPushAll || options.settings) && (config2.projectName || config2.settings)) {
106111
+ try {
106112
+ this.log("Pushing settings ...");
106113
+ await this.pushSettings({
106114
+ projectId: config2.projectId,
106115
+ projectName: config2.projectName,
106116
+ settings: config2.settings
106117
+ });
106118
+ this.success(
106119
+ `Successfully pushed ${import_chalk7.default.bold("all")} project settings.`
106120
+ );
106121
+ results.settings = { success: true };
106122
+ } catch (e) {
106123
+ allErrors.push(e);
106124
+ results.settings = { success: false, error: e.message };
106125
+ }
107263
106126
  }
107264
- }
107265
- if ((shouldPushAll || options.teams) && config2.teams && config2.teams.length > 0) {
107266
- try {
107267
- this.log("Pushing teams ...");
107268
- const result = await this.pushTeams(config2.teams);
107269
- this.success(
107270
- `Successfully pushed ${import_chalk7.default.bold(result.successfullyPushed)} teams.`
107271
- );
107272
- results.teams = result;
107273
- allErrors.push(...result.errors);
107274
- } catch (e) {
107275
- allErrors.push(e);
107276
- results.teams = { successfullyPushed: 0, errors: [e] };
106127
+ if ((shouldPushAll || options.buckets) && config2.buckets && config2.buckets.length > 0) {
106128
+ try {
106129
+ this.log("Pushing buckets ...");
106130
+ const result = await this.pushBuckets(config2.buckets);
106131
+ this.success(
106132
+ `Successfully pushed ${import_chalk7.default.bold(result.successfullyPushed)} buckets.`
106133
+ );
106134
+ results.buckets = result;
106135
+ allErrors.push(...result.errors);
106136
+ } catch (e) {
106137
+ allErrors.push(e);
106138
+ results.buckets = { successfullyPushed: 0, errors: [e] };
106139
+ }
107277
106140
  }
107278
- }
107279
- if ((shouldPushAll || options.topics) && config2.topics && config2.topics.length > 0) {
107280
- try {
107281
- this.log("Pushing topics ...");
107282
- const result = await this.pushMessagingTopics(config2.topics);
107283
- this.success(
107284
- `Successfully pushed ${import_chalk7.default.bold(result.successfullyPushed)} topics.`
107285
- );
107286
- results.topics = result;
107287
- allErrors.push(...result.errors);
107288
- } catch (e) {
107289
- allErrors.push(e);
107290
- results.topics = { successfullyPushed: 0, errors: [e] };
106141
+ if ((shouldPushAll || options.teams) && config2.teams && config2.teams.length > 0) {
106142
+ try {
106143
+ this.log("Pushing teams ...");
106144
+ const result = await this.pushTeams(config2.teams);
106145
+ this.success(
106146
+ `Successfully pushed ${import_chalk7.default.bold(result.successfullyPushed)} teams.`
106147
+ );
106148
+ results.teams = result;
106149
+ allErrors.push(...result.errors);
106150
+ } catch (e) {
106151
+ allErrors.push(e);
106152
+ results.teams = { successfullyPushed: 0, errors: [e] };
106153
+ }
107291
106154
  }
107292
- }
107293
- if ((shouldPushAll || options.functions) && config2.functions && config2.functions.length > 0) {
107294
- try {
107295
- this.log("Pushing functions ...");
107296
- const result = await this.pushFunctions(
107297
- config2.functions,
107298
- options.functionOptions
107299
- );
107300
- this.success(
107301
- `Successfully pushed ${import_chalk7.default.bold(result.successfullyPushed)} functions.`
107302
- );
107303
- results.functions = result;
107304
- allErrors.push(...result.errors);
107305
- } catch (e) {
107306
- allErrors.push(e);
107307
- results.functions = {
107308
- successfullyPushed: 0,
107309
- successfullyDeployed: 0,
107310
- failedDeployments: [],
107311
- errors: [e]
107312
- };
106155
+ if ((shouldPushAll || options.topics) && config2.topics && config2.topics.length > 0) {
106156
+ try {
106157
+ this.log("Pushing topics ...");
106158
+ const result = await this.pushMessagingTopics(config2.topics);
106159
+ this.success(
106160
+ `Successfully pushed ${import_chalk7.default.bold(result.successfullyPushed)} topics.`
106161
+ );
106162
+ results.topics = result;
106163
+ allErrors.push(...result.errors);
106164
+ } catch (e) {
106165
+ allErrors.push(e);
106166
+ results.topics = { successfullyPushed: 0, errors: [e] };
106167
+ }
107313
106168
  }
107314
- }
107315
- if ((shouldPushAll || options.sites) && config2.sites && config2.sites.length > 0) {
107316
- try {
107317
- this.log("Pushing sites ...");
107318
- const result = await this.pushSites(config2.sites, options.siteOptions);
107319
- this.success(
107320
- `Successfully pushed ${import_chalk7.default.bold(result.successfullyPushed)} sites.`
107321
- );
107322
- results.sites = result;
107323
- allErrors.push(...result.errors);
107324
- } catch (e) {
107325
- allErrors.push(e);
107326
- results.sites = {
107327
- successfullyPushed: 0,
107328
- successfullyDeployed: 0,
107329
- failedDeployments: [],
107330
- errors: [e]
107331
- };
106169
+ if ((shouldPushAll || options.functions) && config2.functions && config2.functions.length > 0) {
106170
+ try {
106171
+ this.log("Pushing functions ...");
106172
+ const result = await this.pushFunctions(
106173
+ config2.functions,
106174
+ options.functionOptions
106175
+ );
106176
+ this.success(
106177
+ `Successfully pushed ${import_chalk7.default.bold(result.successfullyPushed)} functions.`
106178
+ );
106179
+ results.functions = result;
106180
+ allErrors.push(...result.errors);
106181
+ } catch (e) {
106182
+ allErrors.push(e);
106183
+ results.functions = {
106184
+ successfullyPushed: 0,
106185
+ successfullyDeployed: 0,
106186
+ failedDeployments: [],
106187
+ errors: [e]
106188
+ };
106189
+ }
107332
106190
  }
107333
- }
107334
- if ((shouldPushAll || options.tables) && config2.tables && config2.tables.length > 0) {
107335
- try {
107336
- this.log("Pushing tables ...");
107337
- const result = await this.pushTables(config2.tables, {
107338
- attempts: options.tableOptions?.attempts,
107339
- skipConfirmation: options.skipConfirmation
107340
- });
107341
- this.success(
107342
- `Successfully pushed ${import_chalk7.default.bold(result.successfullyPushed)} tables.`
107343
- );
107344
- results.tables = result;
107345
- allErrors.push(...result.errors);
107346
- } catch (e) {
107347
- allErrors.push(e);
107348
- results.tables = { successfullyPushed: 0, errors: [e] };
106191
+ if ((shouldPushAll || options.sites) && config2.sites && config2.sites.length > 0) {
106192
+ try {
106193
+ this.log("Pushing sites ...");
106194
+ const result = await this.pushSites(
106195
+ config2.sites,
106196
+ options.siteOptions
106197
+ );
106198
+ this.success(
106199
+ `Successfully pushed ${import_chalk7.default.bold(result.successfullyPushed)} sites.`
106200
+ );
106201
+ results.sites = result;
106202
+ allErrors.push(...result.errors);
106203
+ } catch (e) {
106204
+ allErrors.push(e);
106205
+ results.sites = {
106206
+ successfullyPushed: 0,
106207
+ successfullyDeployed: 0,
106208
+ failedDeployments: [],
106209
+ errors: [e]
106210
+ };
106211
+ }
107349
106212
  }
107350
- }
107351
- if ((options.collections || shouldPushAll && !skipDeprecated) && config2.collections && config2.collections.length > 0) {
107352
- try {
107353
- this.log("Pushing collections ...");
107354
- const collectionsWithDbNames = config2.collections.map(
107355
- (collection) => {
107356
- const database = config2.databases?.find(
107357
- (db) => db.$id === collection.databaseId
107358
- );
107359
- return {
107360
- ...collection,
107361
- databaseName: database?.name ?? collection.databaseId
107362
- };
107363
- }
107364
- );
107365
- const result = await this.pushCollections(collectionsWithDbNames, {
107366
- skipConfirmation: options.skipConfirmation
107367
- });
107368
- this.success(
107369
- `Successfully pushed ${import_chalk7.default.bold(result.successfullyPushed)} collections.`
107370
- );
107371
- results.collections = result;
107372
- allErrors.push(...result.errors);
107373
- } catch (e) {
107374
- allErrors.push(e);
107375
- results.collections = { successfullyPushed: 0, errors: [e] };
106213
+ if ((shouldPushAll || options.tables) && config2.tables && config2.tables.length > 0) {
106214
+ try {
106215
+ this.log("Pushing tables ...");
106216
+ const result = await this.pushTables(config2.tables, {
106217
+ attempts: options.tableOptions?.attempts,
106218
+ skipConfirmation: options.skipConfirmation
106219
+ });
106220
+ this.success(
106221
+ `Successfully pushed ${import_chalk7.default.bold(result.successfullyPushed)} tables.`
106222
+ );
106223
+ results.tables = result;
106224
+ allErrors.push(...result.errors);
106225
+ } catch (e) {
106226
+ allErrors.push(e);
106227
+ results.tables = { successfullyPushed: 0, errors: [e] };
106228
+ }
106229
+ }
106230
+ if ((options.collections || shouldPushAll && !skipDeprecated) && config2.collections && config2.collections.length > 0) {
106231
+ try {
106232
+ this.log("Pushing collections ...");
106233
+ const collectionsWithDbNames = config2.collections.map(
106234
+ (collection) => {
106235
+ const database = config2.databases?.find(
106236
+ (db) => db.$id === collection.databaseId
106237
+ );
106238
+ return {
106239
+ ...collection,
106240
+ databaseName: database?.name ?? collection.databaseId
106241
+ };
106242
+ }
106243
+ );
106244
+ const result = await this.pushCollections(collectionsWithDbNames, {
106245
+ skipConfirmation: options.skipConfirmation
106246
+ });
106247
+ this.success(
106248
+ `Successfully pushed ${import_chalk7.default.bold(result.successfullyPushed)} collections.`
106249
+ );
106250
+ results.collections = result;
106251
+ allErrors.push(...result.errors);
106252
+ } catch (e) {
106253
+ allErrors.push(e);
106254
+ results.collections = { successfullyPushed: 0, errors: [e] };
106255
+ }
107376
106256
  }
106257
+ return {
106258
+ results,
106259
+ errors: allErrors
106260
+ };
106261
+ } finally {
106262
+ cliConfig.force = previousForce;
107377
106263
  }
107378
- return {
107379
- results,
107380
- errors: allErrors
107381
- };
107382
106264
  }
107383
106265
  async pushSettings(config2) {
107384
106266
  const projectsService = await getProjectsService(this.consoleClient);
@@ -107453,12 +106335,43 @@ var Push = class {
107453
106335
  async pushBuckets(buckets) {
107454
106336
  let successfullyPushed = 0;
107455
106337
  const errors = [];
106338
+ const hasBucketChanges = (remoteBucket, localBucket) => {
106339
+ const scalarFields = [
106340
+ "name",
106341
+ "fileSecurity",
106342
+ "enabled",
106343
+ "maximumFileSize",
106344
+ "encryption",
106345
+ "antivirus",
106346
+ "compression"
106347
+ ];
106348
+ if (scalarFields.some((field) => remoteBucket[field] !== localBucket[field])) {
106349
+ return true;
106350
+ }
106351
+ if (!arrayEqualsUnordered(
106352
+ remoteBucket["$permissions"],
106353
+ localBucket["$permissions"]
106354
+ )) {
106355
+ return true;
106356
+ }
106357
+ return !arrayEqualsUnordered(
106358
+ remoteBucket.allowedFileExtensions,
106359
+ localBucket.allowedFileExtensions
106360
+ );
106361
+ };
107456
106362
  for (const bucket of buckets) {
107457
106363
  try {
107458
106364
  this.log(`Pushing bucket ${import_chalk7.default.bold(bucket["name"])} ...`);
107459
106365
  const storageService = await getStorageService(this.projectClient);
107460
106366
  try {
107461
- await storageService.getBucket(bucket["$id"]);
106367
+ const remoteBucket = await storageService.getBucket(bucket["$id"]);
106368
+ const hasChanges = hasBucketChanges(remoteBucket, bucket);
106369
+ if (!hasChanges) {
106370
+ this.log(
106371
+ `No changes detected for bucket ${import_chalk7.default.bold(bucket["name"])}. Skipping.`
106372
+ );
106373
+ continue;
106374
+ }
107462
106375
  await storageService.updateBucket({
107463
106376
  bucketId: bucket["$id"],
107464
106377
  name: bucket.name,
@@ -107471,6 +106384,7 @@ var Push = class {
107471
106384
  antivirus: bucket.antivirus,
107472
106385
  compression: bucket.compression
107473
106386
  });
106387
+ successfullyPushed++;
107474
106388
  } catch (e) {
107475
106389
  if (e instanceof AppwriteException && Number(e.code) === 404) {
107476
106390
  await storageService.createBucket({
@@ -107485,11 +106399,11 @@ var Push = class {
107485
106399
  encryption: bucket.encryption,
107486
106400
  antivirus: bucket.antivirus
107487
106401
  });
106402
+ successfullyPushed++;
107488
106403
  } else {
107489
106404
  throw e;
107490
106405
  }
107491
106406
  }
107492
- successfullyPushed++;
107493
106407
  } catch (e) {
107494
106408
  errors.push(e);
107495
106409
  this.error(`Failed to push bucket ${bucket["name"]}: ${e.message}`);
@@ -108170,8 +107084,12 @@ var Push = class {
108170
107084
  async pushTables(tables, options = {}) {
108171
107085
  const { attempts, skipConfirmation = false } = options;
108172
107086
  const pollMaxDebounces = attempts ?? POLL_DEFAULT_VALUE;
108173
- const pools = new Pools(pollMaxDebounces);
108174
- const attributes = new Attributes(pools, skipConfirmation);
107087
+ const pools = new Pools(pollMaxDebounces, this.projectClient);
107088
+ const attributes = new Attributes(
107089
+ pools,
107090
+ skipConfirmation,
107091
+ this.projectClient
107092
+ );
108175
107093
  let tablesChanged = /* @__PURE__ */ new Set();
108176
107094
  const errors = [];
108177
107095
  await Promise.all(
@@ -108246,6 +107164,11 @@ var Push = class {
108246
107164
  indexes = indexesResult.attributes;
108247
107165
  hadChanges = columnsResult.hasChanges || indexesResult.hasChanges;
108248
107166
  if (!hadChanges && columns.length <= 0 && indexes.length <= 0) {
107167
+ if (!tablesChanged.has(table["$id"])) {
107168
+ this.log(
107169
+ `No changes detected for table ${import_chalk7.default.bold(table["name"])}. Skipping.`
107170
+ );
107171
+ }
108249
107172
  continue;
108250
107173
  }
108251
107174
  }
@@ -108274,8 +107197,12 @@ var Push = class {
108274
107197
  }
108275
107198
  async pushCollections(collections, options = {}) {
108276
107199
  const { skipConfirmation = false } = options;
108277
- const pools = new Pools(POLL_DEFAULT_VALUE);
108278
- const attributesHelper = new Attributes(pools, skipConfirmation);
107200
+ const pools = new Pools(POLL_DEFAULT_VALUE, this.projectClient);
107201
+ const attributesHelper = new Attributes(
107202
+ pools,
107203
+ skipConfirmation,
107204
+ this.projectClient
107205
+ );
108279
107206
  const errors = [];
108280
107207
  const collectionsWithState = collections;
108281
107208
  const databases = Array.from(
@@ -108963,10 +107890,11 @@ var pushCollection = async () => {
108963
107890
  const localDatabase = localConfig.getDatabase(collection.databaseId);
108964
107891
  collection.databaseName = localDatabase.name ?? collection.databaseId;
108965
107892
  });
107893
+ const projectClient = await sdkForProject();
108966
107894
  if (!await approveChanges(
108967
107895
  collections,
108968
107896
  async (args) => {
108969
- const databasesService = await getDatabasesService();
107897
+ const databasesService = await getDatabasesService(projectClient);
108970
107898
  return await databasesService.getCollection(
108971
107899
  args.databaseId,
108972
107900
  args.collectionId
@@ -110185,7 +109113,13 @@ var BaseDatabasesGenerator = class {
110185
109113
  if (!fs6.existsSync(sdkDir)) {
110186
109114
  fs6.mkdirSync(sdkDir, { recursive: true });
110187
109115
  }
110188
- for (const [relativePath, content] of result.files) {
109116
+ const fileEntries = [
109117
+ ["databases.ts", result.dbContent],
109118
+ ["types.ts", result.typesContent],
109119
+ ["index.ts", result.indexContent],
109120
+ ["constants.ts", result.constantsContent]
109121
+ ];
109122
+ for (const [relativePath, content] of fileEntries) {
110189
109123
  const filePath = path5.join(sdkDir, relativePath);
110190
109124
  const fileDir = path5.dirname(filePath);
110191
109125
  if (!fs6.existsSync(fileDir)) {
@@ -110197,10 +109131,13 @@ var BaseDatabasesGenerator = class {
110197
109131
  fs6.writeFileSync(filePath, content, "utf-8");
110198
109132
  }
110199
109133
  }
110200
- getGeneratedFilePaths(result) {
110201
- return Array.from(result.files.keys()).map(
110202
- (relativePath) => path5.join(SDK_TITLE_LOWER, relativePath)
110203
- );
109134
+ getGeneratedFilePaths(_result) {
109135
+ return [
109136
+ path5.join(SDK_TITLE_LOWER, "databases.ts"),
109137
+ path5.join(SDK_TITLE_LOWER, "types.ts"),
109138
+ path5.join(SDK_TITLE_LOWER, "index.ts"),
109139
+ path5.join(SDK_TITLE_LOWER, "constants.ts")
109140
+ ];
110204
109141
  }
110205
109142
  };
110206
109143
 
@@ -110527,29 +109464,24 @@ ${supportsServerSide ? ` create: (databaseId: string, name: string, options?: {
110527
109464
  throw new Error("Project ID is required in configuration");
110528
109465
  }
110529
109466
  const importExt = detectImportExtension();
110530
- const files = /* @__PURE__ */ new Map();
110531
109467
  const hasEntities = config2.tables && config2.tables.length > 0 || config2.collections && config2.collections.length > 0;
110532
109468
  if (!hasEntities) {
110533
109469
  console.log(
110534
109470
  "No tables or collections found in configuration. Skipping database generation."
110535
109471
  );
110536
- files.set(
110537
- "databases.ts",
110538
- "// No tables or collections found in configuration\n"
110539
- );
110540
- files.set(
110541
- "types.ts",
110542
- "// No tables or collections found in configuration\n"
110543
- );
110544
- files.set("index.ts", this.generateIndexFile(importExt));
110545
- files.set("constants.ts", this.generateConstantsFile(config2));
110546
- return { files };
109472
+ return {
109473
+ dbContent: "// No tables or collections found in configuration\n",
109474
+ typesContent: "// No tables or collections found in configuration\n",
109475
+ indexContent: this.generateIndexFile(importExt),
109476
+ constantsContent: this.generateConstantsFile(config2)
109477
+ };
110547
109478
  }
110548
- files.set("types.ts", this.generateTypesFile(config2));
110549
- files.set("databases.ts", this.generateDatabasesFile(config2, importExt));
110550
- files.set("index.ts", this.generateIndexFile(importExt));
110551
- files.set("constants.ts", this.generateConstantsFile(config2));
110552
- return { files };
109479
+ return {
109480
+ dbContent: this.generateDatabasesFile(config2, importExt),
109481
+ typesContent: this.generateTypesFile(config2),
109482
+ indexContent: this.generateIndexFile(importExt),
109483
+ constantsContent: this.generateConstantsFile(config2)
109484
+ };
110553
109485
  }
110554
109486
  };
110555
109487
 
@@ -110645,6 +109577,7 @@ var Schema = class {
110645
109577
  export {
110646
109578
  AttributeSchema,
110647
109579
  BucketSchema,
109580
+ Client,
110648
109581
  CollectionSchema,
110649
109582
  ColumnSchema,
110650
109583
  ConfigSchema,
@@ -110664,9 +109597,6 @@ export {
110664
109597
  };
110665
109598
  /*! Bundled license information:
110666
109599
 
110667
- safe-buffer/index.js:
110668
- (*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> *)
110669
-
110670
109600
  undici/lib/fetch/body.js:
110671
109601
  (*! formdata-polyfill. MIT License. Jimmy Wärting <https://jimmy.warting.se/opensource> *)
110672
109602