@digipair/skill-dsp 0.15.2 → 0.15.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.cjs.js CHANGED
@@ -5,12 +5,12 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  var path = require('path');
6
6
  var web = require('stream/web');
7
7
  var _crypto = require('crypto');
8
- var _http = require('http');
9
- var _https = require('https');
10
- var _fs = require('node:fs');
11
- var _os = require('os');
12
- var _process = require('process');
13
- var vm = require('vm');
8
+ require('http');
9
+ require('https');
10
+ require('node:fs');
11
+ require('os');
12
+ require('process');
13
+ require('vm');
14
14
 
15
15
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
16
16
 
@@ -33,12 +33,6 @@ function _interopNamespace(e) {
33
33
  }
34
34
 
35
35
  var path__default = /*#__PURE__*/_interopDefaultLegacy(path);
36
- var _crypto__namespace = /*#__PURE__*/_interopNamespace(_crypto);
37
- var _http__namespace = /*#__PURE__*/_interopNamespace(_http);
38
- var _https__namespace = /*#__PURE__*/_interopNamespace(_https);
39
- var _fs__namespace = /*#__PURE__*/_interopNamespace(_fs);
40
- var _os__namespace = /*#__PURE__*/_interopNamespace(_os);
41
- var _process__namespace = /*#__PURE__*/_interopNamespace(_process);
42
36
 
