@nsshunt/stsuxvue 1.0.12 → 1.0.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/stsuxvue.mjs CHANGED
@@ -529,30 +529,6 @@ var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof win
529
529
  function getDefaultExportFromCjs(x) {
530
530
  return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
531
531
  }
532
- function getAugmentedNamespace(n) {
533
- if (n.__esModule) return n;
534
- var f = n.default;
535
- if (typeof f == "function") {
536
- var a = function a2() {
537
- if (this instanceof a2) {
538
- return Reflect.construct(f, arguments, this.constructor);
539
- }
540
- return f.apply(this, arguments);
541
- };
542
- a.prototype = f.prototype;
543
- } else a = {};
544
- Object.defineProperty(a, "__esModule", { value: true });
545
- Object.keys(n).forEach(function(k) {
546
- var d = Object.getOwnPropertyDescriptor(n, k);
547
- Object.defineProperty(a, k, d.get ? d : {
548
- enumerable: true,
549
- get: function() {
550
- return n[k];
551
- }
552
- });
553
- });
554
- return a;
555
- }
556
532
  var lib = {};
557
533
  var decode = {};
558
534
  const Aacute$1 = "Á";
@@ -5161,8 +5137,8 @@ var htmlReplacer = getInverseReplacer(inverseHTML);
5161
5137
  encode.encodeHTML = getInverse(inverseHTML, htmlReplacer);
5162
5138
  encode.encodeNonAsciiHTML = getASCIIEncoder(inverseHTML);
