@digipair/skill-dsp 0.136.0 → 0.136.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.esm.js CHANGED
@@ -1,4 +1,4 @@
1
- function _mergeNamespaces(n, m) {
1
+ function _mergeNamespaces$1(n, m) {
2
2
  m.forEach(function(e) {
3
3
  e && typeof e !== 'string' && !Array.isArray(e) && Object.keys(e).forEach(function(k) {
4
4
  if (k !== 'default' && !(k in n)) {
@@ -18,7 +18,7 @@ var commonjsGlobal$1 = typeof globalThis !== 'undefined' ? globalThis : typeof w
18
18
  function getDefaultExportFromCjs$1(x) {
19
19
  return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
20
20
  }
21
- var handlebars_min$1 = {
21
+ var handlebars_min = {
22
22
  exports: {}
23
23
  };
24
24
  /**!
@@ -46,7 +46,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
46
46
  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
47
47
  THE SOFTWARE.
48
48
 
49
- */ handlebars_min$1.exports;
49
+ */ handlebars_min.exports;
50
50
  (function(module1, exports1) {
51
51
  function _instanceof(left, right) {
52
52
  if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
@@ -8127,12 +8127,12 @@ THE SOFTWARE.
8127
8127
  }
8128
8128
  ]);
8129
8129
  });
8130
- })(handlebars_min$1, handlebars_min$1.exports);
8131
- var handlebars_minExports = handlebars_min$1.exports;
8132
- var handlebars_min = /*@__PURE__*/ getDefaultExportFromCjs$1(handlebars_minExports);
8133
- var HandlebarsNamespace = /*#__PURE__*/ _mergeNamespaces({
8130
+ })(handlebars_min, handlebars_min.exports);
8131
+ var handlebars_minExports = handlebars_min.exports;
8132
+ var handlebars_min_default = /*@__PURE__*/ getDefaultExportFromCjs$1(handlebars_minExports);
8133
+ var HandlebarsNamespace = /*#__PURE__*/ _mergeNamespaces$1({
8134
8134
  __proto__: null,
8135
- default: handlebars_min
8135
+ default: handlebars_min_default
8136
8136
  }, [
8137
8137
  handlebars_minExports
8138
8138
  ]);
@@ -17295,6 +17295,7 @@ class represent prop names.
17295
17295
  this.deserialize = config.deserialize || function() {
17296
17296
  throw new Error("This node type doesn't define a deserialize function");
17297
17297
  };
17298
+ this.combine = config.combine || null;
17298
17299
  }
17299
17300
  _create_class$u(NodeProp, [
17300
17301
  {
@@ -17407,10 +17408,16 @@ represented by another tree.
17407
17408
  */ overlay, /**
17408
17409
  The parser used to create this subtree.
17409
17410
  */ parser) {
17411
+ var /**
17412
+ [Indicates](#common.IterMode.EnterBracketed) that the nested
17413
+ content is delineated with some kind
17414
+ of bracket token.
17415
+ */ bracketed = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : false;
17410
17416
  _class_call_check$z(this, MountedTree);
17411
17417
  this.tree = tree;
17412
17418
  this.overlay = overlay;
17413
17419
  this.parser = parser;
17420
+ this.bracketed = bracketed;
17414
17421
  }
17415
17422
  _create_class$u(MountedTree, null, [
17416
17423
  {
@@ -17626,7 +17633,9 @@ types in it, so that the ids fit into 16-bit typed array slots.
17626
17633
  var add = source(type);
17627
17634
  if (add) {
17628
17635
  if (!newProps) newProps = Object.assign({}, type.props);
17629
- newProps[add[0].id] = add[1];
17636
+ var value = add[1], prop = add[0];
17637
+ if (prop.combine && prop.id in newProps) value = prop.combine(newProps[prop.id], value);
17638
+ newProps[prop.id] = value;
17630
17639
  }
17631
17640
  }
17632
17641
  } catch (err) {
@@ -17692,6 +17701,12 @@ operator to enable multiple ones.
17692
17701
  library to not enter mounted overlays if one covers the given
17693
17702
  position.
17694
17703
  */ IterMode[IterMode["IgnoreOverlays"] = 8] = "IgnoreOverlays";
17704
+ /**
17705
+ When set, positions on the boundary of a mounted overlay tree
17706
+ that has its [`bracketed`](#common.NestedParse.bracketed) flag
17707
+ set will enter that tree regardless of side. Only supported in
17708
+ [`enter`](#common.SyntaxNode.enter), not in cursors.
17709
+ */ IterMode[IterMode["EnterBracketed"] = 16] = "EnterBracketed";
17695
17710
  })(IterMode || (IterMode = {}));
17696
17711
  /**
17697
17712
  A piece of syntax tree. There are two ways to approach these
@@ -18250,17 +18265,17 @@ var TreeNode = /*#__PURE__*/ function(BaseNode) {
18250
18265
  var mode = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : 0;
18251
18266
  for(var parent = this;;){
18252
18267
  for(var _parent__tree = parent._tree, children = _parent__tree.children, positions = _parent__tree.positions, e = dir > 0 ? children.length : -1; i != e; i += dir){
18253
- var next = children[i], start = positions[i] + parent.from;
18254
- if (!checkSide(side, pos, start, start + next.length)) continue;
18268
+ var next = children[i], start = positions[i] + parent.from, mounted = void 0;
18269
+ if (!(mode & IterMode.EnterBracketed && _instanceof$i(next, Tree) && (mounted = MountedTree.get(next)) && !mounted.overlay && mounted.bracketed && pos >= start && pos <= start + next.length) && !checkSide(side, pos, start, start + next.length)) continue;
18255
18270
  if (_instanceof$i(next, TreeBuffer)) {
18256
18271
  if (mode & IterMode.ExcludeBuffers) continue;
18257
18272
  var index = next.findChild(0, next.buffer.length, dir, pos - start, side);
18258
18273
  if (index > -1) return new BufferNode(new BufferContext(parent, next, i, start), null, index);
18259
18274
  } else if (mode & IterMode.IncludeAnonymous || !next.type.isAnonymous || hasChild(next)) {
18260
- var mounted = void 0;
18261
- if (!(mode & IterMode.IgnoreMounts) && (mounted = MountedTree.get(next)) && !mounted.overlay) return new TreeNode(mounted.tree, start, i, parent);
18275
+ var mounted1 = void 0;
18276
+ if (!(mode & IterMode.IgnoreMounts) && (mounted1 = MountedTree.get(next)) && !mounted1.overlay) return new TreeNode(mounted1.tree, start, i, parent);
18262
18277
  var inner = new TreeNode(next, start, i, parent);
18263
- return mode & IterMode.IncludeAnonymous || !inner.type.isAnonymous ? inner : inner.nextChild(dir < 0 ? next.children.length - 1 : 0, dir, pos, side);
18278
+ return mode & IterMode.IncludeAnonymous || !inner.type.isAnonymous ? inner : inner.nextChild(dir < 0 ? next.children.length - 1 : 0, dir, pos, side, mode);
18264
18279
  }
18265
18280
  }
18266
18281
  if (mode & IterMode.IncludeAnonymous || !parent.type.isAnonymous) return null;
@@ -18295,18 +18310,24 @@ var TreeNode = /*#__PURE__*/ function(BaseNode) {
18295
18310
  return this.nextChild(this._tree.children.length - 1, -1, pos, -2 /* Side.Before */ );
18296
18311
  }
18297
18312
  },
18313
+ {
18314
+ key: "prop",
18315
+ value: function prop(prop) {
18316
+ return this._tree.prop(prop);
18317
+ }
18318
+ },
18298
18319
  {
18299
18320
  key: "enter",
18300
18321
  value: function enter(pos, side) {
18301
18322
  var mode = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 0;
18302
18323
  var mounted;
18303
18324
  if (!(mode & IterMode.IgnoreOverlays) && (mounted = MountedTree.get(this._tree)) && mounted.overlay) {
18304
- var rPos = pos - this.from;
18325
+ var rPos = pos - this.from, enterBracketed = mode & IterMode.EnterBracketed && mounted.bracketed;
18305
18326
  var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
18306
18327
  try {
18307
18328
  for(var _iterator = mounted.overlay[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
18308
18329
  var _step_value = _step.value, from = _step_value.from, to = _step_value.to;
18309
- if ((side > 0 ? from <= rPos : from < rPos) && (side < 0 ? to >= rPos : to > rPos)) return new TreeNode(mounted.tree, mounted.overlay[0].from + this.from, -1, this);
18330
+ if ((side > 0 || enterBracketed ? from <= rPos : from < rPos) && (side < 0 || enterBracketed ? to >= rPos : to > rPos)) return new TreeNode(mounted.tree, mounted.overlay[0].from + this.from, -1, this);
18310
18331
  }
18311
18332
  } catch (err) {
18312
18333
  _didIteratorError = true;
@@ -18470,6 +18491,12 @@ var BufferNode = /*#__PURE__*/ function(BaseNode) {
18470
18491
  return this.child(-1, pos, -2 /* Side.Before */ );
18471
18492
  }
18472
18493
  },
18494
+ {
18495
+ key: "prop",
18496
+ value: function prop(prop) {
18497
+ return this.type.prop(prop);
18498
+ }
18499
+ },
18473
18500
  {
18474
18501
  key: "enter",
18475
18502
  value: function enter(pos, side) {
@@ -18600,11 +18627,8 @@ A tree cursor object focuses on a given node in a syntax tree, and
18600
18627
  allows you to move to adjacent nodes.
18601
18628
  */ var TreeCursor = /*#__PURE__*/ function() {
18602
18629
  function TreeCursor(node) {
18603
- var /**
18604
- @internal
18605
- */ mode = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0;
18630
+ var mode = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0;
18606
18631
  _class_call_check$z(this, TreeCursor);
18607
- this.mode = mode;
18608
18632
  /**
18609
18633
  @internal
18610
18634
  */ this.buffer = null;
@@ -18613,6 +18637,7 @@ allows you to move to adjacent nodes.
18613
18637
  @internal
18614
18638
  */ this.index = 0;
18615
18639
  this.bufferNode = null;
18640
+ this.mode = mode & ~IterMode.EnterBracketed;
18616
18641
  if (_instanceof$i(node, TreeNode)) {
18617
18642
  this.yieldNode(node);
18618
18643
  } else {
@@ -18956,7 +18981,7 @@ function buildTree(data) {
18956
18981
  function takeNode(parentStart, minPos, children, positions, inRepeat, depth) {
18957
18982
  var id = cursor.id, start = cursor.start, end = cursor.end, size = cursor.size;
18958
18983
  var lookAheadAtStart = lookAhead, contextAtStart = contextHash;
18959
- while(size < 0){
18984
+ if (size < 0) {
18960
18985
  cursor.next();
18961
18986
  if (size == -1 /* SpecialRecord.Reuse */ ) {
18962
18987
  var node = reused[id];
@@ -19123,7 +19148,7 @@ function buildTree(data) {
19123
19148
  fork.next();
19124
19149
  while(fork.pos > startPos){
19125
19150
  if (fork.size < 0) {
19126
- if (fork.size == -3 /* SpecialRecord.ContextChange */ ) localSkipped += 4;
19151
+ if (fork.size == -3 /* SpecialRecord.ContextChange */ || fork.size == -4 /* SpecialRecord.LookAhead */ ) localSkipped += 4;
19127
19152
  else break scan;
19128
19153
  } else if (fork.id >= minRepeatType) {
19129
19154
  localSkipped += 4;
@@ -19562,11 +19587,11 @@ about the parse state.
19562
19587
  var _a;
19563
19588
  var depth = action >> 19 /* Action.ReduceDepthShift */ , type = action & 65535 /* Action.ValueMask */ ;
19564
19589
  var parser = this.p.parser;
19565
- var lookaheadRecord = this.reducePos < this.pos - 25 /* Lookahead.Margin */ ;
19566
- if (lookaheadRecord) this.setLookAhead(this.pos);
19590
+ var lookaheadRecord = this.reducePos < this.pos - 25 /* Lookahead.Margin */ && this.setLookAhead(this.pos);
19567
19591
  var dPrec = parser.dynamicPrecedence(type);
19568
19592
  if (dPrec) this.score += dPrec;
19569
19593
  if (depth == 0) {
19594
+ if (type < parser.minRepeatTerm && this.reducePos < this.pos) this.reducePos = this.pos;
19570
19595
  this.pushState(parser.getGoto(this.state, type, true), this.reducePos);
19571
19596
  // Zero-depth reductions are a special case—they add stuff to
19572
19597
  // the stack without popping anything off.
@@ -19580,7 +19605,9 @@ about the parse state.
19580
19605
  // expression and the state that we'll be staying in, which should
19581
19606
  // be moved to `this.state`).
19582
19607
  var base = this.stack.length - (depth - 1) * 3 - (action & 262144 /* Action.StayFlag */ ? 6 : 0);
19583
- var start = base ? this.stack[base - 2] : this.p.ranges[0].from, size = this.reducePos - start;
19608
+ var start = base ? this.stack[base - 2] : this.p.ranges[0].from;
19609
+ if (type < parser.minRepeatTerm && start == this.reducePos && this.reducePos < this.pos) this.reducePos = this.pos;
19610
+ var size = this.reducePos - start;
19584
19611
  // This is a kludge to try and detect overly deep left-associative
19585
19612
  // trees, which will not increase the parse stack depth and thus
19586
19613
  // won't be caught by the regular stack-depth limit check.
@@ -19619,15 +19646,11 @@ about the parse state.
19619
19646
  var size = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : 4, mustSink = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : false;
19620
19647
  if (term == 0 /* Term.Err */ && (!this.stack.length || this.stack[this.stack.length - 1] < this.buffer.length + this.bufferBase)) {
19621
19648
  // Try to omit/merge adjacent error nodes
19622
- var cur = this, top = this.buffer.length;
19623
- if (top == 0 && cur.parent) {
19624
- top = cur.bufferBase - cur.parent.bufferBase;
19625
- cur = cur.parent;
19626
- }
19627
- if (top > 0 && cur.buffer[top - 4] == 0 /* Term.Err */ && cur.buffer[top - 1] > -1) {
19649
+ var top = this.buffer.length;
19650
+ if (top > 0 && this.buffer[top - 4] == 0 /* Term.Err */ && this.buffer[top - 1] > -1) {
19628
19651
  if (start == end) return;
19629
- if (cur.buffer[top - 2] >= start) {
19630
- cur.buffer[top - 2] = end;
19652
+ if (this.buffer[top - 2] >= start) {
19653
+ this.buffer[top - 2] = end;
19631
19654
  return;
19632
19655
  }
19633
19656
  }
@@ -19636,7 +19659,7 @@ about the parse state.
19636
19659
  this.buffer.push(term, start, end, size);
19637
19660
  } else {
19638
19661
  var index = this.buffer.length;
19639
- if (index > 0 && this.buffer[index - 4] != 0 /* Term.Err */ ) {
19662
+ if (index > 0 && (this.buffer[index - 4] != 0 /* Term.Err */ || this.buffer[index - 1] < 0)) {
19640
19663
  var mustMove = false;
19641
19664
  for(var scan = index; scan > 0 && this.buffer[scan - 2] > end; scan -= 4){
19642
19665
  if (this.buffer[scan - 1] >= 0) {
@@ -19671,11 +19694,11 @@ about the parse state.
19671
19694
  this.pushState(action & 65535 /* Action.ValueMask */ , this.pos);
19672
19695
  } else if ((action & 262144 /* Action.StayFlag */ ) == 0) {
19673
19696
  var nextState = action, parser = this.p.parser;
19674
- if (end > this.pos || type <= parser.maxNode) {
19675
- this.pos = end;
19676
- if (!parser.stateFlag(nextState, 1 /* StateFlag.Skipped */ )) this.reducePos = end;
19677
- }
19678
- this.pushState(nextState, start);
19697
+ this.pos = end;
19698
+ var skipped = parser.stateFlag(nextState, 1 /* StateFlag.Skipped */ );
19699
+ // Skipped or zero-length non-tree tokens don't move reducePos
19700
+ if (!skipped && (end > start || type <= parser.maxNode)) this.reducePos = end;
19701
+ this.pushState(nextState, skipped ? start : Math.min(start, this.reducePos));
19679
19702
  this.shiftContext(type, start);
19680
19703
  if (type <= parser.maxNode) this.buffer.push(type, start, end, 4);
19681
19704
  } else {
@@ -19723,6 +19746,9 @@ about the parse state.
19723
19746
  value: function split() {
19724
19747
  var parent = this;
19725
19748
  var off = parent.buffer.length;
19749
+ // Leave off top error node, if there, because that might be
19750
+ // merged with other nodes.
19751
+ if (off && parent.buffer[off - 4] == 0 /* Term.Err */ ) off -= 4;
19726
19752
  // Because the top of the buffer (after this.pos) may be mutated
19727
19753
  // to reorder reductions and skipped tokens, and shared buffers
19728
19754
  // should be immutable, this copies any outstanding skipped tokens
@@ -19966,10 +19992,10 @@ about the parse state.
19966
19992
  @internal
19967
19993
  */ key: "setLookAhead",
19968
19994
  value: function setLookAhead(lookAhead) {
19969
- if (lookAhead > this.lookAhead) {
19970
- this.emitLookAhead();
19971
- this.lookAhead = lookAhead;
19972
- }
19995
+ if (lookAhead <= this.lookAhead) return false;
19996
+ this.emitLookAhead();
19997
+ this.lookAhead = lookAhead;
19998
+ return true;
19973
19999
  }
19974
20000
  },
19975
20001
  {
@@ -20862,7 +20888,12 @@ var Parse = /*#__PURE__*/ function() {
20862
20888
  }
20863
20889
  }
20864
20890
  }
20865
- if (newStacks.length > 12 /* Rec.MaxStackCount */ ) newStacks.splice(12 /* Rec.MaxStackCount */ , newStacks.length - 12 /* Rec.MaxStackCount */ );
20891
+ if (newStacks.length > 12 /* Rec.MaxStackCount */ ) {
20892
+ newStacks.sort(function(a, b) {
20893
+ return b.score - a.score;
20894
+ });
20895
+ newStacks.splice(12 /* Rec.MaxStackCount */ , newStacks.length - 12 /* Rec.MaxStackCount */ );
20896
+ }
20866
20897
  }
20867
20898
  this.minStackPos = newStacks[0].pos;
20868
20899
  for(var i2 = 1; i2 < newStacks.length; i2++)if (newStacks[i2].pos < this.minStackPos) this.minStackPos = newStacks[i2].pos;
@@ -20957,7 +20988,7 @@ var Parse = /*#__PURE__*/ function() {
20957
20988
  if (done) continue;
20958
20989
  }
20959
20990
  var force = stack.split(), forceBase = base;
20960
- for(var j = 0; force.forceReduce() && j < 10 /* Rec.ForceReduceLimit */ ; j++){
20991
+ for(var j = 0; j < 10 /* Rec.ForceReduceLimit */ && force.forceReduce(); j++){
20961
20992
  if (verbose) console.log(forceBase + this.stackID(force) + " (via force-reduce)");
20962
20993
  var done1 = this.advanceFully(force, newStacks);
20963
20994
  if (done1) break;
@@ -20992,8 +21023,8 @@ var Parse = /*#__PURE__*/ function() {
20992
21023
  stack.recoverByDelete(token, tokenEnd);
20993
21024
  if (verbose) console.log(base + this.stackID(stack) + " (via recover-delete ".concat(this.parser.getName(token), ")"));
20994
21025
  pushStackDedup(stack, newStacks);
20995
- } else if (!finished || finished.score < stack.score) {
20996
- finished = stack;
21026
+ } else if (!finished || finished.score < force.score) {
21027
+ finished = force;
20997
21028
  }
20998
21029
  }
20999
21030
  return finished;
@@ -21842,7 +21873,7 @@ must be quoted as JSON strings.
21842
21873
  For example:
21843
21874
 
21844
21875
  ```javascript
21845
- parser.withProps(
21876
+ parser.configure({props: [
21846
21877
  styleTags({
21847
21878
  // Style Number and BigNumber nodes
21848
21879
  "Number BigNumber": tags.number,
@@ -21857,7 +21888,7 @@ parser.withProps(
21857
21888
  // Style the node named "/" as punctuation
21858
21889
  '"/"': tags.punctuation
21859
21890
  })
21860
- )
21891
+ ]})
21861
21892
  ```
21862
21893
  */ function styleTags(spec) {
21863
21894
  var byName = Object.create(null);
@@ -21913,7 +21944,26 @@ parser.withProps(
21913
21944
  }
21914
21945
  return ruleNodeProp.add(byName);
21915
21946
  }
21916
- var ruleNodeProp = new NodeProp();
21947
+ var ruleNodeProp = new NodeProp({
21948
+ combine: function combine(a, b) {
21949
+ var cur, root, take;
21950
+ while(a || b){
21951
+ if (!a || b && a.depth >= b.depth) {
21952
+ take = b;
21953
+ b = b.next;
21954
+ } else {
21955
+ take = a;
21956
+ a = a.next;
21957
+ }
21958
+ if (cur && cur.mode == take.mode && !take.context && !cur.context) continue;
21959
+ var copy = new Rule$1(take.tags, take.mode, take.context);
21960
+ if (cur) cur.next = copy;
21961
+ else root = copy;
21962
+ cur = copy;
21963
+ }
21964
+ return root;
21965
+ }
21966
+ });
21917
21967
  var Rule$1 = /*#__PURE__*/ function() {
21918
21968
  function Rule(tags, mode, context, next) {
21919
21969
  _class_call_check$x(this, Rule);
@@ -22534,7 +22584,7 @@ In addition, these mappings are provided:
22534
22584
  class: "tok-punctuation"
22535
22585
  }
22536
22586
  ]);
22537
- function _array_like_to_array$4(arr, len) {
22587
+ function _array_like_to_array$4$1(arr, len) {
22538
22588
  if (len == null || len > arr.length) len = arr.length;
22539
22589
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
22540
22590
  return arr2;
@@ -22542,8 +22592,8 @@ function _array_like_to_array$4(arr, len) {
22542
22592
  function _array_with_holes$2(arr) {
22543
22593
  if (Array.isArray(arr)) return arr;
22544
22594
  }
22545
- function _array_without_holes$4(arr) {
22546
- if (Array.isArray(arr)) return _array_like_to_array$4(arr);
22595
+ function _array_without_holes$4$1(arr) {
22596
+ if (Array.isArray(arr)) return _array_like_to_array$4$1(arr);
22547
22597
  }
22548
22598
  function _class_call_check$w(instance, Constructor) {
22549
22599
  if (!(instance instanceof Constructor)) {
@@ -22584,7 +22634,7 @@ function _instanceof$f(left, right) {
22584
22634
  return left instanceof right;
22585
22635
  }
22586
22636
  }
22587
- function _iterable_to_array$4(iter) {
22637
+ function _iterable_to_array$4$1(iter) {
22588
22638
  if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
22589
22639
  }
22590
22640
  function _iterable_to_array_limit$2(arr, i) {
@@ -22614,7 +22664,7 @@ function _iterable_to_array_limit$2(arr, i) {
22614
22664
  function _non_iterable_rest$2() {
22615
22665
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
22616
22666
  }
22617
- function _non_iterable_spread$4() {
22667
+ function _non_iterable_spread$4$1() {
22618
22668
  throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
22619
22669
  }
22620
22670
  function _object_spread$2(target) {
@@ -22652,25 +22702,25 @@ function _object_spread_props$1(target, source) {
22652
22702
  return target;
22653
22703
  }
22654
22704
  function _sliced_to_array$2(arr, i) {
22655
- return _array_with_holes$2(arr) || _iterable_to_array_limit$2(arr, i) || _unsupported_iterable_to_array$4(arr, i) || _non_iterable_rest$2();
22705
+ return _array_with_holes$2(arr) || _iterable_to_array_limit$2(arr, i) || _unsupported_iterable_to_array$4$1(arr, i) || _non_iterable_rest$2();
22656
22706
  }
22657
22707
  function _to_array$1(arr) {
22658
- return _array_with_holes$2(arr) || _iterable_to_array$4(arr) || _unsupported_iterable_to_array$4(arr) || _non_iterable_rest$2();
22708
+ return _array_with_holes$2(arr) || _iterable_to_array$4$1(arr) || _unsupported_iterable_to_array$4$1(arr) || _non_iterable_rest$2();
22659
22709
  }
22660
- function _to_consumable_array$4(arr) {
22661
- return _array_without_holes$4(arr) || _iterable_to_array$4(arr) || _unsupported_iterable_to_array$4(arr) || _non_iterable_spread$4();
22710
+ function _to_consumable_array$4$1(arr) {
22711
+ return _array_without_holes$4$1(arr) || _iterable_to_array$4$1(arr) || _unsupported_iterable_to_array$4$1(arr) || _non_iterable_spread$4$1();
22662
22712
  }
22663
22713
  function _type_of$z(obj) {
22664
22714
  "@swc/helpers - typeof";
22665
22715
  return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
22666
22716
  }
22667
- function _unsupported_iterable_to_array$4(o, minLen) {
22717
+ function _unsupported_iterable_to_array$4$1(o, minLen) {
22668
22718
  if (!o) return;
22669
- if (typeof o === "string") return _array_like_to_array$4(o, minLen);
22719
+ if (typeof o === "string") return _array_like_to_array$4$1(o, minLen);
22670
22720
  var n = Object.prototype.toString.call(o).slice(8, -1);
22671
22721
  if (n === "Object" && o.constructor) n = o.constructor.name;
22672
22722
  if (n === "Map" || n === "Set") return Array.from(n);
22673
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$4(o, minLen);
22723
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$4$1(o, minLen);
22674
22724
  }
22675
22725
  // This file was generated by lezer-generator. You probably shouldn't edit it.
22676
22726
  var propertyIdentifier = 121, identifier = 122, nameIdentifier = 123, insertSemi = 124, expression0 = 128, ForExpression = 4, forExpressionStart = 131, ForInExpression = 7, Name = 8, Identifier$1 = 9, AdditionalIdentifier = 10, forExpressionBodyStart = 139, IfExpression = 19, ifExpressionStart = 140, QuantifiedExpression = 23, quantifiedExpressionStart = 141, QuantifiedInExpression = 27, PositiveUnaryTest = 37, ArithmeticExpression = 41, arithmeticPlusStart = 145, arithmeticTimesStart = 146, arithmeticExpStart = 147, arithmeticUnaryStart = 148, VariableName = 47, PathExpression = 68, pathExpressionStart = 154, FilterExpression = 70, filterExpressionStart = 155, FunctionInvocation = 72, functionInvocationStart = 156, ParameterName = 76, nil = 161, NumericLiteral = 79, StringLiteral$1 = 80, BooleanLiteral$1 = 81, listStart = 168, List = 89, FunctionDefinition = 90, functionDefinitionStart = 170, Context = 97, contextStart = 172, ContextEntry = 98, PropertyName = 100, PropertyIdentifier = 101;
@@ -22793,7 +22843,7 @@ function indent(str, spaces) {
22793
22843
  if (_$chars.length) {
22794
22844
  var _String;
22795
22845
  return {
22796
- token: (_String = String).fromCharCode.apply(_String, _to_consumable_array$4(_$chars)),
22846
+ token: (_String = String).fromCharCode.apply(_String, _to_consumable_array$4$1(_$chars)),
22797
22847
  offset: i
22798
22848
  };
22799
22849
  }
@@ -22838,19 +22888,19 @@ function indent(str, spaces) {
22838
22888
  var match = parseIdentifier(input, i1, namePart) || namePart && parseAdditionalSymbol(input, i1) || maybeSpace && parseSpaces(input, i1);
22839
22889
  // match is required
22840
22890
  if (!match) {
22841
- return nextMatch = nextMatch1, tokens = tokens1, i = i1, {
22891
+ return i = i1, nextMatch = nextMatch1, tokens = tokens1, {
22842
22892
  v: nextMatch1
22843
22893
  };
22844
22894
  }
22845
22895
  var token = match.token, offset = match.offset;
22846
22896
  i1 += offset;
22847
22897
  if (token === ' ') {
22848
- return nextMatch = nextMatch1, tokens = tokens1, i = i1, "continue";
22898
+ return i = i1, nextMatch = nextMatch1, tokens = tokens1, "continue";
22849
22899
  }
22850
- tokens1 = _to_consumable_array$4(tokens1).concat([
22900
+ tokens1 = _to_consumable_array$4$1(tokens1).concat([
22851
22901
  token
22852
22902
  ]);
22853
- var name = _to_consumable_array$4(start).concat(_to_consumable_array$4(tokens1)).join(' ');
22903
+ var name = _to_consumable_array$4$1(start).concat(_to_consumable_array$4$1(tokens1)).join(' ');
22854
22904
  if (contextKeys.some(function(el) {
22855
22905
  return el === name;
22856
22906
  })) {
@@ -22864,7 +22914,7 @@ function indent(str, spaces) {
22864
22914
  if (contextKeys.some(function(el) {
22865
22915
  return el.startsWith(name);
22866
22916
  })) {
22867
- return nextMatch = nextMatch1, tokens = tokens1, i = i1, "continue";
22917
+ return i = i1, nextMatch = nextMatch1, tokens = tokens1, "continue";
22868
22918
  }
22869
22919
  if (dateTimeIdentifiers.some(function(el) {
22870
22920
  return el === name;
@@ -22883,9 +22933,9 @@ function indent(str, spaces) {
22883
22933
  if (dateTimeIdentifiers.some(function(el) {
22884
22934
  return el.startsWith(name);
22885
22935
  })) {
22886
- return nextMatch = nextMatch1, tokens = tokens1, i = i1, "continue";
22936
+ return i = i1, nextMatch = nextMatch1, tokens = tokens1, "continue";
22887
22937
  }
22888
- return nextMatch = nextMatch1, tokens = tokens1, i = i1, {
22938
+ return i = i1, nextMatch = nextMatch1, tokens = tokens1, {
22889
22939
  v: nextMatch1
22890
22940
  };
22891
22941
  };
@@ -23173,7 +23223,7 @@ var Variables = /*#__PURE__*/ function() {
23173
23223
  value: function token(part) {
23174
23224
  LOG_VARS && console.log('[%s] token <%s> + <%s>', this.path, this.tokens.join(' '), part);
23175
23225
  return this.assign({
23176
- tokens: _to_consumable_array$4(this.tokens).concat([
23226
+ tokens: _to_consumable_array$4$1(this.tokens).concat([
23177
23227
  part
23178
23228
  ])
23179
23229
  });
@@ -23270,7 +23320,7 @@ var Variables = /*#__PURE__*/ function() {
23270
23320
  return this;
23271
23321
  }
23272
23322
  var parent = this.assign({
23273
- children: _to_consumable_array$4(this.children).concat([
23323
+ children: _to_consumable_array$4$1(this.children).concat([
23274
23324
  child
23275
23325
  ])
23276
23326
  });
@@ -23385,8 +23435,8 @@ var Variables = /*#__PURE__*/ function() {
23385
23435
  }
23386
23436
  return new Variables({
23387
23437
  name: name,
23388
- tokens: _to_consumable_array$4(tokens),
23389
- children: _to_consumable_array$4(children),
23438
+ tokens: _to_consumable_array$4$1(tokens),
23439
+ children: _to_consumable_array$4$1(children),
23390
23440
  context: context,
23391
23441
  parent: parent,
23392
23442
  value: value,
@@ -23448,7 +23498,7 @@ var Variables = /*#__PURE__*/ function() {
23448
23498
  if (term === List) {
23449
23499
  var _Context;
23450
23500
  variables = variables.assign({
23451
- value: (_Context = Context).of.apply(_Context, _to_consumable_array$4(variables.children.map(function(c) {
23501
+ value: (_Context = Context).of.apply(_Context, _to_consumable_array$4$1(variables.children.map(function(c) {
23452
23502
  return c === null || c === void 0 ? void 0 : c.computedValue();
23453
23503
  })))
23454
23504
  });
@@ -23791,7 +23841,7 @@ var parser = LRParser.deserialize({
23791
23841
  ],
23792
23842
  tokenPrec: 2571
23793
23843
  });
23794
- function _array_like_to_array$3(arr, len) {
23844
+ function _array_like_to_array$3$1(arr, len) {
23795
23845
  if (len == null || len > arr.length) len = arr.length;
23796
23846
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
23797
23847
  return arr2;
@@ -23799,8 +23849,8 @@ function _array_like_to_array$3(arr, len) {
23799
23849
  function _array_with_holes$1(arr) {
23800
23850
  if (Array.isArray(arr)) return arr;
23801
23851
  }
23802
- function _array_without_holes$3(arr) {
23803
- if (Array.isArray(arr)) return _array_like_to_array$3(arr);
23852
+ function _array_without_holes$3$1(arr) {
23853
+ if (Array.isArray(arr)) return _array_like_to_array$3$1(arr);
23804
23854
  }
23805
23855
  function _assert_this_initialized$h(self1) {
23806
23856
  if (self1 === void 0) {
@@ -23885,7 +23935,7 @@ function _instanceof$e(left, right) {
23885
23935
  function _is_native_function$5(fn) {
23886
23936
  return Function.toString.call(fn).indexOf("[native code]") !== -1;
23887
23937
  }
23888
- function _iterable_to_array$3(iter) {
23938
+ function _iterable_to_array$3$1(iter) {
23889
23939
  if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
23890
23940
  }
23891
23941
  function _iterable_to_array_limit$1(arr, i) {
@@ -23915,7 +23965,7 @@ function _iterable_to_array_limit$1(arr, i) {
23915
23965
  function _non_iterable_rest$1() {
23916
23966
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
23917
23967
  }
23918
- function _non_iterable_spread$3() {
23968
+ function _non_iterable_spread$3$1() {
23919
23969
  throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
23920
23970
  }
23921
23971
  function _possible_constructor_return$h(self1, call) {
@@ -23932,25 +23982,25 @@ function _set_prototype_of$h(o, p) {
23932
23982
  return _set_prototype_of$h(o, p);
23933
23983
  }
23934
23984
  function _sliced_to_array$1(arr, i) {
23935
- return _array_with_holes$1(arr) || _iterable_to_array_limit$1(arr, i) || _unsupported_iterable_to_array$3(arr, i) || _non_iterable_rest$1();
23985
+ return _array_with_holes$1(arr) || _iterable_to_array_limit$1(arr, i) || _unsupported_iterable_to_array$3$1(arr, i) || _non_iterable_rest$1();
23936
23986
  }
23937
23987
  function _to_array(arr) {
23938
- return _array_with_holes$1(arr) || _iterable_to_array$3(arr) || _unsupported_iterable_to_array$3(arr) || _non_iterable_rest$1();
23988
+ return _array_with_holes$1(arr) || _iterable_to_array$3$1(arr) || _unsupported_iterable_to_array$3$1(arr) || _non_iterable_rest$1();
23939
23989
  }
23940
- function _to_consumable_array$3(arr) {
23941
- return _array_without_holes$3(arr) || _iterable_to_array$3(arr) || _unsupported_iterable_to_array$3(arr) || _non_iterable_spread$3();
23990
+ function _to_consumable_array$3$1(arr) {
23991
+ return _array_without_holes$3$1(arr) || _iterable_to_array$3$1(arr) || _unsupported_iterable_to_array$3$1(arr) || _non_iterable_spread$3$1();
23942
23992
  }
23943
23993
  function _type_of$y(obj) {
23944
23994
  "@swc/helpers - typeof";
23945
23995
  return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
23946
23996
  }
23947
- function _unsupported_iterable_to_array$3(o, minLen) {
23997
+ function _unsupported_iterable_to_array$3$1(o, minLen) {
23948
23998
  if (!o) return;
23949
- if (typeof o === "string") return _array_like_to_array$3(o, minLen);
23999
+ if (typeof o === "string") return _array_like_to_array$3$1(o, minLen);
23950
24000
  var n = Object.prototype.toString.call(o).slice(8, -1);
23951
24001
  if (n === "Object" && o.constructor) n = o.constructor.name;
23952
24002
  if (n === "Map" || n === "Set") return Array.from(n);
23953
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$3(o, minLen);
24003
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$3$1(o, minLen);
23954
24004
  }
23955
24005
  function _wrap_native_super$5(Class) {
23956
24006
  var _cache = typeof Map === "function" ? new Map() : undefined;
@@ -24226,19 +24276,19 @@ var FunctionWrapper = /*#__PURE__*/ function() {
24226
24276
  } else {
24227
24277
  // ensure that single arg provided for var args named
24228
24278
  // parameter is wrapped in a list
24229
- return _to_consumable_array$3(params).concat(_to_consumable_array$3(isArray$2(value) ? value : [
24279
+ return _to_consumable_array$3$1(params).concat(_to_consumable_array$3$1(isArray$2(value) ? value : [
24230
24280
  value
24231
24281
  ]));
24232
24282
  }
24233
24283
  }
24234
- return _to_consumable_array$3(params).concat([
24284
+ return _to_consumable_array$3$1(params).concat([
24235
24285
  contextOrArgs[name]
24236
24286
  ]);
24237
24287
  }, []);
24238
24288
  }
24239
24289
  return (_this_fn = this.fn).call.apply(_this_fn, [
24240
24290
  null
24241
- ].concat(_to_consumable_array$3(params)));
24291
+ ].concat(_to_consumable_array$3$1(params)));
24242
24292
  }
24243
24293
  }
24244
24294
  ]);
@@ -25164,7 +25214,7 @@ var builtins = {
25164
25214
  var _Object;
25165
25215
  return (_Object = Object).assign.apply(_Object, [
25166
25216
  {}
25167
- ].concat(_to_consumable_array$3(contexts)));
25217
+ ].concat(_to_consumable_array$3$1(contexts)));
25168
25218
  }, 'context'),
25169
25219
  'context put': fn$1(function(context, keys, value, key) {
25170
25220
  if (typeof keys === 'undefined' && typeof key === 'undefined') {
@@ -25283,7 +25333,7 @@ function createArgsValidator(argDefinitions) {
25283
25333
  })) {
25284
25334
  return null;
25285
25335
  }
25286
- return fnDefinition.apply(void 0, _to_consumable_array$3(args));
25336
+ return fnDefinition.apply(void 0, _to_consumable_array$3$1(args));
25287
25337
  };
25288
25338
  wrappedFn.$args = parameterNames || parseParameterNames(fnDefinition);
25289
25339
  return wrappedFn;
@@ -25306,7 +25356,7 @@ function createArgsValidator(argDefinitions) {
25306
25356
  if (!convertedArgs) {
25307
25357
  return null;
25308
25358
  }
25309
- return fnDefinition.apply(void 0, _to_consumable_array$3(convertedArgs));
25359
+ return fnDefinition.apply(void 0, _to_consumable_array$3$1(convertedArgs));
25310
25360
  };
25311
25361
  wrappedFn.$args = parameterNames;
25312
25362
  return wrappedFn;
@@ -25345,9 +25395,9 @@ function sum(list) {
25345
25395
  }
25346
25396
  function flatten$1(param) {
25347
25397
  var _param = _to_array(param), x = _param[0], xs = _param.slice(1);
25348
- return x !== undefined ? _to_consumable_array$3(Array.isArray(x) ? flatten$1(x) : [
25398
+ return x !== undefined ? _to_consumable_array$3$1(Array.isArray(x) ? flatten$1(x) : [
25349
25399
  x
25350
- ]).concat(_to_consumable_array$3(flatten$1(xs))) : [];
25400
+ ]).concat(_to_consumable_array$3$1(flatten$1(xs))) : [];
25351
25401
  }
25352
25402
  function toKeyString(key) {
25353
25403
  if (typeof key === 'string' && /\W/.test(key)) {
@@ -25457,9 +25507,9 @@ function stddev(array) {
25457
25507
  }
25458
25508
  function listReplace(list, matcher, newItem) {
25459
25509
  if (isNumber(matcher)) {
25460
- return _to_consumable_array$3(list.slice(0, matcher - 1)).concat([
25510
+ return _to_consumable_array$3$1(list.slice(0, matcher - 1)).concat([
25461
25511
  newItem
25462
- ], _to_consumable_array$3(list.slice(matcher)));
25512
+ ], _to_consumable_array$3$1(list.slice(matcher)));
25463
25513
  }
25464
25514
  return list.map(function(item, _idx) {
25465
25515
  if (matcher.invoke([
@@ -26023,7 +26073,7 @@ function evalNode(node, input, args) {
26023
26073
  };
26024
26074
  var join = function(aContexts, bContextProducer) {
26025
26075
  var _instance;
26026
- return (_instance = []).concat.apply(_instance, _to_consumable_array$3(aContexts.map(function(aContext) {
26076
+ return (_instance = []).concat.apply(_instance, _to_consumable_array$3$1(aContexts.map(function(aContext) {
26027
26077
  var bContexts = bContextProducer(Object.assign(Object.assign({}, context), aContext));
26028
26078
  if (!isValidContexts(bContexts)) {
26029
26079
  return null;
@@ -26045,14 +26095,14 @@ function evalNode(node, input, args) {
26045
26095
  }
26046
26096
  return cartesian.apply(void 0, [
26047
26097
  join(aContexts, bContextProducer)
26048
- ].concat(_to_consumable_array$3(otherContextProducers)));
26098
+ ].concat(_to_consumable_array$3$1(otherContextProducers)));
26049
26099
  };
26050
26100
  var cartesianProduct = function(contextProducers) {
26051
26101
  var _contextProducers = _to_array(contextProducers), aContextProducer = _contextProducers[0], otherContextProducers = _contextProducers.slice(1);
26052
26102
  var aContexts = aContextProducer(context);
26053
26103
  return cartesian.apply(void 0, [
26054
26104
  aContexts
26055
- ].concat(_to_consumable_array$3(otherContextProducers)));
26105
+ ].concat(_to_consumable_array$3$1(otherContextProducers)));
26056
26106
  };
26057
26107
  var product = cartesianProduct(args);
26058
26108
  return product && product.map(function(p) {
@@ -26779,7 +26829,7 @@ function parseString(str) {
26779
26829
  while((charCodeMatch = escapePattern.exec(substring)) !== null){
26780
26830
  chars.push(parseInt(charCodeMatch[1], 16));
26781
26831
  }
26782
- return (_String = String).fromCharCode.apply(_String, _to_consumable_array$3(chars));
26832
+ return (_String = String).fromCharCode.apply(_String, _to_consumable_array$3$1(chars));
26783
26833
  }
26784
26834
  throw new Error('illegal match');
26785
26835
  });
@@ -38802,13 +38852,13 @@ var AT_LEAST_ONE_SEP_IDX = 6 << BITS_FOR_OCCURRENCE_IDX;
38802
38852
  function getKeyForAutomaticLookahead(ruleIdx, dslMethodIdx, occurrence) {
38803
38853
  return occurrence | dslMethodIdx | ruleIdx;
38804
38854
  }
38805
- function _array_like_to_array$2(arr, len) {
38855
+ function _array_like_to_array$2$1(arr, len) {
38806
38856
  if (len == null || len > arr.length) len = arr.length;
38807
38857
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
38808
38858
  return arr2;
38809
38859
  }
38810
- function _array_without_holes$2(arr) {
38811
- if (Array.isArray(arr)) return _array_like_to_array$2(arr);
38860
+ function _array_without_holes$2$1(arr) {
38861
+ if (Array.isArray(arr)) return _array_like_to_array$2$1(arr);
38812
38862
  }
38813
38863
  function _class_call_check$d(instance, Constructor) {
38814
38864
  if (!(instance instanceof Constructor)) {
@@ -38828,22 +38878,22 @@ function _create_class$b(Constructor, protoProps, staticProps) {
38828
38878
  if (protoProps) _defineProperties$b(Constructor.prototype, protoProps);
38829
38879
  return Constructor;
38830
38880
  }
38831
- function _iterable_to_array$2(iter) {
38881
+ function _iterable_to_array$2$1(iter) {
38832
38882
  if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
38833
38883
  }
38834
- function _non_iterable_spread$2() {
38884
+ function _non_iterable_spread$2$1() {
38835
38885
  throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
38836
38886
  }
38837
- function _to_consumable_array$2(arr) {
38838
- return _array_without_holes$2(arr) || _iterable_to_array$2(arr) || _unsupported_iterable_to_array$2(arr) || _non_iterable_spread$2();
38887
+ function _to_consumable_array$2$1(arr) {
38888
+ return _array_without_holes$2$1(arr) || _iterable_to_array$2$1(arr) || _unsupported_iterable_to_array$2$1(arr) || _non_iterable_spread$2$1();
38839
38889
  }
38840
- function _unsupported_iterable_to_array$2(o, minLen) {
38890
+ function _unsupported_iterable_to_array$2$1(o, minLen) {
38841
38891
  if (!o) return;
38842
- if (typeof o === "string") return _array_like_to_array$2(o, minLen);
38892
+ if (typeof o === "string") return _array_like_to_array$2$1(o, minLen);
38843
38893
  var n = Object.prototype.toString.call(o).slice(8, -1);
38844
38894
  if (n === "Object" && o.constructor) n = o.constructor.name;
38845
38895
  if (n === "Map" || n === "Set") return Array.from(n);
38846
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$2(o, minLen);
38896
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$2$1(o, minLen);
38847
38897
  }
38848
38898
  var LLkLookaheadStrategy = /*#__PURE__*/ function() {
38849
38899
  function LLkLookaheadStrategy(options) {
@@ -38860,7 +38910,7 @@ var LLkLookaheadStrategy = /*#__PURE__*/ function() {
38860
38910
  var emptyAltErrors = this.validateEmptyOrAlternatives(options.rules);
38861
38911
  var ambiguousAltsErrors = this.validateAmbiguousAlternationAlternatives(options.rules, this.maxLookahead);
38862
38912
  var emptyRepetitionErrors = this.validateSomeNonEmptyLookaheadPath(options.rules, this.maxLookahead);
38863
- var allErrors = _to_consumable_array$2(leftRecursionErrors).concat(_to_consumable_array$2(emptyAltErrors), _to_consumable_array$2(ambiguousAltsErrors), _to_consumable_array$2(emptyRepetitionErrors));
38913
+ var allErrors = _to_consumable_array$2$1(leftRecursionErrors).concat(_to_consumable_array$2$1(emptyAltErrors), _to_consumable_array$2$1(ambiguousAltsErrors), _to_consumable_array$2$1(emptyRepetitionErrors));
38864
38914
  return allErrors;
38865
38915
  }
38866
38916
  return leftRecursionErrors;
@@ -38922,7 +38972,7 @@ function _class_call_check$c(instance, Constructor) {
38922
38972
  throw new TypeError("Cannot call a class as a function");
38923
38973
  }
38924
38974
  }
38925
- function _defineProperties$a(target, props) {
38975
+ function _defineProperties$a$1(target, props) {
38926
38976
  for(var i = 0; i < props.length; i++){
38927
38977
  var descriptor = props[i];
38928
38978
  descriptor.enumerable = descriptor.enumerable || false;
@@ -38931,8 +38981,8 @@ function _defineProperties$a(target, props) {
38931
38981
  Object.defineProperty(target, descriptor.key, descriptor);
38932
38982
  }
38933
38983
  }
38934
- function _create_class$a(Constructor, protoProps, staticProps) {
38935
- if (protoProps) _defineProperties$a(Constructor.prototype, protoProps);
38984
+ function _create_class$a$1(Constructor, protoProps, staticProps) {
38985
+ if (protoProps) _defineProperties$a$1(Constructor.prototype, protoProps);
38936
38986
  return Constructor;
38937
38987
  }
38938
38988
  function _get_prototype_of$4(o) {
@@ -39001,7 +39051,7 @@ function _create_super$4(Derived) {
39001
39051
  function LooksAhead() {
39002
39052
  _class_call_check$c(this, LooksAhead);
39003
39053
  }
39004
- _create_class$a(LooksAhead, [
39054
+ _create_class$a$1(LooksAhead, [
39005
39055
  {
39006
39056
  key: "initLooksAhead",
39007
39057
  value: function initLooksAhead(config) {
@@ -39115,7 +39165,7 @@ var DslMethodsCollectorVisitor = /*#__PURE__*/ function(GAstVisitor) {
39115
39165
  };
39116
39166
  return _this;
39117
39167
  }
39118
- _create_class$a(DslMethodsCollectorVisitor, [
39168
+ _create_class$a$1(DslMethodsCollectorVisitor, [
39119
39169
  {
39120
39170
  key: "reset",
39121
39171
  value: function reset() {
@@ -39334,12 +39384,12 @@ function validateMissingCstMethods(visitorInstance, ruleNames) {
39334
39384
  });
39335
39385
  return compact(errors);
39336
39386
  }
39337
- function _class_call_check$b(instance, Constructor) {
39387
+ function _class_call_check$b$1(instance, Constructor) {
39338
39388
  if (!(instance instanceof Constructor)) {
39339
39389
  throw new TypeError("Cannot call a class as a function");
39340
39390
  }
39341
39391
  }
39342
- function _defineProperties$9(target, props) {
39392
+ function _defineProperties$9$1(target, props) {
39343
39393
  for(var i = 0; i < props.length; i++){
39344
39394
  var descriptor = props[i];
39345
39395
  descriptor.enumerable = descriptor.enumerable || false;
@@ -39348,17 +39398,17 @@ function _defineProperties$9(target, props) {
39348
39398
  Object.defineProperty(target, descriptor.key, descriptor);
39349
39399
  }
39350
39400
  }
39351
- function _create_class$9(Constructor, protoProps, staticProps) {
39352
- if (protoProps) _defineProperties$9(Constructor.prototype, protoProps);
39401
+ function _create_class$9$1(Constructor, protoProps, staticProps) {
39402
+ if (protoProps) _defineProperties$9$1(Constructor.prototype, protoProps);
39353
39403
  return Constructor;
39354
39404
  }
39355
39405
  /**
39356
39406
  * This trait is responsible for the CST building logic.
39357
39407
  */ var TreeBuilder = /*#__PURE__*/ function() {
39358
39408
  function TreeBuilder() {
39359
- _class_call_check$b(this, TreeBuilder);
39409
+ _class_call_check$b$1(this, TreeBuilder);
39360
39410
  }
39361
- _create_class$9(TreeBuilder, [
39411
+ _create_class$9$1(TreeBuilder, [
39362
39412
  {
39363
39413
  key: "initTreeBuilder",
39364
39414
  value: function initTreeBuilder(config) {
@@ -39577,12 +39627,12 @@ function _create_class$9(Constructor, protoProps, staticProps) {
39577
39627
  ]);
39578
39628
  return TreeBuilder;
39579
39629
  }();
39580
- function _class_call_check$a(instance, Constructor) {
39630
+ function _class_call_check$a$1(instance, Constructor) {
39581
39631
  if (!(instance instanceof Constructor)) {
39582
39632
  throw new TypeError("Cannot call a class as a function");
39583
39633
  }
39584
39634
  }
39585
- function _defineProperties$8(target, props) {
39635
+ function _defineProperties$8$1(target, props) {
39586
39636
  for(var i = 0; i < props.length; i++){
39587
39637
  var descriptor = props[i];
39588
39638
  descriptor.enumerable = descriptor.enumerable || false;
@@ -39591,8 +39641,8 @@ function _defineProperties$8(target, props) {
39591
39641
  Object.defineProperty(target, descriptor.key, descriptor);
39592
39642
  }
39593
39643
  }
39594
- function _create_class$8(Constructor, protoProps, staticProps) {
39595
- if (protoProps) _defineProperties$8(Constructor.prototype, protoProps);
39644
+ function _create_class$8$1(Constructor, protoProps, staticProps) {
39645
+ if (protoProps) _defineProperties$8$1(Constructor.prototype, protoProps);
39596
39646
  return Constructor;
39597
39647
  }
39598
39648
  /**
@@ -39603,9 +39653,9 @@ function _create_class$8(Constructor, protoProps, staticProps) {
39603
39653
  * - Streaming Lexer.
39604
39654
  */ var LexerAdapter = /*#__PURE__*/ function() {
39605
39655
  function LexerAdapter() {
39606
- _class_call_check$a(this, LexerAdapter);
39656
+ _class_call_check$a$1(this, LexerAdapter);
39607
39657
  }
39608
- _create_class$8(LexerAdapter, [
39658
+ _create_class$8$1(LexerAdapter, [
39609
39659
  {
39610
39660
  key: "initLexerAdapter",
39611
39661
  value: function initLexerAdapter() {
@@ -39696,12 +39746,12 @@ function _create_class$8(Constructor, protoProps, staticProps) {
39696
39746
  ]);
39697
39747
  return LexerAdapter;
39698
39748
  }();
39699
- function _class_call_check$9(instance, Constructor) {
39749
+ function _class_call_check$9$1(instance, Constructor) {
39700
39750
  if (!(instance instanceof Constructor)) {
39701
39751
  throw new TypeError("Cannot call a class as a function");
39702
39752
  }
39703
39753
  }
39704
- function _defineProperties$7(target, props) {
39754
+ function _defineProperties$7$1(target, props) {
39705
39755
  for(var i = 0; i < props.length; i++){
39706
39756
  var descriptor = props[i];
39707
39757
  descriptor.enumerable = descriptor.enumerable || false;
@@ -39710,8 +39760,8 @@ function _defineProperties$7(target, props) {
39710
39760
  Object.defineProperty(target, descriptor.key, descriptor);
39711
39761
  }
39712
39762
  }
39713
- function _create_class$7(Constructor, protoProps, staticProps) {
39714
- if (protoProps) _defineProperties$7(Constructor.prototype, protoProps);
39763
+ function _create_class$7$1(Constructor, protoProps, staticProps) {
39764
+ if (protoProps) _defineProperties$7$1(Constructor.prototype, protoProps);
39715
39765
  return Constructor;
39716
39766
  }
39717
39767
  /**
@@ -39723,9 +39773,9 @@ function _create_class$7(Constructor, protoProps, staticProps) {
39723
39773
  * - ...
39724
39774
  */ var RecognizerApi = /*#__PURE__*/ function() {
39725
39775
  function RecognizerApi() {
39726
- _class_call_check$9(this, RecognizerApi);
39776
+ _class_call_check$9$1(this, RecognizerApi);
39727
39777
  }
39728
- _create_class$7(RecognizerApi, [
39778
+ _create_class$7$1(RecognizerApi, [
39729
39779
  {
39730
39780
  key: "ACTION",
39731
39781
  value: function ACTION(impl) {
@@ -40321,12 +40371,12 @@ function _create_class$7(Constructor, protoProps, staticProps) {
40321
40371
  ]);
40322
40372
  return RecognizerApi;
40323
40373
  }();
40324
- function _class_call_check$8(instance, Constructor) {
40374
+ function _class_call_check$8$1(instance, Constructor) {
40325
40375
  if (!(instance instanceof Constructor)) {
40326
40376
  throw new TypeError("Cannot call a class as a function");
40327
40377
  }
40328
40378
  }
40329
- function _defineProperties$6(target, props) {
40379
+ function _defineProperties$6$1(target, props) {
40330
40380
  for(var i = 0; i < props.length; i++){
40331
40381
  var descriptor = props[i];
40332
40382
  descriptor.enumerable = descriptor.enumerable || false;
@@ -40335,8 +40385,8 @@ function _defineProperties$6(target, props) {
40335
40385
  Object.defineProperty(target, descriptor.key, descriptor);
40336
40386
  }
40337
40387
  }
40338
- function _create_class$6(Constructor, protoProps, staticProps) {
40339
- if (protoProps) _defineProperties$6(Constructor.prototype, protoProps);
40388
+ function _create_class$6$1(Constructor, protoProps, staticProps) {
40389
+ if (protoProps) _defineProperties$6$1(Constructor.prototype, protoProps);
40340
40390
  return Constructor;
40341
40391
  }
40342
40392
  /**
@@ -40344,9 +40394,9 @@ function _create_class$6(Constructor, protoProps, staticProps) {
40344
40394
  * Used by the official API (recognizer_api.ts)
40345
40395
  */ var RecognizerEngine = /*#__PURE__*/ function() {
40346
40396
  function RecognizerEngine() {
40347
- _class_call_check$8(this, RecognizerEngine);
40397
+ _class_call_check$8$1(this, RecognizerEngine);
40348
40398
  }
40349
- _create_class$6(RecognizerEngine, [
40399
+ _create_class$6$1(RecognizerEngine, [
40350
40400
  {
40351
40401
  key: "initRecognizerEngine",
40352
40402
  value: function initRecognizerEngine(tokenVocabulary, config) {
@@ -40936,12 +40986,12 @@ function _create_class$6(Constructor, protoProps, staticProps) {
40936
40986
  ]);
40937
40987
  return RecognizerEngine;
40938
40988
  }();
40939
- function _class_call_check$7(instance, Constructor) {
40989
+ function _class_call_check$7$1(instance, Constructor) {
40940
40990
  if (!(instance instanceof Constructor)) {
40941
40991
  throw new TypeError("Cannot call a class as a function");
40942
40992
  }
40943
40993
  }
40944
- function _defineProperties$5(target, props) {
40994
+ function _defineProperties$5$1(target, props) {
40945
40995
  for(var i = 0; i < props.length; i++){
40946
40996
  var descriptor = props[i];
40947
40997
  descriptor.enumerable = descriptor.enumerable || false;
@@ -40950,17 +41000,17 @@ function _defineProperties$5(target, props) {
40950
41000
  Object.defineProperty(target, descriptor.key, descriptor);
40951
41001
  }
40952
41002
  }
40953
- function _create_class$5(Constructor, protoProps, staticProps) {
40954
- if (protoProps) _defineProperties$5(Constructor.prototype, protoProps);
41003
+ function _create_class$5$1(Constructor, protoProps, staticProps) {
41004
+ if (protoProps) _defineProperties$5$1(Constructor.prototype, protoProps);
40955
41005
  return Constructor;
40956
41006
  }
40957
41007
  /**
40958
41008
  * Trait responsible for runtime parsing errors.
40959
41009
  */ var ErrorHandler = /*#__PURE__*/ function() {
40960
41010
  function ErrorHandler() {
40961
- _class_call_check$7(this, ErrorHandler);
41011
+ _class_call_check$7$1(this, ErrorHandler);
40962
41012
  }
40963
- _create_class$5(ErrorHandler, [
41013
+ _create_class$5$1(ErrorHandler, [
40964
41014
  {
40965
41015
  key: "initErrorHandler",
40966
41016
  value: function initErrorHandler(config) {
@@ -41041,12 +41091,12 @@ function _create_class$5(Constructor, protoProps, staticProps) {
41041
41091
  ]);
41042
41092
  return ErrorHandler;
41043
41093
  }();
41044
- function _class_call_check$6(instance, Constructor) {
41094
+ function _class_call_check$6$1(instance, Constructor) {
41045
41095
  if (!(instance instanceof Constructor)) {
41046
41096
  throw new TypeError("Cannot call a class as a function");
41047
41097
  }
41048
41098
  }
41049
- function _defineProperties$4(target, props) {
41099
+ function _defineProperties$4$1(target, props) {
41050
41100
  for(var i = 0; i < props.length; i++){
41051
41101
  var descriptor = props[i];
41052
41102
  descriptor.enumerable = descriptor.enumerable || false;
@@ -41055,15 +41105,15 @@ function _defineProperties$4(target, props) {
41055
41105
  Object.defineProperty(target, descriptor.key, descriptor);
41056
41106
  }
41057
41107
  }
41058
- function _create_class$4(Constructor, protoProps, staticProps) {
41059
- if (protoProps) _defineProperties$4(Constructor.prototype, protoProps);
41108
+ function _create_class$4$1(Constructor, protoProps, staticProps) {
41109
+ if (protoProps) _defineProperties$4$1(Constructor.prototype, protoProps);
41060
41110
  return Constructor;
41061
41111
  }
41062
41112
  var ContentAssist = /*#__PURE__*/ function() {
41063
41113
  function ContentAssist() {
41064
- _class_call_check$6(this, ContentAssist);
41114
+ _class_call_check$6$1(this, ContentAssist);
41065
41115
  }
41066
- _create_class$4(ContentAssist, [
41116
+ _create_class$4$1(ContentAssist, [
41067
41117
  {
41068
41118
  key: "initContentAssist",
41069
41119
  value: function initContentAssist() {}
@@ -41095,12 +41145,12 @@ var ContentAssist = /*#__PURE__*/ function() {
41095
41145
  ]);
41096
41146
  return ContentAssist;
41097
41147
  }();
41098
- function _class_call_check$5(instance, Constructor) {
41148
+ function _class_call_check$5$1(instance, Constructor) {
41099
41149
  if (!(instance instanceof Constructor)) {
41100
41150
  throw new TypeError("Cannot call a class as a function");
41101
41151
  }
41102
41152
  }
41103
- function _defineProperties$3(target, props) {
41153
+ function _defineProperties$3$1(target, props) {
41104
41154
  for(var i = 0; i < props.length; i++){
41105
41155
  var descriptor = props[i];
41106
41156
  descriptor.enumerable = descriptor.enumerable || false;
@@ -41109,8 +41159,8 @@ function _defineProperties$3(target, props) {
41109
41159
  Object.defineProperty(target, descriptor.key, descriptor);
41110
41160
  }
41111
41161
  }
41112
- function _create_class$3(Constructor, protoProps, staticProps) {
41113
- if (protoProps) _defineProperties$3(Constructor.prototype, protoProps);
41162
+ function _create_class$3$1(Constructor, protoProps, staticProps) {
41163
+ if (protoProps) _defineProperties$3$1(Constructor.prototype, protoProps);
41114
41164
  return Constructor;
41115
41165
  }
41116
41166
  var RECORDING_NULL_OBJECT = {
@@ -41137,9 +41187,9 @@ var RECORDING_PHASE_CSTNODE = {
41137
41187
  * This trait handles the creation of the GAST structure for Chevrotain Grammars
41138
41188
  */ var GastRecorder = /*#__PURE__*/ function() {
41139
41189
  function GastRecorder() {
41140
- _class_call_check$5(this, GastRecorder);
41190
+ _class_call_check$5$1(this, GastRecorder);
41141
41191
  }
41142
- _create_class$3(GastRecorder, [
41192
+ _create_class$3$1(GastRecorder, [
41143
41193
  {
41144
41194
  key: "initGastRecorder",
41145
41195
  value: function initGastRecorder(config) {
@@ -41450,12 +41500,12 @@ function assertMethodIdxIsValid(idx) {
41450
41500
  throw error;
41451
41501
  }
41452
41502
  }
41453
- function _class_call_check$4(instance, Constructor) {
41503
+ function _class_call_check$4$1(instance, Constructor) {
41454
41504
  if (!(instance instanceof Constructor)) {
41455
41505
  throw new TypeError("Cannot call a class as a function");
41456
41506
  }
41457
41507
  }
41458
- function _defineProperties$2(target, props) {
41508
+ function _defineProperties$2$1(target, props) {
41459
41509
  for(var i = 0; i < props.length; i++){
41460
41510
  var descriptor = props[i];
41461
41511
  descriptor.enumerable = descriptor.enumerable || false;
@@ -41464,17 +41514,17 @@ function _defineProperties$2(target, props) {
41464
41514
  Object.defineProperty(target, descriptor.key, descriptor);
41465
41515
  }
41466
41516
  }
41467
- function _create_class$2(Constructor, protoProps, staticProps) {
41468
- if (protoProps) _defineProperties$2(Constructor.prototype, protoProps);
41517
+ function _create_class$2$1(Constructor, protoProps, staticProps) {
41518
+ if (protoProps) _defineProperties$2$1(Constructor.prototype, protoProps);
41469
41519
  return Constructor;
41470
41520
  }
41471
41521
  /**
41472
41522
  * Trait responsible for runtime parsing errors.
41473
41523
  */ var PerformanceTracer = /*#__PURE__*/ function() {
41474
41524
  function PerformanceTracer() {
41475
- _class_call_check$4(this, PerformanceTracer);
41525
+ _class_call_check$4$1(this, PerformanceTracer);
41476
41526
  }
41477
- _create_class$2(PerformanceTracer, [
41527
+ _create_class$2$1(PerformanceTracer, [
41478
41528
  {
41479
41529
  key: "initPerformanceTracer",
41480
41530
  value: function initPerformanceTracer(config) {
@@ -41539,12 +41589,12 @@ function _assert_this_initialized$3(self1) {
41539
41589
  }
41540
41590
  return self1;
41541
41591
  }
41542
- function _class_call_check$3(instance, Constructor) {
41592
+ function _class_call_check$3$1(instance, Constructor) {
41543
41593
  if (!(instance instanceof Constructor)) {
41544
41594
  throw new TypeError("Cannot call a class as a function");
41545
41595
  }
41546
41596
  }
41547
- function _defineProperties$1(target, props) {
41597
+ function _defineProperties$1$1(target, props) {
41548
41598
  for(var i = 0; i < props.length; i++){
41549
41599
  var descriptor = props[i];
41550
41600
  descriptor.enumerable = descriptor.enumerable || false;
@@ -41553,9 +41603,9 @@ function _defineProperties$1(target, props) {
41553
41603
  Object.defineProperty(target, descriptor.key, descriptor);
41554
41604
  }
41555
41605
  }
41556
- function _create_class$1(Constructor, protoProps, staticProps) {
41557
- if (protoProps) _defineProperties$1(Constructor.prototype, protoProps);
41558
- if (staticProps) _defineProperties$1(Constructor, staticProps);
41606
+ function _create_class$1$1(Constructor, protoProps, staticProps) {
41607
+ if (protoProps) _defineProperties$1$1(Constructor.prototype, protoProps);
41608
+ if (staticProps) _defineProperties$1$1(Constructor, staticProps);
41559
41609
  return Constructor;
41560
41610
  }
41561
41611
  function _get_prototype_of$3(o) {
@@ -41655,7 +41705,7 @@ var ParserDefinitionErrorType;
41655
41705
  })(ParserDefinitionErrorType || (ParserDefinitionErrorType = {}));
41656
41706
  var Parser = /*#__PURE__*/ function() {
41657
41707
  function Parser(tokenVocabulary, config) {
41658
- _class_call_check$3(this, Parser);
41708
+ _class_call_check$3$1(this, Parser);
41659
41709
  this.definitionErrors = [];
41660
41710
  this.selfAnalysisDone = false;
41661
41711
  var that = this;
@@ -41674,7 +41724,7 @@ var Parser = /*#__PURE__*/ function() {
41674
41724
  this.skipValidations = has$1(config, "skipValidations") ? config.skipValidations // casting assumes the end user passing the correct type
41675
41725
  : DEFAULT_PARSER_CONFIG.skipValidations;
41676
41726
  }
41677
- _create_class$1(Parser, [
41727
+ _create_class$1$1(Parser, [
41678
41728
  {
41679
41729
  key: "performSelfAnalysis",
41680
41730
  value: function performSelfAnalysis() {
@@ -41794,7 +41844,7 @@ var CstParser = /*#__PURE__*/ function(Parser) {
41794
41844
  var _super = _create_super$3(CstParser);
41795
41845
  function CstParser(tokenVocabulary) {
41796
41846
  var config = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : DEFAULT_PARSER_CONFIG;
41797
- _class_call_check$3(this, CstParser);
41847
+ _class_call_check$3$1(this, CstParser);
41798
41848
  var configClone = clone(config);
41799
41849
  configClone.outputCst = true;
41800
41850
  return _super.call(this, tokenVocabulary, configClone);
@@ -42411,34 +42461,34 @@ function _equals(a, b, stackA, stackB) {
42411
42461
  */ var equals = /*#__PURE__*/ _curry2(function equals(a, b) {
42412
42462
  return _equals(a, b, [], []);
42413
42463
  });
42414
- function _array_like_to_array$1(arr, len) {
42464
+ function _array_like_to_array$1$1(arr, len) {
42415
42465
  if (len == null || len > arr.length) len = arr.length;
42416
42466
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
42417
42467
  return arr2;
42418
42468
  }
42419
- function _array_without_holes$1(arr) {
42420
- if (Array.isArray(arr)) return _array_like_to_array$1(arr);
42469
+ function _array_without_holes$1$1(arr) {
42470
+ if (Array.isArray(arr)) return _array_like_to_array$1$1(arr);
42421
42471
  }
42422
- function _iterable_to_array$1(iter) {
42472
+ function _iterable_to_array$1$1(iter) {
42423
42473
  if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
42424
42474
  }
42425
- function _non_iterable_spread$1() {
42475
+ function _non_iterable_spread$1$1() {
42426
42476
  throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
42427
42477
  }
42428
- function _to_consumable_array$1(arr) {
42429
- return _array_without_holes$1(arr) || _iterable_to_array$1(arr) || _unsupported_iterable_to_array$1(arr) || _non_iterable_spread$1();
42478
+ function _to_consumable_array$1$1(arr) {
42479
+ return _array_without_holes$1$1(arr) || _iterable_to_array$1$1(arr) || _unsupported_iterable_to_array$1$1(arr) || _non_iterable_spread$1$1();
42430
42480
  }
42431
42481
  function _type_of$3(obj) {
42432
42482
  "@swc/helpers - typeof";
42433
42483
  return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
42434
42484
  }
42435
- function _unsupported_iterable_to_array$1(o, minLen) {
42485
+ function _unsupported_iterable_to_array$1$1(o, minLen) {
42436
42486
  if (!o) return;
42437
- if (typeof o === "string") return _array_like_to_array$1(o, minLen);
42487
+ if (typeof o === "string") return _array_like_to_array$1$1(o, minLen);
42438
42488
  var n = Object.prototype.toString.call(o).slice(8, -1);
42439
42489
  if (n === "Object" && o.constructor) n = o.constructor.name;
42440
42490
  if (n === "Map" || n === "Set") return Array.from(n);
42441
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$1(o, minLen);
42491
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$1$1(o, minLen);
42442
42492
  }
42443
42493
  var CelType;
42444
42494
  (function(CelType) {
@@ -42536,7 +42586,7 @@ var additionOperation = function(left, right) {
42536
42586
  if (left.length !== 0 && right.length !== 0 && _type_of$3(left[0]) !== _type_of$3(right[0])) {
42537
42587
  throw new CelTypeError(Operations.addition, left[0], right[0]);
42538
42588
  }
42539
- return _to_consumable_array$1(left).concat(_to_consumable_array$1(right));
42589
+ return _to_consumable_array$1$1(left).concat(_to_consumable_array$1$1(right));
42540
42590
  }
42541
42591
  throw new CelTypeError(Operations.addition, left, right);
42542
42592
  };
@@ -42743,7 +42793,7 @@ function _assert_this_initialized$2(self1) {
42743
42793
  }
42744
42794
  return self1;
42745
42795
  }
42746
- function _class_call_check$2(instance, Constructor) {
42796
+ function _class_call_check$2$1(instance, Constructor) {
42747
42797
  if (!(instance instanceof Constructor)) {
42748
42798
  throw new TypeError("Cannot call a class as a function");
42749
42799
  }
@@ -42858,7 +42908,7 @@ var CelTypeError = /*#__PURE__*/ function(Error1) {
42858
42908
  _inherits$2(CelTypeError, Error1);
42859
42909
  var _super = _create_super$2(CelTypeError);
42860
42910
  function CelTypeError(operation, left, right) {
42861
- _class_call_check$2(this, CelTypeError);
42911
+ _class_call_check$2$1(this, CelTypeError);
42862
42912
  var _this;
42863
42913
  var leftType = getCelType(left);
42864
42914
  var rightType = getCelType(right);
@@ -42886,7 +42936,7 @@ function _assert_this_initialized$1(self1) {
42886
42936
  }
42887
42937
  return self1;
42888
42938
  }
42889
- function _class_call_check$1(instance, Constructor) {
42939
+ function _class_call_check$1$1(instance, Constructor) {
42890
42940
  if (!(instance instanceof Constructor)) {
42891
42941
  throw new TypeError("Cannot call a class as a function");
42892
42942
  }
@@ -42968,7 +43018,7 @@ var CelParser = /*#__PURE__*/ function(CstParser) {
42968
43018
  _inherits$1(CelParser, CstParser);
42969
43019
  var _super = _create_super$1(CelParser);
42970
43020
  function CelParser() {
42971
- _class_call_check$1(this, CelParser);
43021
+ _class_call_check$1$1(this, CelParser);
42972
43022
  var _this;
42973
43023
  _this = _super.call(this, allTokens);
42974
43024
  _define_property$2(_assert_this_initialized$1(_this), "expr", _this.RULE('expr', function() {
@@ -44389,7 +44439,7 @@ function _object_spread_props$3(target, source) {
44389
44439
  prefix: '_'
44390
44440
  })).join('').toLowerCase();
44391
44441
  }
44392
- const Handlebars = handlebars_min || HandlebarsNamespace;
44442
+ const Handlebars = handlebars_min_default || HandlebarsNamespace;
44393
44443
  Handlebars.registerHelper('JSONstringify', function(value) {
44394
44444
  return JSON.stringify(value);
44395
44445
  });
@@ -44572,41 +44622,9 @@ const preparePinsSettings = (settings, context)=>{
44572
44622
 
44573
44623
  /*
44574
44624
  * Copyright The OpenTelemetry Authors
44575
- *
44576
- * Licensed under the Apache License, Version 2.0 (the "License");
44577
- * you may not use this file except in compliance with the License.
44578
- * You may obtain a copy of the License at
44579
- *
44580
- * https://www.apache.org/licenses/LICENSE-2.0
44581
- *
44582
- * Unless required by applicable law or agreed to in writing, software
44583
- * distributed under the License is distributed on an "AS IS" BASIS,
44584
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
44585
- * See the License for the specific language governing permissions and
44586
- * limitations under the License.
44587
- */ /** only globals that common to node and browsers are allowed */ // eslint-disable-next-line node/no-unsupported-features/es-builtins
44588
- function _type_of$2(obj) {
44589
- "@swc/helpers - typeof";
44590
- return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
44591
- }
44592
- var _globalThis = (typeof globalThis === "undefined" ? "undefined" : _type_of$2(globalThis)) === 'object' ? globalThis : global;
44593
-
44594
- /*
44595
- * Copyright The OpenTelemetry Authors
44596
- *
44597
- * Licensed under the Apache License, Version 2.0 (the "License");
44598
- * you may not use this file except in compliance with the License.
44599
- * You may obtain a copy of the License at
44600
- *
44601
- * https://www.apache.org/licenses/LICENSE-2.0
44602
- *
44603
- * Unless required by applicable law or agreed to in writing, software
44604
- * distributed under the License is distributed on an "AS IS" BASIS,
44605
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
44606
- * See the License for the specific language governing permissions and
44607
- * limitations under the License.
44625
+ * SPDX-License-Identifier: Apache-2.0
44608
44626
  */ // this is autogenerated file, see scripts/version-update.js
44609
- var VERSION = '1.9.0';
44627
+ var VERSION = '1.9.1';
44610
44628
 
44611
44629
  var re$1 = /^(\d+)\.(\d+)\.(\d+)(-(.+))?$/;
44612
44630
  /**
@@ -44711,31 +44729,36 @@ var re$1 = /^(\d+)\.(\d+)\.(\d+)(-(.+))?$/;
44711
44729
  * @param version version of the API requesting an instance of the global API
44712
44730
  */ var isCompatible = _makeCompatibilityCheck(VERSION);
44713
44731
 
44732
+ /*
44733
+ * Copyright The OpenTelemetry Authors
44734
+ * SPDX-License-Identifier: Apache-2.0
44735
+ */ function _type_of$2(obj) {
44736
+ "@swc/helpers - typeof";
44737
+ return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
44738
+ }
44714
44739
  var major = VERSION.split('.')[0];
44715
- var GLOBAL_OPENTELEMETRY_API_KEY = Symbol.for("opentelemetry.js.api." + major);
44716
- var _global = _globalThis;
44717
- function registerGlobal(type, instance, diag, allowOverride) {
44740
+ var GLOBAL_OPENTELEMETRY_API_KEY = Symbol.for("opentelemetry.js.api.".concat(major));
44741
+ var _global = (typeof globalThis === "undefined" ? "undefined" : _type_of$2(globalThis)) === 'object' ? globalThis : (typeof self === "undefined" ? "undefined" : _type_of$2(self)) === 'object' ? self : (typeof window === "undefined" ? "undefined" : _type_of$2(window)) === 'object' ? window : (typeof global === "undefined" ? "undefined" : _type_of$2(global)) === 'object' ? global : {};
44742
+ function registerGlobal(type, instance, diag) {
44743
+ var allowOverride = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : false;
44718
44744
  var _a;
44719
- if (allowOverride === void 0) {
44720
- allowOverride = false;
44721
- }
44722
44745
  var api = _global[GLOBAL_OPENTELEMETRY_API_KEY] = (_a = _global[GLOBAL_OPENTELEMETRY_API_KEY]) !== null && _a !== void 0 ? _a : {
44723
44746
  version: VERSION
44724
44747
  };
44725
44748
  if (!allowOverride && api[type]) {
44726
44749
  // already registered an API of this type
44727
- var err = new Error("@opentelemetry/api: Attempted duplicate registration of API: " + type);
44750
+ var err = new Error("@opentelemetry/api: Attempted duplicate registration of API: ".concat(type));
44728
44751
  diag.error(err.stack || err.message);
44729
44752
  return false;
44730
44753
  }
44731
44754
  if (api.version !== VERSION) {
44732
44755
  // All registered APIs must be of the same version exactly
44733
- var err = new Error("@opentelemetry/api: Registration of version v" + api.version + " for " + type + " does not match previously registered API v" + VERSION);
44734
- diag.error(err.stack || err.message);
44756
+ var err1 = new Error("@opentelemetry/api: Registration of version v".concat(api.version, " for ").concat(type, " does not match previously registered API v").concat(VERSION));
44757
+ diag.error(err1.stack || err1.message);
44735
44758
  return false;
44736
44759
  }
44737
44760
  api[type] = instance;
44738
- diag.debug("@opentelemetry/api: Registered a global for " + type + " v" + VERSION + ".");
44761
+ diag.debug("@opentelemetry/api: Registered a global for ".concat(type, " v").concat(VERSION, "."));
44739
44762
  return true;
44740
44763
  }
44741
44764
  function getGlobal(type) {
@@ -44747,7 +44770,7 @@ function getGlobal(type) {
44747
44770
  return (_b = _global[GLOBAL_OPENTELEMETRY_API_KEY]) === null || _b === void 0 ? void 0 : _b[type];
44748
44771
  }
44749
44772
  function unregisterGlobal(type, diag) {
44750
- diag.debug("@opentelemetry/api: Unregistering a global for " + type + " v" + VERSION + ".");
44773
+ diag.debug("@opentelemetry/api: Unregistering a global for ".concat(type, " v").concat(VERSION, "."));
44751
44774
  var api = _global[GLOBAL_OPENTELEMETRY_API_KEY];
44752
44775
  if (api) {
44753
44776
  delete api[type];
@@ -44756,46 +44779,50 @@ function unregisterGlobal(type, diag) {
44756
44779
 
44757
44780
  /*
44758
44781
  * Copyright The OpenTelemetry Authors
44759
- *
44760
- * Licensed under the Apache License, Version 2.0 (the "License");
44761
- * you may not use this file except in compliance with the License.
44762
- * You may obtain a copy of the License at
44763
- *
44764
- * https://www.apache.org/licenses/LICENSE-2.0
44765
- *
44766
- * Unless required by applicable law or agreed to in writing, software
44767
- * distributed under the License is distributed on an "AS IS" BASIS,
44768
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
44769
- * See the License for the specific language governing permissions and
44770
- * limitations under the License.
44771
- */ var __read$3 = undefined && undefined.__read || function(o, n) {
44772
- var m = typeof Symbol === "function" && o[Symbol.iterator];
44773
- if (!m) return o;
44774
- var i = m.call(o), r, ar = [], e;
44775
- try {
44776
- while((n === void 0 || n-- > 0) && !(r = i.next()).done)ar.push(r.value);
44777
- } catch (error) {
44778
- e = {
44779
- error: error
44780
- };
44781
- } finally{
44782
- try {
44783
- if (r && !r.done && (m = i["return"])) m.call(i);
44784
- } finally{
44785
- if (e) throw e.error;
44786
- }
44782
+ * SPDX-License-Identifier: Apache-2.0
44783
+ */ function _array_like_to_array$4(arr, len) {
44784
+ if (len == null || len > arr.length) len = arr.length;
44785
+ for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
44786
+ return arr2;
44787
+ }
44788
+ function _array_without_holes$4(arr) {
44789
+ if (Array.isArray(arr)) return _array_like_to_array$4(arr);
44790
+ }
44791
+ function _class_call_check$b(instance, Constructor) {
44792
+ if (!(instance instanceof Constructor)) {
44793
+ throw new TypeError("Cannot call a class as a function");
44787
44794
  }
44788
- return ar;
44789
- };
44790
- var __spreadArray$3 = undefined && undefined.__spreadArray || function(to, from, pack) {
44791
- if (pack || arguments.length === 2) for(var i = 0, l = from.length, ar; i < l; i++){
44792
- if (ar || !(i in from)) {
44793
- if (!ar) ar = Array.prototype.slice.call(from, 0, i);
44794
- ar[i] = from[i];
44795
- }
44795
+ }
44796
+ function _defineProperties$a(target, props) {
44797
+ for(var i = 0; i < props.length; i++){
44798
+ var descriptor = props[i];
44799
+ descriptor.enumerable = descriptor.enumerable || false;
44800
+ descriptor.configurable = true;
44801
+ if ("value" in descriptor) descriptor.writable = true;
44802
+ Object.defineProperty(target, descriptor.key, descriptor);
44796
44803
  }
44797
- return to.concat(ar || Array.prototype.slice.call(from));
44798
- };
44804
+ }
44805
+ function _create_class$a(Constructor, protoProps, staticProps) {
44806
+ if (protoProps) _defineProperties$a(Constructor.prototype, protoProps);
44807
+ return Constructor;
44808
+ }
44809
+ function _iterable_to_array$4(iter) {
44810
+ if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
44811
+ }
44812
+ function _non_iterable_spread$4() {
44813
+ throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
44814
+ }
44815
+ function _to_consumable_array$4(arr) {
44816
+ return _array_without_holes$4(arr) || _iterable_to_array$4(arr) || _unsupported_iterable_to_array$4(arr) || _non_iterable_spread$4();
44817
+ }
44818
+ function _unsupported_iterable_to_array$4(o, minLen) {
44819
+ if (!o) return;
44820
+ if (typeof o === "string") return _array_like_to_array$4(o, minLen);
44821
+ var n = Object.prototype.toString.call(o).slice(8, -1);
44822
+ if (n === "Object" && o.constructor) n = o.constructor.name;
44823
+ if (n === "Map" || n === "Set") return Array.from(n);
44824
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$4(o, minLen);
44825
+ }
44799
44826
  /**
44800
44827
  * Component Logger which is meant to be used as part of any component which
44801
44828
  * will add automatically additional namespace in front of the log message.
@@ -44804,71 +44831,75 @@ var __spreadArray$3 = undefined && undefined.__spreadArray || function(to, from,
44804
44831
  * const cLogger = diag.createComponentLogger({ namespace: '@opentelemetry/instrumentation-http' });
44805
44832
  * cLogger.debug('test');
44806
44833
  * // @opentelemetry/instrumentation-http test
44807
- */ var DiagComponentLogger = /** @class */ function() {
44834
+ */ var DiagComponentLogger = /*#__PURE__*/ function() {
44808
44835
  function DiagComponentLogger(props) {
44836
+ _class_call_check$b(this, DiagComponentLogger);
44809
44837
  this._namespace = props.namespace || 'DiagComponentLogger';
44810
44838
  }
44811
- DiagComponentLogger.prototype.debug = function() {
44812
- var args = [];
44813
- for(var _i = 0; _i < arguments.length; _i++){
44814
- args[_i] = arguments[_i];
44815
- }
44816
- return logProxy('debug', this._namespace, args);
44817
- };
44818
- DiagComponentLogger.prototype.error = function() {
44819
- var args = [];
44820
- for(var _i = 0; _i < arguments.length; _i++){
44821
- args[_i] = arguments[_i];
44822
- }
44823
- return logProxy('error', this._namespace, args);
44824
- };
44825
- DiagComponentLogger.prototype.info = function() {
44826
- var args = [];
44827
- for(var _i = 0; _i < arguments.length; _i++){
44828
- args[_i] = arguments[_i];
44829
- }
44830
- return logProxy('info', this._namespace, args);
44831
- };
44832
- DiagComponentLogger.prototype.warn = function() {
44833
- var args = [];
44834
- for(var _i = 0; _i < arguments.length; _i++){
44835
- args[_i] = arguments[_i];
44836
- }
44837
- return logProxy('warn', this._namespace, args);
44838
- };
44839
- DiagComponentLogger.prototype.verbose = function() {
44840
- var args = [];
44841
- for(var _i = 0; _i < arguments.length; _i++){
44842
- args[_i] = arguments[_i];
44839
+ _create_class$a(DiagComponentLogger, [
44840
+ {
44841
+ key: "debug",
44842
+ value: function debug() {
44843
+ for(var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++){
44844
+ args[_key] = arguments[_key];
44845
+ }
44846
+ return logProxy('debug', this._namespace, args);
44847
+ }
44848
+ },
44849
+ {
44850
+ key: "error",
44851
+ value: function error() {
44852
+ for(var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++){
44853
+ args[_key] = arguments[_key];
44854
+ }
44855
+ return logProxy('error', this._namespace, args);
44856
+ }
44857
+ },
44858
+ {
44859
+ key: "info",
44860
+ value: function info() {
44861
+ for(var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++){
44862
+ args[_key] = arguments[_key];
44863
+ }
44864
+ return logProxy('info', this._namespace, args);
44865
+ }
44866
+ },
44867
+ {
44868
+ key: "warn",
44869
+ value: function warn() {
44870
+ for(var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++){
44871
+ args[_key] = arguments[_key];
44872
+ }
44873
+ return logProxy('warn', this._namespace, args);
44874
+ }
44875
+ },
44876
+ {
44877
+ key: "verbose",
44878
+ value: function verbose() {
44879
+ for(var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++){
44880
+ args[_key] = arguments[_key];
44881
+ }
44882
+ return logProxy('verbose', this._namespace, args);
44883
+ }
44843
44884
  }
44844
- return logProxy('verbose', this._namespace, args);
44845
- };
44885
+ ]);
44846
44886
  return DiagComponentLogger;
44847
44887
  }();
44848
44888
  function logProxy(funcName, namespace, args) {
44889
+ var _logger;
44849
44890
  var logger = getGlobal('diag');
44850
44891
  // shortcut if logger not set
44851
44892
  if (!logger) {
44852
44893
  return;
44853
44894
  }
44854
- args.unshift(namespace);
44855
- return logger[funcName].apply(logger, __spreadArray$3([], __read$3(args), false));
44895
+ return (_logger = logger)[funcName].apply(_logger, [
44896
+ namespace
44897
+ ].concat(_to_consumable_array$4(args)));
44856
44898
  }
44857
44899
 
44858
44900
  /*
44859
44901
  * Copyright The OpenTelemetry Authors
44860
- *
44861
- * Licensed under the Apache License, Version 2.0 (the "License");
44862
- * you may not use this file except in compliance with the License.
44863
- * You may obtain a copy of the License at
44864
- *
44865
- * https://www.apache.org/licenses/LICENSE-2.0
44866
- *
44867
- * Unless required by applicable law or agreed to in writing, software
44868
- * distributed under the License is distributed on an "AS IS" BASIS,
44869
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
44870
- * See the License for the specific language governing permissions and
44871
- * limitations under the License.
44902
+ * SPDX-License-Identifier: Apache-2.0
44872
44903
  */ /**
44873
44904
  * Defines the available internal logging levels for the diagnostic logger, the numeric values
44874
44905
  * of the levels are defined to match the original values from the initial LogLevel to avoid
@@ -44913,77 +44944,79 @@ function createLogLevelDiagLogger(maxLevel, logger) {
44913
44944
 
44914
44945
  /*
44915
44946
  * Copyright The OpenTelemetry Authors
44916
- *
44917
- * Licensed under the Apache License, Version 2.0 (the "License");
44918
- * you may not use this file except in compliance with the License.
44919
- * You may obtain a copy of the License at
44920
- *
44921
- * https://www.apache.org/licenses/LICENSE-2.0
44922
- *
44923
- * Unless required by applicable law or agreed to in writing, software
44924
- * distributed under the License is distributed on an "AS IS" BASIS,
44925
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
44926
- * See the License for the specific language governing permissions and
44927
- * limitations under the License.
44928
- */ var __read$2 = undefined && undefined.__read || function(o, n) {
44929
- var m = typeof Symbol === "function" && o[Symbol.iterator];
44930
- if (!m) return o;
44931
- var i = m.call(o), r, ar = [], e;
44932
- try {
44933
- while((n === void 0 || n-- > 0) && !(r = i.next()).done)ar.push(r.value);
44934
- } catch (error) {
44935
- e = {
44936
- error: error
44937
- };
44938
- } finally{
44939
- try {
44940
- if (r && !r.done && (m = i["return"])) m.call(i);
44941
- } finally{
44942
- if (e) throw e.error;
44943
- }
44947
+ * SPDX-License-Identifier: Apache-2.0
44948
+ */ function _array_like_to_array$3(arr, len) {
44949
+ if (len == null || len > arr.length) len = arr.length;
44950
+ for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
44951
+ return arr2;
44952
+ }
44953
+ function _array_without_holes$3(arr) {
44954
+ if (Array.isArray(arr)) return _array_like_to_array$3(arr);
44955
+ }
44956
+ function _class_call_check$a(instance, Constructor) {
44957
+ if (!(instance instanceof Constructor)) {
44958
+ throw new TypeError("Cannot call a class as a function");
44944
44959
  }
44945
- return ar;
44946
- };
44947
- var __spreadArray$2 = undefined && undefined.__spreadArray || function(to, from, pack) {
44948
- if (pack || arguments.length === 2) for(var i = 0, l = from.length, ar; i < l; i++){
44949
- if (ar || !(i in from)) {
44950
- if (!ar) ar = Array.prototype.slice.call(from, 0, i);
44951
- ar[i] = from[i];
44952
- }
44960
+ }
44961
+ function _defineProperties$9(target, props) {
44962
+ for(var i = 0; i < props.length; i++){
44963
+ var descriptor = props[i];
44964
+ descriptor.enumerable = descriptor.enumerable || false;
44965
+ descriptor.configurable = true;
44966
+ if ("value" in descriptor) descriptor.writable = true;
44967
+ Object.defineProperty(target, descriptor.key, descriptor);
44953
44968
  }
44954
- return to.concat(ar || Array.prototype.slice.call(from));
44955
- };
44969
+ }
44970
+ function _create_class$9(Constructor, protoProps, staticProps) {
44971
+ if (staticProps) _defineProperties$9(Constructor, staticProps);
44972
+ return Constructor;
44973
+ }
44974
+ function _iterable_to_array$3(iter) {
44975
+ if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
44976
+ }
44977
+ function _non_iterable_spread$3() {
44978
+ throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
44979
+ }
44980
+ function _to_consumable_array$3(arr) {
44981
+ return _array_without_holes$3(arr) || _iterable_to_array$3(arr) || _unsupported_iterable_to_array$3(arr) || _non_iterable_spread$3();
44982
+ }
44983
+ function _unsupported_iterable_to_array$3(o, minLen) {
44984
+ if (!o) return;
44985
+ if (typeof o === "string") return _array_like_to_array$3(o, minLen);
44986
+ var n = Object.prototype.toString.call(o).slice(8, -1);
44987
+ if (n === "Object" && o.constructor) n = o.constructor.name;
44988
+ if (n === "Map" || n === "Set") return Array.from(n);
44989
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$3(o, minLen);
44990
+ }
44956
44991
  var API_NAME$2 = 'diag';
44957
44992
  /**
44958
44993
  * Singleton object which represents the entry point to the OpenTelemetry internal
44959
44994
  * diagnostic API
44960
- */ var DiagAPI = /** @class */ function() {
44961
- /**
44962
- * Private internal constructor
44963
- * @private
44964
- */ function DiagAPI() {
44965
- function _logProxy(funcName) {
44995
+ *
44996
+ * @since 1.0.0
44997
+ */ var DiagAPI = /*#__PURE__*/ function() {
44998
+ function DiagAPI() {
44999
+ _class_call_check$a(this, DiagAPI);
45000
+ var _logProxy = function _logProxy(funcName) {
44966
45001
  return function() {
44967
- var args = [];
44968
- for(var _i = 0; _i < arguments.length; _i++){
44969
- args[_i] = arguments[_i];
45002
+ for(var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++){
45003
+ args[_key] = arguments[_key];
44970
45004
  }
45005
+ var _logger;
44971
45006
  var logger = getGlobal('diag');
44972
45007
  // shortcut if logger not set
44973
45008
  if (!logger) return;
44974
- return logger[funcName].apply(logger, __spreadArray$2([], __read$2(args), false));
45009
+ return (_logger = logger)[funcName].apply(_logger, _to_consumable_array$3(args));
44975
45010
  };
44976
- }
45011
+ };
44977
45012
  // Using self local variable for minification purposes as 'this' cannot be minified
44978
45013
  var self = this;
44979
45014
  // DiagAPI specific functions
44980
- var setLogger = function setLogger(logger, optionsOrLogLevel) {
45015
+ var setLogger = function(logger) {
45016
+ var optionsOrLogLevel = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {
45017
+ logLevel: DiagLogLevel.INFO
45018
+ };
44981
45019
  var _a, _b, _c;
44982
- if (optionsOrLogLevel === void 0) {
44983
- optionsOrLogLevel = {
44984
- logLevel: DiagLogLevel.INFO
44985
- };
44986
- }
44987
45020
  if (logger === self) {
44988
45021
  // There isn't much we can do here.
44989
45022
  // Logging to the console might break the user application.
@@ -45002,8 +45035,8 @@ var API_NAME$2 = 'diag';
45002
45035
  // There already is an logger registered. We'll let it know before overwriting it.
45003
45036
  if (oldLogger && !optionsOrLogLevel.suppressOverrideMessage) {
45004
45037
  var stack = (_c = new Error().stack) !== null && _c !== void 0 ? _c : '<failed to generate stacktrace>';
45005
- oldLogger.warn("Current logger will be overwritten from " + stack);
45006
- newLogger.warn("Current logger will overwrite one already registered from " + stack);
45038
+ oldLogger.warn("Current logger will be overwritten from ".concat(stack));
45039
+ newLogger.warn("Current logger will overwrite one already registered from ".concat(stack));
45007
45040
  }
45008
45041
  return registerGlobal('diag', newLogger, self, true);
45009
45042
  };
@@ -45020,30 +45053,34 @@ var API_NAME$2 = 'diag';
45020
45053
  self.warn = _logProxy('warn');
45021
45054
  self.error = _logProxy('error');
45022
45055
  }
45023
- /** Get the singleton instance of the DiagAPI API */ DiagAPI.instance = function() {
45024
- if (!this._instance) {
45025
- this._instance = new DiagAPI();
45056
+ _create_class$9(DiagAPI, null, [
45057
+ {
45058
+ key: "instance",
45059
+ value: /** Get the singleton instance of the DiagAPI API */ function instance() {
45060
+ if (!this._instance) {
45061
+ this._instance = new DiagAPI();
45062
+ }
45063
+ return this._instance;
45064
+ }
45026
45065
  }
45027
- return this._instance;
45028
- };
45066
+ ]);
45029
45067
  return DiagAPI;
45030
- }();
45068
+ }
45069
+ ();
45031
45070
 
45032
45071
  /*
45033
45072
  * Copyright The OpenTelemetry Authors
45073
+ * SPDX-License-Identifier: Apache-2.0
45074
+ */ /**
45075
+ * Get a key to uniquely identify a context value
45034
45076
  *
45035
- * Licensed under the Apache License, Version 2.0 (the "License");
45036
- * you may not use this file except in compliance with the License.
45037
- * You may obtain a copy of the License at
45038
- *
45039
- * https://www.apache.org/licenses/LICENSE-2.0
45040
- *
45041
- * Unless required by applicable law or agreed to in writing, software
45042
- * distributed under the License is distributed on an "AS IS" BASIS,
45043
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
45044
- * See the License for the specific language governing permissions and
45045
- * limitations under the License.
45046
- */ /** Get a key to uniquely identify a context value */ function createContextKey(description) {
45077
+ * @since 1.0.0
45078
+ */ function _class_call_check$9(instance, Constructor) {
45079
+ if (!(instance instanceof Constructor)) {
45080
+ throw new TypeError("Cannot call a class as a function");
45081
+ }
45082
+ }
45083
+ function createContextKey(description) {
45047
45084
  // The specification states that for the same input, multiple calls should
45048
45085
  // return different keys. Due to the nature of the JS dependency management
45049
45086
  // system, this creates problems where multiple versions of some package
@@ -45052,283 +45089,391 @@ var API_NAME$2 = 'diag';
45052
45089
  // Therefore, we use Symbol.for which returns the same key for the same input.
45053
45090
  return Symbol.for(description);
45054
45091
  }
45055
- var BaseContext = /** @class */ function() {
45056
- /**
45057
- * Construct a new context which inherits values from an optional parent context.
45058
- *
45059
- * @param parentContext a context from which to inherit values
45060
- */ function BaseContext(parentContext) {
45061
- // for minification
45062
- var self = this;
45063
- self._currentContext = parentContext ? new Map(parentContext) : new Map();
45064
- self.getValue = function(key) {
45065
- return self._currentContext.get(key);
45066
- };
45067
- self.setValue = function(key, value) {
45068
- var context = new BaseContext(self._currentContext);
45069
- context._currentContext.set(key, value);
45070
- return context;
45071
- };
45072
- self.deleteValue = function(key) {
45073
- var context = new BaseContext(self._currentContext);
45074
- context._currentContext.delete(key);
45075
- return context;
45076
- };
45077
- }
45078
- return BaseContext;
45079
- }();
45080
- /** The root context is used as the default parent context when there is no active context */ var ROOT_CONTEXT = new BaseContext();
45092
+ var BaseContext = function BaseContext(parentContext) {
45093
+ _class_call_check$9(this, BaseContext);
45094
+ // for minification
45095
+ var self = this;
45096
+ self._currentContext = parentContext ? new Map(parentContext) : new Map();
45097
+ self.getValue = function(key) {
45098
+ return self._currentContext.get(key);
45099
+ };
45100
+ self.setValue = function(key, value) {
45101
+ var context = new BaseContext(self._currentContext);
45102
+ context._currentContext.set(key, value);
45103
+ return context;
45104
+ };
45105
+ self.deleteValue = function(key) {
45106
+ var context = new BaseContext(self._currentContext);
45107
+ context._currentContext.delete(key);
45108
+ return context;
45109
+ };
45110
+ };
45111
+ /**
45112
+ * The root context is used as the default parent context when there is no active context
45113
+ *
45114
+ * @since 1.0.0
45115
+ */ var ROOT_CONTEXT = new BaseContext();
45081
45116
 
45082
45117
  /*
45083
45118
  * Copyright The OpenTelemetry Authors
45084
- *
45085
- * Licensed under the Apache License, Version 2.0 (the "License");
45086
- * you may not use this file except in compliance with the License.
45087
- * You may obtain a copy of the License at
45088
- *
45089
- * https://www.apache.org/licenses/LICENSE-2.0
45090
- *
45091
- * Unless required by applicable law or agreed to in writing, software
45092
- * distributed under the License is distributed on an "AS IS" BASIS,
45093
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
45094
- * See the License for the specific language governing permissions and
45095
- * limitations under the License.
45096
- */ var __read$1 = undefined && undefined.__read || function(o, n) {
45097
- var m = typeof Symbol === "function" && o[Symbol.iterator];
45098
- if (!m) return o;
45099
- var i = m.call(o), r, ar = [], e;
45100
- try {
45101
- while((n === void 0 || n-- > 0) && !(r = i.next()).done)ar.push(r.value);
45102
- } catch (error) {
45103
- e = {
45104
- error: error
45105
- };
45106
- } finally{
45107
- try {
45108
- if (r && !r.done && (m = i["return"])) m.call(i);
45109
- } finally{
45110
- if (e) throw e.error;
45111
- }
45119
+ * SPDX-License-Identifier: Apache-2.0
45120
+ */ function _array_like_to_array$2(arr, len) {
45121
+ if (len == null || len > arr.length) len = arr.length;
45122
+ for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
45123
+ return arr2;
45124
+ }
45125
+ function _array_without_holes$2(arr) {
45126
+ if (Array.isArray(arr)) return _array_like_to_array$2(arr);
45127
+ }
45128
+ function _class_call_check$8(instance, Constructor) {
45129
+ if (!(instance instanceof Constructor)) {
45130
+ throw new TypeError("Cannot call a class as a function");
45112
45131
  }
45113
- return ar;
45114
- };
45115
- var __spreadArray$1 = undefined && undefined.__spreadArray || function(to, from, pack) {
45116
- if (pack || arguments.length === 2) for(var i = 0, l = from.length, ar; i < l; i++){
45117
- if (ar || !(i in from)) {
45118
- if (!ar) ar = Array.prototype.slice.call(from, 0, i);
45119
- ar[i] = from[i];
45120
- }
45132
+ }
45133
+ function _defineProperties$8(target, props) {
45134
+ for(var i = 0; i < props.length; i++){
45135
+ var descriptor = props[i];
45136
+ descriptor.enumerable = descriptor.enumerable || false;
45137
+ descriptor.configurable = true;
45138
+ if ("value" in descriptor) descriptor.writable = true;
45139
+ Object.defineProperty(target, descriptor.key, descriptor);
45121
45140
  }
45122
- return to.concat(ar || Array.prototype.slice.call(from));
45123
- };
45124
- var NoopContextManager = /** @class */ function() {
45125
- function NoopContextManager() {}
45126
- NoopContextManager.prototype.active = function() {
45127
- return ROOT_CONTEXT;
45128
- };
45129
- NoopContextManager.prototype.with = function(_context, fn, thisArg) {
45130
- var args = [];
45131
- for(var _i = 3; _i < arguments.length; _i++){
45132
- args[_i - 3] = arguments[_i];
45133
- }
45134
- return fn.call.apply(fn, __spreadArray$1([
45135
- thisArg
45136
- ], __read$1(args), false));
45137
- };
45138
- NoopContextManager.prototype.bind = function(_context, target) {
45139
- return target;
45140
- };
45141
- NoopContextManager.prototype.enable = function() {
45142
- return this;
45143
- };
45144
- NoopContextManager.prototype.disable = function() {
45145
- return this;
45146
- };
45141
+ }
45142
+ function _create_class$8(Constructor, protoProps, staticProps) {
45143
+ if (protoProps) _defineProperties$8(Constructor.prototype, protoProps);
45144
+ return Constructor;
45145
+ }
45146
+ function _iterable_to_array$2(iter) {
45147
+ if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
45148
+ }
45149
+ function _non_iterable_spread$2() {
45150
+ throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
45151
+ }
45152
+ function _to_consumable_array$2(arr) {
45153
+ return _array_without_holes$2(arr) || _iterable_to_array$2(arr) || _unsupported_iterable_to_array$2(arr) || _non_iterable_spread$2();
45154
+ }
45155
+ function _unsupported_iterable_to_array$2(o, minLen) {
45156
+ if (!o) return;
45157
+ if (typeof o === "string") return _array_like_to_array$2(o, minLen);
45158
+ var n = Object.prototype.toString.call(o).slice(8, -1);
45159
+ if (n === "Object" && o.constructor) n = o.constructor.name;
45160
+ if (n === "Map" || n === "Set") return Array.from(n);
45161
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$2(o, minLen);
45162
+ }
45163
+ var NoopContextManager = /*#__PURE__*/ function() {
45164
+ function NoopContextManager() {
45165
+ _class_call_check$8(this, NoopContextManager);
45166
+ }
45167
+ _create_class$8(NoopContextManager, [
45168
+ {
45169
+ key: "active",
45170
+ value: function active() {
45171
+ return ROOT_CONTEXT;
45172
+ }
45173
+ },
45174
+ {
45175
+ key: "with",
45176
+ value: function _with(_context, fn, thisArg) {
45177
+ for(var _len = arguments.length, args = new Array(_len > 3 ? _len - 3 : 0), _key = 3; _key < _len; _key++){
45178
+ args[_key - 3] = arguments[_key];
45179
+ }
45180
+ var _fn;
45181
+ return (_fn = fn).call.apply(_fn, [
45182
+ thisArg
45183
+ ].concat(_to_consumable_array$2(args)));
45184
+ }
45185
+ },
45186
+ {
45187
+ key: "bind",
45188
+ value: function bind(_context, target) {
45189
+ return target;
45190
+ }
45191
+ },
45192
+ {
45193
+ key: "enable",
45194
+ value: function enable() {
45195
+ return this;
45196
+ }
45197
+ },
45198
+ {
45199
+ key: "disable",
45200
+ value: function disable() {
45201
+ return this;
45202
+ }
45203
+ }
45204
+ ]);
45147
45205
  return NoopContextManager;
45148
- }();
45206
+ }
45207
+ ();
45149
45208
 
45150
45209
  /*
45151
45210
  * Copyright The OpenTelemetry Authors
45152
- *
45153
- * Licensed under the Apache License, Version 2.0 (the "License");
45154
- * you may not use this file except in compliance with the License.
45155
- * You may obtain a copy of the License at
45156
- *
45157
- * https://www.apache.org/licenses/LICENSE-2.0
45158
- *
45159
- * Unless required by applicable law or agreed to in writing, software
45160
- * distributed under the License is distributed on an "AS IS" BASIS,
45161
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
45162
- * See the License for the specific language governing permissions and
45163
- * limitations under the License.
45164
- */ var __read = undefined && undefined.__read || function(o, n) {
45165
- var m = typeof Symbol === "function" && o[Symbol.iterator];
45166
- if (!m) return o;
45167
- var i = m.call(o), r, ar = [], e;
45168
- try {
45169
- while((n === void 0 || n-- > 0) && !(r = i.next()).done)ar.push(r.value);
45170
- } catch (error) {
45171
- e = {
45172
- error: error
45173
- };
45174
- } finally{
45175
- try {
45176
- if (r && !r.done && (m = i["return"])) m.call(i);
45177
- } finally{
45178
- if (e) throw e.error;
45179
- }
45211
+ * SPDX-License-Identifier: Apache-2.0
45212
+ */ function _array_like_to_array$1(arr, len) {
45213
+ if (len == null || len > arr.length) len = arr.length;
45214
+ for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
45215
+ return arr2;
45216
+ }
45217
+ function _array_without_holes$1(arr) {
45218
+ if (Array.isArray(arr)) return _array_like_to_array$1(arr);
45219
+ }
45220
+ function _class_call_check$7(instance, Constructor) {
45221
+ if (!(instance instanceof Constructor)) {
45222
+ throw new TypeError("Cannot call a class as a function");
45180
45223
  }
45181
- return ar;
45182
- };
45183
- var __spreadArray = undefined && undefined.__spreadArray || function(to, from, pack) {
45184
- if (pack || arguments.length === 2) for(var i = 0, l = from.length, ar; i < l; i++){
45185
- if (ar || !(i in from)) {
45186
- if (!ar) ar = Array.prototype.slice.call(from, 0, i);
45187
- ar[i] = from[i];
45188
- }
45224
+ }
45225
+ function _defineProperties$7(target, props) {
45226
+ for(var i = 0; i < props.length; i++){
45227
+ var descriptor = props[i];
45228
+ descriptor.enumerable = descriptor.enumerable || false;
45229
+ descriptor.configurable = true;
45230
+ if ("value" in descriptor) descriptor.writable = true;
45231
+ Object.defineProperty(target, descriptor.key, descriptor);
45189
45232
  }
45190
- return to.concat(ar || Array.prototype.slice.call(from));
45191
- };
45233
+ }
45234
+ function _create_class$7(Constructor, protoProps, staticProps) {
45235
+ if (protoProps) _defineProperties$7(Constructor.prototype, protoProps);
45236
+ if (staticProps) _defineProperties$7(Constructor, staticProps);
45237
+ return Constructor;
45238
+ }
45239
+ function _iterable_to_array$1(iter) {
45240
+ if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
45241
+ }
45242
+ function _non_iterable_spread$1() {
45243
+ throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
45244
+ }
45245
+ function _to_consumable_array$1(arr) {
45246
+ return _array_without_holes$1(arr) || _iterable_to_array$1(arr) || _unsupported_iterable_to_array$1(arr) || _non_iterable_spread$1();
45247
+ }
45248
+ function _unsupported_iterable_to_array$1(o, minLen) {
45249
+ if (!o) return;
45250
+ if (typeof o === "string") return _array_like_to_array$1(o, minLen);
45251
+ var n = Object.prototype.toString.call(o).slice(8, -1);
45252
+ if (n === "Object" && o.constructor) n = o.constructor.name;
45253
+ if (n === "Map" || n === "Set") return Array.from(n);
45254
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$1(o, minLen);
45255
+ }
45192
45256
  var API_NAME$1 = 'context';
45193
45257
  var NOOP_CONTEXT_MANAGER = new NoopContextManager();
45194
45258
  /**
45195
45259
  * Singleton object which represents the entry point to the OpenTelemetry Context API
45196
- */ var ContextAPI = /** @class */ function() {
45197
- /** Empty private constructor prevents end users from constructing a new instance of the API */ function ContextAPI() {}
45198
- /** Get the singleton instance of the Context API */ ContextAPI.getInstance = function() {
45199
- if (!this._instance) {
45200
- this._instance = new ContextAPI();
45201
- }
45202
- return this._instance;
45203
- };
45204
- /**
45260
+ *
45261
+ * @since 1.0.0
45262
+ */ var ContextAPI = /*#__PURE__*/ function() {
45263
+ function ContextAPI() {
45264
+ _class_call_check$7(this, ContextAPI);
45265
+ }
45266
+ _create_class$7(ContextAPI, [
45267
+ {
45268
+ /**
45205
45269
  * Set the current context manager.
45206
45270
  *
45207
45271
  * @returns true if the context manager was successfully registered, else false
45208
- */ ContextAPI.prototype.setGlobalContextManager = function(contextManager) {
45209
- return registerGlobal(API_NAME$1, contextManager, DiagAPI.instance());
45210
- };
45211
- /**
45272
+ */ key: "setGlobalContextManager",
45273
+ value: function setGlobalContextManager(contextManager) {
45274
+ return registerGlobal(API_NAME$1, contextManager, DiagAPI.instance());
45275
+ }
45276
+ },
45277
+ {
45278
+ /**
45212
45279
  * Get the currently active context
45213
- */ ContextAPI.prototype.active = function() {
45214
- return this._getContextManager().active();
45215
- };
45216
- /**
45280
+ */ key: "active",
45281
+ value: function active() {
45282
+ return this._getContextManager().active();
45283
+ }
45284
+ },
45285
+ {
45286
+ /**
45217
45287
  * Execute a function with an active context
45218
45288
  *
45219
45289
  * @param context context to be active during function execution
45220
45290
  * @param fn function to execute in a context
45221
45291
  * @param thisArg optional receiver to be used for calling fn
45222
45292
  * @param args optional arguments forwarded to fn
45223
- */ ContextAPI.prototype.with = function(context, fn, thisArg) {
45224
- var _a;
45225
- var args = [];
45226
- for(var _i = 3; _i < arguments.length; _i++){
45227
- args[_i - 3] = arguments[_i];
45228
- }
45229
- return (_a = this._getContextManager()).with.apply(_a, __spreadArray([
45230
- context,
45231
- fn,
45232
- thisArg
45233
- ], __read(args), false));
45234
- };
45235
- /**
45293
+ */ key: "with",
45294
+ value: function _with(context, fn, thisArg) {
45295
+ for(var _len = arguments.length, args = new Array(_len > 3 ? _len - 3 : 0), _key = 3; _key < _len; _key++){
45296
+ args[_key - 3] = arguments[_key];
45297
+ }
45298
+ var _this__getContextManager;
45299
+ return (_this__getContextManager = this._getContextManager()).with.apply(_this__getContextManager, [
45300
+ context,
45301
+ fn,
45302
+ thisArg
45303
+ ].concat(_to_consumable_array$1(args)));
45304
+ }
45305
+ },
45306
+ {
45307
+ /**
45236
45308
  * Bind a context to a target function or event emitter
45237
45309
  *
45238
45310
  * @param context context to bind to the event emitter or function. Defaults to the currently active context
45239
45311
  * @param target function or event emitter to bind
45240
- */ ContextAPI.prototype.bind = function(context, target) {
45241
- return this._getContextManager().bind(context, target);
45242
- };
45243
- ContextAPI.prototype._getContextManager = function() {
45244
- return getGlobal(API_NAME$1) || NOOP_CONTEXT_MANAGER;
45245
- };
45246
- /** Disable and remove the global context manager */ ContextAPI.prototype.disable = function() {
45247
- this._getContextManager().disable();
45248
- unregisterGlobal(API_NAME$1, DiagAPI.instance());
45249
- };
45312
+ */ key: "bind",
45313
+ value: function bind(context, target) {
45314
+ return this._getContextManager().bind(context, target);
45315
+ }
45316
+ },
45317
+ {
45318
+ key: "_getContextManager",
45319
+ value: function _getContextManager() {
45320
+ return getGlobal(API_NAME$1) || NOOP_CONTEXT_MANAGER;
45321
+ }
45322
+ },
45323
+ {
45324
+ /** Disable and remove the global context manager */ key: "disable",
45325
+ value: function disable() {
45326
+ this._getContextManager().disable();
45327
+ unregisterGlobal(API_NAME$1, DiagAPI.instance());
45328
+ }
45329
+ }
45330
+ ], [
45331
+ {
45332
+ key: "getInstance",
45333
+ value: /** Get the singleton instance of the Context API */ function getInstance() {
45334
+ if (!this._instance) {
45335
+ this._instance = new ContextAPI();
45336
+ }
45337
+ return this._instance;
45338
+ }
45339
+ }
45340
+ ]);
45250
45341
  return ContextAPI;
45251
- }();
45342
+ }
45343
+ ();
45252
45344
 
45253
45345
  /*
45254
45346
  * Copyright The OpenTelemetry Authors
45255
- *
45256
- * Licensed under the Apache License, Version 2.0 (the "License");
45257
- * you may not use this file except in compliance with the License.
45258
- * You may obtain a copy of the License at
45259
- *
45260
- * https://www.apache.org/licenses/LICENSE-2.0
45261
- *
45262
- * Unless required by applicable law or agreed to in writing, software
45263
- * distributed under the License is distributed on an "AS IS" BASIS,
45264
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
45265
- * See the License for the specific language governing permissions and
45266
- * limitations under the License.
45347
+ * SPDX-License-Identifier: Apache-2.0
45348
+ */ /**
45349
+ * @since 1.0.0
45267
45350
  */ var TraceFlags;
45268
45351
  (function(TraceFlags) {
45269
45352
  /** Represents no flag set. */ TraceFlags[TraceFlags["NONE"] = 0] = "NONE";
45270
45353
  /** Bit to represent whether trace is sampled in trace flags. */ TraceFlags[TraceFlags["SAMPLED"] = 1] = "SAMPLED";
45271
45354
  })(TraceFlags || (TraceFlags = {}));
45272
45355
 
45273
- var INVALID_SPANID = '0000000000000000';
45274
- var INVALID_TRACEID = '00000000000000000000000000000000';
45275
- var INVALID_SPAN_CONTEXT = {
45356
+ /**
45357
+ * @since 1.0.0
45358
+ */ var INVALID_SPANID = '0000000000000000';
45359
+ /**
45360
+ * @since 1.0.0
45361
+ */ var INVALID_TRACEID = '00000000000000000000000000000000';
45362
+ /**
45363
+ * @since 1.0.0
45364
+ */ var INVALID_SPAN_CONTEXT = {
45276
45365
  traceId: INVALID_TRACEID,
45277
45366
  spanId: INVALID_SPANID,
45278
45367
  traceFlags: TraceFlags.NONE
45279
45368
  };
45280
45369
 
45370
+ /*
45371
+ * Copyright The OpenTelemetry Authors
45372
+ * SPDX-License-Identifier: Apache-2.0
45373
+ */ function _class_call_check$6(instance, Constructor) {
45374
+ if (!(instance instanceof Constructor)) {
45375
+ throw new TypeError("Cannot call a class as a function");
45376
+ }
45377
+ }
45378
+ function _defineProperties$6(target, props) {
45379
+ for(var i = 0; i < props.length; i++){
45380
+ var descriptor = props[i];
45381
+ descriptor.enumerable = descriptor.enumerable || false;
45382
+ descriptor.configurable = true;
45383
+ if ("value" in descriptor) descriptor.writable = true;
45384
+ Object.defineProperty(target, descriptor.key, descriptor);
45385
+ }
45386
+ }
45387
+ function _create_class$6(Constructor, protoProps, staticProps) {
45388
+ if (protoProps) _defineProperties$6(Constructor.prototype, protoProps);
45389
+ return Constructor;
45390
+ }
45281
45391
  /**
45282
45392
  * The NonRecordingSpan is the default {@link Span} that is used when no Span
45283
45393
  * implementation is available. All operations are no-op including context
45284
45394
  * propagation.
45285
- */ var NonRecordingSpan = /** @class */ function() {
45286
- function NonRecordingSpan(_spanContext) {
45287
- if (_spanContext === void 0) {
45288
- _spanContext = INVALID_SPAN_CONTEXT;
45289
- }
45290
- this._spanContext = _spanContext;
45395
+ */ var NonRecordingSpan = /*#__PURE__*/ function() {
45396
+ function NonRecordingSpan() {
45397
+ var spanContext = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : INVALID_SPAN_CONTEXT;
45398
+ _class_call_check$6(this, NonRecordingSpan);
45399
+ this._spanContext = spanContext;
45291
45400
  }
45292
- // Returns a SpanContext.
45293
- NonRecordingSpan.prototype.spanContext = function() {
45294
- return this._spanContext;
45295
- };
45296
- // By default does nothing
45297
- NonRecordingSpan.prototype.setAttribute = function(_key, _value) {
45298
- return this;
45299
- };
45300
- // By default does nothing
45301
- NonRecordingSpan.prototype.setAttributes = function(_attributes) {
45302
- return this;
45303
- };
45304
- // By default does nothing
45305
- NonRecordingSpan.prototype.addEvent = function(_name, _attributes) {
45306
- return this;
45307
- };
45308
- NonRecordingSpan.prototype.addLink = function(_link) {
45309
- return this;
45310
- };
45311
- NonRecordingSpan.prototype.addLinks = function(_links) {
45312
- return this;
45313
- };
45314
- // By default does nothing
45315
- NonRecordingSpan.prototype.setStatus = function(_status) {
45316
- return this;
45317
- };
45318
- // By default does nothing
45319
- NonRecordingSpan.prototype.updateName = function(_name) {
45320
- return this;
45321
- };
45322
- // By default does nothing
45323
- NonRecordingSpan.prototype.end = function(_endTime) {};
45324
- // isRecording always returns false for NonRecordingSpan.
45325
- NonRecordingSpan.prototype.isRecording = function() {
45326
- return false;
45327
- };
45328
- // By default does nothing
45329
- NonRecordingSpan.prototype.recordException = function(_exception, _time) {};
45401
+ _create_class$6(NonRecordingSpan, [
45402
+ {
45403
+ // Returns a SpanContext.
45404
+ key: "spanContext",
45405
+ value: function spanContext() {
45406
+ return this._spanContext;
45407
+ }
45408
+ },
45409
+ {
45410
+ // By default does nothing
45411
+ key: "setAttribute",
45412
+ value: function setAttribute(_key, _value) {
45413
+ return this;
45414
+ }
45415
+ },
45416
+ {
45417
+ // By default does nothing
45418
+ key: "setAttributes",
45419
+ value: function setAttributes(_attributes) {
45420
+ return this;
45421
+ }
45422
+ },
45423
+ {
45424
+ // By default does nothing
45425
+ key: "addEvent",
45426
+ value: function addEvent(_name, _attributes) {
45427
+ return this;
45428
+ }
45429
+ },
45430
+ {
45431
+ key: "addLink",
45432
+ value: function addLink(_link) {
45433
+ return this;
45434
+ }
45435
+ },
45436
+ {
45437
+ key: "addLinks",
45438
+ value: function addLinks(_links) {
45439
+ return this;
45440
+ }
45441
+ },
45442
+ {
45443
+ // By default does nothing
45444
+ key: "setStatus",
45445
+ value: function setStatus(_status) {
45446
+ return this;
45447
+ }
45448
+ },
45449
+ {
45450
+ // By default does nothing
45451
+ key: "updateName",
45452
+ value: function updateName(_name) {
45453
+ return this;
45454
+ }
45455
+ },
45456
+ {
45457
+ // By default does nothing
45458
+ key: "end",
45459
+ value: function end(_endTime) {}
45460
+ },
45461
+ {
45462
+ // isRecording always returns false for NonRecordingSpan.
45463
+ key: "isRecording",
45464
+ value: function isRecording() {
45465
+ return false;
45466
+ }
45467
+ },
45468
+ {
45469
+ // By default does nothing
45470
+ key: "recordException",
45471
+ value: function recordException(_exception, _time) {}
45472
+ }
45473
+ ]);
45330
45474
  return NonRecordingSpan;
45331
- }();
45475
+ }
45476
+ ();
45332
45477
 
45333
45478
  /**
45334
45479
  * span key
@@ -45378,17 +45523,137 @@ var INVALID_SPAN_CONTEXT = {
45378
45523
  return (_a = getSpan(context)) === null || _a === void 0 ? void 0 : _a.spanContext();
45379
45524
  }
45380
45525
 
45381
- var VALID_TRACEID_REGEX = /^([0-9a-f]{32})$/i;
45382
- var VALID_SPANID_REGEX = /^[0-9a-f]{16}$/i;
45383
- function isValidTraceId(traceId) {
45384
- return VALID_TRACEID_REGEX.test(traceId) && traceId !== INVALID_TRACEID;
45526
+ // Valid characters (0-9, a-f, A-F) are marked as 1.
45527
+ var isHex = new Uint8Array([
45528
+ 0,
45529
+ 0,
45530
+ 0,
45531
+ 0,
45532
+ 0,
45533
+ 0,
45534
+ 0,
45535
+ 0,
45536
+ 0,
45537
+ 0,
45538
+ 0,
45539
+ 0,
45540
+ 0,
45541
+ 0,
45542
+ 0,
45543
+ 0,
45544
+ 0,
45545
+ 0,
45546
+ 0,
45547
+ 0,
45548
+ 0,
45549
+ 0,
45550
+ 0,
45551
+ 0,
45552
+ 0,
45553
+ 0,
45554
+ 0,
45555
+ 0,
45556
+ 0,
45557
+ 0,
45558
+ 0,
45559
+ 0,
45560
+ 0,
45561
+ 0,
45562
+ 0,
45563
+ 0,
45564
+ 0,
45565
+ 0,
45566
+ 0,
45567
+ 0,
45568
+ 0,
45569
+ 0,
45570
+ 0,
45571
+ 0,
45572
+ 0,
45573
+ 0,
45574
+ 0,
45575
+ 0,
45576
+ 1,
45577
+ 1,
45578
+ 1,
45579
+ 1,
45580
+ 1,
45581
+ 1,
45582
+ 1,
45583
+ 1,
45584
+ 1,
45585
+ 1,
45586
+ 0,
45587
+ 0,
45588
+ 0,
45589
+ 0,
45590
+ 0,
45591
+ 0,
45592
+ 0,
45593
+ 1,
45594
+ 1,
45595
+ 1,
45596
+ 1,
45597
+ 1,
45598
+ 1,
45599
+ 0,
45600
+ 0,
45601
+ 0,
45602
+ 0,
45603
+ 0,
45604
+ 0,
45605
+ 0,
45606
+ 0,
45607
+ 0,
45608
+ 0,
45609
+ 0,
45610
+ 0,
45611
+ 0,
45612
+ 0,
45613
+ 0,
45614
+ 0,
45615
+ 0,
45616
+ 0,
45617
+ 0,
45618
+ 0,
45619
+ 0,
45620
+ 0,
45621
+ 0,
45622
+ 0,
45623
+ 0,
45624
+ 0,
45625
+ 1,
45626
+ 1,
45627
+ 1,
45628
+ 1,
45629
+ 1,
45630
+ 1
45631
+ ]);
45632
+ function isValidHex(id, length) {
45633
+ // As of 1.9.0 the id was allowed to be a non-string value,
45634
+ // even though it was not possible in the types.
45635
+ if (typeof id !== 'string' || id.length !== length) return false;
45636
+ var r = 0;
45637
+ for(var i = 0; i < id.length; i += 4){
45638
+ r += (isHex[id.charCodeAt(i)] | 0) + (isHex[id.charCodeAt(i + 1)] | 0) + (isHex[id.charCodeAt(i + 2)] | 0) + (isHex[id.charCodeAt(i + 3)] | 0);
45639
+ }
45640
+ return r === length;
45641
+ }
45642
+ /**
45643
+ * @since 1.0.0
45644
+ */ function isValidTraceId(traceId) {
45645
+ return isValidHex(traceId, 32) && traceId !== INVALID_TRACEID;
45385
45646
  }
45386
- function isValidSpanId(spanId) {
45387
- return VALID_SPANID_REGEX.test(spanId) && spanId !== INVALID_SPANID;
45647
+ /**
45648
+ * @since 1.0.0
45649
+ */ function isValidSpanId(spanId) {
45650
+ return isValidHex(spanId, 16) && spanId !== INVALID_SPANID;
45388
45651
  }
45389
45652
  /**
45390
45653
  * Returns true if this {@link SpanContext} is valid.
45391
45654
  * @return true if this {@link SpanContext} is valid.
45655
+ *
45656
+ * @since 1.0.0
45392
45657
  */ function isSpanContextValid(spanContext) {
45393
45658
  return isValidTraceId(spanContext.traceId) && isValidSpanId(spanContext.spanId);
45394
45659
  }
@@ -45403,117 +45668,218 @@ function isValidSpanId(spanId) {
45403
45668
 
45404
45669
  /*
45405
45670
  * Copyright The OpenTelemetry Authors
45406
- *
45407
- * Licensed under the Apache License, Version 2.0 (the "License");
45408
- * you may not use this file except in compliance with the License.
45409
- * You may obtain a copy of the License at
45410
- *
45411
- * https://www.apache.org/licenses/LICENSE-2.0
45412
- *
45413
- * Unless required by applicable law or agreed to in writing, software
45414
- * distributed under the License is distributed on an "AS IS" BASIS,
45415
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
45416
- * See the License for the specific language governing permissions and
45417
- * limitations under the License.
45418
- */ function _type_of$1(obj) {
45671
+ * SPDX-License-Identifier: Apache-2.0
45672
+ */ function _class_call_check$5(instance, Constructor) {
45673
+ if (!(instance instanceof Constructor)) {
45674
+ throw new TypeError("Cannot call a class as a function");
45675
+ }
45676
+ }
45677
+ function _defineProperties$5(target, props) {
45678
+ for(var i = 0; i < props.length; i++){
45679
+ var descriptor = props[i];
45680
+ descriptor.enumerable = descriptor.enumerable || false;
45681
+ descriptor.configurable = true;
45682
+ if ("value" in descriptor) descriptor.writable = true;
45683
+ Object.defineProperty(target, descriptor.key, descriptor);
45684
+ }
45685
+ }
45686
+ function _create_class$5(Constructor, protoProps, staticProps) {
45687
+ if (protoProps) _defineProperties$5(Constructor.prototype, protoProps);
45688
+ return Constructor;
45689
+ }
45690
+ function _type_of$1(obj) {
45419
45691
  "@swc/helpers - typeof";
45420
45692
  return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
45421
45693
  }
45422
45694
  var contextApi = ContextAPI.getInstance();
45423
45695
  /**
45424
45696
  * No-op implementations of {@link Tracer}.
45425
- */ var NoopTracer = /** @class */ function() {
45426
- function NoopTracer() {}
45427
- // startSpan starts a noop span.
45428
- NoopTracer.prototype.startSpan = function(name, options, context) {
45429
- if (context === void 0) {
45430
- context = contextApi.active();
45431
- }
45432
- var root = Boolean(options === null || options === void 0 ? void 0 : options.root);
45433
- if (root) {
45434
- return new NonRecordingSpan();
45435
- }
45436
- var parentFromContext = context && getSpanContext(context);
45437
- if (isSpanContext(parentFromContext) && isSpanContextValid(parentFromContext)) {
45438
- return new NonRecordingSpan(parentFromContext);
45439
- } else {
45440
- return new NonRecordingSpan();
45697
+ */ var NoopTracer = /*#__PURE__*/ function() {
45698
+ function NoopTracer() {
45699
+ _class_call_check$5(this, NoopTracer);
45700
+ }
45701
+ _create_class$5(NoopTracer, [
45702
+ {
45703
+ // startSpan starts a noop span.
45704
+ key: "startSpan",
45705
+ value: function startSpan(name, options) {
45706
+ var context = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : contextApi.active();
45707
+ var root = Boolean(options === null || options === void 0 ? void 0 : options.root);
45708
+ if (root) {
45709
+ return new NonRecordingSpan();
45710
+ }
45711
+ var parentFromContext = context && getSpanContext(context);
45712
+ if (isSpanContext(parentFromContext) && isSpanContextValid(parentFromContext)) {
45713
+ return new NonRecordingSpan(parentFromContext);
45714
+ } else {
45715
+ return new NonRecordingSpan();
45716
+ }
45717
+ }
45718
+ },
45719
+ {
45720
+ key: "startActiveSpan",
45721
+ value: function startActiveSpan(name, arg2, arg3, arg4) {
45722
+ var opts;
45723
+ var ctx;
45724
+ var fn;
45725
+ if (arguments.length < 2) {
45726
+ return;
45727
+ } else if (arguments.length === 2) {
45728
+ fn = arg2;
45729
+ } else if (arguments.length === 3) {
45730
+ opts = arg2;
45731
+ fn = arg3;
45732
+ } else {
45733
+ opts = arg2;
45734
+ ctx = arg3;
45735
+ fn = arg4;
45736
+ }
45737
+ var parentContext = ctx !== null && ctx !== void 0 ? ctx : contextApi.active();
45738
+ var span = this.startSpan(name, opts, parentContext);
45739
+ var contextWithSpanSet = setSpan(parentContext, span);
45740
+ return contextApi.with(contextWithSpanSet, fn, undefined, span);
45741
+ }
45441
45742
  }
45442
- };
45443
- NoopTracer.prototype.startActiveSpan = function(name, arg2, arg3, arg4) {
45444
- var opts;
45445
- var ctx;
45446
- var fn;
45447
- if (arguments.length < 2) {
45448
- return;
45449
- } else if (arguments.length === 2) {
45450
- fn = arg2;
45451
- } else if (arguments.length === 3) {
45452
- opts = arg2;
45453
- fn = arg3;
45454
- } else {
45455
- opts = arg2;
45456
- ctx = arg3;
45457
- fn = arg4;
45458
- }
45459
- var parentContext = ctx !== null && ctx !== void 0 ? ctx : contextApi.active();
45460
- var span = this.startSpan(name, opts, parentContext);
45461
- var contextWithSpanSet = setSpan(parentContext, span);
45462
- return contextApi.with(contextWithSpanSet, fn, undefined, span);
45463
- };
45743
+ ]);
45464
45744
  return NoopTracer;
45465
45745
  }();
45466
45746
  function isSpanContext(spanContext) {
45467
- return (typeof spanContext === "undefined" ? "undefined" : _type_of$1(spanContext)) === 'object' && typeof spanContext['spanId'] === 'string' && typeof spanContext['traceId'] === 'string' && typeof spanContext['traceFlags'] === 'number';
45747
+ return spanContext !== null && (typeof spanContext === "undefined" ? "undefined" : _type_of$1(spanContext)) === 'object' && 'spanId' in spanContext && typeof spanContext['spanId'] === 'string' && 'traceId' in spanContext && typeof spanContext['traceId'] === 'string' && 'traceFlags' in spanContext && typeof spanContext['traceFlags'] === 'number';
45468
45748
  }
45469
45749
 
45750
+ /*
45751
+ * Copyright The OpenTelemetry Authors
45752
+ * SPDX-License-Identifier: Apache-2.0
45753
+ */ function _class_call_check$4(instance, Constructor) {
45754
+ if (!(instance instanceof Constructor)) {
45755
+ throw new TypeError("Cannot call a class as a function");
45756
+ }
45757
+ }
45758
+ function _defineProperties$4(target, props) {
45759
+ for(var i = 0; i < props.length; i++){
45760
+ var descriptor = props[i];
45761
+ descriptor.enumerable = descriptor.enumerable || false;
45762
+ descriptor.configurable = true;
45763
+ if ("value" in descriptor) descriptor.writable = true;
45764
+ Object.defineProperty(target, descriptor.key, descriptor);
45765
+ }
45766
+ }
45767
+ function _create_class$4(Constructor, protoProps, staticProps) {
45768
+ if (protoProps) _defineProperties$4(Constructor.prototype, protoProps);
45769
+ return Constructor;
45770
+ }
45470
45771
  var NOOP_TRACER = new NoopTracer();
45471
45772
  /**
45472
45773
  * Proxy tracer provided by the proxy tracer provider
45473
- */ var ProxyTracer = /** @class */ function() {
45474
- function ProxyTracer(_provider, name, version, options) {
45475
- this._provider = _provider;
45774
+ *
45775
+ * @since 1.0.0
45776
+ */ var ProxyTracer = /*#__PURE__*/ function() {
45777
+ function ProxyTracer(provider, name, version, options) {
45778
+ _class_call_check$4(this, ProxyTracer);
45779
+ this._provider = provider;
45476
45780
  this.name = name;
45477
45781
  this.version = version;
45478
45782
  this.options = options;
45479
45783
  }
45480
- ProxyTracer.prototype.startSpan = function(name, options, context) {
45481
- return this._getTracer().startSpan(name, options, context);
45482
- };
45483
- ProxyTracer.prototype.startActiveSpan = function(_name, _options, _context, _fn) {
45484
- var tracer = this._getTracer();
45485
- return Reflect.apply(tracer.startActiveSpan, tracer, arguments);
45486
- };
45487
- /**
45784
+ _create_class$4(ProxyTracer, [
45785
+ {
45786
+ key: "startSpan",
45787
+ value: function startSpan(name, options, context) {
45788
+ return this._getTracer().startSpan(name, options, context);
45789
+ }
45790
+ },
45791
+ {
45792
+ key: "startActiveSpan",
45793
+ value: function startActiveSpan(_name, _options, _context, _fn) {
45794
+ var tracer = this._getTracer();
45795
+ return Reflect.apply(tracer.startActiveSpan, tracer, arguments);
45796
+ }
45797
+ },
45798
+ {
45799
+ /**
45488
45800
  * Try to get a tracer from the proxy tracer provider.
45489
45801
  * If the proxy tracer provider has no delegate, return a noop tracer.
45490
- */ ProxyTracer.prototype._getTracer = function() {
45491
- if (this._delegate) {
45492
- return this._delegate;
45493
- }
45494
- var tracer = this._provider.getDelegateTracer(this.name, this.version, this.options);
45495
- if (!tracer) {
45496
- return NOOP_TRACER;
45802
+ */ key: "_getTracer",
45803
+ value: function _getTracer() {
45804
+ if (this._delegate) {
45805
+ return this._delegate;
45806
+ }
45807
+ var tracer = this._provider.getDelegateTracer(this.name, this.version, this.options);
45808
+ if (!tracer) {
45809
+ return NOOP_TRACER;
45810
+ }
45811
+ this._delegate = tracer;
45812
+ return this._delegate;
45813
+ }
45497
45814
  }
45498
- this._delegate = tracer;
45499
- return this._delegate;
45500
- };
45815
+ ]);
45501
45816
  return ProxyTracer;
45502
- }();
45817
+ }
45818
+ ();
45503
45819
 
45820
+ /*
45821
+ * Copyright The OpenTelemetry Authors
45822
+ * SPDX-License-Identifier: Apache-2.0
45823
+ */ function _class_call_check$3(instance, Constructor) {
45824
+ if (!(instance instanceof Constructor)) {
45825
+ throw new TypeError("Cannot call a class as a function");
45826
+ }
45827
+ }
45828
+ function _defineProperties$3(target, props) {
45829
+ for(var i = 0; i < props.length; i++){
45830
+ var descriptor = props[i];
45831
+ descriptor.enumerable = descriptor.enumerable || false;
45832
+ descriptor.configurable = true;
45833
+ if ("value" in descriptor) descriptor.writable = true;
45834
+ Object.defineProperty(target, descriptor.key, descriptor);
45835
+ }
45836
+ }
45837
+ function _create_class$3(Constructor, protoProps, staticProps) {
45838
+ if (protoProps) _defineProperties$3(Constructor.prototype, protoProps);
45839
+ return Constructor;
45840
+ }
45504
45841
  /**
45505
45842
  * An implementation of the {@link TracerProvider} which returns an impotent
45506
45843
  * Tracer for all calls to `getTracer`.
45507
45844
  *
45508
45845
  * All operations are no-op.
45509
- */ var NoopTracerProvider = /** @class */ function() {
45510
- function NoopTracerProvider() {}
45511
- NoopTracerProvider.prototype.getTracer = function(_name, _version, _options) {
45512
- return new NoopTracer();
45513
- };
45846
+ */ var NoopTracerProvider = /*#__PURE__*/ function() {
45847
+ function NoopTracerProvider() {
45848
+ _class_call_check$3(this, NoopTracerProvider);
45849
+ }
45850
+ _create_class$3(NoopTracerProvider, [
45851
+ {
45852
+ key: "getTracer",
45853
+ value: function getTracer(_name, _version, _options) {
45854
+ return new NoopTracer();
45855
+ }
45856
+ }
45857
+ ]);
45514
45858
  return NoopTracerProvider;
45515
- }();
45859
+ }
45860
+ ();
45516
45861
 
45862
+ /*
45863
+ * Copyright The OpenTelemetry Authors
45864
+ * SPDX-License-Identifier: Apache-2.0
45865
+ */ function _class_call_check$2(instance, Constructor) {
45866
+ if (!(instance instanceof Constructor)) {
45867
+ throw new TypeError("Cannot call a class as a function");
45868
+ }
45869
+ }
45870
+ function _defineProperties$2(target, props) {
45871
+ for(var i = 0; i < props.length; i++){
45872
+ var descriptor = props[i];
45873
+ descriptor.enumerable = descriptor.enumerable || false;
45874
+ descriptor.configurable = true;
45875
+ if ("value" in descriptor) descriptor.writable = true;
45876
+ Object.defineProperty(target, descriptor.key, descriptor);
45877
+ }
45878
+ }
45879
+ function _create_class$2(Constructor, protoProps, staticProps) {
45880
+ if (protoProps) _defineProperties$2(Constructor.prototype, protoProps);
45881
+ return Constructor;
45882
+ }
45517
45883
  var NOOP_TRACER_PROVIDER = new NoopTracerProvider();
45518
45884
  /**
45519
45885
  * Tracer provider which provides {@link ProxyTracer}s.
@@ -45522,44 +45888,55 @@ var NOOP_TRACER_PROVIDER = new NoopTracerProvider();
45522
45888
  * When a delegate is set, traces are provided from the delegate.
45523
45889
  * When a delegate is set after tracers have already been provided,
45524
45890
  * all tracers already provided will use the provided delegate implementation.
45525
- */ var ProxyTracerProvider = /** @class */ function() {
45526
- function ProxyTracerProvider() {}
45527
- /**
45891
+ *
45892
+ * @deprecated This will be removed in the next major version.
45893
+ * @since 1.0.0
45894
+ */ var ProxyTracerProvider = /*#__PURE__*/ function() {
45895
+ function ProxyTracerProvider() {
45896
+ _class_call_check$2(this, ProxyTracerProvider);
45897
+ }
45898
+ _create_class$2(ProxyTracerProvider, [
45899
+ {
45900
+ /**
45528
45901
  * Get a {@link ProxyTracer}
45529
- */ ProxyTracerProvider.prototype.getTracer = function(name, version, options) {
45530
- var _a;
45531
- return (_a = this.getDelegateTracer(name, version, options)) !== null && _a !== void 0 ? _a : new ProxyTracer(this, name, version, options);
45532
- };
45533
- ProxyTracerProvider.prototype.getDelegate = function() {
45534
- var _a;
45535
- return (_a = this._delegate) !== null && _a !== void 0 ? _a : NOOP_TRACER_PROVIDER;
45536
- };
45537
- /**
45902
+ */ key: "getTracer",
45903
+ value: function getTracer(name, version, options) {
45904
+ var _a;
45905
+ return (_a = this.getDelegateTracer(name, version, options)) !== null && _a !== void 0 ? _a : new ProxyTracer(this, name, version, options);
45906
+ }
45907
+ },
45908
+ {
45909
+ key: "getDelegate",
45910
+ value: function getDelegate() {
45911
+ var _a;
45912
+ return (_a = this._delegate) !== null && _a !== void 0 ? _a : NOOP_TRACER_PROVIDER;
45913
+ }
45914
+ },
45915
+ {
45916
+ /**
45538
45917
  * Set the delegate tracer provider
45539
- */ ProxyTracerProvider.prototype.setDelegate = function(delegate) {
45540
- this._delegate = delegate;
45541
- };
45542
- ProxyTracerProvider.prototype.getDelegateTracer = function(name, version, options) {
45543
- var _a;
45544
- return (_a = this._delegate) === null || _a === void 0 ? void 0 : _a.getTracer(name, version, options);
45545
- };
45918
+ */ key: "setDelegate",
45919
+ value: function setDelegate(delegate) {
45920
+ this._delegate = delegate;
45921
+ }
45922
+ },
45923
+ {
45924
+ key: "getDelegateTracer",
45925
+ value: function getDelegateTracer(name, version, options) {
45926
+ var _a;
45927
+ return (_a = this._delegate) === null || _a === void 0 ? void 0 : _a.getTracer(name, version, options);
45928
+ }
45929
+ }
45930
+ ]);
45546
45931
  return ProxyTracerProvider;
45547
- }();
45932
+ }
45933
+ ();
45548
45934
 
45549
45935
  /*
45550
45936
  * Copyright The OpenTelemetry Authors
45551
- *
45552
- * Licensed under the Apache License, Version 2.0 (the "License");
45553
- * you may not use this file except in compliance with the License.
45554
- * You may obtain a copy of the License at
45555
- *
45556
- * https://www.apache.org/licenses/LICENSE-2.0
45557
- *
45558
- * Unless required by applicable law or agreed to in writing, software
45559
- * distributed under the License is distributed on an "AS IS" BASIS,
45560
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
45561
- * See the License for the specific language governing permissions and
45562
- * limitations under the License.
45937
+ * SPDX-License-Identifier: Apache-2.0
45938
+ */ /**
45939
+ * @since 1.0.0
45563
45940
  */ var SpanKind;
45564
45941
  (function(SpanKind) {
45565
45942
  /** Default value. Indicates that the span is used internally. */ SpanKind[SpanKind["INTERNAL"] = 0] = "INTERNAL";
@@ -45585,27 +45962,44 @@ var NOOP_TRACER_PROVIDER = new NoopTracerProvider();
45585
45962
 
45586
45963
  /*
45587
45964
  * Copyright The OpenTelemetry Authors
45588
- *
45589
- * Licensed under the Apache License, Version 2.0 (the "License");
45590
- * you may not use this file except in compliance with the License.
45591
- * You may obtain a copy of the License at
45592
- *
45593
- * https://www.apache.org/licenses/LICENSE-2.0
45594
- *
45595
- * Unless required by applicable law or agreed to in writing, software
45596
- * distributed under the License is distributed on an "AS IS" BASIS,
45597
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
45598
- * See the License for the specific language governing permissions and
45599
- * limitations under the License.
45965
+ * SPDX-License-Identifier: Apache-2.0
45600
45966
  */ // Split module-level variable definition into separate files to allow
45601
45967
  // tree-shaking on each api instance.
45602
- /** Entrypoint for context API */ var context = ContextAPI.getInstance();
45968
+ /**
45969
+ * Entrypoint for context API
45970
+ * @since 1.0.0
45971
+ */ var context = ContextAPI.getInstance();
45603
45972
 
45973
+ /*
45974
+ * Copyright The OpenTelemetry Authors
45975
+ * SPDX-License-Identifier: Apache-2.0
45976
+ */ function _class_call_check$1(instance, Constructor) {
45977
+ if (!(instance instanceof Constructor)) {
45978
+ throw new TypeError("Cannot call a class as a function");
45979
+ }
45980
+ }
45981
+ function _defineProperties$1(target, props) {
45982
+ for(var i = 0; i < props.length; i++){
45983
+ var descriptor = props[i];
45984
+ descriptor.enumerable = descriptor.enumerable || false;
45985
+ descriptor.configurable = true;
45986
+ if ("value" in descriptor) descriptor.writable = true;
45987
+ Object.defineProperty(target, descriptor.key, descriptor);
45988
+ }
45989
+ }
45990
+ function _create_class$1(Constructor, protoProps, staticProps) {
45991
+ if (protoProps) _defineProperties$1(Constructor.prototype, protoProps);
45992
+ if (staticProps) _defineProperties$1(Constructor, staticProps);
45993
+ return Constructor;
45994
+ }
45604
45995
  var API_NAME = 'trace';
45605
45996
  /**
45606
45997
  * Singleton object which represents the entry point to the OpenTelemetry Tracing API
45607
- */ var TraceAPI = /** @class */ function() {
45608
- /** Empty private constructor prevents end users from constructing a new instance of the API */ function TraceAPI() {
45998
+ *
45999
+ * @since 1.0.0
46000
+ */ var TraceAPI = /*#__PURE__*/ function() {
46001
+ function TraceAPI() {
46002
+ _class_call_check$1(this, TraceAPI);
45609
46003
  this._proxyTracerProvider = new ProxyTracerProvider();
45610
46004
  this.wrapSpanContext = wrapSpanContext;
45611
46005
  this.isSpanContextValid = isSpanContextValid;
@@ -45616,57 +46010,69 @@ var API_NAME = 'trace';
45616
46010
  this.setSpan = setSpan;
45617
46011
  this.setSpanContext = setSpanContext;
45618
46012
  }
45619
- /** Get the singleton instance of the Trace API */ TraceAPI.getInstance = function() {
45620
- if (!this._instance) {
45621
- this._instance = new TraceAPI();
45622
- }
45623
- return this._instance;
45624
- };
45625
- /**
46013
+ _create_class$1(TraceAPI, [
46014
+ {
46015
+ /**
45626
46016
  * Set the current global tracer.
45627
46017
  *
45628
46018
  * @returns true if the tracer provider was successfully registered, else false
45629
- */ TraceAPI.prototype.setGlobalTracerProvider = function(provider) {
45630
- var success = registerGlobal(API_NAME, this._proxyTracerProvider, DiagAPI.instance());
45631
- if (success) {
45632
- this._proxyTracerProvider.setDelegate(provider);
45633
- }
45634
- return success;
45635
- };
45636
- /**
46019
+ */ key: "setGlobalTracerProvider",
46020
+ value: function setGlobalTracerProvider(provider) {
46021
+ var success = registerGlobal(API_NAME, this._proxyTracerProvider, DiagAPI.instance());
46022
+ if (success) {
46023
+ this._proxyTracerProvider.setDelegate(provider);
46024
+ }
46025
+ return success;
46026
+ }
46027
+ },
46028
+ {
46029
+ /**
45637
46030
  * Returns the global tracer provider.
45638
- */ TraceAPI.prototype.getTracerProvider = function() {
45639
- return getGlobal(API_NAME) || this._proxyTracerProvider;
45640
- };
45641
- /**
46031
+ */ key: "getTracerProvider",
46032
+ value: function getTracerProvider() {
46033
+ return getGlobal(API_NAME) || this._proxyTracerProvider;
46034
+ }
46035
+ },
46036
+ {
46037
+ /**
45642
46038
  * Returns a tracer from the global tracer provider.
45643
- */ TraceAPI.prototype.getTracer = function(name, version) {
45644
- return this.getTracerProvider().getTracer(name, version);
45645
- };
45646
- /** Remove the global tracer provider */ TraceAPI.prototype.disable = function() {
45647
- unregisterGlobal(API_NAME, DiagAPI.instance());
45648
- this._proxyTracerProvider = new ProxyTracerProvider();
45649
- };
46039
+ */ key: "getTracer",
46040
+ value: function getTracer(name, version) {
46041
+ return this.getTracerProvider().getTracer(name, version);
46042
+ }
46043
+ },
46044
+ {
46045
+ /** Remove the global tracer provider */ key: "disable",
46046
+ value: function disable() {
46047
+ unregisterGlobal(API_NAME, DiagAPI.instance());
46048
+ this._proxyTracerProvider = new ProxyTracerProvider();
46049
+ }
46050
+ }
46051
+ ], [
46052
+ {
46053
+ key: "getInstance",
46054
+ value: /** Get the singleton instance of the Trace API */ function getInstance() {
46055
+ if (!this._instance) {
46056
+ this._instance = new TraceAPI();
46057
+ }
46058
+ return this._instance;
46059
+ }
46060
+ }
46061
+ ]);
45650
46062
  return TraceAPI;
45651
- }();
46063
+ }
46064
+ ();
45652
46065
 
45653
46066
  /*
45654
46067
  * Copyright The OpenTelemetry Authors
45655
- *
45656
- * Licensed under the Apache License, Version 2.0 (the "License");
45657
- * you may not use this file except in compliance with the License.
45658
- * You may obtain a copy of the License at
45659
- *
45660
- * https://www.apache.org/licenses/LICENSE-2.0
45661
- *
45662
- * Unless required by applicable law or agreed to in writing, software
45663
- * distributed under the License is distributed on an "AS IS" BASIS,
45664
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
45665
- * See the License for the specific language governing permissions and
45666
- * limitations under the License.
46068
+ * SPDX-License-Identifier: Apache-2.0
45667
46069
  */ // Split module-level variable definition into separate files to allow
45668
46070
  // tree-shaking on each api instance.
45669
- /** Entrypoint for trace API */ var trace = TraceAPI.getInstance();
46071
+ /**
46072
+ * Entrypoint for trace API
46073
+ *
46074
+ * @since 1.0.0
46075
+ */ var trace = TraceAPI.getInstance();
45670
46076
 
45671
46077
  var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
45672
46078
  function getDefaultExportFromCjs(x) {
@@ -45692,7 +46098,7 @@ var dayjs_min = {
45692
46098
  !function(t, e) {
45693
46099
  "object" == (_type_of(exports)) && "undefined" != 'object' ? module.exports = e() : (t = "undefined" != typeof globalThis ? globalThis : t || self).dayjs = e();
45694
46100
  }(commonjsGlobal, function() {
45695
- var t = 1e3, e = 6e4, n = 36e5, r = "millisecond", i = "second", s = "minute", u = "hour", a = "day", o = "week", c = "month", f = "quarter", h = "year", d = "date", l = "Invalid Date", $ = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, y = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, M = {
46101
+ var t = 1e3, e = 6e4, n = 36e5, r = "millisecond", i = "second", s = "minute", u = "hour", a = "day", o = "week", c = "month", f = "quarter", h = "year", d = "date", l = "Invalid Date", $ = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, y = /\[([^\]]+)]|YYYY|YY|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, M = {
45696
46102
  name: "en",
45697
46103
  weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),
45698
46104
  months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"),
@@ -45994,8 +46400,8 @@ var dayjs_min = {
45994
46400
  }, m.toString = function() {
45995
46401
  return this.$d.toUTCString();
45996
46402
  }, M;
45997
- }(), k = _.prototype;
45998
- return O.prototype = k, [
46403
+ }(), Y = _.prototype;
46404
+ return O.prototype = Y, [
45999
46405
  [
46000
46406
  "$ms",
46001
46407
  r
@@ -46029,7 +46435,7 @@ var dayjs_min = {
46029
46435
  d
46030
46436
  ]
46031
46437
  ].forEach(function(t) {
46032
- k[t[1]] = function(e) {
46438
+ Y[t[1]] = function(e) {
46033
46439
  return this.$g(e, t[0], t[1]);
46034
46440
  };
46035
46441
  }), O.extend = function(t, e) {