43
37
  function _extends() {
44
38
  _extends = Object.assign || function assign(target) {
@@ -8175,7 +8169,7 @@ function _type_of(obj) {
8175
8169
  }
8176
8170
  return self;
8177
8171
  }
8178
- function _class_call_check$M(instance, Constructor) {
8172
+ function _class_call_check$L(instance, Constructor) {
8179
8173
  if (!(instance instanceof Constructor)) {
8180
8174
  throw new TypeError("Cannot call a class as a function");
8181
8175
  }
@@ -8290,7 +8284,7 @@ var LuxonError = /*#__PURE__*/ function(Error1) {
8290
8284
  _inherits$p(LuxonError, Error1);
8291
8285
  var _super = _create_super$p(LuxonError);
8292
8286
  function LuxonError() {
8293
- _class_call_check$M(this, LuxonError);
8287
+ _class_call_check$L(this, LuxonError);
8294
8288
  return _super.apply(this, arguments);
8295
8289
  }
8296
8290
  return LuxonError;
@@ -8301,7 +8295,7 @@ var LuxonError = /*#__PURE__*/ function(Error1) {
8301
8295
  _inherits$p(InvalidDateTimeError, LuxonError);
8302
8296
  var _super = _create_super$p(InvalidDateTimeError);
8303
8297
  function InvalidDateTimeError(reason) {
8304
- _class_call_check$M(this, InvalidDateTimeError);
8298
+ _class_call_check$L(this, InvalidDateTimeError);
8305
8299
  return _super.call(this, "Invalid DateTime: ".concat(reason.toMessage()));
8306
8300
  }
8307
8301
  return InvalidDateTimeError;
@@ -8312,7 +8306,7 @@ var LuxonError = /*#__PURE__*/ function(Error1) {
8312
8306
  _inherits$p(InvalidIntervalError, LuxonError);
8313
8307
  var _super = _create_super$p(InvalidIntervalError);
8314
8308
  function InvalidIntervalError(reason) {
8315
- _class_call_check$M(this, InvalidIntervalError);
8309
+ _class_call_check$L(this, InvalidIntervalError);
8316
8310
  return _super.call(this, "Invalid Interval: ".concat(reason.toMessage()));
8317
8311
  }
8318
8312
  return InvalidIntervalError;
@@ -8323,7 +8317,7 @@ var LuxonError = /*#__PURE__*/ function(Error1) {
8323
8317
  _inherits$p(InvalidDurationError, LuxonError);
8324
8318
  var _super = _create_super$p(InvalidDurationError);
8325
8319
  function InvalidDurationError(reason) {
8326
- _class_call_check$M(this, InvalidDurationError);
8320
+ _class_call_check$L(this, InvalidDurationError);
8327
8321
  return _super.call(this, "Invalid Duration: ".concat(reason.toMessage()));
8328
8322
  }
8329
8323
  return InvalidDurationError;
@@ -8334,7 +8328,7 @@ var LuxonError = /*#__PURE__*/ function(Error1) {
8334
8328
  _inherits$p(ConflictingSpecificationError, LuxonError);
8335
8329
  var _super = _create_super$p(ConflictingSpecificationError);
8336
8330
  function ConflictingSpecificationError() {
8337
- _class_call_check$M(this, ConflictingSpecificationError);
8331
+ _class_call_check$L(this, ConflictingSpecificationError);
8338
8332
  return _super.apply(this, arguments);
8339
8333
  }
8340
8334
  return ConflictingSpecificationError;
@@ -8345,7 +8339,7 @@ var LuxonError = /*#__PURE__*/ function(Error1) {
8345
8339
  _inherits$p(InvalidUnitError, LuxonError);
8346
8340
  var _super = _create_super$p(InvalidUnitError);
8347
8341
  function InvalidUnitError(unit) {
8348
- _class_call_check$M(this, InvalidUnitError);
8342
+ _class_call_check$L(this, InvalidUnitError);
8349
8343
  return _super.call(this, "Invalid unit ".concat(unit));
8350
8344
  }
8351
8345
  return InvalidUnitError;
@@ -8356,7 +8350,7 @@ var LuxonError = /*#__PURE__*/ function(Error1) {
8356
8350
  _inherits$p(InvalidArgumentError, LuxonError);
8357
8351
  var _super = _create_super$p(InvalidArgumentError);
8358
8352
  function InvalidArgumentError() {
8359
- _class_call_check$M(this, InvalidArgumentError);
8353
+ _class_call_check$L(this, InvalidArgumentError);
8360
8354
  return _super.apply(this, arguments);
8361
8355
  }
8362
8356
  return InvalidArgumentError;
@@ -8367,7 +8361,7 @@ var LuxonError = /*#__PURE__*/ function(Error1) {
8367
8361
  _inherits$p(ZoneIsAbstractError, LuxonError);
8368
8362
  var _super = _create_super$p(ZoneIsAbstractError);
8369
8363
  function ZoneIsAbstractError() {
8370
- _class_call_check$M(this, ZoneIsAbstractError);
8364
+ _class_call_check$L(this, ZoneIsAbstractError);
8371
8365
  return _super.call(this, "Zone is an abstract class");
8372
8366
  }
8373
8367
  return ZoneIsAbstractError;
@@ -8524,12 +8518,12 @@ var DATETIME_HUGE_WITH_SECONDS = {
8524
8518
  timeZoneName: l
8525
8519
  };
8526
8520
 
8527
- function _class_call_check$L(instance, Constructor) {
8521
+ function _class_call_check$K(instance, Constructor) {
8528
8522
  if (!(instance instanceof Constructor)) {
8529
8523
  throw new TypeError("Cannot call a class as a function");
8530
8524
  }
8531
8525
  }
8532
- function _defineProperties$y(target, props) {
8526
+ function _defineProperties$x(target, props) {
8533
8527
  for(var i = 0; i < props.length; i++){
8534
8528
  var descriptor = props[i];
8535
8529
  descriptor.enumerable = descriptor.enumerable || false;
@@ -8538,16 +8532,16 @@ function _defineProperties$y(target, props) {
8538
8532
  Object.defineProperty(target, descriptor.key, descriptor);
8539
8533
  }
8540
8534
  }
8541
- function _create_class$y(Constructor, protoProps, staticProps) {
8542
- if (protoProps) _defineProperties$y(Constructor.prototype, protoProps);
8543
- if (staticProps) _defineProperties$y(Constructor, staticProps);
8535
+ function _create_class$x(Constructor, protoProps, staticProps) {
8536
+ if (protoProps) _defineProperties$x(Constructor.prototype, protoProps);
8537
+ if (staticProps) _defineProperties$x(Constructor, staticProps);
8544
8538
  return Constructor;
8545
8539
  }
8546
8540
  var Zone = /*#__PURE__*/ function() {
8547
8541
  function Zone() {
8548
- _class_call_check$L(this, Zone);
8542
+ _class_call_check$K(this, Zone);
8549
8543
  }
8550
- _create_class$y(Zone, [
8544
+ _create_class$x(Zone, [
8551
8545
  {
8552
8546
  key: "type",
8553
8547
  get: /**
@@ -8653,12 +8647,12 @@ function _assert_this_initialized$o(self) {
8653
8647
  }
8654
8648
  return self;
8655
8649
  }
8656
- function _class_call_check$K(instance, Constructor) {
8650
+ function _class_call_check$J(instance, Constructor) {
8657
8651
  if (!(instance instanceof Constructor)) {
8658
8652
  throw new TypeError("Cannot call a class as a function");
8659
8653
  }
8660
8654
  }
8661
- function _defineProperties$x(target, props) {
8655
+ function _defineProperties$w(target, props) {
8662
8656
  for(var i = 0; i < props.length; i++){
8663
8657
  var descriptor = props[i];
8664
8658
  descriptor.enumerable = descriptor.enumerable || false;
@@ -8667,9 +8661,9 @@ function _defineProperties$x(target, props) {
8667
8661
  Object.defineProperty(target, descriptor.key, descriptor);
8668
8662
  }
8669
8663
  }
8670
- function _create_class$x(Constructor, protoProps, staticProps) {
8671
- if (protoProps) _defineProperties$x(Constructor.prototype, protoProps);
8672
- if (staticProps) _defineProperties$x(Constructor, staticProps);
8664
+ function _create_class$w(Constructor, protoProps, staticProps) {
8665
+ if (protoProps) _defineProperties$w(Constructor.prototype, protoProps);
8666
+ if (staticProps) _defineProperties$w(Constructor, staticProps);
8673
8667
  return Constructor;
8674
8668
  }
8675
8669
  function _get_prototype_of$o(o) {
@@ -8737,10 +8731,10 @@ var SystemZone = /*#__PURE__*/ function(Zone) {
8737
8731
  _inherits$o(SystemZone, Zone);
8738
8732
  var _super = _create_super$o(SystemZone);
8739
8733
  function SystemZone() {
8740
- _class_call_check$K(this, SystemZone);
8734
+ _class_call_check$J(this, SystemZone);
8741
8735
  return _super.apply(this, arguments);
8742
8736
  }
8743
- _create_class$x(SystemZone, [
8737
+ _create_class$w(SystemZone, [
8744
8738
  {
8745
8739
  key: "type",
8746
8740
  get: /** @override **/ function get() {
@@ -8821,12 +8815,12 @@ function _assert_this_initialized$n(self) {
8821
8815
  }
8822
8816
  return self;
8823
8817
  }
8824
- function _class_call_check$J(instance, Constructor) {
8818
+ function _class_call_check$I(instance, Constructor) {
8825
8819
  if (!(instance instanceof Constructor)) {
8826
8820
  throw new TypeError("Cannot call a class as a function");
8827
8821
  }
8828
8822
  }
8829
- function _defineProperties$w(target, props) {
8823
+ function _defineProperties$v(target, props) {
8830
8824
  for(var i = 0; i < props.length; i++){
8831
8825
  var descriptor = props[i];
8832
8826
  descriptor.enumerable = descriptor.enumerable || false;
@@ -8835,9 +8829,9 @@ function _defineProperties$w(target, props) {
8835
8829
  Object.defineProperty(target, descriptor.key, descriptor);
8836
8830
  }
8837
8831
  }
8838
- function _create_class$w(Constructor, protoProps, staticProps) {
8839
- if (protoProps) _defineProperties$w(Constructor.prototype, protoProps);
8840
- if (staticProps) _defineProperties$w(Constructor, staticProps);
8832
+ function _create_class$v(Constructor, protoProps, staticProps) {
8833
+ if (protoProps) _defineProperties$v(Constructor.prototype, protoProps);
8834
+ if (staticProps) _defineProperties$v(Constructor, staticProps);
8841
8835
  return Constructor;
8842
8836
  }
8843
8837
  function _get_prototype_of$n(o) {
@@ -8995,14 +8989,14 @@ var IANAZone = /*#__PURE__*/ function(Zone) {
8995
8989
  _inherits$n(IANAZone, Zone);
8996
8990
  var _super = _create_super$n(IANAZone);
8997
8991
  function IANAZone(name) {
8998
- _class_call_check$J(this, IANAZone);
8992
+ _class_call_check$I(this, IANAZone);
8999
8993
  var _this;
9000
8994
  _this = _super.call(this);
9001
8995
  /** @private **/ _this.zoneName = name;
9002
8996
  /** @private **/ _this.valid = IANAZone.isValidZone(name);
9003
8997
  return _this;
9004
8998
  }
9005
- _create_class$w(IANAZone, [
8999
+ _create_class$v(IANAZone, [
9006
9000
  {
9007
9001
  key: "type",
9008
9002
  get: /** @override **/ function get() {
@@ -9144,12 +9138,12 @@ function _array_like_to_array$m(arr, len) {
9144
9138
  function _array_with_holes$f(arr) {
9145
9139
  if (Array.isArray(arr)) return arr;
9146
9140
  }
9147
- function _class_call_check$I(instance, Constructor) {
9141
+ function _class_call_check$H(instance, Constructor) {
9148
9142
  if (!(instance instanceof Constructor)) {
9149
9143
  throw new TypeError("Cannot call a class as a function");
9150
9144
  }
9151
9145
  }
9152
- function _defineProperties$v(target, props) {
9146
+ function _defineProperties$u(target, props) {
9153
9147
  for(var i = 0; i < props.length; i++){
9154
9148
  var descriptor = props[i];
9155
9149
  descriptor.enumerable = descriptor.enumerable || false;
@@ -9158,12 +9152,12 @@ function _defineProperties$v(target, props) {
9158
9152
  Object.defineProperty(target, descriptor.key, descriptor);
9159
9153
  }
9160
9154
  }
9161
- function _create_class$v(Constructor, protoProps, staticProps) {
9162
- if (protoProps) _defineProperties$v(Constructor.prototype, protoProps);
9163
- if (staticProps) _defineProperties$v(Constructor, staticProps);
9155
+ function _create_class$u(Constructor, protoProps, staticProps) {
9156
+ if (protoProps) _defineProperties$u(Constructor.prototype, protoProps);
9157
+ if (staticProps) _defineProperties$u(Constructor, staticProps);
9164
9158
  return Constructor;
9165
9159
  }
9166
- function _define_property$E(obj, key, value) {
9160
+ function _define_property$D(obj, key, value) {
9167
9161
  if (key in obj) {
9168
9162
  Object.defineProperty(obj, key, {
9169
9163
  value: value,
@@ -9213,7 +9207,7 @@ function _object_spread$q(target) {
9213
9207
  }));
9214
9208
  }
9215
9209
  ownKeys.forEach(function(key) {
9216
- _define_property$E(target, key, source[key]);
9210
+ _define_property$D(target, key, source[key]);
9217
9211
  });
9218
9212
  }
9219
9213
  return target;
@@ -9451,7 +9445,7 @@ function supportsFastNumbers(loc) {
9451
9445
  * @private
9452
9446
  */ var PolyNumberFormatter = /*#__PURE__*/ function() {
9453
9447
  function PolyNumberFormatter(intl, forceSimple, opts) {
9454
- _class_call_check$I(this, PolyNumberFormatter);
9448
+ _class_call_check$H(this, PolyNumberFormatter);
9455
9449
  this.padTo = opts.padTo || 0;
9456
9450
  this.floor = opts.floor || false;
9457
9451
  opts.padTo; opts.floor; var otherOpts = _object_without_properties(opts, [
@@ -9466,7 +9460,7 @@ function supportsFastNumbers(loc) {
9466
9460
  this.inf = getCachedINF(intl, intlOpts);
9467
9461
  }
9468
9462
  }
9469
- _create_class$v(PolyNumberFormatter, [
9463
+ _create_class$u(PolyNumberFormatter, [
9470
9464
  {
9471
9465
  key: "format",
9472
9466
  value: function format(i) {
@@ -9487,7 +9481,7 @@ function supportsFastNumbers(loc) {
9487
9481
  * @private
9488
9482
  */ var PolyDateFormatter = /*#__PURE__*/ function() {
9489
9483
  function PolyDateFormatter(dt, intl, opts) {
9490
- _class_call_check$I(this, PolyDateFormatter);
9484
+ _class_call_check$H(this, PolyDateFormatter);
9491
9485
  this.opts = opts;
9492
9486
  this.originalZone = undefined;
9493
9487
  var z = undefined;
@@ -9533,7 +9527,7 @@ function supportsFastNumbers(loc) {
9533
9527
  intlOpts.timeZone = intlOpts.timeZone || z;
9534
9528
  this.dtf = getCachedDTF(intl, intlOpts);
9535
9529
  }
9536
- _create_class$v(PolyDateFormatter, [
9530
+ _create_class$u(PolyDateFormatter, [
9537
9531
  {
9538
9532
  key: "format",
9539
9533
  value: function format() {
@@ -9584,7 +9578,7 @@ function supportsFastNumbers(loc) {
9584
9578
  * @private
9585
9579
  */ var PolyRelFormatter = /*#__PURE__*/ function() {
9586
9580
  function PolyRelFormatter(intl, isEnglish, opts) {
9587
- _class_call_check$I(this, PolyRelFormatter);
9581
+ _class_call_check$H(this, PolyRelFormatter);
9588
9582
  this.opts = _object_spread$q({
9589
9583
  style: "long"
9590
9584
  }, opts);
@@ -9592,7 +9586,7 @@ function supportsFastNumbers(loc) {
9592
9586
  this.rtf = getCachedRTF(intl, opts);
9593
9587
  }
9594
9588
  }
9595
- _create_class$v(PolyRelFormatter, [
9589
+ _create_class$u(PolyRelFormatter, [
9596
9590
  {
9597
9591
  key: "format",
9598
9592
  value: function format(count, unit) {
@@ -9626,7 +9620,7 @@ var fallbackWeekSettings = {
9626
9620
  };
9627
9621
  var Locale = /*#__PURE__*/ function() {
9628
9622
  function Locale(locale, numbering, outputCalendar, weekSettings, specifiedLocale) {
9629
- _class_call_check$I(this, Locale);
9623
+ _class_call_check$H(this, Locale);
9630
9624
  var _parseLocaleString = _sliced_to_array$f(parseLocaleString(locale), 3), parsedLocale = _parseLocaleString[0], parsedNumberingSystem = _parseLocaleString[1], parsedOutputCalendar = _parseLocaleString[2];
9631
9625
  this.locale = parsedLocale;
9632
9626
  this.numberingSystem = numbering || parsedNumberingSystem || null;
@@ -9646,7 +9640,7 @@ var Locale = /*#__PURE__*/ function() {
9646
9640
  this.specifiedLocale = specifiedLocale;
9647
9641
  this.fastNumbersCached = null;
9648
9642
  }
9649
- _create_class$v(Locale, [
9643
+ _create_class$u(Locale, [
9650
9644
  {
9651
9645
  key: "fastNumbers",
9652
9646
  get: function get() {
@@ -9910,12 +9904,12 @@ function _assert_this_initialized$m(self) {
9910
9904
  }
9911
9905
  return self;
9912
9906
  }
9913
- function _class_call_check$H(instance, Constructor) {
9907
+ function _class_call_check$G(instance, Constructor) {
9914
9908
  if (!(instance instanceof Constructor)) {
9915
9909
  throw new TypeError("Cannot call a class as a function");
9916
9910
  }
9917
9911
  }
9918
- function _defineProperties$u(target, props) {
9912
+ function _defineProperties$t(target, props) {
9919
9913
  for(var i = 0; i < props.length; i++){
9920
9914
  var descriptor = props[i];
9921
9915
  descriptor.enumerable = descriptor.enumerable || false;
@@ -9924,9 +9918,9 @@ function _defineProperties$u(target, props) {
9924
9918
  Object.defineProperty(target, descriptor.key, descriptor);
9925
9919
  }
9926
9920
  }
9927
- function _create_class$u(Constructor, protoProps, staticProps) {
9928
- if (protoProps) _defineProperties$u(Constructor.prototype, protoProps);
9929
- if (staticProps) _defineProperties$u(Constructor, staticProps);
9921
+ function _create_class$t(Constructor, protoProps, staticProps) {
9922
+ if (protoProps) _defineProperties$t(Constructor.prototype, protoProps);
9923
+ if (staticProps) _defineProperties$t(Constructor, staticProps);
9930
9924
  return Constructor;
9931
9925
  }
9932
9926
  function _get_prototype_of$m(o) {
@@ -9994,13 +9988,13 @@ var FixedOffsetZone = /*#__PURE__*/ function(Zone) {
9994
9988
  _inherits$m(FixedOffsetZone, Zone);
9995
9989
  var _super = _create_super$m(FixedOffsetZone);
9996
9990
  function FixedOffsetZone(offset) {
9997
- _class_call_check$H(this, FixedOffsetZone);
9991
+ _class_call_check$G(this, FixedOffsetZone);
9998
9992
  var _this;
9999
9993
  _this = _super.call(this);
10000
9994
  /** @private **/ _this.fixed = offset;
10001
9995
  return _this;
10002
9996
  }
10003
- _create_class$u(FixedOffsetZone, [
9997
+ _create_class$t(FixedOffsetZone, [
10004
9998
  {
10005
9999
  key: "type",
10006
10000
  get: /** @override **/ function get() {
@@ -10111,12 +10105,12 @@ function _assert_this_initialized$l(self) {
10111
10105
  }
10112
10106
  return self;
10113
10107
  }
10114
- function _class_call_check$G(instance, Constructor) {
10108
+ function _class_call_check$F(instance, Constructor) {
10115
10109
  if (!(instance instanceof Constructor)) {
10116
10110
  throw new TypeError("Cannot call a class as a function");
10117
10111
  }
10118
10112
  }
10119
- function _defineProperties$t(target, props) {
10113
+ function _defineProperties$s(target, props) {
10120
10114
  for(var i = 0; i < props.length; i++){
10121
10115
  var descriptor = props[i];
10122
10116
  descriptor.enumerable = descriptor.enumerable || false;
@@ -10125,9 +10119,9 @@ function _defineProperties$t(target, props) {
10125
10119
  Object.defineProperty(target, descriptor.key, descriptor);
10126
10120
  }
10127
10121
  }
10128
- function _create_class$t(Constructor, protoProps, staticProps) {
10129
- if (protoProps) _defineProperties$t(Constructor.prototype, protoProps);
10130
- if (staticProps) _defineProperties$t(Constructor, staticProps);
10122
+ function _create_class$s(Constructor, protoProps, staticProps) {
10123
+ if (protoProps) _defineProperties$s(Constructor.prototype, protoProps);
10124
+ if (staticProps) _defineProperties$s(Constructor, staticProps);
10131
10125
  return Constructor;
10132
10126
  }
10133
10127
  function _get_prototype_of$l(o) {
@@ -10194,13 +10188,13 @@ var InvalidZone = /*#__PURE__*/ function(Zone) {
10194
10188
  _inherits$l(InvalidZone, Zone);
10195
10189
  var _super = _create_super$l(InvalidZone);
10196
10190
  function InvalidZone(zoneName) {
10197
- _class_call_check$G(this, InvalidZone);
10191
+ _class_call_check$F(this, InvalidZone);
10198
10192
  var _this;
10199
10193
  _this = _super.call(this);
10200
10194
  /** @private */ _this.zoneName = zoneName;
10201
10195
  return _this;
10202
10196
  }
10203
- _create_class$t(InvalidZone, [
10197
+ _create_class$s(InvalidZone, [
10204
10198
  {
10205
10199
  key: "type",
10206
10200
  get: /** @override **/ function get() {
@@ -10284,12 +10278,12 @@ function normalizeZone(input, defaultZone) {
10284
10278
  }
10285
10279
  }
10286
10280
 
10287
- function _class_call_check$F(instance, Constructor) {
10281
+ function _class_call_check$E(instance, Constructor) {
10288
10282
  if (!(instance instanceof Constructor)) {
10289
10283
  throw new TypeError("Cannot call a class as a function");
10290
10284
  }
10291
10285
  }
10292
- function _defineProperties$s(target, props) {
10286
+ function _defineProperties$r(target, props) {
10293
10287
  for(var i = 0; i < props.length; i++){
10294
10288
  var descriptor = props[i];
10295
10289
  descriptor.enumerable = descriptor.enumerable || false;
@@ -10298,9 +10292,9 @@ function _defineProperties$s(target, props) {
10298
10292
  Object.defineProperty(target, descriptor.key, descriptor);
10299
10293
  }
10300
10294
  }
10301
- function _create_class$s(Constructor, protoProps, staticProps) {
10302
- if (protoProps) _defineProperties$s(Constructor.prototype, protoProps);
10303
- if (staticProps) _defineProperties$s(Constructor, staticProps);
10295
+ function _create_class$r(Constructor, protoProps, staticProps) {
10296
+ if (protoProps) _defineProperties$r(Constructor.prototype, protoProps);
10297
+ if (staticProps) _defineProperties$r(Constructor, staticProps);
10304
10298
  return Constructor;
10305
10299
  }
10306
10300
  var now = function() {
@@ -10308,9 +10302,9 @@ var now = function() {
10308
10302
  }, defaultZone = "system", defaultLocale = null, defaultNumberingSystem = null, defaultOutputCalendar = null, twoDigitCutoffYear = 60, throwOnInvalid, defaultWeekSettings = null;
10309
10303
  var Settings = /*#__PURE__*/ function() {
10310
10304
  function Settings() {
10311
- _class_call_check$F(this, Settings);
10305
+ _class_call_check$E(this, Settings);
10312
10306
  }
10313
- _create_class$s(Settings, null, [
10307
+ _create_class$r(Settings, null, [
10314
10308
  {
10315
10309
  key: "now",
10316
10310
  get: /**
@@ -10461,12 +10455,12 @@ var Settings = /*#__PURE__*/ function() {
10461
10455
  return Settings;
10462
10456
  }();
10463
10457
 
10464
- function _class_call_check$E(instance, Constructor) {
10458
+ function _class_call_check$D(instance, Constructor) {
10465
10459
  if (!(instance instanceof Constructor)) {
10466
10460
  throw new TypeError("Cannot call a class as a function");
10467
10461
  }
10468
10462
  }
10469
- function _defineProperties$r(target, props) {
10463
+ function _defineProperties$q(target, props) {
10470
10464
  for(var i = 0; i < props.length; i++){
10471
10465
  var descriptor = props[i];
10472
10466
  descriptor.enumerable = descriptor.enumerable || false;
@@ -10475,18 +10469,18 @@ function _defineProperties$r(target, props) {
10475
10469
  Object.defineProperty(target, descriptor.key, descriptor);
10476
10470
  }
10477
10471
  }
10478
- function _create_class$r(Constructor, protoProps, staticProps) {
10479
- if (protoProps) _defineProperties$r(Constructor.prototype, protoProps);
10480
- if (staticProps) _defineProperties$r(Constructor, staticProps);
10472
+ function _create_class$q(Constructor, protoProps, staticProps) {
10473
+ if (protoProps) _defineProperties$q(Constructor.prototype, protoProps);
10474
+ if (staticProps) _defineProperties$q(Constructor, staticProps);
10481
10475
  return Constructor;
10482
10476
  }
10483
10477
  var Invalid = /*#__PURE__*/ function() {
10484
10478
  function Invalid(reason, explanation) {
10485
- _class_call_check$E(this, Invalid);
10479
+ _class_call_check$D(this, Invalid);
10486
10480
  this.reason = reason;
10487
10481
  this.explanation = explanation;
10488
10482
  }
10489
- _create_class$r(Invalid, [
10483
+ _create_class$q(Invalid, [
10490
10484
  {
10491
10485
  key: "toMessage",
10492
10486
  value: function toMessage() {
@@ -10501,7 +10495,7 @@ var Invalid = /*#__PURE__*/ function() {
10501
10495
  return Invalid;
10502
10496
  }();
10503
10497
 
10504
- function _define_property$D(obj, key, value) {
10498
+ function _define_property$C(obj, key, value) {
10505
10499
  if (key in obj) {
10506
10500
  Object.defineProperty(obj, key, {
10507
10501
  value: value,
@@ -10524,7 +10518,7 @@ function _object_spread$p(target) {
10524
10518
  }));
10525
10519
  }
10526
10520
  ownKeys.forEach(function(key) {
10527
- _define_property$D(target, key, source[key]);
10521
+ _define_property$C(target, key, source[key]);
10528
10522
  });
10529
10523
  }
10530
10524
  return target;
@@ -10720,7 +10714,7 @@ function hasInvalidTimeData(obj) {
10720
10714
  This is just a junk drawer, containing anything used across multiple classes.
10721
10715
  Because Luxon is small(ish), this should stay small and we won't worry about splitting
10722
10716
  it up into, say, parsingUtil.js and basicUtil.js and so on. But they are divided up by feature area.
10723
- */ function _define_property$C(obj, key, value) {
10717
+ */ function _define_property$B(obj, key, value) {
10724
10718
  if (key in obj) {
10725
10719
  Object.defineProperty(obj, key, {
10726
10720
  value: value,
@@ -10743,7 +10737,7 @@ function _object_spread$o(target) {
10743
10737
  }));
10744
10738
  }
10745
10739
  ownKeys.forEach(function(key) {
10746
- _define_property$C(target, key, source[key]);
10740
+ _define_property$B(target, key, source[key]);
10747
10741
  });
10748
10742
  }
10749
10743
  return target;
@@ -11272,12 +11266,12 @@ function _array_like_to_array$k(arr, len) {
11272
11266
  function _array_without_holes$b(arr) {
11273
11267
  if (Array.isArray(arr)) return _array_like_to_array$k(arr);
11274
11268
  }
11275
- function _class_call_check$D(instance, Constructor) {
11269
+ function _class_call_check$C(instance, Constructor) {
11276
11270
  if (!(instance instanceof Constructor)) {
11277
11271
  throw new TypeError("Cannot call a class as a function");
11278
11272
  }
11279
11273
  }
11280
- function _defineProperties$q(target, props) {
11274
+ function _defineProperties$p(target, props) {
11281
11275
  for(var i = 0; i < props.length; i++){
11282
11276
  var descriptor = props[i];
11283
11277
  descriptor.enumerable = descriptor.enumerable || false;
@@ -11286,12 +11280,12 @@ function _defineProperties$q(target, props) {
11286
11280
  Object.defineProperty(target, descriptor.key, descriptor);
11287
11281
  }
11288
11282
  }
11289
- function _create_class$q(Constructor, protoProps, staticProps) {
11290
- if (protoProps) _defineProperties$q(Constructor.prototype, protoProps);
11291
- if (staticProps) _defineProperties$q(Constructor, staticProps);
11283
+ function _create_class$p(Constructor, protoProps, staticProps) {
11284
+ if (protoProps) _defineProperties$p(Constructor.prototype, protoProps);
11285
+ if (staticProps) _defineProperties$p(Constructor, staticProps);
11292
11286
  return Constructor;
11293
11287
  }
11294
- function _define_property$B(obj, key, value) {
11288
+ function _define_property$A(obj, key, value) {
11295
11289
  if (key in obj) {
11296
11290
  Object.defineProperty(obj, key, {
11297
11291
  value: value,
@@ -11320,7 +11314,7 @@ function _object_spread$n(target) {
11320
11314
  }));
11321
11315
  }
11322
11316
  ownKeys.forEach(function(key) {
11323
- _define_property$B(target, key, source[key]);
11317
+ _define_property$A(target, key, source[key]);
11324
11318
  });
11325
11319
  }
11326
11320
  return target;
@@ -11388,12 +11382,12 @@ var macroTokenToFormatOpts = {
11388
11382
  };
11389
11383
  var Formatter = /*#__PURE__*/ function() {
11390
11384
  function Formatter(locale, formatOpts) {
11391
- _class_call_check$D(this, Formatter);
11385
+ _class_call_check$C(this, Formatter);
11392
11386
  this.opts = formatOpts;
11393
11387
  this.loc = locale;
11394
11388
  this.systemLoc = null;
11395
11389
  }
11396
- _create_class$q(Formatter, [
11390
+ _create_class$p(Formatter, [
11397
11391
  {
11398
11392
  key: "formatWithSystemDefault",
11399
11393
  value: function formatWithSystemDefault(dt, opts) {
@@ -11822,7 +11816,7 @@ function _array_like_to_array$j(arr, len) {
11822
11816
  function _array_with_holes$e(arr) {
11823
11817
  if (Array.isArray(arr)) return arr;
11824
11818
  }
11825
- function _define_property$A(obj, key, value) {
11819
+ function _define_property$z(obj, key, value) {
11826
11820
  if (key in obj) {
11827
11821
  Object.defineProperty(obj, key, {
11828
11822
  value: value,
@@ -11872,7 +11866,7 @@ function _object_spread$m(target) {
11872
11866
  }));
11873
11867
  }
11874
11868
  ownKeys.forEach(function(key) {
11875
- _define_property$A(target, key, source[key]);
11869
+ _define_property$z(target, key, source[key]);
11876
11870
  });
11877
11871
  }
11878
11872
  return target;
@@ -12207,12 +12201,12 @@ function _array_like_to_array$i(arr, len) {
12207
12201
  function _array_with_holes$d(arr) {
12208
12202
  if (Array.isArray(arr)) return arr;
12209
12203
  }
12210
- function _class_call_check$C(instance, Constructor) {
12204
+ function _class_call_check$B(instance, Constructor) {
12211
12205
  if (!(instance instanceof Constructor)) {
12212
12206
  throw new TypeError("Cannot call a class as a function");
12213
12207
  }
12214
12208
  }
12215
- function _defineProperties$p(target, props) {
12209
+ function _defineProperties$o(target, props) {
12216
12210
  for(var i = 0; i < props.length; i++){
12217
12211
  var descriptor = props[i];
12218
12212
  descriptor.enumerable = descriptor.enumerable || false;
@@ -12221,12 +12215,12 @@ function _defineProperties$p(target, props) {
12221
12215
  Object.defineProperty(target, descriptor.key, descriptor);
12222
12216
  }
12223
12217
  }
12224
- function _create_class$p(Constructor, protoProps, staticProps) {
12225
- if (protoProps) _defineProperties$p(Constructor.prototype, protoProps);
12226
- if (staticProps) _defineProperties$p(Constructor, staticProps);
12218
+ function _create_class$o(Constructor, protoProps, staticProps) {
12219
+ if (protoProps) _defineProperties$o(Constructor.prototype, protoProps);
12220
+ if (staticProps) _defineProperties$o(Constructor, staticProps);
12227
12221
  return Constructor;
12228
12222
  }
12229
- function _define_property$z(obj, key, value) {
12223
+ function _define_property$y(obj, key, value) {
12230
12224
  if (key in obj) {
12231
12225
  Object.defineProperty(obj, key, {
12232
12226
  value: value,
@@ -12283,7 +12277,7 @@ function _object_spread$l(target) {
12283
12277
  }));
12284
12278
  }
12285
12279
  ownKeys.forEach(function(key) {
12286
- _define_property$z(target, key, source[key]);
12280
+ _define_property$y(target, key, source[key]);
12287
12281
  });
12288
12282
  }
12289
12283
  return target;
@@ -12542,7 +12536,7 @@ function removeZeroes(vals) {
12542
12536
  }
12543
12537
  var Duration = /*#__PURE__*/ function() {
12544
12538
  function Duration(config) {
12545
- _class_call_check$C(this, Duration);
12539
+ _class_call_check$B(this, Duration);
12546
12540
  var accurate = config.conversionAccuracy === "longterm" || false;
12547
12541
  var matrix = accurate ? accurateMatrix : casualMatrix;
12548
12542
  if (config.matrix) {
@@ -12567,7 +12561,7 @@ var Duration = /*#__PURE__*/ function() {
12567
12561
  * @access private
12568
12562
  */ this.isLuxonDuration = true;
12569
12563
  }
12570
- _create_class$p(Duration, [
12564
+ _create_class$o(Duration, [
12571
12565
  {
12572
12566
  key: "locale",
12573
12567
  get: /**
@@ -13439,12 +13433,12 @@ function _array_with_holes$c(arr) {
13439
13433
  function _array_without_holes$a(arr) {
13440
13434
  if (Array.isArray(arr)) return _array_like_to_array$h(arr);
13441
13435
  }
13442
- function _class_call_check$B(instance, Constructor) {
13436
+ function _class_call_check$A(instance, Constructor) {
13443
13437
  if (!(instance instanceof Constructor)) {
13444
13438
  throw new TypeError("Cannot call a class as a function");
13445
13439
  }
13446
13440
  }
13447
- function _defineProperties$o(target, props) {
13441
+ function _defineProperties$n(target, props) {
13448
13442
  for(var i = 0; i < props.length; i++){
13449
13443
  var descriptor = props[i];
13450
13444
  descriptor.enumerable = descriptor.enumerable || false;
@@ -13453,9 +13447,9 @@ function _defineProperties$o(target, props) {
13453
13447
  Object.defineProperty(target, descriptor.key, descriptor);
13454
13448
  }
13455
13449
  }
13456
- function _create_class$o(Constructor, protoProps, staticProps) {
13457
- if (protoProps) _defineProperties$o(Constructor.prototype, protoProps);
13458
- if (staticProps) _defineProperties$o(Constructor, staticProps);
13450
+ function _create_class$n(Constructor, protoProps, staticProps) {
13451
+ if (protoProps) _defineProperties$n(Constructor.prototype, protoProps);
13452
+ if (staticProps) _defineProperties$n(Constructor, staticProps);
13459
13453
  return Constructor;
13460
13454
  }
13461
13455
  function _instanceof$9(left, right) {
@@ -13527,7 +13521,7 @@ function validateStartEnd(start, end) {
13527
13521
  }
13528
13522
  var Interval = /*#__PURE__*/ function() {
13529
13523
  function Interval(config) {
13530
- _class_call_check$B(this, Interval);
13524
+ _class_call_check$A(this, Interval);
13531
13525
  /**
13532
13526
  * @access private
13533
13527
  */ this.s = config.start;
@@ -13541,7 +13535,7 @@ var Interval = /*#__PURE__*/ function() {
13541
13535
  * @access private
13542
13536
  */ this.isLuxonInterval = true;
13543
13537
  }
13544
- _create_class$o(Interval, [
13538
+ _create_class$n(Interval, [
13545
13539
  {
13546
13540
  key: "start",
13547
13541
  get: /**
@@ -14216,12 +14210,12 @@ var Interval = /*#__PURE__*/ function() {
14216
14210
  return Interval;
14217
14211
  }();
14218
14212
 
14219
- function _class_call_check$A(instance, Constructor) {
14213
+ function _class_call_check$z(instance, Constructor) {
14220
14214
  if (!(instance instanceof Constructor)) {
14221
14215
  throw new TypeError("Cannot call a class as a function");
14222
14216
  }
14223
14217
  }
14224
- function _defineProperties$n(target, props) {
14218
+ function _defineProperties$m(target, props) {
14225
14219
  for(var i = 0; i < props.length; i++){
14226
14220
  var descriptor = props[i];
14227
14221
  descriptor.enumerable = descriptor.enumerable || false;
@@ -14230,16 +14224,16 @@ function _defineProperties$n(target, props) {
14230
14224
  Object.defineProperty(target, descriptor.key, descriptor);
14231
14225
  }
14232
14226
  }
14233
- function _create_class$n(Constructor, protoProps, staticProps) {
14234
- if (protoProps) _defineProperties$n(Constructor.prototype, protoProps);
14235
- if (staticProps) _defineProperties$n(Constructor, staticProps);
14227
+ function _create_class$m(Constructor, protoProps, staticProps) {
14228
+ if (protoProps) _defineProperties$m(Constructor.prototype, protoProps);
14229
+ if (staticProps) _defineProperties$m(Constructor, staticProps);
14236
14230
  return Constructor;
14237
14231
  }
14238
14232
  var Info = /*#__PURE__*/ function() {
14239
14233
  function Info() {
14240
- _class_call_check$A(this, Info);
14234
+ _class_call_check$z(this, Info);
14241
14235
  }
14242
- _create_class$n(Info, null, [
14236
+ _create_class$m(Info, null, [
14243
14237
  {
14244
14238
  key: "hasDST",
14245
14239
  value: /**
@@ -14468,7 +14462,7 @@ function _array_with_holes$b(arr) {
14468
14462
  function _array_without_holes$9(arr) {
14469
14463
  if (Array.isArray(arr)) return _array_like_to_array$g(arr);
14470
14464
  }
14471
- function _define_property$y(obj, key, value) {
14465
+ function _define_property$x(obj, key, value) {
14472
14466
  if (key in obj) {
14473
14467
  Object.defineProperty(obj, key, {
14474
14468
  value: value,
@@ -14639,7 +14633,7 @@ function diff(earlier, later, units, opts) {
14639
14633
  });
14640
14634
  if (lowerOrderUnits.length === 0) {
14641
14635
  if (highWater < later) {
14642
- highWater = cursor.plus(_define_property$y({}, lowestOrder, 1));
14636
+ highWater = cursor.plus(_define_property$x({}, lowestOrder, 1));
14643
14637
  }
14644
14638
  if (highWater !== cursor) {
14645
14639
  results[lowestOrder] = (results[lowestOrder] || 0) + remainingMillis / (highWater - cursor);
@@ -15373,12 +15367,12 @@ function _array_like_to_array$d(arr, len) {
15373
15367
  function _array_with_holes$8(arr) {
15374
15368
  if (Array.isArray(arr)) return arr;
15375
15369
  }
15376
- function _class_call_check$z(instance, Constructor) {
15370
+ function _class_call_check$y(instance, Constructor) {
15377
15371
  if (!(instance instanceof Constructor)) {
15378
15372
  throw new TypeError("Cannot call a class as a function");
15379
15373
  }
15380
15374
  }
15381
- function _defineProperties$m(target, props) {
15375
+ function _defineProperties$l(target, props) {
15382
15376
  for(var i = 0; i < props.length; i++){
15383
15377
  var descriptor = props[i];
15384
15378
  descriptor.enumerable = descriptor.enumerable || false;
@@ -15387,12 +15381,12 @@ function _defineProperties$m(target, props) {
15387
15381
  Object.defineProperty(target, descriptor.key, descriptor);
15388
15382
  }
15389
15383
  }
15390
- function _create_class$m(Constructor, protoProps, staticProps) {
15391
- if (protoProps) _defineProperties$m(Constructor.prototype, protoProps);
15392
- if (staticProps) _defineProperties$m(Constructor, staticProps);
15384
+ function _create_class$l(Constructor, protoProps, staticProps) {
15385
+ if (protoProps) _defineProperties$l(Constructor.prototype, protoProps);
15386
+ if (staticProps) _defineProperties$l(Constructor, staticProps);
15393
15387
  return Constructor;
15394
15388
  }
15395
- function _define_property$x(obj, key, value) {
15389
+ function _define_property$w(obj, key, value) {
15396
15390
  if (key in obj) {
15397
15391
  Object.defineProperty(obj, key, {
15398
15392
  value: value,
@@ -15449,7 +15443,7 @@ function _object_spread$k(target) {
15449
15443
  }));
15450
15444
  }
15451
15445
  ownKeys.forEach(function(key) {
15452
- _define_property$x(target, key, source[key]);
15446
+ _define_property$w(target, key, source[key]);
15453
15447
  });
15454
15448
  }
15455
15449
  return target;
@@ -15880,7 +15874,7 @@ function lastOpts(argList) {
15880
15874
  }
15881
15875
  var DateTime = /*#__PURE__*/ function() {
15882
15876
  function DateTime(config) {
15883
- _class_call_check$z(this, DateTime);
15877
+ _class_call_check$y(this, DateTime);
15884
15878
  var zone = config.zone || Settings.defaultZone;
15885
15879
  var invalid = config.invalid || (Number.isNaN(config.ts) ? new Invalid("invalid input") : null) || (!zone.isValid ? unsupportedZone(zone) : null);
15886
15880
  /**
@@ -15928,7 +15922,7 @@ var DateTime = /*#__PURE__*/ function() {
15928
15922
  * @access private
15929
15923
  */ this.isLuxonDateTime = true;
15930
15924
  }
15931
- _create_class$m(DateTime, [
15925
+ _create_class$l(DateTime, [
15932
15926
  {
15933
15927
  // INFO
15934
15928
  /**
@@ -16666,7 +16660,7 @@ var DateTime = /*#__PURE__*/ function() {
16666
16660
  * @return {DateTime}
16667
16661
  */ key: "endOf",
16668
16662
  value: function endOf(unit, opts) {
16669
- return this.isValid ? this.plus(_define_property$x({}, unit, 1)).startOf(unit, opts).minus(1) : this;
16663
+ return this.isValid ? this.plus(_define_property$w({}, unit, 1)).startOf(unit, opts).minus(1) : this;
16670
16664
  }
16671
16665
  },
16672
16666
  {
@@ -17939,12 +17933,12 @@ function _assert_this_initialized$k(self) {
17939
17933
  }
17940
17934
  return self;
17941
17935
  }
17942
- function _class_call_check$y(instance, Constructor) {
17936
+ function _class_call_check$x(instance, Constructor) {
17943
17937
  if (!(instance instanceof Constructor)) {
17944
17938
  throw new TypeError("Cannot call a class as a function");
17945
17939
  }
17946
17940
  }
17947
- function _defineProperties$l(target, props) {
17941
+ function _defineProperties$k(target, props) {
17948
17942
  for(var i = 0; i < props.length; i++){
17949
17943
  var descriptor = props[i];
17950
17944
  descriptor.enumerable = descriptor.enumerable || false;
@@ -17953,9 +17947,9 @@ function _defineProperties$l(target, props) {
17953
17947
  Object.defineProperty(target, descriptor.key, descriptor);
17954
17948
  }
17955
17949
  }
17956
- function _create_class$l(Constructor, protoProps, staticProps) {
17957
- if (protoProps) _defineProperties$l(Constructor.prototype, protoProps);
17958
- if (staticProps) _defineProperties$l(Constructor, staticProps);
17950
+ function _create_class$k(Constructor, protoProps, staticProps) {
17951
+ if (protoProps) _defineProperties$k(Constructor.prototype, protoProps);
17952
+ if (staticProps) _defineProperties$k(Constructor, staticProps);
17959
17953
  return Constructor;
17960
17954
  }
17961
17955
  function _get_prototype_of$k(o) {
@@ -18066,7 +18060,7 @@ function _create_super$k(Derived) {
18066
18060
  var DefaultBufferLength = 1024;
18067
18061
  var nextPropID = 0;
18068
18062
  var Range$1 = function Range(from, to) {
18069
- _class_call_check$y(this, Range);
18063
+ _class_call_check$x(this, Range);
18070
18064
  this.from = from;
18071
18065
  this.to = to;
18072
18066
  };
@@ -18077,14 +18071,14 @@ class represent prop names.
18077
18071
  */ var NodeProp = /*#__PURE__*/ function() {
18078
18072
  function NodeProp() {
18079
18073
  var config = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
18080
- _class_call_check$y(this, NodeProp);
18074
+ _class_call_check$x(this, NodeProp);
18081
18075
  this.id = nextPropID++;
18082
18076
  this.perNode = !!config.perNode;
18083
18077
  this.deserialize = config.deserialize || function() {
18084
18078
  throw new Error("This node type doesn't define a deserialize function");
18085
18079
  };
18086
18080
  }
18087
- _create_class$l(NodeProp, [
18081
+ _create_class$k(NodeProp, [
18088
18082
  {
18089
18083
  /**
18090
18084
  This is meant to be used with
@@ -18195,12 +18189,12 @@ represented by another tree.
18195
18189
  */ overlay, /**
18196
18190
  The parser used to create this subtree.
18197
18191
  */ parser) {
18198
- _class_call_check$y(this, MountedTree);
18192
+ _class_call_check$x(this, MountedTree);
18199
18193
  this.tree = tree;
18200
18194
  this.overlay = overlay;
18201
18195
  this.parser = parser;
18202
18196
  }
18203
- _create_class$l(MountedTree, null, [
18197
+ _create_class$k(MountedTree, null, [
18204
18198
  {
18205
18199
  key: "get",
18206
18200
  value: /**
@@ -18230,13 +18224,13 @@ Each node in a syntax tree has a node type associated with it.
18230
18224
  var /**
18231
18225
  @internal
18232
18226
  */ flags = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : 0;
18233
- _class_call_check$y(this, NodeType);
18227
+ _class_call_check$x(this, NodeType);
18234
18228
  this.name = name;
18235
18229
  this.props = props;
18236
18230
  this.id = id;
18237
18231
  this.flags = flags;
18238
18232
  }
18239
- _create_class$l(NodeType, [
18233
+ _create_class$k(NodeType, [
18240
18234
  {
18241
18235
  /**
18242
18236
  Retrieves a node prop for this type. Will return `undefined` if
@@ -18386,11 +18380,11 @@ types in it, so that the ids fit into 16-bit typed array slots.
18386
18380
  function NodeSet(/**
18387
18381
  The node types in this set, by id.
18388
18382
  */ types) {
18389
- _class_call_check$y(this, NodeSet);
18383
+ _class_call_check$x(this, NodeSet);
18390
18384
  this.types = types;
18391
18385
  for(var i = 0; i < types.length; i++)if (types[i].id != i) throw new RangeError("Node type ids should correspond to array positions when creating a node set");
18392
18386
  }
18393
- _create_class$l(NodeSet, [
18387
+ _create_class$k(NodeSet, [
18394
18388
  {
18395
18389
  /**
18396
18390
  Create a copy of this set with some node properties added. The
@@ -18509,7 +18503,7 @@ move around to adjacent nodes.
18509
18503
  */ length, /**
18510
18504
  Per-node [node props](#common.NodeProp) to associate with this node.
18511
18505
  */ props) {
18512
- _class_call_check$y(this, Tree);
18506
+ _class_call_check$x(this, Tree);
18513
18507
  this.type = type;
18514
18508
  this.children = children;
18515
18509
  this.positions = positions;
@@ -18541,7 +18535,7 @@ move around to adjacent nodes.
18541
18535
  }
18542
18536
  }
18543
18537
  }
18544
- _create_class$l(Tree, [
18538
+ _create_class$k(Tree, [
18545
18539
  {
18546
18540
  /**
18547
18541
  @internal
@@ -18743,11 +18737,11 @@ The empty tree
18743
18737
  */ Tree.empty = new Tree(NodeType.none, [], [], 0);
18744
18738
  var FlatBufferCursor = /*#__PURE__*/ function() {
18745
18739
  function FlatBufferCursor(buffer, index) {
18746
- _class_call_check$y(this, FlatBufferCursor);
18740
+ _class_call_check$x(this, FlatBufferCursor);
18747
18741
  this.buffer = buffer;
18748
18742
  this.index = index;
18749
18743
  }
18750
- _create_class$l(FlatBufferCursor, [
18744
+ _create_class$k(FlatBufferCursor, [
18751
18745
  {
18752
18746
  key: "id",
18753
18747
  get: function get() {
@@ -18806,12 +18800,12 @@ children belong to it).
18806
18800
  */ length, /**
18807
18801
  The node set used in this buffer.
18808
18802
  */ set) {
18809
- _class_call_check$y(this, TreeBuffer);
18803
+ _class_call_check$x(this, TreeBuffer);
18810
18804
  this.buffer = buffer;
18811
18805
  this.length = length;
18812
18806
  this.set = set;
18813
18807
  }
18814
- _create_class$l(TreeBuffer, [
18808
+ _create_class$k(TreeBuffer, [
18815
18809
  {
18816
18810
  key: "type",
18817
18811
  get: /**
@@ -18923,9 +18917,9 @@ function resolveNode(node, pos, side, overlays) {
18923
18917
  }
18924
18918
  var BaseNode = /*#__PURE__*/ function() {
18925
18919
  function BaseNode() {
18926
- _class_call_check$y(this, BaseNode);
18920
+ _class_call_check$x(this, BaseNode);
18927
18921
  }
18928
- _create_class$l(BaseNode, [
18922
+ _create_class$k(BaseNode, [
18929
18923
  {
18930
18924
  key: "cursor",
18931
18925
  value: function cursor() {
@@ -19005,7 +18999,7 @@ var TreeNode = /*#__PURE__*/ function(BaseNode) {
19005
18999
  var _super = _create_super$k(TreeNode);
19006
19000
  function TreeNode(_tree, from, // Index in parent node, set to -1 if the node is not a direct child of _parent.node (overlay)
19007
19001
  index, _parent) {
19008
- _class_call_check$y(this, TreeNode);
19002
+ _class_call_check$x(this, TreeNode);
19009
19003
  var _this;
19010
19004
  _this = _super.call(this);
19011
19005
  _this._tree = _tree;
@@ -19014,7 +19008,7 @@ var TreeNode = /*#__PURE__*/ function(BaseNode) {
19014
19008
  _this._parent = _parent;
19015
19009
  return _this;
19016
19010
  }
19017
- _create_class$l(TreeNode, [
19011
+ _create_class$k(TreeNode, [
19018
19012
  {
19019
19013
  key: "type",
19020
19014
  get: function get() {
@@ -19189,7 +19183,7 @@ function matchNodeContext(node, context) {
19189
19183
  return true;
19190
19184
  }
19191
19185
  var BufferContext = function BufferContext(parent, buffer, index, start) {
19192
- _class_call_check$y(this, BufferContext);
19186
+ _class_call_check$x(this, BufferContext);
19193
19187
  this.parent = parent;
19194
19188
  this.buffer = buffer;
19195
19189
  this.index = index;
@@ -19199,7 +19193,7 @@ var BufferNode = /*#__PURE__*/ function(BaseNode) {
19199
19193
  _inherits$k(BufferNode, BaseNode);
19200
19194
  var _super = _create_super$k(BufferNode);
19201
19195
  function BufferNode(context, _parent, index) {
19202
- _class_call_check$y(this, BufferNode);
19196
+ _class_call_check$x(this, BufferNode);
19203
19197
  var _this;
19204
19198
  _this = _super.call(this);
19205
19199
  _this.context = context;
@@ -19208,7 +19202,7 @@ var BufferNode = /*#__PURE__*/ function(BaseNode) {
19208
19202
  _this.type = context.buffer.set.types[context.buffer.buffer[index]];
19209
19203
  return _this;
19210
19204
  }
19211
- _create_class$l(BufferNode, [
19205
+ _create_class$k(BufferNode, [
19212
19206
  {
19213
19207
  key: "name",
19214
19208
  get: function get() {
@@ -19348,11 +19342,11 @@ function iterStack(heads) {
19348
19342
  }
19349
19343
  var StackIterator = /*#__PURE__*/ function() {
19350
19344
  function StackIterator(heads, node) {
19351
- _class_call_check$y(this, StackIterator);
19345
+ _class_call_check$x(this, StackIterator);
19352
19346
  this.heads = heads;
19353
19347
  this.node = node;
19354
19348
  }
19355
- _create_class$l(StackIterator, [
19349
+ _create_class$k(StackIterator, [
19356
19350
  {
19357
19351
  key: "next",
19358
19352
  get: function get() {
@@ -19392,7 +19386,7 @@ allows you to move to adjacent nodes.
19392
19386
  var /**
19393
19387
  @internal
19394
19388
  */ mode = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0;
19395
- _class_call_check$y(this, TreeCursor);
19389
+ _class_call_check$x(this, TreeCursor);
19396
19390
  this.mode = mode;
19397
19391
  /**
19398
19392
  @internal
@@ -19412,7 +19406,7 @@ allows you to move to adjacent nodes.
19412
19406
  this.yieldBuf(node.index);
19413
19407
  }
19414
19408
  }
19415
- _create_class$l(TreeCursor, [
19409
+ _create_class$k(TreeCursor, [
19416
19410
  {
19417
19411
  key: "name",
19418
19412
  get: /**
@@ -20032,9 +20026,9 @@ mkTree) {
20032
20026
  A superclass that parsers should extend.
20033
20027
  */ var Parser = /*#__PURE__*/ function() {
20034
20028
  function Parser() {
20035
- _class_call_check$y(this, Parser);
20029
+ _class_call_check$x(this, Parser);
20036
20030
  }
20037
- _create_class$l(Parser, [
20031
+ _create_class$k(Parser, [
20038
20032
  {
20039
20033
  /**
20040
20034
  Start a parse, returning a [partial parse](#common.PartialParse)
@@ -20075,10 +20069,10 @@ A superclass that parsers should extend.
20075
20069
  }();
20076
20070
  var StringInput = /*#__PURE__*/ function() {
20077
20071
  function StringInput(string) {
20078
- _class_call_check$y(this, StringInput);
20072
+ _class_call_check$x(this, StringInput);
20079
20073
  this.string = string;
20080
20074
  }
20081
- _create_class$l(StringInput, [
20075
+ _create_class$k(StringInput, [
20082
20076
  {
20083
20077
  key: "length",
20084
20078
  get: function get() {
@@ -20127,12 +20121,12 @@ function _assert_this_initialized$j(self) {
20127
20121
  }
20128
20122
  return self;
20129
20123
  }
20130
- function _class_call_check$x(instance, Constructor) {
20124
+ function _class_call_check$w(instance, Constructor) {
20131
20125
  if (!(instance instanceof Constructor)) {
20132
20126
  throw new TypeError("Cannot call a class as a function");
20133
20127
  }
20134
20128
  }
20135
- function _defineProperties$k(target, props) {
20129
+ function _defineProperties$j(target, props) {
20136
20130
  for(var i = 0; i < props.length; i++){
20137
20131
  var descriptor = props[i];
20138
20132
  descriptor.enumerable = descriptor.enumerable || false;
@@ -20141,9 +20135,9 @@ function _defineProperties$k(target, props) {
20141
20135
  Object.defineProperty(target, descriptor.key, descriptor);
20142
20136
  }
20143
20137
  }
20144
- function _create_class$k(Constructor, protoProps, staticProps) {
20145
- if (protoProps) _defineProperties$k(Constructor.prototype, protoProps);
20146
- if (staticProps) _defineProperties$k(Constructor, staticProps);
20138
+ function _create_class$j(Constructor, protoProps, staticProps) {
20139
+ if (protoProps) _defineProperties$j(Constructor.prototype, protoProps);
20140
+ if (staticProps) _defineProperties$j(Constructor, staticProps);
20147
20141
  return Constructor;
20148
20142
  }
20149
20143
  function _get_prototype_of$j(o) {
@@ -20309,7 +20303,7 @@ about the parse state.
20309
20303
  /**
20310
20304
  @internal
20311
20305
  */ parent = arguments.length > 10 ? arguments[10] : void 0;
20312
- _class_call_check$x(this, Stack);
20306
+ _class_call_check$w(this, Stack);
20313
20307
  this.p = p;
20314
20308
  this.stack = stack;
20315
20309
  this.state = state;
@@ -20322,7 +20316,7 @@ about the parse state.
20322
20316
  this.lookAhead = lookAhead;
20323
20317
  this.parent = parent;
20324
20318
  }
20325
- _create_class$k(Stack, [
20319
+ _create_class$j(Stack, [
20326
20320
  {
20327
20321
  /**
20328
20322
  @internal
@@ -20788,7 +20782,7 @@ about the parse state.
20788
20782
  return Stack;
20789
20783
  }();
20790
20784
  var StackContext = function StackContext(tracker, context) {
20791
- _class_call_check$x(this, StackContext);
20785
+ _class_call_check$w(this, StackContext);
20792
20786
  this.tracker = tracker;
20793
20787
  this.context = context;
20794
20788
  this.hash = tracker.strict ? tracker.hash(context) : 0;
@@ -20797,13 +20791,13 @@ var StackContext = function StackContext(tracker, context) {
20797
20791
  // an entire stack
20798
20792
  var SimulatedStack = /*#__PURE__*/ function() {
20799
20793
  function SimulatedStack(start) {
20800
- _class_call_check$x(this, SimulatedStack);
20794
+ _class_call_check$w(this, SimulatedStack);
20801
20795
  this.start = start;
20802
20796
  this.state = start.state;
20803
20797
  this.stack = start.stack;
20804
20798
  this.base = this.stack.length;
20805
20799
  }
20806
- _create_class$k(SimulatedStack, [
20800
+ _create_class$j(SimulatedStack, [
20807
20801
  {
20808
20802
  key: "reduce",
20809
20803
  value: function reduce(action) {
@@ -20826,14 +20820,14 @@ var SimulatedStack = /*#__PURE__*/ function() {
20826
20820
  // the parent-stack-walking necessary to read the nodes.
20827
20821
  var StackBufferCursor = /*#__PURE__*/ function() {
20828
20822
  function StackBufferCursor(stack, pos, index) {
20829
- _class_call_check$x(this, StackBufferCursor);
20823
+ _class_call_check$w(this, StackBufferCursor);
20830
20824
  this.stack = stack;
20831
20825
  this.pos = pos;
20832
20826
  this.index = index;
20833
20827
  this.buffer = stack.buffer;
20834
20828
  if (this.index == 0) this.maybeNext();
20835
20829
  }
20836
- _create_class$k(StackBufferCursor, [
20830
+ _create_class$j(StackBufferCursor, [
20837
20831
  {
20838
20832
  key: "maybeNext",
20839
20833
  value: function maybeNext() {
@@ -20925,7 +20919,7 @@ function decodeArray(input) {
20925
20919
  return array;
20926
20920
  }
20927
20921
  var CachedToken = function CachedToken() {
20928
- _class_call_check$x(this, CachedToken);
20922
+ _class_call_check$w(this, CachedToken);
20929
20923
  this.start = -1;
20930
20924
  this.value = -1;
20931
20925
  this.end = -1;
@@ -20946,7 +20940,7 @@ characters, tracking lookahead and hiding the complexity of
20946
20940
  */ input, /**
20947
20941
  @internal
20948
20942
  */ ranges) {
20949
- _class_call_check$x(this, InputStream);
20943
+ _class_call_check$w(this, InputStream);
20950
20944
  this.input = input;
20951
20945
  this.ranges = ranges;
20952
20946
  /**
@@ -20972,7 +20966,7 @@ characters, tracking lookahead and hiding the complexity of
20972
20966
  this.end = ranges[ranges.length - 1].to;
20973
20967
  this.readNext();
20974
20968
  }
20975
- _create_class$k(InputStream, [
20969
+ _create_class$j(InputStream, [
20976
20970
  {
20977
20971
  /**
20978
20972
  @internal
@@ -21213,11 +21207,11 @@ characters, tracking lookahead and hiding the complexity of
21213
21207
  @internal
21214
21208
  */ var TokenGroup = /*#__PURE__*/ function() {
21215
21209
  function TokenGroup(data, id) {
21216
- _class_call_check$x(this, TokenGroup);
21210
+ _class_call_check$w(this, TokenGroup);
21217
21211
  this.data = data;
21218
21212
  this.id = id;
21219
21213
  }
21220
- _create_class$k(TokenGroup, [
21214
+ _create_class$j(TokenGroup, [
21221
21215
  {
21222
21216
  key: "token",
21223
21217
  value: function token(input, stack) {
@@ -21237,7 +21231,7 @@ an instance of this class.
21237
21231
  @internal
21238
21232
  */ token) {
21239
21233
  var options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
21240
- _class_call_check$x(this, ExternalTokenizer);
21234
+ _class_call_check$w(this, ExternalTokenizer);
21241
21235
  this.token = token;
21242
21236
  this.contextual = !!options.contextual;
21243
21237
  this.fallback = !!options.fallback;
@@ -21324,7 +21318,7 @@ function cutAt(tree, pos, side) {
21324
21318
  }
21325
21319
  var FragmentCursor = /*#__PURE__*/ function() {
21326
21320
  function FragmentCursor(fragments, nodeSet) {
21327
- _class_call_check$x(this, FragmentCursor);
21321
+ _class_call_check$w(this, FragmentCursor);
21328
21322
  this.fragments = fragments;
21329
21323
  this.nodeSet = nodeSet;
21330
21324
  this.i = 0;
@@ -21336,7 +21330,7 @@ var FragmentCursor = /*#__PURE__*/ function() {
21336
21330
  this.index = [];
21337
21331
  this.nextFragment();
21338
21332
  }
21339
- _create_class$k(FragmentCursor, [
21333
+ _create_class$j(FragmentCursor, [
21340
21334
  {
21341
21335
  key: "nextFragment",
21342
21336
  value: function nextFragment() {
@@ -21411,7 +21405,7 @@ var FragmentCursor = /*#__PURE__*/ function() {
21411
21405
  }();
21412
21406
  var TokenCache = /*#__PURE__*/ function() {
21413
21407
  function TokenCache(parser, stream) {
21414
- _class_call_check$x(this, TokenCache);
21408
+ _class_call_check$w(this, TokenCache);
21415
21409
  this.stream = stream;
21416
21410
  this.tokens = [];
21417
21411
  this.mainToken = null;
@@ -21420,7 +21414,7 @@ var TokenCache = /*#__PURE__*/ function() {
21420
21414
  return new CachedToken;
21421
21415
  });
21422
21416
  }
21423
- _create_class$k(TokenCache, [
21417
+ _create_class$j(TokenCache, [
21424
21418
  {
21425
21419
  key: "getActions",
21426
21420
  value: function getActions(stack) {
@@ -21530,7 +21524,7 @@ var TokenCache = /*#__PURE__*/ function() {
21530
21524
  }();
21531
21525
  var Parse = /*#__PURE__*/ function() {
21532
21526
  function Parse(parser, input, fragments, ranges) {
21533
- _class_call_check$x(this, Parse);
21527
+ _class_call_check$w(this, Parse);
21534
21528
  this.parser = parser;
21535
21529
  this.input = input;
21536
21530
  this.ranges = ranges;
@@ -21551,7 +21545,7 @@ var Parse = /*#__PURE__*/ function() {
21551
21545
  ];
21552
21546
  this.fragments = fragments.length && this.stream.end - from > parser.bufferLength * 4 ? new FragmentCursor(fragments, parser.nodeSet) : null;
21553
21547
  }
21554
- _create_class$k(Parse, [
21548
+ _create_class$j(Parse, [
21555
21549
  {
21556
21550
  key: "parsedPos",
21557
21551
  get: function get() {
@@ -21831,12 +21825,12 @@ function pushStackDedup(stack, newStacks) {
21831
21825
  }
21832
21826
  var Dialect = /*#__PURE__*/ function() {
21833
21827
  function Dialect(source, flags, disabled) {
21834
- _class_call_check$x(this, Dialect);
21828
+ _class_call_check$w(this, Dialect);
21835
21829
  this.source = source;
21836
21830
  this.flags = flags;
21837
21831
  this.disabled = disabled;
21838
21832
  }
21839
- _create_class$k(Dialect, [
21833
+ _create_class$j(Dialect, [
21840
21834
  {
21841
21835
  key: "allows",
21842
21836
  value: function allows(term) {
@@ -21861,7 +21855,7 @@ on shift or reduce actions.
21861
21855
  The export used in a `@context` declaration should be of this
21862
21856
  type.
21863
21857
  */ var ContextTracker = function ContextTracker(spec) {
21864
- _class_call_check$x(this, ContextTracker);
21858
+ _class_call_check$w(this, ContextTracker);
21865
21859
  this.start = spec.start;
21866
21860
  this.shift = spec.shift || id;
21867
21861
  this.reduce = spec.reduce || id;
@@ -21880,7 +21874,7 @@ content with.
21880
21874
  var _super = _create_super$j(LRParser);
21881
21875
  function LRParser(spec) {
21882
21876
  var _this_nodeSet;
21883
- _class_call_check$x(this, LRParser);
21877
+ _class_call_check$w(this, LRParser);
21884
21878
  var _this;
21885
21879
  var setProp = function setProp(nodeID, prop, value) {
21886
21880
  nodeProps[nodeID].push([
@@ -21968,7 +21962,7 @@ content with.
21968
21962
  _this.top = _this.topRules[Object.keys(_this.topRules)[0]];
21969
21963
  return _this;
21970
21964
  }
21971
- _create_class$k(LRParser, [
21965
+ _create_class$j(LRParser, [
21972
21966
  {
21973
21967
  key: "createParse",
21974
21968
  value: function createParse(input, fragments, ranges) {
@@ -22280,12 +22274,12 @@ function getSpecializer(spec) {
22280
22274
  return spec.get;
22281
22275
  }
22282
22276
 
22283
- function _class_call_check$w(instance, Constructor) {
22277
+ function _class_call_check$v(instance, Constructor) {
22284
22278
  if (!(instance instanceof Constructor)) {
22285
22279
  throw new TypeError("Cannot call a class as a function");
22286
22280
  }
22287
22281
  }
22288
- function _defineProperties$j(target, props) {
22282
+ function _defineProperties$i(target, props) {
22289
22283
  for(var i = 0; i < props.length; i++){
22290
22284
  var descriptor = props[i];
22291
22285
  descriptor.enumerable = descriptor.enumerable || false;
@@ -22294,9 +22288,9 @@ function _defineProperties$j(target, props) {
22294
22288
  Object.defineProperty(target, descriptor.key, descriptor);
22295
22289
  }
22296
22290
  }
22297
- function _create_class$j(Constructor, protoProps, staticProps) {
22298
- if (protoProps) _defineProperties$j(Constructor.prototype, protoProps);
22299
- if (staticProps) _defineProperties$j(Constructor, staticProps);
22291
+ function _create_class$i(Constructor, protoProps, staticProps) {
22292
+ if (protoProps) _defineProperties$i(Constructor.prototype, protoProps);
22293
+ if (staticProps) _defineProperties$i(Constructor, staticProps);
22300
22294
  return Constructor;
22301
22295
  }
22302
22296
  var nextTagID = 0;
@@ -22328,7 +22322,7 @@ from standard tags to allow highlighters to fall back to those).
22328
22322
  */ base, /**
22329
22323
  The modifiers applied to this.base @internal
22330
22324
  */ modified) {
22331
- _class_call_check$w(this, Tag);
22325
+ _class_call_check$v(this, Tag);
22332
22326
  this.set = set;
22333
22327
  this.base = base;
22334
22328
  this.modified = modified;
@@ -22336,7 +22330,7 @@ from standard tags to allow highlighters to fall back to those).
22336
22330
  @internal
22337
22331
  */ this.id = nextTagID++;
22338
22332
  }
22339
- _create_class$j(Tag, null, [
22333
+ _create_class$i(Tag, null, [
22340
22334
  {
22341
22335
  key: "define",
22342
22336
  value: /**
@@ -22401,11 +22395,11 @@ from standard tags to allow highlighters to fall back to those).
22401
22395
  var nextModifierID = 0;
22402
22396
  var Modifier = /*#__PURE__*/ function() {
22403
22397
  function Modifier() {
22404
- _class_call_check$w(this, Modifier);
22398
+ _class_call_check$v(this, Modifier);
22405
22399
  this.instances = [];
22406
22400
  this.id = nextModifierID++;
22407
22401
  }
22408
- _create_class$j(Modifier, null, [
22402
+ _create_class$i(Modifier, null, [
22409
22403
  {
22410
22404
  key: "get",
22411
22405
  value: function get(base, mods) {
@@ -22605,13 +22599,13 @@ parser.withProps(
22605
22599
  var ruleNodeProp = new NodeProp();
22606
22600
  var Rule = /*#__PURE__*/ function() {
22607
22601
  function Rule(tags, mode, context, next) {
22608
- _class_call_check$w(this, Rule);
22602
+ _class_call_check$v(this, Rule);
22609
22603
  this.tags = tags;
22610
22604
  this.mode = mode;
22611
22605
  this.context = context;
22612
22606
  this.next = next;
22613
22607
  }
22614
- _create_class$j(Rule, [
22608
+ _create_class$i(Rule, [
22615
22609
  {
22616
22610
  key: "opaque",
22617
22611
  get: function get() {
@@ -23231,12 +23225,12 @@ function _array_with_holes$5(arr) {
23231
23225
  function _array_without_holes$6(arr) {
23232
23226
  if (Array.isArray(arr)) return _array_like_to_array$a(arr);
23233
23227
  }
23234
- function _class_call_check$v(instance, Constructor) {
23228
+ function _class_call_check$u(instance, Constructor) {
23235
23229
  if (!(instance instanceof Constructor)) {
23236
23230
  throw new TypeError("Cannot call a class as a function");
23237
23231
  }
23238
23232
  }
23239
- function _defineProperties$i(target, props) {
23233
+ function _defineProperties$h(target, props) {
23240
23234
  for(var i = 0; i < props.length; i++){
23241
23235
  var descriptor = props[i];
23242
23236
  descriptor.enumerable = descriptor.enumerable || false;
@@ -23245,12 +23239,12 @@ function _defineProperties$i(target, props) {
23245
23239
  Object.defineProperty(target, descriptor.key, descriptor);
23246
23240
  }
23247
23241
  }
23248
- function _create_class$i(Constructor, protoProps, staticProps) {
23249
- if (protoProps) _defineProperties$i(Constructor.prototype, protoProps);
23250
- if (staticProps) _defineProperties$i(Constructor, staticProps);
23242
+ function _create_class$h(Constructor, protoProps, staticProps) {
23243
+ if (protoProps) _defineProperties$h(Constructor.prototype, protoProps);
23244
+ if (staticProps) _defineProperties$h(Constructor, staticProps);
23251
23245
  return Constructor;
23252
23246
  }
23253
- function _define_property$w(obj, key, value) {
23247
+ function _define_property$v(obj, key, value) {
23254
23248
  if (key in obj) {
23255
23249
  Object.defineProperty(obj, key, {
23256
23250
  value: value,
@@ -23313,7 +23307,7 @@ function _object_spread$j(target) {
23313
23307
  }));
23314
23308
  }
23315
23309
  ownKeys.forEach(function(key) {
23316
- _define_property$w(target, key, source[key]);
23310
+ _define_property$v(target, key, source[key]);
23317
23311
  });
23318
23312
  }
23319
23313
  return target;
@@ -23530,14 +23524,14 @@ function indent(str, spaces) {
23530
23524
  var match = parseIdentifier(input, i1, namePart) || namePart && parseAdditionalSymbol(input, i1) || maybeSpace && parseSpaces(input, i1);
23531
23525
  // match is required
23532
23526
  if (!match) {
23533
- return nextMatch = nextMatch1, tokens = tokens1, i = i1, {
23527
+ return tokens = tokens1, i = i1, nextMatch = nextMatch1, {
23534
23528
  v: nextMatch1
23535
23529
  };
23536
23530
  }
23537
23531
  var token = match.token, offset = match.offset;
23538
23532
  i1 += offset;
23539
23533
  if (token === " ") {
23540
- return nextMatch = nextMatch1, tokens = tokens1, i = i1, "continue";
23534
+ return tokens = tokens1, i = i1, nextMatch = nextMatch1, "continue";
23541
23535
  }
23542
23536
  tokens1 = _to_consumable_array$6(tokens1).concat([
23543
23537
  token
@@ -23556,7 +23550,7 @@ function indent(str, spaces) {
23556
23550
  if (contextKeys.some(function(el) {
23557
23551
  return el.startsWith(name);
23558
23552
  })) {
23559
- return nextMatch = nextMatch1, tokens = tokens1, i = i1, "continue";
23553
+ return tokens = tokens1, i = i1, nextMatch = nextMatch1, "continue";
23560
23554
  }
23561
23555
  if (dateTimeIdentifiers.some(function(el) {
23562
23556
  return el === name;
@@ -23575,9 +23569,9 @@ function indent(str, spaces) {
23575
23569
  if (dateTimeIdentifiers.some(function(el) {
23576
23570
  return el.startsWith(name);
23577
23571
  })) {
23578
- return nextMatch = nextMatch1, tokens = tokens1, i = i1, "continue";
23572
+ return tokens = tokens1, i = i1, nextMatch = nextMatch1, "continue";
23579
23573
  }
23580
- return nextMatch = nextMatch1, tokens = tokens1, i = i1, {
23574
+ return tokens = tokens1, i = i1, nextMatch = nextMatch1, {
23581
23575
  v: nextMatch1
23582
23576
  };
23583
23577
  };
@@ -23589,7 +23583,7 @@ function indent(str, spaces) {
23589
23583
  }
23590
23584
  }
23591
23585
  var _obj;
23592
- var identifiersMap = (_obj = {}, _define_property$w(_obj, identifier, "identifier"), _define_property$w(_obj, nameIdentifier, "nameIdentifier"), _obj);
23586
+ var identifiersMap = (_obj = {}, _define_property$v(_obj, identifier, "identifier"), _define_property$v(_obj, nameIdentifier, "nameIdentifier"), _obj);
23593
23587
  var identifiers = new ExternalTokenizer(function(input, stack) {
23594
23588
  LOG_PARSE_DEBUG && console.log("%s: T <identifier | nameIdentifier>", input.pos);
23595
23589
  var nameMatch = parseName(input, stack.context);
@@ -23638,17 +23632,17 @@ var insertSemicolon = new ExternalTokenizer(function(input, stack) {
23638
23632
  }
23639
23633
  });
23640
23634
  var _obj1;
23641
- var prefixedContextStarts = (_obj1 = {}, _define_property$w(_obj1, functionInvocationStart, "FunctionInvocation"), _define_property$w(_obj1, filterExpressionStart, "FilterExpression"), _define_property$w(_obj1, pathExpressionStart, "PathExpression"), _obj1);
23635
+ var prefixedContextStarts = (_obj1 = {}, _define_property$v(_obj1, functionInvocationStart, "FunctionInvocation"), _define_property$v(_obj1, filterExpressionStart, "FilterExpression"), _define_property$v(_obj1, pathExpressionStart, "PathExpression"), _obj1);
23642
23636
  var _obj2;
23643
- var contextStarts = (_obj2 = {}, _define_property$w(_obj2, contextStart, "Context"), _define_property$w(_obj2, functionDefinitionStart, "FunctionDefinition"), _define_property$w(_obj2, forExpressionStart, "ForExpression"), _define_property$w(_obj2, listStart, "List"), _define_property$w(_obj2, ifExpressionStart, "IfExpression"), _define_property$w(_obj2, quantifiedExpressionStart, "QuantifiedExpression"), _obj2);
23637
+ var contextStarts = (_obj2 = {}, _define_property$v(_obj2, contextStart, "Context"), _define_property$v(_obj2, functionDefinitionStart, "FunctionDefinition"), _define_property$v(_obj2, forExpressionStart, "ForExpression"), _define_property$v(_obj2, listStart, "List"), _define_property$v(_obj2, ifExpressionStart, "IfExpression"), _define_property$v(_obj2, quantifiedExpressionStart, "QuantifiedExpression"), _obj2);
23644
23638
  var _obj3;
23645
- var contextEnds = (_obj3 = {}, _define_property$w(_obj3, Context, "Context"), _define_property$w(_obj3, FunctionDefinition, "FunctionDefinition"), _define_property$w(_obj3, ForExpression, "ForExpression"), _define_property$w(_obj3, List, "List"), _define_property$w(_obj3, IfExpression, "IfExpression"), _define_property$w(_obj3, QuantifiedExpression, "QuantifiedExpression"), _define_property$w(_obj3, PathExpression, "PathExpression"), _define_property$w(_obj3, FunctionInvocation, "FunctionInvocation"), _define_property$w(_obj3, FilterExpression, "FilterExpression"), _define_property$w(_obj3, ArithmeticExpression, "ArithmeticExpression"), _obj3);
23639
+ var contextEnds = (_obj3 = {}, _define_property$v(_obj3, Context, "Context"), _define_property$v(_obj3, FunctionDefinition, "FunctionDefinition"), _define_property$v(_obj3, ForExpression, "ForExpression"), _define_property$v(_obj3, List, "List"), _define_property$v(_obj3, IfExpression, "IfExpression"), _define_property$v(_obj3, QuantifiedExpression, "QuantifiedExpression"), _define_property$v(_obj3, PathExpression, "PathExpression"), _define_property$v(_obj3, FunctionInvocation, "FunctionInvocation"), _define_property$v(_obj3, FilterExpression, "FilterExpression"), _define_property$v(_obj3, ArithmeticExpression, "ArithmeticExpression"), _obj3);
23646
23640
  var ValueProducer = /*#__PURE__*/ function() {
23647
23641
  function ValueProducer(fn) {
23648
- _class_call_check$v(this, ValueProducer);
23642
+ _class_call_check$u(this, ValueProducer);
23649
23643
  this.fn = fn;
23650
23644
  }
23651
- _create_class$i(ValueProducer, [
23645
+ _create_class$h(ValueProducer, [
23652
23646
  {
23653
23647
  key: "get",
23654
23648
  value: function get(variables) {
@@ -23681,12 +23675,12 @@ var dateTimeIdentifiers = Object.keys(dateTimeLiterals);
23681
23675
  */ var VariableContext = /*#__PURE__*/ function() {
23682
23676
  function VariableContext() {
23683
23677
  var value = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
23684
- _class_call_check$v(this, VariableContext);
23678
+ _class_call_check$u(this, VariableContext);
23685
23679
  /**
23686
23680
  * @protected
23687
23681
  */ this.value = value;
23688
23682
  }
23689
- _create_class$i(VariableContext, [
23683
+ _create_class$h(VariableContext, [
23690
23684
  {
23691
23685
  /**
23692
23686
  * Return all defined keys of the context.
@@ -23727,7 +23721,7 @@ var dateTimeIdentifiers = Object.keys(dateTimeLiterals);
23727
23721
  */ key: "set",
23728
23722
  value: function set(key, value) {
23729
23723
  var constructor = /** @type { typeof VariableContext } */ this.constructor;
23730
- return constructor.of(_object_spread_props$9(_object_spread$j({}, this.value), _define_property$w({}, key, value)));
23724
+ return constructor.of(_object_spread_props$9(_object_spread$j({}, this.value), _define_property$v({}, key, value)));
23731
23725
  }
23732
23726
  }
23733
23727
  ], [
@@ -23776,7 +23770,7 @@ var dateTimeIdentifiers = Object.keys(dateTimeLiterals);
23776
23770
  var Variables = /*#__PURE__*/ function() {
23777
23771
  function Variables() {
23778
23772
  var _ref = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, _ref_name = _ref.name, name = _ref_name === void 0 ? "Expressions" : _ref_name, _ref_tokens = _ref.tokens, tokens = _ref_tokens === void 0 ? [] : _ref_tokens, _ref_children = _ref.children, children = _ref_children === void 0 ? [] : _ref_children, _ref_parent = _ref.parent, parent = _ref_parent === void 0 ? null : _ref_parent, _ref_context = _ref.context, context = _ref_context === void 0 ? null : _ref_context, _ref_value = _ref.value, value = _ref_value === void 0 ? null : _ref_value, _ref_raw = _ref.raw, raw = _ref_raw === void 0 ? null : _ref_raw;
23779
- _class_call_check$v(this, Variables);
23773
+ _class_call_check$u(this, Variables);
23780
23774
  this.name = name;
23781
23775
  this.tokens = tokens;
23782
23776
  this.children = children;
@@ -23785,7 +23779,7 @@ var Variables = /*#__PURE__*/ function() {
23785
23779
  this.value = value;
23786
23780
  this.raw = raw;
23787
23781
  }
23788
- _create_class$i(Variables, [
23782
+ _create_class$h(Variables, [
23789
23783
  {
23790
23784
  key: "enterScope",
23791
23785
  value: function enterScope(name) {
@@ -24411,7 +24405,7 @@ function _assert_this_initialized$i(self) {
24411
24405
  }
24412
24406
  return self;
24413
24407
  }
24414
- function _class_call_check$u(instance, Constructor) {
24408
+ function _class_call_check$t(instance, Constructor) {
24415
24409
  if (!(instance instanceof Constructor)) {
24416
24410
  throw new TypeError("Cannot call a class as a function");
24417
24411
  }
@@ -24433,7 +24427,7 @@ function _construct$2(Parent, args, Class) {
24433
24427
  }
24434
24428
  return _construct$2.apply(null, arguments);
24435
24429
  }
24436
- function _defineProperties$h(target, props) {
24430
+ function _defineProperties$g(target, props) {
24437
24431
  for(var i = 0; i < props.length; i++){
24438
24432
  var descriptor = props[i];
24439
24433
  descriptor.enumerable = descriptor.enumerable || false;
@@ -24442,12 +24436,12 @@ function _defineProperties$h(target, props) {
24442
24436
  Object.defineProperty(target, descriptor.key, descriptor);
24443
24437
  }
24444
24438
  }
24445
- function _create_class$h(Constructor, protoProps, staticProps) {
24446
- if (protoProps) _defineProperties$h(Constructor.prototype, protoProps);
24447
- if (staticProps) _defineProperties$h(Constructor, staticProps);
24439
+ function _create_class$g(Constructor, protoProps, staticProps) {
24440
+ if (protoProps) _defineProperties$g(Constructor.prototype, protoProps);
24441
+ if (staticProps) _defineProperties$g(Constructor, staticProps);
24448
24442
  return Constructor;
24449
24443
  }
24450
- function _define_property$v(obj, key, value) {
24444
+ function _define_property$u(obj, key, value) {
24451
24445
  if (key in obj) {
24452
24446
  Object.defineProperty(obj, key, {
24453
24447
  value: value,
@@ -24685,7 +24679,7 @@ function typeCast(obj, type) {
24685
24679
  return null;
24686
24680
  }
24687
24681
  var Range = function Range(props) {
24688
- _class_call_check$u(this, Range);
24682
+ _class_call_check$t(this, Range);
24689
24683
  Object.assign(this, props);
24690
24684
  };
24691
24685
  function isNumber(obj) {
@@ -24791,11 +24785,11 @@ function equals(a, b) {
24791
24785
  }
24792
24786
  var FunctionWrapper = /*#__PURE__*/ function() {
24793
24787
  function FunctionWrapper(fn, parameterNames) {
24794
- _class_call_check$u(this, FunctionWrapper);
24788
+ _class_call_check$t(this, FunctionWrapper);
24795
24789
  this.fn = fn;
24796
24790
  this.parameterNames = parameterNames;
24797
24791
  }
24798
- _create_class$h(FunctionWrapper, [
24792
+ _create_class$g(FunctionWrapper, [
24799
24793
  {
24800
24794
  key: "invoke",
24801
24795
  value: function invoke(contextOrArgs) {
@@ -25740,7 +25734,7 @@ var builtins = {
25740
25734
  if (key in context) {
25741
25735
  return FALSE;
25742
25736
  }
25743
- return Object.assign(Object.assign({}, context), _define_property$v({}, entry.key, entry.value));
25737
+ return Object.assign(Object.assign({}, context), _define_property$u({}, entry.key, entry.value));
25744
25738
  }, {});
25745
25739
  if (context === FALSE) {
25746
25740
  return null;
@@ -25793,7 +25787,7 @@ var builtins = {
25793
25787
  return null;
25794
25788
  }
25795
25789
  }
25796
- return Object.assign(Object.assign({}, context), _define_property$v({}, key, value));
25790
+ return Object.assign(Object.assign({}, context), _define_property$u({}, key, value));
25797
25791
  }
25798
25792
  function matches(a, b) {
25799
25793
  return a === b;
@@ -26129,7 +26123,7 @@ var SyntaxError$1 = /*#__PURE__*/ function(Error1) {
26129
26123
  _inherits$i(SyntaxError, Error1);
26130
26124
  var _super = _create_super$i(SyntaxError);
26131
26125
  function SyntaxError(message, details) {
26132
- _class_call_check$u(this, SyntaxError);
26126
+ _class_call_check$t(this, SyntaxError);
26133
26127
  var _this;
26134
26128
  _this = _super.call(this, message);
26135
26129
  Object.assign(_assert_this_initialized$i(_this), details);
@@ -26139,9 +26133,9 @@ var SyntaxError$1 = /*#__PURE__*/ function(Error1) {
26139
26133
  }(_wrap_native_super$2(Error));
26140
26134
  var Interpreter = /*#__PURE__*/ function() {
26141
26135
  function Interpreter() {
26142
- _class_call_check$u(this, Interpreter);
26136
+ _class_call_check$t(this, Interpreter);
26143
26137
  }
26144
- _create_class$h(Interpreter, [
26138
+ _create_class$g(Interpreter, [
26145
26139
  {
26146
26140
  key: "_buildExecutionTree",
26147
26141
  value: function _buildExecutionTree(tree, input) {
@@ -26481,7 +26475,7 @@ function evalNode(node, input, args) {
26481
26475
  return function(context) {
26482
26476
  return args.slice(1, -1).reduce(function(obj, arg) {
26483
26477
  var _arg = _sliced_to_array$4(arg(Object.assign(Object.assign({}, context), obj)), 2), key = _arg[0], value = _arg[1];
26484
- return Object.assign(Object.assign({}, obj), _define_property$v({}, key, value));
26478
+ return Object.assign(Object.assign({}, obj), _define_property$u({}, key, value));
26485
26479
  }, {});
26486
26480
  };
26487
26481
  case "FunctionBody":
@@ -26946,7 +26940,7 @@ function extractValue(context, prop, _target) {
26946
26940
  "range"
26947
26941
  ].includes(getType(target))) {
26948
26942
  return target.map(function(t) {
26949
- return _define_property$v({}, prop, t);
26943
+ return _define_property$u({}, prop, t);
26950
26944
  });
26951
26945
  }
26952
26946
  return null;
@@ -27552,12 +27546,12 @@ function _assert_this_initialized$h(self) {
27552
27546
  }
27553
27547
  return self;
27554
27548
  }
27555
- function _class_call_check$t(instance, Constructor) {
27549
+ function _class_call_check$s(instance, Constructor) {
27556
27550
  if (!(instance instanceof Constructor)) {
27557
27551
  throw new TypeError("Cannot call a class as a function");
27558
27552
  }
27559
27553
  }
27560
- function _defineProperties$g(target, props) {
27554
+ function _defineProperties$f(target, props) {
27561
27555
  for(var i = 0; i < props.length; i++){
27562
27556
  var descriptor = props[i];
27563
27557
  descriptor.enumerable = descriptor.enumerable || false;
@@ -27566,12 +27560,12 @@ function _defineProperties$g(target, props) {
27566
27560
  Object.defineProperty(target, descriptor.key, descriptor);
27567
27561
  }
27568
27562
  }
27569
- function _create_class$g(Constructor, protoProps, staticProps) {
27570
- if (protoProps) _defineProperties$g(Constructor.prototype, protoProps);
27571
- if (staticProps) _defineProperties$g(Constructor, staticProps);
27563
+ function _create_class$f(Constructor, protoProps, staticProps) {
27564
+ if (protoProps) _defineProperties$f(Constructor.prototype, protoProps);
27565
+ if (staticProps) _defineProperties$f(Constructor, staticProps);
27572
27566
  return Constructor;
27573
27567
  }
27574
- function _define_property$u(obj, key, value) {
27568
+ function _define_property$t(obj, key, value) {
27575
27569
  if (key in obj) {
27576
27570
  Object.defineProperty(obj, key, {
27577
27571
  value: value,
@@ -27653,11 +27647,11 @@ function _create_super$h(Derived) {
27653
27647
  }
27654
27648
  var TextDecodeTransformer = /*#__PURE__*/ function() {
27655
27649
  function TextDecodeTransformer() {
27656
- _class_call_check$t(this, TextDecodeTransformer);
27657
- _define_property$u(this, "decoder", void 0);
27650
+ _class_call_check$s(this, TextDecodeTransformer);
27651
+ _define_property$t(this, "decoder", void 0);
27658
27652
  this.decoder = new TextDecoder();
27659
27653
  }
27660
- _create_class$g(TextDecodeTransformer, [
27654
+ _create_class$f(TextDecodeTransformer, [
27661
27655
  {
27662
27656
  key: "transform",
27663
27657
  value: function transform(chunk, controller) {
@@ -27689,7 +27683,7 @@ var TextDecoderStreamPolyfill = /*#__PURE__*/ function(TransformStream) {
27689
27683
  _inherits$h(TextDecoderStreamPolyfill, TransformStream);
27690
27684
  var _super = _create_super$h(TextDecoderStreamPolyfill);
27691
27685
  function TextDecoderStreamPolyfill() {
27692
- _class_call_check$t(this, TextDecoderStreamPolyfill);
27686
+ _class_call_check$s(this, TextDecoderStreamPolyfill);
27693
27687
  return _super.call(this, new TextDecodeTransformer());
27694
27688
  }
27695
27689
  return TextDecoderStreamPolyfill;
@@ -27731,12 +27725,12 @@ function _async_to_generator$9(fn) {
27731
27725
  });
27732
27726
  };
27733
27727
  }
27734
- function _class_call_check$s(instance, Constructor) {
27728
+ function _class_call_check$r(instance, Constructor) {
27735
27729
  if (!(instance instanceof Constructor)) {
27736
27730
  throw new TypeError("Cannot call a class as a function");
27737
27731
  }
27738
27732
  }
27739
- function _defineProperties$f(target, props) {
27733
+ function _defineProperties$e(target, props) {
27740
27734
  for(var i = 0; i < props.length; i++){
27741
27735
  var descriptor = props[i];
27742
27736
  descriptor.enumerable = descriptor.enumerable || false;
@@ -27745,12 +27739,12 @@ function _defineProperties$f(target, props) {
27745
27739
  Object.defineProperty(target, descriptor.key, descriptor);
27746
27740
  }
27747
27741
  }
27748
- function _create_class$f(Constructor, protoProps, staticProps) {
27749
- if (protoProps) _defineProperties$f(Constructor.prototype, protoProps);
27750
- if (staticProps) _defineProperties$f(Constructor, staticProps);
27742
+ function _create_class$e(Constructor, protoProps, staticProps) {
27743
+ if (protoProps) _defineProperties$e(Constructor.prototype, protoProps);
27744
+ if (staticProps) _defineProperties$e(Constructor, staticProps);
27751
27745
  return Constructor;
27752
27746
  }
27753
- function _define_property$t(obj, key, value) {
27747
+ function _define_property$s(obj, key, value) {
27754
27748
  if (key in obj) {
27755
27749
  Object.defineProperty(obj, key, {
27756
27750
  value: value,
@@ -27920,9 +27914,9 @@ function _ts_generator$a(thisArg, body) {
27920
27914
  }
27921
27915
  var JSONTransformer = /*#__PURE__*/ function() {
27922
27916
  function JSONTransformer() {
27923
- _class_call_check$s(this, JSONTransformer);
27917
+ _class_call_check$r(this, JSONTransformer);
27924
27918
  }
27925
- _create_class$f(JSONTransformer, [
27919
+ _create_class$e(JSONTransformer, [
27926
27920
  {
27927
27921
  key: "transform",
27928
27922
  value: function transform(obj, controller) {
@@ -27955,22 +27949,22 @@ var JSONStringifyStream = /*#__PURE__*/ function(TransformStream) {
27955
27949
  _inherits$g(JSONStringifyStream, TransformStream);
27956
27950
  var _super = _create_super$g(JSONStringifyStream);
27957
27951
  function JSONStringifyStream() {
27958
- _class_call_check$s(this, JSONStringifyStream);
27952
+ _class_call_check$r(this, JSONStringifyStream);
27959
27953
  return _super.call(this, new JSONTransformer());
27960
27954
  }
27961
27955
  return JSONStringifyStream;
27962
27956
  }(web.TransformStream);
27963
27957
  var TypeTransformer = /*#__PURE__*/ function() {
27964
27958
  function TypeTransformer(transformFn, doneCallback) {
27965
- _class_call_check$s(this, TypeTransformer);
27966
- _define_property$t(this, "buffer", void 0);
27967
- _define_property$t(this, "doneCallback", void 0);
27968
- _define_property$t(this, "transformFn", void 0);
27959
+ _class_call_check$r(this, TypeTransformer);
27960
+ _define_property$s(this, "buffer", void 0);
27961
+ _define_property$s(this, "doneCallback", void 0);
27962
+ _define_property$s(this, "transformFn", void 0);
27969
27963
  this.transformFn = transformFn;
27970
27964
  this.doneCallback = doneCallback;
27971
27965
  this.buffer = doneCallback ? [] : undefined;
27972
27966
  }
27973
- _create_class$f(TypeTransformer, [
27967
+ _create_class$e(TypeTransformer, [
27974
27968
  {
27975
27969
  key: "transform",
27976
27970
  value: function transform(obj, controller) {
@@ -28022,7 +28016,7 @@ var RespTransformStream = /*#__PURE__*/ function(TransformStream) {
28022
28016
  _inherits$g(RespTransformStream, TransformStream);
28023
28017
  var _super = _create_super$g(RespTransformStream);
28024
28018
  function RespTransformStream(transformFn, doneCallback) {
28025
- _class_call_check$s(this, RespTransformStream);
28019
+ _class_call_check$r(this, RespTransformStream);
28026
28020
  return _super.call(this, new TypeTransformer(transformFn, doneCallback));
28027
28021
  }
28028
28022
  return RespTransformStream;
@@ -28065,7 +28059,7 @@ function _async_to_generator$8(fn) {
28065
28059
  });
28066
28060
  };
28067
28061
  }
28068
- function _define_property$s(obj, key, value) {
28062
+ function _define_property$r(obj, key, value) {
28069
28063
  if (key in obj) {
28070
28064
  Object.defineProperty(obj, key, {
28071
28065
  value: value,
@@ -28088,7 +28082,7 @@ function _object_spread$i(target) {
28088
28082
  }));
28089
28083
  }
28090
28084
  ownKeys.forEach(function(key) {
28091
- _define_property$s(target, key, source[key]);
28085
+ _define_property$r(target, key, source[key]);
28092
28086
  });
28093
28087
  }
28094
28088
  return target;
@@ -28284,12 +28278,12 @@ var apiCall = function() {
28284
28278
  }();
28285
28279
 
28286
28280
  // eslint-disable-next-line @typescript-eslint/naming-convention
28287
- function _class_call_check$r(instance, Constructor) {
28281
+ function _class_call_check$q(instance, Constructor) {
28288
28282
  if (!(instance instanceof Constructor)) {
28289
28283
  throw new TypeError("Cannot call a class as a function");
28290
28284
  }
28291
28285
  }
28292
- function _defineProperties$e(target, props) {
28286
+ function _defineProperties$d(target, props) {
28293
28287
  for(var i = 0; i < props.length; i++){
28294
28288
  var descriptor = props[i];
28295
28289
  descriptor.enumerable = descriptor.enumerable || false;
@@ -28298,12 +28292,12 @@ function _defineProperties$e(target, props) {
28298
28292
  Object.defineProperty(target, descriptor.key, descriptor);
28299
28293
  }
28300
28294
  }
28301
- function _create_class$e(Constructor, protoProps, staticProps) {
28302
- if (protoProps) _defineProperties$e(Constructor.prototype, protoProps);
28303
- if (staticProps) _defineProperties$e(Constructor, staticProps);
28295
+ function _create_class$d(Constructor, protoProps, staticProps) {
28296
+ if (protoProps) _defineProperties$d(Constructor.prototype, protoProps);
28297
+ if (staticProps) _defineProperties$d(Constructor, staticProps);
28304
28298
  return Constructor;
28305
28299
  }
28306
- function _define_property$r(obj, key, value) {
28300
+ function _define_property$q(obj, key, value) {
28307
28301
  if (key in obj) {
28308
28302
  Object.defineProperty(obj, key, {
28309
28303
  value: value,
@@ -28318,16 +28312,16 @@ function _define_property$r(obj, key, value) {
28318
28312
  }
28319
28313
  var ColorLog = /*#__PURE__*/ function() {
28320
28314
  function ColorLog() {
28321
- _class_call_check$r(this, ColorLog);
28315
+ _class_call_check$q(this, ColorLog);
28322
28316
  // ANSI escape codes for different colors
28323
- _define_property$r(this, "ANSI_WHITE_BRIGHT", "\x1b[97m");
28324
- _define_property$r(this, "ANSI_GREEN_BRIGHT", "\x1b[92m");
28325
- _define_property$r(this, "ANSI_BLUE_BRIGHT", "\x1b[94m");
28326
- _define_property$r(this, "ANSI_YELLOW", "\x1b[93m");
28327
- _define_property$r(this, "ANSI_RED", "\x1b[91m");
28328
- _define_property$r(this, "ANSI_RESET", "\x1b[0m");
28317
+ _define_property$q(this, "ANSI_WHITE_BRIGHT", "\x1b[97m");
28318
+ _define_property$q(this, "ANSI_GREEN_BRIGHT", "\x1b[92m");
28319
+ _define_property$q(this, "ANSI_BLUE_BRIGHT", "\x1b[94m");
28320
+ _define_property$q(this, "ANSI_YELLOW", "\x1b[93m");
28321
+ _define_property$q(this, "ANSI_RED", "\x1b[91m");
28322
+ _define_property$q(this, "ANSI_RESET", "\x1b[0m");
28329
28323
  }
28330
- _create_class$e(ColorLog, [
28324
+ _create_class$d(ColorLog, [
28331
28325
  {
28332
28326
  // Method to wrap text with the specified ANSI color code
28333
28327
  key: "colorize",
@@ -28408,12 +28402,12 @@ function _async_to_generator$7(fn) {
28408
28402
  });
28409
28403
  };
28410
28404
  }
28411
- function _class_call_check$q(instance, Constructor) {
28405
+ function _class_call_check$p(instance, Constructor) {
28412
28406
  if (!(instance instanceof Constructor)) {
28413
28407
  throw new TypeError("Cannot call a class as a function");
28414
28408
  }
28415
28409
  }
28416
- function _defineProperties$d(target, props) {
28410
+ function _defineProperties$c(target, props) {
28417
28411
  for(var i = 0; i < props.length; i++){
28418
28412
  var descriptor = props[i];
28419
28413
  descriptor.enumerable = descriptor.enumerable || false;
@@ -28422,12 +28416,12 @@ function _defineProperties$d(target, props) {
28422
28416
  Object.defineProperty(target, descriptor.key, descriptor);
28423
28417
  }
28424
28418
  }
28425
- function _create_class$d(Constructor, protoProps, staticProps) {
28426
- if (protoProps) _defineProperties$d(Constructor.prototype, protoProps);
28427
- if (staticProps) _defineProperties$d(Constructor, staticProps);
28419
+ function _create_class$c(Constructor, protoProps, staticProps) {
28420
+ if (protoProps) _defineProperties$c(Constructor.prototype, protoProps);
28421
+ if (staticProps) _defineProperties$c(Constructor, staticProps);
28428
28422
  return Constructor;
28429
28423
  }
28430
- function _define_property$q(obj, key, value) {
28424
+ function _define_property$p(obj, key, value) {
28431
28425
  if (key in obj) {
28432
28426
  Object.defineProperty(obj, key, {
28433
28427
  value: value,
@@ -28477,7 +28471,7 @@ function _object_spread$h(target) {
28477
28471
  }));
28478
28472
  }
28479
28473
  ownKeys.forEach(function(key) {
28480
- _define_property$q(target, key, source[key]);
28474
+ _define_property$p(target, key, source[key]);
28481
28475
  });
28482
28476
  }
28483
28477
  return target;
@@ -28624,26 +28618,26 @@ var axBaseAIDefaultConfig = function() {
28624
28618
  var AxBaseAI = /*#__PURE__*/ function() {
28625
28619
  function AxBaseAI(param) {
28626
28620
  var name = param.name, apiURL = param.apiURL, headers = param.headers, modelInfo = param.modelInfo, models = param.models, _param_options = param.options, options = _param_options === void 0 ? {} : _param_options, supportFor = param.supportFor;
28627
- _class_call_check$q(this, AxBaseAI);
28628
- _define_property$q(this, "generateChatReq", void 0);
28629
- _define_property$q(this, "generateEmbedReq", void 0);
28630
- _define_property$q(this, "generateChatResp", void 0);
28631
- _define_property$q(this, "generateChatStreamResp", void 0);
28632
- _define_property$q(this, "generateEmbedResp", void 0);
28633
- _define_property$q(this, "debug", false);
28634
- _define_property$q(this, "rt", void 0);
28635
- _define_property$q(this, "fetch", void 0);
28636
- _define_property$q(this, "tracer", void 0);
28637
- _define_property$q(this, "modelMap", void 0);
28638
- _define_property$q(this, "embedModelMap", void 0);
28639
- _define_property$q(this, "modelUsage", void 0);
28640
- _define_property$q(this, "embedModelUsage", void 0);
28641
- _define_property$q(this, "apiURL", void 0);
28642
- _define_property$q(this, "name", void 0);
28643
- _define_property$q(this, "headers", void 0);
28644
- _define_property$q(this, "modelInfo", void 0);
28645
- _define_property$q(this, "embedModelInfo", void 0);
28646
- _define_property$q(this, "supportFor", void 0);
28621
+ _class_call_check$p(this, AxBaseAI);
28622
+ _define_property$p(this, "generateChatReq", void 0);
28623
+ _define_property$p(this, "generateEmbedReq", void 0);
28624
+ _define_property$p(this, "generateChatResp", void 0);
28625
+ _define_property$p(this, "generateChatStreamResp", void 0);
28626
+ _define_property$p(this, "generateEmbedResp", void 0);
28627
+ _define_property$p(this, "debug", false);
28628
+ _define_property$p(this, "rt", void 0);
28629
+ _define_property$p(this, "fetch", void 0);
28630
+ _define_property$p(this, "tracer", void 0);
28631
+ _define_property$p(this, "modelMap", void 0);
28632
+ _define_property$p(this, "embedModelMap", void 0);
28633
+ _define_property$p(this, "modelUsage", void 0);
28634
+ _define_property$p(this, "embedModelUsage", void 0);
28635
+ _define_property$p(this, "apiURL", void 0);
28636
+ _define_property$p(this, "name", void 0);
28637
+ _define_property$p(this, "headers", void 0);
28638
+ _define_property$p(this, "modelInfo", void 0);
28639
+ _define_property$p(this, "embedModelInfo", void 0);
28640
+ _define_property$p(this, "supportFor", void 0);
28647
28641
  this.name = name;
28648
28642
  this.apiURL = apiURL;
28649
28643
  this.headers = headers;
@@ -28679,7 +28673,7 @@ var AxBaseAI = /*#__PURE__*/ function() {
28679
28673
  }
28680
28674
  this.setOptions(options);
28681
28675
  }
28682
- _create_class$d(AxBaseAI, [
28676
+ _create_class$c(AxBaseAI, [
28683
28677
  {
28684
28678
  key: "setName",
28685
28679
  value: function setName(name) {
@@ -28779,7 +28773,7 @@ var AxBaseAI = /*#__PURE__*/ function() {
28779
28773
  4,
28780
28774
  (_this_tracer = _this.tracer) === null || _this_tracer === void 0 ? void 0 : _this_tracer.startActiveSpan("Chat Request", {
28781
28775
  kind: AxSpanKind.SERVER,
28782
- attributes: (_obj = {}, _define_property$q(_obj, axSpanAttributes.LLM_SYSTEM, _this.name), _define_property$q(_obj, axSpanAttributes.LLM_REQUEST_MODEL, _this.modelInfo.name), _define_property$q(_obj, axSpanAttributes.LLM_REQUEST_MAX_TOKENS, mc.maxTokens), _define_property$q(_obj, axSpanAttributes.LLM_REQUEST_TEMPERATURE, mc.temperature), _define_property$q(_obj, axSpanAttributes.LLM_REQUEST_TOP_P, mc.topP), _define_property$q(_obj, axSpanAttributes.LLM_REQUEST_TOP_K, mc.topK), _define_property$q(_obj, axSpanAttributes.LLM_REQUEST_FREQUENCY_PENALTY, mc.frequencyPenalty), _define_property$q(_obj, axSpanAttributes.LLM_REQUEST_PRESENCE_PENALTY, mc.presencePenalty), _define_property$q(_obj, axSpanAttributes.LLM_REQUEST_STOP_SEQUENCES, (_mc_stopSequences = mc.stopSequences) === null || _mc_stopSequences === void 0 ? void 0 : _mc_stopSequences.join(", ")), _define_property$q(_obj, axSpanAttributes.LLM_REQUEST_LLM_IS_STREAMING, mc.stream), _obj)
28776
+ attributes: (_obj = {}, _define_property$p(_obj, axSpanAttributes.LLM_SYSTEM, _this.name), _define_property$p(_obj, axSpanAttributes.LLM_REQUEST_MODEL, _this.modelInfo.name), _define_property$p(_obj, axSpanAttributes.LLM_REQUEST_MAX_TOKENS, mc.maxTokens), _define_property$p(_obj, axSpanAttributes.LLM_REQUEST_TEMPERATURE, mc.temperature), _define_property$p(_obj, axSpanAttributes.LLM_REQUEST_TOP_P, mc.topP), _define_property$p(_obj, axSpanAttributes.LLM_REQUEST_TOP_K, mc.topK), _define_property$p(_obj, axSpanAttributes.LLM_REQUEST_FREQUENCY_PENALTY, mc.frequencyPenalty), _define_property$p(_obj, axSpanAttributes.LLM_REQUEST_PRESENCE_PENALTY, mc.presencePenalty), _define_property$p(_obj, axSpanAttributes.LLM_REQUEST_STOP_SEQUENCES, (_mc_stopSequences = mc.stopSequences) === null || _mc_stopSequences === void 0 ? void 0 : _mc_stopSequences.join(", ")), _define_property$p(_obj, axSpanAttributes.LLM_REQUEST_LLM_IS_STREAMING, mc.stream), _obj)
28783
28777
  }, function() {
28784
28778
  var _ref = _async_to_generator$7(function(span) {
28785
28779
  var res;
@@ -28991,7 +28985,7 @@ var AxBaseAI = /*#__PURE__*/ function() {
28991
28985
  4,
28992
28986
  (_this_tracer = _this.tracer) === null || _this_tracer === void 0 ? void 0 : _this_tracer.startActiveSpan("Embed Request", {
28993
28987
  kind: AxSpanKind.SERVER,
28994
- attributes: (_obj = {}, _define_property$q(_obj, axSpanAttributes.LLM_SYSTEM, _this.name), _define_property$q(_obj, axSpanAttributes.LLM_REQUEST_MODEL, _this.modelInfo.name), _obj)
28988
+ attributes: (_obj = {}, _define_property$p(_obj, axSpanAttributes.LLM_SYSTEM, _this.name), _define_property$p(_obj, axSpanAttributes.LLM_REQUEST_MODEL, _this.modelInfo.name), _obj)
28995
28989
  }, function() {
28996
28990
  var _ref = _async_to_generator$7(function(span) {
28997
28991
  var res;
@@ -29109,7 +29103,7 @@ var AxBaseAI = /*#__PURE__*/ function() {
29109
29103
  if (span === null || span === void 0 ? void 0 : span.isRecording()) {
29110
29104
  if (res.modelUsage) {
29111
29105
  _this.embedModelUsage = res.modelUsage;
29112
- span.setAttributes((_obj = {}, _define_property$q(_obj, axSpanAttributes.LLM_USAGE_COMPLETION_TOKENS, (_res_modelUsage_completionTokens = res.modelUsage.completionTokens) !== null && _res_modelUsage_completionTokens !== void 0 ? _res_modelUsage_completionTokens : 0), _define_property$q(_obj, axSpanAttributes.LLM_USAGE_PROMPT_TOKENS, res.modelUsage.promptTokens), _obj));
29106
+ span.setAttributes((_obj = {}, _define_property$p(_obj, axSpanAttributes.LLM_USAGE_COMPLETION_TOKENS, (_res_modelUsage_completionTokens = res.modelUsage.completionTokens) !== null && _res_modelUsage_completionTokens !== void 0 ? _res_modelUsage_completionTokens : 0), _define_property$p(_obj, axSpanAttributes.LLM_USAGE_PROMPT_TOKENS, res.modelUsage.promptTokens), _obj));
29113
29107
  }
29114
29108
  }
29115
29109
  span === null || span === void 0 ? void 0 : span.end();
@@ -29299,7 +29293,7 @@ var setResponseAttr = function(res, span) {
29299
29293
  if (res.modelUsage) {
29300
29294
  var _res_modelUsage_completionTokens;
29301
29295
  var _obj;
29302
- span.setAttributes((_obj = {}, _define_property$q(_obj, axSpanAttributes.LLM_USAGE_COMPLETION_TOKENS, (_res_modelUsage_completionTokens = res.modelUsage.completionTokens) !== null && _res_modelUsage_completionTokens !== void 0 ? _res_modelUsage_completionTokens : 0), _define_property$q(_obj, axSpanAttributes.LLM_USAGE_PROMPT_TOKENS, res.modelUsage.promptTokens), _obj));
29296
+ span.setAttributes((_obj = {}, _define_property$p(_obj, axSpanAttributes.LLM_USAGE_COMPLETION_TOKENS, (_res_modelUsage_completionTokens = res.modelUsage.completionTokens) !== null && _res_modelUsage_completionTokens !== void 0 ? _res_modelUsage_completionTokens : 0), _define_property$p(_obj, axSpanAttributes.LLM_USAGE_PROMPT_TOKENS, res.modelUsage.promptTokens), _obj));
29303
29297
  }
29304
29298
  };
29305
29299
 
@@ -29375,12 +29369,12 @@ function _assert_this_initialized$f(self) {
29375
29369
  }
29376
29370
  return self;
29377
29371
  }
29378
- function _class_call_check$p(instance, Constructor) {
29372
+ function _class_call_check$o(instance, Constructor) {
29379
29373
  if (!(instance instanceof Constructor)) {
29380
29374
  throw new TypeError("Cannot call a class as a function");
29381
29375
  }
29382
29376
  }
29383
- function _defineProperties$c(target, props) {
29377
+ function _defineProperties$b(target, props) {
29384
29378
  for(var i = 0; i < props.length; i++){
29385
29379
  var descriptor = props[i];
29386
29380
  descriptor.enumerable = descriptor.enumerable || false;
@@ -29389,12 +29383,12 @@ function _defineProperties$c(target, props) {
29389
29383
  Object.defineProperty(target, descriptor.key, descriptor);
29390
29384
  }
29391
29385
  }
29392
- function _create_class$c(Constructor, protoProps, staticProps) {
29393
- if (protoProps) _defineProperties$c(Constructor.prototype, protoProps);
29394
- if (staticProps) _defineProperties$c(Constructor, staticProps);
29386
+ function _create_class$b(Constructor, protoProps, staticProps) {
29387
+ if (protoProps) _defineProperties$b(Constructor.prototype, protoProps);
29388
+ if (staticProps) _defineProperties$b(Constructor, staticProps);
29395
29389
  return Constructor;
29396
29390
  }
29397
- function _define_property$p(obj, key, value) {
29391
+ function _define_property$o(obj, key, value) {
29398
29392
  if (key in obj) {
29399
29393
  Object.defineProperty(obj, key, {
29400
29394
  value: value,
@@ -29436,7 +29430,7 @@ function _object_spread$g(target) {
29436
29430
  }));
29437
29431
  }
29438
29432
  ownKeys.forEach(function(key) {
29439
- _define_property$p(target, key, source[key]);
29433
+ _define_property$o(target, key, source[key]);
29440
29434
  });
29441
29435
  }
29442
29436
  return target;
@@ -29493,7 +29487,7 @@ var AxAIOpenAI = /*#__PURE__*/ function(AxBaseAI) {
29493
29487
  var _super = _create_super$f(AxAIOpenAI);
29494
29488
  function AxAIOpenAI(param) {
29495
29489
  var apiKey = param.apiKey, config = param.config, options = param.options, apiURL = param.apiURL, _param_modelInfo = param.modelInfo, modelInfo = _param_modelInfo === void 0 ? axModelInfoOpenAI : _param_modelInfo;
29496
- _class_call_check$p(this, AxAIOpenAI);
29490
+ _class_call_check$o(this, AxAIOpenAI);
29497
29491
  var _this;
29498
29492
  if (!apiKey || apiKey === "") {
29499
29493
  throw new Error("OpenAI API key not set");
@@ -29516,9 +29510,9 @@ var AxAIOpenAI = /*#__PURE__*/ function(AxBaseAI) {
29516
29510
  streaming: true
29517
29511
  }
29518
29512
  });
29519
- _define_property$p(_assert_this_initialized$f(_this), "config", void 0);
29520
- _define_property$p(_assert_this_initialized$f(_this), "streamingUsage", void 0);
29521
- _define_property$p(_assert_this_initialized$f(_this), "generateChatReq", function(req, // eslint-disable-next-line @typescript-eslint/no-unused-vars
29513
+ _define_property$o(_assert_this_initialized$f(_this), "config", void 0);
29514
+ _define_property$o(_assert_this_initialized$f(_this), "streamingUsage", void 0);
29515
+ _define_property$o(_assert_this_initialized$f(_this), "generateChatReq", function(req, // eslint-disable-next-line @typescript-eslint/no-unused-vars
29522
29516
  _config) {
29523
29517
  var _req_functions, _req_modelConfig, _req_modelConfig1, _this_config, _this_config1, _req_modelConfig2, _req_modelConfig3, _req_modelConfig4, _req_modelConfig5, _req_modelConfig6, _req_modelConfig7;
29524
29518
  var model = _this.config.model;
@@ -29573,7 +29567,7 @@ var AxAIOpenAI = /*#__PURE__*/ function(AxBaseAI) {
29573
29567
  reqValue
29574
29568
  ];
29575
29569
  });
29576
- _define_property$p(_assert_this_initialized$f(_this), "generateEmbedReq", function(req) {
29570
+ _define_property$o(_assert_this_initialized$f(_this), "generateEmbedReq", function(req) {
29577
29571
  var model = _this.config.embedModel;
29578
29572
  if (!model) {
29579
29573
  throw new Error("Embed model not set");
@@ -29593,7 +29587,7 @@ var AxAIOpenAI = /*#__PURE__*/ function(AxBaseAI) {
29593
29587
  reqValue
29594
29588
  ];
29595
29589
  });
29596
- _define_property$p(_assert_this_initialized$f(_this), "generateChatResp", function(resp) {
29590
+ _define_property$o(_assert_this_initialized$f(_this), "generateChatResp", function(resp) {
29597
29591
  var id = resp.id, usage = resp.usage, choices = resp.choices, error = resp.error;
29598
29592
  if (error) {
29599
29593
  throw error;
@@ -29630,7 +29624,7 @@ var AxAIOpenAI = /*#__PURE__*/ function(AxBaseAI) {
29630
29624
  remoteId: id
29631
29625
  };
29632
29626
  });
29633
- _define_property$p(_assert_this_initialized$f(_this), "generateChatStreamResp", function(resp, state) {
29627
+ _define_property$o(_assert_this_initialized$f(_this), "generateChatStreamResp", function(resp, state) {
29634
29628
  var id = resp.id, usage = resp.usage, choices = resp.choices;
29635
29629
  var modelUsage = usage ? {
29636
29630
  promptTokens: usage.prompt_tokens,
@@ -29678,7 +29672,7 @@ var AxAIOpenAI = /*#__PURE__*/ function(AxBaseAI) {
29678
29672
  modelUsage: modelUsage
29679
29673
  };
29680
29674
  });
29681
- _define_property$p(_assert_this_initialized$f(_this), "generateEmbedResp", function(resp) {
29675
+ _define_property$o(_assert_this_initialized$f(_this), "generateEmbedResp", function(resp) {
29682
29676
  var data = resp.data, usage = resp.usage;
29683
29677
  var modelUsage = usage ? {
29684
29678
  promptTokens: usage.prompt_tokens,
@@ -29697,7 +29691,7 @@ var AxAIOpenAI = /*#__PURE__*/ function(AxBaseAI) {
29697
29691
  _this.streamingUsage = (_options_streamingUsage = options === null || options === void 0 ? void 0 : options.streamingUsage) !== null && _options_streamingUsage !== void 0 ? _options_streamingUsage : true;
29698
29692
  return _this;
29699
29693
  }
29700
- _create_class$c(AxAIOpenAI, [
29694
+ _create_class$b(AxAIOpenAI, [
29701
29695
  {
29702
29696
  key: "getModelConfig",
29703
29697
  value: function getModelConfig() {
@@ -29807,12 +29801,12 @@ function _assert_this_initialized$e(self) {
29807
29801
  }
29808
29802
  return self;
29809
29803
  }
29810
- function _class_call_check$o(instance, Constructor) {
29804
+ function _class_call_check$n(instance, Constructor) {
29811
29805
  if (!(instance instanceof Constructor)) {
29812
29806
  throw new TypeError("Cannot call a class as a function");
29813
29807
  }
29814
29808
  }
29815
- function _define_property$o(obj, key, value) {
29809
+ function _define_property$n(obj, key, value) {
29816
29810
  if (key in obj) {
29817
29811
  Object.defineProperty(obj, key, {
29818
29812
  value: value,
@@ -29870,7 +29864,7 @@ function _object_spread$f(target) {
29870
29864
  }));
29871
29865
  }
29872
29866
  ownKeys.forEach(function(key) {
29873
- _define_property$o(target, key, source[key]);
29867
+ _define_property$n(target, key, source[key]);
29874
29868
  });
29875
29869
  }
29876
29870
  return target;
@@ -29929,7 +29923,7 @@ var AxAIAzureOpenAI = /*#__PURE__*/ function(AxAIOpenAI) {
29929
29923
  var _super = _create_super$e(AxAIAzureOpenAI);
29930
29924
  function AxAIAzureOpenAI(param) {
29931
29925
  var apiKey = param.apiKey, resourceName = param.resourceName, deploymentName = param.deploymentName, _param_version = param.version, version = _param_version === void 0 ? "api-version=2024-02-15-preview" : _param_version, config = param.config, options = param.options;
29932
- _class_call_check$o(this, AxAIAzureOpenAI);
29926
+ _class_call_check$n(this, AxAIAzureOpenAI);
29933
29927
  if (!apiKey || apiKey === "") {
29934
29928
  throw new Error("Azure OpenAPI API key not set");
29935
29929
  }
@@ -29973,12 +29967,12 @@ function _assert_this_initialized$d(self) {
29973
29967
  }
29974
29968
  return self;
29975
29969
  }
29976
- function _class_call_check$n(instance, Constructor) {
29970
+ function _class_call_check$m(instance, Constructor) {
29977
29971
  if (!(instance instanceof Constructor)) {
29978
29972
  throw new TypeError("Cannot call a class as a function");
29979
29973
  }
29980
29974
  }
29981
- function _defineProperties$b(target, props) {
29975
+ function _defineProperties$a(target, props) {
29982
29976
  for(var i = 0; i < props.length; i++){
29983
29977
  var descriptor = props[i];
29984
29978
  descriptor.enumerable = descriptor.enumerable || false;
@@ -29987,12 +29981,12 @@ function _defineProperties$b(target, props) {
29987
29981
  Object.defineProperty(target, descriptor.key, descriptor);
29988
29982
  }
29989
29983
  }
29990
- function _create_class$b(Constructor, protoProps, staticProps) {
29991
- if (protoProps) _defineProperties$b(Constructor.prototype, protoProps);
29992
- if (staticProps) _defineProperties$b(Constructor, staticProps);
29984
+ function _create_class$a(Constructor, protoProps, staticProps) {
29985
+ if (protoProps) _defineProperties$a(Constructor.prototype, protoProps);
29986
+ if (staticProps) _defineProperties$a(Constructor, staticProps);
29993
29987
  return Constructor;
29994
29988
  }
29995
- function _define_property$n(obj, key, value) {
29989
+ function _define_property$m(obj, key, value) {
29996
29990
  if (key in obj) {
29997
29991
  Object.defineProperty(obj, key, {
29998
29992
  value: value,
@@ -30034,7 +30028,7 @@ function _object_spread$e(target) {
30034
30028
  }));
30035
30029
  }
30036
30030
  ownKeys.forEach(function(key) {
30037
- _define_property$n(target, key, source[key]);
30031
+ _define_property$m(target, key, source[key]);
30038
30032
  });
30039
30033
  }
30040
30034
  return target;
@@ -30090,7 +30084,7 @@ var AxAIHuggingFace = /*#__PURE__*/ function(AxBaseAI) {
30090
30084
  var _super = _create_super$d(AxAIHuggingFace);
30091
30085
  function AxAIHuggingFace(param) {
30092
30086
  var apiKey = param.apiKey, config = param.config, options = param.options;
30093
- _class_call_check$n(this, AxAIHuggingFace);
30087
+ _class_call_check$m(this, AxAIHuggingFace);
30094
30088
  var _this;
30095
30089
  if (!apiKey || apiKey === "") {
30096
30090
  throw new Error("HuggingFace API key not set");
@@ -30112,8 +30106,8 @@ var AxAIHuggingFace = /*#__PURE__*/ function(AxBaseAI) {
30112
30106
  streaming: false
30113
30107
  }
30114
30108
  });
30115
- _define_property$n(_assert_this_initialized$d(_this), "config", void 0);
30116
- _define_property$n(_assert_this_initialized$d(_this), "generateChatReq", function(req, // eslint-disable-next-line @typescript-eslint/no-unused-vars
30109
+ _define_property$m(_assert_this_initialized$d(_this), "config", void 0);
30110
+ _define_property$m(_assert_this_initialized$d(_this), "generateChatReq", function(req, // eslint-disable-next-line @typescript-eslint/no-unused-vars
30117
30111
  _config) {
30118
30112
  var _req_chatPrompt, _req_modelConfig, _req_modelConfig1, _req_modelConfig2, _req_modelConfig3, _req_modelConfig4;
30119
30113
  var model = _this.config.model;
@@ -30172,7 +30166,7 @@ var AxAIHuggingFace = /*#__PURE__*/ function(AxBaseAI) {
30172
30166
  reqValue
30173
30167
  ];
30174
30168
  });
30175
- _define_property$n(_assert_this_initialized$d(_this), "generateChatResp", function(resp) {
30169
+ _define_property$m(_assert_this_initialized$d(_this), "generateChatResp", function(resp) {
30176
30170
  return {
30177
30171
  results: [
30178
30172
  {
@@ -30184,7 +30178,7 @@ var AxAIHuggingFace = /*#__PURE__*/ function(AxBaseAI) {
30184
30178
  _this.config = _config;
30185
30179
  return _this;
30186
30180
  }
30187
- _create_class$b(AxAIHuggingFace, [
30181
+ _create_class$a(AxAIHuggingFace, [
30188
30182
  {
30189
30183
  key: "getModelConfig",
30190
30184
  value: function getModelConfig() {
@@ -30212,12 +30206,12 @@ function _assert_this_initialized$c(self) {
30212
30206
  }
30213
30207
  return self;
30214
30208
  }
30215
- function _class_call_check$m(instance, Constructor) {
30209
+ function _class_call_check$l(instance, Constructor) {
30216
30210
  if (!(instance instanceof Constructor)) {
30217
30211
  throw new TypeError("Cannot call a class as a function");
30218
30212
  }
30219
30213
  }
30220
- function _define_property$m(obj, key, value) {
30214
+ function _define_property$l(obj, key, value) {
30221
30215
  if (key in obj) {
30222
30216
  Object.defineProperty(obj, key, {
30223
30217
  value: value,
@@ -30275,7 +30269,7 @@ function _object_spread$d(target) {
30275
30269
  }));
30276
30270
  }
30277
30271
  ownKeys.forEach(function(key) {
30278
- _define_property$m(target, key, source[key]);
30272
+ _define_property$l(target, key, source[key]);
30279
30273
  });
30280
30274
  }
30281
30275
  return target;
@@ -30339,7 +30333,7 @@ var AxAITogether = /*#__PURE__*/ function(AxAIOpenAI) {
30339
30333
  var _super = _create_super$c(AxAITogether);
30340
30334
  function AxAITogether(param) {
30341
30335
  var apiKey = param.apiKey, config = param.config, options = param.options;
30342
- _class_call_check$m(this, AxAITogether);
30336
+ _class_call_check$l(this, AxAITogether);
30343
30337
  if (!apiKey || apiKey === "") {
30344
30338
  throw new Error("Together API key not set");
30345
30339
  }
@@ -30444,12 +30438,12 @@ function _assert_this_initialized$b(self) {
30444
30438
  }
30445
30439
  return self;
30446
30440
  }
30447
- function _class_call_check$l(instance, Constructor) {
30441
+ function _class_call_check$k(instance, Constructor) {
30448
30442
  if (!(instance instanceof Constructor)) {
30449
30443
  throw new TypeError("Cannot call a class as a function");
30450
30444
  }
30451
30445
  }
30452
- function _defineProperties$a(target, props) {
30446
+ function _defineProperties$9(target, props) {
30453
30447
  for(var i = 0; i < props.length; i++){
30454
30448
  var descriptor = props[i];
30455
30449
  descriptor.enumerable = descriptor.enumerable || false;
@@ -30458,12 +30452,12 @@ function _defineProperties$a(target, props) {
30458
30452
  Object.defineProperty(target, descriptor.key, descriptor);
30459
30453
  }
30460
30454
  }
30461
- function _create_class$a(Constructor, protoProps, staticProps) {
30462
- if (protoProps) _defineProperties$a(Constructor.prototype, protoProps);
30463
- if (staticProps) _defineProperties$a(Constructor, staticProps);
30455
+ function _create_class$9(Constructor, protoProps, staticProps) {
30456
+ if (protoProps) _defineProperties$9(Constructor.prototype, protoProps);
30457
+ if (staticProps) _defineProperties$9(Constructor, staticProps);
30464
30458
  return Constructor;
30465
30459
  }
30466
- function _define_property$l(obj, key, value) {
30460
+ function _define_property$k(obj, key, value) {
30467
30461
  if (key in obj) {
30468
30462
  Object.defineProperty(obj, key, {
30469
30463
  value: value,
@@ -30532,7 +30526,7 @@ function _object_spread$c(target) {
30532
30526
  }));
30533
30527
  }
30534
30528
  ownKeys.forEach(function(key) {
30535
- _define_property$l(target, key, source[key]);
30529
+ _define_property$k(target, key, source[key]);
30536
30530
  });
30537
30531
  }
30538
30532
  return target;
@@ -30624,7 +30618,7 @@ var AxAICohere = /*#__PURE__*/ function(AxBaseAI) {
30624
30618
  var _super = _create_super$b(AxAICohere);
30625
30619
  function AxAICohere(param) {
30626
30620
  var apiKey = param.apiKey, config = param.config, options = param.options;
30627
- _class_call_check$l(this, AxAICohere);
30621
+ _class_call_check$k(this, AxAICohere);
30628
30622
  var _this;
30629
30623
  if (!apiKey || apiKey === "") {
30630
30624
  throw new Error("Cohere API key not set");
@@ -30646,8 +30640,8 @@ var AxAICohere = /*#__PURE__*/ function(AxBaseAI) {
30646
30640
  },
30647
30641
  options: options
30648
30642
  });
30649
- _define_property$l(_assert_this_initialized$b(_this), "config", void 0);
30650
- _define_property$l(_assert_this_initialized$b(_this), "generateChatReq", function(req, // eslint-disable-next-line @typescript-eslint/no-unused-vars
30643
+ _define_property$k(_assert_this_initialized$b(_this), "config", void 0);
30644
+ _define_property$k(_assert_this_initialized$b(_this), "generateChatReq", function(req, // eslint-disable-next-line @typescript-eslint/no-unused-vars
30651
30645
  _config) {
30652
30646
  var _req_functions, _req_modelConfig, _req_modelConfig1, _req_modelConfig2, _req_modelConfig3, _req_modelConfig4, _req_modelConfig5, _req_modelConfig6;
30653
30647
  var model = _this.config.model;
@@ -30744,7 +30738,7 @@ var AxAICohere = /*#__PURE__*/ function(AxBaseAI) {
30744
30738
  reqValue
30745
30739
  ];
30746
30740
  });
30747
- _define_property$l(_assert_this_initialized$b(_this), "generateEmbedReq", function(req) {
30741
+ _define_property$k(_assert_this_initialized$b(_this), "generateEmbedReq", function(req) {
30748
30742
  var model = _this.config.embedModel;
30749
30743
  if (!model) {
30750
30744
  throw new Error("Embed model not set");
@@ -30767,7 +30761,7 @@ var AxAICohere = /*#__PURE__*/ function(AxBaseAI) {
30767
30761
  reqValue
30768
30762
  ];
30769
30763
  });
30770
- _define_property$l(_assert_this_initialized$b(_this), "generateChatResp", function(resp) {
30764
+ _define_property$k(_assert_this_initialized$b(_this), "generateChatResp", function(resp) {
30771
30765
  var modelUsage = resp.meta.billed_units ? {
30772
30766
  promptTokens: resp.meta.billed_units.input_tokens,
30773
30767
  completionTokens: resp.meta.billed_units.output_tokens,
@@ -30819,7 +30813,7 @@ var AxAICohere = /*#__PURE__*/ function(AxBaseAI) {
30819
30813
  remoteId: resp.response_id
30820
30814
  };
30821
30815
  });
30822
- _define_property$l(_assert_this_initialized$b(_this), "generateChatStreamResp", function(resp, state) {
30816
+ _define_property$k(_assert_this_initialized$b(_this), "generateChatStreamResp", function(resp, state) {
30823
30817
  var ss = state;
30824
30818
  if (resp.event_type === "stream-start") {
30825
30819
  ss.generation_id = resp.generation_id;
@@ -30835,7 +30829,7 @@ var AxAICohere = /*#__PURE__*/ function(AxBaseAI) {
30835
30829
  results: results
30836
30830
  };
30837
30831
  });
30838
- _define_property$l(_assert_this_initialized$b(_this), "generateEmbedResp", function(resp) {
30832
+ _define_property$k(_assert_this_initialized$b(_this), "generateEmbedResp", function(resp) {
30839
30833
  return {
30840
30834
  remoteId: resp.id,
30841
30835
  embeddings: resp.embeddings
@@ -30844,7 +30838,7 @@ var AxAICohere = /*#__PURE__*/ function(AxBaseAI) {
30844
30838
  _this.config = _config;
30845
30839
  return _this;
30846
30840
  }
30847
- _create_class$a(AxAICohere, [
30841
+ _create_class$9(AxAICohere, [
30848
30842
  {
30849
30843
  key: "getModelConfig",
30850
30844
  value: function getModelConfig() {
@@ -31002,12 +30996,12 @@ function _assert_this_initialized$a(self) {
31002
30996
  }
31003
30997
  return self;
31004
30998
  }
31005
- function _class_call_check$k(instance, Constructor) {
30999
+ function _class_call_check$j(instance, Constructor) {
31006
31000
  if (!(instance instanceof Constructor)) {
31007
31001
  throw new TypeError("Cannot call a class as a function");
31008
31002
  }
31009
31003
  }
31010
- function _defineProperties$9(target, props) {
31004
+ function _defineProperties$8(target, props) {
31011
31005
  for(var i = 0; i < props.length; i++){
31012
31006
  var descriptor = props[i];
31013
31007
  descriptor.enumerable = descriptor.enumerable || false;
@@ -31016,12 +31010,12 @@ function _defineProperties$9(target, props) {
31016
31010
  Object.defineProperty(target, descriptor.key, descriptor);
31017
31011
  }
31018
31012
  }
31019
- function _create_class$9(Constructor, protoProps, staticProps) {
31020
- if (protoProps) _defineProperties$9(Constructor.prototype, protoProps);
31021
- if (staticProps) _defineProperties$9(Constructor, staticProps);
31013
+ function _create_class$8(Constructor, protoProps, staticProps) {
31014
+ if (protoProps) _defineProperties$8(Constructor.prototype, protoProps);
31015
+ if (staticProps) _defineProperties$8(Constructor, staticProps);
31022
31016
  return Constructor;
31023
31017
  }
31024
- function _define_property$k(obj, key, value) {
31018
+ function _define_property$j(obj, key, value) {
31025
31019
  if (key in obj) {
31026
31020
  Object.defineProperty(obj, key, {
31027
31021
  value: value,
@@ -31063,7 +31057,7 @@ function _object_spread$b(target) {
31063
31057
  }));
31064
31058
  }
31065
31059
  ownKeys.forEach(function(key) {
31066
- _define_property$k(target, key, source[key]);
31060
+ _define_property$j(target, key, source[key]);
31067
31061
  });
31068
31062
  }
31069
31063
  return target;
@@ -31145,7 +31139,7 @@ var safetySettings = [
31145
31139
  var _super = _create_super$a(AxAIGoogleGemini);
31146
31140
  function AxAIGoogleGemini(param) {
31147
31141
  var apiKey = param.apiKey, projectId = param.projectId, region = param.region, config = param.config, options = param.options;
31148
- _class_call_check$k(this, AxAIGoogleGemini);
31142
+ _class_call_check$j(this, AxAIGoogleGemini);
31149
31143
  var _this;
31150
31144
  if (!apiKey || apiKey === "") {
31151
31145
  throw new Error("GoogleGemini AI API key not set");
@@ -31170,10 +31164,10 @@ var safetySettings = [
31170
31164
  streaming: true
31171
31165
  }
31172
31166
  });
31173
- _define_property$k(_assert_this_initialized$a(_this), "options", void 0);
31174
- _define_property$k(_assert_this_initialized$a(_this), "config", void 0);
31175
- _define_property$k(_assert_this_initialized$a(_this), "apiKey", void 0);
31176
- _define_property$k(_assert_this_initialized$a(_this), "generateChatReq", function(req) {
31167
+ _define_property$j(_assert_this_initialized$a(_this), "options", void 0);
31168
+ _define_property$j(_assert_this_initialized$a(_this), "config", void 0);
31169
+ _define_property$j(_assert_this_initialized$a(_this), "apiKey", void 0);
31170
+ _define_property$j(_assert_this_initialized$a(_this), "generateChatReq", function(req) {
31177
31171
  var _req_modelConfig, _this_options, _req_modelConfig1, _req_modelConfig2, _req_modelConfig3, _req_modelConfig4, _req_modelConfig5;
31178
31172
  var model = _this.config.model;
31179
31173
  var _req_modelConfig_stream;
@@ -31354,7 +31348,7 @@ var safetySettings = [
31354
31348
  reqValue
31355
31349
  ];
31356
31350
  });
31357
- _define_property$k(_assert_this_initialized$a(_this), "generateEmbedReq", function(req) {
31351
+ _define_property$j(_assert_this_initialized$a(_this), "generateEmbedReq", function(req) {
31358
31352
  var model = _this.config.embedModel;
31359
31353
  if (!model) {
31360
31354
  throw new Error("Embed model not set");
@@ -31378,7 +31372,7 @@ var safetySettings = [
31378
31372
  reqValue
31379
31373
  ];
31380
31374
  });
31381
- _define_property$k(_assert_this_initialized$a(_this), "generateChatResp", function(resp) {
31375
+ _define_property$j(_assert_this_initialized$a(_this), "generateChatResp", function(resp) {
31382
31376
  var _resp_candidates;
31383
31377
  var results = (_resp_candidates = resp.candidates) === null || _resp_candidates === void 0 ? void 0 : _resp_candidates.map(function(candidate) {
31384
31378
  var result = {};
@@ -31444,10 +31438,10 @@ var safetySettings = [
31444
31438
  modelUsage: modelUsage
31445
31439
  };
31446
31440
  });
31447
- _define_property$k(_assert_this_initialized$a(_this), "generateChatStreamResp", function(resp) {
31441
+ _define_property$j(_assert_this_initialized$a(_this), "generateChatStreamResp", function(resp) {
31448
31442
  return _this.generateChatResp(resp);
31449
31443
  });
31450
- _define_property$k(_assert_this_initialized$a(_this), "generateEmbedResp", function(resp) {
31444
+ _define_property$j(_assert_this_initialized$a(_this), "generateEmbedResp", function(resp) {
31451
31445
  var embeddings = resp.embeddings.map(function(embedding) {
31452
31446
  return embedding.value;
31453
31447
  });
@@ -31460,7 +31454,7 @@ var safetySettings = [
31460
31454
  _this.apiKey = apiKey;
31461
31455
  return _this;
31462
31456
  }
31463
- _create_class$9(AxAIGoogleGemini, [
31457
+ _create_class$8(AxAIGoogleGemini, [
31464
31458
  {
31465
31459
  key: "getModelConfig",
31466
31460
  value: function getModelConfig() {
@@ -31541,12 +31535,12 @@ function _assert_this_initialized$9(self) {
31541
31535
  }
31542
31536
  return self;
31543
31537
  }
31544
- function _class_call_check$j(instance, Constructor) {
31538
+ function _class_call_check$i(instance, Constructor) {
31545
31539
  if (!(instance instanceof Constructor)) {
31546
31540
  throw new TypeError("Cannot call a class as a function");
31547
31541
  }
31548
31542
  }
31549
- function _defineProperties$8(target, props) {
31543
+ function _defineProperties$7(target, props) {
31550
31544
  for(var i = 0; i < props.length; i++){
31551
31545
  var descriptor = props[i];
31552
31546
  descriptor.enumerable = descriptor.enumerable || false;
@@ -31555,12 +31549,12 @@ function _defineProperties$8(target, props) {
31555
31549
  Object.defineProperty(target, descriptor.key, descriptor);
31556
31550
  }
31557
31551
  }
31558
- function _create_class$8(Constructor, protoProps, staticProps) {
31559
- if (protoProps) _defineProperties$8(Constructor.prototype, protoProps);
31560
- if (staticProps) _defineProperties$8(Constructor, staticProps);
31552
+ function _create_class$7(Constructor, protoProps, staticProps) {
31553
+ if (protoProps) _defineProperties$7(Constructor.prototype, protoProps);
31554
+ if (staticProps) _defineProperties$7(Constructor, staticProps);
31561
31555
  return Constructor;
31562
31556
  }
31563
- function _define_property$j(obj, key, value) {
31557
+ function _define_property$i(obj, key, value) {
31564
31558
  if (key in obj) {
31565
31559
  Object.defineProperty(obj, key, {
31566
31560
  value: value,
@@ -31629,7 +31623,7 @@ function _object_spread$a(target) {
31629
31623
  }));
31630
31624
  }
31631
31625
  ownKeys.forEach(function(key) {
31632
- _define_property$j(target, key, source[key]);
31626
+ _define_property$i(target, key, source[key]);
31633
31627
  });
31634
31628
  }
31635
31629
  return target;
@@ -31720,7 +31714,7 @@ var AxAIAnthropic = /*#__PURE__*/ function(AxBaseAI) {
31720
31714
  var _super = _create_super$9(AxAIAnthropic);
31721
31715
  function AxAIAnthropic(param) {
31722
31716
  var apiKey = param.apiKey, config = param.config, options = param.options;
31723
- _class_call_check$j(this, AxAIAnthropic);
31717
+ _class_call_check$i(this, AxAIAnthropic);
31724
31718
  var _this;
31725
31719
  if (!apiKey || apiKey === "") {
31726
31720
  throw new Error("Anthropic API key not set");
@@ -31743,8 +31737,8 @@ var AxAIAnthropic = /*#__PURE__*/ function(AxBaseAI) {
31743
31737
  streaming: true
31744
31738
  }
31745
31739
  });
31746
- _define_property$j(_assert_this_initialized$9(_this), "config", void 0);
31747
- _define_property$j(_assert_this_initialized$9(_this), "generateChatReq", function(req) {
31740
+ _define_property$i(_assert_this_initialized$9(_this), "config", void 0);
31741
+ _define_property$i(_assert_this_initialized$9(_this), "generateChatReq", function(req) {
31748
31742
  var _req_functions, _req_modelConfig, _req_modelConfig1, _req_modelConfig2, _req_modelConfig3, _req_modelConfig4, _req_modelConfig5;
31749
31743
  var model = _this.config.model;
31750
31744
  var apiConfig = {
@@ -31783,7 +31777,7 @@ var AxAIAnthropic = /*#__PURE__*/ function(AxBaseAI) {
31783
31777
  reqValue
31784
31778
  ];
31785
31779
  });
31786
- _define_property$j(_assert_this_initialized$9(_this), "generateChatResp", function(resp) {
31780
+ _define_property$i(_assert_this_initialized$9(_this), "generateChatResp", function(resp) {
31787
31781
  if (resp.type === "error") {
31788
31782
  throw new Error("Anthropic Chat API Error: ".concat(resp.error.message));
31789
31783
  }
@@ -31822,7 +31816,7 @@ var AxAIAnthropic = /*#__PURE__*/ function(AxBaseAI) {
31822
31816
  remoteId: resp.id
31823
31817
  };
31824
31818
  });
31825
- _define_property$j(_assert_this_initialized$9(_this), "generateChatStreamResp", function(resp, state) {
31819
+ _define_property$i(_assert_this_initialized$9(_this), "generateChatStreamResp", function(resp, state) {
31826
31820
  if (!("type" in resp)) {
31827
31821
  throw new Error("Invalid Anthropic streaming event");
31828
31822
  }
@@ -31950,7 +31944,7 @@ var AxAIAnthropic = /*#__PURE__*/ function(AxBaseAI) {
31950
31944
  _this.config = _config;
31951
31945
  return _this;
31952
31946
  }
31953
- _create_class$8(AxAIAnthropic, [
31947
+ _create_class$7(AxAIAnthropic, [
31954
31948
  {
31955
31949
  key: "getModelConfig",
31956
31950
  value: function getModelConfig() {
@@ -32131,12 +32125,12 @@ function _async_to_generator$6(fn) {
32131
32125
  });
32132
32126
  };
32133
32127
  }
32134
- function _class_call_check$i(instance, Constructor) {
32128
+ function _class_call_check$h(instance, Constructor) {
32135
32129
  if (!(instance instanceof Constructor)) {
32136
32130
  throw new TypeError("Cannot call a class as a function");
32137
32131
  }
32138
32132
  }
32139
- function _defineProperties$7(target, props) {
32133
+ function _defineProperties$6(target, props) {
32140
32134
  for(var i = 0; i < props.length; i++){
32141
32135
  var descriptor = props[i];
32142
32136
  descriptor.enumerable = descriptor.enumerable || false;
@@ -32145,12 +32139,12 @@ function _defineProperties$7(target, props) {
32145
32139
  Object.defineProperty(target, descriptor.key, descriptor);
32146
32140
  }
32147
32141
  }
32148
- function _create_class$7(Constructor, protoProps, staticProps) {
32149
- if (protoProps) _defineProperties$7(Constructor.prototype, protoProps);
32150
- if (staticProps) _defineProperties$7(Constructor, staticProps);
32142
+ function _create_class$6(Constructor, protoProps, staticProps) {
32143
+ if (protoProps) _defineProperties$6(Constructor.prototype, protoProps);
32144
+ if (staticProps) _defineProperties$6(Constructor, staticProps);
32151
32145
  return Constructor;
32152
32146
  }
32153
- function _define_property$i(obj, key, value) {
32147
+ function _define_property$h(obj, key, value) {
32154
32148
  if (key in obj) {
32155
32149
  Object.defineProperty(obj, key, {
32156
32150
  value: value,
@@ -32261,19 +32255,19 @@ function _ts_generator$7(thisArg, body) {
32261
32255
  var colorLog = new ColorLog();
32262
32256
  var AxRateLimiterTokenUsage = /*#__PURE__*/ function() {
32263
32257
  function AxRateLimiterTokenUsage(maxTokens, refillRate, options) {
32264
- _class_call_check$i(this, AxRateLimiterTokenUsage);
32265
- _define_property$i(this, "options", void 0);
32266
- _define_property$i(this, "maxTokens", void 0);
32267
- _define_property$i(this, "refillRate", void 0);
32268
- _define_property$i(this, "currentTokens", void 0);
32269
- _define_property$i(this, "lastRefillTime", void 0);
32258
+ _class_call_check$h(this, AxRateLimiterTokenUsage);
32259
+ _define_property$h(this, "options", void 0);
32260
+ _define_property$h(this, "maxTokens", void 0);
32261
+ _define_property$h(this, "refillRate", void 0);
32262
+ _define_property$h(this, "currentTokens", void 0);
32263
+ _define_property$h(this, "lastRefillTime", void 0);
32270
32264
  this.maxTokens = maxTokens;
32271
32265
  this.refillRate = refillRate;
32272
32266
  this.currentTokens = maxTokens;
32273
32267
  this.lastRefillTime = Date.now();
32274
32268
  this.options = options;
32275
32269
  }
32276
- _create_class$7(AxRateLimiterTokenUsage, [
32270
+ _create_class$6(AxRateLimiterTokenUsage, [
32277
32271
  {
32278
32272
  key: "refillTokens",
32279
32273
  value: function refillTokens() {
@@ -32399,12 +32393,12 @@ function _async_to_generator$5(fn) {
32399
32393
  });
32400
32394
  };
32401
32395
  }
32402
- function _class_call_check$h(instance, Constructor) {
32396
+ function _class_call_check$g(instance, Constructor) {
32403
32397
  if (!(instance instanceof Constructor)) {
32404
32398
  throw new TypeError("Cannot call a class as a function");
32405
32399
  }
32406
32400
  }
32407
- function _define_property$h(obj, key, value) {
32401
+ function _define_property$g(obj, key, value) {
32408
32402
  if (key in obj) {
32409
32403
  Object.defineProperty(obj, key, {
32410
32404
  value: value,
@@ -32462,7 +32456,7 @@ function _object_spread$9(target) {
32462
32456
  }));
32463
32457
  }
32464
32458
  ownKeys.forEach(function(key) {
32465
- _define_property$h(target, key, source[key]);
32459
+ _define_property$g(target, key, source[key]);
32466
32460
  });
32467
32461
  }
32468
32462
  return target;
@@ -32644,7 +32638,7 @@ var AxAIGroq = /*#__PURE__*/ function(AxAIOpenAI) {
32644
32638
  var _super = _create_super$8(AxAIGroq);
32645
32639
  function AxAIGroq(param) {
32646
32640
  var apiKey = param.apiKey, config = param.config, options = param.options;
32647
- _class_call_check$h(this, AxAIGroq);
32641
+ _class_call_check$g(this, AxAIGroq);
32648
32642
  var _this;
32649
32643
  if (!apiKey || apiKey === "") {
32650
32644
  throw new Error("Groq API key not set");
@@ -32660,13 +32654,13 @@ var AxAIGroq = /*#__PURE__*/ function(AxAIOpenAI) {
32660
32654
  apiURL: "https://api.groq.com/openai/v1",
32661
32655
  modelInfo: []
32662
32656
  });
32663
- _define_property$h(_assert_this_initialized$8(_this), "setOptions", function(options) {
32657
+ _define_property$g(_assert_this_initialized$8(_this), "setOptions", function(options) {
32664
32658
  var rateLimiter = _this.newRateLimiter(options);
32665
32659
  _get$3((_assert_this_initialized$8(_this), _get_prototype_of$8(AxAIGroq.prototype)), "setOptions", _this).call(_this, _object_spread_props$5(_object_spread$9({}, options), {
32666
32660
  rateLimiter: rateLimiter
32667
32661
  }));
32668
32662
  });
32669
- _define_property$h(_assert_this_initialized$8(_this), "newRateLimiter", function(options) {
32663
+ _define_property$g(_assert_this_initialized$8(_this), "newRateLimiter", function(options) {
32670
32664
  if (options === null || options === void 0 ? void 0 : options.rateLimiter) {
32671
32665
  return options.rateLimiter;
32672
32666
  }
@@ -32766,12 +32760,12 @@ function _assert_this_initialized$7(self) {
32766
32760
  }
32767
32761
  return self;
32768
32762
  }
32769
- function _class_call_check$g(instance, Constructor) {
32763
+ function _class_call_check$f(instance, Constructor) {
32770
32764
  if (!(instance instanceof Constructor)) {
32771
32765
  throw new TypeError("Cannot call a class as a function");
32772
32766
  }
32773
32767
  }
32774
- function _define_property$g(obj, key, value) {
32768
+ function _define_property$f(obj, key, value) {
32775
32769
  if (key in obj) {
32776
32770
  Object.defineProperty(obj, key, {
32777
32771
  value: value,
@@ -32829,7 +32823,7 @@ function _object_spread$8(target) {
32829
32823
  }));
32830
32824
  }
32831
32825
  ownKeys.forEach(function(key) {
32832
- _define_property$g(target, key, source[key]);
32826
+ _define_property$f(target, key, source[key]);
32833
32827
  });
32834
32828
  }
32835
32829
  return target;
@@ -32892,7 +32886,7 @@ var AxAIMistral = /*#__PURE__*/ function(AxAIOpenAI) {
32892
32886
  var _super = _create_super$7(AxAIMistral);
32893
32887
  function AxAIMistral(param) {
32894
32888
  var apiKey = param.apiKey, config = param.config, options = param.options;
32895
- _class_call_check$g(this, AxAIMistral);
32889
+ _class_call_check$f(this, AxAIMistral);
32896
32890
  if (!apiKey || apiKey === "") {
32897
32891
  throw new Error("Mistral API key not set");
32898
32892
  }
@@ -32941,12 +32935,12 @@ function _assert_this_initialized$6(self) {
32941
32935
  }
32942
32936
  return self;
32943
32937
  }
32944
- function _class_call_check$f(instance, Constructor) {
32938
+ function _class_call_check$e(instance, Constructor) {
32945
32939
  if (!(instance instanceof Constructor)) {
32946
32940
  throw new TypeError("Cannot call a class as a function");
32947
32941
  }
32948
32942
  }
32949
- function _define_property$f(obj, key, value) {
32943
+ function _define_property$e(obj, key, value) {
32950
32944
  if (key in obj) {
32951
32945
  Object.defineProperty(obj, key, {
32952
32946
  value: value,
@@ -33004,7 +32998,7 @@ function _object_spread$7(target) {
33004
32998
  }));
33005
32999
  }
33006
33000
  ownKeys.forEach(function(key) {
33007
- _define_property$f(target, key, source[key]);
33001
+ _define_property$e(target, key, source[key]);
33008
33002
  });
33009
33003
  }
33010
33004
  return target;
@@ -33067,7 +33061,7 @@ var AxAIDeepSeek = /*#__PURE__*/ function(AxAIOpenAI) {
33067
33061
  var _super = _create_super$6(AxAIDeepSeek);
33068
33062
  function AxAIDeepSeek(param) {
33069
33063
  var apiKey = param.apiKey, config = param.config, options = param.options;
33070
- _class_call_check$f(this, AxAIDeepSeek);
33064
+ _class_call_check$e(this, AxAIDeepSeek);
33071
33065
  if (!apiKey || apiKey === "") {
33072
33066
  throw new Error("DeepSeek API key not set");
33073
33067
  }
@@ -33092,12 +33086,12 @@ function _assert_this_initialized$5(self) {
33092
33086
  }
33093
33087
  return self;
33094
33088
  }
33095
- function _class_call_check$e(instance, Constructor) {
33089
+ function _class_call_check$d(instance, Constructor) {
33096
33090
  if (!(instance instanceof Constructor)) {
33097
33091
  throw new TypeError("Cannot call a class as a function");
33098
33092
  }
33099
33093
  }
33100
- function _define_property$e(obj, key, value) {
33094
+ function _define_property$d(obj, key, value) {
33101
33095
  if (key in obj) {
33102
33096
  Object.defineProperty(obj, key, {
33103
33097
  value: value,
@@ -33155,7 +33149,7 @@ function _object_spread$6(target) {
33155
33149
  }));
33156
33150
  }
33157
33151
  ownKeys.forEach(function(key) {
33158
- _define_property$e(target, key, source[key]);
33152
+ _define_property$d(target, key, source[key]);
33159
33153
  });
33160
33154
  }
33161
33155
  return target;
@@ -33246,7 +33240,7 @@ var axAIOllamaDefaultConfig = function() {
33246
33240
  var _super = _create_super$5(AxAIOllama);
33247
33241
  function AxAIOllama(param) {
33248
33242
  var _param_apiKey = param.apiKey, apiKey = _param_apiKey === void 0 ? "not-set" : _param_apiKey, _param_url = param.url, url = _param_url === void 0 ? "http://localhost:11434" : _param_url, config = param.config, options = param.options;
33249
- _class_call_check$e(this, AxAIOllama);
33243
+ _class_call_check$d(this, AxAIOllama);
33250
33244
  var _config = _object_spread$6({}, axAIOllamaDefaultConfig(), config);
33251
33245
  var _this = _super.call(this, {
33252
33246
  apiKey: apiKey,
@@ -33290,12 +33284,12 @@ function _async_to_generator$4(fn) {
33290
33284
  });
33291
33285
  };
33292
33286
  }
33293
- function _class_call_check$d(instance, Constructor) {
33287
+ function _class_call_check$c(instance, Constructor) {
33294
33288
  if (!(instance instanceof Constructor)) {
33295
33289
  throw new TypeError("Cannot call a class as a function");
33296
33290
  }
33297
33291
  }
33298
- function _defineProperties$6(target, props) {
33292
+ function _defineProperties$5(target, props) {
33299
33293
  for(var i = 0; i < props.length; i++){
33300
33294
  var descriptor = props[i];
33301
33295
  descriptor.enumerable = descriptor.enumerable || false;
@@ -33304,12 +33298,12 @@ function _defineProperties$6(target, props) {
33304
33298
  Object.defineProperty(target, descriptor.key, descriptor);
33305
33299
  }
33306
33300
  }
33307
- function _create_class$6(Constructor, protoProps, staticProps) {
33308
- if (protoProps) _defineProperties$6(Constructor.prototype, protoProps);
33309
- if (staticProps) _defineProperties$6(Constructor, staticProps);
33301
+ function _create_class$5(Constructor, protoProps, staticProps) {
33302
+ if (protoProps) _defineProperties$5(Constructor.prototype, protoProps);
33303
+ if (staticProps) _defineProperties$5(Constructor, staticProps);
33310
33304
  return Constructor;
33311
33305
  }
33312
- function _define_property$d(obj, key, value) {
33306
+ function _define_property$c(obj, key, value) {
33313
33307
  if (key in obj) {
33314
33308
  Object.defineProperty(obj, key, {
33315
33309
  value: value,
@@ -33419,8 +33413,8 @@ function _ts_generator$5(thisArg, body) {
33419
33413
  }
33420
33414
  var AxAI = /*#__PURE__*/ function() {
33421
33415
  function AxAI(options) {
33422
- _class_call_check$d(this, AxAI);
33423
- _define_property$d(this, "ai", void 0);
33416
+ _class_call_check$c(this, AxAI);
33417
+ _define_property$c(this, "ai", void 0);
33424
33418
  switch(options.name){
33425
33419
  case "openai":
33426
33420
  this.ai = new AxAIOpenAI(options);
@@ -33459,7 +33453,7 @@ var AxAI = /*#__PURE__*/ function() {
33459
33453
  throw new Error("Unknown AI");
33460
33454
  }
33461
33455
  }
33462
- _create_class$6(AxAI, [
33456
+ _create_class$5(AxAI, [
33463
33457
  {
33464
33458
  key: "setModelMap",
33465
33459
  value: function setModelMap(modelMap) {
@@ -33565,12 +33559,12 @@ function _array_like_to_array$5(arr, len) {
33565
33559
  function _array_without_holes$4(arr) {
33566
33560
  if (Array.isArray(arr)) return _array_like_to_array$5(arr);
33567
33561
  }
33568
- function _class_call_check$c(instance, Constructor) {
33562
+ function _class_call_check$b(instance, Constructor) {
33569
33563
  if (!(instance instanceof Constructor)) {
33570
33564
  throw new TypeError("Cannot call a class as a function");
33571
33565
  }
33572
33566
  }
33573
- function _defineProperties$5(target, props) {
33567
+ function _defineProperties$4(target, props) {
33574
33568
  for(var i = 0; i < props.length; i++){
33575
33569
  var descriptor = props[i];
33576
33570
  descriptor.enumerable = descriptor.enumerable || false;
@@ -33579,12 +33573,12 @@ function _defineProperties$5(target, props) {
33579
33573
  Object.defineProperty(target, descriptor.key, descriptor);
33580
33574
  }
33581
33575
  }
33582
- function _create_class$5(Constructor, protoProps, staticProps) {
33583
- if (protoProps) _defineProperties$5(Constructor.prototype, protoProps);
33584
- if (staticProps) _defineProperties$5(Constructor, staticProps);
33576
+ function _create_class$4(Constructor, protoProps, staticProps) {
33577
+ if (protoProps) _defineProperties$4(Constructor.prototype, protoProps);
33578
+ if (staticProps) _defineProperties$4(Constructor, staticProps);
33585
33579
  return Constructor;
33586
33580
  }
33587
- function _define_property$c(obj, key, value) {
33581
+ function _define_property$b(obj, key, value) {
33588
33582
  if (key in obj) {
33589
33583
  Object.defineProperty(obj, key, {
33590
33584
  value: value,
@@ -33613,7 +33607,7 @@ function _object_spread$5(target) {
33613
33607
  }));
33614
33608
  }
33615
33609
  ownKeys.forEach(function(key) {
33616
- _define_property$c(target, key, source[key]);
33610
+ _define_property$b(target, key, source[key]);
33617
33611
  });
33618
33612
  }
33619
33613
  return target;
@@ -33632,16 +33626,16 @@ function _unsupported_iterable_to_array$5(o, minLen) {
33632
33626
  var AxMemory = /*#__PURE__*/ function() {
33633
33627
  function AxMemory() {
33634
33628
  var limit = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 50;
33635
- _class_call_check$c(this, AxMemory);
33636
- _define_property$c(this, "data", []);
33637
- _define_property$c(this, "sdata", new Map());
33638
- _define_property$c(this, "limit", void 0);
33629
+ _class_call_check$b(this, AxMemory);
33630
+ _define_property$b(this, "data", []);
33631
+ _define_property$b(this, "sdata", new Map());
33632
+ _define_property$b(this, "limit", void 0);
33639
33633
  if (limit <= 0) {
33640
33634
  throw Error("argument 'last' must be greater than 0");
33641
33635
  }
33642
33636
  this.limit = limit;
33643
33637
  }
33644
- _create_class$5(AxMemory, [
33638
+ _create_class$4(AxMemory, [
33645
33639
  {
33646
33640
  key: "add",
33647
33641
  value: function add(value, sessionId) {
@@ -33790,7 +33784,7 @@ function _assert_this_initialized$4(self) {
33790
33784
  }
33791
33785
  return self;
33792
33786
  }
33793
- function _class_call_check$b(instance, Constructor) {
33787
+ function _class_call_check$a(instance, Constructor) {
33794
33788
  if (!(instance instanceof Constructor)) {
33795
33789
  throw new TypeError("Cannot call a class as a function");
33796
33790
  }
@@ -33812,7 +33806,7 @@ function _construct$1(Parent, args, Class) {
33812
33806
  }
33813
33807
  return _construct$1.apply(null, arguments);
33814
33808
  }
33815
- function _define_property$b(obj, key, value) {
33809
+ function _define_property$a(obj, key, value) {
33816
33810
  if (key in obj) {
33817
33811
  Object.defineProperty(obj, key, {
33818
33812
  value: value,
@@ -33919,19 +33913,19 @@ var AxAssertionError = /*#__PURE__*/ function(Error1) {
33919
33913
  var _super = _create_super$4(AxAssertionError);
33920
33914
  function AxAssertionError(param) {
33921
33915
  var message = param.message, values = param.values, optional = param.optional;
33922
- _class_call_check$b(this, AxAssertionError);
33916
+ _class_call_check$a(this, AxAssertionError);
33923
33917
  var _this;
33924
33918
  _this = _super.call(this, message);
33925
- _define_property$b(_assert_this_initialized$4(_this), "values", void 0);
33926
- _define_property$b(_assert_this_initialized$4(_this), "optional", void 0);
33927
- _define_property$b(_assert_this_initialized$4(_this), "getValue", function() {
33919
+ _define_property$a(_assert_this_initialized$4(_this), "values", void 0);
33920
+ _define_property$a(_assert_this_initialized$4(_this), "optional", void 0);
33921
+ _define_property$a(_assert_this_initialized$4(_this), "getValue", function() {
33928
33922
  return _this.values;
33929
33923
  });
33930
- _define_property$b(_assert_this_initialized$4(_this), "getOptional", function() {
33924
+ _define_property$a(_assert_this_initialized$4(_this), "getOptional", function() {
33931
33925
  return _this.optional;
33932
33926
  });
33933
33927
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
33934
- _define_property$b(_assert_this_initialized$4(_this), "getFixingInstructions", function(_sig) {
33928
+ _define_property$a(_assert_this_initialized$4(_this), "getFixingInstructions", function(_sig) {
33935
33929
  var extraFields = [];
33936
33930
  // for (const f of sig.getOutputFields()) {
33937
33931
  // extraFields.push({
@@ -35281,7 +35275,7 @@ var lib = JSON5;
35281
35275
  }
35282
35276
  return self;
35283
35277
  }
35284
- function _class_call_check$a(instance, Constructor) {
35278
+ function _class_call_check$9(instance, Constructor) {
35285
35279
  if (!(instance instanceof Constructor)) {
35286
35280
  throw new TypeError("Cannot call a class as a function");
35287
35281
  }
@@ -35303,7 +35297,7 @@ function _construct(Parent, args, Class) {
35303
35297
  }
35304
35298
  return _construct.apply(null, arguments);
35305
35299
  }
35306
- function _define_property$a(obj, key, value) {
35300
+ function _define_property$9(obj, key, value) {
35307
35301
  if (key in obj) {
35308
35302
  Object.defineProperty(obj, key, {
35309
35303
  value: value,
@@ -35558,18 +35552,18 @@ var ValidationError = /*#__PURE__*/ function(Error1) {
35558
35552
  var _super = _create_super$3(ValidationError);
35559
35553
  function ValidationError(param) {
35560
35554
  var message = param.message, field = param.field, value = param.value;
35561
- _class_call_check$a(this, ValidationError);
35555
+ _class_call_check$9(this, ValidationError);
35562
35556
  var _this;
35563
35557
  _this = _super.call(this, message);
35564
- _define_property$a(_assert_this_initialized$3(_this), "field", void 0);
35565
- _define_property$a(_assert_this_initialized$3(_this), "value", void 0);
35566
- _define_property$a(_assert_this_initialized$3(_this), "getField", function() {
35558
+ _define_property$9(_assert_this_initialized$3(_this), "field", void 0);
35559
+ _define_property$9(_assert_this_initialized$3(_this), "value", void 0);
35560
+ _define_property$9(_assert_this_initialized$3(_this), "getField", function() {
35567
35561
  return _this.field;
35568
35562
  });
35569
- _define_property$a(_assert_this_initialized$3(_this), "getValue", function() {
35563
+ _define_property$9(_assert_this_initialized$3(_this), "getValue", function() {
35570
35564
  return _this.value;
35571
35565
  });
35572
- _define_property$a(_assert_this_initialized$3(_this), "getFixingInstructions", function() {
35566
+ _define_property$9(_assert_this_initialized$3(_this), "getFixingInstructions", function() {
35573
35567
  var f = _this.field;
35574
35568
  var extraFields = [
35575
35569
  {
@@ -35731,12 +35725,12 @@ function _async_to_generator$3(fn) {
35731
35725
  });
35732
35726
  };
35733
35727
  }
35734
- function _class_call_check$9(instance, Constructor) {
35728
+ function _class_call_check$8(instance, Constructor) {
35735
35729
  if (!(instance instanceof Constructor)) {
35736
35730
  throw new TypeError("Cannot call a class as a function");
35737
35731
  }
35738
35732
  }
35739
- function _define_property$9(obj, key, value) {
35733
+ function _define_property$8(obj, key, value) {
35740
35734
  if (key in obj) {
35741
35735
  Object.defineProperty(obj, key, {
35742
35736
  value: value,
@@ -35845,9 +35839,9 @@ function _ts_generator$4(thisArg, body) {
35845
35839
  }
35846
35840
  }
35847
35841
  var AxFunctionProcessor = function AxFunctionProcessor(funcList) {
35848
- _class_call_check$9(this, AxFunctionProcessor);
35849
- _define_property$9(this, "funcList", void 0);
35850
- _define_property$9(this, "executeFunction", function() {
35842
+ _class_call_check$8(this, AxFunctionProcessor);
35843
+ _define_property$8(this, "funcList", void 0);
35844
+ _define_property$8(this, "executeFunction", function() {
35851
35845
  var _ref = _async_to_generator$3(function(fnSpec, func, options) {
35852
35846
  var args, opt, res, _tmp, res1, _tmp1;
35853
35847
  return _ts_generator$4(this, function(_state) {
@@ -35940,7 +35934,7 @@ var AxFunctionProcessor = function AxFunctionProcessor(funcList) {
35940
35934
  };
35941
35935
  }());
35942
35936
  var _this = this;
35943
- _define_property$9(this, "execute", function() {
35937
+ _define_property$8(this, "execute", function() {
35944
35938
  var _ref = _async_to_generator$3(function(func, options) {
35945
35939
  var fnSpec;
35946
35940
  return _ts_generator$4(this, function(_state) {
@@ -35981,12 +35975,12 @@ var AxFunctionProcessor = function AxFunctionProcessor(funcList) {
35981
35975
  }
35982
35976
  ;
35983
35977
 
35984
- function _class_call_check$8(instance, Constructor) {
35978
+ function _class_call_check$7(instance, Constructor) {
35985
35979
  if (!(instance instanceof Constructor)) {
35986
35980
  throw new TypeError("Cannot call a class as a function");
35987
35981
  }
35988
35982
  }
35989
- function _defineProperties$4(target, props) {
35983
+ function _defineProperties$3(target, props) {
35990
35984
  for(var i = 0; i < props.length; i++){
35991
35985
  var descriptor = props[i];
35992
35986
  descriptor.enumerable = descriptor.enumerable || false;
@@ -35995,12 +35989,12 @@ function _defineProperties$4(target, props) {
35995
35989
  Object.defineProperty(target, descriptor.key, descriptor);
35996
35990
  }
35997
35991
  }
35998
- function _create_class$4(Constructor, protoProps, staticProps) {
35999
- if (protoProps) _defineProperties$4(Constructor.prototype, protoProps);
36000
- if (staticProps) _defineProperties$4(Constructor, staticProps);
35992
+ function _create_class$3(Constructor, protoProps, staticProps) {
35993
+ if (protoProps) _defineProperties$3(Constructor.prototype, protoProps);
35994
+ if (staticProps) _defineProperties$3(Constructor, staticProps);
36001
35995
  return Constructor;
36002
35996
  }
36003
- function _define_property$8(obj, key, value) {
35997
+ function _define_property$7(obj, key, value) {
36004
35998
  if (key in obj) {
36005
35999
  Object.defineProperty(obj, key, {
36006
36000
  value: value,
@@ -36111,12 +36105,12 @@ function _ts_generator$3(thisArg, body) {
36111
36105
  var _Symbol_iterator = Symbol.iterator;
36112
36106
  var AxInstanceRegistry = /*#__PURE__*/ function() {
36113
36107
  function AxInstanceRegistry() {
36114
- _class_call_check$8(this, AxInstanceRegistry);
36115
- _define_property$8(this, "reg", void 0 // To track keys for iteration
36108
+ _class_call_check$7(this, AxInstanceRegistry);
36109
+ _define_property$7(this, "reg", void 0 // To track keys for iteration
36116
36110
  );
36117
36111
  this.reg = new Set();
36118
36112
  }
36119
- _create_class$4(AxInstanceRegistry, [
36113
+ _create_class$3(AxInstanceRegistry, [
36120
36114
  {
36121
36115
  key: "register",
36122
36116
  value: function register(instance) {
@@ -37657,12 +37651,12 @@ function _array_like_to_array$4(arr, len) {
37657
37651
  function _array_with_holes(arr) {
37658
37652
  if (Array.isArray(arr)) return arr;
37659
37653
  }
37660
- function _class_call_check$7(instance, Constructor) {
37654
+ function _class_call_check$6(instance, Constructor) {
37661
37655
  if (!(instance instanceof Constructor)) {
37662
37656
  throw new TypeError("Cannot call a class as a function");
37663
37657
  }
37664
37658
  }
37665
- function _define_property$7(obj, key, value) {
37659
+ function _define_property$6(obj, key, value) {
37666
37660
  if (key in obj) {
37667
37661
  Object.defineProperty(obj, key, {
37668
37662
  value: value,
@@ -37719,7 +37713,7 @@ function _object_spread$4(target) {
37719
37713
  }));
37720
37714
  }
37721
37715
  ownKeys.forEach(function(key) {
37722
- _define_property$7(target, key, source[key]);
37716
+ _define_property$6(target, key, source[key]);
37723
37717
  });
37724
37718
  }
37725
37719
  return target;
@@ -37761,13 +37755,13 @@ function _unsupported_iterable_to_array$4(o, minLen) {
37761
37755
  }
37762
37756
  var AxSignature = function AxSignature(signature) {
37763
37757
  var _this = this;
37764
- _class_call_check$7(this, AxSignature);
37765
- _define_property$7(this, "description", void 0);
37766
- _define_property$7(this, "inputFields", void 0);
37767
- _define_property$7(this, "outputFields", void 0);
37768
- _define_property$7(this, "sigHash", void 0);
37769
- _define_property$7(this, "sigString", void 0);
37770
- _define_property$7(this, "parseParsedField", function(field) {
37758
+ _class_call_check$6(this, AxSignature);
37759
+ _define_property$6(this, "description", void 0);
37760
+ _define_property$6(this, "inputFields", void 0);
37761
+ _define_property$6(this, "outputFields", void 0);
37762
+ _define_property$6(this, "sigHash", void 0);
37763
+ _define_property$6(this, "sigString", void 0);
37764
+ _define_property$6(this, "parseParsedField", function(field) {
37771
37765
  if (!field.name || field.name.length === 0) {
37772
37766
  throw new Error("Field name is required.");
37773
37767
  }
@@ -37784,7 +37778,7 @@ var AxSignature = function AxSignature(signature) {
37784
37778
  }
37785
37779
  };
37786
37780
  });
37787
- _define_property$7(this, "parseField", function(field) {
37781
+ _define_property$6(this, "parseField", function(field) {
37788
37782
  var title = !field.title || field.title.length === 0 ? _this.toTitle(field.name) : field.title;
37789
37783
  if (field.type && (!field.type.name || field.type.name.length === 0)) {
37790
37784
  throw new Error("Field type name is required: " + field.name);
@@ -37793,45 +37787,45 @@ var AxSignature = function AxSignature(signature) {
37793
37787
  title: title
37794
37788
  });
37795
37789
  });
37796
- _define_property$7(this, "setDescription", function(desc) {
37790
+ _define_property$6(this, "setDescription", function(desc) {
37797
37791
  _this.description = desc;
37798
37792
  _this.updateHash();
37799
37793
  });
37800
- _define_property$7(this, "addInputField", function(field) {
37794
+ _define_property$6(this, "addInputField", function(field) {
37801
37795
  _this.inputFields.push(_this.parseField(field));
37802
37796
  _this.updateHash();
37803
37797
  });
37804
- _define_property$7(this, "addOutputField", function(field) {
37798
+ _define_property$6(this, "addOutputField", function(field) {
37805
37799
  _this.outputFields.push(_this.parseField(field));
37806
37800
  _this.updateHash();
37807
37801
  });
37808
- _define_property$7(this, "setInputFields", function(fields) {
37802
+ _define_property$6(this, "setInputFields", function(fields) {
37809
37803
  _this.inputFields = fields.map(function(v) {
37810
37804
  return _this.parseField(v);
37811
37805
  });
37812
37806
  _this.updateHash();
37813
37807
  });
37814
- _define_property$7(this, "setOutputFields", function(fields) {
37808
+ _define_property$6(this, "setOutputFields", function(fields) {
37815
37809
  _this.outputFields = fields.map(function(v) {
37816
37810
  return _this.parseField(v);
37817
37811
  });
37818
37812
  _this.updateHash();
37819
37813
  });
37820
- _define_property$7(this, "getInputFields", function() {
37814
+ _define_property$6(this, "getInputFields", function() {
37821
37815
  return _this.inputFields;
37822
37816
  });
37823
- _define_property$7(this, "getOutputFields", function() {
37817
+ _define_property$6(this, "getOutputFields", function() {
37824
37818
  return _this.outputFields;
37825
37819
  });
37826
- _define_property$7(this, "getDescription", function() {
37820
+ _define_property$6(this, "getDescription", function() {
37827
37821
  return _this.description;
37828
37822
  });
37829
- _define_property$7(this, "toTitle", function(name) {
37823
+ _define_property$6(this, "toTitle", function(name) {
37830
37824
  var result = name.replaceAll("_", " ");
37831
37825
  result = result.replace(/([A-Z]|[0-9]+)/g, " $1").trim();
37832
37826
  return result.charAt(0).toUpperCase() + result.slice(1);
37833
37827
  });
37834
- _define_property$7(this, "toJSONSchema", function() {
37828
+ _define_property$6(this, "toJSONSchema", function() {
37835
37829
  var properties = {};
37836
37830
  var required = [];
37837
37831
  var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
@@ -37880,7 +37874,7 @@ var AxSignature = function AxSignature(signature) {
37880
37874
  };
37881
37875
  return schema;
37882
37876
  });
37883
- _define_property$7(this, "updateHash", function() {
37877
+ _define_property$6(this, "updateHash", function() {
37884
37878
  _this.getInputFields().forEach(function(field) {
37885
37879
  validateField(field);
37886
37880
  });
@@ -37899,10 +37893,10 @@ var AxSignature = function AxSignature(signature) {
37899
37893
  _this.sigString
37900
37894
  ];
37901
37895
  });
37902
- _define_property$7(this, "hash", function() {
37896
+ _define_property$6(this, "hash", function() {
37903
37897
  return _this.sigHash;
37904
37898
  });
37905
- _define_property$7(this, "toString", function() {
37899
+ _define_property$6(this, "toString", function() {
37906
37900
  return _this.sigString;
37907
37901
  });
37908
37902
  if (typeof signature === "string") {
@@ -37987,7 +37981,7 @@ function validateField(field) {
37987
37981
  }
37988
37982
  }
37989
37983
 
37990
- /* eslint-disable @typescript-eslint/naming-convention */ function _define_property$6(obj, key, value) {
37984
+ /* eslint-disable @typescript-eslint/naming-convention */ function _define_property$5(obj, key, value) {
37991
37985
  if (key in obj) {
37992
37986
  Object.defineProperty(obj, key, {
37993
37987
  value: value,
@@ -38010,7 +38004,7 @@ function _object_spread$3(target) {
38010
38004
  }));
38011
38005
  }
38012
38006
  ownKeys.forEach(function(key) {
38013
- _define_property$6(target, key, source[key]);
38007
+ _define_property$5(target, key, source[key]);
38014
38008
  });
38015
38009
  }
38016
38010
  return target;
@@ -38133,12 +38127,12 @@ function _async_to_generator$2(fn) {
38133
38127
  });
38134
38128
  };
38135
38129
  }
38136
- function _class_call_check$6(instance, Constructor) {
38130
+ function _class_call_check$5(instance, Constructor) {
38137
38131
  if (!(instance instanceof Constructor)) {
38138
38132
  throw new TypeError("Cannot call a class as a function");
38139
38133
  }
38140
38134
  }
38141
- function _defineProperties$3(target, props) {
38135
+ function _defineProperties$2(target, props) {
38142
38136
  for(var i = 0; i < props.length; i++){
38143
38137
  var descriptor = props[i];
38144
38138
  descriptor.enumerable = descriptor.enumerable || false;
@@ -38147,12 +38141,12 @@ function _defineProperties$3(target, props) {
38147
38141
  Object.defineProperty(target, descriptor.key, descriptor);
38148
38142
  }
38149
38143
  }
38150
- function _create_class$3(Constructor, protoProps, staticProps) {
38151
- if (protoProps) _defineProperties$3(Constructor.prototype, protoProps);
38152
- if (staticProps) _defineProperties$3(Constructor, staticProps);
38144
+ function _create_class$2(Constructor, protoProps, staticProps) {
38145
+ if (protoProps) _defineProperties$2(Constructor.prototype, protoProps);
38146
+ if (staticProps) _defineProperties$2(Constructor, staticProps);
38153
38147
  return Constructor;
38154
38148
  }
38155
- function _define_property$5(obj, key, value) {
38149
+ function _define_property$4(obj, key, value) {
38156
38150
  if (key in obj) {
38157
38151
  Object.defineProperty(obj, key, {
38158
38152
  value: value,
@@ -38279,16 +38273,16 @@ function _ts_generator$2(thisArg, body) {
38279
38273
  }
38280
38274
  var AxProgramWithSignature = /*#__PURE__*/ function() {
38281
38275
  function AxProgramWithSignature(signature) {
38282
- _class_call_check$6(this, AxProgramWithSignature);
38276
+ _class_call_check$5(this, AxProgramWithSignature);
38283
38277
  var _this_signature;
38284
- _define_property$5(this, "signature", void 0);
38285
- _define_property$5(this, "sigHash", void 0);
38286
- _define_property$5(this, "examples", void 0);
38287
- _define_property$5(this, "demos", void 0);
38288
- _define_property$5(this, "trace", void 0);
38289
- _define_property$5(this, "usage", []);
38290
- _define_property$5(this, "key", void 0);
38291
- _define_property$5(this, "children", void 0);
38278
+ _define_property$4(this, "signature", void 0);
38279
+ _define_property$4(this, "sigHash", void 0);
38280
+ _define_property$4(this, "examples", void 0);
38281
+ _define_property$4(this, "demos", void 0);
38282
+ _define_property$4(this, "trace", void 0);
38283
+ _define_property$4(this, "usage", []);
38284
+ _define_property$4(this, "key", void 0);
38285
+ _define_property$4(this, "children", void 0);
38292
38286
  this.signature = new AxSignature(signature);
38293
38287
  this.sigHash = (_this_signature = this.signature) === null || _this_signature === void 0 ? void 0 : _this_signature.hash();
38294
38288
  this.children = new AxInstanceRegistry();
@@ -38296,7 +38290,7 @@ var AxProgramWithSignature = /*#__PURE__*/ function() {
38296
38290
  id: this.constructor.name
38297
38291
  };
38298
38292
  }
38299
- _create_class$3(AxProgramWithSignature, [
38293
+ _create_class$2(AxProgramWithSignature, [
38300
38294
  {
38301
38295
  key: "getSignature",
38302
38296
  value: function getSignature() {
@@ -38569,12 +38563,12 @@ function _array_like_to_array$2(arr, len) {
38569
38563
  function _array_without_holes$2(arr) {
38570
38564
  if (Array.isArray(arr)) return _array_like_to_array$2(arr);
38571
38565
  }
38572
- function _class_call_check$5(instance, Constructor) {
38566
+ function _class_call_check$4(instance, Constructor) {
38573
38567
  if (!(instance instanceof Constructor)) {
38574
38568
  throw new TypeError("Cannot call a class as a function");
38575
38569
  }
38576
38570
  }
38577
- function _define_property$4(obj, key, value) {
38571
+ function _define_property$3(obj, key, value) {
38578
38572
  if (key in obj) {
38579
38573
  Object.defineProperty(obj, key, {
38580
38574
  value: value,
@@ -38606,12 +38600,12 @@ function _unsupported_iterable_to_array$2(o, minLen) {
38606
38600
  }
38607
38601
  var AxPromptTemplate = function AxPromptTemplate(sig, fieldTemplates) {
38608
38602
  var _this = this;
38609
- _class_call_check$5(this, AxPromptTemplate);
38610
- _define_property$4(this, "sig", void 0);
38611
- _define_property$4(this, "fieldTemplates", void 0);
38612
- _define_property$4(this, "task", void 0);
38613
- _define_property$4(this, "outputFormat", void 0);
38614
- _define_property$4(this, "render", function(values, param) {
38603
+ _class_call_check$4(this, AxPromptTemplate);
38604
+ _define_property$3(this, "sig", void 0);
38605
+ _define_property$3(this, "fieldTemplates", void 0);
38606
+ _define_property$3(this, "task", void 0);
38607
+ _define_property$3(this, "outputFormat", void 0);
38608
+ _define_property$3(this, "render", function(values, param) {
38615
38609
  var examples = param.examples, demos = param.demos;
38616
38610
  var renderedExamples = examples ? [
38617
38611
  {
@@ -38638,7 +38632,7 @@ var AxPromptTemplate = function AxPromptTemplate(sig, fieldTemplates) {
38638
38632
  }
38639
38633
  return prompt.reduce(combineConsecutiveStrings("\n"), []);
38640
38634
  });
38641
- _define_property$4(this, "renderExtraFields", function(extraFields) {
38635
+ _define_property$3(this, "renderExtraFields", function(extraFields) {
38642
38636
  var prompt = [];
38643
38637
  if (extraFields && extraFields.length > 0) {
38644
38638
  extraFields.forEach(function(field) {
@@ -38661,7 +38655,7 @@ var AxPromptTemplate = function AxPromptTemplate(sig, fieldTemplates) {
38661
38655
  }
38662
38656
  return prompt.reduce(combineConsecutiveStrings("\n"), []);
38663
38657
  });
38664
- _define_property$4(this, "renderExamples", function(data) {
38658
+ _define_property$3(this, "renderExamples", function(data) {
38665
38659
  var list = [];
38666
38660
  var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
38667
38661
  try {
@@ -38714,7 +38708,7 @@ var AxPromptTemplate = function AxPromptTemplate(sig, fieldTemplates) {
38714
38708
  }
38715
38709
  return list;
38716
38710
  });
38717
- _define_property$4(this, "renderDemos", function(data) {
38711
+ _define_property$3(this, "renderDemos", function(data) {
38718
38712
  var list = [];
38719
38713
  var fields = _to_consumable_array$2(_this.sig.getInputFields()).concat(_to_consumable_array$2(_this.sig.getOutputFields()));
38720
38714
  var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
@@ -38759,7 +38753,7 @@ var AxPromptTemplate = function AxPromptTemplate(sig, fieldTemplates) {
38759
38753
  }
38760
38754
  return list;
38761
38755
  });
38762
- _define_property$4(this, "renderInputFields", function(values) {
38756
+ _define_property$3(this, "renderInputFields", function(values) {
38763
38757
  var renderedItems = _this.sig.getInputFields().map(function(field) {
38764
38758
  return _this.renderInField(field, values);
38765
38759
  }).filter(function(v) {
@@ -38772,7 +38766,7 @@ var AxPromptTemplate = function AxPromptTemplate(sig, fieldTemplates) {
38772
38766
  });
38773
38767
  return renderedItems;
38774
38768
  });
38775
- _define_property$4(this, "renderInField", function(field, values, skipMissing) {
38769
+ _define_property$3(this, "renderInField", function(field, values, skipMissing) {
38776
38770
  var _this_fieldTemplates;
38777
38771
  var _this_fieldTemplates_field_name;
38778
38772
  var textFieldFn = (_this_fieldTemplates_field_name = (_this_fieldTemplates = _this.fieldTemplates) === null || _this_fieldTemplates === void 0 ? void 0 : _this_fieldTemplates[field.name]) !== null && _this_fieldTemplates_field_name !== void 0 ? _this_fieldTemplates_field_name : _this.defaultRenderInField;
@@ -38792,7 +38786,7 @@ var AxPromptTemplate = function AxPromptTemplate(sig, fieldTemplates) {
38792
38786
  var processedValue = processValue(field, value);
38793
38787
  return textFieldFn(field, processedValue);
38794
38788
  });
38795
- _define_property$4(this, "defaultRenderInField", function(field, value) {
38789
+ _define_property$3(this, "defaultRenderInField", function(field, value) {
38796
38790
  var _field_type;
38797
38791
  if (((_field_type = field.type) === null || _field_type === void 0 ? void 0 : _field_type.name) === "image") {
38798
38792
  if (typeof value !== "object") {
@@ -38832,14 +38826,14 @@ var AxPromptTemplate = function AxPromptTemplate(sig, fieldTemplates) {
38832
38826
  }
38833
38827
  ];
38834
38828
  });
38835
- _define_property$4(this, "renderDescFields", function(list) {
38829
+ _define_property$3(this, "renderDescFields", function(list) {
38836
38830
  return list.map(function(v) {
38837
38831
  return "`".concat(v.title, "`");
38838
38832
  }).join(", ");
38839
38833
  });
38840
38834
  // private renderInFields = (list: readonly Field[]) =>
38841
38835
  // list.map((v) => v.title + ': ' + (v.description ?? toVar(v.name)));
38842
- _define_property$4(this, "renderOutFields", function(list) {
38836
+ _define_property$3(this, "renderOutFields", function(list) {
38843
38837
  return list.map(function(v) {
38844
38838
  var _v_description;
38845
38839
  return [
@@ -39011,12 +39005,12 @@ function _async_to_generator$1(fn) {
39011
39005
  });
39012
39006
  };
39013
39007
  }
39014
- function _class_call_check$4(instance, Constructor) {
39008
+ function _class_call_check$3(instance, Constructor) {
39015
39009
  if (!(instance instanceof Constructor)) {
39016
39010
  throw new TypeError("Cannot call a class as a function");
39017
39011
  }
39018
39012
  }
39019
- function _defineProperties$2(target, props) {
39013
+ function _defineProperties$1(target, props) {
39020
39014
  for(var i = 0; i < props.length; i++){
39021
39015
  var descriptor = props[i];
39022
39016
  descriptor.enumerable = descriptor.enumerable || false;
@@ -39025,12 +39019,12 @@ function _defineProperties$2(target, props) {
39025
39019
  Object.defineProperty(target, descriptor.key, descriptor);
39026
39020
  }
39027
39021
  }
39028
- function _create_class$2(Constructor, protoProps, staticProps) {
39029
- if (protoProps) _defineProperties$2(Constructor.prototype, protoProps);
39030
- if (staticProps) _defineProperties$2(Constructor, staticProps);
39022
+ function _create_class$1(Constructor, protoProps, staticProps) {
39023
+ if (protoProps) _defineProperties$1(Constructor.prototype, protoProps);
39024
+ if (staticProps) _defineProperties$1(Constructor, staticProps);
39031
39025
  return Constructor;
39032
39026
  }
39033
- function _define_property$3(obj, key, value) {
39027
+ function _define_property$2(obj, key, value) {
39034
39028
  if (key in obj) {
39035
39029
  Object.defineProperty(obj, key, {
39036
39030
  value: value,
@@ -39079,7 +39073,7 @@ function _object_spread$2(target) {
39079
39073
  }));
39080
39074
  }
39081
39075
  ownKeys.forEach(function(key) {
39082
- _define_property$3(target, key, source[key]);
39076
+ _define_property$2(target, key, source[key]);
39083
39077
  });
39084
39078
  }
39085
39079
  return target;
@@ -39248,19 +39242,19 @@ var AxGenerate = /*#__PURE__*/ function(AxProgramWithSignature) {
39248
39242
  _inherits$2(AxGenerate, AxProgramWithSignature);
39249
39243
  var _super = _create_super$2(AxGenerate);
39250
39244
  function AxGenerate(ai, signature, options) {
39251
- _class_call_check$4(this, AxGenerate);
39245
+ _class_call_check$3(this, AxGenerate);
39252
39246
  var _this;
39253
39247
  var _options_functions, _this_options, _this_options1, _this_functions;
39254
39248
  _this = _super.call(this, signature);
39255
- _define_property$3(_assert_this_initialized$2(_this), "ai", void 0);
39256
- _define_property$3(_assert_this_initialized$2(_this), "pt", void 0);
39257
- _define_property$3(_assert_this_initialized$2(_this), "asserts", void 0);
39258
- _define_property$3(_assert_this_initialized$2(_this), "streamingAsserts", void 0);
39259
- _define_property$3(_assert_this_initialized$2(_this), "options", void 0);
39260
- _define_property$3(_assert_this_initialized$2(_this), "functions", void 0);
39261
- _define_property$3(_assert_this_initialized$2(_this), "funcProc", void 0);
39262
- _define_property$3(_assert_this_initialized$2(_this), "functionList", void 0);
39263
- _define_property$3(_assert_this_initialized$2(_this), "updateSigForFunctions", function() {
39249
+ _define_property$2(_assert_this_initialized$2(_this), "ai", void 0);
39250
+ _define_property$2(_assert_this_initialized$2(_this), "pt", void 0);
39251
+ _define_property$2(_assert_this_initialized$2(_this), "asserts", void 0);
39252
+ _define_property$2(_assert_this_initialized$2(_this), "streamingAsserts", void 0);
39253
+ _define_property$2(_assert_this_initialized$2(_this), "options", void 0);
39254
+ _define_property$2(_assert_this_initialized$2(_this), "functions", void 0);
39255
+ _define_property$2(_assert_this_initialized$2(_this), "funcProc", void 0);
39256
+ _define_property$2(_assert_this_initialized$2(_this), "functionList", void 0);
39257
+ _define_property$2(_assert_this_initialized$2(_this), "updateSigForFunctions", function() {
39264
39258
  // AI supports function calling natively so
39265
39259
  // no need to add fields for function call
39266
39260
  if (_this.ai.getFeatures().functions) {
@@ -39278,14 +39272,14 @@ var AxGenerate = /*#__PURE__*/ function(AxProgramWithSignature) {
39278
39272
  isOptional: true
39279
39273
  });
39280
39274
  });
39281
- _define_property$3(_assert_this_initialized$2(_this), "addAssert", function(fn, message, optional) {
39275
+ _define_property$2(_assert_this_initialized$2(_this), "addAssert", function(fn, message, optional) {
39282
39276
  _this.asserts.push({
39283
39277
  fn: fn,
39284
39278
  message: message,
39285
39279
  optional: optional
39286
39280
  });
39287
39281
  });
39288
- _define_property$3(_assert_this_initialized$2(_this), "addStreamingAssert", function(fieldName, fn, message, optional) {
39282
+ _define_property$2(_assert_this_initialized$2(_this), "addStreamingAssert", function(fieldName, fn, message, optional) {
39289
39283
  _this.streamingAsserts.push({
39290
39284
  fieldName: fieldName,
39291
39285
  fn: fn,
@@ -39294,7 +39288,7 @@ var AxGenerate = /*#__PURE__*/ function(AxProgramWithSignature) {
39294
39288
  });
39295
39289
  });
39296
39290
  var _this1 = _assert_this_initialized$2(_this);
39297
- _define_property$3(_assert_this_initialized$2(_this), "processFunctions", function() {
39291
+ _define_property$2(_assert_this_initialized$2(_this), "processFunctions", function() {
39298
39292
  var _ref = _async_to_generator$1(function(functionCalls, mem, sessionId, traceId) {
39299
39293
  var promises, results;
39300
39294
  return _ts_generator$1(this, function(_state) {
@@ -39363,7 +39357,7 @@ var AxGenerate = /*#__PURE__*/ function(AxProgramWithSignature) {
39363
39357
  }
39364
39358
  return _this;
39365
39359
  }
39366
- _create_class$2(AxGenerate, [
39360
+ _create_class$1(AxGenerate, [
39367
39361
  {
39368
39362
  key: "forwardSendRequest",
39369
39363
  value: function forwardSendRequest(param) {
@@ -39902,7 +39896,7 @@ var AxGenerate = /*#__PURE__*/ function(AxProgramWithSignature) {
39902
39896
  _state.sent()
39903
39897
  ];
39904
39898
  case 2:
39905
- attributes = (_obj = {}, _define_property$3(_obj, "generate.signature", _this.signature.toString()), _define_property$3(_obj, "generate.functions", (_this_functionList = _this.functionList) !== null && _this_functionList !== void 0 ? _this_functionList : "none"), _obj);
39899
+ attributes = (_obj = {}, _define_property$2(_obj, "generate.signature", _this.signature.toString()), _define_property$2(_obj, "generate.functions", (_this_functionList = _this.functionList) !== null && _this_functionList !== void 0 ? _this_functionList : "none"), _obj);
39906
39900
  return [
39907
39901
  4,
39908
39902
  tracer.startActiveSpan("Generate", {
@@ -39983,7 +39977,7 @@ function _assert_this_initialized$1(self) {
39983
39977
  }
39984
39978
  return self;
39985
39979
  }
39986
- function _class_call_check$3(instance, Constructor) {
39980
+ function _class_call_check$2(instance, Constructor) {
39987
39981
  if (!(instance instanceof Constructor)) {
39988
39982
  throw new TypeError("Cannot call a class as a function");
39989
39983
  }
@@ -40069,7 +40063,7 @@ var AxChainOfThought = /*#__PURE__*/ function(AxGenerate) {
40069
40063
  _inherits$1(AxChainOfThought, AxGenerate);
40070
40064
  var _super = _create_super$1(AxChainOfThought);
40071
40065
  function AxChainOfThought(ai, signature, options) {
40072
- _class_call_check$3(this, AxChainOfThought);
40066
+ _class_call_check$2(this, AxChainOfThought);
40073
40067
  var sig = new AxSignature(signature);
40074
40068
  var description = "Let's work this out in a step by step way in order to ensure we have the right answer.";
40075
40069
  sig.setOutputFields([
@@ -40090,12 +40084,12 @@ function _assert_this_initialized(self) {
40090
40084
  }
40091
40085
  return self;
40092
40086
  }
40093
- function _class_call_check$2(instance, Constructor) {
40087
+ function _class_call_check$1(instance, Constructor) {
40094
40088
  if (!(instance instanceof Constructor)) {
40095
40089
  throw new TypeError("Cannot call a class as a function");
40096
40090
  }
40097
40091
  }
40098
- function _define_property$2(obj, key, value) {
40092
+ function _define_property$1(obj, key, value) {
40099
40093
  if (key in obj) {
40100
40094
  Object.defineProperty(obj, key, {
40101
40095
  value: value,
@@ -40137,7 +40131,7 @@ function _object_spread$1(target) {
40137
40131
  }));
40138
40132
  }
40139
40133
  ownKeys.forEach(function(key) {
40140
- _define_property$2(target, key, source[key]);
40134
+ _define_property$1(target, key, source[key]);
40141
40135
  });
40142
40136
  }
40143
40137
  return target;
@@ -40211,7 +40205,7 @@ var AxReAct = /*#__PURE__*/ function(AxChainOfThought) {
40211
40205
  _inherits(AxReAct, AxChainOfThought);
40212
40206
  var _super = _create_super(AxReAct);
40213
40207
  function AxReAct(ai, signature, options) {
40214
- _class_call_check$2(this, AxReAct);
40208
+ _class_call_check$1(this, AxReAct);
40215
40209
  if (!(options === null || options === void 0 ? void 0 : options.functions) || options.functions.length === 0) {
40216
40210
  throw new Error("No functions provided");
40217
40211
  }
@@ -40282,12 +40276,12 @@ function _async_to_generator(fn) {
40282
40276
  });
40283
40277
  };
40284
40278
  }
40285
- function _class_call_check$1(instance, Constructor) {
40279
+ function _class_call_check(instance, Constructor) {
40286
40280
  if (!(instance instanceof Constructor)) {
40287
40281
  throw new TypeError("Cannot call a class as a function");
40288
40282
  }
40289
40283
  }
40290
- function _defineProperties$1(target, props) {
40284
+ function _defineProperties(target, props) {
40291
40285
  for(var i = 0; i < props.length; i++){
40292
40286
  var descriptor = props[i];
40293
40287
  descriptor.enumerable = descriptor.enumerable || false;
@@ -40296,12 +40290,12 @@ function _defineProperties$1(target, props) {
40296
40290
  Object.defineProperty(target, descriptor.key, descriptor);
40297
40291
  }
40298
40292
  }
40299
- function _create_class$1(Constructor, protoProps, staticProps) {
40300
- if (protoProps) _defineProperties$1(Constructor.prototype, protoProps);
40301
- if (staticProps) _defineProperties$1(Constructor, staticProps);
40293
+ function _create_class(Constructor, protoProps, staticProps) {
40294
+ if (protoProps) _defineProperties(Constructor.prototype, protoProps);
40295
+ if (staticProps) _defineProperties(Constructor, staticProps);
40302
40296
  return Constructor;
40303
40297
  }
40304
- function _define_property$1(obj, key, value) {
40298
+ function _define_property(obj, key, value) {
40305
40299
  if (key in obj) {
40306
40300
  Object.defineProperty(obj, key, {
40307
40301
  value: value,
@@ -40330,7 +40324,7 @@ function _object_spread(target) {
40330
40324
  }));
40331
40325
  }
40332
40326
  ownKeys.forEach(function(key) {
40333
- _define_property$1(target, key, source[key]);
40327
+ _define_property(target, key, source[key]);
40334
40328
  });
40335
40329
  }
40336
40330
  return target;
@@ -40469,13 +40463,13 @@ var AxAgent = /*#__PURE__*/ function() {
40469
40463
  function AxAgent(ai, param, options) {
40470
40464
  var _this = this;
40471
40465
  var name = param.name, description = param.description, signature = param.signature, agents = param.agents, functions = param.functions;
40472
- _class_call_check$1(this, AxAgent);
40473
- _define_property$1(this, "signature", void 0);
40474
- _define_property$1(this, "program", void 0);
40475
- _define_property$1(this, "name", void 0);
40476
- _define_property$1(this, "description", void 0);
40477
- _define_property$1(this, "subAgentList", void 0);
40478
- _define_property$1(this, "func", void 0);
40466
+ _class_call_check(this, AxAgent);
40467
+ _define_property(this, "signature", void 0);
40468
+ _define_property(this, "program", void 0);
40469
+ _define_property(this, "name", void 0);
40470
+ _define_property(this, "description", void 0);
40471
+ _define_property(this, "subAgentList", void 0);
40472
+ _define_property(this, "func", void 0);
40479
40473
  this.signature = new AxSignature(signature);
40480
40474
  var _agents_map;
40481
40475
  var funcs = _to_consumable_array(functions !== null && functions !== void 0 ? functions : []).concat(_to_consumable_array((_agents_map = agents === null || agents === void 0 ? void 0 : agents.map(function(a) {
@@ -40525,7 +40519,7 @@ var AxAgent = /*#__PURE__*/ function() {
40525
40519
  }
40526
40520
  }
40527
40521
  }
40528
- _create_class$1(AxAgent, [
40522
+ _create_class(AxAgent, [
40529
40523
  {
40530
40524
  key: "setExamples",
40531
40525
  value: function setExamples(examples) {
@@ -40597,7 +40591,7 @@ var AxAgent = /*#__PURE__*/ function() {
40597
40591
  _state.sent()
40598
40592
  ];
40599
40593
  case 2:
40600
- attributes = (_obj = {}, _define_property$1(_obj, "agent.name", _this.name), _define_property$1(_obj, "agent.description", _this.description), _define_property$1(_obj, "agent.subAgents", (_this_subAgentList = _this.subAgentList) !== null && _this_subAgentList !== void 0 ? _this_subAgentList : "none"), _obj);
40594
+ attributes = (_obj = {}, _define_property(_obj, "agent.name", _this.name), _define_property(_obj, "agent.description", _this.description), _define_property(_obj, "agent.subAgents", (_this_subAgentList = _this.subAgentList) !== null && _this_subAgentList !== void 0 ? _this_subAgentList : "none"), _obj);
40601
40595
  return [
40602
40596
  4,
40603
40597
  options === null || options === void 0 ? void 0 : options.tracer.startActiveSpan("Agent", {
@@ -40657,38 +40651,6 @@ function toCamelCase(inputString) {
40657
40651
  return camelCaseString;
40658
40652
  }
40659
40653
 
40660
- function _class_call_check(instance, Constructor) {
40661
- if (!(instance instanceof Constructor)) {
40662
- throw new TypeError("Cannot call a class as a function");
40663
- }
40664
- }
40665
- function _defineProperties(target, props) {
40666
- for(var i = 0; i < props.length; i++){
40667
- var descriptor = props[i];
40668
- descriptor.enumerable = descriptor.enumerable || false;
40669
- descriptor.configurable = true;
40670
- if ("value" in descriptor) descriptor.writable = true;
40671
- Object.defineProperty(target, descriptor.key, descriptor);
40672
- }
40673
- }
40674
- function _create_class(Constructor, protoProps, staticProps) {
40675
- if (protoProps) _defineProperties(Constructor.prototype, protoProps);
40676
- if (staticProps) _defineProperties(Constructor, staticProps);
40677
- return Constructor;
40678
- }
40679
- function _define_property(obj, key, value) {
40680
- if (key in obj) {
40681
- Object.defineProperty(obj, key, {
40682
- value: value,
40683
- enumerable: true,
40684
- configurable: true,
40685
- writable: true
40686
- });
40687
- } else {
40688
- obj[key] = value;
40689
- }
40690
- return obj;
40691
- }
40692
40654
  var AxJSInterpreterPermission;
40693
40655
  (function(AxJSInterpreterPermission) {
40694
40656
  AxJSInterpreterPermission["FS"] = "node:fs";
@@ -40697,69 +40659,6 @@ var AxJSInterpreterPermission;
40697
40659
  AxJSInterpreterPermission["CRYPTO"] = "crypto";
40698
40660
  AxJSInterpreterPermission["PROCESS"] = "process";
40699
40661
  })(AxJSInterpreterPermission || (AxJSInterpreterPermission = {}));
40700
- var AxJSInterpreter = /*#__PURE__*/ function() {
40701
- function AxJSInterpreter() {
40702
- var _ref = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, _ref_permissions = _ref.permissions, permissions = _ref_permissions === void 0 ? [] : _ref_permissions;
40703
- _class_call_check(this, AxJSInterpreter);
40704
- _define_property(this, "permissions", void 0);
40705
- this.permissions = permissions !== null && permissions !== void 0 ? permissions : [];
40706
- }
40707
- _create_class(AxJSInterpreter, [
40708
- {
40709
- key: "codeInterpreterJavascript",
40710
- value: function codeInterpreterJavascript(code) {
40711
- var context = {
40712
- console: console
40713
- };
40714
- if (this.permissions.includes(AxJSInterpreterPermission.FS)) {
40715
- context.fs = _fs__namespace;
40716
- }
40717
- if (this.permissions.includes(AxJSInterpreterPermission.NET)) {
40718
- context.http = _http__namespace;
40719
- context.https = _https__namespace;
40720
- }
40721
- if (this.permissions.includes(AxJSInterpreterPermission.OS)) {
40722
- context.os = _os__namespace;
40723
- }
40724
- if (this.permissions.includes(AxJSInterpreterPermission.CRYPTO)) {
40725
- context.crypto = _crypto__namespace;
40726
- }
40727
- if (this.permissions.includes(AxJSInterpreterPermission.PROCESS)) {
40728
- context.process = _process__namespace;
40729
- }
40730
- return vm.runInNewContext("(function() { ".concat(code, " })()"), context);
40731
- }
40732
- },
40733
- {
40734
- key: "toFunction",
40735
- value: function toFunction() {
40736
- var _this = this;
40737
- return {
40738
- name: "javascriptInterpreter",
40739
- description: "Use this function to run Javascript code and get any expected return value.",
40740
- parameters: {
40741
- type: "object",
40742
- properties: {
40743
- code: {
40744
- type: "string",
40745
- description: "JS code with a return value in the end."
40746
- }
40747
- },
40748
- required: [
40749
- "code"
40750
- ]
40751
- },
40752
- func: function(param) {
40753
- var code = param.code;
40754
- return _this.codeInterpreterJavascript(code);
40755
- }
40756
- };
40757
- }
40758
- }
40759
- ]);
40760
- return AxJSInterpreter;
40761
- }
40762
- ();
40763
40662
 
40764
40663
  let DspService = class DspService {
40765
40664
  async prepareFunctions(functions, context) {
@@ -40775,7 +40674,6 @@ let DspService = class DspService {
40775
40674
  }));
40776
40675
  }
40777
40676
  async model(params, _pinsSettingsList, _context) {
40778
- // const { AxAI } = await eval(`import('@ax-llm/ax')`);
40779
40677
  const { name, options } = params;
40780
40678
  const modelInstance = new AxAI(_extends({
40781
40679
  name
@@ -40784,7 +40682,6 @@ let DspService = class DspService {
40784
40682
  }
40785
40683
  async modelOpenAI(params, _pinsSettingsList, context) {
40786
40684
  var _context_privates_OPENAI_API_KEY, _context_privates_OPENAI_SERVER;
40787
- // const { AxAIOpenAI } = await eval(`import('@ax-llm/ax')`);
40788
40685
  const { apiKey = (_context_privates_OPENAI_API_KEY = context.privates.OPENAI_API_KEY) != null ? _context_privates_OPENAI_API_KEY : process.env['OPENAI_API_KEY'], apiURL = (_context_privates_OPENAI_SERVER = context.privates.OPENAI_SERVER) != null ? _context_privates_OPENAI_SERVER : process.env['OPENAI_SERVER'], config, options } = params;
40789
40686
  const modelInstance = new AxAIOpenAI({
40790
40687
  apiKey,
@@ -40796,7 +40693,6 @@ let DspService = class DspService {
40796
40693
  }
40797
40694
  async modelAzureOpenAi(params, _pinsSettingsList, context) {
40798
40695
  var _context_privates_AZURE_OPENAI_API_KEY, _context_privates_AZURE_OPENAI_API_INSTANCE_NAME, _context_privates_AZURE_OPENAI_API_DEPLOYMENT_NAME, _context_privates_AZURE_OPENAI_API_VERSION;
40799
- // const { AxAIAzureOpenAI } = await eval(`import('@ax-llm/ax')`);
40800
40696
  const { apiKey = (_context_privates_AZURE_OPENAI_API_KEY = context.privates.AZURE_OPENAI_API_KEY) != null ? _context_privates_AZURE_OPENAI_API_KEY : process.env['AZURE_OPENAI_API_KEY'], resourceName = (_context_privates_AZURE_OPENAI_API_INSTANCE_NAME = context.privates.AZURE_OPENAI_API_INSTANCE_NAME) != null ? _context_privates_AZURE_OPENAI_API_INSTANCE_NAME : process.env['AZURE_OPENAI_API_INSTANCE_NAME'], deploymentName = (_context_privates_AZURE_OPENAI_API_DEPLOYMENT_NAME = context.privates.AZURE_OPENAI_API_DEPLOYMENT_NAME) != null ? _context_privates_AZURE_OPENAI_API_DEPLOYMENT_NAME : process.env['AZURE_OPENAI_API_DEPLOYMENT_NAME'], version = (_context_privates_AZURE_OPENAI_API_VERSION = context.privates.AZURE_OPENAI_API_VERSION) != null ? _context_privates_AZURE_OPENAI_API_VERSION : process.env['AZURE_OPENAI_API_VERSION'], config, options } = params;
40801
40697
  const modelInstance = new AxAIAzureOpenAI({
40802
40698
  apiKey,
@@ -40809,7 +40705,6 @@ let DspService = class DspService {
40809
40705
  return modelInstance;
40810
40706
  }
40811
40707
  async modelOllama(params, _pinsSettingsList, context) {
40812
- // const { AxAIOllama } = await eval(`import('@ax-llm/ax')`);
40813
40708
  const { model, url = context.privates.OLLAMA_SERVER ? context.privates.OLLAMA_SERVER + '/v1' : process.env['OLLAMA_SERVER'] ? process.env['OLLAMA_SERVER'] + '/v1' : 'http://localhost:11434/v1', apiKey, config, options } = params;
40814
40709
  const modelInstance = new AxAIOllama({
40815
40710
  model,
@@ -40821,7 +40716,6 @@ let DspService = class DspService {
40821
40716
  return modelInstance;
40822
40717
  }
40823
40718
  async generate(params, _pinsSettingsList, context) {
40824
- // const { AxGenerate } = await eval(`import('@ax-llm/ax')`);
40825
40719
  const { model = context.privates.MODEL_DSP, functions = [], signature, input } = params;
40826
40720
  const modelInstance = await executePinsList(model, context);
40827
40721
  const gen = new AxGenerate(modelInstance, signature, {
@@ -40831,7 +40725,6 @@ let DspService = class DspService {
40831
40725
  return result;
40832
40726
  }
40833
40727
  async chainOfThought(params, _pinsSettingsList, context) {
40834
- // const { AxChainOfThought } = await eval(`import('@ax-llm/ax')`);
40835
40728
  const { model = context.privates.MODEL_DSP, functions = [], signature, input } = params;
40836
40729
  const modelInstance = await executePinsList(model, context);
40837
40730
  const gen = new AxChainOfThought(modelInstance, signature, {
@@ -40840,35 +40733,52 @@ let DspService = class DspService {
40840
40733
  const result = await gen.forward(input);
40841
40734
  return result;
40842
40735
  }
40736
+ async react(params, _pinsSettingsList, context) {
40737
+ const { model = context.privates.MODEL_DSP, functions = [], signature, input } = params;
40738
+ const modelInstance = await executePinsList(model, context);
40739
+ const gen = new AxReAct(modelInstance, signature, {
40740
+ functions: await this.prepareFunctions(functions, context)
40741
+ });
40742
+ const result = await gen.forward(input);
40743
+ return result;
40744
+ }
40843
40745
  async agent(params, _pinsSettingsList, context) {
40844
- // const { AxAgent } = await eval(`import('@ax-llm/ax')`);
40845
- const { model = context.privates.MODEL_DSP, functions = [], demos = [], name, description, signature } = params;
40746
+ const { model = context.privates.MODEL_DSP, functions = [], agents = [], forward = true, name, description, signature, input } = params;
40846
40747
  const modelInstance = await executePinsList(model, context);
40847
40748
  const agent = new AxAgent(modelInstance, {
40848
40749
  name,
40849
40750
  description,
40850
40751
  signature,
40851
- functions: await this.prepareFunctions(functions, context)
40752
+ functions: await this.prepareFunctions(functions, context),
40753
+ agents: await Promise.all(agents.map(async (execute)=>await executePinsList([
40754
+ _extends({}, execute, {
40755
+ properties: _extends({}, execute.properties, {
40756
+ forward: false
40757
+ })
40758
+ })
40759
+ ], context)))
40852
40760
  });
40853
- return agent;
40854
- }
40855
- async forward(params, _pinsSettingsList, _context) {
40856
- const { agent, input } = params;
40761
+ if (!forward) {
40762
+ return agent;
40763
+ }
40857
40764
  const result = await agent.forward(input);
40858
40765
  return result;
40859
40766
  }
40860
- async jsInterpreter(_params, _pinsSettingsList, _context) {
40861
- return new AxJSInterpreter();
40862
- }
40863
40767
  };
40864
40768
  const model = (params, pinsSettingsList, context)=>new DspService().model(params, pinsSettingsList, context);
40865
40769
  const modelOpenAI = (params, pinsSettingsList, context)=>new DspService().modelOpenAI(params, pinsSettingsList, context);
40866
40770
  const modelAzureOpenAi = (params, pinsSettingsList, context)=>new DspService().modelAzureOpenAi(params, pinsSettingsList, context);
40867
40771
  const modelOllama = (params, pinsSettingsList, context)=>new DspService().modelOllama(params, pinsSettingsList, context);
40868
40772
  const generate = (params, pinsSettingsList, context)=>new DspService().generate(params, pinsSettingsList, context);
40773
+ const chainOfThought = (params, pinsSettingsList, context)=>new DspService().chainOfThought(params, pinsSettingsList, context);
40774
+ const react = (params, pinsSettingsList, context)=>new DspService().react(params, pinsSettingsList, context);
40775
+ const agent = (params, pinsSettingsList, context)=>new DspService().agent(params, pinsSettingsList, context);
40869
40776
 
40777
+ exports.agent = agent;
40778
+ exports.chainOfThought = chainOfThought;
40870
40779
  exports.generate = generate;
40871
40780
  exports.model = model;
40872
40781
  exports.modelAzureOpenAi = modelAzureOpenAi;
40873
40782
  exports.modelOllama = modelOllama;
40874
40783
  exports.modelOpenAI = modelOpenAI;
40784
+ exports.react = react;