5163
5139
  function getInverseObj(obj) {
5164
- return Object.keys(obj).sort().reduce(function(inverse, name2) {
5165
- inverse[obj[name2]] = "&" + name2 + ";";
5140
+ return Object.keys(obj).sort().reduce(function(inverse, name) {
5141
+ inverse[obj[name]] = "&" + name + ";";
5166
5142
  return inverse;
5167
5143
  }, {});
5168
5144
  }
@@ -5211,8 +5187,8 @@ function singleCharReplacer(c) {
5211
5187
  }
5212
5188
  function getInverse(inverse, re) {
5213
5189
  return function(data) {
5214
- return data.replace(re, function(name2) {
5215
- return inverse[name2];
5190
+ return data.replace(re, function(name) {
5191
+ return inverse[name];
5216
5192
  }).replace(reNonASCII, singleCharReplacer);
5217
5193
  };
5218
5194
  }
@@ -5232,68 +5208,68 @@ function getASCIIEncoder(obj) {
5232
5208
  });
5233
5209
  };
5234
5210
  }
5235
- (function(exports2) {
5236
- Object.defineProperty(exports2, "__esModule", { value: true });
5237
- exports2.decodeXMLStrict = exports2.decodeHTML5Strict = exports2.decodeHTML4Strict = exports2.decodeHTML5 = exports2.decodeHTML4 = exports2.decodeHTMLStrict = exports2.decodeHTML = exports2.decodeXML = exports2.encodeHTML5 = exports2.encodeHTML4 = exports2.escapeUTF8 = exports2.escape = exports2.encodeNonAsciiHTML = exports2.encodeHTML = exports2.encodeXML = exports2.encode = exports2.decodeStrict = exports2.decode = void 0;
5211
+ (function(exports) {
5212
+ Object.defineProperty(exports, "__esModule", { value: true });
5213
+ exports.decodeXMLStrict = exports.decodeHTML5Strict = exports.decodeHTML4Strict = exports.decodeHTML5 = exports.decodeHTML4 = exports.decodeHTMLStrict = exports.decodeHTML = exports.decodeXML = exports.encodeHTML5 = exports.encodeHTML4 = exports.escapeUTF8 = exports.escape = exports.encodeNonAsciiHTML = exports.encodeHTML = exports.encodeXML = exports.encode = exports.decodeStrict = exports.decode = void 0;
5238
5214
  var decode_1 = decode;
5239
5215
  var encode_1 = encode;
5240
5216
  function decode$1(data, level) {
5241
5217
  return (!level || level <= 0 ? decode_1.decodeXML : decode_1.decodeHTML)(data);
5242
5218
  }
5243
- exports2.decode = decode$1;
5219
+ exports.decode = decode$1;
5244
5220
  function decodeStrict(data, level) {
5245
5221
  return (!level || level <= 0 ? decode_1.decodeXML : decode_1.decodeHTMLStrict)(data);
5246
5222
  }
5247
- exports2.decodeStrict = decodeStrict;
5223
+ exports.decodeStrict = decodeStrict;
5248
5224
  function encode$1(data, level) {
5249
5225
  return (!level || level <= 0 ? encode_1.encodeXML : encode_1.encodeHTML)(data);
5250
5226
  }
5251
- exports2.encode = encode$1;
5227
+ exports.encode = encode$1;
5252
5228
  var encode_2 = encode;
5253
- Object.defineProperty(exports2, "encodeXML", { enumerable: true, get: function() {
5229
+ Object.defineProperty(exports, "encodeXML", { enumerable: true, get: function() {
5254
5230
  return encode_2.encodeXML;
5255
5231
  } });
5256
- Object.defineProperty(exports2, "encodeHTML", { enumerable: true, get: function() {
5232
+ Object.defineProperty(exports, "encodeHTML", { enumerable: true, get: function() {
5257
5233
  return encode_2.encodeHTML;
5258
5234
  } });
5259
- Object.defineProperty(exports2, "encodeNonAsciiHTML", { enumerable: true, get: function() {
5235
+ Object.defineProperty(exports, "encodeNonAsciiHTML", { enumerable: true, get: function() {
5260
5236
  return encode_2.encodeNonAsciiHTML;
5261
5237
  } });
5262
- Object.defineProperty(exports2, "escape", { enumerable: true, get: function() {
5238
+ Object.defineProperty(exports, "escape", { enumerable: true, get: function() {
5263
5239
  return encode_2.escape;
5264
5240
  } });
5265
- Object.defineProperty(exports2, "escapeUTF8", { enumerable: true, get: function() {
5241
+ Object.defineProperty(exports, "escapeUTF8", { enumerable: true, get: function() {
5266
5242
  return encode_2.escapeUTF8;
5267
5243
  } });
5268
- Object.defineProperty(exports2, "encodeHTML4", { enumerable: true, get: function() {
5244
+ Object.defineProperty(exports, "encodeHTML4", { enumerable: true, get: function() {
5269
5245
  return encode_2.encodeHTML;
5270
5246
  } });
5271
- Object.defineProperty(exports2, "encodeHTML5", { enumerable: true, get: function() {
5247
+ Object.defineProperty(exports, "encodeHTML5", { enumerable: true, get: function() {
5272
5248
  return encode_2.encodeHTML;
5273
5249
  } });
5274
5250
  var decode_2 = decode;
5275
- Object.defineProperty(exports2, "decodeXML", { enumerable: true, get: function() {
5251
+ Object.defineProperty(exports, "decodeXML", { enumerable: true, get: function() {
5276
5252
  return decode_2.decodeXML;
5277
5253
  } });
5278
- Object.defineProperty(exports2, "decodeHTML", { enumerable: true, get: function() {
5254
+ Object.defineProperty(exports, "decodeHTML", { enumerable: true, get: function() {
5279
5255
  return decode_2.decodeHTML;
5280
5256
  } });
5281
- Object.defineProperty(exports2, "decodeHTMLStrict", { enumerable: true, get: function() {
5257
+ Object.defineProperty(exports, "decodeHTMLStrict", { enumerable: true, get: function() {
5282
5258
  return decode_2.decodeHTMLStrict;
5283
5259
  } });
5284
- Object.defineProperty(exports2, "decodeHTML4", { enumerable: true, get: function() {
5260
+ Object.defineProperty(exports, "decodeHTML4", { enumerable: true, get: function() {
5285
5261
  return decode_2.decodeHTML;
5286
5262
  } });
5287
- Object.defineProperty(exports2, "decodeHTML5", { enumerable: true, get: function() {
5263
+ Object.defineProperty(exports, "decodeHTML5", { enumerable: true, get: function() {
5288
5264
  return decode_2.decodeHTML;
5289
5265
  } });
5290
- Object.defineProperty(exports2, "decodeHTML4Strict", { enumerable: true, get: function() {
5266
+ Object.defineProperty(exports, "decodeHTML4Strict", { enumerable: true, get: function() {
5291
5267
  return decode_2.decodeHTMLStrict;
5292
5268
  } });
5293
- Object.defineProperty(exports2, "decodeHTML5Strict", { enumerable: true, get: function() {
5269
+ Object.defineProperty(exports, "decodeHTML5Strict", { enumerable: true, get: function() {
5294
5270
  return decode_2.decodeHTMLStrict;
5295
5271
  } });
5296
- Object.defineProperty(exports2, "decodeXMLStrict", { enumerable: true, get: function() {
5272
+ Object.defineProperty(exports, "decodeXMLStrict", { enumerable: true, get: function() {
5297
5273
  return decode_2.decodeXML;
5298
5274
  } });
5299
5275
  })(lib);
@@ -5780,7 +5756,7 @@ var Filter = /* @__PURE__ */ function() {
5780
5756
  }();
5781
5757
  var ansi_to_html = Filter;
5782
5758
  const Convert = /* @__PURE__ */ getDefaultExportFromCjs(ansi_to_html);
5783
- /*! @license DOMPurify 3.2.0 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.0/LICENSE */
5759
+ /*! @license DOMPurify 3.2.1 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.1/LICENSE */
5784
5760
  const {
5785
5761
  entries,
5786
5762
  setPrototypeOf,
@@ -5987,7 +5963,7 @@ const _createTrustedTypesPolicy = function _createTrustedTypesPolicy2(trustedTyp
5987
5963
  function createDOMPurify() {
5988
5964
  let window2 = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : getGlobal();
5989
5965
  const DOMPurify = (root) => createDOMPurify(root);
5990
- DOMPurify.version = "3.2.0";
5966
+ DOMPurify.version = "3.2.1";
5991
5967
  DOMPurify.removed = [];
5992
5968
  if (!window2 || !window2.document || window2.document.nodeType !== NODE_TYPE.document) {
5993
5969
  DOMPurify.isSupported = false;
@@ -6305,10 +6281,10 @@ function createDOMPurify() {
6305
6281
  remove(node);
6306
6282
  }
6307
6283
  };
6308
- const _removeAttribute = function _removeAttribute2(name2, element) {
6284
+ const _removeAttribute = function _removeAttribute2(name, element) {
6309
6285
  try {
6310
6286
  arrayPush(DOMPurify.removed, {
6311
- attribute: element.getAttributeNode(name2),
6287
+ attribute: element.getAttributeNode(name),
6312
6288
  from: element
6313
6289
  });
6314
6290
  } catch (_) {
@@ -6317,8 +6293,8 @@ function createDOMPurify() {
6317
6293
  from: element
6318
6294
  });
6319
6295
  }
6320
- element.removeAttribute(name2);
6321
- if (name2 === "is" && !ALLOWED_ATTR[name2]) {
6296
+ element.removeAttribute(name);
6297
+ if (name === "is" && !ALLOWED_ATTR[name]) {
6322
6298
  if (RETURN_DOM || RETURN_DOM_FRAGMENT) {
6323
6299
  try {
6324
6300
  _forceRemove(element);
@@ -6326,7 +6302,7 @@ function createDOMPurify() {
6326
6302
  }
6327
6303
  } else {
6328
6304
  try {
6329
- element.setAttribute(name2, "");
6305
+ element.setAttribute(name, "");
6330
6306
  } catch (_) {
6331
6307
  }
6332
6308
  }
@@ -6510,12 +6486,12 @@ function createDOMPurify() {
6510
6486
  while (l--) {
6511
6487
  const attr = attributes[l];
6512
6488
  const {
6513
- name: name2,
6489
+ name,
6514
6490
  namespaceURI,
6515
6491
  value: attrValue
6516
6492
  } = attr;
6517
- const lcName = transformCaseFunc(name2);
6518
- let value = name2 === "value" ? attrValue : stringTrim(attrValue);
6493
+ const lcName = transformCaseFunc(name);
6494
+ let value = name === "value" ? attrValue : stringTrim(attrValue);
6519
6495
  hookEvent.attrName = lcName;
6520
6496
  hookEvent.attrValue = value;
6521
6497
  hookEvent.keepAttr = true;
@@ -6523,22 +6499,22 @@ function createDOMPurify() {
6523
6499
  _executeHook("uponSanitizeAttribute", currentNode, hookEvent);
6524
6500
  value = hookEvent.attrValue;
6525
6501
  if (SANITIZE_NAMED_PROPS && (lcName === "id" || lcName === "name")) {
6526
- _removeAttribute(name2, currentNode);
6502
+ _removeAttribute(name, currentNode);
6527
6503
  value = SANITIZE_NAMED_PROPS_PREFIX + value;
6528
6504
  }
6529
6505
  if (SAFE_FOR_XML && regExpTest(/((--!?|])>)|<\/(style|title)/i, value)) {
6530
- _removeAttribute(name2, currentNode);
6506
+ _removeAttribute(name, currentNode);
6531
6507
  continue;
6532
6508
  }
6533
6509
  if (hookEvent.forceKeepAttr) {
6534
6510
  continue;
6535
6511
  }
6536
- _removeAttribute(name2, currentNode);
6512
+ _removeAttribute(name, currentNode);
6537
6513
  if (!hookEvent.keepAttr) {
6538
6514
  continue;
6539
6515
  }
6540
6516
  if (!ALLOW_SELF_CLOSE_IN_ATTR && regExpTest(/\/>/i, value)) {
6541
- _removeAttribute(name2, currentNode);
6517
+ _removeAttribute(name, currentNode);
6542
6518
  continue;
6543
6519
  }
6544
6520
  if (SAFE_FOR_TEMPLATES) {
@@ -6567,9 +6543,9 @@ function createDOMPurify() {
6567
6543
  }
6568
6544
  try {
6569
6545
  if (namespaceURI) {
6570
- currentNode.setAttributeNS(namespaceURI, name2, value);
6546
+ currentNode.setAttributeNS(namespaceURI, name, value);
6571
6547
  } else {
6572
- currentNode.setAttribute(name2, value);
6548
+ currentNode.setAttribute(name, value);
6573
6549
  }
6574
6550
  if (_isClobbered(currentNode)) {
6575
6551
  _forceRemove(currentNode);
@@ -7186,13 +7162,13 @@ const _export_sfc = (sfc, props) => {
7186
7162
  return target2;
7187
7163
  };
7188
7164
  const UXModelInstrumentAgentCommon = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-c034ae06"]]);
7189
- var ansiStyles$3 = { exports: {} };
7190
- var colorName$1;
7191
- var hasRequiredColorName$1;
7192
- function requireColorName$1() {
7193
- if (hasRequiredColorName$1) return colorName$1;
7194
- hasRequiredColorName$1 = 1;
7195
- colorName$1 = {
7165
+ var ansiStyles$1 = { exports: {} };
7166
+ var colorName;
7167
+ var hasRequiredColorName;
7168
+ function requireColorName() {
7169
+ if (hasRequiredColorName) return colorName;
7170
+ hasRequiredColorName = 1;
7171
+ colorName = {
7196
7172
  "aliceblue": [240, 248, 255],
7197
7173
  "antiquewhite": [250, 235, 215],
7198
7174
  "aqua": [0, 255, 255],
@@ -7342,14 +7318,14 @@ function requireColorName$1() {
7342
7318
  "yellow": [255, 255, 0],
7343
7319
  "yellowgreen": [154, 205, 50]
7344
7320
  };
7345
- return colorName$1;
7321
+ return colorName;
7346
7322
  }
7347
- var conversions$1;
7348
- var hasRequiredConversions$1;
7349
- function requireConversions$1() {
7350
- if (hasRequiredConversions$1) return conversions$1;
7351
- hasRequiredConversions$1 = 1;
7352
- const cssKeywords = requireColorName$1();
7323
+ var conversions;
7324
+ var hasRequiredConversions;
7325
+ function requireConversions() {
7326
+ if (hasRequiredConversions) return conversions;
7327
+ hasRequiredConversions = 1;
7328
+ const cssKeywords = requireColorName();
7353
7329
  const reverseKeywords = {};
7354
7330
  for (const key of Object.keys(cssKeywords)) {
7355
7331
  reverseKeywords[cssKeywords[key]] = key;
@@ -7371,7 +7347,7 @@ function requireConversions$1() {
7371
7347
  apple: { channels: 3, labels: ["r16", "g16", "b16"] },
7372
7348
  gray: { channels: 1, labels: ["gray"] }
7373
7349
  };
7374
- conversions$1 = convert;
7350
+ conversions = convert;
7375
7351
  for (const model of Object.keys(convert)) {
7376
7352
  if (!("channels" in convert[model])) {
7377
7353
  throw new Error("missing channels property: " + model);
@@ -8014,14 +7990,14 @@ function requireConversions$1() {
8014
7990
  const val = (rgb[0] + rgb[1] + rgb[2]) / 3;
8015
7991
  return [val / 255 * 100];
8016
7992
  };
8017
- return conversions$1;
7993
+ return conversions;
8018
7994
  }
8019
- var route$1;
8020
- var hasRequiredRoute$1;
8021
- function requireRoute$1() {
8022
- if (hasRequiredRoute$1) return route$1;
8023
- hasRequiredRoute$1 = 1;
8024
- const conversions2 = requireConversions$1();
7995
+ var route;
7996
+ var hasRequiredRoute;
7997
+ function requireRoute() {
7998
+ if (hasRequiredRoute) return route;
7999
+ hasRequiredRoute = 1;
8000
+ const conversions2 = requireConversions();
8025
8001
  function buildGraph() {
8026
8002
  const graph = {};
8027
8003
  const models2 = Object.keys(conversions2);
@@ -8060,18 +8036,18 @@ function requireRoute$1() {
8060
8036
  };
8061
8037
  }
8062
8038
  function wrapConversion(toModel, graph) {
8063
- const path2 = [graph[toModel].parent, toModel];
8039
+ const path = [graph[toModel].parent, toModel];
8064
8040
  let fn = conversions2[graph[toModel].parent][toModel];
8065
8041
  let cur = graph[toModel].parent;
8066
8042
  while (graph[cur].parent) {
8067
- path2.unshift(graph[cur].parent);
8043
+ path.unshift(graph[cur].parent);
8068
8044
  fn = link(conversions2[graph[cur].parent][cur], fn);
8069
8045
  cur = graph[cur].parent;
8070
8046
  }
8071
- fn.conversion = path2;
8047
+ fn.conversion = path;
8072
8048
  return fn;
8073
8049
  }
8074
- route$1 = function(fromModel) {
8050
+ route = function(fromModel) {
8075
8051
  const graph = deriveBFS(fromModel);
8076
8052
  const conversion = {};
8077
8053
  const models2 = Object.keys(graph);
@@ -8085,15 +8061,15 @@ function requireRoute$1() {
8085
8061
  }
8086
8062
  return conversion;
8087
8063
  };
8088
- return route$1;
8064
+ return route;
8089
8065
  }
8090
- var colorConvert$1;
8091
- var hasRequiredColorConvert$1;
8092
- function requireColorConvert$1() {
8093
- if (hasRequiredColorConvert$1) return colorConvert$1;
8094
- hasRequiredColorConvert$1 = 1;
8095
- const conversions2 = requireConversions$1();
8096
- const route2 = requireRoute$1();
8066
+ var colorConvert;
8067
+ var hasRequiredColorConvert;
8068
+ function requireColorConvert() {
8069
+ if (hasRequiredColorConvert) return colorConvert;
8070
+ hasRequiredColorConvert = 1;
8071
+ const conversions2 = requireConversions();
8072
+ const route2 = requireRoute();
8097
8073
  const convert = {};
8098
8074
  const models2 = Object.keys(conversions2);
8099
8075
  function wrapRaw(fn) {
@@ -8146,10 +8122,10 @@ function requireColorConvert$1() {
8146
8122
  convert[fromModel][toModel].raw = wrapRaw(fn);
8147
8123
  });
8148
8124
  });
8149
- colorConvert$1 = convert;
8150
- return colorConvert$1;
8125
+ colorConvert = convert;
8126
+ return colorConvert;
8151
8127
  }
8152
- ansiStyles$3.exports;
8128
+ ansiStyles$1.exports;
8153
8129
  (function(module) {
8154
8130
  const wrapAnsi16 = (fn, offset) => (...args) => {
8155
8131
  const code = fn(...args);
@@ -8183,16 +8159,16 @@ ansiStyles$3.exports;
8183
8159
  let colorConvert2;
8184
8160
  const makeDynamicStyles = (wrap, targetSpace, identity, isBackground) => {
8185
8161
  if (colorConvert2 === void 0) {
8186
- colorConvert2 = requireColorConvert$1();
8162
+ colorConvert2 = requireColorConvert();
8187
8163
  }
8188
8164
  const offset = isBackground ? 10 : 0;
8189
8165
  const styles2 = {};
8190
8166
  for (const [sourceSpace, suite] of Object.entries(colorConvert2)) {
8191
- const name2 = sourceSpace === "ansi16" ? "ansi" : sourceSpace;
8167
+ const name = sourceSpace === "ansi16" ? "ansi" : sourceSpace;
8192
8168
  if (sourceSpace === targetSpace) {
8193
- styles2[name2] = wrap(identity, offset);
8169
+ styles2[name] = wrap(identity, offset);
8194
8170
  } else if (typeof suite === "object") {
8195
- styles2[name2] = wrap(suite[targetSpace], offset);
8171
+ styles2[name] = wrap(suite[targetSpace], offset);
8196
8172
  }
8197
8173
  }
8198
8174
  return styles2;
@@ -8286,13 +8262,13 @@ ansiStyles$3.exports;
8286
8262
  enumerable: true,
8287
8263
  get: assembleStyles
8288
8264
  });
8289
- })(ansiStyles$3);
8290
- var ansiStylesExports$1 = ansiStyles$3.exports;
8291
- var browser$2 = {
8265
+ })(ansiStyles$1);
8266
+ var ansiStylesExports = ansiStyles$1.exports;
8267
+ var browser = {
8292
8268
  stdout: false,
8293
8269
  stderr: false
8294
8270
  };
8295
- const stringReplaceAll$3 = (string, substring, replacer) => {
8271
+ const stringReplaceAll$1 = (string, substring, replacer) => {
8296
8272
  let index = string.indexOf(substring);
8297
8273
  if (index === -1) {
8298
8274
  return string;
@@ -8308,7 +8284,7 @@ const stringReplaceAll$3 = (string, substring, replacer) => {
8308
8284
  returnValue += string.substr(endIndex);
8309
8285
  return returnValue;
8310
8286
  };
8311
- const stringEncaseCRLFWithFirstIndex$3 = (string, prefix, postfix, index) => {
8287
+ const stringEncaseCRLFWithFirstIndex$1 = (string, prefix, postfix, index) => {
8312
8288
  let endIndex = 0;
8313
8289
  let returnValue = "";
8314
8290
  do {
@@ -8320,15 +8296,15 @@ const stringEncaseCRLFWithFirstIndex$3 = (string, prefix, postfix, index) => {
8320
8296
  returnValue += string.substr(endIndex);
8321
8297
  return returnValue;
8322
8298
  };
8323
- var util$1 = {
8324
- stringReplaceAll: stringReplaceAll$3,
8325
- stringEncaseCRLFWithFirstIndex: stringEncaseCRLFWithFirstIndex$3
8299
+ var util = {
8300
+ stringReplaceAll: stringReplaceAll$1,
8301
+ stringEncaseCRLFWithFirstIndex: stringEncaseCRLFWithFirstIndex$1
8326
8302
  };
8327
- var templates$1;
8328
- var hasRequiredTemplates$1;
8329
- function requireTemplates$1() {
8330
- if (hasRequiredTemplates$1) return templates$1;
8331
- hasRequiredTemplates$1 = 1;
8303
+ var templates;
8304
+ var hasRequiredTemplates;
8305
+ function requireTemplates() {
8306
+ if (hasRequiredTemplates) return templates;
8307
+ hasRequiredTemplates = 1;
8332
8308
  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;
8333
8309
  const STYLE_REGEX = /(?:^|\.)(\w+)(?:\(([^)]*)\))?/g;
8334
8310
  const STRING_REGEX = /^(['"])((?:\\.|(?!\1)[^\\])*)\1$/;
@@ -8356,7 +8332,7 @@ function requireTemplates$1() {
8356
8332
  }
8357
8333
  return ESCAPES.get(c) || c;
8358
8334
  }
8359
- function parseArguments(name2, arguments_) {
8335
+ function parseArguments(name, arguments_) {
8360
8336
  const results = [];
8361
8337
  const chunks = arguments_.trim().split(/\s*,\s*/g);
8362
8338
  let matches;
@@ -8367,7 +8343,7 @@ function requireTemplates$1() {
8367
8343
  } else if (matches = chunk.match(STRING_REGEX)) {
8368
8344
  results.push(matches[2].replace(ESCAPE_REGEX, (m, escape2, character) => escape2 ? unescape(escape2) : character));
8369
8345
  } else {
8370
- throw new Error(`Invalid Chalk template style argument: ${chunk} (in style '${name2}')`);
8346
+ throw new Error(`Invalid Chalk template style argument: ${chunk} (in style '${name}')`);
8371
8347
  }
8372
8348
  }
8373
8349
  return results;
@@ -8377,12 +8353,12 @@ function requireTemplates$1() {
8377
8353
  const results = [];
8378
8354
  let matches;
8379
8355
  while ((matches = STYLE_REGEX.exec(style)) !== null) {
8380
- const name2 = matches[1];
8356
+ const name = matches[1];
8381
8357
  if (matches[2]) {
8382
- const args = parseArguments(name2, matches[2]);
8383
- results.push([name2].concat(args));
8358
+ const args = parseArguments(name, matches[2]);
8359
+ results.push([name].concat(args));
8384
8360
  } else {
8385
- results.push([name2]);
8361
+ results.push([name]);
8386
8362
  }
8387
8363
  }
8388
8364
  return results;
@@ -8406,7 +8382,7 @@ function requireTemplates$1() {
8406
8382
  }
8407
8383
  return current;
8408
8384
  }
8409
- templates$1 = (chalk2, temporary) => {
8385
+ templates = (chalk2, temporary) => {
8410
8386
  const styles2 = [];
8411
8387
  const chunks = [];
8412
8388
  let chunk = [];
@@ -8436,92 +8412,92 @@ function requireTemplates$1() {
8436
8412
  }
8437
8413
  return chunks.join("");
8438
8414
  };
8439
- return templates$1;
8415
+ return templates;
8440
8416
  }
8441
- const ansiStyles$2 = ansiStylesExports$1;
8442
- const { stdout: stdoutColor$1, stderr: stderrColor$1 } = browser$2;
8417
+ const ansiStyles = ansiStylesExports;
8418
+ const { stdout: stdoutColor, stderr: stderrColor } = browser;
8443
8419
  const {
8444
- stringReplaceAll: stringReplaceAll$2,
8445
- stringEncaseCRLFWithFirstIndex: stringEncaseCRLFWithFirstIndex$2
8446
- } = util$1;
8447
- const { isArray: isArray$1 } = Array;
8448
- const levelMapping$1 = [
8420
+ stringReplaceAll,
8421
+ stringEncaseCRLFWithFirstIndex
8422
+ } = util;
8423
+ const { isArray } = Array;
8424
+ const levelMapping = [
8449
8425
  "ansi",
8450
8426
  "ansi",
8451
8427
  "ansi256",
8452
8428
  "ansi16m"
8453
8429
  ];
8454
- const styles$1 = /* @__PURE__ */ Object.create(null);
8455
- const applyOptions$1 = (object, options = {}) => {
8430
+ const styles = /* @__PURE__ */ Object.create(null);
8431
+ const applyOptions = (object, options = {}) => {
8456
8432
  if (options.level && !(Number.isInteger(options.level) && options.level >= 0 && options.level <= 3)) {
8457
8433
  throw new Error("The `level` option should be an integer from 0 to 3");
8458
8434
  }
8459
- const colorLevel = stdoutColor$1 ? stdoutColor$1.level : 0;
8435
+ const colorLevel = stdoutColor ? stdoutColor.level : 0;
8460
8436
  object.level = options.level === void 0 ? colorLevel : options.level;
8461
8437
  };
8462
- let ChalkClass$1 = class ChalkClass {
8438
+ class ChalkClass {
8463
8439
  constructor(options) {
8464
- return chalkFactory$1(options);
8440
+ return chalkFactory(options);
8465
8441
  }
8466
- };
8467
- const chalkFactory$1 = (options) => {
8442
+ }
8443
+ const chalkFactory = (options) => {
8468
8444
  const chalk2 = {};
8469
- applyOptions$1(chalk2, options);
8470
- chalk2.template = (...arguments_) => chalkTag$1(chalk2.template, ...arguments_);
8471
- Object.setPrototypeOf(chalk2, Chalk$1.prototype);
8445
+ applyOptions(chalk2, options);
8446
+ chalk2.template = (...arguments_) => chalkTag(chalk2.template, ...arguments_);
8447
+ Object.setPrototypeOf(chalk2, Chalk.prototype);
8472
8448
  Object.setPrototypeOf(chalk2.template, chalk2);
8473
8449
  chalk2.template.constructor = () => {
8474
8450
  throw new Error("`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.");
8475
8451
  };
8476
- chalk2.template.Instance = ChalkClass$1;
8452
+ chalk2.template.Instance = ChalkClass;
8477
8453
  return chalk2.template;
8478
8454
  };
8479
- function Chalk$1(options) {
8480
- return chalkFactory$1(options);
8455
+ function Chalk(options) {
8456
+ return chalkFactory(options);
8481
8457
  }
8482
- for (const [styleName, style] of Object.entries(ansiStyles$2)) {
8483
- styles$1[styleName] = {
8458
+ for (const [styleName, style] of Object.entries(ansiStyles)) {
8459
+ styles[styleName] = {
8484
8460
  get() {
8485
- const builder = createBuilder$1(this, createStyler$1(style.open, style.close, this._styler), this._isEmpty);
8461
+ const builder = createBuilder(this, createStyler(style.open, style.close, this._styler), this._isEmpty);
8486
8462
  Object.defineProperty(this, styleName, { value: builder });
8487
8463
  return builder;
8488
8464
  }
8489
8465
  };
8490
8466
  }
8491
- styles$1.visible = {
8467
+ styles.visible = {
8492
8468
  get() {
8493
- const builder = createBuilder$1(this, this._styler, true);
8469
+ const builder = createBuilder(this, this._styler, true);
8494
8470
  Object.defineProperty(this, "visible", { value: builder });
8495
8471
  return builder;
8496
8472
  }
8497
8473
  };
8498
- const usedModels$1 = ["rgb", "hex", "keyword", "hsl", "hsv", "hwb", "ansi", "ansi256"];
8499
- for (const model of usedModels$1) {
8500
- styles$1[model] = {
8474
+ const usedModels = ["rgb", "hex", "keyword", "hsl", "hsv", "hwb", "ansi", "ansi256"];
8475
+ for (const model of usedModels) {
8476
+ styles[model] = {
8501
8477
  get() {
8502
8478
  const { level } = this;
8503
8479
  return function(...arguments_) {
8504
- const styler = createStyler$1(ansiStyles$2.color[levelMapping$1[level]][model](...arguments_), ansiStyles$2.color.close, this._styler);
8505
- return createBuilder$1(this, styler, this._isEmpty);
8480
+ const styler = createStyler(ansiStyles.color[levelMapping[level]][model](...arguments_), ansiStyles.color.close, this._styler);
8481
+ return createBuilder(this, styler, this._isEmpty);
8506
8482
  };
8507
8483
  }
8508
8484
  };
8509
8485
  }
8510
- for (const model of usedModels$1) {
8486
+ for (const model of usedModels) {
8511
8487
  const bgModel = "bg" + model[0].toUpperCase() + model.slice(1);
8512
- styles$1[bgModel] = {
8488
+ styles[bgModel] = {
8513
8489
  get() {
8514
8490
  const { level } = this;
8515
8491
  return function(...arguments_) {
8516
- const styler = createStyler$1(ansiStyles$2.bgColor[levelMapping$1[level]][model](...arguments_), ansiStyles$2.bgColor.close, this._styler);
8517
- return createBuilder$1(this, styler, this._isEmpty);
8492
+ const styler = createStyler(ansiStyles.bgColor[levelMapping[level]][model](...arguments_), ansiStyles.bgColor.close, this._styler);
8493
+ return createBuilder(this, styler, this._isEmpty);
8518
8494
  };
8519
8495
  }
8520
8496
  };
8521
8497
  }
8522
- const proto$1 = Object.defineProperties(() => {
8498
+ const proto = Object.defineProperties(() => {
8523
8499
  }, {
8524
- ...styles$1,
8500
+ ...styles,
8525
8501
  level: {
8526
8502
  enumerable: true,
8527
8503
  get() {
@@ -8532,7 +8508,7 @@ const proto$1 = Object.defineProperties(() => {
8532
8508
  }
8533
8509
  }
8534
8510
  });
8535
- const createStyler$1 = (open, close, parent) => {
8511
+ const createStyler = (open, close, parent) => {
8536
8512
  let openAll;
8537
8513
  let closeAll;
8538
8514
  if (parent === void 0) {
@@ -8550,20 +8526,20 @@ const createStyler$1 = (open, close, parent) => {
8550
8526
  parent
8551
8527
  };
8552
8528
  };
8553
- const createBuilder$1 = (self2, _styler, _isEmpty) => {
8529
+ const createBuilder = (self2, _styler, _isEmpty) => {
8554
8530
  const builder = (...arguments_) => {
8555
- if (isArray$1(arguments_[0]) && isArray$1(arguments_[0].raw)) {
8556
- return applyStyle$1(builder, chalkTag$1(builder, ...arguments_));
8531
+ if (isArray(arguments_[0]) && isArray(arguments_[0].raw)) {
8532
+ return applyStyle(builder, chalkTag(builder, ...arguments_));
8557
8533
  }
8558
- return applyStyle$1(builder, arguments_.length === 1 ? "" + arguments_[0] : arguments_.join(" "));
8534
+ return applyStyle(builder, arguments_.length === 1 ? "" + arguments_[0] : arguments_.join(" "));
8559
8535
  };
8560
- Object.setPrototypeOf(builder, proto$1);
8536
+ Object.setPrototypeOf(builder, proto);
8561
8537
  builder._generator = self2;
8562
8538
  builder._styler = _styler;
8563
8539
  builder._isEmpty = _isEmpty;
8564
8540
  return builder;
8565
8541
  };
8566
- const applyStyle$1 = (self2, string) => {
8542
+ const applyStyle = (self2, string) => {
8567
8543
  if (self2.level <= 0 || !string) {
8568
8544
  return self2._isEmpty ? "" : string;
8569
8545
  }
@@ -8574,20 +8550,20 @@ const applyStyle$1 = (self2, string) => {
8574
8550
  const { openAll, closeAll } = styler;
8575
8551
  if (string.indexOf("\x1B") !== -1) {
8576
8552
  while (styler !== void 0) {
8577
- string = stringReplaceAll$2(string, styler.close, styler.open);
8553
+ string = stringReplaceAll(string, styler.close, styler.open);
8578
8554
  styler = styler.parent;
8579
8555
  }
8580
8556
  }
8581
8557
  const lfIndex = string.indexOf("\n");
8582
8558
  if (lfIndex !== -1) {
8583
- string = stringEncaseCRLFWithFirstIndex$2(string, closeAll, openAll, lfIndex);
8559
+ string = stringEncaseCRLFWithFirstIndex(string, closeAll, openAll, lfIndex);
8584
8560
  }
8585
8561
  return openAll + string + closeAll;
8586
8562
  };
8587
- let template$1;
8588
- const chalkTag$1 = (chalk2, ...strings) => {
8563
+ let template;
8564
+ const chalkTag = (chalk2, ...strings) => {
8589
8565
  const [firstString] = strings;
8590
- if (!isArray$1(firstString) || !isArray$1(firstString.raw)) {
8566
+ if (!isArray(firstString) || !isArray(firstString.raw)) {
8591
8567
  return strings.join(" ");
8592
8568
  }
8593
8569
  const arguments_ = strings.slice(1);
@@ -8598,18 +8574,18 @@ const chalkTag$1 = (chalk2, ...strings) => {
8598
8574
  String(firstString.raw[i])
8599
8575
  );
8600
8576
  }
8601
- if (template$1 === void 0) {
8602
- template$1 = requireTemplates$1();
8577
+ if (template === void 0) {
8578
+ template = requireTemplates();
8603
8579
  }
8604
- return template$1(chalk2, parts.join(""));
8580
+ return template(chalk2, parts.join(""));
8605
8581
  };
8606
- Object.defineProperties(Chalk$1.prototype, styles$1);
8607
- const chalk$1 = Chalk$1();
8608
- chalk$1.supportsColor = stdoutColor$1;
8609
- chalk$1.stderr = Chalk$1({ level: stderrColor$1 ? stderrColor$1.level : 0 });
8610
- chalk$1.stderr.supportsColor = stderrColor$1;
8611
- var source = chalk$1;
8612
- const chalk$2 = /* @__PURE__ */ getDefaultExportFromCjs(source);
8582
+ Object.defineProperties(Chalk.prototype, styles);
8583
+ const chalk = Chalk();
8584
+ chalk.supportsColor = stdoutColor;
8585
+ chalk.stderr = Chalk({ level: stderrColor ? stderrColor.level : 0 });
8586
+ chalk.stderr.supportsColor = stderrColor;
8587
+ var source = chalk;
8588
+ const chalk$1 = /* @__PURE__ */ getDefaultExportFromCjs(source);
8613
8589
  const _hoisted_1$4 = { class: "ststitle" };
8614
8590
  const _hoisted_2$3 = {
8615
8591
  key: 0,
@@ -8677,7 +8653,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
8677
8653
  },
8678
8654
  emits: ["myclick"],
8679
8655
  setup(__props, { emit: __emit }) {
8680
- chalk$2.level = 3;
8656
+ chalk$1.level = 3;
8681
8657
  const friendlyTitle = (id) => {
8682
8658
  if (id.length > 30) {
8683
8659
  return store.GetFriendName(props.modelId, id);
@@ -8709,7 +8685,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
8709
8685
  try {
8710
8686
  return (props.instrumentdata[`${Gauge.NETWORK_RX_GAUGE}`].val / 1e6).toFixed(2);
8711
8687
  } catch (error) {
8712
- console.log(chalk$2.red(`${props.instrumentdata}`));
8688
+ console.log(chalk$1.red(`${props.instrumentdata}`));
8713
8689
  return "0.0";
8714
8690
  }
8715
8691
  });
@@ -8717,7 +8693,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
8717
8693
  try {
8718
8694
  return (props.instrumentdata[`${Gauge.NETWORK_TX_GAUGE}`].val / 1e6).toFixed(2);
8719
8695
  } catch (error) {
8720
- console.log(chalk$2.red(`${props.instrumentdata}`));
8696
+ console.log(chalk$1.red(`${props.instrumentdata}`));
8721
8697
  return "0.0";
8722
8698
  }
8723
8699
  });
@@ -9319,7 +9295,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
9319
9295
  },
9320
9296
  emits: ["myclick"],
9321
9297
  setup(__props, { emit: __emit }) {
9322
- chalk$2.level = 3;
9298
+ chalk$1.level = 3;
9323
9299
  const store = ModelStore();
9324
9300
  const emit = __emit;
9325
9301
  const clicked = function(id) {
@@ -9351,10 +9327,10 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
9351
9327
  return topic;
9352
9328
  });
9353
9329
  onMounted(() => {
9354
- console.log(chalk$2.magenta(`onMounted`));
9330
+ console.log(chalk$1.magenta(`onMounted`));
9355
9331
  });
9356
9332
  onBeforeUnmount(() => {
9357
- console.log(chalk$2.magenta(`onBeforeUnmount`));
9333
+ console.log(chalk$1.magenta(`onBeforeUnmount`));
9358
9334
  });
9359
9335
  watch(() => props.instrumentdata, (val) => {
9360
9336
  if (lineChartEx.value && lineChartEx.value) {
@@ -9393,7 +9369,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
9393
9369
  try {
9394
9370
  return props.instrumentdata[`${Gauge.CPU_LOAD_GAUGE}`].val;
9395
9371
  } catch (error) {
9396
- console.log(chalk$2.red(`${props.instrumentdata}`));
9372
+ console.log(chalk$1.red(`${props.instrumentdata}`));
9397
9373
  return 0;
9398
9374
  }
9399
9375
  });
@@ -9401,7 +9377,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
9401
9377
  try {
9402
9378
  return props.instrumentdata[`${Gauge.ACTIVE_REQUEST_GAUGE}`].val;
9403
9379
  } catch (error) {
9404
- console.log(chalk$2.red(`${props.instrumentdata}`));
9380
+ console.log(chalk$1.red(`${props.instrumentdata}`));
9405
9381
  return 0;
9406
9382
  }
9407
9383
  });
@@ -9409,7 +9385,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
9409
9385
  try {
9410
9386
  return `${props.instrumentdata[`${Gauge.REQUEST_COUNT_GAUGE}`].val}/${props.instrumentdata[`${Gauge.ERROR_COUNT_GAUGE}`].val}/${props.instrumentdata[`${Gauge.RETRY_COUNT_GAUGE}`].val}`;
9411
9387
  } catch (error) {
9412
- console.log(chalk$2.red(`${props.instrumentdata}`));
9388
+ console.log(chalk$1.red(`${props.instrumentdata}`));
9413
9389
  return "0/0/0";
9414
9390
  }
9415
9391
  });
@@ -9417,7 +9393,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
9417
9393
  try {
9418
9394
  return props.instrumentdata[`${Gauge.CORE_COUNT_GAUGE}`].val;
9419
9395
  } catch (error) {
9420
- console.log(chalk$2.red(`${props.instrumentdata}`));
9396
+ console.log(chalk$1.red(`${props.instrumentdata}`));
9421
9397
  return 0;
9422
9398
  }
9423
9399
  });
@@ -9425,7 +9401,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
9425
9401
  try {
9426
9402
  return Math.round(props.instrumentdata[`${Gauge.TIMER_GAUGE}`].val);
9427
9403
  } catch (error) {
9428
- console.log(chalk$2.red(`${props.instrumentdata}`));
9404
+ console.log(chalk$1.red(`${props.instrumentdata}`));
9429
9405
  return 0;
9430
9406
  }
9431
9407
  });
@@ -9433,7 +9409,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
9433
9409
  try {
9434
9410
  return (props.instrumentdata[`${Gauge.DURATION_GAUGE}`].val * 100 / 100).toFixed(2);
9435
9411
  } catch (error) {
9436
- console.log(chalk$2.red(`${props.instrumentdata}`));
9412
+ console.log(chalk$1.red(`${props.instrumentdata}`));
9437
9413
  return "0.0";
9438
9414
  }
9439
9415
  });
@@ -9441,7 +9417,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
9441
9417
  try {
9442
9418
  return (props.instrumentdata[`${Gauge.NETWORK_RX_GAUGE}`].val / 1e6).toFixed(2);
9443
9419
  } catch (error) {
9444
- console.log(chalk$2.red(`${props.instrumentdata}`));
9420
+ console.log(chalk$1.red(`${props.instrumentdata}`));
9445
9421
  return "0.0";
9446
9422
  }
9447
9423
  });
@@ -9449,7 +9425,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
9449
9425
  try {
9450
9426
  return (props.instrumentdata[`${Gauge.NETWORK_TX_GAUGE}`].val / 1e6).toFixed(2);
9451
9427
  } catch (error) {
9452
- console.log(chalk$2.red(`${props.instrumentdata}`));
9428
+ console.log(chalk$1.red(`${props.instrumentdata}`));
9453
9429
  return "0.0";
9454
9430
  }
9455
9431
  });
@@ -9457,7 +9433,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
9457
9433
  try {
9458
9434
  return (props.instrumentdata[`${Gauge.LATENCY_GAUGE}`].val * 100 / 100).toFixed(2);
9459
9435
  } catch (error) {
9460
- console.log(chalk$2.red(`${props.instrumentdata}`));
9436
+ console.log(chalk$1.red(`${props.instrumentdata}`));
9461
9437
  return "0.0";
9462
9438
  }
9463
9439
  });
@@ -9465,7 +9441,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
9465
9441
  try {
9466
9442
  return `${props.instrumentdata[`${Gauge.CONNECTION_POOL_TOTAL_GAUGE}`].val}/${props.instrumentdata[`${Gauge.CONNECTION_POOL_IDLE_GAUGE}`].val}/${props.instrumentdata[`${Gauge.CONNECTION_POOL_WAITING_GAUGE}`].val}`;
9467
9443
  } catch (error) {
9468
- console.log(chalk$2.red(`${props.instrumentdata}`));
9444
+ console.log(chalk$1.red(`${props.instrumentdata}`));
9469
9445
  return "[Unknown]";
9470
9446
  }
9471
9447
  });
@@ -9473,7 +9449,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
9473
9449
  try {
9474
9450
  return `${props.instrumentdata[`${Gauge.AUTHENTICATION_COUNT_GAUGE}`].val}/${props.instrumentdata[`${Gauge.AUTHENTICATION_ERROR_COUNT_GAUGE}`].val}/${props.instrumentdata[`${Gauge.AUTHENTICATION_RETRY_COUNT_GAUGE}`].val}`;
9475
9451
  } catch (error) {
9476
- console.log(chalk$2.red(`${props.instrumentdata}`));
9452
+ console.log(chalk$1.red(`${props.instrumentdata}`));
9477
9453
  return "[Unknown]";
9478
9454
  }
9479
9455
  });
@@ -9481,7 +9457,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
9481
9457
  try {
9482
9458
  return props.instrumentdata[`${Gauge.ACTIVE_REQUEST_GAUGE}`].val / 20 * 100;
9483
9459
  } catch (error) {
9484
- console.log(chalk$2.red(`${props.instrumentdata}`));
9460
+ console.log(chalk$1.red(`${props.instrumentdata}`));
9485
9461
  return 0;
9486
9462
  }
9487
9463
  });
@@ -9489,7 +9465,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
9489
9465
  try {
9490
9466
  return props.instrumentdata[`${Gauge.CONNECTION_COUNT_GAUGE}`].val;
9491
9467
  } catch (error) {
9492
- console.log(chalk$2.red(`${props.instrumentdata}`));
9468
+ console.log(chalk$1.red(`${props.instrumentdata}`));
9493
9469
  return 0;
9494
9470
  }
9495
9471
  });
@@ -9497,7 +9473,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
9497
9473
  try {
9498
9474
  return props.instrumentdata[`${Gauge.CONNECTION_COUNT_GAUGE}`].val / 20 * 100;
9499
9475
  } catch (error) {
9500
- console.log(chalk$2.red(`${props.instrumentdata}`));
9476
+ console.log(chalk$1.red(`${props.instrumentdata}`));
9501
9477
  return 0;
9502
9478
  }
9503
9479
  });
@@ -9505,7 +9481,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
9505
9481
  try {
9506
9482
  return props.instrumentdata[`${Gauge.VELOCITY_GAUGE}`].val;
9507
9483
  } catch (error) {
9508
- console.log(chalk$2.red(`${props.instrumentdata}`));
9484
+ console.log(chalk$1.red(`${props.instrumentdata}`));
9509
9485
  return 0;
9510
9486
  }
9511
9487
  });
@@ -9513,7 +9489,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
9513
9489
  try {
9514
9490
  return props.instrumentdata[`${Gauge.VELOCITY_GAUGE}`].va / 1e3 * 100;
9515
9491
  } catch (error) {
9516
- console.log(chalk$2.red(`${props.instrumentdata}`));
9492
+ console.log(chalk$1.red(`${props.instrumentdata}`));
9517
9493
  return 0;
9518
9494
  }
9519
9495
  });
@@ -9832,7 +9808,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
9832
9808
  },
9833
9809
  emits: ["myclick"],
9834
9810
  setup(__props, { emit: __emit }) {
9835
- chalk$2.level = 3;
9811
+ chalk$1.level = 3;
9836
9812
  const store = ModelStore();
9837
9813
  const props = __props;
9838
9814
  const emit = __emit;
@@ -9854,7 +9830,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
9854
9830
  try {
9855
9831
  return model.instruments[`${Gauge.CPU_LOAD_GAUGE}`].val;
9856
9832
  } catch (error) {
9857
- console.log(chalk$2.red(`${error}`));
9833
+ console.log(chalk$1.red(`${error}`));
9858
9834
  }
9859
9835
  };
9860
9836
  const navigate = function(id) {
@@ -9915,2252 +9891,114 @@ function v4(options, buf, offset) {
9915
9891
  rnds[8] = rnds[8] & 63 | 128;
9916
9892
  return unsafeStringify(rnds);
9917
9893
  }
9918
- const http = {};
9919
- const fs$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
9920
- __proto__: null,
9921
- default: http
9922
- }, Symbol.toStringTag, { value: "Module" }));
9923
- var main$1 = { exports: {} };
9924
- const require$$3 = /* @__PURE__ */ getAugmentedNamespace(fs$1);
9925
- const name = "dotenv";
9926
- const version$1 = "16.4.5";
9927
- const description = "Loads environment variables from .env file";
9928
- const main = "lib/main.js";
9929
- const types = "lib/main.d.ts";
9930
- const exports = {
9931
- ".": {
9932
- types: "./lib/main.d.ts",
9933
- require: "./lib/main.js",
9934
- "default": "./lib/main.js"
9935
- },
9936
- "./config": "./config.js",
9937
- "./config.js": "./config.js",
9938
- "./lib/env-options": "./lib/env-options.js",
9939
- "./lib/env-options.js": "./lib/env-options.js",
9940
- "./lib/cli-options": "./lib/cli-options.js",
9941
- "./lib/cli-options.js": "./lib/cli-options.js",
9942
- "./package.json": "./package.json"
9943
- };
9944
- const scripts = {
9945
- "dts-check": "tsc --project tests/types/tsconfig.json",
9946
- lint: "standard",
9947
- "lint-readme": "standard-markdown",
9948
- pretest: "npm run lint && npm run dts-check",
9949
- test: "tap tests/*.js --100 -Rspec",
9950
- "test:coverage": "tap --coverage-report=lcov",
9951
- prerelease: "npm test",
9952
- release: "standard-version"
9953
- };
9954
- const repository = {
9955
- type: "git",
9956
- url: "git://github.com/motdotla/dotenv.git"
9957
- };
9958
- const funding = "https://dotenvx.com";
9959
- const keywords = [
9960
- "dotenv",
9961
- "env",
9962
- ".env",
9963
- "environment",
9964
- "variables",
9965
- "config",
9966
- "settings"
9967
- ];
9968
- const readmeFilename = "README.md";
9969
- const license = "BSD-2-Clause";
9970
- const devDependencies = {
9971
- "@definitelytyped/dtslint": "^0.0.133",
9972
- "@types/node": "^18.11.3",
9973
- decache: "^4.6.1",
9974
- sinon: "^14.0.1",
9975
- standard: "^17.0.0",
9976
- "standard-markdown": "^7.1.0",
9977
- "standard-version": "^9.5.0",
9978
- tap: "^16.3.0",
9979
- tar: "^6.1.11",
9980
- typescript: "^4.8.4"
9981
- };
9982
- const engines = {
9983
- node: ">=12"
9984
- };
9985
- const browser$1 = {
9986
- fs: false
9987
- };
9988
- const require$$4 = {
9989
- name,
9990
- version: version$1,
9991
- description,
9992
- main,
9993
- types,
9994
- exports,
9995
- scripts,
9996
- repository,
9997
- funding,
9998
- keywords,
9999
- readmeFilename,
10000
- license,
10001
- devDependencies,
10002
- engines,
10003
- browser: browser$1
9894
+ var __typeError2 = (msg) => {
9895
+ throw TypeError(msg);
10004
9896
  };
10005
- const fs = require$$3;
10006
- const path = require$$3;
10007
- const os = require$$3;
10008
- const crypto$1 = require$$3;
10009
- const packageJson = require$$4;
10010
- const version = packageJson.version;
10011
- const LINE = /(?:^|^)\s*(?:export\s+)?([\w.-]+)(?:\s*=\s*?|:\s+?)(\s*'(?:\\'|[^'])*'|\s*"(?:\\"|[^"])*"|\s*`(?:\\`|[^`])*`|[^#\r\n]+)?\s*(?:#.*)?(?:$|$)/mg;
10012
- function parse(src) {
10013
- const obj = {};
10014
- let lines = src.toString();
10015
- lines = lines.replace(/\r\n?/mg, "\n");
10016
- let match;
10017
- while ((match = LINE.exec(lines)) != null) {
10018
- const key = match[1];
10019
- let value = match[2] || "";
10020
- value = value.trim();
10021
- const maybeQuote = value[0];
10022
- value = value.replace(/^(['"`])([\s\S]*)\1$/mg, "$2");
10023
- if (maybeQuote === '"') {
10024
- value = value.replace(/\\n/g, "\n");
10025
- value = value.replace(/\\r/g, "\r");
10026
- }
10027
- obj[key] = value;
10028
- }
10029
- return obj;
10030
- }
10031
- function _parseVault(options) {
10032
- const vaultPath = _vaultPath(options);
10033
- const result = DotenvModule.configDotenv({ path: vaultPath });
10034
- if (!result.parsed) {
10035
- const err = new Error(`MISSING_DATA: Cannot parse ${vaultPath} for an unknown reason`);
10036
- err.code = "MISSING_DATA";
10037
- throw err;
10038
- }
10039
- const keys = _dotenvKey(options).split(",");
10040
- const length = keys.length;
10041
- let decrypted;
10042
- for (let i = 0; i < length; i++) {
10043
- try {
10044
- const key = keys[i].trim();
10045
- const attrs = _instructions(result, key);
10046
- decrypted = DotenvModule.decrypt(attrs.ciphertext, attrs.key);
10047
- break;
10048
- } catch (error) {
10049
- if (i + 1 >= length) {
10050
- throw error;
10051
- }
10052
- }
10053
- }
10054
- return DotenvModule.parse(decrypted);
10055
- }
10056
- function _log(message) {
10057
- console.log(`[dotenv@${version}][INFO] ${message}`);
10058
- }
10059
- function _warn(message) {
10060
- console.log(`[dotenv@${version}][WARN] ${message}`);
10061
- }
10062
- function _debug(message) {
10063
- console.log(`[dotenv@${version}][DEBUG] ${message}`);
10064
- }
10065
- function _dotenvKey(options) {
10066
- if (options && options.DOTENV_KEY && options.DOTENV_KEY.length > 0) {
10067
- return options.DOTENV_KEY;
10068
- }
10069
- if (process.env.DOTENV_KEY && process.env.DOTENV_KEY.length > 0) {
10070
- return process.env.DOTENV_KEY;
10071
- }
10072
- return "";
10073
- }
10074
- function _instructions(result, dotenvKey) {
10075
- let uri;
10076
- try {
10077
- uri = new URL(dotenvKey);
10078
- } catch (error) {
10079
- if (error.code === "ERR_INVALID_URL") {
10080
- const err = new Error("INVALID_DOTENV_KEY: Wrong format. Must be in valid uri format like dotenv://:key_1234@dotenvx.com/vault/.env.vault?environment=development");
10081
- err.code = "INVALID_DOTENV_KEY";
10082
- throw err;
10083
- }
10084
- throw error;
10085
- }
10086
- const key = uri.password;
10087
- if (!key) {
10088
- const err = new Error("INVALID_DOTENV_KEY: Missing key part");
10089
- err.code = "INVALID_DOTENV_KEY";
10090
- throw err;
10091
- }
10092
- const environment = uri.searchParams.get("environment");
10093
- if (!environment) {
10094
- const err = new Error("INVALID_DOTENV_KEY: Missing environment part");
10095
- err.code = "INVALID_DOTENV_KEY";
10096
- throw err;
9897
+ var __accessCheck2 = (obj, member, msg) => member.has(obj) || __typeError2("Cannot " + msg);
9898
+ var __privateGet2 = (obj, member, getter) => (__accessCheck2(obj, member, "read from private field"), getter ? getter.call(obj) : member.get(obj));
9899
+ var __privateAdd2 = (obj, member, value) => member.has(obj) ? __typeError2("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
9900
+ var __privateSet2 = (obj, member, value, setter) => (__accessCheck2(obj, member, "write to private field"), member.set(obj, value), value);
9901
+ var __privateMethod = (obj, member, method) => (__accessCheck2(obj, member, "access private method"), method);
9902
+ var _options, _sockets, _SocketIoClientHelper_instances, LogDebugMessage_fn, LogErrorMessage_fn, EstablishSocketConnect_fn;
9903
+ const isNode = Object.prototype.toString.call(typeof process !== "undefined" ? process : 0) === "[object process]";
9904
+ class SocketIoClientHelper {
9905
+ constructor(options) {
9906
+ __privateAdd2(this, _SocketIoClientHelper_instances);
9907
+ __privateAdd2(this, _options);
9908
+ __privateAdd2(this, _sockets, {});
9909
+ __privateSet2(this, _options, options);
10097
9910
  }
10098
- const environmentKey = `DOTENV_VAULT_${environment.toUpperCase()}`;
10099
- const ciphertext = result.parsed[environmentKey];
10100
- if (!ciphertext) {
10101
- const err = new Error(`NOT_FOUND_DOTENV_ENVIRONMENT: Cannot locate environment ${environmentKey} in your .env.vault file.`);
10102
- err.code = "NOT_FOUND_DOTENV_ENVIRONMENT";
10103
- throw err;
9911
+ get sockets() {
9912
+ return __privateGet2(this, _sockets);
10104
9913
  }
10105
- return { ciphertext, key };
10106
- }
10107
- function _vaultPath(options) {
10108
- let possibleVaultPath = null;
10109
- if (options && options.path && options.path.length > 0) {
10110
- if (Array.isArray(options.path)) {
10111
- for (const filepath of options.path) {
10112
- if (fs.existsSync(filepath)) {
10113
- possibleVaultPath = filepath.endsWith(".vault") ? filepath : `${filepath}.vault`;
10114
- }
10115
- }
10116
- } else {
10117
- possibleVaultPath = options.path.endsWith(".vault") ? options.path : `${options.path}.vault`;
10118
- }
10119
- } else {
10120
- possibleVaultPath = path.resolve(process.cwd(), ".env.vault");
9914
+ SetupClientSideSocket(name, address, onConnectCallBack, socketEventsCallBack, errorCallBack) {
9915
+ this.sockets[name] = {
9916
+ name,
9917
+ address,
9918
+ socket: null,
9919
+ errorCallBack
9920
+ };
9921
+ __privateMethod(this, _SocketIoClientHelper_instances, EstablishSocketConnect_fn).call(this, name, onConnectCallBack, socketEventsCallBack);
9922
+ return this.sockets[name].socket;
10121
9923
  }
10122
- if (fs.existsSync(possibleVaultPath)) {
10123
- return possibleVaultPath;
9924
+ GetSocket(name) {
9925
+ return this.sockets[name].socket;
10124
9926
  }
10125
- return null;
10126
- }
10127
- function _resolveHome(envPath) {
10128
- return envPath[0] === "~" ? path.join(os.homedir(), envPath.slice(1)) : envPath;
10129
- }
10130
- function _configVault(options) {
10131
- _log("Loading env from encrypted .env.vault");
10132
- const parsed = DotenvModule._parseVault(options);
10133
- let processEnv = process.env;
10134
- if (options && options.processEnv != null) {
10135
- processEnv = options.processEnv;
9927
+ GetSocketDetail(name) {
9928
+ return this.sockets[name];
10136
9929
  }
10137
- DotenvModule.populate(processEnv, parsed, options);
10138
- return { parsed };
10139
9930
  }
10140
- function configDotenv(options) {
10141
- const dotenvPath = path.resolve(process.cwd(), ".env");
10142
- let encoding = "utf8";
10143
- const debug = Boolean(options && options.debug);
10144
- if (options && options.encoding) {
10145
- encoding = options.encoding;
10146
- } else {
10147
- if (debug) {
10148
- _debug("No encoding is specified. UTF-8 is used by default");
9931
+ _options = /* @__PURE__ */ new WeakMap();
9932
+ _sockets = /* @__PURE__ */ new WeakMap();
9933
+ _SocketIoClientHelper_instances = /* @__PURE__ */ new WeakSet();
9934
+ LogDebugMessage_fn = function(message) {
9935
+ if (__privateGet2(this, _options).logger) __privateGet2(this, _options).logger.debug(message);
9936
+ };
9937
+ LogErrorMessage_fn = function(message) {
9938
+ if (__privateGet2(this, _options).logger) __privateGet2(this, _options).logger.error(message);
9939
+ };
9940
+ EstablishSocketConnect_fn = function(name, onConnectCallBack, socketEventsCallBack) {
9941
+ const socketDetail = this.sockets[name];
9942
+ if (socketDetail.socket !== null) {
9943
+ if (socketDetail.socket.connected === true) {
9944
+ socketDetail.socket.disconnect();
10149
9945
  }
10150
- }
10151
- let optionPaths = [dotenvPath];
10152
- if (options && options.path) {
10153
- if (!Array.isArray(options.path)) {
10154
- optionPaths = [_resolveHome(options.path)];
9946
+ socketDetail.socket = null;
9947
+ if (isNode) {
9948
+ setTimeout(() => __privateMethod(this, _SocketIoClientHelper_instances, EstablishSocketConnect_fn).call(this, name, onConnectCallBack, socketEventsCallBack), 100).unref();
10155
9949
  } else {
10156
- optionPaths = [];
10157
- for (const filepath of options.path) {
10158
- optionPaths.push(_resolveHome(filepath));
10159
- }
9950
+ setTimeout(() => __privateMethod(this, _SocketIoClientHelper_instances, EstablishSocketConnect_fn).call(this, name, onConnectCallBack, socketEventsCallBack), 100);
10160
9951
  }
9952
+ return;
10161
9953
  }
10162
- let lastError;
10163
- const parsedAll = {};
10164
- for (const path2 of optionPaths) {
10165
- try {
10166
- const parsed = DotenvModule.parse(fs.readFileSync(path2, { encoding }));
10167
- DotenvModule.populate(parsedAll, parsed, options);
10168
- } catch (e) {
10169
- if (debug) {
10170
- _debug(`Failed to load ${path2} ${e.message}`);
10171
- }
10172
- lastError = e;
9954
+ let socketOptions;
9955
+ if (isNode) {
9956
+ socketOptions = {
9957
+ transports: ["websocket"]
9958
+ };
9959
+ if (__privateGet2(this, _options).agentManager) {
9960
+ socketOptions.agent = __privateGet2(this, _options).agentManager.GetAgent(socketDetail.address);
10173
9961
  }
10174
- }
10175
- let processEnv = process.env;
10176
- if (options && options.processEnv != null) {
10177
- processEnv = options.processEnv;
10178
- }
10179
- DotenvModule.populate(processEnv, parsedAll, options);
10180
- if (lastError) {
10181
- return { parsed: parsedAll, error: lastError };
10182
9962
  } else {
10183
- return { parsed: parsedAll };
10184
- }
10185
- }
10186
- function config(options) {
10187
- if (_dotenvKey(options).length === 0) {
10188
- return DotenvModule.configDotenv(options);
10189
- }
10190
- const vaultPath = _vaultPath(options);
10191
- if (!vaultPath) {
10192
- _warn(`You set DOTENV_KEY but you are missing a .env.vault file at ${vaultPath}. Did you forget to build it?`);
10193
- return DotenvModule.configDotenv(options);
10194
- }
10195
- return DotenvModule._configVault(options);
10196
- }
10197
- function decrypt(encrypted, keyStr) {
10198
- const key = Buffer.from(keyStr.slice(-64), "hex");
10199
- let ciphertext = Buffer.from(encrypted, "base64");
10200
- const nonce = ciphertext.subarray(0, 12);
10201
- const authTag = ciphertext.subarray(-16);
10202
- ciphertext = ciphertext.subarray(12, -16);
10203
- try {
10204
- const aesgcm = crypto$1.createDecipheriv("aes-256-gcm", key, nonce);
10205
- aesgcm.setAuthTag(authTag);
10206
- return `${aesgcm.update(ciphertext)}${aesgcm.final()}`;
10207
- } catch (error) {
10208
- const isRange = error instanceof RangeError;
10209
- const invalidKeyLength = error.message === "Invalid key length";
10210
- const decryptionFailed = error.message === "Unsupported state or unable to authenticate data";
10211
- if (isRange || invalidKeyLength) {
10212
- const err = new Error("INVALID_DOTENV_KEY: It must be 64 characters long (or more)");
10213
- err.code = "INVALID_DOTENV_KEY";
10214
- throw err;
10215
- } else if (decryptionFailed) {
10216
- const err = new Error("DECRYPTION_FAILED: Please check your DOTENV_KEY");
10217
- err.code = "DECRYPTION_FAILED";
10218
- throw err;
10219
- } else {
10220
- throw error;
10221
- }
10222
- }
10223
- }
10224
- function populate(processEnv, parsed, options = {}) {
10225
- const debug = Boolean(options && options.debug);
10226
- const override = Boolean(options && options.override);
10227
- if (typeof parsed !== "object") {
10228
- const err = new Error("OBJECT_REQUIRED: Please check the processEnv argument being passed to populate");
10229
- err.code = "OBJECT_REQUIRED";
10230
- throw err;
9963
+ socketOptions = {
9964
+ transports: ["websocket"]
9965
+ };
10231
9966
  }
10232
- for (const key of Object.keys(parsed)) {
10233
- if (Object.prototype.hasOwnProperty.call(processEnv, key)) {
10234
- if (override === true) {
10235
- processEnv[key] = parsed[key];
10236
- }
10237
- if (debug) {
10238
- if (override === true) {
10239
- _debug(`"${key}" is already defined and WAS overwritten`);
10240
- } else {
10241
- _debug(`"${key}" is already defined and was NOT overwritten`);
10242
- }
9967
+ socketDetail.socket = io(socketDetail.address, socketOptions);
9968
+ socketDetail.socket.on("connect", () => {
9969
+ if (socketDetail.socket) {
9970
+ __privateMethod(this, _SocketIoClientHelper_instances, LogDebugMessage_fn).call(this, `Socket: [${socketDetail.socket.id}]: connected`);
9971
+ if (onConnectCallBack) {
9972
+ setTimeout(() => {
9973
+ onConnectCallBack(socketDetail.socket);
9974
+ }, 0);
9975
+ }
9976
+ if (socketEventsCallBack) {
9977
+ socketEventsCallBack(socketDetail.socket);
10243
9978
  }
10244
9979
  } else {
10245
- processEnv[key] = parsed[key];
10246
- }
10247
- }
10248
- }
10249
- const DotenvModule = {
10250
- configDotenv,
10251
- _configVault,
10252
- _parseVault,
10253
- config,
10254
- decrypt,
10255
- parse,
10256
- populate
10257
- };
10258
- main$1.exports.configDotenv = DotenvModule.configDotenv;
10259
- main$1.exports._configVault = DotenvModule._configVault;
10260
- main$1.exports._parseVault = DotenvModule._parseVault;
10261
- var config_1 = main$1.exports.config = DotenvModule.config;
10262
- main$1.exports.decrypt = DotenvModule.decrypt;
10263
- main$1.exports.parse = DotenvModule.parse;
10264
- main$1.exports.populate = DotenvModule.populate;
10265
- main$1.exports = DotenvModule;
10266
- var __typeError$1 = (msg) => {
10267
- throw TypeError(msg);
10268
- };
10269
- var __accessCheck$1 = (obj, member, msg) => member.has(obj) || __typeError$1("Cannot " + msg);
10270
- var __privateGet$1 = (obj, member, getter) => (__accessCheck$1(obj, member, "read from private field"), getter ? getter.call(obj) : member.get(obj));
10271
- var __privateAdd$1 = (obj, member, value) => member.has(obj) ? __typeError$1("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
10272
- var __privateSet$1 = (obj, member, value, setter) => (__accessCheck$1(obj, member, "write to private field"), member.set(obj, value), value);
10273
- var __privateWrapper = (obj, member, setter, getter) => ({
10274
- set _(value) {
10275
- __privateSet$1(obj, member, value);
10276
- },
10277
- get _() {
10278
- return __privateGet$1(obj, member, getter);
10279
- }
10280
- });
10281
- var _options$1, _httpAgent, _httpsAgent, _agentResetInterval, _requestCount, _SetupResetInterval, _GetAgentOptions;
10282
- var ansiStyles$1 = { exports: {} };
10283
- var colorName;
10284
- var hasRequiredColorName;
10285
- function requireColorName() {
10286
- if (hasRequiredColorName) return colorName;
10287
- hasRequiredColorName = 1;
10288
- colorName = {
10289
- "aliceblue": [240, 248, 255],
10290
- "antiquewhite": [250, 235, 215],
10291
- "aqua": [0, 255, 255],
10292
- "aquamarine": [127, 255, 212],
10293
- "azure": [240, 255, 255],
10294
- "beige": [245, 245, 220],
10295
- "bisque": [255, 228, 196],
10296
- "black": [0, 0, 0],
10297
- "blanchedalmond": [255, 235, 205],
10298
- "blue": [0, 0, 255],
10299
- "blueviolet": [138, 43, 226],
10300
- "brown": [165, 42, 42],
10301
- "burlywood": [222, 184, 135],
10302
- "cadetblue": [95, 158, 160],
10303
- "chartreuse": [127, 255, 0],
10304
- "chocolate": [210, 105, 30],
10305
- "coral": [255, 127, 80],
10306
- "cornflowerblue": [100, 149, 237],
10307
- "cornsilk": [255, 248, 220],
10308
- "crimson": [220, 20, 60],
10309
- "cyan": [0, 255, 255],
10310
- "darkblue": [0, 0, 139],
10311
- "darkcyan": [0, 139, 139],
10312
- "darkgoldenrod": [184, 134, 11],
10313
- "darkgray": [169, 169, 169],
10314
- "darkgreen": [0, 100, 0],
10315
- "darkgrey": [169, 169, 169],
10316
- "darkkhaki": [189, 183, 107],
10317
- "darkmagenta": [139, 0, 139],
10318
- "darkolivegreen": [85, 107, 47],
10319
- "darkorange": [255, 140, 0],
10320
- "darkorchid": [153, 50, 204],
10321
- "darkred": [139, 0, 0],
10322
- "darksalmon": [233, 150, 122],
10323
- "darkseagreen": [143, 188, 143],
10324
- "darkslateblue": [72, 61, 139],
10325
- "darkslategray": [47, 79, 79],
10326
- "darkslategrey": [47, 79, 79],
10327
- "darkturquoise": [0, 206, 209],
10328
- "darkviolet": [148, 0, 211],
10329
- "deeppink": [255, 20, 147],
10330
- "deepskyblue": [0, 191, 255],
10331
- "dimgray": [105, 105, 105],
10332
- "dimgrey": [105, 105, 105],
10333
- "dodgerblue": [30, 144, 255],
10334
- "firebrick": [178, 34, 34],
10335
- "floralwhite": [255, 250, 240],
10336
- "forestgreen": [34, 139, 34],
10337
- "fuchsia": [255, 0, 255],
10338
- "gainsboro": [220, 220, 220],
10339
- "ghostwhite": [248, 248, 255],
10340
- "gold": [255, 215, 0],
10341
- "goldenrod": [218, 165, 32],
10342
- "gray": [128, 128, 128],
10343
- "green": [0, 128, 0],
10344
- "greenyellow": [173, 255, 47],
10345
- "grey": [128, 128, 128],
10346
- "honeydew": [240, 255, 240],
10347
- "hotpink": [255, 105, 180],
10348
- "indianred": [205, 92, 92],
10349
- "indigo": [75, 0, 130],
10350
- "ivory": [255, 255, 240],
10351
- "khaki": [240, 230, 140],
10352
- "lavender": [230, 230, 250],
10353
- "lavenderblush": [255, 240, 245],
10354
- "lawngreen": [124, 252, 0],
10355
- "lemonchiffon": [255, 250, 205],
10356
- "lightblue": [173, 216, 230],
10357
- "lightcoral": [240, 128, 128],
10358
- "lightcyan": [224, 255, 255],
10359
- "lightgoldenrodyellow": [250, 250, 210],
10360
- "lightgray": [211, 211, 211],
10361
- "lightgreen": [144, 238, 144],
10362
- "lightgrey": [211, 211, 211],
10363
- "lightpink": [255, 182, 193],
10364
- "lightsalmon": [255, 160, 122],
10365
- "lightseagreen": [32, 178, 170],
10366
- "lightskyblue": [135, 206, 250],
10367
- "lightslategray": [119, 136, 153],
10368
- "lightslategrey": [119, 136, 153],
10369
- "lightsteelblue": [176, 196, 222],
10370
- "lightyellow": [255, 255, 224],
10371
- "lime": [0, 255, 0],
10372
- "limegreen": [50, 205, 50],
10373
- "linen": [250, 240, 230],
10374
- "magenta": [255, 0, 255],
10375
- "maroon": [128, 0, 0],
10376
- "mediumaquamarine": [102, 205, 170],
10377
- "mediumblue": [0, 0, 205],
10378
- "mediumorchid": [186, 85, 211],
10379
- "mediumpurple": [147, 112, 219],
10380
- "mediumseagreen": [60, 179, 113],
10381
- "mediumslateblue": [123, 104, 238],
10382
- "mediumspringgreen": [0, 250, 154],
10383
- "mediumturquoise": [72, 209, 204],
10384
- "mediumvioletred": [199, 21, 133],
10385
- "midnightblue": [25, 25, 112],
10386
- "mintcream": [245, 255, 250],
10387
- "mistyrose": [255, 228, 225],
10388
- "moccasin": [255, 228, 181],
10389
- "navajowhite": [255, 222, 173],
10390
- "navy": [0, 0, 128],
10391
- "oldlace": [253, 245, 230],
10392
- "olive": [128, 128, 0],
10393
- "olivedrab": [107, 142, 35],
10394
- "orange": [255, 165, 0],
10395
- "orangered": [255, 69, 0],
10396
- "orchid": [218, 112, 214],
10397
- "palegoldenrod": [238, 232, 170],
10398
- "palegreen": [152, 251, 152],
10399
- "paleturquoise": [175, 238, 238],
10400
- "palevioletred": [219, 112, 147],
10401
- "papayawhip": [255, 239, 213],
10402
- "peachpuff": [255, 218, 185],
10403
- "peru": [205, 133, 63],
10404
- "pink": [255, 192, 203],
10405
- "plum": [221, 160, 221],
10406
- "powderblue": [176, 224, 230],
10407
- "purple": [128, 0, 128],
10408
- "rebeccapurple": [102, 51, 153],
10409
- "red": [255, 0, 0],
10410
- "rosybrown": [188, 143, 143],
10411
- "royalblue": [65, 105, 225],
10412
- "saddlebrown": [139, 69, 19],
10413
- "salmon": [250, 128, 114],
10414
- "sandybrown": [244, 164, 96],
10415
- "seagreen": [46, 139, 87],
10416
- "seashell": [255, 245, 238],
10417
- "sienna": [160, 82, 45],
10418
- "silver": [192, 192, 192],
10419
- "skyblue": [135, 206, 235],
10420
- "slateblue": [106, 90, 205],
10421
- "slategray": [112, 128, 144],
10422
- "slategrey": [112, 128, 144],
10423
- "snow": [255, 250, 250],
10424
- "springgreen": [0, 255, 127],
10425
- "steelblue": [70, 130, 180],
10426
- "tan": [210, 180, 140],
10427
- "teal": [0, 128, 128],
10428
- "thistle": [216, 191, 216],
10429
- "tomato": [255, 99, 71],
10430
- "turquoise": [64, 224, 208],
10431
- "violet": [238, 130, 238],
10432
- "wheat": [245, 222, 179],
10433
- "white": [255, 255, 255],
10434
- "whitesmoke": [245, 245, 245],
10435
- "yellow": [255, 255, 0],
10436
- "yellowgreen": [154, 205, 50]
10437
- };
10438
- return colorName;
10439
- }
10440
- var conversions;
10441
- var hasRequiredConversions;
10442
- function requireConversions() {
10443
- if (hasRequiredConversions) return conversions;
10444
- hasRequiredConversions = 1;
10445
- const cssKeywords = requireColorName();
10446
- const reverseKeywords = {};
10447
- for (const key of Object.keys(cssKeywords)) {
10448
- reverseKeywords[cssKeywords[key]] = key;
10449
- }
10450
- const convert = {
10451
- rgb: { channels: 3, labels: "rgb" },
10452
- hsl: { channels: 3, labels: "hsl" },
10453
- hsv: { channels: 3, labels: "hsv" },
10454
- hwb: { channels: 3, labels: "hwb" },
10455
- cmyk: { channels: 4, labels: "cmyk" },
10456
- xyz: { channels: 3, labels: "xyz" },
10457
- lab: { channels: 3, labels: "lab" },
10458
- lch: { channels: 3, labels: "lch" },
10459
- hex: { channels: 1, labels: ["hex"] },
10460
- keyword: { channels: 1, labels: ["keyword"] },
10461
- ansi16: { channels: 1, labels: ["ansi16"] },
10462
- ansi256: { channels: 1, labels: ["ansi256"] },
10463
- hcg: { channels: 3, labels: ["h", "c", "g"] },
10464
- apple: { channels: 3, labels: ["r16", "g16", "b16"] },
10465
- gray: { channels: 1, labels: ["gray"] }
10466
- };
10467
- conversions = convert;
10468
- for (const model of Object.keys(convert)) {
10469
- if (!("channels" in convert[model])) {
10470
- throw new Error("missing channels property: " + model);
10471
- }
10472
- if (!("labels" in convert[model])) {
10473
- throw new Error("missing channel labels property: " + model);
10474
- }
10475
- if (convert[model].labels.length !== convert[model].channels) {
10476
- throw new Error("channel and label counts mismatch: " + model);
10477
- }
10478
- const { channels, labels } = convert[model];
10479
- delete convert[model].channels;
10480
- delete convert[model].labels;
10481
- Object.defineProperty(convert[model], "channels", { value: channels });
10482
- Object.defineProperty(convert[model], "labels", { value: labels });
10483
- }
10484
- convert.rgb.hsl = function(rgb) {
10485
- const r = rgb[0] / 255;
10486
- const g = rgb[1] / 255;
10487
- const b = rgb[2] / 255;
10488
- const min = Math.min(r, g, b);
10489
- const max = Math.max(r, g, b);
10490
- const delta2 = max - min;
10491
- let h;
10492
- let s;
10493
- if (max === min) {
10494
- h = 0;
10495
- } else if (r === max) {
10496
- h = (g - b) / delta2;
10497
- } else if (g === max) {
10498
- h = 2 + (b - r) / delta2;
10499
- } else if (b === max) {
10500
- h = 4 + (r - g) / delta2;
10501
- }
10502
- h = Math.min(h * 60, 360);
10503
- if (h < 0) {
10504
- h += 360;
10505
- }
10506
- const l = (min + max) / 2;
10507
- if (max === min) {
10508
- s = 0;
10509
- } else if (l <= 0.5) {
10510
- s = delta2 / (max + min);
10511
- } else {
10512
- s = delta2 / (2 - max - min);
10513
- }
10514
- return [h, s * 100, l * 100];
10515
- };
10516
- convert.rgb.hsv = function(rgb) {
10517
- let rdif;
10518
- let gdif;
10519
- let bdif;
10520
- let h;
10521
- let s;
10522
- const r = rgb[0] / 255;
10523
- const g = rgb[1] / 255;
10524
- const b = rgb[2] / 255;
10525
- const v = Math.max(r, g, b);
10526
- const diff = v - Math.min(r, g, b);
10527
- const diffc = function(c) {
10528
- return (v - c) / 6 / diff + 1 / 2;
10529
- };
10530
- if (diff === 0) {
10531
- h = 0;
10532
- s = 0;
10533
- } else {
10534
- s = diff / v;
10535
- rdif = diffc(r);
10536
- gdif = diffc(g);
10537
- bdif = diffc(b);
10538
- if (r === v) {
10539
- h = bdif - gdif;
10540
- } else if (g === v) {
10541
- h = 1 / 3 + rdif - bdif;
10542
- } else if (b === v) {
10543
- h = 2 / 3 + gdif - rdif;
10544
- }
10545
- if (h < 0) {
10546
- h += 1;
10547
- } else if (h > 1) {
10548
- h -= 1;
10549
- }
10550
- }
10551
- return [
10552
- h * 360,
10553
- s * 100,
10554
- v * 100
10555
- ];
10556
- };
10557
- convert.rgb.hwb = function(rgb) {
10558
- const r = rgb[0];
10559
- const g = rgb[1];
10560
- let b = rgb[2];
10561
- const h = convert.rgb.hsl(rgb)[0];
10562
- const w = 1 / 255 * Math.min(r, Math.min(g, b));
10563
- b = 1 - 1 / 255 * Math.max(r, Math.max(g, b));
10564
- return [h, w * 100, b * 100];
10565
- };
10566
- convert.rgb.cmyk = function(rgb) {
10567
- const r = rgb[0] / 255;
10568
- const g = rgb[1] / 255;
10569
- const b = rgb[2] / 255;
10570
- const k = Math.min(1 - r, 1 - g, 1 - b);
10571
- const c = (1 - r - k) / (1 - k) || 0;
10572
- const m = (1 - g - k) / (1 - k) || 0;
10573
- const y = (1 - b - k) / (1 - k) || 0;
10574
- return [c * 100, m * 100, y * 100, k * 100];
10575
- };
10576
- function comparativeDistance(x, y) {
10577
- return (x[0] - y[0]) ** 2 + (x[1] - y[1]) ** 2 + (x[2] - y[2]) ** 2;
10578
- }
10579
- convert.rgb.keyword = function(rgb) {
10580
- const reversed = reverseKeywords[rgb];
10581
- if (reversed) {
10582
- return reversed;
10583
- }
10584
- let currentClosestDistance = Infinity;
10585
- let currentClosestKeyword;
10586
- for (const keyword of Object.keys(cssKeywords)) {
10587
- const value = cssKeywords[keyword];
10588
- const distance = comparativeDistance(rgb, value);
10589
- if (distance < currentClosestDistance) {
10590
- currentClosestDistance = distance;
10591
- currentClosestKeyword = keyword;
10592
- }
10593
- }
10594
- return currentClosestKeyword;
10595
- };
10596
- convert.keyword.rgb = function(keyword) {
10597
- return cssKeywords[keyword];
10598
- };
10599
- convert.rgb.xyz = function(rgb) {
10600
- let r = rgb[0] / 255;
10601
- let g = rgb[1] / 255;
10602
- let b = rgb[2] / 255;
10603
- r = r > 0.04045 ? ((r + 0.055) / 1.055) ** 2.4 : r / 12.92;
10604
- g = g > 0.04045 ? ((g + 0.055) / 1.055) ** 2.4 : g / 12.92;
10605
- b = b > 0.04045 ? ((b + 0.055) / 1.055) ** 2.4 : b / 12.92;
10606
- const x = r * 0.4124 + g * 0.3576 + b * 0.1805;
10607
- const y = r * 0.2126 + g * 0.7152 + b * 0.0722;
10608
- const z = r * 0.0193 + g * 0.1192 + b * 0.9505;
10609
- return [x * 100, y * 100, z * 100];
10610
- };
10611
- convert.rgb.lab = function(rgb) {
10612
- const xyz = convert.rgb.xyz(rgb);
10613
- let x = xyz[0];
10614
- let y = xyz[1];
10615
- let z = xyz[2];
10616
- x /= 95.047;
10617
- y /= 100;
10618
- z /= 108.883;
10619
- x = x > 8856e-6 ? x ** (1 / 3) : 7.787 * x + 16 / 116;
10620
- y = y > 8856e-6 ? y ** (1 / 3) : 7.787 * y + 16 / 116;
10621
- z = z > 8856e-6 ? z ** (1 / 3) : 7.787 * z + 16 / 116;
10622
- const l = 116 * y - 16;
10623
- const a = 500 * (x - y);
10624
- const b = 200 * (y - z);
10625
- return [l, a, b];
10626
- };
10627
- convert.hsl.rgb = function(hsl) {
10628
- const h = hsl[0] / 360;
10629
- const s = hsl[1] / 100;
10630
- const l = hsl[2] / 100;
10631
- let t2;
10632
- let t3;
10633
- let val;
10634
- if (s === 0) {
10635
- val = l * 255;
10636
- return [val, val, val];
10637
- }
10638
- if (l < 0.5) {
10639
- t2 = l * (1 + s);
10640
- } else {
10641
- t2 = l + s - l * s;
10642
- }
10643
- const t1 = 2 * l - t2;
10644
- const rgb = [0, 0, 0];
10645
- for (let i = 0; i < 3; i++) {
10646
- t3 = h + 1 / 3 * -(i - 1);
10647
- if (t3 < 0) {
10648
- t3++;
10649
- }
10650
- if (t3 > 1) {
10651
- t3--;
10652
- }
10653
- if (6 * t3 < 1) {
10654
- val = t1 + (t2 - t1) * 6 * t3;
10655
- } else if (2 * t3 < 1) {
10656
- val = t2;
10657
- } else if (3 * t3 < 2) {
10658
- val = t1 + (t2 - t1) * (2 / 3 - t3) * 6;
10659
- } else {
10660
- val = t1;
10661
- }
10662
- rgb[i] = val * 255;
10663
- }
10664
- return rgb;
10665
- };
10666
- convert.hsl.hsv = function(hsl) {
10667
- const h = hsl[0];
10668
- let s = hsl[1] / 100;
10669
- let l = hsl[2] / 100;
10670
- let smin = s;
10671
- const lmin = Math.max(l, 0.01);
10672
- l *= 2;
10673
- s *= l <= 1 ? l : 2 - l;
10674
- smin *= lmin <= 1 ? lmin : 2 - lmin;
10675
- const v = (l + s) / 2;
10676
- const sv = l === 0 ? 2 * smin / (lmin + smin) : 2 * s / (l + s);
10677
- return [h, sv * 100, v * 100];
10678
- };
10679
- convert.hsv.rgb = function(hsv) {
10680
- const h = hsv[0] / 60;
10681
- const s = hsv[1] / 100;
10682
- let v = hsv[2] / 100;
10683
- const hi = Math.floor(h) % 6;
10684
- const f = h - Math.floor(h);
10685
- const p = 255 * v * (1 - s);
10686
- const q = 255 * v * (1 - s * f);
10687
- const t = 255 * v * (1 - s * (1 - f));
10688
- v *= 255;
10689
- switch (hi) {
10690
- case 0:
10691
- return [v, t, p];
10692
- case 1:
10693
- return [q, v, p];
10694
- case 2:
10695
- return [p, v, t];
10696
- case 3:
10697
- return [p, q, v];
10698
- case 4:
10699
- return [t, p, v];
10700
- case 5:
10701
- return [v, p, q];
10702
- }
10703
- };
10704
- convert.hsv.hsl = function(hsv) {
10705
- const h = hsv[0];
10706
- const s = hsv[1] / 100;
10707
- const v = hsv[2] / 100;
10708
- const vmin = Math.max(v, 0.01);
10709
- let sl;
10710
- let l;
10711
- l = (2 - s) * v;
10712
- const lmin = (2 - s) * vmin;
10713
- sl = s * vmin;
10714
- sl /= lmin <= 1 ? lmin : 2 - lmin;
10715
- sl = sl || 0;
10716
- l /= 2;
10717
- return [h, sl * 100, l * 100];
10718
- };
10719
- convert.hwb.rgb = function(hwb) {
10720
- const h = hwb[0] / 360;
10721
- let wh = hwb[1] / 100;
10722
- let bl = hwb[2] / 100;
10723
- const ratio2 = wh + bl;
10724
- let f;
10725
- if (ratio2 > 1) {
10726
- wh /= ratio2;
10727
- bl /= ratio2;
10728
- }
10729
- const i = Math.floor(6 * h);
10730
- const v = 1 - bl;
10731
- f = 6 * h - i;
10732
- if ((i & 1) !== 0) {
10733
- f = 1 - f;
10734
- }
10735
- const n = wh + f * (v - wh);
10736
- let r;
10737
- let g;
10738
- let b;
10739
- switch (i) {
10740
- default:
10741
- case 6:
10742
- case 0:
10743
- r = v;
10744
- g = n;
10745
- b = wh;
10746
- break;
10747
- case 1:
10748
- r = n;
10749
- g = v;
10750
- b = wh;
10751
- break;
10752
- case 2:
10753
- r = wh;
10754
- g = v;
10755
- b = n;
10756
- break;
10757
- case 3:
10758
- r = wh;
10759
- g = n;
10760
- b = v;
10761
- break;
10762
- case 4:
10763
- r = n;
10764
- g = wh;
10765
- b = v;
10766
- break;
10767
- case 5:
10768
- r = v;
10769
- g = wh;
10770
- b = n;
10771
- break;
10772
- }
10773
- return [r * 255, g * 255, b * 255];
10774
- };
10775
- convert.cmyk.rgb = function(cmyk) {
10776
- const c = cmyk[0] / 100;
10777
- const m = cmyk[1] / 100;
10778
- const y = cmyk[2] / 100;
10779
- const k = cmyk[3] / 100;
10780
- const r = 1 - Math.min(1, c * (1 - k) + k);
10781
- const g = 1 - Math.min(1, m * (1 - k) + k);
10782
- const b = 1 - Math.min(1, y * (1 - k) + k);
10783
- return [r * 255, g * 255, b * 255];
10784
- };
10785
- convert.xyz.rgb = function(xyz) {
10786
- const x = xyz[0] / 100;
10787
- const y = xyz[1] / 100;
10788
- const z = xyz[2] / 100;
10789
- let r;
10790
- let g;
10791
- let b;
10792
- r = x * 3.2406 + y * -1.5372 + z * -0.4986;
10793
- g = x * -0.9689 + y * 1.8758 + z * 0.0415;
10794
- b = x * 0.0557 + y * -0.204 + z * 1.057;
10795
- r = r > 31308e-7 ? 1.055 * r ** (1 / 2.4) - 0.055 : r * 12.92;
10796
- g = g > 31308e-7 ? 1.055 * g ** (1 / 2.4) - 0.055 : g * 12.92;
10797
- b = b > 31308e-7 ? 1.055 * b ** (1 / 2.4) - 0.055 : b * 12.92;
10798
- r = Math.min(Math.max(0, r), 1);
10799
- g = Math.min(Math.max(0, g), 1);
10800
- b = Math.min(Math.max(0, b), 1);
10801
- return [r * 255, g * 255, b * 255];
10802
- };
10803
- convert.xyz.lab = function(xyz) {
10804
- let x = xyz[0];
10805
- let y = xyz[1];
10806
- let z = xyz[2];
10807
- x /= 95.047;
10808
- y /= 100;
10809
- z /= 108.883;
10810
- x = x > 8856e-6 ? x ** (1 / 3) : 7.787 * x + 16 / 116;
10811
- y = y > 8856e-6 ? y ** (1 / 3) : 7.787 * y + 16 / 116;
10812
- z = z > 8856e-6 ? z ** (1 / 3) : 7.787 * z + 16 / 116;
10813
- const l = 116 * y - 16;
10814
- const a = 500 * (x - y);
10815
- const b = 200 * (y - z);
10816
- return [l, a, b];
10817
- };
10818
- convert.lab.xyz = function(lab) {
10819
- const l = lab[0];
10820
- const a = lab[1];
10821
- const b = lab[2];
10822
- let x;
10823
- let y;
10824
- let z;
10825
- y = (l + 16) / 116;
10826
- x = a / 500 + y;
10827
- z = y - b / 200;
10828
- const y2 = y ** 3;
10829
- const x2 = x ** 3;
10830
- const z2 = z ** 3;
10831
- y = y2 > 8856e-6 ? y2 : (y - 16 / 116) / 7.787;
10832
- x = x2 > 8856e-6 ? x2 : (x - 16 / 116) / 7.787;
10833
- z = z2 > 8856e-6 ? z2 : (z - 16 / 116) / 7.787;
10834
- x *= 95.047;
10835
- y *= 100;
10836
- z *= 108.883;
10837
- return [x, y, z];
10838
- };
10839
- convert.lab.lch = function(lab) {
10840
- const l = lab[0];
10841
- const a = lab[1];
10842
- const b = lab[2];
10843
- let h;
10844
- const hr = Math.atan2(b, a);
10845
- h = hr * 360 / 2 / Math.PI;
10846
- if (h < 0) {
10847
- h += 360;
10848
- }
10849
- const c = Math.sqrt(a * a + b * b);
10850
- return [l, c, h];
10851
- };
10852
- convert.lch.lab = function(lch) {
10853
- const l = lch[0];
10854
- const c = lch[1];
10855
- const h = lch[2];
10856
- const hr = h / 360 * 2 * Math.PI;
10857
- const a = c * Math.cos(hr);
10858
- const b = c * Math.sin(hr);
10859
- return [l, a, b];
10860
- };
10861
- convert.rgb.ansi16 = function(args, saturation = null) {
10862
- const [r, g, b] = args;
10863
- let value = saturation === null ? convert.rgb.hsv(args)[2] : saturation;
10864
- value = Math.round(value / 50);
10865
- if (value === 0) {
10866
- return 30;
10867
- }
10868
- let ansi = 30 + (Math.round(b / 255) << 2 | Math.round(g / 255) << 1 | Math.round(r / 255));
10869
- if (value === 2) {
10870
- ansi += 60;
10871
- }
10872
- return ansi;
10873
- };
10874
- convert.hsv.ansi16 = function(args) {
10875
- return convert.rgb.ansi16(convert.hsv.rgb(args), args[2]);
10876
- };
10877
- convert.rgb.ansi256 = function(args) {
10878
- const r = args[0];
10879
- const g = args[1];
10880
- const b = args[2];
10881
- if (r === g && g === b) {
10882
- if (r < 8) {
10883
- return 16;
10884
- }
10885
- if (r > 248) {
10886
- return 231;
10887
- }
10888
- return Math.round((r - 8) / 247 * 24) + 232;
10889
- }
10890
- const ansi = 16 + 36 * Math.round(r / 255 * 5) + 6 * Math.round(g / 255 * 5) + Math.round(b / 255 * 5);
10891
- return ansi;
10892
- };
10893
- convert.ansi16.rgb = function(args) {
10894
- let color = args % 10;
10895
- if (color === 0 || color === 7) {
10896
- if (args > 50) {
10897
- color += 3.5;
10898
- }
10899
- color = color / 10.5 * 255;
10900
- return [color, color, color];
10901
- }
10902
- const mult = (~~(args > 50) + 1) * 0.5;
10903
- const r = (color & 1) * mult * 255;
10904
- const g = (color >> 1 & 1) * mult * 255;
10905
- const b = (color >> 2 & 1) * mult * 255;
10906
- return [r, g, b];
10907
- };
10908
- convert.ansi256.rgb = function(args) {
10909
- if (args >= 232) {
10910
- const c = (args - 232) * 10 + 8;
10911
- return [c, c, c];
10912
- }
10913
- args -= 16;
10914
- let rem;
10915
- const r = Math.floor(args / 36) / 5 * 255;
10916
- const g = Math.floor((rem = args % 36) / 6) / 5 * 255;
10917
- const b = rem % 6 / 5 * 255;
10918
- return [r, g, b];
10919
- };
10920
- convert.rgb.hex = function(args) {
10921
- const integer = ((Math.round(args[0]) & 255) << 16) + ((Math.round(args[1]) & 255) << 8) + (Math.round(args[2]) & 255);
10922
- const string = integer.toString(16).toUpperCase();
10923
- return "000000".substring(string.length) + string;
10924
- };
10925
- convert.hex.rgb = function(args) {
10926
- const match = args.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);
10927
- if (!match) {
10928
- return [0, 0, 0];
10929
- }
10930
- let colorString = match[0];
10931
- if (match[0].length === 3) {
10932
- colorString = colorString.split("").map((char) => {
10933
- return char + char;
10934
- }).join("");
10935
- }
10936
- const integer = parseInt(colorString, 16);
10937
- const r = integer >> 16 & 255;
10938
- const g = integer >> 8 & 255;
10939
- const b = integer & 255;
10940
- return [r, g, b];
10941
- };
10942
- convert.rgb.hcg = function(rgb) {
10943
- const r = rgb[0] / 255;
10944
- const g = rgb[1] / 255;
10945
- const b = rgb[2] / 255;
10946
- const max = Math.max(Math.max(r, g), b);
10947
- const min = Math.min(Math.min(r, g), b);
10948
- const chroma = max - min;
10949
- let grayscale;
10950
- let hue;
10951
- if (chroma < 1) {
10952
- grayscale = min / (1 - chroma);
10953
- } else {
10954
- grayscale = 0;
10955
- }
10956
- if (chroma <= 0) {
10957
- hue = 0;
10958
- } else if (max === r) {
10959
- hue = (g - b) / chroma % 6;
10960
- } else if (max === g) {
10961
- hue = 2 + (b - r) / chroma;
10962
- } else {
10963
- hue = 4 + (r - g) / chroma;
10964
- }
10965
- hue /= 6;
10966
- hue %= 1;
10967
- return [hue * 360, chroma * 100, grayscale * 100];
10968
- };
10969
- convert.hsl.hcg = function(hsl) {
10970
- const s = hsl[1] / 100;
10971
- const l = hsl[2] / 100;
10972
- const c = l < 0.5 ? 2 * s * l : 2 * s * (1 - l);
10973
- let f = 0;
10974
- if (c < 1) {
10975
- f = (l - 0.5 * c) / (1 - c);
10976
- }
10977
- return [hsl[0], c * 100, f * 100];
10978
- };
10979
- convert.hsv.hcg = function(hsv) {
10980
- const s = hsv[1] / 100;
10981
- const v = hsv[2] / 100;
10982
- const c = s * v;
10983
- let f = 0;
10984
- if (c < 1) {
10985
- f = (v - c) / (1 - c);
10986
- }
10987
- return [hsv[0], c * 100, f * 100];
10988
- };
10989
- convert.hcg.rgb = function(hcg) {
10990
- const h = hcg[0] / 360;
10991
- const c = hcg[1] / 100;
10992
- const g = hcg[2] / 100;
10993
- if (c === 0) {
10994
- return [g * 255, g * 255, g * 255];
10995
- }
10996
- const pure = [0, 0, 0];
10997
- const hi = h % 1 * 6;
10998
- const v = hi % 1;
10999
- const w = 1 - v;
11000
- let mg = 0;
11001
- switch (Math.floor(hi)) {
11002
- case 0:
11003
- pure[0] = 1;
11004
- pure[1] = v;
11005
- pure[2] = 0;
11006
- break;
11007
- case 1:
11008
- pure[0] = w;
11009
- pure[1] = 1;
11010
- pure[2] = 0;
11011
- break;
11012
- case 2:
11013
- pure[0] = 0;
11014
- pure[1] = 1;
11015
- pure[2] = v;
11016
- break;
11017
- case 3:
11018
- pure[0] = 0;
11019
- pure[1] = w;
11020
- pure[2] = 1;
11021
- break;
11022
- case 4:
11023
- pure[0] = v;
11024
- pure[1] = 0;
11025
- pure[2] = 1;
11026
- break;
11027
- default:
11028
- pure[0] = 1;
11029
- pure[1] = 0;
11030
- pure[2] = w;
11031
- }
11032
- mg = (1 - c) * g;
11033
- return [
11034
- (c * pure[0] + mg) * 255,
11035
- (c * pure[1] + mg) * 255,
11036
- (c * pure[2] + mg) * 255
11037
- ];
11038
- };
11039
- convert.hcg.hsv = function(hcg) {
11040
- const c = hcg[1] / 100;
11041
- const g = hcg[2] / 100;
11042
- const v = c + g * (1 - c);
11043
- let f = 0;
11044
- if (v > 0) {
11045
- f = c / v;
11046
- }
11047
- return [hcg[0], f * 100, v * 100];
11048
- };
11049
- convert.hcg.hsl = function(hcg) {
11050
- const c = hcg[1] / 100;
11051
- const g = hcg[2] / 100;
11052
- const l = g * (1 - c) + 0.5 * c;
11053
- let s = 0;
11054
- if (l > 0 && l < 0.5) {
11055
- s = c / (2 * l);
11056
- } else if (l >= 0.5 && l < 1) {
11057
- s = c / (2 * (1 - l));
11058
- }
11059
- return [hcg[0], s * 100, l * 100];
11060
- };
11061
- convert.hcg.hwb = function(hcg) {
11062
- const c = hcg[1] / 100;
11063
- const g = hcg[2] / 100;
11064
- const v = c + g * (1 - c);
11065
- return [hcg[0], (v - c) * 100, (1 - v) * 100];
11066
- };
11067
- convert.hwb.hcg = function(hwb) {
11068
- const w = hwb[1] / 100;
11069
- const b = hwb[2] / 100;
11070
- const v = 1 - b;
11071
- const c = v - w;
11072
- let g = 0;
11073
- if (c < 1) {
11074
- g = (v - c) / (1 - c);
11075
- }
11076
- return [hwb[0], c * 100, g * 100];
11077
- };
11078
- convert.apple.rgb = function(apple) {
11079
- return [apple[0] / 65535 * 255, apple[1] / 65535 * 255, apple[2] / 65535 * 255];
11080
- };
11081
- convert.rgb.apple = function(rgb) {
11082
- return [rgb[0] / 255 * 65535, rgb[1] / 255 * 65535, rgb[2] / 255 * 65535];
11083
- };
11084
- convert.gray.rgb = function(args) {
11085
- return [args[0] / 100 * 255, args[0] / 100 * 255, args[0] / 100 * 255];
11086
- };
11087
- convert.gray.hsl = function(args) {
11088
- return [0, 0, args[0]];
11089
- };
11090
- convert.gray.hsv = convert.gray.hsl;
11091
- convert.gray.hwb = function(gray) {
11092
- return [0, 100, gray[0]];
11093
- };
11094
- convert.gray.cmyk = function(gray) {
11095
- return [0, 0, 0, gray[0]];
11096
- };
11097
- convert.gray.lab = function(gray) {
11098
- return [gray[0], 0, 0];
11099
- };
11100
- convert.gray.hex = function(gray) {
11101
- const val = Math.round(gray[0] / 100 * 255) & 255;
11102
- const integer = (val << 16) + (val << 8) + val;
11103
- const string = integer.toString(16).toUpperCase();
11104
- return "000000".substring(string.length) + string;
11105
- };
11106
- convert.rgb.gray = function(rgb) {
11107
- const val = (rgb[0] + rgb[1] + rgb[2]) / 3;
11108
- return [val / 255 * 100];
11109
- };
11110
- return conversions;
11111
- }
11112
- var route;
11113
- var hasRequiredRoute;
11114
- function requireRoute() {
11115
- if (hasRequiredRoute) return route;
11116
- hasRequiredRoute = 1;
11117
- const conversions2 = requireConversions();
11118
- function buildGraph() {
11119
- const graph = {};
11120
- const models2 = Object.keys(conversions2);
11121
- for (let len = models2.length, i = 0; i < len; i++) {
11122
- graph[models2[i]] = {
11123
- // http://jsperf.com/1-vs-infinity
11124
- // micro-opt, but this is simple.
11125
- distance: -1,
11126
- parent: null
11127
- };
11128
- }
11129
- return graph;
11130
- }
11131
- function deriveBFS(fromModel) {
11132
- const graph = buildGraph();
11133
- const queue = [fromModel];
11134
- graph[fromModel].distance = 0;
11135
- while (queue.length) {
11136
- const current = queue.pop();
11137
- const adjacents = Object.keys(conversions2[current]);
11138
- for (let len = adjacents.length, i = 0; i < len; i++) {
11139
- const adjacent = adjacents[i];
11140
- const node = graph[adjacent];
11141
- if (node.distance === -1) {
11142
- node.distance = graph[current].distance + 1;
11143
- node.parent = current;
11144
- queue.unshift(adjacent);
11145
- }
11146
- }
11147
- }
11148
- return graph;
11149
- }
11150
- function link(from, to) {
11151
- return function(args) {
11152
- return to(from(args));
11153
- };
11154
- }
11155
- function wrapConversion(toModel, graph) {
11156
- const path2 = [graph[toModel].parent, toModel];
11157
- let fn = conversions2[graph[toModel].parent][toModel];
11158
- let cur = graph[toModel].parent;
11159
- while (graph[cur].parent) {
11160
- path2.unshift(graph[cur].parent);
11161
- fn = link(conversions2[graph[cur].parent][cur], fn);
11162
- cur = graph[cur].parent;
11163
- }
11164
- fn.conversion = path2;
11165
- return fn;
11166
- }
11167
- route = function(fromModel) {
11168
- const graph = deriveBFS(fromModel);
11169
- const conversion = {};
11170
- const models2 = Object.keys(graph);
11171
- for (let len = models2.length, i = 0; i < len; i++) {
11172
- const toModel = models2[i];
11173
- const node = graph[toModel];
11174
- if (node.parent === null) {
11175
- continue;
11176
- }
11177
- conversion[toModel] = wrapConversion(toModel, graph);
11178
- }
11179
- return conversion;
11180
- };
11181
- return route;
11182
- }
11183
- var colorConvert;
11184
- var hasRequiredColorConvert;
11185
- function requireColorConvert() {
11186
- if (hasRequiredColorConvert) return colorConvert;
11187
- hasRequiredColorConvert = 1;
11188
- const conversions2 = requireConversions();
11189
- const route2 = requireRoute();
11190
- const convert = {};
11191
- const models2 = Object.keys(conversions2);
11192
- function wrapRaw(fn) {
11193
- const wrappedFn = function(...args) {
11194
- const arg0 = args[0];
11195
- if (arg0 === void 0 || arg0 === null) {
11196
- return arg0;
11197
- }
11198
- if (arg0.length > 1) {
11199
- args = arg0;
11200
- }
11201
- return fn(args);
11202
- };
11203
- if ("conversion" in fn) {
11204
- wrappedFn.conversion = fn.conversion;
11205
- }
11206
- return wrappedFn;
11207
- }
11208
- function wrapRounded(fn) {
11209
- const wrappedFn = function(...args) {
11210
- const arg0 = args[0];
11211
- if (arg0 === void 0 || arg0 === null) {
11212
- return arg0;
11213
- }
11214
- if (arg0.length > 1) {
11215
- args = arg0;
11216
- }
11217
- const result = fn(args);
11218
- if (typeof result === "object") {
11219
- for (let len = result.length, i = 0; i < len; i++) {
11220
- result[i] = Math.round(result[i]);
11221
- }
11222
- }
11223
- return result;
11224
- };
11225
- if ("conversion" in fn) {
11226
- wrappedFn.conversion = fn.conversion;
11227
- }
11228
- return wrappedFn;
11229
- }
11230
- models2.forEach((fromModel) => {
11231
- convert[fromModel] = {};
11232
- Object.defineProperty(convert[fromModel], "channels", { value: conversions2[fromModel].channels });
11233
- Object.defineProperty(convert[fromModel], "labels", { value: conversions2[fromModel].labels });
11234
- const routes = route2(fromModel);
11235
- const routeModels = Object.keys(routes);
11236
- routeModels.forEach((toModel) => {
11237
- const fn = routes[toModel];
11238
- convert[fromModel][toModel] = wrapRounded(fn);
11239
- convert[fromModel][toModel].raw = wrapRaw(fn);
11240
- });
11241
- });
11242
- colorConvert = convert;
11243
- return colorConvert;
11244
- }
11245
- ansiStyles$1.exports;
11246
- (function(module) {
11247
- const wrapAnsi16 = (fn, offset) => (...args) => {
11248
- const code = fn(...args);
11249
- return `\x1B[${code + offset}m`;
11250
- };
11251
- const wrapAnsi256 = (fn, offset) => (...args) => {
11252
- const code = fn(...args);
11253
- return `\x1B[${38 + offset};5;${code}m`;
11254
- };
11255
- const wrapAnsi16m = (fn, offset) => (...args) => {
11256
- const rgb = fn(...args);
11257
- return `\x1B[${38 + offset};2;${rgb[0]};${rgb[1]};${rgb[2]}m`;
11258
- };
11259
- const ansi2ansi = (n) => n;
11260
- const rgb2rgb = (r, g, b) => [r, g, b];
11261
- const setLazyProperty = (object, property, get) => {
11262
- Object.defineProperty(object, property, {
11263
- get: () => {
11264
- const value = get();
11265
- Object.defineProperty(object, property, {
11266
- value,
11267
- enumerable: true,
11268
- configurable: true
11269
- });
11270
- return value;
11271
- },
11272
- enumerable: true,
11273
- configurable: true
11274
- });
11275
- };
11276
- let colorConvert2;
11277
- const makeDynamicStyles = (wrap, targetSpace, identity, isBackground) => {
11278
- if (colorConvert2 === void 0) {
11279
- colorConvert2 = requireColorConvert();
11280
- }
11281
- const offset = isBackground ? 10 : 0;
11282
- const styles2 = {};
11283
- for (const [sourceSpace, suite] of Object.entries(colorConvert2)) {
11284
- const name2 = sourceSpace === "ansi16" ? "ansi" : sourceSpace;
11285
- if (sourceSpace === targetSpace) {
11286
- styles2[name2] = wrap(identity, offset);
11287
- } else if (typeof suite === "object") {
11288
- styles2[name2] = wrap(suite[targetSpace], offset);
11289
- }
11290
- }
11291
- return styles2;
11292
- };
11293
- function assembleStyles() {
11294
- const codes = /* @__PURE__ */ new Map();
11295
- const styles2 = {
11296
- modifier: {
11297
- reset: [0, 0],
11298
- // 21 isn't widely supported and 22 does the same thing
11299
- bold: [1, 22],
11300
- dim: [2, 22],
11301
- italic: [3, 23],
11302
- underline: [4, 24],
11303
- inverse: [7, 27],
11304
- hidden: [8, 28],
11305
- strikethrough: [9, 29]
11306
- },
11307
- color: {
11308
- black: [30, 39],
11309
- red: [31, 39],
11310
- green: [32, 39],
11311
- yellow: [33, 39],
11312
- blue: [34, 39],
11313
- magenta: [35, 39],
11314
- cyan: [36, 39],
11315
- white: [37, 39],
11316
- // Bright color
11317
- blackBright: [90, 39],
11318
- redBright: [91, 39],
11319
- greenBright: [92, 39],
11320
- yellowBright: [93, 39],
11321
- blueBright: [94, 39],
11322
- magentaBright: [95, 39],
11323
- cyanBright: [96, 39],
11324
- whiteBright: [97, 39]
11325
- },
11326
- bgColor: {
11327
- bgBlack: [40, 49],
11328
- bgRed: [41, 49],
11329
- bgGreen: [42, 49],
11330
- bgYellow: [43, 49],
11331
- bgBlue: [44, 49],
11332
- bgMagenta: [45, 49],
11333
- bgCyan: [46, 49],
11334
- bgWhite: [47, 49],
11335
- // Bright color
11336
- bgBlackBright: [100, 49],
11337
- bgRedBright: [101, 49],
11338
- bgGreenBright: [102, 49],
11339
- bgYellowBright: [103, 49],
11340
- bgBlueBright: [104, 49],
11341
- bgMagentaBright: [105, 49],
11342
- bgCyanBright: [106, 49],
11343
- bgWhiteBright: [107, 49]
11344
- }
11345
- };
11346
- styles2.color.gray = styles2.color.blackBright;
11347
- styles2.bgColor.bgGray = styles2.bgColor.bgBlackBright;
11348
- styles2.color.grey = styles2.color.blackBright;
11349
- styles2.bgColor.bgGrey = styles2.bgColor.bgBlackBright;
11350
- for (const [groupName, group] of Object.entries(styles2)) {
11351
- for (const [styleName, style] of Object.entries(group)) {
11352
- styles2[styleName] = {
11353
- open: `\x1B[${style[0]}m`,
11354
- close: `\x1B[${style[1]}m`
11355
- };
11356
- group[styleName] = styles2[styleName];
11357
- codes.set(style[0], style[1]);
11358
- }
11359
- Object.defineProperty(styles2, groupName, {
11360
- value: group,
11361
- enumerable: false
11362
- });
11363
- }
11364
- Object.defineProperty(styles2, "codes", {
11365
- value: codes,
11366
- enumerable: false
11367
- });
11368
- styles2.color.close = "\x1B[39m";
11369
- styles2.bgColor.close = "\x1B[49m";
11370
- setLazyProperty(styles2.color, "ansi", () => makeDynamicStyles(wrapAnsi16, "ansi16", ansi2ansi, false));
11371
- setLazyProperty(styles2.color, "ansi256", () => makeDynamicStyles(wrapAnsi256, "ansi256", ansi2ansi, false));
11372
- setLazyProperty(styles2.color, "ansi16m", () => makeDynamicStyles(wrapAnsi16m, "rgb", rgb2rgb, false));
11373
- setLazyProperty(styles2.bgColor, "ansi", () => makeDynamicStyles(wrapAnsi16, "ansi16", ansi2ansi, true));
11374
- setLazyProperty(styles2.bgColor, "ansi256", () => makeDynamicStyles(wrapAnsi256, "ansi256", ansi2ansi, true));
11375
- setLazyProperty(styles2.bgColor, "ansi16m", () => makeDynamicStyles(wrapAnsi16m, "rgb", rgb2rgb, true));
11376
- return styles2;
11377
- }
11378
- Object.defineProperty(module, "exports", {
11379
- enumerable: true,
11380
- get: assembleStyles
11381
- });
11382
- })(ansiStyles$1);
11383
- var ansiStylesExports = ansiStyles$1.exports;
11384
- var browser = {
11385
- stdout: false,
11386
- stderr: false
11387
- };
11388
- const stringReplaceAll$1 = (string, substring, replacer) => {
11389
- let index = string.indexOf(substring);
11390
- if (index === -1) {
11391
- return string;
11392
- }
11393
- const substringLength = substring.length;
11394
- let endIndex = 0;
11395
- let returnValue = "";
11396
- do {
11397
- returnValue += string.substr(endIndex, index - endIndex) + substring + replacer;
11398
- endIndex = index + substringLength;
11399
- index = string.indexOf(substring, endIndex);
11400
- } while (index !== -1);
11401
- returnValue += string.substr(endIndex);
11402
- return returnValue;
11403
- };
11404
- const stringEncaseCRLFWithFirstIndex$1 = (string, prefix, postfix, index) => {
11405
- let endIndex = 0;
11406
- let returnValue = "";
11407
- do {
11408
- const gotCR = string[index - 1] === "\r";
11409
- returnValue += string.substr(endIndex, (gotCR ? index - 1 : index) - endIndex) + prefix + (gotCR ? "\r\n" : "\n") + postfix;
11410
- endIndex = index + 1;
11411
- index = string.indexOf("\n", endIndex);
11412
- } while (index !== -1);
11413
- returnValue += string.substr(endIndex);
11414
- return returnValue;
11415
- };
11416
- var util = {
11417
- stringReplaceAll: stringReplaceAll$1,
11418
- stringEncaseCRLFWithFirstIndex: stringEncaseCRLFWithFirstIndex$1
11419
- };
11420
- var templates;
11421
- var hasRequiredTemplates;
11422
- function requireTemplates() {
11423
- if (hasRequiredTemplates) return templates;
11424
- hasRequiredTemplates = 1;
11425
- 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;
11426
- const STYLE_REGEX = /(?:^|\.)(\w+)(?:\(([^)]*)\))?/g;
11427
- const STRING_REGEX = /^(['"])((?:\\.|(?!\1)[^\\])*)\1$/;
11428
- const ESCAPE_REGEX = /\\(u(?:[a-f\d]{4}|{[a-f\d]{1,6}})|x[a-f\d]{2}|.)|([^\\])/gi;
11429
- const ESCAPES = /* @__PURE__ */ new Map([
11430
- ["n", "\n"],
11431
- ["r", "\r"],
11432
- ["t", " "],
11433
- ["b", "\b"],
11434
- ["f", "\f"],
11435
- ["v", "\v"],
11436
- ["0", "\0"],
11437
- ["\\", "\\"],
11438
- ["e", "\x1B"],
11439
- ["a", "\x07"]
11440
- ]);
11441
- function unescape(c) {
11442
- const u = c[0] === "u";
11443
- const bracket = c[1] === "{";
11444
- if (u && !bracket && c.length === 5 || c[0] === "x" && c.length === 3) {
11445
- return String.fromCharCode(parseInt(c.slice(1), 16));
11446
- }
11447
- if (u && bracket) {
11448
- return String.fromCodePoint(parseInt(c.slice(2, -1), 16));
11449
- }
11450
- return ESCAPES.get(c) || c;
11451
- }
11452
- function parseArguments(name2, arguments_) {
11453
- const results = [];
11454
- const chunks = arguments_.trim().split(/\s*,\s*/g);
11455
- let matches;
11456
- for (const chunk of chunks) {
11457
- const number = Number(chunk);
11458
- if (!Number.isNaN(number)) {
11459
- results.push(number);
11460
- } else if (matches = chunk.match(STRING_REGEX)) {
11461
- results.push(matches[2].replace(ESCAPE_REGEX, (m, escape2, character) => escape2 ? unescape(escape2) : character));
11462
- } else {
11463
- throw new Error(`Invalid Chalk template style argument: ${chunk} (in style '${name2}')`);
11464
- }
11465
- }
11466
- return results;
11467
- }
11468
- function parseStyle(style) {
11469
- STYLE_REGEX.lastIndex = 0;
11470
- const results = [];
11471
- let matches;
11472
- while ((matches = STYLE_REGEX.exec(style)) !== null) {
11473
- const name2 = matches[1];
11474
- if (matches[2]) {
11475
- const args = parseArguments(name2, matches[2]);
11476
- results.push([name2].concat(args));
11477
- } else {
11478
- results.push([name2]);
11479
- }
11480
- }
11481
- return results;
11482
- }
11483
- function buildStyle(chalk2, styles2) {
11484
- const enabled = {};
11485
- for (const layer of styles2) {
11486
- for (const style of layer.styles) {
11487
- enabled[style[0]] = layer.inverse ? null : style.slice(1);
11488
- }
11489
- }
11490
- let current = chalk2;
11491
- for (const [styleName, styles3] of Object.entries(enabled)) {
11492
- if (!Array.isArray(styles3)) {
11493
- continue;
11494
- }
11495
- if (!(styleName in current)) {
11496
- throw new Error(`Unknown Chalk style: ${styleName}`);
11497
- }
11498
- current = styles3.length > 0 ? current[styleName](...styles3) : current[styleName];
11499
- }
11500
- return current;
11501
- }
11502
- templates = (chalk2, temporary) => {
11503
- const styles2 = [];
11504
- const chunks = [];
11505
- let chunk = [];
11506
- temporary.replace(TEMPLATE_REGEX, (m, escapeCharacter, inverse, style, close, character) => {
11507
- if (escapeCharacter) {
11508
- chunk.push(unescape(escapeCharacter));
11509
- } else if (style) {
11510
- const string = chunk.join("");
11511
- chunk = [];
11512
- chunks.push(styles2.length === 0 ? string : buildStyle(chalk2, styles2)(string));
11513
- styles2.push({ inverse, styles: parseStyle(style) });
11514
- } else if (close) {
11515
- if (styles2.length === 0) {
11516
- throw new Error("Found extraneous } in Chalk template literal");
11517
- }
11518
- chunks.push(buildStyle(chalk2, styles2)(chunk.join("")));
11519
- chunk = [];
11520
- styles2.pop();
11521
- } else {
11522
- chunk.push(character);
11523
- }
11524
- });
11525
- chunks.push(chunk.join(""));
11526
- if (styles2.length > 0) {
11527
- const errMessage = `Chalk template literal is missing ${styles2.length} closing bracket${styles2.length === 1 ? "" : "s"} (\`}\`)`;
11528
- throw new Error(errMessage);
11529
- }
11530
- return chunks.join("");
11531
- };
11532
- return templates;
11533
- }
11534
- const ansiStyles = ansiStylesExports;
11535
- const { stdout: stdoutColor, stderr: stderrColor } = browser;
11536
- const {
11537
- stringReplaceAll,
11538
- stringEncaseCRLFWithFirstIndex
11539
- } = util;
11540
- const { isArray } = Array;
11541
- const levelMapping = [
11542
- "ansi",
11543
- "ansi",
11544
- "ansi256",
11545
- "ansi16m"
11546
- ];
11547
- const styles = /* @__PURE__ */ Object.create(null);
11548
- const applyOptions = (object, options = {}) => {
11549
- if (options.level && !(Number.isInteger(options.level) && options.level >= 0 && options.level <= 3)) {
11550
- throw new Error("The `level` option should be an integer from 0 to 3");
11551
- }
11552
- const colorLevel = 0;
11553
- object.level = options.level === void 0 ? colorLevel : options.level;
11554
- };
11555
- class ChalkClass2 {
11556
- constructor(options) {
11557
- return chalkFactory(options);
11558
- }
11559
- }
11560
- const chalkFactory = (options) => {
11561
- const chalk2 = {};
11562
- applyOptions(chalk2, options);
11563
- chalk2.template = (...arguments_) => chalkTag(chalk2.template, ...arguments_);
11564
- Object.setPrototypeOf(chalk2, Chalk.prototype);
11565
- Object.setPrototypeOf(chalk2.template, chalk2);
11566
- chalk2.template.constructor = () => {
11567
- throw new Error("`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.");
11568
- };
11569
- chalk2.template.Instance = ChalkClass2;
11570
- return chalk2.template;
11571
- };
11572
- function Chalk(options) {
11573
- return chalkFactory(options);
11574
- }
11575
- for (const [styleName, style] of Object.entries(ansiStyles)) {
11576
- styles[styleName] = {
11577
- get() {
11578
- const builder = createBuilder(this, createStyler(style.open, style.close, this._styler), this._isEmpty);
11579
- Object.defineProperty(this, styleName, { value: builder });
11580
- return builder;
11581
- }
11582
- };
11583
- }
11584
- styles.visible = {
11585
- get() {
11586
- const builder = createBuilder(this, this._styler, true);
11587
- Object.defineProperty(this, "visible", { value: builder });
11588
- return builder;
11589
- }
11590
- };
11591
- const usedModels = ["rgb", "hex", "keyword", "hsl", "hsv", "hwb", "ansi", "ansi256"];
11592
- for (const model of usedModels) {
11593
- styles[model] = {
11594
- get() {
11595
- const { level } = this;
11596
- return function(...arguments_) {
11597
- const styler = createStyler(ansiStyles.color[levelMapping[level]][model](...arguments_), ansiStyles.color.close, this._styler);
11598
- return createBuilder(this, styler, this._isEmpty);
11599
- };
11600
- }
11601
- };
11602
- }
11603
- for (const model of usedModels) {
11604
- const bgModel = "bg" + model[0].toUpperCase() + model.slice(1);
11605
- styles[bgModel] = {
11606
- get() {
11607
- const { level } = this;
11608
- return function(...arguments_) {
11609
- const styler = createStyler(ansiStyles.bgColor[levelMapping[level]][model](...arguments_), ansiStyles.bgColor.close, this._styler);
11610
- return createBuilder(this, styler, this._isEmpty);
11611
- };
11612
- }
11613
- };
11614
- }
11615
- const proto = Object.defineProperties(() => {
11616
- }, {
11617
- ...styles,
11618
- level: {
11619
- enumerable: true,
11620
- get() {
11621
- return this._generator.level;
11622
- },
11623
- set(level) {
11624
- this._generator.level = level;
11625
- }
11626
- }
11627
- });
11628
- const createStyler = (open, close, parent) => {
11629
- let openAll;
11630
- let closeAll;
11631
- if (parent === void 0) {
11632
- openAll = open;
11633
- closeAll = close;
11634
- } else {
11635
- openAll = parent.openAll + open;
11636
- closeAll = close + parent.closeAll;
11637
- }
11638
- return {
11639
- open,
11640
- close,
11641
- openAll,
11642
- closeAll,
11643
- parent
11644
- };
11645
- };
11646
- const createBuilder = (self2, _styler, _isEmpty) => {
11647
- const builder = (...arguments_) => {
11648
- if (isArray(arguments_[0]) && isArray(arguments_[0].raw)) {
11649
- return applyStyle(builder, chalkTag(builder, ...arguments_));
11650
- }
11651
- return applyStyle(builder, arguments_.length === 1 ? "" + arguments_[0] : arguments_.join(" "));
11652
- };
11653
- Object.setPrototypeOf(builder, proto);
11654
- builder._generator = self2;
11655
- builder._styler = _styler;
11656
- builder._isEmpty = _isEmpty;
11657
- return builder;
11658
- };
11659
- const applyStyle = (self2, string) => {
11660
- if (self2.level <= 0 || !string) {
11661
- return self2._isEmpty ? "" : string;
11662
- }
11663
- let styler = self2._styler;
11664
- if (styler === void 0) {
11665
- return string;
11666
- }
11667
- const { openAll, closeAll } = styler;
11668
- if (string.indexOf("\x1B") !== -1) {
11669
- while (styler !== void 0) {
11670
- string = stringReplaceAll(string, styler.close, styler.open);
11671
- styler = styler.parent;
11672
- }
11673
- }
11674
- const lfIndex = string.indexOf("\n");
11675
- if (lfIndex !== -1) {
11676
- string = stringEncaseCRLFWithFirstIndex(string, closeAll, openAll, lfIndex);
11677
- }
11678
- return openAll + string + closeAll;
11679
- };
11680
- let template;
11681
- const chalkTag = (chalk2, ...strings) => {
11682
- const [firstString] = strings;
11683
- if (!isArray(firstString) || !isArray(firstString.raw)) {
11684
- return strings.join(" ");
11685
- }
11686
- const arguments_ = strings.slice(1);
11687
- const parts = [firstString.raw[0]];
11688
- for (let i = 1; i < firstString.length; i++) {
11689
- parts.push(
11690
- String(arguments_[i - 1]).replace(/[{}\\]/g, "\\$&"),
11691
- String(firstString.raw[i])
11692
- );
11693
- }
11694
- if (template === void 0) {
11695
- template = requireTemplates();
11696
- }
11697
- return template(chalk2, parts.join(""));
11698
- };
11699
- Object.defineProperties(Chalk.prototype, styles);
11700
- const chalk = Chalk();
11701
- chalk.supportsColor = stdoutColor;
11702
- chalk.stderr = Chalk({ level: 0 });
11703
- chalk.stderr.supportsColor = stderrColor;
11704
- const { accessSync, constants, readFileSync } = fs$1;
11705
- const envOptions = {};
11706
- function SetupConfig(envOptions2, logger) {
11707
- const envfile = process.env.STSENVFILE === void 0 ? "/.env" : process.env.STSENVFILE;
11708
- config_1({ path: envfile });
11709
- const defconfig = {
11710
- // Node runtime environment
11711
- isProduction: process.env.NODE_ENV === void 0 ? false : process.env.NODE_ENV === "production" ? true : false,
11712
- isTest: process.env.NODE_ENV === void 0 ? false : process.env.NODE_ENV === "test" ? true : false,
11713
- dbuser: process.env.DB_USER === void 0 ? "postgres" : process.env.DB_USER,
11714
- dbpassword: process.env.DB_PASSWORD === void 0 ? "postgres" : process.env.DB_PASSWORD,
11715
- dbpasswordfile: process.env.DB_PASSWORD_FILE,
11716
- dbhost: process.env.DB_HOST === void 0 ? "localhost:5432" : process.env.DB_HOST,
11717
- database: process.env.DB_DATABASE === void 0 ? "stsrestmsdb01" : process.env.DB_DATABASE,
11718
- databaseUrl: process.env.DATABASE_URL,
11719
- connectionString: "",
11720
- defaultDatabaseConnectionString: "",
11721
- STSServerType: process.env.STS_SERVER_TYPE === void 0 ? "EXPRESS_TLS" : process.env.STS_SERVER_TYPE,
11722
- logToFile: process.env.LOG_TO_FILE === void 0 ? false : process.env.LOG_TO_FILE === "true" ? true : false,
11723
- logFilePath: process.env.LOG_FILE_PATH === void 0 ? "/var/lib/sts" : process.env.LOG_FILE_PATH,
11724
- logFileFormat: process.env.LOG_FILE_FORMAT === void 0 ? "csv" : process.env.LOG_FILE_FORMAT,
11725
- poolSize: process.env.POOL_SIZE === void 0 ? 500 : parseInt(process.env.POOL_SIZE),
11726
- useCPUs: process.env.MAX_CPU === void 0 ? -1 : parseFloat(process.env.MAX_CPU),
11727
- respawnOnFail: process.env.RESPAWN === void 0 ? true : process.env.RESPAWN === "true" ? true : false,
11728
- defaultDatabaseEntries: process.env.DEFAULT_DB_ENTRIES === void 0 ? 1e4 : parseInt(process.env.DEFAULT_DB_ENTRIES),
11729
- useRedisDatabaseCache: process.env.USE_REDIS_DATABASE_CACHE === void 0 ? false : process.env.USE_REDIS_DATABASE_CACHE === "true" ? true : false,
11730
- useSocketIoRedisAdaptor: process.env.USE_SOCKET_IO_REDIS_ADAPTOR === void 0 ? false : process.env.USE_SOCKET_IO_REDIS_ADAPTOR === "true" ? true : false,
11731
- socketIoRedisAdaptorUrl: process.env.SOCKET_IO_REDIS_ADAPTOR_URL === void 0 ? "redis://localhost:6379" : process.env.SOCKET_IO_REDIS_ADAPTOR_URL,
11732
- useRedisInstrumentationTransport: process.env.USE_REDIS_INSTRUMENTATION_TRANSPORT === void 0 ? false : process.env.USE_REDIS_INSTRUMENTATION_TRANSPORT === "true" ? true : false,
11733
- redisInstrumentationTransportUrl: process.env.REDIS_INSTRUMENTATION_TRANSPORT_URL === void 0 ? "redis://localhost:6379" : process.env.REDIS_INSTRUMENTATION_TRANSPORT_URL,
11734
- redisDatabaseCacheEndFlush: process.env.REDIS_DATABASE_CACHE_END_FLUSH === void 0 ? false : process.env.REDIS_DATABASE_CACHE_END_FLUSH === "true" ? true : false,
11735
- redisDatabaseCacheUrl: process.env.REDIS_DATABASE_CACHE_URL === void 0 ? "redis://localhost:6379" : process.env.REDIS_DATABASE_CACHE_URL,
11736
- defaultDatabaseMinExtraDataSize: process.env.DEFAULT_DATABASE_MIN_EXTRA_DATA_SIZE === void 0 ? 0 : parseInt(process.env.DEFAULT_DATABASE_MIN_EXTRA_DATA_SIZE),
11737
- defaultDatabaseMaxExtraDataSize: process.env.DEFAULT_DATABASE_MAX_EXTRA_DATA_SIZE === void 0 ? 2e3 : parseInt(process.env.DEFAULT_DATABASE_MAX_EXTRA_DATA_SIZE),
11738
- rest01endpoint: process.env.REST01_ENDPOINT === void 0 ? "https://localhost" : process.env.REST01_ENDPOINT,
11739
- rest01hostport: process.env.REST01_HOST_PORT === void 0 ? "3003" : process.env.REST01_HOST_PORT,
11740
- rest01port: process.env.REST01_PORT === void 0 ? "3003" : process.env.REST01_PORT,
11741
- rest01apiroot: process.env.REST01_APIROOT === void 0 ? "/stsrest01/v1" : process.env.REST01_APIROOT,
11742
- rest01prometheussupport: process.env.REST01_PROM_SUPPORT === void 0 ? true : process.env.REST01_PROM_SUPPORT === "true" ? true : false,
11743
- rest01prometheusclusterport: process.env.REST01_PROM_CLUSTER_PORT === void 0 ? "3013" : process.env.REST01_PROM_CLUSTER_PORT,
11744
- rest01servicename: process.env.REST01_SERVICE_NAME === void 0 ? "STSRest01" : process.env.REST01_SERVICE_NAME,
11745
- rest01serviceversion: process.env.REST01_SERVICE_VERSION === void 0 ? "1.0.0" : process.env.REST01_SERVICE_VERSION,
11746
- stsfhirendpoint: process.env.STSFHIR_ENDPOINT === void 0 ? "https://localhost" : process.env.STSFHIR_ENDPOINT,
11747
- stsfhirhostport: process.env.STSFHIR_HOST_PORT === void 0 ? "3005" : process.env.STSFHIR_HOST_PORT,
11748
- stsfhirport: process.env.STSFHIR_PORT === void 0 ? "3005" : process.env.STSFHIR_PORT,
11749
- stsfhirapiroot: process.env.STSFHIR_APIROOT === void 0 ? "/stsfhir/r5" : process.env.STSFHIR_APIROOT,
11750
- stsfhirprometheussupport: process.env.STSFHIR_PROM_SUPPORT === void 0 ? true : process.env.STSFHIR_PROM_SUPPORT === "true" ? true : false,
11751
- stsfhirprometheusclusterport: process.env.STSFHIR_PROM_CLUSTER_PORT === void 0 ? "3015" : process.env.STSFHIR_PROM_CLUSTER_PORT,
11752
- stsfhirservicename: process.env.STSFHIR_SERVICE_NAME === void 0 ? "STSFHIR" : process.env.STSFHIR_SERVICE_NAME,
11753
- stsfhirserviceversion: process.env.STSFHIR_SERVICE_VERSION === void 0 ? "1.0.0" : process.env.STSFHIR_SERVICE_VERSION,
11754
- imendpoint: process.env.IM_ENDPOINT === void 0 ? "https://localhost" : process.env.IM_ENDPOINT,
11755
- imhostport: process.env.IM_HOST_PORT === void 0 ? "3001" : process.env.IM_HOST_PORT,
11756
- import: process.env.IM_PORT === void 0 ? "3001" : process.env.IM_PORT,
11757
- imapiroot: process.env.IM_APIROOT === void 0 ? "/stsinstrumentmanager/v1" : process.env.IM_APIROOT,
11758
- imprometheussupport: process.env.IM_PROM_SUPPORT === void 0 ? true : process.env.IM_PROM_SUPPORT === "true" ? true : false,
11759
- imprometheusclusterport: process.env.IM_PROM_CLUSTER_PORT === void 0 ? "3011" : process.env.IM_PROM_CLUSTER_PORT,
11760
- imservicename: process.env.IM_SERVICE_NAME === void 0 ? "STSInstrumentManager" : process.env.IM_SERVICE_NAME,
11761
- imserviceversion: process.env.IM_SERVICE_VERSION === void 0 ? "1.0.0" : process.env.IM_SERVICE_VERSION,
11762
- imRedisKeepAliveProcessorUrl: process.env.IM_REDIS_KEEP_ALIVE_PROCESSOR_URL === void 0 ? "redis://localhost:6379" : process.env.IM_REDIS_KEEP_ALIVE_PROCESSOR_URL,
11763
- imRedisMessageProcessorUrl: process.env.IM_REDIS_MESSAGE_PROCESSOR_URL === void 0 ? "redis://localhost:6379" : process.env.IM_REDIS_MESSAGE_PROCESSOR_URL,
11764
- asendpoint: process.env.AS_ENDPOINT === void 0 ? "https://localhost" : process.env.AS_ENDPOINT,
11765
- ashostport: process.env.AS_HOST_PORT === void 0 ? "3002" : process.env.AS_HOST_PORT,
11766
- asport: process.env.AS_PORT === void 0 ? "3002" : process.env.AS_PORT,
11767
- asapiroot: process.env.AS_API_ROOT === void 0 ? "/stsauth/v1.0" : process.env.AS_API_ROOT,
11768
- asoauthapiroot: process.env.AS_OAUTH_API_ROOT === void 0 ? "/oauth2/v2.0" : process.env.AS_OAUTH_API_ROOT,
11769
- asadminapiroot: process.env.AS_ADMIN_API_ROOT === void 0 ? "/admin/v1.0" : process.env.AS_ADMIN_API_ROOT,
11770
- asprometheussupport: process.env.AS_PROM_SUPPORT === void 0 ? true : process.env.AS_PROM_SUPPORT === "true" ? true : false,
11771
- asprometheusclusterport: process.env.AS_PROM_CLUSTER_PORT === void 0 ? "3012" : process.env.AS_PROM_CLUSTER_PORT,
11772
- asservicename: process.env.AS_SERVICE_NAME === void 0 ? "STSAuth" : process.env.AS_SERVICE_NAME,
11773
- asserviceversion: process.env.AS_SERVICE_VERSION === void 0 ? "1.0.0" : process.env.AS_SERVICE_VERSION,
11774
- asjwksjsonpath: process.env.AS_JWKS_JSON_PATH === void 0 ? "/.well-known/jwks.json" : process.env.AS_JWKS_JSON_PATH,
11775
- asjwkskeyrotationtime: process.env.AS_JWKS_KEY_ROTATION_TIME === void 0 ? 86400 : parseInt(process.env.AS_JWKS_KEY_ROTATION_TIME),
11776
- asjwkskeypurgetimeoffset: process.env.AS_JWKS_KEY_PURGE_TIME_OFFSET === void 0 ? 300 : parseInt(process.env.AS_JWKS_KEY_PURGE_TIME_OFFSET),
11777
- asjwkskeycount: process.env.AS_JWKS_KEY_COUNT === void 0 ? 4 : parseInt(process.env.AS_JWKS_KEY_COUNT),
11778
- asaccesstokenexpire: process.env.AS_ACCESS_TOKEN_EXPIRE === void 0 ? 43200 : parseInt(process.env.AS_ACCESS_TOKEN_EXPIRE),
11779
- authorizeendpoint: process.env.AUTHORIZE_ENDPOINT === void 0 ? "https://localhost" : process.env.AUTHORIZE_ENDPOINT,
11780
- authorizeport: process.env.AUTHORIZE_PORT === void 0 ? "3010" : process.env.AUTHORIZE_PORT,
11781
- authorizeapiroot: process.env.AUTHORIZE_API_ROOT === void 0 ? "/stsa" : process.env.AUTHORIZE_API_ROOT,
11782
- authorizeapi: process.env.AUTHORIZE_API === void 0 ? "/authorize" : process.env.AUTHORIZE_API,
11783
- brokerendpoint: process.env.BROKER_ENDPOINT === void 0 ? "https://localhost" : process.env.BROKER_ENDPOINT,
11784
- brokerhostport: process.env.BROKER_HOST_PORT === void 0 ? "3006" : process.env.BROKER_HOST_PORT,
11785
- brokerport: process.env.BROKER_PORT === void 0 ? "3006" : process.env.BROKER_PORT,
11786
- brokerapiroot: process.env.BROKER_APIROOT === void 0 ? "/stsbroker/v1.0" : process.env.BROKER_APIROOT,
11787
- brokerprometheussupport: process.env.BROKER_PROM_SUPPORT === void 0 ? true : process.env.BROKER_PROM_SUPPORT === "true" ? true : false,
11788
- brokerprometheusclusterport: process.env.BROKER_PROM_CLUSTER_PORT === void 0 ? "3016" : process.env.BROKER_PROM_CLUSTER_PORT,
11789
- brokerservicename: process.env.BROKER_SERVICE_NAME === void 0 ? "STSBroker" : process.env.BROKER_SERVICE_NAME,
11790
- brokerserviceversion: process.env.BROKER_SERVICE_VERSION === void 0 ? "1.0.0" : process.env.BROKER_SERVICE_VERSION,
11791
- trnendpoint: process.env.TRN_ENDPOINT === void 0 ? "https://localhost" : process.env.TRN_ENDPOINT,
11792
- trnhostport: process.env.TRN_HOST_PORT === void 0 ? "3007" : process.env.TRN_HOST_PORT,
11793
- trnport: process.env.TRN_PORT === void 0 ? "3007" : process.env.TRN_PORT,
11794
- trnapiroot: process.env.TRN_APIROOT === void 0 ? "/ststrn/v1.0" : process.env.TRN_APIROOT,
11795
- trnprometheussupport: process.env.TRN_PROM_SUPPORT === void 0 ? true : process.env.TRN_PROM_SUPPORT === "true" ? true : false,
11796
- trnprometheusclusterport: process.env.TRN_PROM_CLUSTER_PORT === void 0 ? "3017" : process.env.TRN_PROM_CLUSTER_PORT,
11797
- trnservicename: process.env.TRN_SERVICE_NAME === void 0 ? "STSTestRunnerNode" : process.env.TRN_SERVICE_NAME,
11798
- trnserviceversion: process.env.TRN_SERVICE_VERSION === void 0 ? "1.0.0" : process.env.TRN_SERVICE_VERSION,
11799
- trnautostartdelay: process.env.TRN_AUTO_START_DELAY === void 0 ? 0 : parseInt(process.env.TRN_AUTO_START_DELAY),
11800
- trnautostartconfig: process.env.TRN_AUTO_START_CONFIG === void 0 ? "" : process.env.TRN_AUTO_START_CONFIG,
11801
- trnRedisMessageProcessorUrl: process.env.TRN_REDIS_MESSAGE_PROCESSOR_URL === void 0 ? "redis://localhost:6379" : process.env.TRN_REDIS_MESSAGE_PROCESSOR_URL,
11802
- lambdaendpoint: process.env.LAMBDA_ENDPOINT === void 0 ? "https://localhost" : process.env.LAMBDA_ENDPOINT,
11803
- lambdahostport: process.env.LAMBDA_HOST_PORT === void 0 ? "3009" : process.env.LAMBDA_HOST_PORT,
11804
- lambdaport: process.env.LAMBDA_PORT === void 0 ? "3009" : process.env.LAMBDA_PORT,
11805
- lambdaapiroot: process.env.LAMBDA_APIROOT === void 0 ? "/stslambda/v1.0" : process.env.LAMBDA_APIROOT,
11806
- lambdaprometheussupport: process.env.LAMBDA_PROM_SUPPORT === void 0 ? true : process.env.LAMBDA_PROM_SUPPORT === "true" ? true : false,
11807
- lambdaprometheusclusterport: process.env.LAMBDA_PROM_CLUSTER_PORT === void 0 ? "3019" : process.env.LAMBDA_PROM_CLUSTER_PORT,
11808
- lambdaservicename: process.env.LAMBDA_SERVICE_NAME === void 0 ? "STSLambda" : process.env.LAMBDA_SERVICE_NAME,
11809
- lambdaserviceversion: process.env.LAMBDA_SERVICE_VERSION === void 0 ? "1.0.0" : process.env.LAMBDA_SERVICE_VERSION,
11810
- publishinterval: process.env.PUBLISH_INTERVAL === void 0 ? 1e3 : parseInt(process.env.PUBLISH_INTERVAL),
11811
- publishtimeout: process.env.PUBLISH_TIMEOUT === void 0 ? 750 : parseInt(process.env.PUBLISH_TIMEOUT),
11812
- transport: process.env.TRANSPORT === void 0 ? "RESTAPI" : process.env.TRANSPORT,
11813
- useSecureCookies: process.env.USE_SECURE_COOKIES === void 0 ? false : process.env.USE_SECURE_COOKIES === "true" ? true : false,
11814
- keepAlive: process.env.KEEP_ALIVE === void 0 ? true : process.env.KEEP_ALIVE === "true" ? true : false,
11815
- maxSockets: process.env.MAX_SOCKETS === void 0 ? 10 : parseInt(process.env.MAX_SOCKETS),
11816
- maxTotalSockets: process.env.MAX_TOTAL_SOCKETS === void 0 ? 20 : parseInt(process.env.MAX_TOTAL_SOCKETS),
11817
- maxFreeSockets: process.env.MAX_FREE_SOCKETS === void 0 ? 256 : parseInt(process.env.MAX_FREE_SOCKETS),
11818
- timeout: process.env.TIMEOUT === void 0 ? 1e4 : parseInt(process.env.TIMEOUT),
11819
- maxPayloadSize: process.env.MAX_PAYLOAD_SIZE === void 0 ? "50mb" : process.env.MAX_PAYLOAD_SIZE,
11820
- instrumentationObservationInterval: process.env.INSTRUMENTATION_OBSERVATION_INTERVAL === void 0 ? 1e3 : parseInt(process.env.INSTRUMENTATION_OBSERVATION_INTERVAL),
11821
- instrumentationTimeWindow: process.env.INSTRUMENTATION_TIME_WINDOW === void 0 ? 600 : parseInt(process.env.INSTRUMENTATION_TIME_WINDOW),
11822
- authJWTAccessTokenTimeout: process.env.AUTH_JWT_ACCESS_TOKEN_TIMEOUT === void 0 ? 600 : parseInt(process.env.AUTH_JWT_ACCESS_TOKEN_TIMEOUT),
11823
- authJWTRefreshTokenTimeout: process.env.AUTH_JWT_REFRESH_TOKEN_TIMEOUT === void 0 ? 3600 * 24 : parseInt(process.env.AUTH_JWT_REFRESH_TOKEN_TIMEOUT),
11824
- authCookieTimeout: process.env.AUTH_COOKIE_TIMEOUT === void 0 ? 3600 * 24 : parseInt(process.env.AUTH_COOKIE_TIMEOUT),
11825
- masterProcessExitTime: process.env.MASTER_PROCESS_EXIT_TIME === void 0 ? 500 : parseInt(process.env.MASTER_PROCESS_EXIT_TIME),
11826
- childProcessExitTime: process.env.CHILD_PROCESS_EXIT_TIME === void 0 ? 500 : parseInt(process.env.CHILD_PROCESS_EXIT_TIME),
11827
- systemInformationInterval: process.env.SYSTEM_INFORMATION_INTERVAL === void 0 ? 1e3 : parseInt(process.env.SYSTEM_INFORMATION_INTERVAL),
11828
- ignoresocketio: process.env.IGNORE_SOCKETIO === void 0 ? true : process.env.IGNORE_SOCKETIO === "true" ? true : false,
11829
- httpsserverkeypath: process.env.HTTPS_SERVER_KEY_PATH === void 0 ? "/var/lib/sts/stsglobalresources/keys/server.key" : process.env.HTTPS_SERVER_KEY_PATH,
11830
- httpsservercertpath: process.env.HTTPS_SERVER_CERT_PATH === void 0 ? "/var/lib/sts/stsglobalresources/keys/server.cert" : process.env.HTTPS_SERVER_CERT_PATH,
11831
- tsjwkskeys: process.env.TS_JWKS_KEYS === void 0 ? 3 : parseInt(process.env.TS_JWKS_KEYS),
11832
- jwksAuthConfigCache: process.env.JWKS_AUTH_CONFIG_CACHE === void 0 ? true : process.env.JWKS_AUTH_CONFIG_CACHE === "true" ? true : false,
11833
- jwksAuthConfigCacheMaxEntries: process.env.JWKS_AUTH_CONFIG_CACHE_MAX_ENTRIES === void 0 ? 5 : parseInt(process.env.JWKS_AUTH_CONFIG_CACHE_MAX_ENTRIES),
11834
- jwksAuthConfigCacheMaxAge: process.env.JWKS_AUTH_CONFIG_CACHE_MAX_AGE === void 0 ? 6e5 : parseInt(process.env.JWKS_AUTH_CONFIG_CACHE_MAX_AGE),
11835
- jwksAuthConfigRateLimit: process.env.JWKS_AUTH_CONFIG_RATE_LIMIT === void 0 ? true : process.env.JWKS_AUTH_CONFIG_RATE_LIMIT === "true" ? true : false,
11836
- jwksAuthConfigRateLimitRequestsPerMinute: process.env.JWKS_AUTH_CONFIG_RATE_LIMIT_REQUESTS_PER_MINUTE === void 0 ? 10 : parseInt(process.env.JWKS_AUTH_CONFIG_RATE_LIMIT_REQUESTS_PER_MINUTE),
11837
- jwksAuthConfigTimeout: process.env.JWKS_AUTH_CONFIG_TIMEOUT === void 0 ? 3e4 : parseInt(process.env.JWKS_AUTH_CONFIG_TIMEOUT),
11838
- influxDB_APIToken: process.env.INFLUXDB_API_TOKEN === void 0 ? "password" : process.env.INFLUXDB_API_TOKEN,
11839
- influxDB_APITokenFile: process.env.INFLUXDB_API_TOKEN_FILE,
11840
- influxDB_Url: process.env.INFLUXDB_URL === void 0 ? "http://localhost:8086" : process.env.INFLUXDB_URL,
11841
- influxDB_Org: process.env.INFLUXDB_ORG === void 0 ? "my-org" : process.env.INFLUXDB_ORG,
11842
- influxDB_Bucket: process.env.INFLUXDB_BUCKET === void 0 ? "TestBucket01" : process.env.INFLUXDB_BUCKET,
11843
- influxDB_keepAlive: process.env.INFLUXDB_KEEP_ALIVE === void 0 ? true : process.env.INFLUXDB_KEEP_ALIVE === "true" ? true : false,
11844
- influxDB_maxSockets: process.env.INFLUXDB_MAX_SOCKETS === void 0 ? 10 : parseInt(process.env.INFLUXDB_MAX_SOCKETS),
11845
- influxDB_maxTotalSockets: process.env.INFLUXDB_MAX_TOTAL_SOCKETS === void 0 ? 20 : parseInt(process.env.INFLUXDB_MAX_TOTAL_SOCKETS),
11846
- influxDB_maxFreeSockets: process.env.INFLUXDB_MAX_FREE_SOCKETS === void 0 ? 256 : parseInt(process.env.INFLUXDB_MAX_FREE_SOCKETS),
11847
- influxDB_timeout: process.env.INFLUXDB_TIMEOUT === void 0 ? 1e4 : parseInt(process.env.INFLUXDB_TIMEOUT),
11848
- influxDB_rejectUnauthorized: process.env.INFLUXDB_REJECT_UNAUTHORIZED === void 0 ? true : process.env.INFLUXDB_REJECT_UNAUTHORIZED === "true" ? true : false,
11849
- influxDB_writeDataPointFlushTimeout: process.env.INFLUXDB_WRITE_DATA_POINT_FLUSH_TIMEOUT === void 0 ? 1e3 : parseInt(process.env.INFLUXDB_WRITE_DATA_POINT_FLUSH_TIMEOUT),
11850
- kafka_clientId: process.env.KAFKA_CLIENT_ID === void 0 ? "myclient" : process.env.KAFKA_CLIENT_ID,
11851
- kafka_brokers: process.env.KAFKA_BROKERS === void 0 ? "localhost:9092" : process.env.KAFKA_BROKERS,
11852
- kafka_admin_timeout: process.env.KAFKA_ADMIN_TIMEOUT === void 0 ? 5e3 : parseInt(process.env.KAFKA_ADMIN_TIMEOUT),
11853
- kafka_connection_timeout: process.env.KAFKA_CONNECTION_TIMEOUT === void 0 ? 5e3 : parseInt(process.env.KAFKA_CONNECTION_TIMEOUT),
11854
- kafka_request_timeout: process.env.KAFKA_REQUEST_TIMEOUT === void 0 ? 5e3 : parseInt(process.env.KAFKA_REQUEST_TIMEOUT),
11855
- kafka_log_level: process.env.KAFKA_LOG_LEVEL === void 0 ? "nothing" : process.env.KAFKA_LOG_LEVEL,
11856
- kafka_keep_alive: process.env.KAFKA_KEEP_ALIVE === void 0 ? 3e4 : parseInt(process.env.KAFKA_KEEP_ALIVE),
11857
- kafka_use_ssl: process.env.KAFKA_USE_SSL === void 0 ? false : process.env.KAFKA_USE_SSL === "true" ? true : false,
11858
- kafka_ssl_rejectUnauthorized: process.env.KAFKA_SSL_REJECT_UNAUTHORIZED === void 0 ? true : process.env.KAFKA_SSL_REJECT_UNAUTHORIZED === "true" ? true : false,
11859
- kafka_ssl_cafile: process.env.KAFKA_SSL_CAFILE === void 0 ? "/my/custom/ca.crt" : process.env.KAFKA_SSL_CAFILE,
11860
- kafka_ssl_keyfile: process.env.KAFKA_SSL_KEYFILE === void 0 ? "/my/custom/client-key.pem" : process.env.KAFKA_SSL_KEYFILE,
11861
- kafka_ssl_certfile: process.env.KAFKA_SSL_CERTFILE === void 0 ? "/my/custom/client-cert.pem" : process.env.KAFKA_SSL_CERTFILE,
11862
- kafka_consume_from_beginning: process.env.KAFKA_CONSUME_FROM_BEGINNING === void 0 ? true : process.env.KAFKA_CONSUME_FROM_BEGINNING === "true" ? true : false,
11863
- observabilityPublishMode: process.env.OBSERVABILITY_PUBLISH_MODE === void 0 ? "PROXY" : process.env.OBSERVABILITY_PUBLISH_MODE,
11864
- stsUiTermObservabilityConsumptionMode: process.env.STSUITERM_OBSERVABILITY_CONSUMPTION_MODE === void 0 ? "PROXY" : process.env.STSUITERM_OBSERVABILITY_CONSUMPTION_MODE
11865
- };
11866
- const ReadFile = (passwordFile) => {
11867
- try {
11868
- accessSync(passwordFile, constants.R_OK);
11869
- const data = readFileSync(passwordFile, "utf8");
11870
- if (logger) ;
11871
- return data;
11872
- } catch (err) {
11873
- return "";
11874
- }
11875
- };
11876
- const fileconfig = [
11877
- { fileprop: "dbpasswordfile", prop: "dbpassword" },
11878
- // JWKS secret file processing
11879
- { fileprop: "tsjwksstorepathfile", prop: "tsjwksstorepath" },
11880
- // InfluxDB file processing
11881
- { fileprop: "influxDB_APITokenFile", prop: "influxDB_APIToken" }
11882
- ];
11883
- fileconfig.forEach((v) => {
11884
- if (defconfig[v.fileprop] !== void 0) {
11885
- defconfig[v.prop] = ReadFile(defconfig[v.fileprop]);
11886
- }
11887
- });
11888
- for (const [key, val] of Object.entries(defconfig)) {
11889
- envOptions2[key] = val;
11890
- }
11891
- }
11892
- function $SetupOptions(envOptions2) {
11893
- SetupConfig(envOptions2);
11894
- const options = envOptions2;
11895
- if (options.dbhost) {
11896
- const hosts = options.dbhost.split(",");
11897
- envOptions2.connectionString = hosts.map((host) => {
11898
- return `postgresql://${options.dbuser}:${options.dbpassword}@${host}/${options.database}`;
11899
- }).join(",");
11900
- envOptions2.defaultDatabaseConnectionString = hosts.map((host) => {
11901
- return `postgresql://${options.dbuser}:${options.dbpassword}@${host}/postgres`;
11902
- }).join(",");
11903
- }
11904
- }
11905
- const envOptionsHandler = {
11906
- get(target2, prop2, receiver) {
11907
- if (Object.keys(target2).length === 0) {
11908
- $SetupOptions(target2);
11909
- }
11910
- return Reflect.get(target2, prop2, receiver);
11911
- }
11912
- };
11913
- const goptions = new Proxy(envOptions, envOptionsHandler);
11914
- class AgentManager {
11915
- constructor(agentManagerOptions) {
11916
- __privateAdd$1(this, _options$1);
11917
- __privateAdd$1(this, _httpAgent, null);
11918
- __privateAdd$1(this, _httpsAgent, null);
11919
- __privateAdd$1(this, _agentResetInterval, null);
11920
- __privateAdd$1(this, _requestCount, 0);
11921
- __privateAdd$1(this, _SetupResetInterval, () => {
11922
- if (__privateGet$1(this, _options$1).agentResetInterval && __privateGet$1(this, _options$1).agentResetInterval > 0) {
11923
- __privateSet$1(this, _agentResetInterval, setTimeout(() => {
11924
- this.ResetAgent();
11925
- __privateGet$1(this, _SetupResetInterval).call(this);
11926
- }, __privateGet$1(this, _options$1).agentResetInterval).unref());
11927
- }
11928
- });
11929
- __privateAdd$1(this, _GetAgentOptions, (https2) => {
11930
- let options;
11931
- if (__privateGet$1(this, _options$1).agentOptions) {
11932
- options = {
11933
- keepAlive: __privateGet$1(this, _options$1).agentOptions.keepAlive,
11934
- maxSockets: __privateGet$1(this, _options$1).agentOptions.maxSockets,
11935
- maxTotalSockets: __privateGet$1(this, _options$1).agentOptions.maxTotalSockets,
11936
- maxFreeSockets: __privateGet$1(this, _options$1).agentOptions.maxFreeSockets,
11937
- timeout: __privateGet$1(this, _options$1).agentOptions.timeout
11938
- //@@ config
11939
- };
11940
- if (https2 === true) {
11941
- options.rejectUnauthorized = __privateGet$1(this, _options$1).agentOptions.rejectUnauthorized;
11942
- }
11943
- } else {
11944
- options = {
11945
- keepAlive: process.env.NODE_ENV === "test" ? false : goptions.keepAlive,
11946
- maxSockets: goptions.maxSockets,
11947
- maxTotalSockets: goptions.maxTotalSockets,
11948
- maxFreeSockets: goptions.maxFreeSockets,
11949
- timeout: 3e4
11950
- //@@ config
11951
- };
11952
- if (https2 === true) {
11953
- options.rejectUnauthorized = goptions.isProduction;
11954
- }
11955
- }
11956
- return options;
11957
- });
11958
- __privateSet$1(this, _options$1, agentManagerOptions);
11959
- if (__privateGet$1(this, _options$1).agentResetInterval) {
11960
- __privateGet$1(this, _SetupResetInterval).call(this);
11961
- }
11962
- }
11963
- get agentResetInterval() {
11964
- return __privateGet$1(this, _options$1).agentResetInterval;
11965
- }
11966
- set agentResetInterval(val) {
11967
- if (__privateGet$1(this, _agentResetInterval)) {
11968
- clearTimeout(__privateGet$1(this, _agentResetInterval));
11969
- }
11970
- __privateGet$1(this, _options$1).agentResetInterval = val;
11971
- __privateGet$1(this, _SetupResetInterval).call(this);
11972
- }
11973
- get agentResetCount() {
11974
- return __privateGet$1(this, _options$1).agentResetCount;
11975
- }
11976
- set agentResetCount(val) {
11977
- __privateGet$1(this, _options$1).agentResetCount = val;
11978
- }
11979
- IncRequestCount() {
11980
- __privateWrapper(this, _requestCount)._++;
11981
- if (__privateGet$1(this, _options$1).agentResetCount) {
11982
- if (__privateGet$1(this, _requestCount) % __privateGet$1(this, _options$1).agentResetCount === 0) {
11983
- this.ResetAgent();
11984
- }
11985
- }
11986
- }
11987
- IsHttps(protocol) {
11988
- if (protocol.toLowerCase().startsWith("https:")) {
11989
- return true;
11990
- }
11991
- return false;
11992
- }
11993
- GetAgent(protocol) {
11994
- if (protocol.toLowerCase().startsWith("https:")) {
11995
- if (__privateGet$1(this, _httpsAgent) === null) {
11996
- __privateSet$1(this, _httpsAgent, new http.Agent(__privateGet$1(this, _GetAgentOptions).call(this, true)));
11997
- }
11998
- return __privateGet$1(this, _httpsAgent);
11999
- } else if (protocol.toLowerCase().startsWith("http:")) {
12000
- if (__privateGet$1(this, _httpAgent) === null) {
12001
- __privateSet$1(this, _httpAgent, new http.Agent(__privateGet$1(this, _GetAgentOptions).call(this, false)));
12002
- }
12003
- return __privateGet$1(this, _httpAgent);
12004
- } else {
12005
- return null;
12006
- }
12007
- }
12008
- ResetAgent() {
12009
- __privateSet$1(this, _httpAgent, null);
12010
- __privateSet$1(this, _httpsAgent, null);
12011
- }
12012
- /*
12013
- url
12014
- ,method: 'post'
12015
- ,data: payload
12016
- ,headers: headers
12017
- ,httpsAgent: this.#agentManager.GetAgent(url)
12018
- */
12019
- /*
12020
- postgresContainer = await new GenericContainer("postgres")
12021
- .withExposedPorts(5432)
12022
- .withEnvironment({
12023
- POSTGRES_PASSWORD: "postgres",
12024
- //UV_THREADPOOL_SIZE: "64"
12025
- })
12026
- .withCommand(['-c', 'max_connections=20'])
12027
- .start();
12028
- */
12029
- Terminate() {
12030
- if (__privateGet$1(this, _agentResetInterval)) {
12031
- clearTimeout(__privateGet$1(this, _agentResetInterval));
12032
- __privateSet$1(this, _agentResetInterval, null);
12033
- }
12034
- if (__privateGet$1(this, _httpAgent)) {
12035
- __privateGet$1(this, _httpAgent).destroy();
12036
- __privateSet$1(this, _httpAgent, null);
12037
- }
12038
- if (__privateGet$1(this, _httpsAgent)) {
12039
- __privateGet$1(this, _httpsAgent).destroy();
12040
- __privateSet$1(this, _httpsAgent, null);
12041
- }
12042
- }
12043
- }
12044
- _options$1 = /* @__PURE__ */ new WeakMap();
12045
- _httpAgent = /* @__PURE__ */ new WeakMap();
12046
- _httpsAgent = /* @__PURE__ */ new WeakMap();
12047
- _agentResetInterval = /* @__PURE__ */ new WeakMap();
12048
- _requestCount = /* @__PURE__ */ new WeakMap();
12049
- _SetupResetInterval = /* @__PURE__ */ new WeakMap();
12050
- _GetAgentOptions = /* @__PURE__ */ new WeakMap();
12051
- var __typeError2 = (msg) => {
12052
- throw TypeError(msg);
12053
- };
12054
- var __accessCheck2 = (obj, member, msg) => member.has(obj) || __typeError2("Cannot " + msg);
12055
- var __privateGet2 = (obj, member, getter) => (__accessCheck2(obj, member, "read from private field"), getter ? getter.call(obj) : member.get(obj));
12056
- var __privateAdd2 = (obj, member, value) => member.has(obj) ? __typeError2("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
12057
- var __privateSet2 = (obj, member, value, setter) => (__accessCheck2(obj, member, "write to private field"), member.set(obj, value), value);
12058
- var __privateMethod = (obj, member, method) => (__accessCheck2(obj, member, "access private method"), method);
12059
- var _options, _sockets, _agentManager, _SocketIoClientHelper_instances, LogDebugMessage_fn, LogErrorMessage_fn, EstablishSocketConnect_fn;
12060
- const isNode = Object.prototype.toString.call(typeof process !== "undefined" ? process : 0) === "[object process]";
12061
- class SocketIoClientHelper {
12062
- constructor(options) {
12063
- __privateAdd2(this, _SocketIoClientHelper_instances);
12064
- __privateAdd2(this, _options);
12065
- __privateAdd2(this, _sockets, {});
12066
- __privateAdd2(this, _agentManager, null);
12067
- __privateSet2(this, _options, options);
12068
- if (isNode) {
12069
- __privateSet2(this, _agentManager, new AgentManager({
12070
- agentOptions: __privateGet2(this, _options).agentOptions
12071
- }));
12072
- }
12073
- }
12074
- get sockets() {
12075
- return __privateGet2(this, _sockets);
12076
- }
12077
- SetupClientSideSocket(name2, address, onConnectCallBack, socketEventsCallBack, errorCallBack) {
12078
- this.sockets[name2] = {
12079
- name: name2,
12080
- address,
12081
- socket: null,
12082
- errorCallBack
12083
- };
12084
- __privateMethod(this, _SocketIoClientHelper_instances, EstablishSocketConnect_fn).call(this, name2, onConnectCallBack, socketEventsCallBack);
12085
- return this.sockets[name2].socket;
12086
- }
12087
- GetSocket(name2) {
12088
- return this.sockets[name2].socket;
12089
- }
12090
- GetSocketDetail(name2) {
12091
- return this.sockets[name2];
12092
- }
12093
- }
12094
- _options = /* @__PURE__ */ new WeakMap();
12095
- _sockets = /* @__PURE__ */ new WeakMap();
12096
- _agentManager = /* @__PURE__ */ new WeakMap();
12097
- _SocketIoClientHelper_instances = /* @__PURE__ */ new WeakSet();
12098
- LogDebugMessage_fn = function(message) {
12099
- if (__privateGet2(this, _options).logger) __privateGet2(this, _options).logger.debug(message);
12100
- };
12101
- LogErrorMessage_fn = function(message) {
12102
- if (__privateGet2(this, _options).logger) __privateGet2(this, _options).logger.error(message);
12103
- };
12104
- EstablishSocketConnect_fn = function(name2, onConnectCallBack, socketEventsCallBack) {
12105
- var _a;
12106
- const socketDetail = this.sockets[name2];
12107
- if (socketDetail.socket !== null) {
12108
- if (socketDetail.socket.connected === true) {
12109
- socketDetail.socket.disconnect();
12110
- }
12111
- socketDetail.socket = null;
12112
- if (isNode) {
12113
- setTimeout(() => __privateMethod(this, _SocketIoClientHelper_instances, EstablishSocketConnect_fn).call(this, name2, onConnectCallBack, socketEventsCallBack), 100).unref();
12114
- } else {
12115
- setTimeout(() => __privateMethod(this, _SocketIoClientHelper_instances, EstablishSocketConnect_fn).call(this, name2, onConnectCallBack, socketEventsCallBack), 100);
12116
- }
12117
- return;
12118
- }
12119
- let socketOptions;
12120
- if (isNode) {
12121
- socketOptions = {
12122
- transports: ["websocket"],
12123
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
12124
- agent: (_a = __privateGet2(this, _agentManager)) == null ? void 0 : _a.GetAgent(socketDetail.address)
12125
- };
12126
- } else {
12127
- socketOptions = {
12128
- transports: ["websocket"]
12129
- };
12130
- }
12131
- socketDetail.socket = io(socketDetail.address, socketOptions);
12132
- socketDetail.socket.on("connect", () => {
12133
- if (socketDetail.socket) {
12134
- __privateMethod(this, _SocketIoClientHelper_instances, LogDebugMessage_fn).call(this, `Socket: [${socketDetail.socket.id}]: connected`);
12135
- if (onConnectCallBack) {
12136
- setTimeout(() => {
12137
- onConnectCallBack(socketDetail.socket);
12138
- }, 0);
12139
- }
12140
- if (socketEventsCallBack) {
12141
- socketEventsCallBack(socketDetail.socket);
12142
- }
12143
- } else {
12144
- const errorMessage = "Could not get socket object from socket.io";
12145
- __privateMethod(this, _SocketIoClientHelper_instances, LogErrorMessage_fn).call(this, errorMessage);
12146
- socketDetail.errorCallBack(new Error(errorMessage));
9980
+ const errorMessage = "Could not get socket object from socket.io";
9981
+ __privateMethod(this, _SocketIoClientHelper_instances, LogErrorMessage_fn).call(this, errorMessage);
9982
+ socketDetail.errorCallBack(new Error(errorMessage));
12147
9983
  }
12148
9984
  });
12149
9985
  socketDetail.socket.on("disconnect", (reason) => {
12150
- var _a2, _b;
9986
+ var _a;
12151
9987
  __privateMethod(this, _SocketIoClientHelper_instances, LogDebugMessage_fn).call(this, "socket disconnect: " + reason);
12152
9988
  switch (reason) {
12153
9989
  case "io server disconnect":
12154
9990
  {
12155
9991
  __privateMethod(this, _SocketIoClientHelper_instances, LogDebugMessage_fn).call(this, "The server disconnected using disconnectSockets, i.e. normal safe shutdown from explicit disconnection by the server.");
12156
9992
  __privateMethod(this, _SocketIoClientHelper_instances, LogDebugMessage_fn).call(this, "The connection will be re-established when the server becomes available.");
12157
- const socketDetail2 = this.sockets[name2];
9993
+ const socketDetail2 = this.sockets[name];
12158
9994
  socketDetail2.socket = null;
12159
9995
  if (isNode) {
12160
- (_a2 = __privateGet2(this, _agentManager)) == null ? void 0 : _a2.ResetAgent();
12161
- setTimeout(() => __privateMethod(this, _SocketIoClientHelper_instances, EstablishSocketConnect_fn).call(this, name2, onConnectCallBack, socketEventsCallBack), 100).unref();
9996
+ if (__privateGet2(this, _options).agentManager) {
9997
+ __privateGet2(this, _options).agentManager.ResetAgent();
9998
+ }
9999
+ setTimeout(() => __privateMethod(this, _SocketIoClientHelper_instances, EstablishSocketConnect_fn).call(this, name, onConnectCallBack, socketEventsCallBack), 100).unref();
12162
10000
  } else {
12163
- setTimeout(() => __privateMethod(this, _SocketIoClientHelper_instances, EstablishSocketConnect_fn).call(this, name2, onConnectCallBack, socketEventsCallBack), 100);
10001
+ setTimeout(() => __privateMethod(this, _SocketIoClientHelper_instances, EstablishSocketConnect_fn).call(this, name, onConnectCallBack, socketEventsCallBack), 100);
12164
10002
  }
12165
10003
  }
12166
10004
  break;
@@ -12174,16 +10012,18 @@ EstablishSocketConnect_fn = function(name2, onConnectCallBack, socketEventsCallB
12174
10012
  {
12175
10013
  __privateMethod(this, _SocketIoClientHelper_instances, LogDebugMessage_fn).call(this, `Server unexpectedly disconnected. Reason: [${reason}]`);
12176
10014
  __privateMethod(this, _SocketIoClientHelper_instances, LogDebugMessage_fn).call(this, "The connection will be re-established when the server becomes available.");
12177
- const socketDetail2 = this.sockets[name2];
10015
+ const socketDetail2 = this.sockets[name];
12178
10016
  if (socketDetail2.socket) {
12179
10017
  socketDetail2.socket.disconnect();
12180
10018
  }
12181
10019
  socketDetail2.socket = null;
12182
10020
  if (isNode) {
12183
- (_b = __privateGet2(this, _agentManager)) == null ? void 0 : _b.ResetAgent();
12184
- setTimeout(() => __privateMethod(this, _SocketIoClientHelper_instances, EstablishSocketConnect_fn).call(this, name2, onConnectCallBack, socketEventsCallBack), 100).unref();
10021
+ if (__privateGet2(this, _options).agentManager) {
10022
+ (_a = __privateGet2(this, _options).agentManager) == null ? void 0 : _a.ResetAgent();
10023
+ }
10024
+ setTimeout(() => __privateMethod(this, _SocketIoClientHelper_instances, EstablishSocketConnect_fn).call(this, name, onConnectCallBack, socketEventsCallBack), 100).unref();
12185
10025
  } else {
12186
- setTimeout(() => __privateMethod(this, _SocketIoClientHelper_instances, EstablishSocketConnect_fn).call(this, name2, onConnectCallBack, socketEventsCallBack), 100);
10026
+ setTimeout(() => __privateMethod(this, _SocketIoClientHelper_instances, EstablishSocketConnect_fn).call(this, name, onConnectCallBack, socketEventsCallBack), 100);
12187
10027
  }
12188
10028
  }
12189
10029
  break;
@@ -12194,26 +10034,26 @@ var tinyEmitter = { exports: {} };
12194
10034
  function E() {
12195
10035
  }
12196
10036
  E.prototype = {
12197
- on: function(name2, callback, ctx) {
10037
+ on: function(name, callback, ctx) {
12198
10038
  var e = this.e || (this.e = {});
12199
- (e[name2] || (e[name2] = [])).push({
10039
+ (e[name] || (e[name] = [])).push({
12200
10040
  fn: callback,
12201
10041
  ctx
12202
10042
  });
12203
10043
  return this;
12204
10044
  },
12205
- once: function(name2, callback, ctx) {
10045
+ once: function(name, callback, ctx) {
12206
10046
  var self2 = this;
12207
10047
  function listener() {
12208
- self2.off(name2, listener);
10048
+ self2.off(name, listener);
12209
10049
  callback.apply(ctx, arguments);
12210
10050
  }
12211
10051
  listener._ = callback;
12212
- return this.on(name2, listener, ctx);
10052
+ return this.on(name, listener, ctx);
12213
10053
  },
12214
- emit: function(name2) {
10054
+ emit: function(name) {
12215
10055
  var data = [].slice.call(arguments, 1);
12216
- var evtArr = ((this.e || (this.e = {}))[name2] || []).slice();
10056
+ var evtArr = ((this.e || (this.e = {}))[name] || []).slice();
12217
10057
  var i = 0;
12218
10058
  var len = evtArr.length;
12219
10059
  for (i; i < len; i++) {
@@ -12221,9 +10061,9 @@ E.prototype = {
12221
10061
  }
12222
10062
  return this;
12223
10063
  },
12224
- off: function(name2, callback) {
10064
+ off: function(name, callback) {
12225
10065
  var e = this.e || (this.e = {});
12226
- var evts = e[name2];
10066
+ var evts = e[name];
12227
10067
  var liveEvents = [];
12228
10068
  if (evts && callback) {
12229
10069
  for (var i = 0, len = evts.length; i < len; i++) {
@@ -12231,7 +10071,7 @@ E.prototype = {
12231
10071
  liveEvents.push(evts[i]);
12232
10072
  }
12233
10073
  }
12234
- liveEvents.length ? e[name2] = liveEvents : delete e[name2];
10074
+ liveEvents.length ? e[name] = liveEvents : delete e[name];
12235
10075
  return this;
12236
10076
  }
12237
10077
  };
@@ -12253,42 +10093,42 @@ class ObservabilitySubscriberManager {
12253
10093
  __privateAdd(this, _SocketIOConnect, (socket) => {
12254
10094
  var _a, _b;
12255
10095
  try {
12256
- console.log(chalk$2.cyan(`SocketIOConnect(): Starting`));
12257
- console.log(chalk$2.cyan(`SocketIOConnect(): State: [${__privateGet(this, _state)}]`));
12258
- console.log(chalk$2.cyan(`SocketIOConnect(): Current Model Subscriptions: [${(_a = __privateGet(this, _observabilitySubscriptionManager)) == null ? void 0 : _a.subscriptions}]`));
10096
+ console.log(chalk$1.cyan(`SocketIOConnect(): Starting`));
10097
+ console.log(chalk$1.cyan(`SocketIOConnect(): State: [${__privateGet(this, _state)}]`));
10098
+ console.log(chalk$1.cyan(`SocketIOConnect(): Current Model Subscriptions: [${(_a = __privateGet(this, _observabilitySubscriptionManager)) == null ? void 0 : _a.subscriptions}]`));
12259
10099
  if (__privateGet(this, _observabilitySocketIOSubscriber) instanceof ObservabilitySocketIOSubscriber) {
12260
10100
  if (socket.id) {
12261
10101
  const observabilitySocketIOSubscriberSocketId = __privateGet(this, _observabilitySocketIOSubscriber).socket.id;
12262
10102
  if (observabilitySocketIOSubscriberSocketId) {
12263
10103
  if (socket.id.localeCompare(observabilitySocketIOSubscriberSocketId) === 0) {
12264
- __privateGet(this, _logger).debug(chalk$2.cyan(`AgentSocketClient:constructor:SocketIOConnectSocket(): ids are the same - ignoring`));
10104
+ __privateGet(this, _logger).debug(chalk$1.cyan(`AgentSocketClient:constructor:SocketIOConnectSocket(): ids are the same - ignoring`));
12265
10105
  }
12266
10106
  }
12267
10107
  }
12268
- __privateGet(this, _logger).debug(chalk$2.cyan(`AgentSocketClient:constructor:SocketIOConnect(): Socket ids are different - update with new socket`));
10108
+ __privateGet(this, _logger).debug(chalk$1.cyan(`AgentSocketClient:constructor:SocketIOConnect(): Socket ids are different - update with new socket`));
12269
10109
  __privateGet(this, _observabilitySocketIOSubscriber).socket = socket;
12270
10110
  (_b = __privateGet(this, _observabilitySubscriptionManager)) == null ? void 0 : _b.Stop();
12271
10111
  if (__privateGet(this, _state).localeCompare("started") === 0) {
12272
10112
  setTimeout(() => {
12273
10113
  var _a2;
12274
- __privateGet(this, _logger).debug(chalk$2.cyan(`AgentSocketClient:constructor:SocketIOConnect(): observabilitySubscriptionManager Start`));
10114
+ __privateGet(this, _logger).debug(chalk$1.cyan(`AgentSocketClient:constructor:SocketIOConnect(): observabilitySubscriptionManager Start`));
12275
10115
  (_a2 = __privateGet(this, _observabilitySubscriptionManager)) == null ? void 0 : _a2.Start();
12276
10116
  __privateGet(this, _tinyEmitter).emit("connected");
12277
10117
  }, 2500);
12278
10118
  } else {
12279
- __privateGet(this, _logger).debug(chalk$2.cyan(`AgentSocketClient:constructor:SocketIOConnect(): state not in the started state, current state: [${__privateGet(this, _state)}]`));
10119
+ __privateGet(this, _logger).debug(chalk$1.cyan(`AgentSocketClient:constructor:SocketIOConnect(): state not in the started state, current state: [${__privateGet(this, _state)}]`));
12280
10120
  __privateGet(this, _tinyEmitter).emit("connected");
12281
10121
  }
12282
10122
  } else {
12283
- __privateGet(this, _logger).debug(chalk$2.cyan(`SocketIOConnect(): this.#observabilitySocketIOSubscriber not instance of ObservabilitySocketIOSubscriber`));
12284
- __privateGet(this, _logger).debug(chalk$2.cyan(__privateGet(this, _observabilitySocketIOSubscriber)));
10123
+ __privateGet(this, _logger).debug(chalk$1.cyan(`SocketIOConnect(): this.#observabilitySocketIOSubscriber not instance of ObservabilitySocketIOSubscriber`));
10124
+ __privateGet(this, _logger).debug(chalk$1.cyan(__privateGet(this, _observabilitySocketIOSubscriber)));
12285
10125
  __privateGet(this, _tinyEmitter).emit("connected");
12286
10126
  }
12287
10127
  } catch (error) {
12288
- __privateGet(this, _logger).error(chalk$2.red(`SocketIOConnect(): Error: [${error}]`));
10128
+ __privateGet(this, _logger).error(chalk$1.red(`SocketIOConnect(): Error: [${error}]`));
12289
10129
  __privateGet(this, _tinyEmitter).emit("connected");
12290
10130
  } finally {
12291
- __privateGet(this, _logger).debug(chalk$2.cyan(`SocketIOConnect(): Ended`));
10131
+ __privateGet(this, _logger).debug(chalk$1.cyan(`SocketIOConnect(): Ended`));
12292
10132
  }
12293
10133
  });
12294
10134
  __privateAdd(this, _SetupObservabilitySubscriber, () => {
@@ -12311,7 +10151,7 @@ class ObservabilitySubscriberManager {
12311
10151
  }));
12312
10152
  break;
12313
10153
  default:
12314
- __privateGet(this, _logger).error(chalk$2.red(`ObservabilitySubscriberManager:SetupObservabilitySubscriber(): Unsupported consumeInstrumentationMode mode: [${__privateGet(this, _options2).consumeInstrumentationMode}]`));
10154
+ __privateGet(this, _logger).error(chalk$1.red(`ObservabilitySubscriberManager:SetupObservabilitySubscriber(): Unsupported consumeInstrumentationMode mode: [${__privateGet(this, _options2).consumeInstrumentationMode}]`));
12315
10155
  return;
12316
10156
  }
12317
10157
  __privateSet(this, _observabilitySubscriptionManager, new ObservabilitySubscriptionManager({
@@ -12325,7 +10165,7 @@ class ObservabilitySubscriberManager {
12325
10165
  if (__privateGet(this, _options2).consumeInstrumentationMode.localeCompare("PROXY") === 0) {
12326
10166
  const onConnected = () => {
12327
10167
  __privateGet(this, _tinyEmitter).off("connected", onConnected);
12328
- __privateGet(this, _logger).debug(chalk$2.cyan(`ObservabilitySubscriberManager:Start() connected`));
10168
+ __privateGet(this, _logger).debug(chalk$1.cyan(`ObservabilitySubscriberManager:Start() connected`));
12329
10169
  resolve(true);
12330
10170
  };
12331
10171
  __privateGet(this, _tinyEmitter).on("connected", onConnected);
@@ -12350,14 +10190,14 @@ class ObservabilitySubscriberManager {
12350
10190
  ));
12351
10191
  });
12352
10192
  __privateAdd(this, _SocketConnect, (socket) => {
12353
- defaultLogger.debug(chalk$2.magenta(`SocketIOConnect(): Socket ID: [${socket.id}]`));
10193
+ defaultLogger.debug(chalk$1.magenta(`SocketIOConnect(): Socket ID: [${socket.id}]`));
12354
10194
  if (__privateGet(this, _observabilitySubscriptionManager) === null) {
12355
10195
  __privateGet(this, _SetupObservabilitySubscriber).call(this);
12356
10196
  }
12357
10197
  __privateGet(this, _SocketIOConnect).call(this, socket);
12358
10198
  });
12359
10199
  __privateAdd(this, _ProcessSocketError, (error) => {
12360
- defaultLogger.error(chalk$2.red(`SetupClientSideSocket error callback: [${error}]`));
10200
+ defaultLogger.error(chalk$1.red(`SetupClientSideSocket error callback: [${error}]`));
12361
10201
  });
12362
10202
  __privateAdd(this, _ProcessSocketEvents, (socket) => {
12363
10203
  });
@@ -12376,7 +10216,7 @@ class ObservabilitySubscriberManager {
12376
10216
  }
12377
10217
  UpdateModelCursor(subscriptions) {
12378
10218
  var _a;
12379
- __privateGet(this, _logger).debug(chalk$2.yellow(`UpdateModelCursor`));
10219
+ __privateGet(this, _logger).debug(chalk$1.yellow(`UpdateModelCursor`));
12380
10220
  (_a = __privateGet(this, _observabilitySubscriptionManager)) == null ? void 0 : _a.Stop();
12381
10221
  __privateSet(this, _state, "stopped");
12382
10222
  setTimeout(() => {
@@ -12384,7 +10224,7 @@ class ObservabilitySubscriberManager {
12384
10224
  __privateGet(this, _observabilitySubscriptionManager).subscriptions = subscriptions;
12385
10225
  __privateGet(this, _observabilitySubscriptionManager).Start();
12386
10226
  } else {
12387
- __privateGet(this, _logger).debug(chalk$2.yellow(`UpdateModelCursor(): Could not update subscriptions, this.#observabilitySubscriptionManager not set`));
10227
+ __privateGet(this, _logger).debug(chalk$1.yellow(`UpdateModelCursor(): Could not update subscriptions, this.#observabilitySubscriptionManager not set`));
12388
10228
  }
12389
10229
  __privateSet(this, _state, "started");
12390
10230
  }, 0);
@@ -12422,13 +10262,13 @@ class ObservabilitySubscriberManager {
12422
10262
  }
12423
10263
  Unsubscribe() {
12424
10264
  var _a;
12425
- __privateGet(this, _logger).debug(chalk$2.cyan(`ObservabilitySubscriberManager:Unsubscribe()`));
10265
+ __privateGet(this, _logger).debug(chalk$1.cyan(`ObservabilitySubscriberManager:Unsubscribe()`));
12426
10266
  __privateSet(this, _state, "stopped");
12427
10267
  (_a = __privateGet(this, _observabilitySubscriptionManager)) == null ? void 0 : _a.Stop();
12428
10268
  if (__privateGet(this, _options2).consumeInstrumentationMode.localeCompare("PROXY") === 0) {
12429
10269
  setTimeout(() => {
12430
10270
  var _a2;
12431
- __privateGet(this, _logger).debug(chalk$2.cyan(`ObservabilitySubscriberManager:Unsubscribe() socket.disconnect`));
10271
+ __privateGet(this, _logger).debug(chalk$1.cyan(`ObservabilitySubscriberManager:Unsubscribe() socket.disconnect`));
12432
10272
  (_a2 = __privateGet(this, _socket)) == null ? void 0 : _a2.disconnect();
12433
10273
  __privateSet(this, _socket, null);
12434
10274
  }, 1e3);
@@ -12458,7 +10298,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
12458
10298
  modelId: {}
12459
10299
  },
12460
10300
  setup(__props, { expose: __expose }) {
12461
- chalk$2.level = 3;
10301
+ chalk$1.level = 3;
12462
10302
  const props = __props;
12463
10303
  const store = ModelStore();
12464
10304
  let observabilitySubscriberManager = null;
@@ -12740,7 +10580,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
12740
10580
  },
12741
10581
  setup(__props, { expose: __expose }) {
12742
10582
  onMounted(() => {
12743
- console.log(chalk$2.green("onMounted"));
10583
+ console.log(chalk$1.green("onMounted"));
12744
10584
  });
12745
10585
  const formData = ref([
12746
10586
  {