@nsshunt/stsvueutils 1.0.90 → 1.0.91

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.
@@ -1,6 +1,6 @@
1
- (function(global2, factory) {
2
- typeof exports === "object" && typeof module !== "undefined" ? factory(exports, require("vue"), require("debug"), require("@nsshunt/stsutils"), require("socket.io-client"), require("pinia")) : typeof define === "function" && define.amd ? define(["exports", "vue", "debug", "@nsshunt/stsutils", "socket.io-client", "pinia"], factory) : (global2 = typeof globalThis !== "undefined" ? globalThis : global2 || self, factory(global2["@nsshunt/stsvueutils"] = {}, global2.vue, global2.debug, global2.stsutils, global2.socket["io-client"], global2.pinia));
3
- })(this, function(exports2, vue, debugModule, stsutils, socket_ioClient, pinia) {
1
+ (function(global, factory) {
2
+ typeof exports === "object" && typeof module !== "undefined" ? factory(exports, require("vue"), require("debug"), require("@nsshunt/stsobservability"), require("@nsshunt/stsutils"), require("pinia")) : typeof define === "function" && define.amd ? define(["exports", "vue", "debug", "@nsshunt/stsobservability", "@nsshunt/stsutils", "pinia"], factory) : (global = typeof globalThis !== "undefined" ? globalThis : global || self, factory(global["@nsshunt/stsvueutils"] = {}, global.vue, global.debug, global.stsobservability, global.stsutils, global.pinia));
3
+ })(this, function(exports2, vue, debugModule, stsobservability, stsutils, pinia) {
4
4
  "use strict";var __defProp = Object.defineProperty;
5
5
  var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
6
6
  var __publicField = (obj, key, value) => {
@@ -42,7 +42,6 @@ var __privateMethod = (obj, member, method) => {
42
42
  const STSStoragePluginKey = Symbol("storage");
43
43
  const STSEmitterPluginKey = Symbol("emitter");
44
44
  const STSWorkerManagerPluginKey = Symbol("workerManager");
45
- var commonjsGlobal$1 = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
46
45
  function getDefaultExportFromCjs(x) {
47
46
  return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
48
47
  }
@@ -351,3405 +350,6 @@ var __privateMethod = (obj, member, method) => {
351
350
  eIWMessageCommands2["StopAllAsyncRunners"] = "__STS__StopAllAsyncRunners";
352
351
  return eIWMessageCommands2;
353
352
  })(eIWMessageCommands || {});
354
- var lodash_clonedeep = { exports: {} };
355
- lodash_clonedeep.exports;
356
- (function(module2, exports3) {
357
- var LARGE_ARRAY_SIZE = 200;
358
- var HASH_UNDEFINED = "__lodash_hash_undefined__";
359
- var MAX_SAFE_INTEGER = 9007199254740991;
360
- var argsTag = "[object Arguments]", arrayTag = "[object Array]", boolTag = "[object Boolean]", dateTag = "[object Date]", errorTag = "[object Error]", funcTag = "[object Function]", genTag = "[object GeneratorFunction]", mapTag = "[object Map]", numberTag = "[object Number]", objectTag = "[object Object]", promiseTag = "[object Promise]", regexpTag = "[object RegExp]", setTag = "[object Set]", stringTag = "[object String]", symbolTag = "[object Symbol]", weakMapTag = "[object WeakMap]";
361
- var arrayBufferTag = "[object ArrayBuffer]", dataViewTag = "[object DataView]", float32Tag = "[object Float32Array]", float64Tag = "[object Float64Array]", int8Tag = "[object Int8Array]", int16Tag = "[object Int16Array]", int32Tag = "[object Int32Array]", uint8Tag = "[object Uint8Array]", uint8ClampedTag = "[object Uint8ClampedArray]", uint16Tag = "[object Uint16Array]", uint32Tag = "[object Uint32Array]";
362
- var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
363
- var reFlags = /\w*$/;
364
- var reIsHostCtor = /^\[object .+?Constructor\]$/;
365
- var reIsUint = /^(?:0|[1-9]\d*)$/;
366
- var cloneableTags = {};
367
- cloneableTags[argsTag] = cloneableTags[arrayTag] = cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] = cloneableTags[boolTag] = cloneableTags[dateTag] = cloneableTags[float32Tag] = cloneableTags[float64Tag] = cloneableTags[int8Tag] = cloneableTags[int16Tag] = cloneableTags[int32Tag] = cloneableTags[mapTag] = cloneableTags[numberTag] = cloneableTags[objectTag] = cloneableTags[regexpTag] = cloneableTags[setTag] = cloneableTags[stringTag] = cloneableTags[symbolTag] = cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] = cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;
368
- cloneableTags[errorTag] = cloneableTags[funcTag] = cloneableTags[weakMapTag] = false;
369
- var freeGlobal = typeof commonjsGlobal$1 == "object" && commonjsGlobal$1 && commonjsGlobal$1.Object === Object && commonjsGlobal$1;
370
- var freeSelf = typeof self == "object" && self && self.Object === Object && self;
371
- var root = freeGlobal || freeSelf || Function("return this")();
372
- var freeExports = exports3 && !exports3.nodeType && exports3;
373
- var freeModule = freeExports && true && module2 && !module2.nodeType && module2;
374
- var moduleExports = freeModule && freeModule.exports === freeExports;
375
- function addMapEntry(map, pair) {
376
- map.set(pair[0], pair[1]);
377
- return map;
378
- }
379
- function addSetEntry(set, value) {
380
- set.add(value);
381
- return set;
382
- }
383
- function arrayEach(array, iteratee) {
384
- var index = -1, length = array ? array.length : 0;
385
- while (++index < length) {
386
- if (iteratee(array[index], index, array) === false) {
387
- break;
388
- }
389
- }
390
- return array;
391
- }
392
- function arrayPush(array, values) {
393
- var index = -1, length = values.length, offset = array.length;
394
- while (++index < length) {
395
- array[offset + index] = values[index];
396
- }
397
- return array;
398
- }
399
- function arrayReduce(array, iteratee, accumulator, initAccum) {
400
- var index = -1, length = array ? array.length : 0;
401
- if (initAccum && length) {
402
- accumulator = array[++index];
403
- }
404
- while (++index < length) {
405
- accumulator = iteratee(accumulator, array[index], index, array);
406
- }
407
- return accumulator;
408
- }
409
- function baseTimes(n, iteratee) {
410
- var index = -1, result = Array(n);
411
- while (++index < n) {
412
- result[index] = iteratee(index);
413
- }
414
- return result;
415
- }
416
- function getValue(object, key) {
417
- return object == null ? void 0 : object[key];
418
- }
419
- function isHostObject(value) {
420
- var result = false;
421
- if (value != null && typeof value.toString != "function") {
422
- try {
423
- result = !!(value + "");
424
- } catch (e) {
425
- }
426
- }
427
- return result;
428
- }
429
- function mapToArray(map) {
430
- var index = -1, result = Array(map.size);
431
- map.forEach(function(value, key) {
432
- result[++index] = [key, value];
433
- });
434
- return result;
435
- }
436
- function overArg(func, transform) {
437
- return function(arg) {
438
- return func(transform(arg));
439
- };
440
- }
441
- function setToArray(set) {
442
- var index = -1, result = Array(set.size);
443
- set.forEach(function(value) {
444
- result[++index] = value;
445
- });
446
- return result;
447
- }
448
- var arrayProto = Array.prototype, funcProto = Function.prototype, objectProto = Object.prototype;
449
- var coreJsData = root["__core-js_shared__"];
450
- var maskSrcKey = function() {
451
- var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || "");
452
- return uid ? "Symbol(src)_1." + uid : "";
453
- }();
454
- var funcToString = funcProto.toString;
455
- var hasOwnProperty = objectProto.hasOwnProperty;
456
- var objectToString = objectProto.toString;
457
- var reIsNative = RegExp(
458
- "^" + funcToString.call(hasOwnProperty).replace(reRegExpChar, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
459
- );
460
- var Buffer2 = moduleExports ? root.Buffer : void 0, Symbol2 = root.Symbol, Uint8Array2 = root.Uint8Array, getPrototype = overArg(Object.getPrototypeOf, Object), objectCreate = Object.create, propertyIsEnumerable = objectProto.propertyIsEnumerable, splice = arrayProto.splice;
461
- var nativeGetSymbols = Object.getOwnPropertySymbols, nativeIsBuffer = Buffer2 ? Buffer2.isBuffer : void 0, nativeKeys = overArg(Object.keys, Object);
462
- var DataView2 = getNative(root, "DataView"), Map2 = getNative(root, "Map"), Promise2 = getNative(root, "Promise"), Set = getNative(root, "Set"), WeakMap2 = getNative(root, "WeakMap"), nativeCreate = getNative(Object, "create");
463
- var dataViewCtorString = toSource(DataView2), mapCtorString = toSource(Map2), promiseCtorString = toSource(Promise2), setCtorString = toSource(Set), weakMapCtorString = toSource(WeakMap2);
464
- var symbolProto = Symbol2 ? Symbol2.prototype : void 0, symbolValueOf = symbolProto ? symbolProto.valueOf : void 0;
465
- function Hash(entries) {
466
- var index = -1, length = entries ? entries.length : 0;
467
- this.clear();
468
- while (++index < length) {
469
- var entry = entries[index];
470
- this.set(entry[0], entry[1]);
471
- }
472
- }
473
- function hashClear() {
474
- this.__data__ = nativeCreate ? nativeCreate(null) : {};
475
- }
476
- function hashDelete(key) {
477
- return this.has(key) && delete this.__data__[key];
478
- }
479
- function hashGet(key) {
480
- var data = this.__data__;
481
- if (nativeCreate) {
482
- var result = data[key];
483
- return result === HASH_UNDEFINED ? void 0 : result;
484
- }
485
- return hasOwnProperty.call(data, key) ? data[key] : void 0;
486
- }
487
- function hashHas(key) {
488
- var data = this.__data__;
489
- return nativeCreate ? data[key] !== void 0 : hasOwnProperty.call(data, key);
490
- }
491
- function hashSet(key, value) {
492
- var data = this.__data__;
493
- data[key] = nativeCreate && value === void 0 ? HASH_UNDEFINED : value;
494
- return this;
495
- }
496
- Hash.prototype.clear = hashClear;
497
- Hash.prototype["delete"] = hashDelete;
498
- Hash.prototype.get = hashGet;
499
- Hash.prototype.has = hashHas;
500
- Hash.prototype.set = hashSet;
501
- function ListCache(entries) {
502
- var index = -1, length = entries ? entries.length : 0;
503
- this.clear();
504
- while (++index < length) {
505
- var entry = entries[index];
506
- this.set(entry[0], entry[1]);
507
- }
508
- }
509
- function listCacheClear() {
510
- this.__data__ = [];
511
- }
512
- function listCacheDelete(key) {
513
- var data = this.__data__, index = assocIndexOf(data, key);
514
- if (index < 0) {
515
- return false;
516
- }
517
- var lastIndex = data.length - 1;
518
- if (index == lastIndex) {
519
- data.pop();
520
- } else {
521
- splice.call(data, index, 1);
522
- }
523
- return true;
524
- }
525
- function listCacheGet(key) {
526
- var data = this.__data__, index = assocIndexOf(data, key);
527
- return index < 0 ? void 0 : data[index][1];
528
- }
529
- function listCacheHas(key) {
530
- return assocIndexOf(this.__data__, key) > -1;
531
- }
532
- function listCacheSet(key, value) {
533
- var data = this.__data__, index = assocIndexOf(data, key);
534
- if (index < 0) {
535
- data.push([key, value]);
536
- } else {
537
- data[index][1] = value;
538
- }
539
- return this;
540
- }
541
- ListCache.prototype.clear = listCacheClear;
542
- ListCache.prototype["delete"] = listCacheDelete;
543
- ListCache.prototype.get = listCacheGet;
544
- ListCache.prototype.has = listCacheHas;
545
- ListCache.prototype.set = listCacheSet;
546
- function MapCache(entries) {
547
- var index = -1, length = entries ? entries.length : 0;
548
- this.clear();
549
- while (++index < length) {
550
- var entry = entries[index];
551
- this.set(entry[0], entry[1]);
552
- }
553
- }
554
- function mapCacheClear() {
555
- this.__data__ = {
556
- "hash": new Hash(),
557
- "map": new (Map2 || ListCache)(),
558
- "string": new Hash()
559
- };
560
- }
561
- function mapCacheDelete(key) {
562
- return getMapData(this, key)["delete"](key);
563
- }
564
- function mapCacheGet(key) {
565
- return getMapData(this, key).get(key);
566
- }
567
- function mapCacheHas(key) {
568
- return getMapData(this, key).has(key);
569
- }
570
- function mapCacheSet(key, value) {
571
- getMapData(this, key).set(key, value);
572
- return this;
573
- }
574
- MapCache.prototype.clear = mapCacheClear;
575
- MapCache.prototype["delete"] = mapCacheDelete;
576
- MapCache.prototype.get = mapCacheGet;
577
- MapCache.prototype.has = mapCacheHas;
578
- MapCache.prototype.set = mapCacheSet;
579
- function Stack(entries) {
580
- this.__data__ = new ListCache(entries);
581
- }
582
- function stackClear() {
583
- this.__data__ = new ListCache();
584
- }
585
- function stackDelete(key) {
586
- return this.__data__["delete"](key);
587
- }
588
- function stackGet(key) {
589
- return this.__data__.get(key);
590
- }
591
- function stackHas(key) {
592
- return this.__data__.has(key);
593
- }
594
- function stackSet(key, value) {
595
- var cache = this.__data__;
596
- if (cache instanceof ListCache) {
597
- var pairs = cache.__data__;
598
- if (!Map2 || pairs.length < LARGE_ARRAY_SIZE - 1) {
599
- pairs.push([key, value]);
600
- return this;
601
- }
602
- cache = this.__data__ = new MapCache(pairs);
603
- }
604
- cache.set(key, value);
605
- return this;
606
- }
607
- Stack.prototype.clear = stackClear;
608
- Stack.prototype["delete"] = stackDelete;
609
- Stack.prototype.get = stackGet;
610
- Stack.prototype.has = stackHas;
611
- Stack.prototype.set = stackSet;
612
- function arrayLikeKeys(value, inherited) {
613
- var result = isArray2(value) || isArguments(value) ? baseTimes(value.length, String) : [];
614
- var length = result.length, skipIndexes = !!length;
615
- for (var key in value) {
616
- if ((inherited || hasOwnProperty.call(value, key)) && !(skipIndexes && (key == "length" || isIndex(key, length)))) {
617
- result.push(key);
618
- }
619
- }
620
- return result;
621
- }
622
- function assignValue(object, key, value) {
623
- var objValue = object[key];
624
- if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) || value === void 0 && !(key in object)) {
625
- object[key] = value;
626
- }
627
- }
628
- function assocIndexOf(array, key) {
629
- var length = array.length;
630
- while (length--) {
631
- if (eq(array[length][0], key)) {
632
- return length;
633
- }
634
- }
635
- return -1;
636
- }
637
- function baseAssign(object, source2) {
638
- return object && copyObject(source2, keys(source2), object);
639
- }
640
- function baseClone(value, isDeep, isFull, customizer, key, object, stack) {
641
- var result;
642
- if (customizer) {
643
- result = object ? customizer(value, key, object, stack) : customizer(value);
644
- }
645
- if (result !== void 0) {
646
- return result;
647
- }
648
- if (!isObject(value)) {
649
- return value;
650
- }
651
- var isArr = isArray2(value);
652
- if (isArr) {
653
- result = initCloneArray(value);
654
- if (!isDeep) {
655
- return copyArray(value, result);
656
- }
657
- } else {
658
- var tag = getTag(value), isFunc = tag == funcTag || tag == genTag;
659
- if (isBuffer(value)) {
660
- return cloneBuffer(value, isDeep);
661
- }
662
- if (tag == objectTag || tag == argsTag || isFunc && !object) {
663
- if (isHostObject(value)) {
664
- return object ? value : {};
665
- }
666
- result = initCloneObject(isFunc ? {} : value);
667
- if (!isDeep) {
668
- return copySymbols(value, baseAssign(result, value));
669
- }
670
- } else {
671
- if (!cloneableTags[tag]) {
672
- return object ? value : {};
673
- }
674
- result = initCloneByTag(value, tag, baseClone, isDeep);
675
- }
676
- }
677
- stack || (stack = new Stack());
678
- var stacked = stack.get(value);
679
- if (stacked) {
680
- return stacked;
681
- }
682
- stack.set(value, result);
683
- if (!isArr) {
684
- var props = isFull ? getAllKeys(value) : keys(value);
685
- }
686
- arrayEach(props || value, function(subValue, key2) {
687
- if (props) {
688
- key2 = subValue;
689
- subValue = value[key2];
690
- }
691
- assignValue(result, key2, baseClone(subValue, isDeep, isFull, customizer, key2, value, stack));
692
- });
693
- return result;
694
- }
695
- function baseCreate(proto2) {
696
- return isObject(proto2) ? objectCreate(proto2) : {};
697
- }
698
- function baseGetAllKeys(object, keysFunc, symbolsFunc) {
699
- var result = keysFunc(object);
700
- return isArray2(object) ? result : arrayPush(result, symbolsFunc(object));
701
- }
702
- function baseGetTag(value) {
703
- return objectToString.call(value);
704
- }
705
- function baseIsNative(value) {
706
- if (!isObject(value) || isMasked(value)) {
707
- return false;
708
- }
709
- var pattern = isFunction(value) || isHostObject(value) ? reIsNative : reIsHostCtor;
710
- return pattern.test(toSource(value));
711
- }
712
- function baseKeys(object) {
713
- if (!isPrototype(object)) {
714
- return nativeKeys(object);
715
- }
716
- var result = [];
717
- for (var key in Object(object)) {
718
- if (hasOwnProperty.call(object, key) && key != "constructor") {
719
- result.push(key);
720
- }
721
- }
722
- return result;
723
- }
724
- function cloneBuffer(buffer, isDeep) {
725
- if (isDeep) {
726
- return buffer.slice();
727
- }
728
- var result = new buffer.constructor(buffer.length);
729
- buffer.copy(result);
730
- return result;
731
- }
732
- function cloneArrayBuffer(arrayBuffer) {
733
- var result = new arrayBuffer.constructor(arrayBuffer.byteLength);
734
- new Uint8Array2(result).set(new Uint8Array2(arrayBuffer));
735
- return result;
736
- }
737
- function cloneDataView(dataView, isDeep) {
738
- var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;
739
- return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);
740
- }
741
- function cloneMap(map, isDeep, cloneFunc) {
742
- var array = isDeep ? cloneFunc(mapToArray(map), true) : mapToArray(map);
743
- return arrayReduce(array, addMapEntry, new map.constructor());
744
- }
745
- function cloneRegExp(regexp) {
746
- var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));
747
- result.lastIndex = regexp.lastIndex;
748
- return result;
749
- }
750
- function cloneSet(set, isDeep, cloneFunc) {
751
- var array = isDeep ? cloneFunc(setToArray(set), true) : setToArray(set);
752
- return arrayReduce(array, addSetEntry, new set.constructor());
753
- }
754
- function cloneSymbol(symbol) {
755
- return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};
756
- }
757
- function cloneTypedArray(typedArray, isDeep) {
758
- var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;
759
- return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);
760
- }
761
- function copyArray(source2, array) {
762
- var index = -1, length = source2.length;
763
- array || (array = Array(length));
764
- while (++index < length) {
765
- array[index] = source2[index];
766
- }
767
- return array;
768
- }
769
- function copyObject(source2, props, object, customizer) {
770
- object || (object = {});
771
- var index = -1, length = props.length;
772
- while (++index < length) {
773
- var key = props[index];
774
- var newValue = customizer ? customizer(object[key], source2[key], key, object, source2) : void 0;
775
- assignValue(object, key, newValue === void 0 ? source2[key] : newValue);
776
- }
777
- return object;
778
- }
779
- function copySymbols(source2, object) {
780
- return copyObject(source2, getSymbols(source2), object);
781
- }
782
- function getAllKeys(object) {
783
- return baseGetAllKeys(object, keys, getSymbols);
784
- }
785
- function getMapData(map, key) {
786
- var data = map.__data__;
787
- return isKeyable(key) ? data[typeof key == "string" ? "string" : "hash"] : data.map;
788
- }
789
- function getNative(object, key) {
790
- var value = getValue(object, key);
791
- return baseIsNative(value) ? value : void 0;
792
- }
793
- var getSymbols = nativeGetSymbols ? overArg(nativeGetSymbols, Object) : stubArray;
794
- var getTag = baseGetTag;
795
- if (DataView2 && getTag(new DataView2(new ArrayBuffer(1))) != dataViewTag || Map2 && getTag(new Map2()) != mapTag || Promise2 && getTag(Promise2.resolve()) != promiseTag || Set && getTag(new Set()) != setTag || WeakMap2 && getTag(new WeakMap2()) != weakMapTag) {
796
- getTag = function(value) {
797
- var result = objectToString.call(value), Ctor = result == objectTag ? value.constructor : void 0, ctorString = Ctor ? toSource(Ctor) : void 0;
798
- if (ctorString) {
799
- switch (ctorString) {
800
- case dataViewCtorString:
801
- return dataViewTag;
802
- case mapCtorString:
803
- return mapTag;
804
- case promiseCtorString:
805
- return promiseTag;
806
- case setCtorString:
807
- return setTag;
808
- case weakMapCtorString:
809
- return weakMapTag;
810
- }
811
- }
812
- return result;
813
- };
814
- }
815
- function initCloneArray(array) {
816
- var length = array.length, result = array.constructor(length);
817
- if (length && typeof array[0] == "string" && hasOwnProperty.call(array, "index")) {
818
- result.index = array.index;
819
- result.input = array.input;
820
- }
821
- return result;
822
- }
823
- function initCloneObject(object) {
824
- return typeof object.constructor == "function" && !isPrototype(object) ? baseCreate(getPrototype(object)) : {};
825
- }
826
- function initCloneByTag(object, tag, cloneFunc, isDeep) {
827
- var Ctor = object.constructor;
828
- switch (tag) {
829
- case arrayBufferTag:
830
- return cloneArrayBuffer(object);
831
- case boolTag:
832
- case dateTag:
833
- return new Ctor(+object);
834
- case dataViewTag:
835
- return cloneDataView(object, isDeep);
836
- case float32Tag:
837
- case float64Tag:
838
- case int8Tag:
839
- case int16Tag:
840
- case int32Tag:
841
- case uint8Tag:
842
- case uint8ClampedTag:
843
- case uint16Tag:
844
- case uint32Tag:
845
- return cloneTypedArray(object, isDeep);
846
- case mapTag:
847
- return cloneMap(object, isDeep, cloneFunc);
848
- case numberTag:
849
- case stringTag:
850
- return new Ctor(object);
851
- case regexpTag:
852
- return cloneRegExp(object);
853
- case setTag:
854
- return cloneSet(object, isDeep, cloneFunc);
855
- case symbolTag:
856
- return cloneSymbol(object);
857
- }
858
- }
859
- function isIndex(value, length) {
860
- length = length == null ? MAX_SAFE_INTEGER : length;
861
- return !!length && (typeof value == "number" || reIsUint.test(value)) && (value > -1 && value % 1 == 0 && value < length);
862
- }
863
- function isKeyable(value) {
864
- var type = typeof value;
865
- return type == "string" || type == "number" || type == "symbol" || type == "boolean" ? value !== "__proto__" : value === null;
866
- }
867
- function isMasked(func) {
868
- return !!maskSrcKey && maskSrcKey in func;
869
- }
870
- function isPrototype(value) {
871
- var Ctor = value && value.constructor, proto2 = typeof Ctor == "function" && Ctor.prototype || objectProto;
872
- return value === proto2;
873
- }
874
- function toSource(func) {
875
- if (func != null) {
876
- try {
877
- return funcToString.call(func);
878
- } catch (e) {
879
- }
880
- try {
881
- return func + "";
882
- } catch (e) {
883
- }
884
- }
885
- return "";
886
- }
887
- function cloneDeep(value) {
888
- return baseClone(value, true, true);
889
- }
890
- function eq(value, other) {
891
- return value === other || value !== value && other !== other;
892
- }
893
- function isArguments(value) {
894
- return isArrayLikeObject(value) && hasOwnProperty.call(value, "callee") && (!propertyIsEnumerable.call(value, "callee") || objectToString.call(value) == argsTag);
895
- }
896
- var isArray2 = Array.isArray;
897
- function isArrayLike(value) {
898
- return value != null && isLength(value.length) && !isFunction(value);
899
- }
900
- function isArrayLikeObject(value) {
901
- return isObjectLike(value) && isArrayLike(value);
902
- }
903
- var isBuffer = nativeIsBuffer || stubFalse;
904
- function isFunction(value) {
905
- var tag = isObject(value) ? objectToString.call(value) : "";
906
- return tag == funcTag || tag == genTag;
907
- }
908
- function isLength(value) {
909
- return typeof value == "number" && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
910
- }
911
- function isObject(value) {
912
- var type = typeof value;
913
- return !!value && (type == "object" || type == "function");
914
- }
915
- function isObjectLike(value) {
916
- return !!value && typeof value == "object";
917
- }
918
- function keys(object) {
919
- return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
920
- }
921
- function stubArray() {
922
- return [];
923
- }
924
- function stubFalse() {
925
- return false;
926
- }
927
- module2.exports = cloneDeep;
928
- })(lodash_clonedeep, lodash_clonedeep.exports);
929
- lodash_clonedeep.exports;
930
- Object.prototype.toString.call(typeof process !== "undefined" ? process : 0) === "[object process]";
931
- var __defProp2 = Object.defineProperty;
932
- var __defNormalProp2 = (obj, key, value) => key in obj ? __defProp2(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
933
- var __publicField2 = (obj, key, value) => {
934
- __defNormalProp2(obj, typeof key !== "symbol" ? key + "" : key, value);
935
- return value;
936
- };
937
- var Gauge = /* @__PURE__ */ ((Gauge2) => {
938
- Gauge2["ACTIVE_REQUEST_GAUGE"] = "a";
939
- Gauge2["AUTHENTICATION_COUNT_GAUGE"] = "b";
940
- Gauge2["AUTHENTICATION_ERROR_COUNT_GAUGE"] = "aa";
941
- Gauge2["AUTHENTICATION_RETRY_COUNT_GAUGE"] = "ab";
942
- Gauge2["CONNECTION_POOL_IDLE_GAUGE"] = "c";
943
- Gauge2["CONNECTION_POOL_TOTAL_GAUGE"] = "d";
944
- Gauge2["CONNECTION_POOL_WAITING_GAUGE"] = "e";
945
- Gauge2["CPU_LOAD_GAUGE"] = "f";
946
- Gauge2["CPU_SYSTEM_LOAD_GAUGE"] = "g";
947
- Gauge2["DURATION_GAUGE"] = "h";
948
- Gauge2["DURATION_HISTOGRAM_GAUGE"] = "i";
949
- Gauge2["ERROR_COUNT_GAUGE"] = "j";
950
- Gauge2["LATENCY_GAUGE"] = "k";
951
- Gauge2["LATENCY_HISTOGRAM_GAUGE"] = "l";
952
- Gauge2["LOGGER"] = "m";
953
- Gauge2["LOGGER_COPY"] = "n";
954
- Gauge2["NETWORK_RX_GAUGE"] = "o";
955
- Gauge2["NETWORK_TX_GAUGE"] = "p";
956
- Gauge2["REQUEST_COUNT_GAUGE"] = "q";
957
- Gauge2["RETRY_COUNT_GAUGE"] = "r";
958
- Gauge2["TIMER_GAUGE"] = "s";
959
- Gauge2["VELOCITY_GAUGE"] = "t";
960
- Gauge2["CONNECTION_COUNT_GAUGE"] = "u";
961
- Gauge2["OBJECT_GAUGE"] = "v";
962
- Gauge2["PAYLOAD_SIZE"] = "w";
963
- Gauge2["CORE_COUNT_GAUGE"] = "x";
964
- Gauge2["CHILD_COUNT"] = "y";
965
- Gauge2["UNKNOWN"] = "z";
966
- return Gauge2;
967
- })(Gauge || {});
968
- var GaugeTypes = /* @__PURE__ */ ((GaugeTypes2) => {
969
- GaugeTypes2["GAUGE_TYPE"] = "_";
970
- GaugeTypes2["INSTRUMENT_GAUGE"] = "a";
971
- GaugeTypes2["INSTRUMENT_VELOCITY"] = "b";
972
- GaugeTypes2["INSTRUMENT_HISTOGRAM"] = "c";
973
- GaugeTypes2["INSTRUMENT_LOG"] = "d";
974
- GaugeTypes2["INSTRUMENT_TIMER"] = "e";
975
- GaugeTypes2["INSTRUMENT_OBJECT"] = "f";
976
- return GaugeTypes2;
977
- })(GaugeTypes || {});
978
- GaugeTypes.GAUGE_TYPE;
979
- var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
980
- var timsort$1 = {};
981
- (function(exports3) {
982
- (function(global2, factory) {
983
- {
984
- factory(exports3);
985
- }
986
- })(commonjsGlobal, function(exports22) {
987
- exports22.__esModule = true;
988
- exports22.sort = sort;
989
- function _classCallCheck(instance, Constructor) {
990
- if (!(instance instanceof Constructor)) {
991
- throw new TypeError("Cannot call a class as a function");
992
- }
993
- }
994
- var DEFAULT_MIN_MERGE = 32;
995
- var DEFAULT_MIN_GALLOPING = 7;
996
- var DEFAULT_TMP_STORAGE_LENGTH = 256;
997
- var POWERS_OF_TEN = [1, 10, 100, 1e3, 1e4, 1e5, 1e6, 1e7, 1e8, 1e9];
998
- function log10(x) {
999
- if (x < 1e5) {
1000
- if (x < 100) {
1001
- return x < 10 ? 0 : 1;
1002
- }
1003
- if (x < 1e4) {
1004
- return x < 1e3 ? 2 : 3;
1005
- }
1006
- return 4;
1007
- }
1008
- if (x < 1e7) {
1009
- return x < 1e6 ? 5 : 6;
1010
- }
1011
- if (x < 1e9) {
1012
- return x < 1e8 ? 7 : 8;
1013
- }
1014
- return 9;
1015
- }
1016
- function alphabeticalCompare(a, b) {
1017
- if (a === b) {
1018
- return 0;
1019
- }
1020
- if (~~a === a && ~~b === b) {
1021
- if (a === 0 || b === 0) {
1022
- return a < b ? -1 : 1;
1023
- }
1024
- if (a < 0 || b < 0) {
1025
- if (b >= 0) {
1026
- return -1;
1027
- }
1028
- if (a >= 0) {
1029
- return 1;
1030
- }
1031
- a = -a;
1032
- b = -b;
1033
- }
1034
- var al = log10(a);
1035
- var bl = log10(b);
1036
- var t = 0;
1037
- if (al < bl) {
1038
- a *= POWERS_OF_TEN[bl - al - 1];
1039
- b /= 10;
1040
- t = -1;
1041
- } else if (al > bl) {
1042
- b *= POWERS_OF_TEN[al - bl - 1];
1043
- a /= 10;
1044
- t = 1;
1045
- }
1046
- if (a === b) {
1047
- return t;
1048
- }
1049
- return a < b ? -1 : 1;
1050
- }
1051
- var aStr = String(a);
1052
- var bStr = String(b);
1053
- if (aStr === bStr) {
1054
- return 0;
1055
- }
1056
- return aStr < bStr ? -1 : 1;
1057
- }
1058
- function minRunLength(n) {
1059
- var r = 0;
1060
- while (n >= DEFAULT_MIN_MERGE) {
1061
- r |= n & 1;
1062
- n >>= 1;
1063
- }
1064
- return n + r;
1065
- }
1066
- function makeAscendingRun(array, lo, hi, compare) {
1067
- var runHi = lo + 1;
1068
- if (runHi === hi) {
1069
- return 1;
1070
- }
1071
- if (compare(array[runHi++], array[lo]) < 0) {
1072
- while (runHi < hi && compare(array[runHi], array[runHi - 1]) < 0) {
1073
- runHi++;
1074
- }
1075
- reverseRun(array, lo, runHi);
1076
- } else {
1077
- while (runHi < hi && compare(array[runHi], array[runHi - 1]) >= 0) {
1078
- runHi++;
1079
- }
1080
- }
1081
- return runHi - lo;
1082
- }
1083
- function reverseRun(array, lo, hi) {
1084
- hi--;
1085
- while (lo < hi) {
1086
- var t = array[lo];
1087
- array[lo++] = array[hi];
1088
- array[hi--] = t;
1089
- }
1090
- }
1091
- function binaryInsertionSort(array, lo, hi, start, compare) {
1092
- if (start === lo) {
1093
- start++;
1094
- }
1095
- for (; start < hi; start++) {
1096
- var pivot = array[start];
1097
- var left = lo;
1098
- var right = start;
1099
- while (left < right) {
1100
- var mid = left + right >>> 1;
1101
- if (compare(pivot, array[mid]) < 0) {
1102
- right = mid;
1103
- } else {
1104
- left = mid + 1;
1105
- }
1106
- }
1107
- var n = start - left;
1108
- switch (n) {
1109
- case 3:
1110
- array[left + 3] = array[left + 2];
1111
- case 2:
1112
- array[left + 2] = array[left + 1];
1113
- case 1:
1114
- array[left + 1] = array[left];
1115
- break;
1116
- default:
1117
- while (n > 0) {
1118
- array[left + n] = array[left + n - 1];
1119
- n--;
1120
- }
1121
- }
1122
- array[left] = pivot;
1123
- }
1124
- }
1125
- function gallopLeft(value, array, start, length, hint, compare) {
1126
- var lastOffset = 0;
1127
- var maxOffset = 0;
1128
- var offset = 1;
1129
- if (compare(value, array[start + hint]) > 0) {
1130
- maxOffset = length - hint;
1131
- while (offset < maxOffset && compare(value, array[start + hint + offset]) > 0) {
1132
- lastOffset = offset;
1133
- offset = (offset << 1) + 1;
1134
- if (offset <= 0) {
1135
- offset = maxOffset;
1136
- }
1137
- }
1138
- if (offset > maxOffset) {
1139
- offset = maxOffset;
1140
- }
1141
- lastOffset += hint;
1142
- offset += hint;
1143
- } else {
1144
- maxOffset = hint + 1;
1145
- while (offset < maxOffset && compare(value, array[start + hint - offset]) <= 0) {
1146
- lastOffset = offset;
1147
- offset = (offset << 1) + 1;
1148
- if (offset <= 0) {
1149
- offset = maxOffset;
1150
- }
1151
- }
1152
- if (offset > maxOffset) {
1153
- offset = maxOffset;
1154
- }
1155
- var tmp = lastOffset;
1156
- lastOffset = hint - offset;
1157
- offset = hint - tmp;
1158
- }
1159
- lastOffset++;
1160
- while (lastOffset < offset) {
1161
- var m = lastOffset + (offset - lastOffset >>> 1);
1162
- if (compare(value, array[start + m]) > 0) {
1163
- lastOffset = m + 1;
1164
- } else {
1165
- offset = m;
1166
- }
1167
- }
1168
- return offset;
1169
- }
1170
- function gallopRight(value, array, start, length, hint, compare) {
1171
- var lastOffset = 0;
1172
- var maxOffset = 0;
1173
- var offset = 1;
1174
- if (compare(value, array[start + hint]) < 0) {
1175
- maxOffset = hint + 1;
1176
- while (offset < maxOffset && compare(value, array[start + hint - offset]) < 0) {
1177
- lastOffset = offset;
1178
- offset = (offset << 1) + 1;
1179
- if (offset <= 0) {
1180
- offset = maxOffset;
1181
- }
1182
- }
1183
- if (offset > maxOffset) {
1184
- offset = maxOffset;
1185
- }
1186
- var tmp = lastOffset;
1187
- lastOffset = hint - offset;
1188
- offset = hint - tmp;
1189
- } else {
1190
- maxOffset = length - hint;
1191
- while (offset < maxOffset && compare(value, array[start + hint + offset]) >= 0) {
1192
- lastOffset = offset;
1193
- offset = (offset << 1) + 1;
1194
- if (offset <= 0) {
1195
- offset = maxOffset;
1196
- }
1197
- }
1198
- if (offset > maxOffset) {
1199
- offset = maxOffset;
1200
- }
1201
- lastOffset += hint;
1202
- offset += hint;
1203
- }
1204
- lastOffset++;
1205
- while (lastOffset < offset) {
1206
- var m = lastOffset + (offset - lastOffset >>> 1);
1207
- if (compare(value, array[start + m]) < 0) {
1208
- offset = m;
1209
- } else {
1210
- lastOffset = m + 1;
1211
- }
1212
- }
1213
- return offset;
1214
- }
1215
- var TimSort = function() {
1216
- function TimSort2(array, compare) {
1217
- _classCallCheck(this, TimSort2);
1218
- this.array = null;
1219
- this.compare = null;
1220
- this.minGallop = DEFAULT_MIN_GALLOPING;
1221
- this.length = 0;
1222
- this.tmpStorageLength = DEFAULT_TMP_STORAGE_LENGTH;
1223
- this.stackLength = 0;
1224
- this.runStart = null;
1225
- this.runLength = null;
1226
- this.stackSize = 0;
1227
- this.array = array;
1228
- this.compare = compare;
1229
- this.length = array.length;
1230
- if (this.length < 2 * DEFAULT_TMP_STORAGE_LENGTH) {
1231
- this.tmpStorageLength = this.length >>> 1;
1232
- }
1233
- this.tmp = new Array(this.tmpStorageLength);
1234
- this.stackLength = this.length < 120 ? 5 : this.length < 1542 ? 10 : this.length < 119151 ? 19 : 40;
1235
- this.runStart = new Array(this.stackLength);
1236
- this.runLength = new Array(this.stackLength);
1237
- }
1238
- TimSort2.prototype.pushRun = function pushRun(runStart, runLength) {
1239
- this.runStart[this.stackSize] = runStart;
1240
- this.runLength[this.stackSize] = runLength;
1241
- this.stackSize += 1;
1242
- };
1243
- TimSort2.prototype.mergeRuns = function mergeRuns() {
1244
- while (this.stackSize > 1) {
1245
- var n = this.stackSize - 2;
1246
- if (n >= 1 && this.runLength[n - 1] <= this.runLength[n] + this.runLength[n + 1] || n >= 2 && this.runLength[n - 2] <= this.runLength[n] + this.runLength[n - 1]) {
1247
- if (this.runLength[n - 1] < this.runLength[n + 1]) {
1248
- n--;
1249
- }
1250
- } else if (this.runLength[n] > this.runLength[n + 1]) {
1251
- break;
1252
- }
1253
- this.mergeAt(n);
1254
- }
1255
- };
1256
- TimSort2.prototype.forceMergeRuns = function forceMergeRuns() {
1257
- while (this.stackSize > 1) {
1258
- var n = this.stackSize - 2;
1259
- if (n > 0 && this.runLength[n - 1] < this.runLength[n + 1]) {
1260
- n--;
1261
- }
1262
- this.mergeAt(n);
1263
- }
1264
- };
1265
- TimSort2.prototype.mergeAt = function mergeAt(i) {
1266
- var compare = this.compare;
1267
- var array = this.array;
1268
- var start1 = this.runStart[i];
1269
- var length1 = this.runLength[i];
1270
- var start2 = this.runStart[i + 1];
1271
- var length2 = this.runLength[i + 1];
1272
- this.runLength[i] = length1 + length2;
1273
- if (i === this.stackSize - 3) {
1274
- this.runStart[i + 1] = this.runStart[i + 2];
1275
- this.runLength[i + 1] = this.runLength[i + 2];
1276
- }
1277
- this.stackSize--;
1278
- var k = gallopRight(array[start2], array, start1, length1, 0, compare);
1279
- start1 += k;
1280
- length1 -= k;
1281
- if (length1 === 0) {
1282
- return;
1283
- }
1284
- length2 = gallopLeft(array[start1 + length1 - 1], array, start2, length2, length2 - 1, compare);
1285
- if (length2 === 0) {
1286
- return;
1287
- }
1288
- if (length1 <= length2) {
1289
- this.mergeLow(start1, length1, start2, length2);
1290
- } else {
1291
- this.mergeHigh(start1, length1, start2, length2);
1292
- }
1293
- };
1294
- TimSort2.prototype.mergeLow = function mergeLow(start1, length1, start2, length2) {
1295
- var compare = this.compare;
1296
- var array = this.array;
1297
- var tmp = this.tmp;
1298
- var i = 0;
1299
- for (i = 0; i < length1; i++) {
1300
- tmp[i] = array[start1 + i];
1301
- }
1302
- var cursor1 = 0;
1303
- var cursor2 = start2;
1304
- var dest = start1;
1305
- array[dest++] = array[cursor2++];
1306
- if (--length2 === 0) {
1307
- for (i = 0; i < length1; i++) {
1308
- array[dest + i] = tmp[cursor1 + i];
1309
- }
1310
- return;
1311
- }
1312
- if (length1 === 1) {
1313
- for (i = 0; i < length2; i++) {
1314
- array[dest + i] = array[cursor2 + i];
1315
- }
1316
- array[dest + length2] = tmp[cursor1];
1317
- return;
1318
- }
1319
- var minGallop = this.minGallop;
1320
- while (true) {
1321
- var count1 = 0;
1322
- var count2 = 0;
1323
- var exit = false;
1324
- do {
1325
- if (compare(array[cursor2], tmp[cursor1]) < 0) {
1326
- array[dest++] = array[cursor2++];
1327
- count2++;
1328
- count1 = 0;
1329
- if (--length2 === 0) {
1330
- exit = true;
1331
- break;
1332
- }
1333
- } else {
1334
- array[dest++] = tmp[cursor1++];
1335
- count1++;
1336
- count2 = 0;
1337
- if (--length1 === 1) {
1338
- exit = true;
1339
- break;
1340
- }
1341
- }
1342
- } while ((count1 | count2) < minGallop);
1343
- if (exit) {
1344
- break;
1345
- }
1346
- do {
1347
- count1 = gallopRight(array[cursor2], tmp, cursor1, length1, 0, compare);
1348
- if (count1 !== 0) {
1349
- for (i = 0; i < count1; i++) {
1350
- array[dest + i] = tmp[cursor1 + i];
1351
- }
1352
- dest += count1;
1353
- cursor1 += count1;
1354
- length1 -= count1;
1355
- if (length1 <= 1) {
1356
- exit = true;
1357
- break;
1358
- }
1359
- }
1360
- array[dest++] = array[cursor2++];
1361
- if (--length2 === 0) {
1362
- exit = true;
1363
- break;
1364
- }
1365
- count2 = gallopLeft(tmp[cursor1], array, cursor2, length2, 0, compare);
1366
- if (count2 !== 0) {
1367
- for (i = 0; i < count2; i++) {
1368
- array[dest + i] = array[cursor2 + i];
1369
- }
1370
- dest += count2;
1371
- cursor2 += count2;
1372
- length2 -= count2;
1373
- if (length2 === 0) {
1374
- exit = true;
1375
- break;
1376
- }
1377
- }
1378
- array[dest++] = tmp[cursor1++];
1379
- if (--length1 === 1) {
1380
- exit = true;
1381
- break;
1382
- }
1383
- minGallop--;
1384
- } while (count1 >= DEFAULT_MIN_GALLOPING || count2 >= DEFAULT_MIN_GALLOPING);
1385
- if (exit) {
1386
- break;
1387
- }
1388
- if (minGallop < 0) {
1389
- minGallop = 0;
1390
- }
1391
- minGallop += 2;
1392
- }
1393
- this.minGallop = minGallop;
1394
- if (minGallop < 1) {
1395
- this.minGallop = 1;
1396
- }
1397
- if (length1 === 1) {
1398
- for (i = 0; i < length2; i++) {
1399
- array[dest + i] = array[cursor2 + i];
1400
- }
1401
- array[dest + length2] = tmp[cursor1];
1402
- } else if (length1 === 0) {
1403
- throw new Error("mergeLow preconditions were not respected");
1404
- } else {
1405
- for (i = 0; i < length1; i++) {
1406
- array[dest + i] = tmp[cursor1 + i];
1407
- }
1408
- }
1409
- };
1410
- TimSort2.prototype.mergeHigh = function mergeHigh(start1, length1, start2, length2) {
1411
- var compare = this.compare;
1412
- var array = this.array;
1413
- var tmp = this.tmp;
1414
- var i = 0;
1415
- for (i = 0; i < length2; i++) {
1416
- tmp[i] = array[start2 + i];
1417
- }
1418
- var cursor1 = start1 + length1 - 1;
1419
- var cursor2 = length2 - 1;
1420
- var dest = start2 + length2 - 1;
1421
- var customCursor = 0;
1422
- var customDest = 0;
1423
- array[dest--] = array[cursor1--];
1424
- if (--length1 === 0) {
1425
- customCursor = dest - (length2 - 1);
1426
- for (i = 0; i < length2; i++) {
1427
- array[customCursor + i] = tmp[i];
1428
- }
1429
- return;
1430
- }
1431
- if (length2 === 1) {
1432
- dest -= length1;
1433
- cursor1 -= length1;
1434
- customDest = dest + 1;
1435
- customCursor = cursor1 + 1;
1436
- for (i = length1 - 1; i >= 0; i--) {
1437
- array[customDest + i] = array[customCursor + i];
1438
- }
1439
- array[dest] = tmp[cursor2];
1440
- return;
1441
- }
1442
- var minGallop = this.minGallop;
1443
- while (true) {
1444
- var count1 = 0;
1445
- var count2 = 0;
1446
- var exit = false;
1447
- do {
1448
- if (compare(tmp[cursor2], array[cursor1]) < 0) {
1449
- array[dest--] = array[cursor1--];
1450
- count1++;
1451
- count2 = 0;
1452
- if (--length1 === 0) {
1453
- exit = true;
1454
- break;
1455
- }
1456
- } else {
1457
- array[dest--] = tmp[cursor2--];
1458
- count2++;
1459
- count1 = 0;
1460
- if (--length2 === 1) {
1461
- exit = true;
1462
- break;
1463
- }
1464
- }
1465
- } while ((count1 | count2) < minGallop);
1466
- if (exit) {
1467
- break;
1468
- }
1469
- do {
1470
- count1 = length1 - gallopRight(tmp[cursor2], array, start1, length1, length1 - 1, compare);
1471
- if (count1 !== 0) {
1472
- dest -= count1;
1473
- cursor1 -= count1;
1474
- length1 -= count1;
1475
- customDest = dest + 1;
1476
- customCursor = cursor1 + 1;
1477
- for (i = count1 - 1; i >= 0; i--) {
1478
- array[customDest + i] = array[customCursor + i];
1479
- }
1480
- if (length1 === 0) {
1481
- exit = true;
1482
- break;
1483
- }
1484
- }
1485
- array[dest--] = tmp[cursor2--];
1486
- if (--length2 === 1) {
1487
- exit = true;
1488
- break;
1489
- }
1490
- count2 = length2 - gallopLeft(array[cursor1], tmp, 0, length2, length2 - 1, compare);
1491
- if (count2 !== 0) {
1492
- dest -= count2;
1493
- cursor2 -= count2;
1494
- length2 -= count2;
1495
- customDest = dest + 1;
1496
- customCursor = cursor2 + 1;
1497
- for (i = 0; i < count2; i++) {
1498
- array[customDest + i] = tmp[customCursor + i];
1499
- }
1500
- if (length2 <= 1) {
1501
- exit = true;
1502
- break;
1503
- }
1504
- }
1505
- array[dest--] = array[cursor1--];
1506
- if (--length1 === 0) {
1507
- exit = true;
1508
- break;
1509
- }
1510
- minGallop--;
1511
- } while (count1 >= DEFAULT_MIN_GALLOPING || count2 >= DEFAULT_MIN_GALLOPING);
1512
- if (exit) {
1513
- break;
1514
- }
1515
- if (minGallop < 0) {
1516
- minGallop = 0;
1517
- }
1518
- minGallop += 2;
1519
- }
1520
- this.minGallop = minGallop;
1521
- if (minGallop < 1) {
1522
- this.minGallop = 1;
1523
- }
1524
- if (length2 === 1) {
1525
- dest -= length1;
1526
- cursor1 -= length1;
1527
- customDest = dest + 1;
1528
- customCursor = cursor1 + 1;
1529
- for (i = length1 - 1; i >= 0; i--) {
1530
- array[customDest + i] = array[customCursor + i];
1531
- }
1532
- array[dest] = tmp[cursor2];
1533
- } else if (length2 === 0) {
1534
- throw new Error("mergeHigh preconditions were not respected");
1535
- } else {
1536
- customCursor = dest - (length2 - 1);
1537
- for (i = 0; i < length2; i++) {
1538
- array[customCursor + i] = tmp[i];
1539
- }
1540
- }
1541
- };
1542
- return TimSort2;
1543
- }();
1544
- function sort(array, compare, lo, hi) {
1545
- if (!Array.isArray(array)) {
1546
- throw new TypeError("Can only sort arrays");
1547
- }
1548
- if (!compare) {
1549
- compare = alphabeticalCompare;
1550
- } else if (typeof compare !== "function") {
1551
- hi = lo;
1552
- lo = compare;
1553
- compare = alphabeticalCompare;
1554
- }
1555
- if (!lo) {
1556
- lo = 0;
1557
- }
1558
- if (!hi) {
1559
- hi = array.length;
1560
- }
1561
- var remaining = hi - lo;
1562
- if (remaining < 2) {
1563
- return;
1564
- }
1565
- var runLength = 0;
1566
- if (remaining < DEFAULT_MIN_MERGE) {
1567
- runLength = makeAscendingRun(array, lo, hi, compare);
1568
- binaryInsertionSort(array, lo, hi, lo + runLength, compare);
1569
- return;
1570
- }
1571
- var ts = new TimSort(array, compare);
1572
- var minRun = minRunLength(remaining);
1573
- do {
1574
- runLength = makeAscendingRun(array, lo, hi, compare);
1575
- if (runLength < minRun) {
1576
- var force = remaining;
1577
- if (force > minRun) {
1578
- force = minRun;
1579
- }
1580
- binaryInsertionSort(array, lo, lo + force, lo + runLength, compare);
1581
- runLength = force;
1582
- }
1583
- ts.pushRun(lo, runLength);
1584
- ts.mergeRuns();
1585
- remaining -= runLength;
1586
- lo += runLength;
1587
- } while (remaining !== 0);
1588
- ts.forceMergeRuns();
1589
- }
1590
- });
1591
- })(timsort$1);
1592
- var ansiStyles$1$1 = { exports: {} };
1593
- var colorName$1;
1594
- var hasRequiredColorName$1;
1595
- function requireColorName$1() {
1596
- if (hasRequiredColorName$1)
1597
- return colorName$1;
1598
- hasRequiredColorName$1 = 1;
1599
- colorName$1 = {
1600
- "aliceblue": [240, 248, 255],
1601
- "antiquewhite": [250, 235, 215],
1602
- "aqua": [0, 255, 255],
1603
- "aquamarine": [127, 255, 212],
1604
- "azure": [240, 255, 255],
1605
- "beige": [245, 245, 220],
1606
- "bisque": [255, 228, 196],
1607
- "black": [0, 0, 0],
1608
- "blanchedalmond": [255, 235, 205],
1609
- "blue": [0, 0, 255],
1610
- "blueviolet": [138, 43, 226],
1611
- "brown": [165, 42, 42],
1612
- "burlywood": [222, 184, 135],
1613
- "cadetblue": [95, 158, 160],
1614
- "chartreuse": [127, 255, 0],
1615
- "chocolate": [210, 105, 30],
1616
- "coral": [255, 127, 80],
1617
- "cornflowerblue": [100, 149, 237],
1618
- "cornsilk": [255, 248, 220],
1619
- "crimson": [220, 20, 60],
1620
- "cyan": [0, 255, 255],
1621
- "darkblue": [0, 0, 139],
1622
- "darkcyan": [0, 139, 139],
1623
- "darkgoldenrod": [184, 134, 11],
1624
- "darkgray": [169, 169, 169],
1625
- "darkgreen": [0, 100, 0],
1626
- "darkgrey": [169, 169, 169],
1627
- "darkkhaki": [189, 183, 107],
1628
- "darkmagenta": [139, 0, 139],
1629
- "darkolivegreen": [85, 107, 47],
1630
- "darkorange": [255, 140, 0],
1631
- "darkorchid": [153, 50, 204],
1632
- "darkred": [139, 0, 0],
1633
- "darksalmon": [233, 150, 122],
1634
- "darkseagreen": [143, 188, 143],
1635
- "darkslateblue": [72, 61, 139],
1636
- "darkslategray": [47, 79, 79],
1637
- "darkslategrey": [47, 79, 79],
1638
- "darkturquoise": [0, 206, 209],
1639
- "darkviolet": [148, 0, 211],
1640
- "deeppink": [255, 20, 147],
1641
- "deepskyblue": [0, 191, 255],
1642
- "dimgray": [105, 105, 105],
1643
- "dimgrey": [105, 105, 105],
1644
- "dodgerblue": [30, 144, 255],
1645
- "firebrick": [178, 34, 34],
1646
- "floralwhite": [255, 250, 240],
1647
- "forestgreen": [34, 139, 34],
1648
- "fuchsia": [255, 0, 255],
1649
- "gainsboro": [220, 220, 220],
1650
- "ghostwhite": [248, 248, 255],
1651
- "gold": [255, 215, 0],
1652
- "goldenrod": [218, 165, 32],
1653
- "gray": [128, 128, 128],
1654
- "green": [0, 128, 0],
1655
- "greenyellow": [173, 255, 47],
1656
- "grey": [128, 128, 128],
1657
- "honeydew": [240, 255, 240],
1658
- "hotpink": [255, 105, 180],
1659
- "indianred": [205, 92, 92],
1660
- "indigo": [75, 0, 130],
1661
- "ivory": [255, 255, 240],
1662
- "khaki": [240, 230, 140],
1663
- "lavender": [230, 230, 250],
1664
- "lavenderblush": [255, 240, 245],
1665
- "lawngreen": [124, 252, 0],
1666
- "lemonchiffon": [255, 250, 205],
1667
- "lightblue": [173, 216, 230],
1668
- "lightcoral": [240, 128, 128],
1669
- "lightcyan": [224, 255, 255],
1670
- "lightgoldenrodyellow": [250, 250, 210],
1671
- "lightgray": [211, 211, 211],
1672
- "lightgreen": [144, 238, 144],
1673
- "lightgrey": [211, 211, 211],
1674
- "lightpink": [255, 182, 193],
1675
- "lightsalmon": [255, 160, 122],
1676
- "lightseagreen": [32, 178, 170],
1677
- "lightskyblue": [135, 206, 250],
1678
- "lightslategray": [119, 136, 153],
1679
- "lightslategrey": [119, 136, 153],
1680
- "lightsteelblue": [176, 196, 222],
1681
- "lightyellow": [255, 255, 224],
1682
- "lime": [0, 255, 0],
1683
- "limegreen": [50, 205, 50],
1684
- "linen": [250, 240, 230],
1685
- "magenta": [255, 0, 255],
1686
- "maroon": [128, 0, 0],
1687
- "mediumaquamarine": [102, 205, 170],
1688
- "mediumblue": [0, 0, 205],
1689
- "mediumorchid": [186, 85, 211],
1690
- "mediumpurple": [147, 112, 219],
1691
- "mediumseagreen": [60, 179, 113],
1692
- "mediumslateblue": [123, 104, 238],
1693
- "mediumspringgreen": [0, 250, 154],
1694
- "mediumturquoise": [72, 209, 204],
1695
- "mediumvioletred": [199, 21, 133],
1696
- "midnightblue": [25, 25, 112],
1697
- "mintcream": [245, 255, 250],
1698
- "mistyrose": [255, 228, 225],
1699
- "moccasin": [255, 228, 181],
1700
- "navajowhite": [255, 222, 173],
1701
- "navy": [0, 0, 128],
1702
- "oldlace": [253, 245, 230],
1703
- "olive": [128, 128, 0],
1704
- "olivedrab": [107, 142, 35],
1705
- "orange": [255, 165, 0],
1706
- "orangered": [255, 69, 0],
1707
- "orchid": [218, 112, 214],
1708
- "palegoldenrod": [238, 232, 170],
1709
- "palegreen": [152, 251, 152],
1710
- "paleturquoise": [175, 238, 238],
1711
- "palevioletred": [219, 112, 147],
1712
- "papayawhip": [255, 239, 213],
1713
- "peachpuff": [255, 218, 185],
1714
- "peru": [205, 133, 63],
1715
- "pink": [255, 192, 203],
1716
- "plum": [221, 160, 221],
1717
- "powderblue": [176, 224, 230],
1718
- "purple": [128, 0, 128],
1719
- "rebeccapurple": [102, 51, 153],
1720
- "red": [255, 0, 0],
1721
- "rosybrown": [188, 143, 143],
1722
- "royalblue": [65, 105, 225],
1723
- "saddlebrown": [139, 69, 19],
1724
- "salmon": [250, 128, 114],
1725
- "sandybrown": [244, 164, 96],
1726
- "seagreen": [46, 139, 87],
1727
- "seashell": [255, 245, 238],
1728
- "sienna": [160, 82, 45],
1729
- "silver": [192, 192, 192],
1730
- "skyblue": [135, 206, 235],
1731
- "slateblue": [106, 90, 205],
1732
- "slategray": [112, 128, 144],
1733
- "slategrey": [112, 128, 144],
1734
- "snow": [255, 250, 250],
1735
- "springgreen": [0, 255, 127],
1736
- "steelblue": [70, 130, 180],
1737
- "tan": [210, 180, 140],
1738
- "teal": [0, 128, 128],
1739
- "thistle": [216, 191, 216],
1740
- "tomato": [255, 99, 71],
1741
- "turquoise": [64, 224, 208],
1742
- "violet": [238, 130, 238],
1743
- "wheat": [245, 222, 179],
1744
- "white": [255, 255, 255],
1745
- "whitesmoke": [245, 245, 245],
1746
- "yellow": [255, 255, 0],
1747
- "yellowgreen": [154, 205, 50]
1748
- };
1749
- return colorName$1;
1750
- }
1751
- var conversions$1;
1752
- var hasRequiredConversions$1;
1753
- function requireConversions$1() {
1754
- if (hasRequiredConversions$1)
1755
- return conversions$1;
1756
- hasRequiredConversions$1 = 1;
1757
- const cssKeywords = requireColorName$1();
1758
- const reverseKeywords = {};
1759
- for (const key of Object.keys(cssKeywords)) {
1760
- reverseKeywords[cssKeywords[key]] = key;
1761
- }
1762
- const convert = {
1763
- rgb: { channels: 3, labels: "rgb" },
1764
- hsl: { channels: 3, labels: "hsl" },
1765
- hsv: { channels: 3, labels: "hsv" },
1766
- hwb: { channels: 3, labels: "hwb" },
1767
- cmyk: { channels: 4, labels: "cmyk" },
1768
- xyz: { channels: 3, labels: "xyz" },
1769
- lab: { channels: 3, labels: "lab" },
1770
- lch: { channels: 3, labels: "lch" },
1771
- hex: { channels: 1, labels: ["hex"] },
1772
- keyword: { channels: 1, labels: ["keyword"] },
1773
- ansi16: { channels: 1, labels: ["ansi16"] },
1774
- ansi256: { channels: 1, labels: ["ansi256"] },
1775
- hcg: { channels: 3, labels: ["h", "c", "g"] },
1776
- apple: { channels: 3, labels: ["r16", "g16", "b16"] },
1777
- gray: { channels: 1, labels: ["gray"] }
1778
- };
1779
- conversions$1 = convert;
1780
- for (const model of Object.keys(convert)) {
1781
- if (!("channels" in convert[model])) {
1782
- throw new Error("missing channels property: " + model);
1783
- }
1784
- if (!("labels" in convert[model])) {
1785
- throw new Error("missing channel labels property: " + model);
1786
- }
1787
- if (convert[model].labels.length !== convert[model].channels) {
1788
- throw new Error("channel and label counts mismatch: " + model);
1789
- }
1790
- const { channels, labels } = convert[model];
1791
- delete convert[model].channels;
1792
- delete convert[model].labels;
1793
- Object.defineProperty(convert[model], "channels", { value: channels });
1794
- Object.defineProperty(convert[model], "labels", { value: labels });
1795
- }
1796
- convert.rgb.hsl = function(rgb) {
1797
- const r = rgb[0] / 255;
1798
- const g = rgb[1] / 255;
1799
- const b = rgb[2] / 255;
1800
- const min = Math.min(r, g, b);
1801
- const max = Math.max(r, g, b);
1802
- const delta = max - min;
1803
- let h;
1804
- let s;
1805
- if (max === min) {
1806
- h = 0;
1807
- } else if (r === max) {
1808
- h = (g - b) / delta;
1809
- } else if (g === max) {
1810
- h = 2 + (b - r) / delta;
1811
- } else if (b === max) {
1812
- h = 4 + (r - g) / delta;
1813
- }
1814
- h = Math.min(h * 60, 360);
1815
- if (h < 0) {
1816
- h += 360;
1817
- }
1818
- const l = (min + max) / 2;
1819
- if (max === min) {
1820
- s = 0;
1821
- } else if (l <= 0.5) {
1822
- s = delta / (max + min);
1823
- } else {
1824
- s = delta / (2 - max - min);
1825
- }
1826
- return [h, s * 100, l * 100];
1827
- };
1828
- convert.rgb.hsv = function(rgb) {
1829
- let rdif;
1830
- let gdif;
1831
- let bdif;
1832
- let h;
1833
- let s;
1834
- const r = rgb[0] / 255;
1835
- const g = rgb[1] / 255;
1836
- const b = rgb[2] / 255;
1837
- const v = Math.max(r, g, b);
1838
- const diff = v - Math.min(r, g, b);
1839
- const diffc = function(c) {
1840
- return (v - c) / 6 / diff + 1 / 2;
1841
- };
1842
- if (diff === 0) {
1843
- h = 0;
1844
- s = 0;
1845
- } else {
1846
- s = diff / v;
1847
- rdif = diffc(r);
1848
- gdif = diffc(g);
1849
- bdif = diffc(b);
1850
- if (r === v) {
1851
- h = bdif - gdif;
1852
- } else if (g === v) {
1853
- h = 1 / 3 + rdif - bdif;
1854
- } else if (b === v) {
1855
- h = 2 / 3 + gdif - rdif;
1856
- }
1857
- if (h < 0) {
1858
- h += 1;
1859
- } else if (h > 1) {
1860
- h -= 1;
1861
- }
1862
- }
1863
- return [
1864
- h * 360,
1865
- s * 100,
1866
- v * 100
1867
- ];
1868
- };
1869
- convert.rgb.hwb = function(rgb) {
1870
- const r = rgb[0];
1871
- const g = rgb[1];
1872
- let b = rgb[2];
1873
- const h = convert.rgb.hsl(rgb)[0];
1874
- const w = 1 / 255 * Math.min(r, Math.min(g, b));
1875
- b = 1 - 1 / 255 * Math.max(r, Math.max(g, b));
1876
- return [h, w * 100, b * 100];
1877
- };
1878
- convert.rgb.cmyk = function(rgb) {
1879
- const r = rgb[0] / 255;
1880
- const g = rgb[1] / 255;
1881
- const b = rgb[2] / 255;
1882
- const k = Math.min(1 - r, 1 - g, 1 - b);
1883
- const c = (1 - r - k) / (1 - k) || 0;
1884
- const m = (1 - g - k) / (1 - k) || 0;
1885
- const y = (1 - b - k) / (1 - k) || 0;
1886
- return [c * 100, m * 100, y * 100, k * 100];
1887
- };
1888
- function comparativeDistance(x, y) {
1889
- return (x[0] - y[0]) ** 2 + (x[1] - y[1]) ** 2 + (x[2] - y[2]) ** 2;
1890
- }
1891
- convert.rgb.keyword = function(rgb) {
1892
- const reversed = reverseKeywords[rgb];
1893
- if (reversed) {
1894
- return reversed;
1895
- }
1896
- let currentClosestDistance = Infinity;
1897
- let currentClosestKeyword;
1898
- for (const keyword of Object.keys(cssKeywords)) {
1899
- const value = cssKeywords[keyword];
1900
- const distance = comparativeDistance(rgb, value);
1901
- if (distance < currentClosestDistance) {
1902
- currentClosestDistance = distance;
1903
- currentClosestKeyword = keyword;
1904
- }
1905
- }
1906
- return currentClosestKeyword;
1907
- };
1908
- convert.keyword.rgb = function(keyword) {
1909
- return cssKeywords[keyword];
1910
- };
1911
- convert.rgb.xyz = function(rgb) {
1912
- let r = rgb[0] / 255;
1913
- let g = rgb[1] / 255;
1914
- let b = rgb[2] / 255;
1915
- r = r > 0.04045 ? ((r + 0.055) / 1.055) ** 2.4 : r / 12.92;
1916
- g = g > 0.04045 ? ((g + 0.055) / 1.055) ** 2.4 : g / 12.92;
1917
- b = b > 0.04045 ? ((b + 0.055) / 1.055) ** 2.4 : b / 12.92;
1918
- const x = r * 0.4124 + g * 0.3576 + b * 0.1805;
1919
- const y = r * 0.2126 + g * 0.7152 + b * 0.0722;
1920
- const z = r * 0.0193 + g * 0.1192 + b * 0.9505;
1921
- return [x * 100, y * 100, z * 100];
1922
- };
1923
- convert.rgb.lab = function(rgb) {
1924
- const xyz = convert.rgb.xyz(rgb);
1925
- let x = xyz[0];
1926
- let y = xyz[1];
1927
- let z = xyz[2];
1928
- x /= 95.047;
1929
- y /= 100;
1930
- z /= 108.883;
1931
- x = x > 8856e-6 ? x ** (1 / 3) : 7.787 * x + 16 / 116;
1932
- y = y > 8856e-6 ? y ** (1 / 3) : 7.787 * y + 16 / 116;
1933
- z = z > 8856e-6 ? z ** (1 / 3) : 7.787 * z + 16 / 116;
1934
- const l = 116 * y - 16;
1935
- const a = 500 * (x - y);
1936
- const b = 200 * (y - z);
1937
- return [l, a, b];
1938
- };
1939
- convert.hsl.rgb = function(hsl) {
1940
- const h = hsl[0] / 360;
1941
- const s = hsl[1] / 100;
1942
- const l = hsl[2] / 100;
1943
- let t2;
1944
- let t3;
1945
- let val;
1946
- if (s === 0) {
1947
- val = l * 255;
1948
- return [val, val, val];
1949
- }
1950
- if (l < 0.5) {
1951
- t2 = l * (1 + s);
1952
- } else {
1953
- t2 = l + s - l * s;
1954
- }
1955
- const t1 = 2 * l - t2;
1956
- const rgb = [0, 0, 0];
1957
- for (let i = 0; i < 3; i++) {
1958
- t3 = h + 1 / 3 * -(i - 1);
1959
- if (t3 < 0) {
1960
- t3++;
1961
- }
1962
- if (t3 > 1) {
1963
- t3--;
1964
- }
1965
- if (6 * t3 < 1) {
1966
- val = t1 + (t2 - t1) * 6 * t3;
1967
- } else if (2 * t3 < 1) {
1968
- val = t2;
1969
- } else if (3 * t3 < 2) {
1970
- val = t1 + (t2 - t1) * (2 / 3 - t3) * 6;
1971
- } else {
1972
- val = t1;
1973
- }
1974
- rgb[i] = val * 255;
1975
- }
1976
- return rgb;
1977
- };
1978
- convert.hsl.hsv = function(hsl) {
1979
- const h = hsl[0];
1980
- let s = hsl[1] / 100;
1981
- let l = hsl[2] / 100;
1982
- let smin = s;
1983
- const lmin = Math.max(l, 0.01);
1984
- l *= 2;
1985
- s *= l <= 1 ? l : 2 - l;
1986
- smin *= lmin <= 1 ? lmin : 2 - lmin;
1987
- const v = (l + s) / 2;
1988
- const sv = l === 0 ? 2 * smin / (lmin + smin) : 2 * s / (l + s);
1989
- return [h, sv * 100, v * 100];
1990
- };
1991
- convert.hsv.rgb = function(hsv) {
1992
- const h = hsv[0] / 60;
1993
- const s = hsv[1] / 100;
1994
- let v = hsv[2] / 100;
1995
- const hi = Math.floor(h) % 6;
1996
- const f = h - Math.floor(h);
1997
- const p = 255 * v * (1 - s);
1998
- const q = 255 * v * (1 - s * f);
1999
- const t = 255 * v * (1 - s * (1 - f));
2000
- v *= 255;
2001
- switch (hi) {
2002
- case 0:
2003
- return [v, t, p];
2004
- case 1:
2005
- return [q, v, p];
2006
- case 2:
2007
- return [p, v, t];
2008
- case 3:
2009
- return [p, q, v];
2010
- case 4:
2011
- return [t, p, v];
2012
- case 5:
2013
- return [v, p, q];
2014
- }
2015
- };
2016
- convert.hsv.hsl = function(hsv) {
2017
- const h = hsv[0];
2018
- const s = hsv[1] / 100;
2019
- const v = hsv[2] / 100;
2020
- const vmin = Math.max(v, 0.01);
2021
- let sl;
2022
- let l;
2023
- l = (2 - s) * v;
2024
- const lmin = (2 - s) * vmin;
2025
- sl = s * vmin;
2026
- sl /= lmin <= 1 ? lmin : 2 - lmin;
2027
- sl = sl || 0;
2028
- l /= 2;
2029
- return [h, sl * 100, l * 100];
2030
- };
2031
- convert.hwb.rgb = function(hwb) {
2032
- const h = hwb[0] / 360;
2033
- let wh = hwb[1] / 100;
2034
- let bl = hwb[2] / 100;
2035
- const ratio = wh + bl;
2036
- let f;
2037
- if (ratio > 1) {
2038
- wh /= ratio;
2039
- bl /= ratio;
2040
- }
2041
- const i = Math.floor(6 * h);
2042
- const v = 1 - bl;
2043
- f = 6 * h - i;
2044
- if ((i & 1) !== 0) {
2045
- f = 1 - f;
2046
- }
2047
- const n = wh + f * (v - wh);
2048
- let r;
2049
- let g;
2050
- let b;
2051
- switch (i) {
2052
- default:
2053
- case 6:
2054
- case 0:
2055
- r = v;
2056
- g = n;
2057
- b = wh;
2058
- break;
2059
- case 1:
2060
- r = n;
2061
- g = v;
2062
- b = wh;
2063
- break;
2064
- case 2:
2065
- r = wh;
2066
- g = v;
2067
- b = n;
2068
- break;
2069
- case 3:
2070
- r = wh;
2071
- g = n;
2072
- b = v;
2073
- break;
2074
- case 4:
2075
- r = n;
2076
- g = wh;
2077
- b = v;
2078
- break;
2079
- case 5:
2080
- r = v;
2081
- g = wh;
2082
- b = n;
2083
- break;
2084
- }
2085
- return [r * 255, g * 255, b * 255];
2086
- };
2087
- convert.cmyk.rgb = function(cmyk) {
2088
- const c = cmyk[0] / 100;
2089
- const m = cmyk[1] / 100;
2090
- const y = cmyk[2] / 100;
2091
- const k = cmyk[3] / 100;
2092
- const r = 1 - Math.min(1, c * (1 - k) + k);
2093
- const g = 1 - Math.min(1, m * (1 - k) + k);
2094
- const b = 1 - Math.min(1, y * (1 - k) + k);
2095
- return [r * 255, g * 255, b * 255];
2096
- };
2097
- convert.xyz.rgb = function(xyz) {
2098
- const x = xyz[0] / 100;
2099
- const y = xyz[1] / 100;
2100
- const z = xyz[2] / 100;
2101
- let r;
2102
- let g;
2103
- let b;
2104
- r = x * 3.2406 + y * -1.5372 + z * -0.4986;
2105
- g = x * -0.9689 + y * 1.8758 + z * 0.0415;
2106
- b = x * 0.0557 + y * -0.204 + z * 1.057;
2107
- r = r > 31308e-7 ? 1.055 * r ** (1 / 2.4) - 0.055 : r * 12.92;
2108
- g = g > 31308e-7 ? 1.055 * g ** (1 / 2.4) - 0.055 : g * 12.92;
2109
- b = b > 31308e-7 ? 1.055 * b ** (1 / 2.4) - 0.055 : b * 12.92;
2110
- r = Math.min(Math.max(0, r), 1);
2111
- g = Math.min(Math.max(0, g), 1);
2112
- b = Math.min(Math.max(0, b), 1);
2113
- return [r * 255, g * 255, b * 255];
2114
- };
2115
- convert.xyz.lab = function(xyz) {
2116
- let x = xyz[0];
2117
- let y = xyz[1];
2118
- let z = xyz[2];
2119
- x /= 95.047;
2120
- y /= 100;
2121
- z /= 108.883;
2122
- x = x > 8856e-6 ? x ** (1 / 3) : 7.787 * x + 16 / 116;
2123
- y = y > 8856e-6 ? y ** (1 / 3) : 7.787 * y + 16 / 116;
2124
- z = z > 8856e-6 ? z ** (1 / 3) : 7.787 * z + 16 / 116;
2125
- const l = 116 * y - 16;
2126
- const a = 500 * (x - y);
2127
- const b = 200 * (y - z);
2128
- return [l, a, b];
2129
- };
2130
- convert.lab.xyz = function(lab) {
2131
- const l = lab[0];
2132
- const a = lab[1];
2133
- const b = lab[2];
2134
- let x;
2135
- let y;
2136
- let z;
2137
- y = (l + 16) / 116;
2138
- x = a / 500 + y;
2139
- z = y - b / 200;
2140
- const y2 = y ** 3;
2141
- const x2 = x ** 3;
2142
- const z2 = z ** 3;
2143
- y = y2 > 8856e-6 ? y2 : (y - 16 / 116) / 7.787;
2144
- x = x2 > 8856e-6 ? x2 : (x - 16 / 116) / 7.787;
2145
- z = z2 > 8856e-6 ? z2 : (z - 16 / 116) / 7.787;
2146
- x *= 95.047;
2147
- y *= 100;
2148
- z *= 108.883;
2149
- return [x, y, z];
2150
- };
2151
- convert.lab.lch = function(lab) {
2152
- const l = lab[0];
2153
- const a = lab[1];
2154
- const b = lab[2];
2155
- let h;
2156
- const hr = Math.atan2(b, a);
2157
- h = hr * 360 / 2 / Math.PI;
2158
- if (h < 0) {
2159
- h += 360;
2160
- }
2161
- const c = Math.sqrt(a * a + b * b);
2162
- return [l, c, h];
2163
- };
2164
- convert.lch.lab = function(lch) {
2165
- const l = lch[0];
2166
- const c = lch[1];
2167
- const h = lch[2];
2168
- const hr = h / 360 * 2 * Math.PI;
2169
- const a = c * Math.cos(hr);
2170
- const b = c * Math.sin(hr);
2171
- return [l, a, b];
2172
- };
2173
- convert.rgb.ansi16 = function(args, saturation = null) {
2174
- const [r, g, b] = args;
2175
- let value = saturation === null ? convert.rgb.hsv(args)[2] : saturation;
2176
- value = Math.round(value / 50);
2177
- if (value === 0) {
2178
- return 30;
2179
- }
2180
- let ansi = 30 + (Math.round(b / 255) << 2 | Math.round(g / 255) << 1 | Math.round(r / 255));
2181
- if (value === 2) {
2182
- ansi += 60;
2183
- }
2184
- return ansi;
2185
- };
2186
- convert.hsv.ansi16 = function(args) {
2187
- return convert.rgb.ansi16(convert.hsv.rgb(args), args[2]);
2188
- };
2189
- convert.rgb.ansi256 = function(args) {
2190
- const r = args[0];
2191
- const g = args[1];
2192
- const b = args[2];
2193
- if (r === g && g === b) {
2194
- if (r < 8) {
2195
- return 16;
2196
- }
2197
- if (r > 248) {
2198
- return 231;
2199
- }
2200
- return Math.round((r - 8) / 247 * 24) + 232;
2201
- }
2202
- const ansi = 16 + 36 * Math.round(r / 255 * 5) + 6 * Math.round(g / 255 * 5) + Math.round(b / 255 * 5);
2203
- return ansi;
2204
- };
2205
- convert.ansi16.rgb = function(args) {
2206
- let color = args % 10;
2207
- if (color === 0 || color === 7) {
2208
- if (args > 50) {
2209
- color += 3.5;
2210
- }
2211
- color = color / 10.5 * 255;
2212
- return [color, color, color];
2213
- }
2214
- const mult = (~~(args > 50) + 1) * 0.5;
2215
- const r = (color & 1) * mult * 255;
2216
- const g = (color >> 1 & 1) * mult * 255;
2217
- const b = (color >> 2 & 1) * mult * 255;
2218
- return [r, g, b];
2219
- };
2220
- convert.ansi256.rgb = function(args) {
2221
- if (args >= 232) {
2222
- const c = (args - 232) * 10 + 8;
2223
- return [c, c, c];
2224
- }
2225
- args -= 16;
2226
- let rem;
2227
- const r = Math.floor(args / 36) / 5 * 255;
2228
- const g = Math.floor((rem = args % 36) / 6) / 5 * 255;
2229
- const b = rem % 6 / 5 * 255;
2230
- return [r, g, b];
2231
- };
2232
- convert.rgb.hex = function(args) {
2233
- const integer = ((Math.round(args[0]) & 255) << 16) + ((Math.round(args[1]) & 255) << 8) + (Math.round(args[2]) & 255);
2234
- const string = integer.toString(16).toUpperCase();
2235
- return "000000".substring(string.length) + string;
2236
- };
2237
- convert.hex.rgb = function(args) {
2238
- const match = args.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);
2239
- if (!match) {
2240
- return [0, 0, 0];
2241
- }
2242
- let colorString = match[0];
2243
- if (match[0].length === 3) {
2244
- colorString = colorString.split("").map((char) => {
2245
- return char + char;
2246
- }).join("");
2247
- }
2248
- const integer = parseInt(colorString, 16);
2249
- const r = integer >> 16 & 255;
2250
- const g = integer >> 8 & 255;
2251
- const b = integer & 255;
2252
- return [r, g, b];
2253
- };
2254
- convert.rgb.hcg = function(rgb) {
2255
- const r = rgb[0] / 255;
2256
- const g = rgb[1] / 255;
2257
- const b = rgb[2] / 255;
2258
- const max = Math.max(Math.max(r, g), b);
2259
- const min = Math.min(Math.min(r, g), b);
2260
- const chroma = max - min;
2261
- let grayscale;
2262
- let hue;
2263
- if (chroma < 1) {
2264
- grayscale = min / (1 - chroma);
2265
- } else {
2266
- grayscale = 0;
2267
- }
2268
- if (chroma <= 0) {
2269
- hue = 0;
2270
- } else if (max === r) {
2271
- hue = (g - b) / chroma % 6;
2272
- } else if (max === g) {
2273
- hue = 2 + (b - r) / chroma;
2274
- } else {
2275
- hue = 4 + (r - g) / chroma;
2276
- }
2277
- hue /= 6;
2278
- hue %= 1;
2279
- return [hue * 360, chroma * 100, grayscale * 100];
2280
- };
2281
- convert.hsl.hcg = function(hsl) {
2282
- const s = hsl[1] / 100;
2283
- const l = hsl[2] / 100;
2284
- const c = l < 0.5 ? 2 * s * l : 2 * s * (1 - l);
2285
- let f = 0;
2286
- if (c < 1) {
2287
- f = (l - 0.5 * c) / (1 - c);
2288
- }
2289
- return [hsl[0], c * 100, f * 100];
2290
- };
2291
- convert.hsv.hcg = function(hsv) {
2292
- const s = hsv[1] / 100;
2293
- const v = hsv[2] / 100;
2294
- const c = s * v;
2295
- let f = 0;
2296
- if (c < 1) {
2297
- f = (v - c) / (1 - c);
2298
- }
2299
- return [hsv[0], c * 100, f * 100];
2300
- };
2301
- convert.hcg.rgb = function(hcg) {
2302
- const h = hcg[0] / 360;
2303
- const c = hcg[1] / 100;
2304
- const g = hcg[2] / 100;
2305
- if (c === 0) {
2306
- return [g * 255, g * 255, g * 255];
2307
- }
2308
- const pure = [0, 0, 0];
2309
- const hi = h % 1 * 6;
2310
- const v = hi % 1;
2311
- const w = 1 - v;
2312
- let mg = 0;
2313
- switch (Math.floor(hi)) {
2314
- case 0:
2315
- pure[0] = 1;
2316
- pure[1] = v;
2317
- pure[2] = 0;
2318
- break;
2319
- case 1:
2320
- pure[0] = w;
2321
- pure[1] = 1;
2322
- pure[2] = 0;
2323
- break;
2324
- case 2:
2325
- pure[0] = 0;
2326
- pure[1] = 1;
2327
- pure[2] = v;
2328
- break;
2329
- case 3:
2330
- pure[0] = 0;
2331
- pure[1] = w;
2332
- pure[2] = 1;
2333
- break;
2334
- case 4:
2335
- pure[0] = v;
2336
- pure[1] = 0;
2337
- pure[2] = 1;
2338
- break;
2339
- default:
2340
- pure[0] = 1;
2341
- pure[1] = 0;
2342
- pure[2] = w;
2343
- }
2344
- mg = (1 - c) * g;
2345
- return [
2346
- (c * pure[0] + mg) * 255,
2347
- (c * pure[1] + mg) * 255,
2348
- (c * pure[2] + mg) * 255
2349
- ];
2350
- };
2351
- convert.hcg.hsv = function(hcg) {
2352
- const c = hcg[1] / 100;
2353
- const g = hcg[2] / 100;
2354
- const v = c + g * (1 - c);
2355
- let f = 0;
2356
- if (v > 0) {
2357
- f = c / v;
2358
- }
2359
- return [hcg[0], f * 100, v * 100];
2360
- };
2361
- convert.hcg.hsl = function(hcg) {
2362
- const c = hcg[1] / 100;
2363
- const g = hcg[2] / 100;
2364
- const l = g * (1 - c) + 0.5 * c;
2365
- let s = 0;
2366
- if (l > 0 && l < 0.5) {
2367
- s = c / (2 * l);
2368
- } else if (l >= 0.5 && l < 1) {
2369
- s = c / (2 * (1 - l));
2370
- }
2371
- return [hcg[0], s * 100, l * 100];
2372
- };
2373
- convert.hcg.hwb = function(hcg) {
2374
- const c = hcg[1] / 100;
2375
- const g = hcg[2] / 100;
2376
- const v = c + g * (1 - c);
2377
- return [hcg[0], (v - c) * 100, (1 - v) * 100];
2378
- };
2379
- convert.hwb.hcg = function(hwb) {
2380
- const w = hwb[1] / 100;
2381
- const b = hwb[2] / 100;
2382
- const v = 1 - b;
2383
- const c = v - w;
2384
- let g = 0;
2385
- if (c < 1) {
2386
- g = (v - c) / (1 - c);
2387
- }
2388
- return [hwb[0], c * 100, g * 100];
2389
- };
2390
- convert.apple.rgb = function(apple) {
2391
- return [apple[0] / 65535 * 255, apple[1] / 65535 * 255, apple[2] / 65535 * 255];
2392
- };
2393
- convert.rgb.apple = function(rgb) {
2394
- return [rgb[0] / 255 * 65535, rgb[1] / 255 * 65535, rgb[2] / 255 * 65535];
2395
- };
2396
- convert.gray.rgb = function(args) {
2397
- return [args[0] / 100 * 255, args[0] / 100 * 255, args[0] / 100 * 255];
2398
- };
2399
- convert.gray.hsl = function(args) {
2400
- return [0, 0, args[0]];
2401
- };
2402
- convert.gray.hsv = convert.gray.hsl;
2403
- convert.gray.hwb = function(gray) {
2404
- return [0, 100, gray[0]];
2405
- };
2406
- convert.gray.cmyk = function(gray) {
2407
- return [0, 0, 0, gray[0]];
2408
- };
2409
- convert.gray.lab = function(gray) {
2410
- return [gray[0], 0, 0];
2411
- };
2412
- convert.gray.hex = function(gray) {
2413
- const val = Math.round(gray[0] / 100 * 255) & 255;
2414
- const integer = (val << 16) + (val << 8) + val;
2415
- const string = integer.toString(16).toUpperCase();
2416
- return "000000".substring(string.length) + string;
2417
- };
2418
- convert.rgb.gray = function(rgb) {
2419
- const val = (rgb[0] + rgb[1] + rgb[2]) / 3;
2420
- return [val / 255 * 100];
2421
- };
2422
- return conversions$1;
2423
- }
2424
- var route$1;
2425
- var hasRequiredRoute$1;
2426
- function requireRoute$1() {
2427
- if (hasRequiredRoute$1)
2428
- return route$1;
2429
- hasRequiredRoute$1 = 1;
2430
- const conversions2 = requireConversions$1();
2431
- function buildGraph() {
2432
- const graph = {};
2433
- const models = Object.keys(conversions2);
2434
- for (let len = models.length, i = 0; i < len; i++) {
2435
- graph[models[i]] = {
2436
- // http://jsperf.com/1-vs-infinity
2437
- // micro-opt, but this is simple.
2438
- distance: -1,
2439
- parent: null
2440
- };
2441
- }
2442
- return graph;
2443
- }
2444
- function deriveBFS(fromModel) {
2445
- const graph = buildGraph();
2446
- const queue = [fromModel];
2447
- graph[fromModel].distance = 0;
2448
- while (queue.length) {
2449
- const current = queue.pop();
2450
- const adjacents = Object.keys(conversions2[current]);
2451
- for (let len = adjacents.length, i = 0; i < len; i++) {
2452
- const adjacent = adjacents[i];
2453
- const node = graph[adjacent];
2454
- if (node.distance === -1) {
2455
- node.distance = graph[current].distance + 1;
2456
- node.parent = current;
2457
- queue.unshift(adjacent);
2458
- }
2459
- }
2460
- }
2461
- return graph;
2462
- }
2463
- function link(from, to) {
2464
- return function(args) {
2465
- return to(from(args));
2466
- };
2467
- }
2468
- function wrapConversion(toModel, graph) {
2469
- const path = [graph[toModel].parent, toModel];
2470
- let fn = conversions2[graph[toModel].parent][toModel];
2471
- let cur = graph[toModel].parent;
2472
- while (graph[cur].parent) {
2473
- path.unshift(graph[cur].parent);
2474
- fn = link(conversions2[graph[cur].parent][cur], fn);
2475
- cur = graph[cur].parent;
2476
- }
2477
- fn.conversion = path;
2478
- return fn;
2479
- }
2480
- route$1 = function(fromModel) {
2481
- const graph = deriveBFS(fromModel);
2482
- const conversion = {};
2483
- const models = Object.keys(graph);
2484
- for (let len = models.length, i = 0; i < len; i++) {
2485
- const toModel = models[i];
2486
- const node = graph[toModel];
2487
- if (node.parent === null) {
2488
- continue;
2489
- }
2490
- conversion[toModel] = wrapConversion(toModel, graph);
2491
- }
2492
- return conversion;
2493
- };
2494
- return route$1;
2495
- }
2496
- var colorConvert$1;
2497
- var hasRequiredColorConvert$1;
2498
- function requireColorConvert$1() {
2499
- if (hasRequiredColorConvert$1)
2500
- return colorConvert$1;
2501
- hasRequiredColorConvert$1 = 1;
2502
- const conversions2 = requireConversions$1();
2503
- const route2 = requireRoute$1();
2504
- const convert = {};
2505
- const models = Object.keys(conversions2);
2506
- function wrapRaw(fn) {
2507
- const wrappedFn = function(...args) {
2508
- const arg0 = args[0];
2509
- if (arg0 === void 0 || arg0 === null) {
2510
- return arg0;
2511
- }
2512
- if (arg0.length > 1) {
2513
- args = arg0;
2514
- }
2515
- return fn(args);
2516
- };
2517
- if ("conversion" in fn) {
2518
- wrappedFn.conversion = fn.conversion;
2519
- }
2520
- return wrappedFn;
2521
- }
2522
- function wrapRounded(fn) {
2523
- const wrappedFn = function(...args) {
2524
- const arg0 = args[0];
2525
- if (arg0 === void 0 || arg0 === null) {
2526
- return arg0;
2527
- }
2528
- if (arg0.length > 1) {
2529
- args = arg0;
2530
- }
2531
- const result = fn(args);
2532
- if (typeof result === "object") {
2533
- for (let len = result.length, i = 0; i < len; i++) {
2534
- result[i] = Math.round(result[i]);
2535
- }
2536
- }
2537
- return result;
2538
- };
2539
- if ("conversion" in fn) {
2540
- wrappedFn.conversion = fn.conversion;
2541
- }
2542
- return wrappedFn;
2543
- }
2544
- models.forEach((fromModel) => {
2545
- convert[fromModel] = {};
2546
- Object.defineProperty(convert[fromModel], "channels", { value: conversions2[fromModel].channels });
2547
- Object.defineProperty(convert[fromModel], "labels", { value: conversions2[fromModel].labels });
2548
- const routes = route2(fromModel);
2549
- const routeModels = Object.keys(routes);
2550
- routeModels.forEach((toModel) => {
2551
- const fn = routes[toModel];
2552
- convert[fromModel][toModel] = wrapRounded(fn);
2553
- convert[fromModel][toModel].raw = wrapRaw(fn);
2554
- });
2555
- });
2556
- colorConvert$1 = convert;
2557
- return colorConvert$1;
2558
- }
2559
- ansiStyles$1$1.exports;
2560
- (function(module2) {
2561
- const wrapAnsi16 = (fn, offset) => (...args) => {
2562
- const code = fn(...args);
2563
- return `\x1B[${code + offset}m`;
2564
- };
2565
- const wrapAnsi256 = (fn, offset) => (...args) => {
2566
- const code = fn(...args);
2567
- return `\x1B[${38 + offset};5;${code}m`;
2568
- };
2569
- const wrapAnsi16m = (fn, offset) => (...args) => {
2570
- const rgb = fn(...args);
2571
- return `\x1B[${38 + offset};2;${rgb[0]};${rgb[1]};${rgb[2]}m`;
2572
- };
2573
- const ansi2ansi = (n) => n;
2574
- const rgb2rgb = (r, g, b) => [r, g, b];
2575
- const setLazyProperty = (object, property, get) => {
2576
- Object.defineProperty(object, property, {
2577
- get: () => {
2578
- const value = get();
2579
- Object.defineProperty(object, property, {
2580
- value,
2581
- enumerable: true,
2582
- configurable: true
2583
- });
2584
- return value;
2585
- },
2586
- enumerable: true,
2587
- configurable: true
2588
- });
2589
- };
2590
- let colorConvert2;
2591
- const makeDynamicStyles = (wrap, targetSpace, identity, isBackground) => {
2592
- if (colorConvert2 === void 0) {
2593
- colorConvert2 = requireColorConvert$1();
2594
- }
2595
- const offset = isBackground ? 10 : 0;
2596
- const styles2 = {};
2597
- for (const [sourceSpace, suite] of Object.entries(colorConvert2)) {
2598
- const name = sourceSpace === "ansi16" ? "ansi" : sourceSpace;
2599
- if (sourceSpace === targetSpace) {
2600
- styles2[name] = wrap(identity, offset);
2601
- } else if (typeof suite === "object") {
2602
- styles2[name] = wrap(suite[targetSpace], offset);
2603
- }
2604
- }
2605
- return styles2;
2606
- };
2607
- function assembleStyles() {
2608
- const codes = /* @__PURE__ */ new Map();
2609
- const styles2 = {
2610
- modifier: {
2611
- reset: [0, 0],
2612
- // 21 isn't widely supported and 22 does the same thing
2613
- bold: [1, 22],
2614
- dim: [2, 22],
2615
- italic: [3, 23],
2616
- underline: [4, 24],
2617
- inverse: [7, 27],
2618
- hidden: [8, 28],
2619
- strikethrough: [9, 29]
2620
- },
2621
- color: {
2622
- black: [30, 39],
2623
- red: [31, 39],
2624
- green: [32, 39],
2625
- yellow: [33, 39],
2626
- blue: [34, 39],
2627
- magenta: [35, 39],
2628
- cyan: [36, 39],
2629
- white: [37, 39],
2630
- // Bright color
2631
- blackBright: [90, 39],
2632
- redBright: [91, 39],
2633
- greenBright: [92, 39],
2634
- yellowBright: [93, 39],
2635
- blueBright: [94, 39],
2636
- magentaBright: [95, 39],
2637
- cyanBright: [96, 39],
2638
- whiteBright: [97, 39]
2639
- },
2640
- bgColor: {
2641
- bgBlack: [40, 49],
2642
- bgRed: [41, 49],
2643
- bgGreen: [42, 49],
2644
- bgYellow: [43, 49],
2645
- bgBlue: [44, 49],
2646
- bgMagenta: [45, 49],
2647
- bgCyan: [46, 49],
2648
- bgWhite: [47, 49],
2649
- // Bright color
2650
- bgBlackBright: [100, 49],
2651
- bgRedBright: [101, 49],
2652
- bgGreenBright: [102, 49],
2653
- bgYellowBright: [103, 49],
2654
- bgBlueBright: [104, 49],
2655
- bgMagentaBright: [105, 49],
2656
- bgCyanBright: [106, 49],
2657
- bgWhiteBright: [107, 49]
2658
- }
2659
- };
2660
- styles2.color.gray = styles2.color.blackBright;
2661
- styles2.bgColor.bgGray = styles2.bgColor.bgBlackBright;
2662
- styles2.color.grey = styles2.color.blackBright;
2663
- styles2.bgColor.bgGrey = styles2.bgColor.bgBlackBright;
2664
- for (const [groupName, group] of Object.entries(styles2)) {
2665
- for (const [styleName, style] of Object.entries(group)) {
2666
- styles2[styleName] = {
2667
- open: `\x1B[${style[0]}m`,
2668
- close: `\x1B[${style[1]}m`
2669
- };
2670
- group[styleName] = styles2[styleName];
2671
- codes.set(style[0], style[1]);
2672
- }
2673
- Object.defineProperty(styles2, groupName, {
2674
- value: group,
2675
- enumerable: false
2676
- });
2677
- }
2678
- Object.defineProperty(styles2, "codes", {
2679
- value: codes,
2680
- enumerable: false
2681
- });
2682
- styles2.color.close = "\x1B[39m";
2683
- styles2.bgColor.close = "\x1B[49m";
2684
- setLazyProperty(styles2.color, "ansi", () => makeDynamicStyles(wrapAnsi16, "ansi16", ansi2ansi, false));
2685
- setLazyProperty(styles2.color, "ansi256", () => makeDynamicStyles(wrapAnsi256, "ansi256", ansi2ansi, false));
2686
- setLazyProperty(styles2.color, "ansi16m", () => makeDynamicStyles(wrapAnsi16m, "rgb", rgb2rgb, false));
2687
- setLazyProperty(styles2.bgColor, "ansi", () => makeDynamicStyles(wrapAnsi16, "ansi16", ansi2ansi, true));
2688
- setLazyProperty(styles2.bgColor, "ansi256", () => makeDynamicStyles(wrapAnsi256, "ansi256", ansi2ansi, true));
2689
- setLazyProperty(styles2.bgColor, "ansi16m", () => makeDynamicStyles(wrapAnsi16m, "rgb", rgb2rgb, true));
2690
- return styles2;
2691
- }
2692
- Object.defineProperty(module2, "exports", {
2693
- enumerable: true,
2694
- get: assembleStyles
2695
- });
2696
- })(ansiStyles$1$1);
2697
- var ansiStylesExports$1 = ansiStyles$1$1.exports;
2698
- var browser$1 = {
2699
- stdout: false,
2700
- stderr: false
2701
- };
2702
- const stringReplaceAll$1$1 = (string, substring, replacer) => {
2703
- let index = string.indexOf(substring);
2704
- if (index === -1) {
2705
- return string;
2706
- }
2707
- const substringLength = substring.length;
2708
- let endIndex = 0;
2709
- let returnValue = "";
2710
- do {
2711
- returnValue += string.substr(endIndex, index - endIndex) + substring + replacer;
2712
- endIndex = index + substringLength;
2713
- index = string.indexOf(substring, endIndex);
2714
- } while (index !== -1);
2715
- returnValue += string.substr(endIndex);
2716
- return returnValue;
2717
- };
2718
- const stringEncaseCRLFWithFirstIndex$1$1 = (string, prefix, postfix, index) => {
2719
- let endIndex = 0;
2720
- let returnValue = "";
2721
- do {
2722
- const gotCR = string[index - 1] === "\r";
2723
- returnValue += string.substr(endIndex, (gotCR ? index - 1 : index) - endIndex) + prefix + (gotCR ? "\r\n" : "\n") + postfix;
2724
- endIndex = index + 1;
2725
- index = string.indexOf("\n", endIndex);
2726
- } while (index !== -1);
2727
- returnValue += string.substr(endIndex);
2728
- return returnValue;
2729
- };
2730
- var util$1 = {
2731
- stringReplaceAll: stringReplaceAll$1$1,
2732
- stringEncaseCRLFWithFirstIndex: stringEncaseCRLFWithFirstIndex$1$1
2733
- };
2734
- var templates$1;
2735
- var hasRequiredTemplates$1;
2736
- function requireTemplates$1() {
2737
- if (hasRequiredTemplates$1)
2738
- return templates$1;
2739
- hasRequiredTemplates$1 = 1;
2740
- const TEMPLATE_REGEX = /(?:\\(u(?:[a-f\d]{4}|\{[a-f\d]{1,6}\})|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi;
2741
- const STYLE_REGEX = /(?:^|\.)(\w+)(?:\(([^)]*)\))?/g;
2742
- const STRING_REGEX = /^(['"])((?:\\.|(?!\1)[^\\])*)\1$/;
2743
- const ESCAPE_REGEX = /\\(u(?:[a-f\d]{4}|{[a-f\d]{1,6}})|x[a-f\d]{2}|.)|([^\\])/gi;
2744
- const ESCAPES = /* @__PURE__ */ new Map([
2745
- ["n", "\n"],
2746
- ["r", "\r"],
2747
- ["t", " "],
2748
- ["b", "\b"],
2749
- ["f", "\f"],
2750
- ["v", "\v"],
2751
- ["0", "\0"],
2752
- ["\\", "\\"],
2753
- ["e", "\x1B"],
2754
- ["a", "\x07"]
2755
- ]);
2756
- function unescape(c) {
2757
- const u = c[0] === "u";
2758
- const bracket = c[1] === "{";
2759
- if (u && !bracket && c.length === 5 || c[0] === "x" && c.length === 3) {
2760
- return String.fromCharCode(parseInt(c.slice(1), 16));
2761
- }
2762
- if (u && bracket) {
2763
- return String.fromCodePoint(parseInt(c.slice(2, -1), 16));
2764
- }
2765
- return ESCAPES.get(c) || c;
2766
- }
2767
- function parseArguments(name, arguments_) {
2768
- const results = [];
2769
- const chunks = arguments_.trim().split(/\s*,\s*/g);
2770
- let matches;
2771
- for (const chunk of chunks) {
2772
- const number = Number(chunk);
2773
- if (!Number.isNaN(number)) {
2774
- results.push(number);
2775
- } else if (matches = chunk.match(STRING_REGEX)) {
2776
- results.push(matches[2].replace(ESCAPE_REGEX, (m, escape2, character) => escape2 ? unescape(escape2) : character));
2777
- } else {
2778
- throw new Error(`Invalid Chalk template style argument: ${chunk} (in style '${name}')`);
2779
- }
2780
- }
2781
- return results;
2782
- }
2783
- function parseStyle(style) {
2784
- STYLE_REGEX.lastIndex = 0;
2785
- const results = [];
2786
- let matches;
2787
- while ((matches = STYLE_REGEX.exec(style)) !== null) {
2788
- const name = matches[1];
2789
- if (matches[2]) {
2790
- const args = parseArguments(name, matches[2]);
2791
- results.push([name].concat(args));
2792
- } else {
2793
- results.push([name]);
2794
- }
2795
- }
2796
- return results;
2797
- }
2798
- function buildStyle(chalk2, styles2) {
2799
- const enabled = {};
2800
- for (const layer of styles2) {
2801
- for (const style of layer.styles) {
2802
- enabled[style[0]] = layer.inverse ? null : style.slice(1);
2803
- }
2804
- }
2805
- let current = chalk2;
2806
- for (const [styleName, styles3] of Object.entries(enabled)) {
2807
- if (!Array.isArray(styles3)) {
2808
- continue;
2809
- }
2810
- if (!(styleName in current)) {
2811
- throw new Error(`Unknown Chalk style: ${styleName}`);
2812
- }
2813
- current = styles3.length > 0 ? current[styleName](...styles3) : current[styleName];
2814
- }
2815
- return current;
2816
- }
2817
- templates$1 = (chalk2, temporary) => {
2818
- const styles2 = [];
2819
- const chunks = [];
2820
- let chunk = [];
2821
- temporary.replace(TEMPLATE_REGEX, (m, escapeCharacter, inverse, style, close, character) => {
2822
- if (escapeCharacter) {
2823
- chunk.push(unescape(escapeCharacter));
2824
- } else if (style) {
2825
- const string = chunk.join("");
2826
- chunk = [];
2827
- chunks.push(styles2.length === 0 ? string : buildStyle(chalk2, styles2)(string));
2828
- styles2.push({ inverse, styles: parseStyle(style) });
2829
- } else if (close) {
2830
- if (styles2.length === 0) {
2831
- throw new Error("Found extraneous } in Chalk template literal");
2832
- }
2833
- chunks.push(buildStyle(chalk2, styles2)(chunk.join("")));
2834
- chunk = [];
2835
- styles2.pop();
2836
- } else {
2837
- chunk.push(character);
2838
- }
2839
- });
2840
- chunks.push(chunk.join(""));
2841
- if (styles2.length > 0) {
2842
- const errMessage = `Chalk template literal is missing ${styles2.length} closing bracket${styles2.length === 1 ? "" : "s"} (\`}\`)`;
2843
- throw new Error(errMessage);
2844
- }
2845
- return chunks.join("");
2846
- };
2847
- return templates$1;
2848
- }
2849
- const ansiStyles$2 = ansiStylesExports$1;
2850
- const { stdout: stdoutColor$1, stderr: stderrColor$1 } = browser$1;
2851
- const {
2852
- stringReplaceAll: stringReplaceAll$2,
2853
- stringEncaseCRLFWithFirstIndex: stringEncaseCRLFWithFirstIndex$2
2854
- } = util$1;
2855
- const { isArray: isArray$1 } = Array;
2856
- const levelMapping$1 = [
2857
- "ansi",
2858
- "ansi",
2859
- "ansi256",
2860
- "ansi16m"
2861
- ];
2862
- const styles$1 = /* @__PURE__ */ Object.create(null);
2863
- const applyOptions$1 = (object, options = {}) => {
2864
- if (options.level && !(Number.isInteger(options.level) && options.level >= 0 && options.level <= 3)) {
2865
- throw new Error("The `level` option should be an integer from 0 to 3");
2866
- }
2867
- const colorLevel = stdoutColor$1 ? stdoutColor$1.level : 0;
2868
- object.level = options.level === void 0 ? colorLevel : options.level;
2869
- };
2870
- let ChalkClass$1 = class ChalkClass {
2871
- constructor(options) {
2872
- return chalkFactory$1(options);
2873
- }
2874
- };
2875
- const chalkFactory$1 = (options) => {
2876
- const chalk2 = {};
2877
- applyOptions$1(chalk2, options);
2878
- chalk2.template = (...arguments_) => chalkTag$1(chalk2.template, ...arguments_);
2879
- Object.setPrototypeOf(chalk2, Chalk$1.prototype);
2880
- Object.setPrototypeOf(chalk2.template, chalk2);
2881
- chalk2.template.constructor = () => {
2882
- throw new Error("`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.");
2883
- };
2884
- chalk2.template.Instance = ChalkClass$1;
2885
- return chalk2.template;
2886
- };
2887
- function Chalk$1(options) {
2888
- return chalkFactory$1(options);
2889
- }
2890
- for (const [styleName, style] of Object.entries(ansiStyles$2)) {
2891
- styles$1[styleName] = {
2892
- get() {
2893
- const builder = createBuilder$1(this, createStyler$1(style.open, style.close, this._styler), this._isEmpty);
2894
- Object.defineProperty(this, styleName, { value: builder });
2895
- return builder;
2896
- }
2897
- };
2898
- }
2899
- styles$1.visible = {
2900
- get() {
2901
- const builder = createBuilder$1(this, this._styler, true);
2902
- Object.defineProperty(this, "visible", { value: builder });
2903
- return builder;
2904
- }
2905
- };
2906
- const usedModels$1 = ["rgb", "hex", "keyword", "hsl", "hsv", "hwb", "ansi", "ansi256"];
2907
- for (const model of usedModels$1) {
2908
- styles$1[model] = {
2909
- get() {
2910
- const { level } = this;
2911
- return function(...arguments_) {
2912
- const styler = createStyler$1(ansiStyles$2.color[levelMapping$1[level]][model](...arguments_), ansiStyles$2.color.close, this._styler);
2913
- return createBuilder$1(this, styler, this._isEmpty);
2914
- };
2915
- }
2916
- };
2917
- }
2918
- for (const model of usedModels$1) {
2919
- const bgModel = "bg" + model[0].toUpperCase() + model.slice(1);
2920
- styles$1[bgModel] = {
2921
- get() {
2922
- const { level } = this;
2923
- return function(...arguments_) {
2924
- const styler = createStyler$1(ansiStyles$2.bgColor[levelMapping$1[level]][model](...arguments_), ansiStyles$2.bgColor.close, this._styler);
2925
- return createBuilder$1(this, styler, this._isEmpty);
2926
- };
2927
- }
2928
- };
2929
- }
2930
- const proto$1 = Object.defineProperties(() => {
2931
- }, {
2932
- ...styles$1,
2933
- level: {
2934
- enumerable: true,
2935
- get() {
2936
- return this._generator.level;
2937
- },
2938
- set(level) {
2939
- this._generator.level = level;
2940
- }
2941
- }
2942
- });
2943
- const createStyler$1 = (open, close, parent) => {
2944
- let openAll;
2945
- let closeAll;
2946
- if (parent === void 0) {
2947
- openAll = open;
2948
- closeAll = close;
2949
- } else {
2950
- openAll = parent.openAll + open;
2951
- closeAll = close + parent.closeAll;
2952
- }
2953
- return {
2954
- open,
2955
- close,
2956
- openAll,
2957
- closeAll,
2958
- parent
2959
- };
2960
- };
2961
- const createBuilder$1 = (self2, _styler, _isEmpty) => {
2962
- const builder = (...arguments_) => {
2963
- if (isArray$1(arguments_[0]) && isArray$1(arguments_[0].raw)) {
2964
- return applyStyle$1(builder, chalkTag$1(builder, ...arguments_));
2965
- }
2966
- return applyStyle$1(builder, arguments_.length === 1 ? "" + arguments_[0] : arguments_.join(" "));
2967
- };
2968
- Object.setPrototypeOf(builder, proto$1);
2969
- builder._generator = self2;
2970
- builder._styler = _styler;
2971
- builder._isEmpty = _isEmpty;
2972
- return builder;
2973
- };
2974
- const applyStyle$1 = (self2, string) => {
2975
- if (self2.level <= 0 || !string) {
2976
- return self2._isEmpty ? "" : string;
2977
- }
2978
- let styler = self2._styler;
2979
- if (styler === void 0) {
2980
- return string;
2981
- }
2982
- const { openAll, closeAll } = styler;
2983
- if (string.indexOf("\x1B") !== -1) {
2984
- while (styler !== void 0) {
2985
- string = stringReplaceAll$2(string, styler.close, styler.open);
2986
- styler = styler.parent;
2987
- }
2988
- }
2989
- const lfIndex = string.indexOf("\n");
2990
- if (lfIndex !== -1) {
2991
- string = stringEncaseCRLFWithFirstIndex$2(string, closeAll, openAll, lfIndex);
2992
- }
2993
- return openAll + string + closeAll;
2994
- };
2995
- let template$1;
2996
- const chalkTag$1 = (chalk2, ...strings) => {
2997
- const [firstString] = strings;
2998
- if (!isArray$1(firstString) || !isArray$1(firstString.raw)) {
2999
- return strings.join(" ");
3000
- }
3001
- const arguments_ = strings.slice(1);
3002
- const parts = [firstString.raw[0]];
3003
- for (let i = 1; i < firstString.length; i++) {
3004
- parts.push(
3005
- String(arguments_[i - 1]).replace(/[{}\\]/g, "\\$&"),
3006
- String(firstString.raw[i])
3007
- );
3008
- }
3009
- if (template$1 === void 0) {
3010
- template$1 = requireTemplates$1();
3011
- }
3012
- return template$1(chalk2, parts.join(""));
3013
- };
3014
- Object.defineProperties(Chalk$1.prototype, styles$1);
3015
- const chalk$2 = Chalk$1();
3016
- chalk$2.supportsColor = stdoutColor$1;
3017
- chalk$2.stderr = Chalk$1({ level: stderrColor$1 ? stderrColor$1.level : 0 });
3018
- chalk$2.stderr.supportsColor = stderrColor$1;
3019
- const STSInstrumentControllerPluginKey = Symbol("instrumentController");
3020
- const GetSTSInstrumentControllerPluginKey = () => STSInstrumentControllerPluginKey;
3021
- const GetSTSInstrumentController = (app) => {
3022
- return app.config.globalProperties.$sts[STSInstrumentControllerPluginKey];
3023
- };
3024
- new TextEncoder();
3025
- new TextDecoder();
3026
- var ExtData = (
3027
- /** @class */
3028
- /* @__PURE__ */ function() {
3029
- function ExtData2(type, data) {
3030
- this.type = type;
3031
- this.data = data;
3032
- }
3033
- return ExtData2;
3034
- }()
3035
- );
3036
- var __extends = /* @__PURE__ */ function() {
3037
- var extendStatics = function(d, b) {
3038
- extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) {
3039
- d2.__proto__ = b2;
3040
- } || function(d2, b2) {
3041
- for (var p in b2)
3042
- if (Object.prototype.hasOwnProperty.call(b2, p))
3043
- d2[p] = b2[p];
3044
- };
3045
- return extendStatics(d, b);
3046
- };
3047
- return function(d, b) {
3048
- if (typeof b !== "function" && b !== null)
3049
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
3050
- extendStatics(d, b);
3051
- function __() {
3052
- this.constructor = d;
3053
- }
3054
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
3055
- };
3056
- }();
3057
- var DecodeError = (
3058
- /** @class */
3059
- function(_super) {
3060
- __extends(DecodeError2, _super);
3061
- function DecodeError2(message) {
3062
- var _this = _super.call(this, message) || this;
3063
- var proto2 = Object.create(DecodeError2.prototype);
3064
- Object.setPrototypeOf(_this, proto2);
3065
- Object.defineProperty(_this, "name", {
3066
- configurable: true,
3067
- enumerable: false,
3068
- value: DecodeError2.name
3069
- });
3070
- return _this;
3071
- }
3072
- return DecodeError2;
3073
- }(Error)
3074
- );
3075
- function setInt64(view, offset, value) {
3076
- var high = Math.floor(value / 4294967296);
3077
- var low = value;
3078
- view.setUint32(offset, high);
3079
- view.setUint32(offset + 4, low);
3080
- }
3081
- function getInt64(view, offset) {
3082
- var high = view.getInt32(offset);
3083
- var low = view.getUint32(offset + 4);
3084
- return high * 4294967296 + low;
3085
- }
3086
- var EXT_TIMESTAMP = -1;
3087
- var TIMESTAMP32_MAX_SEC = 4294967296 - 1;
3088
- var TIMESTAMP64_MAX_SEC = 17179869184 - 1;
3089
- function encodeTimeSpecToTimestamp(_a2) {
3090
- var sec = _a2.sec, nsec = _a2.nsec;
3091
- if (sec >= 0 && nsec >= 0 && sec <= TIMESTAMP64_MAX_SEC) {
3092
- if (nsec === 0 && sec <= TIMESTAMP32_MAX_SEC) {
3093
- var rv = new Uint8Array(4);
3094
- var view = new DataView(rv.buffer);
3095
- view.setUint32(0, sec);
3096
- return rv;
3097
- } else {
3098
- var secHigh = sec / 4294967296;
3099
- var secLow = sec & 4294967295;
3100
- var rv = new Uint8Array(8);
3101
- var view = new DataView(rv.buffer);
3102
- view.setUint32(0, nsec << 2 | secHigh & 3);
3103
- view.setUint32(4, secLow);
3104
- return rv;
3105
- }
3106
- } else {
3107
- var rv = new Uint8Array(12);
3108
- var view = new DataView(rv.buffer);
3109
- view.setUint32(0, nsec);
3110
- setInt64(view, 4, sec);
3111
- return rv;
3112
- }
3113
- }
3114
- function encodeDateToTimeSpec(date) {
3115
- var msec = date.getTime();
3116
- var sec = Math.floor(msec / 1e3);
3117
- var nsec = (msec - sec * 1e3) * 1e6;
3118
- var nsecInSec = Math.floor(nsec / 1e9);
3119
- return {
3120
- sec: sec + nsecInSec,
3121
- nsec: nsec - nsecInSec * 1e9
3122
- };
3123
- }
3124
- function encodeTimestampExtension(object) {
3125
- if (object instanceof Date) {
3126
- var timeSpec = encodeDateToTimeSpec(object);
3127
- return encodeTimeSpecToTimestamp(timeSpec);
3128
- } else {
3129
- return null;
3130
- }
3131
- }
3132
- function decodeTimestampToTimeSpec(data) {
3133
- var view = new DataView(data.buffer, data.byteOffset, data.byteLength);
3134
- switch (data.byteLength) {
3135
- case 4: {
3136
- var sec = view.getUint32(0);
3137
- var nsec = 0;
3138
- return { sec, nsec };
3139
- }
3140
- case 8: {
3141
- var nsec30AndSecHigh2 = view.getUint32(0);
3142
- var secLow32 = view.getUint32(4);
3143
- var sec = (nsec30AndSecHigh2 & 3) * 4294967296 + secLow32;
3144
- var nsec = nsec30AndSecHigh2 >>> 2;
3145
- return { sec, nsec };
3146
- }
3147
- case 12: {
3148
- var sec = getInt64(view, 4);
3149
- var nsec = view.getUint32(0);
3150
- return { sec, nsec };
3151
- }
3152
- default:
3153
- throw new DecodeError("Unrecognized data size for timestamp (expected 4, 8, or 12): ".concat(data.length));
3154
- }
3155
- }
3156
- function decodeTimestampExtension(data) {
3157
- var timeSpec = decodeTimestampToTimeSpec(data);
3158
- return new Date(timeSpec.sec * 1e3 + timeSpec.nsec / 1e6);
3159
- }
3160
- var timestampExtension = {
3161
- type: EXT_TIMESTAMP,
3162
- encode: encodeTimestampExtension,
3163
- decode: decodeTimestampExtension
3164
- };
3165
- /** @class */
3166
- (function() {
3167
- function ExtensionCodec2() {
3168
- this.builtInEncoders = [];
3169
- this.builtInDecoders = [];
3170
- this.encoders = [];
3171
- this.decoders = [];
3172
- this.register(timestampExtension);
3173
- }
3174
- ExtensionCodec2.prototype.register = function(_a2) {
3175
- var type = _a2.type, encode2 = _a2.encode, decode = _a2.decode;
3176
- if (type >= 0) {
3177
- this.encoders[type] = encode2;
3178
- this.decoders[type] = decode;
3179
- } else {
3180
- var index = 1 + type;
3181
- this.builtInEncoders[index] = encode2;
3182
- this.builtInDecoders[index] = decode;
3183
- }
3184
- };
3185
- ExtensionCodec2.prototype.tryToEncode = function(object, context) {
3186
- for (var i = 0; i < this.builtInEncoders.length; i++) {
3187
- var encodeExt = this.builtInEncoders[i];
3188
- if (encodeExt != null) {
3189
- var data = encodeExt(object, context);
3190
- if (data != null) {
3191
- var type = -1 - i;
3192
- return new ExtData(type, data);
3193
- }
3194
- }
3195
- }
3196
- for (var i = 0; i < this.encoders.length; i++) {
3197
- var encodeExt = this.encoders[i];
3198
- if (encodeExt != null) {
3199
- var data = encodeExt(object, context);
3200
- if (data != null) {
3201
- var type = i;
3202
- return new ExtData(type, data);
3203
- }
3204
- }
3205
- }
3206
- if (object instanceof ExtData) {
3207
- return object;
3208
- }
3209
- return null;
3210
- };
3211
- ExtensionCodec2.prototype.decode = function(data, type, context) {
3212
- var decodeExt = type < 0 ? this.builtInDecoders[-1 - type] : this.decoders[type];
3213
- if (decodeExt) {
3214
- return decodeExt(data, type, context);
3215
- } else {
3216
- return new ExtData(type, data);
3217
- }
3218
- };
3219
- ExtensionCodec2.defaultCodec = new ExtensionCodec2();
3220
- return ExtensionCodec2;
3221
- })();
3222
- var SubscriptionTopic = /* @__PURE__ */ ((SubscriptionTopic2) => {
3223
- SubscriptionTopic2["AllServicesCombined"] = "AllServicesCombined";
3224
- SubscriptionTopic2["Services"] = "Services";
3225
- SubscriptionTopic2["ServiceInstances"] = "ServiceInstances";
3226
- SubscriptionTopic2["ServiceInstance"] = "ServiceInstance";
3227
- SubscriptionTopic2["AllAgentsCombined"] = "AllAgentsCombined";
3228
- SubscriptionTopic2["Agents"] = "Agents";
3229
- SubscriptionTopic2["AgentWorkers"] = "AgentWorkers";
3230
- SubscriptionTopic2["AgentWorker"] = "AgentWorker";
3231
- SubscriptionTopic2["AllLambdasCombined"] = "AllLambdasCombined";
3232
- SubscriptionTopic2["LambdaTechnologies"] = "LambdaTechnologies";
3233
- SubscriptionTopic2["LambdaSubTechnologies"] = "LambdaSubTechnologies";
3234
- SubscriptionTopic2["LambdaSubTechnologiesInstance"] = "LambdaSubTechnologiesInstance";
3235
- SubscriptionTopic2["LogProcessing"] = "LogProcessing";
3236
- return SubscriptionTopic2;
3237
- })(SubscriptionTopic || {});
3238
- const instrumentationObservationInterval = 1e3;
3239
- const instrumentationTimeWindow = 600;
3240
- const consoleLogging = true;
3241
- const instrumentLogging = true;
3242
- const globalServiceDefinitions = {
3243
- coreFieldList: [
3244
- { fieldName: "requestCount", gauge: Gauge.REQUEST_COUNT_GAUGE, instrumentProperty: "val", dataType: "number", influxdbDataType: "intField", gaugeType: GaugeTypes.INSTRUMENT_GAUGE },
3245
- { fieldName: "errorCount", gauge: Gauge.ERROR_COUNT_GAUGE, instrumentProperty: "val", dataType: "number", influxdbDataType: "intField", gaugeType: GaugeTypes.INSTRUMENT_GAUGE },
3246
- { fieldName: "retryCount", gauge: Gauge.RETRY_COUNT_GAUGE, instrumentProperty: "val", dataType: "number", influxdbDataType: "intField", gaugeType: GaugeTypes.INSTRUMENT_GAUGE },
3247
- { fieldName: "authenticationCount", gauge: Gauge.AUTHENTICATION_COUNT_GAUGE, instrumentProperty: "val", dataType: "number", influxdbDataType: "intField", gaugeType: GaugeTypes.INSTRUMENT_GAUGE },
3248
- { fieldName: "authenticationErrorCount", gauge: Gauge.AUTHENTICATION_ERROR_COUNT_GAUGE, instrumentProperty: "val", dataType: "number", influxdbDataType: "intField", gaugeType: GaugeTypes.INSTRUMENT_GAUGE },
3249
- { fieldName: "authenticationRetryCount", gauge: Gauge.AUTHENTICATION_RETRY_COUNT_GAUGE, instrumentProperty: "val", dataType: "number", influxdbDataType: "intField", gaugeType: GaugeTypes.INSTRUMENT_GAUGE },
3250
- { fieldName: "velocity", gauge: Gauge.VELOCITY_GAUGE, instrumentProperty: "va", dataType: "number", influxdbDataType: "floatField", gaugeType: GaugeTypes.INSTRUMENT_VELOCITY },
3251
- {
3252
- fieldName: "activeRequestCount",
3253
- gauge: Gauge.ACTIVE_REQUEST_GAUGE,
3254
- instrumentProperty: "val",
3255
- dataType: "number",
3256
- timeSeriesIndex: true,
3257
- quantile: true,
3258
- influxdbDataType: "intField",
3259
- gaugeType: GaugeTypes.INSTRUMENT_GAUGE,
3260
- instrumentOptions: {
3261
- interval: instrumentationObservationInterval,
3262
- sampleSize: instrumentationTimeWindow
3263
- }
3264
- },
3265
- { fieldName: "coreCount", gauge: Gauge.CORE_COUNT_GAUGE, instrumentProperty: "val", dataType: "number", influxdbDataType: "intField", gaugeType: GaugeTypes.INSTRUMENT_GAUGE },
3266
- { fieldName: "rx", gauge: Gauge.NETWORK_RX_GAUGE, instrumentProperty: "va", dataType: "number", influxdbDataType: "floatField", gaugeType: GaugeTypes.INSTRUMENT_VELOCITY },
3267
- { fieldName: "tx", gauge: Gauge.NETWORK_TX_GAUGE, instrumentProperty: "va", dataType: "number", influxdbDataType: "floatField", gaugeType: GaugeTypes.INSTRUMENT_VELOCITY },
3268
- { fieldName: "timer", gauge: Gauge.TIMER_GAUGE, instrumentProperty: "val", dataType: "number", influxdbDataType: "floatField", gaugeType: GaugeTypes.INSTRUMENT_TIMER },
3269
- {
3270
- fieldName: "duration",
3271
- gauge: Gauge.DURATION_GAUGE,
3272
- instrumentProperty: "val",
3273
- dataType: "number",
3274
- timeSeriesIndex: true,
3275
- quantile: true,
3276
- influxdbDataType: "floatField",
3277
- gaugeType: GaugeTypes.INSTRUMENT_GAUGE,
3278
- instrumentOptions: {
3279
- interval: instrumentationObservationInterval,
3280
- sampleSize: instrumentationTimeWindow
3281
- },
3282
- histo: [
3283
- { label: "B10", bucketLimit: 10 },
3284
- { label: "B20", bucketLimit: 20 },
3285
- { label: "B50", bucketLimit: 50 },
3286
- { label: "B100", bucketLimit: 100 },
3287
- { label: "B1000", bucketLimit: 1e3 },
3288
- { label: "B50000", bucketLimit: 5e4 },
3289
- { label: "BInfinity", bucketLimit: -1 }
3290
- ],
3291
- histoGauge: Gauge.DURATION_HISTOGRAM_GAUGE
3292
- },
3293
- {
3294
- fieldName: "latency",
3295
- gauge: Gauge.LATENCY_GAUGE,
3296
- instrumentProperty: "val",
3297
- dataType: "number",
3298
- timeSeriesIndex: true,
3299
- quantile: true,
3300
- influxdbDataType: "floatField",
3301
- gaugeType: GaugeTypes.INSTRUMENT_GAUGE,
3302
- instrumentOptions: {
3303
- interval: instrumentationObservationInterval,
3304
- sampleSize: instrumentationTimeWindow
3305
- },
3306
- histo: [
3307
- { label: "B10", bucketLimit: 10 },
3308
- { label: "B20", bucketLimit: 20 },
3309
- { label: "B50", bucketLimit: 50 },
3310
- { label: "B100", bucketLimit: 100 },
3311
- { label: "B1000", bucketLimit: 1e3 },
3312
- { label: "B50000", bucketLimit: 5e4 },
3313
- { label: "BInfinity", bucketLimit: -1 }
3314
- ],
3315
- histoGauge: Gauge.LATENCY_HISTOGRAM_GAUGE
3316
- }
3317
- ],
3318
- logFieldList: [
3319
- {
3320
- fieldName: "log",
3321
- gauge: Gauge.LOGGER,
3322
- instrumentProperty: "val",
3323
- dataType: "string",
3324
- timeSeriesIndex: false,
3325
- quantile: false,
3326
- influxdbDataType: "stringField",
3327
- gaugeType: GaugeTypes.INSTRUMENT_LOG,
3328
- instrumentOptions: {
3329
- consoleLogging,
3330
- instrumentLogging
3331
- }
3332
- }
3333
- ],
3334
- services: {
3335
- ["service"]: {
3336
- influxDBContextTags: [
3337
- "serviceId",
3338
- "serviceName",
3339
- "serviceVersion",
3340
- "serviceInstanceId",
3341
- "serviceInstanceProcessId",
3342
- "hostName",
3343
- "pid",
3344
- "ppid"
3345
- ],
3346
- redisIndexPrefixDefinitions: {
3347
- timeSeriesIndex: "idx:serviceIndexTimeSeries",
3348
- timeSeriesPrefix: "/serviceTimeSeries:",
3349
- instantIndex: "idx:serviceIndexInstant",
3350
- instantPrefix: "/serviceInstant:"
3351
- },
3352
- fieldList: [
3353
- {
3354
- fieldName: "cpu",
3355
- gauge: Gauge.CPU_LOAD_GAUGE,
3356
- instrumentProperty: "val",
3357
- dataType: "number",
3358
- timeSeriesIndex: true,
3359
- quantile: true,
3360
- influxdbDataType: "floatField",
3361
- gaugeType: GaugeTypes.INSTRUMENT_GAUGE,
3362
- instrumentOptions: {
3363
- interval: instrumentationObservationInterval,
3364
- sampleSize: instrumentationTimeWindow
3365
- }
3366
- },
3367
- {
3368
- fieldName: "connectionCount",
3369
- gauge: Gauge.CONNECTION_COUNT_GAUGE,
3370
- instrumentProperty: "val",
3371
- dataType: "number",
3372
- timeSeriesIndex: true,
3373
- quantile: true,
3374
- influxdbDataType: "intField",
3375
- gaugeType: GaugeTypes.INSTRUMENT_GAUGE,
3376
- instrumentOptions: {
3377
- interval: instrumentationObservationInterval,
3378
- sampleSize: instrumentationTimeWindow
3379
- }
3380
- },
3381
- { fieldName: "connectionPoolCount", gauge: Gauge.CONNECTION_POOL_TOTAL_GAUGE, instrumentProperty: "val", dataType: "number", influxdbDataType: "intField", gaugeType: GaugeTypes.INSTRUMENT_GAUGE },
3382
- { fieldName: "connectionIdleCount", gauge: Gauge.CONNECTION_POOL_IDLE_GAUGE, instrumentProperty: "val", dataType: "number", influxdbDataType: "intField", gaugeType: GaugeTypes.INSTRUMENT_GAUGE },
3383
- { fieldName: "connectionWaitingCount", gauge: Gauge.CONNECTION_POOL_WAITING_GAUGE, instrumentProperty: "val", dataType: "number", influxdbDataType: "intField", gaugeType: GaugeTypes.INSTRUMENT_GAUGE },
3384
- { fieldName: "systemcpu", gauge: Gauge.CPU_SYSTEM_LOAD_GAUGE, instrumentProperty: "val", dataType: "number", timeSeriesIndex: true, quantile: true, influxdbDataType: "floatField", gaugeType: GaugeTypes.INSTRUMENT_GAUGE },
3385
- {
3386
- fieldName: "memory",
3387
- gauge: Gauge.OBJECT_GAUGE,
3388
- instrumentProperty: "val",
3389
- dataType: "JSON",
3390
- influxdbDataType: "stringField",
3391
- gaugeType: GaugeTypes.INSTRUMENT_OBJECT,
3392
- instrumentOptions: {
3393
- label: "InstrumentObjectMaster"
3394
- }
3395
- }
3396
- ],
3397
- GetPathFromContext(context) {
3398
- const { serviceId, serviceInstanceId, serviceInstanceProcessId } = context;
3399
- return `/${serviceId}/${serviceInstanceId}/${serviceInstanceProcessId}`;
3400
- },
3401
- redisQueryFilters: {
3402
- level1ContextField: "serviceType",
3403
- level2ContextField: "appid",
3404
- level3ContextField: "appinstanceid"
3405
- },
3406
- subscriptionTopics: [
3407
- {
3408
- subscriptionTopic: SubscriptionTopic.AllServicesCombined,
3409
- route: "/metrics"
3410
- },
3411
- {
3412
- subscriptionTopic: SubscriptionTopic.Services,
3413
- route: "/metrics/services"
3414
- },
3415
- {
3416
- subscriptionTopic: SubscriptionTopic.ServiceInstances,
3417
- route: "/metrics/services/:key"
3418
- },
3419
- {
3420
- subscriptionTopic: SubscriptionTopic.ServiceInstance,
3421
- route: "/metrics/services/:key/:subkey"
3422
- }
3423
- ]
3424
- },
3425
- ["agent"]: {
3426
- influxDBContextTags: [
3427
- "id",
3428
- "hostName",
3429
- "agentName",
3430
- "threadId",
3431
- "asyncRunnerId"
3432
- ],
3433
- redisIndexPrefixDefinitions: {
3434
- timeSeriesIndex: "idx:agentIndexTimeSeries",
3435
- timeSeriesPrefix: "/agentTimeSeries:",
3436
- instantIndex: "idx:agentIndexInstant",
3437
- instantPrefix: "/agentInstant:"
3438
- },
3439
- fieldList: [
3440
- { fieldName: "childCount", gauge: Gauge.CHILD_COUNT, instrumentProperty: "val", dataType: "number", influxdbDataType: "intField", gaugeType: GaugeTypes.INSTRUMENT_GAUGE }
3441
- ],
3442
- //@@ need type declare in appframework ?? agent does not use appframework ... perhaps stspublisher
3443
- GetPathFromContext(context) {
3444
- const { agentName, threadId, asyncRunnerId } = context;
3445
- return `/${agentName}/${threadId}/${asyncRunnerId}`;
3446
- },
3447
- redisQueryFilters: {
3448
- level1ContextField: "serviceType",
3449
- level2ContextField: "appid",
3450
- //@@ this should be named something else
3451
- level3ContextField: "appinstanceid"
3452
- //@@ this should be named something else
3453
- },
3454
- subscriptionTopics: [
3455
- {
3456
- subscriptionTopic: SubscriptionTopic.AllAgentsCombined,
3457
- route: "/metrics"
3458
- },
3459
- {
3460
- subscriptionTopic: SubscriptionTopic.Agents,
3461
- route: "/metrics/agents"
3462
- },
3463
- {
3464
- subscriptionTopic: SubscriptionTopic.AgentWorkers,
3465
- route: "/metrics/agents/:key"
3466
- },
3467
- {
3468
- subscriptionTopic: SubscriptionTopic.AgentWorker,
3469
- route: "/metrics/agents/:key/:subkey"
3470
- }
3471
- ]
3472
- },
3473
- ["lambda"]: {
3474
- influxDBContextTags: [
3475
- "technology",
3476
- "subTechnology",
3477
- "lambdaFunctionName",
3478
- "lambdaInstance",
3479
- "hostName",
3480
- "processId",
3481
- "parentProcessId",
3482
- "useCase",
3483
- "pattern"
3484
- ],
3485
- redisIndexPrefixDefinitions: {
3486
- timeSeriesIndex: "idx:lambdaIndexTimeSeries",
3487
- timeSeriesPrefix: "/lambdaTimeSeries:",
3488
- instantIndex: "idx:lambdaIndexInstant",
3489
- instantPrefix: "/lambdaInstant:"
3490
- },
3491
- fieldList: [
3492
- { fieldName: "cpu", gauge: Gauge.CPU_LOAD_GAUGE, instrumentProperty: "val", dataType: "number", timeSeriesIndex: true, quantile: true, influxdbDataType: "floatField", gaugeType: GaugeTypes.INSTRUMENT_GAUGE },
3493
- { fieldName: "connectionCount", gauge: Gauge.CONNECTION_COUNT_GAUGE, instrumentProperty: "val", dataType: "number", timeSeriesIndex: true, quantile: true, influxdbDataType: "intField", gaugeType: GaugeTypes.INSTRUMENT_GAUGE },
3494
- { fieldName: "connectionPoolCount", gauge: Gauge.CONNECTION_POOL_TOTAL_GAUGE, instrumentProperty: "val", dataType: "number", influxdbDataType: "intField", gaugeType: GaugeTypes.INSTRUMENT_GAUGE },
3495
- { fieldName: "connectionIdleCount", gauge: Gauge.CONNECTION_POOL_IDLE_GAUGE, instrumentProperty: "val", dataType: "number", influxdbDataType: "intField", gaugeType: GaugeTypes.INSTRUMENT_GAUGE },
3496
- { fieldName: "connectionWaitingCount", gauge: Gauge.CONNECTION_POOL_WAITING_GAUGE, instrumentProperty: "val", dataType: "number", influxdbDataType: "intField", gaugeType: GaugeTypes.INSTRUMENT_GAUGE },
3497
- { fieldName: "systemcpu", gauge: Gauge.CPU_SYSTEM_LOAD_GAUGE, instrumentProperty: "val", dataType: "number", timeSeriesIndex: true, quantile: true, influxdbDataType: "floatField", gaugeType: GaugeTypes.INSTRUMENT_GAUGE },
3498
- { fieldName: "memory", gauge: Gauge.OBJECT_GAUGE, instrumentProperty: "val", dataType: "JSON", influxdbDataType: "stringField", gaugeType: GaugeTypes.INSTRUMENT_OBJECT }
3499
- ],
3500
- //@@ need type declare in appframework
3501
- GetPathFromContext(context) {
3502
- const { technology, subTechnology, lambdaInstance } = context;
3503
- return `/${technology}/${subTechnology}/${lambdaInstance}`;
3504
- },
3505
- redisQueryFilters: {
3506
- level1ContextField: "serviceType",
3507
- level2ContextField: "technology",
3508
- level3ContextField: "subTechnology"
3509
- },
3510
- subscriptionTopics: [
3511
- {
3512
- subscriptionTopic: SubscriptionTopic.AllLambdasCombined,
3513
- // uicontrollerlanding
3514
- route: "/metrics"
3515
- },
3516
- {
3517
- subscriptionTopic: SubscriptionTopic.LambdaTechnologies,
3518
- // uicontrollerlambda
3519
- route: "/metrics/lambdas"
3520
- },
3521
- {
3522
- subscriptionTopic: SubscriptionTopic.LambdaSubTechnologies,
3523
- // uicontrollerlambdasubtechnologies
3524
- route: "/metrics/lambdas/:key"
3525
- },
3526
- {
3527
- subscriptionTopic: SubscriptionTopic.LambdaSubTechnologiesInstance,
3528
- // uicontrollerlambdasubtechnologiesinstance
3529
- route: "/metrics/lambdas/:key/:subkey"
3530
- }
3531
- ]
3532
- }
3533
- }
3534
- };
3535
- const _ObservabilityModelUtils = class _ObservabilityModelUtils2 {
3536
- static GetModelNode(data) {
3537
- const fixedSize = 2;
3538
- const padLength = 9;
3539
- try {
3540
- return {
3541
- val: data,
3542
- vf: parseFloat(data.toString()).toFixed(fixedSize).padStart(padLength, " "),
3543
- value: parseFloat(data.toString()).toFixed(fixedSize)
3544
- };
3545
- } catch (error) {
3546
- return {
3547
- val: 0,
3548
- vf: "",
3549
- value: ""
3550
- };
3551
- }
3552
- }
3553
- static GetModelNodeRawStringArray(data) {
3554
- try {
3555
- return {
3556
- val: data
3557
- };
3558
- } catch (error) {
3559
- return {
3560
- val: []
3561
- };
3562
- }
3563
- }
3564
- static GetModelNodeObject(data) {
3565
- try {
3566
- return {
3567
- val: JSON.parse(data)
3568
- };
3569
- } catch (error) {
3570
- return {
3571
- val: null
3572
- };
3573
- }
3574
- }
3575
- static GetModelNodeWithQuantile(data, quantileData) {
3576
- let quantile2 = "";
3577
- const quantileDataElementArray = [];
3578
- for (const [key, val] of Object.entries(quantileData)) {
3579
- quantile2 += parseFloat(val.toFixed(2)).toString().padStart(8, " ");
3580
- quantileDataElementArray.push([
3581
- key,
3582
- val
3583
- ]);
3584
- }
3585
- const fixedSize = 2;
3586
- const padLength = 9;
3587
- try {
3588
- return {
3589
- val: data,
3590
- vf: parseFloat(data.toString()).toFixed(fixedSize).padStart(padLength, " "),
3591
- value: parseFloat(data.toString()).toFixed(fixedSize),
3592
- percentile: quantileDataElementArray,
3593
- percentileFormatted: quantile2
3594
- };
3595
- } catch (error) {
3596
- return {
3597
- val: 0,
3598
- vf: "",
3599
- value: "",
3600
- percentile: [],
3601
- percentileFormatted: ""
3602
- };
3603
- }
3604
- }
3605
- static GetModelNodeHistFromInfluxData(data) {
3606
- try {
3607
- const histVal = [];
3608
- if (data) {
3609
- for (const [key, val] of Object.entries(data)) {
3610
- const dataElement = [
3611
- val,
3612
- key,
3613
- parseInt(key)
3614
- ];
3615
- histVal.push(dataElement);
3616
- }
3617
- }
3618
- try {
3619
- return {
3620
- hist: histVal
3621
- };
3622
- } catch (error) {
3623
- return {
3624
- hist: []
3625
- };
3626
- }
3627
- } catch (error) {
3628
- return {
3629
- hist: []
3630
- };
3631
- }
3632
- }
3633
- static GetModelData(serviceType, model, data, parseLog) {
3634
- const fieldList = [
3635
- ...globalServiceDefinitions.coreFieldList,
3636
- ...globalServiceDefinitions.services[serviceType].fieldList
3637
- ];
3638
- fieldList.forEach((field) => {
3639
- if (field.quantile) {
3640
- _ObservabilityModelUtils2.ParseModelNodeWithQuantile(model, data, parseLog, field.gauge, field.fieldName, `${field.fieldName}_quantile`);
3641
- } else if (field.gaugeType.localeCompare(GaugeTypes.INSTRUMENT_OBJECT) === 0) {
3642
- _ObservabilityModelUtils2.ParseModelNodeObject(model, data, parseLog, field.gauge, field.fieldName);
3643
- } else {
3644
- _ObservabilityModelUtils2.ParseModelNode(model, data, parseLog, field.gauge, field.fieldName);
3645
- }
3646
- if (field.histo) {
3647
- _ObservabilityModelUtils2.ParseModelNodeHisto(model, data, parseLog, field.histoGauge, `${field.fieldName}_histo`);
3648
- }
3649
- });
3650
- }
3651
- static GetModelForService(id, data, subscribeToKafka, logger) {
3652
- try {
3653
- const parseLog = [];
3654
- const model = {
3655
- id,
3656
- instruments: {}
3657
- };
3658
- this.GetModelData("service", model, data, parseLog);
3659
- if (!subscribeToKafka) {
3660
- model.instruments[Gauge.LOGGER] = _ObservabilityModelUtils2.GetModelNodeRawStringArray(data["logMessages"]);
3661
- }
3662
- if (parseLog.length > 0) {
3663
- parseLog.forEach((logEntry) => logger.debug(logEntry));
3664
- }
3665
- return model;
3666
- } catch (error) {
3667
- return null;
3668
- }
3669
- }
3670
- static GetModelForLambda(id, data, subscribeToKafka, logger) {
3671
- try {
3672
- const parseLog = [];
3673
- const model = {
3674
- id,
3675
- instruments: {}
3676
- };
3677
- this.GetModelData("lambda", model, data, parseLog);
3678
- if (!subscribeToKafka) {
3679
- model.instruments[Gauge.LOGGER] = _ObservabilityModelUtils2.GetModelNodeRawStringArray(data["logMessages"]);
3680
- }
3681
- if (parseLog.length > 0) {
3682
- parseLog.forEach((logEntry) => logger.debug(logEntry));
3683
- }
3684
- return model;
3685
- } catch (error) {
3686
- return null;
3687
- }
3688
- }
3689
- static GetModelForAgent(id, data, subscribeToKafka, logger) {
3690
- try {
3691
- if (Object.keys(data).length === 0) {
3692
- return null;
3693
- }
3694
- const parseLog = [];
3695
- const model = {
3696
- id,
3697
- instruments: {}
3698
- };
3699
- this.GetModelData("agent", model, data, parseLog);
3700
- if (!subscribeToKafka) {
3701
- model.instruments[Gauge.LOGGER] = _ObservabilityModelUtils2.GetModelNodeRawStringArray(data["logMessages"]);
3702
- }
3703
- if (parseLog.length > 0) {
3704
- parseLog.forEach((logEntry) => logger.debug(logEntry));
3705
- }
3706
- return model;
3707
- } catch (error) {
3708
- return null;
3709
- }
3710
- }
3711
- };
3712
- __publicField2(_ObservabilityModelUtils, "ParseModelNode", (model, data, parseLog, gaugeName, fieldName) => {
3713
- if (fieldName in data) {
3714
- model.instruments[gaugeName] = _ObservabilityModelUtils.GetModelNode(data[fieldName]);
3715
- } else {
3716
- parseLog.push(`ObservabilityModelUtils:ParseModelNode(): Field not present: [${fieldName}], default to [0]`);
3717
- model.instruments[gaugeName] = _ObservabilityModelUtils.GetModelNode(0);
3718
- }
3719
- });
3720
- __publicField2(_ObservabilityModelUtils, "ParseModelNodeWithQuantile", (model, data, parseLog, gaugeName, fieldName, quantileFieldName) => {
3721
- if (fieldName in data && quantileFieldName in data) {
3722
- model.instruments[gaugeName] = _ObservabilityModelUtils.GetModelNodeWithQuantile(data[fieldName], data[quantileFieldName]);
3723
- } else if (fieldName in data) {
3724
- const dataVal = data[fieldName];
3725
- parseLog.push(`ObservabilityModelUtils:ParseModelNodeWithQuantile(): QuantileFieldName not present: [${quantileFieldName}], default to [${dataVal},{}]`);
3726
- model.instruments[gaugeName] = _ObservabilityModelUtils.GetModelNodeWithQuantile(dataVal, {});
3727
- } else {
3728
- parseLog.push(`ObservabilityModelUtils:ParseModelNodeWithQuantile(): Field not present: [${fieldName}], QuantileFieldName not present: [${quantileFieldName}], default to [0,{}]`);
3729
- model.instruments[gaugeName] = _ObservabilityModelUtils.GetModelNodeWithQuantile(0, {});
3730
- }
3731
- });
3732
- __publicField2(_ObservabilityModelUtils, "ParseModelNodeHisto", (model, data, parseLog, gaugeName, fieldName) => {
3733
- if (fieldName in data) {
3734
- model.instruments[gaugeName] = _ObservabilityModelUtils.GetModelNodeHistFromInfluxData(data[fieldName]);
3735
- } else {
3736
- parseLog.push(`ObservabilityModelUtils:ParseModelNodeHisto(): Field not present: [${fieldName}], default to [{}]`);
3737
- model.instruments[gaugeName] = _ObservabilityModelUtils.GetModelNodeHistFromInfluxData({});
3738
- }
3739
- });
3740
- __publicField2(_ObservabilityModelUtils, "ParseModelNodeObject", (model, data, parseLog, gaugeName, fieldName) => {
3741
- if (fieldName in data) {
3742
- model.instruments[gaugeName] = _ObservabilityModelUtils.GetModelNodeObject(data[fieldName]);
3743
- } else {
3744
- parseLog.push(`ObservabilityModelUtils:ParseModelNodeObject(): Field not present: [${fieldName}], default to [{}]`);
3745
- model.instruments[gaugeName] = _ObservabilityModelUtils.GetModelNodeObject({});
3746
- }
3747
- });
3748
- const byteToHex = [];
3749
- for (let i = 0; i < 256; ++i) {
3750
- byteToHex.push((i + 256).toString(16).slice(1));
3751
- }
3752
- typeof crypto !== "undefined" && crypto.randomUUID && crypto.randomUUID.bind(crypto);
3753
353
  const TelemetryStore = pinia.defineStore("__sts__TelemetryStore", {
3754
354
  // State
3755
355
  // https://pinia.vuejs.org/core-concepts/state.html
@@ -5348,97 +1948,97 @@ var __privateMethod = (obj, member, method) => {
5348
1948
  update = true;
5349
1949
  }
5350
1950
  if (runner.instrumentData.requestCount) {
5351
- runnerEx.publishInstrumentController.UpdateInstrument(Gauge.REQUEST_COUNT_GAUGE, {
1951
+ runnerEx.publishInstrumentController.UpdateInstrument(stsobservability.Gauge.REQUEST_COUNT_GAUGE, {
5352
1952
  val: runnerEx.instrumentData.requestCount
5353
1953
  });
5354
1954
  update = true;
5355
1955
  }
5356
1956
  if (runner.instrumentData.errorCount) {
5357
- runnerEx.publishInstrumentController.UpdateInstrument(Gauge.ERROR_COUNT_GAUGE, {
1957
+ runnerEx.publishInstrumentController.UpdateInstrument(stsobservability.Gauge.ERROR_COUNT_GAUGE, {
5358
1958
  val: runnerEx.instrumentData.errorCount
5359
1959
  });
5360
1960
  update = true;
5361
1961
  }
5362
1962
  if (runner.instrumentData.retryCount) {
5363
- runnerEx.publishInstrumentController.UpdateInstrument(Gauge.RETRY_COUNT_GAUGE, {
1963
+ runnerEx.publishInstrumentController.UpdateInstrument(stsobservability.Gauge.RETRY_COUNT_GAUGE, {
5364
1964
  val: runnerEx.instrumentData.retryCount
5365
1965
  });
5366
1966
  update = true;
5367
1967
  }
5368
1968
  if (runner.instrumentData.authenticationCount) {
5369
- runnerEx.publishInstrumentController.UpdateInstrument(Gauge.AUTHENTICATION_COUNT_GAUGE, {
1969
+ runnerEx.publishInstrumentController.UpdateInstrument(stsobservability.Gauge.AUTHENTICATION_COUNT_GAUGE, {
5370
1970
  val: runnerEx.instrumentData.authenticationCount
5371
1971
  });
5372
1972
  update = true;
5373
1973
  }
5374
1974
  if (runner.instrumentData.authenticationErrorCount) {
5375
- runnerEx.publishInstrumentController.UpdateInstrument(Gauge.AUTHENTICATION_ERROR_COUNT_GAUGE, {
1975
+ runnerEx.publishInstrumentController.UpdateInstrument(stsobservability.Gauge.AUTHENTICATION_ERROR_COUNT_GAUGE, {
5376
1976
  val: runnerEx.instrumentData.authenticationCount
5377
1977
  });
5378
1978
  update = true;
5379
1979
  }
5380
1980
  if (runner.instrumentData.authenticationRetryCount) {
5381
- runnerEx.publishInstrumentController.UpdateInstrument(Gauge.AUTHENTICATION_RETRY_COUNT_GAUGE, {
1981
+ runnerEx.publishInstrumentController.UpdateInstrument(stsobservability.Gauge.AUTHENTICATION_RETRY_COUNT_GAUGE, {
5382
1982
  val: runnerEx.instrumentData.authenticationCount
5383
1983
  });
5384
1984
  update = true;
5385
1985
  }
5386
1986
  if (runner.instrumentData.coreCount) {
5387
- runnerEx.publishInstrumentController.UpdateInstrument(Gauge.CORE_COUNT_GAUGE, {
1987
+ runnerEx.publishInstrumentController.UpdateInstrument(stsobservability.Gauge.CORE_COUNT_GAUGE, {
5388
1988
  val: runnerEx.instrumentData.coreCount
5389
1989
  });
5390
1990
  update = true;
5391
1991
  }
5392
1992
  if (runner.instrumentData.timer) {
5393
- runnerEx.publishInstrumentController.UpdateInstrument(Gauge.TIMER_GAUGE, {
1993
+ runnerEx.publishInstrumentController.UpdateInstrument(stsobservability.Gauge.TIMER_GAUGE, {
5394
1994
  val: runnerEx.instrumentData.timer
5395
1995
  });
5396
1996
  update = true;
5397
1997
  }
5398
1998
  if (runner.instrumentData.activeRequestCount) {
5399
- runnerEx.publishInstrumentController.UpdateInstrument(Gauge.ACTIVE_REQUEST_GAUGE, {
1999
+ runnerEx.publishInstrumentController.UpdateInstrument(stsobservability.Gauge.ACTIVE_REQUEST_GAUGE, {
5400
2000
  val: runnerEx.instrumentData.activeRequestCount
5401
2001
  });
5402
2002
  update = true;
5403
2003
  }
5404
2004
  if (runner.instrumentData.velocity) {
5405
- runnerEx.publishInstrumentController.UpdateInstrument(Gauge.VELOCITY_GAUGE, {
2005
+ runnerEx.publishInstrumentController.UpdateInstrument(stsobservability.Gauge.VELOCITY_GAUGE, {
5406
2006
  Inc: runnerEx.instrumentData.velocity
5407
2007
  });
5408
2008
  update = true;
5409
2009
  }
5410
2010
  if (runner.instrumentData.duration) {
5411
- runnerEx.publishInstrumentController.UpdateInstrument(Gauge.DURATION_GAUGE, {
2011
+ runnerEx.publishInstrumentController.UpdateInstrument(stsobservability.Gauge.DURATION_GAUGE, {
5412
2012
  val: runnerEx.instrumentData.duration
5413
2013
  });
5414
- runnerEx.publishInstrumentController.UpdateInstrument(Gauge.DURATION_HISTOGRAM_GAUGE, {
2014
+ runnerEx.publishInstrumentController.UpdateInstrument(stsobservability.Gauge.DURATION_HISTOGRAM_GAUGE, {
5415
2015
  val: runnerEx.instrumentData.duration
5416
2016
  });
5417
2017
  update = true;
5418
2018
  }
5419
2019
  if (runner.instrumentData.latency) {
5420
- runnerEx.publishInstrumentController.UpdateInstrument(Gauge.LATENCY_GAUGE, {
2020
+ runnerEx.publishInstrumentController.UpdateInstrument(stsobservability.Gauge.LATENCY_GAUGE, {
5421
2021
  val: runnerEx.instrumentData.latency
5422
2022
  });
5423
- runnerEx.publishInstrumentController.UpdateInstrument(Gauge.LATENCY_HISTOGRAM_GAUGE, {
2023
+ runnerEx.publishInstrumentController.UpdateInstrument(stsobservability.Gauge.LATENCY_HISTOGRAM_GAUGE, {
5424
2024
  val: runnerEx.instrumentData.latency
5425
2025
  });
5426
2026
  update = true;
5427
2027
  }
5428
2028
  if (runner.instrumentData.childCount) {
5429
- runnerEx.publishInstrumentController.UpdateInstrument(Gauge.CHILD_COUNT, {
2029
+ runnerEx.publishInstrumentController.UpdateInstrument(stsobservability.Gauge.CHILD_COUNT, {
5430
2030
  val: runnerEx.instrumentData.childCount
5431
2031
  });
5432
2032
  update = true;
5433
2033
  }
5434
2034
  if (runner.instrumentData.rx) {
5435
- runnerEx.publishInstrumentController.UpdateInstrument(Gauge.NETWORK_RX_GAUGE, {
2035
+ runnerEx.publishInstrumentController.UpdateInstrument(stsobservability.Gauge.NETWORK_RX_GAUGE, {
5436
2036
  Inc: runnerEx.instrumentData.rx
5437
2037
  });
5438
2038
  update = true;
5439
2039
  }
5440
2040
  if (runner.instrumentData.tx) {
5441
- runnerEx.publishInstrumentController.UpdateInstrument(Gauge.NETWORK_TX_GAUGE, {
2041
+ runnerEx.publishInstrumentController.UpdateInstrument(stsobservability.Gauge.NETWORK_TX_GAUGE, {
5442
2042
  Inc: runnerEx.instrumentData.tx
5443
2043
  });
5444
2044
  update = true;
@@ -5627,10 +2227,10 @@ var __privateMethod = (obj, member, method) => {
5627
2227
  }
5628
2228
  setTimeout(() => {
5629
2229
  console.log(chalk$1.yellow(`CompareSTSInstrumentControllerPluginKeyWMEx(): [${CompareSTSInstrumentControllerPluginKeyWMEx()}]`));
5630
- console.log(chalk$1.yellow(`Attempting to get STSInstrumentControllerPlugin using symbol: [${String(STSInstrumentControllerPluginKey)}]`));
2230
+ console.log(chalk$1.yellow(`Attempting to get STSInstrumentControllerPlugin using symbol: [${String(stsobservability.STSInstrumentControllerPluginKey)}]`));
5631
2231
  __privateSet(this, _STSInstrumentController, app.config.globalProperties.$sts.aic);
5632
- console.log(chalk$1.yellow(GetSTSInstrumentController(app)));
5633
- console.log(chalk$1.yellow(app.config.globalProperties.$sts[STSInstrumentControllerPluginKey]));
2232
+ console.log(chalk$1.yellow(stsobservability.GetSTSInstrumentController(app)));
2233
+ console.log(chalk$1.yellow(app.config.globalProperties.$sts[stsobservability.STSInstrumentControllerPluginKey]));
5634
2234
  console.log(chalk$1.yellow(__privateGet(this, _STSInstrumentController)));
5635
2235
  console.log(chalk$1.yellow(app.config.globalProperties.$sts.aic));
5636
2236
  console.log(chalk$1.yellow("keys within app.config.globalProperties.$sts"));
@@ -5638,7 +2238,7 @@ var __privateMethod = (obj, member, method) => {
5638
2238
  console.log(chalk$1.yellow(`${key}`));
5639
2239
  }
5640
2240
  if (!__privateGet(this, _STSInstrumentController)) {
5641
- console.log(chalk$1.yellow(`Failed to get STSInstrumentControllerPlugin using symbol: [${String(STSInstrumentControllerPluginKey)}]`));
2241
+ console.log(chalk$1.yellow(`Failed to get STSInstrumentControllerPlugin using symbol: [${String(stsobservability.STSInstrumentControllerPluginKey)}]`));
5642
2242
  }
5643
2243
  }, 0);
5644
2244
  }
@@ -5675,9 +2275,9 @@ var __privateMethod = (obj, member, method) => {
5675
2275
  _TerminateWorker = new WeakMap();
5676
2276
  _StopRunner = new WeakMap();
5677
2277
  _StopWorker = new WeakMap();
5678
- const GetSTSInstrumentControllerPluginKeyWM = () => STSInstrumentControllerPluginKey;
5679
- const CompareSTSInstrumentControllerPluginKeyWM = (val) => val === STSInstrumentControllerPluginKey;
5680
- const CompareSTSInstrumentControllerPluginKeyWMEx = () => STSInstrumentControllerPluginKey === GetSTSInstrumentControllerPluginKey();
2278
+ const GetSTSInstrumentControllerPluginKeyWM = () => stsobservability.STSInstrumentControllerPluginKey;
2279
+ const CompareSTSInstrumentControllerPluginKeyWM = (val) => val === stsobservability.STSInstrumentControllerPluginKey;
2280
+ const CompareSTSInstrumentControllerPluginKeyWMEx = () => stsobservability.STSInstrumentControllerPluginKey === stsobservability.GetSTSInstrumentControllerPluginKey();
5681
2281
  const useSTSWorkerManager = () => vue.inject(STSWorkerManagerPluginKey);
5682
2282
  const STSWorkerManagerPlugin = {
5683
2283
  // eslint-disable-next-line @typescript-eslint/no-explicit-any