@nsshunt/stsinstrumentmanagerclient 1.0.18 → 1.0.19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","names":["#tinyEmitter","#RequestCompleted","#options","#label","#data","#timerInterval","#valStackMaxLength","#copy","#autoComputeVelocity","#maxAverageValStack","#maxAverageIterations","#velocityTimeDiff","#vaTimeDiff","#autoComputeVelocityTimeout","#maxTimeDiff","#minTimeForReporting","#GetVal","#SetVal","#GetMaxVelocity","#GetDelta","#GetVelocity","#GetVelocityStackAverage","#GetTimeStamp","#GetCountDiff","#GetTimeDiff","#GetDeltaCountDiff","#GetDeltaTimeDif","#GetAverageVelocity","#valStack","#interval","#ComputeVelocity","#velocity","#averageValStack","#averageVelocity","isNode","#timeStamp","#velocityVal","#valStackAverage","#ComputeVelocityByTimeDiff","#delta","#countDiff","#timeDiff","#deltaCountDiff","#deltaTimeDif","#lastVelocity","#maxVelocity","#timeoutComputeVelocity","#SetupAutoComputeVelocity","#histogramData","#GetHistogramData","#SetHistogramData","#val","#maxSize","#useLatestMessages","#consoleLogging","#instrumentLogging","#winstonLogging","#DumpToConsole","#stsLogger","#messages","#readPos","#pauseVal","#start","#maxSampleSize","#GetPercentileData","#GetMin","#GetMax","#GetAverage","#timeSeriesList","#observer","#GetAndResetMaxVal","#maxval","#lastObservedValue","#observations","#total","#max","#min","#NumberCompare","#publisherTransport","#UpdateState","#inPublish","#observer","#publishState","#PublishTimeoutLoop","#publisher","#instruments","#GetInstrument","#CreateInstrument","#CreateInstruments","#ProcessTelemetryCommand","#options","#serviceModel","#agentModel","#lambdaModel","#LogDebugMessage","#LogErrorMessage","#options","#RemoveKeepAlive","#LogDebugMessage","#AddKeepAlive","#LogErrorMessage","#currentSubscriptions","#InvokeRESTAPI","#GetData","#SetupTimeout","#socketSubscribeKeepAlive","#id","#options","#currentSubscriptions","#options","#id","#options","#socketIoClient","#log"],"sources":["../src/commonTypes.ts","../src/publish/middleware/requestLoggerMiddleware.ts","../node_modules/color-name/index.js","../node_modules/color-convert/conversions.js","../node_modules/color-convert/route.js","../node_modules/color-convert/index.js","../node_modules/ansi-styles/index.js","../node_modules/supports-color/browser.js","../node_modules/chalk/source/util.js","../node_modules/chalk/source/templates.js","../node_modules/chalk/source/index.js","../node_modules/@nsshunt/stsobservability/dist/index.mjs","../node_modules/@msgpack/msgpack/dist.esm/utils/utf8.mjs","../node_modules/@msgpack/msgpack/dist.esm/ExtData.mjs","../node_modules/@msgpack/msgpack/dist.esm/DecodeError.mjs","../node_modules/@msgpack/msgpack/dist.esm/utils/int.mjs","../node_modules/@msgpack/msgpack/dist.esm/timestamp.mjs","../node_modules/@msgpack/msgpack/dist.esm/ExtensionCodec.mjs","../node_modules/@msgpack/msgpack/dist.esm/utils/typedArrays.mjs","../node_modules/@msgpack/msgpack/dist.esm/Encoder.mjs","../node_modules/@msgpack/msgpack/dist.esm/encode.mjs","../src/publish/publishers/publishTransportRESTServer.ts","../src/publish/publishInstruments.ts","../src/publish/publishInstrumentController.ts","../src/publish/stsPluginKeys.ts","../src/publish/agentinstrumentcontroller.ts","../src/globalServiceDefinitions.ts","../src/subscribe/observabilitymodelutils.ts","../src/subscribe/observabilityPayloadTransformer.ts","../src/subscribe/restClientSubscriber.ts","../src/subscribe/socketClientSubscriber.ts","../src/socketBrowserClientLogPublisher.ts","../src/stsLoggerSocket.ts"],"sourcesContent":["/* eslint @typescript-eslint/no-unused-vars: 0 */ // --> OFF\n/* eslint @typescript-eslint/no-explicit-any: 0 */ // --> OFF\nimport { IAgentManager, ISTSLogger, JSONObject } from '@nsshunt/stsutils';\nimport { type STSDefaultServerToClientEvents, type STSDefaultClientToServerEvents } from '@nsshunt/stssocketioutils'\nimport { InstrumentBase, Gauge, GaugeTypes, InstrumentBaseOptions } from '@nsshunt/stsobservability'\n\nexport interface IServiceSideSocketRecord {\n start: number\n globalSockets: any\n namespaceSockets: any\n namespaceRoomSockets: any\n end: number\n duration: number\n message: string\n}\n\nexport interface ClientToServerEvents extends STSDefaultClientToServerEvents {\n subscribe: (data: any, callback: (data: any) => void) => void;\n unsubscribe: (data: any, callback: (data: any) => void) => void;\n getCurrentSubscriptions: (namespace: string, rooms: string[], callback: (data: IServiceSideSocketRecord) => void) => void;\n}\n\nexport interface ServerToClientEvents extends STSDefaultServerToClientEvents {\n subscriptionData: (data: ISubscriptionPayload, callback: (data: any) => void) => void;\n}\n\nexport enum SubscriptionTopic {\n // Services topics\n AllServicesCombined = 'AllServicesCombined',\n Services = 'Services',\n ServiceInstances = 'ServiceInstances',\n ServiceInstance = 'ServiceInstance',\n\n // User Agents topics\n AllAgentsCombined = 'AllAgentsCombined',\n Agents = 'Agents',\n AgentWorkers = 'AgentWorkers',\n AgentWorker = 'AgentWorker',\n\n // Lambda topics\n AllLambdasCombined = \"AllLambdasCombined\",\n LambdaTechnologies = \"LambdaTechnologies\", // e.g. aws was lambdas\n LambdaSubTechnologies = \"LambdaSubTechnologies\", // e.g. aws_s3, aws_sqs, aws_sns was LambdaInstances\n LambdaSubTechnologiesInstance = \"LambdaSubTechnologiesInstance\", // (uuidv4()) was ServiceInstance\n\n // Logging (both service and agent)\n LogProcessing = 'LogProcessing'\n}\n\nexport interface ISubscriptionKey {\n id: string // uuid - unique ID for this subscription\n topic: SubscriptionTopic\n key?: string\n subkey?: string\n}\n\nexport interface IKafkaData {\n kafkaTopic: string\n kafkaGroupId: string\n partition: number,\n topic: string\n key: string\n value: string\n}\n\nexport interface ISubscription {\n subscriptionKey: ISubscriptionKey\n cb: (payload: ISubscriptionPayload) => void\n}\n\nexport type ISubscriptions = ISubscription[]\n\nexport type quantile = Record<string, number>;\nexport type histo = Record<string, number>;\n\nexport interface ICommonInstanceTelemetry {\n activeRequestCount: number\n authenticationCount: number\n coreCount: number\n duration: number\n errorCount: number\n latency: number\n requestCount: number\n retryCount: number\n timer: number\n velocity: number\n duration_quantile: quantile\n duration_histo: histo\n latency_quantile: quantile\n latency_histo: histo\n}\n\nexport interface IServiceInstanceTelemetry extends ICommonInstanceTelemetry {\n connectionCount: number\n connectionIdleCount: number\n connectionPoolCount: number\n connectionWaitingCount: number\n cpu: number\n cpu_quantile: quantile\n systemcpu: number\n systemcpu_quantile: quantile\n memory: string\n rx: number\n tx: number\n}\n\nexport interface ILambdaInstanceTelemetry extends ICommonInstanceTelemetry {\n connectionCount: number\n connectionIdleCount: number\n connectionPoolCount: number\n connectionWaitingCount: number\n cpu: number\n cpu_quantile: quantile\n systemcpu: number\n systemcpu_quantile: quantile\n memory: string\n rx: number\n tx: number\n}\n\nexport interface IAgentInstanceTelemetry extends ICommonInstanceTelemetry {\n childCount: number\n}\n\nexport interface ISubscriptionPayload {\n subscriptionKey: ISubscriptionKey\n data: IKafkaData \n // Agent processing\n | IAgentInstanceTelemetry | IAgents | IAgentWorkers | IAgentWorkerRunners\n // Service processing\n | IServiceInstanceTelemetry | IServices | IServiceInstances | IServiceInstancesThreads \n // Lambda processing\n | IServiceInstanceTelemetry | ILambdaTechnologies | ILambdaSubTechnologies | ILambdaSubTechnologiesInstance\n | null\n}\n\n// /serviceId\nexport interface IServices {\n [serviceId: string]: IServiceInstanceTelemetry\n}\n\n// /serviceId/serviceInstanceId\nexport interface IServiceInstances {\n [serviceId: string]: {\n [serviceInstanceId: string]: IServiceInstanceTelemetry\n }\n}\n\n// /serviceId/serviceInstanceId/threadId\nexport interface IServiceInstancesThreads {\n [serviceId: string]: {\n [serviceInstanceId: string]: {\n [threadId: string]: IServiceInstanceTelemetry\n }\n }\n}\n\n// /lambdaTechnoplogyId\nexport interface ILambdaTechnologies {\n [lambdaTechnoplogyId: string]: ILambdaInstanceTelemetry\n}\n\n// /lambdaTechnoplogyId/lambdaSubTechnoplogyId\nexport interface ILambdaSubTechnologies {\n [lambdaTechnoplogyId: string]: {\n [lambdaSubTechnoplogyId: string]: IServiceInstanceTelemetry\n }\n}\n\n// /lambdaTechnoplogyId/lambdaSubTechnoplogyId/lambdaSubTechnoplogyInstanceId\nexport interface ILambdaSubTechnologiesInstance {\n [lambdaTechnoplogyId: string]: {\n [lambdaSubTechnoplogyId: string]: {\n [lambdaSubTechnoplogyInstanceId: string]: IServiceInstanceTelemetry\n }\n }\n}\n\n// /agentId\nexport interface IAgents {\n [agentId: string]: IAgentInstanceTelemetry\n}\n\n// /agentId/agentWorkerId\nexport interface IAgentWorkers {\n [agentId: string]: {\n [agentWorkerId: string]: IAgentInstanceTelemetry\n }\n}\n\n// /agentId/agentWorkerId/asyncRunnerId\nexport interface IAgentWorkerRunners {\n [agentId: string]: {\n [agentWorkerId: string]: {\n [asyncRunnerId: string]: IAgentInstanceTelemetry\n }\n }\n}\n\n// Event key passed back from socket.io - stsinstrumentmanager\nexport const GetSocketIOSubscriptionKey = (subscriptionKey: ISubscriptionKey): string => {\n return `SubscriptionData_${subscriptionKey.id}`;\n}\n\nexport interface IObservabilitySocketIOSubscriberOptions {\n socket?: any\n keepAlive?: number // keep alive ping interval (ms) (REST only)\n urlBase?: string\n agentManager?: IAgentManager\n logger: ISTSLogger\n}\n\nexport interface IObservabilitySocketIOSubscriber {\n Subscribe(subscriptions: ISubscriptions): void\n UnSubscribe(subscriptions: ISubscriptions): void\n}\n\nexport const KAFKA_PREFIX: string = '__STS__'; //@@ move to sock.io\n\nexport interface IObservabilitySubscriberManagerOptions {\n modelId: string\n consumeInstrumentationMode: string\n instrumentManagerEndpoint: string\n instrumentManagerPort: string\n instrumentManagerAPIRoot: string\n logger?: ISTSLogger\n}\n\n// Publisher common types\n// ------------------------------------------------------------------------------------------------------------------------\n\nexport enum TransportType {\n none = 0,\n IPC = 1, // Inter-process communication (local)\n websocket = 2, // node ws\n RESTAPI = 4, // RESTful API\n redis = 8,\n kafka = 16, // https://www.npmjs.com/package/kafkajs\n influxdb = 32, // https://github.com/influxdata/influxdb-client-js/ https://www.npmjs.com/package/@influxdata/influxdb-client\n prometheus = 64,\n gRPC = 128, // https://www.npmjs.com/package/@grpc/grpc-js\n unixsocket = 256, // Uses https://www.npmjs.com/package/json-socket\n socketio = 512, // https://socket.io\n otelcollector = 1024, \n messageport = 2048,\n jsonrpc = 4096, // https://www.npmjs.com/package/jayson\n postgresql =8192,\n grafanaloki = 16384,\n logstash = 32768,\n fluentbit = 65536,\n fluentd = 131072,\n inmemory = 262144\n}\n\nexport function GetTransportMode(transport: string): TransportType {\n let trans: TransportType = 0 as TransportType;\n try {\n transport.split('|').forEach(item => {\n switch (item) {\n case 'IPC' :\n trans |= TransportType.IPC;\n break;\n case 'websocket' :\n trans |= TransportType.websocket;\n break;\n case 'RESTAPI' :\n trans |= TransportType.RESTAPI;\n break;\n case 'redis' :\n trans |= TransportType.redis;\n break;\n case 'kafka' :\n trans |= TransportType.kafka;\n break;\n case 'influxdb' :\n trans |= TransportType.influxdb;\n break;\n case 'prometheus' :\n trans |= TransportType.prometheus;\n break;\n case 'gRPC' :\n trans |= TransportType.gRPC;\n break;\n case 'unixsocket' :\n trans |= TransportType.unixsocket;\n break;\n case 'socketio' :\n trans |= TransportType.socketio;\n break;\n case 'otelcollector' :\n trans |= TransportType.otelcollector;\n break;\n case 'messageport' :\n trans |= TransportType.messageport\n break;\n case 'jsonrpc' :\n trans |= TransportType.jsonrpc\n break;\n case 'postgresql' :\n trans |= TransportType.postgresql\n break;\n case 'grafanaloki' :\n trans |= TransportType.grafanaloki\n break;\n case 'logstash' :\n trans |= TransportType.logstash\n break;\n case 'fluentbit' :\n trans |= TransportType.fluentbit\n break;\n case 'fluentd' :\n trans |= TransportType.fluentd\n break;\n case 'inmemory' :\n trans |= TransportType.inmemory\n break;\n }\n });\n } catch (error) {\n throw new Error(`GetTransportMode(): Error: [${error}]`);\n }\n return trans;\n}\n\nexport type Nid = string;\n\nexport interface IContextBase extends JSONObject {\n serviceType?: string\n nid?: Nid\n}\n\nexport enum InstrumentPayloadType {\n agent = 'agent',\n service = 'service'\n}\n\nexport interface IInstrumentPayload {\n //context: IServiceProcessContext | IAsyncRunnerContext | ILambdaProcessContext\n context: IContextBase\n instruments: Record<string, InstrumentBase>\n}\n\nexport type InstrumentDefinition = [ Gauge, GaugeTypes, InstrumentBaseOptions? ]\n\nexport type InstrumentDefinitions = InstrumentDefinition[];\n\nexport interface IPublisherTransport {\n Publish(payload: IInstrumentPayload): Promise<boolean>\n Close(): Promise<boolean>\n}\n\nexport interface IPublishInstrumentController {\n GetPayloadData(): IInstrumentPayload\n}\n\nexport interface IPublishInstrumentControllerOptions {\n processContext: IContextBase\n consoleLogging?: boolean\n instrumentLogging?: boolean\n httpServer?: boolean // Is this service running an http server (express via STSFramework)\n instrumentationObservationInterval?: number\n instrumentationTimeWindow?: number\n instrumentDefinitions?: InstrumentDefinitions\n publishInterval: number\n publishPostFailInterval: number\n logger: ISTSLogger\n publishTransportBaseOptions: IPublishTransportBaseOptions\n autoStart: boolean\n}\n\nexport interface IPublishInstrumentsOptions {\n processContext: IContextBase\n publishInterval: number\n publishPostFailInterval: number\n logger: ISTSLogger\n publishInstrumentController?: IPublishInstrumentController\n publishTransportBaseOptions: IPublishTransportBaseOptions\n}\n\nexport interface IPublishTransportBaseOptions {\n id?: string\n transportType: TransportType\n logger: ISTSLogger\n}\n\nexport interface IPublishTransportRESTServerOptions extends IPublishTransportBaseOptions {\n url?: string\n socketPath?: string\n agentManager?: IAgentManager\n showPublishPayload?: boolean\n}\n","/* eslint @typescript-eslint/no-explicit-any: 0 */ // --> OFF\nimport { JSONObject, STSOptionsBase } from '@nsshunt/stsutils'\nimport { TinyEmitter } from 'tiny-emitter';\n//import { Express, Request, Response, NextFunction } from 'express';\n//import { v4 as uuidv4 } from 'uuid';\n\nexport interface RequestLoggerMiddlewareOptions {\n\tignoresocketio: boolean\n}\n\nexport enum RequestLoggerMiddlewareEventName {\n UpdateInstrument_AR_DEC = 'UpdateInstrument_AR_DEC', // active request gauge - decrement\n UpdateInstrument_AR_INC = 'UpdateInstrument_AR_INC', // active request gauge - increment\n UpdateInstrument_RC_INC = 'UpdateInstrument_RC_INC', // request count gauge - increment\n UpdateInstrument_V_INC = 'UpdateInstrument_V_INC', // velocity gauge - increment\n UpdateInstrument_DH_VAL = 'UpdateInstrument_DH_VAL', // duration histo - value\n UpdateInstrument_D_VAL = 'UpdateInstrument_D_VAL' // duration - value\n}\n\nexport type RequestLoggerMiddlewareEventFunc = (data?: string | number | JSONObject) => void;\n\n//@@ use TinyEmitter to emit logger events\nexport class RequestLoggerMiddleware extends STSOptionsBase\n{\n #tinyEmitter: TinyEmitter = new TinyEmitter();\n\n constructor(options: RequestLoggerMiddlewareOptions) {\n super(options);\n }\n\n override get options(): RequestLoggerMiddlewareOptions {\n return super.options as RequestLoggerMiddlewareOptions;\n }\n\n on(eventName: string, callBackFn: RequestLoggerMiddlewareEventFunc) {\n this.#tinyEmitter.on(eventName, callBackFn);\n }\n\n #RequestCompleted = (start: number) => {\n // Decrease the number of active requests\n this.#tinyEmitter.emit(RequestLoggerMiddlewareEventName.UpdateInstrument_AR_DEC);\n\n // Update request duration histo data\n const end = performance.now() - start;\n const timeInMs = parseFloat(end.toFixed(4));\n\t\t\n this.#tinyEmitter.emit(RequestLoggerMiddlewareEventName.UpdateInstrument_DH_VAL, timeInMs);\n\n this.#tinyEmitter.emit(RequestLoggerMiddlewareEventName.UpdateInstrument_D_VAL, timeInMs);\n\n //console.log(`-->>ZZZ: ${timeInMs}`);\n };\n\n // https://stackoverflow.com/questions/18031839/how-to-use-process-hrtime-to-get-execution-time-of-async-function/18031945\n\n /**\n\t * Use with .bind(class instance).\n\t * Example;\n\t * ---\n\t * `let requestLoggerMiddleware = new RequestLoggerMiddleware();\n\t * app.use(requestLoggerMiddleware.Middleware.bind(requestLoggerMiddleware));`\n\t * @param {*} req \n\t * @param {*} res \n\t * @param {*} next \n\t * @returns \n\t */\n \n Middleware = async (req: any, res: any, next: any) => { \n if (this.options.ignoresocketio && req.originalUrl.includes('socket.io')) {\n return next();\n }\n\n //const start = process.hrtime();\n const start = performance.now();\n let completed = false;\n\n const completeOnce = () => {\n if (completed) return;\n completed = true;\n this.#RequestCompleted(start);\n };\n\n // Increase the number of active requests\n this.#tinyEmitter.emit(RequestLoggerMiddlewareEventName.UpdateInstrument_AR_INC);\n\n // Increase the total number of requests\n this.#tinyEmitter.emit(RequestLoggerMiddlewareEventName.UpdateInstrument_RC_INC);\n\n // Increase the total number of requests to determine velocity (requests per second)\n this.#tinyEmitter.emit(RequestLoggerMiddlewareEventName.UpdateInstrument_V_INC);\n\n // -- request -----------------------------------------------------------------------------\n\n req.on(\"aborted\", () => {\n // request closed unexpectedly\n //@@RequestCompleted(start);\n });\n\n req.on(\"end\", () => {\n \n });\n\n // -- response -----------------------------------------------------------------------------\n res.on(\"close\", () => {\n // request closed unexpectedly or normally\n // connection closed before/while response completed\n completeOnce();\n });\n\n\n res.on('finish', () => {\n // response successfully sent\n completeOnce();\n });\n\t\n next();\n }\n}\n","'use strict'\r\n\r\nmodule.exports = {\r\n\t\"aliceblue\": [240, 248, 255],\r\n\t\"antiquewhite\": [250, 235, 215],\r\n\t\"aqua\": [0, 255, 255],\r\n\t\"aquamarine\": [127, 255, 212],\r\n\t\"azure\": [240, 255, 255],\r\n\t\"beige\": [245, 245, 220],\r\n\t\"bisque\": [255, 228, 196],\r\n\t\"black\": [0, 0, 0],\r\n\t\"blanchedalmond\": [255, 235, 205],\r\n\t\"blue\": [0, 0, 255],\r\n\t\"blueviolet\": [138, 43, 226],\r\n\t\"brown\": [165, 42, 42],\r\n\t\"burlywood\": [222, 184, 135],\r\n\t\"cadetblue\": [95, 158, 160],\r\n\t\"chartreuse\": [127, 255, 0],\r\n\t\"chocolate\": [210, 105, 30],\r\n\t\"coral\": [255, 127, 80],\r\n\t\"cornflowerblue\": [100, 149, 237],\r\n\t\"cornsilk\": [255, 248, 220],\r\n\t\"crimson\": [220, 20, 60],\r\n\t\"cyan\": [0, 255, 255],\r\n\t\"darkblue\": [0, 0, 139],\r\n\t\"darkcyan\": [0, 139, 139],\r\n\t\"darkgoldenrod\": [184, 134, 11],\r\n\t\"darkgray\": [169, 169, 169],\r\n\t\"darkgreen\": [0, 100, 0],\r\n\t\"darkgrey\": [169, 169, 169],\r\n\t\"darkkhaki\": [189, 183, 107],\r\n\t\"darkmagenta\": [139, 0, 139],\r\n\t\"darkolivegreen\": [85, 107, 47],\r\n\t\"darkorange\": [255, 140, 0],\r\n\t\"darkorchid\": [153, 50, 204],\r\n\t\"darkred\": [139, 0, 0],\r\n\t\"darksalmon\": [233, 150, 122],\r\n\t\"darkseagreen\": [143, 188, 143],\r\n\t\"darkslateblue\": [72, 61, 139],\r\n\t\"darkslategray\": [47, 79, 79],\r\n\t\"darkslategrey\": [47, 79, 79],\r\n\t\"darkturquoise\": [0, 206, 209],\r\n\t\"darkviolet\": [148, 0, 211],\r\n\t\"deeppink\": [255, 20, 147],\r\n\t\"deepskyblue\": [0, 191, 255],\r\n\t\"dimgray\": [105, 105, 105],\r\n\t\"dimgrey\": [105, 105, 105],\r\n\t\"dodgerblue\": [30, 144, 255],\r\n\t\"firebrick\": [178, 34, 34],\r\n\t\"floralwhite\": [255, 250, 240],\r\n\t\"forestgreen\": [34, 139, 34],\r\n\t\"fuchsia\": [255, 0, 255],\r\n\t\"gainsboro\": [220, 220, 220],\r\n\t\"ghostwhite\": [248, 248, 255],\r\n\t\"gold\": [255, 215, 0],\r\n\t\"goldenrod\": [218, 165, 32],\r\n\t\"gray\": [128, 128, 128],\r\n\t\"green\": [0, 128, 0],\r\n\t\"greenyellow\": [173, 255, 47],\r\n\t\"grey\": [128, 128, 128],\r\n\t\"honeydew\": [240, 255, 240],\r\n\t\"hotpink\": [255, 105, 180],\r\n\t\"indianred\": [205, 92, 92],\r\n\t\"indigo\": [75, 0, 130],\r\n\t\"ivory\": [255, 255, 240],\r\n\t\"khaki\": [240, 230, 140],\r\n\t\"lavender\": [230, 230, 250],\r\n\t\"lavenderblush\": [255, 240, 245],\r\n\t\"lawngreen\": [124, 252, 0],\r\n\t\"lemonchiffon\": [255, 250, 205],\r\n\t\"lightblue\": [173, 216, 230],\r\n\t\"lightcoral\": [240, 128, 128],\r\n\t\"lightcyan\": [224, 255, 255],\r\n\t\"lightgoldenrodyellow\": [250, 250, 210],\r\n\t\"lightgray\": [211, 211, 211],\r\n\t\"lightgreen\": [144, 238, 144],\r\n\t\"lightgrey\": [211, 211, 211],\r\n\t\"lightpink\": [255, 182, 193],\r\n\t\"lightsalmon\": [255, 160, 122],\r\n\t\"lightseagreen\": [32, 178, 170],\r\n\t\"lightskyblue\": [135, 206, 250],\r\n\t\"lightslategray\": [119, 136, 153],\r\n\t\"lightslategrey\": [119, 136, 153],\r\n\t\"lightsteelblue\": [176, 196, 222],\r\n\t\"lightyellow\": [255, 255, 224],\r\n\t\"lime\": [0, 255, 0],\r\n\t\"limegreen\": [50, 205, 50],\r\n\t\"linen\": [250, 240, 230],\r\n\t\"magenta\": [255, 0, 255],\r\n\t\"maroon\": [128, 0, 0],\r\n\t\"mediumaquamarine\": [102, 205, 170],\r\n\t\"mediumblue\": [0, 0, 205],\r\n\t\"mediumorchid\": [186, 85, 211],\r\n\t\"mediumpurple\": [147, 112, 219],\r\n\t\"mediumseagreen\": [60, 179, 113],\r\n\t\"mediumslateblue\": [123, 104, 238],\r\n\t\"mediumspringgreen\": [0, 250, 154],\r\n\t\"mediumturquoise\": [72, 209, 204],\r\n\t\"mediumvioletred\": [199, 21, 133],\r\n\t\"midnightblue\": [25, 25, 112],\r\n\t\"mintcream\": [245, 255, 250],\r\n\t\"mistyrose\": [255, 228, 225],\r\n\t\"moccasin\": [255, 228, 181],\r\n\t\"navajowhite\": [255, 222, 173],\r\n\t\"navy\": [0, 0, 128],\r\n\t\"oldlace\": [253, 245, 230],\r\n\t\"olive\": [128, 128, 0],\r\n\t\"olivedrab\": [107, 142, 35],\r\n\t\"orange\": [255, 165, 0],\r\n\t\"orangered\": [255, 69, 0],\r\n\t\"orchid\": [218, 112, 214],\r\n\t\"palegoldenrod\": [238, 232, 170],\r\n\t\"palegreen\": [152, 251, 152],\r\n\t\"paleturquoise\": [175, 238, 238],\r\n\t\"palevioletred\": [219, 112, 147],\r\n\t\"papayawhip\": [255, 239, 213],\r\n\t\"peachpuff\": [255, 218, 185],\r\n\t\"peru\": [205, 133, 63],\r\n\t\"pink\": [255, 192, 203],\r\n\t\"plum\": [221, 160, 221],\r\n\t\"powderblue\": [176, 224, 230],\r\n\t\"purple\": [128, 0, 128],\r\n\t\"rebeccapurple\": [102, 51, 153],\r\n\t\"red\": [255, 0, 0],\r\n\t\"rosybrown\": [188, 143, 143],\r\n\t\"royalblue\": [65, 105, 225],\r\n\t\"saddlebrown\": [139, 69, 19],\r\n\t\"salmon\": [250, 128, 114],\r\n\t\"sandybrown\": [244, 164, 96],\r\n\t\"seagreen\": [46, 139, 87],\r\n\t\"seashell\": [255, 245, 238],\r\n\t\"sienna\": [160, 82, 45],\r\n\t\"silver\": [192, 192, 192],\r\n\t\"skyblue\": [135, 206, 235],\r\n\t\"slateblue\": [106, 90, 205],\r\n\t\"slategray\": [112, 128, 144],\r\n\t\"slategrey\": [112, 128, 144],\r\n\t\"snow\": [255, 250, 250],\r\n\t\"springgreen\": [0, 255, 127],\r\n\t\"steelblue\": [70, 130, 180],\r\n\t\"tan\": [210, 180, 140],\r\n\t\"teal\": [0, 128, 128],\r\n\t\"thistle\": [216, 191, 216],\r\n\t\"tomato\": [255, 99, 71],\r\n\t\"turquoise\": [64, 224, 208],\r\n\t\"violet\": [238, 130, 238],\r\n\t\"wheat\": [245, 222, 179],\r\n\t\"white\": [255, 255, 255],\r\n\t\"whitesmoke\": [245, 245, 245],\r\n\t\"yellow\": [255, 255, 0],\r\n\t\"yellowgreen\": [154, 205, 50]\r\n};\r\n","/* MIT license */\n/* eslint-disable no-mixed-operators */\nconst cssKeywords = require('color-name');\n\n// NOTE: conversions should only return primitive values (i.e. arrays, or\n// values that give correct `typeof` results).\n// do not use box values types (i.e. Number(), String(), etc.)\n\nconst reverseKeywords = {};\nfor (const key of Object.keys(cssKeywords)) {\n\treverseKeywords[cssKeywords[key]] = key;\n}\n\nconst convert = {\n\trgb: {channels: 3, labels: 'rgb'},\n\thsl: {channels: 3, labels: 'hsl'},\n\thsv: {channels: 3, labels: 'hsv'},\n\thwb: {channels: 3, labels: 'hwb'},\n\tcmyk: {channels: 4, labels: 'cmyk'},\n\txyz: {channels: 3, labels: 'xyz'},\n\tlab: {channels: 3, labels: 'lab'},\n\tlch: {channels: 3, labels: 'lch'},\n\thex: {channels: 1, labels: ['hex']},\n\tkeyword: {channels: 1, labels: ['keyword']},\n\tansi16: {channels: 1, labels: ['ansi16']},\n\tansi256: {channels: 1, labels: ['ansi256']},\n\thcg: {channels: 3, labels: ['h', 'c', 'g']},\n\tapple: {channels: 3, labels: ['r16', 'g16', 'b16']},\n\tgray: {channels: 1, labels: ['gray']}\n};\n\nmodule.exports = convert;\n\n// Hide .channels and .labels properties\nfor (const model of Object.keys(convert)) {\n\tif (!('channels' in convert[model])) {\n\t\tthrow new Error('missing channels property: ' + model);\n\t}\n\n\tif (!('labels' in convert[model])) {\n\t\tthrow new Error('missing channel labels property: ' + model);\n\t}\n\n\tif (convert[model].labels.length !== convert[model].channels) {\n\t\tthrow new Error('channel and label counts mismatch: ' + model);\n\t}\n\n\tconst {channels, labels} = convert[model];\n\tdelete convert[model].channels;\n\tdelete convert[model].labels;\n\tObject.defineProperty(convert[model], 'channels', {value: channels});\n\tObject.defineProperty(convert[model], 'labels', {value: labels});\n}\n\nconvert.rgb.hsl = function (rgb) {\n\tconst r = rgb[0] / 255;\n\tconst g = rgb[1] / 255;\n\tconst b = rgb[2] / 255;\n\tconst min = Math.min(r, g, b);\n\tconst max = Math.max(r, g, b);\n\tconst delta = max - min;\n\tlet h;\n\tlet s;\n\n\tif (max === min) {\n\t\th = 0;\n\t} else if (r === max) {\n\t\th = (g - b) / delta;\n\t} else if (g === max) {\n\t\th = 2 + (b - r) / delta;\n\t} else if (b === max) {\n\t\th = 4 + (r - g) / delta;\n\t}\n\n\th = Math.min(h * 60, 360);\n\n\tif (h < 0) {\n\t\th += 360;\n\t}\n\n\tconst l = (min + max) / 2;\n\n\tif (max === min) {\n\t\ts = 0;\n\t} else if (l <= 0.5) {\n\t\ts = delta / (max + min);\n\t} else {\n\t\ts = delta / (2 - max - min);\n\t}\n\n\treturn [h, s * 100, l * 100];\n};\n\nconvert.rgb.hsv = function (rgb) {\n\tlet rdif;\n\tlet gdif;\n\tlet bdif;\n\tlet h;\n\tlet s;\n\n\tconst r = rgb[0] / 255;\n\tconst g = rgb[1] / 255;\n\tconst b = rgb[2] / 255;\n\tconst v = Math.max(r, g, b);\n\tconst diff = v - Math.min(r, g, b);\n\tconst diffc = function (c) {\n\t\treturn (v - c) / 6 / diff + 1 / 2;\n\t};\n\n\tif (diff === 0) {\n\t\th = 0;\n\t\ts = 0;\n\t} else {\n\t\ts = diff / v;\n\t\trdif = diffc(r);\n\t\tgdif = diffc(g);\n\t\tbdif = diffc(b);\n\n\t\tif (r === v) {\n\t\t\th = bdif - gdif;\n\t\t} else if (g === v) {\n\t\t\th = (1 / 3) + rdif - bdif;\n\t\t} else if (b === v) {\n\t\t\th = (2 / 3) + gdif - rdif;\n\t\t}\n\n\t\tif (h < 0) {\n\t\t\th += 1;\n\t\t} else if (h > 1) {\n\t\t\th -= 1;\n\t\t}\n\t}\n\n\treturn [\n\t\th * 360,\n\t\ts * 100,\n\t\tv * 100\n\t];\n};\n\nconvert.rgb.hwb = function (rgb) {\n\tconst r = rgb[0];\n\tconst g = rgb[1];\n\tlet b = rgb[2];\n\tconst h = convert.rgb.hsl(rgb)[0];\n\tconst w = 1 / 255 * Math.min(r, Math.min(g, b));\n\n\tb = 1 - 1 / 255 * Math.max(r, Math.max(g, b));\n\n\treturn [h, w * 100, b * 100];\n};\n\nconvert.rgb.cmyk = function (rgb) {\n\tconst r = rgb[0] / 255;\n\tconst g = rgb[1] / 255;\n\tconst b = rgb[2] / 255;\n\n\tconst k = Math.min(1 - r, 1 - g, 1 - b);\n\tconst c = (1 - r - k) / (1 - k) || 0;\n\tconst m = (1 - g - k) / (1 - k) || 0;\n\tconst y = (1 - b - k) / (1 - k) || 0;\n\n\treturn [c * 100, m * 100, y * 100, k * 100];\n};\n\nfunction comparativeDistance(x, y) {\n\t/*\n\t\tSee https://en.m.wikipedia.org/wiki/Euclidean_distance#Squared_Euclidean_distance\n\t*/\n\treturn (\n\t\t((x[0] - y[0]) ** 2) +\n\t\t((x[1] - y[1]) ** 2) +\n\t\t((x[2] - y[2]) ** 2)\n\t);\n}\n\nconvert.rgb.keyword = function (rgb) {\n\tconst reversed = reverseKeywords[rgb];\n\tif (reversed) {\n\t\treturn reversed;\n\t}\n\n\tlet currentClosestDistance = Infinity;\n\tlet currentClosestKeyword;\n\n\tfor (const keyword of Object.keys(cssKeywords)) {\n\t\tconst value = cssKeywords[keyword];\n\n\t\t// Compute comparative distance\n\t\tconst distance = comparativeDistance(rgb, value);\n\n\t\t// Check if its less, if so set as closest\n\t\tif (distance < currentClosestDistance) {\n\t\t\tcurrentClosestDistance = distance;\n\t\t\tcurrentClosestKeyword = keyword;\n\t\t}\n\t}\n\n\treturn currentClosestKeyword;\n};\n\nconvert.keyword.rgb = function (keyword) {\n\treturn cssKeywords[keyword];\n};\n\nconvert.rgb.xyz = function (rgb) {\n\tlet r = rgb[0] / 255;\n\tlet g = rgb[1] / 255;\n\tlet b = rgb[2] / 255;\n\n\t// Assume sRGB\n\tr = r > 0.04045 ? (((r + 0.055) / 1.055) ** 2.4) : (r / 12.92);\n\tg = g > 0.04045 ? (((g + 0.055) / 1.055) ** 2.4) : (g / 12.92);\n\tb = b > 0.04045 ? (((b + 0.055) / 1.055) ** 2.4) : (b / 12.92);\n\n\tconst x = (r * 0.4124) + (g * 0.3576) + (b * 0.1805);\n\tconst y = (r * 0.2126) + (g * 0.7152) + (b * 0.0722);\n\tconst z = (r * 0.0193) + (g * 0.1192) + (b * 0.9505);\n\n\treturn [x * 100, y * 100, z * 100];\n};\n\nconvert.rgb.lab = function (rgb) {\n\tconst xyz = convert.rgb.xyz(rgb);\n\tlet x = xyz[0];\n\tlet y = xyz[1];\n\tlet z = xyz[2];\n\n\tx /= 95.047;\n\ty /= 100;\n\tz /= 108.883;\n\n\tx = x > 0.008856 ? (x ** (1 / 3)) : (7.787 * x) + (16 / 116);\n\ty = y > 0.008856 ? (y ** (1 / 3)) : (7.787 * y) + (16 / 116);\n\tz = z > 0.008856 ? (z ** (1 / 3)) : (7.787 * z) + (16 / 116);\n\n\tconst l = (116 * y) - 16;\n\tconst a = 500 * (x - y);\n\tconst b = 200 * (y - z);\n\n\treturn [l, a, b];\n};\n\nconvert.hsl.rgb = function (hsl) {\n\tconst h = hsl[0] / 360;\n\tconst s = hsl[1] / 100;\n\tconst l = hsl[2] / 100;\n\tlet t2;\n\tlet t3;\n\tlet val;\n\n\tif (s === 0) {\n\t\tval = l * 255;\n\t\treturn [val, val, val];\n\t}\n\n\tif (l < 0.5) {\n\t\tt2 = l * (1 + s);\n\t} else {\n\t\tt2 = l + s - l * s;\n\t}\n\n\tconst t1 = 2 * l - t2;\n\n\tconst rgb = [0, 0, 0];\n\tfor (let i = 0; i < 3; i++) {\n\t\tt3 = h + 1 / 3 * -(i - 1);\n\t\tif (t3 < 0) {\n\t\t\tt3++;\n\t\t}\n\n\t\tif (t3 > 1) {\n\t\t\tt3--;\n\t\t}\n\n\t\tif (6 * t3 < 1) {\n\t\t\tval = t1 + (t2 - t1) * 6 * t3;\n\t\t} else if (2 * t3 < 1) {\n\t\t\tval = t2;\n\t\t} else if (3 * t3 < 2) {\n\t\t\tval = t1 + (t2 - t1) * (2 / 3 - t3) * 6;\n\t\t} else {\n\t\t\tval = t1;\n\t\t}\n\n\t\trgb[i] = val * 255;\n\t}\n\n\treturn rgb;\n};\n\nconvert.hsl.hsv = function (hsl) {\n\tconst h = hsl[0];\n\tlet s = hsl[1] / 100;\n\tlet l = hsl[2] / 100;\n\tlet smin = s;\n\tconst lmin = Math.max(l, 0.01);\n\n\tl *= 2;\n\ts *= (l <= 1) ? l : 2 - l;\n\tsmin *= lmin <= 1 ? lmin : 2 - lmin;\n\tconst v = (l + s) / 2;\n\tconst sv = l === 0 ? (2 * smin) / (lmin + smin) : (2 * s) / (l + s);\n\n\treturn [h, sv * 100, v * 100];\n};\n\nconvert.hsv.rgb = function (hsv) {\n\tconst h = hsv[0] / 60;\n\tconst s = hsv[1] / 100;\n\tlet v = hsv[2] / 100;\n\tconst hi = Math.floor(h) % 6;\n\n\tconst f = h - Math.floor(h);\n\tconst p = 255 * v * (1 - s);\n\tconst q = 255 * v * (1 - (s * f));\n\tconst t = 255 * v * (1 - (s * (1 - f)));\n\tv *= 255;\n\n\tswitch (hi) {\n\t\tcase 0:\n\t\t\treturn [v, t, p];\n\t\tcase 1:\n\t\t\treturn [q, v, p];\n\t\tcase 2:\n\t\t\treturn [p, v, t];\n\t\tcase 3:\n\t\t\treturn [p, q, v];\n\t\tcase 4:\n\t\t\treturn [t, p, v];\n\t\tcase 5:\n\t\t\treturn [v, p, q];\n\t}\n};\n\nconvert.hsv.hsl = function (hsv) {\n\tconst h = hsv[0];\n\tconst s = hsv[1] / 100;\n\tconst v = hsv[2] / 100;\n\tconst vmin = Math.max(v, 0.01);\n\tlet sl;\n\tlet l;\n\n\tl = (2 - s) * v;\n\tconst lmin = (2 - s) * vmin;\n\tsl = s * vmin;\n\tsl /= (lmin <= 1) ? lmin : 2 - lmin;\n\tsl = sl || 0;\n\tl /= 2;\n\n\treturn [h, sl * 100, l * 100];\n};\n\n// http://dev.w3.org/csswg/css-color/#hwb-to-rgb\nconvert.hwb.rgb = function (hwb) {\n\tconst h = hwb[0] / 360;\n\tlet wh = hwb[1] / 100;\n\tlet bl = hwb[2] / 100;\n\tconst ratio = wh + bl;\n\tlet f;\n\n\t// Wh + bl cant be > 1\n\tif (ratio > 1) {\n\t\twh /= ratio;\n\t\tbl /= ratio;\n\t}\n\n\tconst i = Math.floor(6 * h);\n\tconst v = 1 - bl;\n\tf = 6 * h - i;\n\n\tif ((i & 0x01) !== 0) {\n\t\tf = 1 - f;\n\t}\n\n\tconst n = wh + f * (v - wh); // Linear interpolation\n\n\tlet r;\n\tlet g;\n\tlet b;\n\t/* eslint-disable max-statements-per-line,no-multi-spaces */\n\tswitch (i) {\n\t\tdefault:\n\t\tcase 6:\n\t\tcase 0: r = v; g = n; b = wh; break;\n\t\tcase 1: r = n; g = v; b = wh; break;\n\t\tcase 2: r = wh; g = v; b = n; break;\n\t\tcase 3: r = wh; g = n; b = v; break;\n\t\tcase 4: r = n; g = wh; b = v; break;\n\t\tcase 5: r = v; g = wh; b = n; break;\n\t}\n\t/* eslint-enable max-statements-per-line,no-multi-spaces */\n\n\treturn [r * 255, g * 255, b * 255];\n};\n\nconvert.cmyk.rgb = function (cmyk) {\n\tconst c = cmyk[0] / 100;\n\tconst m = cmyk[1] / 100;\n\tconst y = cmyk[2] / 100;\n\tconst k = cmyk[3] / 100;\n\n\tconst r = 1 - Math.min(1, c * (1 - k) + k);\n\tconst g = 1 - Math.min(1, m * (1 - k) + k);\n\tconst b = 1 - Math.min(1, y * (1 - k) + k);\n\n\treturn [r * 255, g * 255, b * 255];\n};\n\nconvert.xyz.rgb = function (xyz) {\n\tconst x = xyz[0] / 100;\n\tconst y = xyz[1] / 100;\n\tconst z = xyz[2] / 100;\n\tlet r;\n\tlet g;\n\tlet b;\n\n\tr = (x * 3.2406) + (y * -1.5372) + (z * -0.4986);\n\tg = (x * -0.9689) + (y * 1.8758) + (z * 0.0415);\n\tb = (x * 0.0557) + (y * -0.2040) + (z * 1.0570);\n\n\t// Assume sRGB\n\tr = r > 0.0031308\n\t\t? ((1.055 * (r ** (1.0 / 2.4))) - 0.055)\n\t\t: r * 12.92;\n\n\tg = g > 0.0031308\n\t\t? ((1.055 * (g ** (1.0 / 2.4))) - 0.055)\n\t\t: g * 12.92;\n\n\tb = b > 0.0031308\n\t\t? ((1.055 * (b ** (1.0 / 2.4))) - 0.055)\n\t\t: b * 12.92;\n\n\tr = Math.min(Math.max(0, r), 1);\n\tg = Math.min(Math.max(0, g), 1);\n\tb = Math.min(Math.max(0, b), 1);\n\n\treturn [r * 255, g * 255, b * 255];\n};\n\nconvert.xyz.lab = function (xyz) {\n\tlet x = xyz[0];\n\tlet y = xyz[1];\n\tlet z = xyz[2];\n\n\tx /= 95.047;\n\ty /= 100;\n\tz /= 108.883;\n\n\tx = x > 0.008856 ? (x ** (1 / 3)) : (7.787 * x) + (16 / 116);\n\ty = y > 0.008856 ? (y ** (1 / 3)) : (7.787 * y) + (16 / 116);\n\tz = z > 0.008856 ? (z ** (1 / 3)) : (7.787 * z) + (16 / 116);\n\n\tconst l = (116 * y) - 16;\n\tconst a = 500 * (x - y);\n\tconst b = 200 * (y - z);\n\n\treturn [l, a, b];\n};\n\nconvert.lab.xyz = function (lab) {\n\tconst l = lab[0];\n\tconst a = lab[1];\n\tconst b = lab[2];\n\tlet x;\n\tlet y;\n\tlet z;\n\n\ty = (l + 16) / 116;\n\tx = a / 500 + y;\n\tz = y - b / 200;\n\n\tconst y2 = y ** 3;\n\tconst x2 = x ** 3;\n\tconst z2 = z ** 3;\n\ty = y2 > 0.008856 ? y2 : (y - 16 / 116) / 7.787;\n\tx = x2 > 0.008856 ? x2 : (x - 16 / 116) / 7.787;\n\tz = z2 > 0.008856 ? z2 : (z - 16 / 116) / 7.787;\n\n\tx *= 95.047;\n\ty *= 100;\n\tz *= 108.883;\n\n\treturn [x, y, z];\n};\n\nconvert.lab.lch = function (lab) {\n\tconst l = lab[0];\n\tconst a = lab[1];\n\tconst b = lab[2];\n\tlet h;\n\n\tconst hr = Math.atan2(b, a);\n\th = hr * 360 / 2 / Math.PI;\n\n\tif (h < 0) {\n\t\th += 360;\n\t}\n\n\tconst c = Math.sqrt(a * a + b * b);\n\n\treturn [l, c, h];\n};\n\nconvert.lch.lab = function (lch) {\n\tconst l = lch[0];\n\tconst c = lch[1];\n\tconst h = lch[2];\n\n\tconst hr = h / 360 * 2 * Math.PI;\n\tconst a = c * Math.cos(hr);\n\tconst b = c * Math.sin(hr);\n\n\treturn [l, a, b];\n};\n\nconvert.rgb.ansi16 = function (args, saturation = null) {\n\tconst [r, g, b] = args;\n\tlet value = saturation === null ? convert.rgb.hsv(args)[2] : saturation; // Hsv -> ansi16 optimization\n\n\tvalue = Math.round(value / 50);\n\n\tif (value === 0) {\n\t\treturn 30;\n\t}\n\n\tlet ansi = 30\n\t\t+ ((Math.round(b / 255) << 2)\n\t\t| (Math.round(g / 255) << 1)\n\t\t| Math.round(r / 255));\n\n\tif (value === 2) {\n\t\tansi += 60;\n\t}\n\n\treturn ansi;\n};\n\nconvert.hsv.ansi16 = function (args) {\n\t// Optimization here; we already know the value and don't need to get\n\t// it converted for us.\n\treturn convert.rgb.ansi16(convert.hsv.rgb(args), args[2]);\n};\n\nconvert.rgb.ansi256 = function (args) {\n\tconst r = args[0];\n\tconst g = args[1];\n\tconst b = args[2];\n\n\t// We use the extended greyscale palette here, with the exception of\n\t// black and white. normal palette only has 4 greyscale shades.\n\tif (r === g && g === b) {\n\t\tif (r < 8) {\n\t\t\treturn 16;\n\t\t}\n\n\t\tif (r > 248) {\n\t\t\treturn 231;\n\t\t}\n\n\t\treturn Math.round(((r - 8) / 247) * 24) + 232;\n\t}\n\n\tconst ansi = 16\n\t\t+ (36 * Math.round(r / 255 * 5))\n\t\t+ (6 * Math.round(g / 255 * 5))\n\t\t+ Math.round(b / 255 * 5);\n\n\treturn ansi;\n};\n\nconvert.ansi16.rgb = function (args) {\n\tlet color = args % 10;\n\n\t// Handle greyscale\n\tif (color === 0 || color === 7) {\n\t\tif (args > 50) {\n\t\t\tcolor += 3.5;\n\t\t}\n\n\t\tcolor = color / 10.5 * 255;\n\n\t\treturn [color, color, color];\n\t}\n\n\tconst mult = (~~(args > 50) + 1) * 0.5;\n\tconst r = ((color & 1) * mult) * 255;\n\tconst g = (((color >> 1) & 1) * mult) * 255;\n\tconst b = (((color >> 2) & 1) * mult) * 255;\n\n\treturn [r, g, b];\n};\n\nconvert.ansi256.rgb = function (args) {\n\t// Handle greyscale\n\tif (args >= 232) {\n\t\tconst c = (args - 232) * 10 + 8;\n\t\treturn [c, c, c];\n\t}\n\n\targs -= 16;\n\n\tlet rem;\n\tconst r = Math.floor(args / 36) / 5 * 255;\n\tconst g = Math.floor((rem = args % 36) / 6) / 5 * 255;\n\tconst b = (rem % 6) / 5 * 255;\n\n\treturn [r, g, b];\n};\n\nconvert.rgb.hex = function (args) {\n\tconst integer = ((Math.round(args[0]) & 0xFF) << 16)\n\t\t+ ((Math.round(args[1]) & 0xFF) << 8)\n\t\t+ (Math.round(args[2]) & 0xFF);\n\n\tconst string = integer.toString(16).toUpperCase();\n\treturn '000000'.substring(string.length) + string;\n};\n\nconvert.hex.rgb = function (args) {\n\tconst match = args.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);\n\tif (!match) {\n\t\treturn [0, 0, 0];\n\t}\n\n\tlet colorString = match[0];\n\n\tif (match[0].length === 3) {\n\t\tcolorString = colorString.split('').map(char => {\n\t\t\treturn char + char;\n\t\t}).join('');\n\t}\n\n\tconst integer = parseInt(colorString, 16);\n\tconst r = (integer >> 16) & 0xFF;\n\tconst g = (integer >> 8) & 0xFF;\n\tconst b = integer & 0xFF;\n\n\treturn [r, g, b];\n};\n\nconvert.rgb.hcg = function (rgb) {\n\tconst r = rgb[0] / 255;\n\tconst g = rgb[1] / 255;\n\tconst b = rgb[2] / 255;\n\tconst max = Math.max(Math.max(r, g), b);\n\tconst min = Math.min(Math.min(r, g), b);\n\tconst chroma = (max - min);\n\tlet grayscale;\n\tlet hue;\n\n\tif (chroma < 1) {\n\t\tgrayscale = min / (1 - chroma);\n\t} else {\n\t\tgrayscale = 0;\n\t}\n\n\tif (chroma <= 0) {\n\t\thue = 0;\n\t} else\n\tif (max === r) {\n\t\thue = ((g - b) / chroma) % 6;\n\t} else\n\tif (max === g) {\n\t\thue = 2 + (b - r) / chroma;\n\t} else {\n\t\thue = 4 + (r - g) / chroma;\n\t}\n\n\thue /= 6;\n\thue %= 1;\n\n\treturn [hue * 360, chroma * 100, grayscale * 100];\n};\n\nconvert.hsl.hcg = function (hsl) {\n\tconst s = hsl[1] / 100;\n\tconst l = hsl[2] / 100;\n\n\tconst c = l < 0.5 ? (2.0 * s * l) : (2.0 * s * (1.0 - l));\n\n\tlet f = 0;\n\tif (c < 1.0) {\n\t\tf = (l - 0.5 * c) / (1.0 - c);\n\t}\n\n\treturn [hsl[0], c * 100, f * 100];\n};\n\nconvert.hsv.hcg = function (hsv) {\n\tconst s = hsv[1] / 100;\n\tconst v = hsv[2] / 100;\n\n\tconst c = s * v;\n\tlet f = 0;\n\n\tif (c < 1.0) {\n\t\tf = (v - c) / (1 - c);\n\t}\n\n\treturn [hsv[0], c * 100, f * 100];\n};\n\nconvert.hcg.rgb = function (hcg) {\n\tconst h = hcg[0] / 360;\n\tconst c = hcg[1] / 100;\n\tconst g = hcg[2] / 100;\n\n\tif (c === 0.0) {\n\t\treturn [g * 255, g * 255, g * 255];\n\t}\n\n\tconst pure = [0, 0, 0];\n\tconst hi = (h % 1) * 6;\n\tconst v = hi % 1;\n\tconst w = 1 - v;\n\tlet mg = 0;\n\n\t/* eslint-disable max-statements-per-line */\n\tswitch (Math.floor(hi)) {\n\t\tcase 0:\n\t\t\tpure[0] = 1; pure[1] = v; pure[2] = 0; break;\n\t\tcase 1:\n\t\t\tpure[0] = w; pure[1] = 1; pure[2] = 0; break;\n\t\tcase 2:\n\t\t\tpure[0] = 0; pure[1] = 1; pure[2] = v; break;\n\t\tcase 3:\n\t\t\tpure[0] = 0; pure[1] = w; pure[2] = 1; break;\n\t\tcase 4:\n\t\t\tpure[0] = v; pure[1] = 0; pure[2] = 1; break;\n\t\tdefault:\n\t\t\tpure[0] = 1; pure[1] = 0; pure[2] = w;\n\t}\n\t/* eslint-enable max-statements-per-line */\n\n\tmg = (1.0 - c) * g;\n\n\treturn [\n\t\t(c * pure[0] + mg) * 255,\n\t\t(c * pure[1] + mg) * 255,\n\t\t(c * pure[2] + mg) * 255\n\t];\n};\n\nconvert.hcg.hsv = function (hcg) {\n\tconst c = hcg[1] / 100;\n\tconst g = hcg[2] / 100;\n\n\tconst v = c + g * (1.0 - c);\n\tlet f = 0;\n\n\tif (v > 0.0) {\n\t\tf = c / v;\n\t}\n\n\treturn [hcg[0], f * 100, v * 100];\n};\n\nconvert.hcg.hsl = function (hcg) {\n\tconst c = hcg[1] / 100;\n\tconst g = hcg[2] / 100;\n\n\tconst l = g * (1.0 - c) + 0.5 * c;\n\tlet s = 0;\n\n\tif (l > 0.0 && l < 0.5) {\n\t\ts = c / (2 * l);\n\t} else\n\tif (l >= 0.5 && l < 1.0) {\n\t\ts = c / (2 * (1 - l));\n\t}\n\n\treturn [hcg[0], s * 100, l * 100];\n};\n\nconvert.hcg.hwb = function (hcg) {\n\tconst c = hcg[1] / 100;\n\tconst g = hcg[2] / 100;\n\tconst v = c + g * (1.0 - c);\n\treturn [hcg[0], (v - c) * 100, (1 - v) * 100];\n};\n\nconvert.hwb.hcg = function (hwb) {\n\tconst w = hwb[1] / 100;\n\tconst b = hwb[2] / 100;\n\tconst v = 1 - b;\n\tconst c = v - w;\n\tlet g = 0;\n\n\tif (c < 1) {\n\t\tg = (v - c) / (1 - c);\n\t}\n\n\treturn [hwb[0], c * 100, g * 100];\n};\n\nconvert.apple.rgb = function (apple) {\n\treturn [(apple[0] / 65535) * 255, (apple[1] / 65535) * 255, (apple[2] / 65535) * 255];\n};\n\nconvert.rgb.apple = function (rgb) {\n\treturn [(rgb[0] / 255) * 65535, (rgb[1] / 255) * 65535, (rgb[2] / 255) * 65535];\n};\n\nconvert.gray.rgb = function (args) {\n\treturn [args[0] / 100 * 255, args[0] / 100 * 255, args[0] / 100 * 255];\n};\n\nconvert.gray.hsl = function (args) {\n\treturn [0, 0, args[0]];\n};\n\nconvert.gray.hsv = convert.gray.hsl;\n\nconvert.gray.hwb = function (gray) {\n\treturn [0, 100, gray[0]];\n};\n\nconvert.gray.cmyk = function (gray) {\n\treturn [0, 0, 0, gray[0]];\n};\n\nconvert.gray.lab = function (gray) {\n\treturn [gray[0], 0, 0];\n};\n\nconvert.gray.hex = function (gray) {\n\tconst val = Math.round(gray[0] / 100 * 255) & 0xFF;\n\tconst integer = (val << 16) + (val << 8) + val;\n\n\tconst string = integer.toString(16).toUpperCase();\n\treturn '000000'.substring(string.length) + string;\n};\n\nconvert.rgb.gray = function (rgb) {\n\tconst val = (rgb[0] + rgb[1] + rgb[2]) / 3;\n\treturn [val / 255 * 100];\n};\n","const conversions = require('./conversions');\n\n/*\n\tThis function routes a model to all other models.\n\n\tall functions that are routed have a property `.conversion` attached\n\tto the returned synthetic function. This property is an array\n\tof strings, each with the steps in between the 'from' and 'to'\n\tcolor models (inclusive).\n\n\tconversions that are not possible simply are not included.\n*/\n\nfunction buildGraph() {\n\tconst graph = {};\n\t// https://jsperf.com/object-keys-vs-for-in-with-closure/3\n\tconst models = Object.keys(conversions);\n\n\tfor (let len = models.length, i = 0; i < len; i++) {\n\t\tgraph[models[i]] = {\n\t\t\t// http://jsperf.com/1-vs-infinity\n\t\t\t// micro-opt, but this is simple.\n\t\t\tdistance: -1,\n\t\t\tparent: null\n\t\t};\n\t}\n\n\treturn graph;\n}\n\n// https://en.wikipedia.org/wiki/Breadth-first_search\nfunction deriveBFS(fromModel) {\n\tconst graph = buildGraph();\n\tconst queue = [fromModel]; // Unshift -> queue -> pop\n\n\tgraph[fromModel].distance = 0;\n\n\twhile (queue.length) {\n\t\tconst current = queue.pop();\n\t\tconst adjacents = Object.keys(conversions[current]);\n\n\t\tfor (let len = adjacents.length, i = 0; i < len; i++) {\n\t\t\tconst adjacent = adjacents[i];\n\t\t\tconst node = graph[adjacent];\n\n\t\t\tif (node.distance === -1) {\n\t\t\t\tnode.distance = graph[current].distance + 1;\n\t\t\t\tnode.parent = current;\n\t\t\t\tqueue.unshift(adjacent);\n\t\t\t}\n\t\t}\n\t}\n\n\treturn graph;\n}\n\nfunction link(from, to) {\n\treturn function (args) {\n\t\treturn to(from(args));\n\t};\n}\n\nfunction wrapConversion(toModel, graph) {\n\tconst path = [graph[toModel].parent, toModel];\n\tlet fn = conversions[graph[toModel].parent][toModel];\n\n\tlet cur = graph[toModel].parent;\n\twhile (graph[cur].parent) {\n\t\tpath.unshift(graph[cur].parent);\n\t\tfn = link(conversions[graph[cur].parent][cur], fn);\n\t\tcur = graph[cur].parent;\n\t}\n\n\tfn.conversion = path;\n\treturn fn;\n}\n\nmodule.exports = function (fromModel) {\n\tconst graph = deriveBFS(fromModel);\n\tconst conversion = {};\n\n\tconst models = Object.keys(graph);\n\tfor (let len = models.length, i = 0; i < len; i++) {\n\t\tconst toModel = models[i];\n\t\tconst node = graph[toModel];\n\n\t\tif (node.parent === null) {\n\t\t\t// No possible conversion, or this node is the source model.\n\t\t\tcontinue;\n\t\t}\n\n\t\tconversion[toModel] = wrapConversion(toModel, graph);\n\t}\n\n\treturn conversion;\n};\n\n","const conversions = require('./conversions');\nconst route = require('./route');\n\nconst convert = {};\n\nconst models = Object.keys(conversions);\n\nfunction wrapRaw(fn) {\n\tconst wrappedFn = function (...args) {\n\t\tconst arg0 = args[0];\n\t\tif (arg0 === undefined || arg0 === null) {\n\t\t\treturn arg0;\n\t\t}\n\n\t\tif (arg0.length > 1) {\n\t\t\targs = arg0;\n\t\t}\n\n\t\treturn fn(args);\n\t};\n\n\t// Preserve .conversion property if there is one\n\tif ('conversion' in fn) {\n\t\twrappedFn.conversion = fn.conversion;\n\t}\n\n\treturn wrappedFn;\n}\n\nfunction wrapRounded(fn) {\n\tconst wrappedFn = function (...args) {\n\t\tconst arg0 = args[0];\n\n\t\tif (arg0 === undefined || arg0 === null) {\n\t\t\treturn arg0;\n\t\t}\n\n\t\tif (arg0.length > 1) {\n\t\t\targs = arg0;\n\t\t}\n\n\t\tconst result = fn(args);\n\n\t\t// We're assuming the result is an array here.\n\t\t// see notice in conversions.js; don't use box types\n\t\t// in conversion functions.\n\t\tif (typeof result === 'object') {\n\t\t\tfor (let len = result.length, i = 0; i < len; i++) {\n\t\t\t\tresult[i] = Math.round(result[i]);\n\t\t\t}\n\t\t}\n\n\t\treturn result;\n\t};\n\n\t// Preserve .conversion property if there is one\n\tif ('conversion' in fn) {\n\t\twrappedFn.conversion = fn.conversion;\n\t}\n\n\treturn wrappedFn;\n}\n\nmodels.forEach(fromModel => {\n\tconvert[fromModel] = {};\n\n\tObject.defineProperty(convert[fromModel], 'channels', {value: conversions[fromModel].channels});\n\tObject.defineProperty(convert[fromModel], 'labels', {value: conversions[fromModel].labels});\n\n\tconst routes = route(fromModel);\n\tconst routeModels = Object.keys(routes);\n\n\trouteModels.forEach(toModel => {\n\t\tconst fn = routes[toModel];\n\n\t\tconvert[fromModel][toModel] = wrapRounded(fn);\n\t\tconvert[fromModel][toModel].raw = wrapRaw(fn);\n\t});\n});\n\nmodule.exports = convert;\n","'use strict';\n\nconst wrapAnsi16 = (fn, offset) => (...args) => {\n\tconst code = fn(...args);\n\treturn `\\u001B[${code + offset}m`;\n};\n\nconst wrapAnsi256 = (fn, offset) => (...args) => {\n\tconst code = fn(...args);\n\treturn `\\u001B[${38 + offset};5;${code}m`;\n};\n\nconst wrapAnsi16m = (fn, offset) => (...args) => {\n\tconst rgb = fn(...args);\n\treturn `\\u001B[${38 + offset};2;${rgb[0]};${rgb[1]};${rgb[2]}m`;\n};\n\nconst ansi2ansi = n => n;\nconst rgb2rgb = (r, g, b) => [r, g, b];\n\nconst setLazyProperty = (object, property, get) => {\n\tObject.defineProperty(object, property, {\n\t\tget: () => {\n\t\t\tconst value = get();\n\n\t\t\tObject.defineProperty(object, property, {\n\t\t\t\tvalue,\n\t\t\t\tenumerable: true,\n\t\t\t\tconfigurable: true\n\t\t\t});\n\n\t\t\treturn value;\n\t\t},\n\t\tenumerable: true,\n\t\tconfigurable: true\n\t});\n};\n\n/** @type {typeof import('color-convert')} */\nlet colorConvert;\nconst makeDynamicStyles = (wrap, targetSpace, identity, isBackground) => {\n\tif (colorConvert === undefined) {\n\t\tcolorConvert = require('color-convert');\n\t}\n\n\tconst offset = isBackground ? 10 : 0;\n\tconst styles = {};\n\n\tfor (const [sourceSpace, suite] of Object.entries(colorConvert)) {\n\t\tconst name = sourceSpace === 'ansi16' ? 'ansi' : sourceSpace;\n\t\tif (sourceSpace === targetSpace) {\n\t\t\tstyles[name] = wrap(identity, offset);\n\t\t} else if (typeof suite === 'object') {\n\t\t\tstyles[name] = wrap(suite[targetSpace], offset);\n\t\t}\n\t}\n\n\treturn styles;\n};\n\nfunction assembleStyles() {\n\tconst codes = new Map();\n\tconst styles = {\n\t\tmodifier: {\n\t\t\treset: [0, 0],\n\t\t\t// 21 isn't widely supported and 22 does the same thing\n\t\t\tbold: [1, 22],\n\t\t\tdim: [2, 22],\n\t\t\titalic: [3, 23],\n\t\t\tunderline: [4, 24],\n\t\t\tinverse: [7, 27],\n\t\t\thidden: [8, 28],\n\t\t\tstrikethrough: [9, 29]\n\t\t},\n\t\tcolor: {\n\t\t\tblack: [30, 39],\n\t\t\tred: [31, 39],\n\t\t\tgreen: [32, 39],\n\t\t\tyellow: [33, 39],\n\t\t\tblue: [34, 39],\n\t\t\tmagenta: [35, 39],\n\t\t\tcyan: [36, 39],\n\t\t\twhite: [37, 39],\n\n\t\t\t// Bright color\n\t\t\tblackBright: [90, 39],\n\t\t\tredBright: [91, 39],\n\t\t\tgreenBright: [92, 39],\n\t\t\tyellowBright: [93, 39],\n\t\t\tblueBright: [94, 39],\n\t\t\tmagentaBright: [95, 39],\n\t\t\tcyanBright: [96, 39],\n\t\t\twhiteBright: [97, 39]\n\t\t},\n\t\tbgColor: {\n\t\t\tbgBlack: [40, 49],\n\t\t\tbgRed: [41, 49],\n\t\t\tbgGreen: [42, 49],\n\t\t\tbgYellow: [43, 49],\n\t\t\tbgBlue: [44, 49],\n\t\t\tbgMagenta: [45, 49],\n\t\t\tbgCyan: [46, 49],\n\t\t\tbgWhite: [47, 49],\n\n\t\t\t// Bright color\n\t\t\tbgBlackBright: [100, 49],\n\t\t\tbgRedBright: [101, 49],\n\t\t\tbgGreenBright: [102, 49],\n\t\t\tbgYellowBright: [103, 49],\n\t\t\tbgBlueBright: [104, 49],\n\t\t\tbgMagentaBright: [105, 49],\n\t\t\tbgCyanBright: [106, 49],\n\t\t\tbgWhiteBright: [107, 49]\n\t\t}\n\t};\n\n\t// Alias bright black as gray (and grey)\n\tstyles.color.gray = styles.color.blackBright;\n\tstyles.bgColor.bgGray = styles.bgColor.bgBlackBright;\n\tstyles.color.grey = styles.color.blackBright;\n\tstyles.bgColor.bgGrey = styles.bgColor.bgBlackBright;\n\n\tfor (const [groupName, group] of Object.entries(styles)) {\n\t\tfor (const [styleName, style] of Object.entries(group)) {\n\t\t\tstyles[styleName] = {\n\t\t\t\topen: `\\u001B[${style[0]}m`,\n\t\t\t\tclose: `\\u001B[${style[1]}m`\n\t\t\t};\n\n\t\t\tgroup[styleName] = styles[styleName];\n\n\t\t\tcodes.set(style[0], style[1]);\n\t\t}\n\n\t\tObject.defineProperty(styles, groupName, {\n\t\t\tvalue: group,\n\t\t\tenumerable: false\n\t\t});\n\t}\n\n\tObject.defineProperty(styles, 'codes', {\n\t\tvalue: codes,\n\t\tenumerable: false\n\t});\n\n\tstyles.color.close = '\\u001B[39m';\n\tstyles.bgColor.close = '\\u001B[49m';\n\n\tsetLazyProperty(styles.color, 'ansi', () => makeDynamicStyles(wrapAnsi16, 'ansi16', ansi2ansi, false));\n\tsetLazyProperty(styles.color, 'ansi256', () => makeDynamicStyles(wrapAnsi256, 'ansi256', ansi2ansi, false));\n\tsetLazyProperty(styles.color, 'ansi16m', () => makeDynamicStyles(wrapAnsi16m, 'rgb', rgb2rgb, false));\n\tsetLazyProperty(styles.bgColor, 'ansi', () => makeDynamicStyles(wrapAnsi16, 'ansi16', ansi2ansi, true));\n\tsetLazyProperty(styles.bgColor, 'ansi256', () => makeDynamicStyles(wrapAnsi256, 'ansi256', ansi2ansi, true));\n\tsetLazyProperty(styles.bgColor, 'ansi16m', () => makeDynamicStyles(wrapAnsi16m, 'rgb', rgb2rgb, true));\n\n\treturn styles;\n}\n\n// Make the export immutable\nObject.defineProperty(module, 'exports', {\n\tenumerable: true,\n\tget: assembleStyles\n});\n","'use strict';\nmodule.exports = {\n\tstdout: false,\n\tstderr: false\n};\n","'use strict';\n\nconst stringReplaceAll = (string, substring, replacer) => {\n\tlet index = string.indexOf(substring);\n\tif (index === -1) {\n\t\treturn string;\n\t}\n\n\tconst substringLength = substring.length;\n\tlet endIndex = 0;\n\tlet returnValue = '';\n\tdo {\n\t\treturnValue += string.substr(endIndex, index - endIndex) + substring + replacer;\n\t\tendIndex = index + substringLength;\n\t\tindex = string.indexOf(substring, endIndex);\n\t} while (index !== -1);\n\n\treturnValue += string.substr(endIndex);\n\treturn returnValue;\n};\n\nconst stringEncaseCRLFWithFirstIndex = (string, prefix, postfix, index) => {\n\tlet endIndex = 0;\n\tlet returnValue = '';\n\tdo {\n\t\tconst gotCR = string[index - 1] === '\\r';\n\t\treturnValue += string.substr(endIndex, (gotCR ? index - 1 : index) - endIndex) + prefix + (gotCR ? '\\r\\n' : '\\n') + postfix;\n\t\tendIndex = index + 1;\n\t\tindex = string.indexOf('\\n', endIndex);\n\t} while (index !== -1);\n\n\treturnValue += string.substr(endIndex);\n\treturn returnValue;\n};\n\nmodule.exports = {\n\tstringReplaceAll,\n\tstringEncaseCRLFWithFirstIndex\n};\n","'use strict';\nconst 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;\nconst STYLE_REGEX = /(?:^|\\.)(\\w+)(?:\\(([^)]*)\\))?/g;\nconst STRING_REGEX = /^(['\"])((?:\\\\.|(?!\\1)[^\\\\])*)\\1$/;\nconst ESCAPE_REGEX = /\\\\(u(?:[a-f\\d]{4}|{[a-f\\d]{1,6}})|x[a-f\\d]{2}|.)|([^\\\\])/gi;\n\nconst ESCAPES = new Map([\n\t['n', '\\n'],\n\t['r', '\\r'],\n\t['t', '\\t'],\n\t['b', '\\b'],\n\t['f', '\\f'],\n\t['v', '\\v'],\n\t['0', '\\0'],\n\t['\\\\', '\\\\'],\n\t['e', '\\u001B'],\n\t['a', '\\u0007']\n]);\n\nfunction unescape(c) {\n\tconst u = c[0] === 'u';\n\tconst bracket = c[1] === '{';\n\n\tif ((u && !bracket && c.length === 5) || (c[0] === 'x' && c.length === 3)) {\n\t\treturn String.fromCharCode(parseInt(c.slice(1), 16));\n\t}\n\n\tif (u && bracket) {\n\t\treturn String.fromCodePoint(parseInt(c.slice(2, -1), 16));\n\t}\n\n\treturn ESCAPES.get(c) || c;\n}\n\nfunction parseArguments(name, arguments_) {\n\tconst results = [];\n\tconst chunks = arguments_.trim().split(/\\s*,\\s*/g);\n\tlet matches;\n\n\tfor (const chunk of chunks) {\n\t\tconst number = Number(chunk);\n\t\tif (!Number.isNaN(number)) {\n\t\t\tresults.push(number);\n\t\t} else if ((matches = chunk.match(STRING_REGEX))) {\n\t\t\tresults.push(matches[2].replace(ESCAPE_REGEX, (m, escape, character) => escape ? unescape(escape) : character));\n\t\t} else {\n\t\t\tthrow new Error(`Invalid Chalk template style argument: ${chunk} (in style '${name}')`);\n\t\t}\n\t}\n\n\treturn results;\n}\n\nfunction parseStyle(style) {\n\tSTYLE_REGEX.lastIndex = 0;\n\n\tconst results = [];\n\tlet matches;\n\n\twhile ((matches = STYLE_REGEX.exec(style)) !== null) {\n\t\tconst name = matches[1];\n\n\t\tif (matches[2]) {\n\t\t\tconst args = parseArguments(name, matches[2]);\n\t\t\tresults.push([name].concat(args));\n\t\t} else {\n\t\t\tresults.push([name]);\n\t\t}\n\t}\n\n\treturn results;\n}\n\nfunction buildStyle(chalk, styles) {\n\tconst enabled = {};\n\n\tfor (const layer of styles) {\n\t\tfor (const style of layer.styles) {\n\t\t\tenabled[style[0]] = layer.inverse ? null : style.slice(1);\n\t\t}\n\t}\n\n\tlet current = chalk;\n\tfor (const [styleName, styles] of Object.entries(enabled)) {\n\t\tif (!Array.isArray(styles)) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (!(styleName in current)) {\n\t\t\tthrow new Error(`Unknown Chalk style: ${styleName}`);\n\t\t}\n\n\t\tcurrent = styles.length > 0 ? current[styleName](...styles) : current[styleName];\n\t}\n\n\treturn current;\n}\n\nmodule.exports = (chalk, temporary) => {\n\tconst styles = [];\n\tconst chunks = [];\n\tlet chunk = [];\n\n\t// eslint-disable-next-line max-params\n\ttemporary.replace(TEMPLATE_REGEX, (m, escapeCharacter, inverse, style, close, character) => {\n\t\tif (escapeCharacter) {\n\t\t\tchunk.push(unescape(escapeCharacter));\n\t\t} else if (style) {\n\t\t\tconst string = chunk.join('');\n\t\t\tchunk = [];\n\t\t\tchunks.push(styles.length === 0 ? string : buildStyle(chalk, styles)(string));\n\t\t\tstyles.push({inverse, styles: parseStyle(style)});\n\t\t} else if (close) {\n\t\t\tif (styles.length === 0) {\n\t\t\t\tthrow new Error('Found extraneous } in Chalk template literal');\n\t\t\t}\n\n\t\t\tchunks.push(buildStyle(chalk, styles)(chunk.join('')));\n\t\t\tchunk = [];\n\t\t\tstyles.pop();\n\t\t} else {\n\t\t\tchunk.push(character);\n\t\t}\n\t});\n\n\tchunks.push(chunk.join(''));\n\n\tif (styles.length > 0) {\n\t\tconst errMessage = `Chalk template literal is missing ${styles.length} closing bracket${styles.length === 1 ? '' : 's'} (\\`}\\`)`;\n\t\tthrow new Error(errMessage);\n\t}\n\n\treturn chunks.join('');\n};\n","'use strict';\nconst ansiStyles = require('ansi-styles');\nconst {stdout: stdoutColor, stderr: stderrColor} = require('supports-color');\nconst {\n\tstringReplaceAll,\n\tstringEncaseCRLFWithFirstIndex\n} = require('./util');\n\nconst {isArray} = Array;\n\n// `supportsColor.level` → `ansiStyles.color[name]` mapping\nconst levelMapping = [\n\t'ansi',\n\t'ansi',\n\t'ansi256',\n\t'ansi16m'\n];\n\nconst styles = Object.create(null);\n\nconst applyOptions = (object, options = {}) => {\n\tif (options.level && !(Number.isInteger(options.level) && options.level >= 0 && options.level <= 3)) {\n\t\tthrow new Error('The `level` option should be an integer from 0 to 3');\n\t}\n\n\t// Detect level if not set manually\n\tconst colorLevel = stdoutColor ? stdoutColor.level : 0;\n\tobject.level = options.level === undefined ? colorLevel : options.level;\n};\n\nclass ChalkClass {\n\tconstructor(options) {\n\t\t// eslint-disable-next-line no-constructor-return\n\t\treturn chalkFactory(options);\n\t}\n}\n\nconst chalkFactory = options => {\n\tconst chalk = {};\n\tapplyOptions(chalk, options);\n\n\tchalk.template = (...arguments_) => chalkTag(chalk.template, ...arguments_);\n\n\tObject.setPrototypeOf(chalk, Chalk.prototype);\n\tObject.setPrototypeOf(chalk.template, chalk);\n\n\tchalk.template.constructor = () => {\n\t\tthrow new Error('`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.');\n\t};\n\n\tchalk.template.Instance = ChalkClass;\n\n\treturn chalk.template;\n};\n\nfunction Chalk(options) {\n\treturn chalkFactory(options);\n}\n\nfor (const [styleName, style] of Object.entries(ansiStyles)) {\n\tstyles[styleName] = {\n\t\tget() {\n\t\t\tconst builder = createBuilder(this, createStyler(style.open, style.close, this._styler), this._isEmpty);\n\t\t\tObject.defineProperty(this, styleName, {value: builder});\n\t\t\treturn builder;\n\t\t}\n\t};\n}\n\nstyles.visible = {\n\tget() {\n\t\tconst builder = createBuilder(this, this._styler, true);\n\t\tObject.defineProperty(this, 'visible', {value: builder});\n\t\treturn builder;\n\t}\n};\n\nconst usedModels = ['rgb', 'hex', 'keyword', 'hsl', 'hsv', 'hwb', 'ansi', 'ansi256'];\n\nfor (const model of usedModels) {\n\tstyles[model] = {\n\t\tget() {\n\t\t\tconst {level} = this;\n\t\t\treturn function (...arguments_) {\n\t\t\t\tconst styler = createStyler(ansiStyles.color[levelMapping[level]][model](...arguments_), ansiStyles.color.close, this._styler);\n\t\t\t\treturn createBuilder(this, styler, this._isEmpty);\n\t\t\t};\n\t\t}\n\t};\n}\n\nfor (const model of usedModels) {\n\tconst bgModel = 'bg' + model[0].toUpperCase() + model.slice(1);\n\tstyles[bgModel] = {\n\t\tget() {\n\t\t\tconst {level} = this;\n\t\t\treturn function (...arguments_) {\n\t\t\t\tconst styler = createStyler(ansiStyles.bgColor[levelMapping[level]][model](...arguments_), ansiStyles.bgColor.close, this._styler);\n\t\t\t\treturn createBuilder(this, styler, this._isEmpty);\n\t\t\t};\n\t\t}\n\t};\n}\n\nconst proto = Object.defineProperties(() => {}, {\n\t...styles,\n\tlevel: {\n\t\tenumerable: true,\n\t\tget() {\n\t\t\treturn this._generator.level;\n\t\t},\n\t\tset(level) {\n\t\t\tthis._generator.level = level;\n\t\t}\n\t}\n});\n\nconst createStyler = (open, close, parent) => {\n\tlet openAll;\n\tlet closeAll;\n\tif (parent === undefined) {\n\t\topenAll = open;\n\t\tcloseAll = close;\n\t} else {\n\t\topenAll = parent.openAll + open;\n\t\tcloseAll = close + parent.closeAll;\n\t}\n\n\treturn {\n\t\topen,\n\t\tclose,\n\t\topenAll,\n\t\tcloseAll,\n\t\tparent\n\t};\n};\n\nconst createBuilder = (self, _styler, _isEmpty) => {\n\tconst builder = (...arguments_) => {\n\t\tif (isArray(arguments_[0]) && isArray(arguments_[0].raw)) {\n\t\t\t// Called as a template literal, for example: chalk.red`2 + 3 = {bold ${2+3}}`\n\t\t\treturn applyStyle(builder, chalkTag(builder, ...arguments_));\n\t\t}\n\n\t\t// Single argument is hot path, implicit coercion is faster than anything\n\t\t// eslint-disable-next-line no-implicit-coercion\n\t\treturn applyStyle(builder, (arguments_.length === 1) ? ('' + arguments_[0]) : arguments_.join(' '));\n\t};\n\n\t// We alter the prototype because we must return a function, but there is\n\t// no way to create a function with a different prototype\n\tObject.setPrototypeOf(builder, proto);\n\n\tbuilder._generator = self;\n\tbuilder._styler = _styler;\n\tbuilder._isEmpty = _isEmpty;\n\n\treturn builder;\n};\n\nconst applyStyle = (self, string) => {\n\tif (self.level <= 0 || !string) {\n\t\treturn self._isEmpty ? '' : string;\n\t}\n\n\tlet styler = self._styler;\n\n\tif (styler === undefined) {\n\t\treturn string;\n\t}\n\n\tconst {openAll, closeAll} = styler;\n\tif (string.indexOf('\\u001B') !== -1) {\n\t\twhile (styler !== undefined) {\n\t\t\t// Replace any instances already present with a re-opening code\n\t\t\t// otherwise only the part of the string until said closing code\n\t\t\t// will be colored, and the rest will simply be 'plain'.\n\t\t\tstring = stringReplaceAll(string, styler.close, styler.open);\n\n\t\t\tstyler = styler.parent;\n\t\t}\n\t}\n\n\t// We can move both next actions out of loop, because remaining actions in loop won't have\n\t// any/visible effect on parts we add here. Close the styling before a linebreak and reopen\n\t// after next line to fix a bleed issue on macOS: https://github.com/chalk/chalk/pull/92\n\tconst lfIndex = string.indexOf('\\n');\n\tif (lfIndex !== -1) {\n\t\tstring = stringEncaseCRLFWithFirstIndex(string, closeAll, openAll, lfIndex);\n\t}\n\n\treturn openAll + string + closeAll;\n};\n\nlet template;\nconst chalkTag = (chalk, ...strings) => {\n\tconst [firstString] = strings;\n\n\tif (!isArray(firstString) || !isArray(firstString.raw)) {\n\t\t// If chalk() was called by itself or with a string,\n\t\t// return the string itself as a string.\n\t\treturn strings.join(' ');\n\t}\n\n\tconst arguments_ = strings.slice(1);\n\tconst parts = [firstString.raw[0]];\n\n\tfor (let i = 1; i < firstString.length; i++) {\n\t\tparts.push(\n\t\t\tString(arguments_[i - 1]).replace(/[{}\\\\]/g, '\\\\$&'),\n\t\t\tString(firstString.raw[i])\n\t\t);\n\t}\n\n\tif (template === undefined) {\n\t\ttemplate = require('./templates');\n\t}\n\n\treturn template(chalk, parts.join(''));\n};\n\nObject.defineProperties(Chalk.prototype, styles);\n\nconst chalk = Chalk(); // eslint-disable-line new-cap\nchalk.supportsColor = stdoutColor;\nchalk.stderr = Chalk({level: stderrColor ? stderrColor.level : 0}); // eslint-disable-line new-cap\nchalk.stderr.supportsColor = stderrColor;\n\nmodule.exports = chalk;\n","import _cloneDeep from \"lodash.clonedeep\";\nimport isNode from \"detect-node\";\n//#region \\0rolldown/runtime.js\nvar __create = Object.create;\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __getProtoOf = Object.getPrototypeOf;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __commonJSMin = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);\nvar __copyProps = (to, from, except, desc) => {\n\tif (from && typeof from === \"object\" || typeof from === \"function\") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {\n\t\tkey = keys[i];\n\t\tif (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {\n\t\t\tget: ((k) => from[k]).bind(null, key),\n\t\t\tenumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable\n\t\t});\n\t}\n\treturn to;\n};\nvar __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, \"default\", {\n\tvalue: mod,\n\tenumerable: true\n}) : target, mod));\n//#endregion\n//#region src/instrumentation/instrumentDefs.ts\nvar Gauge = /* @__PURE__ */ function(Gauge) {\n\tGauge[\"ACTIVE_REQUEST_GAUGE\"] = \"a\";\n\tGauge[\"AUTHENTICATION_COUNT_GAUGE\"] = \"b\";\n\tGauge[\"AUTHENTICATION_ERROR_COUNT_GAUGE\"] = \"aa\";\n\tGauge[\"AUTHENTICATION_RETRY_COUNT_GAUGE\"] = \"ab\";\n\tGauge[\"CONNECTION_POOL_IDLE_GAUGE\"] = \"c\";\n\tGauge[\"CONNECTION_POOL_TOTAL_GAUGE\"] = \"d\";\n\tGauge[\"CONNECTION_POOL_WAITING_GAUGE\"] = \"e\";\n\tGauge[\"CPU_LOAD_GAUGE\"] = \"f\";\n\tGauge[\"CPU_SYSTEM_LOAD_GAUGE\"] = \"g\";\n\tGauge[\"DURATION_GAUGE\"] = \"h\";\n\tGauge[\"DURATION_HISTOGRAM_GAUGE\"] = \"i\";\n\tGauge[\"ERROR_COUNT_GAUGE\"] = \"j\";\n\tGauge[\"LATENCY_GAUGE\"] = \"k\";\n\tGauge[\"LATENCY_HISTOGRAM_GAUGE\"] = \"l\";\n\tGauge[\"LOGGER\"] = \"m\";\n\tGauge[\"LOGGER_COPY\"] = \"n\";\n\tGauge[\"NETWORK_RX_GAUGE\"] = \"o\";\n\tGauge[\"NETWORK_TX_GAUGE\"] = \"p\";\n\tGauge[\"REQUEST_COUNT_GAUGE\"] = \"q\";\n\tGauge[\"RETRY_COUNT_GAUGE\"] = \"r\";\n\tGauge[\"TIMER_GAUGE\"] = \"s\";\n\tGauge[\"VELOCITY_GAUGE\"] = \"t\";\n\tGauge[\"CONNECTION_COUNT_GAUGE\"] = \"u\";\n\tGauge[\"OBJECT_GAUGE\"] = \"v\";\n\tGauge[\"PAYLOAD_SIZE\"] = \"w\";\n\tGauge[\"CORE_COUNT_GAUGE\"] = \"x\";\n\tGauge[\"CHILD_COUNT\"] = \"y\";\n\tGauge[\"UNKNOWN\"] = \"z\";\n\treturn Gauge;\n}({});\nvar GaugeTypes = /* @__PURE__ */ function(GaugeTypes) {\n\tGaugeTypes[\"GAUGE_TYPE\"] = \"_\";\n\tGaugeTypes[\"INSTRUMENT_GAUGE\"] = \"a\";\n\tGaugeTypes[\"INSTRUMENT_VELOCITY\"] = \"b\";\n\tGaugeTypes[\"INSTRUMENT_HISTOGRAM\"] = \"c\";\n\tGaugeTypes[\"INSTRUMENT_LOG\"] = \"d\";\n\tGaugeTypes[\"INSTRUMENT_TIMER\"] = \"e\";\n\tGaugeTypes[\"INSTRUMENT_OBJECT\"] = \"f\";\n\treturn GaugeTypes;\n}({});\n//#endregion\n//#region src/instrumentation/instruments/instrumentBase.ts\nvar InstrumentBaseOptions = class {\n\tfixedSize;\n\tpadLength;\n\tlabel;\n};\nvar InstrumentBaseTelemetry = class {};\nvar InstrumentBase = class {\n\t#label = \"\";\n\t#options = null;\n\t#data = {};\n\tconstructor(options = {}) {\n\t\tif (typeof options === \"string\" || options instanceof String) throw new Error(\"Instrument parameter must be an options object.\");\n\t\tthis.#options = options;\n\t\tif (options.label) this.#label = options.label;\n\t\telse this.#label = \"InstrumentGauge\";\n\t}\n\t[GaugeTypes.GAUGE_TYPE] = GaugeTypes.INSTRUMENT_OBJECT;\n\tval;\n\tWithLabel(label) {\n\t\tthis.label = label;\n\t\treturn this;\n\t}\n\tDefineCopyProperties(propertyNames) {\n\t\tpropertyNames.forEach((propertyName) => {\n\t\t\tObject.defineProperty(this, propertyName, {\n\t\t\t\tenumerable: true,\n\t\t\t\tget: () => this.#data[propertyName],\n\t\t\t\tset: (value) => {\n\t\t\t\t\tif (value === void 0) return;\n\t\t\t\t\tthis.#data[propertyName] = value;\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\t}\n\tGetNumber(val) {\n\t\tif (Number.isInteger(val)) return val;\n\t\telse return Math.round((val + Number.EPSILON) * 100) / 100;\n\t}\n\tget options() {\n\t\treturn this.#options;\n\t}\n\tset options(optionsValue) {\n\t\tthis.#options = optionsValue;\n\t}\n\tget label() {\n\t\treturn this.#label;\n\t}\n\tset label(labelValue) {\n\t\tthis.#label = labelValue;\n\t}\n\tStopTimer() {}\n\tProcessTelemetry(telemetry) {\n\t\tthrow new Error(`Must override in extended class: [ProcessTelemetry]: [${telemetry}].`);\n\t}\n};\n//#endregion\n//#region src/instrumentation/instruments/instrumentVelocity.ts\nvar InstrumentVelocityOptions = class extends InstrumentBaseOptions {\n\tinterval;\n\tvalStackMaxLength;\n\tmaxAverageValStack;\n\tmaxAverageIterations;\n\tfromJSON;\n\tinitValue;\n\tautoComputeVelocity;\n\tvelocityTimeDiff;\n\tvaTimeDiff;\n\tautoComputeVelocityTimeout;\n};\nvar InstrumentVelocityTelemetry = class extends InstrumentBaseTelemetry {\n\tval;\n\tInc;\n};\nvar InstrumentVelocity = class extends InstrumentBase {\n\t#val = 0;\n\t#interval = null;\n\t#timeoutComputeVelocity = null;\n\t#lastVelocity = 0;\n\t#delta = 0;\n\t#maxVelocity = 0;\n\t#timerInterval = 0;\n\t#copy = false;\n\t#velocity = 0;\n\t#velocityVal = 0;\n\t#valStack = [];\n\t#averageValStack = [];\n\t#maxAverageValStack = 0;\n\t#maxAverageIterations = 0;\n\t#valStackMaxLength = 0;\n\t#valStackAverage = 0;\n\t#timeStamp = 0;\n\t#maxTimeDiff = 0;\n\t#vaTimeDiff = 0;\n\t#velocityTimeDiff = 0;\n\t#autoComputeVelocity = false;\n\t#autoComputeVelocityTimeout = 0;\n\t#countDiff = 0;\n\t#timeDiff = 0;\n\t#deltaCountDiff = 0;\n\t#deltaTimeDif = 0;\n\t#minTimeForReporting = 0;\n\t#averageVelocity = [];\n\tconstructor(options = {}) {\n\t\tsuper(options);\n\t\tif (typeof options.label === \"undefined\") this.label = \"InstrumentVelocity\";\n\t\telse this.label = options.label;\n\t\tif (typeof options.interval === \"undefined\") this.#timerInterval = 1e3;\n\t\telse this.#timerInterval = options.interval;\n\t\tif (typeof options.valStackMaxLength === \"undefined\") this.#valStackMaxLength = 100;\n\t\telse this.#valStackMaxLength = options.valStackMaxLength;\n\t\tif (typeof options.fromJSON === \"undefined\") this.#copy = false;\n\t\telse this.#copy = true;\n\t\tif (typeof options.autoComputeVelocity === \"undefined\") this.#autoComputeVelocity = false;\n\t\telse this.#autoComputeVelocity = options.autoComputeVelocity;\n\t\tif (typeof options.maxAverageValStack === \"undefined\") this.#maxAverageValStack = 5;\n\t\telse this.#maxAverageValStack = options.maxAverageValStack;\n\t\tif (typeof options.maxAverageIterations === \"undefined\") this.#maxAverageIterations = 3;\n\t\telse this.#maxAverageIterations = options.maxAverageIterations;\n\t\tif (typeof options.velocityTimeDiff === \"undefined\") this.#velocityTimeDiff = 5e3;\n\t\telse this.#velocityTimeDiff = options.velocityTimeDiff;\n\t\tif (typeof options.vaTimeDiff === \"undefined\") this.#vaTimeDiff = 1e4;\n\t\telse this.#vaTimeDiff = options.vaTimeDiff;\n\t\tif (typeof options.autoComputeVelocityTimeout === \"undefined\") this.#autoComputeVelocityTimeout = 50;\n\t\telse this.#autoComputeVelocityTimeout = options.autoComputeVelocityTimeout;\n\t\tthis.#maxTimeDiff = this.#vaTimeDiff * 2;\n\t\tthis.#minTimeForReporting = this.#vaTimeDiff + 2e3;\n\t\tObject.defineProperty(this, GaugeTypes.GAUGE_TYPE, {\n\t\t\tenumerable: true,\n\t\t\tget: () => GaugeTypes.INSTRUMENT_VELOCITY\n\t\t});\n\t\tif (this.#copy) this.DefineCopyProperties([\n\t\t\t\"val\",\n\t\t\t\"maxVelocity\",\n\t\t\t\"delta\",\n\t\t\t\"velocity\",\n\t\t\t\"va\",\n\t\t\t\"timeStamp\",\n\t\t\t\"deltaTimeDif\",\n\t\t\t\"deltaCountDiff\",\n\t\t\t\"timeDiff\",\n\t\t\t\"countDiff\",\n\t\t\t\"averageVelocity\"\n\t\t]);\n\t\telse {\n\t\t\tObject.defineProperty(this, \"val\", {\n\t\t\t\tenumerable: true,\n\t\t\t\tget: () => this.#GetVal(),\n\t\t\t\tset: (value) => {\n\t\t\t\t\tthis.#SetVal(value);\n\t\t\t\t}\n\t\t\t});\n\t\t\tObject.defineProperty(this, \"maxVelocity\", {\n\t\t\t\tenumerable: true,\n\t\t\t\tget: () => this.#GetMaxVelocity()\n\t\t\t});\n\t\t\tObject.defineProperty(this, \"delta\", {\n\t\t\t\tenumerable: true,\n\t\t\t\tget: () => this.#GetDelta()\n\t\t\t});\n\t\t\tObject.defineProperty(this, \"velocity\", {\n\t\t\t\tenumerable: true,\n\t\t\t\tget: () => this.#GetVelocity()\n\t\t\t});\n\t\t\tObject.defineProperty(this, \"va\", {\n\t\t\t\tenumerable: true,\n\t\t\t\tget: () => this.#GetVelocityStackAverage()\n\t\t\t});\n\t\t\tObject.defineProperty(this, \"timeStamp\", {\n\t\t\t\tenumerable: true,\n\t\t\t\tget: () => this.#GetTimeStamp()\n\t\t\t});\n\t\t\tObject.defineProperty(this, \"countDiff\", {\n\t\t\t\tenumerable: true,\n\t\t\t\tget: () => this.#GetCountDiff()\n\t\t\t});\n\t\t\tObject.defineProperty(this, \"timeDiff\", {\n\t\t\t\tenumerable: true,\n\t\t\t\tget: () => this.#GetTimeDiff()\n\t\t\t});\n\t\t\tObject.defineProperty(this, \"deltaCountDiff\", {\n\t\t\t\tenumerable: true,\n\t\t\t\tget: () => this.#GetDeltaCountDiff()\n\t\t\t});\n\t\t\tObject.defineProperty(this, \"deltaTimeDif\", {\n\t\t\t\tenumerable: true,\n\t\t\t\tget: () => this.#GetDeltaTimeDif()\n\t\t\t});\n\t\t\tObject.defineProperty(this, \"averageVelocity\", {\n\t\t\t\tenumerable: true,\n\t\t\t\tget: () => this.#GetAverageVelocity()\n\t\t\t});\n\t\t\tif (this.#timerInterval > 0 && this.#autoComputeVelocity === false) this._StartTimer();\n\t\t}\n\t\tif (typeof options.initValue !== \"undefined\") this.val = options.initValue;\n\t\tif (typeof options.fromJSON !== \"undefined\") {\n\t\t\tconst result = _cloneDeep(options.fromJSON);\n\t\t\tthis.val = result.val;\n\t\t\tthis.velocity = result.velocity;\n\t\t\tthis.maxVelocity = result.maxVelocity;\n\t\t\tthis.delta = result.delta;\n\t\t\tthis.va = result.va;\n\t\t\tthis.timeStamp = result.timeStamp;\n\t\t\tthis.countDiff = result.countDiff;\n\t\t\tthis.timeDiff = result.timeDiff;\n\t\t\tthis.deltaCountDiff = result.deltaCountDiff;\n\t\t\tthis.deltaTimeDif = result.deltaTimeDif;\n\t\t\tthis.averageVelocity = _cloneDeep(result.averageVelocity);\n\t\t}\n\t}\n\tmaxVelocity = 0;\n\tdelta = 0;\n\tvelocity = 0;\n\tva = 0;\n\ttimeStamp = 0;\n\tcountDiff = 0;\n\ttimeDiff = 0;\n\tdeltaCountDiff = 0;\n\tdeltaTimeDif = 0;\n\taverageVelocity = [];\n\tval = 0;\n\tWithValStackMaxLength(valStackMaxLength) {\n\t\tthis.#valStackMaxLength = valStackMaxLength;\n\t\tthis.#valStack = [];\n\t\treturn this;\n\t}\n\t_StartTimer() {\n\t\tthis.#interval = setInterval(() => {\n\t\t\tthis.#ComputeVelocity();\n\t\t\tlet pushVal = this.#velocity;\n\t\t\tfor (let i = 0; i < this.#maxAverageIterations; i++) {\n\t\t\t\tif (!this.#averageValStack[i]) this.#averageValStack[i] = [];\n\t\t\t\tthis.#averageValStack[i].push(pushVal);\n\t\t\t\tif (this.#averageValStack[i].length > this.#maxAverageValStack) this.#averageValStack[i].shift();\n\t\t\t\tpushVal = this.#averageValStack[i].reduce((prev, current) => prev + current) / this.#averageValStack[i].length;\n\t\t\t\tthis.#averageVelocity[i] = pushVal;\n\t\t\t}\n\t\t}, this.#timerInterval);\n\t\tif (isNode) this.#interval.unref();\n\t}\n\t#ComputeVelocityByTimeDiff(checkTimeDiff, checkDeltaTimeDiff) {\n\t\tlet val = 0;\n\t\tlet deltaVal = 0;\n\t\tlet countDiff = 0;\n\t\tlet timeDiff = 0;\n\t\tlet deltaCountDiff = 0;\n\t\tlet deltaTimeDiff = 0;\n\t\tif (this.#valStack.length > 1 && this.#valStack[this.#valStack.length - 1].timeStamp - this.#valStack[0].timeStamp > this.#minTimeForReporting) {\n\t\t\tconst dp = this.#valStack[this.#valStack.length - 1];\n\t\t\tlet timeDiffPos = -1;\n\t\t\tlet deltaDiffPos = -1;\n\t\t\tfor (let i = this.#valStack.length - 2; i > -1; i--) {\n\t\t\t\tif (timeDiffPos === -1 && this.#timeStamp - this.#valStack[i].timeStamp >= checkTimeDiff) {\n\t\t\t\t\ttimeDiffPos = i;\n\t\t\t\t\tif (checkDeltaTimeDiff === 0) break;\n\t\t\t\t}\n\t\t\t\tif (deltaDiffPos === -1 && this.#timeStamp - this.#valStack[i].timeStamp >= checkDeltaTimeDiff) deltaDiffPos = i;\n\t\t\t\tif (timeDiffPos !== -1 && deltaDiffPos !== -1) break;\n\t\t\t}\n\t\t\tif (timeDiffPos > -1) {\n\t\t\t\tcountDiff = dp.count - this.#valStack[timeDiffPos].count;\n\t\t\t\tif (countDiff > 0) {\n\t\t\t\t\ttimeDiff = dp.timeStamp - this.#valStack[timeDiffPos].timeStamp;\n\t\t\t\t\tif (timeDiff > 0) val = 1e3 / timeDiff * countDiff;\n\t\t\t\t\telse val = 0;\n\t\t\t\t} else val = 0;\n\t\t\t} else val = 0;\n\t\t\tif (deltaDiffPos > -1) {\n\t\t\t\tdeltaCountDiff = this.#valStack[timeDiffPos].count - this.#valStack[deltaDiffPos].count;\n\t\t\t\tif (deltaCountDiff > 0) {\n\t\t\t\t\tdeltaTimeDiff = this.#valStack[timeDiffPos].timeStamp - this.#valStack[deltaDiffPos].timeStamp;\n\t\t\t\t\tif (deltaTimeDiff > 0) deltaVal = 1e3 / deltaTimeDiff * deltaTimeDiff;\n\t\t\t\t\telse deltaVal = 0;\n\t\t\t\t} else deltaVal = 0;\n\t\t\t} else deltaVal = 0;\n\t\t}\n\t\treturn {\n\t\t\tval,\n\t\t\tcountDiff,\n\t\t\ttimeDiff,\n\t\t\tdeltaVal,\n\t\t\tdeltaCountDiff,\n\t\t\tdeltaTimeDiff\n\t\t};\n\t}\n\t#ComputeVelocity() {\n\t\tconst dp = {\n\t\t\ttimeStamp: performance.now(),\n\t\t\tcount: this.#velocityVal\n\t\t};\n\t\tthis.#valStack.push(dp);\n\t\tthis.#timeStamp = dp.timeStamp;\n\t\twhile (this.#valStack.length > 0 && this.#timeStamp - this.#valStack[0].timeStamp > this.#maxTimeDiff) this.#valStack.shift();\n\t\tthis.#valStackAverage = this.#ComputeVelocityByTimeDiff(this.#vaTimeDiff, 0).val;\n\t\tconst velocityDataPoint = this.#ComputeVelocityByTimeDiff(this.#velocityTimeDiff, this.#velocityTimeDiff * 2);\n\t\tthis.#velocity = velocityDataPoint.val;\n\t\tthis.#delta = velocityDataPoint.val - velocityDataPoint.deltaVal;\n\t\tthis.#countDiff = velocityDataPoint.countDiff;\n\t\tthis.#timeDiff = velocityDataPoint.timeDiff;\n\t\tthis.#deltaCountDiff = velocityDataPoint.deltaCountDiff;\n\t\tthis.#deltaTimeDif = velocityDataPoint.deltaTimeDiff;\n\t\tthis.#lastVelocity = this.#velocity;\n\t\tif (this.#velocity > this.#maxVelocity) this.#maxVelocity = this.#velocity;\n\t}\n\t#SetupAutoComputeVelocity() {\n\t\tif (this.#timeoutComputeVelocity) clearTimeout(this.#timeoutComputeVelocity);\n\t\tthis.#timeoutComputeVelocity = setTimeout(() => {\n\t\t\tthis.#ComputeVelocity();\n\t\t}, this.#autoComputeVelocityTimeout);\n\t}\n\t#GetVelocityStackAverage() {\n\t\treturn this.GetNumber(this.#valStackAverage);\n\t}\n\tInc(incVal = 1) {\n\t\tthis.#velocityVal += incVal;\n\t\tif (this.#autoComputeVelocity) this.#ComputeVelocity();\n\t\telse this.#SetupAutoComputeVelocity();\n\t}\n\t#GetVal() {\n\t\treturn this.GetNumber(this.#velocityVal);\n\t}\n\t#SetVal(updatedValue) {\n\t\tthis.#velocityVal = updatedValue;\n\t\tif (this.#autoComputeVelocity) this.#ComputeVelocity();\n\t\telse this.#SetupAutoComputeVelocity();\n\t}\n\t#GetVelocity() {\n\t\treturn this.GetNumber(this.#velocity);\n\t}\n\t#GetMaxVelocity() {\n\t\treturn this.GetNumber(this.#maxVelocity);\n\t}\n\t#GetDelta() {\n\t\treturn this.GetNumber(this.#delta);\n\t}\n\t#GetTimeStamp() {\n\t\treturn this.GetNumber(this.#timeStamp);\n\t}\n\t#GetCountDiff() {\n\t\treturn this.GetNumber(this.#countDiff);\n\t}\n\t#GetTimeDiff() {\n\t\treturn this.GetNumber(this.#timeDiff);\n\t}\n\t#GetDeltaCountDiff() {\n\t\treturn this.GetNumber(this.#deltaCountDiff);\n\t}\n\t#GetDeltaTimeDif() {\n\t\treturn this.GetNumber(this.#deltaTimeDif);\n\t}\n\t#GetAverageVelocity() {\n\t\treturn this.#averageVelocity;\n\t}\n\tStopTimer() {\n\t\tif (this.#interval !== null) {\n\t\t\tclearTimeout(this.#interval);\n\t\t\tthis.#interval = null;\n\t\t}\n\t}\n\tProcessTelemetry(telemetry) {\n\t\tif (telemetry.Inc !== void 0) this.Inc(telemetry.Inc);\n\t\tif (telemetry.val !== void 0) this.val = telemetry.val;\n\t}\n};\n//#endregion\n//#region src/instrumentation/instruments/instrumentHistogram.ts\nvar HistogramDataElementPos = /* @__PURE__ */ function(HistogramDataElementPos) {\n\tHistogramDataElementPos[HistogramDataElementPos[\"val\"] = 0] = \"val\";\n\tHistogramDataElementPos[HistogramDataElementPos[\"label\"] = 1] = \"label\";\n\tHistogramDataElementPos[HistogramDataElementPos[\"breakPoint\"] = 2] = \"breakPoint\";\n\treturn HistogramDataElementPos;\n}({});\nvar InstrumentHistogramOptions = class extends InstrumentBaseOptions {\n\thistogramData;\n\tinitValue;\n\tfromJSON;\n};\nvar InstrumentHistogramTelemetry = class extends InstrumentBaseTelemetry {\n\tval;\n};\nvar InstrumentHistogram = class extends InstrumentBase {\n\t#histogramData = [];\n\t#val = 0;\n\t#copy = false;\n\tconstructor(options = {}) {\n\t\tsuper(options);\n\t\tif (typeof options.label === \"undefined\") this.label = \"InstrumentHistogram\";\n\t\telse this.label = options.label;\n\t\tlet histogramData = null;\n\t\tif (typeof options.histogramData === \"undefined\") histogramData = null;\n\t\telse histogramData = options.histogramData;\n\t\tif (typeof options.fromJSON === \"undefined\") this.#copy = false;\n\t\telse this.#copy = true;\n\t\tif (histogramData === null) this.#histogramData = [\n\t\t\t[\n\t\t\t\t0,\n\t\t\t\t\"10\",\n\t\t\t\t10\n\t\t\t],\n\t\t\t[\n\t\t\t\t0,\n\t\t\t\t\"20\",\n\t\t\t\t20\n\t\t\t],\n\t\t\t[\n\t\t\t\t0,\n\t\t\t\t\"50\",\n\t\t\t\t50\n\t\t\t],\n\t\t\t[\n\t\t\t\t0,\n\t\t\t\t\"100\",\n\t\t\t\t100\n\t\t\t],\n\t\t\t[\n\t\t\t\t0,\n\t\t\t\t\"1000\",\n\t\t\t\t1e3\n\t\t\t],\n\t\t\t[\n\t\t\t\t0,\n\t\t\t\t\"5000\",\n\t\t\t\t5e3\n\t\t\t],\n\t\t\t[\n\t\t\t\t0,\n\t\t\t\t\"EE\",\n\t\t\t\t0\n\t\t\t]\n\t\t];\n\t\telse if (Array.isArray(histogramData)) {\n\t\t\tthis.#histogramData = [];\n\t\t\tfor (let i = 0; i < histogramData.length; i++) this.#histogramData.push([\n\t\t\t\t0,\n\t\t\t\t\"\" + histogramData[i],\n\t\t\t\tparseFloat(histogramData[i].toString())\n\t\t\t]);\n\t\t\tthis.#histogramData.push([\n\t\t\t\t0,\n\t\t\t\t\"EE\",\n\t\t\t\t0\n\t\t\t]);\n\t\t} else throw new Error(`Passed [${histogramData}] must be an array.`);\n\t\tObject.defineProperty(this, GaugeTypes.GAUGE_TYPE, {\n\t\t\tenumerable: true,\n\t\t\tget: () => GaugeTypes.INSTRUMENT_HISTOGRAM\n\t\t});\n\t\tif (this.#copy) this.DefineCopyProperties([\"val\", \"hist\"]);\n\t\telse {\n\t\t\tObject.defineProperty(this, \"val\", {\n\t\t\t\tenumerable: true,\n\t\t\t\tget: () => this.#GetVal(),\n\t\t\t\tset: (value) => {\n\t\t\t\t\tthis.#SetVal(value);\n\t\t\t\t}\n\t\t\t});\n\t\t\tObject.defineProperty(this, \"hist\", {\n\t\t\t\tenumerable: true,\n\t\t\t\tget: () => this.#GetHistogramData(),\n\t\t\t\tset: (value) => {\n\t\t\t\t\tthis.#SetHistogramData(value);\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t\tif (typeof options.initValue !== \"undefined\") this.#val = options.initValue;\n\t\tif (typeof options.fromJSON !== \"undefined\") {\n\t\t\tconst result = _cloneDeep(options.fromJSON);\n\t\t\tthis.#val = result.val;\n\t\t\tthis.hist = result.hist;\n\t\t}\n\t}\n\thist = [];\n\tval = 0;\n\tWithInitVal(initVal) {\n\t\tthis.#val = initVal;\n\t\treturn this;\n\t}\n\tResetHistogramData() {\n\t\tfor (let i = 0; i < this.hist.length; i++) this.hist[i][0] = 0;\n\t}\n\tAddObservation(updateValue) {\n\t\tif (this.#copy) throw new Error(\"Cannot add observations from the copy version of this class.\");\n\t\tlet i = 0;\n\t\tfor (; i < this.#histogramData.length - 1; i++) if (updateValue <= this.#histogramData[i][HistogramDataElementPos.breakPoint]) {\n\t\t\tthis.#histogramData[i][HistogramDataElementPos.val]++;\n\t\t\treturn;\n\t\t}\n\t\tthis.#histogramData[i][HistogramDataElementPos.val]++;\n\t}\n\t#GetVal() {\n\t\treturn this.GetNumber(this.#val);\n\t}\n\t#SetVal(value) {\n\t\tthis.#val = value;\n\t\tthis.AddObservation(value);\n\t}\n\tget formattedHistogramData() {\n\t\tlet retVal = \"\";\n\t\tlet sep = \"\";\n\t\tfor (let i = 0; i < this.hist.length; i++) {\n\t\t\tretVal += sep + \"[\" + (this.hist[i][HistogramDataElementPos.val] + \"/\" + this.hist[i][HistogramDataElementPos.label]).padStart(10, \" \") + \"]\";\n\t\t\tsep = \" \";\n\t\t}\n\t\treturn retVal;\n\t}\n\t#GetHistogramData() {\n\t\treturn this.#histogramData;\n\t}\n\t#SetHistogramData(value) {\n\t\tthis.#histogramData = value;\n\t}\n\tstatic AddHistogramDataEx(histoA, histoB) {\n\t\tif (histoA === null) return _cloneDeep(histoB);\n\t\tconst result = _cloneDeep(histoA);\n\t\tconst histogramAData = result.hist;\n\t\tconst histogramBData = histoB.hist;\n\t\tif (histogramAData.length !== histogramBData.length) throw new Error(\"Invalid HistogramData. HistogramData bucket lengths must be the same.\");\n\t\tfor (let i = 0; i < histogramAData.length; i++) {\n\t\t\tif (histogramAData[i][HistogramDataElementPos.breakPoint] !== histogramBData[i][HistogramDataElementPos.breakPoint]) throw new Error(`Invalid HistogramData. HistogramData bucket break-point at index [${i}] must be the same.`);\n\t\t\tif (histogramAData[i][HistogramDataElementPos.label] !== histogramBData[i][HistogramDataElementPos.label]) throw new Error(`Invalid HistogramData. HistogramData bucket label at index [${i}] must be the same.`);\n\t\t\thistogramAData[i][HistogramDataElementPos.val] += histogramBData[i][HistogramDataElementPos.val];\n\t\t}\n\t\treturn result;\n\t}\n\t/**\n\t* Adds a value object (from GetFormatted()) to this instance.\n\t* @param {*} value \n\t*/\n\tAddHistogramData(histogramData) {\n\t\tif (histogramData === null) return;\n\t\tif (this.hist.length !== histogramData.hist.length) throw new Error(\"Invalid HistogramData. HistogramData bucket lengths must be the same.\");\n\t\tfor (let i = 0; i < histogramData.hist.length; i++) {\n\t\t\tif (this.hist[i][HistogramDataElementPos.breakPoint] !== histogramData.hist[i][HistogramDataElementPos.breakPoint]) throw new Error(`Invalid HistogramData. HistogramData bucket break-point at index [${i}] must be the same.`);\n\t\t\tif (this.hist[i][HistogramDataElementPos.label] !== histogramData.hist[i][HistogramDataElementPos.label]) throw new Error(`Invalid HistogramData. HistogramData bucket label at index [${i}] must be the same.`);\n\t\t\tthis.hist[i][HistogramDataElementPos.val] += histogramData.hist[i][HistogramDataElementPos.val];\n\t\t}\n\t}\n\tProcessTelemetry(telemetry) {\n\t\tif (telemetry.val !== void 0) this.val = telemetry.val;\n\t}\n};\n//#endregion\n//#region src/instrumentation/instruments/instrumentLog.ts\nvar InstrumentLogOptions = class extends InstrumentBaseOptions {\n\tmaxSize;\n\tuseLatestMessages;\n\tconsoleLogging;\n\tinstrumentLogging;\n\twinstonLogging;\n\tfromJSON;\n\tinitValue;\n\tlogger;\n};\nvar InstrumentLogTelemetry = class extends InstrumentBaseTelemetry {\n\tAppend;\n\tLogMessage;\n\tval;\n\tResetLog;\n};\nvar InstrumentLog = class extends InstrumentBase {\n\t#messages = [];\n\t#readPos = 0;\n\t#maxSize = 200;\n\t#copy = false;\n\t#useLatestMessages = false;\n\t#consoleLogging = false;\n\t#instrumentLogging = true;\n\t#winstonLogging = false;\n\t#stsLogger;\n\tconstructor(options = {}) {\n\t\tsuper(options);\n\t\tif (typeof options.label === \"undefined\") this.label = \"InstrumentLog\";\n\t\telse this.label = options.label;\n\t\tif (typeof options.maxSize === \"undefined\") this.#maxSize = 200;\n\t\telse this.#maxSize = options.maxSize;\n\t\tif (typeof options.fromJSON === \"undefined\") this.#copy = false;\n\t\telse this.#copy = true;\n\t\tif (typeof options.useLatestMessages === \"undefined\") this.#useLatestMessages = false;\n\t\telse this.#useLatestMessages = options.useLatestMessages;\n\t\tif (typeof options.consoleLogging === \"undefined\") this.#consoleLogging = false;\n\t\telse this.#consoleLogging = options.consoleLogging;\n\t\tif (typeof options.instrumentLogging === \"undefined\") this.#instrumentLogging = true;\n\t\telse this.#instrumentLogging = options.instrumentLogging;\n\t\tif (typeof options.winstonLogging === \"undefined\") this.#winstonLogging = false;\n\t\telse this.#winstonLogging = options.winstonLogging;\n\t\tObject.defineProperty(this, GaugeTypes.GAUGE_TYPE, {\n\t\t\tenumerable: true,\n\t\t\tget: () => GaugeTypes.INSTRUMENT_LOG\n\t\t});\n\t\tif (this.#copy) this.DefineCopyProperties([\"val\"]);\n\t\telse Object.defineProperty(this, \"val\", {\n\t\t\tenumerable: true,\n\t\t\tget: () => _cloneDeep(this.#GetVal()),\n\t\t\tset: (value) => {\n\t\t\t\tthis.#SetVal(value);\n\t\t\t}\n\t\t});\n\t\tif (typeof options.initValue !== \"undefined\") this.val = options.initValue;\n\t\tif (typeof options.fromJSON !== \"undefined\") this.val = _cloneDeep(options.fromJSON).val;\n\t}\n\tval = [];\n\tWithMaxSize(maxSize) {\n\t\tthis.#maxSize = maxSize;\n\t\treturn this;\n\t}\n\tWithUseLatestMessages(useLatestMessages) {\n\t\tthis.#useLatestMessages = useLatestMessages;\n\t\treturn this;\n\t}\n\tWithConsoleLogging(consoleLogging) {\n\t\tthis.#consoleLogging = consoleLogging;\n\t\treturn this;\n\t}\n\tWithInstrumentLogging(instrumentLogging) {\n\t\tthis.#instrumentLogging = instrumentLogging;\n\t\treturn this;\n\t}\n\tget MaxSize() {\n\t\treturn this.#maxSize;\n\t}\n\tset MaxSize(maxSize) {\n\t\tthis.#maxSize = maxSize;\n\t}\n\t#DumpToConsole() {\n\t\tconst logReport = this.GetMessagesSinceLastRead();\n\t\tfor (let i = 0; i < logReport.length; i++) console.log(logReport[i]);\n\t}\n\tget consoleLogging() {\n\t\treturn this.#consoleLogging;\n\t}\n\tset consoleLogging(value) {\n\t\tthis.#consoleLogging = value;\n\t\tif (value === true) this.#DumpToConsole();\n\t}\n\tget instrumentLogging() {\n\t\treturn this.#instrumentLogging;\n\t}\n\tset instrumentLogging(value) {\n\t\tthis.#instrumentLogging = value;\n\t}\n\tAppend(messageArray) {\n\t\tfor (let i = 0; i < messageArray.length; i++) this.LogMessage(messageArray[i]);\n\t}\n\terror(message) {\n\t\tif (this.#winstonLogging && this.#stsLogger) this.#stsLogger.error(message);\n\t}\n\twarn(message) {\n\t\tif (this.#winstonLogging && this.#stsLogger) this.#stsLogger.warn(message);\n\t}\n\tinfo(message) {\n\t\tif (this.#winstonLogging && this.#stsLogger) this.#stsLogger.info(message);\n\t}\n\thttp(message) {\n\t\tif (this.#winstonLogging && this.#stsLogger) this.#stsLogger.http(message);\n\t}\n\tverbose(message) {\n\t\tif (this.#winstonLogging && this.#stsLogger) this.#stsLogger.verbose(message);\n\t}\n\tdebug(message) {\n\t\tif (this.#winstonLogging && this.#stsLogger) this.#stsLogger.debug(message);\n\t}\n\tsilly(message) {\n\t\tif (this.#winstonLogging && this.#stsLogger) this.#stsLogger.silly(message);\n\t}\n\tLogMessage(message) {\n\t\tif (this.#copy) throw new Error(\"Cannot add log messages from the copy version of this class.\");\n\t\tif (this.#consoleLogging === true) console.log(message);\n\t\tif (this.#instrumentLogging === false) return;\n\t\tthis.#messages.push(message);\n\t\tif (this.#messages.length > this.#maxSize) {\n\t\t\tthis.#messages.shift();\n\t\t\tthis.#readPos = this.#readPos > 0 ? this.#readPos - 1 : 0;\n\t\t}\n\t}\n\t#GetVal() {\n\t\tif (this.#useLatestMessages) return this.GetMessagesSinceLastRead();\n\t\telse return this.#messages;\n\t}\n\t#SetVal(updatedValue) {\n\t\tthis.#messages = updatedValue;\n\t\tthis.#readPos = 0;\n\t}\n\tGetMessagesNoUpdate() {\n\t\treturn this.#messages.slice(this.#readPos);\n\t}\n\tGetMessagesSinceLastRead() {\n\t\tconst retVal = this.#messages.slice(this.#readPos);\n\t\tthis.#readPos = this.#messages.length;\n\t\treturn retVal;\n\t}\n\tResetLog() {\n\t\tthis.#messages = [];\n\t\tthis.#readPos = 0;\n\t}\n\tProcessTelemetry(telemetry) {\n\t\tif (telemetry.val !== void 0) this.val = telemetry.val;\n\t\tif (telemetry.Append !== void 0) this.Append(telemetry.Append);\n\t\tif (telemetry.LogMessage !== void 0) this.LogMessage(telemetry.LogMessage);\n\t\tif (telemetry.ResetLog !== void 0 && telemetry.ResetLog === true) this.ResetLog();\n\t}\n};\n//#endregion\n//#region src/instrumentation/instruments/instrumentTimerGauge.ts\nvar InstrumentTimerOptions = class extends InstrumentBaseOptions {\n\tfromJSON;\n\tinitValue;\n};\nvar InstrumentTimerTelemetry = class extends InstrumentBaseTelemetry {\n\tval;\n\tPause;\n\tResume;\n\tReset;\n};\nvar InstrumentTimerGauge = class extends InstrumentBase {\n\t#start = 0;\n\t#copy = false;\n\t#pauseVal = 0;\n\tconstructor(options = {}) {\n\t\tsuper(options);\n\t\tif (typeof options.label === \"undefined\") this.label = \"InstrumentTimerGauge\";\n\t\telse this.label = options.label;\n\t\tif (typeof options.fromJSON === \"undefined\") this.#copy = false;\n\t\telse this.#copy = true;\n\t\tObject.defineProperty(this, GaugeTypes.GAUGE_TYPE, {\n\t\t\tenumerable: true,\n\t\t\tget: () => GaugeTypes.INSTRUMENT_TIMER\n\t\t});\n\t\tif (this.#copy) this.DefineCopyProperties([\"val\"]);\n\t\telse Object.defineProperty(this, \"val\", {\n\t\t\tenumerable: true,\n\t\t\tget: () => this.#GetVal(),\n\t\t\tset: (value) => {\n\t\t\t\tthis.#SetVal(value);\n\t\t\t}\n\t\t});\n\t\tif (typeof options.initValue !== \"undefined\") this.val = options.initValue;\n\t\tif (typeof options.fromJSON !== \"undefined\") this.val = _cloneDeep(options.fromJSON).val;\n\t\tthis.Reset();\n\t}\n\tval = 0;\n\tPause() {\n\t\tthis.#pauseVal = this.val;\n\t}\n\tResume() {\n\t\tthis.#pauseVal = 0;\n\t}\n\tReset() {\n\t\tthis.#start = performance.now();\n\t}\n\t#GetVal() {\n\t\tif (this.#pauseVal !== 0) return this.GetNumber(this.#pauseVal);\n\t\treturn this.GetNumber(performance.now() - this.#start);\n\t}\n\t#SetVal(updatedValue) {\n\t\tthis.#start = performance.now() - updatedValue;\n\t}\n\tget start() {\n\t\treturn this.#start;\n\t}\n\tProcessTelemetry(telemetry) {\n\t\tif (telemetry.val !== void 0) this.val = telemetry.val;\n\t\tif (telemetry.Pause !== void 0 && telemetry.Pause === true) this.Pause();\n\t\tif (telemetry.Resume !== void 0 && telemetry.Resume === true) this.Resume();\n\t\tif (telemetry.Reset !== void 0 && telemetry.Reset === true) this.Reset();\n\t}\n};\n//#endregion\n//#region node_modules/timsort/build/timsort.js\nvar require_timsort$1 = /* @__PURE__ */ __commonJSMin(((exports) => {\n\t/****\n\t* The MIT License\n\t*\n\t* Copyright (c) 2015 Marco Ziccardi\n\t*\n\t* Permission is hereby granted, free of charge, to any person obtaining a copy\n\t* of this software and associated documentation files (the \"Software\"), to deal\n\t* in the Software without restriction, including without limitation the rights\n\t* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n\t* copies of the Software, and to permit persons to whom the Software is\n\t* furnished to do so, subject to the following conditions:\n\t*\n\t* The above copyright notice and this permission notice shall be included in\n\t* all copies or substantial portions of the Software.\n\t*\n\t* THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n\t* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n\t* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n\t* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n\t* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n\t* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n\t* THE SOFTWARE.\n\t*\n\t****/\n\t(function(global, factory) {\n\t\tif (typeof define === \"function\" && define.amd) define(\"timsort\", [\"exports\"], factory);\n\t\telse if (typeof exports !== \"undefined\") factory(exports);\n\t\telse {\n\t\t\tvar mod = { exports: {} };\n\t\t\tfactory(mod.exports);\n\t\t\tglobal.timsort = mod.exports;\n\t\t}\n\t})(exports, function(exports$1) {\n\t\t\"use strict\";\n\t\texports$1.__esModule = true;\n\t\texports$1.sort = sort;\n\t\tfunction _classCallCheck(instance, Constructor) {\n\t\t\tif (!(instance instanceof Constructor)) throw new TypeError(\"Cannot call a class as a function\");\n\t\t}\n\t\tvar DEFAULT_MIN_MERGE = 32;\n\t\tvar DEFAULT_MIN_GALLOPING = 7;\n\t\tvar DEFAULT_TMP_STORAGE_LENGTH = 256;\n\t\tvar POWERS_OF_TEN = [\n\t\t\t1,\n\t\t\t10,\n\t\t\t100,\n\t\t\t1e3,\n\t\t\t1e4,\n\t\t\t1e5,\n\t\t\t1e6,\n\t\t\t1e7,\n\t\t\t1e8,\n\t\t\t1e9\n\t\t];\n\t\tfunction log10(x) {\n\t\t\tif (x < 1e5) {\n\t\t\t\tif (x < 100) return x < 10 ? 0 : 1;\n\t\t\t\tif (x < 1e4) return x < 1e3 ? 2 : 3;\n\t\t\t\treturn 4;\n\t\t\t}\n\t\t\tif (x < 1e7) return x < 1e6 ? 5 : 6;\n\t\t\tif (x < 1e9) return x < 1e8 ? 7 : 8;\n\t\t\treturn 9;\n\t\t}\n\t\tfunction alphabeticalCompare(a, b) {\n\t\t\tif (a === b) return 0;\n\t\t\tif (~~a === a && ~~b === b) {\n\t\t\t\tif (a === 0 || b === 0) return a < b ? -1 : 1;\n\t\t\t\tif (a < 0 || b < 0) {\n\t\t\t\t\tif (b >= 0) return -1;\n\t\t\t\t\tif (a >= 0) return 1;\n\t\t\t\t\ta = -a;\n\t\t\t\t\tb = -b;\n\t\t\t\t}\n\t\t\t\tvar al = log10(a);\n\t\t\t\tvar bl = log10(b);\n\t\t\t\tvar t = 0;\n\t\t\t\tif (al < bl) {\n\t\t\t\t\ta *= POWERS_OF_TEN[bl - al - 1];\n\t\t\t\t\tb /= 10;\n\t\t\t\t\tt = -1;\n\t\t\t\t} else if (al > bl) {\n\t\t\t\t\tb *= POWERS_OF_TEN[al - bl - 1];\n\t\t\t\t\ta /= 10;\n\t\t\t\t\tt = 1;\n\t\t\t\t}\n\t\t\t\tif (a === b) return t;\n\t\t\t\treturn a < b ? -1 : 1;\n\t\t\t}\n\t\t\tvar aStr = String(a);\n\t\t\tvar bStr = String(b);\n\t\t\tif (aStr === bStr) return 0;\n\t\t\treturn aStr < bStr ? -1 : 1;\n\t\t}\n\t\tfunction minRunLength(n) {\n\t\t\tvar r = 0;\n\t\t\twhile (n >= DEFAULT_MIN_MERGE) {\n\t\t\t\tr |= n & 1;\n\t\t\t\tn >>= 1;\n\t\t\t}\n\t\t\treturn n + r;\n\t\t}\n\t\tfunction makeAscendingRun(array, lo, hi, compare) {\n\t\t\tvar runHi = lo + 1;\n\t\t\tif (runHi === hi) return 1;\n\t\t\tif (compare(array[runHi++], array[lo]) < 0) {\n\t\t\t\twhile (runHi < hi && compare(array[runHi], array[runHi - 1]) < 0) runHi++;\n\t\t\t\treverseRun(array, lo, runHi);\n\t\t\t} else while (runHi < hi && compare(array[runHi], array[runHi - 1]) >= 0) runHi++;\n\t\t\treturn runHi - lo;\n\t\t}\n\t\tfunction reverseRun(array, lo, hi) {\n\t\t\thi--;\n\t\t\twhile (lo < hi) {\n\t\t\t\tvar t = array[lo];\n\t\t\t\tarray[lo++] = array[hi];\n\t\t\t\tarray[hi--] = t;\n\t\t\t}\n\t\t}\n\t\tfunction binaryInsertionSort(array, lo, hi, start, compare) {\n\t\t\tif (start === lo) start++;\n\t\t\tfor (; start < hi; start++) {\n\t\t\t\tvar pivot = array[start];\n\t\t\t\tvar left = lo;\n\t\t\t\tvar right = start;\n\t\t\t\twhile (left < right) {\n\t\t\t\t\tvar mid = left + right >>> 1;\n\t\t\t\t\tif (compare(pivot, array[mid]) < 0) right = mid;\n\t\t\t\t\telse left = mid + 1;\n\t\t\t\t}\n\t\t\t\tvar n = start - left;\n\t\t\t\tswitch (n) {\n\t\t\t\t\tcase 3: array[left + 3] = array[left + 2];\n\t\t\t\t\tcase 2: array[left + 2] = array[left + 1];\n\t\t\t\t\tcase 1:\n\t\t\t\t\t\tarray[left + 1] = array[left];\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault: while (n > 0) {\n\t\t\t\t\t\tarray[left + n] = array[left + n - 1];\n\t\t\t\t\t\tn--;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tarray[left] = pivot;\n\t\t\t}\n\t\t}\n\t\tfunction gallopLeft(value, array, start, length, hint, compare) {\n\t\t\tvar lastOffset = 0;\n\t\t\tvar maxOffset = 0;\n\t\t\tvar offset = 1;\n\t\t\tif (compare(value, array[start + hint]) > 0) {\n\t\t\t\tmaxOffset = length - hint;\n\t\t\t\twhile (offset < maxOffset && compare(value, array[start + hint + offset]) > 0) {\n\t\t\t\t\tlastOffset = offset;\n\t\t\t\t\toffset = (offset << 1) + 1;\n\t\t\t\t\tif (offset <= 0) offset = maxOffset;\n\t\t\t\t}\n\t\t\t\tif (offset > maxOffset) offset = maxOffset;\n\t\t\t\tlastOffset += hint;\n\t\t\t\toffset += hint;\n\t\t\t} else {\n\t\t\t\tmaxOffset = hint + 1;\n\t\t\t\twhile (offset < maxOffset && compare(value, array[start + hint - offset]) <= 0) {\n\t\t\t\t\tlastOffset = offset;\n\t\t\t\t\toffset = (offset << 1) + 1;\n\t\t\t\t\tif (offset <= 0) offset = maxOffset;\n\t\t\t\t}\n\t\t\t\tif (offset > maxOffset) offset = maxOffset;\n\t\t\t\tvar tmp = lastOffset;\n\t\t\t\tlastOffset = hint - offset;\n\t\t\t\toffset = hint - tmp;\n\t\t\t}\n\t\t\tlastOffset++;\n\t\t\twhile (lastOffset < offset) {\n\t\t\t\tvar m = lastOffset + (offset - lastOffset >>> 1);\n\t\t\t\tif (compare(value, array[start + m]) > 0) lastOffset = m + 1;\n\t\t\t\telse offset = m;\n\t\t\t}\n\t\t\treturn offset;\n\t\t}\n\t\tfunction gallopRight(value, array, start, length, hint, compare) {\n\t\t\tvar lastOffset = 0;\n\t\t\tvar maxOffset = 0;\n\t\t\tvar offset = 1;\n\t\t\tif (compare(value, array[start + hint]) < 0) {\n\t\t\t\tmaxOffset = hint + 1;\n\t\t\t\twhile (offset < maxOffset && compare(value, array[start + hint - offset]) < 0) {\n\t\t\t\t\tlastOffset = offset;\n\t\t\t\t\toffset = (offset << 1) + 1;\n\t\t\t\t\tif (offset <= 0) offset = maxOffset;\n\t\t\t\t}\n\t\t\t\tif (offset > maxOffset) offset = maxOffset;\n\t\t\t\tvar tmp = lastOffset;\n\t\t\t\tlastOffset = hint - offset;\n\t\t\t\toffset = hint - tmp;\n\t\t\t} else {\n\t\t\t\tmaxOffset = length - hint;\n\t\t\t\twhile (offset < maxOffset && compare(value, array[start + hint + offset]) >= 0) {\n\t\t\t\t\tlastOffset = offset;\n\t\t\t\t\toffset = (offset << 1) + 1;\n\t\t\t\t\tif (offset <= 0) offset = maxOffset;\n\t\t\t\t}\n\t\t\t\tif (offset > maxOffset) offset = maxOffset;\n\t\t\t\tlastOffset += hint;\n\t\t\t\toffset += hint;\n\t\t\t}\n\t\t\tlastOffset++;\n\t\t\twhile (lastOffset < offset) {\n\t\t\t\tvar m = lastOffset + (offset - lastOffset >>> 1);\n\t\t\t\tif (compare(value, array[start + m]) < 0) offset = m;\n\t\t\t\telse lastOffset = m + 1;\n\t\t\t}\n\t\t\treturn offset;\n\t\t}\n\t\tvar TimSort = (function() {\n\t\t\tfunction TimSort(array, compare) {\n\t\t\t\t_classCallCheck(this, TimSort);\n\t\t\t\tthis.array = null;\n\t\t\t\tthis.compare = null;\n\t\t\t\tthis.minGallop = DEFAULT_MIN_GALLOPING;\n\t\t\t\tthis.length = 0;\n\t\t\t\tthis.tmpStorageLength = DEFAULT_TMP_STORAGE_LENGTH;\n\t\t\t\tthis.stackLength = 0;\n\t\t\t\tthis.runStart = null;\n\t\t\t\tthis.runLength = null;\n\t\t\t\tthis.stackSize = 0;\n\t\t\t\tthis.array = array;\n\t\t\t\tthis.compare = compare;\n\t\t\t\tthis.length = array.length;\n\t\t\t\tif (this.length < 2 * DEFAULT_TMP_STORAGE_LENGTH) this.tmpStorageLength = this.length >>> 1;\n\t\t\t\tthis.tmp = new Array(this.tmpStorageLength);\n\t\t\t\tthis.stackLength = this.length < 120 ? 5 : this.length < 1542 ? 10 : this.length < 119151 ? 19 : 40;\n\t\t\t\tthis.runStart = new Array(this.stackLength);\n\t\t\t\tthis.runLength = new Array(this.stackLength);\n\t\t\t}\n\t\t\tTimSort.prototype.pushRun = function pushRun(runStart, runLength) {\n\t\t\t\tthis.runStart[this.stackSize] = runStart;\n\t\t\t\tthis.runLength[this.stackSize] = runLength;\n\t\t\t\tthis.stackSize += 1;\n\t\t\t};\n\t\t\tTimSort.prototype.mergeRuns = function mergeRuns() {\n\t\t\t\twhile (this.stackSize > 1) {\n\t\t\t\t\tvar n = this.stackSize - 2;\n\t\t\t\t\tif (n >= 1 && this.runLength[n - 1] <= this.runLength[n] + this.runLength[n + 1] || n >= 2 && this.runLength[n - 2] <= this.runLength[n] + this.runLength[n - 1]) {\n\t\t\t\t\t\tif (this.runLength[n - 1] < this.runLength[n + 1]) n--;\n\t\t\t\t\t} else if (this.runLength[n] > this.runLength[n + 1]) break;\n\t\t\t\t\tthis.mergeAt(n);\n\t\t\t\t}\n\t\t\t};\n\t\t\tTimSort.prototype.forceMergeRuns = function forceMergeRuns() {\n\t\t\t\twhile (this.stackSize > 1) {\n\t\t\t\t\tvar n = this.stackSize - 2;\n\t\t\t\t\tif (n > 0 && this.runLength[n - 1] < this.runLength[n + 1]) n--;\n\t\t\t\t\tthis.mergeAt(n);\n\t\t\t\t}\n\t\t\t};\n\t\t\tTimSort.prototype.mergeAt = function mergeAt(i) {\n\t\t\t\tvar compare = this.compare;\n\t\t\t\tvar array = this.array;\n\t\t\t\tvar start1 = this.runStart[i];\n\t\t\t\tvar length1 = this.runLength[i];\n\t\t\t\tvar start2 = this.runStart[i + 1];\n\t\t\t\tvar length2 = this.runLength[i + 1];\n\t\t\t\tthis.runLength[i] = length1 + length2;\n\t\t\t\tif (i === this.stackSize - 3) {\n\t\t\t\t\tthis.runStart[i + 1] = this.runStart[i + 2];\n\t\t\t\t\tthis.runLength[i + 1] = this.runLength[i + 2];\n\t\t\t\t}\n\t\t\t\tthis.stackSize--;\n\t\t\t\tvar k = gallopRight(array[start2], array, start1, length1, 0, compare);\n\t\t\t\tstart1 += k;\n\t\t\t\tlength1 -= k;\n\t\t\t\tif (length1 === 0) return;\n\t\t\t\tlength2 = gallopLeft(array[start1 + length1 - 1], array, start2, length2, length2 - 1, compare);\n\t\t\t\tif (length2 === 0) return;\n\t\t\t\tif (length1 <= length2) this.mergeLow(start1, length1, start2, length2);\n\t\t\t\telse this.mergeHigh(start1, length1, start2, length2);\n\t\t\t};\n\t\t\tTimSort.prototype.mergeLow = function mergeLow(start1, length1, start2, length2) {\n\t\t\t\tvar compare = this.compare;\n\t\t\t\tvar array = this.array;\n\t\t\t\tvar tmp = this.tmp;\n\t\t\t\tvar i = 0;\n\t\t\t\tfor (i = 0; i < length1; i++) tmp[i] = array[start1 + i];\n\t\t\t\tvar cursor1 = 0;\n\t\t\t\tvar cursor2 = start2;\n\t\t\t\tvar dest = start1;\n\t\t\t\tarray[dest++] = array[cursor2++];\n\t\t\t\tif (--length2 === 0) {\n\t\t\t\t\tfor (i = 0; i < length1; i++) array[dest + i] = tmp[cursor1 + i];\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif (length1 === 1) {\n\t\t\t\t\tfor (i = 0; i < length2; i++) array[dest + i] = array[cursor2 + i];\n\t\t\t\t\tarray[dest + length2] = tmp[cursor1];\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tvar minGallop = this.minGallop;\n\t\t\t\twhile (true) {\n\t\t\t\t\tvar count1 = 0;\n\t\t\t\t\tvar count2 = 0;\n\t\t\t\t\tvar exit = false;\n\t\t\t\t\tdo\n\t\t\t\t\t\tif (compare(array[cursor2], tmp[cursor1]) < 0) {\n\t\t\t\t\t\t\tarray[dest++] = array[cursor2++];\n\t\t\t\t\t\t\tcount2++;\n\t\t\t\t\t\t\tcount1 = 0;\n\t\t\t\t\t\t\tif (--length2 === 0) {\n\t\t\t\t\t\t\t\texit = true;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tarray[dest++] = tmp[cursor1++];\n\t\t\t\t\t\t\tcount1++;\n\t\t\t\t\t\t\tcount2 = 0;\n\t\t\t\t\t\t\tif (--length1 === 1) {\n\t\t\t\t\t\t\t\texit = true;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\twhile ((count1 | count2) < minGallop);\n\t\t\t\t\tif (exit) break;\n\t\t\t\t\tdo {\n\t\t\t\t\t\tcount1 = gallopRight(array[cursor2], tmp, cursor1, length1, 0, compare);\n\t\t\t\t\t\tif (count1 !== 0) {\n\t\t\t\t\t\t\tfor (i = 0; i < count1; i++) array[dest + i] = tmp[cursor1 + i];\n\t\t\t\t\t\t\tdest += count1;\n\t\t\t\t\t\t\tcursor1 += count1;\n\t\t\t\t\t\t\tlength1 -= count1;\n\t\t\t\t\t\t\tif (length1 <= 1) {\n\t\t\t\t\t\t\t\texit = true;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tarray[dest++] = array[cursor2++];\n\t\t\t\t\t\tif (--length2 === 0) {\n\t\t\t\t\t\t\texit = true;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcount2 = gallopLeft(tmp[cursor1], array, cursor2, length2, 0, compare);\n\t\t\t\t\t\tif (count2 !== 0) {\n\t\t\t\t\t\t\tfor (i = 0; i < count2; i++) array[dest + i] = array[cursor2 + i];\n\t\t\t\t\t\t\tdest += count2;\n\t\t\t\t\t\t\tcursor2 += count2;\n\t\t\t\t\t\t\tlength2 -= count2;\n\t\t\t\t\t\t\tif (length2 === 0) {\n\t\t\t\t\t\t\t\texit = true;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tarray[dest++] = tmp[cursor1++];\n\t\t\t\t\t\tif (--length1 === 1) {\n\t\t\t\t\t\t\texit = true;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tminGallop--;\n\t\t\t\t\t} while (count1 >= DEFAULT_MIN_GALLOPING || count2 >= DEFAULT_MIN_GALLOPING);\n\t\t\t\t\tif (exit) break;\n\t\t\t\t\tif (minGallop < 0) minGallop = 0;\n\t\t\t\t\tminGallop += 2;\n\t\t\t\t}\n\t\t\t\tthis.minGallop = minGallop;\n\t\t\t\tif (minGallop < 1) this.minGallop = 1;\n\t\t\t\tif (length1 === 1) {\n\t\t\t\t\tfor (i = 0; i < length2; i++) array[dest + i] = array[cursor2 + i];\n\t\t\t\t\tarray[dest + length2] = tmp[cursor1];\n\t\t\t\t} else if (length1 === 0) throw new Error(\"mergeLow preconditions were not respected\");\n\t\t\t\telse for (i = 0; i < length1; i++) array[dest + i] = tmp[cursor1 + i];\n\t\t\t};\n\t\t\tTimSort.prototype.mergeHigh = function mergeHigh(start1, length1, start2, length2) {\n\t\t\t\tvar compare = this.compare;\n\t\t\t\tvar array = this.array;\n\t\t\t\tvar tmp = this.tmp;\n\t\t\t\tvar i = 0;\n\t\t\t\tfor (i = 0; i < length2; i++) tmp[i] = array[start2 + i];\n\t\t\t\tvar cursor1 = start1 + length1 - 1;\n\t\t\t\tvar cursor2 = length2 - 1;\n\t\t\t\tvar dest = start2 + length2 - 1;\n\t\t\t\tvar customCursor = 0;\n\t\t\t\tvar customDest = 0;\n\t\t\t\tarray[dest--] = array[cursor1--];\n\t\t\t\tif (--length1 === 0) {\n\t\t\t\t\tcustomCursor = dest - (length2 - 1);\n\t\t\t\t\tfor (i = 0; i < length2; i++) array[customCursor + i] = tmp[i];\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif (length2 === 1) {\n\t\t\t\t\tdest -= length1;\n\t\t\t\t\tcursor1 -= length1;\n\t\t\t\t\tcustomDest = dest + 1;\n\t\t\t\t\tcustomCursor = cursor1 + 1;\n\t\t\t\t\tfor (i = length1 - 1; i >= 0; i--) array[customDest + i] = array[customCursor + i];\n\t\t\t\t\tarray[dest] = tmp[cursor2];\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tvar minGallop = this.minGallop;\n\t\t\t\twhile (true) {\n\t\t\t\t\tvar count1 = 0;\n\t\t\t\t\tvar count2 = 0;\n\t\t\t\t\tvar exit = false;\n\t\t\t\t\tdo\n\t\t\t\t\t\tif (compare(tmp[cursor2], array[cursor1]) < 0) {\n\t\t\t\t\t\t\tarray[dest--] = array[cursor1--];\n\t\t\t\t\t\t\tcount1++;\n\t\t\t\t\t\t\tcount2 = 0;\n\t\t\t\t\t\t\tif (--length1 === 0) {\n\t\t\t\t\t\t\t\texit = true;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tarray[dest--] = tmp[cursor2--];\n\t\t\t\t\t\t\tcount2++;\n\t\t\t\t\t\t\tcount1 = 0;\n\t\t\t\t\t\t\tif (--length2 === 1) {\n\t\t\t\t\t\t\t\texit = true;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\twhile ((count1 | count2) < minGallop);\n\t\t\t\t\tif (exit) break;\n\t\t\t\t\tdo {\n\t\t\t\t\t\tcount1 = length1 - gallopRight(tmp[cursor2], array, start1, length1, length1 - 1, compare);\n\t\t\t\t\t\tif (count1 !== 0) {\n\t\t\t\t\t\t\tdest -= count1;\n\t\t\t\t\t\t\tcursor1 -= count1;\n\t\t\t\t\t\t\tlength1 -= count1;\n\t\t\t\t\t\t\tcustomDest = dest + 1;\n\t\t\t\t\t\t\tcustomCursor = cursor1 + 1;\n\t\t\t\t\t\t\tfor (i = count1 - 1; i >= 0; i--) array[customDest + i] = array[customCursor + i];\n\t\t\t\t\t\t\tif (length1 === 0) {\n\t\t\t\t\t\t\t\texit = true;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tarray[dest--] = tmp[cursor2--];\n\t\t\t\t\t\tif (--length2 === 1) {\n\t\t\t\t\t\t\texit = true;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcount2 = length2 - gallopLeft(array[cursor1], tmp, 0, length2, length2 - 1, compare);\n\t\t\t\t\t\tif (count2 !== 0) {\n\t\t\t\t\t\t\tdest -= count2;\n\t\t\t\t\t\t\tcursor2 -= count2;\n\t\t\t\t\t\t\tlength2 -= count2;\n\t\t\t\t\t\t\tcustomDest = dest + 1;\n\t\t\t\t\t\t\tcustomCursor = cursor2 + 1;\n\t\t\t\t\t\t\tfor (i = 0; i < count2; i++) array[customDest + i] = tmp[customCursor + i];\n\t\t\t\t\t\t\tif (length2 <= 1) {\n\t\t\t\t\t\t\t\texit = true;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tarray[dest--] = array[cursor1--];\n\t\t\t\t\t\tif (--length1 === 0) {\n\t\t\t\t\t\t\texit = true;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tminGallop--;\n\t\t\t\t\t} while (count1 >= DEFAULT_MIN_GALLOPING || count2 >= DEFAULT_MIN_GALLOPING);\n\t\t\t\t\tif (exit) break;\n\t\t\t\t\tif (minGallop < 0) minGallop = 0;\n\t\t\t\t\tminGallop += 2;\n\t\t\t\t}\n\t\t\t\tthis.minGallop = minGallop;\n\t\t\t\tif (minGallop < 1) this.minGallop = 1;\n\t\t\t\tif (length2 === 1) {\n\t\t\t\t\tdest -= length1;\n\t\t\t\t\tcursor1 -= length1;\n\t\t\t\t\tcustomDest = dest + 1;\n\t\t\t\t\tcustomCursor = cursor1 + 1;\n\t\t\t\t\tfor (i = length1 - 1; i >= 0; i--) array[customDest + i] = array[customCursor + i];\n\t\t\t\t\tarray[dest] = tmp[cursor2];\n\t\t\t\t} else if (length2 === 0) throw new Error(\"mergeHigh preconditions were not respected\");\n\t\t\t\telse {\n\t\t\t\t\tcustomCursor = dest - (length2 - 1);\n\t\t\t\t\tfor (i = 0; i < length2; i++) array[customCursor + i] = tmp[i];\n\t\t\t\t}\n\t\t\t};\n\t\t\treturn TimSort;\n\t\t})();\n\t\tfunction sort(array, compare, lo, hi) {\n\t\t\tif (!Array.isArray(array)) throw new TypeError(\"Can only sort arrays\");\n\t\t\tif (!compare) compare = alphabeticalCompare;\n\t\t\telse if (typeof compare !== \"function\") {\n\t\t\t\thi = lo;\n\t\t\t\tlo = compare;\n\t\t\t\tcompare = alphabeticalCompare;\n\t\t\t}\n\t\t\tif (!lo) lo = 0;\n\t\t\tif (!hi) hi = array.length;\n\t\t\tvar remaining = hi - lo;\n\t\t\tif (remaining < 2) return;\n\t\t\tvar runLength = 0;\n\t\t\tif (remaining < DEFAULT_MIN_MERGE) {\n\t\t\t\trunLength = makeAscendingRun(array, lo, hi, compare);\n\t\t\t\tbinaryInsertionSort(array, lo, hi, lo + runLength, compare);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tvar ts = new TimSort(array, compare);\n\t\t\tvar minRun = minRunLength(remaining);\n\t\t\tdo {\n\t\t\t\trunLength = makeAscendingRun(array, lo, hi, compare);\n\t\t\t\tif (runLength < minRun) {\n\t\t\t\t\tvar force = remaining;\n\t\t\t\t\tif (force > minRun) force = minRun;\n\t\t\t\t\tbinaryInsertionSort(array, lo, lo + force, lo + runLength, compare);\n\t\t\t\t\trunLength = force;\n\t\t\t\t}\n\t\t\t\tts.pushRun(lo, runLength);\n\t\t\t\tts.mergeRuns();\n\t\t\t\tremaining -= runLength;\n\t\t\t\tlo += runLength;\n\t\t\t} while (remaining !== 0);\n\t\t\tts.forceMergeRuns();\n\t\t}\n\t});\n}));\n//#endregion\n//#region node_modules/timsort/index.js\nvar require_timsort = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tmodule.exports = require_timsort$1();\n}));\n//#endregion\n//#region node_modules/percentile/lib/index.js\nvar require_lib = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\t/**\n\t@typedef {(Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array)} TypedArray\n\t*/\n\t/**\n\t* Error message for a case when percentile is less than 0.\n\t*\n\t* @param {Number} p\n\t*\n\t* @return {String}\n\t*/\n\tfunction lessThanZeroError(p) {\n\t\treturn \"Expect percentile to be >= 0 but given \\\"\" + p + \"\\\" and its type is \\\"\" + typeof p + \"\\\".\";\n\t}\n\t/**\n\t* Error message for a case when percentile is greater than 100.\n\t*\n\t* @param {Number} p\n\t*\n\t* @return {String}\n\t*/\n\tfunction greaterThanHundredError(p) {\n\t\treturn \"Expect percentile to be <= 100 but given \\\"\" + p + \"\\\" and its type is \\\"\" + typeof p + \"\\\".\";\n\t}\n\t/**\n\t* Error message for a case when percentile is not a number (NaN).\n\t*\n\t* @param {Number} p\n\t*\n\t* @return {String}\n\t*/\n\tfunction nanError(p) {\n\t\treturn \"Expect percentile to be a number but given \\\"\" + p + \"\\\" and its type is \\\"\" + typeof p + \"\\\".\";\n\t}\n\t/**\n\t* Checks that a list of percentiles are all numbers and they lie in range 0..100.\n\t*\n\t* @param {Array<Number>} ps - percentiles to calculate\n\t*\n\t* @return {Array} List of errors\n\t*/\n\tfunction validateInput(ps) {\n\t\treturn ps.reduce(function(errors, p) {\n\t\t\tif (isNaN(Number(p))) errors.push(nanError(p));\n\t\t\telse if (p < 0) errors.push(lessThanZeroError(p));\n\t\t\telse if (p > 100) errors.push(greaterThanHundredError(p));\n\t\t\treturn errors;\n\t\t}, []);\n\t}\n\t/**\n\t* Get percentile value from an array.\n\t*\n\t* @param {Number} p - percentile\n\t* @param {Array|TypedArray} list - list of values\n\t*\n\t* @return {*}\n\t*/\n\tfunction getPsValue(p, list) {\n\t\tif (p === 0) return list[0];\n\t\treturn list[Math.ceil(list.length * (p / 100)) - 1];\n\t}\n\t/**\n\t* Calculate percentile for given array of values.\n\t*\n\t* @template T\n\t* @param {Number|Array<Number>} pOrPs - percentile or a list of percentiles\n\t* @param {Array<T>|Array<Number>|TypedArray} list - array of values\n\t* @param {function(T): Number} [fn] - optional function to extract a value from an array item\n\t*\n\t* @return {Number|T|Array<Number>|Array<T>}\n\t*/\n\tfunction percentile(pOrPs, list, fn) {\n\t\tvar ps = Array.isArray(pOrPs) ? pOrPs : [pOrPs];\n\t\tvar validationErrors = validateInput(ps);\n\t\tif (validationErrors.length) throw new Error(validationErrors.join(\" \"));\n\t\tlist = list.slice().sort(function(a, b) {\n\t\t\tif (fn) {\n\t\t\t\ta = fn(a);\n\t\t\t\tb = fn(b);\n\t\t\t}\n\t\t\ta = Number.isNaN(a) ? Number.NEGATIVE_INFINITY : a;\n\t\t\tb = Number.isNaN(b) ? Number.NEGATIVE_INFINITY : b;\n\t\t\tif (a > b) return 1;\n\t\t\tif (a < b) return -1;\n\t\t\treturn 0;\n\t\t});\n\t\tif (ps.length === 1) return getPsValue(ps[0], list);\n\t\treturn ps.map(function(p) {\n\t\t\treturn getPsValue(p, list);\n\t\t});\n\t}\n\tmodule.exports = percentile;\n}));\n//#endregion\n//#region src/instrumentation/instruments/instrumentGauge.ts\nvar import_timsort = /* @__PURE__ */ __toESM(require_timsort());\nvar import_lib = /* @__PURE__ */ __toESM(require_lib());\nvar InstrumentGaugeOptions = class extends InstrumentBaseOptions {\n\tinterval;\n\tsampleSize;\n\tfromJSON;\n\tinitValue;\n};\nvar InstrumentGaugeTelemetry = class extends InstrumentBaseTelemetry {\n\tval;\n\tInc;\n\tDec;\n};\nvar InstrumentGauge = class extends InstrumentBase {\n\t#val = 0;\n\t#maxval = null;\n\t#lastObservedValue = 0;\n\t#timeSeriesList = [];\n\t#maxSampleSize = 0;\n\t#timerInterval = 0;\n\t#observer = null;\n\t#min = null;\n\t#max = 0;\n\t#observations = 0;\n\t#total = 0;\n\t#copy = false;\n\tconstructor(options = {}) {\n\t\tsuper(options);\n\t\tif (!options.label) this.label = \"InstrumentGauge\";\n\t\telse this.label = options.label;\n\t\tif (typeof options.interval === \"undefined\") this.#timerInterval = 0;\n\t\telse this.#timerInterval = options.interval;\n\t\tif (typeof options.sampleSize === \"undefined\") this.#maxSampleSize = 600;\n\t\telse this.#maxSampleSize = options.sampleSize;\n\t\tif (typeof options.fromJSON === \"undefined\") this.#copy = false;\n\t\telse this.#copy = true;\n\t\tObject.defineProperty(this, GaugeTypes.GAUGE_TYPE, {\n\t\t\tenumerable: true,\n\t\t\tget: () => GaugeTypes.INSTRUMENT_GAUGE\n\t\t});\n\t\tif (this.#copy) this.DefineCopyProperties([\n\t\t\t\"val\",\n\t\t\t\"min\",\n\t\t\t\"max\",\n\t\t\t\"avg\",\n\t\t\t\"percentile\"\n\t\t]);\n\t\telse {\n\t\t\tObject.defineProperty(this, \"val\", {\n\t\t\t\tenumerable: true,\n\t\t\t\tget: () => this.#GetVal(),\n\t\t\t\tset: (value) => {\n\t\t\t\t\tthis.#SetVal(value);\n\t\t\t\t}\n\t\t\t});\n\t\t\tif (this.#timerInterval > 0) {\n\t\t\t\tObject.defineProperty(this, \"percentile\", {\n\t\t\t\t\tenumerable: true,\n\t\t\t\t\tget: () => this.#GetPercentileData()\n\t\t\t\t});\n\t\t\t\tthis._StartTimer();\n\t\t\t}\n\t\t}\n\t\tif (typeof options.initValue !== \"undefined\") this.val = options.initValue;\n\t\tif (typeof options.fromJSON !== \"undefined\") {\n\t\t\tconst result = _cloneDeep(options.fromJSON);\n\t\t\tthis.val = result.val;\n\t\t\tif (result.percentile) this.percentile = result.percentile;\n\t\t\tif (result.min) this.min = result.min;\n\t\t\tif (result.max) this.max = result.max;\n\t\t\tif (result.avg) this.avg = result.avg;\n\t\t}\n\t}\n\tpercentile;\n\tmin;\n\tmax;\n\tavg;\n\tval = 0;\n\tWithInitVal(initVal) {\n\t\tthis.val = initVal;\n\t\treturn this;\n\t}\n\tWithMin() {\n\t\tObject.defineProperty(this, \"min\", {\n\t\t\tenumerable: true,\n\t\t\tget: () => this.#GetMin()\n\t\t});\n\t\treturn this;\n\t}\n\tWithMax() {\n\t\tObject.defineProperty(this, \"max\", {\n\t\t\tenumerable: true,\n\t\t\tget: () => this.#GetMax()\n\t\t});\n\t\treturn this;\n\t}\n\tWithAverage() {\n\t\tObject.defineProperty(this, \"avg\", {\n\t\t\tenumerable: true,\n\t\t\tget: () => this.#GetAverage()\n\t\t});\n\t\treturn this;\n\t}\n\t_StartTimer() {\n\t\tif (this.#timerInterval > 0) {\n\t\t\tthis.#timeSeriesList = [];\n\t\t\tthis.#observer = setInterval(() => {\n\t\t\t\tif (this.#timeSeriesList.length > this.#maxSampleSize) this.#timeSeriesList.shift();\n\t\t\t\tconst maxval = this.#GetAndResetMaxVal();\n\t\t\t\tthis.#timeSeriesList.push(maxval);\n\t\t\t}, this.#timerInterval);\n\t\t\tif (isNode) this.#observer.unref();\n\t\t} else throw new Error(`Unable to StartTimer for this instrument. The interval is set to <= 0.`);\n\t}\n\tStopTimer() {\n\t\tif (this.#observer) {\n\t\t\tclearTimeout(this.#observer);\n\t\t\tthis.#observer = null;\n\t\t\tthis.#timeSeriesList = [];\n\t\t}\n\t}\n\t/**\n\t* If the gauge is being monitored as part of a time series, get the most recent recorded value (max value) from within the time interval\n\t* otherwise, just return the current instant value.\n\t*/\n\t#GetVal() {\n\t\tif (this.#timerInterval > 0 && this.#observer !== null) if (this.#maxval === null) return this.GetNumber(this.#lastObservedValue);\n\t\telse return this.GetNumber(this.#maxval);\n\t\treturn this.GetNumber(this.#val);\n\t}\n\t#SetVal(updatedValue) {\n\t\tthis.#val = updatedValue;\n\t\tthis.#observations++;\n\t\tthis.#total += updatedValue;\n\t\tif (this.#val > this.#max) this.#max = this.#val;\n\t\tif (this.#min !== null) {\n\t\t\tif (this.#val < this.#min) this.#min = this.#val;\n\t\t} else this.#min = this.#val;\n\t\tif (this.#timerInterval > 0) {\n\t\t\tthis.#lastObservedValue = updatedValue;\n\t\t\tif (this.#maxval === null) this.#maxval = this.#val;\n\t\t\telse if (this.#val > this.#maxval) this.#maxval = this.#val;\n\t\t}\n\t}\n\t#GetMin() {\n\t\tif (this.#min !== null) return this.#min;\n\t\treturn 0;\n\t}\n\t#GetMax() {\n\t\treturn this.#max;\n\t}\n\t#GetAverage() {\n\t\tif (this.#observations > 0) return this.#total / this.#observations;\n\t\treturn 0;\n\t}\n\tReset() {\n\t\tthis.StopTimer();\n\t\tthis.#maxval = 0;\n\t\tthis.#lastObservedValue = 0;\n\t\tthis.#val = 0;\n\t\tthis.#min = null;\n\t\tthis.#max = 0;\n\t\tthis.#observations = 0;\n\t\tthis.#total = 0;\n\t\tif (this.#timerInterval > 0) this._StartTimer();\n\t}\n\t#GetAndResetMaxVal() {\n\t\tif (this.#maxval === null) return this.#lastObservedValue;\n\t\tconst retVal = this.#maxval;\n\t\tthis.#maxval = null;\n\t\treturn retVal;\n\t}\n\tInc(incVal = 1) {\n\t\tthis.#SetVal(this.#val + incVal);\n\t}\n\tDec(decVal = 1) {\n\t\tthis.#SetVal(this.#val - decVal);\n\t}\n\t#NumberCompare(a, b) {\n\t\treturn a - b;\n\t}\n\t#GetPercentileData() {\n\t\tconst sortedList = this.#timeSeriesList.slice(0);\n\t\timport_timsort.sort(sortedList, this.#NumberCompare);\n\t\treturn (0, import_lib.default)([\n\t\t\t50,\n\t\t\t80,\n\t\t\t90,\n\t\t\t95,\n\t\t\t99,\n\t\t\t99.95\n\t\t], sortedList);\n\t}\n\tProcessTelemetry(telemetry) {\n\t\tif (telemetry.Inc !== void 0) this.Inc(telemetry.Inc);\n\t\tif (telemetry.Dec !== void 0) this.Dec(telemetry.Dec);\n\t\tif (telemetry.val !== void 0) this.val = telemetry.val;\n\t}\n};\n//#endregion\n//#region src/instrumentation/instruments/instrumentObject.ts\nvar InstrumentObjectOptions = class extends InstrumentBaseOptions {\n\tfromJSON;\n\tinitValue;\n};\nvar InstrumentObjectTelemetry = class extends InstrumentBaseTelemetry {\n\tval;\n};\nvar InstrumentObject = class extends InstrumentBase {\n\t#val = {};\n\t#copy = false;\n\tconstructor(options = {}) {\n\t\tsuper(options);\n\t\tif (typeof options.label === \"undefined\") this.label = \"InstrumentObject\";\n\t\telse this.label = options.label;\n\t\tif (typeof options.fromJSON === \"undefined\") this.#copy = false;\n\t\telse this.#copy = true;\n\t\tObject.defineProperty(this, GaugeTypes.GAUGE_TYPE, {\n\t\t\tenumerable: true,\n\t\t\tget: () => GaugeTypes.INSTRUMENT_OBJECT\n\t\t});\n\t\tif (this.#copy) this.DefineCopyProperties([\"val\"]);\n\t\telse Object.defineProperty(this, \"val\", {\n\t\t\tenumerable: true,\n\t\t\tget: () => this.#GetVal(),\n\t\t\tset: (value) => {\n\t\t\t\tthis.#SetVal(value);\n\t\t\t}\n\t\t});\n\t\tif (typeof options.initValue !== \"undefined\") this.val = options.initValue;\n\t\telse this.val = {};\n\t\tif (typeof options.fromJSON !== \"undefined\") this.val = _cloneDeep(options.fromJSON).val;\n\t}\n\tval;\n\tWithInitVal(initVal) {\n\t\tthis.val = initVal;\n\t\treturn this;\n\t}\n\t#GetVal() {\n\t\treturn this.#val;\n\t}\n\t#SetVal(updatedValue) {\n\t\tthis.#val = updatedValue;\n\t}\n\tProcessTelemetry(telemetry) {\n\t\tif (telemetry.val !== void 0) this.val = telemetry.val;\n\t}\n};\n//#endregion\n//#region src/instrumentation/instrumentUtils.ts\nfunction CreateInstrument(sourceInstrument) {\n\tswitch (sourceInstrument[GaugeTypes.GAUGE_TYPE]) {\n\t\tcase GaugeTypes.INSTRUMENT_GAUGE: return new InstrumentGauge({ fromJSON: sourceInstrument });\n\t\tcase GaugeTypes.INSTRUMENT_VELOCITY: return new InstrumentVelocity({ fromJSON: sourceInstrument });\n\t\tcase GaugeTypes.INSTRUMENT_HISTOGRAM: return new InstrumentHistogram({ fromJSON: sourceInstrument });\n\t\tcase GaugeTypes.INSTRUMENT_LOG: return new InstrumentLog({ fromJSON: sourceInstrument });\n\t\tcase GaugeTypes.INSTRUMENT_TIMER: return new InstrumentTimerGauge({ fromJSON: sourceInstrument });\n\t\tcase GaugeTypes.INSTRUMENT_OBJECT: return new InstrumentObject({ fromJSON: sourceInstrument });\n\t}\n\tthrow new Error(`Cannot create instrument from type: [${sourceInstrument[GaugeTypes.GAUGE_TYPE]}]`);\n}\nfunction GetInstrumentName(gauge) {\n\tswitch (gauge) {\n\t\tcase Gauge.ACTIVE_REQUEST_GAUGE: return \"Active Requests\";\n\t\tcase Gauge.AUTHENTICATION_COUNT_GAUGE: return \"Authentication Count\";\n\t\tcase Gauge.AUTHENTICATION_ERROR_COUNT_GAUGE: return \"Authentication Error Count\";\n\t\tcase Gauge.AUTHENTICATION_RETRY_COUNT_GAUGE: return \"Authentication Retry Count\";\n\t\tcase Gauge.CONNECTION_POOL_IDLE_GAUGE: return \"Connection Pool Idle\";\n\t\tcase Gauge.CONNECTION_POOL_TOTAL_GAUGE: return \"Connection Pool Total\";\n\t\tcase Gauge.CONNECTION_POOL_WAITING_GAUGE: return \"Connection Pool Waiting\";\n\t\tcase Gauge.CPU_LOAD_GAUGE: return \"CPU Load\";\n\t\tcase Gauge.CPU_SYSTEM_LOAD_GAUGE: return \"CPU SYstem Load\";\n\t\tcase Gauge.DURATION_GAUGE: return \"Duration\";\n\t\tcase Gauge.DURATION_HISTOGRAM_GAUGE: return \"Diration Histogram\";\n\t\tcase Gauge.ERROR_COUNT_GAUGE: return \"Errors\";\n\t\tcase Gauge.LATENCY_GAUGE: return \"Latency\";\n\t\tcase Gauge.LATENCY_HISTOGRAM_GAUGE: return \"Latency Histogram\";\n\t\tcase Gauge.LOGGER: return \"Logger\";\n\t\tcase Gauge.LOGGER_COPY: return \"_Logger\";\n\t\tcase Gauge.NETWORK_RX_GAUGE: return \"Network Receive\";\n\t\tcase Gauge.NETWORK_TX_GAUGE: return \"Network Transmit\";\n\t\tcase Gauge.REQUEST_COUNT_GAUGE: return \"Requests\";\n\t\tcase Gauge.RETRY_COUNT_GAUGE: return \"Retries\";\n\t\tcase Gauge.TIMER_GAUGE: return \"Timer\";\n\t\tcase Gauge.VELOCITY_GAUGE: return \"Velocity\";\n\t\tcase Gauge.CONNECTION_COUNT_GAUGE: return \"TCP Connection\";\n\t\tcase Gauge.OBJECT_GAUGE: return \"Object\";\n\t\tcase Gauge.CORE_COUNT_GAUGE: return \"Core Count\";\n\t\tdefault: return \"Unknown\";\n\t}\n}\nfunction StopInstruments(instruments) {\n\tif (instruments) {\n\t\tif (Array.isArray(instruments)) instruments.forEach((instrument) => {\n\t\t\tif (instrument.StopTimer) instrument.StopTimer();\n\t\t});\n\t\telse for (const [, value] of Object.entries(instruments)) if (value.StopTimer) value.StopTimer();\n\t}\n}\n//#endregion\nexport { CreateInstrument, Gauge, GaugeTypes, GetInstrumentName, HistogramDataElementPos, InstrumentBase, InstrumentBaseOptions, InstrumentBaseTelemetry, InstrumentGauge, InstrumentGaugeOptions, InstrumentGaugeTelemetry, InstrumentHistogram, InstrumentHistogramOptions, InstrumentHistogramTelemetry, InstrumentLog, InstrumentLogOptions, InstrumentLogTelemetry, InstrumentObject, InstrumentObjectOptions, InstrumentObjectTelemetry, InstrumentTimerGauge, InstrumentTimerOptions, InstrumentTimerTelemetry, InstrumentVelocity, InstrumentVelocityOptions, InstrumentVelocityTelemetry, StopInstruments };\n\n//# sourceMappingURL=index.mjs.map","export function utf8Count(str) {\n const strLength = str.length;\n let byteLength = 0;\n let pos = 0;\n while (pos < strLength) {\n let value = str.charCodeAt(pos++);\n if ((value & 0xffffff80) === 0) {\n // 1-byte\n byteLength++;\n continue;\n }\n else if ((value & 0xfffff800) === 0) {\n // 2-bytes\n byteLength += 2;\n }\n else {\n // handle surrogate pair\n if (value >= 0xd800 && value <= 0xdbff) {\n // high surrogate\n if (pos < strLength) {\n const extra = str.charCodeAt(pos);\n if ((extra & 0xfc00) === 0xdc00) {\n ++pos;\n value = ((value & 0x3ff) << 10) + (extra & 0x3ff) + 0x10000;\n }\n }\n }\n if ((value & 0xffff0000) === 0) {\n // 3-byte\n byteLength += 3;\n }\n else {\n // 4-byte\n byteLength += 4;\n }\n }\n }\n return byteLength;\n}\nexport function utf8EncodeJs(str, output, outputOffset) {\n const strLength = str.length;\n let offset = outputOffset;\n let pos = 0;\n while (pos < strLength) {\n let value = str.charCodeAt(pos++);\n if ((value & 0xffffff80) === 0) {\n // 1-byte\n output[offset++] = value;\n continue;\n }\n else if ((value & 0xfffff800) === 0) {\n // 2-bytes\n output[offset++] = ((value >> 6) & 0x1f) | 0xc0;\n }\n else {\n // handle surrogate pair\n if (value >= 0xd800 && value <= 0xdbff) {\n // high surrogate\n if (pos < strLength) {\n const extra = str.charCodeAt(pos);\n if ((extra & 0xfc00) === 0xdc00) {\n ++pos;\n value = ((value & 0x3ff) << 10) + (extra & 0x3ff) + 0x10000;\n }\n }\n }\n if ((value & 0xffff0000) === 0) {\n // 3-byte\n output[offset++] = ((value >> 12) & 0x0f) | 0xe0;\n output[offset++] = ((value >> 6) & 0x3f) | 0x80;\n }\n else {\n // 4-byte\n output[offset++] = ((value >> 18) & 0x07) | 0xf0;\n output[offset++] = ((value >> 12) & 0x3f) | 0x80;\n output[offset++] = ((value >> 6) & 0x3f) | 0x80;\n }\n }\n output[offset++] = (value & 0x3f) | 0x80;\n }\n}\n// TextEncoder and TextDecoder are standardized in whatwg encoding:\n// https://encoding.spec.whatwg.org/\n// and available in all the modern browsers:\n// https://caniuse.com/textencoder\n// They are available in Node.js since v12 LTS as well:\n// https://nodejs.org/api/globals.html#textencoder\nconst sharedTextEncoder = new TextEncoder();\n// This threshold should be determined by benchmarking, which might vary in engines and input data.\n// Run `npx ts-node benchmark/encode-string.ts` for details.\nconst TEXT_ENCODER_THRESHOLD = 50;\nexport function utf8EncodeTE(str, output, outputOffset) {\n sharedTextEncoder.encodeInto(str, output.subarray(outputOffset));\n}\nexport function utf8Encode(str, output, outputOffset) {\n if (str.length > TEXT_ENCODER_THRESHOLD) {\n utf8EncodeTE(str, output, outputOffset);\n }\n else {\n utf8EncodeJs(str, output, outputOffset);\n }\n}\nconst CHUNK_SIZE = 4096;\nexport function utf8DecodeJs(bytes, inputOffset, byteLength) {\n let offset = inputOffset;\n const end = offset + byteLength;\n const units = [];\n let result = \"\";\n while (offset < end) {\n const byte1 = bytes[offset++];\n if ((byte1 & 0x80) === 0) {\n // 1 byte\n units.push(byte1);\n }\n else if ((byte1 & 0xe0) === 0xc0) {\n // 2 bytes\n const byte2 = bytes[offset++] & 0x3f;\n units.push(((byte1 & 0x1f) << 6) | byte2);\n }\n else if ((byte1 & 0xf0) === 0xe0) {\n // 3 bytes\n const byte2 = bytes[offset++] & 0x3f;\n const byte3 = bytes[offset++] & 0x3f;\n units.push(((byte1 & 0x1f) << 12) | (byte2 << 6) | byte3);\n }\n else if ((byte1 & 0xf8) === 0xf0) {\n // 4 bytes\n const byte2 = bytes[offset++] & 0x3f;\n const byte3 = bytes[offset++] & 0x3f;\n const byte4 = bytes[offset++] & 0x3f;\n let unit = ((byte1 & 0x07) << 0x12) | (byte2 << 0x0c) | (byte3 << 0x06) | byte4;\n if (unit > 0xffff) {\n unit -= 0x10000;\n units.push(((unit >>> 10) & 0x3ff) | 0xd800);\n unit = 0xdc00 | (unit & 0x3ff);\n }\n units.push(unit);\n }\n else {\n units.push(byte1);\n }\n if (units.length >= CHUNK_SIZE) {\n result += String.fromCharCode(...units);\n units.length = 0;\n }\n }\n if (units.length > 0) {\n result += String.fromCharCode(...units);\n }\n return result;\n}\nconst sharedTextDecoder = new TextDecoder();\n// This threshold should be determined by benchmarking, which might vary in engines and input data.\n// Run `npx ts-node benchmark/decode-string.ts` for details.\nconst TEXT_DECODER_THRESHOLD = 200;\nexport function utf8DecodeTD(bytes, inputOffset, byteLength) {\n const stringBytes = bytes.subarray(inputOffset, inputOffset + byteLength);\n return sharedTextDecoder.decode(stringBytes);\n}\nexport function utf8Decode(bytes, inputOffset, byteLength) {\n if (byteLength > TEXT_DECODER_THRESHOLD) {\n return utf8DecodeTD(bytes, inputOffset, byteLength);\n }\n else {\n return utf8DecodeJs(bytes, inputOffset, byteLength);\n }\n}\n//# sourceMappingURL=utf8.mjs.map","/**\n * ExtData is used to handle Extension Types that are not registered to ExtensionCodec.\n */\nexport class ExtData {\n type;\n data;\n constructor(type, data) {\n this.type = type;\n this.data = data;\n }\n}\n//# sourceMappingURL=ExtData.mjs.map","export class DecodeError extends Error {\n constructor(message) {\n super(message);\n // fix the prototype chain in a cross-platform way\n const proto = Object.create(DecodeError.prototype);\n Object.setPrototypeOf(this, proto);\n Object.defineProperty(this, \"name\", {\n configurable: true,\n enumerable: false,\n value: DecodeError.name,\n });\n }\n}\n//# sourceMappingURL=DecodeError.mjs.map","// Integer Utility\nexport const UINT32_MAX = 4294967295;\n// DataView extension to handle int64 / uint64,\n// where the actual range is 53-bits integer (a.k.a. safe integer)\nexport function setUint64(view, offset, value) {\n const high = value / 4294967296;\n const low = value; // high bits are truncated by DataView\n view.setUint32(offset, high);\n view.setUint32(offset + 4, low);\n}\nexport function setInt64(view, offset, value) {\n const high = Math.floor(value / 4294967296);\n const low = value; // high bits are truncated by DataView\n view.setUint32(offset, high);\n view.setUint32(offset + 4, low);\n}\nexport function getInt64(view, offset) {\n const high = view.getInt32(offset);\n const low = view.getUint32(offset + 4);\n return high * 4294967296 + low;\n}\nexport function getUint64(view, offset) {\n const high = view.getUint32(offset);\n const low = view.getUint32(offset + 4);\n return high * 4294967296 + low;\n}\n//# sourceMappingURL=int.mjs.map","// https://github.com/msgpack/msgpack/blob/master/spec.md#timestamp-extension-type\nimport { DecodeError } from \"./DecodeError.mjs\";\nimport { getInt64, setInt64 } from \"./utils/int.mjs\";\nexport const EXT_TIMESTAMP = -1;\nconst TIMESTAMP32_MAX_SEC = 0x100000000 - 1; // 32-bit unsigned int\nconst TIMESTAMP64_MAX_SEC = 0x400000000 - 1; // 34-bit unsigned int\nexport function encodeTimeSpecToTimestamp({ sec, nsec }) {\n if (sec >= 0 && nsec >= 0 && sec <= TIMESTAMP64_MAX_SEC) {\n // Here sec >= 0 && nsec >= 0\n if (nsec === 0 && sec <= TIMESTAMP32_MAX_SEC) {\n // timestamp 32 = { sec32 (unsigned) }\n const rv = new Uint8Array(4);\n const view = new DataView(rv.buffer);\n view.setUint32(0, sec);\n return rv;\n }\n else {\n // timestamp 64 = { nsec30 (unsigned), sec34 (unsigned) }\n const secHigh = sec / 0x100000000;\n const secLow = sec & 0xffffffff;\n const rv = new Uint8Array(8);\n const view = new DataView(rv.buffer);\n // nsec30 | secHigh2\n view.setUint32(0, (nsec << 2) | (secHigh & 0x3));\n // secLow32\n view.setUint32(4, secLow);\n return rv;\n }\n }\n else {\n // timestamp 96 = { nsec32 (unsigned), sec64 (signed) }\n const rv = new Uint8Array(12);\n const view = new DataView(rv.buffer);\n view.setUint32(0, nsec);\n setInt64(view, 4, sec);\n return rv;\n }\n}\nexport function encodeDateToTimeSpec(date) {\n const msec = date.getTime();\n const sec = Math.floor(msec / 1e3);\n const nsec = (msec - sec * 1e3) * 1e6;\n // Normalizes { sec, nsec } to ensure nsec is unsigned.\n const nsecInSec = Math.floor(nsec / 1e9);\n return {\n sec: sec + nsecInSec,\n nsec: nsec - nsecInSec * 1e9,\n };\n}\nexport function encodeTimestampExtension(object) {\n if (object instanceof Date) {\n const timeSpec = encodeDateToTimeSpec(object);\n return encodeTimeSpecToTimestamp(timeSpec);\n }\n else {\n return null;\n }\n}\nexport function decodeTimestampToTimeSpec(data) {\n const view = new DataView(data.buffer, data.byteOffset, data.byteLength);\n // data may be 32, 64, or 96 bits\n switch (data.byteLength) {\n case 4: {\n // timestamp 32 = { sec32 }\n const sec = view.getUint32(0);\n const nsec = 0;\n return { sec, nsec };\n }\n case 8: {\n // timestamp 64 = { nsec30, sec34 }\n const nsec30AndSecHigh2 = view.getUint32(0);\n const secLow32 = view.getUint32(4);\n const sec = (nsec30AndSecHigh2 & 0x3) * 0x100000000 + secLow32;\n const nsec = nsec30AndSecHigh2 >>> 2;\n return { sec, nsec };\n }\n case 12: {\n // timestamp 96 = { nsec32 (unsigned), sec64 (signed) }\n const sec = getInt64(view, 4);\n const nsec = view.getUint32(0);\n return { sec, nsec };\n }\n default:\n throw new DecodeError(`Unrecognized data size for timestamp (expected 4, 8, or 12): ${data.length}`);\n }\n}\nexport function decodeTimestampExtension(data) {\n const timeSpec = decodeTimestampToTimeSpec(data);\n return new Date(timeSpec.sec * 1e3 + timeSpec.nsec / 1e6);\n}\nexport const timestampExtension = {\n type: EXT_TIMESTAMP,\n encode: encodeTimestampExtension,\n decode: decodeTimestampExtension,\n};\n//# sourceMappingURL=timestamp.mjs.map","// ExtensionCodec to handle MessagePack extensions\nimport { ExtData } from \"./ExtData.mjs\";\nimport { timestampExtension } from \"./timestamp.mjs\";\nexport class ExtensionCodec {\n static defaultCodec = new ExtensionCodec();\n // ensures ExtensionCodecType<X> matches ExtensionCodec<X>\n // this will make type errors a lot more clear\n // eslint-disable-next-line @typescript-eslint/naming-convention\n __brand;\n // built-in extensions\n builtInEncoders = [];\n builtInDecoders = [];\n // custom extensions\n encoders = [];\n decoders = [];\n constructor() {\n this.register(timestampExtension);\n }\n register({ type, encode, decode, }) {\n if (type >= 0) {\n // custom extensions\n this.encoders[type] = encode;\n this.decoders[type] = decode;\n }\n else {\n // built-in extensions\n const index = -1 - type;\n this.builtInEncoders[index] = encode;\n this.builtInDecoders[index] = decode;\n }\n }\n tryToEncode(object, context) {\n // built-in extensions\n for (let i = 0; i < this.builtInEncoders.length; i++) {\n const encodeExt = this.builtInEncoders[i];\n if (encodeExt != null) {\n const data = encodeExt(object, context);\n if (data != null) {\n const type = -1 - i;\n return new ExtData(type, data);\n }\n }\n }\n // custom extensions\n for (let i = 0; i < this.encoders.length; i++) {\n const encodeExt = this.encoders[i];\n if (encodeExt != null) {\n const data = encodeExt(object, context);\n if (data != null) {\n const type = i;\n return new ExtData(type, data);\n }\n }\n }\n if (object instanceof ExtData) {\n // to keep ExtData as is\n return object;\n }\n return null;\n }\n decode(data, type, context) {\n const decodeExt = type < 0 ? this.builtInDecoders[-1 - type] : this.decoders[type];\n if (decodeExt) {\n return decodeExt(data, type, context);\n }\n else {\n // decode() does not fail, returns ExtData instead.\n return new ExtData(type, data);\n }\n }\n}\n//# sourceMappingURL=ExtensionCodec.mjs.map","function isArrayBufferLike(buffer) {\n return (buffer instanceof ArrayBuffer || (typeof SharedArrayBuffer !== \"undefined\" && buffer instanceof SharedArrayBuffer));\n}\nexport function ensureUint8Array(buffer) {\n if (buffer instanceof Uint8Array) {\n return buffer;\n }\n else if (ArrayBuffer.isView(buffer)) {\n return new Uint8Array(buffer.buffer, buffer.byteOffset, buffer.byteLength);\n }\n else if (isArrayBufferLike(buffer)) {\n return new Uint8Array(buffer);\n }\n else {\n // ArrayLike<number>\n return Uint8Array.from(buffer);\n }\n}\n//# sourceMappingURL=typedArrays.mjs.map","import { utf8Count, utf8Encode } from \"./utils/utf8.mjs\";\nimport { ExtensionCodec } from \"./ExtensionCodec.mjs\";\nimport { setInt64, setUint64 } from \"./utils/int.mjs\";\nimport { ensureUint8Array } from \"./utils/typedArrays.mjs\";\nexport const DEFAULT_MAX_DEPTH = 100;\nexport const DEFAULT_INITIAL_BUFFER_SIZE = 2048;\nexport class Encoder {\n extensionCodec;\n context;\n useBigInt64;\n maxDepth;\n initialBufferSize;\n sortKeys;\n forceFloat32;\n ignoreUndefined;\n forceIntegerToFloat;\n pos;\n view;\n bytes;\n entered = false;\n constructor(options) {\n this.extensionCodec = options?.extensionCodec ?? ExtensionCodec.defaultCodec;\n this.context = options?.context; // needs a type assertion because EncoderOptions has no context property when ContextType is undefined\n this.useBigInt64 = options?.useBigInt64 ?? false;\n this.maxDepth = options?.maxDepth ?? DEFAULT_MAX_DEPTH;\n this.initialBufferSize = options?.initialBufferSize ?? DEFAULT_INITIAL_BUFFER_SIZE;\n this.sortKeys = options?.sortKeys ?? false;\n this.forceFloat32 = options?.forceFloat32 ?? false;\n this.ignoreUndefined = options?.ignoreUndefined ?? false;\n this.forceIntegerToFloat = options?.forceIntegerToFloat ?? false;\n this.pos = 0;\n this.view = new DataView(new ArrayBuffer(this.initialBufferSize));\n this.bytes = new Uint8Array(this.view.buffer);\n }\n clone() {\n // Because of slightly special argument `context`,\n // type assertion is needed.\n // eslint-disable-next-line @typescript-eslint/no-unsafe-argument\n return new Encoder({\n extensionCodec: this.extensionCodec,\n context: this.context,\n useBigInt64: this.useBigInt64,\n maxDepth: this.maxDepth,\n initialBufferSize: this.initialBufferSize,\n sortKeys: this.sortKeys,\n forceFloat32: this.forceFloat32,\n ignoreUndefined: this.ignoreUndefined,\n forceIntegerToFloat: this.forceIntegerToFloat,\n });\n }\n reinitializeState() {\n this.pos = 0;\n }\n /**\n * This is almost equivalent to {@link Encoder#encode}, but it returns an reference of the encoder's internal buffer and thus much faster than {@link Encoder#encode}.\n *\n * @returns Encodes the object and returns a shared reference the encoder's internal buffer.\n */\n encodeSharedRef(object) {\n if (this.entered) {\n const instance = this.clone();\n return instance.encodeSharedRef(object);\n }\n try {\n this.entered = true;\n this.reinitializeState();\n this.doEncode(object, 1);\n return this.bytes.subarray(0, this.pos);\n }\n finally {\n this.entered = false;\n }\n }\n /**\n * @returns Encodes the object and returns a copy of the encoder's internal buffer.\n */\n encode(object) {\n if (this.entered) {\n const instance = this.clone();\n return instance.encode(object);\n }\n try {\n this.entered = true;\n this.reinitializeState();\n this.doEncode(object, 1);\n return this.bytes.slice(0, this.pos);\n }\n finally {\n this.entered = false;\n }\n }\n doEncode(object, depth) {\n if (depth > this.maxDepth) {\n throw new Error(`Too deep objects in depth ${depth}`);\n }\n if (object == null) {\n this.encodeNil();\n }\n else if (typeof object === \"boolean\") {\n this.encodeBoolean(object);\n }\n else if (typeof object === \"number\") {\n if (!this.forceIntegerToFloat) {\n this.encodeNumber(object);\n }\n else {\n this.encodeNumberAsFloat(object);\n }\n }\n else if (typeof object === \"string\") {\n this.encodeString(object);\n }\n else if (this.useBigInt64 && typeof object === \"bigint\") {\n this.encodeBigInt64(object);\n }\n else {\n this.encodeObject(object, depth);\n }\n }\n ensureBufferSizeToWrite(sizeToWrite) {\n const requiredSize = this.pos + sizeToWrite;\n if (this.view.byteLength < requiredSize) {\n this.resizeBuffer(requiredSize * 2);\n }\n }\n resizeBuffer(newSize) {\n const newBuffer = new ArrayBuffer(newSize);\n const newBytes = new Uint8Array(newBuffer);\n const newView = new DataView(newBuffer);\n newBytes.set(this.bytes);\n this.view = newView;\n this.bytes = newBytes;\n }\n encodeNil() {\n this.writeU8(0xc0);\n }\n encodeBoolean(object) {\n if (object === false) {\n this.writeU8(0xc2);\n }\n else {\n this.writeU8(0xc3);\n }\n }\n encodeNumber(object) {\n if (!this.forceIntegerToFloat && Number.isSafeInteger(object)) {\n if (object >= 0) {\n if (object < 0x80) {\n // positive fixint\n this.writeU8(object);\n }\n else if (object < 0x100) {\n // uint 8\n this.writeU8(0xcc);\n this.writeU8(object);\n }\n else if (object < 0x10000) {\n // uint 16\n this.writeU8(0xcd);\n this.writeU16(object);\n }\n else if (object < 0x100000000) {\n // uint 32\n this.writeU8(0xce);\n this.writeU32(object);\n }\n else if (!this.useBigInt64) {\n // uint 64\n this.writeU8(0xcf);\n this.writeU64(object);\n }\n else {\n this.encodeNumberAsFloat(object);\n }\n }\n else {\n if (object >= -0x20) {\n // negative fixint\n this.writeU8(0xe0 | (object + 0x20));\n }\n else if (object >= -0x80) {\n // int 8\n this.writeU8(0xd0);\n this.writeI8(object);\n }\n else if (object >= -0x8000) {\n // int 16\n this.writeU8(0xd1);\n this.writeI16(object);\n }\n else if (object >= -0x80000000) {\n // int 32\n this.writeU8(0xd2);\n this.writeI32(object);\n }\n else if (!this.useBigInt64) {\n // int 64\n this.writeU8(0xd3);\n this.writeI64(object);\n }\n else {\n this.encodeNumberAsFloat(object);\n }\n }\n }\n else {\n this.encodeNumberAsFloat(object);\n }\n }\n encodeNumberAsFloat(object) {\n if (this.forceFloat32) {\n // float 32\n this.writeU8(0xca);\n this.writeF32(object);\n }\n else {\n // float 64\n this.writeU8(0xcb);\n this.writeF64(object);\n }\n }\n encodeBigInt64(object) {\n if (object >= BigInt(0)) {\n // uint 64\n this.writeU8(0xcf);\n this.writeBigUint64(object);\n }\n else {\n // int 64\n this.writeU8(0xd3);\n this.writeBigInt64(object);\n }\n }\n writeStringHeader(byteLength) {\n if (byteLength < 32) {\n // fixstr\n this.writeU8(0xa0 + byteLength);\n }\n else if (byteLength < 0x100) {\n // str 8\n this.writeU8(0xd9);\n this.writeU8(byteLength);\n }\n else if (byteLength < 0x10000) {\n // str 16\n this.writeU8(0xda);\n this.writeU16(byteLength);\n }\n else if (byteLength < 0x100000000) {\n // str 32\n this.writeU8(0xdb);\n this.writeU32(byteLength);\n }\n else {\n throw new Error(`Too long string: ${byteLength} bytes in UTF-8`);\n }\n }\n encodeString(object) {\n const maxHeaderSize = 1 + 4;\n const byteLength = utf8Count(object);\n this.ensureBufferSizeToWrite(maxHeaderSize + byteLength);\n this.writeStringHeader(byteLength);\n utf8Encode(object, this.bytes, this.pos);\n this.pos += byteLength;\n }\n encodeObject(object, depth) {\n // try to encode objects with custom codec first of non-primitives\n const ext = this.extensionCodec.tryToEncode(object, this.context);\n if (ext != null) {\n this.encodeExtension(ext);\n }\n else if (Array.isArray(object)) {\n this.encodeArray(object, depth);\n }\n else if (ArrayBuffer.isView(object)) {\n this.encodeBinary(object);\n }\n else if (typeof object === \"object\") {\n this.encodeMap(object, depth);\n }\n else {\n // symbol, function and other special object come here unless extensionCodec handles them.\n throw new Error(`Unrecognized object: ${Object.prototype.toString.apply(object)}`);\n }\n }\n encodeBinary(object) {\n const size = object.byteLength;\n if (size < 0x100) {\n // bin 8\n this.writeU8(0xc4);\n this.writeU8(size);\n }\n else if (size < 0x10000) {\n // bin 16\n this.writeU8(0xc5);\n this.writeU16(size);\n }\n else if (size < 0x100000000) {\n // bin 32\n this.writeU8(0xc6);\n this.writeU32(size);\n }\n else {\n throw new Error(`Too large binary: ${size}`);\n }\n const bytes = ensureUint8Array(object);\n this.writeU8a(bytes);\n }\n encodeArray(object, depth) {\n const size = object.length;\n if (size < 16) {\n // fixarray\n this.writeU8(0x90 + size);\n }\n else if (size < 0x10000) {\n // array 16\n this.writeU8(0xdc);\n this.writeU16(size);\n }\n else if (size < 0x100000000) {\n // array 32\n this.writeU8(0xdd);\n this.writeU32(size);\n }\n else {\n throw new Error(`Too large array: ${size}`);\n }\n for (const item of object) {\n this.doEncode(item, depth + 1);\n }\n }\n countWithoutUndefined(object, keys) {\n let count = 0;\n for (const key of keys) {\n if (object[key] !== undefined) {\n count++;\n }\n }\n return count;\n }\n encodeMap(object, depth) {\n const keys = Object.keys(object);\n if (this.sortKeys) {\n keys.sort();\n }\n const size = this.ignoreUndefined ? this.countWithoutUndefined(object, keys) : keys.length;\n if (size < 16) {\n // fixmap\n this.writeU8(0x80 + size);\n }\n else if (size < 0x10000) {\n // map 16\n this.writeU8(0xde);\n this.writeU16(size);\n }\n else if (size < 0x100000000) {\n // map 32\n this.writeU8(0xdf);\n this.writeU32(size);\n }\n else {\n throw new Error(`Too large map object: ${size}`);\n }\n for (const key of keys) {\n const value = object[key];\n if (!(this.ignoreUndefined && value === undefined)) {\n this.encodeString(key);\n this.doEncode(value, depth + 1);\n }\n }\n }\n encodeExtension(ext) {\n if (typeof ext.data === \"function\") {\n const data = ext.data(this.pos + 6);\n const size = data.length;\n if (size >= 0x100000000) {\n throw new Error(`Too large extension object: ${size}`);\n }\n this.writeU8(0xc9);\n this.writeU32(size);\n this.writeI8(ext.type);\n this.writeU8a(data);\n return;\n }\n const size = ext.data.length;\n if (size === 1) {\n // fixext 1\n this.writeU8(0xd4);\n }\n else if (size === 2) {\n // fixext 2\n this.writeU8(0xd5);\n }\n else if (size === 4) {\n // fixext 4\n this.writeU8(0xd6);\n }\n else if (size === 8) {\n // fixext 8\n this.writeU8(0xd7);\n }\n else if (size === 16) {\n // fixext 16\n this.writeU8(0xd8);\n }\n else if (size < 0x100) {\n // ext 8\n this.writeU8(0xc7);\n this.writeU8(size);\n }\n else if (size < 0x10000) {\n // ext 16\n this.writeU8(0xc8);\n this.writeU16(size);\n }\n else if (size < 0x100000000) {\n // ext 32\n this.writeU8(0xc9);\n this.writeU32(size);\n }\n else {\n throw new Error(`Too large extension object: ${size}`);\n }\n this.writeI8(ext.type);\n this.writeU8a(ext.data);\n }\n writeU8(value) {\n this.ensureBufferSizeToWrite(1);\n this.view.setUint8(this.pos, value);\n this.pos++;\n }\n writeU8a(values) {\n const size = values.length;\n this.ensureBufferSizeToWrite(size);\n this.bytes.set(values, this.pos);\n this.pos += size;\n }\n writeI8(value) {\n this.ensureBufferSizeToWrite(1);\n this.view.setInt8(this.pos, value);\n this.pos++;\n }\n writeU16(value) {\n this.ensureBufferSizeToWrite(2);\n this.view.setUint16(this.pos, value);\n this.pos += 2;\n }\n writeI16(value) {\n this.ensureBufferSizeToWrite(2);\n this.view.setInt16(this.pos, value);\n this.pos += 2;\n }\n writeU32(value) {\n this.ensureBufferSizeToWrite(4);\n this.view.setUint32(this.pos, value);\n this.pos += 4;\n }\n writeI32(value) {\n this.ensureBufferSizeToWrite(4);\n this.view.setInt32(this.pos, value);\n this.pos += 4;\n }\n writeF32(value) {\n this.ensureBufferSizeToWrite(4);\n this.view.setFloat32(this.pos, value);\n this.pos += 4;\n }\n writeF64(value) {\n this.ensureBufferSizeToWrite(8);\n this.view.setFloat64(this.pos, value);\n this.pos += 8;\n }\n writeU64(value) {\n this.ensureBufferSizeToWrite(8);\n setUint64(this.view, this.pos, value);\n this.pos += 8;\n }\n writeI64(value) {\n this.ensureBufferSizeToWrite(8);\n setInt64(this.view, this.pos, value);\n this.pos += 8;\n }\n writeBigUint64(value) {\n this.ensureBufferSizeToWrite(8);\n this.view.setBigUint64(this.pos, value);\n this.pos += 8;\n }\n writeBigInt64(value) {\n this.ensureBufferSizeToWrite(8);\n this.view.setBigInt64(this.pos, value);\n this.pos += 8;\n }\n}\n//# sourceMappingURL=Encoder.mjs.map","import { Encoder } from \"./Encoder.mjs\";\n/**\n * It encodes `value` in the MessagePack format and\n * returns a byte buffer.\n *\n * The returned buffer is a slice of a larger `ArrayBuffer`, so you have to use its `#byteOffset` and `#byteLength` in order to convert it to another typed arrays including NodeJS `Buffer`.\n */\nexport function encode(value, options) {\n const encoder = new Encoder(options);\n return encoder.encodeSharedRef(value);\n}\n//# sourceMappingURL=encode.mjs.map","import chalk from 'chalk';\n\nimport isNode from 'detect-node';\n\nimport axios from 'axios'\n\nimport { IPublishTransportRESTServerOptions, IInstrumentPayload, IPublisherTransport } from './../../commonTypes'\n\nimport { STSOptionsBase, STSAxiosConfig } from '@nsshunt/stsutils'\n\nimport { encode } from \"@msgpack/msgpack\";\n\nexport class PublishTransportRESTServer extends STSOptionsBase implements IPublisherTransport\n{\n constructor(options: IPublishTransportRESTServerOptions) {\n super(options);\n }\n\n override get options(): IPublishTransportRESTServerOptions {\n return super.options as IPublishTransportRESTServerOptions;\n }\n\n // Returns true for success or false for failure.\n Publish = async (payload: IInstrumentPayload): Promise<boolean> => {\n try {\n if (this.options.showPublishPayload) {\n console.log(chalk.grey(`PublishTransportRESTServer::Publish() url: [${this.options.url}]`))\n console.log(payload)\n }\n const encodedData: Uint8Array = encode(payload, { ignoreUndefined: true});\n //const buffer: Buffer = Buffer.from(encodedData); // copies the data\n //const buffer2: Buffer = Buffer.from(encodedData.buffer, encodedData.byteOffset, encodedData.byteLength); // does not copy the data\n //const headers = { 'Content-Type': 'application/octet-stream', 'Content-Length': encodedData.length };\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const headers: any = { 'Content-Type': 'application/octet-stream' };\n //const headers = { 'Content-Type': 'application/json' };\n let retVal = null;\n //const processStart = performance.now();\n if (this.options.socketPath) {\n retVal = await axios({\n method: 'post',\n data: Buffer.from(encodedData),\n headers: headers,\n socketPath: this.options.socketPath\n });\n } else {\n if (isNode) {\n if (this.options.agentManager) {\n retVal = await axios(new STSAxiosConfig(this.options.url as string, 'post', headers)\n .withData(Buffer.from(encodedData))\n .withAgentManager(this.options.agentManager).config);\n } else {\n retVal = await axios(new STSAxiosConfig(this.options.url as string, 'post', headers)\n .withData(Buffer.from(encodedData)).config);\n }\n } else {\n //@@\n //const blob = new Blob([encodedData], { type: 'application/octet-stream' });\n const blob = new Blob([new Uint8Array(encodedData)], { type: 'application/octet-stream' });\n retVal = await axios(new STSAxiosConfig(this.options.url as string, 'post', headers)\n .withData(blob).config);\n }\n }\n\n if (retVal.status !== 200) {\n\n if (this.options.showPublishPayload) {\n console.log(chalk.red(`PublishTransportRESTServer::Publish() Error (_PerformPublishRESTAPI:_PerformPublish:#publishmessage): Invalid response from server: [${retVal.status}]`))\n }\n \n this.options.logger.debug(chalk.red(`Error (_PerformPublishRESTAPI:_PerformPublish:#publishmessage): Invalid response from server: [${retVal.status}]`));\n return false;\n } else {\n\n if (this.options.showPublishPayload) {\n console.log(chalk.grey(`PublishTransportRESTServer::Publish() _PerformPublishRESTAPI:_PerformPublish:#publishmessage: [${this.options.url}] - Valid response from server: [${retVal.status}]`))\n }\n \n //@@this.options.logger.debug(chalk.green(`_PerformPublishRESTAPI:_PerformPublish:#publishmessage: [${this.options.url}] - Valid response from server: [${retVal.status}]`));\n }\n\n return true;\n \n } catch (error) {\n\n if (this.options.showPublishPayload) {\n console.log(chalk.red(`PublishTransportRESTServer::Publish() Error (PublishRESTServer:_PerformPublishRESTAPI:Error: [${error}]`))\n }\n\n //@@\n //this.options.logger.error(chalk.red(`Error (PublishRESTServer:_PerformPublishRESTAPI:Error: [${error}]`));\n return false;\n }\n }\n\n async Close(): Promise<boolean> {\n if (this.options.agentManager) {\n this.options.agentManager.Terminate();\n }\n return true;\n }\n}\n","import chalk from 'chalk';\n\nimport isNode from 'detect-node'\n\nimport { STSOptionsBase } from '@nsshunt/stsutils'\n\nimport { IPublishInstrumentsOptions, IInstrumentPayload, TransportType, IPublisherTransport } from './../commonTypes'\n\nimport { PublishTransportRESTServer } from './publishers/publishTransportRESTServer'\n\nexport enum ePublishState {\n init,\n started,\n stopping\n}\n/**\n * This class managers the creation of instruments and the publication of instrumentation telemetry to the instrument manager service.\n */\nexport class PublishInstruments extends STSOptionsBase {\n #inPublish = false;\n #observer: NodeJS.Timeout | null = null;\n #publishState: ePublishState = ePublishState.init;\n #publisherTransport: IPublisherTransport | null = null;\n\n constructor(options: IPublishInstrumentsOptions) {\n super(options);\n\n this.#publisherTransport = null;\n switch (options.publishTransportBaseOptions.transportType) {\n case TransportType.RESTAPI :\n this.#publisherTransport = new PublishTransportRESTServer(options.publishTransportBaseOptions);\n break;\n }\n\n this.#UpdateState(ePublishState.init, \"constructor()\");\n }\n\n override get options(): IPublishInstrumentsOptions {\n return super.options as IPublishInstrumentsOptions;\n }\n\t\n async Publish(): Promise<boolean> {\n if (this.#inPublish) {\n return false;\n }\n\n if (this.#publisherTransport) {\n try {\n this.#inPublish = true;\n\n //const instrumentPayload: IInstrumentPayload = this.#GetPayloadData();\n if (this.options.publishInstrumentController) {\n const instrumentPayload: IInstrumentPayload = this.options.publishInstrumentController.GetPayloadData();\n return await this.#publisherTransport.Publish(instrumentPayload);\n }\n\n return false;\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n } catch (error) {\n return false;\n } finally {\n this.#inPublish = false;\n }\n } else {\n return false;\n }\n }\n\n #PublishTimeoutLoop(publishInterval: number) { \n this.#observer = setTimeout(async () => {\n const start = performance.now();\n const result = await this.Publish();\n const end = performance.now();\n const diff = end - start;\n\n if (this.#publishState === ePublishState.started) {\n if (result === true) {\n this.#PublishTimeoutLoop(this.options.publishInterval - (diff));\n } else {\n this.#PublishTimeoutLoop(this.options.publishPostFailInterval - (diff));\n }\n }\n }, publishInterval);\n if (isNode) this.#observer.unref();\n }\n\n async StartPublish(): Promise<boolean> {\n if (this.#publishState !== ePublishState.init) {\n this.options.logger.debug(chalk.yellow(`StartPublish:${this.options.processContext.nid}: StartPublish called when not currently in the init state. Current State: [${this.#publishState}]`));\n return false;\n }\n this.#UpdateState(ePublishState.started, \"StartPublish()\");\n this.#PublishTimeoutLoop(this.options.publishInterval);\n return true;\n }\n\n #UpdateState(newState: ePublishState, comment: string): void {\n const previousState = this.#publishState;\n this.#publishState = newState;\n this.options.logger.debug(chalk.yellow(`#UpdateState:${this.options.processContext.nid}: Previous State: [${previousState}]. Current State: [${this.#publishState}]. Comment: [${comment}]`));\n }\n\n async EndPublish(): Promise<boolean> {\n if (this.#publishState !== ePublishState.started) {\n this.options.logger.debug(chalk.yellow(`EndPublish:${this.options.processContext.nid}: EndPublish called when not within the started state. Current State: [${this.#publishState}]`));\n return false;\n }\n this.#UpdateState(ePublishState.stopping, \"EndPublish() (1)\");\n if (this.#observer !== null) {\n clearTimeout(this.#observer);\n this.#observer = null;\n // Perform a final publish/flush of any remaining instrument data (such as logs etc.)\n await this.Publish();\n }\n if (this.#publisherTransport) {\n await this.#publisherTransport.Close();\n }\n this.#UpdateState(ePublishState.init, \"EndPublish() (2)\");\n return true;\n }\n}\n","/* eslint @typescript-eslint/no-explicit-any: 0 */ // --> OFF\nimport chalk from 'chalk';\n\nimport { GaugeTypes, Gauge, InstrumentBaseOptions, InstrumentBase, InstrumentBaseTelemetry,\n InstrumentLog, InstrumentLogTelemetry, InstrumentGauge, InstrumentHistogram, \n InstrumentVelocity, InstrumentTimerGauge, InstrumentObject\n} from '@nsshunt/stsobservability'\n\nimport { STSOptionsBase } from '@nsshunt/stsutils'\n\nimport { IPublishInstrumentControllerOptions, InstrumentDefinitions, InstrumentDefinition,\n IContextBase, IInstrumentPayload, IPublishInstrumentController, IPublishInstrumentsOptions } from './../commonTypes'\n\nimport { PublishInstruments } from './publishInstruments'\nexport enum ePublishState {\n init,\n started,\n stopping\n}\n/**\n * This class managers the creation of instruments and the publication of instrumentation telemetry to the instrument manager service.\n */\nexport class PublishInstrumentController extends STSOptionsBase implements IPublishInstrumentController {\n #instruments: Record<string, InstrumentBase> = { };\n #publisher: PublishInstruments | null = null;\n\n constructor(options: IPublishInstrumentControllerOptions) {\n super(options);\n this.SetupInstrumentation();\n\n const publishInstrumentsOptions: IPublishInstrumentsOptions = {\n logger: options.logger,\n processContext: { ...options.processContext },\n publishInterval: options.publishInterval,\n publishPostFailInterval: options.publishPostFailInterval,\n publishInstrumentController: this,\n publishTransportBaseOptions: { ...options.publishTransportBaseOptions }\n }\n this.#publisher = new PublishInstruments(publishInstrumentsOptions);\n\n if (this.options.autoStart === true) {\n this.StartPublish();\n }\n }\n\n override get options(): IPublishInstrumentControllerOptions {\n return super.options as IPublishInstrumentControllerOptions;\n }\n\n async StartPublish(): Promise<boolean> {\n return (this.#publisher as PublishInstruments).StartPublish();\n }\n\n async EndPublish(): Promise<boolean> {\n return (this.#publisher as PublishInstruments).EndPublish();\n }\n\n async Publish(): Promise<boolean> {\n return (this.#publisher as PublishInstruments).Publish();\n }\n\n LogEx = (message: string) => {\n this.UpdateInstrument(Gauge.LOGGER, {\n LogMessage: message\n } as InstrumentLogTelemetry);\n }\n\n #GetInstrument(instrumentName: Gauge): InstrumentBase {\n // get the gauge from the internal gauge map - created using the factory function\n return this.#instruments[instrumentName];\n }\n\n #ProcessTelemetryCommand(instrumentName: Gauge, telemetry: InstrumentBaseTelemetry): void {\n const instrument: InstrumentBase = this.#GetInstrument(instrumentName);\n if (instrument) {\n instrument.ProcessTelemetry(telemetry);\n }\n }\n\n // Instrument factory\n #CreateInstrument(instrumentType: GaugeTypes, options: InstrumentBaseOptions): InstrumentBase {\n let instrument: InstrumentBase;\n\n switch (instrumentType) {\n case GaugeTypes.INSTRUMENT_GAUGE :\n instrument = new InstrumentGauge(options);\n break;\n case GaugeTypes.INSTRUMENT_HISTOGRAM :\n instrument = new InstrumentHistogram(options);\n break;\n case GaugeTypes.INSTRUMENT_LOG :\n instrument = new InstrumentLog(options);\n break;\n case GaugeTypes.INSTRUMENT_OBJECT :\n instrument = new InstrumentObject(options);\n break;\n case GaugeTypes.INSTRUMENT_TIMER :\n instrument = new InstrumentTimerGauge(options);\n break;\n case GaugeTypes.INSTRUMENT_VELOCITY :\n instrument = new InstrumentVelocity(options);\n break;\n default :\n throw new Error(`Gauge type: [${instrumentType} not known.]`);\n }\n return instrument;\n }\n\n #CreateInstruments(payload: InstrumentDefinitions): void {\n payload.forEach((instrumentDefinition: InstrumentDefinition) => {\n const g: Gauge = instrumentDefinition[0];\n const gt: GaugeTypes = instrumentDefinition[1];\n const instrumentBaseOptions: InstrumentBaseOptions | undefined = instrumentDefinition[2];\n const instrument: InstrumentBase = this.#CreateInstrument(gt, instrumentBaseOptions as InstrumentBaseOptions);\n // Add to instrument map\n this.#instruments[g] = instrument;\n })\n }\n\n GetPayloadData(): IInstrumentPayload {\n const context = this.options.processContext;\n const instruments = this.#instruments;\n const payloadInstruments: Record<string, InstrumentBase> = { };\n for (const [key, value] of Object.entries(instruments)) {\n if (value instanceof InstrumentLog) {\n payloadInstruments[key] = { ...value.WithUseLatestMessages(true) } as InstrumentLog;\n } else {\n payloadInstruments[key] = { ...value } as InstrumentBase;\n }\n }\n\n return {\n context,\n instruments: payloadInstruments\n } as IInstrumentPayload;\n }\n\n SetupInstrumentation() {\n if (!this.options.instrumentDefinitions) {\n this.options.logger.debug(chalk.yellow(`SetupInstrumentation:${this.options.processContext.nid}: No instrument(s) defined within supplied options.`));\n return;\n }\n if (!this.options.processContext) {\n this.options.logger.debug(chalk.yellow(`SetupInstrumentation: No context defined within supplied options.`));\n return;\n }\n this.#CreateInstruments(this.options.instrumentDefinitions);\n }\n\n /**\n * Check if an instrument exists within the managed instrument collection\n * @param instrumentName \n * @returns \n */\n InstrumentExists(instrumentName: Gauge): boolean {\n if (this.#instruments[instrumentName]) {\n return true;\n }\n return false;\n }\n\n /**\n * Update instrument telemetry.\n * @param instrumentName \n * @param telemetry \n */\n UpdateInstrument(instrumentName: Gauge, telemetry: InstrumentBaseTelemetry): void {\n if (this.#instruments[instrumentName]) {\n this.#ProcessTelemetryCommand(instrumentName, telemetry);\n } else {\n // Error state\n this.options.logger.debug(chalk.red(`UpdateInstrument:${this.options.processContext.nid}: Attempted to UpdateInstrument before initialised.`));\n }\n }\n\n /**\n\t * Add additional instrument publishers. Usually invoked when adding workers to the app and/or async runners within a worker.\n\t * @param processContext \n\t * @returns Returns the newly created PublishInstrumentController\n\t */\n AddPublishInstrumentController(processContext: IContextBase): PublishInstrumentController {\n const options: IPublishInstrumentControllerOptions = { ...this.options };\n options.processContext = processContext;\n return new PublishInstrumentController(options);\n }\n}\n","// Individual STS plugin keys for provide/inject logic\nexport const STSInstrumentControllerPluginKey = Symbol('instrumentController')\n","import chalk from 'chalk';\n\nimport { inject } from 'vue'\n\nimport { PublishInstrumentController } from './publishInstrumentController'\nimport { IPublishInstrumentControllerOptions } from './../commonTypes'\n\nimport { STSInstrumentControllerPluginKey } from './stsPluginKeys';\n\nexport const GetSTSInstrumentControllerPluginKey = (): symbol => STSInstrumentControllerPluginKey\n\nexport const CompareSTSInstrumentControllerPluginKey = (val: symbol): boolean => val === STSInstrumentControllerPluginKey\n\n// Create our use composable. This pattern is also used by vue router library with the useRoute and useRouter composables.\n// https://skirtles-code.github.io/vue-examples/patterns/global-properties.html#application-level-provide-inject\nexport const useSTSInstrumentControllerPlugin = (): PublishInstrumentController => inject(STSInstrumentControllerPluginKey) as PublishInstrumentController\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport const GetSTSInstrumentController = (app: any): PublishInstrumentController => {\n return app.config.globalProperties.$sts[STSInstrumentControllerPluginKey]\n}\n\nexport const STSInstrumentControllerPlugin = {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any \n install: (app: any, options: IPublishInstrumentControllerOptions) => {\n options.logger.debug(chalk.yellow(`STSInstrumentControllerPlugin:install:Start`));\n const aic = new PublishInstrumentController(options);\n\n // Assign plugin instance to global $sts object (legacy method - see below)\n if (!app.config.globalProperties.$sts) {\n options.logger.debug(chalk.cyan(`STSInstrumentControllerPlugin:install: [app.config.globalProperties.$sts] does not exist.`));\n app.config.globalProperties.$sts = { };\n options.logger.debug(chalk.cyan(`STSInstrumentControllerPlugin:install: created empty [app.config.globalProperties.$sts].`));\n } else {\n options.logger.debug(chalk.cyan(`STSInstrumentControllerPlugin:install: [app.config.globalProperties.$sts] already exists.`));\n }\n app.config.globalProperties.$sts.aic = aic; //@@ for legacy implementation in oauthplugin - remove once PublishInstrumentControllerOptions is a seperate plugin\n app.config.globalProperties.$sts[STSInstrumentControllerPluginKey] = aic;\n options.logger.debug(chalk.cyan(`STSInstrumentControllerPlugin:install: AgentInstrumentController installed into [app.config.globalProperties.$sts] using: [${String(STSInstrumentControllerPluginKey)}].`));\n\n // Assign App level provide for this STS plugin using symbol keys\n // https://vuejs.org/guide/components/provide-inject.html#working-with-symbol-keys\n app.provide(STSInstrumentControllerPluginKey, aic);\n options.logger.debug(chalk.cyan(`STSInstrumentControllerPlugin:install: AgentInstrumentController installed into 'provide' using: [${String(STSInstrumentControllerPluginKey)}].`));\n\n options.logger.debug(chalk.green(`STSInstrumentControllerPlugin:install:End`));\n }\n}\n","import { Gauge, GaugeTypes, InstrumentBaseOptions, InstrumentGaugeOptions,\n InstrumentObjectOptions, InstrumentLogOptions\n} from '@nsshunt/stsobservability'\n\nimport { IContextBase, InstrumentDefinitions } from './commonTypes'\n\nimport { SubscriptionTopic } from './commonTypes'\n\nexport type IInstrumentHashMap = Record<string, string>;\n\nexport interface IHistoField {\n label: string\n bucketLimit: number\n}\n\nexport enum influxDBDataType {\n intField = 'intField',\n floatField = 'floatField',\n stringField = 'stringField'\n}\n\nexport interface IFieldRecord {\n fieldName: string\n gauge: Gauge\n instrumentProperty: string\n dataType: string\n influxdbDataType: influxDBDataType\n timeSeriesIndex?: boolean\n quantile?: boolean // Does this field require a quantile ?\n histo?: IHistoField[],\n histoGauge?: Gauge,\n gaugeType: GaugeTypes,\n instrumentOptions?: InstrumentBaseOptions\n}\n\n//@@ current not used - delete if required ...\nexport interface IRedisQueryFilters {\n level1ContextField: string\n level2ContextField: string\n level3ContextField: string\n}\n\nexport interface IRedisIndexPrefixDefinitions {\n timeSeriesIndex: string\n timeSeriesPrefix: string\n instantIndex: string\n instantPrefix: string\n}\n\nexport interface IsubscriptionTopic {\n subscriptionTopic: SubscriptionTopic\n route: string,\n}\n\nexport interface IServiceDefinition {\n influxDBContextTags: string[],\n redisIndexPrefixDefinitions: IRedisIndexPrefixDefinitions\n fieldList: IFieldRecord[] // Specific additional fields (beyond the core fields) that this service supports\n GetPathFromContext: (context: IContextBase) => string\n redisQueryFilters: IRedisQueryFilters\n subscriptionTopics: IsubscriptionTopic[]\n}\n\nexport interface IGlobalServiceDefinitions {\n coreFieldList: IFieldRecord[] // Set of instruments that are used by all service types\n logFieldList: IFieldRecord[] // Set of log instruments that are used by all service types\n services: Record<string, IServiceDefinition>;\n}\n\nconst instrumentationObservationInterval = 1000;\nconst instrumentationTimeWindow = 600;\nconst consoleLogging = false;\nconst instrumentLogging = true;\n\nexport const globalServiceDefinitions: IGlobalServiceDefinitions = {\n coreFieldList: [\n { fieldName: 'requestCount', gauge: Gauge.REQUEST_COUNT_GAUGE, instrumentProperty: 'val', dataType: 'number', influxdbDataType: influxDBDataType.intField, gaugeType: GaugeTypes.INSTRUMENT_GAUGE },\n { fieldName: 'errorCount', gauge: Gauge.ERROR_COUNT_GAUGE, instrumentProperty: 'val', dataType: 'number', influxdbDataType: influxDBDataType.intField, gaugeType: GaugeTypes.INSTRUMENT_GAUGE },\n { fieldName: 'retryCount', gauge: Gauge.RETRY_COUNT_GAUGE, instrumentProperty: 'val', dataType: 'number', influxdbDataType: influxDBDataType.intField, gaugeType: GaugeTypes.INSTRUMENT_GAUGE },\n { fieldName: 'authenticationCount', gauge: Gauge.AUTHENTICATION_COUNT_GAUGE, instrumentProperty: 'val', dataType: 'number', influxdbDataType: influxDBDataType.intField, gaugeType: GaugeTypes.INSTRUMENT_GAUGE },\n { fieldName: 'authenticationErrorCount', gauge: Gauge.AUTHENTICATION_ERROR_COUNT_GAUGE, instrumentProperty: 'val', dataType: 'number', influxdbDataType: influxDBDataType.intField, gaugeType: GaugeTypes.INSTRUMENT_GAUGE },\n { fieldName: 'authenticationRetryCount', gauge: Gauge.AUTHENTICATION_RETRY_COUNT_GAUGE, instrumentProperty: 'val', dataType: 'number', influxdbDataType: influxDBDataType.intField, gaugeType: GaugeTypes.INSTRUMENT_GAUGE },\n { fieldName: 'velocity', gauge: Gauge.VELOCITY_GAUGE, instrumentProperty: 'va', dataType: 'number', influxdbDataType: influxDBDataType.floatField, gaugeType: GaugeTypes.INSTRUMENT_VELOCITY },\n { fieldName: 'activeRequestCount', gauge: Gauge.ACTIVE_REQUEST_GAUGE, instrumentProperty: 'val', dataType: 'number', timeSeriesIndex: true, quantile: true, influxdbDataType: influxDBDataType.intField, \n gaugeType: GaugeTypes.INSTRUMENT_GAUGE,\n instrumentOptions: {\n interval: instrumentationObservationInterval, \n sampleSize: instrumentationTimeWindow \n } as InstrumentGaugeOptions\n },\n { fieldName: 'coreCount', gauge: Gauge.CORE_COUNT_GAUGE, instrumentProperty: 'val', dataType: 'number', influxdbDataType: influxDBDataType.intField, gaugeType: GaugeTypes.INSTRUMENT_GAUGE },\n { fieldName: 'rx', gauge: Gauge.NETWORK_RX_GAUGE, instrumentProperty: 'va', dataType: 'number', influxdbDataType: influxDBDataType.floatField, gaugeType: GaugeTypes.INSTRUMENT_VELOCITY },\n { fieldName: 'tx', gauge: Gauge.NETWORK_TX_GAUGE, instrumentProperty: 'va', dataType: 'number', influxdbDataType: influxDBDataType.floatField, gaugeType: GaugeTypes.INSTRUMENT_VELOCITY },\n { fieldName: 'timer', gauge: Gauge.TIMER_GAUGE, instrumentProperty: 'val', dataType: 'number', influxdbDataType: influxDBDataType.floatField, gaugeType: GaugeTypes.INSTRUMENT_TIMER },\n { fieldName: 'duration', gauge: Gauge.DURATION_GAUGE, instrumentProperty: 'val', dataType: 'number', timeSeriesIndex: true, quantile: true, influxdbDataType: influxDBDataType.floatField, \n gaugeType: GaugeTypes.INSTRUMENT_GAUGE,\n instrumentOptions: {\n interval: instrumentationObservationInterval, \n sampleSize: instrumentationTimeWindow \n } as InstrumentGaugeOptions,\n histo: [\n { label: 'B10', bucketLimit: 10 },\n { label: 'B20', bucketLimit: 20 },\n { label: 'B50', bucketLimit: 50 },\n { label: 'B100', bucketLimit: 100 },\n { label: 'B1000', bucketLimit: 1000 },\n { label: 'B50000', bucketLimit: 50000 },\n { label: 'BInfinity', bucketLimit: -1 }\n ],\n histoGauge: Gauge.DURATION_HISTOGRAM_GAUGE\n },\n { fieldName: 'latency', gauge: Gauge.LATENCY_GAUGE, instrumentProperty: 'val', dataType: 'number', timeSeriesIndex: true, quantile: true, influxdbDataType: influxDBDataType.floatField, \n gaugeType: GaugeTypes.INSTRUMENT_GAUGE,\n instrumentOptions: {\n interval: instrumentationObservationInterval, \n sampleSize: instrumentationTimeWindow \n } as InstrumentGaugeOptions,\n histo: [\n { label: 'B10', bucketLimit: 10 },\n { label: 'B20', bucketLimit: 20 },\n { label: 'B50', bucketLimit: 50 },\n { label: 'B100', bucketLimit: 100 },\n { label: 'B1000', bucketLimit: 1000 },\n { label: 'B50000', bucketLimit: 50000 },\n { label: 'BInfinity', bucketLimit: -1 }\n ],\n histoGauge: Gauge.LATENCY_HISTOGRAM_GAUGE\n }\n ],\n logFieldList: [\n { fieldName: 'log', gauge: Gauge.LOGGER, instrumentProperty: 'val', dataType: 'string', timeSeriesIndex: false, quantile: false, influxdbDataType: influxDBDataType.stringField,\n gaugeType: GaugeTypes.INSTRUMENT_LOG,\n instrumentOptions: {\n consoleLogging: consoleLogging, \n instrumentLogging: instrumentLogging \n } as InstrumentLogOptions\n }\n ],\n services: {\n ['service']: {\n influxDBContextTags: [\n 'serviceId',\n 'serviceName',\n 'serviceVersion',\n 'serviceInstanceId',\n 'serviceInstanceProcessId',\n 'hostName',\n 'pid',\n 'ppid'\n ],\n redisIndexPrefixDefinitions: {\n timeSeriesIndex: 'idx:serviceIndexTimeSeries',\n timeSeriesPrefix: '/serviceTimeSeries:',\n instantIndex: 'idx:serviceIndexInstant',\n instantPrefix: '/serviceInstant:'\n },\n fieldList: [\n { fieldName: 'cpu', gauge: Gauge.CPU_LOAD_GAUGE, instrumentProperty: 'val', dataType: 'number', timeSeriesIndex: true, quantile: true, influxdbDataType: influxDBDataType.floatField, \n gaugeType: GaugeTypes.INSTRUMENT_GAUGE, \n instrumentOptions: {\n interval: instrumentationObservationInterval, \n sampleSize: instrumentationTimeWindow \n } as InstrumentGaugeOptions\n },\n { fieldName: 'connectionCount', gauge: Gauge.CONNECTION_COUNT_GAUGE, instrumentProperty: 'val', dataType: 'number', timeSeriesIndex: true, quantile: true, influxdbDataType: influxDBDataType.intField, \n gaugeType: GaugeTypes.INSTRUMENT_GAUGE,\n instrumentOptions: {\n interval: instrumentationObservationInterval, \n sampleSize: instrumentationTimeWindow \n } as InstrumentGaugeOptions,\n },\n { fieldName: 'connectionPoolCount', gauge: Gauge.CONNECTION_POOL_TOTAL_GAUGE, instrumentProperty: 'val', dataType: 'number', influxdbDataType: influxDBDataType.intField, gaugeType: GaugeTypes.INSTRUMENT_GAUGE },\n { fieldName: 'connectionIdleCount', gauge: Gauge.CONNECTION_POOL_IDLE_GAUGE, instrumentProperty: 'val', dataType: 'number', influxdbDataType: influxDBDataType.intField, gaugeType: GaugeTypes.INSTRUMENT_GAUGE },\n { fieldName: 'connectionWaitingCount', gauge: Gauge.CONNECTION_POOL_WAITING_GAUGE, instrumentProperty: 'val', dataType: 'number', influxdbDataType: influxDBDataType.intField, gaugeType: GaugeTypes.INSTRUMENT_GAUGE },\n { fieldName: 'systemcpu', gauge: Gauge.CPU_SYSTEM_LOAD_GAUGE, instrumentProperty: 'val', dataType: 'number', timeSeriesIndex: true, quantile: true, influxdbDataType: influxDBDataType.floatField, gaugeType: GaugeTypes.INSTRUMENT_GAUGE },\n { fieldName: 'memory', gauge: Gauge.OBJECT_GAUGE, instrumentProperty: 'val', dataType: 'JSON', influxdbDataType: influxDBDataType.stringField, \n gaugeType: GaugeTypes.INSTRUMENT_OBJECT,\n instrumentOptions: {\n label: 'InstrumentObjectMaster'\n } as InstrumentObjectOptions\n }\n ],\n GetPathFromContext(context: IContextBase): string {\n //const { serviceId, serviceInstanceId, hostName, serviceInstanceProcessId, \n //pid, ppid, serviceName, serviceVersion } = instrumentPayload.context;\n const { serviceId, serviceInstanceId, serviceInstanceProcessId } = context;\n return `/${serviceId}/${serviceInstanceId}/${serviceInstanceProcessId}`; //@@ these should line up with the query filer names\n },\n redisQueryFilters: {\n level1ContextField: 'serviceType',\n level2ContextField: 'appid',\n level3ContextField: 'appinstanceid'\n },\n subscriptionTopics: [\n {\n subscriptionTopic: SubscriptionTopic.AllServicesCombined,\n route: '/metrics'\n },\n {\n subscriptionTopic: SubscriptionTopic.Services,\n route: '/metrics/services'\n },\n {\n subscriptionTopic: SubscriptionTopic.ServiceInstances,\n route: '/metrics/services/:key'\n },\n {\n subscriptionTopic: SubscriptionTopic.ServiceInstance,\n route: '/metrics/services/:key/:subkey'\n }\n ]\n },\n ['agent']: {\n influxDBContextTags: [\n 'id',\n 'hostName',\n 'agentName',\n 'threadId',\n 'asyncRunnerId'\n ],\n redisIndexPrefixDefinitions: {\n timeSeriesIndex: 'idx:agentIndexTimeSeries',\n timeSeriesPrefix: '/agentTimeSeries:',\n instantIndex: 'idx:agentIndexInstant',\n instantPrefix: '/agentInstant:'\n },\n fieldList: [\n { fieldName: 'childCount', gauge: Gauge.CHILD_COUNT, instrumentProperty: 'val', dataType: 'number', influxdbDataType: influxDBDataType.intField, gaugeType: GaugeTypes.INSTRUMENT_GAUGE }\n ],\n //@@ need type declare in appframework ?? agent does not use appframework ... perhaps stspublisher\n GetPathFromContext(context: IContextBase): string {\n //const { nid, id, hostName, agentName, threadId, asyncRunnerId } = context;\n const { agentName, threadId, asyncRunnerId } = context;\n return `/${agentName}/${threadId}/${asyncRunnerId}`; //@@ these should line up with the query filer names\n },\n redisQueryFilters: {\n level1ContextField: 'serviceType',\n level2ContextField: 'appid', //@@ this should be named something else\n level3ContextField: 'appinstanceid' //@@ this should be named something else\n },\n subscriptionTopics: [\n {\n subscriptionTopic: SubscriptionTopic.AllAgentsCombined,\n route: '/metrics'\n },\n {\n subscriptionTopic: SubscriptionTopic.Agents,\n route: '/metrics/agents'\n },\n {\n subscriptionTopic: SubscriptionTopic.AgentWorkers,\n route: '/metrics/agents/:key'\n },\n {\n subscriptionTopic: SubscriptionTopic.AgentWorker,\n route: '/metrics/agents/:key/:subkey'\n }\n ]\n },\n ['lambda']: {\n influxDBContextTags: [\n 'technology',\n 'subTechnology',\n 'lambdaFunctionName',\n 'lambdaInstance',\n 'hostName',\n 'processId',\n 'parentProcessId',\n 'useCase',\n 'pattern'\n ],\n redisIndexPrefixDefinitions: {\n timeSeriesIndex: 'idx:lambdaIndexTimeSeries',\n timeSeriesPrefix: '/lambdaTimeSeries:',\n instantIndex: 'idx:lambdaIndexInstant',\n instantPrefix: '/lambdaInstant:'\n },\n fieldList: [\n { fieldName: 'cpu', gauge: Gauge.CPU_LOAD_GAUGE, instrumentProperty: 'val', dataType: 'number', timeSeriesIndex: true, quantile: true, influxdbDataType: influxDBDataType.floatField, gaugeType: GaugeTypes.INSTRUMENT_GAUGE },\n { fieldName: 'connectionCount', gauge: Gauge.CONNECTION_COUNT_GAUGE, instrumentProperty: 'val', dataType: 'number', timeSeriesIndex: true, quantile: true, influxdbDataType: influxDBDataType.intField, gaugeType: GaugeTypes.INSTRUMENT_GAUGE },\n { fieldName: 'connectionPoolCount', gauge: Gauge.CONNECTION_POOL_TOTAL_GAUGE, instrumentProperty: 'val', dataType: 'number', influxdbDataType: influxDBDataType.intField, gaugeType: GaugeTypes.INSTRUMENT_GAUGE },\n { fieldName: 'connectionIdleCount', gauge: Gauge.CONNECTION_POOL_IDLE_GAUGE, instrumentProperty: 'val', dataType: 'number', influxdbDataType: influxDBDataType.intField, gaugeType: GaugeTypes.INSTRUMENT_GAUGE },\n { fieldName: 'connectionWaitingCount', gauge: Gauge.CONNECTION_POOL_WAITING_GAUGE, instrumentProperty: 'val', dataType: 'number', influxdbDataType: influxDBDataType.intField, gaugeType: GaugeTypes.INSTRUMENT_GAUGE },\n { fieldName: 'systemcpu', gauge: Gauge.CPU_SYSTEM_LOAD_GAUGE, instrumentProperty: 'val', dataType: 'number', timeSeriesIndex: true, quantile: true, influxdbDataType: influxDBDataType.floatField, gaugeType: GaugeTypes.INSTRUMENT_GAUGE },\n { fieldName: 'memory', gauge: Gauge.OBJECT_GAUGE, instrumentProperty: 'val', dataType: 'JSON', influxdbDataType: influxDBDataType.stringField, gaugeType: GaugeTypes.INSTRUMENT_OBJECT }\n ],\n //@@ need type declare in appframework\n GetPathFromContext(context: IContextBase): string {\n //const { serviceId, serviceInstanceId, hostName, serviceInstanceProcessId, \n //pid, ppid, serviceName, serviceVersion } = instrumentPayload.context;\n const { technology, subTechnology, lambdaInstance } = context;\n return `/${technology}/${subTechnology}/${lambdaInstance}`;\n },\n redisQueryFilters: {\n level1ContextField: 'serviceType',\n level2ContextField: 'technology',\n level3ContextField: 'subTechnology'\n },\n subscriptionTopics: [\n {\n subscriptionTopic: SubscriptionTopic.AllLambdasCombined, // uicontrollerlanding\n route: '/metrics'\n },\n {\n subscriptionTopic: SubscriptionTopic.LambdaTechnologies, // uicontrollerlambda\n route: '/metrics/lambdas'\n },\n {\n subscriptionTopic: SubscriptionTopic.LambdaSubTechnologies, // uicontrollerlambdasubtechnologies\n route: '/metrics/lambdas/:key'\n },\n {\n subscriptionTopic: SubscriptionTopic.LambdaSubTechnologiesInstance, // uicontrollerlambdasubtechnologiesinstance\n route: '/metrics/lambdas/:key/:subkey'\n }\n ]\n }\n }\n}\n\nexport const GetInstruments = (service: string): InstrumentDefinitions => {\n const fieldList = [\n ...globalServiceDefinitions.coreFieldList,\n ...globalServiceDefinitions.logFieldList,\n ...globalServiceDefinitions.services[service].fieldList\n ]\n const retVal: InstrumentDefinitions = [ ];\n fieldList.forEach(v => {\n if (v.instrumentOptions) {\n retVal.push([v.gauge, v.gaugeType, v.instrumentOptions]);\n } else {\n retVal.push([v.gauge, v.gaugeType]);\n }\n if (v.histo) {\n retVal.push([v.histoGauge as Gauge, GaugeTypes.INSTRUMENT_HISTOGRAM]);\n }\n });\n return retVal;\n}\n","/* eslint @typescript-eslint/no-unused-vars: 0 */ // --> OFF\n/* eslint @typescript-eslint/no-explicit-any: 0 */ // --> OFF\nimport { HistogramDataElement, QuantileDataElement, Gauge, GaugeTypes } from '@nsshunt/stsobservability'\nimport { quantile, histo, IServiceInstanceTelemetry, IAgentInstanceTelemetry, ILambdaInstanceTelemetry } from './../commonTypes'\nimport { globalServiceDefinitions } from './../globalServiceDefinitions'\n\n//import _cloneDeep from 'lodash.clonedeep'\nimport { ISTSLogger, JSONObject } from '@nsshunt/stsutils'\n\nexport interface IModelNode {\n val: number\n vf: string\n value: string\n}\n\nexport interface IModelNodeRawStringArray {\n val: string[]\n}\n\nexport interface IModelNodeJSONFromObject {\n val: any\n}\n\nexport interface IModelNodeQuantile {\n val: number\n vf: string\n value: string\n percentile: QuantileDataElement[]\n percentileFormatted: string\n}\n\nexport interface IModelNodeHist {\n hist: HistogramDataElement[]\n}\n\nexport interface IModelNodes {\n id: string\n instruments: Record<string, IModelNode | IModelNodeRawStringArray | IModelNodeJSONFromObject | IModelNodeQuantile | IModelNodeHist>\n canNavigate?: boolean\n options?: JSONObject\n}\n\nexport class ObservabilityModelUtils {\n static GetModelNode(data: number): IModelNode {\n const fixedSize = 2;\n const padLength = 9;\n try {\n return {\n val: data,\n vf: parseFloat(data.toString()).toFixed(fixedSize).padStart(padLength, ' '),\n value: parseFloat(data.toString()).toFixed(fixedSize)\n }\n } catch (error) {\n return {\n val: 0,\n vf: \"\",\n value: \"\"\n }\n }\n }\n\n static GetModelNodeRawStringArray(data: string[]): IModelNodeRawStringArray {\n try {\n return {\n val: data\n }\n } catch (error) {\n return {\n val: []\n }\n }\n }\n\n static GetModelNodeObject(data: any): IModelNodeJSONFromObject {\n try {\n return {\n val: JSON.parse(data)\n }\n } catch (error) {\n return {\n val: null\n }\n }\n }\n\n static GetModelNodeWithQuantile(data: number, quantileData: quantile): IModelNodeQuantile {\n let quantile: string = '';\n const quantileDataElementArray: QuantileDataElement[] = [ ];\n for (const [key, val] of Object.entries(quantileData)) {\n quantile += parseFloat((val as number).toFixed(2)).toString().padStart(8, ' ');\n quantileDataElementArray.push([\n key,\n val\n ])\n }\n\n const fixedSize = 2;\n const padLength = 9;\n try {\n return {\n val: data,\n vf: parseFloat(data.toString()).toFixed(fixedSize).padStart(padLength, ' '),\n value: parseFloat(data.toString()).toFixed(fixedSize),\n percentile: quantileDataElementArray,\n percentileFormatted: quantile\n }\n } catch (error) {\n return {\n val: 0,\n vf: '',\n value: '',\n percentile: [],\n percentileFormatted: ''\n }\n }\n }\n\n static GetModelNodeHistFromInfluxData(data: histo): IModelNodeHist {\n try {\n const histVal: HistogramDataElement[] = [ ];\n if (data) {\n for (const [key, val] of Object.entries(data)) {\n const dataElement: HistogramDataElement = [\n val as number,\n key,\n parseInt(key)\n ]\n histVal.push(dataElement)\n }\n }\n try {\n return {\n hist: histVal,\n }\n } catch (error) {\n return {\n hist: []\n }\n }\n } catch (error) {\n //console.log(chalk.red(`GetModelNodeHistFromInfluxData: Error [${error}]`));\n return {\n hist: []\n }\n }\n }\n\n static ParseModelNode = (model: IModelNodes, data: IServiceInstanceTelemetry | IAgentInstanceTelemetry | ILambdaInstanceTelemetry, parseLog: string[], gaugeName: Gauge, fieldName: string) => {\n if (fieldName in data) {\n model.instruments[gaugeName] = this.GetModelNode((data as any)[fieldName]);\n } else {\n parseLog.push(`ObservabilityModelUtils:ParseModelNode(): Field not present: [${fieldName}], default to [0]`)\n model.instruments[gaugeName] = this.GetModelNode(0);\n }\n }\n\n static ParseModelNodeWithQuantile = (model: IModelNodes, data: IServiceInstanceTelemetry | IAgentInstanceTelemetry | ILambdaInstanceTelemetry, parseLog: string[], gaugeName: Gauge, fieldName: string, quantileFieldName: string) => {\n if (fieldName in data && quantileFieldName in data) {\n model.instruments[gaugeName] = this.GetModelNodeWithQuantile((data as any)[fieldName], (data as any)[quantileFieldName]);\n } else if (fieldName in data) {\n const dataVal = (data as any)[fieldName];\n parseLog.push(`ObservabilityModelUtils:ParseModelNodeWithQuantile(): QuantileFieldName not present: [${quantileFieldName}], default to [${dataVal},{}]`)\n model.instruments[gaugeName] = this.GetModelNodeWithQuantile(dataVal, {});\n } else {\n parseLog.push(`ObservabilityModelUtils:ParseModelNodeWithQuantile(): Field not present: [${fieldName}], QuantileFieldName not present: [${quantileFieldName}], default to [0,{}]`)\n model.instruments[gaugeName] = this.GetModelNodeWithQuantile(0, {});\n }\n }\n\n static ParseModelNodeHisto = (model: IModelNodes, data: IServiceInstanceTelemetry | IAgentInstanceTelemetry | ILambdaInstanceTelemetry, parseLog: string[], gaugeName: Gauge, fieldName: string) => {\n if (fieldName in data) {\n model.instruments[gaugeName] = this.GetModelNodeHistFromInfluxData((data as any)[fieldName]);\n } else {\n parseLog.push(`ObservabilityModelUtils:ParseModelNodeHisto(): Field not present: [${fieldName}], default to [{}]`)\n model.instruments[gaugeName] = this.GetModelNodeHistFromInfluxData({});\n }\n }\n\n static ParseModelNodeObject = (model: IModelNodes, data: IServiceInstanceTelemetry | IAgentInstanceTelemetry | ILambdaInstanceTelemetry, parseLog: string[], gaugeName: Gauge, fieldName: string) => {\n if (fieldName in data) {\n model.instruments[gaugeName] = this.GetModelNodeObject((data as any)[fieldName]);\n } else {\n parseLog.push(`ObservabilityModelUtils:ParseModelNodeObject(): Field not present: [${fieldName}], default to [{}]`)\n model.instruments[gaugeName] = this.GetModelNodeObject({});\n }\n }\n\n static GetModelData(serviceType: string, model: IModelNodes, data: IServiceInstanceTelemetry | ILambdaInstanceTelemetry | IAgentInstanceTelemetry, parseLog: string[]) {\n const fieldList = [\n ...globalServiceDefinitions.coreFieldList,\n ...globalServiceDefinitions.services[serviceType].fieldList\n ]\n fieldList.forEach(field => {\n if (field.quantile) {\n ObservabilityModelUtils.ParseModelNodeWithQuantile(model, data, parseLog, field.gauge, field.fieldName, `${field.fieldName}_quantile`);\n } else if (field.gaugeType.localeCompare(GaugeTypes.INSTRUMENT_OBJECT) === 0) {\n ObservabilityModelUtils.ParseModelNodeObject(model, data, parseLog, field.gauge, field.fieldName);\n } else {\n ObservabilityModelUtils.ParseModelNode(model, data, parseLog, field.gauge, field.fieldName);\n }\n\n if (field.histo) {\n ObservabilityModelUtils.ParseModelNodeHisto(model, data, parseLog, field.histoGauge as Gauge, `${field.fieldName}_histo`);\n }\n });\n }\n\n static GetModelForService(id: string, data: IServiceInstanceTelemetry, logger: ISTSLogger): IModelNodes | null {\n try {\n const parseLog: string[] = [ ];\n const model: IModelNodes = {\n id,\n instruments: {\n }\n }\n this.GetModelData('service', model, data, parseLog);\n model.instruments[Gauge.LOGGER] = ObservabilityModelUtils.GetModelNodeRawStringArray((data as any)['logMessages']);\n if (parseLog.length > 0) {\n parseLog.forEach(logEntry => logger.debug(logEntry));\n }\n return model;\n } catch (error) {\n return null;\n }\n }\n\n static GetModelForLambda(id: string, data: ILambdaInstanceTelemetry, logger: ISTSLogger): IModelNodes | null {\n try {\n const parseLog: string[] = [ ];\n const model: IModelNodes = {\n id,\n instruments: {\n }\n }\n\n this.GetModelData('lambda', model, data, parseLog);\n\n model.instruments[Gauge.LOGGER] = ObservabilityModelUtils.GetModelNodeRawStringArray((data as any)['logMessages']);\n\n if (parseLog.length > 0) {\n parseLog.forEach(logEntry => logger.debug(logEntry));\n }\n\n return model;\n } catch (error) {\n return null;\n }\n }\n\n static GetModelForAgent(id: string, data: IAgentInstanceTelemetry, logger: ISTSLogger): IModelNodes | null {\n try {\n if (Object.keys(data).length === 0) {\n return null;\n }\n\n const parseLog: string[] = [ ];\n const model: IModelNodes = {\n id,\n instruments: {\n }\n }\n\n this.GetModelData('agent', model, data, parseLog);\n\n model.instruments[Gauge.LOGGER] = ObservabilityModelUtils.GetModelNodeRawStringArray((data as any)['logMessages']);\n\n if (parseLog.length > 0) {\n parseLog.forEach(logEntry => logger.debug(logEntry));\n }\n\n return model;\n } catch (error) {\n return null;\n }\n }\n}\n","/* eslint @typescript-eslint/no-unused-vars: 0 */ // --> OFF\n/* eslint @typescript-eslint/no-explicit-any: 0 */ // --> OFF\nimport chalk from 'chalk';\n\nimport { JSONObject } from '@nsshunt/stsutils'\nimport { ISubscriptionPayload, IServiceInstanceTelemetry, \n IAgentInstanceTelemetry, SubscriptionTopic, IServiceInstances, IServiceInstancesThreads, \n IServices, IAgentWorkers, IAgentWorkerRunners, IAgents,\n ILambdaInstanceTelemetry, ILambdaTechnologies, ILambdaSubTechnologies,ILambdaSubTechnologiesInstance } from './../commonTypes'\n\nimport { ObservabilityModelUtils, IModelNodes, IModelNode } from './observabilitymodelutils'\n\nimport { Gauge } from '@nsshunt/stsobservability'\n\nimport { ISTSLogger } from '@nsshunt/stsutils'\n\nexport interface IObservabilityPayloadTransformerOptions {\n logger: ISTSLogger\n maxLogLength: number\n}\n\nexport enum runStates {\n idle = \"idle\",\n started = \"started\",\n stopped = \"stopped\"\n}\n\nexport class ObservabilityPayloadTransformer {\n #serviceModel: Record<string, IModelNodes | null> = { };\n #agentModel: Record<string, IModelNodes | null> = { };\n #lambdaModel: Record<string, IModelNodes | null> = { };\n #options: IObservabilityPayloadTransformerOptions\n\n #LogDebugMessage(message: any): void {\n this.#options.logger.debug(message);\n }\n\n #LogErrorMessage(message: any): void {\n this.#options.logger.error(message);\n }\n\n constructor(options: IObservabilityPayloadTransformerOptions) {\n this.#options = options;\n }\n\n get serviceModel(): JSONObject {\n return this.#serviceModel;\n }\n\n get agentModel(): JSONObject {\n return this.#agentModel;\n }\n\n get lambdaModel(): JSONObject {\n return this.#lambdaModel;\n }\n\n TransformSubscriptionPayloadCallback(subscriptionPayload: ISubscriptionPayload): void {\n switch (subscriptionPayload.subscriptionKey.topic) {\n // Services -----------------------------------------------------------------------------\n case SubscriptionTopic.AllServicesCombined : // /\n this.CreateModelAllServicesCombined(subscriptionPayload);\n break;\n case SubscriptionTopic.Services : // /serviceId\n this.CreateModelServices(subscriptionPayload);\n break;\n case SubscriptionTopic.ServiceInstances : // /serviceId/serviceInstanceId\n this.CreateModelServiceInstances(subscriptionPayload);\n break;\n case SubscriptionTopic.ServiceInstance : // /serviceId/serviceInstanceId/serviceInstanceProcessId\n this.CreateModelServiceInstance(subscriptionPayload);\n break;\n\n // Lambda -----------------------------------------------------------------------------\n case SubscriptionTopic.AllLambdasCombined : // /\n this.CreateModelAllLambdasCombined(subscriptionPayload);\n break;\n case SubscriptionTopic.LambdaTechnologies : // /technology\n this.CreateModelLambdaTechnologies(subscriptionPayload);\n break;\n case SubscriptionTopic.LambdaSubTechnologies : // /technology/subTechnology\n this.CreateModelLambdaSubTechnologies(subscriptionPayload);\n break;\n case SubscriptionTopic.LambdaSubTechnologiesInstance : // /technology/subTechnology/subTechnologyInstance\n this.CreateModelLambdaSubTechnologiesInstance(subscriptionPayload);\n break;\n\n // Agents -----------------------------------------------------------------------------\n case SubscriptionTopic.AllAgentsCombined : // /\n this.CreateModelAllAgentsCombined(subscriptionPayload);\n break;\n case SubscriptionTopic.Agents : // /agentId\n this.CreateModelAgents(subscriptionPayload);\n break;\n case SubscriptionTopic.AgentWorkers :// /agentId/agentWorkerId\n this.CreateModelAgentWorkers(subscriptionPayload);\n break;\n case SubscriptionTopic.AgentWorker :// /agentId/agentWorkerId/asyncRunnerId\n this.CreateModelAgentWorker(subscriptionPayload);\n break;\n }\n }\n\n // --- [ Services ] ------------------------------------------------------------------------------------------------------------------------------------------------\n\n // /\n CreateModelAllServicesCombined(subscriptionPayload: ISubscriptionPayload): void {\n try {\n this.#serviceModel = { };\n if (subscriptionPayload.subscriptionKey.topic.localeCompare(SubscriptionTopic.AllServicesCombined.toString()) === 0) {\n this.#serviceModel['STS-Service'] = ObservabilityModelUtils.GetModelForService('STS-Service', subscriptionPayload.data as IServiceInstanceTelemetry, this.#options.logger);\n if (this.#serviceModel['STS-Service'] === null) {\n this.#LogDebugMessage(chalk.red(`CreateModelAllServicesCombined():Error: GetModelForService() returned null`));\n }\n }\n } catch (error) {\n this.#LogErrorMessage(error);\n return\n }\n }\n\n // /serviceId\n CreateModelServices(subscriptionPayload: ISubscriptionPayload): void {\n try {\n this.#serviceModel = { };\n for (const [serviceId, serviceTelemetry] of Object.entries(subscriptionPayload.data as IServices)) {\n this.#serviceModel[serviceId] = ObservabilityModelUtils.GetModelForService(serviceId, serviceTelemetry, this.#options.logger);\n if (this.#serviceModel[serviceId] === null) {\n this.#LogDebugMessage(chalk.red(`CreateModelServices():Error: GetModelForService() returned null`));\n }\n }\n } catch (error) {\n return\n }\n }\n \n // /serviceId/serviceInstanceId\n CreateModelServiceInstances(subscriptionPayload: ISubscriptionPayload): void {\n try {\n this.#serviceModel = { };\n for (const [serviceId, service] of Object.entries(subscriptionPayload.data as IServiceInstances)) {\n for (const [serviceInstanceId, serviceInstanceTelemetry] of Object.entries(service)) {\n // Now only show those entries with an active CPU - other dead instances will come back from the server\n // within the 10 minute time series. So these entries will exists for quantile and histo figures.\n if (serviceInstanceTelemetry.cpu && serviceInstanceTelemetry.cpu > 0.0) {\n // Update the model with processed data\n this.#serviceModel[serviceInstanceId] = ObservabilityModelUtils.GetModelForService(serviceInstanceId, serviceInstanceTelemetry, this.#options.logger);\n if (this.#serviceModel[serviceInstanceId] !== null) {\n // Add additional options for navigation (in addition to the 'id' property already sent automatically\n (this.#serviceModel[serviceInstanceId] as IModelNodes).options = { serviceId };\n } else {\n this.#LogDebugMessage(chalk.red(`CreateModelServiceInstances():Error: GetModelForService() returned null`));\n }\n }\n }\n }\n } catch (error) {\n return\n }\n }\n\n // serviceId/serviceInstanceId/serviceInstanceProcessId\n CreateModelServiceInstance(subscriptionPayload: ISubscriptionPayload): void {\n try {\n this.#serviceModel = { };\n for (const [serviceId, service] of Object.entries(subscriptionPayload.data as IServiceInstancesThreads)) {\n for (const [serviceInstanceId, serviceInstance] of Object.entries(service)) {\n for (const [serviceInstanceProcessId, serviceInstanceProcessTelemetry] of Object.entries(serviceInstance)) {\n // Now only show those entries with an active CPU - other dead instances will come back from the server\n // within the 10 minute time series. So these entries will exists for quantile and histo figures.\n if (serviceInstanceProcessTelemetry.cpu && serviceInstanceProcessTelemetry.cpu > 0.0) {\n // Update the model with processed data\n this.#serviceModel[serviceInstanceProcessId] = ObservabilityModelUtils.GetModelForService(serviceInstanceProcessId, serviceInstanceProcessTelemetry, this.#options.logger);\n if (this.#serviceModel[serviceInstanceProcessId] !== null) {\n // Add additional options for navigation (in addition to the 'id' property already sent automatically\n (this.#serviceModel[serviceInstanceProcessId] as IModelNodes).options = { serviceId, serviceInstanceId };\n } else {\n this.#LogDebugMessage(chalk.red(`CreateModelServiceInstance():Error: GetModelForService() returned null`));\n }\n }\n }\n }\n }\n } catch (error) {\n return\n }\n }\n\n // --- [ Agents ] ------------------------------------------------------------------------------------------------------------------------------------------------\n \n // /\n CreateModelAllAgentsCombined(subscriptionPayload: ISubscriptionPayload): void {\n try {\n this.#agentModel = { };\n if (subscriptionPayload.subscriptionKey.topic.localeCompare(SubscriptionTopic.AllAgentsCombined.toString()) === 0) {\n if (Object.keys(subscriptionPayload.data as IAgentInstanceTelemetry).length !== 0) {\n this.#agentModel['STS-Agent'] = ObservabilityModelUtils.GetModelForAgent('STS-Agent', subscriptionPayload.data as IAgentInstanceTelemetry, this.#options.logger);\n if (this.#agentModel['STS-Agent'] === null) {\n this.#LogDebugMessage(chalk.red(`CreateModelAllAgentsCombined():Error: GetModelForAgent() returned null`));\n }\n }\n }\n } catch (error) {\n this.#LogErrorMessage(error);\n return\n }\n }\n\n // /agentId\n CreateModelAgents(subscriptionPayload: ISubscriptionPayload): void {\n try {\n this.#agentModel = { };\n for (const [agentId, agentInstanceTelemetry] of Object.entries(subscriptionPayload.data as IAgents)) {\n // Now only show those entries with an active timer - other dead instances will come back from the server\n // within the 10 minute time series. So these entries will exists for quantile and histo figures.\n if (agentInstanceTelemetry.timer) {\n this.#agentModel[agentId] = ObservabilityModelUtils.GetModelForAgent(agentId, agentInstanceTelemetry, this.#options.logger);\n if (this.#agentModel[agentId] !== null) {\n } else {\n this.#LogDebugMessage(chalk.red(`CreateModelAgents():Error: GetModelForAgent() returned null`));\n }\n }\n }\n } catch (error) {\n this.#LogErrorMessage(chalk.red(`UIControllerAgent:CreateModel(): Error: [${error}]`));\n }\n }\n\n // /agentId/agentWorkerId\n CreateModelAgentWorkers(subscriptionPayload: ISubscriptionPayload): void {\n try {\n this.#agentModel = { };\n for (const [agentId, agentWorker] of Object.entries(subscriptionPayload.data as IAgentWorkers)) {\n for (const [agentWorkerId, agentInstanceTelemetry] of Object.entries(agentWorker)) {\n // Now only show those entries with an active timer - other dead instances will come back from the server\n // within the 10 minute time series. So these entries will exists for quantile and histo figures.\n if (agentInstanceTelemetry.timer) {\n //const threadKey = `${agentName}_${threadId}`;\n const threadKey = `${agentWorkerId}`;\n this.#agentModel[threadKey] = ObservabilityModelUtils.GetModelForAgent(threadKey, agentInstanceTelemetry, this.#options.logger);\n if (this.#agentModel[threadKey] !== null) {\n const coreCount = (((this.#agentModel[threadKey] as IModelNodes).instruments[Gauge.CORE_COUNT_GAUGE]) as IModelNode).val;\n (this.#agentModel[threadKey] as IModelNodes).canNavigate = coreCount > 0;\n // Add additional options for navigation (in addition to the 'id' property already sent automatically\n (this.#agentModel[threadKey] as IModelNodes).options = { agentId };\n } else {\n this.#LogDebugMessage(chalk.red(`CreateModelAgentWorkers():Error: GetModelForAgent() returned null`));\n }\n }\n }\n }\n } catch (error) {\n this.#LogErrorMessage(chalk.red(`UIControllerAgentThreads:CreateModel(): Error: [${error}]`));\n }\n }\n\n // /agentId/agentWorkerId/asyncRunnerId\n CreateModelAgentWorker(subscriptionPayload: ISubscriptionPayload): void {\n try {\n this.#agentModel = { };\n for (const [agentId, agentWorker] of Object.entries(subscriptionPayload.data as IAgentWorkerRunners)) {\n for (const [agentWorkerId, asyncRunnerData] of Object.entries(agentWorker)) {\n for (const [asyncRunnerId, agentInstanceTelemetry] of Object.entries(asyncRunnerData)) {\n // Now only show those entries with an active timer - other dead instances will come back from the server\n // within the 10 minute time series. So these entries will exists for quantile and histo figures.\n if (agentInstanceTelemetry.timer) {\n this.#agentModel[asyncRunnerId] = ObservabilityModelUtils.GetModelForAgent(asyncRunnerId, agentInstanceTelemetry, this.#options.logger);\n }\n }\n }\n }\n } catch (error) {\n this.#LogErrorMessage(chalk.red(`UIControllerAgentThread:CreateModel(): Error: [${error}]`));\n }\n }\n // --- [ Lambdas ] ------------------------------------------------------------------------------------------------------------------------------------------------\n\n // /\n CreateModelAllLambdasCombined(subscriptionPayload: ISubscriptionPayload): void {\n try {\n this.#lambdaModel = { };\n if (subscriptionPayload.subscriptionKey.topic.localeCompare(SubscriptionTopic.AllLambdasCombined.toString()) === 0) {\n this.#lambdaModel['STS-Lambda'] = ObservabilityModelUtils.GetModelForLambda('STS-Lambda', subscriptionPayload.data as ILambdaInstanceTelemetry, this.#options.logger);\n if (this.#lambdaModel['STS-Lambda'] === null) {\n this.#LogDebugMessage(chalk.red(`CreateModelAllLambdasCombined():Error: GetModelForLambda() returned null`));\n }\n }\n } catch (error) {\n this.#LogErrorMessage(error);\n return\n }\n }\n\n // /technologyId\n CreateModelLambdaTechnologies(subscriptionPayload: ISubscriptionPayload): void {\n try {\n this.#lambdaModel = { };\n for (const [technologyId, technologyTelemetry] of Object.entries(subscriptionPayload.data as ILambdaTechnologies)) {\n this.#lambdaModel[technologyId] = ObservabilityModelUtils.GetModelForLambda(technologyId, technologyTelemetry, this.#options.logger);\n if (this.#lambdaModel[technologyId] === null) {\n this.#LogDebugMessage(chalk.red(`CreateModelLambdaTechnologies():Error: GetModelForLambda() returned null`));\n }\n }\n } catch (error) {\n return\n }\n }\n\n // /technologyId/subTechnologyId\n CreateModelLambdaSubTechnologies(subscriptionPayload: ISubscriptionPayload): void {\n try {\n this.#lambdaModel = { };\n //console.log(chalk.red(`CreateModelLambdaSubTechnologies()-zz: [${JSON.stringify(subscriptionPayload.data)}]`));\n for (const [technologyId, technologyTelemetry] of Object.entries(subscriptionPayload.data as ILambdaSubTechnologies)) {\n for (const [subTechnologyId, subTechnologyTelemetry] of Object.entries(technologyTelemetry)) {\n // Now only show those entries with an active CPU - other dead instances will come back from the server\n // within the 10 minute time series. So these entries will exists for quantile and histo figures.\n if (subTechnologyTelemetry.cpu && subTechnologyTelemetry.cpu > 0.0) {\n // Update the model with processed data\n this.#lambdaModel[subTechnologyId] = ObservabilityModelUtils.GetModelForLambda(subTechnologyId, subTechnologyTelemetry, this.#options.logger);\n if (this.#lambdaModel[subTechnologyId] !== null) {\n // Add additional options for navigation (in addition to the 'id' property already sent automatically\n (this.#lambdaModel[subTechnologyId] as IModelNodes).options = { technologyId };\n } else {\n this.#LogDebugMessage(chalk.red(`CreateModelLambdaSubTechnologies():Error: GetModelForLambda() returned null`));\n }\n }\n }\n }\n } catch (error) {\n return\n }\n }\n\n // /technologyId/subTechnologyId/subTechnologyInstanceId\n CreateModelLambdaSubTechnologiesInstance(subscriptionPayload: ISubscriptionPayload): void {\n try {\n this.#lambdaModel = { };\n //console.log(chalk.red(`CreateModelLambdaSubTechnologies()-zz: [${JSON.stringify(subscriptionPayload.data)}]`));\n for (const [technologyId, technologyTelemetry] of Object.entries(subscriptionPayload.data as ILambdaSubTechnologiesInstance)) {\n for (const [subTechnologyId, subTechnologyTelemetry] of Object.entries(technologyTelemetry)) {\n for (const [subTechnologyInstanceId, subTechnologyInstanceTelemetry] of Object.entries(subTechnologyTelemetry)) {\n // Now only show those entries with an active CPU - other dead instances will come back from the server\n // within the 10 minute time series. So these entries will exists for quantile and histo figures.\n if (subTechnologyInstanceTelemetry.cpu && subTechnologyInstanceTelemetry.cpu > 0.0) {\n // Update the model with processed data\n this.#lambdaModel[subTechnologyInstanceId] = ObservabilityModelUtils.GetModelForLambda(subTechnologyInstanceId, subTechnologyInstanceTelemetry, this.#options.logger);\n if (this.#lambdaModel[subTechnologyInstanceId] !== null) {\n // Add additional options for navigation (in addition to the 'id' property already sent automatically\n (this.#lambdaModel[subTechnologyInstanceId] as IModelNodes).options = { technologyId, subTechnologyId };\n } else {\n this.#LogDebugMessage(chalk.red(`CreateModelLambdaSubTechnologiesInstance():Error: GetModelForLambda() returned null`));\n }\n }\n }\n }\n }\n } catch (error) {\n return\n }\n }\n}\n","/* eslint @typescript-eslint/no-unused-vars: 0 */ // --> OFF\n/* eslint @typescript-eslint/no-explicit-any: 0 */ // --> OFF\nimport { ISubscription, ISubscriptions, ISubscriptionPayload, SubscriptionTopic, IObservabilitySocketIOSubscriberOptions } from './../commonTypes'\n\nimport chalk from 'chalk';\n\nimport axios from 'axios';\n\nimport isNode from 'detect-node'\n//import { AgentManager, STSAxiosConfig } from '@nsshunt/stsutils';\n\nimport { STSAxiosConfig } from '@nsshunt/stsutils';\n\ndeclare interface ISocketSubscribeKeepAlive {\n id: string\n timeout?: number\n}\n\nexport class RESTClientSubscriber {\n #socketSubscribeKeepAlive: Record<string, ISocketSubscribeKeepAlive> = { };\n #options: IObservabilitySocketIOSubscriberOptions\n // This is required becuase each call to .bind create a new replica bound function - so we need the same instance for on/off event bindings.\n KeepAliveAckBoundFunction: any;\n #currentSubscriptions: ISubscriptions = [ ];\n\n constructor(options: IObservabilitySocketIOSubscriberOptions) {\n this.#options = options;\n }\n\n #LogDebugMessage(message: any): void {\n this.#options.logger.debug(message);\n }\n\n #LogErrorMessage(message: any): void {\n this.#options.logger.error(message);\n }\n\n async Subscribe(subscriptions: ISubscriptions): Promise<void> {\n subscriptions.map(async (subId) => {\n // Subscribe to socket.io event from stsinstrumentmanager\n this.#RemoveKeepAlive(subId);\n this.#LogDebugMessage(chalk.yellow(`RESTClientSubscriber:Subscribe(): Sending subscribe: subscriptionKey: [${subId.subscriptionKey.id}]`));\n try {\n this.#AddKeepAlive(subId);\n } catch (error) {\n this.#LogErrorMessage(chalk.red(`RESTClientSubscriber:Subscribe(): Error: response: [${JSON.stringify(error)}]`));\n this.#RemoveKeepAlive(subId);\n }\n });\n }\n\n UnSubscribe(subscriptions: ISubscriptions) {\n subscriptions.map(async (subId) => {\n // Unsubscribe to socket.io event from stsinstrumentmanager\n this.#RemoveKeepAlive(subId);\n this.#LogDebugMessage(chalk.yellow(`RESTClientSubscriber:UnSubscribe(): Sending unsubscribe: subscriptionKey: [${subId.subscriptionKey.id}]`));\n });\n }\n\n UpdateModelCursor = (subscriptions: ISubscriptions): void => {\n this.#LogDebugMessage(chalk.yellow(`RESTClientSubscriber:UnSubscribe(): UpdateModelCursor()`));\n this.UnSubscribe(this.#currentSubscriptions);\n this.#currentSubscriptions = subscriptions;\n this.Subscribe(this.#currentSubscriptions);\n }\n\n async #InvokeRESTAPI(subscription: ISubscription): Promise<any> {\n this.#LogDebugMessage(chalk.yellow(`RESTClientSubscriber:#InvokeRESTAPI(): subscriptionKey: [${subscription.subscriptionKey.id}]`));\n // Service subscriptions\n const { subscriptionKey } = subscription;\n let url: string = '';\n switch (subscriptionKey.topic) {\n // Services -------------------------------------------------------------------------------------------\n case SubscriptionTopic.AllServicesCombined : // /metrics = getMetrics\n url = `/metrics`;\n break;\n case SubscriptionTopic.Services : // /metrics/:apptype = getApps apptype = services\n url = `/metrics/services`;\n break;\n case SubscriptionTopic.ServiceInstances :\n if (subscriptionKey.key) { // key = service_id /metrics/:apptype/:appid = getApp\n url = `/metrics/services/${subscriptionKey.key}`;\n break;\n } else {\n throw new Error(`#OutputSubscription(Services): key not provided for subscription: [${JSON.stringify(subscriptionKey)}]`);\n }\n case SubscriptionTopic.ServiceInstance :\n url = `/metrics/services/${subscriptionKey.key}`;\n if (subscriptionKey.key && subscriptionKey.subkey) { // key = service instance id /metrics/:apptype/:appid/:appinstanceid = getAppInstance\n url = `/metrics/services/${subscriptionKey.key}/${subscriptionKey.subkey}`;\n break;\n } else {\n throw new Error(`#OutputSubscription(Services): key not provided for subscription: [${JSON.stringify(subscriptionKey)}]`);\n }\n\n // Lambdas -------------------------------------------------------------------------------------------\n case SubscriptionTopic.AllLambdasCombined : // /metrics = getMetrics\n url = `/metrics`;\n break;\n case SubscriptionTopic.LambdaTechnologies : // /metrics/:apptype = getApps apptype = services\n url = `/metrics/lambdas`;\n break;\n case SubscriptionTopic.LambdaSubTechnologies :\n if (subscriptionKey.key) { // key = service_id /metrics/:apptype/:appid = getApp\n url = `/metrics/lambdas/${subscriptionKey.key}`;\n break;\n } else {\n throw new Error(`#OutputSubscription(Lambdas): key not provided for subscription: [${JSON.stringify(subscriptionKey)}]`);\n }\n case SubscriptionTopic.LambdaSubTechnologiesInstance :\n url = `/metrics/lambdas/${subscriptionKey.key}`;\n if (subscriptionKey.key && subscriptionKey.subkey) { // key = service instance id /metrics/:apptype/:appid/:appinstanceid = getAppInstance\n url = `/metrics/lambdas/${subscriptionKey.key}/${subscriptionKey.subkey}`;\n break;\n } else {\n throw new Error(`#OutputSubscription(Lambdas): key not provided for subscription: [${JSON.stringify(subscriptionKey)}]`);\n }\n\n // User Agents -------------------------------------------------------------------------------------------\n case SubscriptionTopic.AllAgentsCombined : // /metrics = getMetrics (@@ called twice ??)\n url = `/metrics`;\n break;\n case SubscriptionTopic.Agents : // /metrics/:apptype = getApps apptype = agents\n url = `/metrics/agents`;\n break;\n case SubscriptionTopic.AgentWorkers :\n if (subscriptionKey.key) { // key = agent instance id /metrics/:apptype/:appid = getApp\n url = `/metrics/agents/${subscriptionKey.key}`;\n break;\n } else {\n throw new Error(`#OutputSubscription(Agents): key not provided for subscription: [${JSON.stringify(subscriptionKey)}]`);\n }\n case SubscriptionTopic.AgentWorker : // /metrics/:apptype/:appid/:appinstanceid = getAppInstance\n if (subscriptionKey.key && subscriptionKey.subkey) { // key = agent instance id, subkey = agent instance worker id\n url = `/metrics/agents/${subscriptionKey.key}/${subscriptionKey.subkey}`;\n break;\n } else {\n throw new Error(`#OutputSubscription(Agents): key and/or subkey not provided for subscription: [${JSON.stringify(subscriptionKey.topic)}]`);\n }\n }\n if (url.localeCompare('') !== 0) {\n const endPointUrl = `${this.#options.urlBase}${url}`;\n\n let retVal: any;\n\n const start = performance.now();\n try {\n this.#LogDebugMessage(chalk.yellow(`RESTClientSubscriber:#InvokeRESTAPI(): axios call: endPointUrl: [${endPointUrl}]`));\n if (isNode && this.#options.agentManager) {\n retVal = await axios(new STSAxiosConfig(endPointUrl, 'get')\n .withDefaultHeaders()\n .withAgentManager(this.#options.agentManager).config);\n } else {\n retVal = await axios(new STSAxiosConfig(endPointUrl, 'get')\n .withDefaultHeaders().config);\n }\n\n /*\n retVal = await axios(new STSAxiosConfig(endPointUrl, 'get')\n .withDefaultHeaders().config);\n */\n\n if (retVal) {\n if (retVal.data) {\n //@@ could use silly here\n //@@this.#LogDebugMessage(chalk.yellow(`RESTClientSubscriber:#InvokeRESTAPI(): retVal.data: [${JSON.stringify(retVal.data)}]`));\n } else {\n this.#LogDebugMessage(chalk.yellow(`RESTClientSubscriber:#InvokeRESTAPI(): no retVal.data`)); \n }\n } else {\n this.#LogDebugMessage(chalk.yellow(`RESTClientSubscriber:#InvokeRESTAPI(): no retVal`));\n }\n\n const end = performance.now();\n const diff = end - start;\n //console.log(`total time: [${diff}]`);\n\n if (subscriptionKey.topic.localeCompare(SubscriptionTopic.AllServicesCombined) === 0) {\n return retVal.data['services'];\n }\n \n if (subscriptionKey.topic.localeCompare(SubscriptionTopic.AllAgentsCombined) === 0) {\n return retVal.data['agents'];\n }\n\n if (subscriptionKey.topic.localeCompare(SubscriptionTopic.AllLambdasCombined) === 0) {\n return retVal.data['lambdas'];\n }\n return retVal.data;\n } catch (error) {\n this.#LogErrorMessage(chalk.red(`RESTClientSubscriber:#InvokeRESTAPI(): subscriptionKey: [${subscription.subscriptionKey.id}], Error: [${error}]`));\n //console.error(chalk.red(`RESTClientSubscriber:#InvokeRESTAPI(): Error: [${error}]`));\n return null;\n }\n } else {\n return null;\n }\n }\n\n #GetData = async (subscription: ISubscription) => {\n try {\n this.#LogDebugMessage(chalk.yellow(`RESTClientSubscriber:#GetData(): subscriptionKey: [${JSON.stringify(subscription.subscriptionKey)}`));\n const retVal = await this.#InvokeRESTAPI(subscription);\n if (retVal) {\n const payload: ISubscriptionPayload = {\n subscriptionKey: subscription.subscriptionKey,\n data: retVal\n };\n //@@ could use silly here\n //this.#LogDebugMessage(chalk.yellow(`RESTClientSubscriber:#GetData(): data returned: subscriptionKey: [${JSON.stringify(subscription.subscriptionKey)}, retVal: [${JSON.stringify(retVal)}]`));\n this.#LogDebugMessage(chalk.yellow(`RESTClientSubscriber:#GetData(): data returned: subscriptionKey: [${JSON.stringify(subscription.subscriptionKey)}`));\n subscription.cb(payload);\n } else {\n this.#LogDebugMessage(chalk.yellow(`RESTClientSubscriber:#GetData(): No data returned: subscriptionKey: [${JSON.stringify(subscription.subscriptionKey)}`));\n }\n } catch (error) {\n this.#LogErrorMessage(chalk.red(`RESTClientSubscriber:#AddKeepAlive(): Error response: [${JSON.stringify(error)}]`));\n this.#RemoveKeepAlive(subscription);\n }\n }\n\n #SetupTimeout(socketSubscribeKeepAlive: ISocketSubscribeKeepAlive, subscription: ISubscription, timeout: number): number {\n return setTimeout(async () => {\n try {\n const start = performance.now();\n await this.#GetData(subscription);\n if (socketSubscribeKeepAlive.timeout) {\n const end = performance.now();\n const diff = end - start;\n let timeoutDuration = (this.#options.keepAlive ?? 1000) - diff;\n if (timeoutDuration < 500) {\n timeoutDuration = 500;\n }\n this.#LogDebugMessage(chalk.yellow(`Total duration for subscription: [${diff}], waiting: [${timeoutDuration}]`));\n socketSubscribeKeepAlive.timeout = this.#SetupTimeout(socketSubscribeKeepAlive, subscription, timeoutDuration)\n } else {\n this.#LogDebugMessage(chalk.yellow(`RESTClientSubscriber: Subscription removed: [${socketSubscribeKeepAlive.id}]. Processing terminate.`));\n }\n } catch (error) {\n this.#LogErrorMessage(chalk.red(`RESTClientSubscriber:#AddKeepAlive(): Error response: [${JSON.stringify(error)}]`));\n this.#RemoveKeepAlive(subscription);\n }\n }, timeout) as any\n }\n\n\n #AddKeepAlive(subscription: ISubscription): void {\n this.#LogDebugMessage(chalk.yellow(`RESTClientSubscriber:#AddKeepAlive(): subscriptionKey: [${subscription.subscriptionKey.id}]`));\n this.#RemoveKeepAlive(subscription);\n const socketSubscribeKeepAlive:ISocketSubscribeKeepAlive = {\n id: subscription.subscriptionKey.id,\n }\n socketSubscribeKeepAlive.timeout = this.#SetupTimeout(socketSubscribeKeepAlive, subscription, (this.#options.keepAlive ?? 1000));\n this.#socketSubscribeKeepAlive[subscription.subscriptionKey.id] = socketSubscribeKeepAlive;\n\n this.#LogDebugMessage(chalk.yellow(`RESTClientSubscriber:#AddKeepAlive(): Getting Data: subscriptionKey: [${subscription.subscriptionKey.id}]`));\n this.#GetData(subscription);\n }\n\n #RemoveKeepAlive(subscription: ISubscription): void {\n if (this.#socketSubscribeKeepAlive[subscription.subscriptionKey.id]) {\n this.#LogDebugMessage(chalk.gray(`RESTClientSubscriber:#RemoveKeepAlive(): subscriptionKey: [${subscription.subscriptionKey.id}]`));\n clearTimeout(this.#socketSubscribeKeepAlive[subscription.subscriptionKey.id].timeout);\n delete this.#socketSubscribeKeepAlive[subscription.subscriptionKey.id].timeout;\n delete this.#socketSubscribeKeepAlive[subscription.subscriptionKey.id];\n }\n }\n}","/* eslint @typescript-eslint/no-unused-vars: 0, @typescript-eslint/no-explicit-any: 0 */ // --> OFF\nimport { Socket } from 'socket.io-client'\n\nimport { type ISubscriptions, ClientToServerEvents, ISubscriptionPayload, ServerToClientEvents, ISubscription } from './../commonTypes'\n\nimport { defaultLogger } from '@nsshunt/stsutils'\n\nimport chalk from 'chalk';\n\nimport { SocketIoClient, STSDefaultClientToServerEvents, STSDefaultServerToClientEvents } from '@nsshunt/stssocketioutils'\n\n//import { v4 as uuidv4 } from 'uuid';\n\nimport { IObservabilitySubscriberManagerOptions } from './../commonTypes'\n\nconst SOCKET_NAMESPACE = 'stsinstrumentmanager/stsmonitor'\n\nexport class SocketClientSubscriber extends SocketIoClient<ServerToClientEvents, ClientToServerEvents> {\n #options: IObservabilitySubscriberManagerOptions;\n #id: string;\n #currentSubscriptions: ISubscriptions = [ ];\n\n protected subscriptions: Record<string, ISubscription> = { };\n\n constructor(options: IObservabilitySubscriberManagerOptions) {\n super('STSVueTilsTester');\n this.#id = globalThis.crypto.randomUUID();\n this.#options = options;\n\n this.LogDebugMessage(chalk.cyan(`${this.logPrefix}Start()`));\n const url = `${this.#options.instrumentManagerEndpoint}:${this.#options.instrumentManagerPort}/${SOCKET_NAMESPACE}/`;\n this.LogDebugMessage(chalk.cyan(`${this.logPrefix}SetupSocket() url: [${url}]`));\n this.WithAddress(url)\n .WithLogger(this.#options.logger ?? defaultLogger)\n .SetupSocket();\n }\n \n get id() {\n return this.#id;\n }\n\n get logPrefix() {\n if (this.#options) {\n return `stsimclient:ObservabilitySubscriberManager[${this.#options.consumeInstrumentationMode}]:`;\n } else {\n return `stsimclient:ObservabilitySubscriberManager:`;\n }\n }\n\n UpdateModelCursor = (subscriptions: ISubscriptions): void => {\n this.UnSubscribe(this.#currentSubscriptions);\n this.#currentSubscriptions = subscriptions;\n this.Subscribe(this.#currentSubscriptions);\n }\n\n Subscribe(subscriptions: ISubscriptions) {\n subscriptions.map(async (subId) => {\n // Subscribe to socket.io event from stsinstrumentmanager\n try {\n if (this.socket) {\n this.LogDebugMessage(chalk.yellow(`ObservabilitySocketIOSubscriber:Subscribe(): Sending subscribe: subscriptionKey: [${subId.subscriptionKey.id}]`));\n this.socket.timeout(1000).emit('subscribe', subId.subscriptionKey, (error: Error, data: any) => {\n if (error) {\n this.LogErrorMessage(chalk.red(`ObservabilitySocketIOSubscriber:Subscribe(): Error: [${error}], data: [${data}]`));\n } else {\n this.LogDebugMessage(chalk.green(`ObservabilitySocketIOSubscriber:Subscribe(): Response: [${JSON.stringify(data)}]`));\n this.subscriptions[subId.subscriptionKey.id] = subId;\n }\n });\n }\n } catch (error) {\n this.LogErrorMessage(chalk.red(`ObservabilitySocketIOSubscriber:Subscribe(): Error: response: [${JSON.stringify(error)}]`));\n }\n });\n }\n\n UnSubscribe(subscriptions: ISubscriptions) {\n subscriptions.map(async (subId) => {\n try {\n if (this.socket) {\n this.LogDebugMessage(chalk.yellow(`ObservabilitySocketIOSubscriber:UnSubscribe(): Sending unsubscribe: subscriptionKey: [${subId.subscriptionKey.id}]`));\n this.socket.timeout(1000).emit('unsubscribe', subId.subscriptionKey, (error: Error, data: any) => {\n if (error) {\n this.LogErrorMessage(chalk.red(`ObservabilitySocketIOSubscriber:UnSubscribe(): Error: [${error}], data: [${data}]`));\n } else {\n this.LogDebugMessage(chalk.green(`ObservabilitySocketIOSubscriber:UnSubscribe(): Response: [${JSON.stringify(data)}]`));\n delete this.subscriptions[subId.subscriptionKey.id];\n }\n });\n }\n } catch (error) {\n this.LogErrorMessage(chalk.red(`ObservabilitySocketIOSubscriber:UnSubscribe(): Error response: [${JSON.stringify(error)}]`));\n }\n });\n }\n\n protected SocketConnect(socket: Socket<STSDefaultServerToClientEvents, STSDefaultClientToServerEvents>): void {\n this.LogDebugMessage(chalk.magenta(`${this.logPrefix}SocketConnect(): Socket ID: [${socket.id}]`));\n this.UpdateModelCursor(this.#currentSubscriptions);\n }\n\n protected SocketError(error: Error): void {\n this.LogErrorMessage(chalk.red(`${this.logPrefix}SocketError(): Error: [${error}]`))\n }\n\n protected SetupSocketEvents(socket: Socket<STSDefaultServerToClientEvents, STSDefaultClientToServerEvents>): void {\n this.LogDebugMessage(chalk.magenta(`${this.logPrefix}SetupSocketEvents(): Socket ID: [${socket.id}]`));\n if (this.socket) {\n this.socket.on('subscriptionData', (data: ISubscriptionPayload, cb) => {\n this.LogDebugMessage(chalk.magenta(`${this.logPrefix}SetupSocketEvents(): on subscriptionData(): Socket ID: [${socket.id}]`));\n const subId = data.subscriptionKey.id;\n const currentSubscriptions = Object.keys(this.subscriptions).toString();\n if (this.subscriptions[subId]) {\n this.subscriptions[subId].cb(data);\n cb(`stsuxvue:subscriptionData Response: [${JSON.stringify(data.subscriptionKey)}], Current Subscriptions: [${currentSubscriptions}]`);\n } else {\n cb(`stsuxvue:subscriptionData Response: No subscription found in subscriptions: [${JSON.stringify(data.subscriptionKey)}], Current Subscriptions: [${currentSubscriptions}]`);\n }\n });\n }\n }\n\n protected SocketConnectError(error: Error): void {\n this.LogErrorMessage(chalk.red(`${this.logPrefix}SocketConnectError(): Error: [${error}]`))\n }\n\n protected SocketDisconnect(reason: string): void {\n this.LogErrorMessage(chalk.red(`${this.logPrefix}SocketDisconnect(): reason: [${reason}]`))\n }\n}\n","/* eslint @typescript-eslint/no-unused-vars: 0, @typescript-eslint/no-explicit-any: 0 */ // --> OFF\nimport { Socket } from 'socket.io-client'\n\nimport { defaultLogger } from '@nsshunt/stsutils'\n\nimport chalk from 'chalk';\n\nimport { SocketIoClient, STSDefaultClientToServerEvents, STSDefaultServerToClientEvents } from '@nsshunt/stssocketioutils'\n\n//import { v4 as uuidv4 } from 'uuid';\n\nconst SOCKET_NAMESPACE = 'stsinstrumentmanager/stsmonitor'\n\nexport interface ISocketBrowserClientLogPublisherOptions {\n rooms: string[]\n imendpoint: string\n import: string\n}\n\nexport class SocketBrowserClientLogPublisher extends SocketIoClient<STSDefaultServerToClientEvents, STSDefaultClientToServerEvents> {\n #id: string;\n #options: ISocketBrowserClientLogPublisherOptions;\n\n constructor(options: ISocketBrowserClientLogPublisherOptions) {\n super('stsinstrumentmanagerclient:SocketBrowserClientLogPublisher');\n this.#options = options;\n this.#id = globalThis.crypto.randomUUID();\n this.LogDebugMessage(chalk.cyan(`${this.logPrefix}Start()`));\n const url = `${this.#options.imendpoint}:${this.#options.import}/${SOCKET_NAMESPACE}/`;\n //const url = `https://stscore.stsmda.org:${goptions.import}/${SOCKET_NAMESPACE}/`;\n this.LogDebugMessage(chalk.cyan(`${this.logPrefix}SetupSocket() url: [${url}]`));\n this.WithAddress(url)\n .WithLogger(defaultLogger)\n .SetupSocket();\n }\n \n get id() {\n return this.#id;\n }\n\n get logPrefix() {\n return `stsinstrumentmanagerclient:SocketBrowserClientLogPublisher:`;\n }\n\n protected SocketConnect(socket: Socket<STSDefaultServerToClientEvents, STSDefaultClientToServerEvents>): void {\n this.LogDebugMessage(chalk.magenta(`${this.logPrefix}SocketConnect(): Socket ID: [${socket.id}], Joining Room: [${this.#options.rooms}]`));\n socket.emit('__STSjoinRoom', this.#options.rooms);\n }\n\n protected SocketError(error: Error): void {\n this.LogErrorMessage(chalk.red(`${this.logPrefix}SocketError(): Error: [${error}]`))\n }\n\n protected SetupSocketEvents(socket: Socket<STSDefaultServerToClientEvents, STSDefaultClientToServerEvents>): void {\n this.LogDebugMessage(chalk.magenta(`${this.logPrefix}SetupSocketEvents(): Socket ID: [${socket.id}]`));\n }\n\n protected SocketConnectError(error: Error): void {\n this.LogErrorMessage(chalk.red(`${this.logPrefix}SocketConnectError(): Error: [${error}]`))\n }\n\n protected SocketDisconnect(reason: string): void {\n this.LogErrorMessage(chalk.red(`${this.logPrefix}SocketDisconnect(): reason: [${reason}]`))\n }\n}\n","/* eslint @typescript-eslint/no-explicit-any: 0 */ // --> OFF\nimport { STSDefaultClientToServerEvents, STSDefaultServerToClientEvents, SocketIoClient } from '@nsshunt/stssocketioutils'\n\nimport { SocketBrowserClientLogPublisher } from './socketBrowserClientLogPublisher'\n\nimport { ISTSLogger } from '@nsshunt/stsutils';\n\nexport interface ISTSLoggerSocketOptions {\n rooms: string[]\n imendpoint: string\n import: string\n}\n\nexport class STSLoggerSocket implements ISTSLogger {\n #options: ISTSLoggerSocketOptions;\n #socketIoClient: SocketIoClient<STSDefaultServerToClientEvents, STSDefaultClientToServerEvents>\n\n constructor(opts: ISTSLoggerSocketOptions) {\n this.#options = opts;\n\n this.#socketIoClient = new SocketBrowserClientLogPublisher({\n rooms: this.#options.rooms,\n imendpoint: this.#options.imendpoint,\n import: this.#options.import\n });\n\n this.#socketIoClient.socket?.emit('__STSjoinRoom', this.#options.rooms);\n }\n\n JoinRoom = () => {\n this.#socketIoClient.socket?.emit('__STSjoinRoom', this.#options.rooms);\n }\n\n error(message: any): void {\n this.#log({ level: 'error', message });\n }\n\n warn(message: any): void {\n this.#log({ level: 'warn', message });\n }\n\n info(message: any): void {\n this.#log({ level: 'info', message });\n }\n\n http(message: any): void {\n this.#log({ level: 'http', message });\n }\n\n verbose(message: any): void {\n this.#log({ level: 'verbose', message });\n }\n\n debug(message: any): void {\n this.#log({ level: 'debug', message });\n }\n\n silly(message: any): void {\n this.#log({ level: 'silly', message });\n }\n \n #log(info: any) {\n this.#socketIoClient.socket?.emit('__STSsendToRoom', this.#options.rooms, {\n command: 'logmessage',\n payload: {\n level: info.level,\n message: info.message,\n dateTime: Date.now()\n }\n });\n }\n}\n"],"x_google_ignoreList":[2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0BA,IAAY,oBAAL,yBAAA,mBAAA;AAEH,mBAAA,yBAAA;AACA,mBAAA,cAAA;AACA,mBAAA,sBAAA;AACA,mBAAA,qBAAA;AAGA,mBAAA,uBAAA;AACA,mBAAA,YAAA;AACA,mBAAA,kBAAA;AACA,mBAAA,iBAAA;AAGA,mB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["#tinyEmitter","#RequestCompleted","#options","#label","#data","#timerInterval","#valStackMaxLength","#copy","#autoComputeVelocity","#maxAverageValStack","#maxAverageIterations","#velocityTimeDiff","#vaTimeDiff","#autoComputeVelocityTimeout","#maxTimeDiff","#minTimeForReporting","#GetVal","#SetVal","#GetMaxVelocity","#GetDelta","#GetVelocity","#GetVelocityStackAverage","#GetTimeStamp","#GetCountDiff","#GetTimeDiff","#GetDeltaCountDiff","#GetDeltaTimeDif","#GetAverageVelocity","#valStack","#interval","#ComputeVelocity","#velocity","#averageValStack","#averageVelocity","isNode","#timeStamp","#velocityVal","#valStackAverage","#ComputeVelocityByTimeDiff","#delta","#countDiff","#timeDiff","#deltaCountDiff","#deltaTimeDif","#lastVelocity","#maxVelocity","#timeoutComputeVelocity","#SetupAutoComputeVelocity","#histogramData","#GetHistogramData","#SetHistogramData","#val","#maxSize","#useLatestMessages","#consoleLogging","#instrumentLogging","#winstonLogging","#DumpToConsole","#stsLogger","#messages","#readPos","#pauseVal","#start","#maxSampleSize","#GetPercentileData","#GetMin","#GetMax","#GetAverage","#timeSeriesList","#observer","#GetAndResetMaxVal","#maxval","#lastObservedValue","#observations","#total","#max","#min","#NumberCompare","#publisherTransport","#UpdateState","#inPublish","#observer","#publishState","#PublishTimeoutLoop","#publisher","#instruments","#GetInstrument","#CreateInstrument","#CreateInstruments","#ProcessTelemetryCommand","#options","#serviceModel","#agentModel","#lambdaModel","#LogDebugMessage","#LogErrorMessage","#options","#RemoveKeepAlive","#LogDebugMessage","#AddKeepAlive","#LogErrorMessage","#currentSubscriptions","#InvokeRESTAPI","#GetData","#SetupTimeout","#socketSubscribeKeepAlive","#id","#options","#currentSubscriptions","#options","#id","#options","#socketIoClient","#log"],"sources":["../src/commonTypes.ts","../src/publish/middleware/requestLoggerMiddleware.ts","../node_modules/color-name/index.js","../node_modules/color-convert/conversions.js","../node_modules/color-convert/route.js","../node_modules/color-convert/index.js","../node_modules/ansi-styles/index.js","../node_modules/supports-color/browser.js","../node_modules/chalk/source/util.js","../node_modules/chalk/source/templates.js","../node_modules/chalk/source/index.js","../node_modules/@nsshunt/stsobservability/dist/index.mjs","../node_modules/@msgpack/msgpack/dist.esm/utils/utf8.mjs","../node_modules/@msgpack/msgpack/dist.esm/ExtData.mjs","../node_modules/@msgpack/msgpack/dist.esm/DecodeError.mjs","../node_modules/@msgpack/msgpack/dist.esm/utils/int.mjs","../node_modules/@msgpack/msgpack/dist.esm/timestamp.mjs","../node_modules/@msgpack/msgpack/dist.esm/ExtensionCodec.mjs","../node_modules/@msgpack/msgpack/dist.esm/utils/typedArrays.mjs","../node_modules/@msgpack/msgpack/dist.esm/Encoder.mjs","../node_modules/@msgpack/msgpack/dist.esm/encode.mjs","../src/publish/publishers/publishTransportRESTServer.ts","../src/publish/publishInstruments.ts","../src/publish/publishInstrumentController.ts","../src/publish/stsPluginKeys.ts","../src/publish/agentinstrumentcontroller.ts","../src/globalServiceDefinitions.ts","../src/subscribe/observabilitymodelutils.ts","../src/subscribe/observabilityPayloadTransformer.ts","../src/subscribe/restClientSubscriber.ts","../src/subscribe/socketClientSubscriber.ts","../src/socketBrowserClientLogPublisher.ts","../src/stsLoggerSocket.ts"],"sourcesContent":["/* eslint @typescript-eslint/no-unused-vars: 0 */ // --> OFF\n/* eslint @typescript-eslint/no-explicit-any: 0 */ // --> OFF\nimport { IAgentManager, ISTSLogger, JSONObject } from '@nsshunt/stsutils';\nimport { type STSDefaultServerToClientEvents, type STSDefaultClientToServerEvents } from '@nsshunt/stssocketioutils'\nimport { InstrumentBase, Gauge, GaugeTypes, InstrumentBaseOptions } from '@nsshunt/stsobservability'\n\nexport interface IServiceSideSocketRecord {\n start: number\n globalSockets: any\n namespaceSockets: any\n namespaceRoomSockets: any\n end: number\n duration: number\n message: string\n}\n\nexport interface ClientToServerEvents extends STSDefaultClientToServerEvents {\n subscribe: (data: any, callback: (data: any) => void) => void;\n unsubscribe: (data: any, callback: (data: any) => void) => void;\n getCurrentSubscriptions: (namespace: string, rooms: string[], callback: (data: IServiceSideSocketRecord) => void) => void;\n}\n\nexport interface ServerToClientEvents extends STSDefaultServerToClientEvents {\n subscriptionData: (data: ISubscriptionPayload, callback: (data: any) => void) => void;\n}\n\nexport enum SubscriptionTopic {\n // Services topics\n AllServicesCombined = 'AllServicesCombined',\n Services = 'Services',\n ServiceInstances = 'ServiceInstances',\n ServiceInstance = 'ServiceInstance',\n\n // User Agents topics\n AllAgentsCombined = 'AllAgentsCombined',\n Agents = 'Agents',\n AgentWorkers = 'AgentWorkers',\n AgentWorker = 'AgentWorker',\n\n // Lambda topics\n AllLambdasCombined = \"AllLambdasCombined\",\n LambdaTechnologies = \"LambdaTechnologies\", // e.g. aws was lambdas\n LambdaSubTechnologies = \"LambdaSubTechnologies\", // e.g. aws_s3, aws_sqs, aws_sns was LambdaInstances\n LambdaSubTechnologiesInstance = \"LambdaSubTechnologiesInstance\", // (uuidv4()) was ServiceInstance\n\n // Logging (both service and agent)\n LogProcessing = 'LogProcessing'\n}\n\nexport interface ISubscriptionKey {\n id: string // uuid - unique ID for this subscription\n topic: SubscriptionTopic\n key?: string\n subkey?: string\n}\n\nexport interface IKafkaData {\n kafkaTopic: string\n kafkaGroupId: string\n partition: number,\n topic: string\n key: string\n value: string\n}\n\nexport interface ISubscription {\n subscriptionKey: ISubscriptionKey\n cb: (payload: ISubscriptionPayload) => void\n}\n\nexport type ISubscriptions = ISubscription[]\n\nexport type quantile = Record<string, number>;\nexport type histo = Record<string, number>;\n\nexport interface ICommonInstanceTelemetry {\n activeRequestCount: number\n authenticationCount: number\n coreCount: number\n duration: number\n errorCount: number\n latency: number\n requestCount: number\n retryCount: number\n timer: number\n velocity: number\n duration_quantile: quantile\n duration_histo: histo\n latency_quantile: quantile\n latency_histo: histo\n}\n\nexport interface IServiceInstanceTelemetry extends ICommonInstanceTelemetry {\n connectionCount: number\n connectionIdleCount: number\n connectionPoolCount: number\n connectionWaitingCount: number\n cpu: number\n cpu_quantile: quantile\n systemcpu: number\n systemcpu_quantile: quantile\n memory: string\n rx: number\n tx: number\n}\n\nexport interface ILambdaInstanceTelemetry extends ICommonInstanceTelemetry {\n connectionCount: number\n connectionIdleCount: number\n connectionPoolCount: number\n connectionWaitingCount: number\n cpu: number\n cpu_quantile: quantile\n systemcpu: number\n systemcpu_quantile: quantile\n memory: string\n rx: number\n tx: number\n}\n\nexport interface IAgentInstanceTelemetry extends ICommonInstanceTelemetry {\n childCount: number\n}\n\nexport interface ISubscriptionPayload {\n subscriptionKey: ISubscriptionKey\n data: IKafkaData \n // Agent processing\n | IAgentInstanceTelemetry | IAgents | IAgentWorkers | IAgentWorkerRunners\n // Service processing\n | IServiceInstanceTelemetry | IServices | IServiceInstances | IServiceInstancesThreads \n // Lambda processing\n | IServiceInstanceTelemetry | ILambdaTechnologies | ILambdaSubTechnologies | ILambdaSubTechnologiesInstance\n | null\n}\n\n// /serviceId\nexport interface IServices {\n [serviceId: string]: IServiceInstanceTelemetry\n}\n\n// /serviceId/serviceInstanceId\nexport interface IServiceInstances {\n [serviceId: string]: {\n [serviceInstanceId: string]: IServiceInstanceTelemetry\n }\n}\n\n// /serviceId/serviceInstanceId/threadId\nexport interface IServiceInstancesThreads {\n [serviceId: string]: {\n [serviceInstanceId: string]: {\n [threadId: string]: IServiceInstanceTelemetry\n }\n }\n}\n\n// /lambdaTechnoplogyId\nexport interface ILambdaTechnologies {\n [lambdaTechnoplogyId: string]: ILambdaInstanceTelemetry\n}\n\n// /lambdaTechnoplogyId/lambdaSubTechnoplogyId\nexport interface ILambdaSubTechnologies {\n [lambdaTechnoplogyId: string]: {\n [lambdaSubTechnoplogyId: string]: IServiceInstanceTelemetry\n }\n}\n\n// /lambdaTechnoplogyId/lambdaSubTechnoplogyId/lambdaSubTechnoplogyInstanceId\nexport interface ILambdaSubTechnologiesInstance {\n [lambdaTechnoplogyId: string]: {\n [lambdaSubTechnoplogyId: string]: {\n [lambdaSubTechnoplogyInstanceId: string]: IServiceInstanceTelemetry\n }\n }\n}\n\n// /agentId\nexport interface IAgents {\n [agentId: string]: IAgentInstanceTelemetry\n}\n\n// /agentId/agentWorkerId\nexport interface IAgentWorkers {\n [agentId: string]: {\n [agentWorkerId: string]: IAgentInstanceTelemetry\n }\n}\n\n// /agentId/agentWorkerId/asyncRunnerId\nexport interface IAgentWorkerRunners {\n [agentId: string]: {\n [agentWorkerId: string]: {\n [asyncRunnerId: string]: IAgentInstanceTelemetry\n }\n }\n}\n\n// Event key passed back from socket.io - stsinstrumentmanager\nexport const GetSocketIOSubscriptionKey = (subscriptionKey: ISubscriptionKey): string => {\n return `SubscriptionData_${subscriptionKey.id}`;\n}\n\nexport interface IObservabilitySocketIOSubscriberOptions {\n socket?: any\n keepAlive?: number // keep alive ping interval (ms) (REST only)\n urlBase?: string\n agentManager?: IAgentManager\n logger: ISTSLogger\n}\n\nexport interface IObservabilitySocketIOSubscriber {\n Subscribe(subscriptions: ISubscriptions): void\n UnSubscribe(subscriptions: ISubscriptions): void\n}\n\nexport const KAFKA_PREFIX: string = '__STS__'; //@@ move to sock.io\n\nexport interface IObservabilitySubscriberManagerOptions {\n modelId: string\n consumeInstrumentationMode: string\n instrumentManagerEndpoint: string\n instrumentManagerPort: string\n instrumentManagerAPIRoot: string\n logger?: ISTSLogger\n}\n\n// Publisher common types\n// ------------------------------------------------------------------------------------------------------------------------\n\nexport enum TransportType {\n none = 0,\n IPC = 1, // Inter-process communication (local)\n websocket = 2, // node ws\n RESTAPI = 4, // RESTful API\n redis = 8,\n kafka = 16, // https://www.npmjs.com/package/kafkajs\n influxdb = 32, // https://github.com/influxdata/influxdb-client-js/ https://www.npmjs.com/package/@influxdata/influxdb-client\n prometheus = 64,\n gRPC = 128, // https://www.npmjs.com/package/@grpc/grpc-js\n unixsocket = 256, // Uses https://www.npmjs.com/package/json-socket\n socketio = 512, // https://socket.io\n otelcollector = 1024, \n messageport = 2048,\n jsonrpc = 4096, // https://www.npmjs.com/package/jayson\n postgresql =8192,\n grafanaloki = 16384,\n logstash = 32768,\n fluentbit = 65536,\n fluentd = 131072,\n inmemory = 262144\n}\n\nexport function GetTransportMode(transport: string): TransportType {\n let trans: TransportType = 0 as TransportType;\n try {\n transport.split('|').forEach(item => {\n switch (item) {\n case 'IPC' :\n trans |= TransportType.IPC;\n break;\n case 'websocket' :\n trans |= TransportType.websocket;\n break;\n case 'RESTAPI' :\n trans |= TransportType.RESTAPI;\n break;\n case 'redis' :\n trans |= TransportType.redis;\n break;\n case 'kafka' :\n trans |= TransportType.kafka;\n break;\n case 'influxdb' :\n trans |= TransportType.influxdb;\n break;\n case 'prometheus' :\n trans |= TransportType.prometheus;\n break;\n case 'gRPC' :\n trans |= TransportType.gRPC;\n break;\n case 'unixsocket' :\n trans |= TransportType.unixsocket;\n break;\n case 'socketio' :\n trans |= TransportType.socketio;\n break;\n case 'otelcollector' :\n trans |= TransportType.otelcollector;\n break;\n case 'messageport' :\n trans |= TransportType.messageport\n break;\n case 'jsonrpc' :\n trans |= TransportType.jsonrpc\n break;\n case 'postgresql' :\n trans |= TransportType.postgresql\n break;\n case 'grafanaloki' :\n trans |= TransportType.grafanaloki\n break;\n case 'logstash' :\n trans |= TransportType.logstash\n break;\n case 'fluentbit' :\n trans |= TransportType.fluentbit\n break;\n case 'fluentd' :\n trans |= TransportType.fluentd\n break;\n case 'inmemory' :\n trans |= TransportType.inmemory\n break;\n }\n });\n } catch (error) {\n throw new Error(`GetTransportMode(): Error: [${error}]`);\n }\n return trans;\n}\n\nexport type Nid = string;\n\nexport interface IContextBase extends JSONObject {\n serviceType?: string\n nid?: Nid\n}\n\nexport enum InstrumentPayloadType {\n agent = 'agent',\n service = 'service'\n}\n\nexport interface IInstrumentPayload {\n //context: IServiceProcessContext | IAsyncRunnerContext | ILambdaProcessContext\n context: IContextBase\n instruments: Record<string, InstrumentBase>\n}\n\nexport type InstrumentDefinition = [ Gauge, GaugeTypes, InstrumentBaseOptions? ]\n\nexport type InstrumentDefinitions = InstrumentDefinition[];\n\nexport interface IPublisherTransport {\n Publish(payload: IInstrumentPayload): Promise<boolean>\n Close(): Promise<boolean>\n}\n\nexport interface IPublishInstrumentController {\n GetPayloadData(): IInstrumentPayload\n}\n\nexport interface IPublishInstrumentControllerOptions {\n processContext: IContextBase\n consoleLogging?: boolean\n instrumentLogging?: boolean\n httpServer?: boolean // Is this service running an http server (express via STSFramework)\n instrumentationObservationInterval?: number\n instrumentationTimeWindow?: number\n instrumentDefinitions?: InstrumentDefinitions\n publishInterval: number\n publishPostFailInterval: number\n logger: ISTSLogger\n publishTransportBaseOptions: IPublishTransportBaseOptions\n autoStart: boolean\n}\n\nexport interface IPublishInstrumentsOptions {\n processContext: IContextBase\n publishInterval: number\n publishPostFailInterval: number\n logger: ISTSLogger\n publishInstrumentController?: IPublishInstrumentController\n publishTransportBaseOptions: IPublishTransportBaseOptions\n}\n\nexport interface IPublishTransportBaseOptions {\n id?: string\n transportType: TransportType\n logger: ISTSLogger\n}\n\nexport interface IPublishTransportRESTServerOptions extends IPublishTransportBaseOptions {\n url?: string\n socketPath?: string\n agentManager?: IAgentManager\n showPublishPayload?: boolean\n}\n","/* eslint @typescript-eslint/no-explicit-any: 0 */ // --> OFF\nimport { JSONObject, STSOptionsBase } from '@nsshunt/stsutils'\nimport { TinyEmitter } from 'tiny-emitter';\n//import { Express, Request, Response, NextFunction } from 'express';\n//import { v4 as uuidv4 } from 'uuid';\n\nexport interface RequestLoggerMiddlewareOptions {\n\tignoresocketio: boolean\n}\n\nexport enum RequestLoggerMiddlewareEventName {\n UpdateInstrument_AR_DEC = 'UpdateInstrument_AR_DEC', // active request gauge - decrement\n UpdateInstrument_AR_INC = 'UpdateInstrument_AR_INC', // active request gauge - increment\n UpdateInstrument_RC_INC = 'UpdateInstrument_RC_INC', // request count gauge - increment\n UpdateInstrument_V_INC = 'UpdateInstrument_V_INC', // velocity gauge - increment\n UpdateInstrument_DH_VAL = 'UpdateInstrument_DH_VAL', // duration histo - value\n UpdateInstrument_D_VAL = 'UpdateInstrument_D_VAL' // duration - value\n}\n\nexport type RequestLoggerMiddlewareEventFunc = (data?: string | number | JSONObject) => void;\n\n//@@ use TinyEmitter to emit logger events\nexport class RequestLoggerMiddleware extends STSOptionsBase\n{\n #tinyEmitter: TinyEmitter = new TinyEmitter();\n\n constructor(options: RequestLoggerMiddlewareOptions) {\n super(options);\n }\n\n override get options(): RequestLoggerMiddlewareOptions {\n return super.options as RequestLoggerMiddlewareOptions;\n }\n\n on(eventName: string, callBackFn: RequestLoggerMiddlewareEventFunc) {\n this.#tinyEmitter.on(eventName, callBackFn);\n }\n\n #RequestCompleted = (start: number) => {\n // Decrease the number of active requests\n this.#tinyEmitter.emit(RequestLoggerMiddlewareEventName.UpdateInstrument_AR_DEC);\n\n // Update request duration histo data\n const end = performance.now() - start;\n const timeInMs = parseFloat(end.toFixed(4));\n\t\t\n this.#tinyEmitter.emit(RequestLoggerMiddlewareEventName.UpdateInstrument_DH_VAL, timeInMs);\n\n this.#tinyEmitter.emit(RequestLoggerMiddlewareEventName.UpdateInstrument_D_VAL, timeInMs);\n\n //console.log(`-->>ZZZ: ${timeInMs}`);\n };\n\n // https://stackoverflow.com/questions/18031839/how-to-use-process-hrtime-to-get-execution-time-of-async-function/18031945\n\n /**\n\t * Use with .bind(class instance).\n\t * Example;\n\t * ---\n\t * `let requestLoggerMiddleware = new RequestLoggerMiddleware();\n\t * app.use(requestLoggerMiddleware.Middleware.bind(requestLoggerMiddleware));`\n\t * @param {*} req \n\t * @param {*} res \n\t * @param {*} next \n\t * @returns \n\t */\n \n Middleware = async (req: any, res: any, next: any) => { \n if (this.options.ignoresocketio && req.originalUrl.includes('socket.io')) {\n return next();\n }\n\n //const start = process.hrtime();\n const start = performance.now();\n let completed = false;\n\n const completeOnce = () => {\n if (completed) return;\n completed = true;\n this.#RequestCompleted(start);\n };\n\n // Increase the number of active requests\n this.#tinyEmitter.emit(RequestLoggerMiddlewareEventName.UpdateInstrument_AR_INC);\n\n // Increase the total number of requests\n this.#tinyEmitter.emit(RequestLoggerMiddlewareEventName.UpdateInstrument_RC_INC);\n\n // Increase the total number of requests to determine velocity (requests per second)\n this.#tinyEmitter.emit(RequestLoggerMiddlewareEventName.UpdateInstrument_V_INC);\n\n // -- request -----------------------------------------------------------------------------\n\n req.on(\"aborted\", () => {\n // request closed unexpectedly\n //@@RequestCompleted(start);\n });\n\n req.on(\"end\", () => {\n \n });\n\n // -- response -----------------------------------------------------------------------------\n res.on(\"close\", () => {\n // request closed unexpectedly or normally\n // connection closed before/while response completed\n completeOnce();\n });\n\n\n res.on('finish', () => {\n // response successfully sent\n completeOnce();\n });\n\t\n next();\n }\n}\n","'use strict'\r\n\r\nmodule.exports = {\r\n\t\"aliceblue\": [240, 248, 255],\r\n\t\"antiquewhite\": [250, 235, 215],\r\n\t\"aqua\": [0, 255, 255],\r\n\t\"aquamarine\": [127, 255, 212],\r\n\t\"azure\": [240, 255, 255],\r\n\t\"beige\": [245, 245, 220],\r\n\t\"bisque\": [255, 228, 196],\r\n\t\"black\": [0, 0, 0],\r\n\t\"blanchedalmond\": [255, 235, 205],\r\n\t\"blue\": [0, 0, 255],\r\n\t\"blueviolet\": [138, 43, 226],\r\n\t\"brown\": [165, 42, 42],\r\n\t\"burlywood\": [222, 184, 135],\r\n\t\"cadetblue\": [95, 158, 160],\r\n\t\"chartreuse\": [127, 255, 0],\r\n\t\"chocolate\": [210, 105, 30],\r\n\t\"coral\": [255, 127, 80],\r\n\t\"cornflowerblue\": [100, 149, 237],\r\n\t\"cornsilk\": [255, 248, 220],\r\n\t\"crimson\": [220, 20, 60],\r\n\t\"cyan\": [0, 255, 255],\r\n\t\"darkblue\": [0, 0, 139],\r\n\t\"darkcyan\": [0, 139, 139],\r\n\t\"darkgoldenrod\": [184, 134, 11],\r\n\t\"darkgray\": [169, 169, 169],\r\n\t\"darkgreen\": [0, 100, 0],\r\n\t\"darkgrey\": [169, 169, 169],\r\n\t\"darkkhaki\": [189, 183, 107],\r\n\t\"darkmagenta\": [139, 0, 139],\r\n\t\"darkolivegreen\": [85, 107, 47],\r\n\t\"darkorange\": [255, 140, 0],\r\n\t\"darkorchid\": [153, 50, 204],\r\n\t\"darkred\": [139, 0, 0],\r\n\t\"darksalmon\": [233, 150, 122],\r\n\t\"darkseagreen\": [143, 188, 143],\r\n\t\"darkslateblue\": [72, 61, 139],\r\n\t\"darkslategray\": [47, 79, 79],\r\n\t\"darkslategrey\": [47, 79, 79],\r\n\t\"darkturquoise\": [0, 206, 209],\r\n\t\"darkviolet\": [148, 0, 211],\r\n\t\"deeppink\": [255, 20, 147],\r\n\t\"deepskyblue\": [0, 191, 255],\r\n\t\"dimgray\": [105, 105, 105],\r\n\t\"dimgrey\": [105, 105, 105],\r\n\t\"dodgerblue\": [30, 144, 255],\r\n\t\"firebrick\": [178, 34, 34],\r\n\t\"floralwhite\": [255, 250, 240],\r\n\t\"forestgreen\": [34, 139, 34],\r\n\t\"fuchsia\": [255, 0, 255],\r\n\t\"gainsboro\": [220, 220, 220],\r\n\t\"ghostwhite\": [248, 248, 255],\r\n\t\"gold\": [255, 215, 0],\r\n\t\"goldenrod\": [218, 165, 32],\r\n\t\"gray\": [128, 128, 128],\r\n\t\"green\": [0, 128, 0],\r\n\t\"greenyellow\": [173, 255, 47],\r\n\t\"grey\": [128, 128, 128],\r\n\t\"honeydew\": [240, 255, 240],\r\n\t\"hotpink\": [255, 105, 180],\r\n\t\"indianred\": [205, 92, 92],\r\n\t\"indigo\": [75, 0, 130],\r\n\t\"ivory\": [255, 255, 240],\r\n\t\"khaki\": [240, 230, 140],\r\n\t\"lavender\": [230, 230, 250],\r\n\t\"lavenderblush\": [255, 240, 245],\r\n\t\"lawngreen\": [124, 252, 0],\r\n\t\"lemonchiffon\": [255, 250, 205],\r\n\t\"lightblue\": [173, 216, 230],\r\n\t\"lightcoral\": [240, 128, 128],\r\n\t\"lightcyan\": [224, 255, 255],\r\n\t\"lightgoldenrodyellow\": [250, 250, 210],\r\n\t\"lightgray\": [211, 211, 211],\r\n\t\"lightgreen\": [144, 238, 144],\r\n\t\"lightgrey\": [211, 211, 211],\r\n\t\"lightpink\": [255, 182, 193],\r\n\t\"lightsalmon\": [255, 160, 122],\r\n\t\"lightseagreen\": [32, 178, 170],\r\n\t\"lightskyblue\": [135, 206, 250],\r\n\t\"lightslategray\": [119, 136, 153],\r\n\t\"lightslategrey\": [119, 136, 153],\r\n\t\"lightsteelblue\": [176, 196, 222],\r\n\t\"lightyellow\": [255, 255, 224],\r\n\t\"lime\": [0, 255, 0],\r\n\t\"limegreen\": [50, 205, 50],\r\n\t\"linen\": [250, 240, 230],\r\n\t\"magenta\": [255, 0, 255],\r\n\t\"maroon\": [128, 0, 0],\r\n\t\"mediumaquamarine\": [102, 205, 170],\r\n\t\"mediumblue\": [0, 0, 205],\r\n\t\"mediumorchid\": [186, 85, 211],\r\n\t\"mediumpurple\": [147, 112, 219],\r\n\t\"mediumseagreen\": [60, 179, 113],\r\n\t\"mediumslateblue\": [123, 104, 238],\r\n\t\"mediumspringgreen\": [0, 250, 154],\r\n\t\"mediumturquoise\": [72, 209, 204],\r\n\t\"mediumvioletred\": [199, 21, 133],\r\n\t\"midnightblue\": [25, 25, 112],\r\n\t\"mintcream\": [245, 255, 250],\r\n\t\"mistyrose\": [255, 228, 225],\r\n\t\"moccasin\": [255, 228, 181],\r\n\t\"navajowhite\": [255, 222, 173],\r\n\t\"navy\": [0, 0, 128],\r\n\t\"oldlace\": [253, 245, 230],\r\n\t\"olive\": [128, 128, 0],\r\n\t\"olivedrab\": [107, 142, 35],\r\n\t\"orange\": [255, 165, 0],\r\n\t\"orangered\": [255, 69, 0],\r\n\t\"orchid\": [218, 112, 214],\r\n\t\"palegoldenrod\": [238, 232, 170],\r\n\t\"palegreen\": [152, 251, 152],\r\n\t\"paleturquoise\": [175, 238, 238],\r\n\t\"palevioletred\": [219, 112, 147],\r\n\t\"papayawhip\": [255, 239, 213],\r\n\t\"peachpuff\": [255, 218, 185],\r\n\t\"peru\": [205, 133, 63],\r\n\t\"pink\": [255, 192, 203],\r\n\t\"plum\": [221, 160, 221],\r\n\t\"powderblue\": [176, 224, 230],\r\n\t\"purple\": [128, 0, 128],\r\n\t\"rebeccapurple\": [102, 51, 153],\r\n\t\"red\": [255, 0, 0],\r\n\t\"rosybrown\": [188, 143, 143],\r\n\t\"royalblue\": [65, 105, 225],\r\n\t\"saddlebrown\": [139, 69, 19],\r\n\t\"salmon\": [250, 128, 114],\r\n\t\"sandybrown\": [244, 164, 96],\r\n\t\"seagreen\": [46, 139, 87],\r\n\t\"seashell\": [255, 245, 238],\r\n\t\"sienna\": [160, 82, 45],\r\n\t\"silver\": [192, 192, 192],\r\n\t\"skyblue\": [135, 206, 235],\r\n\t\"slateblue\": [106, 90, 205],\r\n\t\"slategray\": [112, 128, 144],\r\n\t\"slategrey\": [112, 128, 144],\r\n\t\"snow\": [255, 250, 250],\r\n\t\"springgreen\": [0, 255, 127],\r\n\t\"steelblue\": [70, 130, 180],\r\n\t\"tan\": [210, 180, 140],\r\n\t\"teal\": [0, 128, 128],\r\n\t\"thistle\": [216, 191, 216],\r\n\t\"tomato\": [255, 99, 71],\r\n\t\"turquoise\": [64, 224, 208],\r\n\t\"violet\": [238, 130, 238],\r\n\t\"wheat\": [245, 222, 179],\r\n\t\"white\": [255, 255, 255],\r\n\t\"whitesmoke\": [245, 245, 245],\r\n\t\"yellow\": [255, 255, 0],\r\n\t\"yellowgreen\": [154, 205, 50]\r\n};\r\n","/* MIT license */\n/* eslint-disable no-mixed-operators */\nconst cssKeywords = require('color-name');\n\n// NOTE: conversions should only return primitive values (i.e. arrays, or\n// values that give correct `typeof` results).\n// do not use box values types (i.e. Number(), String(), etc.)\n\nconst reverseKeywords = {};\nfor (const key of Object.keys(cssKeywords)) {\n\treverseKeywords[cssKeywords[key]] = key;\n}\n\nconst convert = {\n\trgb: {channels: 3, labels: 'rgb'},\n\thsl: {channels: 3, labels: 'hsl'},\n\thsv: {channels: 3, labels: 'hsv'},\n\thwb: {channels: 3, labels: 'hwb'},\n\tcmyk: {channels: 4, labels: 'cmyk'},\n\txyz: {channels: 3, labels: 'xyz'},\n\tlab: {channels: 3, labels: 'lab'},\n\tlch: {channels: 3, labels: 'lch'},\n\thex: {channels: 1, labels: ['hex']},\n\tkeyword: {channels: 1, labels: ['keyword']},\n\tansi16: {channels: 1, labels: ['ansi16']},\n\tansi256: {channels: 1, labels: ['ansi256']},\n\thcg: {channels: 3, labels: ['h', 'c', 'g']},\n\tapple: {channels: 3, labels: ['r16', 'g16', 'b16']},\n\tgray: {channels: 1, labels: ['gray']}\n};\n\nmodule.exports = convert;\n\n// Hide .channels and .labels properties\nfor (const model of Object.keys(convert)) {\n\tif (!('channels' in convert[model])) {\n\t\tthrow new Error('missing channels property: ' + model);\n\t}\n\n\tif (!('labels' in convert[model])) {\n\t\tthrow new Error('missing channel labels property: ' + model);\n\t}\n\n\tif (convert[model].labels.length !== convert[model].channels) {\n\t\tthrow new Error('channel and label counts mismatch: ' + model);\n\t}\n\n\tconst {channels, labels} = convert[model];\n\tdelete convert[model].channels;\n\tdelete convert[model].labels;\n\tObject.defineProperty(convert[model], 'channels', {value: channels});\n\tObject.defineProperty(convert[model], 'labels', {value: labels});\n}\n\nconvert.rgb.hsl = function (rgb) {\n\tconst r = rgb[0] / 255;\n\tconst g = rgb[1] / 255;\n\tconst b = rgb[2] / 255;\n\tconst min = Math.min(r, g, b);\n\tconst max = Math.max(r, g, b);\n\tconst delta = max - min;\n\tlet h;\n\tlet s;\n\n\tif (max === min) {\n\t\th = 0;\n\t} else if (r === max) {\n\t\th = (g - b) / delta;\n\t} else if (g === max) {\n\t\th = 2 + (b - r) / delta;\n\t} else if (b === max) {\n\t\th = 4 + (r - g) / delta;\n\t}\n\n\th = Math.min(h * 60, 360);\n\n\tif (h < 0) {\n\t\th += 360;\n\t}\n\n\tconst l = (min + max) / 2;\n\n\tif (max === min) {\n\t\ts = 0;\n\t} else if (l <= 0.5) {\n\t\ts = delta / (max + min);\n\t} else {\n\t\ts = delta / (2 - max - min);\n\t}\n\n\treturn [h, s * 100, l * 100];\n};\n\nconvert.rgb.hsv = function (rgb) {\n\tlet rdif;\n\tlet gdif;\n\tlet bdif;\n\tlet h;\n\tlet s;\n\n\tconst r = rgb[0] / 255;\n\tconst g = rgb[1] / 255;\n\tconst b = rgb[2] / 255;\n\tconst v = Math.max(r, g, b);\n\tconst diff = v - Math.min(r, g, b);\n\tconst diffc = function (c) {\n\t\treturn (v - c) / 6 / diff + 1 / 2;\n\t};\n\n\tif (diff === 0) {\n\t\th = 0;\n\t\ts = 0;\n\t} else {\n\t\ts = diff / v;\n\t\trdif = diffc(r);\n\t\tgdif = diffc(g);\n\t\tbdif = diffc(b);\n\n\t\tif (r === v) {\n\t\t\th = bdif - gdif;\n\t\t} else if (g === v) {\n\t\t\th = (1 / 3) + rdif - bdif;\n\t\t} else if (b === v) {\n\t\t\th = (2 / 3) + gdif - rdif;\n\t\t}\n\n\t\tif (h < 0) {\n\t\t\th += 1;\n\t\t} else if (h > 1) {\n\t\t\th -= 1;\n\t\t}\n\t}\n\n\treturn [\n\t\th * 360,\n\t\ts * 100,\n\t\tv * 100\n\t];\n};\n\nconvert.rgb.hwb = function (rgb) {\n\tconst r = rgb[0];\n\tconst g = rgb[1];\n\tlet b = rgb[2];\n\tconst h = convert.rgb.hsl(rgb)[0];\n\tconst w = 1 / 255 * Math.min(r, Math.min(g, b));\n\n\tb = 1 - 1 / 255 * Math.max(r, Math.max(g, b));\n\n\treturn [h, w * 100, b * 100];\n};\n\nconvert.rgb.cmyk = function (rgb) {\n\tconst r = rgb[0] / 255;\n\tconst g = rgb[1] / 255;\n\tconst b = rgb[2] / 255;\n\n\tconst k = Math.min(1 - r, 1 - g, 1 - b);\n\tconst c = (1 - r - k) / (1 - k) || 0;\n\tconst m = (1 - g - k) / (1 - k) || 0;\n\tconst y = (1 - b - k) / (1 - k) || 0;\n\n\treturn [c * 100, m * 100, y * 100, k * 100];\n};\n\nfunction comparativeDistance(x, y) {\n\t/*\n\t\tSee https://en.m.wikipedia.org/wiki/Euclidean_distance#Squared_Euclidean_distance\n\t*/\n\treturn (\n\t\t((x[0] - y[0]) ** 2) +\n\t\t((x[1] - y[1]) ** 2) +\n\t\t((x[2] - y[2]) ** 2)\n\t);\n}\n\nconvert.rgb.keyword = function (rgb) {\n\tconst reversed = reverseKeywords[rgb];\n\tif (reversed) {\n\t\treturn reversed;\n\t}\n\n\tlet currentClosestDistance = Infinity;\n\tlet currentClosestKeyword;\n\n\tfor (const keyword of Object.keys(cssKeywords)) {\n\t\tconst value = cssKeywords[keyword];\n\n\t\t// Compute comparative distance\n\t\tconst distance = comparativeDistance(rgb, value);\n\n\t\t// Check if its less, if so set as closest\n\t\tif (distance < currentClosestDistance) {\n\t\t\tcurrentClosestDistance = distance;\n\t\t\tcurrentClosestKeyword = keyword;\n\t\t}\n\t}\n\n\treturn currentClosestKeyword;\n};\n\nconvert.keyword.rgb = function (keyword) {\n\treturn cssKeywords[keyword];\n};\n\nconvert.rgb.xyz = function (rgb) {\n\tlet r = rgb[0] / 255;\n\tlet g = rgb[1] / 255;\n\tlet b = rgb[2] / 255;\n\n\t// Assume sRGB\n\tr = r > 0.04045 ? (((r + 0.055) / 1.055) ** 2.4) : (r / 12.92);\n\tg = g > 0.04045 ? (((g + 0.055) / 1.055) ** 2.4) : (g / 12.92);\n\tb = b > 0.04045 ? (((b + 0.055) / 1.055) ** 2.4) : (b / 12.92);\n\n\tconst x = (r * 0.4124) + (g * 0.3576) + (b * 0.1805);\n\tconst y = (r * 0.2126) + (g * 0.7152) + (b * 0.0722);\n\tconst z = (r * 0.0193) + (g * 0.1192) + (b * 0.9505);\n\n\treturn [x * 100, y * 100, z * 100];\n};\n\nconvert.rgb.lab = function (rgb) {\n\tconst xyz = convert.rgb.xyz(rgb);\n\tlet x = xyz[0];\n\tlet y = xyz[1];\n\tlet z = xyz[2];\n\n\tx /= 95.047;\n\ty /= 100;\n\tz /= 108.883;\n\n\tx = x > 0.008856 ? (x ** (1 / 3)) : (7.787 * x) + (16 / 116);\n\ty = y > 0.008856 ? (y ** (1 / 3)) : (7.787 * y) + (16 / 116);\n\tz = z > 0.008856 ? (z ** (1 / 3)) : (7.787 * z) + (16 / 116);\n\n\tconst l = (116 * y) - 16;\n\tconst a = 500 * (x - y);\n\tconst b = 200 * (y - z);\n\n\treturn [l, a, b];\n};\n\nconvert.hsl.rgb = function (hsl) {\n\tconst h = hsl[0] / 360;\n\tconst s = hsl[1] / 100;\n\tconst l = hsl[2] / 100;\n\tlet t2;\n\tlet t3;\n\tlet val;\n\n\tif (s === 0) {\n\t\tval = l * 255;\n\t\treturn [val, val, val];\n\t}\n\n\tif (l < 0.5) {\n\t\tt2 = l * (1 + s);\n\t} else {\n\t\tt2 = l + s - l * s;\n\t}\n\n\tconst t1 = 2 * l - t2;\n\n\tconst rgb = [0, 0, 0];\n\tfor (let i = 0; i < 3; i++) {\n\t\tt3 = h + 1 / 3 * -(i - 1);\n\t\tif (t3 < 0) {\n\t\t\tt3++;\n\t\t}\n\n\t\tif (t3 > 1) {\n\t\t\tt3--;\n\t\t}\n\n\t\tif (6 * t3 < 1) {\n\t\t\tval = t1 + (t2 - t1) * 6 * t3;\n\t\t} else if (2 * t3 < 1) {\n\t\t\tval = t2;\n\t\t} else if (3 * t3 < 2) {\n\t\t\tval = t1 + (t2 - t1) * (2 / 3 - t3) * 6;\n\t\t} else {\n\t\t\tval = t1;\n\t\t}\n\n\t\trgb[i] = val * 255;\n\t}\n\n\treturn rgb;\n};\n\nconvert.hsl.hsv = function (hsl) {\n\tconst h = hsl[0];\n\tlet s = hsl[1] / 100;\n\tlet l = hsl[2] / 100;\n\tlet smin = s;\n\tconst lmin = Math.max(l, 0.01);\n\n\tl *= 2;\n\ts *= (l <= 1) ? l : 2 - l;\n\tsmin *= lmin <= 1 ? lmin : 2 - lmin;\n\tconst v = (l + s) / 2;\n\tconst sv = l === 0 ? (2 * smin) / (lmin + smin) : (2 * s) / (l + s);\n\n\treturn [h, sv * 100, v * 100];\n};\n\nconvert.hsv.rgb = function (hsv) {\n\tconst h = hsv[0] / 60;\n\tconst s = hsv[1] / 100;\n\tlet v = hsv[2] / 100;\n\tconst hi = Math.floor(h) % 6;\n\n\tconst f = h - Math.floor(h);\n\tconst p = 255 * v * (1 - s);\n\tconst q = 255 * v * (1 - (s * f));\n\tconst t = 255 * v * (1 - (s * (1 - f)));\n\tv *= 255;\n\n\tswitch (hi) {\n\t\tcase 0:\n\t\t\treturn [v, t, p];\n\t\tcase 1:\n\t\t\treturn [q, v, p];\n\t\tcase 2:\n\t\t\treturn [p, v, t];\n\t\tcase 3:\n\t\t\treturn [p, q, v];\n\t\tcase 4:\n\t\t\treturn [t, p, v];\n\t\tcase 5:\n\t\t\treturn [v, p, q];\n\t}\n};\n\nconvert.hsv.hsl = function (hsv) {\n\tconst h = hsv[0];\n\tconst s = hsv[1] / 100;\n\tconst v = hsv[2] / 100;\n\tconst vmin = Math.max(v, 0.01);\n\tlet sl;\n\tlet l;\n\n\tl = (2 - s) * v;\n\tconst lmin = (2 - s) * vmin;\n\tsl = s * vmin;\n\tsl /= (lmin <= 1) ? lmin : 2 - lmin;\n\tsl = sl || 0;\n\tl /= 2;\n\n\treturn [h, sl * 100, l * 100];\n};\n\n// http://dev.w3.org/csswg/css-color/#hwb-to-rgb\nconvert.hwb.rgb = function (hwb) {\n\tconst h = hwb[0] / 360;\n\tlet wh = hwb[1] / 100;\n\tlet bl = hwb[2] / 100;\n\tconst ratio = wh + bl;\n\tlet f;\n\n\t// Wh + bl cant be > 1\n\tif (ratio > 1) {\n\t\twh /= ratio;\n\t\tbl /= ratio;\n\t}\n\n\tconst i = Math.floor(6 * h);\n\tconst v = 1 - bl;\n\tf = 6 * h - i;\n\n\tif ((i & 0x01) !== 0) {\n\t\tf = 1 - f;\n\t}\n\n\tconst n = wh + f * (v - wh); // Linear interpolation\n\n\tlet r;\n\tlet g;\n\tlet b;\n\t/* eslint-disable max-statements-per-line,no-multi-spaces */\n\tswitch (i) {\n\t\tdefault:\n\t\tcase 6:\n\t\tcase 0: r = v; g = n; b = wh; break;\n\t\tcase 1: r = n; g = v; b = wh; break;\n\t\tcase 2: r = wh; g = v; b = n; break;\n\t\tcase 3: r = wh; g = n; b = v; break;\n\t\tcase 4: r = n; g = wh; b = v; break;\n\t\tcase 5: r = v; g = wh; b = n; break;\n\t}\n\t/* eslint-enable max-statements-per-line,no-multi-spaces */\n\n\treturn [r * 255, g * 255, b * 255];\n};\n\nconvert.cmyk.rgb = function (cmyk) {\n\tconst c = cmyk[0] / 100;\n\tconst m = cmyk[1] / 100;\n\tconst y = cmyk[2] / 100;\n\tconst k = cmyk[3] / 100;\n\n\tconst r = 1 - Math.min(1, c * (1 - k) + k);\n\tconst g = 1 - Math.min(1, m * (1 - k) + k);\n\tconst b = 1 - Math.min(1, y * (1 - k) + k);\n\n\treturn [r * 255, g * 255, b * 255];\n};\n\nconvert.xyz.rgb = function (xyz) {\n\tconst x = xyz[0] / 100;\n\tconst y = xyz[1] / 100;\n\tconst z = xyz[2] / 100;\n\tlet r;\n\tlet g;\n\tlet b;\n\n\tr = (x * 3.2406) + (y * -1.5372) + (z * -0.4986);\n\tg = (x * -0.9689) + (y * 1.8758) + (z * 0.0415);\n\tb = (x * 0.0557) + (y * -0.2040) + (z * 1.0570);\n\n\t// Assume sRGB\n\tr = r > 0.0031308\n\t\t? ((1.055 * (r ** (1.0 / 2.4))) - 0.055)\n\t\t: r * 12.92;\n\n\tg = g > 0.0031308\n\t\t? ((1.055 * (g ** (1.0 / 2.4))) - 0.055)\n\t\t: g * 12.92;\n\n\tb = b > 0.0031308\n\t\t? ((1.055 * (b ** (1.0 / 2.4))) - 0.055)\n\t\t: b * 12.92;\n\n\tr = Math.min(Math.max(0, r), 1);\n\tg = Math.min(Math.max(0, g), 1);\n\tb = Math.min(Math.max(0, b), 1);\n\n\treturn [r * 255, g * 255, b * 255];\n};\n\nconvert.xyz.lab = function (xyz) {\n\tlet x = xyz[0];\n\tlet y = xyz[1];\n\tlet z = xyz[2];\n\n\tx /= 95.047;\n\ty /= 100;\n\tz /= 108.883;\n\n\tx = x > 0.008856 ? (x ** (1 / 3)) : (7.787 * x) + (16 / 116);\n\ty = y > 0.008856 ? (y ** (1 / 3)) : (7.787 * y) + (16 / 116);\n\tz = z > 0.008856 ? (z ** (1 / 3)) : (7.787 * z) + (16 / 116);\n\n\tconst l = (116 * y) - 16;\n\tconst a = 500 * (x - y);\n\tconst b = 200 * (y - z);\n\n\treturn [l, a, b];\n};\n\nconvert.lab.xyz = function (lab) {\n\tconst l = lab[0];\n\tconst a = lab[1];\n\tconst b = lab[2];\n\tlet x;\n\tlet y;\n\tlet z;\n\n\ty = (l + 16) / 116;\n\tx = a / 500 + y;\n\tz = y - b / 200;\n\n\tconst y2 = y ** 3;\n\tconst x2 = x ** 3;\n\tconst z2 = z ** 3;\n\ty = y2 > 0.008856 ? y2 : (y - 16 / 116) / 7.787;\n\tx = x2 > 0.008856 ? x2 : (x - 16 / 116) / 7.787;\n\tz = z2 > 0.008856 ? z2 : (z - 16 / 116) / 7.787;\n\n\tx *= 95.047;\n\ty *= 100;\n\tz *= 108.883;\n\n\treturn [x, y, z];\n};\n\nconvert.lab.lch = function (lab) {\n\tconst l = lab[0];\n\tconst a = lab[1];\n\tconst b = lab[2];\n\tlet h;\n\n\tconst hr = Math.atan2(b, a);\n\th = hr * 360 / 2 / Math.PI;\n\n\tif (h < 0) {\n\t\th += 360;\n\t}\n\n\tconst c = Math.sqrt(a * a + b * b);\n\n\treturn [l, c, h];\n};\n\nconvert.lch.lab = function (lch) {\n\tconst l = lch[0];\n\tconst c = lch[1];\n\tconst h = lch[2];\n\n\tconst hr = h / 360 * 2 * Math.PI;\n\tconst a = c * Math.cos(hr);\n\tconst b = c * Math.sin(hr);\n\n\treturn [l, a, b];\n};\n\nconvert.rgb.ansi16 = function (args, saturation = null) {\n\tconst [r, g, b] = args;\n\tlet value = saturation === null ? convert.rgb.hsv(args)[2] : saturation; // Hsv -> ansi16 optimization\n\n\tvalue = Math.round(value / 50);\n\n\tif (value === 0) {\n\t\treturn 30;\n\t}\n\n\tlet ansi = 30\n\t\t+ ((Math.round(b / 255) << 2)\n\t\t| (Math.round(g / 255) << 1)\n\t\t| Math.round(r / 255));\n\n\tif (value === 2) {\n\t\tansi += 60;\n\t}\n\n\treturn ansi;\n};\n\nconvert.hsv.ansi16 = function (args) {\n\t// Optimization here; we already know the value and don't need to get\n\t// it converted for us.\n\treturn convert.rgb.ansi16(convert.hsv.rgb(args), args[2]);\n};\n\nconvert.rgb.ansi256 = function (args) {\n\tconst r = args[0];\n\tconst g = args[1];\n\tconst b = args[2];\n\n\t// We use the extended greyscale palette here, with the exception of\n\t// black and white. normal palette only has 4 greyscale shades.\n\tif (r === g && g === b) {\n\t\tif (r < 8) {\n\t\t\treturn 16;\n\t\t}\n\n\t\tif (r > 248) {\n\t\t\treturn 231;\n\t\t}\n\n\t\treturn Math.round(((r - 8) / 247) * 24) + 232;\n\t}\n\n\tconst ansi = 16\n\t\t+ (36 * Math.round(r / 255 * 5))\n\t\t+ (6 * Math.round(g / 255 * 5))\n\t\t+ Math.round(b / 255 * 5);\n\n\treturn ansi;\n};\n\nconvert.ansi16.rgb = function (args) {\n\tlet color = args % 10;\n\n\t// Handle greyscale\n\tif (color === 0 || color === 7) {\n\t\tif (args > 50) {\n\t\t\tcolor += 3.5;\n\t\t}\n\n\t\tcolor = color / 10.5 * 255;\n\n\t\treturn [color, color, color];\n\t}\n\n\tconst mult = (~~(args > 50) + 1) * 0.5;\n\tconst r = ((color & 1) * mult) * 255;\n\tconst g = (((color >> 1) & 1) * mult) * 255;\n\tconst b = (((color >> 2) & 1) * mult) * 255;\n\n\treturn [r, g, b];\n};\n\nconvert.ansi256.rgb = function (args) {\n\t// Handle greyscale\n\tif (args >= 232) {\n\t\tconst c = (args - 232) * 10 + 8;\n\t\treturn [c, c, c];\n\t}\n\n\targs -= 16;\n\n\tlet rem;\n\tconst r = Math.floor(args / 36) / 5 * 255;\n\tconst g = Math.floor((rem = args % 36) / 6) / 5 * 255;\n\tconst b = (rem % 6) / 5 * 255;\n\n\treturn [r, g, b];\n};\n\nconvert.rgb.hex = function (args) {\n\tconst integer = ((Math.round(args[0]) & 0xFF) << 16)\n\t\t+ ((Math.round(args[1]) & 0xFF) << 8)\n\t\t+ (Math.round(args[2]) & 0xFF);\n\n\tconst string = integer.toString(16).toUpperCase();\n\treturn '000000'.substring(string.length) + string;\n};\n\nconvert.hex.rgb = function (args) {\n\tconst match = args.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);\n\tif (!match) {\n\t\treturn [0, 0, 0];\n\t}\n\n\tlet colorString = match[0];\n\n\tif (match[0].length === 3) {\n\t\tcolorString = colorString.split('').map(char => {\n\t\t\treturn char + char;\n\t\t}).join('');\n\t}\n\n\tconst integer = parseInt(colorString, 16);\n\tconst r = (integer >> 16) & 0xFF;\n\tconst g = (integer >> 8) & 0xFF;\n\tconst b = integer & 0xFF;\n\n\treturn [r, g, b];\n};\n\nconvert.rgb.hcg = function (rgb) {\n\tconst r = rgb[0] / 255;\n\tconst g = rgb[1] / 255;\n\tconst b = rgb[2] / 255;\n\tconst max = Math.max(Math.max(r, g), b);\n\tconst min = Math.min(Math.min(r, g), b);\n\tconst chroma = (max - min);\n\tlet grayscale;\n\tlet hue;\n\n\tif (chroma < 1) {\n\t\tgrayscale = min / (1 - chroma);\n\t} else {\n\t\tgrayscale = 0;\n\t}\n\n\tif (chroma <= 0) {\n\t\thue = 0;\n\t} else\n\tif (max === r) {\n\t\thue = ((g - b) / chroma) % 6;\n\t} else\n\tif (max === g) {\n\t\thue = 2 + (b - r) / chroma;\n\t} else {\n\t\thue = 4 + (r - g) / chroma;\n\t}\n\n\thue /= 6;\n\thue %= 1;\n\n\treturn [hue * 360, chroma * 100, grayscale * 100];\n};\n\nconvert.hsl.hcg = function (hsl) {\n\tconst s = hsl[1] / 100;\n\tconst l = hsl[2] / 100;\n\n\tconst c = l < 0.5 ? (2.0 * s * l) : (2.0 * s * (1.0 - l));\n\n\tlet f = 0;\n\tif (c < 1.0) {\n\t\tf = (l - 0.5 * c) / (1.0 - c);\n\t}\n\n\treturn [hsl[0], c * 100, f * 100];\n};\n\nconvert.hsv.hcg = function (hsv) {\n\tconst s = hsv[1] / 100;\n\tconst v = hsv[2] / 100;\n\n\tconst c = s * v;\n\tlet f = 0;\n\n\tif (c < 1.0) {\n\t\tf = (v - c) / (1 - c);\n\t}\n\n\treturn [hsv[0], c * 100, f * 100];\n};\n\nconvert.hcg.rgb = function (hcg) {\n\tconst h = hcg[0] / 360;\n\tconst c = hcg[1] / 100;\n\tconst g = hcg[2] / 100;\n\n\tif (c === 0.0) {\n\t\treturn [g * 255, g * 255, g * 255];\n\t}\n\n\tconst pure = [0, 0, 0];\n\tconst hi = (h % 1) * 6;\n\tconst v = hi % 1;\n\tconst w = 1 - v;\n\tlet mg = 0;\n\n\t/* eslint-disable max-statements-per-line */\n\tswitch (Math.floor(hi)) {\n\t\tcase 0:\n\t\t\tpure[0] = 1; pure[1] = v; pure[2] = 0; break;\n\t\tcase 1:\n\t\t\tpure[0] = w; pure[1] = 1; pure[2] = 0; break;\n\t\tcase 2:\n\t\t\tpure[0] = 0; pure[1] = 1; pure[2] = v; break;\n\t\tcase 3:\n\t\t\tpure[0] = 0; pure[1] = w; pure[2] = 1; break;\n\t\tcase 4:\n\t\t\tpure[0] = v; pure[1] = 0; pure[2] = 1; break;\n\t\tdefault:\n\t\t\tpure[0] = 1; pure[1] = 0; pure[2] = w;\n\t}\n\t/* eslint-enable max-statements-per-line */\n\n\tmg = (1.0 - c) * g;\n\n\treturn [\n\t\t(c * pure[0] + mg) * 255,\n\t\t(c * pure[1] + mg) * 255,\n\t\t(c * pure[2] + mg) * 255\n\t];\n};\n\nconvert.hcg.hsv = function (hcg) {\n\tconst c = hcg[1] / 100;\n\tconst g = hcg[2] / 100;\n\n\tconst v = c + g * (1.0 - c);\n\tlet f = 0;\n\n\tif (v > 0.0) {\n\t\tf = c / v;\n\t}\n\n\treturn [hcg[0], f * 100, v * 100];\n};\n\nconvert.hcg.hsl = function (hcg) {\n\tconst c = hcg[1] / 100;\n\tconst g = hcg[2] / 100;\n\n\tconst l = g * (1.0 - c) + 0.5 * c;\n\tlet s = 0;\n\n\tif (l > 0.0 && l < 0.5) {\n\t\ts = c / (2 * l);\n\t} else\n\tif (l >= 0.5 && l < 1.0) {\n\t\ts = c / (2 * (1 - l));\n\t}\n\n\treturn [hcg[0], s * 100, l * 100];\n};\n\nconvert.hcg.hwb = function (hcg) {\n\tconst c = hcg[1] / 100;\n\tconst g = hcg[2] / 100;\n\tconst v = c + g * (1.0 - c);\n\treturn [hcg[0], (v - c) * 100, (1 - v) * 100];\n};\n\nconvert.hwb.hcg = function (hwb) {\n\tconst w = hwb[1] / 100;\n\tconst b = hwb[2] / 100;\n\tconst v = 1 - b;\n\tconst c = v - w;\n\tlet g = 0;\n\n\tif (c < 1) {\n\t\tg = (v - c) / (1 - c);\n\t}\n\n\treturn [hwb[0], c * 100, g * 100];\n};\n\nconvert.apple.rgb = function (apple) {\n\treturn [(apple[0] / 65535) * 255, (apple[1] / 65535) * 255, (apple[2] / 65535) * 255];\n};\n\nconvert.rgb.apple = function (rgb) {\n\treturn [(rgb[0] / 255) * 65535, (rgb[1] / 255) * 65535, (rgb[2] / 255) * 65535];\n};\n\nconvert.gray.rgb = function (args) {\n\treturn [args[0] / 100 * 255, args[0] / 100 * 255, args[0] / 100 * 255];\n};\n\nconvert.gray.hsl = function (args) {\n\treturn [0, 0, args[0]];\n};\n\nconvert.gray.hsv = convert.gray.hsl;\n\nconvert.gray.hwb = function (gray) {\n\treturn [0, 100, gray[0]];\n};\n\nconvert.gray.cmyk = function (gray) {\n\treturn [0, 0, 0, gray[0]];\n};\n\nconvert.gray.lab = function (gray) {\n\treturn [gray[0], 0, 0];\n};\n\nconvert.gray.hex = function (gray) {\n\tconst val = Math.round(gray[0] / 100 * 255) & 0xFF;\n\tconst integer = (val << 16) + (val << 8) + val;\n\n\tconst string = integer.toString(16).toUpperCase();\n\treturn '000000'.substring(string.length) + string;\n};\n\nconvert.rgb.gray = function (rgb) {\n\tconst val = (rgb[0] + rgb[1] + rgb[2]) / 3;\n\treturn [val / 255 * 100];\n};\n","const conversions = require('./conversions');\n\n/*\n\tThis function routes a model to all other models.\n\n\tall functions that are routed have a property `.conversion` attached\n\tto the returned synthetic function. This property is an array\n\tof strings, each with the steps in between the 'from' and 'to'\n\tcolor models (inclusive).\n\n\tconversions that are not possible simply are not included.\n*/\n\nfunction buildGraph() {\n\tconst graph = {};\n\t// https://jsperf.com/object-keys-vs-for-in-with-closure/3\n\tconst models = Object.keys(conversions);\n\n\tfor (let len = models.length, i = 0; i < len; i++) {\n\t\tgraph[models[i]] = {\n\t\t\t// http://jsperf.com/1-vs-infinity\n\t\t\t// micro-opt, but this is simple.\n\t\t\tdistance: -1,\n\t\t\tparent: null\n\t\t};\n\t}\n\n\treturn graph;\n}\n\n// https://en.wikipedia.org/wiki/Breadth-first_search\nfunction deriveBFS(fromModel) {\n\tconst graph = buildGraph();\n\tconst queue = [fromModel]; // Unshift -> queue -> pop\n\n\tgraph[fromModel].distance = 0;\n\n\twhile (queue.length) {\n\t\tconst current = queue.pop();\n\t\tconst adjacents = Object.keys(conversions[current]);\n\n\t\tfor (let len = adjacents.length, i = 0; i < len; i++) {\n\t\t\tconst adjacent = adjacents[i];\n\t\t\tconst node = graph[adjacent];\n\n\t\t\tif (node.distance === -1) {\n\t\t\t\tnode.distance = graph[current].distance + 1;\n\t\t\t\tnode.parent = current;\n\t\t\t\tqueue.unshift(adjacent);\n\t\t\t}\n\t\t}\n\t}\n\n\treturn graph;\n}\n\nfunction link(from, to) {\n\treturn function (args) {\n\t\treturn to(from(args));\n\t};\n}\n\nfunction wrapConversion(toModel, graph) {\n\tconst path = [graph[toModel].parent, toModel];\n\tlet fn = conversions[graph[toModel].parent][toModel];\n\n\tlet cur = graph[toModel].parent;\n\twhile (graph[cur].parent) {\n\t\tpath.unshift(graph[cur].parent);\n\t\tfn = link(conversions[graph[cur].parent][cur], fn);\n\t\tcur = graph[cur].parent;\n\t}\n\n\tfn.conversion = path;\n\treturn fn;\n}\n\nmodule.exports = function (fromModel) {\n\tconst graph = deriveBFS(fromModel);\n\tconst conversion = {};\n\n\tconst models = Object.keys(graph);\n\tfor (let len = models.length, i = 0; i < len; i++) {\n\t\tconst toModel = models[i];\n\t\tconst node = graph[toModel];\n\n\t\tif (node.parent === null) {\n\t\t\t// No possible conversion, or this node is the source model.\n\t\t\tcontinue;\n\t\t}\n\n\t\tconversion[toModel] = wrapConversion(toModel, graph);\n\t}\n\n\treturn conversion;\n};\n\n","const conversions = require('./conversions');\nconst route = require('./route');\n\nconst convert = {};\n\nconst models = Object.keys(conversions);\n\nfunction wrapRaw(fn) {\n\tconst wrappedFn = function (...args) {\n\t\tconst arg0 = args[0];\n\t\tif (arg0 === undefined || arg0 === null) {\n\t\t\treturn arg0;\n\t\t}\n\n\t\tif (arg0.length > 1) {\n\t\t\targs = arg0;\n\t\t}\n\n\t\treturn fn(args);\n\t};\n\n\t// Preserve .conversion property if there is one\n\tif ('conversion' in fn) {\n\t\twrappedFn.conversion = fn.conversion;\n\t}\n\n\treturn wrappedFn;\n}\n\nfunction wrapRounded(fn) {\n\tconst wrappedFn = function (...args) {\n\t\tconst arg0 = args[0];\n\n\t\tif (arg0 === undefined || arg0 === null) {\n\t\t\treturn arg0;\n\t\t}\n\n\t\tif (arg0.length > 1) {\n\t\t\targs = arg0;\n\t\t}\n\n\t\tconst result = fn(args);\n\n\t\t// We're assuming the result is an array here.\n\t\t// see notice in conversions.js; don't use box types\n\t\t// in conversion functions.\n\t\tif (typeof result === 'object') {\n\t\t\tfor (let len = result.length, i = 0; i < len; i++) {\n\t\t\t\tresult[i] = Math.round(result[i]);\n\t\t\t}\n\t\t}\n\n\t\treturn result;\n\t};\n\n\t// Preserve .conversion property if there is one\n\tif ('conversion' in fn) {\n\t\twrappedFn.conversion = fn.conversion;\n\t}\n\n\treturn wrappedFn;\n}\n\nmodels.forEach(fromModel => {\n\tconvert[fromModel] = {};\n\n\tObject.defineProperty(convert[fromModel], 'channels', {value: conversions[fromModel].channels});\n\tObject.defineProperty(convert[fromModel], 'labels', {value: conversions[fromModel].labels});\n\n\tconst routes = route(fromModel);\n\tconst routeModels = Object.keys(routes);\n\n\trouteModels.forEach(toModel => {\n\t\tconst fn = routes[toModel];\n\n\t\tconvert[fromModel][toModel] = wrapRounded(fn);\n\t\tconvert[fromModel][toModel].raw = wrapRaw(fn);\n\t});\n});\n\nmodule.exports = convert;\n","'use strict';\n\nconst wrapAnsi16 = (fn, offset) => (...args) => {\n\tconst code = fn(...args);\n\treturn `\\u001B[${code + offset}m`;\n};\n\nconst wrapAnsi256 = (fn, offset) => (...args) => {\n\tconst code = fn(...args);\n\treturn `\\u001B[${38 + offset};5;${code}m`;\n};\n\nconst wrapAnsi16m = (fn, offset) => (...args) => {\n\tconst rgb = fn(...args);\n\treturn `\\u001B[${38 + offset};2;${rgb[0]};${rgb[1]};${rgb[2]}m`;\n};\n\nconst ansi2ansi = n => n;\nconst rgb2rgb = (r, g, b) => [r, g, b];\n\nconst setLazyProperty = (object, property, get) => {\n\tObject.defineProperty(object, property, {\n\t\tget: () => {\n\t\t\tconst value = get();\n\n\t\t\tObject.defineProperty(object, property, {\n\t\t\t\tvalue,\n\t\t\t\tenumerable: true,\n\t\t\t\tconfigurable: true\n\t\t\t});\n\n\t\t\treturn value;\n\t\t},\n\t\tenumerable: true,\n\t\tconfigurable: true\n\t});\n};\n\n/** @type {typeof import('color-convert')} */\nlet colorConvert;\nconst makeDynamicStyles = (wrap, targetSpace, identity, isBackground) => {\n\tif (colorConvert === undefined) {\n\t\tcolorConvert = require('color-convert');\n\t}\n\n\tconst offset = isBackground ? 10 : 0;\n\tconst styles = {};\n\n\tfor (const [sourceSpace, suite] of Object.entries(colorConvert)) {\n\t\tconst name = sourceSpace === 'ansi16' ? 'ansi' : sourceSpace;\n\t\tif (sourceSpace === targetSpace) {\n\t\t\tstyles[name] = wrap(identity, offset);\n\t\t} else if (typeof suite === 'object') {\n\t\t\tstyles[name] = wrap(suite[targetSpace], offset);\n\t\t}\n\t}\n\n\treturn styles;\n};\n\nfunction assembleStyles() {\n\tconst codes = new Map();\n\tconst styles = {\n\t\tmodifier: {\n\t\t\treset: [0, 0],\n\t\t\t// 21 isn't widely supported and 22 does the same thing\n\t\t\tbold: [1, 22],\n\t\t\tdim: [2, 22],\n\t\t\titalic: [3, 23],\n\t\t\tunderline: [4, 24],\n\t\t\tinverse: [7, 27],\n\t\t\thidden: [8, 28],\n\t\t\tstrikethrough: [9, 29]\n\t\t},\n\t\tcolor: {\n\t\t\tblack: [30, 39],\n\t\t\tred: [31, 39],\n\t\t\tgreen: [32, 39],\n\t\t\tyellow: [33, 39],\n\t\t\tblue: [34, 39],\n\t\t\tmagenta: [35, 39],\n\t\t\tcyan: [36, 39],\n\t\t\twhite: [37, 39],\n\n\t\t\t// Bright color\n\t\t\tblackBright: [90, 39],\n\t\t\tredBright: [91, 39],\n\t\t\tgreenBright: [92, 39],\n\t\t\tyellowBright: [93, 39],\n\t\t\tblueBright: [94, 39],\n\t\t\tmagentaBright: [95, 39],\n\t\t\tcyanBright: [96, 39],\n\t\t\twhiteBright: [97, 39]\n\t\t},\n\t\tbgColor: {\n\t\t\tbgBlack: [40, 49],\n\t\t\tbgRed: [41, 49],\n\t\t\tbgGreen: [42, 49],\n\t\t\tbgYellow: [43, 49],\n\t\t\tbgBlue: [44, 49],\n\t\t\tbgMagenta: [45, 49],\n\t\t\tbgCyan: [46, 49],\n\t\t\tbgWhite: [47, 49],\n\n\t\t\t// Bright color\n\t\t\tbgBlackBright: [100, 49],\n\t\t\tbgRedBright: [101, 49],\n\t\t\tbgGreenBright: [102, 49],\n\t\t\tbgYellowBright: [103, 49],\n\t\t\tbgBlueBright: [104, 49],\n\t\t\tbgMagentaBright: [105, 49],\n\t\t\tbgCyanBright: [106, 49],\n\t\t\tbgWhiteBright: [107, 49]\n\t\t}\n\t};\n\n\t// Alias bright black as gray (and grey)\n\tstyles.color.gray = styles.color.blackBright;\n\tstyles.bgColor.bgGray = styles.bgColor.bgBlackBright;\n\tstyles.color.grey = styles.color.blackBright;\n\tstyles.bgColor.bgGrey = styles.bgColor.bgBlackBright;\n\n\tfor (const [groupName, group] of Object.entries(styles)) {\n\t\tfor (const [styleName, style] of Object.entries(group)) {\n\t\t\tstyles[styleName] = {\n\t\t\t\topen: `\\u001B[${style[0]}m`,\n\t\t\t\tclose: `\\u001B[${style[1]}m`\n\t\t\t};\n\n\t\t\tgroup[styleName] = styles[styleName];\n\n\t\t\tcodes.set(style[0], style[1]);\n\t\t}\n\n\t\tObject.defineProperty(styles, groupName, {\n\t\t\tvalue: group,\n\t\t\tenumerable: false\n\t\t});\n\t}\n\n\tObject.defineProperty(styles, 'codes', {\n\t\tvalue: codes,\n\t\tenumerable: false\n\t});\n\n\tstyles.color.close = '\\u001B[39m';\n\tstyles.bgColor.close = '\\u001B[49m';\n\n\tsetLazyProperty(styles.color, 'ansi', () => makeDynamicStyles(wrapAnsi16, 'ansi16', ansi2ansi, false));\n\tsetLazyProperty(styles.color, 'ansi256', () => makeDynamicStyles(wrapAnsi256, 'ansi256', ansi2ansi, false));\n\tsetLazyProperty(styles.color, 'ansi16m', () => makeDynamicStyles(wrapAnsi16m, 'rgb', rgb2rgb, false));\n\tsetLazyProperty(styles.bgColor, 'ansi', () => makeDynamicStyles(wrapAnsi16, 'ansi16', ansi2ansi, true));\n\tsetLazyProperty(styles.bgColor, 'ansi256', () => makeDynamicStyles(wrapAnsi256, 'ansi256', ansi2ansi, true));\n\tsetLazyProperty(styles.bgColor, 'ansi16m', () => makeDynamicStyles(wrapAnsi16m, 'rgb', rgb2rgb, true));\n\n\treturn styles;\n}\n\n// Make the export immutable\nObject.defineProperty(module, 'exports', {\n\tenumerable: true,\n\tget: assembleStyles\n});\n","'use strict';\nmodule.exports = {\n\tstdout: false,\n\tstderr: false\n};\n","'use strict';\n\nconst stringReplaceAll = (string, substring, replacer) => {\n\tlet index = string.indexOf(substring);\n\tif (index === -1) {\n\t\treturn string;\n\t}\n\n\tconst substringLength = substring.length;\n\tlet endIndex = 0;\n\tlet returnValue = '';\n\tdo {\n\t\treturnValue += string.substr(endIndex, index - endIndex) + substring + replacer;\n\t\tendIndex = index + substringLength;\n\t\tindex = string.indexOf(substring, endIndex);\n\t} while (index !== -1);\n\n\treturnValue += string.substr(endIndex);\n\treturn returnValue;\n};\n\nconst stringEncaseCRLFWithFirstIndex = (string, prefix, postfix, index) => {\n\tlet endIndex = 0;\n\tlet returnValue = '';\n\tdo {\n\t\tconst gotCR = string[index - 1] === '\\r';\n\t\treturnValue += string.substr(endIndex, (gotCR ? index - 1 : index) - endIndex) + prefix + (gotCR ? '\\r\\n' : '\\n') + postfix;\n\t\tendIndex = index + 1;\n\t\tindex = string.indexOf('\\n', endIndex);\n\t} while (index !== -1);\n\n\treturnValue += string.substr(endIndex);\n\treturn returnValue;\n};\n\nmodule.exports = {\n\tstringReplaceAll,\n\tstringEncaseCRLFWithFirstIndex\n};\n","'use strict';\nconst 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;\nconst STYLE_REGEX = /(?:^|\\.)(\\w+)(?:\\(([^)]*)\\))?/g;\nconst STRING_REGEX = /^(['\"])((?:\\\\.|(?!\\1)[^\\\\])*)\\1$/;\nconst ESCAPE_REGEX = /\\\\(u(?:[a-f\\d]{4}|{[a-f\\d]{1,6}})|x[a-f\\d]{2}|.)|([^\\\\])/gi;\n\nconst ESCAPES = new Map([\n\t['n', '\\n'],\n\t['r', '\\r'],\n\t['t', '\\t'],\n\t['b', '\\b'],\n\t['f', '\\f'],\n\t['v', '\\v'],\n\t['0', '\\0'],\n\t['\\\\', '\\\\'],\n\t['e', '\\u001B'],\n\t['a', '\\u0007']\n]);\n\nfunction unescape(c) {\n\tconst u = c[0] === 'u';\n\tconst bracket = c[1] === '{';\n\n\tif ((u && !bracket && c.length === 5) || (c[0] === 'x' && c.length === 3)) {\n\t\treturn String.fromCharCode(parseInt(c.slice(1), 16));\n\t}\n\n\tif (u && bracket) {\n\t\treturn String.fromCodePoint(parseInt(c.slice(2, -1), 16));\n\t}\n\n\treturn ESCAPES.get(c) || c;\n}\n\nfunction parseArguments(name, arguments_) {\n\tconst results = [];\n\tconst chunks = arguments_.trim().split(/\\s*,\\s*/g);\n\tlet matches;\n\n\tfor (const chunk of chunks) {\n\t\tconst number = Number(chunk);\n\t\tif (!Number.isNaN(number)) {\n\t\t\tresults.push(number);\n\t\t} else if ((matches = chunk.match(STRING_REGEX))) {\n\t\t\tresults.push(matches[2].replace(ESCAPE_REGEX, (m, escape, character) => escape ? unescape(escape) : character));\n\t\t} else {\n\t\t\tthrow new Error(`Invalid Chalk template style argument: ${chunk} (in style '${name}')`);\n\t\t}\n\t}\n\n\treturn results;\n}\n\nfunction parseStyle(style) {\n\tSTYLE_REGEX.lastIndex = 0;\n\n\tconst results = [];\n\tlet matches;\n\n\twhile ((matches = STYLE_REGEX.exec(style)) !== null) {\n\t\tconst name = matches[1];\n\n\t\tif (matches[2]) {\n\t\t\tconst args = parseArguments(name, matches[2]);\n\t\t\tresults.push([name].concat(args));\n\t\t} else {\n\t\t\tresults.push([name]);\n\t\t}\n\t}\n\n\treturn results;\n}\n\nfunction buildStyle(chalk, styles) {\n\tconst enabled = {};\n\n\tfor (const layer of styles) {\n\t\tfor (const style of layer.styles) {\n\t\t\tenabled[style[0]] = layer.inverse ? null : style.slice(1);\n\t\t}\n\t}\n\n\tlet current = chalk;\n\tfor (const [styleName, styles] of Object.entries(enabled)) {\n\t\tif (!Array.isArray(styles)) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (!(styleName in current)) {\n\t\t\tthrow new Error(`Unknown Chalk style: ${styleName}`);\n\t\t}\n\n\t\tcurrent = styles.length > 0 ? current[styleName](...styles) : current[styleName];\n\t}\n\n\treturn current;\n}\n\nmodule.exports = (chalk, temporary) => {\n\tconst styles = [];\n\tconst chunks = [];\n\tlet chunk = [];\n\n\t// eslint-disable-next-line max-params\n\ttemporary.replace(TEMPLATE_REGEX, (m, escapeCharacter, inverse, style, close, character) => {\n\t\tif (escapeCharacter) {\n\t\t\tchunk.push(unescape(escapeCharacter));\n\t\t} else if (style) {\n\t\t\tconst string = chunk.join('');\n\t\t\tchunk = [];\n\t\t\tchunks.push(styles.length === 0 ? string : buildStyle(chalk, styles)(string));\n\t\t\tstyles.push({inverse, styles: parseStyle(style)});\n\t\t} else if (close) {\n\t\t\tif (styles.length === 0) {\n\t\t\t\tthrow new Error('Found extraneous } in Chalk template literal');\n\t\t\t}\n\n\t\t\tchunks.push(buildStyle(chalk, styles)(chunk.join('')));\n\t\t\tchunk = [];\n\t\t\tstyles.pop();\n\t\t} else {\n\t\t\tchunk.push(character);\n\t\t}\n\t});\n\n\tchunks.push(chunk.join(''));\n\n\tif (styles.length > 0) {\n\t\tconst errMessage = `Chalk template literal is missing ${styles.length} closing bracket${styles.length === 1 ? '' : 's'} (\\`}\\`)`;\n\t\tthrow new Error(errMessage);\n\t}\n\n\treturn chunks.join('');\n};\n","'use strict';\nconst ansiStyles = require('ansi-styles');\nconst {stdout: stdoutColor, stderr: stderrColor} = require('supports-color');\nconst {\n\tstringReplaceAll,\n\tstringEncaseCRLFWithFirstIndex\n} = require('./util');\n\nconst {isArray} = Array;\n\n// `supportsColor.level` → `ansiStyles.color[name]` mapping\nconst levelMapping = [\n\t'ansi',\n\t'ansi',\n\t'ansi256',\n\t'ansi16m'\n];\n\nconst styles = Object.create(null);\n\nconst applyOptions = (object, options = {}) => {\n\tif (options.level && !(Number.isInteger(options.level) && options.level >= 0 && options.level <= 3)) {\n\t\tthrow new Error('The `level` option should be an integer from 0 to 3');\n\t}\n\n\t// Detect level if not set manually\n\tconst colorLevel = stdoutColor ? stdoutColor.level : 0;\n\tobject.level = options.level === undefined ? colorLevel : options.level;\n};\n\nclass ChalkClass {\n\tconstructor(options) {\n\t\t// eslint-disable-next-line no-constructor-return\n\t\treturn chalkFactory(options);\n\t}\n}\n\nconst chalkFactory = options => {\n\tconst chalk = {};\n\tapplyOptions(chalk, options);\n\n\tchalk.template = (...arguments_) => chalkTag(chalk.template, ...arguments_);\n\n\tObject.setPrototypeOf(chalk, Chalk.prototype);\n\tObject.setPrototypeOf(chalk.template, chalk);\n\n\tchalk.template.constructor = () => {\n\t\tthrow new Error('`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.');\n\t};\n\n\tchalk.template.Instance = ChalkClass;\n\n\treturn chalk.template;\n};\n\nfunction Chalk(options) {\n\treturn chalkFactory(options);\n}\n\nfor (const [styleName, style] of Object.entries(ansiStyles)) {\n\tstyles[styleName] = {\n\t\tget() {\n\t\t\tconst builder = createBuilder(this, createStyler(style.open, style.close, this._styler), this._isEmpty);\n\t\t\tObject.defineProperty(this, styleName, {value: builder});\n\t\t\treturn builder;\n\t\t}\n\t};\n}\n\nstyles.visible = {\n\tget() {\n\t\tconst builder = createBuilder(this, this._styler, true);\n\t\tObject.defineProperty(this, 'visible', {value: builder});\n\t\treturn builder;\n\t}\n};\n\nconst usedModels = ['rgb', 'hex', 'keyword', 'hsl', 'hsv', 'hwb', 'ansi', 'ansi256'];\n\nfor (const model of usedModels) {\n\tstyles[model] = {\n\t\tget() {\n\t\t\tconst {level} = this;\n\t\t\treturn function (...arguments_) {\n\t\t\t\tconst styler = createStyler(ansiStyles.color[levelMapping[level]][model](...arguments_), ansiStyles.color.close, this._styler);\n\t\t\t\treturn createBuilder(this, styler, this._isEmpty);\n\t\t\t};\n\t\t}\n\t};\n}\n\nfor (const model of usedModels) {\n\tconst bgModel = 'bg' + model[0].toUpperCase() + model.slice(1);\n\tstyles[bgModel] = {\n\t\tget() {\n\t\t\tconst {level} = this;\n\t\t\treturn function (...arguments_) {\n\t\t\t\tconst styler = createStyler(ansiStyles.bgColor[levelMapping[level]][model](...arguments_), ansiStyles.bgColor.close, this._styler);\n\t\t\t\treturn createBuilder(this, styler, this._isEmpty);\n\t\t\t};\n\t\t}\n\t};\n}\n\nconst proto = Object.defineProperties(() => {}, {\n\t...styles,\n\tlevel: {\n\t\tenumerable: true,\n\t\tget() {\n\t\t\treturn this._generator.level;\n\t\t},\n\t\tset(level) {\n\t\t\tthis._generator.level = level;\n\t\t}\n\t}\n});\n\nconst createStyler = (open, close, parent) => {\n\tlet openAll;\n\tlet closeAll;\n\tif (parent === undefined) {\n\t\topenAll = open;\n\t\tcloseAll = close;\n\t} else {\n\t\topenAll = parent.openAll + open;\n\t\tcloseAll = close + parent.closeAll;\n\t}\n\n\treturn {\n\t\topen,\n\t\tclose,\n\t\topenAll,\n\t\tcloseAll,\n\t\tparent\n\t};\n};\n\nconst createBuilder = (self, _styler, _isEmpty) => {\n\tconst builder = (...arguments_) => {\n\t\tif (isArray(arguments_[0]) && isArray(arguments_[0].raw)) {\n\t\t\t// Called as a template literal, for example: chalk.red`2 + 3 = {bold ${2+3}}`\n\t\t\treturn applyStyle(builder, chalkTag(builder, ...arguments_));\n\t\t}\n\n\t\t// Single argument is hot path, implicit coercion is faster than anything\n\t\t// eslint-disable-next-line no-implicit-coercion\n\t\treturn applyStyle(builder, (arguments_.length === 1) ? ('' + arguments_[0]) : arguments_.join(' '));\n\t};\n\n\t// We alter the prototype because we must return a function, but there is\n\t// no way to create a function with a different prototype\n\tObject.setPrototypeOf(builder, proto);\n\n\tbuilder._generator = self;\n\tbuilder._styler = _styler;\n\tbuilder._isEmpty = _isEmpty;\n\n\treturn builder;\n};\n\nconst applyStyle = (self, string) => {\n\tif (self.level <= 0 || !string) {\n\t\treturn self._isEmpty ? '' : string;\n\t}\n\n\tlet styler = self._styler;\n\n\tif (styler === undefined) {\n\t\treturn string;\n\t}\n\n\tconst {openAll, closeAll} = styler;\n\tif (string.indexOf('\\u001B') !== -1) {\n\t\twhile (styler !== undefined) {\n\t\t\t// Replace any instances already present with a re-opening code\n\t\t\t// otherwise only the part of the string until said closing code\n\t\t\t// will be colored, and the rest will simply be 'plain'.\n\t\t\tstring = stringReplaceAll(string, styler.close, styler.open);\n\n\t\t\tstyler = styler.parent;\n\t\t}\n\t}\n\n\t// We can move both next actions out of loop, because remaining actions in loop won't have\n\t// any/visible effect on parts we add here. Close the styling before a linebreak and reopen\n\t// after next line to fix a bleed issue on macOS: https://github.com/chalk/chalk/pull/92\n\tconst lfIndex = string.indexOf('\\n');\n\tif (lfIndex !== -1) {\n\t\tstring = stringEncaseCRLFWithFirstIndex(string, closeAll, openAll, lfIndex);\n\t}\n\n\treturn openAll + string + closeAll;\n};\n\nlet template;\nconst chalkTag = (chalk, ...strings) => {\n\tconst [firstString] = strings;\n\n\tif (!isArray(firstString) || !isArray(firstString.raw)) {\n\t\t// If chalk() was called by itself or with a string,\n\t\t// return the string itself as a string.\n\t\treturn strings.join(' ');\n\t}\n\n\tconst arguments_ = strings.slice(1);\n\tconst parts = [firstString.raw[0]];\n\n\tfor (let i = 1; i < firstString.length; i++) {\n\t\tparts.push(\n\t\t\tString(arguments_[i - 1]).replace(/[{}\\\\]/g, '\\\\$&'),\n\t\t\tString(firstString.raw[i])\n\t\t);\n\t}\n\n\tif (template === undefined) {\n\t\ttemplate = require('./templates');\n\t}\n\n\treturn template(chalk, parts.join(''));\n};\n\nObject.defineProperties(Chalk.prototype, styles);\n\nconst chalk = Chalk(); // eslint-disable-line new-cap\nchalk.supportsColor = stdoutColor;\nchalk.stderr = Chalk({level: stderrColor ? stderrColor.level : 0}); // eslint-disable-line new-cap\nchalk.stderr.supportsColor = stderrColor;\n\nmodule.exports = chalk;\n","import _cloneDeep from \"lodash.clonedeep\";\nimport isNode from \"detect-node\";\n//#region \\0rolldown/runtime.js\nvar __create = Object.create;\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __getProtoOf = Object.getPrototypeOf;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __commonJSMin = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);\nvar __copyProps = (to, from, except, desc) => {\n\tif (from && typeof from === \"object\" || typeof from === \"function\") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {\n\t\tkey = keys[i];\n\t\tif (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {\n\t\t\tget: ((k) => from[k]).bind(null, key),\n\t\t\tenumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable\n\t\t});\n\t}\n\treturn to;\n};\nvar __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, \"default\", {\n\tvalue: mod,\n\tenumerable: true\n}) : target, mod));\n//#endregion\n//#region src/instrumentation/instrumentDefs.ts\nvar Gauge = /* @__PURE__ */ function(Gauge) {\n\tGauge[\"ACTIVE_REQUEST_GAUGE\"] = \"a\";\n\tGauge[\"AUTHENTICATION_COUNT_GAUGE\"] = \"b\";\n\tGauge[\"AUTHENTICATION_ERROR_COUNT_GAUGE\"] = \"aa\";\n\tGauge[\"AUTHENTICATION_RETRY_COUNT_GAUGE\"] = \"ab\";\n\tGauge[\"CONNECTION_POOL_IDLE_GAUGE\"] = \"c\";\n\tGauge[\"CONNECTION_POOL_TOTAL_GAUGE\"] = \"d\";\n\tGauge[\"CONNECTION_POOL_WAITING_GAUGE\"] = \"e\";\n\tGauge[\"CPU_LOAD_GAUGE\"] = \"f\";\n\tGauge[\"CPU_SYSTEM_LOAD_GAUGE\"] = \"g\";\n\tGauge[\"DURATION_GAUGE\"] = \"h\";\n\tGauge[\"DURATION_HISTOGRAM_GAUGE\"] = \"i\";\n\tGauge[\"ERROR_COUNT_GAUGE\"] = \"j\";\n\tGauge[\"LATENCY_GAUGE\"] = \"k\";\n\tGauge[\"LATENCY_HISTOGRAM_GAUGE\"] = \"l\";\n\tGauge[\"LOGGER\"] = \"m\";\n\tGauge[\"LOGGER_COPY\"] = \"n\";\n\tGauge[\"NETWORK_RX_GAUGE\"] = \"o\";\n\tGauge[\"NETWORK_TX_GAUGE\"] = \"p\";\n\tGauge[\"REQUEST_COUNT_GAUGE\"] = \"q\";\n\tGauge[\"RETRY_COUNT_GAUGE\"] = \"r\";\n\tGauge[\"TIMER_GAUGE\"] = \"s\";\n\tGauge[\"VELOCITY_GAUGE\"] = \"t\";\n\tGauge[\"CONNECTION_COUNT_GAUGE\"] = \"u\";\n\tGauge[\"OBJECT_GAUGE\"] = \"v\";\n\tGauge[\"PAYLOAD_SIZE\"] = \"w\";\n\tGauge[\"CORE_COUNT_GAUGE\"] = \"x\";\n\tGauge[\"CHILD_COUNT\"] = \"y\";\n\tGauge[\"UNKNOWN\"] = \"z\";\n\treturn Gauge;\n}({});\nvar GaugeTypes = /* @__PURE__ */ function(GaugeTypes) {\n\tGaugeTypes[\"GAUGE_TYPE\"] = \"_\";\n\tGaugeTypes[\"INSTRUMENT_GAUGE\"] = \"a\";\n\tGaugeTypes[\"INSTRUMENT_VELOCITY\"] = \"b\";\n\tGaugeTypes[\"INSTRUMENT_HISTOGRAM\"] = \"c\";\n\tGaugeTypes[\"INSTRUMENT_LOG\"] = \"d\";\n\tGaugeTypes[\"INSTRUMENT_TIMER\"] = \"e\";\n\tGaugeTypes[\"INSTRUMENT_OBJECT\"] = \"f\";\n\treturn GaugeTypes;\n}({});\n//#endregion\n//#region src/instrumentation/instruments/instrumentBase.ts\nvar InstrumentBaseOptions = class {\n\tfixedSize;\n\tpadLength;\n\tlabel;\n};\nvar InstrumentBaseTelemetry = class {};\nvar InstrumentBase = class {\n\t#label = \"\";\n\t#options = null;\n\t#data = {};\n\tconstructor(options = {}) {\n\t\tif (typeof options === \"string\" || options instanceof String) throw new Error(\"Instrument parameter must be an options object.\");\n\t\tthis.#options = options;\n\t\tif (options.label) this.#label = options.label;\n\t\telse this.#label = \"InstrumentGauge\";\n\t}\n\t[GaugeTypes.GAUGE_TYPE] = GaugeTypes.INSTRUMENT_OBJECT;\n\tval;\n\tWithLabel(label) {\n\t\tthis.label = label;\n\t\treturn this;\n\t}\n\tDefineCopyProperties(propertyNames) {\n\t\tpropertyNames.forEach((propertyName) => {\n\t\t\tObject.defineProperty(this, propertyName, {\n\t\t\t\tenumerable: true,\n\t\t\t\tget: () => this.#data[propertyName],\n\t\t\t\tset: (value) => {\n\t\t\t\t\tif (value === void 0) return;\n\t\t\t\t\tthis.#data[propertyName] = value;\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\t}\n\tGetNumber(val) {\n\t\tif (Number.isInteger(val)) return val;\n\t\telse return Math.round((val + Number.EPSILON) * 100) / 100;\n\t}\n\tget options() {\n\t\treturn this.#options;\n\t}\n\tset options(optionsValue) {\n\t\tthis.#options = optionsValue;\n\t}\n\tget label() {\n\t\treturn this.#label;\n\t}\n\tset label(labelValue) {\n\t\tthis.#label = labelValue;\n\t}\n\tStopTimer() {}\n\tProcessTelemetry(telemetry) {\n\t\tthrow new Error(`Must override in extended class: [ProcessTelemetry]: [${telemetry}].`);\n\t}\n};\n//#endregion\n//#region src/instrumentation/instruments/instrumentVelocity.ts\nvar InstrumentVelocityOptions = class extends InstrumentBaseOptions {\n\tinterval;\n\tvalStackMaxLength;\n\tmaxAverageValStack;\n\tmaxAverageIterations;\n\tfromJSON;\n\tinitValue;\n\tautoComputeVelocity;\n\tvelocityTimeDiff;\n\tvaTimeDiff;\n\tautoComputeVelocityTimeout;\n};\nvar InstrumentVelocityTelemetry = class extends InstrumentBaseTelemetry {\n\tval;\n\tInc;\n};\nvar InstrumentVelocity = class extends InstrumentBase {\n\t#val = 0;\n\t#interval = null;\n\t#timeoutComputeVelocity = null;\n\t#lastVelocity = 0;\n\t#delta = 0;\n\t#maxVelocity = 0;\n\t#timerInterval = 0;\n\t#copy = false;\n\t#velocity = 0;\n\t#velocityVal = 0;\n\t#valStack = [];\n\t#averageValStack = [];\n\t#maxAverageValStack = 0;\n\t#maxAverageIterations = 0;\n\t#valStackMaxLength = 0;\n\t#valStackAverage = 0;\n\t#timeStamp = 0;\n\t#maxTimeDiff = 0;\n\t#vaTimeDiff = 0;\n\t#velocityTimeDiff = 0;\n\t#autoComputeVelocity = false;\n\t#autoComputeVelocityTimeout = 0;\n\t#countDiff = 0;\n\t#timeDiff = 0;\n\t#deltaCountDiff = 0;\n\t#deltaTimeDif = 0;\n\t#minTimeForReporting = 0;\n\t#averageVelocity = [];\n\tconstructor(options = {}) {\n\t\tsuper(options);\n\t\tif (typeof options.label === \"undefined\") this.label = \"InstrumentVelocity\";\n\t\telse this.label = options.label;\n\t\tif (typeof options.interval === \"undefined\") this.#timerInterval = 1e3;\n\t\telse this.#timerInterval = options.interval;\n\t\tif (typeof options.valStackMaxLength === \"undefined\") this.#valStackMaxLength = 100;\n\t\telse this.#valStackMaxLength = options.valStackMaxLength;\n\t\tif (typeof options.fromJSON === \"undefined\") this.#copy = false;\n\t\telse this.#copy = true;\n\t\tif (typeof options.autoComputeVelocity === \"undefined\") this.#autoComputeVelocity = false;\n\t\telse this.#autoComputeVelocity = options.autoComputeVelocity;\n\t\tif (typeof options.maxAverageValStack === \"undefined\") this.#maxAverageValStack = 5;\n\t\telse this.#maxAverageValStack = options.maxAverageValStack;\n\t\tif (typeof options.maxAverageIterations === \"undefined\") this.#maxAverageIterations = 3;\n\t\telse this.#maxAverageIterations = options.maxAverageIterations;\n\t\tif (typeof options.velocityTimeDiff === \"undefined\") this.#velocityTimeDiff = 5e3;\n\t\telse this.#velocityTimeDiff = options.velocityTimeDiff;\n\t\tif (typeof options.vaTimeDiff === \"undefined\") this.#vaTimeDiff = 1e4;\n\t\telse this.#vaTimeDiff = options.vaTimeDiff;\n\t\tif (typeof options.autoComputeVelocityTimeout === \"undefined\") this.#autoComputeVelocityTimeout = 50;\n\t\telse this.#autoComputeVelocityTimeout = options.autoComputeVelocityTimeout;\n\t\tthis.#maxTimeDiff = this.#vaTimeDiff * 2;\n\t\tthis.#minTimeForReporting = this.#vaTimeDiff + 2e3;\n\t\tObject.defineProperty(this, GaugeTypes.GAUGE_TYPE, {\n\t\t\tenumerable: true,\n\t\t\tget: () => GaugeTypes.INSTRUMENT_VELOCITY\n\t\t});\n\t\tif (this.#copy) this.DefineCopyProperties([\n\t\t\t\"val\",\n\t\t\t\"maxVelocity\",\n\t\t\t\"delta\",\n\t\t\t\"velocity\",\n\t\t\t\"va\",\n\t\t\t\"timeStamp\",\n\t\t\t\"deltaTimeDif\",\n\t\t\t\"deltaCountDiff\",\n\t\t\t\"timeDiff\",\n\t\t\t\"countDiff\",\n\t\t\t\"averageVelocity\"\n\t\t]);\n\t\telse {\n\t\t\tObject.defineProperty(this, \"val\", {\n\t\t\t\tenumerable: true,\n\t\t\t\tget: () => this.#GetVal(),\n\t\t\t\tset: (value) => {\n\t\t\t\t\tthis.#SetVal(value);\n\t\t\t\t}\n\t\t\t});\n\t\t\tObject.defineProperty(this, \"maxVelocity\", {\n\t\t\t\tenumerable: true,\n\t\t\t\tget: () => this.#GetMaxVelocity()\n\t\t\t});\n\t\t\tObject.defineProperty(this, \"delta\", {\n\t\t\t\tenumerable: true,\n\t\t\t\tget: () => this.#GetDelta()\n\t\t\t});\n\t\t\tObject.defineProperty(this, \"velocity\", {\n\t\t\t\tenumerable: true,\n\t\t\t\tget: () => this.#GetVelocity()\n\t\t\t});\n\t\t\tObject.defineProperty(this, \"va\", {\n\t\t\t\tenumerable: true,\n\t\t\t\tget: () => this.#GetVelocityStackAverage()\n\t\t\t});\n\t\t\tObject.defineProperty(this, \"timeStamp\", {\n\t\t\t\tenumerable: true,\n\t\t\t\tget: () => this.#GetTimeStamp()\n\t\t\t});\n\t\t\tObject.defineProperty(this, \"countDiff\", {\n\t\t\t\tenumerable: true,\n\t\t\t\tget: () => this.#GetCountDiff()\n\t\t\t});\n\t\t\tObject.defineProperty(this, \"timeDiff\", {\n\t\t\t\tenumerable: true,\n\t\t\t\tget: () => this.#GetTimeDiff()\n\t\t\t});\n\t\t\tObject.defineProperty(this, \"deltaCountDiff\", {\n\t\t\t\tenumerable: true,\n\t\t\t\tget: () => this.#GetDeltaCountDiff()\n\t\t\t});\n\t\t\tObject.defineProperty(this, \"deltaTimeDif\", {\n\t\t\t\tenumerable: true,\n\t\t\t\tget: () => this.#GetDeltaTimeDif()\n\t\t\t});\n\t\t\tObject.defineProperty(this, \"averageVelocity\", {\n\t\t\t\tenumerable: true,\n\t\t\t\tget: () => this.#GetAverageVelocity()\n\t\t\t});\n\t\t\tif (this.#timerInterval > 0 && this.#autoComputeVelocity === false) this._StartTimer();\n\t\t}\n\t\tif (typeof options.initValue !== \"undefined\") this.val = options.initValue;\n\t\tif (typeof options.fromJSON !== \"undefined\") {\n\t\t\tconst result = _cloneDeep(options.fromJSON);\n\t\t\tthis.val = result.val;\n\t\t\tthis.velocity = result.velocity;\n\t\t\tthis.maxVelocity = result.maxVelocity;\n\t\t\tthis.delta = result.delta;\n\t\t\tthis.va = result.va;\n\t\t\tthis.timeStamp = result.timeStamp;\n\t\t\tthis.countDiff = result.countDiff;\n\t\t\tthis.timeDiff = result.timeDiff;\n\t\t\tthis.deltaCountDiff = result.deltaCountDiff;\n\t\t\tthis.deltaTimeDif = result.deltaTimeDif;\n\t\t\tthis.averageVelocity = _cloneDeep(result.averageVelocity);\n\t\t}\n\t}\n\tmaxVelocity = 0;\n\tdelta = 0;\n\tvelocity = 0;\n\tva = 0;\n\ttimeStamp = 0;\n\tcountDiff = 0;\n\ttimeDiff = 0;\n\tdeltaCountDiff = 0;\n\tdeltaTimeDif = 0;\n\taverageVelocity = [];\n\tval = 0;\n\tWithValStackMaxLength(valStackMaxLength) {\n\t\tthis.#valStackMaxLength = valStackMaxLength;\n\t\tthis.#valStack = [];\n\t\treturn this;\n\t}\n\t_StartTimer() {\n\t\tthis.#interval = setInterval(() => {\n\t\t\tthis.#ComputeVelocity();\n\t\t\tlet pushVal = this.#velocity;\n\t\t\tfor (let i = 0; i < this.#maxAverageIterations; i++) {\n\t\t\t\tif (!this.#averageValStack[i]) this.#averageValStack[i] = [];\n\t\t\t\tthis.#averageValStack[i].push(pushVal);\n\t\t\t\tif (this.#averageValStack[i].length > this.#maxAverageValStack) this.#averageValStack[i].shift();\n\t\t\t\tpushVal = this.#averageValStack[i].reduce((prev, current) => prev + current) / this.#averageValStack[i].length;\n\t\t\t\tthis.#averageVelocity[i] = pushVal;\n\t\t\t}\n\t\t}, this.#timerInterval);\n\t\tif (isNode) this.#interval.unref();\n\t}\n\t#ComputeVelocityByTimeDiff(checkTimeDiff, checkDeltaTimeDiff) {\n\t\tlet val = 0;\n\t\tlet deltaVal = 0;\n\t\tlet countDiff = 0;\n\t\tlet timeDiff = 0;\n\t\tlet deltaCountDiff = 0;\n\t\tlet deltaTimeDiff = 0;\n\t\tif (this.#valStack.length > 1 && this.#valStack[this.#valStack.length - 1].timeStamp - this.#valStack[0].timeStamp > this.#minTimeForReporting) {\n\t\t\tconst dp = this.#valStack[this.#valStack.length - 1];\n\t\t\tlet timeDiffPos = -1;\n\t\t\tlet deltaDiffPos = -1;\n\t\t\tfor (let i = this.#valStack.length - 2; i > -1; i--) {\n\t\t\t\tif (timeDiffPos === -1 && this.#timeStamp - this.#valStack[i].timeStamp >= checkTimeDiff) {\n\t\t\t\t\ttimeDiffPos = i;\n\t\t\t\t\tif (checkDeltaTimeDiff === 0) break;\n\t\t\t\t}\n\t\t\t\tif (deltaDiffPos === -1 && this.#timeStamp - this.#valStack[i].timeStamp >= checkDeltaTimeDiff) deltaDiffPos = i;\n\t\t\t\tif (timeDiffPos !== -1 && deltaDiffPos !== -1) break;\n\t\t\t}\n\t\t\tif (timeDiffPos > -1) {\n\t\t\t\tcountDiff = dp.count - this.#valStack[timeDiffPos].count;\n\t\t\t\tif (countDiff > 0) {\n\t\t\t\t\ttimeDiff = dp.timeStamp - this.#valStack[timeDiffPos].timeStamp;\n\t\t\t\t\tif (timeDiff > 0) val = 1e3 / timeDiff * countDiff;\n\t\t\t\t\telse val = 0;\n\t\t\t\t} else val = 0;\n\t\t\t} else val = 0;\n\t\t\tif (deltaDiffPos > -1) {\n\t\t\t\tdeltaCountDiff = this.#valStack[timeDiffPos].count - this.#valStack[deltaDiffPos].count;\n\t\t\t\tif (deltaCountDiff > 0) {\n\t\t\t\t\tdeltaTimeDiff = this.#valStack[timeDiffPos].timeStamp - this.#valStack[deltaDiffPos].timeStamp;\n\t\t\t\t\tif (deltaTimeDiff > 0) deltaVal = 1e3 / deltaTimeDiff * deltaTimeDiff;\n\t\t\t\t\telse deltaVal = 0;\n\t\t\t\t} else deltaVal = 0;\n\t\t\t} else deltaVal = 0;\n\t\t}\n\t\treturn {\n\t\t\tval,\n\t\t\tcountDiff,\n\t\t\ttimeDiff,\n\t\t\tdeltaVal,\n\t\t\tdeltaCountDiff,\n\t\t\tdeltaTimeDiff\n\t\t};\n\t}\n\t#ComputeVelocity() {\n\t\tconst dp = {\n\t\t\ttimeStamp: performance.now(),\n\t\t\tcount: this.#velocityVal\n\t\t};\n\t\tthis.#valStack.push(dp);\n\t\tthis.#timeStamp = dp.timeStamp;\n\t\twhile (this.#valStack.length > 0 && this.#timeStamp - this.#valStack[0].timeStamp > this.#maxTimeDiff) this.#valStack.shift();\n\t\tthis.#valStackAverage = this.#ComputeVelocityByTimeDiff(this.#vaTimeDiff, 0).val;\n\t\tconst velocityDataPoint = this.#ComputeVelocityByTimeDiff(this.#velocityTimeDiff, this.#velocityTimeDiff * 2);\n\t\tthis.#velocity = velocityDataPoint.val;\n\t\tthis.#delta = velocityDataPoint.val - velocityDataPoint.deltaVal;\n\t\tthis.#countDiff = velocityDataPoint.countDiff;\n\t\tthis.#timeDiff = velocityDataPoint.timeDiff;\n\t\tthis.#deltaCountDiff = velocityDataPoint.deltaCountDiff;\n\t\tthis.#deltaTimeDif = velocityDataPoint.deltaTimeDiff;\n\t\tthis.#lastVelocity = this.#velocity;\n\t\tif (this.#velocity > this.#maxVelocity) this.#maxVelocity = this.#velocity;\n\t}\n\t#SetupAutoComputeVelocity() {\n\t\tif (this.#timeoutComputeVelocity) clearTimeout(this.#timeoutComputeVelocity);\n\t\tthis.#timeoutComputeVelocity = setTimeout(() => {\n\t\t\tthis.#ComputeVelocity();\n\t\t}, this.#autoComputeVelocityTimeout);\n\t}\n\t#GetVelocityStackAverage() {\n\t\treturn this.GetNumber(this.#valStackAverage);\n\t}\n\tInc(incVal = 1) {\n\t\tthis.#velocityVal += incVal;\n\t\tif (this.#autoComputeVelocity) this.#ComputeVelocity();\n\t\telse this.#SetupAutoComputeVelocity();\n\t}\n\t#GetVal() {\n\t\treturn this.GetNumber(this.#velocityVal);\n\t}\n\t#SetVal(updatedValue) {\n\t\tthis.#velocityVal = updatedValue;\n\t\tif (this.#autoComputeVelocity) this.#ComputeVelocity();\n\t\telse this.#SetupAutoComputeVelocity();\n\t}\n\t#GetVelocity() {\n\t\treturn this.GetNumber(this.#velocity);\n\t}\n\t#GetMaxVelocity() {\n\t\treturn this.GetNumber(this.#maxVelocity);\n\t}\n\t#GetDelta() {\n\t\treturn this.GetNumber(this.#delta);\n\t}\n\t#GetTimeStamp() {\n\t\treturn this.GetNumber(this.#timeStamp);\n\t}\n\t#GetCountDiff() {\n\t\treturn this.GetNumber(this.#countDiff);\n\t}\n\t#GetTimeDiff() {\n\t\treturn this.GetNumber(this.#timeDiff);\n\t}\n\t#GetDeltaCountDiff() {\n\t\treturn this.GetNumber(this.#deltaCountDiff);\n\t}\n\t#GetDeltaTimeDif() {\n\t\treturn this.GetNumber(this.#deltaTimeDif);\n\t}\n\t#GetAverageVelocity() {\n\t\treturn this.#averageVelocity;\n\t}\n\tStopTimer() {\n\t\tif (this.#interval !== null) {\n\t\t\tclearTimeout(this.#interval);\n\t\t\tthis.#interval = null;\n\t\t}\n\t}\n\tProcessTelemetry(telemetry) {\n\t\tif (telemetry.Inc !== void 0) this.Inc(telemetry.Inc);\n\t\tif (telemetry.val !== void 0) this.val = telemetry.val;\n\t}\n};\n//#endregion\n//#region src/instrumentation/instruments/instrumentHistogram.ts\nvar HistogramDataElementPos = /* @__PURE__ */ function(HistogramDataElementPos) {\n\tHistogramDataElementPos[HistogramDataElementPos[\"val\"] = 0] = \"val\";\n\tHistogramDataElementPos[HistogramDataElementPos[\"label\"] = 1] = \"label\";\n\tHistogramDataElementPos[HistogramDataElementPos[\"breakPoint\"] = 2] = \"breakPoint\";\n\treturn HistogramDataElementPos;\n}({});\nvar InstrumentHistogramOptions = class extends InstrumentBaseOptions {\n\thistogramData;\n\tinitValue;\n\tfromJSON;\n};\nvar InstrumentHistogramTelemetry = class extends InstrumentBaseTelemetry {\n\tval;\n};\nvar InstrumentHistogram = class extends InstrumentBase {\n\t#histogramData = [];\n\t#val = 0;\n\t#copy = false;\n\tconstructor(options = {}) {\n\t\tsuper(options);\n\t\tif (typeof options.label === \"undefined\") this.label = \"InstrumentHistogram\";\n\t\telse this.label = options.label;\n\t\tlet histogramData = null;\n\t\tif (typeof options.histogramData === \"undefined\") histogramData = null;\n\t\telse histogramData = options.histogramData;\n\t\tif (typeof options.fromJSON === \"undefined\") this.#copy = false;\n\t\telse this.#copy = true;\n\t\tif (histogramData === null) this.#histogramData = [\n\t\t\t[\n\t\t\t\t0,\n\t\t\t\t\"10\",\n\t\t\t\t10\n\t\t\t],\n\t\t\t[\n\t\t\t\t0,\n\t\t\t\t\"20\",\n\t\t\t\t20\n\t\t\t],\n\t\t\t[\n\t\t\t\t0,\n\t\t\t\t\"50\",\n\t\t\t\t50\n\t\t\t],\n\t\t\t[\n\t\t\t\t0,\n\t\t\t\t\"100\",\n\t\t\t\t100\n\t\t\t],\n\t\t\t[\n\t\t\t\t0,\n\t\t\t\t\"1000\",\n\t\t\t\t1e3\n\t\t\t],\n\t\t\t[\n\t\t\t\t0,\n\t\t\t\t\"5000\",\n\t\t\t\t5e3\n\t\t\t],\n\t\t\t[\n\t\t\t\t0,\n\t\t\t\t\"EE\",\n\t\t\t\t0\n\t\t\t]\n\t\t];\n\t\telse if (Array.isArray(histogramData)) {\n\t\t\tthis.#histogramData = [];\n\t\t\tfor (let i = 0; i < histogramData.length; i++) this.#histogramData.push([\n\t\t\t\t0,\n\t\t\t\t\"\" + histogramData[i],\n\t\t\t\tparseFloat(histogramData[i].toString())\n\t\t\t]);\n\t\t\tthis.#histogramData.push([\n\t\t\t\t0,\n\t\t\t\t\"EE\",\n\t\t\t\t0\n\t\t\t]);\n\t\t} else throw new Error(`Passed [${histogramData}] must be an array.`);\n\t\tObject.defineProperty(this, GaugeTypes.GAUGE_TYPE, {\n\t\t\tenumerable: true,\n\t\t\tget: () => GaugeTypes.INSTRUMENT_HISTOGRAM\n\t\t});\n\t\tif (this.#copy) this.DefineCopyProperties([\"val\", \"hist\"]);\n\t\telse {\n\t\t\tObject.defineProperty(this, \"val\", {\n\t\t\t\tenumerable: true,\n\t\t\t\tget: () => this.#GetVal(),\n\t\t\t\tset: (value) => {\n\t\t\t\t\tthis.#SetVal(value);\n\t\t\t\t}\n\t\t\t});\n\t\t\tObject.defineProperty(this, \"hist\", {\n\t\t\t\tenumerable: true,\n\t\t\t\tget: () => this.#GetHistogramData(),\n\t\t\t\tset: (value) => {\n\t\t\t\t\tthis.#SetHistogramData(value);\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t\tif (typeof options.initValue !== \"undefined\") this.#val = options.initValue;\n\t\tif (typeof options.fromJSON !== \"undefined\") {\n\t\t\tconst result = _cloneDeep(options.fromJSON);\n\t\t\tthis.#val = result.val;\n\t\t\tthis.hist = result.hist;\n\t\t}\n\t}\n\thist = [];\n\tval = 0;\n\tWithInitVal(initVal) {\n\t\tthis.#val = initVal;\n\t\treturn this;\n\t}\n\tResetHistogramData() {\n\t\tfor (let i = 0; i < this.hist.length; i++) this.hist[i][0] = 0;\n\t}\n\tAddObservation(updateValue) {\n\t\tif (this.#copy) throw new Error(\"Cannot add observations from the copy version of this class.\");\n\t\tlet i = 0;\n\t\tfor (; i < this.#histogramData.length - 1; i++) if (updateValue <= this.#histogramData[i][HistogramDataElementPos.breakPoint]) {\n\t\t\tthis.#histogramData[i][HistogramDataElementPos.val]++;\n\t\t\treturn;\n\t\t}\n\t\tthis.#histogramData[i][HistogramDataElementPos.val]++;\n\t}\n\t#GetVal() {\n\t\treturn this.GetNumber(this.#val);\n\t}\n\t#SetVal(value) {\n\t\tthis.#val = value;\n\t\tthis.AddObservation(value);\n\t}\n\tget formattedHistogramData() {\n\t\tlet retVal = \"\";\n\t\tlet sep = \"\";\n\t\tfor (let i = 0; i < this.hist.length; i++) {\n\t\t\tretVal += sep + \"[\" + (this.hist[i][HistogramDataElementPos.val] + \"/\" + this.hist[i][HistogramDataElementPos.label]).padStart(10, \" \") + \"]\";\n\t\t\tsep = \" \";\n\t\t}\n\t\treturn retVal;\n\t}\n\t#GetHistogramData() {\n\t\treturn this.#histogramData;\n\t}\n\t#SetHistogramData(value) {\n\t\tthis.#histogramData = value;\n\t}\n\tstatic AddHistogramDataEx(histoA, histoB) {\n\t\tif (histoA === null) return _cloneDeep(histoB);\n\t\tconst result = _cloneDeep(histoA);\n\t\tconst histogramAData = result.hist;\n\t\tconst histogramBData = histoB.hist;\n\t\tif (histogramAData.length !== histogramBData.length) throw new Error(\"Invalid HistogramData. HistogramData bucket lengths must be the same.\");\n\t\tfor (let i = 0; i < histogramAData.length; i++) {\n\t\t\tif (histogramAData[i][HistogramDataElementPos.breakPoint] !== histogramBData[i][HistogramDataElementPos.breakPoint]) throw new Error(`Invalid HistogramData. HistogramData bucket break-point at index [${i}] must be the same.`);\n\t\t\tif (histogramAData[i][HistogramDataElementPos.label] !== histogramBData[i][HistogramDataElementPos.label]) throw new Error(`Invalid HistogramData. HistogramData bucket label at index [${i}] must be the same.`);\n\t\t\thistogramAData[i][HistogramDataElementPos.val] += histogramBData[i][HistogramDataElementPos.val];\n\t\t}\n\t\treturn result;\n\t}\n\t/**\n\t* Adds a value object (from GetFormatted()) to this instance.\n\t* @param {*} value \n\t*/\n\tAddHistogramData(histogramData) {\n\t\tif (histogramData === null) return;\n\t\tif (this.hist.length !== histogramData.hist.length) throw new Error(\"Invalid HistogramData. HistogramData bucket lengths must be the same.\");\n\t\tfor (let i = 0; i < histogramData.hist.length; i++) {\n\t\t\tif (this.hist[i][HistogramDataElementPos.breakPoint] !== histogramData.hist[i][HistogramDataElementPos.breakPoint]) throw new Error(`Invalid HistogramData. HistogramData bucket break-point at index [${i}] must be the same.`);\n\t\t\tif (this.hist[i][HistogramDataElementPos.label] !== histogramData.hist[i][HistogramDataElementPos.label]) throw new Error(`Invalid HistogramData. HistogramData bucket label at index [${i}] must be the same.`);\n\t\t\tthis.hist[i][HistogramDataElementPos.val] += histogramData.hist[i][HistogramDataElementPos.val];\n\t\t}\n\t}\n\tProcessTelemetry(telemetry) {\n\t\tif (telemetry.val !== void 0) this.val = telemetry.val;\n\t}\n};\n//#endregion\n//#region src/instrumentation/instruments/instrumentLog.ts\nvar InstrumentLogOptions = class extends InstrumentBaseOptions {\n\tmaxSize;\n\tuseLatestMessages;\n\tconsoleLogging;\n\tinstrumentLogging;\n\twinstonLogging;\n\tfromJSON;\n\tinitValue;\n\tlogger;\n};\nvar InstrumentLogTelemetry = class extends InstrumentBaseTelemetry {\n\tAppend;\n\tLogMessage;\n\tval;\n\tResetLog;\n};\nvar InstrumentLog = class extends InstrumentBase {\n\t#messages = [];\n\t#readPos = 0;\n\t#maxSize = 200;\n\t#copy = false;\n\t#useLatestMessages = false;\n\t#consoleLogging = false;\n\t#instrumentLogging = true;\n\t#winstonLogging = false;\n\t#stsLogger;\n\tconstructor(options = {}) {\n\t\tsuper(options);\n\t\tif (typeof options.label === \"undefined\") this.label = \"InstrumentLog\";\n\t\telse this.label = options.label;\n\t\tif (typeof options.maxSize === \"undefined\") this.#maxSize = 200;\n\t\telse this.#maxSize = options.maxSize;\n\t\tif (typeof options.fromJSON === \"undefined\") this.#copy = false;\n\t\telse this.#copy = true;\n\t\tif (typeof options.useLatestMessages === \"undefined\") this.#useLatestMessages = false;\n\t\telse this.#useLatestMessages = options.useLatestMessages;\n\t\tif (typeof options.consoleLogging === \"undefined\") this.#consoleLogging = false;\n\t\telse this.#consoleLogging = options.consoleLogging;\n\t\tif (typeof options.instrumentLogging === \"undefined\") this.#instrumentLogging = true;\n\t\telse this.#instrumentLogging = options.instrumentLogging;\n\t\tif (typeof options.winstonLogging === \"undefined\") this.#winstonLogging = false;\n\t\telse this.#winstonLogging = options.winstonLogging;\n\t\tObject.defineProperty(this, GaugeTypes.GAUGE_TYPE, {\n\t\t\tenumerable: true,\n\t\t\tget: () => GaugeTypes.INSTRUMENT_LOG\n\t\t});\n\t\tif (this.#copy) this.DefineCopyProperties([\"val\"]);\n\t\telse Object.defineProperty(this, \"val\", {\n\t\t\tenumerable: true,\n\t\t\tget: () => _cloneDeep(this.#GetVal()),\n\t\t\tset: (value) => {\n\t\t\t\tthis.#SetVal(value);\n\t\t\t}\n\t\t});\n\t\tif (typeof options.initValue !== \"undefined\") this.val = options.initValue;\n\t\tif (typeof options.fromJSON !== \"undefined\") this.val = _cloneDeep(options.fromJSON).val;\n\t}\n\tval = [];\n\tWithMaxSize(maxSize) {\n\t\tthis.#maxSize = maxSize;\n\t\treturn this;\n\t}\n\tWithUseLatestMessages(useLatestMessages) {\n\t\tthis.#useLatestMessages = useLatestMessages;\n\t\treturn this;\n\t}\n\tWithConsoleLogging(consoleLogging) {\n\t\tthis.#consoleLogging = consoleLogging;\n\t\treturn this;\n\t}\n\tWithInstrumentLogging(instrumentLogging) {\n\t\tthis.#instrumentLogging = instrumentLogging;\n\t\treturn this;\n\t}\n\tget MaxSize() {\n\t\treturn this.#maxSize;\n\t}\n\tset MaxSize(maxSize) {\n\t\tthis.#maxSize = maxSize;\n\t}\n\t#DumpToConsole() {\n\t\tconst logReport = this.GetMessagesSinceLastRead();\n\t\tfor (let i = 0; i < logReport.length; i++) console.log(logReport[i]);\n\t}\n\tget consoleLogging() {\n\t\treturn this.#consoleLogging;\n\t}\n\tset consoleLogging(value) {\n\t\tthis.#consoleLogging = value;\n\t\tif (value === true) this.#DumpToConsole();\n\t}\n\tget instrumentLogging() {\n\t\treturn this.#instrumentLogging;\n\t}\n\tset instrumentLogging(value) {\n\t\tthis.#instrumentLogging = value;\n\t}\n\tAppend(messageArray) {\n\t\tfor (let i = 0; i < messageArray.length; i++) this.LogMessage(messageArray[i]);\n\t}\n\terror(message) {\n\t\tif (this.#winstonLogging && this.#stsLogger) this.#stsLogger.error(message);\n\t}\n\twarn(message) {\n\t\tif (this.#winstonLogging && this.#stsLogger) this.#stsLogger.warn(message);\n\t}\n\tinfo(message) {\n\t\tif (this.#winstonLogging && this.#stsLogger) this.#stsLogger.info(message);\n\t}\n\thttp(message) {\n\t\tif (this.#winstonLogging && this.#stsLogger) this.#stsLogger.http(message);\n\t}\n\tverbose(message) {\n\t\tif (this.#winstonLogging && this.#stsLogger) this.#stsLogger.verbose(message);\n\t}\n\tdebug(message) {\n\t\tif (this.#winstonLogging && this.#stsLogger) this.#stsLogger.debug(message);\n\t}\n\tsilly(message) {\n\t\tif (this.#winstonLogging && this.#stsLogger) this.#stsLogger.silly(message);\n\t}\n\tLogMessage(message) {\n\t\tif (this.#copy) throw new Error(\"Cannot add log messages from the copy version of this class.\");\n\t\tif (this.#consoleLogging === true) console.log(message);\n\t\tif (this.#instrumentLogging === false) return;\n\t\tthis.#messages.push(message);\n\t\tif (this.#messages.length > this.#maxSize) {\n\t\t\tthis.#messages.shift();\n\t\t\tthis.#readPos = this.#readPos > 0 ? this.#readPos - 1 : 0;\n\t\t}\n\t}\n\t#GetVal() {\n\t\tif (this.#useLatestMessages) return this.GetMessagesSinceLastRead();\n\t\telse return this.#messages;\n\t}\n\t#SetVal(updatedValue) {\n\t\tthis.#messages = updatedValue;\n\t\tthis.#readPos = 0;\n\t}\n\tGetMessagesNoUpdate() {\n\t\treturn this.#messages.slice(this.#readPos);\n\t}\n\tGetMessagesSinceLastRead() {\n\t\tconst retVal = this.#messages.slice(this.#readPos);\n\t\tthis.#readPos = this.#messages.length;\n\t\treturn retVal;\n\t}\n\tResetLog() {\n\t\tthis.#messages = [];\n\t\tthis.#readPos = 0;\n\t}\n\tProcessTelemetry(telemetry) {\n\t\tif (telemetry.val !== void 0) this.val = telemetry.val;\n\t\tif (telemetry.Append !== void 0) this.Append(telemetry.Append);\n\t\tif (telemetry.LogMessage !== void 0) this.LogMessage(telemetry.LogMessage);\n\t\tif (telemetry.ResetLog !== void 0 && telemetry.ResetLog === true) this.ResetLog();\n\t}\n};\n//#endregion\n//#region src/instrumentation/instruments/instrumentTimerGauge.ts\nvar InstrumentTimerOptions = class extends InstrumentBaseOptions {\n\tfromJSON;\n\tinitValue;\n};\nvar InstrumentTimerTelemetry = class extends InstrumentBaseTelemetry {\n\tval;\n\tPause;\n\tResume;\n\tReset;\n};\nvar InstrumentTimerGauge = class extends InstrumentBase {\n\t#start = 0;\n\t#copy = false;\n\t#pauseVal = 0;\n\tconstructor(options = {}) {\n\t\tsuper(options);\n\t\tif (typeof options.label === \"undefined\") this.label = \"InstrumentTimerGauge\";\n\t\telse this.label = options.label;\n\t\tif (typeof options.fromJSON === \"undefined\") this.#copy = false;\n\t\telse this.#copy = true;\n\t\tObject.defineProperty(this, GaugeTypes.GAUGE_TYPE, {\n\t\t\tenumerable: true,\n\t\t\tget: () => GaugeTypes.INSTRUMENT_TIMER\n\t\t});\n\t\tif (this.#copy) this.DefineCopyProperties([\"val\"]);\n\t\telse Object.defineProperty(this, \"val\", {\n\t\t\tenumerable: true,\n\t\t\tget: () => this.#GetVal(),\n\t\t\tset: (value) => {\n\t\t\t\tthis.#SetVal(value);\n\t\t\t}\n\t\t});\n\t\tif (typeof options.initValue !== \"undefined\") this.val = options.initValue;\n\t\tif (typeof options.fromJSON !== \"undefined\") this.val = _cloneDeep(options.fromJSON).val;\n\t\tthis.Reset();\n\t}\n\tval = 0;\n\tPause() {\n\t\tthis.#pauseVal = this.val;\n\t}\n\tResume() {\n\t\tthis.#pauseVal = 0;\n\t}\n\tReset() {\n\t\tthis.#start = performance.now();\n\t}\n\t#GetVal() {\n\t\tif (this.#pauseVal !== 0) return this.GetNumber(this.#pauseVal);\n\t\treturn this.GetNumber(performance.now() - this.#start);\n\t}\n\t#SetVal(updatedValue) {\n\t\tthis.#start = performance.now() - updatedValue;\n\t}\n\tget start() {\n\t\treturn this.#start;\n\t}\n\tProcessTelemetry(telemetry) {\n\t\tif (telemetry.val !== void 0) this.val = telemetry.val;\n\t\tif (telemetry.Pause !== void 0 && telemetry.Pause === true) this.Pause();\n\t\tif (telemetry.Resume !== void 0 && telemetry.Resume === true) this.Resume();\n\t\tif (telemetry.Reset !== void 0 && telemetry.Reset === true) this.Reset();\n\t}\n};\n//#endregion\n//#region node_modules/timsort/build/timsort.js\nvar require_timsort$1 = /* @__PURE__ */ __commonJSMin(((exports) => {\n\t/****\n\t* The MIT License\n\t*\n\t* Copyright (c) 2015 Marco Ziccardi\n\t*\n\t* Permission is hereby granted, free of charge, to any person obtaining a copy\n\t* of this software and associated documentation files (the \"Software\"), to deal\n\t* in the Software without restriction, including without limitation the rights\n\t* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n\t* copies of the Software, and to permit persons to whom the Software is\n\t* furnished to do so, subject to the following conditions:\n\t*\n\t* The above copyright notice and this permission notice shall be included in\n\t* all copies or substantial portions of the Software.\n\t*\n\t* THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n\t* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n\t* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n\t* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n\t* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n\t* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n\t* THE SOFTWARE.\n\t*\n\t****/\n\t(function(global, factory) {\n\t\tif (typeof define === \"function\" && define.amd) define(\"timsort\", [\"exports\"], factory);\n\t\telse if (typeof exports !== \"undefined\") factory(exports);\n\t\telse {\n\t\t\tvar mod = { exports: {} };\n\t\t\tfactory(mod.exports);\n\t\t\tglobal.timsort = mod.exports;\n\t\t}\n\t})(exports, function(exports$1) {\n\t\t\"use strict\";\n\t\texports$1.__esModule = true;\n\t\texports$1.sort = sort;\n\t\tfunction _classCallCheck(instance, Constructor) {\n\t\t\tif (!(instance instanceof Constructor)) throw new TypeError(\"Cannot call a class as a function\");\n\t\t}\n\t\tvar DEFAULT_MIN_MERGE = 32;\n\t\tvar DEFAULT_MIN_GALLOPING = 7;\n\t\tvar DEFAULT_TMP_STORAGE_LENGTH = 256;\n\t\tvar POWERS_OF_TEN = [\n\t\t\t1,\n\t\t\t10,\n\t\t\t100,\n\t\t\t1e3,\n\t\t\t1e4,\n\t\t\t1e5,\n\t\t\t1e6,\n\t\t\t1e7,\n\t\t\t1e8,\n\t\t\t1e9\n\t\t];\n\t\tfunction log10(x) {\n\t\t\tif (x < 1e5) {\n\t\t\t\tif (x < 100) return x < 10 ? 0 : 1;\n\t\t\t\tif (x < 1e4) return x < 1e3 ? 2 : 3;\n\t\t\t\treturn 4;\n\t\t\t}\n\t\t\tif (x < 1e7) return x < 1e6 ? 5 : 6;\n\t\t\tif (x < 1e9) return x < 1e8 ? 7 : 8;\n\t\t\treturn 9;\n\t\t}\n\t\tfunction alphabeticalCompare(a, b) {\n\t\t\tif (a === b) return 0;\n\t\t\tif (~~a === a && ~~b === b) {\n\t\t\t\tif (a === 0 || b === 0) return a < b ? -1 : 1;\n\t\t\t\tif (a < 0 || b < 0) {\n\t\t\t\t\tif (b >= 0) return -1;\n\t\t\t\t\tif (a >= 0) return 1;\n\t\t\t\t\ta = -a;\n\t\t\t\t\tb = -b;\n\t\t\t\t}\n\t\t\t\tvar al = log10(a);\n\t\t\t\tvar bl = log10(b);\n\t\t\t\tvar t = 0;\n\t\t\t\tif (al < bl) {\n\t\t\t\t\ta *= POWERS_OF_TEN[bl - al - 1];\n\t\t\t\t\tb /= 10;\n\t\t\t\t\tt = -1;\n\t\t\t\t} else if (al > bl) {\n\t\t\t\t\tb *= POWERS_OF_TEN[al - bl - 1];\n\t\t\t\t\ta /= 10;\n\t\t\t\t\tt = 1;\n\t\t\t\t}\n\t\t\t\tif (a === b) return t;\n\t\t\t\treturn a < b ? -1 : 1;\n\t\t\t}\n\t\t\tvar aStr = String(a);\n\t\t\tvar bStr = String(b);\n\t\t\tif (aStr === bStr) return 0;\n\t\t\treturn aStr < bStr ? -1 : 1;\n\t\t}\n\t\tfunction minRunLength(n) {\n\t\t\tvar r = 0;\n\t\t\twhile (n >= DEFAULT_MIN_MERGE) {\n\t\t\t\tr |= n & 1;\n\t\t\t\tn >>= 1;\n\t\t\t}\n\t\t\treturn n + r;\n\t\t}\n\t\tfunction makeAscendingRun(array, lo, hi, compare) {\n\t\t\tvar runHi = lo + 1;\n\t\t\tif (runHi === hi) return 1;\n\t\t\tif (compare(array[runHi++], array[lo]) < 0) {\n\t\t\t\twhile (runHi < hi && compare(array[runHi], array[runHi - 1]) < 0) runHi++;\n\t\t\t\treverseRun(array, lo, runHi);\n\t\t\t} else while (runHi < hi && compare(array[runHi], array[runHi - 1]) >= 0) runHi++;\n\t\t\treturn runHi - lo;\n\t\t}\n\t\tfunction reverseRun(array, lo, hi) {\n\t\t\thi--;\n\t\t\twhile (lo < hi) {\n\t\t\t\tvar t = array[lo];\n\t\t\t\tarray[lo++] = array[hi];\n\t\t\t\tarray[hi--] = t;\n\t\t\t}\n\t\t}\n\t\tfunction binaryInsertionSort(array, lo, hi, start, compare) {\n\t\t\tif (start === lo) start++;\n\t\t\tfor (; start < hi; start++) {\n\t\t\t\tvar pivot = array[start];\n\t\t\t\tvar left = lo;\n\t\t\t\tvar right = start;\n\t\t\t\twhile (left < right) {\n\t\t\t\t\tvar mid = left + right >>> 1;\n\t\t\t\t\tif (compare(pivot, array[mid]) < 0) right = mid;\n\t\t\t\t\telse left = mid + 1;\n\t\t\t\t}\n\t\t\t\tvar n = start - left;\n\t\t\t\tswitch (n) {\n\t\t\t\t\tcase 3: array[left + 3] = array[left + 2];\n\t\t\t\t\tcase 2: array[left + 2] = array[left + 1];\n\t\t\t\t\tcase 1:\n\t\t\t\t\t\tarray[left + 1] = array[left];\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault: while (n > 0) {\n\t\t\t\t\t\tarray[left + n] = array[left + n - 1];\n\t\t\t\t\t\tn--;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tarray[left] = pivot;\n\t\t\t}\n\t\t}\n\t\tfunction gallopLeft(value, array, start, length, hint, compare) {\n\t\t\tvar lastOffset = 0;\n\t\t\tvar maxOffset = 0;\n\t\t\tvar offset = 1;\n\t\t\tif (compare(value, array[start + hint]) > 0) {\n\t\t\t\tmaxOffset = length - hint;\n\t\t\t\twhile (offset < maxOffset && compare(value, array[start + hint + offset]) > 0) {\n\t\t\t\t\tlastOffset = offset;\n\t\t\t\t\toffset = (offset << 1) + 1;\n\t\t\t\t\tif (offset <= 0) offset = maxOffset;\n\t\t\t\t}\n\t\t\t\tif (offset > maxOffset) offset = maxOffset;\n\t\t\t\tlastOffset += hint;\n\t\t\t\toffset += hint;\n\t\t\t} else {\n\t\t\t\tmaxOffset = hint + 1;\n\t\t\t\twhile (offset < maxOffset && compare(value, array[start + hint - offset]) <= 0) {\n\t\t\t\t\tlastOffset = offset;\n\t\t\t\t\toffset = (offset << 1) + 1;\n\t\t\t\t\tif (offset <= 0) offset = maxOffset;\n\t\t\t\t}\n\t\t\t\tif (offset > maxOffset) offset = maxOffset;\n\t\t\t\tvar tmp = lastOffset;\n\t\t\t\tlastOffset = hint - offset;\n\t\t\t\toffset = hint - tmp;\n\t\t\t}\n\t\t\tlastOffset++;\n\t\t\twhile (lastOffset < offset) {\n\t\t\t\tvar m = lastOffset + (offset - lastOffset >>> 1);\n\t\t\t\tif (compare(value, array[start + m]) > 0) lastOffset = m + 1;\n\t\t\t\telse offset = m;\n\t\t\t}\n\t\t\treturn offset;\n\t\t}\n\t\tfunction gallopRight(value, array, start, length, hint, compare) {\n\t\t\tvar lastOffset = 0;\n\t\t\tvar maxOffset = 0;\n\t\t\tvar offset = 1;\n\t\t\tif (compare(value, array[start + hint]) < 0) {\n\t\t\t\tmaxOffset = hint + 1;\n\t\t\t\twhile (offset < maxOffset && compare(value, array[start + hint - offset]) < 0) {\n\t\t\t\t\tlastOffset = offset;\n\t\t\t\t\toffset = (offset << 1) + 1;\n\t\t\t\t\tif (offset <= 0) offset = maxOffset;\n\t\t\t\t}\n\t\t\t\tif (offset > maxOffset) offset = maxOffset;\n\t\t\t\tvar tmp = lastOffset;\n\t\t\t\tlastOffset = hint - offset;\n\t\t\t\toffset = hint - tmp;\n\t\t\t} else {\n\t\t\t\tmaxOffset = length - hint;\n\t\t\t\twhile (offset < maxOffset && compare(value, array[start + hint + offset]) >= 0) {\n\t\t\t\t\tlastOffset = offset;\n\t\t\t\t\toffset = (offset << 1) + 1;\n\t\t\t\t\tif (offset <= 0) offset = maxOffset;\n\t\t\t\t}\n\t\t\t\tif (offset > maxOffset) offset = maxOffset;\n\t\t\t\tlastOffset += hint;\n\t\t\t\toffset += hint;\n\t\t\t}\n\t\t\tlastOffset++;\n\t\t\twhile (lastOffset < offset) {\n\t\t\t\tvar m = lastOffset + (offset - lastOffset >>> 1);\n\t\t\t\tif (compare(value, array[start + m]) < 0) offset = m;\n\t\t\t\telse lastOffset = m + 1;\n\t\t\t}\n\t\t\treturn offset;\n\t\t}\n\t\tvar TimSort = (function() {\n\t\t\tfunction TimSort(array, compare) {\n\t\t\t\t_classCallCheck(this, TimSort);\n\t\t\t\tthis.array = null;\n\t\t\t\tthis.compare = null;\n\t\t\t\tthis.minGallop = DEFAULT_MIN_GALLOPING;\n\t\t\t\tthis.length = 0;\n\t\t\t\tthis.tmpStorageLength = DEFAULT_TMP_STORAGE_LENGTH;\n\t\t\t\tthis.stackLength = 0;\n\t\t\t\tthis.runStart = null;\n\t\t\t\tthis.runLength = null;\n\t\t\t\tthis.stackSize = 0;\n\t\t\t\tthis.array = array;\n\t\t\t\tthis.compare = compare;\n\t\t\t\tthis.length = array.length;\n\t\t\t\tif (this.length < 2 * DEFAULT_TMP_STORAGE_LENGTH) this.tmpStorageLength = this.length >>> 1;\n\t\t\t\tthis.tmp = new Array(this.tmpStorageLength);\n\t\t\t\tthis.stackLength = this.length < 120 ? 5 : this.length < 1542 ? 10 : this.length < 119151 ? 19 : 40;\n\t\t\t\tthis.runStart = new Array(this.stackLength);\n\t\t\t\tthis.runLength = new Array(this.stackLength);\n\t\t\t}\n\t\t\tTimSort.prototype.pushRun = function pushRun(runStart, runLength) {\n\t\t\t\tthis.runStart[this.stackSize] = runStart;\n\t\t\t\tthis.runLength[this.stackSize] = runLength;\n\t\t\t\tthis.stackSize += 1;\n\t\t\t};\n\t\t\tTimSort.prototype.mergeRuns = function mergeRuns() {\n\t\t\t\twhile (this.stackSize > 1) {\n\t\t\t\t\tvar n = this.stackSize - 2;\n\t\t\t\t\tif (n >= 1 && this.runLength[n - 1] <= this.runLength[n] + this.runLength[n + 1] || n >= 2 && this.runLength[n - 2] <= this.runLength[n] + this.runLength[n - 1]) {\n\t\t\t\t\t\tif (this.runLength[n - 1] < this.runLength[n + 1]) n--;\n\t\t\t\t\t} else if (this.runLength[n] > this.runLength[n + 1]) break;\n\t\t\t\t\tthis.mergeAt(n);\n\t\t\t\t}\n\t\t\t};\n\t\t\tTimSort.prototype.forceMergeRuns = function forceMergeRuns() {\n\t\t\t\twhile (this.stackSize > 1) {\n\t\t\t\t\tvar n = this.stackSize - 2;\n\t\t\t\t\tif (n > 0 && this.runLength[n - 1] < this.runLength[n + 1]) n--;\n\t\t\t\t\tthis.mergeAt(n);\n\t\t\t\t}\n\t\t\t};\n\t\t\tTimSort.prototype.mergeAt = function mergeAt(i) {\n\t\t\t\tvar compare = this.compare;\n\t\t\t\tvar array = this.array;\n\t\t\t\tvar start1 = this.runStart[i];\n\t\t\t\tvar length1 = this.runLength[i];\n\t\t\t\tvar start2 = this.runStart[i + 1];\n\t\t\t\tvar length2 = this.runLength[i + 1];\n\t\t\t\tthis.runLength[i] = length1 + length2;\n\t\t\t\tif (i === this.stackSize - 3) {\n\t\t\t\t\tthis.runStart[i + 1] = this.runStart[i + 2];\n\t\t\t\t\tthis.runLength[i + 1] = this.runLength[i + 2];\n\t\t\t\t}\n\t\t\t\tthis.stackSize--;\n\t\t\t\tvar k = gallopRight(array[start2], array, start1, length1, 0, compare);\n\t\t\t\tstart1 += k;\n\t\t\t\tlength1 -= k;\n\t\t\t\tif (length1 === 0) return;\n\t\t\t\tlength2 = gallopLeft(array[start1 + length1 - 1], array, start2, length2, length2 - 1, compare);\n\t\t\t\tif (length2 === 0) return;\n\t\t\t\tif (length1 <= length2) this.mergeLow(start1, length1, start2, length2);\n\t\t\t\telse this.mergeHigh(start1, length1, start2, length2);\n\t\t\t};\n\t\t\tTimSort.prototype.mergeLow = function mergeLow(start1, length1, start2, length2) {\n\t\t\t\tvar compare = this.compare;\n\t\t\t\tvar array = this.array;\n\t\t\t\tvar tmp = this.tmp;\n\t\t\t\tvar i = 0;\n\t\t\t\tfor (i = 0; i < length1; i++) tmp[i] = array[start1 + i];\n\t\t\t\tvar cursor1 = 0;\n\t\t\t\tvar cursor2 = start2;\n\t\t\t\tvar dest = start1;\n\t\t\t\tarray[dest++] = array[cursor2++];\n\t\t\t\tif (--length2 === 0) {\n\t\t\t\t\tfor (i = 0; i < length1; i++) array[dest + i] = tmp[cursor1 + i];\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif (length1 === 1) {\n\t\t\t\t\tfor (i = 0; i < length2; i++) array[dest + i] = array[cursor2 + i];\n\t\t\t\t\tarray[dest + length2] = tmp[cursor1];\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tvar minGallop = this.minGallop;\n\t\t\t\twhile (true) {\n\t\t\t\t\tvar count1 = 0;\n\t\t\t\t\tvar count2 = 0;\n\t\t\t\t\tvar exit = false;\n\t\t\t\t\tdo\n\t\t\t\t\t\tif (compare(array[cursor2], tmp[cursor1]) < 0) {\n\t\t\t\t\t\t\tarray[dest++] = array[cursor2++];\n\t\t\t\t\t\t\tcount2++;\n\t\t\t\t\t\t\tcount1 = 0;\n\t\t\t\t\t\t\tif (--length2 === 0) {\n\t\t\t\t\t\t\t\texit = true;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tarray[dest++] = tmp[cursor1++];\n\t\t\t\t\t\t\tcount1++;\n\t\t\t\t\t\t\tcount2 = 0;\n\t\t\t\t\t\t\tif (--length1 === 1) {\n\t\t\t\t\t\t\t\texit = true;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\twhile ((count1 | count2) < minGallop);\n\t\t\t\t\tif (exit) break;\n\t\t\t\t\tdo {\n\t\t\t\t\t\tcount1 = gallopRight(array[cursor2], tmp, cursor1, length1, 0, compare);\n\t\t\t\t\t\tif (count1 !== 0) {\n\t\t\t\t\t\t\tfor (i = 0; i < count1; i++) array[dest + i] = tmp[cursor1 + i];\n\t\t\t\t\t\t\tdest += count1;\n\t\t\t\t\t\t\tcursor1 += count1;\n\t\t\t\t\t\t\tlength1 -= count1;\n\t\t\t\t\t\t\tif (length1 <= 1) {\n\t\t\t\t\t\t\t\texit = true;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tarray[dest++] = array[cursor2++];\n\t\t\t\t\t\tif (--length2 === 0) {\n\t\t\t\t\t\t\texit = true;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcount2 = gallopLeft(tmp[cursor1], array, cursor2, length2, 0, compare);\n\t\t\t\t\t\tif (count2 !== 0) {\n\t\t\t\t\t\t\tfor (i = 0; i < count2; i++) array[dest + i] = array[cursor2 + i];\n\t\t\t\t\t\t\tdest += count2;\n\t\t\t\t\t\t\tcursor2 += count2;\n\t\t\t\t\t\t\tlength2 -= count2;\n\t\t\t\t\t\t\tif (length2 === 0) {\n\t\t\t\t\t\t\t\texit = true;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tarray[dest++] = tmp[cursor1++];\n\t\t\t\t\t\tif (--length1 === 1) {\n\t\t\t\t\t\t\texit = true;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tminGallop--;\n\t\t\t\t\t} while (count1 >= DEFAULT_MIN_GALLOPING || count2 >= DEFAULT_MIN_GALLOPING);\n\t\t\t\t\tif (exit) break;\n\t\t\t\t\tif (minGallop < 0) minGallop = 0;\n\t\t\t\t\tminGallop += 2;\n\t\t\t\t}\n\t\t\t\tthis.minGallop = minGallop;\n\t\t\t\tif (minGallop < 1) this.minGallop = 1;\n\t\t\t\tif (length1 === 1) {\n\t\t\t\t\tfor (i = 0; i < length2; i++) array[dest + i] = array[cursor2 + i];\n\t\t\t\t\tarray[dest + length2] = tmp[cursor1];\n\t\t\t\t} else if (length1 === 0) throw new Error(\"mergeLow preconditions were not respected\");\n\t\t\t\telse for (i = 0; i < length1; i++) array[dest + i] = tmp[cursor1 + i];\n\t\t\t};\n\t\t\tTimSort.prototype.mergeHigh = function mergeHigh(start1, length1, start2, length2) {\n\t\t\t\tvar compare = this.compare;\n\t\t\t\tvar array = this.array;\n\t\t\t\tvar tmp = this.tmp;\n\t\t\t\tvar i = 0;\n\t\t\t\tfor (i = 0; i < length2; i++) tmp[i] = array[start2 + i];\n\t\t\t\tvar cursor1 = start1 + length1 - 1;\n\t\t\t\tvar cursor2 = length2 - 1;\n\t\t\t\tvar dest = start2 + length2 - 1;\n\t\t\t\tvar customCursor = 0;\n\t\t\t\tvar customDest = 0;\n\t\t\t\tarray[dest--] = array[cursor1--];\n\t\t\t\tif (--length1 === 0) {\n\t\t\t\t\tcustomCursor = dest - (length2 - 1);\n\t\t\t\t\tfor (i = 0; i < length2; i++) array[customCursor + i] = tmp[i];\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif (length2 === 1) {\n\t\t\t\t\tdest -= length1;\n\t\t\t\t\tcursor1 -= length1;\n\t\t\t\t\tcustomDest = dest + 1;\n\t\t\t\t\tcustomCursor = cursor1 + 1;\n\t\t\t\t\tfor (i = length1 - 1; i >= 0; i--) array[customDest + i] = array[customCursor + i];\n\t\t\t\t\tarray[dest] = tmp[cursor2];\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tvar minGallop = this.minGallop;\n\t\t\t\twhile (true) {\n\t\t\t\t\tvar count1 = 0;\n\t\t\t\t\tvar count2 = 0;\n\t\t\t\t\tvar exit = false;\n\t\t\t\t\tdo\n\t\t\t\t\t\tif (compare(tmp[cursor2], array[cursor1]) < 0) {\n\t\t\t\t\t\t\tarray[dest--] = array[cursor1--];\n\t\t\t\t\t\t\tcount1++;\n\t\t\t\t\t\t\tcount2 = 0;\n\t\t\t\t\t\t\tif (--length1 === 0) {\n\t\t\t\t\t\t\t\texit = true;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tarray[dest--] = tmp[cursor2--];\n\t\t\t\t\t\t\tcount2++;\n\t\t\t\t\t\t\tcount1 = 0;\n\t\t\t\t\t\t\tif (--length2 === 1) {\n\t\t\t\t\t\t\t\texit = true;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\twhile ((count1 | count2) < minGallop);\n\t\t\t\t\tif (exit) break;\n\t\t\t\t\tdo {\n\t\t\t\t\t\tcount1 = length1 - gallopRight(tmp[cursor2], array, start1, length1, length1 - 1, compare);\n\t\t\t\t\t\tif (count1 !== 0) {\n\t\t\t\t\t\t\tdest -= count1;\n\t\t\t\t\t\t\tcursor1 -= count1;\n\t\t\t\t\t\t\tlength1 -= count1;\n\t\t\t\t\t\t\tcustomDest = dest + 1;\n\t\t\t\t\t\t\tcustomCursor = cursor1 + 1;\n\t\t\t\t\t\t\tfor (i = count1 - 1; i >= 0; i--) array[customDest + i] = array[customCursor + i];\n\t\t\t\t\t\t\tif (length1 === 0) {\n\t\t\t\t\t\t\t\texit = true;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tarray[dest--] = tmp[cursor2--];\n\t\t\t\t\t\tif (--length2 === 1) {\n\t\t\t\t\t\t\texit = true;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcount2 = length2 - gallopLeft(array[cursor1], tmp, 0, length2, length2 - 1, compare);\n\t\t\t\t\t\tif (count2 !== 0) {\n\t\t\t\t\t\t\tdest -= count2;\n\t\t\t\t\t\t\tcursor2 -= count2;\n\t\t\t\t\t\t\tlength2 -= count2;\n\t\t\t\t\t\t\tcustomDest = dest + 1;\n\t\t\t\t\t\t\tcustomCursor = cursor2 + 1;\n\t\t\t\t\t\t\tfor (i = 0; i < count2; i++) array[customDest + i] = tmp[customCursor + i];\n\t\t\t\t\t\t\tif (length2 <= 1) {\n\t\t\t\t\t\t\t\texit = true;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tarray[dest--] = array[cursor1--];\n\t\t\t\t\t\tif (--length1 === 0) {\n\t\t\t\t\t\t\texit = true;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tminGallop--;\n\t\t\t\t\t} while (count1 >= DEFAULT_MIN_GALLOPING || count2 >= DEFAULT_MIN_GALLOPING);\n\t\t\t\t\tif (exit) break;\n\t\t\t\t\tif (minGallop < 0) minGallop = 0;\n\t\t\t\t\tminGallop += 2;\n\t\t\t\t}\n\t\t\t\tthis.minGallop = minGallop;\n\t\t\t\tif (minGallop < 1) this.minGallop = 1;\n\t\t\t\tif (length2 === 1) {\n\t\t\t\t\tdest -= length1;\n\t\t\t\t\tcursor1 -= length1;\n\t\t\t\t\tcustomDest = dest + 1;\n\t\t\t\t\tcustomCursor = cursor1 + 1;\n\t\t\t\t\tfor (i = length1 - 1; i >= 0; i--) array[customDest + i] = array[customCursor + i];\n\t\t\t\t\tarray[dest] = tmp[cursor2];\n\t\t\t\t} else if (length2 === 0) throw new Error(\"mergeHigh preconditions were not respected\");\n\t\t\t\telse {\n\t\t\t\t\tcustomCursor = dest - (length2 - 1);\n\t\t\t\t\tfor (i = 0; i < length2; i++) array[customCursor + i] = tmp[i];\n\t\t\t\t}\n\t\t\t};\n\t\t\treturn TimSort;\n\t\t})();\n\t\tfunction sort(array, compare, lo, hi) {\n\t\t\tif (!Array.isArray(array)) throw new TypeError(\"Can only sort arrays\");\n\t\t\tif (!compare) compare = alphabeticalCompare;\n\t\t\telse if (typeof compare !== \"function\") {\n\t\t\t\thi = lo;\n\t\t\t\tlo = compare;\n\t\t\t\tcompare = alphabeticalCompare;\n\t\t\t}\n\t\t\tif (!lo) lo = 0;\n\t\t\tif (!hi) hi = array.length;\n\t\t\tvar remaining = hi - lo;\n\t\t\tif (remaining < 2) return;\n\t\t\tvar runLength = 0;\n\t\t\tif (remaining < DEFAULT_MIN_MERGE) {\n\t\t\t\trunLength = makeAscendingRun(array, lo, hi, compare);\n\t\t\t\tbinaryInsertionSort(array, lo, hi, lo + runLength, compare);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tvar ts = new TimSort(array, compare);\n\t\t\tvar minRun = minRunLength(remaining);\n\t\t\tdo {\n\t\t\t\trunLength = makeAscendingRun(array, lo, hi, compare);\n\t\t\t\tif (runLength < minRun) {\n\t\t\t\t\tvar force = remaining;\n\t\t\t\t\tif (force > minRun) force = minRun;\n\t\t\t\t\tbinaryInsertionSort(array, lo, lo + force, lo + runLength, compare);\n\t\t\t\t\trunLength = force;\n\t\t\t\t}\n\t\t\t\tts.pushRun(lo, runLength);\n\t\t\t\tts.mergeRuns();\n\t\t\t\tremaining -= runLength;\n\t\t\t\tlo += runLength;\n\t\t\t} while (remaining !== 0);\n\t\t\tts.forceMergeRuns();\n\t\t}\n\t});\n}));\n//#endregion\n//#region node_modules/timsort/index.js\nvar require_timsort = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tmodule.exports = require_timsort$1();\n}));\n//#endregion\n//#region node_modules/percentile/lib/index.js\nvar require_lib = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\t/**\n\t@typedef {(Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array)} TypedArray\n\t*/\n\t/**\n\t* Error message for a case when percentile is less than 0.\n\t*\n\t* @param {Number} p\n\t*\n\t* @return {String}\n\t*/\n\tfunction lessThanZeroError(p) {\n\t\treturn \"Expect percentile to be >= 0 but given \\\"\" + p + \"\\\" and its type is \\\"\" + typeof p + \"\\\".\";\n\t}\n\t/**\n\t* Error message for a case when percentile is greater than 100.\n\t*\n\t* @param {Number} p\n\t*\n\t* @return {String}\n\t*/\n\tfunction greaterThanHundredError(p) {\n\t\treturn \"Expect percentile to be <= 100 but given \\\"\" + p + \"\\\" and its type is \\\"\" + typeof p + \"\\\".\";\n\t}\n\t/**\n\t* Error message for a case when percentile is not a number (NaN).\n\t*\n\t* @param {Number} p\n\t*\n\t* @return {String}\n\t*/\n\tfunction nanError(p) {\n\t\treturn \"Expect percentile to be a number but given \\\"\" + p + \"\\\" and its type is \\\"\" + typeof p + \"\\\".\";\n\t}\n\t/**\n\t* Checks that a list of percentiles are all numbers and they lie in range 0..100.\n\t*\n\t* @param {Array<Number>} ps - percentiles to calculate\n\t*\n\t* @return {Array} List of errors\n\t*/\n\tfunction validateInput(ps) {\n\t\treturn ps.reduce(function(errors, p) {\n\t\t\tif (isNaN(Number(p))) errors.push(nanError(p));\n\t\t\telse if (p < 0) errors.push(lessThanZeroError(p));\n\t\t\telse if (p > 100) errors.push(greaterThanHundredError(p));\n\t\t\treturn errors;\n\t\t}, []);\n\t}\n\t/**\n\t* Get percentile value from an array.\n\t*\n\t* @param {Number} p - percentile\n\t* @param {Array|TypedArray} list - list of values\n\t*\n\t* @return {*}\n\t*/\n\tfunction getPsValue(p, list) {\n\t\tif (p === 0) return list[0];\n\t\treturn list[Math.ceil(list.length * (p / 100)) - 1];\n\t}\n\t/**\n\t* Calculate percentile for given array of values.\n\t*\n\t* @template T\n\t* @param {Number|Array<Number>} pOrPs - percentile or a list of percentiles\n\t* @param {Array<T>|Array<Number>|TypedArray} list - array of values\n\t* @param {function(T): Number} [fn] - optional function to extract a value from an array item\n\t*\n\t* @return {Number|T|Array<Number>|Array<T>}\n\t*/\n\tfunction percentile(pOrPs, list, fn) {\n\t\tvar ps = Array.isArray(pOrPs) ? pOrPs : [pOrPs];\n\t\tvar validationErrors = validateInput(ps);\n\t\tif (validationErrors.length) throw new Error(validationErrors.join(\" \"));\n\t\tlist = list.slice().sort(function(a, b) {\n\t\t\tif (fn) {\n\t\t\t\ta = fn(a);\n\t\t\t\tb = fn(b);\n\t\t\t}\n\t\t\ta = Number.isNaN(a) ? Number.NEGATIVE_INFINITY : a;\n\t\t\tb = Number.isNaN(b) ? Number.NEGATIVE_INFINITY : b;\n\t\t\tif (a > b) return 1;\n\t\t\tif (a < b) return -1;\n\t\t\treturn 0;\n\t\t});\n\t\tif (ps.length === 1) return getPsValue(ps[0], list);\n\t\treturn ps.map(function(p) {\n\t\t\treturn getPsValue(p, list);\n\t\t});\n\t}\n\tmodule.exports = percentile;\n}));\n//#endregion\n//#region src/instrumentation/instruments/instrumentGauge.ts\nvar import_timsort = /* @__PURE__ */ __toESM(require_timsort());\nvar import_lib = /* @__PURE__ */ __toESM(require_lib());\nvar InstrumentGaugeOptions = class extends InstrumentBaseOptions {\n\tinterval;\n\tsampleSize;\n\tfromJSON;\n\tinitValue;\n};\nvar InstrumentGaugeTelemetry = class extends InstrumentBaseTelemetry {\n\tval;\n\tInc;\n\tDec;\n};\nvar InstrumentGauge = class extends InstrumentBase {\n\t#val = 0;\n\t#maxval = null;\n\t#lastObservedValue = 0;\n\t#timeSeriesList = [];\n\t#maxSampleSize = 0;\n\t#timerInterval = 0;\n\t#observer = null;\n\t#min = null;\n\t#max = 0;\n\t#observations = 0;\n\t#total = 0;\n\t#copy = false;\n\tconstructor(options = {}) {\n\t\tsuper(options);\n\t\tif (!options.label) this.label = \"InstrumentGauge\";\n\t\telse this.label = options.label;\n\t\tif (typeof options.interval === \"undefined\") this.#timerInterval = 0;\n\t\telse this.#timerInterval = options.interval;\n\t\tif (typeof options.sampleSize === \"undefined\") this.#maxSampleSize = 600;\n\t\telse this.#maxSampleSize = options.sampleSize;\n\t\tif (typeof options.fromJSON === \"undefined\") this.#copy = false;\n\t\telse this.#copy = true;\n\t\tObject.defineProperty(this, GaugeTypes.GAUGE_TYPE, {\n\t\t\tenumerable: true,\n\t\t\tget: () => GaugeTypes.INSTRUMENT_GAUGE\n\t\t});\n\t\tif (this.#copy) this.DefineCopyProperties([\n\t\t\t\"val\",\n\t\t\t\"min\",\n\t\t\t\"max\",\n\t\t\t\"avg\",\n\t\t\t\"percentile\"\n\t\t]);\n\t\telse {\n\t\t\tObject.defineProperty(this, \"val\", {\n\t\t\t\tenumerable: true,\n\t\t\t\tget: () => this.#GetVal(),\n\t\t\t\tset: (value) => {\n\t\t\t\t\tthis.#SetVal(value);\n\t\t\t\t}\n\t\t\t});\n\t\t\tif (this.#timerInterval > 0) {\n\t\t\t\tObject.defineProperty(this, \"percentile\", {\n\t\t\t\t\tenumerable: true,\n\t\t\t\t\tget: () => this.#GetPercentileData()\n\t\t\t\t});\n\t\t\t\tthis._StartTimer();\n\t\t\t}\n\t\t}\n\t\tif (typeof options.initValue !== \"undefined\") this.val = options.initValue;\n\t\tif (typeof options.fromJSON !== \"undefined\") {\n\t\t\tconst result = _cloneDeep(options.fromJSON);\n\t\t\tthis.val = result.val;\n\t\t\tif (result.percentile) this.percentile = result.percentile;\n\t\t\tif (result.min) this.min = result.min;\n\t\t\tif (result.max) this.max = result.max;\n\t\t\tif (result.avg) this.avg = result.avg;\n\t\t}\n\t}\n\tpercentile;\n\tmin;\n\tmax;\n\tavg;\n\tval = 0;\n\tWithInitVal(initVal) {\n\t\tthis.val = initVal;\n\t\treturn this;\n\t}\n\tWithMin() {\n\t\tObject.defineProperty(this, \"min\", {\n\t\t\tenumerable: true,\n\t\t\tget: () => this.#GetMin()\n\t\t});\n\t\treturn this;\n\t}\n\tWithMax() {\n\t\tObject.defineProperty(this, \"max\", {\n\t\t\tenumerable: true,\n\t\t\tget: () => this.#GetMax()\n\t\t});\n\t\treturn this;\n\t}\n\tWithAverage() {\n\t\tObject.defineProperty(this, \"avg\", {\n\t\t\tenumerable: true,\n\t\t\tget: () => this.#GetAverage()\n\t\t});\n\t\treturn this;\n\t}\n\t_StartTimer() {\n\t\tif (this.#timerInterval > 0) {\n\t\t\tthis.#timeSeriesList = [];\n\t\t\tthis.#observer = setInterval(() => {\n\t\t\t\tif (this.#timeSeriesList.length > this.#maxSampleSize) this.#timeSeriesList.shift();\n\t\t\t\tconst maxval = this.#GetAndResetMaxVal();\n\t\t\t\tthis.#timeSeriesList.push(maxval);\n\t\t\t}, this.#timerInterval);\n\t\t\tif (isNode) this.#observer.unref();\n\t\t} else throw new Error(`Unable to StartTimer for this instrument. The interval is set to <= 0.`);\n\t}\n\tStopTimer() {\n\t\tif (this.#observer) {\n\t\t\tclearTimeout(this.#observer);\n\t\t\tthis.#observer = null;\n\t\t\tthis.#timeSeriesList = [];\n\t\t}\n\t}\n\t/**\n\t* If the gauge is being monitored as part of a time series, get the most recent recorded value (max value) from within the time interval\n\t* otherwise, just return the current instant value.\n\t*/\n\t#GetVal() {\n\t\tif (this.#timerInterval > 0 && this.#observer !== null) if (this.#maxval === null) return this.GetNumber(this.#lastObservedValue);\n\t\telse return this.GetNumber(this.#maxval);\n\t\treturn this.GetNumber(this.#val);\n\t}\n\t#SetVal(updatedValue) {\n\t\tthis.#val = updatedValue;\n\t\tthis.#observations++;\n\t\tthis.#total += updatedValue;\n\t\tif (this.#val > this.#max) this.#max = this.#val;\n\t\tif (this.#min !== null) {\n\t\t\tif (this.#val < this.#min) this.#min = this.#val;\n\t\t} else this.#min = this.#val;\n\t\tif (this.#timerInterval > 0) {\n\t\t\tthis.#lastObservedValue = updatedValue;\n\t\t\tif (this.#maxval === null) this.#maxval = this.#val;\n\t\t\telse if (this.#val > this.#maxval) this.#maxval = this.#val;\n\t\t}\n\t}\n\t#GetMin() {\n\t\tif (this.#min !== null) return this.#min;\n\t\treturn 0;\n\t}\n\t#GetMax() {\n\t\treturn this.#max;\n\t}\n\t#GetAverage() {\n\t\tif (this.#observations > 0) return this.#total / this.#observations;\n\t\treturn 0;\n\t}\n\tReset() {\n\t\tthis.StopTimer();\n\t\tthis.#maxval = 0;\n\t\tthis.#lastObservedValue = 0;\n\t\tthis.#val = 0;\n\t\tthis.#min = null;\n\t\tthis.#max = 0;\n\t\tthis.#observations = 0;\n\t\tthis.#total = 0;\n\t\tif (this.#timerInterval > 0) this._StartTimer();\n\t}\n\t#GetAndResetMaxVal() {\n\t\tif (this.#maxval === null) return this.#lastObservedValue;\n\t\tconst retVal = this.#maxval;\n\t\tthis.#maxval = null;\n\t\treturn retVal;\n\t}\n\tInc(incVal = 1) {\n\t\tthis.#SetVal(this.#val + incVal);\n\t}\n\tDec(decVal = 1) {\n\t\tthis.#SetVal(this.#val - decVal);\n\t}\n\t#NumberCompare(a, b) {\n\t\treturn a - b;\n\t}\n\t#GetPercentileData() {\n\t\tconst sortedList = this.#timeSeriesList.slice(0);\n\t\timport_timsort.sort(sortedList, this.#NumberCompare);\n\t\treturn (0, import_lib.default)([\n\t\t\t50,\n\t\t\t80,\n\t\t\t90,\n\t\t\t95,\n\t\t\t99,\n\t\t\t99.95\n\t\t], sortedList);\n\t}\n\tProcessTelemetry(telemetry) {\n\t\tif (telemetry.Inc !== void 0) this.Inc(telemetry.Inc);\n\t\tif (telemetry.Dec !== void 0) this.Dec(telemetry.Dec);\n\t\tif (telemetry.val !== void 0) this.val = telemetry.val;\n\t}\n};\n//#endregion\n//#region src/instrumentation/instruments/instrumentObject.ts\nvar InstrumentObjectOptions = class extends InstrumentBaseOptions {\n\tfromJSON;\n\tinitValue;\n};\nvar InstrumentObjectTelemetry = class extends InstrumentBaseTelemetry {\n\tval;\n};\nvar InstrumentObject = class extends InstrumentBase {\n\t#val = {};\n\t#copy = false;\n\tconstructor(options = {}) {\n\t\tsuper(options);\n\t\tif (typeof options.label === \"undefined\") this.label = \"InstrumentObject\";\n\t\telse this.label = options.label;\n\t\tif (typeof options.fromJSON === \"undefined\") this.#copy = false;\n\t\telse this.#copy = true;\n\t\tObject.defineProperty(this, GaugeTypes.GAUGE_TYPE, {\n\t\t\tenumerable: true,\n\t\t\tget: () => GaugeTypes.INSTRUMENT_OBJECT\n\t\t});\n\t\tif (this.#copy) this.DefineCopyProperties([\"val\"]);\n\t\telse Object.defineProperty(this, \"val\", {\n\t\t\tenumerable: true,\n\t\t\tget: () => this.#GetVal(),\n\t\t\tset: (value) => {\n\t\t\t\tthis.#SetVal(value);\n\t\t\t}\n\t\t});\n\t\tif (typeof options.initValue !== \"undefined\") this.val = options.initValue;\n\t\telse this.val = {};\n\t\tif (typeof options.fromJSON !== \"undefined\") this.val = _cloneDeep(options.fromJSON).val;\n\t}\n\tval;\n\tWithInitVal(initVal) {\n\t\tthis.val = initVal;\n\t\treturn this;\n\t}\n\t#GetVal() {\n\t\treturn this.#val;\n\t}\n\t#SetVal(updatedValue) {\n\t\tthis.#val = updatedValue;\n\t}\n\tProcessTelemetry(telemetry) {\n\t\tif (telemetry.val !== void 0) this.val = telemetry.val;\n\t}\n};\n//#endregion\n//#region src/instrumentation/instrumentUtils.ts\nfunction CreateInstrument(sourceInstrument) {\n\tswitch (sourceInstrument[GaugeTypes.GAUGE_TYPE]) {\n\t\tcase GaugeTypes.INSTRUMENT_GAUGE: return new InstrumentGauge({ fromJSON: sourceInstrument });\n\t\tcase GaugeTypes.INSTRUMENT_VELOCITY: return new InstrumentVelocity({ fromJSON: sourceInstrument });\n\t\tcase GaugeTypes.INSTRUMENT_HISTOGRAM: return new InstrumentHistogram({ fromJSON: sourceInstrument });\n\t\tcase GaugeTypes.INSTRUMENT_LOG: return new InstrumentLog({ fromJSON: sourceInstrument });\n\t\tcase GaugeTypes.INSTRUMENT_TIMER: return new InstrumentTimerGauge({ fromJSON: sourceInstrument });\n\t\tcase GaugeTypes.INSTRUMENT_OBJECT: return new InstrumentObject({ fromJSON: sourceInstrument });\n\t}\n\tthrow new Error(`Cannot create instrument from type: [${sourceInstrument[GaugeTypes.GAUGE_TYPE]}]`);\n}\nfunction GetInstrumentName(gauge) {\n\tswitch (gauge) {\n\t\tcase Gauge.ACTIVE_REQUEST_GAUGE: return \"Active Requests\";\n\t\tcase Gauge.AUTHENTICATION_COUNT_GAUGE: return \"Authentication Count\";\n\t\tcase Gauge.AUTHENTICATION_ERROR_COUNT_GAUGE: return \"Authentication Error Count\";\n\t\tcase Gauge.AUTHENTICATION_RETRY_COUNT_GAUGE: return \"Authentication Retry Count\";\n\t\tcase Gauge.CONNECTION_POOL_IDLE_GAUGE: return \"Connection Pool Idle\";\n\t\tcase Gauge.CONNECTION_POOL_TOTAL_GAUGE: return \"Connection Pool Total\";\n\t\tcase Gauge.CONNECTION_POOL_WAITING_GAUGE: return \"Connection Pool Waiting\";\n\t\tcase Gauge.CPU_LOAD_GAUGE: return \"CPU Load\";\n\t\tcase Gauge.CPU_SYSTEM_LOAD_GAUGE: return \"CPU SYstem Load\";\n\t\tcase Gauge.DURATION_GAUGE: return \"Duration\";\n\t\tcase Gauge.DURATION_HISTOGRAM_GAUGE: return \"Diration Histogram\";\n\t\tcase Gauge.ERROR_COUNT_GAUGE: return \"Errors\";\n\t\tcase Gauge.LATENCY_GAUGE: return \"Latency\";\n\t\tcase Gauge.LATENCY_HISTOGRAM_GAUGE: return \"Latency Histogram\";\n\t\tcase Gauge.LOGGER: return \"Logger\";\n\t\tcase Gauge.LOGGER_COPY: return \"_Logger\";\n\t\tcase Gauge.NETWORK_RX_GAUGE: return \"Network Receive\";\n\t\tcase Gauge.NETWORK_TX_GAUGE: return \"Network Transmit\";\n\t\tcase Gauge.REQUEST_COUNT_GAUGE: return \"Requests\";\n\t\tcase Gauge.RETRY_COUNT_GAUGE: return \"Retries\";\n\t\tcase Gauge.TIMER_GAUGE: return \"Timer\";\n\t\tcase Gauge.VELOCITY_GAUGE: return \"Velocity\";\n\t\tcase Gauge.CONNECTION_COUNT_GAUGE: return \"TCP Connection\";\n\t\tcase Gauge.OBJECT_GAUGE: return \"Object\";\n\t\tcase Gauge.CORE_COUNT_GAUGE: return \"Core Count\";\n\t\tdefault: return \"Unknown\";\n\t}\n}\nfunction StopInstruments(instruments) {\n\tif (instruments) {\n\t\tif (Array.isArray(instruments)) instruments.forEach((instrument) => {\n\t\t\tif (instrument.StopTimer) instrument.StopTimer();\n\t\t});\n\t\telse for (const [, value] of Object.entries(instruments)) if (value.StopTimer) value.StopTimer();\n\t}\n}\n//#endregion\nexport { CreateInstrument, Gauge, GaugeTypes, GetInstrumentName, HistogramDataElementPos, InstrumentBase, InstrumentBaseOptions, InstrumentBaseTelemetry, InstrumentGauge, InstrumentGaugeOptions, InstrumentGaugeTelemetry, InstrumentHistogram, InstrumentHistogramOptions, InstrumentHistogramTelemetry, InstrumentLog, InstrumentLogOptions, InstrumentLogTelemetry, InstrumentObject, InstrumentObjectOptions, InstrumentObjectTelemetry, InstrumentTimerGauge, InstrumentTimerOptions, InstrumentTimerTelemetry, InstrumentVelocity, InstrumentVelocityOptions, InstrumentVelocityTelemetry, StopInstruments };\n\n//# sourceMappingURL=index.mjs.map","export function utf8Count(str) {\n const strLength = str.length;\n let byteLength = 0;\n let pos = 0;\n while (pos < strLength) {\n let value = str.charCodeAt(pos++);\n if ((value & 0xffffff80) === 0) {\n // 1-byte\n byteLength++;\n continue;\n }\n else if ((value & 0xfffff800) === 0) {\n // 2-bytes\n byteLength += 2;\n }\n else {\n // handle surrogate pair\n if (value >= 0xd800 && value <= 0xdbff) {\n // high surrogate\n if (pos < strLength) {\n const extra = str.charCodeAt(pos);\n if ((extra & 0xfc00) === 0xdc00) {\n ++pos;\n value = ((value & 0x3ff) << 10) + (extra & 0x3ff) + 0x10000;\n }\n }\n }\n if ((value & 0xffff0000) === 0) {\n // 3-byte\n byteLength += 3;\n }\n else {\n // 4-byte\n byteLength += 4;\n }\n }\n }\n return byteLength;\n}\nexport function utf8EncodeJs(str, output, outputOffset) {\n const strLength = str.length;\n let offset = outputOffset;\n let pos = 0;\n while (pos < strLength) {\n let value = str.charCodeAt(pos++);\n if ((value & 0xffffff80) === 0) {\n // 1-byte\n output[offset++] = value;\n continue;\n }\n else if ((value & 0xfffff800) === 0) {\n // 2-bytes\n output[offset++] = ((value >> 6) & 0x1f) | 0xc0;\n }\n else {\n // handle surrogate pair\n if (value >= 0xd800 && value <= 0xdbff) {\n // high surrogate\n if (pos < strLength) {\n const extra = str.charCodeAt(pos);\n if ((extra & 0xfc00) === 0xdc00) {\n ++pos;\n value = ((value & 0x3ff) << 10) + (extra & 0x3ff) + 0x10000;\n }\n }\n }\n if ((value & 0xffff0000) === 0) {\n // 3-byte\n output[offset++] = ((value >> 12) & 0x0f) | 0xe0;\n output[offset++] = ((value >> 6) & 0x3f) | 0x80;\n }\n else {\n // 4-byte\n output[offset++] = ((value >> 18) & 0x07) | 0xf0;\n output[offset++] = ((value >> 12) & 0x3f) | 0x80;\n output[offset++] = ((value >> 6) & 0x3f) | 0x80;\n }\n }\n output[offset++] = (value & 0x3f) | 0x80;\n }\n}\n// TextEncoder and TextDecoder are standardized in whatwg encoding:\n// https://encoding.spec.whatwg.org/\n// and available in all the modern browsers:\n// https://caniuse.com/textencoder\n// They are available in Node.js since v12 LTS as well:\n// https://nodejs.org/api/globals.html#textencoder\nconst sharedTextEncoder = new TextEncoder();\n// This threshold should be determined by benchmarking, which might vary in engines and input data.\n// Run `npx ts-node benchmark/encode-string.ts` for details.\nconst TEXT_ENCODER_THRESHOLD = 50;\nexport function utf8EncodeTE(str, output, outputOffset) {\n sharedTextEncoder.encodeInto(str, output.subarray(outputOffset));\n}\nexport function utf8Encode(str, output, outputOffset) {\n if (str.length > TEXT_ENCODER_THRESHOLD) {\n utf8EncodeTE(str, output, outputOffset);\n }\n else {\n utf8EncodeJs(str, output, outputOffset);\n }\n}\nconst CHUNK_SIZE = 4096;\nexport function utf8DecodeJs(bytes, inputOffset, byteLength) {\n let offset = inputOffset;\n const end = offset + byteLength;\n const units = [];\n let result = \"\";\n while (offset < end) {\n const byte1 = bytes[offset++];\n if ((byte1 & 0x80) === 0) {\n // 1 byte\n units.push(byte1);\n }\n else if ((byte1 & 0xe0) === 0xc0) {\n // 2 bytes\n const byte2 = bytes[offset++] & 0x3f;\n units.push(((byte1 & 0x1f) << 6) | byte2);\n }\n else if ((byte1 & 0xf0) === 0xe0) {\n // 3 bytes\n const byte2 = bytes[offset++] & 0x3f;\n const byte3 = bytes[offset++] & 0x3f;\n units.push(((byte1 & 0x1f) << 12) | (byte2 << 6) | byte3);\n }\n else if ((byte1 & 0xf8) === 0xf0) {\n // 4 bytes\n const byte2 = bytes[offset++] & 0x3f;\n const byte3 = bytes[offset++] & 0x3f;\n const byte4 = bytes[offset++] & 0x3f;\n let unit = ((byte1 & 0x07) << 0x12) | (byte2 << 0x0c) | (byte3 << 0x06) | byte4;\n if (unit > 0xffff) {\n unit -= 0x10000;\n units.push(((unit >>> 10) & 0x3ff) | 0xd800);\n unit = 0xdc00 | (unit & 0x3ff);\n }\n units.push(unit);\n }\n else {\n units.push(byte1);\n }\n if (units.length >= CHUNK_SIZE) {\n result += String.fromCharCode(...units);\n units.length = 0;\n }\n }\n if (units.length > 0) {\n result += String.fromCharCode(...units);\n }\n return result;\n}\nconst sharedTextDecoder = new TextDecoder();\n// This threshold should be determined by benchmarking, which might vary in engines and input data.\n// Run `npx ts-node benchmark/decode-string.ts` for details.\nconst TEXT_DECODER_THRESHOLD = 200;\nexport function utf8DecodeTD(bytes, inputOffset, byteLength) {\n const stringBytes = bytes.subarray(inputOffset, inputOffset + byteLength);\n return sharedTextDecoder.decode(stringBytes);\n}\nexport function utf8Decode(bytes, inputOffset, byteLength) {\n if (byteLength > TEXT_DECODER_THRESHOLD) {\n return utf8DecodeTD(bytes, inputOffset, byteLength);\n }\n else {\n return utf8DecodeJs(bytes, inputOffset, byteLength);\n }\n}\n//# sourceMappingURL=utf8.mjs.map","/**\n * ExtData is used to handle Extension Types that are not registered to ExtensionCodec.\n */\nexport class ExtData {\n type;\n data;\n constructor(type, data) {\n this.type = type;\n this.data = data;\n }\n}\n//# sourceMappingURL=ExtData.mjs.map","export class DecodeError extends Error {\n constructor(message) {\n super(message);\n // fix the prototype chain in a cross-platform way\n const proto = Object.create(DecodeError.prototype);\n Object.setPrototypeOf(this, proto);\n Object.defineProperty(this, \"name\", {\n configurable: true,\n enumerable: false,\n value: DecodeError.name,\n });\n }\n}\n//# sourceMappingURL=DecodeError.mjs.map","// Integer Utility\nexport const UINT32_MAX = 4294967295;\n// DataView extension to handle int64 / uint64,\n// where the actual range is 53-bits integer (a.k.a. safe integer)\nexport function setUint64(view, offset, value) {\n const high = value / 4294967296;\n const low = value; // high bits are truncated by DataView\n view.setUint32(offset, high);\n view.setUint32(offset + 4, low);\n}\nexport function setInt64(view, offset, value) {\n const high = Math.floor(value / 4294967296);\n const low = value; // high bits are truncated by DataView\n view.setUint32(offset, high);\n view.setUint32(offset + 4, low);\n}\nexport function getInt64(view, offset) {\n const high = view.getInt32(offset);\n const low = view.getUint32(offset + 4);\n return high * 4294967296 + low;\n}\nexport function getUint64(view, offset) {\n const high = view.getUint32(offset);\n const low = view.getUint32(offset + 4);\n return high * 4294967296 + low;\n}\n//# sourceMappingURL=int.mjs.map","// https://github.com/msgpack/msgpack/blob/master/spec.md#timestamp-extension-type\nimport { DecodeError } from \"./DecodeError.mjs\";\nimport { getInt64, setInt64 } from \"./utils/int.mjs\";\nexport const EXT_TIMESTAMP = -1;\nconst TIMESTAMP32_MAX_SEC = 0x100000000 - 1; // 32-bit unsigned int\nconst TIMESTAMP64_MAX_SEC = 0x400000000 - 1; // 34-bit unsigned int\nexport function encodeTimeSpecToTimestamp({ sec, nsec }) {\n if (sec >= 0 && nsec >= 0 && sec <= TIMESTAMP64_MAX_SEC) {\n // Here sec >= 0 && nsec >= 0\n if (nsec === 0 && sec <= TIMESTAMP32_MAX_SEC) {\n // timestamp 32 = { sec32 (unsigned) }\n const rv = new Uint8Array(4);\n const view = new DataView(rv.buffer);\n view.setUint32(0, sec);\n return rv;\n }\n else {\n // timestamp 64 = { nsec30 (unsigned), sec34 (unsigned) }\n const secHigh = sec / 0x100000000;\n const secLow = sec & 0xffffffff;\n const rv = new Uint8Array(8);\n const view = new DataView(rv.buffer);\n // nsec30 | secHigh2\n view.setUint32(0, (nsec << 2) | (secHigh & 0x3));\n // secLow32\n view.setUint32(4, secLow);\n return rv;\n }\n }\n else {\n // timestamp 96 = { nsec32 (unsigned), sec64 (signed) }\n const rv = new Uint8Array(12);\n const view = new DataView(rv.buffer);\n view.setUint32(0, nsec);\n setInt64(view, 4, sec);\n return rv;\n }\n}\nexport function encodeDateToTimeSpec(date) {\n const msec = date.getTime();\n const sec = Math.floor(msec / 1e3);\n const nsec = (msec - sec * 1e3) * 1e6;\n // Normalizes { sec, nsec } to ensure nsec is unsigned.\n const nsecInSec = Math.floor(nsec / 1e9);\n return {\n sec: sec + nsecInSec,\n nsec: nsec - nsecInSec * 1e9,\n };\n}\nexport function encodeTimestampExtension(object) {\n if (object instanceof Date) {\n const timeSpec = encodeDateToTimeSpec(object);\n return encodeTimeSpecToTimestamp(timeSpec);\n }\n else {\n return null;\n }\n}\nexport function decodeTimestampToTimeSpec(data) {\n const view = new DataView(data.buffer, data.byteOffset, data.byteLength);\n // data may be 32, 64, or 96 bits\n switch (data.byteLength) {\n case 4: {\n // timestamp 32 = { sec32 }\n const sec = view.getUint32(0);\n const nsec = 0;\n return { sec, nsec };\n }\n case 8: {\n // timestamp 64 = { nsec30, sec34 }\n const nsec30AndSecHigh2 = view.getUint32(0);\n const secLow32 = view.getUint32(4);\n const sec = (nsec30AndSecHigh2 & 0x3) * 0x100000000 + secLow32;\n const nsec = nsec30AndSecHigh2 >>> 2;\n return { sec, nsec };\n }\n case 12: {\n // timestamp 96 = { nsec32 (unsigned), sec64 (signed) }\n const sec = getInt64(view, 4);\n const nsec = view.getUint32(0);\n return { sec, nsec };\n }\n default:\n throw new DecodeError(`Unrecognized data size for timestamp (expected 4, 8, or 12): ${data.length}`);\n }\n}\nexport function decodeTimestampExtension(data) {\n const timeSpec = decodeTimestampToTimeSpec(data);\n return new Date(timeSpec.sec * 1e3 + timeSpec.nsec / 1e6);\n}\nexport const timestampExtension = {\n type: EXT_TIMESTAMP,\n encode: encodeTimestampExtension,\n decode: decodeTimestampExtension,\n};\n//# sourceMappingURL=timestamp.mjs.map","// ExtensionCodec to handle MessagePack extensions\nimport { ExtData } from \"./ExtData.mjs\";\nimport { timestampExtension } from \"./timestamp.mjs\";\nexport class ExtensionCodec {\n static defaultCodec = new ExtensionCodec();\n // ensures ExtensionCodecType<X> matches ExtensionCodec<X>\n // this will make type errors a lot more clear\n // eslint-disable-next-line @typescript-eslint/naming-convention\n __brand;\n // built-in extensions\n builtInEncoders = [];\n builtInDecoders = [];\n // custom extensions\n encoders = [];\n decoders = [];\n constructor() {\n this.register(timestampExtension);\n }\n register({ type, encode, decode, }) {\n if (type >= 0) {\n // custom extensions\n this.encoders[type] = encode;\n this.decoders[type] = decode;\n }\n else {\n // built-in extensions\n const index = -1 - type;\n this.builtInEncoders[index] = encode;\n this.builtInDecoders[index] = decode;\n }\n }\n tryToEncode(object, context) {\n // built-in extensions\n for (let i = 0; i < this.builtInEncoders.length; i++) {\n const encodeExt = this.builtInEncoders[i];\n if (encodeExt != null) {\n const data = encodeExt(object, context);\n if (data != null) {\n const type = -1 - i;\n return new ExtData(type, data);\n }\n }\n }\n // custom extensions\n for (let i = 0; i < this.encoders.length; i++) {\n const encodeExt = this.encoders[i];\n if (encodeExt != null) {\n const data = encodeExt(object, context);\n if (data != null) {\n const type = i;\n return new ExtData(type, data);\n }\n }\n }\n if (object instanceof ExtData) {\n // to keep ExtData as is\n return object;\n }\n return null;\n }\n decode(data, type, context) {\n const decodeExt = type < 0 ? this.builtInDecoders[-1 - type] : this.decoders[type];\n if (decodeExt) {\n return decodeExt(data, type, context);\n }\n else {\n // decode() does not fail, returns ExtData instead.\n return new ExtData(type, data);\n }\n }\n}\n//# sourceMappingURL=ExtensionCodec.mjs.map","function isArrayBufferLike(buffer) {\n return (buffer instanceof ArrayBuffer || (typeof SharedArrayBuffer !== \"undefined\" && buffer instanceof SharedArrayBuffer));\n}\nexport function ensureUint8Array(buffer) {\n if (buffer instanceof Uint8Array) {\n return buffer;\n }\n else if (ArrayBuffer.isView(buffer)) {\n return new Uint8Array(buffer.buffer, buffer.byteOffset, buffer.byteLength);\n }\n else if (isArrayBufferLike(buffer)) {\n return new Uint8Array(buffer);\n }\n else {\n // ArrayLike<number>\n return Uint8Array.from(buffer);\n }\n}\n//# sourceMappingURL=typedArrays.mjs.map","import { utf8Count, utf8Encode } from \"./utils/utf8.mjs\";\nimport { ExtensionCodec } from \"./ExtensionCodec.mjs\";\nimport { setInt64, setUint64 } from \"./utils/int.mjs\";\nimport { ensureUint8Array } from \"./utils/typedArrays.mjs\";\nexport const DEFAULT_MAX_DEPTH = 100;\nexport const DEFAULT_INITIAL_BUFFER_SIZE = 2048;\nexport class Encoder {\n extensionCodec;\n context;\n useBigInt64;\n maxDepth;\n initialBufferSize;\n sortKeys;\n forceFloat32;\n ignoreUndefined;\n forceIntegerToFloat;\n pos;\n view;\n bytes;\n entered = false;\n constructor(options) {\n this.extensionCodec = options?.extensionCodec ?? ExtensionCodec.defaultCodec;\n this.context = options?.context; // needs a type assertion because EncoderOptions has no context property when ContextType is undefined\n this.useBigInt64 = options?.useBigInt64 ?? false;\n this.maxDepth = options?.maxDepth ?? DEFAULT_MAX_DEPTH;\n this.initialBufferSize = options?.initialBufferSize ?? DEFAULT_INITIAL_BUFFER_SIZE;\n this.sortKeys = options?.sortKeys ?? false;\n this.forceFloat32 = options?.forceFloat32 ?? false;\n this.ignoreUndefined = options?.ignoreUndefined ?? false;\n this.forceIntegerToFloat = options?.forceIntegerToFloat ?? false;\n this.pos = 0;\n this.view = new DataView(new ArrayBuffer(this.initialBufferSize));\n this.bytes = new Uint8Array(this.view.buffer);\n }\n clone() {\n // Because of slightly special argument `context`,\n // type assertion is needed.\n // eslint-disable-next-line @typescript-eslint/no-unsafe-argument\n return new Encoder({\n extensionCodec: this.extensionCodec,\n context: this.context,\n useBigInt64: this.useBigInt64,\n maxDepth: this.maxDepth,\n initialBufferSize: this.initialBufferSize,\n sortKeys: this.sortKeys,\n forceFloat32: this.forceFloat32,\n ignoreUndefined: this.ignoreUndefined,\n forceIntegerToFloat: this.forceIntegerToFloat,\n });\n }\n reinitializeState() {\n this.pos = 0;\n }\n /**\n * This is almost equivalent to {@link Encoder#encode}, but it returns an reference of the encoder's internal buffer and thus much faster than {@link Encoder#encode}.\n *\n * @returns Encodes the object and returns a shared reference the encoder's internal buffer.\n */\n encodeSharedRef(object) {\n if (this.entered) {\n const instance = this.clone();\n return instance.encodeSharedRef(object);\n }\n try {\n this.entered = true;\n this.reinitializeState();\n this.doEncode(object, 1);\n return this.bytes.subarray(0, this.pos);\n }\n finally {\n this.entered = false;\n }\n }\n /**\n * @returns Encodes the object and returns a copy of the encoder's internal buffer.\n */\n encode(object) {\n if (this.entered) {\n const instance = this.clone();\n return instance.encode(object);\n }\n try {\n this.entered = true;\n this.reinitializeState();\n this.doEncode(object, 1);\n return this.bytes.slice(0, this.pos);\n }\n finally {\n this.entered = false;\n }\n }\n doEncode(object, depth) {\n if (depth > this.maxDepth) {\n throw new Error(`Too deep objects in depth ${depth}`);\n }\n if (object == null) {\n this.encodeNil();\n }\n else if (typeof object === \"boolean\") {\n this.encodeBoolean(object);\n }\n else if (typeof object === \"number\") {\n if (!this.forceIntegerToFloat) {\n this.encodeNumber(object);\n }\n else {\n this.encodeNumberAsFloat(object);\n }\n }\n else if (typeof object === \"string\") {\n this.encodeString(object);\n }\n else if (this.useBigInt64 && typeof object === \"bigint\") {\n this.encodeBigInt64(object);\n }\n else {\n this.encodeObject(object, depth);\n }\n }\n ensureBufferSizeToWrite(sizeToWrite) {\n const requiredSize = this.pos + sizeToWrite;\n if (this.view.byteLength < requiredSize) {\n this.resizeBuffer(requiredSize * 2);\n }\n }\n resizeBuffer(newSize) {\n const newBuffer = new ArrayBuffer(newSize);\n const newBytes = new Uint8Array(newBuffer);\n const newView = new DataView(newBuffer);\n newBytes.set(this.bytes);\n this.view = newView;\n this.bytes = newBytes;\n }\n encodeNil() {\n this.writeU8(0xc0);\n }\n encodeBoolean(object) {\n if (object === false) {\n this.writeU8(0xc2);\n }\n else {\n this.writeU8(0xc3);\n }\n }\n encodeNumber(object) {\n if (!this.forceIntegerToFloat && Number.isSafeInteger(object)) {\n if (object >= 0) {\n if (object < 0x80) {\n // positive fixint\n this.writeU8(object);\n }\n else if (object < 0x100) {\n // uint 8\n this.writeU8(0xcc);\n this.writeU8(object);\n }\n else if (object < 0x10000) {\n // uint 16\n this.writeU8(0xcd);\n this.writeU16(object);\n }\n else if (object < 0x100000000) {\n // uint 32\n this.writeU8(0xce);\n this.writeU32(object);\n }\n else if (!this.useBigInt64) {\n // uint 64\n this.writeU8(0xcf);\n this.writeU64(object);\n }\n else {\n this.encodeNumberAsFloat(object);\n }\n }\n else {\n if (object >= -0x20) {\n // negative fixint\n this.writeU8(0xe0 | (object + 0x20));\n }\n else if (object >= -0x80) {\n // int 8\n this.writeU8(0xd0);\n this.writeI8(object);\n }\n else if (object >= -0x8000) {\n // int 16\n this.writeU8(0xd1);\n this.writeI16(object);\n }\n else if (object >= -0x80000000) {\n // int 32\n this.writeU8(0xd2);\n this.writeI32(object);\n }\n else if (!this.useBigInt64) {\n // int 64\n this.writeU8(0xd3);\n this.writeI64(object);\n }\n else {\n this.encodeNumberAsFloat(object);\n }\n }\n }\n else {\n this.encodeNumberAsFloat(object);\n }\n }\n encodeNumberAsFloat(object) {\n if (this.forceFloat32) {\n // float 32\n this.writeU8(0xca);\n this.writeF32(object);\n }\n else {\n // float 64\n this.writeU8(0xcb);\n this.writeF64(object);\n }\n }\n encodeBigInt64(object) {\n if (object >= BigInt(0)) {\n // uint 64\n this.writeU8(0xcf);\n this.writeBigUint64(object);\n }\n else {\n // int 64\n this.writeU8(0xd3);\n this.writeBigInt64(object);\n }\n }\n writeStringHeader(byteLength) {\n if (byteLength < 32) {\n // fixstr\n this.writeU8(0xa0 + byteLength);\n }\n else if (byteLength < 0x100) {\n // str 8\n this.writeU8(0xd9);\n this.writeU8(byteLength);\n }\n else if (byteLength < 0x10000) {\n // str 16\n this.writeU8(0xda);\n this.writeU16(byteLength);\n }\n else if (byteLength < 0x100000000) {\n // str 32\n this.writeU8(0xdb);\n this.writeU32(byteLength);\n }\n else {\n throw new Error(`Too long string: ${byteLength} bytes in UTF-8`);\n }\n }\n encodeString(object) {\n const maxHeaderSize = 1 + 4;\n const byteLength = utf8Count(object);\n this.ensureBufferSizeToWrite(maxHeaderSize + byteLength);\n this.writeStringHeader(byteLength);\n utf8Encode(object, this.bytes, this.pos);\n this.pos += byteLength;\n }\n encodeObject(object, depth) {\n // try to encode objects with custom codec first of non-primitives\n const ext = this.extensionCodec.tryToEncode(object, this.context);\n if (ext != null) {\n this.encodeExtension(ext);\n }\n else if (Array.isArray(object)) {\n this.encodeArray(object, depth);\n }\n else if (ArrayBuffer.isView(object)) {\n this.encodeBinary(object);\n }\n else if (typeof object === \"object\") {\n this.encodeMap(object, depth);\n }\n else {\n // symbol, function and other special object come here unless extensionCodec handles them.\n throw new Error(`Unrecognized object: ${Object.prototype.toString.apply(object)}`);\n }\n }\n encodeBinary(object) {\n const size = object.byteLength;\n if (size < 0x100) {\n // bin 8\n this.writeU8(0xc4);\n this.writeU8(size);\n }\n else if (size < 0x10000) {\n // bin 16\n this.writeU8(0xc5);\n this.writeU16(size);\n }\n else if (size < 0x100000000) {\n // bin 32\n this.writeU8(0xc6);\n this.writeU32(size);\n }\n else {\n throw new Error(`Too large binary: ${size}`);\n }\n const bytes = ensureUint8Array(object);\n this.writeU8a(bytes);\n }\n encodeArray(object, depth) {\n const size = object.length;\n if (size < 16) {\n // fixarray\n this.writeU8(0x90 + size);\n }\n else if (size < 0x10000) {\n // array 16\n this.writeU8(0xdc);\n this.writeU16(size);\n }\n else if (size < 0x100000000) {\n // array 32\n this.writeU8(0xdd);\n this.writeU32(size);\n }\n else {\n throw new Error(`Too large array: ${size}`);\n }\n for (const item of object) {\n this.doEncode(item, depth + 1);\n }\n }\n countWithoutUndefined(object, keys) {\n let count = 0;\n for (const key of keys) {\n if (object[key] !== undefined) {\n count++;\n }\n }\n return count;\n }\n encodeMap(object, depth) {\n const keys = Object.keys(object);\n if (this.sortKeys) {\n keys.sort();\n }\n const size = this.ignoreUndefined ? this.countWithoutUndefined(object, keys) : keys.length;\n if (size < 16) {\n // fixmap\n this.writeU8(0x80 + size);\n }\n else if (size < 0x10000) {\n // map 16\n this.writeU8(0xde);\n this.writeU16(size);\n }\n else if (size < 0x100000000) {\n // map 32\n this.writeU8(0xdf);\n this.writeU32(size);\n }\n else {\n throw new Error(`Too large map object: ${size}`);\n }\n for (const key of keys) {\n const value = object[key];\n if (!(this.ignoreUndefined && value === undefined)) {\n this.encodeString(key);\n this.doEncode(value, depth + 1);\n }\n }\n }\n encodeExtension(ext) {\n if (typeof ext.data === \"function\") {\n const data = ext.data(this.pos + 6);\n const size = data.length;\n if (size >= 0x100000000) {\n throw new Error(`Too large extension object: ${size}`);\n }\n this.writeU8(0xc9);\n this.writeU32(size);\n this.writeI8(ext.type);\n this.writeU8a(data);\n return;\n }\n const size = ext.data.length;\n if (size === 1) {\n // fixext 1\n this.writeU8(0xd4);\n }\n else if (size === 2) {\n // fixext 2\n this.writeU8(0xd5);\n }\n else if (size === 4) {\n // fixext 4\n this.writeU8(0xd6);\n }\n else if (size === 8) {\n // fixext 8\n this.writeU8(0xd7);\n }\n else if (size === 16) {\n // fixext 16\n this.writeU8(0xd8);\n }\n else if (size < 0x100) {\n // ext 8\n this.writeU8(0xc7);\n this.writeU8(size);\n }\n else if (size < 0x10000) {\n // ext 16\n this.writeU8(0xc8);\n this.writeU16(size);\n }\n else if (size < 0x100000000) {\n // ext 32\n this.writeU8(0xc9);\n this.writeU32(size);\n }\n else {\n throw new Error(`Too large extension object: ${size}`);\n }\n this.writeI8(ext.type);\n this.writeU8a(ext.data);\n }\n writeU8(value) {\n this.ensureBufferSizeToWrite(1);\n this.view.setUint8(this.pos, value);\n this.pos++;\n }\n writeU8a(values) {\n const size = values.length;\n this.ensureBufferSizeToWrite(size);\n this.bytes.set(values, this.pos);\n this.pos += size;\n }\n writeI8(value) {\n this.ensureBufferSizeToWrite(1);\n this.view.setInt8(this.pos, value);\n this.pos++;\n }\n writeU16(value) {\n this.ensureBufferSizeToWrite(2);\n this.view.setUint16(this.pos, value);\n this.pos += 2;\n }\n writeI16(value) {\n this.ensureBufferSizeToWrite(2);\n this.view.setInt16(this.pos, value);\n this.pos += 2;\n }\n writeU32(value) {\n this.ensureBufferSizeToWrite(4);\n this.view.setUint32(this.pos, value);\n this.pos += 4;\n }\n writeI32(value) {\n this.ensureBufferSizeToWrite(4);\n this.view.setInt32(this.pos, value);\n this.pos += 4;\n }\n writeF32(value) {\n this.ensureBufferSizeToWrite(4);\n this.view.setFloat32(this.pos, value);\n this.pos += 4;\n }\n writeF64(value) {\n this.ensureBufferSizeToWrite(8);\n this.view.setFloat64(this.pos, value);\n this.pos += 8;\n }\n writeU64(value) {\n this.ensureBufferSizeToWrite(8);\n setUint64(this.view, this.pos, value);\n this.pos += 8;\n }\n writeI64(value) {\n this.ensureBufferSizeToWrite(8);\n setInt64(this.view, this.pos, value);\n this.pos += 8;\n }\n writeBigUint64(value) {\n this.ensureBufferSizeToWrite(8);\n this.view.setBigUint64(this.pos, value);\n this.pos += 8;\n }\n writeBigInt64(value) {\n this.ensureBufferSizeToWrite(8);\n this.view.setBigInt64(this.pos, value);\n this.pos += 8;\n }\n}\n//# sourceMappingURL=Encoder.mjs.map","import { Encoder } from \"./Encoder.mjs\";\n/**\n * It encodes `value` in the MessagePack format and\n * returns a byte buffer.\n *\n * The returned buffer is a slice of a larger `ArrayBuffer`, so you have to use its `#byteOffset` and `#byteLength` in order to convert it to another typed arrays including NodeJS `Buffer`.\n */\nexport function encode(value, options) {\n const encoder = new Encoder(options);\n return encoder.encodeSharedRef(value);\n}\n//# sourceMappingURL=encode.mjs.map","import chalk from 'chalk';\n\nimport isNode from 'detect-node';\n\nimport axios from 'axios'\n\nimport { IPublishTransportRESTServerOptions, IInstrumentPayload, IPublisherTransport } from './../../commonTypes.js'\n\nimport { STSOptionsBase, STSAxiosConfig } from '@nsshunt/stsutils'\n\nimport { encode } from \"@msgpack/msgpack\";\n\nexport class PublishTransportRESTServer extends STSOptionsBase implements IPublisherTransport\n{\n constructor(options: IPublishTransportRESTServerOptions) {\n super(options);\n }\n\n override get options(): IPublishTransportRESTServerOptions {\n return super.options as IPublishTransportRESTServerOptions;\n }\n\n // Returns true for success or false for failure.\n Publish = async (payload: IInstrumentPayload): Promise<boolean> => {\n try {\n if (this.options.showPublishPayload) {\n console.log(chalk.grey(`PublishTransportRESTServer::Publish() url: [${this.options.url}]`))\n console.log(payload)\n }\n const encodedData: Uint8Array = encode(payload, { ignoreUndefined: true});\n //const buffer: Buffer = Buffer.from(encodedData); // copies the data\n //const buffer2: Buffer = Buffer.from(encodedData.buffer, encodedData.byteOffset, encodedData.byteLength); // does not copy the data\n //const headers = { 'Content-Type': 'application/octet-stream', 'Content-Length': encodedData.length };\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const headers: any = { 'Content-Type': 'application/octet-stream' };\n //const headers = { 'Content-Type': 'application/json' };\n let retVal = null;\n //const processStart = performance.now();\n if (this.options.socketPath) {\n retVal = await axios({\n method: 'post',\n data: Buffer.from(encodedData),\n headers: headers,\n socketPath: this.options.socketPath\n });\n } else {\n if (isNode) {\n if (this.options.agentManager) {\n retVal = await axios(new STSAxiosConfig(this.options.url as string, 'post', headers)\n .withData(Buffer.from(encodedData))\n .withAgentManager(this.options.agentManager).config);\n } else {\n retVal = await axios(new STSAxiosConfig(this.options.url as string, 'post', headers)\n .withData(Buffer.from(encodedData)).config);\n }\n } else {\n //@@\n //const blob = new Blob([encodedData], { type: 'application/octet-stream' });\n const blob = new Blob([new Uint8Array(encodedData)], { type: 'application/octet-stream' });\n retVal = await axios(new STSAxiosConfig(this.options.url as string, 'post', headers)\n .withData(blob).config);\n }\n }\n\n if (retVal.status !== 200) {\n\n if (this.options.showPublishPayload) {\n console.log(chalk.red(`PublishTransportRESTServer::Publish() Error (_PerformPublishRESTAPI:_PerformPublish:#publishmessage): Invalid response from server: [${retVal.status}]`))\n }\n \n this.options.logger.debug(chalk.red(`Error (_PerformPublishRESTAPI:_PerformPublish:#publishmessage): Invalid response from server: [${retVal.status}]`));\n return false;\n } else {\n\n if (this.options.showPublishPayload) {\n console.log(chalk.grey(`PublishTransportRESTServer::Publish() _PerformPublishRESTAPI:_PerformPublish:#publishmessage: [${this.options.url}] - Valid response from server: [${retVal.status}]`))\n }\n \n //@@this.options.logger.debug(chalk.green(`_PerformPublishRESTAPI:_PerformPublish:#publishmessage: [${this.options.url}] - Valid response from server: [${retVal.status}]`));\n }\n\n return true;\n \n } catch (error) {\n\n if (this.options.showPublishPayload) {\n console.log(chalk.red(`PublishTransportRESTServer::Publish() Error (PublishRESTServer:_PerformPublishRESTAPI:Error: [${error}]`))\n }\n\n //@@\n //this.options.logger.error(chalk.red(`Error (PublishRESTServer:_PerformPublishRESTAPI:Error: [${error}]`));\n return false;\n }\n }\n\n async Close(): Promise<boolean> {\n if (this.options.agentManager) {\n this.options.agentManager.Terminate();\n }\n return true;\n }\n}\n","import chalk from 'chalk';\n\nimport isNode from 'detect-node'\n\nimport { STSOptionsBase } from '@nsshunt/stsutils'\n\nimport { IPublishInstrumentsOptions, IInstrumentPayload, TransportType, IPublisherTransport } from './../commonTypes.js'\n\nimport { PublishTransportRESTServer } from './publishers/publishTransportRESTServer.js'\n\nexport enum ePublishState {\n init,\n started,\n stopping\n}\n/**\n * This class managers the creation of instruments and the publication of instrumentation telemetry to the instrument manager service.\n */\nexport class PublishInstruments extends STSOptionsBase {\n #inPublish = false;\n #observer: NodeJS.Timeout | null = null;\n #publishState: ePublishState = ePublishState.init;\n #publisherTransport: IPublisherTransport | null = null;\n\n constructor(options: IPublishInstrumentsOptions) {\n super(options);\n\n this.#publisherTransport = null;\n switch (options.publishTransportBaseOptions.transportType) {\n case TransportType.RESTAPI :\n this.#publisherTransport = new PublishTransportRESTServer(options.publishTransportBaseOptions);\n break;\n }\n\n this.#UpdateState(ePublishState.init, \"constructor()\");\n }\n\n override get options(): IPublishInstrumentsOptions {\n return super.options as IPublishInstrumentsOptions;\n }\n\t\n async Publish(): Promise<boolean> {\n if (this.#inPublish) {\n return false;\n }\n\n if (this.#publisherTransport) {\n try {\n this.#inPublish = true;\n\n //const instrumentPayload: IInstrumentPayload = this.#GetPayloadData();\n if (this.options.publishInstrumentController) {\n const instrumentPayload: IInstrumentPayload = this.options.publishInstrumentController.GetPayloadData();\n return await this.#publisherTransport.Publish(instrumentPayload);\n }\n\n return false;\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n } catch (error) {\n return false;\n } finally {\n this.#inPublish = false;\n }\n } else {\n return false;\n }\n }\n\n #PublishTimeoutLoop(publishInterval: number) { \n this.#observer = setTimeout(async () => {\n const start = performance.now();\n const result = await this.Publish();\n const end = performance.now();\n const diff = end - start;\n\n if (this.#publishState === ePublishState.started) {\n if (result === true) {\n this.#PublishTimeoutLoop(this.options.publishInterval - (diff));\n } else {\n this.#PublishTimeoutLoop(this.options.publishPostFailInterval - (diff));\n }\n }\n }, publishInterval);\n if (isNode) this.#observer.unref();\n }\n\n async StartPublish(): Promise<boolean> {\n if (this.#publishState !== ePublishState.init) {\n this.options.logger.debug(chalk.yellow(`StartPublish:${this.options.processContext.nid}: StartPublish called when not currently in the init state. Current State: [${this.#publishState}]`));\n return false;\n }\n this.#UpdateState(ePublishState.started, \"StartPublish()\");\n this.#PublishTimeoutLoop(this.options.publishInterval);\n return true;\n }\n\n #UpdateState(newState: ePublishState, comment: string): void {\n const previousState = this.#publishState;\n this.#publishState = newState;\n this.options.logger.debug(chalk.yellow(`#UpdateState:${this.options.processContext.nid}: Previous State: [${previousState}]. Current State: [${this.#publishState}]. Comment: [${comment}]`));\n }\n\n async EndPublish(): Promise<boolean> {\n if (this.#publishState !== ePublishState.started) {\n this.options.logger.debug(chalk.yellow(`EndPublish:${this.options.processContext.nid}: EndPublish called when not within the started state. Current State: [${this.#publishState}]`));\n return false;\n }\n this.#UpdateState(ePublishState.stopping, \"EndPublish() (1)\");\n if (this.#observer !== null) {\n clearTimeout(this.#observer);\n this.#observer = null;\n // Perform a final publish/flush of any remaining instrument data (such as logs etc.)\n await this.Publish();\n }\n if (this.#publisherTransport) {\n await this.#publisherTransport.Close();\n }\n this.#UpdateState(ePublishState.init, \"EndPublish() (2)\");\n return true;\n }\n}\n","/* eslint @typescript-eslint/no-explicit-any: 0 */ // --> OFF\nimport chalk from 'chalk';\n\nimport { GaugeTypes, Gauge, InstrumentBaseOptions, InstrumentBase, InstrumentBaseTelemetry,\n InstrumentLog, InstrumentLogTelemetry, InstrumentGauge, InstrumentHistogram, \n InstrumentVelocity, InstrumentTimerGauge, InstrumentObject\n} from '@nsshunt/stsobservability'\n\nimport { STSOptionsBase } from '@nsshunt/stsutils'\n\nimport { IPublishInstrumentControllerOptions, InstrumentDefinitions, InstrumentDefinition,\n IContextBase, IInstrumentPayload, IPublishInstrumentController, IPublishInstrumentsOptions } from './../commonTypes.js'\n\nimport { PublishInstruments } from './publishInstruments.js'\nexport enum ePublishState {\n init,\n started,\n stopping\n}\n/**\n * This class managers the creation of instruments and the publication of instrumentation telemetry to the instrument manager service.\n */\nexport class PublishInstrumentController extends STSOptionsBase implements IPublishInstrumentController {\n #instruments: Record<string, InstrumentBase> = { };\n #publisher: PublishInstruments | null = null;\n\n constructor(options: IPublishInstrumentControllerOptions) {\n super(options);\n this.SetupInstrumentation();\n\n const publishInstrumentsOptions: IPublishInstrumentsOptions = {\n logger: options.logger,\n processContext: { ...options.processContext },\n publishInterval: options.publishInterval,\n publishPostFailInterval: options.publishPostFailInterval,\n publishInstrumentController: this,\n publishTransportBaseOptions: { ...options.publishTransportBaseOptions }\n }\n this.#publisher = new PublishInstruments(publishInstrumentsOptions);\n\n if (this.options.autoStart === true) {\n this.StartPublish();\n }\n }\n\n override get options(): IPublishInstrumentControllerOptions {\n return super.options as IPublishInstrumentControllerOptions;\n }\n\n async StartPublish(): Promise<boolean> {\n return (this.#publisher as PublishInstruments).StartPublish();\n }\n\n async EndPublish(): Promise<boolean> {\n return (this.#publisher as PublishInstruments).EndPublish();\n }\n\n async Publish(): Promise<boolean> {\n return (this.#publisher as PublishInstruments).Publish();\n }\n\n LogEx = (message: string) => {\n this.UpdateInstrument(Gauge.LOGGER, {\n LogMessage: message\n } as InstrumentLogTelemetry);\n }\n\n #GetInstrument(instrumentName: Gauge): InstrumentBase {\n // get the gauge from the internal gauge map - created using the factory function\n return this.#instruments[instrumentName];\n }\n\n #ProcessTelemetryCommand(instrumentName: Gauge, telemetry: InstrumentBaseTelemetry): void {\n const instrument: InstrumentBase = this.#GetInstrument(instrumentName);\n if (instrument) {\n instrument.ProcessTelemetry(telemetry);\n }\n }\n\n // Instrument factory\n #CreateInstrument(instrumentType: GaugeTypes, options: InstrumentBaseOptions): InstrumentBase {\n let instrument: InstrumentBase;\n\n switch (instrumentType) {\n case GaugeTypes.INSTRUMENT_GAUGE :\n instrument = new InstrumentGauge(options);\n break;\n case GaugeTypes.INSTRUMENT_HISTOGRAM :\n instrument = new InstrumentHistogram(options);\n break;\n case GaugeTypes.INSTRUMENT_LOG :\n instrument = new InstrumentLog(options);\n break;\n case GaugeTypes.INSTRUMENT_OBJECT :\n instrument = new InstrumentObject(options);\n break;\n case GaugeTypes.INSTRUMENT_TIMER :\n instrument = new InstrumentTimerGauge(options);\n break;\n case GaugeTypes.INSTRUMENT_VELOCITY :\n instrument = new InstrumentVelocity(options);\n break;\n default :\n throw new Error(`Gauge type: [${instrumentType} not known.]`);\n }\n return instrument;\n }\n\n #CreateInstruments(payload: InstrumentDefinitions): void {\n payload.forEach((instrumentDefinition: InstrumentDefinition) => {\n const g: Gauge = instrumentDefinition[0];\n const gt: GaugeTypes = instrumentDefinition[1];\n const instrumentBaseOptions: InstrumentBaseOptions | undefined = instrumentDefinition[2];\n const instrument: InstrumentBase = this.#CreateInstrument(gt, instrumentBaseOptions as InstrumentBaseOptions);\n // Add to instrument map\n this.#instruments[g] = instrument;\n })\n }\n\n GetPayloadData(): IInstrumentPayload {\n const context = this.options.processContext;\n const instruments = this.#instruments;\n const payloadInstruments: Record<string, InstrumentBase> = { };\n for (const [key, value] of Object.entries(instruments)) {\n if (value instanceof InstrumentLog) {\n payloadInstruments[key] = { ...value.WithUseLatestMessages(true) } as InstrumentLog;\n } else {\n payloadInstruments[key] = { ...value } as InstrumentBase;\n }\n }\n\n return {\n context,\n instruments: payloadInstruments\n } as IInstrumentPayload;\n }\n\n SetupInstrumentation() {\n if (!this.options.instrumentDefinitions) {\n this.options.logger.debug(chalk.yellow(`SetupInstrumentation:${this.options.processContext.nid}: No instrument(s) defined within supplied options.`));\n return;\n }\n if (!this.options.processContext) {\n this.options.logger.debug(chalk.yellow(`SetupInstrumentation: No context defined within supplied options.`));\n return;\n }\n this.#CreateInstruments(this.options.instrumentDefinitions);\n }\n\n /**\n * Check if an instrument exists within the managed instrument collection\n * @param instrumentName \n * @returns \n */\n InstrumentExists(instrumentName: Gauge): boolean {\n if (this.#instruments[instrumentName]) {\n return true;\n }\n return false;\n }\n\n /**\n * Update instrument telemetry.\n * @param instrumentName \n * @param telemetry \n */\n UpdateInstrument(instrumentName: Gauge, telemetry: InstrumentBaseTelemetry): void {\n if (this.#instruments[instrumentName]) {\n this.#ProcessTelemetryCommand(instrumentName, telemetry);\n } else {\n // Error state\n this.options.logger.debug(chalk.red(`UpdateInstrument:${this.options.processContext.nid}: Attempted to UpdateInstrument before initialised.`));\n }\n }\n\n /**\n\t * Add additional instrument publishers. Usually invoked when adding workers to the app and/or async runners within a worker.\n\t * @param processContext \n\t * @returns Returns the newly created PublishInstrumentController\n\t */\n AddPublishInstrumentController(processContext: IContextBase): PublishInstrumentController {\n const options: IPublishInstrumentControllerOptions = { ...this.options };\n options.processContext = processContext;\n return new PublishInstrumentController(options);\n }\n}\n","// Individual STS plugin keys for provide/inject logic\nexport const STSInstrumentControllerPluginKey = Symbol('instrumentController')\n","import chalk from 'chalk';\n\nimport { inject } from 'vue'\n\nimport { PublishInstrumentController } from './publishInstrumentController.js'\nimport { IPublishInstrumentControllerOptions } from './../commonTypes.js'\n\nimport { STSInstrumentControllerPluginKey } from './stsPluginKeys.js'\n\nexport const GetSTSInstrumentControllerPluginKey = (): symbol => STSInstrumentControllerPluginKey\n\nexport const CompareSTSInstrumentControllerPluginKey = (val: symbol): boolean => val === STSInstrumentControllerPluginKey\n\n// Create our use composable. This pattern is also used by vue router library with the useRoute and useRouter composables.\n// https://skirtles-code.github.io/vue-examples/patterns/global-properties.html#application-level-provide-inject\nexport const useSTSInstrumentControllerPlugin = (): PublishInstrumentController => inject(STSInstrumentControllerPluginKey) as PublishInstrumentController\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport const GetSTSInstrumentController = (app: any): PublishInstrumentController => {\n return app.config.globalProperties.$sts[STSInstrumentControllerPluginKey]\n}\n\nexport const STSInstrumentControllerPlugin = {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any \n install: (app: any, options: IPublishInstrumentControllerOptions) => {\n options.logger.debug(chalk.yellow(`STSInstrumentControllerPlugin:install:Start`));\n const aic = new PublishInstrumentController(options);\n\n // Assign plugin instance to global $sts object (legacy method - see below)\n if (!app.config.globalProperties.$sts) {\n options.logger.debug(chalk.cyan(`STSInstrumentControllerPlugin:install: [app.config.globalProperties.$sts] does not exist.`));\n app.config.globalProperties.$sts = { };\n options.logger.debug(chalk.cyan(`STSInstrumentControllerPlugin:install: created empty [app.config.globalProperties.$sts].`));\n } else {\n options.logger.debug(chalk.cyan(`STSInstrumentControllerPlugin:install: [app.config.globalProperties.$sts] already exists.`));\n }\n app.config.globalProperties.$sts.aic = aic; //@@ for legacy implementation in oauthplugin - remove once PublishInstrumentControllerOptions is a seperate plugin\n app.config.globalProperties.$sts[STSInstrumentControllerPluginKey] = aic;\n options.logger.debug(chalk.cyan(`STSInstrumentControllerPlugin:install: AgentInstrumentController installed into [app.config.globalProperties.$sts] using: [${String(STSInstrumentControllerPluginKey)}].`));\n\n // Assign App level provide for this STS plugin using symbol keys\n // https://vuejs.org/guide/components/provide-inject.html#working-with-symbol-keys\n app.provide(STSInstrumentControllerPluginKey, aic);\n options.logger.debug(chalk.cyan(`STSInstrumentControllerPlugin:install: AgentInstrumentController installed into 'provide' using: [${String(STSInstrumentControllerPluginKey)}].`));\n\n options.logger.debug(chalk.green(`STSInstrumentControllerPlugin:install:End`));\n }\n}\n","import { Gauge, GaugeTypes, InstrumentBaseOptions, InstrumentGaugeOptions,\n InstrumentObjectOptions, InstrumentLogOptions\n} from '@nsshunt/stsobservability'\n\nimport { IContextBase, InstrumentDefinitions } from './commonTypes.js'\n\nimport { SubscriptionTopic } from './commonTypes.js'\n\nexport type IInstrumentHashMap = Record<string, string>;\n\nexport interface IHistoField {\n label: string\n bucketLimit: number\n}\n\nexport enum influxDBDataType {\n intField = 'intField',\n floatField = 'floatField',\n stringField = 'stringField'\n}\n\nexport interface IFieldRecord {\n fieldName: string\n gauge: Gauge\n instrumentProperty: string\n dataType: string\n influxdbDataType: influxDBDataType\n timeSeriesIndex?: boolean\n quantile?: boolean // Does this field require a quantile ?\n histo?: IHistoField[],\n histoGauge?: Gauge,\n gaugeType: GaugeTypes,\n instrumentOptions?: InstrumentBaseOptions\n}\n\n//@@ current not used - delete if required ...\nexport interface IRedisQueryFilters {\n level1ContextField: string\n level2ContextField: string\n level3ContextField: string\n}\n\nexport interface IRedisIndexPrefixDefinitions {\n timeSeriesIndex: string\n timeSeriesPrefix: string\n instantIndex: string\n instantPrefix: string\n}\n\nexport interface IsubscriptionTopic {\n subscriptionTopic: SubscriptionTopic\n route: string,\n}\n\nexport interface IServiceDefinition {\n influxDBContextTags: string[],\n redisIndexPrefixDefinitions: IRedisIndexPrefixDefinitions\n fieldList: IFieldRecord[] // Specific additional fields (beyond the core fields) that this service supports\n GetPathFromContext: (context: IContextBase) => string\n redisQueryFilters: IRedisQueryFilters\n subscriptionTopics: IsubscriptionTopic[]\n}\n\nexport interface IGlobalServiceDefinitions {\n coreFieldList: IFieldRecord[] // Set of instruments that are used by all service types\n logFieldList: IFieldRecord[] // Set of log instruments that are used by all service types\n services: Record<string, IServiceDefinition>;\n}\n\nconst instrumentationObservationInterval = 1000;\nconst instrumentationTimeWindow = 600;\nconst consoleLogging = false;\nconst instrumentLogging = true;\n\nexport const globalServiceDefinitions: IGlobalServiceDefinitions = {\n coreFieldList: [\n { fieldName: 'requestCount', gauge: Gauge.REQUEST_COUNT_GAUGE, instrumentProperty: 'val', dataType: 'number', influxdbDataType: influxDBDataType.intField, gaugeType: GaugeTypes.INSTRUMENT_GAUGE },\n { fieldName: 'errorCount', gauge: Gauge.ERROR_COUNT_GAUGE, instrumentProperty: 'val', dataType: 'number', influxdbDataType: influxDBDataType.intField, gaugeType: GaugeTypes.INSTRUMENT_GAUGE },\n { fieldName: 'retryCount', gauge: Gauge.RETRY_COUNT_GAUGE, instrumentProperty: 'val', dataType: 'number', influxdbDataType: influxDBDataType.intField, gaugeType: GaugeTypes.INSTRUMENT_GAUGE },\n { fieldName: 'authenticationCount', gauge: Gauge.AUTHENTICATION_COUNT_GAUGE, instrumentProperty: 'val', dataType: 'number', influxdbDataType: influxDBDataType.intField, gaugeType: GaugeTypes.INSTRUMENT_GAUGE },\n { fieldName: 'authenticationErrorCount', gauge: Gauge.AUTHENTICATION_ERROR_COUNT_GAUGE, instrumentProperty: 'val', dataType: 'number', influxdbDataType: influxDBDataType.intField, gaugeType: GaugeTypes.INSTRUMENT_GAUGE },\n { fieldName: 'authenticationRetryCount', gauge: Gauge.AUTHENTICATION_RETRY_COUNT_GAUGE, instrumentProperty: 'val', dataType: 'number', influxdbDataType: influxDBDataType.intField, gaugeType: GaugeTypes.INSTRUMENT_GAUGE },\n { fieldName: 'velocity', gauge: Gauge.VELOCITY_GAUGE, instrumentProperty: 'va', dataType: 'number', influxdbDataType: influxDBDataType.floatField, gaugeType: GaugeTypes.INSTRUMENT_VELOCITY },\n { fieldName: 'activeRequestCount', gauge: Gauge.ACTIVE_REQUEST_GAUGE, instrumentProperty: 'val', dataType: 'number', timeSeriesIndex: true, quantile: true, influxdbDataType: influxDBDataType.intField, \n gaugeType: GaugeTypes.INSTRUMENT_GAUGE,\n instrumentOptions: {\n interval: instrumentationObservationInterval, \n sampleSize: instrumentationTimeWindow \n } as InstrumentGaugeOptions\n },\n { fieldName: 'coreCount', gauge: Gauge.CORE_COUNT_GAUGE, instrumentProperty: 'val', dataType: 'number', influxdbDataType: influxDBDataType.intField, gaugeType: GaugeTypes.INSTRUMENT_GAUGE },\n { fieldName: 'rx', gauge: Gauge.NETWORK_RX_GAUGE, instrumentProperty: 'va', dataType: 'number', influxdbDataType: influxDBDataType.floatField, gaugeType: GaugeTypes.INSTRUMENT_VELOCITY },\n { fieldName: 'tx', gauge: Gauge.NETWORK_TX_GAUGE, instrumentProperty: 'va', dataType: 'number', influxdbDataType: influxDBDataType.floatField, gaugeType: GaugeTypes.INSTRUMENT_VELOCITY },\n { fieldName: 'timer', gauge: Gauge.TIMER_GAUGE, instrumentProperty: 'val', dataType: 'number', influxdbDataType: influxDBDataType.floatField, gaugeType: GaugeTypes.INSTRUMENT_TIMER },\n { fieldName: 'duration', gauge: Gauge.DURATION_GAUGE, instrumentProperty: 'val', dataType: 'number', timeSeriesIndex: true, quantile: true, influxdbDataType: influxDBDataType.floatField, \n gaugeType: GaugeTypes.INSTRUMENT_GAUGE,\n instrumentOptions: {\n interval: instrumentationObservationInterval, \n sampleSize: instrumentationTimeWindow \n } as InstrumentGaugeOptions,\n histo: [\n { label: 'B10', bucketLimit: 10 },\n { label: 'B20', bucketLimit: 20 },\n { label: 'B50', bucketLimit: 50 },\n { label: 'B100', bucketLimit: 100 },\n { label: 'B1000', bucketLimit: 1000 },\n { label: 'B50000', bucketLimit: 50000 },\n { label: 'BInfinity', bucketLimit: -1 }\n ],\n histoGauge: Gauge.DURATION_HISTOGRAM_GAUGE\n },\n { fieldName: 'latency', gauge: Gauge.LATENCY_GAUGE, instrumentProperty: 'val', dataType: 'number', timeSeriesIndex: true, quantile: true, influxdbDataType: influxDBDataType.floatField, \n gaugeType: GaugeTypes.INSTRUMENT_GAUGE,\n instrumentOptions: {\n interval: instrumentationObservationInterval, \n sampleSize: instrumentationTimeWindow \n } as InstrumentGaugeOptions,\n histo: [\n { label: 'B10', bucketLimit: 10 },\n { label: 'B20', bucketLimit: 20 },\n { label: 'B50', bucketLimit: 50 },\n { label: 'B100', bucketLimit: 100 },\n { label: 'B1000', bucketLimit: 1000 },\n { label: 'B50000', bucketLimit: 50000 },\n { label: 'BInfinity', bucketLimit: -1 }\n ],\n histoGauge: Gauge.LATENCY_HISTOGRAM_GAUGE\n }\n ],\n logFieldList: [\n { fieldName: 'log', gauge: Gauge.LOGGER, instrumentProperty: 'val', dataType: 'string', timeSeriesIndex: false, quantile: false, influxdbDataType: influxDBDataType.stringField,\n gaugeType: GaugeTypes.INSTRUMENT_LOG,\n instrumentOptions: {\n consoleLogging: consoleLogging, \n instrumentLogging: instrumentLogging \n } as InstrumentLogOptions\n }\n ],\n services: {\n ['service']: {\n influxDBContextTags: [\n 'serviceId',\n 'serviceName',\n 'serviceVersion',\n 'serviceInstanceId',\n 'serviceInstanceProcessId',\n 'hostName',\n 'pid',\n 'ppid'\n ],\n redisIndexPrefixDefinitions: {\n timeSeriesIndex: 'idx:serviceIndexTimeSeries',\n timeSeriesPrefix: '/serviceTimeSeries:',\n instantIndex: 'idx:serviceIndexInstant',\n instantPrefix: '/serviceInstant:'\n },\n fieldList: [\n { fieldName: 'cpu', gauge: Gauge.CPU_LOAD_GAUGE, instrumentProperty: 'val', dataType: 'number', timeSeriesIndex: true, quantile: true, influxdbDataType: influxDBDataType.floatField, \n gaugeType: GaugeTypes.INSTRUMENT_GAUGE, \n instrumentOptions: {\n interval: instrumentationObservationInterval, \n sampleSize: instrumentationTimeWindow \n } as InstrumentGaugeOptions\n },\n { fieldName: 'connectionCount', gauge: Gauge.CONNECTION_COUNT_GAUGE, instrumentProperty: 'val', dataType: 'number', timeSeriesIndex: true, quantile: true, influxdbDataType: influxDBDataType.intField, \n gaugeType: GaugeTypes.INSTRUMENT_GAUGE,\n instrumentOptions: {\n interval: instrumentationObservationInterval, \n sampleSize: instrumentationTimeWindow \n } as InstrumentGaugeOptions,\n },\n { fieldName: 'connectionPoolCount', gauge: Gauge.CONNECTION_POOL_TOTAL_GAUGE, instrumentProperty: 'val', dataType: 'number', influxdbDataType: influxDBDataType.intField, gaugeType: GaugeTypes.INSTRUMENT_GAUGE },\n { fieldName: 'connectionIdleCount', gauge: Gauge.CONNECTION_POOL_IDLE_GAUGE, instrumentProperty: 'val', dataType: 'number', influxdbDataType: influxDBDataType.intField, gaugeType: GaugeTypes.INSTRUMENT_GAUGE },\n { fieldName: 'connectionWaitingCount', gauge: Gauge.CONNECTION_POOL_WAITING_GAUGE, instrumentProperty: 'val', dataType: 'number', influxdbDataType: influxDBDataType.intField, gaugeType: GaugeTypes.INSTRUMENT_GAUGE },\n { fieldName: 'systemcpu', gauge: Gauge.CPU_SYSTEM_LOAD_GAUGE, instrumentProperty: 'val', dataType: 'number', timeSeriesIndex: true, quantile: true, influxdbDataType: influxDBDataType.floatField, gaugeType: GaugeTypes.INSTRUMENT_GAUGE },\n { fieldName: 'memory', gauge: Gauge.OBJECT_GAUGE, instrumentProperty: 'val', dataType: 'JSON', influxdbDataType: influxDBDataType.stringField, \n gaugeType: GaugeTypes.INSTRUMENT_OBJECT,\n instrumentOptions: {\n label: 'InstrumentObjectMaster'\n } as InstrumentObjectOptions\n }\n ],\n GetPathFromContext(context: IContextBase): string {\n //const { serviceId, serviceInstanceId, hostName, serviceInstanceProcessId, \n //pid, ppid, serviceName, serviceVersion } = instrumentPayload.context;\n const { serviceId, serviceInstanceId, serviceInstanceProcessId } = context;\n return `/${serviceId}/${serviceInstanceId}/${serviceInstanceProcessId}`; //@@ these should line up with the query filer names\n },\n redisQueryFilters: {\n level1ContextField: 'serviceType',\n level2ContextField: 'appid',\n level3ContextField: 'appinstanceid'\n },\n subscriptionTopics: [\n {\n subscriptionTopic: SubscriptionTopic.AllServicesCombined,\n route: '/metrics'\n },\n {\n subscriptionTopic: SubscriptionTopic.Services,\n route: '/metrics/services'\n },\n {\n subscriptionTopic: SubscriptionTopic.ServiceInstances,\n route: '/metrics/services/:key'\n },\n {\n subscriptionTopic: SubscriptionTopic.ServiceInstance,\n route: '/metrics/services/:key/:subkey'\n }\n ]\n },\n ['agent']: {\n influxDBContextTags: [\n 'id',\n 'hostName',\n 'agentName',\n 'threadId',\n 'asyncRunnerId'\n ],\n redisIndexPrefixDefinitions: {\n timeSeriesIndex: 'idx:agentIndexTimeSeries',\n timeSeriesPrefix: '/agentTimeSeries:',\n instantIndex: 'idx:agentIndexInstant',\n instantPrefix: '/agentInstant:'\n },\n fieldList: [\n { fieldName: 'childCount', gauge: Gauge.CHILD_COUNT, instrumentProperty: 'val', dataType: 'number', influxdbDataType: influxDBDataType.intField, gaugeType: GaugeTypes.INSTRUMENT_GAUGE }\n ],\n //@@ need type declare in appframework ?? agent does not use appframework ... perhaps stspublisher\n GetPathFromContext(context: IContextBase): string {\n //const { nid, id, hostName, agentName, threadId, asyncRunnerId } = context;\n const { agentName, threadId, asyncRunnerId } = context;\n return `/${agentName}/${threadId}/${asyncRunnerId}`; //@@ these should line up with the query filer names\n },\n redisQueryFilters: {\n level1ContextField: 'serviceType',\n level2ContextField: 'appid', //@@ this should be named something else\n level3ContextField: 'appinstanceid' //@@ this should be named something else\n },\n subscriptionTopics: [\n {\n subscriptionTopic: SubscriptionTopic.AllAgentsCombined,\n route: '/metrics'\n },\n {\n subscriptionTopic: SubscriptionTopic.Agents,\n route: '/metrics/agents'\n },\n {\n subscriptionTopic: SubscriptionTopic.AgentWorkers,\n route: '/metrics/agents/:key'\n },\n {\n subscriptionTopic: SubscriptionTopic.AgentWorker,\n route: '/metrics/agents/:key/:subkey'\n }\n ]\n },\n ['lambda']: {\n influxDBContextTags: [\n 'technology',\n 'subTechnology',\n 'lambdaFunctionName',\n 'lambdaInstance',\n 'hostName',\n 'processId',\n 'parentProcessId',\n 'useCase',\n 'pattern'\n ],\n redisIndexPrefixDefinitions: {\n timeSeriesIndex: 'idx:lambdaIndexTimeSeries',\n timeSeriesPrefix: '/lambdaTimeSeries:',\n instantIndex: 'idx:lambdaIndexInstant',\n instantPrefix: '/lambdaInstant:'\n },\n fieldList: [\n { fieldName: 'cpu', gauge: Gauge.CPU_LOAD_GAUGE, instrumentProperty: 'val', dataType: 'number', timeSeriesIndex: true, quantile: true, influxdbDataType: influxDBDataType.floatField, gaugeType: GaugeTypes.INSTRUMENT_GAUGE },\n { fieldName: 'connectionCount', gauge: Gauge.CONNECTION_COUNT_GAUGE, instrumentProperty: 'val', dataType: 'number', timeSeriesIndex: true, quantile: true, influxdbDataType: influxDBDataType.intField, gaugeType: GaugeTypes.INSTRUMENT_GAUGE },\n { fieldName: 'connectionPoolCount', gauge: Gauge.CONNECTION_POOL_TOTAL_GAUGE, instrumentProperty: 'val', dataType: 'number', influxdbDataType: influxDBDataType.intField, gaugeType: GaugeTypes.INSTRUMENT_GAUGE },\n { fieldName: 'connectionIdleCount', gauge: Gauge.CONNECTION_POOL_IDLE_GAUGE, instrumentProperty: 'val', dataType: 'number', influxdbDataType: influxDBDataType.intField, gaugeType: GaugeTypes.INSTRUMENT_GAUGE },\n { fieldName: 'connectionWaitingCount', gauge: Gauge.CONNECTION_POOL_WAITING_GAUGE, instrumentProperty: 'val', dataType: 'number', influxdbDataType: influxDBDataType.intField, gaugeType: GaugeTypes.INSTRUMENT_GAUGE },\n { fieldName: 'systemcpu', gauge: Gauge.CPU_SYSTEM_LOAD_GAUGE, instrumentProperty: 'val', dataType: 'number', timeSeriesIndex: true, quantile: true, influxdbDataType: influxDBDataType.floatField, gaugeType: GaugeTypes.INSTRUMENT_GAUGE },\n { fieldName: 'memory', gauge: Gauge.OBJECT_GAUGE, instrumentProperty: 'val', dataType: 'JSON', influxdbDataType: influxDBDataType.stringField, gaugeType: GaugeTypes.INSTRUMENT_OBJECT }\n ],\n //@@ need type declare in appframework\n GetPathFromContext(context: IContextBase): string {\n //const { serviceId, serviceInstanceId, hostName, serviceInstanceProcessId, \n //pid, ppid, serviceName, serviceVersion } = instrumentPayload.context;\n const { technology, subTechnology, lambdaInstance } = context;\n return `/${technology}/${subTechnology}/${lambdaInstance}`;\n },\n redisQueryFilters: {\n level1ContextField: 'serviceType',\n level2ContextField: 'technology',\n level3ContextField: 'subTechnology'\n },\n subscriptionTopics: [\n {\n subscriptionTopic: SubscriptionTopic.AllLambdasCombined, // uicontrollerlanding\n route: '/metrics'\n },\n {\n subscriptionTopic: SubscriptionTopic.LambdaTechnologies, // uicontrollerlambda\n route: '/metrics/lambdas'\n },\n {\n subscriptionTopic: SubscriptionTopic.LambdaSubTechnologies, // uicontrollerlambdasubtechnologies\n route: '/metrics/lambdas/:key'\n },\n {\n subscriptionTopic: SubscriptionTopic.LambdaSubTechnologiesInstance, // uicontrollerlambdasubtechnologiesinstance\n route: '/metrics/lambdas/:key/:subkey'\n }\n ]\n }\n }\n}\n\nexport const GetInstruments = (service: string): InstrumentDefinitions => {\n const fieldList = [\n ...globalServiceDefinitions.coreFieldList,\n ...globalServiceDefinitions.logFieldList,\n ...globalServiceDefinitions.services[service].fieldList\n ]\n const retVal: InstrumentDefinitions = [ ];\n fieldList.forEach(v => {\n if (v.instrumentOptions) {\n retVal.push([v.gauge, v.gaugeType, v.instrumentOptions]);\n } else {\n retVal.push([v.gauge, v.gaugeType]);\n }\n if (v.histo) {\n retVal.push([v.histoGauge as Gauge, GaugeTypes.INSTRUMENT_HISTOGRAM]);\n }\n });\n return retVal;\n}\n","/* eslint @typescript-eslint/no-unused-vars: 0 */ // --> OFF\n/* eslint @typescript-eslint/no-explicit-any: 0 */ // --> OFF\nimport { HistogramDataElement, QuantileDataElement, Gauge, GaugeTypes } from '@nsshunt/stsobservability'\nimport { quantile, histo, IServiceInstanceTelemetry, IAgentInstanceTelemetry, ILambdaInstanceTelemetry } from './../commonTypes.js'\nimport { globalServiceDefinitions } from './../globalServiceDefinitions.js'\n\n//import _cloneDeep from 'lodash.clonedeep'\nimport { ISTSLogger, JSONObject } from '@nsshunt/stsutils'\n\nexport interface IModelNode {\n val: number\n vf: string\n value: string\n}\n\nexport interface IModelNodeRawStringArray {\n val: string[]\n}\n\nexport interface IModelNodeJSONFromObject {\n val: any\n}\n\nexport interface IModelNodeQuantile {\n val: number\n vf: string\n value: string\n percentile: QuantileDataElement[]\n percentileFormatted: string\n}\n\nexport interface IModelNodeHist {\n hist: HistogramDataElement[]\n}\n\nexport interface IModelNodes {\n id: string\n instruments: Record<string, IModelNode | IModelNodeRawStringArray | IModelNodeJSONFromObject | IModelNodeQuantile | IModelNodeHist>\n canNavigate?: boolean\n options?: JSONObject\n}\n\nexport class ObservabilityModelUtils {\n static GetModelNode(data: number): IModelNode {\n const fixedSize = 2;\n const padLength = 9;\n try {\n return {\n val: data,\n vf: parseFloat(data.toString()).toFixed(fixedSize).padStart(padLength, ' '),\n value: parseFloat(data.toString()).toFixed(fixedSize)\n }\n } catch (error) {\n return {\n val: 0,\n vf: \"\",\n value: \"\"\n }\n }\n }\n\n static GetModelNodeRawStringArray(data: string[]): IModelNodeRawStringArray {\n try {\n return {\n val: data\n }\n } catch (error) {\n return {\n val: []\n }\n }\n }\n\n static GetModelNodeObject(data: any): IModelNodeJSONFromObject {\n try {\n return {\n val: JSON.parse(data)\n }\n } catch (error) {\n return {\n val: null\n }\n }\n }\n\n static GetModelNodeWithQuantile(data: number, quantileData: quantile): IModelNodeQuantile {\n let quantile: string = '';\n const quantileDataElementArray: QuantileDataElement[] = [ ];\n for (const [key, val] of Object.entries(quantileData)) {\n quantile += parseFloat((val as number).toFixed(2)).toString().padStart(8, ' ');\n quantileDataElementArray.push([\n key,\n val\n ])\n }\n\n const fixedSize = 2;\n const padLength = 9;\n try {\n return {\n val: data,\n vf: parseFloat(data.toString()).toFixed(fixedSize).padStart(padLength, ' '),\n value: parseFloat(data.toString()).toFixed(fixedSize),\n percentile: quantileDataElementArray,\n percentileFormatted: quantile\n }\n } catch (error) {\n return {\n val: 0,\n vf: '',\n value: '',\n percentile: [],\n percentileFormatted: ''\n }\n }\n }\n\n static GetModelNodeHistFromInfluxData(data: histo): IModelNodeHist {\n try {\n const histVal: HistogramDataElement[] = [ ];\n if (data) {\n for (const [key, val] of Object.entries(data)) {\n const dataElement: HistogramDataElement = [\n val as number,\n key,\n parseInt(key)\n ]\n histVal.push(dataElement)\n }\n }\n try {\n return {\n hist: histVal,\n }\n } catch (error) {\n return {\n hist: []\n }\n }\n } catch (error) {\n //console.log(chalk.red(`GetModelNodeHistFromInfluxData: Error [${error}]`));\n return {\n hist: []\n }\n }\n }\n\n static ParseModelNode = (model: IModelNodes, data: IServiceInstanceTelemetry | IAgentInstanceTelemetry | ILambdaInstanceTelemetry, parseLog: string[], gaugeName: Gauge, fieldName: string) => {\n if (fieldName in data) {\n model.instruments[gaugeName] = this.GetModelNode((data as any)[fieldName]);\n } else {\n parseLog.push(`ObservabilityModelUtils:ParseModelNode(): Field not present: [${fieldName}], default to [0]`)\n model.instruments[gaugeName] = this.GetModelNode(0);\n }\n }\n\n static ParseModelNodeWithQuantile = (model: IModelNodes, data: IServiceInstanceTelemetry | IAgentInstanceTelemetry | ILambdaInstanceTelemetry, parseLog: string[], gaugeName: Gauge, fieldName: string, quantileFieldName: string) => {\n if (fieldName in data && quantileFieldName in data) {\n model.instruments[gaugeName] = this.GetModelNodeWithQuantile((data as any)[fieldName], (data as any)[quantileFieldName]);\n } else if (fieldName in data) {\n const dataVal = (data as any)[fieldName];\n parseLog.push(`ObservabilityModelUtils:ParseModelNodeWithQuantile(): QuantileFieldName not present: [${quantileFieldName}], default to [${dataVal},{}]`)\n model.instruments[gaugeName] = this.GetModelNodeWithQuantile(dataVal, {});\n } else {\n parseLog.push(`ObservabilityModelUtils:ParseModelNodeWithQuantile(): Field not present: [${fieldName}], QuantileFieldName not present: [${quantileFieldName}], default to [0,{}]`)\n model.instruments[gaugeName] = this.GetModelNodeWithQuantile(0, {});\n }\n }\n\n static ParseModelNodeHisto = (model: IModelNodes, data: IServiceInstanceTelemetry | IAgentInstanceTelemetry | ILambdaInstanceTelemetry, parseLog: string[], gaugeName: Gauge, fieldName: string) => {\n if (fieldName in data) {\n model.instruments[gaugeName] = this.GetModelNodeHistFromInfluxData((data as any)[fieldName]);\n } else {\n parseLog.push(`ObservabilityModelUtils:ParseModelNodeHisto(): Field not present: [${fieldName}], default to [{}]`)\n model.instruments[gaugeName] = this.GetModelNodeHistFromInfluxData({});\n }\n }\n\n static ParseModelNodeObject = (model: IModelNodes, data: IServiceInstanceTelemetry | IAgentInstanceTelemetry | ILambdaInstanceTelemetry, parseLog: string[], gaugeName: Gauge, fieldName: string) => {\n if (fieldName in data) {\n model.instruments[gaugeName] = this.GetModelNodeObject((data as any)[fieldName]);\n } else {\n parseLog.push(`ObservabilityModelUtils:ParseModelNodeObject(): Field not present: [${fieldName}], default to [{}]`)\n model.instruments[gaugeName] = this.GetModelNodeObject({});\n }\n }\n\n static GetModelData(serviceType: string, model: IModelNodes, data: IServiceInstanceTelemetry | ILambdaInstanceTelemetry | IAgentInstanceTelemetry, parseLog: string[]) {\n const fieldList = [\n ...globalServiceDefinitions.coreFieldList,\n ...globalServiceDefinitions.services[serviceType].fieldList\n ]\n fieldList.forEach(field => {\n if (field.quantile) {\n ObservabilityModelUtils.ParseModelNodeWithQuantile(model, data, parseLog, field.gauge, field.fieldName, `${field.fieldName}_quantile`);\n } else if (field.gaugeType.localeCompare(GaugeTypes.INSTRUMENT_OBJECT) === 0) {\n ObservabilityModelUtils.ParseModelNodeObject(model, data, parseLog, field.gauge, field.fieldName);\n } else {\n ObservabilityModelUtils.ParseModelNode(model, data, parseLog, field.gauge, field.fieldName);\n }\n\n if (field.histo) {\n ObservabilityModelUtils.ParseModelNodeHisto(model, data, parseLog, field.histoGauge as Gauge, `${field.fieldName}_histo`);\n }\n });\n }\n\n static GetModelForService(id: string, data: IServiceInstanceTelemetry, logger: ISTSLogger): IModelNodes | null {\n try {\n const parseLog: string[] = [ ];\n const model: IModelNodes = {\n id,\n instruments: {\n }\n }\n this.GetModelData('service', model, data, parseLog);\n model.instruments[Gauge.LOGGER] = ObservabilityModelUtils.GetModelNodeRawStringArray((data as any)['logMessages']);\n if (parseLog.length > 0) {\n parseLog.forEach(logEntry => logger.debug(logEntry));\n }\n return model;\n } catch (error) {\n return null;\n }\n }\n\n static GetModelForLambda(id: string, data: ILambdaInstanceTelemetry, logger: ISTSLogger): IModelNodes | null {\n try {\n const parseLog: string[] = [ ];\n const model: IModelNodes = {\n id,\n instruments: {\n }\n }\n\n this.GetModelData('lambda', model, data, parseLog);\n\n model.instruments[Gauge.LOGGER] = ObservabilityModelUtils.GetModelNodeRawStringArray((data as any)['logMessages']);\n\n if (parseLog.length > 0) {\n parseLog.forEach(logEntry => logger.debug(logEntry));\n }\n\n return model;\n } catch (error) {\n return null;\n }\n }\n\n static GetModelForAgent(id: string, data: IAgentInstanceTelemetry, logger: ISTSLogger): IModelNodes | null {\n try {\n if (Object.keys(data).length === 0) {\n return null;\n }\n\n const parseLog: string[] = [ ];\n const model: IModelNodes = {\n id,\n instruments: {\n }\n }\n\n this.GetModelData('agent', model, data, parseLog);\n\n model.instruments[Gauge.LOGGER] = ObservabilityModelUtils.GetModelNodeRawStringArray((data as any)['logMessages']);\n\n if (parseLog.length > 0) {\n parseLog.forEach(logEntry => logger.debug(logEntry));\n }\n\n return model;\n } catch (error) {\n return null;\n }\n }\n}\n","/* eslint @typescript-eslint/no-unused-vars: 0 */ // --> OFF\n/* eslint @typescript-eslint/no-explicit-any: 0 */ // --> OFF\nimport chalk from 'chalk';\n\nimport { JSONObject } from '@nsshunt/stsutils'\nimport { ISubscriptionPayload, IServiceInstanceTelemetry, \n IAgentInstanceTelemetry, SubscriptionTopic, IServiceInstances, IServiceInstancesThreads, \n IServices, IAgentWorkers, IAgentWorkerRunners, IAgents,\n ILambdaInstanceTelemetry, ILambdaTechnologies, ILambdaSubTechnologies,ILambdaSubTechnologiesInstance } from './../commonTypes.js'\n\nimport { ObservabilityModelUtils, IModelNodes, IModelNode } from './observabilitymodelutils.js'\n\nimport { Gauge } from '@nsshunt/stsobservability'\n\nimport { ISTSLogger } from '@nsshunt/stsutils'\n\nexport interface IObservabilityPayloadTransformerOptions {\n logger: ISTSLogger\n maxLogLength: number\n}\n\nexport enum runStates {\n idle = \"idle\",\n started = \"started\",\n stopped = \"stopped\"\n}\n\nexport class ObservabilityPayloadTransformer {\n #serviceModel: Record<string, IModelNodes | null> = { };\n #agentModel: Record<string, IModelNodes | null> = { };\n #lambdaModel: Record<string, IModelNodes | null> = { };\n #options: IObservabilityPayloadTransformerOptions\n\n #LogDebugMessage(message: any): void {\n this.#options.logger.debug(message);\n }\n\n #LogErrorMessage(message: any): void {\n this.#options.logger.error(message);\n }\n\n constructor(options: IObservabilityPayloadTransformerOptions) {\n this.#options = options;\n }\n\n get serviceModel(): JSONObject {\n return this.#serviceModel;\n }\n\n get agentModel(): JSONObject {\n return this.#agentModel;\n }\n\n get lambdaModel(): JSONObject {\n return this.#lambdaModel;\n }\n\n TransformSubscriptionPayloadCallback(subscriptionPayload: ISubscriptionPayload): void {\n switch (subscriptionPayload.subscriptionKey.topic) {\n // Services -----------------------------------------------------------------------------\n case SubscriptionTopic.AllServicesCombined : // /\n this.CreateModelAllServicesCombined(subscriptionPayload);\n break;\n case SubscriptionTopic.Services : // /serviceId\n this.CreateModelServices(subscriptionPayload);\n break;\n case SubscriptionTopic.ServiceInstances : // /serviceId/serviceInstanceId\n this.CreateModelServiceInstances(subscriptionPayload);\n break;\n case SubscriptionTopic.ServiceInstance : // /serviceId/serviceInstanceId/serviceInstanceProcessId\n this.CreateModelServiceInstance(subscriptionPayload);\n break;\n\n // Lambda -----------------------------------------------------------------------------\n case SubscriptionTopic.AllLambdasCombined : // /\n this.CreateModelAllLambdasCombined(subscriptionPayload);\n break;\n case SubscriptionTopic.LambdaTechnologies : // /technology\n this.CreateModelLambdaTechnologies(subscriptionPayload);\n break;\n case SubscriptionTopic.LambdaSubTechnologies : // /technology/subTechnology\n this.CreateModelLambdaSubTechnologies(subscriptionPayload);\n break;\n case SubscriptionTopic.LambdaSubTechnologiesInstance : // /technology/subTechnology/subTechnologyInstance\n this.CreateModelLambdaSubTechnologiesInstance(subscriptionPayload);\n break;\n\n // Agents -----------------------------------------------------------------------------\n case SubscriptionTopic.AllAgentsCombined : // /\n this.CreateModelAllAgentsCombined(subscriptionPayload);\n break;\n case SubscriptionTopic.Agents : // /agentId\n this.CreateModelAgents(subscriptionPayload);\n break;\n case SubscriptionTopic.AgentWorkers :// /agentId/agentWorkerId\n this.CreateModelAgentWorkers(subscriptionPayload);\n break;\n case SubscriptionTopic.AgentWorker :// /agentId/agentWorkerId/asyncRunnerId\n this.CreateModelAgentWorker(subscriptionPayload);\n break;\n }\n }\n\n // --- [ Services ] ------------------------------------------------------------------------------------------------------------------------------------------------\n\n // /\n CreateModelAllServicesCombined(subscriptionPayload: ISubscriptionPayload): void {\n try {\n this.#serviceModel = { };\n if (subscriptionPayload.subscriptionKey.topic.localeCompare(SubscriptionTopic.AllServicesCombined.toString()) === 0) {\n this.#serviceModel['STS-Service'] = ObservabilityModelUtils.GetModelForService('STS-Service', subscriptionPayload.data as IServiceInstanceTelemetry, this.#options.logger);\n if (this.#serviceModel['STS-Service'] === null) {\n this.#LogDebugMessage(chalk.red(`CreateModelAllServicesCombined():Error: GetModelForService() returned null`));\n }\n }\n } catch (error) {\n this.#LogErrorMessage(error);\n return\n }\n }\n\n // /serviceId\n CreateModelServices(subscriptionPayload: ISubscriptionPayload): void {\n try {\n this.#serviceModel = { };\n for (const [serviceId, serviceTelemetry] of Object.entries(subscriptionPayload.data as IServices)) {\n this.#serviceModel[serviceId] = ObservabilityModelUtils.GetModelForService(serviceId, serviceTelemetry, this.#options.logger);\n if (this.#serviceModel[serviceId] === null) {\n this.#LogDebugMessage(chalk.red(`CreateModelServices():Error: GetModelForService() returned null`));\n }\n }\n } catch (error) {\n return\n }\n }\n \n // /serviceId/serviceInstanceId\n CreateModelServiceInstances(subscriptionPayload: ISubscriptionPayload): void {\n try {\n this.#serviceModel = { };\n for (const [serviceId, service] of Object.entries(subscriptionPayload.data as IServiceInstances)) {\n for (const [serviceInstanceId, serviceInstanceTelemetry] of Object.entries(service)) {\n // Now only show those entries with an active CPU - other dead instances will come back from the server\n // within the 10 minute time series. So these entries will exists for quantile and histo figures.\n if (serviceInstanceTelemetry.cpu && serviceInstanceTelemetry.cpu > 0.0) {\n // Update the model with processed data\n this.#serviceModel[serviceInstanceId] = ObservabilityModelUtils.GetModelForService(serviceInstanceId, serviceInstanceTelemetry, this.#options.logger);\n if (this.#serviceModel[serviceInstanceId] !== null) {\n // Add additional options for navigation (in addition to the 'id' property already sent automatically\n (this.#serviceModel[serviceInstanceId] as IModelNodes).options = { serviceId };\n } else {\n this.#LogDebugMessage(chalk.red(`CreateModelServiceInstances():Error: GetModelForService() returned null`));\n }\n }\n }\n }\n } catch (error) {\n return\n }\n }\n\n // serviceId/serviceInstanceId/serviceInstanceProcessId\n CreateModelServiceInstance(subscriptionPayload: ISubscriptionPayload): void {\n try {\n this.#serviceModel = { };\n for (const [serviceId, service] of Object.entries(subscriptionPayload.data as IServiceInstancesThreads)) {\n for (const [serviceInstanceId, serviceInstance] of Object.entries(service)) {\n for (const [serviceInstanceProcessId, serviceInstanceProcessTelemetry] of Object.entries(serviceInstance)) {\n // Now only show those entries with an active CPU - other dead instances will come back from the server\n // within the 10 minute time series. So these entries will exists for quantile and histo figures.\n if (serviceInstanceProcessTelemetry.cpu && serviceInstanceProcessTelemetry.cpu > 0.0) {\n // Update the model with processed data\n this.#serviceModel[serviceInstanceProcessId] = ObservabilityModelUtils.GetModelForService(serviceInstanceProcessId, serviceInstanceProcessTelemetry, this.#options.logger);\n if (this.#serviceModel[serviceInstanceProcessId] !== null) {\n // Add additional options for navigation (in addition to the 'id' property already sent automatically\n (this.#serviceModel[serviceInstanceProcessId] as IModelNodes).options = { serviceId, serviceInstanceId };\n } else {\n this.#LogDebugMessage(chalk.red(`CreateModelServiceInstance():Error: GetModelForService() returned null`));\n }\n }\n }\n }\n }\n } catch (error) {\n return\n }\n }\n\n // --- [ Agents ] ------------------------------------------------------------------------------------------------------------------------------------------------\n \n // /\n CreateModelAllAgentsCombined(subscriptionPayload: ISubscriptionPayload): void {\n try {\n this.#agentModel = { };\n if (subscriptionPayload.subscriptionKey.topic.localeCompare(SubscriptionTopic.AllAgentsCombined.toString()) === 0) {\n if (Object.keys(subscriptionPayload.data as IAgentInstanceTelemetry).length !== 0) {\n this.#agentModel['STS-Agent'] = ObservabilityModelUtils.GetModelForAgent('STS-Agent', subscriptionPayload.data as IAgentInstanceTelemetry, this.#options.logger);\n if (this.#agentModel['STS-Agent'] === null) {\n this.#LogDebugMessage(chalk.red(`CreateModelAllAgentsCombined():Error: GetModelForAgent() returned null`));\n }\n }\n }\n } catch (error) {\n this.#LogErrorMessage(error);\n return\n }\n }\n\n // /agentId\n CreateModelAgents(subscriptionPayload: ISubscriptionPayload): void {\n try {\n this.#agentModel = { };\n for (const [agentId, agentInstanceTelemetry] of Object.entries(subscriptionPayload.data as IAgents)) {\n // Now only show those entries with an active timer - other dead instances will come back from the server\n // within the 10 minute time series. So these entries will exists for quantile and histo figures.\n if (agentInstanceTelemetry.timer) {\n this.#agentModel[agentId] = ObservabilityModelUtils.GetModelForAgent(agentId, agentInstanceTelemetry, this.#options.logger);\n if (this.#agentModel[agentId] !== null) {\n } else {\n this.#LogDebugMessage(chalk.red(`CreateModelAgents():Error: GetModelForAgent() returned null`));\n }\n }\n }\n } catch (error) {\n this.#LogErrorMessage(chalk.red(`UIControllerAgent:CreateModel(): Error: [${error}]`));\n }\n }\n\n // /agentId/agentWorkerId\n CreateModelAgentWorkers(subscriptionPayload: ISubscriptionPayload): void {\n try {\n this.#agentModel = { };\n for (const [agentId, agentWorker] of Object.entries(subscriptionPayload.data as IAgentWorkers)) {\n for (const [agentWorkerId, agentInstanceTelemetry] of Object.entries(agentWorker)) {\n // Now only show those entries with an active timer - other dead instances will come back from the server\n // within the 10 minute time series. So these entries will exists for quantile and histo figures.\n if (agentInstanceTelemetry.timer) {\n //const threadKey = `${agentName}_${threadId}`;\n const threadKey = `${agentWorkerId}`;\n this.#agentModel[threadKey] = ObservabilityModelUtils.GetModelForAgent(threadKey, agentInstanceTelemetry, this.#options.logger);\n if (this.#agentModel[threadKey] !== null) {\n const coreCount = (((this.#agentModel[threadKey] as IModelNodes).instruments[Gauge.CORE_COUNT_GAUGE]) as IModelNode).val;\n (this.#agentModel[threadKey] as IModelNodes).canNavigate = coreCount > 0;\n // Add additional options for navigation (in addition to the 'id' property already sent automatically\n (this.#agentModel[threadKey] as IModelNodes).options = { agentId };\n } else {\n this.#LogDebugMessage(chalk.red(`CreateModelAgentWorkers():Error: GetModelForAgent() returned null`));\n }\n }\n }\n }\n } catch (error) {\n this.#LogErrorMessage(chalk.red(`UIControllerAgentThreads:CreateModel(): Error: [${error}]`));\n }\n }\n\n // /agentId/agentWorkerId/asyncRunnerId\n CreateModelAgentWorker(subscriptionPayload: ISubscriptionPayload): void {\n try {\n this.#agentModel = { };\n for (const [agentId, agentWorker] of Object.entries(subscriptionPayload.data as IAgentWorkerRunners)) {\n for (const [agentWorkerId, asyncRunnerData] of Object.entries(agentWorker)) {\n for (const [asyncRunnerId, agentInstanceTelemetry] of Object.entries(asyncRunnerData)) {\n // Now only show those entries with an active timer - other dead instances will come back from the server\n // within the 10 minute time series. So these entries will exists for quantile and histo figures.\n if (agentInstanceTelemetry.timer) {\n this.#agentModel[asyncRunnerId] = ObservabilityModelUtils.GetModelForAgent(asyncRunnerId, agentInstanceTelemetry, this.#options.logger);\n }\n }\n }\n }\n } catch (error) {\n this.#LogErrorMessage(chalk.red(`UIControllerAgentThread:CreateModel(): Error: [${error}]`));\n }\n }\n // --- [ Lambdas ] ------------------------------------------------------------------------------------------------------------------------------------------------\n\n // /\n CreateModelAllLambdasCombined(subscriptionPayload: ISubscriptionPayload): void {\n try {\n this.#lambdaModel = { };\n if (subscriptionPayload.subscriptionKey.topic.localeCompare(SubscriptionTopic.AllLambdasCombined.toString()) === 0) {\n this.#lambdaModel['STS-Lambda'] = ObservabilityModelUtils.GetModelForLambda('STS-Lambda', subscriptionPayload.data as ILambdaInstanceTelemetry, this.#options.logger);\n if (this.#lambdaModel['STS-Lambda'] === null) {\n this.#LogDebugMessage(chalk.red(`CreateModelAllLambdasCombined():Error: GetModelForLambda() returned null`));\n }\n }\n } catch (error) {\n this.#LogErrorMessage(error);\n return\n }\n }\n\n // /technologyId\n CreateModelLambdaTechnologies(subscriptionPayload: ISubscriptionPayload): void {\n try {\n this.#lambdaModel = { };\n for (const [technologyId, technologyTelemetry] of Object.entries(subscriptionPayload.data as ILambdaTechnologies)) {\n this.#lambdaModel[technologyId] = ObservabilityModelUtils.GetModelForLambda(technologyId, technologyTelemetry, this.#options.logger);\n if (this.#lambdaModel[technologyId] === null) {\n this.#LogDebugMessage(chalk.red(`CreateModelLambdaTechnologies():Error: GetModelForLambda() returned null`));\n }\n }\n } catch (error) {\n return\n }\n }\n\n // /technologyId/subTechnologyId\n CreateModelLambdaSubTechnologies(subscriptionPayload: ISubscriptionPayload): void {\n try {\n this.#lambdaModel = { };\n //console.log(chalk.red(`CreateModelLambdaSubTechnologies()-zz: [${JSON.stringify(subscriptionPayload.data)}]`));\n for (const [technologyId, technologyTelemetry] of Object.entries(subscriptionPayload.data as ILambdaSubTechnologies)) {\n for (const [subTechnologyId, subTechnologyTelemetry] of Object.entries(technologyTelemetry)) {\n // Now only show those entries with an active CPU - other dead instances will come back from the server\n // within the 10 minute time series. So these entries will exists for quantile and histo figures.\n if (subTechnologyTelemetry.cpu && subTechnologyTelemetry.cpu > 0.0) {\n // Update the model with processed data\n this.#lambdaModel[subTechnologyId] = ObservabilityModelUtils.GetModelForLambda(subTechnologyId, subTechnologyTelemetry, this.#options.logger);\n if (this.#lambdaModel[subTechnologyId] !== null) {\n // Add additional options for navigation (in addition to the 'id' property already sent automatically\n (this.#lambdaModel[subTechnologyId] as IModelNodes).options = { technologyId };\n } else {\n this.#LogDebugMessage(chalk.red(`CreateModelLambdaSubTechnologies():Error: GetModelForLambda() returned null`));\n }\n }\n }\n }\n } catch (error) {\n return\n }\n }\n\n // /technologyId/subTechnologyId/subTechnologyInstanceId\n CreateModelLambdaSubTechnologiesInstance(subscriptionPayload: ISubscriptionPayload): void {\n try {\n this.#lambdaModel = { };\n //console.log(chalk.red(`CreateModelLambdaSubTechnologies()-zz: [${JSON.stringify(subscriptionPayload.data)}]`));\n for (const [technologyId, technologyTelemetry] of Object.entries(subscriptionPayload.data as ILambdaSubTechnologiesInstance)) {\n for (const [subTechnologyId, subTechnologyTelemetry] of Object.entries(technologyTelemetry)) {\n for (const [subTechnologyInstanceId, subTechnologyInstanceTelemetry] of Object.entries(subTechnologyTelemetry)) {\n // Now only show those entries with an active CPU - other dead instances will come back from the server\n // within the 10 minute time series. So these entries will exists for quantile and histo figures.\n if (subTechnologyInstanceTelemetry.cpu && subTechnologyInstanceTelemetry.cpu > 0.0) {\n // Update the model with processed data\n this.#lambdaModel[subTechnologyInstanceId] = ObservabilityModelUtils.GetModelForLambda(subTechnologyInstanceId, subTechnologyInstanceTelemetry, this.#options.logger);\n if (this.#lambdaModel[subTechnologyInstanceId] !== null) {\n // Add additional options for navigation (in addition to the 'id' property already sent automatically\n (this.#lambdaModel[subTechnologyInstanceId] as IModelNodes).options = { technologyId, subTechnologyId };\n } else {\n this.#LogDebugMessage(chalk.red(`CreateModelLambdaSubTechnologiesInstance():Error: GetModelForLambda() returned null`));\n }\n }\n }\n }\n }\n } catch (error) {\n return\n }\n }\n}\n","/* eslint @typescript-eslint/no-unused-vars: 0 */ // --> OFF\n/* eslint @typescript-eslint/no-explicit-any: 0 */ // --> OFF\nimport { ISubscription, ISubscriptions, ISubscriptionPayload, SubscriptionTopic, IObservabilitySocketIOSubscriberOptions } from './../commonTypes.js'\n\nimport chalk from 'chalk';\n\nimport axios from 'axios';\n\nimport isNode from 'detect-node'\n//import { AgentManager, STSAxiosConfig } from '@nsshunt/stsutils';\n\nimport { STSAxiosConfig } from '@nsshunt/stsutils';\n\ndeclare interface ISocketSubscribeKeepAlive {\n id: string\n timeout?: number\n}\n\nexport class RESTClientSubscriber {\n #socketSubscribeKeepAlive: Record<string, ISocketSubscribeKeepAlive> = { };\n #options: IObservabilitySocketIOSubscriberOptions\n // This is required becuase each call to .bind create a new replica bound function - so we need the same instance for on/off event bindings.\n KeepAliveAckBoundFunction: any;\n #currentSubscriptions: ISubscriptions = [ ];\n\n constructor(options: IObservabilitySocketIOSubscriberOptions) {\n this.#options = options;\n }\n\n #LogDebugMessage(message: any): void {\n this.#options.logger.debug(message);\n }\n\n #LogErrorMessage(message: any): void {\n this.#options.logger.error(message);\n }\n\n async Subscribe(subscriptions: ISubscriptions): Promise<void> {\n subscriptions.map(async (subId) => {\n // Subscribe to socket.io event from stsinstrumentmanager\n this.#RemoveKeepAlive(subId);\n this.#LogDebugMessage(chalk.yellow(`RESTClientSubscriber:Subscribe(): Sending subscribe: subscriptionKey: [${subId.subscriptionKey.id}]`));\n try {\n this.#AddKeepAlive(subId);\n } catch (error) {\n this.#LogErrorMessage(chalk.red(`RESTClientSubscriber:Subscribe(): Error: response: [${JSON.stringify(error)}]`));\n this.#RemoveKeepAlive(subId);\n }\n });\n }\n\n UnSubscribe(subscriptions: ISubscriptions) {\n subscriptions.map(async (subId) => {\n // Unsubscribe to socket.io event from stsinstrumentmanager\n this.#RemoveKeepAlive(subId);\n this.#LogDebugMessage(chalk.yellow(`RESTClientSubscriber:UnSubscribe(): Sending unsubscribe: subscriptionKey: [${subId.subscriptionKey.id}]`));\n });\n }\n\n UpdateModelCursor = (subscriptions: ISubscriptions): void => {\n this.#LogDebugMessage(chalk.yellow(`RESTClientSubscriber:UnSubscribe(): UpdateModelCursor()`));\n this.UnSubscribe(this.#currentSubscriptions);\n this.#currentSubscriptions = subscriptions;\n this.Subscribe(this.#currentSubscriptions);\n }\n\n async #InvokeRESTAPI(subscription: ISubscription): Promise<any> {\n this.#LogDebugMessage(chalk.yellow(`RESTClientSubscriber:#InvokeRESTAPI(): subscriptionKey: [${subscription.subscriptionKey.id}]`));\n // Service subscriptions\n const { subscriptionKey } = subscription;\n let url: string = '';\n switch (subscriptionKey.topic) {\n // Services -------------------------------------------------------------------------------------------\n case SubscriptionTopic.AllServicesCombined : // /metrics = getMetrics\n url = `/metrics`;\n break;\n case SubscriptionTopic.Services : // /metrics/:apptype = getApps apptype = services\n url = `/metrics/services`;\n break;\n case SubscriptionTopic.ServiceInstances :\n if (subscriptionKey.key) { // key = service_id /metrics/:apptype/:appid = getApp\n url = `/metrics/services/${subscriptionKey.key}`;\n break;\n } else {\n throw new Error(`#OutputSubscription(Services): key not provided for subscription: [${JSON.stringify(subscriptionKey)}]`);\n }\n case SubscriptionTopic.ServiceInstance :\n url = `/metrics/services/${subscriptionKey.key}`;\n if (subscriptionKey.key && subscriptionKey.subkey) { // key = service instance id /metrics/:apptype/:appid/:appinstanceid = getAppInstance\n url = `/metrics/services/${subscriptionKey.key}/${subscriptionKey.subkey}`;\n break;\n } else {\n throw new Error(`#OutputSubscription(Services): key not provided for subscription: [${JSON.stringify(subscriptionKey)}]`);\n }\n\n // Lambdas -------------------------------------------------------------------------------------------\n case SubscriptionTopic.AllLambdasCombined : // /metrics = getMetrics\n url = `/metrics`;\n break;\n case SubscriptionTopic.LambdaTechnologies : // /metrics/:apptype = getApps apptype = services\n url = `/metrics/lambdas`;\n break;\n case SubscriptionTopic.LambdaSubTechnologies :\n if (subscriptionKey.key) { // key = service_id /metrics/:apptype/:appid = getApp\n url = `/metrics/lambdas/${subscriptionKey.key}`;\n break;\n } else {\n throw new Error(`#OutputSubscription(Lambdas): key not provided for subscription: [${JSON.stringify(subscriptionKey)}]`);\n }\n case SubscriptionTopic.LambdaSubTechnologiesInstance :\n url = `/metrics/lambdas/${subscriptionKey.key}`;\n if (subscriptionKey.key && subscriptionKey.subkey) { // key = service instance id /metrics/:apptype/:appid/:appinstanceid = getAppInstance\n url = `/metrics/lambdas/${subscriptionKey.key}/${subscriptionKey.subkey}`;\n break;\n } else {\n throw new Error(`#OutputSubscription(Lambdas): key not provided for subscription: [${JSON.stringify(subscriptionKey)}]`);\n }\n\n // User Agents -------------------------------------------------------------------------------------------\n case SubscriptionTopic.AllAgentsCombined : // /metrics = getMetrics (@@ called twice ??)\n url = `/metrics`;\n break;\n case SubscriptionTopic.Agents : // /metrics/:apptype = getApps apptype = agents\n url = `/metrics/agents`;\n break;\n case SubscriptionTopic.AgentWorkers :\n if (subscriptionKey.key) { // key = agent instance id /metrics/:apptype/:appid = getApp\n url = `/metrics/agents/${subscriptionKey.key}`;\n break;\n } else {\n throw new Error(`#OutputSubscription(Agents): key not provided for subscription: [${JSON.stringify(subscriptionKey)}]`);\n }\n case SubscriptionTopic.AgentWorker : // /metrics/:apptype/:appid/:appinstanceid = getAppInstance\n if (subscriptionKey.key && subscriptionKey.subkey) { // key = agent instance id, subkey = agent instance worker id\n url = `/metrics/agents/${subscriptionKey.key}/${subscriptionKey.subkey}`;\n break;\n } else {\n throw new Error(`#OutputSubscription(Agents): key and/or subkey not provided for subscription: [${JSON.stringify(subscriptionKey.topic)}]`);\n }\n }\n if (url.localeCompare('') !== 0) {\n const endPointUrl = `${this.#options.urlBase}${url}`;\n\n let retVal: any;\n\n const start = performance.now();\n try {\n this.#LogDebugMessage(chalk.yellow(`RESTClientSubscriber:#InvokeRESTAPI(): axios call: endPointUrl: [${endPointUrl}]`));\n if (isNode && this.#options.agentManager) {\n retVal = await axios(new STSAxiosConfig(endPointUrl, 'get')\n .withDefaultHeaders()\n .withAgentManager(this.#options.agentManager).config);\n } else {\n retVal = await axios(new STSAxiosConfig(endPointUrl, 'get')\n .withDefaultHeaders().config);\n }\n\n /*\n retVal = await axios(new STSAxiosConfig(endPointUrl, 'get')\n .withDefaultHeaders().config);\n */\n\n if (retVal) {\n if (retVal.data) {\n //@@ could use silly here\n //@@this.#LogDebugMessage(chalk.yellow(`RESTClientSubscriber:#InvokeRESTAPI(): retVal.data: [${JSON.stringify(retVal.data)}]`));\n } else {\n this.#LogDebugMessage(chalk.yellow(`RESTClientSubscriber:#InvokeRESTAPI(): no retVal.data`)); \n }\n } else {\n this.#LogDebugMessage(chalk.yellow(`RESTClientSubscriber:#InvokeRESTAPI(): no retVal`));\n }\n\n const end = performance.now();\n const diff = end - start;\n //console.log(`total time: [${diff}]`);\n\n if (subscriptionKey.topic.localeCompare(SubscriptionTopic.AllServicesCombined) === 0) {\n return retVal.data['services'];\n }\n \n if (subscriptionKey.topic.localeCompare(SubscriptionTopic.AllAgentsCombined) === 0) {\n return retVal.data['agents'];\n }\n\n if (subscriptionKey.topic.localeCompare(SubscriptionTopic.AllLambdasCombined) === 0) {\n return retVal.data['lambdas'];\n }\n return retVal.data;\n } catch (error) {\n this.#LogErrorMessage(chalk.red(`RESTClientSubscriber:#InvokeRESTAPI(): subscriptionKey: [${subscription.subscriptionKey.id}], Error: [${error}]`));\n //console.error(chalk.red(`RESTClientSubscriber:#InvokeRESTAPI(): Error: [${error}]`));\n return null;\n }\n } else {\n return null;\n }\n }\n\n #GetData = async (subscription: ISubscription) => {\n try {\n this.#LogDebugMessage(chalk.yellow(`RESTClientSubscriber:#GetData(): subscriptionKey: [${JSON.stringify(subscription.subscriptionKey)}`));\n const retVal = await this.#InvokeRESTAPI(subscription);\n if (retVal) {\n const payload: ISubscriptionPayload = {\n subscriptionKey: subscription.subscriptionKey,\n data: retVal\n };\n //@@ could use silly here\n //this.#LogDebugMessage(chalk.yellow(`RESTClientSubscriber:#GetData(): data returned: subscriptionKey: [${JSON.stringify(subscription.subscriptionKey)}, retVal: [${JSON.stringify(retVal)}]`));\n this.#LogDebugMessage(chalk.yellow(`RESTClientSubscriber:#GetData(): data returned: subscriptionKey: [${JSON.stringify(subscription.subscriptionKey)}`));\n subscription.cb(payload);\n } else {\n this.#LogDebugMessage(chalk.yellow(`RESTClientSubscriber:#GetData(): No data returned: subscriptionKey: [${JSON.stringify(subscription.subscriptionKey)}`));\n }\n } catch (error) {\n this.#LogErrorMessage(chalk.red(`RESTClientSubscriber:#AddKeepAlive(): Error response: [${JSON.stringify(error)}]`));\n this.#RemoveKeepAlive(subscription);\n }\n }\n\n #SetupTimeout(socketSubscribeKeepAlive: ISocketSubscribeKeepAlive, subscription: ISubscription, timeout: number): number {\n return setTimeout(async () => {\n try {\n const start = performance.now();\n await this.#GetData(subscription);\n if (socketSubscribeKeepAlive.timeout) {\n const end = performance.now();\n const diff = end - start;\n let timeoutDuration = (this.#options.keepAlive ?? 1000) - diff;\n if (timeoutDuration < 500) {\n timeoutDuration = 500;\n }\n this.#LogDebugMessage(chalk.yellow(`Total duration for subscription: [${diff}], waiting: [${timeoutDuration}]`));\n socketSubscribeKeepAlive.timeout = this.#SetupTimeout(socketSubscribeKeepAlive, subscription, timeoutDuration)\n } else {\n this.#LogDebugMessage(chalk.yellow(`RESTClientSubscriber: Subscription removed: [${socketSubscribeKeepAlive.id}]. Processing terminate.`));\n }\n } catch (error) {\n this.#LogErrorMessage(chalk.red(`RESTClientSubscriber:#AddKeepAlive(): Error response: [${JSON.stringify(error)}]`));\n this.#RemoveKeepAlive(subscription);\n }\n }, timeout) as any\n }\n\n\n #AddKeepAlive(subscription: ISubscription): void {\n this.#LogDebugMessage(chalk.yellow(`RESTClientSubscriber:#AddKeepAlive(): subscriptionKey: [${subscription.subscriptionKey.id}]`));\n this.#RemoveKeepAlive(subscription);\n const socketSubscribeKeepAlive:ISocketSubscribeKeepAlive = {\n id: subscription.subscriptionKey.id,\n }\n socketSubscribeKeepAlive.timeout = this.#SetupTimeout(socketSubscribeKeepAlive, subscription, (this.#options.keepAlive ?? 1000));\n this.#socketSubscribeKeepAlive[subscription.subscriptionKey.id] = socketSubscribeKeepAlive;\n\n this.#LogDebugMessage(chalk.yellow(`RESTClientSubscriber:#AddKeepAlive(): Getting Data: subscriptionKey: [${subscription.subscriptionKey.id}]`));\n this.#GetData(subscription);\n }\n\n #RemoveKeepAlive(subscription: ISubscription): void {\n if (this.#socketSubscribeKeepAlive[subscription.subscriptionKey.id]) {\n this.#LogDebugMessage(chalk.gray(`RESTClientSubscriber:#RemoveKeepAlive(): subscriptionKey: [${subscription.subscriptionKey.id}]`));\n clearTimeout(this.#socketSubscribeKeepAlive[subscription.subscriptionKey.id].timeout);\n delete this.#socketSubscribeKeepAlive[subscription.subscriptionKey.id].timeout;\n delete this.#socketSubscribeKeepAlive[subscription.subscriptionKey.id];\n }\n }\n}","/* eslint @typescript-eslint/no-unused-vars: 0, @typescript-eslint/no-explicit-any: 0 */ // --> OFF\nimport { Socket } from 'socket.io-client'\n\nimport { type ISubscriptions, ClientToServerEvents, ISubscriptionPayload, ServerToClientEvents, ISubscription } from './../commonTypes.js'\n\nimport { defaultLogger } from '@nsshunt/stsutils'\n\nimport chalk from 'chalk';\n\nimport { SocketIoClient, STSDefaultClientToServerEvents, STSDefaultServerToClientEvents } from '@nsshunt/stssocketioutils'\n\n//import { v4 as uuidv4 } from 'uuid';\n\nimport { IObservabilitySubscriberManagerOptions } from './../commonTypes.js'\n\nconst SOCKET_NAMESPACE = 'stsinstrumentmanager/stsmonitor'\n\nexport class SocketClientSubscriber extends SocketIoClient<ServerToClientEvents, ClientToServerEvents> {\n #options: IObservabilitySubscriberManagerOptions;\n #id: string;\n #currentSubscriptions: ISubscriptions = [ ];\n\n protected subscriptions: Record<string, ISubscription> = { };\n\n constructor(options: IObservabilitySubscriberManagerOptions) {\n super('STSVueTilsTester');\n this.#id = globalThis.crypto.randomUUID();\n this.#options = options;\n\n this.LogDebugMessage(chalk.cyan(`${this.logPrefix}Start()`));\n const url = `${this.#options.instrumentManagerEndpoint}:${this.#options.instrumentManagerPort}/${SOCKET_NAMESPACE}/`;\n this.LogDebugMessage(chalk.cyan(`${this.logPrefix}SetupSocket() url: [${url}]`));\n this.WithAddress(url)\n .WithLogger(this.#options.logger ?? defaultLogger)\n .SetupSocket();\n }\n \n get id() {\n return this.#id;\n }\n\n get logPrefix() {\n if (this.#options) {\n return `stsimclient:ObservabilitySubscriberManager[${this.#options.consumeInstrumentationMode}]:`;\n } else {\n return `stsimclient:ObservabilitySubscriberManager:`;\n }\n }\n\n UpdateModelCursor = (subscriptions: ISubscriptions): void => {\n this.UnSubscribe(this.#currentSubscriptions);\n this.#currentSubscriptions = subscriptions;\n this.Subscribe(this.#currentSubscriptions);\n }\n\n Subscribe(subscriptions: ISubscriptions) {\n subscriptions.map(async (subId) => {\n // Subscribe to socket.io event from stsinstrumentmanager\n try {\n if (this.socket) {\n this.LogDebugMessage(chalk.yellow(`ObservabilitySocketIOSubscriber:Subscribe(): Sending subscribe: subscriptionKey: [${subId.subscriptionKey.id}]`));\n this.socket.timeout(1000).emit('subscribe', subId.subscriptionKey, (error: Error, data: any) => {\n if (error) {\n this.LogErrorMessage(chalk.red(`ObservabilitySocketIOSubscriber:Subscribe(): Error: [${error}], data: [${data}]`));\n } else {\n this.LogDebugMessage(chalk.green(`ObservabilitySocketIOSubscriber:Subscribe(): Response: [${JSON.stringify(data)}]`));\n this.subscriptions[subId.subscriptionKey.id] = subId;\n }\n });\n }\n } catch (error) {\n this.LogErrorMessage(chalk.red(`ObservabilitySocketIOSubscriber:Subscribe(): Error: response: [${JSON.stringify(error)}]`));\n }\n });\n }\n\n UnSubscribe(subscriptions: ISubscriptions) {\n subscriptions.map(async (subId) => {\n try {\n if (this.socket) {\n this.LogDebugMessage(chalk.yellow(`ObservabilitySocketIOSubscriber:UnSubscribe(): Sending unsubscribe: subscriptionKey: [${subId.subscriptionKey.id}]`));\n this.socket.timeout(1000).emit('unsubscribe', subId.subscriptionKey, (error: Error, data: any) => {\n if (error) {\n this.LogErrorMessage(chalk.red(`ObservabilitySocketIOSubscriber:UnSubscribe(): Error: [${error}], data: [${data}]`));\n } else {\n this.LogDebugMessage(chalk.green(`ObservabilitySocketIOSubscriber:UnSubscribe(): Response: [${JSON.stringify(data)}]`));\n delete this.subscriptions[subId.subscriptionKey.id];\n }\n });\n }\n } catch (error) {\n this.LogErrorMessage(chalk.red(`ObservabilitySocketIOSubscriber:UnSubscribe(): Error response: [${JSON.stringify(error)}]`));\n }\n });\n }\n\n protected SocketConnect(socket: Socket<STSDefaultServerToClientEvents, STSDefaultClientToServerEvents>): void {\n this.LogDebugMessage(chalk.magenta(`${this.logPrefix}SocketConnect(): Socket ID: [${socket.id}]`));\n this.UpdateModelCursor(this.#currentSubscriptions);\n }\n\n protected SocketError(error: Error): void {\n this.LogErrorMessage(chalk.red(`${this.logPrefix}SocketError(): Error: [${error}]`))\n }\n\n protected SetupSocketEvents(socket: Socket<STSDefaultServerToClientEvents, STSDefaultClientToServerEvents>): void {\n this.LogDebugMessage(chalk.magenta(`${this.logPrefix}SetupSocketEvents(): Socket ID: [${socket.id}]`));\n if (this.socket) {\n this.socket.on('subscriptionData', (data: ISubscriptionPayload, cb) => {\n this.LogDebugMessage(chalk.magenta(`${this.logPrefix}SetupSocketEvents(): on subscriptionData(): Socket ID: [${socket.id}]`));\n const subId = data.subscriptionKey.id;\n const currentSubscriptions = Object.keys(this.subscriptions).toString();\n if (this.subscriptions[subId]) {\n this.subscriptions[subId].cb(data);\n cb(`stsuxvue:subscriptionData Response: [${JSON.stringify(data.subscriptionKey)}], Current Subscriptions: [${currentSubscriptions}]`);\n } else {\n cb(`stsuxvue:subscriptionData Response: No subscription found in subscriptions: [${JSON.stringify(data.subscriptionKey)}], Current Subscriptions: [${currentSubscriptions}]`);\n }\n });\n }\n }\n\n protected SocketConnectError(error: Error): void {\n this.LogErrorMessage(chalk.red(`${this.logPrefix}SocketConnectError(): Error: [${error}]`))\n }\n\n protected SocketDisconnect(reason: string): void {\n this.LogErrorMessage(chalk.red(`${this.logPrefix}SocketDisconnect(): reason: [${reason}]`))\n }\n}\n","/* eslint @typescript-eslint/no-unused-vars: 0, @typescript-eslint/no-explicit-any: 0 */ // --> OFF\nimport { Socket } from 'socket.io-client'\n\nimport { defaultLogger } from '@nsshunt/stsutils'\n\nimport chalk from 'chalk';\n\nimport { SocketIoClient, STSDefaultClientToServerEvents, STSDefaultServerToClientEvents } from '@nsshunt/stssocketioutils'\n\n//import { v4 as uuidv4 } from 'uuid';\n\nconst SOCKET_NAMESPACE = 'stsinstrumentmanager/stsmonitor'\n\nexport interface ISocketBrowserClientLogPublisherOptions {\n rooms: string[]\n imendpoint: string\n import: string\n}\n\nexport class SocketBrowserClientLogPublisher extends SocketIoClient<STSDefaultServerToClientEvents, STSDefaultClientToServerEvents> {\n #id: string;\n #options: ISocketBrowserClientLogPublisherOptions;\n\n constructor(options: ISocketBrowserClientLogPublisherOptions) {\n super('stsinstrumentmanagerclient:SocketBrowserClientLogPublisher');\n this.#options = options;\n this.#id = globalThis.crypto.randomUUID();\n this.LogDebugMessage(chalk.cyan(`${this.logPrefix}Start()`));\n const url = `${this.#options.imendpoint}:${this.#options.import}/${SOCKET_NAMESPACE}/`;\n //const url = `https://stscore.stsmda.org:${goptions.import}/${SOCKET_NAMESPACE}/`;\n this.LogDebugMessage(chalk.cyan(`${this.logPrefix}SetupSocket() url: [${url}]`));\n this.WithAddress(url)\n .WithLogger(defaultLogger)\n .SetupSocket();\n }\n \n get id() {\n return this.#id;\n }\n\n get logPrefix() {\n return `stsinstrumentmanagerclient:SocketBrowserClientLogPublisher:`;\n }\n\n protected SocketConnect(socket: Socket<STSDefaultServerToClientEvents, STSDefaultClientToServerEvents>): void {\n this.LogDebugMessage(chalk.magenta(`${this.logPrefix}SocketConnect(): Socket ID: [${socket.id}], Joining Room: [${this.#options.rooms}]`));\n socket.emit('__STSjoinRoom', this.#options.rooms);\n }\n\n protected SocketError(error: Error): void {\n this.LogErrorMessage(chalk.red(`${this.logPrefix}SocketError(): Error: [${error}]`))\n }\n\n protected SetupSocketEvents(socket: Socket<STSDefaultServerToClientEvents, STSDefaultClientToServerEvents>): void {\n this.LogDebugMessage(chalk.magenta(`${this.logPrefix}SetupSocketEvents(): Socket ID: [${socket.id}]`));\n }\n\n protected SocketConnectError(error: Error): void {\n this.LogErrorMessage(chalk.red(`${this.logPrefix}SocketConnectError(): Error: [${error}]`))\n }\n\n protected SocketDisconnect(reason: string): void {\n this.LogErrorMessage(chalk.red(`${this.logPrefix}SocketDisconnect(): reason: [${reason}]`))\n }\n}\n","/* eslint @typescript-eslint/no-explicit-any: 0 */ // --> OFF\nimport { STSDefaultClientToServerEvents, STSDefaultServerToClientEvents, SocketIoClient } from '@nsshunt/stssocketioutils'\n\nimport { SocketBrowserClientLogPublisher } from './socketBrowserClientLogPublisher.js'\n\nimport { ISTSLogger } from '@nsshunt/stsutils';\n\nexport interface ISTSLoggerSocketOptions {\n rooms: string[]\n imendpoint: string\n import: string\n}\n\nexport class STSLoggerSocket implements ISTSLogger {\n #options: ISTSLoggerSocketOptions;\n #socketIoClient: SocketIoClient<STSDefaultServerToClientEvents, STSDefaultClientToServerEvents>\n\n constructor(opts: ISTSLoggerSocketOptions) {\n this.#options = opts;\n\n this.#socketIoClient = new SocketBrowserClientLogPublisher({\n rooms: this.#options.rooms,\n imendpoint: this.#options.imendpoint,\n import: this.#options.import\n });\n\n this.#socketIoClient.socket?.emit('__STSjoinRoom', this.#options.rooms);\n }\n\n JoinRoom = () => {\n this.#socketIoClient.socket?.emit('__STSjoinRoom', this.#options.rooms);\n }\n\n error(message: any): void {\n this.#log({ level: 'error', message });\n }\n\n warn(message: any): void {\n this.#log({ level: 'warn', message });\n }\n\n info(message: any): void {\n this.#log({ level: 'info', message });\n }\n\n http(message: any): void {\n this.#log({ level: 'http', message });\n }\n\n verbose(message: any): void {\n this.#log({ level: 'verbose', message });\n }\n\n debug(message: any): void {\n this.#log({ level: 'debug', message });\n }\n\n silly(message: any): void {\n this.#log({ level: 'silly', message });\n }\n \n #log(info: any) {\n this.#socketIoClient.socket?.emit('__STSsendToRoom', this.#options.rooms, {\n command: 'logmessage',\n payload: {\n level: info.level,\n message: info.message,\n dateTime: Date.now()\n }\n });\n }\n}\n"],"x_google_ignoreList":[2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0BA,IAAY,oBAAL,yBAAA,mBAAA;AAEH,mBAAA,yBAAA;AACA,mBAAA,cAAA;AACA,mBAAA,sBAAA;AACA,mBAAA,qBAAA;AAGA,mBAAA,uBAAA;AACA,mBAAA,YAAA;AACA,mBAAA,kBAAA;AACA,mBAAA,iBAAA;AAGA,mBAAA,wBAAA;AACA,mBAAA,wBAAA;AACA,mBAAA,2BAAA;AACA,mBAAA,mCAAA;AAGA,mBAAA,mBAAA;;KACH;AAyJD,IAAa,8BAA8B,oBA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